@hanzogui/sheet 8.3.0 → 8.3.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/dist/cjs/GestureDetectorWrapper.js +23 -0
- package/dist/cjs/GestureDetectorWrapper.js.map +1 -0
- package/dist/cjs/GestureSheetContext.js +21 -0
- package/dist/cjs/GestureSheetContext.js.map +1 -0
- package/dist/cjs/Sheet.js +102 -0
- package/dist/cjs/Sheet.js.map +1 -0
- package/dist/cjs/SheetContext.js +8 -0
- package/dist/cjs/SheetContext.js.map +1 -0
- package/dist/cjs/SheetController.js +33 -0
- package/dist/cjs/SheetController.js.map +1 -0
- package/dist/cjs/SheetImplementationCustom.js +866 -0
- package/dist/cjs/SheetImplementationCustom.js.map +1 -0
- package/dist/cjs/SheetScrollView.js +278 -0
- package/dist/cjs/SheetScrollView.js.map +1 -0
- package/dist/cjs/constants.js +8 -0
- package/dist/cjs/constants.js.map +1 -0
- package/dist/cjs/contexts.js +10 -0
- package/dist/cjs/contexts.js.map +1 -0
- package/dist/cjs/controller.js +11 -0
- package/dist/cjs/controller.js.map +1 -0
- package/dist/cjs/createSheet.js +153 -0
- package/dist/cjs/createSheet.js.map +1 -0
- package/dist/cjs/gestureState.js +35 -0
- package/dist/cjs/gestureState.js.map +1 -0
- package/dist/cjs/helpers.js +29 -0
- package/dist/cjs/helpers.js.map +1 -0
- package/dist/cjs/index.js +19 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/keyboardAvoidance.js +67 -0
- package/dist/cjs/keyboardAvoidance.js.map +1 -0
- package/dist/cjs/nativeSheet.js +52 -0
- package/dist/cjs/nativeSheet.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/setupGestureHandler.js +31 -0
- package/dist/cjs/setupGestureHandler.js.map +1 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/cjs/useGestureHandlerPan.js +356 -0
- package/dist/cjs/useGestureHandlerPan.js.map +1 -0
- package/dist/cjs/useKeyboardControllerSheet.js +124 -0
- package/dist/cjs/useKeyboardControllerSheet.js.map +1 -0
- package/dist/cjs/useSafeAreaInsets.js +16 -0
- package/dist/cjs/useSafeAreaInsets.js.map +1 -0
- package/dist/cjs/useSheet.js +7 -0
- package/dist/cjs/useSheet.js.map +1 -0
- package/dist/cjs/useSheetController.js +19 -0
- package/dist/cjs/useSheetController.js.map +1 -0
- package/dist/cjs/useSheetOffscreenSize.js +40 -0
- package/dist/cjs/useSheetOffscreenSize.js.map +1 -0
- package/dist/cjs/useSheetOpenState.js +29 -0
- package/dist/cjs/useSheetOpenState.js.map +1 -0
- package/dist/cjs/useSheetProviderProps.js +169 -0
- package/dist/cjs/useSheetProviderProps.js.map +1 -0
- package/dist/cjs/useSheetScrollViewGestures.js +195 -0
- package/dist/cjs/useSheetScrollViewGestures.js.map +1 -0
- package/dist/cjs/webViewport.js +108 -0
- package/dist/cjs/webViewport.js.map +1 -0
- package/dist/esm/GestureDetectorWrapper.js +20 -0
- package/dist/esm/GestureDetectorWrapper.js.map +1 -0
- package/dist/esm/GestureSheetContext.js +17 -0
- package/dist/esm/GestureSheetContext.js.map +1 -0
- package/dist/esm/Sheet.js +97 -0
- package/dist/esm/Sheet.js.map +1 -0
- package/dist/esm/SheetContext.js +5 -0
- package/dist/esm/SheetContext.js.map +1 -0
- package/dist/esm/SheetController.js +28 -0
- package/dist/esm/SheetController.js.map +1 -0
- package/dist/esm/SheetImplementationCustom.js +862 -0
- package/dist/esm/SheetImplementationCustom.js.map +1 -0
- package/dist/esm/SheetScrollView.js +274 -0
- package/dist/esm/SheetScrollView.js.map +1 -0
- package/dist/esm/constants.js +5 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/contexts.js +6 -0
- package/dist/esm/contexts.js.map +1 -0
- package/dist/esm/controller.js +5 -0
- package/dist/esm/controller.js.map +1 -0
- package/dist/esm/createSheet.js +150 -0
- package/dist/esm/createSheet.js.map +1 -0
- package/dist/esm/gestureState.js +29 -0
- package/dist/esm/gestureState.js.map +1 -0
- package/dist/esm/helpers.js +26 -0
- package/dist/esm/helpers.js.map +1 -0
- package/dist/esm/index.js +13 -14
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/keyboardAvoidance.js +62 -0
- package/dist/esm/keyboardAvoidance.js.map +1 -0
- package/dist/esm/nativeSheet.js +48 -0
- package/dist/esm/nativeSheet.js.map +1 -0
- package/dist/esm/setupGestureHandler.js +27 -0
- package/dist/esm/setupGestureHandler.js.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/useGestureHandlerPan.js +353 -0
- package/dist/esm/useGestureHandlerPan.js.map +1 -0
- package/dist/esm/useKeyboardControllerSheet.js +121 -0
- package/dist/esm/useKeyboardControllerSheet.js.map +1 -0
- package/dist/esm/useSafeAreaInsets.js +11 -0
- package/dist/esm/useSafeAreaInsets.js.map +1 -0
- package/dist/esm/useSheet.js +3 -0
- package/dist/esm/useSheet.js.map +1 -0
- package/dist/esm/useSheetController.js +14 -0
- package/dist/esm/useSheetController.js.map +1 -0
- package/dist/esm/useSheetOffscreenSize.js +36 -0
- package/dist/esm/useSheetOffscreenSize.js.map +1 -0
- package/dist/esm/useSheetOpenState.js +25 -0
- package/dist/esm/useSheetOpenState.js.map +1 -0
- package/dist/esm/useSheetProviderProps.js +165 -0
- package/dist/esm/useSheetProviderProps.js.map +1 -0
- package/dist/esm/useSheetScrollViewGestures.js +192 -0
- package/dist/esm/useSheetScrollViewGestures.js.map +1 -0
- package/dist/esm/webViewport.js +98 -0
- package/dist/esm/webViewport.js.map +1 -0
- package/dist/native/GestureDetectorWrapper.js +20 -0
- package/dist/native/GestureDetectorWrapper.js.map +1 -0
- package/dist/native/GestureSheetContext.js +17 -0
- package/dist/native/GestureSheetContext.js.map +1 -0
- package/dist/native/Sheet.js +97 -0
- package/dist/native/Sheet.js.map +1 -0
- package/dist/native/SheetContext.js +5 -0
- package/dist/native/SheetContext.js.map +1 -0
- package/dist/native/SheetController.js +28 -0
- package/dist/native/SheetController.js.map +1 -0
- package/dist/native/SheetImplementationCustom.js +862 -0
- package/dist/native/SheetImplementationCustom.js.map +1 -0
- package/dist/native/SheetScrollView.js +274 -0
- package/dist/native/SheetScrollView.js.map +1 -0
- package/dist/native/constants.js +5 -0
- package/dist/native/constants.js.map +1 -0
- package/dist/native/contexts.js +6 -0
- package/dist/native/contexts.js.map +1 -0
- package/dist/native/controller.js +5 -0
- package/dist/native/controller.js.map +1 -0
- package/dist/native/createSheet.js +150 -0
- package/dist/native/createSheet.js.map +1 -0
- package/dist/native/gestureState.js +29 -0
- package/dist/native/gestureState.js.map +1 -0
- package/dist/native/helpers.js +26 -0
- package/dist/native/helpers.js.map +1 -0
- package/dist/native/index.js +13 -0
- package/dist/native/index.js.map +1 -0
- package/dist/native/keyboardAvoidance.js +62 -0
- package/dist/native/keyboardAvoidance.js.map +1 -0
- package/dist/native/nativeSheet.js +48 -0
- package/dist/native/nativeSheet.js.map +1 -0
- package/dist/native/setupGestureHandler.js +27 -0
- package/dist/native/setupGestureHandler.js.map +1 -0
- package/dist/native/types.js +2 -0
- package/dist/native/types.js.map +1 -0
- package/dist/native/useGestureHandlerPan.js +353 -0
- package/dist/native/useGestureHandlerPan.js.map +1 -0
- package/dist/native/useKeyboardControllerSheet.js +118 -0
- package/dist/native/useKeyboardControllerSheet.js.map +1 -0
- package/dist/native/useSafeAreaInsets.js +25 -0
- package/dist/native/useSafeAreaInsets.js.map +1 -0
- package/dist/native/useSheet.js +3 -0
- package/dist/native/useSheet.js.map +1 -0
- package/dist/native/useSheetController.js +14 -0
- package/dist/native/useSheetController.js.map +1 -0
- package/dist/native/useSheetOffscreenSize.js +36 -0
- package/dist/native/useSheetOffscreenSize.js.map +1 -0
- package/dist/native/useSheetOpenState.js +25 -0
- package/dist/native/useSheetOpenState.js.map +1 -0
- package/dist/native/useSheetProviderProps.js +165 -0
- package/dist/native/useSheetProviderProps.js.map +1 -0
- package/dist/native/useSheetScrollViewGestures.js +131 -0
- package/dist/native/useSheetScrollViewGestures.js.map +1 -0
- package/dist/native/webViewport.js +98 -0
- package/dist/native/webViewport.js.map +1 -0
- package/package.json +46 -49
- package/src/GestureDetectorWrapper.tsx +1 -1
- package/src/Sheet.tsx +4 -4
- package/src/SheetContext.tsx +2 -2
- package/src/SheetController.d.ts +7 -0
- package/src/SheetController.d.ts.map +1 -0
- package/src/SheetController.js +38 -0
- package/src/SheetController.js.map +1 -0
- package/src/SheetController.tsx +2 -2
- package/src/SheetImplementationCustom.tsx +14 -14
- package/src/SheetScrollView.tsx +6 -6
- package/src/controller.ts +2 -2
- package/src/createSheet.tsx +9 -9
- package/src/index.ts +12 -12
- package/src/nativeSheet.tsx +4 -4
- package/src/useGestureHandlerPan.tsx +3 -3
- package/src/useKeyboardControllerSheet.native.ts +1 -1
- package/src/useKeyboardControllerSheet.ts +2 -2
- package/src/useSafeAreaInsets.native.ts +1 -1
- package/src/useSheet.tsx +1 -1
- package/src/useSheetController.d.ts +20 -0
- package/src/useSheetController.d.ts.map +1 -0
- package/src/useSheetController.js +14 -0
- package/src/useSheetController.js.map +1 -0
- package/src/useSheetOffscreenSize.tsx +1 -1
- package/src/useSheetOpenState.tsx +2 -2
- package/src/useSheetProviderProps.tsx +2 -2
- package/src/useSheetScrollViewGestures.native.ts +1 -1
- package/src/useSheetScrollViewGestures.ts +1 -1
- package/types/GestureDetectorWrapper.d.ts +1 -1
- package/types/GestureDetectorWrapper.d.ts.map +1 -1
- package/types/GestureSheetContext.d.ts +1 -1
- package/types/GestureSheetContext.d.ts.map +1 -1
- package/types/Sheet.d.ts +81 -89
- package/types/Sheet.d.ts.map +1 -1
- package/types/SheetContext.d.ts +5 -5
- package/types/SheetContext.d.ts.map +1 -1
- package/types/SheetController.d.ts +3 -2
- package/types/SheetController.d.ts.map +1 -1
- package/types/SheetImplementationCustom.d.ts +3 -3
- package/types/SheetImplementationCustom.d.ts.map +1 -1
- package/types/SheetScrollView.d.ts +6 -6
- package/types/controller.d.ts +2 -2
- package/types/controller.d.ts.map +1 -1
- package/types/createSheet.d.ts +85 -85
- package/types/createSheet.d.ts.map +1 -1
- package/types/index.d.ts +12 -12
- package/types/index.d.ts.map +1 -1
- package/types/nativeSheet.d.ts +1 -1
- package/types/nativeSheet.d.ts.map +1 -1
- package/types/useGestureHandlerPan.d.ts +1 -1
- package/types/useGestureHandlerPan.d.ts.map +1 -1
- package/types/useKeyboardControllerSheet.d.ts +1 -1
- package/types/useKeyboardControllerSheet.d.ts.map +1 -1
- package/types/useKeyboardControllerSheet.native.d.ts +1 -1
- package/types/useKeyboardControllerSheet.native.d.ts.map +1 -1
- package/types/useSafeAreaInsets.native.d.ts +1 -1
- package/types/useSafeAreaInsets.native.d.ts.map +1 -1
- package/types/useSheet.d.ts +1 -1
- package/types/useSheet.d.ts.map +1 -1
- package/types/useSheetOffscreenSize.d.ts +1 -1
- package/types/useSheetOffscreenSize.d.ts.map +1 -1
- package/types/useSheetOpenState.d.ts +2 -2
- package/types/useSheetOpenState.d.ts.map +1 -1
- package/types/useSheetProviderProps.d.ts +3 -3
- package/types/useSheetProviderProps.d.ts.map +1 -1
- package/types/useSheetScrollViewGestures.d.ts +1 -1
- package/types/useSheetScrollViewGestures.d.ts.map +1 -1
- package/types/useSheetScrollViewGestures.native.d.ts +1 -1
- package/types/useSheetScrollViewGestures.native.d.ts.map +1 -1
- package/controller/index.cjs +0 -2
- package/controller/index.d.ts +0 -5
- package/controller/index.js +0 -2
- package/controller/index.native.cjs +0 -2
- package/controller/index.native.js +0 -2
- package/dist/cjs/GestureDetectorWrapper.cjs +0 -54
- package/dist/cjs/GestureDetectorWrapper.native.js +0 -58
- package/dist/cjs/GestureDetectorWrapper.native.js.map +0 -1
- package/dist/cjs/GestureSheetContext.cjs +0 -54
- package/dist/cjs/GestureSheetContext.native.js +0 -58
- package/dist/cjs/GestureSheetContext.native.js.map +0 -1
- package/dist/cjs/Sheet.cjs +0 -119
- package/dist/cjs/Sheet.native.js +0 -122
- package/dist/cjs/Sheet.native.js.map +0 -1
- package/dist/cjs/SheetContext.cjs +0 -34
- package/dist/cjs/SheetContext.native.js +0 -37
- package/dist/cjs/SheetContext.native.js.map +0 -1
- package/dist/cjs/SheetController.cjs +0 -73
- package/dist/cjs/SheetController.native.js +0 -79
- package/dist/cjs/SheetController.native.js.map +0 -1
- package/dist/cjs/SheetImplementationCustom.cjs +0 -652
- package/dist/cjs/SheetImplementationCustom.native.js +0 -694
- package/dist/cjs/SheetImplementationCustom.native.js.map +0 -1
- package/dist/cjs/SheetScrollView.cjs +0 -337
- package/dist/cjs/SheetScrollView.native.js +0 -348
- package/dist/cjs/SheetScrollView.native.js.map +0 -1
- package/dist/cjs/constants.cjs +0 -34
- package/dist/cjs/constants.native.js +0 -37
- package/dist/cjs/constants.native.js.map +0 -1
- package/dist/cjs/contexts.cjs +0 -44
- package/dist/cjs/contexts.native.js +0 -47
- package/dist/cjs/contexts.native.js.map +0 -1
- package/dist/cjs/controller.cjs +0 -31
- package/dist/cjs/controller.native.js +0 -34
- package/dist/cjs/controller.native.js.map +0 -1
- package/dist/cjs/createSheet.cjs +0 -194
- package/dist/cjs/createSheet.native.js +0 -204
- package/dist/cjs/createSheet.native.js.map +0 -1
- package/dist/cjs/gestureState.cjs +0 -52
- package/dist/cjs/gestureState.native.js +0 -56
- package/dist/cjs/gestureState.native.js.map +0 -1
- package/dist/cjs/helpers.cjs +0 -35
- package/dist/cjs/helpers.native.js +0 -39
- package/dist/cjs/helpers.native.js.map +0 -1
- package/dist/cjs/index.cjs +0 -41
- package/dist/cjs/index.native.js +0 -44
- package/dist/cjs/index.native.js.map +0 -1
- package/dist/cjs/keyboardAvoidance.cjs +0 -93
- package/dist/cjs/keyboardAvoidance.native.js +0 -99
- package/dist/cjs/keyboardAvoidance.native.js.map +0 -1
- package/dist/cjs/nativeSheet.cjs +0 -99
- package/dist/cjs/nativeSheet.native.js +0 -109
- package/dist/cjs/nativeSheet.native.js.map +0 -1
- package/dist/cjs/setupGestureHandler.cjs +0 -55
- package/dist/cjs/setupGestureHandler.native.js +0 -60
- package/dist/cjs/setupGestureHandler.native.js.map +0 -1
- package/dist/cjs/types.cjs +0 -18
- package/dist/cjs/types.native.js +0 -21
- package/dist/cjs/types.native.js.map +0 -1
- package/dist/cjs/useGestureHandlerPan.cjs +0 -274
- package/dist/cjs/useGestureHandlerPan.native.js +0 -286
- package/dist/cjs/useGestureHandlerPan.native.js.map +0 -1
- package/dist/cjs/useKeyboardControllerSheet.cjs +0 -102
- package/dist/cjs/useKeyboardControllerSheet.native.js +0 -132
- package/dist/cjs/useKeyboardControllerSheet.native.js.map +0 -1
- package/dist/cjs/useSafeAreaInsets.cjs +0 -44
- package/dist/cjs/useSafeAreaInsets.native.js +0 -48
- package/dist/cjs/useSafeAreaInsets.native.js.map +0 -1
- package/dist/cjs/useSheet.cjs +0 -29
- package/dist/cjs/useSheet.native.js +0 -34
- package/dist/cjs/useSheet.native.js.map +0 -1
- package/dist/cjs/useSheetController.cjs +0 -52
- package/dist/cjs/useSheetController.native.js +0 -55
- package/dist/cjs/useSheetController.native.js.map +0 -1
- package/dist/cjs/useSheetOffscreenSize.cjs +0 -63
- package/dist/cjs/useSheetOffscreenSize.native.js +0 -70
- package/dist/cjs/useSheetOffscreenSize.native.js.map +0 -1
- package/dist/cjs/useSheetOpenState.cjs +0 -52
- package/dist/cjs/useSheetOpenState.native.js +0 -58
- package/dist/cjs/useSheetOpenState.native.js.map +0 -1
- package/dist/cjs/useSheetProviderProps.cjs +0 -181
- package/dist/cjs/useSheetProviderProps.native.js +0 -196
- package/dist/cjs/useSheetProviderProps.native.js.map +0 -1
- package/dist/cjs/useSheetScrollViewGestures.cjs +0 -191
- package/dist/cjs/useSheetScrollViewGestures.native.js +0 -163
- package/dist/cjs/useSheetScrollViewGestures.native.js.map +0 -1
- package/dist/cjs/webViewport.cjs +0 -75
- package/dist/cjs/webViewport.native.js +0 -81
- package/dist/cjs/webViewport.native.js.map +0 -1
- package/dist/esm/GestureDetectorWrapper.mjs +0 -29
- package/dist/esm/GestureDetectorWrapper.mjs.map +0 -1
- package/dist/esm/GestureDetectorWrapper.native.js +0 -30
- package/dist/esm/GestureDetectorWrapper.native.js.map +0 -1
- package/dist/esm/GestureSheetContext.mjs +0 -28
- package/dist/esm/GestureSheetContext.mjs.map +0 -1
- package/dist/esm/GestureSheetContext.native.js +0 -29
- package/dist/esm/GestureSheetContext.native.js.map +0 -1
- package/dist/esm/Sheet.mjs +0 -89
- package/dist/esm/Sheet.mjs.map +0 -1
- package/dist/esm/Sheet.native.js +0 -89
- package/dist/esm/Sheet.native.js.map +0 -1
- package/dist/esm/SheetContext.mjs +0 -6
- package/dist/esm/SheetContext.mjs.map +0 -1
- package/dist/esm/SheetContext.native.js +0 -6
- package/dist/esm/SheetContext.native.js.map +0 -1
- package/dist/esm/SheetController.mjs +0 -37
- package/dist/esm/SheetController.mjs.map +0 -1
- package/dist/esm/SheetController.native.js +0 -40
- package/dist/esm/SheetController.native.js.map +0 -1
- package/dist/esm/SheetImplementationCustom.mjs +0 -611
- package/dist/esm/SheetImplementationCustom.mjs.map +0 -1
- package/dist/esm/SheetImplementationCustom.native.js +0 -643
- package/dist/esm/SheetImplementationCustom.native.js.map +0 -1
- package/dist/esm/SheetScrollView.mjs +0 -301
- package/dist/esm/SheetScrollView.mjs.map +0 -1
- package/dist/esm/SheetScrollView.native.js +0 -309
- package/dist/esm/SheetScrollView.native.js.map +0 -1
- package/dist/esm/constants.mjs +0 -6
- package/dist/esm/constants.mjs.map +0 -1
- package/dist/esm/constants.native.js +0 -6
- package/dist/esm/constants.native.js.map +0 -1
- package/dist/esm/contexts.mjs +0 -7
- package/dist/esm/contexts.mjs.map +0 -1
- package/dist/esm/contexts.native.js +0 -7
- package/dist/esm/contexts.native.js.map +0 -1
- package/dist/esm/controller.mjs +0 -4
- package/dist/esm/controller.mjs.map +0 -1
- package/dist/esm/controller.native.js +0 -4
- package/dist/esm/controller.native.js.map +0 -1
- package/dist/esm/createSheet.mjs +0 -168
- package/dist/esm/createSheet.mjs.map +0 -1
- package/dist/esm/createSheet.native.js +0 -176
- package/dist/esm/createSheet.native.js.map +0 -1
- package/dist/esm/gestureState.mjs +0 -24
- package/dist/esm/gestureState.mjs.map +0 -1
- package/dist/esm/gestureState.native.js +0 -25
- package/dist/esm/gestureState.native.js.map +0 -1
- package/dist/esm/helpers.mjs +0 -10
- package/dist/esm/helpers.mjs.map +0 -1
- package/dist/esm/helpers.native.js +0 -11
- package/dist/esm/helpers.native.js.map +0 -1
- package/dist/esm/index.mjs +0 -14
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js +0 -14
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/keyboardAvoidance.mjs +0 -66
- package/dist/esm/keyboardAvoidance.mjs.map +0 -1
- package/dist/esm/keyboardAvoidance.native.js +0 -69
- package/dist/esm/keyboardAvoidance.native.js.map +0 -1
- package/dist/esm/nativeSheet.mjs +0 -73
- package/dist/esm/nativeSheet.mjs.map +0 -1
- package/dist/esm/nativeSheet.native.js +0 -80
- package/dist/esm/nativeSheet.native.js.map +0 -1
- package/dist/esm/setupGestureHandler.mjs +0 -29
- package/dist/esm/setupGestureHandler.mjs.map +0 -1
- package/dist/esm/setupGestureHandler.native.js +0 -31
- package/dist/esm/setupGestureHandler.native.js.map +0 -1
- package/dist/esm/types.mjs +0 -2
- package/dist/esm/types.mjs.map +0 -1
- package/dist/esm/types.native.js +0 -2
- package/dist/esm/types.native.js.map +0 -1
- package/dist/esm/useGestureHandlerPan.mjs +0 -249
- package/dist/esm/useGestureHandlerPan.mjs.map +0 -1
- package/dist/esm/useGestureHandlerPan.native.js +0 -258
- package/dist/esm/useGestureHandlerPan.native.js.map +0 -1
- package/dist/esm/useKeyboardControllerSheet.mjs +0 -77
- package/dist/esm/useKeyboardControllerSheet.mjs.map +0 -1
- package/dist/esm/useKeyboardControllerSheet.native.js +0 -104
- package/dist/esm/useKeyboardControllerSheet.native.js.map +0 -1
- package/dist/esm/useSafeAreaInsets.mjs +0 -7
- package/dist/esm/useSafeAreaInsets.mjs.map +0 -1
- package/dist/esm/useSafeAreaInsets.native.js +0 -8
- package/dist/esm/useSafeAreaInsets.native.js.map +0 -1
- package/dist/esm/useSheet.mjs +0 -4
- package/dist/esm/useSheet.mjs.map +0 -1
- package/dist/esm/useSheet.native.js +0 -6
- package/dist/esm/useSheet.native.js.map +0 -1
- package/dist/esm/useSheetController.mjs +0 -15
- package/dist/esm/useSheetController.mjs.map +0 -1
- package/dist/esm/useSheetController.native.js +0 -15
- package/dist/esm/useSheetController.native.js.map +0 -1
- package/dist/esm/useSheetOffscreenSize.mjs +0 -38
- package/dist/esm/useSheetOffscreenSize.mjs.map +0 -1
- package/dist/esm/useSheetOffscreenSize.native.js +0 -42
- package/dist/esm/useSheetOffscreenSize.native.js.map +0 -1
- package/dist/esm/useSheetOpenState.mjs +0 -27
- package/dist/esm/useSheetOpenState.mjs.map +0 -1
- package/dist/esm/useSheetOpenState.native.js +0 -30
- package/dist/esm/useSheetOpenState.native.js.map +0 -1
- package/dist/esm/useSheetProviderProps.mjs +0 -145
- package/dist/esm/useSheetProviderProps.mjs.map +0 -1
- package/dist/esm/useSheetProviderProps.native.js +0 -157
- package/dist/esm/useSheetProviderProps.native.js.map +0 -1
- package/dist/esm/useSheetScrollViewGestures.mjs +0 -166
- package/dist/esm/useSheetScrollViewGestures.mjs.map +0 -1
- package/dist/esm/useSheetScrollViewGestures.native.js +0 -135
- package/dist/esm/useSheetScrollViewGestures.native.js.map +0 -1
- package/dist/esm/webViewport.mjs +0 -43
- package/dist/esm/webViewport.mjs.map +0 -1
- package/dist/esm/webViewport.native.js +0 -46
- package/dist/esm/webViewport.native.js.map +0 -1
- package/dist/jsx/GestureDetectorWrapper.mjs +0 -29
- package/dist/jsx/GestureDetectorWrapper.mjs.map +0 -1
- package/dist/jsx/GestureDetectorWrapper.native.js +0 -58
- package/dist/jsx/GestureDetectorWrapper.native.js.map +0 -1
- package/dist/jsx/GestureSheetContext.mjs +0 -28
- package/dist/jsx/GestureSheetContext.mjs.map +0 -1
- package/dist/jsx/GestureSheetContext.native.js +0 -58
- package/dist/jsx/GestureSheetContext.native.js.map +0 -1
- package/dist/jsx/Sheet.mjs +0 -89
- package/dist/jsx/Sheet.mjs.map +0 -1
- package/dist/jsx/Sheet.native.js +0 -122
- package/dist/jsx/Sheet.native.js.map +0 -1
- package/dist/jsx/SheetContext.mjs +0 -6
- package/dist/jsx/SheetContext.mjs.map +0 -1
- package/dist/jsx/SheetContext.native.js +0 -37
- package/dist/jsx/SheetContext.native.js.map +0 -1
- package/dist/jsx/SheetController.mjs +0 -37
- package/dist/jsx/SheetController.mjs.map +0 -1
- package/dist/jsx/SheetController.native.js +0 -79
- package/dist/jsx/SheetController.native.js.map +0 -1
- package/dist/jsx/SheetImplementationCustom.mjs +0 -611
- package/dist/jsx/SheetImplementationCustom.mjs.map +0 -1
- package/dist/jsx/SheetImplementationCustom.native.js +0 -694
- package/dist/jsx/SheetImplementationCustom.native.js.map +0 -1
- package/dist/jsx/SheetScrollView.mjs +0 -301
- package/dist/jsx/SheetScrollView.mjs.map +0 -1
- package/dist/jsx/SheetScrollView.native.js +0 -348
- package/dist/jsx/SheetScrollView.native.js.map +0 -1
- package/dist/jsx/constants.mjs +0 -6
- package/dist/jsx/constants.mjs.map +0 -1
- package/dist/jsx/constants.native.js +0 -37
- package/dist/jsx/constants.native.js.map +0 -1
- package/dist/jsx/contexts.mjs +0 -7
- package/dist/jsx/contexts.mjs.map +0 -1
- package/dist/jsx/contexts.native.js +0 -47
- package/dist/jsx/contexts.native.js.map +0 -1
- package/dist/jsx/controller.mjs +0 -4
- package/dist/jsx/controller.mjs.map +0 -1
- package/dist/jsx/controller.native.js +0 -34
- package/dist/jsx/controller.native.js.map +0 -1
- package/dist/jsx/createSheet.mjs +0 -168
- package/dist/jsx/createSheet.mjs.map +0 -1
- package/dist/jsx/createSheet.native.js +0 -204
- package/dist/jsx/createSheet.native.js.map +0 -1
- package/dist/jsx/gestureState.mjs +0 -24
- package/dist/jsx/gestureState.mjs.map +0 -1
- package/dist/jsx/gestureState.native.js +0 -56
- package/dist/jsx/gestureState.native.js.map +0 -1
- package/dist/jsx/helpers.mjs +0 -10
- package/dist/jsx/helpers.mjs.map +0 -1
- package/dist/jsx/helpers.native.js +0 -39
- package/dist/jsx/helpers.native.js.map +0 -1
- package/dist/jsx/index.js +0 -14
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs +0 -14
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/index.native.js +0 -44
- package/dist/jsx/index.native.js.map +0 -1
- package/dist/jsx/keyboardAvoidance.mjs +0 -66
- package/dist/jsx/keyboardAvoidance.mjs.map +0 -1
- package/dist/jsx/keyboardAvoidance.native.js +0 -99
- package/dist/jsx/keyboardAvoidance.native.js.map +0 -1
- package/dist/jsx/nativeSheet.mjs +0 -73
- package/dist/jsx/nativeSheet.mjs.map +0 -1
- package/dist/jsx/nativeSheet.native.js +0 -109
- package/dist/jsx/nativeSheet.native.js.map +0 -1
- package/dist/jsx/setupGestureHandler.mjs +0 -29
- package/dist/jsx/setupGestureHandler.mjs.map +0 -1
- package/dist/jsx/setupGestureHandler.native.js +0 -60
- package/dist/jsx/setupGestureHandler.native.js.map +0 -1
- package/dist/jsx/types.mjs +0 -2
- package/dist/jsx/types.mjs.map +0 -1
- package/dist/jsx/types.native.js +0 -21
- package/dist/jsx/types.native.js.map +0 -1
- package/dist/jsx/useGestureHandlerPan.mjs +0 -249
- package/dist/jsx/useGestureHandlerPan.mjs.map +0 -1
- package/dist/jsx/useGestureHandlerPan.native.js +0 -286
- package/dist/jsx/useGestureHandlerPan.native.js.map +0 -1
- package/dist/jsx/useKeyboardControllerSheet.mjs +0 -77
- package/dist/jsx/useKeyboardControllerSheet.mjs.map +0 -1
- package/dist/jsx/useKeyboardControllerSheet.native.js +0 -132
- package/dist/jsx/useKeyboardControllerSheet.native.js.map +0 -1
- package/dist/jsx/useSafeAreaInsets.mjs +0 -7
- package/dist/jsx/useSafeAreaInsets.mjs.map +0 -1
- package/dist/jsx/useSafeAreaInsets.native.js +0 -48
- package/dist/jsx/useSafeAreaInsets.native.js.map +0 -1
- package/dist/jsx/useSheet.mjs +0 -4
- package/dist/jsx/useSheet.mjs.map +0 -1
- package/dist/jsx/useSheet.native.js +0 -34
- package/dist/jsx/useSheet.native.js.map +0 -1
- package/dist/jsx/useSheetController.mjs +0 -15
- package/dist/jsx/useSheetController.mjs.map +0 -1
- package/dist/jsx/useSheetController.native.js +0 -55
- package/dist/jsx/useSheetController.native.js.map +0 -1
- package/dist/jsx/useSheetOffscreenSize.mjs +0 -38
- package/dist/jsx/useSheetOffscreenSize.mjs.map +0 -1
- package/dist/jsx/useSheetOffscreenSize.native.js +0 -70
- package/dist/jsx/useSheetOffscreenSize.native.js.map +0 -1
- package/dist/jsx/useSheetOpenState.mjs +0 -27
- package/dist/jsx/useSheetOpenState.mjs.map +0 -1
- package/dist/jsx/useSheetOpenState.native.js +0 -58
- package/dist/jsx/useSheetOpenState.native.js.map +0 -1
- package/dist/jsx/useSheetProviderProps.mjs +0 -145
- package/dist/jsx/useSheetProviderProps.mjs.map +0 -1
- package/dist/jsx/useSheetProviderProps.native.js +0 -196
- package/dist/jsx/useSheetProviderProps.native.js.map +0 -1
- package/dist/jsx/useSheetScrollViewGestures.mjs +0 -166
- package/dist/jsx/useSheetScrollViewGestures.mjs.map +0 -1
- package/dist/jsx/useSheetScrollViewGestures.native.js +0 -163
- package/dist/jsx/useSheetScrollViewGestures.native.js.map +0 -1
- package/dist/jsx/webViewport.mjs +0 -43
- package/dist/jsx/webViewport.mjs.map +0 -1
- package/dist/jsx/webViewport.native.js +0 -81
- package/dist/jsx/webViewport.native.js.map +0 -1
- package/setup-gesture-handler/index.cjs +0 -2
- package/setup-gesture-handler/index.js +0 -2
- package/setup-gesture-handler/index.native.cjs +0 -2
- package/setup-gesture-handler/index.native.js +0 -2
- package/setup-gesture-handler.cjs +0 -1
package/dist/cjs/createSheet.cjs
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
23
|
-
var createSheet_exports = {};
|
|
24
|
-
__export(createSheet_exports, {
|
|
25
|
-
createSheet: () => createSheet
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(createSheet_exports);
|
|
28
|
-
var import_compose_refs = require("@hanzogui/compose-refs");
|
|
29
|
-
var import_constants = require("@hanzogui/constants");
|
|
30
|
-
var import_core = require("@hanzogui/core");
|
|
31
|
-
var import_helpers = require("@hanzogui/helpers");
|
|
32
|
-
var import_portal = require("@hanzogui/portal");
|
|
33
|
-
var import_remove_scroll = require("@hanzogui/remove-scroll");
|
|
34
|
-
var import_use_did_finish_ssr = require("@hanzogui/use-did-finish-ssr");
|
|
35
|
-
var import_z_index_stack = require("@hanzogui/z-index-stack");
|
|
36
|
-
var import_react = require("react");
|
|
37
|
-
var import_react_native = require("react-native-web");
|
|
38
|
-
var import_constants2 = require("./constants.cjs");
|
|
39
|
-
require("./nativeSheet.cjs");
|
|
40
|
-
var import_SheetContext = require("./SheetContext.cjs");
|
|
41
|
-
var import_SheetImplementationCustom = require("./SheetImplementationCustom.cjs");
|
|
42
|
-
var import_SheetScrollView = require("./SheetScrollView.cjs");
|
|
43
|
-
var import_useSheetController = require("./useSheetController.cjs");
|
|
44
|
-
var import_useSheetOffscreenSize = require("./useSheetOffscreenSize.cjs");
|
|
45
|
-
var import_webViewport = require("./webViewport.cjs");
|
|
46
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
47
|
-
function createSheet({
|
|
48
|
-
Handle,
|
|
49
|
-
Frame,
|
|
50
|
-
Overlay
|
|
51
|
-
}) {
|
|
52
|
-
const SheetHandle = Handle.styleable(({
|
|
53
|
-
__scopeSheet,
|
|
54
|
-
...props
|
|
55
|
-
}, forwardedRef) => {
|
|
56
|
-
const context = (0, import_SheetContext.useSheetContext)(import_constants2.SHEET_HANDLE_NAME, __scopeSheet);
|
|
57
|
-
const composedRef = (0, import_compose_refs.useComposedRefs)(context.handleRef, forwardedRef);
|
|
58
|
-
const wasDraggingRef = (0, import_react.useRef)(false);
|
|
59
|
-
(0, import_react.useEffect)(() => {
|
|
60
|
-
if (!context.scrollBridge) return;
|
|
61
|
-
return context.scrollBridge.onParentDragging(isDragging => {
|
|
62
|
-
if (isDragging) wasDraggingRef.current = true;
|
|
63
|
-
});
|
|
64
|
-
}, [context.scrollBridge]);
|
|
65
|
-
if (context.onlyShowFrame) return null;
|
|
66
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Handle, {
|
|
67
|
-
ref: composedRef,
|
|
68
|
-
onPressIn: () => {
|
|
69
|
-
wasDraggingRef.current = false;
|
|
70
|
-
},
|
|
71
|
-
onPress: () => {
|
|
72
|
-
if (wasDraggingRef.current) {
|
|
73
|
-
wasDraggingRef.current = false;
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
const max = context.snapPoints.length + (context.dismissOnSnapToBottom ? -1 : 0);
|
|
77
|
-
const nextPos = (context.position + 1) % max;
|
|
78
|
-
context.setPosition(nextPos);
|
|
79
|
-
},
|
|
80
|
-
open: context.open,
|
|
81
|
-
...props
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
const SheetOverlay = Overlay.styleable((propsIn, ref) => {
|
|
85
|
-
const {
|
|
86
|
-
__scopeSheet,
|
|
87
|
-
...props
|
|
88
|
-
} = propsIn;
|
|
89
|
-
const context = (0, import_SheetContext.useSheetContext)(import_constants2.SHEET_OVERLAY_NAME, __scopeSheet);
|
|
90
|
-
const element = (0, import_react.useMemo)(() => {
|
|
91
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Overlay, {
|
|
92
|
-
...props,
|
|
93
|
-
ref,
|
|
94
|
-
onPress: (0, import_helpers.composeEventHandlers)(props.onPress, context.dismissOnOverlayPress ? () => {
|
|
95
|
-
context.setOpen(false);
|
|
96
|
-
} : void 0)
|
|
97
|
-
});
|
|
98
|
-
}, [props, ref, context.dismissOnOverlayPress, context.setOpen]);
|
|
99
|
-
(0, import_constants.useIsomorphicLayoutEffect)(() => {
|
|
100
|
-
context.onOverlayComponent?.(element);
|
|
101
|
-
}, [element]);
|
|
102
|
-
if (context.onlyShowFrame) return null;
|
|
103
|
-
return null;
|
|
104
|
-
});
|
|
105
|
-
const SheetFrame = Frame.styleable(({
|
|
106
|
-
__scopeSheet,
|
|
107
|
-
adjustPaddingForOffscreenContent,
|
|
108
|
-
disableHideBottomOverflow,
|
|
109
|
-
children,
|
|
110
|
-
...props
|
|
111
|
-
}, forwardedRef) => {
|
|
112
|
-
const context = (0, import_SheetContext.useSheetContext)(import_constants2.SHEET_NAME, __scopeSheet);
|
|
113
|
-
const {
|
|
114
|
-
hasFit,
|
|
115
|
-
disableRemoveScroll,
|
|
116
|
-
frameSize,
|
|
117
|
-
contentRef,
|
|
118
|
-
open
|
|
119
|
-
} = context;
|
|
120
|
-
const composedContentRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef);
|
|
121
|
-
const offscreenSize = (0, import_useSheetOffscreenSize.useSheetOffscreenSize)(context);
|
|
122
|
-
const stableFrameSize = (0, import_react.useRef)(frameSize);
|
|
123
|
-
(0, import_react.useEffect)(() => {
|
|
124
|
-
if (open && frameSize) stableFrameSize.current = frameSize;
|
|
125
|
-
}, [open, frameSize]);
|
|
126
|
-
const sheetContents = (0, import_react.useMemo)(() => {
|
|
127
|
-
const shouldUseFixedHeight = hasFit && !open && stableFrameSize.current;
|
|
128
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(Frame, {
|
|
129
|
-
ref: composedContentRef,
|
|
130
|
-
flex: hasFit && open ? 0 : 1,
|
|
131
|
-
flexBasis: hasFit ? "auto" : void 0,
|
|
132
|
-
height: shouldUseFixedHeight ? stableFrameSize.current : hasFit ? void 0 : frameSize,
|
|
133
|
-
pointerEvents: open ? "auto" : "none",
|
|
134
|
-
"data-state": open ? "open" : "closed",
|
|
135
|
-
...props,
|
|
136
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_z_index_stack.StackZIndexContext, {
|
|
137
|
-
zIndex: (0, import_portal.resolveViewZIndex)(props.zIndex),
|
|
138
|
-
children
|
|
139
|
-
}), adjustPaddingForOffscreenContent && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.View, {
|
|
140
|
-
"data-sheet-offscreen-pad": true,
|
|
141
|
-
height: offscreenSize,
|
|
142
|
-
width: "100%"
|
|
143
|
-
})]
|
|
144
|
-
});
|
|
145
|
-
}, [open, props, frameSize, offscreenSize, adjustPaddingForOffscreenContent, hasFit]);
|
|
146
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
147
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {
|
|
148
|
-
enabled: !disableRemoveScroll && context.open,
|
|
149
|
-
children: sheetContents
|
|
150
|
-
}), !disableHideBottomOverflow && /* @__PURE__ */(0, import_jsx_runtime.jsx)(Frame, {
|
|
151
|
-
...props,
|
|
152
|
-
componentName: "SheetCover",
|
|
153
|
-
"data-sheet-cover": "",
|
|
154
|
-
children: null,
|
|
155
|
-
testID: void 0,
|
|
156
|
-
id: void 0,
|
|
157
|
-
position: "absolute",
|
|
158
|
-
top: "100%",
|
|
159
|
-
zIndex: -1,
|
|
160
|
-
height: import_constants.isWeb ? Math.max(context.frameSize, (0, import_webViewport.getMaxViewportHeight)()) : context.frameSize,
|
|
161
|
-
maxHeight: import_constants.isWeb ? "none" : void 0,
|
|
162
|
-
left: 0,
|
|
163
|
-
right: 0,
|
|
164
|
-
borderWidth: 0,
|
|
165
|
-
borderRadius: 0,
|
|
166
|
-
shadowOpacity: 0
|
|
167
|
-
})]
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
const Sheet = (0, import_react.forwardRef)(function Sheet2(props, ref) {
|
|
171
|
-
const hydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)();
|
|
172
|
-
const {
|
|
173
|
-
isShowingNonSheet
|
|
174
|
-
} = (0, import_useSheetController.useSheetController)();
|
|
175
|
-
let SheetImplementation = import_SheetImplementationCustom.SheetImplementationCustom;
|
|
176
|
-
if (props.native && import_react_native.Platform.OS === "ios") {}
|
|
177
|
-
if (isShowingNonSheet || !hydrated) return null;
|
|
178
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(SheetImplementation, {
|
|
179
|
-
ref,
|
|
180
|
-
...props
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
const components = {
|
|
184
|
-
Frame: SheetFrame,
|
|
185
|
-
Overlay: SheetOverlay,
|
|
186
|
-
Handle: SheetHandle,
|
|
187
|
-
ScrollView: import_SheetScrollView.SheetScrollView
|
|
188
|
-
};
|
|
189
|
-
const Controlled = (0, import_helpers.withStaticProperties)(Sheet, components);
|
|
190
|
-
return (0, import_helpers.withStaticProperties)(Sheet, {
|
|
191
|
-
...components,
|
|
192
|
-
Controlled
|
|
193
|
-
});
|
|
194
|
-
}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
25
|
-
var createSheet_exports = {};
|
|
26
|
-
__export(createSheet_exports, {
|
|
27
|
-
createSheet: () => createSheet
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(createSheet_exports);
|
|
30
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
-
var import_compose_refs = require("@hanzogui/compose-refs");
|
|
32
|
-
var import_constants = require("@hanzogui/constants");
|
|
33
|
-
var import_core = require("@hanzogui/core");
|
|
34
|
-
var import_helpers = require("@hanzogui/helpers");
|
|
35
|
-
var import_portal = require("@hanzogui/portal");
|
|
36
|
-
var import_remove_scroll = require("@hanzogui/remove-scroll");
|
|
37
|
-
var import_use_did_finish_ssr = require("@hanzogui/use-did-finish-ssr");
|
|
38
|
-
var import_z_index_stack = require("@hanzogui/z-index-stack");
|
|
39
|
-
var import_react = require("react");
|
|
40
|
-
var import_react_native = require("react-native");
|
|
41
|
-
var import_constants2 = require("./constants.native.js");
|
|
42
|
-
var import_nativeSheet = require("./nativeSheet.native.js");
|
|
43
|
-
var import_SheetContext = require("./SheetContext.native.js");
|
|
44
|
-
var import_SheetImplementationCustom = require("./SheetImplementationCustom.native.js");
|
|
45
|
-
var import_SheetScrollView = require("./SheetScrollView.native.js");
|
|
46
|
-
var import_useSheetController = require("./useSheetController.native.js");
|
|
47
|
-
var import_useSheetOffscreenSize = require("./useSheetOffscreenSize.native.js");
|
|
48
|
-
var import_webViewport = require("./webViewport.native.js");
|
|
49
|
-
function createSheet(param) {
|
|
50
|
-
var {
|
|
51
|
-
Handle,
|
|
52
|
-
Frame,
|
|
53
|
-
Overlay
|
|
54
|
-
} = param;
|
|
55
|
-
var SheetHandle = Handle.styleable(function (param2, forwardedRef) {
|
|
56
|
-
var {
|
|
57
|
-
__scopeSheet,
|
|
58
|
-
...props
|
|
59
|
-
} = param2;
|
|
60
|
-
var context = (0, import_SheetContext.useSheetContext)(import_constants2.SHEET_HANDLE_NAME, __scopeSheet);
|
|
61
|
-
var composedRef = (0, import_compose_refs.useComposedRefs)(context.handleRef, forwardedRef);
|
|
62
|
-
var wasDraggingRef = (0, import_react.useRef)(false);
|
|
63
|
-
(0, import_react.useEffect)(function () {
|
|
64
|
-
if (!context.scrollBridge) return;
|
|
65
|
-
return context.scrollBridge.onParentDragging(function (isDragging) {
|
|
66
|
-
if (isDragging) wasDraggingRef.current = true;
|
|
67
|
-
});
|
|
68
|
-
}, [context.scrollBridge]);
|
|
69
|
-
if (context.onlyShowFrame) return null;
|
|
70
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Handle, {
|
|
71
|
-
ref: composedRef,
|
|
72
|
-
onPressIn: function () {
|
|
73
|
-
wasDraggingRef.current = false;
|
|
74
|
-
},
|
|
75
|
-
onPress: function () {
|
|
76
|
-
if (wasDraggingRef.current) {
|
|
77
|
-
wasDraggingRef.current = false;
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
var max = context.snapPoints.length + (context.dismissOnSnapToBottom ? -1 : 0);
|
|
81
|
-
var nextPos = (context.position + 1) % max;
|
|
82
|
-
context.setPosition(nextPos);
|
|
83
|
-
},
|
|
84
|
-
open: context.open,
|
|
85
|
-
...props
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
var SheetOverlay = Overlay.styleable(function (propsIn, ref) {
|
|
89
|
-
var {
|
|
90
|
-
__scopeSheet,
|
|
91
|
-
...props
|
|
92
|
-
} = propsIn;
|
|
93
|
-
var context = (0, import_SheetContext.useSheetContext)(import_constants2.SHEET_OVERLAY_NAME, __scopeSheet);
|
|
94
|
-
var element = (0, import_react.useMemo)(function () {
|
|
95
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Overlay, {
|
|
96
|
-
...props,
|
|
97
|
-
ref,
|
|
98
|
-
onPress: (0, import_helpers.composeEventHandlers)(props.onPress, context.dismissOnOverlayPress ? function () {
|
|
99
|
-
context.setOpen(false);
|
|
100
|
-
} : void 0)
|
|
101
|
-
});
|
|
102
|
-
}, [props, ref, context.dismissOnOverlayPress, context.setOpen]);
|
|
103
|
-
(0, import_constants.useIsomorphicLayoutEffect)(function () {
|
|
104
|
-
var _context_onOverlayComponent;
|
|
105
|
-
(_context_onOverlayComponent = context.onOverlayComponent) === null || _context_onOverlayComponent === void 0 || _context_onOverlayComponent.call(context, element);
|
|
106
|
-
}, [element]);
|
|
107
|
-
if (context.onlyShowFrame) return null;
|
|
108
|
-
return null;
|
|
109
|
-
});
|
|
110
|
-
var SheetFrame = Frame.styleable(function (param2, forwardedRef) {
|
|
111
|
-
var {
|
|
112
|
-
__scopeSheet,
|
|
113
|
-
adjustPaddingForOffscreenContent,
|
|
114
|
-
disableHideBottomOverflow,
|
|
115
|
-
children,
|
|
116
|
-
...props
|
|
117
|
-
} = param2;
|
|
118
|
-
var context = (0, import_SheetContext.useSheetContext)(import_constants2.SHEET_NAME, __scopeSheet);
|
|
119
|
-
var {
|
|
120
|
-
hasFit,
|
|
121
|
-
disableRemoveScroll,
|
|
122
|
-
frameSize,
|
|
123
|
-
contentRef,
|
|
124
|
-
open
|
|
125
|
-
} = context;
|
|
126
|
-
var composedContentRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef);
|
|
127
|
-
var offscreenSize = (0, import_useSheetOffscreenSize.useSheetOffscreenSize)(context);
|
|
128
|
-
var stableFrameSize = (0, import_react.useRef)(frameSize);
|
|
129
|
-
(0, import_react.useEffect)(function () {
|
|
130
|
-
if (open && frameSize) stableFrameSize.current = frameSize;
|
|
131
|
-
}, [open, frameSize]);
|
|
132
|
-
var sheetContents = (0, import_react.useMemo)(function () {
|
|
133
|
-
var shouldUseFixedHeight = hasFit && !open && stableFrameSize.current;
|
|
134
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(Frame, {
|
|
135
|
-
ref: composedContentRef,
|
|
136
|
-
flex: hasFit && open ? 0 : 1,
|
|
137
|
-
flexBasis: hasFit ? "auto" : void 0,
|
|
138
|
-
height: shouldUseFixedHeight ? stableFrameSize.current : hasFit ? void 0 : frameSize,
|
|
139
|
-
pointerEvents: open ? "auto" : "none",
|
|
140
|
-
"data-state": open ? "open" : "closed",
|
|
141
|
-
...props,
|
|
142
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_z_index_stack.StackZIndexContext, {
|
|
143
|
-
zIndex: (0, import_portal.resolveViewZIndex)(props.zIndex),
|
|
144
|
-
children
|
|
145
|
-
}), adjustPaddingForOffscreenContent && /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.View, {
|
|
146
|
-
"data-sheet-offscreen-pad": true,
|
|
147
|
-
height: offscreenSize,
|
|
148
|
-
width: "100%"
|
|
149
|
-
})]
|
|
150
|
-
});
|
|
151
|
-
}, [open, props, frameSize, offscreenSize, adjustPaddingForOffscreenContent, hasFit]);
|
|
152
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
153
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {
|
|
154
|
-
enabled: !disableRemoveScroll && context.open,
|
|
155
|
-
children: sheetContents
|
|
156
|
-
}), !disableHideBottomOverflow && /* @__PURE__ */(0, import_jsx_runtime.jsx)(Frame, {
|
|
157
|
-
...props,
|
|
158
|
-
componentName: "SheetCover",
|
|
159
|
-
"data-sheet-cover": "",
|
|
160
|
-
children: null,
|
|
161
|
-
testID: void 0,
|
|
162
|
-
id: void 0,
|
|
163
|
-
position: "absolute",
|
|
164
|
-
top: "100%",
|
|
165
|
-
zIndex: -1,
|
|
166
|
-
height: import_constants.isWeb ? Math.max(context.frameSize, (0, import_webViewport.getMaxViewportHeight)()) : context.frameSize,
|
|
167
|
-
maxHeight: import_constants.isWeb ? "none" : void 0,
|
|
168
|
-
left: 0,
|
|
169
|
-
right: 0,
|
|
170
|
-
borderWidth: 0,
|
|
171
|
-
borderRadius: 0,
|
|
172
|
-
shadowOpacity: 0
|
|
173
|
-
})]
|
|
174
|
-
});
|
|
175
|
-
});
|
|
176
|
-
var Sheet = /* @__PURE__ */(0, import_react.forwardRef)(function Sheet2(props, ref) {
|
|
177
|
-
var hydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)();
|
|
178
|
-
var {
|
|
179
|
-
isShowingNonSheet
|
|
180
|
-
} = (0, import_useSheetController.useSheetController)();
|
|
181
|
-
var SheetImplementation = import_SheetImplementationCustom.SheetImplementationCustom;
|
|
182
|
-
if (props.native && import_react_native.Platform.OS === "ios") {
|
|
183
|
-
var impl = (0, import_nativeSheet.getNativeSheet)("ios");
|
|
184
|
-
if (impl) SheetImplementation = impl;
|
|
185
|
-
}
|
|
186
|
-
if (isShowingNonSheet || !hydrated) return null;
|
|
187
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(SheetImplementation, {
|
|
188
|
-
ref,
|
|
189
|
-
...props
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
var components = {
|
|
193
|
-
Frame: SheetFrame,
|
|
194
|
-
Overlay: SheetOverlay,
|
|
195
|
-
Handle: SheetHandle,
|
|
196
|
-
ScrollView: import_SheetScrollView.SheetScrollView
|
|
197
|
-
};
|
|
198
|
-
var Controlled = (0, import_helpers.withStaticProperties)(Sheet, components);
|
|
199
|
-
return (0, import_helpers.withStaticProperties)(Sheet, {
|
|
200
|
-
...components,
|
|
201
|
-
Controlled
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
//# sourceMappingURL=createSheet.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["to","__toCommonJS","mod","__copyProps","__defProp","value","createSheet_exports","__export","createSheet","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_core","import_helpers","import_portal","import_remove_scroll","import_use_did_finish_ssr","import_z_index_stack","import_react","import_react_native","import_constants2","import_nativeSheet","import_SheetContext","import_SheetImplementationCustom","import_SheetScrollView","import_useSheetController","import_useSheetOffscreenSize","import_webViewport","param","Handle","Frame","Overlay","SheetHandle","styleable","param2","forwardedRef","__scopeSheet","props","context","useSheetContext","SHEET_HANDLE_NAME","composedRef","useComposedRefs","handleRef","wasDraggingRef","useRef","useEffect","scrollBridge","onParentDragging","isDragging","current","onlyShowFrame","jsx","ref","onPressIn","onPress","max","snapPoints","length","dismissOnSnapToBottom","nextPos","position","setPosition","open","SheetOverlay","propsIn","SHEET_OVERLAY_NAME","element","useMemo","composeEventHandlers","dismissOnOverlayPress","setOpen","useIsomorphicLayoutEffect","_context_onOverlayComponent","onOverlayComponent","call","SheetFrame","adjustPaddingForOffscreenContent","disableHideBottomOverflow","children","SHEET_NAME","hasFit","disableRemoveScroll","frameSize","contentRef","composedContentRef","offscreenSize","useSheetOffscreenSize","stableFrameSize","sheetContents","shouldUseFixedHeight","jsxs","flex","flexBasis","height","pointerEvents","StackZIndexContext","zIndex","resolveViewZIndex","View","width","Fragment","RemoveScroll","enabled","componentName","testID","id","top","isWeb","Math","getMaxViewportHeight","maxHeight","left","right","borderWidth","borderRadius","shadowOpacity","Sheet","forwardRef","Sheet2","hydrated","useDidFinishSSR","isShowingNonSheet","useSheetController","SheetImplementation","SheetImplementationCustom","native","Platform","OS","impl","getNativeSheet","components","ScrollView","SheetScrollView","Controlled","withStaticProperties"],"sources":["../../src/createSheet.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;EAAA;EAAA,OAAAA,EAAA;AAAA;AAAA,IAAAC,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAgC;EAAAE,WAAA,EAAAA,CAAA,KAAAA;AAAA;AAChCC,MAAA,CAAAC,OAAA,GAAAT,YAAiD,CAAAK,mBAAA;AAQjD,IAAAK,kBAAqB,GAAAC,OAAA;AACrB,IAAAC,mBAA2D,GAAAD,OAAA;AAC3D,IAAAE,gBAAkC,GAAAF,OAAA;AAClC,IAAAG,WAAA,GAAAH,OAAA,iBAA6B;AAC7B,IAAAI,cAAA,GAAAJ,OAAA,oBAAgC;AAChC,IAAAK,aAAA,GAAAL,OAAmC;AAEnC,IAAAM,oBAA6D,GAAAN,OAAA;AAE7D,IAAAO,yBAAyB,GAAAP,OAAA;AACzB,IAAAQ,oBAAkE,GAAAR,OAAA;AAClE,IAAAS,YAAA,GAAAT,OAA+B;AAC/B,IAAAU,mBAAA,GAAgCV,OAAA;AAChC,IAAAW,iBAAA,GAAAX,OAAA,wBAA0C;AAC1C,IAAAY,kBAAA,GAAAZ,OAAgC;AAEhC,IAAAa,mBAAA,GAAAb,OAAmC;AACnC,IAAAc,gCAAsC,GAAAd,OAAA;AACt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,cAAA;MAAA,IAAAD,IAAA,EAAAL,mBAAA,GAAAK,IAAA;IAAA;IACK,IAAAP,iBACJ,IAAc,CAAAF,QAAA;IAAA,sBACd,IAAAhH,kBAAiB,CAAA4C,GAAA,EAAAwE,mBAAA;MAAAvE,GAAA;MACP,GAAAhB;IAEF;EACJ;EACK,IAAA8F,UAMT,GAAI;IAAArG,KAAA,EAAA8C,UACJ;IAAQ7C,OAAA,EAAAiC,YAEN;IAEYnC,MAAA,EAAAG,WAEd;IAA4BoG,UAC5B,EAAA5G,sBAAM,CAAA6G;EAAA;EACC,IAAAC,UACP,OAAAzH,cAAa,CAAA0H,oBAAA,EAAAlB,KAAA,EAAAc,UAAA;EAAA,WACbtH,cAAc,CAAA0H,oBAAA,EAAAlB,KAAA;IAAA,GAAAc,UACd;IAAeG;EAAA;AACjB","ignoreList":[]}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
23
|
-
var gestureState_exports = {};
|
|
24
|
-
__export(gestureState_exports, {
|
|
25
|
-
getGestureHandlerState: () => getGestureHandlerState,
|
|
26
|
-
isGestureHandlerEnabled: () => isGestureHandlerEnabled,
|
|
27
|
-
setGestureHandlerState: () => setGestureHandlerState,
|
|
28
|
-
setGestureState: () => setGestureState
|
|
29
|
-
});
|
|
30
|
-
module.exports = __toCommonJS(gestureState_exports);
|
|
31
|
-
var import_native = require("@hanzogui/native");
|
|
32
|
-
const SHEET_GESTURE_STATE_KEY = "__hanzogui_sheet_gesture_state__";
|
|
33
|
-
function getSheetGestureHandlerState() {
|
|
34
|
-
const g = globalThis;
|
|
35
|
-
return g[SHEET_GESTURE_STATE_KEY] ?? (0, import_native.getGestureHandler)().state;
|
|
36
|
-
}
|
|
37
|
-
function isGestureHandlerEnabled() {
|
|
38
|
-
return getSheetGestureHandlerState().enabled;
|
|
39
|
-
}
|
|
40
|
-
function getGestureHandlerState() {
|
|
41
|
-
return getSheetGestureHandlerState();
|
|
42
|
-
}
|
|
43
|
-
function setGestureHandlerState(updates) {
|
|
44
|
-
const g = globalThis;
|
|
45
|
-
const sheetState = g[SHEET_GESTURE_STATE_KEY];
|
|
46
|
-
if (sheetState) {
|
|
47
|
-
Object.assign(sheetState, updates);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
(0, import_native.getGestureHandler)().set(updates);
|
|
51
|
-
}
|
|
52
|
-
const setGestureState = setGestureHandlerState;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
25
|
-
var gestureState_exports = {};
|
|
26
|
-
__export(gestureState_exports, {
|
|
27
|
-
getGestureHandlerState: () => getGestureHandlerState,
|
|
28
|
-
isGestureHandlerEnabled: () => isGestureHandlerEnabled,
|
|
29
|
-
setGestureHandlerState: () => setGestureHandlerState,
|
|
30
|
-
setGestureState: () => setGestureState
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(gestureState_exports);
|
|
33
|
-
var import_native = require("@hanzogui/native");
|
|
34
|
-
var SHEET_GESTURE_STATE_KEY = "__hanzogui_sheet_gesture_state__";
|
|
35
|
-
function getSheetGestureHandlerState() {
|
|
36
|
-
var g = globalThis;
|
|
37
|
-
var _g_SHEET_GESTURE_STATE_KEY;
|
|
38
|
-
return (_g_SHEET_GESTURE_STATE_KEY = g[SHEET_GESTURE_STATE_KEY]) !== null && _g_SHEET_GESTURE_STATE_KEY !== void 0 ? _g_SHEET_GESTURE_STATE_KEY : (0, import_native.getGestureHandler)().state;
|
|
39
|
-
}
|
|
40
|
-
function isGestureHandlerEnabled() {
|
|
41
|
-
return getSheetGestureHandlerState().enabled;
|
|
42
|
-
}
|
|
43
|
-
function getGestureHandlerState() {
|
|
44
|
-
return getSheetGestureHandlerState();
|
|
45
|
-
}
|
|
46
|
-
function setGestureHandlerState(updates) {
|
|
47
|
-
var g = globalThis;
|
|
48
|
-
var sheetState = g[SHEET_GESTURE_STATE_KEY];
|
|
49
|
-
if (sheetState) {
|
|
50
|
-
Object.assign(sheetState, updates);
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
(0, import_native.getGestureHandler)().set(updates);
|
|
54
|
-
}
|
|
55
|
-
var setGestureState = setGestureHandlerState;
|
|
56
|
-
//# sourceMappingURL=gestureState.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","gestureState_exports","__export","getGestureHandlerState","isGestureHandlerEnabled","setGestureHandlerState","setGestureState","module","exports","import_native","require","SHEET_GESTURE_STATE_KEY","getSheetGestureHandlerState","g","globalThis","_g_SHEET_GESTURE_STATE_KEY","getGestureHandler","state","enabled","updates","sheetState","Object","assign","set"],"sources":["../../src/gestureState.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,sBAAA,EAAAA,CAAA,KAAAA,sBAAA;EAAAC,uBAAA,EAAAA,CAAA,KAAAA,uBAAA;EAAAC,sBAAA,EAAAA,CAAA,KAAAA,sBAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA;AAAA;AAKAC,MAAA,CAAAC,OAAA,GAAAZ,YAAqD,CAAAK,oBAAA;AAIrD,IAAAQ,aAAM,GAAAC,OAAA,mBAA0B;AAEhC,IAAAC,uBAAS,qCAA4C;AACnD,SAAMC,2BAAIA,CAAA;EAIV,IAAAC,CAAA,GAAOC,UAAE;EACX,IAAAC,0BAAA;EAGO,OAAS,CAAAA,0BAAmC,GAAAF,CAAA,CAAAF,uBAAA,eAAAI,0BAAA,cAAAA,0BAAA,OAAAN,aAAA,CAAAO,iBAAA,IAAAC,KAAA;AACjD;AACF,SAAAb,wBAAA;EAEO,OAASQ,2BAAuC,GAAAM,OAAA;AACrD;AACF,SAAAf,uBAAA;EAEO,OAASS,2BAAuB;AACrC;AAIA,SAAMP,sBAAeA,CAAAc,OAAA;EACrB,IAAIN,CAAA,GAAAC,UAAY;EACd,IAAAM,UAAO,GAAOP,CAAA,CAAAF,uBAAmB;EACjC,IAAAS,UAAA;IACFC,MAAA,CAAAC,MAAA,CAAAF,UAAA,EAAAD,OAAA;IAEA;EACF;EAGO,IAAMV,aAAA,CAAAO,iBAAkB,IAAAO,GAAA,CAAAJ,OAAA","ignoreList":[]}
|
package/dist/cjs/helpers.cjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
23
|
-
var helpers_exports = {};
|
|
24
|
-
__export(helpers_exports, {
|
|
25
|
-
resisted: () => resisted
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(helpers_exports);
|
|
28
|
-
function resisted(y, minY, maxOverflow = 25) {
|
|
29
|
-
if (y >= minY) {
|
|
30
|
-
return y;
|
|
31
|
-
}
|
|
32
|
-
const pastBoundary = minY - y;
|
|
33
|
-
const resistedDistance = Math.sqrt(pastBoundary) * 2;
|
|
34
|
-
return minY - resistedDistance;
|
|
35
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
25
|
-
var helpers_exports = {};
|
|
26
|
-
__export(helpers_exports, {
|
|
27
|
-
resisted: () => resisted
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(helpers_exports);
|
|
30
|
-
function resisted(y, minY) {
|
|
31
|
-
var maxOverflow = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 25;
|
|
32
|
-
if (y >= minY) {
|
|
33
|
-
return y;
|
|
34
|
-
}
|
|
35
|
-
var pastBoundary = minY - y;
|
|
36
|
-
var resistedDistance = Math.sqrt(pastBoundary) * 2;
|
|
37
|
-
return minY - resistedDistance;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=helpers.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","helpers_exports","__export","resisted","module","exports","y","minY","maxOverflow","arguments","length","pastBoundary","resistedDistance","Math","sqrt"],"sources":["../../src/helpers.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAAOC,MAAA,CAAAC,OAAS,GAAAT,YAAkC,CAAAK,eAAkB;AAElE,SAAIE,QAAWA,CAAAG,CAAA,EAAAC,IAAA;EACb,IAAAC,WAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;EACT,IAAAH,CAAA,IAAAC,IAAA;IAGA,OAAMD,CAAA;EAKN;EAGA,IAAAK,YAAc,GAAAJ,IAAA,GAAAD,CAAA;EAChB,IAAAM,gBAAA,GAAAC,IAAA,CAAAC,IAAA,CAAAH,YAAA","ignoreList":[]}
|
package/dist/cjs/index.cjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
22
|
-
value: true
|
|
23
|
-
}), mod);
|
|
24
|
-
var index_exports = {};
|
|
25
|
-
__export(index_exports, {
|
|
26
|
-
unstable_getSheetGestureHandlerState: () => import_gestureState.getGestureHandlerState,
|
|
27
|
-
unstable_isSheetGestureHandlerEnabled: () => import_gestureState.isGestureHandlerEnabled
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(index_exports);
|
|
30
|
-
__reExport(index_exports, require("./Sheet.cjs"), module.exports);
|
|
31
|
-
__reExport(index_exports, require("./useSheet.cjs"), module.exports);
|
|
32
|
-
__reExport(index_exports, require("./createSheet.cjs"), module.exports);
|
|
33
|
-
__reExport(index_exports, require("./SheetController.cjs"), module.exports);
|
|
34
|
-
__reExport(index_exports, require("./useSheetController.cjs"), module.exports);
|
|
35
|
-
__reExport(index_exports, require("./useSheetOpenState.cjs"), module.exports);
|
|
36
|
-
__reExport(index_exports, require("./useSheetOffscreenSize.cjs"), module.exports);
|
|
37
|
-
__reExport(index_exports, require("./SheetScrollView.cjs"), module.exports);
|
|
38
|
-
__reExport(index_exports, require("./nativeSheet.cjs"), module.exports);
|
|
39
|
-
__reExport(index_exports, require("./types.cjs"), module.exports);
|
|
40
|
-
__reExport(index_exports, require("./contexts.cjs"), module.exports);
|
|
41
|
-
var import_gestureState = require("./gestureState.cjs");
|