@hanzogui/sheet 2.0.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 +21 -0
- package/controller/index.cjs +2 -0
- package/controller/index.d.ts +5 -0
- package/controller/index.js +2 -0
- package/controller/index.native.cjs +2 -0
- package/controller/index.native.js +2 -0
- package/dist/cjs/GestureDetectorWrapper.cjs +48 -0
- package/dist/cjs/GestureDetectorWrapper.native.js +53 -0
- package/dist/cjs/GestureDetectorWrapper.native.js.map +1 -0
- package/dist/cjs/GestureSheetContext.cjs +52 -0
- package/dist/cjs/GestureSheetContext.native.js +56 -0
- package/dist/cjs/GestureSheetContext.native.js.map +1 -0
- package/dist/cjs/Sheet.cjs +117 -0
- package/dist/cjs/Sheet.native.js +120 -0
- package/dist/cjs/Sheet.native.js.map +1 -0
- package/dist/cjs/SheetContext.cjs +32 -0
- package/dist/cjs/SheetContext.native.js +35 -0
- package/dist/cjs/SheetContext.native.js.map +1 -0
- package/dist/cjs/SheetController.cjs +65 -0
- package/dist/cjs/SheetController.native.js +71 -0
- package/dist/cjs/SheetController.native.js.map +1 -0
- package/dist/cjs/SheetImplementationCustom.cjs +472 -0
- package/dist/cjs/SheetImplementationCustom.native.js +524 -0
- package/dist/cjs/SheetImplementationCustom.native.js.map +1 -0
- package/dist/cjs/SheetScrollView.cjs +180 -0
- package/dist/cjs/SheetScrollView.native.js +197 -0
- package/dist/cjs/SheetScrollView.native.js.map +1 -0
- package/dist/cjs/constants.cjs +32 -0
- package/dist/cjs/constants.native.js +35 -0
- package/dist/cjs/constants.native.js.map +1 -0
- package/dist/cjs/contexts.cjs +42 -0
- package/dist/cjs/contexts.native.js +45 -0
- package/dist/cjs/contexts.native.js.map +1 -0
- package/dist/cjs/controller.cjs +29 -0
- package/dist/cjs/controller.native.js +32 -0
- package/dist/cjs/controller.native.js.map +1 -0
- package/dist/cjs/createSheet.cjs +191 -0
- package/dist/cjs/createSheet.native.js +208 -0
- package/dist/cjs/createSheet.native.js.map +1 -0
- package/dist/cjs/gestureState.cjs +39 -0
- package/dist/cjs/gestureState.native.js +42 -0
- package/dist/cjs/gestureState.native.js.map +1 -0
- package/dist/cjs/helpers.cjs +31 -0
- package/dist/cjs/helpers.native.js +35 -0
- package/dist/cjs/helpers.native.js.map +1 -0
- package/dist/cjs/index.cjs +28 -0
- package/dist/cjs/index.native.js +31 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/nativeSheet.cjs +87 -0
- package/dist/cjs/nativeSheet.native.js +101 -0
- package/dist/cjs/nativeSheet.native.js.map +1 -0
- package/dist/cjs/setupGestureHandler.cjs +46 -0
- package/dist/cjs/setupGestureHandler.native.js +50 -0
- package/dist/cjs/setupGestureHandler.native.js.map +1 -0
- package/dist/cjs/types.cjs +16 -0
- package/dist/cjs/types.native.js +19 -0
- package/dist/cjs/types.native.js.map +1 -0
- package/dist/cjs/useGestureHandlerPan.cjs +136 -0
- package/dist/cjs/useGestureHandlerPan.native.js +145 -0
- package/dist/cjs/useGestureHandlerPan.native.js.map +1 -0
- package/dist/cjs/useKeyboardControllerSheet.cjs +38 -0
- package/dist/cjs/useKeyboardControllerSheet.native.js +114 -0
- package/dist/cjs/useKeyboardControllerSheet.native.js.map +1 -0
- package/dist/cjs/useSheet.cjs +27 -0
- package/dist/cjs/useSheet.native.js +32 -0
- package/dist/cjs/useSheet.native.js.map +1 -0
- package/dist/cjs/useSheetController.cjs +50 -0
- package/dist/cjs/useSheetController.native.js +53 -0
- package/dist/cjs/useSheetController.native.js.map +1 -0
- package/dist/cjs/useSheetOffscreenSize.cjs +51 -0
- package/dist/cjs/useSheetOffscreenSize.native.js +61 -0
- package/dist/cjs/useSheetOffscreenSize.native.js.map +1 -0
- package/dist/cjs/useSheetOpenState.cjs +49 -0
- package/dist/cjs/useSheetOpenState.native.js +56 -0
- package/dist/cjs/useSheetOpenState.native.js.map +1 -0
- package/dist/cjs/useSheetProviderProps.cjs +133 -0
- package/dist/cjs/useSheetProviderProps.native.js +153 -0
- package/dist/cjs/useSheetProviderProps.native.js.map +1 -0
- package/dist/cjs/useSheetScrollViewGestures.cjs +123 -0
- package/dist/cjs/useSheetScrollViewGestures.native.js +110 -0
- package/dist/cjs/useSheetScrollViewGestures.native.js.map +1 -0
- package/dist/esm/GestureDetectorWrapper.mjs +25 -0
- package/dist/esm/GestureDetectorWrapper.mjs.map +1 -0
- package/dist/esm/GestureDetectorWrapper.native.js +27 -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 +31 -0
- package/dist/esm/SheetController.mjs.map +1 -0
- package/dist/esm/SheetController.native.js +34 -0
- package/dist/esm/SheetController.native.js.map +1 -0
- package/dist/esm/SheetImplementationCustom.mjs +437 -0
- package/dist/esm/SheetImplementationCustom.mjs.map +1 -0
- package/dist/esm/SheetImplementationCustom.native.js +487 -0
- package/dist/esm/SheetImplementationCustom.native.js.map +1 -0
- package/dist/esm/SheetScrollView.mjs +146 -0
- package/dist/esm/SheetScrollView.mjs.map +1 -0
- package/dist/esm/SheetScrollView.native.js +160 -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 +168 -0
- package/dist/esm/createSheet.mjs.map +1 -0
- package/dist/esm/createSheet.native.js +182 -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 +8 -0
- package/dist/esm/helpers.mjs.map +1 -0
- package/dist/esm/helpers.native.js +9 -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 +63 -0
- package/dist/esm/nativeSheet.mjs.map +1 -0
- package/dist/esm/nativeSheet.native.js +74 -0
- package/dist/esm/nativeSheet.native.js.map +1 -0
- package/dist/esm/setupGestureHandler.mjs +22 -0
- package/dist/esm/setupGestureHandler.mjs.map +1 -0
- package/dist/esm/setupGestureHandler.native.js +23 -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 +113 -0
- package/dist/esm/useGestureHandlerPan.mjs.map +1 -0
- package/dist/esm/useGestureHandlerPan.native.js +119 -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 +88 -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 +28 -0
- package/dist/esm/useSheetOffscreenSize.mjs.map +1 -0
- package/dist/esm/useSheetOffscreenSize.native.js +35 -0
- package/dist/esm/useSheetOffscreenSize.native.js.map +1 -0
- package/dist/esm/useSheetOpenState.mjs +26 -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 +99 -0
- package/dist/esm/useSheetProviderProps.mjs.map +1 -0
- package/dist/esm/useSheetProviderProps.native.js +116 -0
- package/dist/esm/useSheetProviderProps.native.js.map +1 -0
- package/dist/esm/useSheetScrollViewGestures.mjs +100 -0
- package/dist/esm/useSheetScrollViewGestures.mjs.map +1 -0
- package/dist/esm/useSheetScrollViewGestures.native.js +84 -0
- package/dist/esm/useSheetScrollViewGestures.native.js.map +1 -0
- package/dist/jsx/GestureDetectorWrapper.mjs +25 -0
- package/dist/jsx/GestureDetectorWrapper.mjs.map +1 -0
- package/dist/jsx/GestureDetectorWrapper.native.js +53 -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 +56 -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 +120 -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 +35 -0
- package/dist/jsx/SheetContext.native.js.map +1 -0
- package/dist/jsx/SheetController.mjs +31 -0
- package/dist/jsx/SheetController.mjs.map +1 -0
- package/dist/jsx/SheetController.native.js +71 -0
- package/dist/jsx/SheetController.native.js.map +1 -0
- package/dist/jsx/SheetImplementationCustom.mjs +437 -0
- package/dist/jsx/SheetImplementationCustom.mjs.map +1 -0
- package/dist/jsx/SheetImplementationCustom.native.js +524 -0
- package/dist/jsx/SheetImplementationCustom.native.js.map +1 -0
- package/dist/jsx/SheetScrollView.mjs +146 -0
- package/dist/jsx/SheetScrollView.mjs.map +1 -0
- package/dist/jsx/SheetScrollView.native.js +197 -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 +35 -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 +45 -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 +32 -0
- package/dist/jsx/controller.native.js.map +1 -0
- package/dist/jsx/createSheet.mjs +168 -0
- package/dist/jsx/createSheet.mjs.map +1 -0
- package/dist/jsx/createSheet.native.js +208 -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 +42 -0
- package/dist/jsx/gestureState.native.js.map +1 -0
- package/dist/jsx/helpers.mjs +8 -0
- package/dist/jsx/helpers.mjs.map +1 -0
- package/dist/jsx/helpers.native.js +35 -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 +31 -0
- package/dist/jsx/index.native.js.map +1 -0
- package/dist/jsx/nativeSheet.mjs +63 -0
- package/dist/jsx/nativeSheet.mjs.map +1 -0
- package/dist/jsx/nativeSheet.native.js +101 -0
- package/dist/jsx/nativeSheet.native.js.map +1 -0
- package/dist/jsx/setupGestureHandler.mjs +22 -0
- package/dist/jsx/setupGestureHandler.mjs.map +1 -0
- package/dist/jsx/setupGestureHandler.native.js +50 -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 +19 -0
- package/dist/jsx/types.native.js.map +1 -0
- package/dist/jsx/useGestureHandlerPan.mjs +113 -0
- package/dist/jsx/useGestureHandlerPan.mjs.map +1 -0
- package/dist/jsx/useGestureHandlerPan.native.js +145 -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 +114 -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 +32 -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 +53 -0
- package/dist/jsx/useSheetController.native.js.map +1 -0
- package/dist/jsx/useSheetOffscreenSize.mjs +28 -0
- package/dist/jsx/useSheetOffscreenSize.mjs.map +1 -0
- package/dist/jsx/useSheetOffscreenSize.native.js +61 -0
- package/dist/jsx/useSheetOffscreenSize.native.js.map +1 -0
- package/dist/jsx/useSheetOpenState.mjs +26 -0
- package/dist/jsx/useSheetOpenState.mjs.map +1 -0
- package/dist/jsx/useSheetOpenState.native.js +56 -0
- package/dist/jsx/useSheetOpenState.native.js.map +1 -0
- package/dist/jsx/useSheetProviderProps.mjs +99 -0
- package/dist/jsx/useSheetProviderProps.mjs.map +1 -0
- package/dist/jsx/useSheetProviderProps.native.js +153 -0
- package/dist/jsx/useSheetProviderProps.native.js.map +1 -0
- package/dist/jsx/useSheetScrollViewGestures.mjs +100 -0
- package/dist/jsx/useSheetScrollViewGestures.mjs.map +1 -0
- package/dist/jsx/useSheetScrollViewGestures.native.js +110 -0
- package/dist/jsx/useSheetScrollViewGestures.native.js.map +1 -0
- package/next.md +78 -0
- package/package.json +96 -0
- package/setup-gesture-handler/index.cjs +2 -0
- package/setup-gesture-handler/index.js +2 -0
- package/setup-gesture-handler/index.native.cjs +2 -0
- package/setup-gesture-handler/index.native.js +2 -0
- package/setup-gesture-handler.cjs +1 -0
- package/src/GestureDetectorWrapper.tsx +41 -0
- package/src/GestureSheetContext.tsx +62 -0
- package/src/Sheet.tsx +114 -0
- package/src/SheetContext.tsx +11 -0
- package/src/SheetController.tsx +44 -0
- package/src/SheetImplementationCustom.tsx +868 -0
- package/src/SheetScrollView.tsx +195 -0
- package/src/constants.tsx +5 -0
- package/src/contexts.ts +9 -0
- package/src/controller.ts +9 -0
- package/src/createSheet.tsx +296 -0
- package/src/gestureState.ts +24 -0
- package/src/helpers.tsx +31 -0
- package/src/index.ts +11 -0
- package/src/nativeSheet.tsx +89 -0
- package/src/setupGestureHandler.ts +34 -0
- package/src/types.tsx +181 -0
- package/src/useGestureHandlerPan.tsx +364 -0
- package/src/useKeyboardControllerSheet.native.ts +136 -0
- package/src/useKeyboardControllerSheet.ts +26 -0
- package/src/useSheet.tsx +3 -0
- package/src/useSheetController.tsx +27 -0
- package/src/useSheetOffscreenSize.tsx +49 -0
- package/src/useSheetOpenState.tsx +33 -0
- package/src/useSheetProviderProps.tsx +223 -0
- package/src/useSheetScrollViewGestures.native.ts +163 -0
- package/src/useSheetScrollViewGestures.ts +194 -0
- package/tsconfig.json +56 -0
- package/types/GestureDetectorWrapper.d.ts +14 -0
- package/types/GestureSheetContext.d.ts +36 -0
- package/types/Sheet.d.ts +183 -0
- package/types/SheetContext.d.ts +43 -0
- package/types/SheetController.d.ts +6 -0
- package/types/SheetImplementationCustom.d.ts +36 -0
- package/types/SheetScrollView.d.ts +40 -0
- package/types/constants.d.ts +5 -0
- package/types/contexts.d.ts +6 -0
- package/types/controller.d.ts +3 -0
- package/types/createSheet.d.ts +194 -0
- package/types/gestureState.d.ts +11 -0
- package/types/helpers.d.ts +2 -0
- package/types/index.d.ts +12 -0
- package/types/nativeSheet.d.ts +10 -0
- package/types/setupGestureHandler.d.ts +11 -0
- package/types/types.d.ts +147 -0
- package/types/useGestureHandlerPan.d.ts +44 -0
- package/types/useKeyboardControllerSheet.d.ts +7 -0
- package/types/useKeyboardControllerSheet.native.d.ts +13 -0
- package/types/useSheet.d.ts +2 -0
- package/types/useSheetController.d.ts +17 -0
- package/types/useSheetOffscreenSize.d.ts +3 -0
- package/types/useSheetOpenState.d.ts +9 -0
- package/types/useSheetProviderProps.d.ts +36 -0
- package/types/useSheetScrollViewGestures.d.ts +12 -0
- package/types/useSheetScrollViewGestures.native.d.ts +21 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Nate Wienert
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Type declarations for @hanzogui/sheet/controller path resolution
|
|
2
|
+
// Runtime uses exports field -> dist/esm/controller.mjs
|
|
3
|
+
|
|
4
|
+
export { SheetController } from '../src/SheetController'
|
|
5
|
+
export { SheetControllerContext, useSheetController, type SheetControllerContextValue } from '../src/useSheetController'
|
|
@@ -0,0 +1,48 @@
|
|
|
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: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var GestureDetectorWrapper_exports = {};
|
|
22
|
+
__export(GestureDetectorWrapper_exports, {
|
|
23
|
+
GestureDetectorWrapper: () => GestureDetectorWrapper
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(GestureDetectorWrapper_exports);
|
|
26
|
+
var import_react_native = require("react-native-web"),
|
|
27
|
+
import_gestureState = require("./gestureState.cjs"),
|
|
28
|
+
import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
function GestureDetectorWrapper({
|
|
30
|
+
gesture,
|
|
31
|
+
children,
|
|
32
|
+
style
|
|
33
|
+
}) {
|
|
34
|
+
const {
|
|
35
|
+
GestureDetector
|
|
36
|
+
} = (0, import_gestureState.getGestureHandlerState)();
|
|
37
|
+
return (0, import_gestureState.isGestureHandlerEnabled)() && GestureDetector && gesture ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(GestureDetector, {
|
|
38
|
+
gesture,
|
|
39
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
40
|
+
style,
|
|
41
|
+
collapsable: !1,
|
|
42
|
+
children
|
|
43
|
+
})
|
|
44
|
+
}) : /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
45
|
+
style,
|
|
46
|
+
children
|
|
47
|
+
});
|
|
48
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var GestureDetectorWrapper_exports = {};
|
|
24
|
+
__export(GestureDetectorWrapper_exports, {
|
|
25
|
+
GestureDetectorWrapper: () => GestureDetectorWrapper
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(GestureDetectorWrapper_exports);
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
29
|
+
import_react_native = require("react-native"),
|
|
30
|
+
import_gestureState = require("./gestureState.native.js");
|
|
31
|
+
function GestureDetectorWrapper(param) {
|
|
32
|
+
var {
|
|
33
|
+
gesture,
|
|
34
|
+
children,
|
|
35
|
+
style
|
|
36
|
+
} = param,
|
|
37
|
+
{
|
|
38
|
+
GestureDetector
|
|
39
|
+
} = (0, import_gestureState.getGestureHandlerState)(),
|
|
40
|
+
enabled = (0, import_gestureState.isGestureHandlerEnabled)();
|
|
41
|
+
return enabled && GestureDetector && gesture ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(GestureDetector, {
|
|
42
|
+
gesture,
|
|
43
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
44
|
+
style,
|
|
45
|
+
collapsable: !1,
|
|
46
|
+
children
|
|
47
|
+
})
|
|
48
|
+
}) : /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
49
|
+
style,
|
|
50
|
+
children
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=GestureDetectorWrapper.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","GestureDetectorWrapper_exports","__export","GestureDetectorWrapper","module","exports","import_jsx_runtime","require","import_react_native","import_gestureState","param","gesture","children","style","GestureDetector","getGestureHandlerState","enabled","isGestureHandlerEnabled","jsx","View","collapsable"],"sources":["../../src/GestureDetectorWrapper.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,8BAAA;AAAAC,QAAA,CAAAD,8BAAA;EAAAE,sBAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAT,YAAqC,CAAAK,8BACrC;AAYO,IAAAK,kBAAS,GAAAC,OAAuB;EAAAC,mBAAA,GAAAD,OAAA;EAAAE,mBAAA,GAAAF,OAAA;AAAA,SACrCJ,uBAAAO,KAAA;EACA;MAAAC,OAAA;MAAAC,QAAA;MAAAC;IAAA,IAAAH,KAAA;IAAA;MAAAI;IAAA,QAAAL,mBAAA,CAAAM,sBAAA;IAAAC,OAAA,OAAAP,mBAAA,CAAAQ,uBAAA;EACA,OAAAD,OAAA,IAAAF,eAAA,IAAAH,OAAA,sBAAAL,kBAAA,CAAAY,GAAA,EAAAJ,eAAA;IAC8BH,OAAA;IAC9BC,QAAQ,iBAAgB,IAAIN,kBAAA,CAAAY,GAAA,EAAAV,mBAAA,CAAuBW,IAAA;MAMnDN,KAAA;MAeFO,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
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: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var GestureSheetContext_exports = {};
|
|
22
|
+
__export(GestureSheetContext_exports, {
|
|
23
|
+
GestureSheetProvider: () => GestureSheetProvider,
|
|
24
|
+
useGestureSheetContext: () => useGestureSheetContext
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(GestureSheetContext_exports);
|
|
27
|
+
var import_react = require("react"),
|
|
28
|
+
import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
const GestureSheetContext = (0, import_react.createContext)(null);
|
|
30
|
+
function useGestureSheetContext() {
|
|
31
|
+
return (0, import_react.useContext)(GestureSheetContext);
|
|
32
|
+
}
|
|
33
|
+
function GestureSheetProvider({
|
|
34
|
+
children,
|
|
35
|
+
isDragging,
|
|
36
|
+
blockPan,
|
|
37
|
+
setBlockPan,
|
|
38
|
+
panGesture,
|
|
39
|
+
panGestureRef
|
|
40
|
+
}) {
|
|
41
|
+
const value = {
|
|
42
|
+
panGesture,
|
|
43
|
+
panGestureRef,
|
|
44
|
+
isDragging,
|
|
45
|
+
blockPan,
|
|
46
|
+
setBlockPan
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(GestureSheetContext.Provider, {
|
|
49
|
+
value,
|
|
50
|
+
children
|
|
51
|
+
});
|
|
52
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var GestureSheetContext_exports = {};
|
|
24
|
+
__export(GestureSheetContext_exports, {
|
|
25
|
+
GestureSheetProvider: () => GestureSheetProvider,
|
|
26
|
+
useGestureSheetContext: () => useGestureSheetContext
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(GestureSheetContext_exports);
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
30
|
+
import_react = require("react"),
|
|
31
|
+
GestureSheetContext = /* @__PURE__ */(0, import_react.createContext)(null);
|
|
32
|
+
function useGestureSheetContext() {
|
|
33
|
+
return (0, import_react.useContext)(GestureSheetContext);
|
|
34
|
+
}
|
|
35
|
+
function GestureSheetProvider(param) {
|
|
36
|
+
var {
|
|
37
|
+
children,
|
|
38
|
+
isDragging,
|
|
39
|
+
blockPan,
|
|
40
|
+
setBlockPan,
|
|
41
|
+
panGesture,
|
|
42
|
+
panGestureRef
|
|
43
|
+
} = param,
|
|
44
|
+
value = {
|
|
45
|
+
panGesture,
|
|
46
|
+
panGestureRef,
|
|
47
|
+
isDragging,
|
|
48
|
+
blockPan,
|
|
49
|
+
setBlockPan
|
|
50
|
+
};
|
|
51
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(GestureSheetContext.Provider, {
|
|
52
|
+
value,
|
|
53
|
+
children
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=GestureSheetContext.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","GestureSheetContext_exports","__export","GestureSheetProvider","useGestureSheetContext","module","exports","import_jsx_runtime","require","import_react","GestureSheetContext","createContext","useContext","param","children","isDragging","blockPan","setBlockPan","panGesture","panGestureRef","jsx","Provider"],"sources":["../../src/GestureSheetContext.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,2BAAA;AAAAC,QAAA,CAAAD,2BAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA,oBAAA;EAAAC,sBAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAV,YAA0D,CAAAK,2BA0DtD;AAhCJ,IAAAM,kBAAM,GAAAC,OAAsB;EAAAC,YAAmD,GAAAD,OAAA;EAAAE,mBAAA,sBAAAD,YAAA,CAAAE,aAAA;AAExE,SAASP,uBAAA,EAA0D;EACxE,WAAOK,YAAA,CAAAG,UAAA,EAAWF,mBAAmB;AACvC;AAWO,SAASP,qBAAqBU,KAAA;EACnC;MAAAC,QAAA;MAAAC,UAAA;MAAAC,QAAA;MAAAC,WAAA;MAAAC,UAAA;MAAAC;IAAA,IAAAN,KAAA;IAAAb,KAAA;MACAkB,UAAA;MACAC,aAAA;MACAJ,UAAA;MACAC,QAAA;MACAC;IACF,CAA8B;EAC5B,OAAM,eAAkC,IAAAV,kBAAA,CAAAa,GAAA,EAAAV,mBAAA,CAAAW,QAAA;IACtCrB,KAAA;IACAc;EAAA,EACA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,117 @@
|
|
|
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: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
},
|
|
18
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
20
|
+
value: !0
|
|
21
|
+
}), mod);
|
|
22
|
+
var Sheet_exports = {};
|
|
23
|
+
__export(Sheet_exports, {
|
|
24
|
+
Frame: () => Frame,
|
|
25
|
+
Handle: () => Handle,
|
|
26
|
+
Overlay: () => Overlay,
|
|
27
|
+
Sheet: () => Sheet,
|
|
28
|
+
createSheetScope: () => import_SheetContext.createSheetScope
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(Sheet_exports);
|
|
31
|
+
var import_gui_core = require("@hanzo/gui-core"),
|
|
32
|
+
import_gui_stacks = require("@hanzo/gui-stacks"),
|
|
33
|
+
import_constants = require("./constants.cjs"),
|
|
34
|
+
import_createSheet = require("./createSheet.cjs"),
|
|
35
|
+
import_SheetContext = require("./SheetContext.cjs");
|
|
36
|
+
__reExport(Sheet_exports, require("./types.cjs"), module.exports);
|
|
37
|
+
const Handle = (0, import_gui_core.styled)(import_gui_stacks.XStack, {
|
|
38
|
+
name: import_constants.SHEET_HANDLE_NAME,
|
|
39
|
+
variants: {
|
|
40
|
+
open: {
|
|
41
|
+
true: {
|
|
42
|
+
opacity: 1,
|
|
43
|
+
pointerEvents: "auto"
|
|
44
|
+
},
|
|
45
|
+
false: {
|
|
46
|
+
opacity: 0,
|
|
47
|
+
pointerEvents: "none"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
unstyled: {
|
|
51
|
+
false: {
|
|
52
|
+
height: 10,
|
|
53
|
+
borderRadius: 100,
|
|
54
|
+
backgroundColor: "$background",
|
|
55
|
+
zIndex: 10,
|
|
56
|
+
marginHorizontal: "35%",
|
|
57
|
+
marginBottom: "$2",
|
|
58
|
+
opacity: 0.5,
|
|
59
|
+
hoverStyle: {
|
|
60
|
+
opacity: 0.7
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
unstyled: process.env.HANZO_GUI_HEADLESS === "1"
|
|
67
|
+
}
|
|
68
|
+
}),
|
|
69
|
+
Overlay = (0, import_gui_core.styled)(import_gui_stacks.YStack, {
|
|
70
|
+
name: import_constants.SHEET_OVERLAY_NAME,
|
|
71
|
+
variants: {
|
|
72
|
+
open: {
|
|
73
|
+
true: {
|
|
74
|
+
pointerEvents: "auto"
|
|
75
|
+
},
|
|
76
|
+
false: {
|
|
77
|
+
pointerEvents: "none"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
unstyled: {
|
|
81
|
+
false: {
|
|
82
|
+
fullscreen: !0,
|
|
83
|
+
position: "absolute",
|
|
84
|
+
backgroundColor: "$background",
|
|
85
|
+
zIndex: 99999,
|
|
86
|
+
pointerEvents: "auto"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
defaultVariants: {
|
|
91
|
+
unstyled: process.env.HANZO_GUI_HEADLESS === "1"
|
|
92
|
+
}
|
|
93
|
+
}),
|
|
94
|
+
Frame = (0, import_gui_core.styled)(import_gui_stacks.YStack, {
|
|
95
|
+
name: import_constants.SHEET_NAME,
|
|
96
|
+
variants: {
|
|
97
|
+
unstyled: {
|
|
98
|
+
false: {
|
|
99
|
+
flex: 1,
|
|
100
|
+
backgroundColor: "$background",
|
|
101
|
+
borderTopLeftRadius: "$true",
|
|
102
|
+
borderTopRightRadius: "$true",
|
|
103
|
+
width: "100%",
|
|
104
|
+
maxHeight: "100%",
|
|
105
|
+
overflow: "hidden"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
defaultVariants: {
|
|
110
|
+
unstyled: process.env.HANZO_GUI_HEADLESS === "1"
|
|
111
|
+
}
|
|
112
|
+
}),
|
|
113
|
+
Sheet = (0, import_createSheet.createSheet)({
|
|
114
|
+
Frame,
|
|
115
|
+
Handle,
|
|
116
|
+
Overlay
|
|
117
|
+
});
|
|
@@ -0,0 +1,120 @@
|
|
|
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: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
},
|
|
20
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
22
|
+
value: !0
|
|
23
|
+
}), mod);
|
|
24
|
+
var Sheet_exports = {};
|
|
25
|
+
__export(Sheet_exports, {
|
|
26
|
+
Frame: () => Frame,
|
|
27
|
+
Handle: () => Handle,
|
|
28
|
+
Overlay: () => Overlay,
|
|
29
|
+
Sheet: () => Sheet,
|
|
30
|
+
createSheetScope: () => import_SheetContext.createSheetScope
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(Sheet_exports);
|
|
33
|
+
var import_gui_core = require("@hanzo/gui-core"),
|
|
34
|
+
import_gui_stacks = require("@hanzo/gui-stacks"),
|
|
35
|
+
import_constants = require("./constants.native.js"),
|
|
36
|
+
import_createSheet = require("./createSheet.native.js"),
|
|
37
|
+
import_SheetContext = require("./SheetContext.native.js");
|
|
38
|
+
__reExport(Sheet_exports, require("./types.native.js"), module.exports);
|
|
39
|
+
var Handle = (0, import_gui_core.styled)(import_gui_stacks.XStack, {
|
|
40
|
+
name: import_constants.SHEET_HANDLE_NAME,
|
|
41
|
+
variants: {
|
|
42
|
+
open: {
|
|
43
|
+
true: {
|
|
44
|
+
opacity: 1,
|
|
45
|
+
pointerEvents: "auto"
|
|
46
|
+
},
|
|
47
|
+
false: {
|
|
48
|
+
opacity: 0,
|
|
49
|
+
pointerEvents: "none"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
unstyled: {
|
|
53
|
+
false: {
|
|
54
|
+
height: 10,
|
|
55
|
+
borderRadius: 100,
|
|
56
|
+
backgroundColor: "$background",
|
|
57
|
+
zIndex: 10,
|
|
58
|
+
marginHorizontal: "35%",
|
|
59
|
+
marginBottom: "$2",
|
|
60
|
+
opacity: 0.5,
|
|
61
|
+
hoverStyle: {
|
|
62
|
+
opacity: 0.7
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
defaultVariants: {
|
|
68
|
+
unstyled: process.env.HANZO_GUI_HEADLESS === "1"
|
|
69
|
+
}
|
|
70
|
+
}),
|
|
71
|
+
Overlay = (0, import_gui_core.styled)(import_gui_stacks.YStack, {
|
|
72
|
+
name: import_constants.SHEET_OVERLAY_NAME,
|
|
73
|
+
variants: {
|
|
74
|
+
open: {
|
|
75
|
+
true: {
|
|
76
|
+
pointerEvents: "auto"
|
|
77
|
+
},
|
|
78
|
+
false: {
|
|
79
|
+
pointerEvents: "none"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
unstyled: {
|
|
83
|
+
false: {
|
|
84
|
+
fullscreen: !0,
|
|
85
|
+
position: "absolute",
|
|
86
|
+
backgroundColor: "$background",
|
|
87
|
+
zIndex: 99999,
|
|
88
|
+
pointerEvents: "auto"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
defaultVariants: {
|
|
93
|
+
unstyled: process.env.HANZO_GUI_HEADLESS === "1"
|
|
94
|
+
}
|
|
95
|
+
}),
|
|
96
|
+
Frame = (0, import_gui_core.styled)(import_gui_stacks.YStack, {
|
|
97
|
+
name: import_constants.SHEET_NAME,
|
|
98
|
+
variants: {
|
|
99
|
+
unstyled: {
|
|
100
|
+
false: {
|
|
101
|
+
flex: 1,
|
|
102
|
+
backgroundColor: "$background",
|
|
103
|
+
borderTopLeftRadius: "$true",
|
|
104
|
+
borderTopRightRadius: "$true",
|
|
105
|
+
width: "100%",
|
|
106
|
+
maxHeight: "100%",
|
|
107
|
+
overflow: "hidden"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
defaultVariants: {
|
|
112
|
+
unstyled: process.env.HANZO_GUI_HEADLESS === "1"
|
|
113
|
+
}
|
|
114
|
+
}),
|
|
115
|
+
Sheet = (0, import_createSheet.createSheet)({
|
|
116
|
+
Frame,
|
|
117
|
+
Handle,
|
|
118
|
+
Overlay
|
|
119
|
+
});
|
|
120
|
+
//# sourceMappingURL=Sheet.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Sheet_exports","__export","Frame","Handle","Overlay","Sheet","createSheetScope","import_SheetContext","module","exports","import_gui_core","require","import_gui_stacks","import_constants","import_createSheet","__reExport","styled","XStack","name","SHEET_HANDLE_NAME","variants","open","true","opacity","pointerEvents","false","unstyled","height","borderRadius","backgroundColor","zIndex","marginHorizontal","marginBottom","hoverStyle","defaultVariants","process","env","HANZO_GUI_HEADLESS","YStack","SHEET_OVERLAY_NAME","fullscreen","position","SHEET_NAME","flex","borderTopLeftRadius","borderTopRightRadius","width","maxHeight","overflow","createSheet"],"sources":["../../src/Sheet.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,KAAA,EAAAA,CAAA,KAAAA,KAAA;EAAAC,MAAA,EAAAA,CAAA,KAAAA,MAAA;EAAAC,OAAA,EAAAA,CAAA,KAAAA,OAAA;EAAAC,KAAA,EAAAA,CAAA,KAAAA,KAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAC,mBAAA,CAAAD;AAAA;AAAAE,MAAA,CAAAC,OAAA,GAAAd,YAAuB,CAAAK,aAAA;AAOvB,IAAAU,eAAA,GAAAC,OAAc,kBAPd;EAAAC,iBAAA,GAAAD,OAAA;EAAAE,gBAAA,GAAAF,OAAA;EAAAG,kBAAA,GAAAH,OAAA;EAAAJ,mBAAA,GAAAI,OAAA;AAaOI,UAAM,CAAAf,aAAS,EAAAW,OAAA,oBAAO,GAAAH,MAAA,CAAAC,OAAA;AAAQ,IACnCN,MAAM,OAAAO,eAAA,CAAAM,MAAA,EAAAJ,iBAAA,CAAAK,MAAA;IAENC,IAAA,EAAAL,gBAAU,CAAAM,iBAAA;IAAAC,QACF;MAAAC,IACJ;QAAMC,IACJ;UACAC,OAAA;UACFC,aAAA;QACA;QAAOC,KACL;UACAF,OAAA;UACFC,aAAA;QACF;MAEA;MAAUE,QACR,EAAO;QAAAD,KACL;UACAE,MAAA;UACAC,YAAA,KAAiB;UACjBC,eAAQ;UACRC,MAAA;UACAC,gBAAc;UACdC,YAAS;UAETT,OAAA,KAAY;UAAAU,UACV,EAAS;YACXV,OAAA;UACF;QACF;MACF;IAEA;IAAiBW,eACL;MACZR,QAAA,EAAAS,OAAA,CAAAC,GAAA,CAAAC,kBAAA;IACD;EAMqC,EACpC;EAAAjC,OAAM,OAAAM,eAAA,CAAAM,MAAA,EAAAJ,iBAAA,CAAA0B,MAAA;IAENpB,IAAA,EAAAL,gBAAU,CAAA0B,kBAAA;IAAAnB,QACF;MAAAC,IACJ;QAAMC,IACJ;UACFE,aAAA;QACA;QAAOC,KACL;UACFD,aAAA;QACF;MAEA;MAAUE,QACR,EAAO;QAAAD,KACL;UACAe,UAAU;UACVC,QAAA,YAAiB;UACjBZ,eAAQ;UACRC,MAAA;UACFN,aAAA;QACF;MACF;IAEA;IAAiBU,eACL;MACZR,QAAA,EAAAS,OAAA,CAAAC,GAAA,CAAAC,kBAAA;IACD;EAMmC,EAClC;EAAAnC,KAAM,OAAAQ,eAAA,CAAAM,MAAA,EAAAJ,iBAAA,CAAA0B,MAAA;IAENpB,IAAA,EAAAL,gBAAU,CAAA6B,UAAA;IAAAtB,QACR;MAAUM,QACR,EAAO;QAAAD,KACL;UACAkB,IAAA;UACAd,eAAA,eAAqB;UACrBe,mBAAA,SAAsB;UACtBC,oBAAO;UACPC,KAAA,QAAW;UACXC,SAAA,EAAU;UACZC,QAAA;QACF;MACF;IAEA;IAAiBd,eACL;MACZR,QAAA,EAAAS,OAAA,CAAAC,GAAA,CAAAC,kBAAA;IACD;EAEgC,EAC/B;EAAAhC,KAAA,OAAAS,kBAAA,CAAAmC,WAAA;IACA/C,KAAA;IACAC,MAAA;IACDC","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
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: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var SheetContext_exports = {};
|
|
22
|
+
__export(SheetContext_exports, {
|
|
23
|
+
SheetProvider: () => SheetProvider,
|
|
24
|
+
createSheetContext: () => createSheetContext,
|
|
25
|
+
createSheetScope: () => createSheetScope,
|
|
26
|
+
useSheetContext: () => useSheetContext
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(SheetContext_exports);
|
|
29
|
+
var import_gui_create_context = require("@hanzo/gui-create-context"),
|
|
30
|
+
import_constants = require("./constants.cjs");
|
|
31
|
+
const [createSheetContext, createSheetScope] = (0, import_gui_create_context.createContextScope)(import_constants.SHEET_NAME),
|
|
32
|
+
[SheetProvider, useSheetContext] = createSheetContext(import_constants.SHEET_NAME, {});
|
|
@@ -0,0 +1,35 @@
|
|
|
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: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var SheetContext_exports = {};
|
|
24
|
+
__export(SheetContext_exports, {
|
|
25
|
+
SheetProvider: () => SheetProvider,
|
|
26
|
+
createSheetContext: () => createSheetContext,
|
|
27
|
+
createSheetScope: () => createSheetScope,
|
|
28
|
+
useSheetContext: () => useSheetContext
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(SheetContext_exports);
|
|
31
|
+
var import_gui_create_context = require("@hanzo/gui-create-context"),
|
|
32
|
+
import_constants = require("./constants.native.js"),
|
|
33
|
+
[createSheetContext, createSheetScope] = (0, import_gui_create_context.createContextScope)(import_constants.SHEET_NAME),
|
|
34
|
+
[SheetProvider, useSheetContext] = createSheetContext(import_constants.SHEET_NAME, {});
|
|
35
|
+
//# sourceMappingURL=SheetContext.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","SheetContext_exports","__export","SheetProvider","createSheetContext","createSheetScope","useSheetContext","module","exports","import_gui_create_context","require","import_constants","createContextScope","SHEET_NAME"],"sources":["../../src/SheetContext.tsx"],"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,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,kBAAA,EAAAA,CAAA,KAAAA,kBAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAZ,YAAA,CAAAK,oBAAmC;AAK5B,IAAAQ,yBAA2B,GAAAC,OAAA,4BAAoB;EAAAC,gBAAA,GAAAD,OAAA,CAAmB;EAAA,CAAAN,kBAE3D,EAAAC,gBAAe,QAAeI,yBAAI,CAAAG,kBAAA,EAAAD,gBAAA,CAAAE,UAAA;EAAA,CAAAV,aAAA,EAAAG,eAAA,IAAAF,kBAAA,CAAAO,gBAAA,CAAAE,UAAA","ignoreList":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
6
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: !0
|
|
28
|
+
}) : target, mod)),
|
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
+
value: !0
|
|
31
|
+
}), mod);
|
|
32
|
+
var SheetController_exports = {};
|
|
33
|
+
__export(SheetController_exports, {
|
|
34
|
+
SheetController: () => SheetController
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(SheetController_exports);
|
|
37
|
+
var import_react = __toESM(require("react"), 1),
|
|
38
|
+
import_gui_core = require("@hanzo/gui-core"),
|
|
39
|
+
import_useSheetController = require("./useSheetController.cjs"),
|
|
40
|
+
import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
+
const SheetController = ({
|
|
42
|
+
children,
|
|
43
|
+
onOpenChange: onOpenChangeProp,
|
|
44
|
+
open,
|
|
45
|
+
hidden,
|
|
46
|
+
disableDrag
|
|
47
|
+
}) => {
|
|
48
|
+
const onOpenChange = (0, import_gui_core.useEvent)(onOpenChangeProp),
|
|
49
|
+
id = (0, import_react.useId)(),
|
|
50
|
+
wasHiddenRef = (0, import_react.useRef)(hidden);
|
|
51
|
+
let skipNextAnimation = !1;
|
|
52
|
+
wasHiddenRef.current && !hidden && open && (skipNextAnimation = !0), wasHiddenRef.current = hidden;
|
|
53
|
+
const memoValue = import_react.default.useMemo(() => ({
|
|
54
|
+
id,
|
|
55
|
+
open,
|
|
56
|
+
hidden,
|
|
57
|
+
disableDrag,
|
|
58
|
+
onOpenChange,
|
|
59
|
+
skipNextAnimation
|
|
60
|
+
}), [id, onOpenChange, open, hidden, disableDrag, skipNextAnimation]);
|
|
61
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_useSheetController.SheetControllerContext.Provider, {
|
|
62
|
+
value: memoValue,
|
|
63
|
+
children
|
|
64
|
+
});
|
|
65
|
+
};
|