@hanzogui/sheet 7.0.0 → 7.3.0
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/LICENSE +40 -19
- package/dist/cjs/GestureDetectorWrapper.cjs +54 -0
- package/dist/cjs/GestureDetectorWrapper.native.js +58 -0
- package/dist/cjs/GestureDetectorWrapper.native.js.map +1 -0
- package/dist/cjs/GestureSheetContext.cjs +54 -0
- package/dist/cjs/GestureSheetContext.native.js +58 -0
- package/dist/cjs/GestureSheetContext.native.js.map +1 -0
- package/dist/cjs/Sheet.cjs +119 -0
- package/dist/cjs/Sheet.native.js +122 -0
- package/dist/cjs/Sheet.native.js.map +1 -0
- package/dist/cjs/SheetContext.cjs +34 -0
- package/dist/cjs/SheetContext.native.js +37 -0
- package/dist/cjs/SheetContext.native.js.map +1 -0
- package/dist/cjs/SheetController.cjs +73 -0
- package/dist/cjs/SheetController.native.js +79 -0
- package/dist/cjs/SheetController.native.js.map +1 -0
- package/dist/cjs/SheetImplementationCustom.cjs +589 -0
- package/dist/cjs/SheetImplementationCustom.native.js +615 -0
- package/dist/cjs/SheetImplementationCustom.native.js.map +1 -0
- package/dist/cjs/SheetScrollView.cjs +216 -0
- package/dist/cjs/SheetScrollView.native.js +223 -0
- package/dist/cjs/SheetScrollView.native.js.map +1 -0
- package/dist/cjs/constants.cjs +34 -0
- package/dist/cjs/constants.native.js +37 -0
- package/dist/cjs/constants.native.js.map +1 -0
- package/dist/cjs/contexts.cjs +44 -0
- package/dist/cjs/contexts.native.js +47 -0
- package/dist/cjs/contexts.native.js.map +1 -0
- package/dist/cjs/controller.cjs +31 -0
- package/dist/cjs/controller.native.js +34 -0
- package/dist/cjs/controller.native.js.map +1 -0
- package/dist/cjs/createSheet.cjs +190 -0
- package/dist/cjs/createSheet.native.js +200 -0
- package/dist/cjs/createSheet.native.js.map +1 -0
- package/dist/cjs/gestureState.cjs +41 -0
- package/dist/cjs/gestureState.native.js +44 -0
- package/dist/cjs/gestureState.native.js.map +1 -0
- package/dist/cjs/helpers.cjs +35 -0
- package/dist/cjs/helpers.native.js +39 -0
- package/dist/cjs/helpers.native.js.map +1 -0
- package/dist/cjs/index.cjs +30 -0
- package/dist/cjs/index.native.js +33 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/nativeSheet.cjs +96 -0
- package/dist/cjs/nativeSheet.native.js +106 -0
- package/dist/cjs/nativeSheet.native.js.map +1 -0
- package/dist/cjs/setupGestureHandler.cjs +52 -0
- package/dist/cjs/setupGestureHandler.native.js +55 -0
- package/dist/cjs/setupGestureHandler.native.js.map +1 -0
- package/dist/cjs/types.cjs +18 -0
- package/dist/cjs/types.native.js +21 -0
- package/dist/cjs/types.native.js.map +1 -0
- package/dist/cjs/useGestureHandlerPan.cjs +206 -0
- package/dist/cjs/useGestureHandlerPan.native.js +213 -0
- package/dist/cjs/useGestureHandlerPan.native.js.map +1 -0
- package/dist/cjs/useKeyboardControllerSheet.cjs +40 -0
- package/dist/cjs/useKeyboardControllerSheet.native.js +132 -0
- package/dist/cjs/useKeyboardControllerSheet.native.js.map +1 -0
- package/dist/cjs/useSheet.cjs +29 -0
- package/dist/cjs/useSheet.native.js +34 -0
- package/dist/cjs/useSheet.native.js.map +1 -0
- package/dist/cjs/useSheetController.cjs +52 -0
- package/dist/cjs/useSheetController.native.js +55 -0
- package/dist/cjs/useSheetController.native.js.map +1 -0
- package/dist/cjs/useSheetOffscreenSize.cjs +63 -0
- package/dist/cjs/useSheetOffscreenSize.native.js +70 -0
- package/dist/cjs/useSheetOffscreenSize.native.js.map +1 -0
- package/dist/cjs/useSheetOpenState.cjs +52 -0
- package/dist/cjs/useSheetOpenState.native.js +58 -0
- package/dist/cjs/useSheetOpenState.native.js.map +1 -0
- package/dist/cjs/useSheetProviderProps.cjs +181 -0
- package/dist/cjs/useSheetProviderProps.native.js +196 -0
- package/dist/cjs/useSheetProviderProps.native.js.map +1 -0
- package/dist/cjs/useSheetScrollViewGestures.cjs +166 -0
- package/dist/cjs/useSheetScrollViewGestures.native.js +159 -0
- package/dist/cjs/useSheetScrollViewGestures.native.js.map +1 -0
- package/dist/esm/GestureDetectorWrapper.mjs +29 -0
- package/dist/esm/GestureDetectorWrapper.mjs.map +1 -0
- package/dist/esm/GestureDetectorWrapper.native.js +30 -0
- package/dist/esm/GestureDetectorWrapper.native.js.map +1 -0
- package/dist/esm/GestureSheetContext.mjs +28 -0
- package/dist/esm/GestureSheetContext.mjs.map +1 -0
- package/dist/esm/GestureSheetContext.native.js +29 -0
- package/dist/esm/GestureSheetContext.native.js.map +1 -0
- package/dist/esm/Sheet.mjs +89 -0
- package/dist/esm/Sheet.mjs.map +1 -0
- package/dist/esm/Sheet.native.js +89 -0
- package/dist/esm/Sheet.native.js.map +1 -0
- package/dist/esm/SheetContext.mjs +6 -0
- package/dist/esm/SheetContext.mjs.map +1 -0
- package/dist/esm/SheetContext.native.js +6 -0
- package/dist/esm/SheetContext.native.js.map +1 -0
- package/dist/esm/SheetController.mjs +37 -0
- package/dist/esm/SheetController.mjs.map +1 -0
- package/dist/esm/SheetController.native.js +40 -0
- package/dist/esm/SheetController.native.js.map +1 -0
- package/dist/esm/SheetImplementationCustom.mjs +552 -0
- package/dist/esm/SheetImplementationCustom.mjs.map +1 -0
- package/dist/esm/SheetImplementationCustom.native.js +572 -0
- package/dist/esm/SheetImplementationCustom.native.js.map +1 -0
- package/dist/esm/SheetScrollView.mjs +180 -0
- package/dist/esm/SheetScrollView.mjs.map +1 -0
- package/dist/esm/SheetScrollView.native.js +184 -0
- package/dist/esm/SheetScrollView.native.js.map +1 -0
- package/dist/esm/constants.mjs +6 -0
- package/dist/esm/constants.mjs.map +1 -0
- package/dist/esm/constants.native.js +6 -0
- package/dist/esm/constants.native.js.map +1 -0
- package/dist/esm/contexts.mjs +7 -0
- package/dist/esm/contexts.mjs.map +1 -0
- package/dist/esm/contexts.native.js +7 -0
- package/dist/esm/contexts.native.js.map +1 -0
- package/dist/esm/controller.mjs +4 -0
- package/dist/esm/controller.mjs.map +1 -0
- package/dist/esm/controller.native.js +4 -0
- package/dist/esm/controller.native.js.map +1 -0
- package/dist/esm/createSheet.mjs +165 -0
- package/dist/esm/createSheet.mjs.map +1 -0
- package/dist/esm/createSheet.native.js +172 -0
- package/dist/esm/createSheet.native.js.map +1 -0
- package/dist/esm/gestureState.mjs +13 -0
- package/dist/esm/gestureState.mjs.map +1 -0
- package/dist/esm/gestureState.native.js +13 -0
- package/dist/esm/gestureState.native.js.map +1 -0
- package/dist/esm/helpers.mjs +10 -0
- package/dist/esm/helpers.mjs.map +1 -0
- package/dist/esm/helpers.native.js +11 -0
- package/dist/esm/helpers.native.js.map +1 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +12 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +12 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/nativeSheet.mjs +70 -0
- package/dist/esm/nativeSheet.mjs.map +1 -0
- package/dist/esm/nativeSheet.native.js +77 -0
- package/dist/esm/nativeSheet.native.js.map +1 -0
- package/dist/esm/setupGestureHandler.mjs +26 -0
- package/dist/esm/setupGestureHandler.mjs.map +1 -0
- package/dist/esm/setupGestureHandler.native.js +26 -0
- package/dist/esm/setupGestureHandler.native.js.map +1 -0
- package/dist/esm/types.mjs +2 -0
- package/dist/esm/types.mjs.map +1 -0
- package/dist/esm/types.native.js +2 -0
- package/dist/esm/types.native.js.map +1 -0
- package/dist/esm/useGestureHandlerPan.mjs +181 -0
- package/dist/esm/useGestureHandlerPan.mjs.map +1 -0
- package/dist/esm/useGestureHandlerPan.native.js +185 -0
- package/dist/esm/useGestureHandlerPan.native.js.map +1 -0
- package/dist/esm/useKeyboardControllerSheet.mjs +15 -0
- package/dist/esm/useKeyboardControllerSheet.mjs.map +1 -0
- package/dist/esm/useKeyboardControllerSheet.native.js +104 -0
- package/dist/esm/useKeyboardControllerSheet.native.js.map +1 -0
- package/dist/esm/useSheet.mjs +4 -0
- package/dist/esm/useSheet.mjs.map +1 -0
- package/dist/esm/useSheet.native.js +6 -0
- package/dist/esm/useSheet.native.js.map +1 -0
- package/dist/esm/useSheetController.mjs +15 -0
- package/dist/esm/useSheetController.mjs.map +1 -0
- package/dist/esm/useSheetController.native.js +15 -0
- package/dist/esm/useSheetController.native.js.map +1 -0
- package/dist/esm/useSheetOffscreenSize.mjs +38 -0
- package/dist/esm/useSheetOffscreenSize.mjs.map +1 -0
- package/dist/esm/useSheetOffscreenSize.native.js +42 -0
- package/dist/esm/useSheetOffscreenSize.native.js.map +1 -0
- package/dist/esm/useSheetOpenState.mjs +27 -0
- package/dist/esm/useSheetOpenState.mjs.map +1 -0
- package/dist/esm/useSheetOpenState.native.js +30 -0
- package/dist/esm/useSheetOpenState.native.js.map +1 -0
- package/dist/esm/useSheetProviderProps.mjs +145 -0
- package/dist/esm/useSheetProviderProps.mjs.map +1 -0
- package/dist/esm/useSheetProviderProps.native.js +157 -0
- package/dist/esm/useSheetProviderProps.native.js.map +1 -0
- package/dist/esm/useSheetScrollViewGestures.mjs +141 -0
- package/dist/esm/useSheetScrollViewGestures.mjs.map +1 -0
- package/dist/esm/useSheetScrollViewGestures.native.js +131 -0
- package/dist/esm/useSheetScrollViewGestures.native.js.map +1 -0
- package/dist/jsx/GestureDetectorWrapper.mjs +29 -0
- package/dist/jsx/GestureDetectorWrapper.mjs.map +1 -0
- package/dist/jsx/GestureDetectorWrapper.native.js +58 -0
- package/dist/jsx/GestureDetectorWrapper.native.js.map +1 -0
- package/dist/jsx/GestureSheetContext.mjs +28 -0
- package/dist/jsx/GestureSheetContext.mjs.map +1 -0
- package/dist/jsx/GestureSheetContext.native.js +58 -0
- package/dist/jsx/GestureSheetContext.native.js.map +1 -0
- package/dist/jsx/Sheet.mjs +89 -0
- package/dist/jsx/Sheet.mjs.map +1 -0
- package/dist/jsx/Sheet.native.js +122 -0
- package/dist/jsx/Sheet.native.js.map +1 -0
- package/dist/jsx/SheetContext.mjs +6 -0
- package/dist/jsx/SheetContext.mjs.map +1 -0
- package/dist/jsx/SheetContext.native.js +37 -0
- package/dist/jsx/SheetContext.native.js.map +1 -0
- package/dist/jsx/SheetController.mjs +37 -0
- package/dist/jsx/SheetController.mjs.map +1 -0
- package/dist/jsx/SheetController.native.js +79 -0
- package/dist/jsx/SheetController.native.js.map +1 -0
- package/dist/jsx/SheetImplementationCustom.mjs +552 -0
- package/dist/jsx/SheetImplementationCustom.mjs.map +1 -0
- package/dist/jsx/SheetImplementationCustom.native.js +615 -0
- package/dist/jsx/SheetImplementationCustom.native.js.map +1 -0
- package/dist/jsx/SheetScrollView.mjs +180 -0
- package/dist/jsx/SheetScrollView.mjs.map +1 -0
- package/dist/jsx/SheetScrollView.native.js +223 -0
- package/dist/jsx/SheetScrollView.native.js.map +1 -0
- package/dist/jsx/constants.mjs +6 -0
- package/dist/jsx/constants.mjs.map +1 -0
- package/dist/jsx/constants.native.js +37 -0
- package/dist/jsx/constants.native.js.map +1 -0
- package/dist/jsx/contexts.mjs +7 -0
- package/dist/jsx/contexts.mjs.map +1 -0
- package/dist/jsx/contexts.native.js +47 -0
- package/dist/jsx/contexts.native.js.map +1 -0
- package/dist/jsx/controller.mjs +4 -0
- package/dist/jsx/controller.mjs.map +1 -0
- package/dist/jsx/controller.native.js +34 -0
- package/dist/jsx/controller.native.js.map +1 -0
- package/dist/jsx/createSheet.mjs +165 -0
- package/dist/jsx/createSheet.mjs.map +1 -0
- package/dist/jsx/createSheet.native.js +200 -0
- package/dist/jsx/createSheet.native.js.map +1 -0
- package/dist/jsx/gestureState.mjs +13 -0
- package/dist/jsx/gestureState.mjs.map +1 -0
- package/dist/jsx/gestureState.native.js +44 -0
- package/dist/jsx/gestureState.native.js.map +1 -0
- package/dist/jsx/helpers.mjs +10 -0
- package/dist/jsx/helpers.mjs.map +1 -0
- package/dist/jsx/helpers.native.js +39 -0
- package/dist/jsx/helpers.native.js.map +1 -0
- package/dist/jsx/index.js +12 -0
- package/dist/jsx/index.js.map +1 -0
- package/dist/jsx/index.mjs +12 -0
- package/dist/jsx/index.mjs.map +1 -0
- package/dist/jsx/index.native.js +33 -0
- package/dist/jsx/index.native.js.map +1 -0
- package/dist/jsx/nativeSheet.mjs +70 -0
- package/dist/jsx/nativeSheet.mjs.map +1 -0
- package/dist/jsx/nativeSheet.native.js +106 -0
- package/dist/jsx/nativeSheet.native.js.map +1 -0
- package/dist/jsx/setupGestureHandler.mjs +26 -0
- package/dist/jsx/setupGestureHandler.mjs.map +1 -0
- package/dist/jsx/setupGestureHandler.native.js +55 -0
- package/dist/jsx/setupGestureHandler.native.js.map +1 -0
- package/dist/jsx/types.mjs +2 -0
- package/dist/jsx/types.mjs.map +1 -0
- package/dist/jsx/types.native.js +21 -0
- package/dist/jsx/types.native.js.map +1 -0
- package/dist/jsx/useGestureHandlerPan.mjs +181 -0
- package/dist/jsx/useGestureHandlerPan.mjs.map +1 -0
- package/dist/jsx/useGestureHandlerPan.native.js +213 -0
- package/dist/jsx/useGestureHandlerPan.native.js.map +1 -0
- package/dist/jsx/useKeyboardControllerSheet.mjs +15 -0
- package/dist/jsx/useKeyboardControllerSheet.mjs.map +1 -0
- package/dist/jsx/useKeyboardControllerSheet.native.js +132 -0
- package/dist/jsx/useKeyboardControllerSheet.native.js.map +1 -0
- package/dist/jsx/useSheet.mjs +4 -0
- package/dist/jsx/useSheet.mjs.map +1 -0
- package/dist/jsx/useSheet.native.js +34 -0
- package/dist/jsx/useSheet.native.js.map +1 -0
- package/dist/jsx/useSheetController.mjs +15 -0
- package/dist/jsx/useSheetController.mjs.map +1 -0
- package/dist/jsx/useSheetController.native.js +55 -0
- package/dist/jsx/useSheetController.native.js.map +1 -0
- package/dist/jsx/useSheetOffscreenSize.mjs +38 -0
- package/dist/jsx/useSheetOffscreenSize.mjs.map +1 -0
- package/dist/jsx/useSheetOffscreenSize.native.js +70 -0
- package/dist/jsx/useSheetOffscreenSize.native.js.map +1 -0
- package/dist/jsx/useSheetOpenState.mjs +27 -0
- package/dist/jsx/useSheetOpenState.mjs.map +1 -0
- package/dist/jsx/useSheetOpenState.native.js +58 -0
- package/dist/jsx/useSheetOpenState.native.js.map +1 -0
- package/dist/jsx/useSheetProviderProps.mjs +145 -0
- package/dist/jsx/useSheetProviderProps.mjs.map +1 -0
- package/dist/jsx/useSheetProviderProps.native.js +196 -0
- package/dist/jsx/useSheetProviderProps.native.js.map +1 -0
- package/dist/jsx/useSheetScrollViewGestures.mjs +141 -0
- package/dist/jsx/useSheetScrollViewGestures.mjs.map +1 -0
- package/dist/jsx/useSheetScrollViewGestures.native.js +159 -0
- package/dist/jsx/useSheetScrollViewGestures.native.js.map +1 -0
- package/package.json +36 -26
- package/src/Sheet.tsx +3 -3
- package/src/SheetImplementationCustom.tsx +5 -5
- package/src/createSheet.tsx +9 -9
- package/src/setupGestureHandler.ts +2 -2
- package/src/useSheetProviderProps.tsx +4 -4
- package/types/GestureDetectorWrapper.d.ts +1 -1
- package/types/GestureDetectorWrapper.d.ts.map +1 -0
- package/types/GestureSheetContext.d.ts +1 -1
- package/types/GestureSheetContext.d.ts.map +1 -0
- package/types/Sheet.d.ts +15 -15
- package/types/Sheet.d.ts.map +1 -0
- package/types/SheetContext.d.ts +4 -4
- package/types/SheetContext.d.ts.map +1 -0
- package/types/SheetController.d.ts +2 -1
- package/types/SheetController.d.ts.map +1 -0
- package/types/SheetImplementationCustom.d.ts.map +1 -0
- package/types/SheetScrollView.d.ts +1 -1
- package/types/SheetScrollView.d.ts.map +1 -0
- package/types/constants.d.ts.map +1 -0
- package/types/contexts.d.ts.map +1 -0
- package/types/controller.d.ts.map +1 -0
- package/types/createSheet.d.ts +11 -11
- package/types/createSheet.d.ts.map +1 -0
- package/types/gestureState.d.ts.map +1 -0
- package/types/helpers.d.ts.map +1 -0
- package/types/index.d.ts.map +1 -0
- package/types/nativeSheet.d.ts.map +1 -0
- package/types/setupGestureHandler.d.ts.map +1 -0
- package/types/types.d.ts.map +1 -0
- package/types/useGestureHandlerPan.d.ts.map +1 -0
- package/types/useKeyboardControllerSheet.d.ts.map +1 -0
- package/types/useKeyboardControllerSheet.native.d.ts.map +1 -0
- package/types/useSheet.d.ts.map +1 -0
- package/types/useSheetController.d.ts.map +1 -0
- package/types/useSheetOffscreenSize.d.ts.map +1 -0
- package/types/useSheetOpenState.d.ts.map +1 -0
- package/types/useSheetProviderProps.d.ts +3 -3
- package/types/useSheetProviderProps.d.ts.map +1 -0
- package/types/useSheetScrollViewGestures.d.ts.map +1 -0
- package/types/useSheetScrollViewGestures.native.d.ts.map +1 -0
- 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/next.md +0 -78
- 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/tsconfig.json +0 -56
|
@@ -0,0 +1,159 @@
|
|
|
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 useSheetScrollViewGestures_native_exports = {};
|
|
26
|
+
__export(useSheetScrollViewGestures_native_exports, {
|
|
27
|
+
useSheetScrollViewGestures: () => useSheetScrollViewGestures
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(useSheetScrollViewGestures_native_exports);
|
|
30
|
+
var import_react = require("react");
|
|
31
|
+
function useSheetScrollViewGestures(param) {
|
|
32
|
+
var {
|
|
33
|
+
scrollBridge,
|
|
34
|
+
hasScrollableContent,
|
|
35
|
+
scrollEnabled,
|
|
36
|
+
setScrollEnabled
|
|
37
|
+
} = param;
|
|
38
|
+
var state = (0, import_react.useRef)({
|
|
39
|
+
lastPageY: 0,
|
|
40
|
+
dragAt: 0,
|
|
41
|
+
dys: [],
|
|
42
|
+
isScrolling: false,
|
|
43
|
+
isDraggingScrollArea: false,
|
|
44
|
+
scrollEngaged: false,
|
|
45
|
+
prevScrollY: 0,
|
|
46
|
+
handoffOccurred: false,
|
|
47
|
+
handoffDragOffset: 0
|
|
48
|
+
});
|
|
49
|
+
var release = function () {
|
|
50
|
+
var s = state.current;
|
|
51
|
+
if (!s.isDraggingScrollArea) return;
|
|
52
|
+
s.isDraggingScrollArea = false;
|
|
53
|
+
scrollBridge.scrollStartY = -1;
|
|
54
|
+
scrollBridge.scrollLock = false;
|
|
55
|
+
s.isScrolling = false;
|
|
56
|
+
s.scrollEngaged = false;
|
|
57
|
+
s.prevScrollY = 0;
|
|
58
|
+
s.handoffOccurred = false;
|
|
59
|
+
s.handoffDragOffset = 0;
|
|
60
|
+
setScrollEnabled(true);
|
|
61
|
+
var vy = 0;
|
|
62
|
+
if (s.dys.length) {
|
|
63
|
+
var recentDys = s.dys.slice(-10);
|
|
64
|
+
var dist = recentDys.reduce(function (a, b) {
|
|
65
|
+
return a + b;
|
|
66
|
+
}, 0);
|
|
67
|
+
vy = dist / recentDys.length * 0.04;
|
|
68
|
+
}
|
|
69
|
+
s.dys = [];
|
|
70
|
+
scrollBridge.release({
|
|
71
|
+
dragAt: s.dragAt,
|
|
72
|
+
vy
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
var onStartShouldSetResponder = function () {
|
|
76
|
+
var s = state.current;
|
|
77
|
+
scrollBridge.scrollStartY = -1;
|
|
78
|
+
s.isDraggingScrollArea = true;
|
|
79
|
+
s.scrollEngaged = scrollBridge.y > 0;
|
|
80
|
+
s.prevScrollY = scrollBridge.y;
|
|
81
|
+
s.handoffOccurred = false;
|
|
82
|
+
s.handoffDragOffset = 0;
|
|
83
|
+
return false;
|
|
84
|
+
};
|
|
85
|
+
var onMoveShouldSetResponder = function (e) {
|
|
86
|
+
if (!scrollEnabled) return false;
|
|
87
|
+
var s = state.current;
|
|
88
|
+
var {
|
|
89
|
+
pageY
|
|
90
|
+
} = e.nativeEvent;
|
|
91
|
+
if (s.lastPageY === 0) {
|
|
92
|
+
s.lastPageY = pageY;
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
return Math.abs(pageY - s.lastPageY) > 10;
|
|
96
|
+
};
|
|
97
|
+
var onResponderMove = function (e) {
|
|
98
|
+
var s = state.current;
|
|
99
|
+
var {
|
|
100
|
+
pageY
|
|
101
|
+
} = e.nativeEvent;
|
|
102
|
+
if (!s.isScrolling && scrollBridge.scrollStartY === -1) {
|
|
103
|
+
scrollBridge.scrollStartY = pageY;
|
|
104
|
+
s.lastPageY = pageY;
|
|
105
|
+
}
|
|
106
|
+
var dragAt = pageY - scrollBridge.scrollStartY;
|
|
107
|
+
var dy = pageY - s.lastPageY;
|
|
108
|
+
s.lastPageY = pageY;
|
|
109
|
+
var isDraggingDown = dy > 0;
|
|
110
|
+
var isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY + 5;
|
|
111
|
+
var currentScrollY = scrollBridge.y;
|
|
112
|
+
if (currentScrollY > 0) s.scrollEngaged = true;
|
|
113
|
+
var wasScrolledNowAtZero = s.scrollEngaged && s.prevScrollY > 0 && currentScrollY <= 0;
|
|
114
|
+
if (wasScrolledNowAtZero && !s.handoffOccurred) {
|
|
115
|
+
s.handoffOccurred = true;
|
|
116
|
+
s.handoffDragOffset = 0;
|
|
117
|
+
}
|
|
118
|
+
s.prevScrollY = currentScrollY;
|
|
119
|
+
var panHandles = false;
|
|
120
|
+
if (!isPaneAtTop) {
|
|
121
|
+
panHandles = isDraggingDown ? currentScrollY <= 0 || !hasScrollableContent : true;
|
|
122
|
+
} else if (isDraggingDown) {
|
|
123
|
+
if (currentScrollY > 0 && hasScrollableContent && !s.handoffOccurred) {
|
|
124
|
+
panHandles = false;
|
|
125
|
+
} else {
|
|
126
|
+
panHandles = s.handoffOccurred || wasScrolledNowAtZero || currentScrollY <= 0;
|
|
127
|
+
}
|
|
128
|
+
} else {
|
|
129
|
+
panHandles = !hasScrollableContent;
|
|
130
|
+
if (!panHandles) {
|
|
131
|
+
s.isScrolling = true;
|
|
132
|
+
scrollBridge.scrollLock = true;
|
|
133
|
+
setScrollEnabled(true);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (panHandles) {
|
|
138
|
+
setScrollEnabled(false);
|
|
139
|
+
var effectiveDragAt = dragAt;
|
|
140
|
+
if (s.handoffOccurred) {
|
|
141
|
+
s.handoffDragOffset += dy;
|
|
142
|
+
effectiveDragAt = s.handoffDragOffset;
|
|
143
|
+
}
|
|
144
|
+
scrollBridge.drag(effectiveDragAt);
|
|
145
|
+
s.dragAt = effectiveDragAt;
|
|
146
|
+
s.dys.push(dy);
|
|
147
|
+
if (s.dys.length > 100) s.dys = s.dys.slice(-10);
|
|
148
|
+
} else {
|
|
149
|
+
setScrollEnabled(true);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
return {
|
|
153
|
+
onResponderRelease: release,
|
|
154
|
+
onStartShouldSetResponder,
|
|
155
|
+
onMoveShouldSetResponder,
|
|
156
|
+
onResponderMove
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=useSheetScrollViewGestures.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useSheetScrollViewGestures_native_exports","__export","useSheetScrollViewGestures","module","exports","__toCommonJS","import_react","require","param","scrollBridge","hasScrollableContent","scrollEnabled","setScrollEnabled","state","useRef","lastPageY","dragAt","dys","isScrolling","isDraggingScrollArea","scrollEngaged","prevScrollY","handoffOccurred","handoffDragOffset","release","s","current","scrollStartY","scrollLock","vy","length","recentDys","slice","dist","reduce","a","b","onStartShouldSetResponder","y","onMoveShouldSetResponder","e","pageY","nativeEvent","Math","abs","onResponderMove","dy","isDraggingDown","isPaneAtTop","paneY","paneMinY","currentScrollY","wasScrolledNowAtZero","panHandles","effectiveDragAt","drag","push","onResponderRelease"],"sources":["../../src/useSheetScrollViewGestures.native.ts"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/sheet",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"license": "
|
|
3
|
+
"version": "7.3.0",
|
|
4
|
+
"license": "BSD-3-Clause",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
@@ -51,32 +51,32 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
|
-
"build": "
|
|
55
|
-
"watch": "
|
|
56
|
-
"clean": "
|
|
54
|
+
"build": "gui-build",
|
|
55
|
+
"watch": "gui-build --watch",
|
|
56
|
+
"clean": "gui-build clean"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@hanzogui/adapt": "
|
|
60
|
-
"@hanzogui/animate-presence": "
|
|
61
|
-
"@hanzogui/animations-react-native": "
|
|
62
|
-
"@hanzogui/compose-refs": "
|
|
63
|
-
"@hanzogui/constants": "
|
|
64
|
-
"@hanzogui/core": "
|
|
65
|
-
"@hanzogui/create-context": "
|
|
66
|
-
"@hanzogui/helpers": "
|
|
67
|
-
"@hanzogui/native": "
|
|
68
|
-
"@hanzogui/portal": "
|
|
69
|
-
"@hanzogui/remove-scroll": "
|
|
70
|
-
"@hanzogui/scroll-view": "
|
|
71
|
-
"@hanzogui/stacks": "
|
|
72
|
-
"@hanzogui/use-constant": "
|
|
73
|
-
"@hanzogui/use-controllable-state": "
|
|
74
|
-
"@hanzogui/use-did-finish-ssr": "
|
|
75
|
-
"@hanzogui/use-keyboard-visible": "
|
|
76
|
-
"@hanzogui/z-index-stack": "
|
|
59
|
+
"@hanzogui/adapt": "7.3.0",
|
|
60
|
+
"@hanzogui/animate-presence": "7.3.0",
|
|
61
|
+
"@hanzogui/animations-react-native": "7.3.0",
|
|
62
|
+
"@hanzogui/compose-refs": "7.3.0",
|
|
63
|
+
"@hanzogui/constants": "7.3.0",
|
|
64
|
+
"@hanzogui/core": "7.3.0",
|
|
65
|
+
"@hanzogui/create-context": "7.3.0",
|
|
66
|
+
"@hanzogui/helpers": "7.3.0",
|
|
67
|
+
"@hanzogui/native": "7.3.0",
|
|
68
|
+
"@hanzogui/portal": "7.3.0",
|
|
69
|
+
"@hanzogui/remove-scroll": "7.3.0",
|
|
70
|
+
"@hanzogui/scroll-view": "7.3.0",
|
|
71
|
+
"@hanzogui/stacks": "7.3.0",
|
|
72
|
+
"@hanzogui/use-constant": "7.3.0",
|
|
73
|
+
"@hanzogui/use-controllable-state": "7.3.0",
|
|
74
|
+
"@hanzogui/use-did-finish-ssr": "7.3.0",
|
|
75
|
+
"@hanzogui/use-keyboard-visible": "7.3.0",
|
|
76
|
+
"@hanzogui/z-index-stack": "7.3.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@hanzogui/build": "
|
|
79
|
+
"@hanzogui/build": "7.3.0",
|
|
80
80
|
"react": ">=19",
|
|
81
81
|
"react-native": "0.83.2",
|
|
82
82
|
"react-native-gesture-handler": "~2.30.0"
|
|
@@ -92,5 +92,15 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"module:jsx": "dist/jsx",
|
|
95
|
-
"removeSideEffects": true
|
|
96
|
-
|
|
95
|
+
"removeSideEffects": true,
|
|
96
|
+
"files": [
|
|
97
|
+
"dist",
|
|
98
|
+
"src",
|
|
99
|
+
"types",
|
|
100
|
+
"*.cjs",
|
|
101
|
+
"*.mjs",
|
|
102
|
+
"*.css",
|
|
103
|
+
"README.md"
|
|
104
|
+
],
|
|
105
|
+
"author": "Hanzo AI <dev@hanzo.ai>"
|
|
106
|
+
}
|
package/src/Sheet.tsx
CHANGED
|
@@ -44,7 +44,7 @@ export const Handle = styled(XStack, {
|
|
|
44
44
|
} as const,
|
|
45
45
|
|
|
46
46
|
defaultVariants: {
|
|
47
|
-
unstyled: process.env.
|
|
47
|
+
unstyled: process.env.GUI_HEADLESS === '1',
|
|
48
48
|
},
|
|
49
49
|
})
|
|
50
50
|
|
|
@@ -77,7 +77,7 @@ export const Overlay = styled(YStack, {
|
|
|
77
77
|
} as const,
|
|
78
78
|
|
|
79
79
|
defaultVariants: {
|
|
80
|
-
unstyled: process.env.
|
|
80
|
+
unstyled: process.env.GUI_HEADLESS === '1',
|
|
81
81
|
},
|
|
82
82
|
})
|
|
83
83
|
|
|
@@ -103,7 +103,7 @@ export const Frame = styled(YStack, {
|
|
|
103
103
|
} as const,
|
|
104
104
|
|
|
105
105
|
defaultVariants: {
|
|
106
|
-
unstyled: process.env.
|
|
106
|
+
unstyled: process.env.GUI_HEADLESS === '1',
|
|
107
107
|
},
|
|
108
108
|
})
|
|
109
109
|
|
|
@@ -4,7 +4,7 @@ import { useComposedRefs } from '@hanzogui/compose-refs'
|
|
|
4
4
|
import { isWeb, useIsomorphicLayoutEffect } from '@hanzogui/constants'
|
|
5
5
|
import {
|
|
6
6
|
LayoutMeasurementController,
|
|
7
|
-
View as
|
|
7
|
+
View as GuiView,
|
|
8
8
|
useConfiguration,
|
|
9
9
|
useDidFinishSSR,
|
|
10
10
|
useEvent,
|
|
@@ -224,7 +224,7 @@ export const SheetImplementationCustom = React.forwardRef<View, SheetProps>(
|
|
|
224
224
|
|
|
225
225
|
const { useAnimatedNumber, useAnimatedNumberStyle, useAnimatedNumberReaction } =
|
|
226
226
|
animationDriver
|
|
227
|
-
const AnimatedView = (animationDriver.View ??
|
|
227
|
+
const AnimatedView = (animationDriver.View ?? GuiView) as typeof Animated.View
|
|
228
228
|
|
|
229
229
|
useIsomorphicLayoutEffect(() => {
|
|
230
230
|
if (!(sheetInsideSheet && open)) return
|
|
@@ -444,7 +444,7 @@ export const SheetImplementationCustom = React.forwardRef<View, SheetProps>(
|
|
|
444
444
|
setIsDragging(val)
|
|
445
445
|
|
|
446
446
|
// make unselectable:
|
|
447
|
-
if (process.env.
|
|
447
|
+
if (process.env.GUI_TARGET === 'web') {
|
|
448
448
|
if (!sheetHiddenStyleSheet) {
|
|
449
449
|
sheetHiddenStyleSheet = document.createElement('style')
|
|
450
450
|
if (typeof document.head !== 'undefined') {
|
|
@@ -774,7 +774,7 @@ export const SheetImplementationCustom = React.forwardRef<View, SheetProps>(
|
|
|
774
774
|
animatedStyle,
|
|
775
775
|
]}
|
|
776
776
|
>
|
|
777
|
-
{/* wrap children with plain RN View for panResponder -
|
|
777
|
+
{/* wrap children with plain RN View for panResponder - gui views no longer handle responder events on web */}
|
|
778
778
|
{gestureHandlerEnabled && panGesture ? (
|
|
779
779
|
<GestureDetectorWrapper gesture={panGesture} style={{ flex: 1 }}>
|
|
780
780
|
{props.children}
|
|
@@ -794,7 +794,7 @@ export const SheetImplementationCustom = React.forwardRef<View, SheetProps>(
|
|
|
794
794
|
</LayoutMeasurementController>
|
|
795
795
|
)
|
|
796
796
|
|
|
797
|
-
if (process.env.
|
|
797
|
+
if (process.env.GUI_TARGET === 'native' && needsPortalRepropagation()) {
|
|
798
798
|
// TODO alongside sheet scope="" need to pass scope here
|
|
799
799
|
const adaptContext = useAdaptContext()
|
|
800
800
|
contents = (
|
package/src/createSheet.tsx
CHANGED
|
@@ -3,9 +3,9 @@ import { useIsomorphicLayoutEffect } from '@hanzogui/constants'
|
|
|
3
3
|
import type {
|
|
4
4
|
GetProps,
|
|
5
5
|
ViewProps,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
GuiComponent,
|
|
7
|
+
GuiComponentExpectingVariants,
|
|
8
|
+
GuiElement,
|
|
9
9
|
} from '@hanzogui/core'
|
|
10
10
|
import { View } from '@hanzogui/core'
|
|
11
11
|
import { composeEventHandlers, withStaticProperties } from '@hanzogui/helpers'
|
|
@@ -32,12 +32,12 @@ type SharedSheetProps = {
|
|
|
32
32
|
|
|
33
33
|
type BaseProps = ViewProps & SharedSheetProps
|
|
34
34
|
|
|
35
|
-
type SheetStyledComponent =
|
|
35
|
+
type SheetStyledComponent = GuiComponentExpectingVariants<BaseProps, SharedSheetProps>
|
|
36
36
|
|
|
37
37
|
export function createSheet<
|
|
38
|
-
H extends
|
|
39
|
-
F extends
|
|
40
|
-
O extends
|
|
38
|
+
H extends GuiComponent | SheetStyledComponent,
|
|
39
|
+
F extends GuiComponent | SheetStyledComponent,
|
|
40
|
+
O extends GuiComponent | SheetStyledComponent,
|
|
41
41
|
>({ Handle, Frame, Overlay }: { Handle: H; Frame: F; Overlay: O }) {
|
|
42
42
|
const SheetHandle = Handle.styleable<any>(
|
|
43
43
|
(
|
|
@@ -45,7 +45,7 @@ export function createSheet<
|
|
|
45
45
|
forwardedRef
|
|
46
46
|
) => {
|
|
47
47
|
const context = useSheetContext(SHEET_HANDLE_NAME, __scopeSheet)
|
|
48
|
-
const composedRef = useComposedRefs<
|
|
48
|
+
const composedRef = useComposedRefs<GuiElement>(context.handleRef, forwardedRef)
|
|
49
49
|
|
|
50
50
|
// track if sheet was being dragged to prevent onPress toggle after drag
|
|
51
51
|
const wasDraggingRef = useRef(false)
|
|
@@ -256,7 +256,7 @@ export function createSheet<
|
|
|
256
256
|
let SheetImplementation = SheetImplementationCustom
|
|
257
257
|
|
|
258
258
|
if (props.native && Platform.OS === 'ios') {
|
|
259
|
-
if (process.env.
|
|
259
|
+
if (process.env.GUI_TARGET === 'native') {
|
|
260
260
|
const impl = getNativeSheet('ios')
|
|
261
261
|
if (impl) {
|
|
262
262
|
// @ts-expect-error accepting external sheet implementation
|
|
@@ -16,10 +16,10 @@ export interface SetupGestureHandlerConfig {
|
|
|
16
16
|
|
|
17
17
|
export function setupGestureHandler(config: SetupGestureHandlerConfig): void {
|
|
18
18
|
const g = globalThis as any
|
|
19
|
-
if (g.
|
|
19
|
+
if (g.__gui_sheet_gesture_handler_setup) {
|
|
20
20
|
return
|
|
21
21
|
}
|
|
22
|
-
g.
|
|
22
|
+
g.__gui_sheet_gesture_handler_setup = true
|
|
23
23
|
|
|
24
24
|
const { Gesture, GestureDetector, ScrollView } = config
|
|
25
25
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import type {
|
|
2
|
+
import type { GuiElement } from '@hanzogui/core'
|
|
3
3
|
import { useConfiguration } from '@hanzogui/core'
|
|
4
4
|
import { useConstant } from '@hanzogui/use-constant'
|
|
5
5
|
import { useControllableState } from '@hanzogui/use-controllable-state'
|
|
@@ -18,8 +18,8 @@ export function useSheetProviderProps(
|
|
|
18
18
|
onOverlayComponent?: (comp: any) => void
|
|
19
19
|
} = {}
|
|
20
20
|
) {
|
|
21
|
-
const handleRef = React.useRef<
|
|
22
|
-
const contentRef = React.useRef<
|
|
21
|
+
const handleRef = React.useRef<GuiElement>(null)
|
|
22
|
+
const contentRef = React.useRef<GuiElement>(null)
|
|
23
23
|
const [frameSize, setFrameSize] = React.useState<number>(0)
|
|
24
24
|
const [maxContentSize, setMaxContentSize] = React.useState<number>(0)
|
|
25
25
|
const snapPointsMode = props.snapPointsMode ?? 'percent'
|
|
@@ -133,7 +133,7 @@ export function useSheetProviderProps(
|
|
|
133
133
|
throw new Error(
|
|
134
134
|
process.env.NODE_ENV === 'production'
|
|
135
135
|
? `❌ 008`
|
|
136
|
-
: 'Must set animations in
|
|
136
|
+
: 'Must set animations in gui.config.ts'
|
|
137
137
|
)
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -9,6 +9,6 @@ interface GestureDetectorWrapperProps {
|
|
|
9
9
|
* Conditionally wraps children with GestureDetector when RNGH is available.
|
|
10
10
|
* Uses a plain View wrapper that GestureDetector can attach gesture handlers to.
|
|
11
11
|
*/
|
|
12
|
-
export declare function GestureDetectorWrapper({ gesture, children, style, }: GestureDetectorWrapperProps):
|
|
12
|
+
export declare function GestureDetectorWrapper({ gesture, children, style, }: GestureDetectorWrapperProps): React.JSX.Element;
|
|
13
13
|
export {};
|
|
14
14
|
//# sourceMappingURL=GestureDetectorWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GestureDetectorWrapper.d.ts","sourceRoot":"","sources":["../src/GestureDetectorWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAGnD,UAAU,2BAA2B;IACnC,OAAO,EAAE,GAAG,CAAA;IACZ,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,EACP,QAAQ,EACR,KAAK,GACN,EAAE,2BAA2B,qBAsB7B"}
|
|
@@ -32,5 +32,5 @@ export interface GestureSheetProviderProps {
|
|
|
32
32
|
panGesture: any | null;
|
|
33
33
|
panGestureRef: RefObject<any> | null;
|
|
34
34
|
}
|
|
35
|
-
export declare function GestureSheetProvider({ children, isDragging, blockPan, setBlockPan, panGesture, panGestureRef, }: GestureSheetProviderProps):
|
|
35
|
+
export declare function GestureSheetProvider({ children, isDragging, blockPan, setBlockPan, panGesture, panGestureRef, }: GestureSheetProviderProps): React.JSX.Element;
|
|
36
36
|
//# sourceMappingURL=GestureSheetContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GestureSheetContext.d.ts","sourceRoot":"","sources":["../src/GestureSheetContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjE,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,UAAU,EAAE,GAAG,GAAG,IAAI,CAAA;IACtB;;OAEG;IACH,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;IACpC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACvC;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAA;CAClB;AAID,wBAAgB,sBAAsB,IAAI,wBAAwB,GAAG,IAAI,CAExE;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACvC,UAAU,EAAE,GAAG,GAAG,IAAI,CAAA;IACtB,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;CACrC;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,GACd,EAAE,yBAAyB,qBAY3B"}
|
package/types/Sheet.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export { createSheetScope } from './SheetContext';
|
|
2
2
|
export * from './types';
|
|
3
|
-
export declare const Handle: import("@hanzogui/core").
|
|
3
|
+
export declare const Handle: import("@hanzogui/core").GuiComponent<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").GuiElement, import("@hanzogui/core").RNViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
|
|
4
4
|
open?: boolean | undefined;
|
|
5
5
|
unstyled?: boolean | undefined;
|
|
6
6
|
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
7
7
|
fullscreen?: boolean | undefined;
|
|
8
8
|
}, import("@hanzogui/core").StaticConfigPublic>;
|
|
9
|
-
export declare const Overlay: import("@hanzogui/core").
|
|
9
|
+
export declare const Overlay: import("@hanzogui/core").GuiComponent<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").GuiElement, import("@hanzogui/core").RNViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
|
|
10
10
|
open?: boolean | undefined;
|
|
11
11
|
unstyled?: boolean | undefined;
|
|
12
12
|
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
13
13
|
fullscreen?: boolean | undefined;
|
|
14
14
|
}, import("@hanzogui/core").StaticConfigPublic>;
|
|
15
|
-
export declare const Frame: import("@hanzogui/core").
|
|
15
|
+
export declare const Frame: import("@hanzogui/core").GuiComponent<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").GuiElement, import("@hanzogui/core").RNViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
|
|
16
16
|
unstyled?: boolean | undefined;
|
|
17
17
|
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
18
18
|
fullscreen?: boolean | undefined;
|
|
@@ -50,7 +50,7 @@ export declare const Sheet: import("react").ForwardRefExoticComponent<{
|
|
|
50
50
|
__scopeSheet?: import("@hanzogui/create-context").Scope<any>;
|
|
51
51
|
} & import("react").RefAttributes<import("react-native").View>> & {
|
|
52
52
|
Controlled: import("react").FunctionComponent<Omit<import("./types").SheetProps, "open" | "onOpenChange"> & import("react").RefAttributes<import("react-native").View>> & {
|
|
53
|
-
Frame: import("react").ForwardRefExoticComponent<import("./types").SheetScopedProps<Omit<import("@hanzogui/core").GetFinalProps<import("@hanzogui/core").
|
|
53
|
+
Frame: import("react").ForwardRefExoticComponent<import("./types").SheetScopedProps<Omit<import("@hanzogui/core").GetFinalProps<import("@hanzogui/core").RNViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
|
|
54
54
|
unstyled?: boolean | undefined;
|
|
55
55
|
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
56
56
|
fullscreen?: boolean | undefined;
|
|
@@ -61,23 +61,23 @@ export declare const Sheet: import("react").ForwardRefExoticComponent<{
|
|
|
61
61
|
disableHideBottomOverflow?: boolean;
|
|
62
62
|
adjustPaddingForOffscreenContent?: boolean;
|
|
63
63
|
}>>;
|
|
64
|
-
Overlay: import("@hanzogui/core").
|
|
64
|
+
Overlay: import("@hanzogui/core").GuiComponent<Omit<import("@hanzogui/core").StackNonStyleProps & import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>> & import("@hanzogui/core").WithPseudoProps<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>>> & import("@hanzogui/core").WithMediaProps<import("@hanzogui/core").WithThemeShorthandsAndPseudos<import("@hanzogui/core").StackStyleBase, {}>> & {
|
|
65
65
|
open?: boolean;
|
|
66
66
|
}, "__scopeSheet"> & {
|
|
67
67
|
__scopeSheet?: import("@hanzogui/create-context").Scope<any>;
|
|
68
68
|
}, any, any, any, {
|
|
69
69
|
open?: boolean;
|
|
70
|
-
}, {}> | import("@hanzogui/core").
|
|
70
|
+
}, {}> | import("@hanzogui/core").GuiComponent<Omit<import("@hanzogui/core").StackNonStyleProps & import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>> & import("@hanzogui/core").WithPseudoProps<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>>> & import("@hanzogui/core").WithMediaProps<import("@hanzogui/core").WithThemeShorthandsAndPseudos<import("@hanzogui/core").StackStyleBase, {}>> & {
|
|
71
71
|
open?: boolean;
|
|
72
72
|
}, "__scopeSheet"> & {
|
|
73
73
|
__scopeSheet?: import("@hanzogui/create-context").Scope<any>;
|
|
74
74
|
}, any, {
|
|
75
75
|
__scopeSheet?: import("@hanzogui/create-context").Scope<any>;
|
|
76
76
|
}, {}, {}, {}>;
|
|
77
|
-
Handle: import("@hanzogui/core").
|
|
77
|
+
Handle: import("@hanzogui/core").GuiComponent<any, any, any, any, {
|
|
78
78
|
open?: boolean;
|
|
79
|
-
}, {}> | import("@hanzogui/core").
|
|
80
|
-
ScrollView: import("react").ForwardRefExoticComponent<Omit<import("@hanzogui/core").
|
|
79
|
+
}, {}> | import("@hanzogui/core").GuiComponent<any, any, any, {}, {}, {}>;
|
|
80
|
+
ScrollView: import("react").ForwardRefExoticComponent<Omit<import("@hanzogui/core").GuiComponentPropsBaseBase & import("react-native").ScrollViewProps, keyof import("@hanzogui/core").StackStyleBase | "fullscreen" | "contentContainerStyle"> & import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase & {
|
|
81
81
|
readonly contentContainerStyle?: Partial<import("@hanzogui/core").InferStyleProps<typeof import("react-native").ScrollView, {
|
|
82
82
|
accept: {
|
|
83
83
|
readonly contentContainerStyle: "style";
|
|
@@ -115,7 +115,7 @@ export declare const Sheet: import("react").ForwardRefExoticComponent<{
|
|
|
115
115
|
fullscreen?: boolean | undefined;
|
|
116
116
|
}>> & import("react").RefAttributes<import("react-native").ScrollView>>;
|
|
117
117
|
};
|
|
118
|
-
Frame: import("react").ForwardRefExoticComponent<import("./types").SheetScopedProps<Omit<import("@hanzogui/core").GetFinalProps<import("@hanzogui/core").
|
|
118
|
+
Frame: import("react").ForwardRefExoticComponent<import("./types").SheetScopedProps<Omit<import("@hanzogui/core").GetFinalProps<import("@hanzogui/core").RNViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
|
|
119
119
|
unstyled?: boolean | undefined;
|
|
120
120
|
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
121
121
|
fullscreen?: boolean | undefined;
|
|
@@ -126,23 +126,23 @@ export declare const Sheet: import("react").ForwardRefExoticComponent<{
|
|
|
126
126
|
disableHideBottomOverflow?: boolean;
|
|
127
127
|
adjustPaddingForOffscreenContent?: boolean;
|
|
128
128
|
}>>;
|
|
129
|
-
Overlay: import("@hanzogui/core").
|
|
129
|
+
Overlay: import("@hanzogui/core").GuiComponent<Omit<import("@hanzogui/core").StackNonStyleProps & import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>> & import("@hanzogui/core").WithPseudoProps<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>>> & import("@hanzogui/core").WithMediaProps<import("@hanzogui/core").WithThemeShorthandsAndPseudos<import("@hanzogui/core").StackStyleBase, {}>> & {
|
|
130
130
|
open?: boolean;
|
|
131
131
|
}, "__scopeSheet"> & {
|
|
132
132
|
__scopeSheet?: import("@hanzogui/create-context").Scope<any>;
|
|
133
133
|
}, any, any, any, {
|
|
134
134
|
open?: boolean;
|
|
135
|
-
}, {}> | import("@hanzogui/core").
|
|
135
|
+
}, {}> | import("@hanzogui/core").GuiComponent<Omit<import("@hanzogui/core").StackNonStyleProps & import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>> & import("@hanzogui/core").WithPseudoProps<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>>> & import("@hanzogui/core").WithMediaProps<import("@hanzogui/core").WithThemeShorthandsAndPseudos<import("@hanzogui/core").StackStyleBase, {}>> & {
|
|
136
136
|
open?: boolean;
|
|
137
137
|
}, "__scopeSheet"> & {
|
|
138
138
|
__scopeSheet?: import("@hanzogui/create-context").Scope<any>;
|
|
139
139
|
}, any, {
|
|
140
140
|
__scopeSheet?: import("@hanzogui/create-context").Scope<any>;
|
|
141
141
|
}, {}, {}, {}>;
|
|
142
|
-
Handle: import("@hanzogui/core").
|
|
142
|
+
Handle: import("@hanzogui/core").GuiComponent<any, any, any, any, {
|
|
143
143
|
open?: boolean;
|
|
144
|
-
}, {}> | import("@hanzogui/core").
|
|
145
|
-
ScrollView: import("react").ForwardRefExoticComponent<Omit<import("@hanzogui/core").
|
|
144
|
+
}, {}> | import("@hanzogui/core").GuiComponent<any, any, any, {}, {}, {}>;
|
|
145
|
+
ScrollView: import("react").ForwardRefExoticComponent<Omit<import("@hanzogui/core").GuiComponentPropsBaseBase & import("react-native").ScrollViewProps, keyof import("@hanzogui/core").StackStyleBase | "fullscreen" | "contentContainerStyle"> & import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase & {
|
|
146
146
|
readonly contentContainerStyle?: Partial<import("@hanzogui/core").InferStyleProps<typeof import("react-native").ScrollView, {
|
|
147
147
|
accept: {
|
|
148
148
|
readonly contentContainerStyle: "style";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../src/Sheet.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,cAAc,SAAS,CAAA;AAMvB,eAAO,MAAM,MAAM;;;;;+CAmCjB,CAAA;AAMF,eAAO,MAAM,OAAO;;;;;+CA2BlB,CAAA;AAMF,eAAO,MAAM,KAAK;;;;+CAoBhB,CAAA;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIhB,CAAA"}
|
package/types/SheetContext.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { SheetContextValue } from './useSheetProviderProps';
|
|
|
2
2
|
export declare const createSheetContext: <ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType) => readonly [(props: ContextValueType & {
|
|
3
3
|
scope: import("@hanzogui/create-context").Scope<ContextValueType>;
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
-
}) => import("react
|
|
5
|
+
}) => import("react").JSX.Element, (consumerName: string, scope: import("@hanzogui/create-context").Scope<ContextValueType | undefined>, options?: {
|
|
6
6
|
warn?: boolean;
|
|
7
7
|
fallback?: Partial<ContextValueType>;
|
|
8
8
|
}) => ContextValueType], createSheetScope: import("@hanzogui/create-context").CreateScope;
|
|
@@ -15,8 +15,8 @@ export declare const SheetProvider: (props: {
|
|
|
15
15
|
open: boolean;
|
|
16
16
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
17
17
|
hidden: boolean;
|
|
18
|
-
contentRef: import("react").RefObject<import("@hanzogui/web").
|
|
19
|
-
handleRef: import("react").RefObject<import("@hanzogui/web").
|
|
18
|
+
contentRef: import("react").RefObject<import("@hanzogui/web").GuiElement | null>;
|
|
19
|
+
handleRef: import("react").RefObject<import("@hanzogui/web").GuiElement | null>;
|
|
20
20
|
frameSize: number;
|
|
21
21
|
setFrameSize: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
22
22
|
dismissOnOverlayPress: boolean;
|
|
@@ -36,7 +36,7 @@ export declare const SheetProvider: (props: {
|
|
|
36
36
|
} & {
|
|
37
37
|
scope: import("@hanzogui/create-context").Scope<SheetContextValue>;
|
|
38
38
|
children: React.ReactNode;
|
|
39
|
-
}) => import("react
|
|
39
|
+
}) => import("react").JSX.Element, useSheetContext: (consumerName: string, scope: import("@hanzogui/create-context").Scope<SheetContextValue | undefined>, options?: {
|
|
40
40
|
warn?: boolean;
|
|
41
41
|
fallback?: Partial<SheetContextValue> | undefined;
|
|
42
42
|
} | undefined) => SheetContextValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetContext.d.ts","sourceRoot":"","sources":["../src/SheetContext.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAEhE,eAAO,MAAO,kBAAkB;;;gJAM2rB,CAAC;QAAS,CAAC;YAAoB,CAAC;yBANztB,gBAAgB,gDAAkC,CAAA;AAEpF,eAAO,MAAO,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAAE,eAAe;;;mCAG3C,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { ReactNode } from 'react';
|
|
2
3
|
import type { SheetControllerContextValue } from './useSheetController';
|
|
3
4
|
export declare const SheetController: ({ children, onOpenChange: onOpenChangeProp, onAnimationComplete: onAnimationCompleteProp, open, hidden, disableDrag, }: Partial<SheetControllerContextValue> & {
|
|
4
5
|
children?: ReactNode;
|
|
5
|
-
}) =>
|
|
6
|
+
}) => React.JSX.Element;
|
|
6
7
|
//# sourceMappingURL=SheetController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetController.d.ts","sourceRoot":"","sources":["../src/SheetController.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAA;AAGvE,eAAO,MAAM,eAAe,GAAI,wHAO7B,OAAO,CAAC,2BAA2B,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,sBAgCjE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetImplementationCustom.d.ts","sourceRoot":"","sources":["../src/SheetImplementationCustom.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAOvC,OAAO,EAA4B,IAAI,EAAE,MAAM,cAAc,CAAA;AAM7D,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,SAAS,CAAA;AAsBzD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA8wBrC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ScrollView as RNScrollView } from 'react-native';
|
|
3
|
-
export declare const SheetScrollView: React.ForwardRefExoticComponent<Omit<import("@hanzogui/core").
|
|
3
|
+
export declare const SheetScrollView: React.ForwardRefExoticComponent<Omit<import("@hanzogui/core").GuiComponentPropsBaseBase & import("react-native").ScrollViewProps, keyof import("@hanzogui/core").StackStyleBase | "fullscreen" | "contentContainerStyle"> & import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase & {
|
|
4
4
|
readonly contentContainerStyle?: Partial<import("@hanzogui/core").InferStyleProps<typeof RNScrollView, {
|
|
5
5
|
accept: {
|
|
6
6
|
readonly contentContainerStyle: "style";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetScrollView.d.ts","sourceRoot":"","sources":["../src/SheetScrollView.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,cAAc,CAAA;AAS9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmL3B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,IAAK,CAAA;AAE3B,eAAO,MAAM,UAAU,UAAU,CAAA;AACjC,eAAO,MAAM,iBAAiB,gBAAgB,CAAA;AAC9C,eAAO,MAAM,kBAAkB,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../src/contexts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,kBAAkB;;EAE7B,CAAA;AAEF,eAAO,MAAM,uBAAuB,4BACtB,OAAO,KAAK,IAAI,SACvB,CAAA"}
|