@tamagui/sheet 3.0.0-beta.924.1 → 3.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/dist/cjs/Sheet.cjs +48 -16
- package/dist/cjs/Sheet.native.cjs +46 -17
- package/dist/cjs/Sheet.native.js +46 -17
- package/dist/cjs/Sheet.native.js.map +1 -1
- package/dist/cjs/SheetDragSurface.cjs +50 -0
- package/dist/{jsx/GestureDetectorWrapper.native.js → cjs/SheetDragSurface.native.cjs} +24 -12
- package/dist/cjs/{GestureDetectorWrapper.native.js → SheetDragSurface.native.js} +25 -11
- package/dist/cjs/SheetDragSurface.native.js.map +1 -0
- package/dist/cjs/SheetImplementationCustom.cjs +41 -58
- package/dist/cjs/SheetImplementationCustom.native.cjs +43 -59
- package/dist/cjs/SheetImplementationCustom.native.js +43 -59
- package/dist/cjs/SheetImplementationCustom.native.js.map +1 -1
- package/dist/cjs/SheetScrollView.cjs +15 -3
- package/dist/cjs/SheetScrollView.native.cjs +17 -4
- package/dist/cjs/SheetScrollView.native.js +17 -4
- package/dist/cjs/SheetScrollView.native.js.map +1 -1
- package/dist/cjs/nativeSheet.cjs +3 -59
- package/dist/cjs/nativeSheet.native.cjs +70 -58
- package/dist/cjs/nativeSheet.native.js +70 -58
- package/dist/cjs/nativeSheet.native.js.map +1 -1
- package/dist/cjs/stableViewportHeight.cjs +27 -0
- package/dist/cjs/stableViewportHeight.native.cjs +29 -0
- package/dist/cjs/stableViewportHeight.native.js +31 -0
- package/dist/cjs/stableViewportHeight.native.js.map +1 -0
- package/dist/cjs/useSheetOffscreenSize.cjs +3 -1
- package/dist/cjs/useSheetOffscreenSize.native.cjs +3 -2
- package/dist/cjs/useSheetOffscreenSize.native.js +3 -2
- package/dist/cjs/useSheetOffscreenSize.native.js.map +1 -1
- package/dist/cjs/useSheetOpenState.cjs +13 -6
- package/dist/cjs/useSheetOpenState.native.cjs +15 -5
- package/dist/cjs/useSheetOpenState.native.js +15 -5
- package/dist/cjs/useSheetOpenState.native.js.map +1 -1
- package/dist/cjs/useSheetProviderProps.cjs +5 -94
- package/dist/cjs/useSheetProviderProps.native.cjs +5 -103
- package/dist/cjs/useSheetProviderProps.native.js +5 -103
- package/dist/cjs/useSheetProviderProps.native.js.map +1 -1
- package/dist/cjs/useSheetState.cjs +120 -0
- package/dist/cjs/useSheetState.native.cjs +131 -0
- package/dist/cjs/useSheetState.native.js +133 -0
- package/dist/cjs/useSheetState.native.js.map +1 -0
- package/dist/esm/Sheet.mjs +48 -15
- package/dist/esm/Sheet.mjs.map +1 -1
- package/dist/esm/Sheet.native.js +46 -17
- package/dist/esm/Sheet.native.js.map +1 -1
- package/dist/esm/SheetDragSurface.mjs +25 -0
- package/dist/esm/SheetDragSurface.mjs.map +1 -0
- package/dist/esm/SheetDragSurface.native.js +34 -0
- package/dist/esm/SheetDragSurface.native.js.map +1 -0
- package/dist/esm/SheetImplementationCustom.mjs +39 -56
- package/dist/esm/SheetImplementationCustom.mjs.map +1 -1
- package/dist/esm/SheetImplementationCustom.native.js +41 -57
- package/dist/esm/SheetImplementationCustom.native.js.map +1 -1
- package/dist/esm/SheetScrollView.mjs +16 -4
- package/dist/esm/SheetScrollView.mjs.map +1 -1
- package/dist/esm/SheetScrollView.native.js +18 -5
- package/dist/esm/SheetScrollView.native.js.map +1 -1
- package/dist/esm/nativeSheet.mjs +3 -60
- package/dist/esm/nativeSheet.mjs.map +1 -1
- package/dist/esm/nativeSheet.native.js +70 -58
- package/dist/esm/nativeSheet.native.js.map +1 -1
- package/dist/esm/stableViewportHeight.mjs +8 -0
- package/dist/esm/stableViewportHeight.mjs.map +1 -0
- package/dist/esm/stableViewportHeight.native.js +8 -0
- package/dist/esm/stableViewportHeight.native.js.map +1 -0
- package/dist/esm/useKeyboardControllerSheet.native.js +0 -5
- package/dist/esm/useSheetOffscreenSize.mjs +3 -1
- package/dist/esm/useSheetOffscreenSize.mjs.map +1 -1
- package/dist/esm/useSheetOffscreenSize.native.js +3 -2
- package/dist/esm/useSheetOffscreenSize.native.js.map +1 -1
- package/dist/esm/useSheetOpenState.mjs +14 -7
- package/dist/esm/useSheetOpenState.mjs.map +1 -1
- package/dist/esm/useSheetOpenState.native.js +16 -6
- package/dist/esm/useSheetOpenState.native.js.map +1 -1
- package/dist/esm/useSheetProviderProps.mjs +5 -88
- package/dist/esm/useSheetProviderProps.mjs.map +1 -1
- package/dist/esm/useSheetProviderProps.native.js +5 -97
- package/dist/esm/useSheetProviderProps.native.js.map +1 -1
- package/dist/esm/useSheetState.mjs +95 -0
- package/dist/esm/useSheetState.mjs.map +1 -0
- package/dist/esm/useSheetState.native.js +104 -0
- package/dist/esm/useSheetState.native.js.map +1 -0
- package/dist/jsx/Sheet.mjs +48 -15
- package/dist/jsx/Sheet.mjs.map +1 -1
- package/dist/jsx/Sheet.native.cjs +46 -17
- package/dist/jsx/Sheet.native.js +46 -17
- package/dist/jsx/Sheet.native.js.map +1 -1
- package/dist/jsx/SheetDragSurface.mjs +25 -0
- package/dist/jsx/SheetDragSurface.mjs.map +1 -0
- package/dist/{cjs/GestureDetectorWrapper.native.cjs → jsx/SheetDragSurface.native.cjs} +24 -10
- package/dist/jsx/{GestureDetectorWrapper.native.cjs → SheetDragSurface.native.js} +26 -10
- package/dist/jsx/SheetDragSurface.native.js.map +1 -0
- package/dist/jsx/SheetImplementationCustom.mjs +39 -56
- package/dist/jsx/SheetImplementationCustom.mjs.map +1 -1
- package/dist/jsx/SheetImplementationCustom.native.cjs +43 -59
- package/dist/jsx/SheetImplementationCustom.native.js +43 -59
- package/dist/jsx/SheetImplementationCustom.native.js.map +1 -1
- package/dist/jsx/SheetScrollView.mjs +16 -4
- package/dist/jsx/SheetScrollView.mjs.map +1 -1
- package/dist/jsx/SheetScrollView.native.cjs +17 -4
- package/dist/jsx/SheetScrollView.native.js +17 -4
- package/dist/jsx/SheetScrollView.native.js.map +1 -1
- package/dist/jsx/nativeSheet.mjs +3 -60
- package/dist/jsx/nativeSheet.mjs.map +1 -1
- package/dist/jsx/nativeSheet.native.cjs +70 -58
- package/dist/jsx/nativeSheet.native.js +70 -58
- package/dist/jsx/nativeSheet.native.js.map +1 -1
- package/dist/jsx/stableViewportHeight.mjs +8 -0
- package/dist/jsx/stableViewportHeight.mjs.map +1 -0
- package/dist/jsx/stableViewportHeight.native.cjs +29 -0
- package/dist/jsx/stableViewportHeight.native.js +31 -0
- package/dist/jsx/stableViewportHeight.native.js.map +1 -0
- package/dist/jsx/useSheetOffscreenSize.mjs +3 -1
- package/dist/jsx/useSheetOffscreenSize.mjs.map +1 -1
- package/dist/jsx/useSheetOffscreenSize.native.cjs +3 -2
- package/dist/jsx/useSheetOffscreenSize.native.js +3 -2
- package/dist/jsx/useSheetOffscreenSize.native.js.map +1 -1
- package/dist/jsx/useSheetOpenState.mjs +14 -7
- package/dist/jsx/useSheetOpenState.mjs.map +1 -1
- package/dist/jsx/useSheetOpenState.native.cjs +15 -5
- package/dist/jsx/useSheetOpenState.native.js +15 -5
- package/dist/jsx/useSheetOpenState.native.js.map +1 -1
- package/dist/jsx/useSheetProviderProps.mjs +5 -88
- package/dist/jsx/useSheetProviderProps.mjs.map +1 -1
- package/dist/jsx/useSheetProviderProps.native.cjs +5 -103
- package/dist/jsx/useSheetProviderProps.native.js +5 -103
- package/dist/jsx/useSheetProviderProps.native.js.map +1 -1
- package/dist/jsx/useSheetState.mjs +95 -0
- package/dist/jsx/useSheetState.mjs.map +1 -0
- package/dist/jsx/useSheetState.native.cjs +131 -0
- package/dist/jsx/useSheetState.native.js +133 -0
- package/dist/jsx/useSheetState.native.js.map +1 -0
- package/package.json +27 -22
- package/src/Sheet.tsx +45 -18
- package/src/SheetDragSurface.native.tsx +42 -0
- package/src/SheetDragSurface.tsx +40 -0
- package/src/SheetImplementationCustom.tsx +67 -92
- package/src/SheetScrollView.tsx +26 -4
- package/src/nativeSheet.native.tsx +110 -0
- package/src/nativeSheet.ts +16 -0
- package/src/stableViewportHeight.native.ts +9 -0
- package/src/stableViewportHeight.ts +15 -0
- package/src/types.tsx +44 -1
- package/src/useSheetOffscreenSize.tsx +3 -7
- package/src/useSheetOpenState.tsx +18 -8
- package/src/useSheetProviderProps.tsx +18 -149
- package/src/useSheetScrollViewGestures.native.ts +4 -1
- package/src/useSheetState.tsx +139 -0
- package/types/Sheet.d.ts +71 -167
- package/types/Sheet.d.ts.map +1 -1
- package/types/SheetDragSurface.d.ts +11 -0
- package/types/SheetDragSurface.d.ts.map +1 -0
- package/types/SheetDragSurface.native.d.ts +11 -0
- package/types/SheetDragSurface.native.d.ts.map +1 -0
- package/types/SheetImplementationCustom.d.ts +1 -2
- package/types/SheetImplementationCustom.d.ts.map +1 -1
- package/types/SheetScrollView.d.ts +3 -3
- package/types/SheetScrollView.d.ts.map +1 -1
- package/types/nativeSheet.d.ts +8 -9
- package/types/nativeSheet.d.ts.map +1 -1
- package/types/nativeSheet.native.d.ts +4 -0
- package/types/nativeSheet.native.d.ts.map +1 -0
- package/types/stableViewportHeight.d.ts +12 -0
- package/types/stableViewportHeight.d.ts.map +1 -0
- package/types/stableViewportHeight.native.d.ts +6 -0
- package/types/stableViewportHeight.native.d.ts.map +1 -0
- package/types/types.d.ts +34 -1
- package/types/types.d.ts.map +1 -1
- package/types/useSheetOffscreenSize.d.ts +1 -1
- package/types/useSheetOffscreenSize.d.ts.map +1 -1
- package/types/useSheetOpenState.d.ts +3 -1
- package/types/useSheetOpenState.d.ts.map +1 -1
- package/types/useSheetProviderProps.d.ts +15 -13
- package/types/useSheetProviderProps.d.ts.map +1 -1
- package/types/useSheetScrollViewGestures.native.d.ts +1 -1
- package/types/useSheetScrollViewGestures.native.d.ts.map +1 -1
- package/types/useSheetState.d.ts +26 -0
- package/types/useSheetState.d.ts.map +1 -0
- package/dist/cjs/GestureDetectorWrapper.cjs +0 -44
- package/dist/cjs/GestureDetectorWrapper.native.js.map +0 -1
- package/dist/esm/GestureDetectorWrapper.mjs +0 -25
- package/dist/esm/GestureDetectorWrapper.mjs.map +0 -1
- package/dist/esm/GestureDetectorWrapper.native.js +0 -26
- package/dist/esm/GestureDetectorWrapper.native.js.map +0 -1
- package/dist/jsx/GestureDetectorWrapper.mjs +0 -25
- package/dist/jsx/GestureDetectorWrapper.mjs.map +0 -1
- package/dist/jsx/GestureDetectorWrapper.native.js.map +0 -1
- package/src/GestureDetectorWrapper.tsx +0 -38
- package/src/nativeSheet.tsx +0 -86
- package/types/GestureDetectorWrapper.d.ts +0 -14
- package/types/GestureDetectorWrapper.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetImplementationCustom.js","names":[],"sources":["jsx/SheetImplementationCustom.js"],"sourcesContent":["import { AnimatePresence } from \"@tamagui/animate-presence\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { LayoutMeasurementController, View, createRefComponent, formatDiagnostic, useAnimatedNumber, useAnimatedNumberStyle, useAnimationDriver, useDidFinishSSR, useEvent, useThemeName } from \"@tamagui/core\";\nimport { Portal, needsPortalRepropagation } from \"@tamagui/portal\";\nimport React, { useState } from \"react\";\nimport { Dimensions, PanResponder, View as View$1 } from \"react-native-web\";\nimport { ParentSheetContext, SheetInsideSheetContext } from \"./contexts\";\nimport { SHEET_OVERLAY_MARKER } from \"./constants\";\nimport { GestureDetectorWrapper } from \"./GestureDetectorWrapper\";\nimport { getGestureHandlerState } from \"./gestureState\";\nimport { GestureSheetProvider } from \"./GestureSheetContext\";\nimport { resisted } from \"./helpers\";\nimport { getKeyboardAdjustedSheetY, getKeyboardOccludedHeight, getSheetReleasePosition } from \"./keyboardAvoidance\";\nimport { MIN_KEYBOARD_HEIGHT, getMaxViewportHeight, getStableLayoutViewportHeight, getWebKeyboardResizeHeight, getWebVisualViewportOffsetTop } from \"./webViewport\";\nimport { SheetAnimatedPositionContext, SheetOverlayLayerContext, SheetProvider } from \"./SheetContext\";\nimport { useGestureHandlerPan } from \"./useGestureHandlerPan\";\nimport { useKeyboardControllerSheet } from \"./useKeyboardControllerSheet\";\nimport { useSafeAreaInsets } from \"./useSafeAreaInsets\";\nimport { useSheetOpenState } from \"./useSheetOpenState\";\nimport { useSheetProviderProps } from \"./useSheetProviderProps\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\n\nconst hiddenSize = 10000.1;\nconst rnghRootStyleOpen = {\n\twidth: \"100%\",\n\theight: \"100%\"\n};\nconst rnghRootStyleClosed = {\n\twidth: \"100%\",\n\theight: 0\n};\nlet sheetHiddenStyleSheet = null;\nconst sheetEscapeLayers = [];\nconst relativeDimensionTo = isWeb ? \"window\" : \"screen\";\nfunction getStableViewportHeight() {\n\tif (isWeb && typeof window !== \"undefined\") return getStableLayoutViewportHeight();\n\treturn Dimensions.get(relativeDimensionTo).height;\n}\nconst SheetImplementationCustom = createRefComponent(function SheetImplementationCustom2(props, forwardedRef) {\n\tconst parentSheet = React.useContext(ParentSheetContext);\n\tconst safeAreaTopInset = useSafeAreaInsets()?.top ?? 0;\n\tconst { transition, transitionConfig: transitionConfigProp, modal = false, zIndex = parentSheet.zIndex + 1, moveOnKeyboardChange = false, unmountChildrenWhenHidden = false, disableHideWhenClosed = false, portalProps, containerComponent: ContainerComponent = React.Fragment, onTransition } = props;\n\tconst state = useSheetOpenState(props);\n\tconst providerProps = useSheetProviderProps(props, state);\n\tconst { frameSize, setFrameSize, dismissOnSnapToBottom, snapPoints, snapPointsMode, hasFit, position, setPosition, scrollBridge, screenSize, setMaxContentSize, maxSnapPoint } = providerProps;\n\tconst { open, controller, isHidden } = state;\n\tconst openRef = React.useRef(open);\n\topenRef.current = open;\n\tconst ref = useComposedRefs(forwardedRef, React.useRef(void 0), providerProps.contentRef);\n\tconst animationDriver = useAnimationDriver();\n\tconst transitionConfig = (() => {\n\t\tif (transitionConfigProp) return transitionConfigProp;\n\t\tconst [animationProp, animationPropConfig] = !transition ? [] : Array.isArray(transition) ? transition : [transition];\n\t\tconst namedConfig = animationProp && animationDriver.animations?.[animationProp];\n\t\tif (namedConfig) {\n\t\t\tif (typeof namedConfig === \"string\") return animationPropConfig ?? null;\n\t\t\treturn {\n\t\t\t\t...namedConfig,\n\t\t\t\t...animationPropConfig\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t})();\n\tconst [isShowingInnerSheet, setIsShowingInnerSheet] = React.useState(false);\n\tconst shouldHideParentSheet = !isWeb && modal && isShowingInnerSheet && needsPortalRepropagation();\n\tconst sheetInsideSheet = React.useContext(SheetInsideSheetContext);\n\tconst onInnerSheet = React.useCallback((hasChild) => {\n\t\tsetIsShowingInnerSheet(hasChild);\n\t}, []);\n\tconst { keyboardHeight, isKeyboardVisible, dismissKeyboard, pauseKeyboardHandler, flushPendingHide } = useKeyboardControllerSheet({ enabled: Boolean(moveOnKeyboardChange) });\n\tconst stableFrameSize = React.useRef(frameSize);\n\tReact.useEffect(() => {\n\t\tif (open && frameSize) stableFrameSize.current = frameSize;\n\t}, [open, frameSize]);\n\tconst isWebKbSheet = isWeb && hasFit && moveOnKeyboardChange;\n\tconst isNativeKbFitSheet = !isWeb && hasFit && Boolean(moveOnKeyboardChange);\n\tconst preKeyboardFrameSize = React.useRef(0);\n\tReact.useEffect(() => {\n\t\tif (isNativeKbFitSheet && open && !isKeyboardVisible && frameSize > 0) preKeyboardFrameSize.current = frameSize;\n\t}, [\n\t\tisNativeKbFitSheet,\n\t\topen,\n\t\tisKeyboardVisible,\n\t\tframeSize\n\t]);\n\tconst effScreenSize = isWebKbSheet ? getStableViewportHeight() : screenSize;\n\tconst effectiveFrameSize = open ? frameSize : stableFrameSize.current || frameSize;\n\tconst positions = React.useMemo(() => snapPoints.map((point) => getYPositions(snapPointsMode, point, effScreenSize, effectiveFrameSize)), [\n\t\teffScreenSize,\n\t\teffectiveFrameSize,\n\t\tsnapPoints,\n\t\tsnapPointsMode\n\t]);\n\tconst [isDragging, setIsDragging_] = React.useState(false);\n\tconst isDraggingRef = React.useRef(false);\n\tconst setIsDragging = React.useCallback((val) => {\n\t\tisDraggingRef.current = val;\n\t\tpauseKeyboardHandler.current = val;\n\t\tsetIsDragging_(val);\n\t\tif (!val) flushPendingHide();\n\t}, [pauseKeyboardHandler, flushPendingHide]);\n\tconst activePositionsRef = React.useRef(positions);\n\tconst activePositions = React.useMemo(() => {\n\t\tif (isDragging || isDraggingRef.current) return activePositionsRef.current;\n\t\tlet result;\n\t\tif (!isKeyboardVisible || keyboardHeight <= 0) result = positions;\n\t\telse result = positions.map((p) => getKeyboardAdjustedSheetY({\n\t\t\tsheetY: p,\n\t\t\tscreenSize: effScreenSize,\n\t\t\tisKeyboardVisible,\n\t\t\tkeyboardHeight,\n\t\t\tshouldTranslate: true,\n\t\t\tsafeAreaTop: isWeb ? getWebVisualViewportOffsetTop() : safeAreaTopInset\n\t\t}));\n\t\tactivePositionsRef.current = result;\n\t\treturn result;\n\t}, [\n\t\tpositions,\n\t\tisKeyboardVisible,\n\t\tkeyboardHeight,\n\t\teffScreenSize,\n\t\tisDragging,\n\t\tsafeAreaTopInset\n\t]);\n\tconst keyboardOccludedHeight = getKeyboardOccludedHeight({\n\t\tframeSize: effectiveFrameSize,\n\t\tisKeyboardVisible,\n\t\tkeyboardHeight,\n\t\tscreenSize: effScreenSize,\n\t\tsheetY: position >= 0 ? activePositions[position] : void 0\n\t});\n\tconst keyboardStableFrameHeight = isWebKbSheet && isKeyboardVisible && frameSize > 0 ? frameSize : isNativeKbFitSheet && isKeyboardVisible && preKeyboardFrameSize.current > 0 ? preKeyboardFrameSize.current : 0;\n\tconst AnimatedView = animationDriver.View ?? View;\n\tuseIsomorphicLayoutEffect(() => {\n\t\tif (!(sheetInsideSheet && open)) return;\n\t\tsheetInsideSheet(true);\n\t\treturn () => {\n\t\t\tsheetInsideSheet(false);\n\t\t};\n\t}, [sheetInsideSheet, open]);\n\tconst nextParentContext = React.useMemo(() => ({ zIndex }), [zIndex]);\n\tconst startPosition = useDidFinishSSR() && screenSize ? screenSize : hiddenSize;\n\tconst animatedNumber = useAnimatedNumber(startPosition);\n\tconst at = React.useRef(startPosition);\n\tconst hasntMeasured = at.current === hiddenSize;\n\tconst [disableAnimation, setDisableAnimation] = useState(hasntMeasured);\n\tconst skipAdaptAnimation = React.useRef(false);\n\tif (controller?.skipNextAnimation) skipAdaptAnimation.current = true;\n\tconst hasScrollView = React.useRef(false);\n\tconst lastPositionIndexRef = React.useRef(-1);\n\tconst pendingTransitionRef = React.useRef(null);\n\tconst emitTransition = useEvent((phase, event, finished) => {\n\t\tconst e = {\n\t\t\tphase,\n\t\t\tcause: event.cause,\n\t\t\tposition: event.position\n\t\t};\n\t\tif (phase === \"end\") e.finished = finished;\n\t\tonTransition?.(e);\n\t\tcontroller?.onTransition?.(e);\n\t});\n\tconst syncAnimatedPosition = useEvent((value) => {\n\t\tat.current = value;\n\t\tscrollBridge.paneY = value;\n\t\tconst minY = activePositions[0];\n\t\tconst wasAtTop = scrollBridge.isAtTop;\n\t\tconst nowAtTop = value <= minY + 5;\n\t\tif (wasAtTop === nowAtTop) return;\n\t\tscrollBridge.isAtTop = nowAtTop;\n\t\tif (nowAtTop) {\n\t\t\tif (scrollBridge.lockScrollAtTop) {\n\t\t\t\tif (scrollBridge.y > 0) {\n\t\t\t\t\tscrollBridge.forceScrollTo?.(0);\n\t\t\t\t\tscrollBridge.y = 0;\n\t\t\t\t}\n\t\t\t\tscrollBridge.scrollLockY = 0;\n\t\t\t\tscrollBridge.setScrollEnabled?.(false, 0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (scrollBridge.y > 0) {\n\t\t\t\tscrollBridge.forceScrollTo?.(0);\n\t\t\t\tscrollBridge.y = 0;\n\t\t\t}\n\t\t\tscrollBridge.scrollLockY = void 0;\n\t\t\tscrollBridge.setScrollEnabled?.(true);\n\t\t} else {\n\t\t\tscrollBridge.scrollLockY = 0;\n\t\t\tscrollBridge.setScrollEnabled?.(false);\n\t\t}\n\t});\n\tconst setAnimatedPositionDirect = useEvent((value) => {\n\t\tsyncAnimatedPosition(value);\n\t\tanimatedNumber.setValue(value, { type: \"direct\" });\n\t});\n\tconst getAnimatedPosition = useEvent(() => {\n\t\tconst value = animatedNumber.getValue();\n\t\tsyncAnimatedPosition(value);\n\t\treturn value;\n\t});\n\tfunction stopSpring() {\n\t\tanimatedNumber.stop();\n\t\tif (scrollBridge.onFinishAnimate) {\n\t\t\tscrollBridge.onFinishAnimate();\n\t\t\tscrollBridge.onFinishAnimate = void 0;\n\t\t}\n\t}\n\tconst animateTo = useEvent((position2, animationOverride) => {\n\t\tif (frameSize === 0) return;\n\t\tconst closeTarget = isWeb ? Math.max(effScreenSize, getMaxViewportHeight()) : effScreenSize;\n\t\tconst isDismissPosition = dismissOnSnapToBottom && position2 === activePositions.length - 1;\n\t\tconst isOpenAnimation = position2 !== -1 && !isHidden && !isDismissPosition;\n\t\tconst toValue = isOpenAnimation ? activePositions[position2] : closeTarget;\n\t\tif (at.current === toValue) {\n\t\t\tif (isDismissPosition) {\n\t\t\t\tif (pendingTransitionRef.current) {\n\t\t\t\t\temitTransition(\"end\", pendingTransitionRef.current, false);\n\t\t\t\t\tpendingTransitionRef.current = null;\n\t\t\t\t}\n\t\t\t\tstopSpring();\n\t\t\t\tconst event2 = {\n\t\t\t\t\tcause: \"close\",\n\t\t\t\t\tposition: toValue\n\t\t\t\t};\n\t\t\t\tlastPositionIndexRef.current = -1;\n\t\t\t\temitTransition(\"start\", event2);\n\t\t\t\tsyncAnimatedPosition(toValue);\n\t\t\t\tsetIsFullyClosed(true);\n\t\t\t\temitTransition(\"end\", event2, true);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tat.current = toValue;\n\t\tconst cause = !isOpenAnimation ? \"close\" : lastPositionIndexRef.current < 0 ? \"open\" : \"snap\";\n\t\tlastPositionIndexRef.current = isOpenAnimation ? position2 : -1;\n\t\tconst event = {\n\t\t\tcause,\n\t\t\tposition: toValue\n\t\t};\n\t\tif (pendingTransitionRef.current) {\n\t\t\temitTransition(\"end\", pendingTransitionRef.current, false);\n\t\t\tpendingTransitionRef.current = null;\n\t\t}\n\t\tstopSpring();\n\t\tconst animationCompleteCallback = () => {\n\t\t\tif (at.current !== toValue) return;\n\t\t\tsyncAnimatedPosition(toValue);\n\t\t\tpendingTransitionRef.current = null;\n\t\t\tif (!isOpenAnimation && !openRef.current) setIsFullyClosed(true);\n\t\t\temitTransition(\"end\", event, true);\n\t\t};\n\t\tpendingTransitionRef.current = event;\n\t\temitTransition(\"start\", event);\n\t\tif (skipAdaptAnimation.current) {\n\t\t\tskipAdaptAnimation.current = false;\n\t\t\tanimatedNumber.setValue(toValue, {\n\t\t\t\ttype: \"timing\",\n\t\t\t\tduration: 0\n\t\t\t}, animationCompleteCallback);\n\t\t\treturn;\n\t\t}\n\t\tconst resolvedConfig = animationOverride || {\n\t\t\ttype: \"spring\",\n\t\t\t...transitionConfig\n\t\t};\n\t\tconst springConfig = !resolvedConfig.type || resolvedConfig.type === \"spring\" ? {\n\t\t\trestDisplacementThreshold: 1,\n\t\t\trestSpeedThreshold: 10,\n\t\t\tenergyThreshold: 1e-5,\n\t\t\t...resolvedConfig\n\t\t} : resolvedConfig;\n\t\tanimatedNumber.setValue(toValue, springConfig, animationCompleteCallback);\n\t});\n\tuseIsomorphicLayoutEffect(() => {\n\t\tif (hasntMeasured && screenSize && frameSize) {\n\t\t\tat.current = screenSize;\n\t\t\tanimatedNumber.setValue(screenSize, {\n\t\t\t\ttype: \"timing\",\n\t\t\t\tduration: 0\n\t\t\t}, () => {\n\t\t\t\tsyncAnimatedPosition(screenSize);\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetDisableAnimation(false);\n\t\t\t\t}, 10);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (disableAnimation) return;\n\t\tif (isDraggingRef.current) return;\n\t\tif (!frameSize || !screenSize || isHidden || hasntMeasured && !open) return;\n\t\tanimateTo(position);\n\t\tif (position === -1) {\n\t\t\tscrollBridge.scrollLock = false;\n\t\t\tscrollBridge.scrollStartY = -1;\n\t\t}\n\t\tif (open && position >= 0) {\n\t\t\tconst isTopPosition = position === 0;\n\t\t\tscrollBridge.isAtTop = isTopPosition;\n\t\t\tif (isTopPosition) {\n\t\t\t\tscrollBridge.scrollLockY = void 0;\n\t\t\t\tscrollBridge.setScrollEnabled?.(true);\n\t\t\t} else {\n\t\t\t\tscrollBridge.scrollLockY = 0;\n\t\t\t\tscrollBridge.setScrollEnabled?.(false);\n\t\t\t}\n\t\t}\n\t}, [\n\t\thasntMeasured,\n\t\tdisableAnimation,\n\t\tisHidden,\n\t\tframeSize,\n\t\tscreenSize,\n\t\topen,\n\t\tposition\n\t]);\n\tconst disableDrag = props.disableDrag ?? controller?.disableDrag;\n\tuseThemeName();\n\tconst [blockPan, setBlockPan] = React.useState(false);\n\tconst panResponder = React.useMemo(() => {\n\t\tif (disableDrag) return;\n\t\tif (!frameSize) return;\n\t\tif (isShowingInnerSheet) return;\n\t\tconst minY = activePositions[0];\n\t\tscrollBridge.paneMinY = minY;\n\t\tlet startY = at.current;\n\t\tfunction setPanning(val) {\n\t\t\tsetIsDragging(val);\n\t\t\tif (!sheetHiddenStyleSheet) {\n\t\t\t\tsheetHiddenStyleSheet = document.createElement(\"style\");\n\t\t\t\tif (typeof document.head !== \"undefined\") document.head.appendChild(sheetHiddenStyleSheet);\n\t\t\t}\n\t\t\tif (!val) sheetHiddenStyleSheet.innerText = \"\";\n\t\t\telse sheetHiddenStyleSheet.innerText = \":root * { user-select: none !important; -webkit-user-select: none !important; }\";\n\t\t}\n\t\tconst release = ({ vy }) => {\n\t\t\tscrollBridge.setParentDragging(false);\n\t\t\tif (scrollBridge.scrollLock) return;\n\t\t\tisExternalDrag = false;\n\t\t\tpreviouslyScrolling = false;\n\t\t\tsetPanning(false);\n\t\t\tconst currentPos = at.current;\n\t\t\tconst closestPoint = getSheetReleasePosition({\n\t\t\t\tpositions: activePositions,\n\t\t\t\tprojectedEnd: currentPos + frameSize * vy * .2,\n\t\t\t\tcurrentPosition: currentPos,\n\t\t\t\tframeSize,\n\t\t\t\tdismissOnSnapToBottom,\n\t\t\t\tsnapPointsMode,\n\t\t\t\tisKeyboardVisible,\n\t\t\t\tisWeb\n\t\t\t});\n\t\t\tsetPosition(closestPoint);\n\t\t\tanimateTo(closestPoint);\n\t\t};\n\t\tconst finish = (_e, state2) => {\n\t\t\trelease({\n\t\t\t\tvy: state2.vy,\n\t\t\t\tdragAt: state2.dy\n\t\t\t});\n\t\t};\n\t\tlet previouslyScrolling = false;\n\t\tconst onMoveShouldSet = (e, { dy }) => {\n\t\t\tfunction getShouldSet() {\n\t\t\t\tif (e.target === providerProps.handleRef.current) return true;\n\t\t\t\tif (scrollBridge.scrollNodeTouched) return false;\n\t\t\t\tif (scrollBridge.hasScrollableContent === true) {\n\t\t\t\t\tif (scrollBridge.scrollLock) return false;\n\t\t\t\t\tconst isScrolled = scrollBridge.y !== 0;\n\t\t\t\t\tconst isDraggingUp = dy < 0;\n\t\t\t\t\tconst isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;\n\t\t\t\t\tif (isScrolled) return false;\n\t\t\t\t\tif (isNearTop) {\n\t\t\t\t\t\tif (hasScrollView.current && isDraggingUp) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn Math.abs(dy) > 10;\n\t\t\t}\n\t\t\tconst granted = getShouldSet();\n\t\t\tif (granted) scrollBridge.setParentDragging(true);\n\t\t\treturn granted;\n\t\t};\n\t\tconst grant = () => {\n\t\t\tsetPanning(true);\n\t\t\tstopSpring();\n\t\t\tstartY = getAnimatedPosition();\n\t\t};\n\t\tlet isExternalDrag = false;\n\t\tscrollBridge.startPanDrag = () => {\n\t\t\tisExternalDrag = true;\n\t\t\tgrant();\n\t\t};\n\t\tscrollBridge.drag = (dy) => {\n\t\t\tif (!isExternalDrag) {\n\t\t\t\tisExternalDrag = true;\n\t\t\t\tgrant();\n\t\t\t}\n\t\t\tsetAnimatedPositionDirect(resisted(dy + startY, minY));\n\t\t};\n\t\tscrollBridge.release = release;\n\t\tscrollBridge.snapToPosition = (positionIndex) => {\n\t\t\tisExternalDrag = false;\n\t\t\tsetPanning(false);\n\t\t\tsetPosition(positionIndex);\n\t\t\tanimateTo(positionIndex);\n\t\t};\n\t\treturn PanResponder.create({\n\t\t\tonMoveShouldSetPanResponder: onMoveShouldSet,\n\t\t\tonPanResponderTerminationRequest: () => false,\n\t\t\tonPanResponderGrant: grant,\n\t\t\tonPanResponderMove: (_e, { dy }) => {\n\t\t\t\tconst to = resisted(dy + startY, minY);\n\t\t\t\tif (to <= minY) scrollBridge.setParentDragging(false);\n\t\t\t\telse scrollBridge.setParentDragging(true);\n\t\t\t\tsetAnimatedPositionDirect(to);\n\t\t\t},\n\t\t\tonPanResponderEnd: finish,\n\t\t\tonPanResponderTerminate: finish,\n\t\t\tonPanResponderRelease: finish\n\t\t});\n\t}, [\n\t\tdisableDrag,\n\t\tisShowingInnerSheet,\n\t\tanimateTo,\n\t\tframeSize,\n\t\tactivePositions,\n\t\tsetPosition,\n\t\tdismissOnSnapToBottom,\n\t\tsnapPointsMode\n\t]);\n\tReact.useEffect(() => {\n\t\tif (isDragging || isHidden || !open || disableAnimation) return;\n\t\tif (!frameSize || !screenSize) return;\n\t\tanimateTo(position, {\n\t\t\ttype: \"timing\",\n\t\t\tduration: 250\n\t\t});\n\t}, [isKeyboardVisible, keyboardHeight]);\n\tconst wasDragging = React.useRef(false);\n\tReact.useEffect(() => {\n\t\tif (isDragging) {\n\t\t\twasDragging.current = true;\n\t\t\treturn;\n\t\t}\n\t\tif (!wasDragging.current) return;\n\t\twasDragging.current = false;\n\t\tif (!frameSize || !screenSize || isHidden || !open) return;\n\t\tanimateTo(position);\n\t}, [isDragging]);\n\tReact.useEffect(() => {\n\t\tif (!open && isKeyboardVisible) {\n\t\t\tdismissKeyboard();\n\t\t\tpauseKeyboardHandler.current = false;\n\t\t\tflushPendingHide();\n\t\t}\n\t}, [open]);\n\tReact.useEffect(() => {\n\t\tif (!isWeb || !modal || !open || shouldHideParentSheet) return;\n\t\tconst layer = {};\n\t\tsheetEscapeLayers.push(layer);\n\t\tconst onKeyDown = (event) => {\n\t\t\tif (event.key === \"Escape\") {\n\t\t\t\tif (sheetEscapeLayers[sheetEscapeLayers.length - 1] === layer) state.setOpen(false);\n\t\t\t}\n\t\t};\n\t\tdocument.addEventListener(\"keydown\", onKeyDown);\n\t\treturn () => {\n\t\t\tconst index = sheetEscapeLayers.indexOf(layer);\n\t\t\tif (index > -1) sheetEscapeLayers.splice(index, 1);\n\t\t\tdocument.removeEventListener(\"keydown\", onKeyDown);\n\t\t};\n\t}, [\n\t\tmodal,\n\t\topen,\n\t\tshouldHideParentSheet,\n\t\tstate.setOpen\n\t]);\n\tconst { panGesture, panGestureRef, gestureHandlerEnabled } = useGestureHandlerPan({\n\t\tpositions: activePositions,\n\t\tframeSize,\n\t\tsetPosition,\n\t\tanimateTo,\n\t\tstopSpring,\n\t\tscrollBridge,\n\t\tsetIsDragging,\n\t\tgetCurrentPosition: getAnimatedPosition,\n\t\tresisted,\n\t\tdisableDrag,\n\t\tisShowingInnerSheet,\n\t\tsetAnimatedPosition: setAnimatedPositionDirect,\n\t\tdismissOnSnapToBottom,\n\t\tsnapPointsMode,\n\t\tisKeyboardVisible,\n\t\tpauseKeyboardHandler\n\t});\n\tconst ignoreLayoutForKeyboard = useEvent(() => isWeb && moveOnKeyboardChange && getWebKeyboardResizeHeight() >= MIN_KEYBOARD_HEIGHT);\n\tconst handleAnimationViewLayout = useEvent((e) => {\n\t\tif (!open && stableFrameSize.current !== 0) return;\n\t\tconst layoutHeight = e.nativeEvent?.layout.height;\n\t\tif (ignoreLayoutForKeyboard() && frameSize > 0) return;\n\t\tconst next = modal ? Math.min(layoutHeight, getStableViewportHeight()) : layoutHeight;\n\t\tif (!next) return;\n\t\tsetFrameSize(Math.round(next));\n\t});\n\tconst handleMaxContentViewLayout = React.useCallback((e) => {\n\t\tif (ignoreLayoutForKeyboard() && screenSize > 0) return;\n\t\tconst next = Math.min(e.nativeEvent?.layout.height, getStableViewportHeight());\n\t\tif (!next) return;\n\t\tsetMaxContentSize(Math.round(next));\n\t}, [ignoreLayoutForKeyboard, screenSize]);\n\tconst animatedStyle = useAnimatedNumberStyle(animatedNumber, React.useCallback((val) => {\n\t\t\"worklet\";\n\t\treturn { transform: [{ translateY: frameSize === 0 ? hiddenSize : val }] };\n\t}, [frameSize]));\n\tconst [isFullyClosed, setIsFullyClosed] = React.useState(false);\n\tif (open && isFullyClosed) setIsFullyClosed(false);\n\tconst hasEverOpened = React.useRef(open);\n\tif (open) hasEverOpened.current = true;\n\tconst isVisuallyActive = open || hasEverOpened.current && !isFullyClosed;\n\tconst applyHidden = shouldHideParentSheet || isFullyClosed && !disableHideWhenClosed;\n\tconst forcedContentHeight = hasFit ? void 0 : snapPointsMode === \"percent\" ? `${maxSnapPoint}${isWeb ? modal ? \"dvh\" : \"%\" : \"%\"}` : maxSnapPoint;\n\tconst setHasScrollView = React.useCallback((val) => {\n\t\thasScrollView.current = val;\n\t}, []);\n\tconst animatedPositionValue = React.useMemo(() => ({\n\t\tvalue: animatedNumber,\n\t\tscreenSize: effScreenSize,\n\t\tframeSize,\n\t\tsnapOffsets: activePositions,\n\t\tminY: activePositions[0] ?? 0\n\t}), [\n\t\tanimatedNumber,\n\t\teffScreenSize,\n\t\tframeSize,\n\t\tactivePositions\n\t]);\n\tconst { overlayChildren, animatedChildren } = React.useMemo(() => partitionSheetChildren(props.children), [props.children]);\n\tlet contents = /* @__PURE__ */ jsx(LayoutMeasurementController, {\n\t\tdisable: !open,\n\t\tchildren: /* @__PURE__ */ jsx(ParentSheetContext.Provider, {\n\t\t\tvalue: nextParentContext,\n\t\t\tchildren: /* @__PURE__ */ jsx(SheetProvider, {\n\t\t\t\t...providerProps,\n\t\t\t\tkeyboardOccludedHeight,\n\t\t\t\tisKeyboardVisible,\n\t\t\t\tkeyboardStableFrameHeight,\n\t\t\t\tsetHasScrollView,\n\t\t\t\tchildren: /* @__PURE__ */ jsx(GestureSheetProvider, {\n\t\t\t\t\tisDragging,\n\t\t\t\t\tblockPan,\n\t\t\t\t\tsetBlockPan,\n\t\t\t\t\tpanGesture,\n\t\t\t\t\tpanGestureRef,\n\t\t\t\t\tchildren: /* @__PURE__ */ jsxs(SheetAnimatedPositionContext.Provider, {\n\t\t\t\t\t\tvalue: animatedPositionValue,\n\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t/* @__PURE__ */ jsx(SheetOverlayLayerContext.Provider, {\n\t\t\t\t\t\t\t\tvalue: true,\n\t\t\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(AnimatePresence, {\n\t\t\t\t\t\t\t\t\tcustom: { open },\n\t\t\t\t\t\t\t\t\tchildren: shouldHideParentSheet || !open ? null : overlayChildren\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tsnapPointsMode !== \"percent\" && /* @__PURE__ */ jsx(View$1, {\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\t\t\tright: 0,\n\t\t\t\t\t\t\t\t\tbottom: 0,\n\t\t\t\t\t\t\t\t\tpointerEvents: \"none\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tonLayout: handleMaxContentViewLayout\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t/* @__PURE__ */ jsx(AnimatedView, {\n\t\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t\t\tonLayout: handleAnimationViewLayout,\n\t\t\t\t\t\t\t\ttransition: isDragging || disableAnimation ? null : transition,\n\t\t\t\t\t\t\t\tdisableClassName: true,\n\t\t\t\t\t\t\t\tstyle: [{\n\t\t\t\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\t\t\t\tzIndex,\n\t\t\t\t\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\t\t\t\t\theight: forcedContentHeight,\n\t\t\t\t\t\t\t\t\tminHeight: forcedContentHeight,\n\t\t\t\t\t\t\t\t\t...applyHidden && { display: \"none\" },\n\t\t\t\t\t\t\t\t\t...(shouldHideParentSheet || !open) && { pointerEvents: \"none\" }\n\t\t\t\t\t\t\t\t}, animatedStyle],\n\t\t\t\t\t\t\t\tchildren: gestureHandlerEnabled && panGesture ? /* @__PURE__ */ jsx(GestureDetectorWrapper, {\n\t\t\t\t\t\t\t\t\tgesture: panGesture,\n\t\t\t\t\t\t\t\t\tstyle: { flex: 1 },\n\t\t\t\t\t\t\t\t\tchildren: animatedChildren\n\t\t\t\t\t\t\t\t}) : /* @__PURE__ */ jsx(View$1, {\n\t\t\t\t\t\t\t\t\t...panResponder?.panHandlers,\n\t\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t\tflex: 1,\n\t\t\t\t\t\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\t\t\t\t\t\theight: \"100%\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tchildren: animatedChildren\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t});\n\tconst shouldMountChildren = unmountChildrenWhenHidden ? !isFullyClosed : true;\n\tif (modal) {\n\t\tconst RNGHRoot = getGestureHandlerState().RootView;\n\t\tconst mountedContents = shouldMountChildren ? /* @__PURE__ */ jsx(ContainerComponent, { children: contents }) : null;\n\t\tconst modalContents = /* @__PURE__ */ jsx(Portal, {\n\t\t\tstackZIndex: zIndex,\n\t\t\thidden: !isVisuallyActive,\n\t\t\t...portalProps,\n\t\t\tchildren: mountedContents && RNGHRoot ? /* @__PURE__ */ jsx(RNGHRoot, {\n\t\t\t\tstyle: open ? rnghRootStyleOpen : rnghRootStyleClosed,\n\t\t\t\tchildren: mountedContents\n\t\t\t}) : mountedContents\n\t\t});\n\t\tif (isWeb) return modalContents;\n\t\treturn /* @__PURE__ */ jsx(SheetInsideSheetContext.Provider, {\n\t\t\tvalue: onInnerSheet,\n\t\t\tchildren: modalContents\n\t\t});\n\t}\n\treturn contents;\n});\nfunction isSheetOverlayComponent(type) {\n\tlet staticConfig = type?.staticConfig;\n\twhile (staticConfig) {\n\t\tif (staticConfig[SHEET_OVERLAY_MARKER]) return true;\n\t\tstaticConfig = staticConfig.parentStaticConfig;\n\t}\n\treturn false;\n}\nfunction partitionSheetChildren(children) {\n\tconst overlayChildren = [];\n\tconst animatedChildren = [];\n\tReact.Children.forEach(children, (child) => {\n\t\tif (!React.isValidElement(child)) {\n\t\t\tanimatedChildren.push(child);\n\t\t\treturn;\n\t\t}\n\t\tif (isSheetOverlayComponent(child.type)) {\n\t\t\toverlayChildren.push(child);\n\t\t\treturn;\n\t\t}\n\t\tanimatedChildren.push(child);\n\t});\n\treturn {\n\t\toverlayChildren,\n\t\tanimatedChildren\n\t};\n}\nfunction getYPositions(mode, point, screenSize, frameSize) {\n\tif (!screenSize || !frameSize) return 0;\n\tif (mode === \"mixed\") {\n\t\tif (typeof point === \"number\") return screenSize - Math.min(screenSize, Math.max(0, point));\n\t\tif (point === \"fit\") return screenSize - Math.min(screenSize, frameSize);\n\t\tif (point.endsWith(\"%\")) {\n\t\t\tconst pct2 = Math.min(100, Math.max(0, Number(point.slice(0, -1)))) / 100;\n\t\t\tif (Number.isNaN(pct2)) {\n\t\t\t\tconsole.warn(formatDiagnostic(\"TAMAGUI_SHEET_SNAP_POINT\", \"Sheet\", \"snapPoints contains an invalid percentage string\", \"Use \\\"fit\\\", a pixel number, or a percentage such as \\\"50%\\\"\", \"snapPoint\", point));\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn Math.round(screenSize - pct2 * screenSize);\n\t\t}\n\t\tconsole.warn(formatDiagnostic(\"TAMAGUI_SHEET_SNAP_POINT\", \"Sheet\", \"snapPoints contains an unsupported mixed-mode value\", \"Use \\\"fit\\\", a pixel number, or a percentage such as \\\"50%\\\"\", \"snapPoint\", point));\n\t\treturn 0;\n\t}\n\tif (mode === \"fit\") {\n\t\tif (point === 0) return screenSize;\n\t\treturn screenSize - Math.min(screenSize, frameSize);\n\t}\n\tif (mode === \"constant\" && typeof point === \"number\") return screenSize - Math.min(screenSize, Math.max(0, point));\n\tconst pct = Math.min(100, Math.max(0, Number(point))) / 100;\n\tif (Number.isNaN(pct)) {\n\t\tconsole.warn(formatDiagnostic(\"TAMAGUI_SHEET_SNAP_POINT\", \"Sheet\", \"snapPoints contains a value that cannot be converted to a percentage\", \"Use a numeric percentage such as 50\", \"snapPoint\", point));\n\t\treturn 0;\n\t}\n\treturn Math.round(screenSize - pct * screenSize);\n}\n\nexport { SheetImplementationCustom, isSheetOverlayComponent };"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAM,aAAa;AACnB,MAAM,oBAAoB;CACzB,OAAO;CACP,QAAQ;AACT;AACA,MAAM,sBAAsB;CAC3B,OAAO;CACP,QAAQ;AACT;AACA,IAAI,wBAAwB;AAC5B,MAAM,oBAAoB,CAAC;AAC3B,MAAM,sBAAsB,QAAQ,WAAW;AAC/C,SAAS,0BAA0B;CAClC,IAAI,SAAS,OAAO,WAAW,aAAa,OAAO,8BAA8B;CACjF,OAAO,WAAW,IAAI,mBAAmB,CAAC,CAAC;AAC5C;AACA,MAAM,4BAA4B,mBAAmB,SAAS,2BAA2B,OAAO,cAAc;CAC7G,MAAM,cAAc,MAAM,WAAW,kBAAkB;CACvD,MAAM,mBAAmB,kBAAkB,CAAC,EAAE,OAAO;CACrD,MAAM,EAAE,YAAY,kBAAkB,sBAAsB,QAAQ,OAAO,SAAS,YAAY,SAAS,GAAG,uBAAuB,OAAO,4BAA4B,OAAO,wBAAwB,OAAO,aAAa,oBAAoB,qBAAqB,MAAM,UAAU,iBAAiB;CACnS,MAAM,QAAQ,kBAAkB,KAAK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AAI,GAAG,KAAK,CAAC;EAC1F,IAAI,UAAU,OAAO,OAAO,aAAa,KAAK,IAAI,YAAY,SAAS;EACvE,IAAI,MAAM,SAAS,GAAG,GAAG;GACxB,MAAM,OAAO,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,OAAO,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;GACtE,IAAI,OAAO,MAAM,IAAI,GAAG;IACvB,QAAQ,KAAK,iBAAiB,4BAA4B,SAAS,oDAAoD,gEAAgE,aAAa,KAAK,CAAC;IAC1M,OAAO;GACR;GACA,OAAO,KAAK,MAAM,aAAa,OAAO,UAAU;EACjD;EACA,QAAQ,KAAK,iBAAiB,4BAA4B,SAAS,uDAAuD,gEAAgE,aAAa,KAAK,CAAC;EAC7M,OAAO;CACR;CACA,IAAI,SAAS,OAAO;EACnB,IAAI,UAAU,GAAG,OAAO;EACxB,OAAO,aAAa,KAAK,IAAI,YAAY,SAAS;CACnD;CACA,IAAI,SAAS,cAAc,OAAO,UAAU,UAAU,OAAO,aAAa,KAAK,IAAI,YAAY,KAAK,IAAI,GAAG,KAAK,CAAC;CACjH,MAAM,MAAM,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,OAAO,KAAK,CAAC,CAAC,IAAI;CACxD,IAAI,OAAO,MAAM,GAAG,GAAG;EACtB,QAAQ,KAAK,iBAAiB,4BAA4B,SAAS,wEAAwE,uCAAuC,aAAa,KAAK,CAAC;EACrM,OAAO;CACR;CACA,OAAO,KAAK,MAAM,aAAa,MAAM,UAAU;AAChD"}
|
|
1
|
+
{"version":3,"file":"SheetImplementationCustom.js","names":[],"sources":["jsx/SheetImplementationCustom.js"],"sourcesContent":["import { AnimatePresence } from \"@tamagui/animate-presence\";\nimport { getTransitionResolver } from \"@tamagui/animation-helpers/transitionResolver\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { LayoutMeasurementController, View, createRefComponent, formatDiagnostic, useAnimatedNumber, useAnimatedNumberStyle, useAnimationDriver, useDidFinishSSR, useEvent, useThemeName } from \"@tamagui/core\";\nimport { Portal, needsPortalRepropagation } from \"@tamagui/portal\";\nimport React, { useState } from \"react\";\nimport { ParentSheetContext, SheetInsideSheetContext } from \"./contexts\";\nimport { SHEET_OVERLAY_MARKER } from \"./constants\";\nimport { getGestureHandlerState } from \"./gestureState\";\nimport { SheetDragSurface } from \"./SheetDragSurface\";\nimport { getStableViewportHeight } from \"./stableViewportHeight\";\nimport { GestureSheetProvider } from \"./GestureSheetContext\";\nimport { resisted } from \"./helpers\";\nimport { getKeyboardAdjustedSheetY, getKeyboardOccludedHeight, getSheetReleasePosition } from \"./keyboardAvoidance\";\nimport { MIN_KEYBOARD_HEIGHT, getMaxViewportHeight, getWebKeyboardResizeHeight, getWebVisualViewportOffsetTop } from \"./webViewport\";\nimport { SheetAnimatedPositionContext, SheetOverlayLayerContext, SheetProvider } from \"./SheetContext\";\nimport { useGestureHandlerPan } from \"./useGestureHandlerPan\";\nimport { useKeyboardControllerSheet } from \"./useKeyboardControllerSheet\";\nimport { useSafeAreaInsets } from \"./useSafeAreaInsets\";\nimport { useSheetOpenState } from \"./useSheetOpenState\";\nimport { useSheetProviderProps } from \"./useSheetProviderProps\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\n\nconst hiddenSize = 10000.1;\nconst rnghRootStyleOpen = {\n\twidth: \"100%\",\n\theight: \"100%\"\n};\nconst rnghRootStyleClosed = {\n\twidth: \"100%\",\n\theight: 0\n};\nlet sheetHiddenStyleSheet = null;\nconst sheetEscapeLayers = [];\nconst SheetImplementationCustom = createRefComponent(function SheetImplementationCustom2(props, forwardedRef) {\n\tconst parentSheet = React.useContext(ParentSheetContext);\n\tconst safeAreaTopInset = useSafeAreaInsets()?.top ?? 0;\n\tconst { transition, transitionConfig: transitionConfigProp, modal = false, zIndex = parentSheet.zIndex + 1, moveOnKeyboardChange = false, unmountChildrenWhenHidden = false, disableHideWhenClosed = false, portalProps, containerComponent: ContainerComponent = React.Fragment, onTransition } = props;\n\tconst state = useSheetOpenState(props);\n\tconst providerProps = useSheetProviderProps(props, state);\n\tconst { frameSize, setFrameSize, dismissOnSnapToBottom, snapPoints, snapPointsMode, hasFit, position, setPosition, scrollBridge, screenSize, setMaxContentSize, maxSnapPoint } = providerProps;\n\tconst { open, controller, isHidden } = state;\n\tconst openRef = React.useRef(open);\n\topenRef.current = open;\n\tconst ref = useComposedRefs(forwardedRef, React.useRef(void 0), providerProps.contentRef);\n\tconst animationDriver = useAnimationDriver();\n\tconst transitionConfig = (() => {\n\t\tif (transitionConfigProp) return transitionConfigProp;\n\t\tconst timing = (transition ? getTransitionResolver()?.resolve(transition, { animations: animationDriver.animations }) : null)?.all?.timing;\n\t\tif (!timing) return null;\n\t\tif (timing.kind === \"timing\") return {\n\t\t\ttype: \"timing\",\n\t\t\tduration: timing.durationMs\n\t\t};\n\t\treturn {\n\t\t\ttype: \"spring\",\n\t\t\tstiffness: timing.stiffness,\n\t\t\tdamping: timing.damping,\n\t\t\tmass: timing.mass\n\t\t};\n\t})();\n\tconst [isShowingInnerSheet, setIsShowingInnerSheet] = React.useState(false);\n\tconst shouldHideParentSheet = !isWeb && modal && isShowingInnerSheet && needsPortalRepropagation();\n\tconst sheetInsideSheet = React.useContext(SheetInsideSheetContext);\n\tconst onInnerSheet = React.useCallback((hasChild) => {\n\t\tsetIsShowingInnerSheet(hasChild);\n\t}, []);\n\tconst { keyboardHeight, isKeyboardVisible, dismissKeyboard, pauseKeyboardHandler, flushPendingHide } = useKeyboardControllerSheet({ enabled: Boolean(moveOnKeyboardChange) });\n\tconst stableFrameSize = React.useRef(frameSize);\n\tReact.useEffect(() => {\n\t\tif (open && frameSize) stableFrameSize.current = frameSize;\n\t}, [open, frameSize]);\n\tconst isWebKbSheet = isWeb && hasFit && moveOnKeyboardChange;\n\tconst isNativeKbFitSheet = !isWeb && hasFit && Boolean(moveOnKeyboardChange);\n\tconst preKeyboardFrameSize = React.useRef(0);\n\tReact.useEffect(() => {\n\t\tif (isNativeKbFitSheet && open && !isKeyboardVisible && frameSize > 0) preKeyboardFrameSize.current = frameSize;\n\t}, [\n\t\tisNativeKbFitSheet,\n\t\topen,\n\t\tisKeyboardVisible,\n\t\tframeSize\n\t]);\n\tconst effScreenSize = isWebKbSheet ? getStableViewportHeight() : screenSize;\n\tconst effectiveFrameSize = open ? frameSize : stableFrameSize.current || frameSize;\n\tconst positions = React.useMemo(() => snapPoints.map((point) => getYPositions(snapPointsMode, point, effScreenSize, effectiveFrameSize)), [\n\t\teffScreenSize,\n\t\teffectiveFrameSize,\n\t\tsnapPoints,\n\t\tsnapPointsMode\n\t]);\n\tconst [isDragging, setIsDragging_] = React.useState(false);\n\tconst isDraggingRef = React.useRef(false);\n\tconst setIsDragging = React.useCallback((val) => {\n\t\tisDraggingRef.current = val;\n\t\tpauseKeyboardHandler.current = val;\n\t\tsetIsDragging_(val);\n\t\tif (!val) flushPendingHide();\n\t}, [pauseKeyboardHandler, flushPendingHide]);\n\tconst activePositionsRef = React.useRef(positions);\n\tconst activePositions = React.useMemo(() => {\n\t\tif (isDragging || isDraggingRef.current) return activePositionsRef.current;\n\t\tlet result;\n\t\tif (!isKeyboardVisible || keyboardHeight <= 0) result = positions;\n\t\telse result = positions.map((p) => getKeyboardAdjustedSheetY({\n\t\t\tsheetY: p,\n\t\t\tscreenSize: effScreenSize,\n\t\t\tisKeyboardVisible,\n\t\t\tkeyboardHeight,\n\t\t\tshouldTranslate: true,\n\t\t\tsafeAreaTop: isWeb ? getWebVisualViewportOffsetTop() : safeAreaTopInset\n\t\t}));\n\t\tactivePositionsRef.current = result;\n\t\treturn result;\n\t}, [\n\t\tpositions,\n\t\tisKeyboardVisible,\n\t\tkeyboardHeight,\n\t\teffScreenSize,\n\t\tisDragging,\n\t\tsafeAreaTopInset\n\t]);\n\tconst keyboardOccludedHeight = getKeyboardOccludedHeight({\n\t\tframeSize: effectiveFrameSize,\n\t\tisKeyboardVisible,\n\t\tkeyboardHeight,\n\t\tscreenSize: effScreenSize,\n\t\tsheetY: position >= 0 ? activePositions[position] : void 0\n\t});\n\tconst keyboardStableFrameHeight = isWebKbSheet && isKeyboardVisible && frameSize > 0 ? frameSize : isNativeKbFitSheet && isKeyboardVisible && preKeyboardFrameSize.current > 0 ? preKeyboardFrameSize.current : 0;\n\tconst AnimatedView = animationDriver.View ?? View;\n\tuseIsomorphicLayoutEffect(() => {\n\t\tif (!(sheetInsideSheet && open)) return;\n\t\tsheetInsideSheet(true);\n\t\treturn () => {\n\t\t\tsheetInsideSheet(false);\n\t\t};\n\t}, [sheetInsideSheet, open]);\n\tconst nextParentContext = React.useMemo(() => ({ zIndex }), [zIndex]);\n\tconst startPosition = useDidFinishSSR() && screenSize ? screenSize : hiddenSize;\n\tconst animatedNumber = useAnimatedNumber(startPosition);\n\tconst at = React.useRef(startPosition);\n\tconst hasntMeasured = at.current === hiddenSize;\n\tconst [disableAnimation, setDisableAnimation] = useState(hasntMeasured);\n\tconst skipAdaptAnimation = React.useRef(false);\n\tif (controller?.skipNextAnimation) skipAdaptAnimation.current = true;\n\tconst hasScrollView = React.useRef(false);\n\tconst lastPositionIndexRef = React.useRef(-1);\n\tconst pendingTransitionRef = React.useRef(null);\n\tconst emitTransition = useEvent((phase, event, finished) => {\n\t\tconst e = {\n\t\t\tphase,\n\t\t\tcause: event.cause,\n\t\t\tposition: event.position\n\t\t};\n\t\tif (phase === \"end\") e.finished = finished;\n\t\tonTransition?.(e);\n\t\tcontroller?.onTransition?.(e);\n\t});\n\tconst syncAnimatedPosition = useEvent((value) => {\n\t\tat.current = value;\n\t\tscrollBridge.paneY = value;\n\t\tconst minY = activePositions[0];\n\t\tconst wasAtTop = scrollBridge.isAtTop;\n\t\tconst nowAtTop = value <= minY + 5;\n\t\tif (wasAtTop === nowAtTop) return;\n\t\tscrollBridge.isAtTop = nowAtTop;\n\t\tif (nowAtTop) {\n\t\t\tif (scrollBridge.lockScrollAtTop) {\n\t\t\t\tif (scrollBridge.y > 0) {\n\t\t\t\t\tscrollBridge.forceScrollTo?.(0);\n\t\t\t\t\tscrollBridge.y = 0;\n\t\t\t\t}\n\t\t\t\tscrollBridge.scrollLockY = 0;\n\t\t\t\tscrollBridge.setScrollEnabled?.(false, 0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (scrollBridge.y > 0) {\n\t\t\t\tscrollBridge.forceScrollTo?.(0);\n\t\t\t\tscrollBridge.y = 0;\n\t\t\t}\n\t\t\tscrollBridge.scrollLockY = void 0;\n\t\t\tscrollBridge.setScrollEnabled?.(true);\n\t\t} else {\n\t\t\tscrollBridge.scrollLockY = 0;\n\t\t\tscrollBridge.setScrollEnabled?.(false);\n\t\t}\n\t});\n\tconst setAnimatedPositionDirect = useEvent((value) => {\n\t\tsyncAnimatedPosition(value);\n\t\tanimatedNumber.setValue(value, { type: \"direct\" });\n\t});\n\tconst getAnimatedPosition = useEvent(() => {\n\t\tconst value = animatedNumber.getValue();\n\t\tsyncAnimatedPosition(value);\n\t\treturn value;\n\t});\n\tfunction stopSpring() {\n\t\tanimatedNumber.stop();\n\t\tif (scrollBridge.onFinishAnimate) {\n\t\t\tscrollBridge.onFinishAnimate();\n\t\t\tscrollBridge.onFinishAnimate = void 0;\n\t\t}\n\t}\n\tconst animateTo = useEvent((position2, animationOverride) => {\n\t\tif (frameSize === 0) return;\n\t\tconst closeTarget = isWeb ? Math.max(effScreenSize, getMaxViewportHeight()) : effScreenSize;\n\t\tconst isDismissPosition = dismissOnSnapToBottom && position2 === activePositions.length - 1;\n\t\tconst isOpenAnimation = position2 !== -1 && !isHidden && !isDismissPosition;\n\t\tconst toValue = isOpenAnimation ? activePositions[position2] : closeTarget;\n\t\tif (at.current === toValue) {\n\t\t\tif (isDismissPosition) {\n\t\t\t\tif (pendingTransitionRef.current) {\n\t\t\t\t\temitTransition(\"end\", pendingTransitionRef.current, false);\n\t\t\t\t\tpendingTransitionRef.current = null;\n\t\t\t\t}\n\t\t\t\tstopSpring();\n\t\t\t\tconst event2 = {\n\t\t\t\t\tcause: \"close\",\n\t\t\t\t\tposition: toValue\n\t\t\t\t};\n\t\t\t\tlastPositionIndexRef.current = -1;\n\t\t\t\temitTransition(\"start\", event2);\n\t\t\t\tsyncAnimatedPosition(toValue);\n\t\t\t\tsetIsFullyClosed(true);\n\t\t\t\temitTransition(\"end\", event2, true);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tat.current = toValue;\n\t\tconst cause = !isOpenAnimation ? \"close\" : lastPositionIndexRef.current < 0 ? \"open\" : \"snap\";\n\t\tlastPositionIndexRef.current = isOpenAnimation ? position2 : -1;\n\t\tconst event = {\n\t\t\tcause,\n\t\t\tposition: toValue\n\t\t};\n\t\tif (pendingTransitionRef.current) {\n\t\t\temitTransition(\"end\", pendingTransitionRef.current, false);\n\t\t\tpendingTransitionRef.current = null;\n\t\t}\n\t\tstopSpring();\n\t\tconst animationCompleteCallback = () => {\n\t\t\tif (at.current !== toValue) return;\n\t\t\tsyncAnimatedPosition(toValue);\n\t\t\tpendingTransitionRef.current = null;\n\t\t\tif (!isOpenAnimation && !openRef.current) setIsFullyClosed(true);\n\t\t\temitTransition(\"end\", event, true);\n\t\t};\n\t\tpendingTransitionRef.current = event;\n\t\temitTransition(\"start\", event);\n\t\tif (skipAdaptAnimation.current) {\n\t\t\tskipAdaptAnimation.current = false;\n\t\t\tanimatedNumber.setValue(toValue, {\n\t\t\t\ttype: \"timing\",\n\t\t\t\tduration: 0\n\t\t\t}, animationCompleteCallback);\n\t\t\treturn;\n\t\t}\n\t\tconst resolvedConfig = animationOverride || {\n\t\t\ttype: \"spring\",\n\t\t\t...transitionConfig\n\t\t};\n\t\tconst springConfig = !resolvedConfig.type || resolvedConfig.type === \"spring\" ? {\n\t\t\trestDisplacementThreshold: 1,\n\t\t\trestSpeedThreshold: 10,\n\t\t\tenergyThreshold: 1e-5,\n\t\t\t...resolvedConfig\n\t\t} : resolvedConfig;\n\t\tanimatedNumber.setValue(toValue, springConfig, animationCompleteCallback);\n\t});\n\tuseIsomorphicLayoutEffect(() => {\n\t\tif (hasntMeasured && screenSize && frameSize) {\n\t\t\tat.current = screenSize;\n\t\t\tanimatedNumber.setValue(screenSize, { type: \"direct\" });\n\t\t\tsyncAnimatedPosition(screenSize);\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetDisableAnimation(false);\n\t\t\t}, 10);\n\t\t\treturn;\n\t\t}\n\t\tif (disableAnimation) return;\n\t\tif (isDraggingRef.current) return;\n\t\tif (!frameSize || !screenSize || isHidden || hasntMeasured && !open) return;\n\t\tanimateTo(position);\n\t\tif (position === -1) {\n\t\t\tscrollBridge.scrollLock = false;\n\t\t\tscrollBridge.scrollStartY = -1;\n\t\t}\n\t\tif (open && position >= 0) {\n\t\t\tconst isTopPosition = position === 0;\n\t\t\tscrollBridge.isAtTop = isTopPosition;\n\t\t\tif (isTopPosition) {\n\t\t\t\tscrollBridge.scrollLockY = void 0;\n\t\t\t\tscrollBridge.setScrollEnabled?.(true);\n\t\t\t} else {\n\t\t\t\tscrollBridge.scrollLockY = 0;\n\t\t\t\tscrollBridge.setScrollEnabled?.(false);\n\t\t\t}\n\t\t}\n\t}, [\n\t\thasntMeasured,\n\t\tdisableAnimation,\n\t\tisHidden,\n\t\tframeSize,\n\t\tscreenSize,\n\t\topen,\n\t\tposition\n\t]);\n\tconst disableDrag = props.disableDrag ?? controller?.disableDrag;\n\tuseThemeName();\n\tconst [blockPan, setBlockPan] = React.useState(false);\n\tconst panConfig = React.useMemo(() => {\n\t\tif (disableDrag) return null;\n\t\tif (!frameSize) return null;\n\t\tif (isShowingInnerSheet) return null;\n\t\tconst minY = activePositions[0];\n\t\tscrollBridge.paneMinY = minY;\n\t\tlet startY = at.current;\n\t\tfunction setPanning(val) {\n\t\t\tsetIsDragging(val);\n\t\t\tif (!sheetHiddenStyleSheet) {\n\t\t\t\tsheetHiddenStyleSheet = document.createElement(\"style\");\n\t\t\t\tif (typeof document.head !== \"undefined\") document.head.appendChild(sheetHiddenStyleSheet);\n\t\t\t}\n\t\t\tif (!val) sheetHiddenStyleSheet.innerText = \"\";\n\t\t\telse sheetHiddenStyleSheet.innerText = \":root * { user-select: none !important; -webkit-user-select: none !important; }\";\n\t\t}\n\t\tconst release = ({ vy }) => {\n\t\t\tscrollBridge.setParentDragging(false);\n\t\t\tif (scrollBridge.scrollLock) return;\n\t\t\tisExternalDrag = false;\n\t\t\tpreviouslyScrolling = false;\n\t\t\tsetPanning(false);\n\t\t\tconst currentPos = at.current;\n\t\t\tconst closestPoint = getSheetReleasePosition({\n\t\t\t\tpositions: activePositions,\n\t\t\t\tprojectedEnd: currentPos + frameSize * vy * .2,\n\t\t\t\tcurrentPosition: currentPos,\n\t\t\t\tframeSize,\n\t\t\t\tdismissOnSnapToBottom,\n\t\t\t\tsnapPointsMode,\n\t\t\t\tisKeyboardVisible,\n\t\t\t\tisWeb\n\t\t\t});\n\t\t\tsetPosition(closestPoint);\n\t\t\tanimateTo(closestPoint);\n\t\t};\n\t\tconst finish = (_e, state2) => {\n\t\t\trelease({\n\t\t\t\tvy: state2.vy,\n\t\t\t\tdragAt: state2.dy\n\t\t\t});\n\t\t};\n\t\tlet previouslyScrolling = false;\n\t\tconst onMoveShouldSet = (e, { dy }) => {\n\t\t\tfunction getShouldSet() {\n\t\t\t\tif (e.target === providerProps.handleRef.current) return true;\n\t\t\t\tif (scrollBridge.scrollNodeTouched) return false;\n\t\t\t\tif (scrollBridge.hasScrollableContent === true) {\n\t\t\t\t\tif (scrollBridge.scrollLock) return false;\n\t\t\t\t\tconst isScrolled = scrollBridge.y !== 0;\n\t\t\t\t\tconst isDraggingUp = dy < 0;\n\t\t\t\t\tconst isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;\n\t\t\t\t\tif (isScrolled) return false;\n\t\t\t\t\tif (isNearTop) {\n\t\t\t\t\t\tif (hasScrollView.current && isDraggingUp) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn Math.abs(dy) > 10;\n\t\t\t}\n\t\t\tconst granted = getShouldSet();\n\t\t\tif (granted) scrollBridge.setParentDragging(true);\n\t\t\treturn granted;\n\t\t};\n\t\tconst grant = () => {\n\t\t\tsetPanning(true);\n\t\t\tstopSpring();\n\t\t\tstartY = getAnimatedPosition();\n\t\t};\n\t\tlet isExternalDrag = false;\n\t\tscrollBridge.startPanDrag = () => {\n\t\t\tisExternalDrag = true;\n\t\t\tgrant();\n\t\t};\n\t\tscrollBridge.drag = (dy) => {\n\t\t\tif (!isExternalDrag) {\n\t\t\t\tisExternalDrag = true;\n\t\t\t\tgrant();\n\t\t\t}\n\t\t\tsetAnimatedPositionDirect(resisted(dy + startY, minY));\n\t\t};\n\t\tscrollBridge.release = release;\n\t\tscrollBridge.snapToPosition = (positionIndex) => {\n\t\t\tisExternalDrag = false;\n\t\t\tsetPanning(false);\n\t\t\tsetPosition(positionIndex);\n\t\t\tanimateTo(positionIndex);\n\t\t};\n\t\treturn {\n\t\t\tonMoveShouldSetPanResponder: onMoveShouldSet,\n\t\t\tonPanResponderTerminationRequest: () => false,\n\t\t\tonPanResponderGrant: grant,\n\t\t\tonPanResponderMove: (_e, { dy }) => {\n\t\t\t\tconst to = resisted(dy + startY, minY);\n\t\t\t\tif (to <= minY) scrollBridge.setParentDragging(false);\n\t\t\t\telse scrollBridge.setParentDragging(true);\n\t\t\t\tsetAnimatedPositionDirect(to);\n\t\t\t},\n\t\t\tonPanResponderEnd: finish,\n\t\t\tonPanResponderTerminate: finish,\n\t\t\tonPanResponderRelease: finish\n\t\t};\n\t}, [\n\t\tdisableDrag,\n\t\tisShowingInnerSheet,\n\t\tanimateTo,\n\t\tframeSize,\n\t\tactivePositions,\n\t\tsetPosition,\n\t\tdismissOnSnapToBottom,\n\t\tsnapPointsMode\n\t]);\n\tReact.useEffect(() => {\n\t\tif (isDragging || isHidden || !open || disableAnimation) return;\n\t\tif (!frameSize || !screenSize) return;\n\t\tanimateTo(position, {\n\t\t\ttype: \"timing\",\n\t\t\tduration: 250\n\t\t});\n\t}, [isKeyboardVisible, keyboardHeight]);\n\tconst wasDragging = React.useRef(false);\n\tReact.useEffect(() => {\n\t\tif (isDragging) {\n\t\t\twasDragging.current = true;\n\t\t\treturn;\n\t\t}\n\t\tif (!wasDragging.current) return;\n\t\twasDragging.current = false;\n\t\tif (!frameSize || !screenSize || isHidden || !open) return;\n\t\tanimateTo(position);\n\t}, [isDragging]);\n\tReact.useEffect(() => {\n\t\tif (!open && isKeyboardVisible) {\n\t\t\tdismissKeyboard();\n\t\t\tpauseKeyboardHandler.current = false;\n\t\t\tflushPendingHide();\n\t\t}\n\t}, [open]);\n\tReact.useEffect(() => {\n\t\tif (!isWeb || !modal || !open || shouldHideParentSheet) return;\n\t\tconst layer = {};\n\t\tsheetEscapeLayers.push(layer);\n\t\tconst onKeyDown = (event) => {\n\t\t\tif (event.key === \"Escape\") {\n\t\t\t\tif (sheetEscapeLayers[sheetEscapeLayers.length - 1] === layer) state.setOpen(false);\n\t\t\t}\n\t\t};\n\t\tdocument.addEventListener(\"keydown\", onKeyDown);\n\t\treturn () => {\n\t\t\tconst index = sheetEscapeLayers.indexOf(layer);\n\t\t\tif (index > -1) sheetEscapeLayers.splice(index, 1);\n\t\t\tdocument.removeEventListener(\"keydown\", onKeyDown);\n\t\t};\n\t}, [\n\t\tmodal,\n\t\topen,\n\t\tshouldHideParentSheet,\n\t\tstate.setOpen\n\t]);\n\tconst { panGesture, panGestureRef, gestureHandlerEnabled } = useGestureHandlerPan({\n\t\tpositions: activePositions,\n\t\tframeSize,\n\t\tsetPosition,\n\t\tanimateTo,\n\t\tstopSpring,\n\t\tscrollBridge,\n\t\tsetIsDragging,\n\t\tgetCurrentPosition: getAnimatedPosition,\n\t\tresisted,\n\t\tdisableDrag,\n\t\tisShowingInnerSheet,\n\t\tsetAnimatedPosition: setAnimatedPositionDirect,\n\t\tdismissOnSnapToBottom,\n\t\tsnapPointsMode,\n\t\tisKeyboardVisible,\n\t\tpauseKeyboardHandler\n\t});\n\tconst ignoreLayoutForKeyboard = useEvent(() => isWeb && moveOnKeyboardChange && getWebKeyboardResizeHeight() >= MIN_KEYBOARD_HEIGHT);\n\tconst handleAnimationViewLayout = useEvent((e) => {\n\t\tif (!open && stableFrameSize.current !== 0) return;\n\t\tconst layoutHeight = e.nativeEvent?.layout.height;\n\t\tif (ignoreLayoutForKeyboard() && frameSize > 0) return;\n\t\tconst next = modal ? Math.min(layoutHeight, getStableViewportHeight()) : layoutHeight;\n\t\tif (!next) return;\n\t\tsetFrameSize(Math.round(next));\n\t});\n\tconst handleMaxContentViewLayout = React.useCallback((e) => {\n\t\tif (ignoreLayoutForKeyboard() && screenSize > 0) return;\n\t\tconst next = Math.min(e.nativeEvent?.layout.height, getStableViewportHeight());\n\t\tif (!next) return;\n\t\tsetMaxContentSize(Math.round(next));\n\t}, [ignoreLayoutForKeyboard, screenSize]);\n\tconst animatedStyle = useAnimatedNumberStyle(animatedNumber, React.useCallback((val) => {\n\t\t\"worklet\";\n\t\treturn { transform: [{ translateY: frameSize === 0 ? hiddenSize : val }] };\n\t}, [frameSize]));\n\tconst [isFullyClosed, setIsFullyClosed] = React.useState(false);\n\tif (open && isFullyClosed) setIsFullyClosed(false);\n\tconst hasEverOpened = React.useRef(open);\n\tif (open) hasEverOpened.current = true;\n\tconst isVisuallyActive = open || hasEverOpened.current && !isFullyClosed;\n\tconst applyHidden = shouldHideParentSheet || isFullyClosed && !disableHideWhenClosed;\n\tconst forcedContentHeight = hasFit ? void 0 : snapPointsMode === \"percent\" ? `${maxSnapPoint}${isWeb ? modal ? \"dvh\" : \"%\" : \"%\"}` : maxSnapPoint;\n\tconst setHasScrollView = React.useCallback((val) => {\n\t\thasScrollView.current = val;\n\t}, []);\n\tconst animatedPositionValue = React.useMemo(() => ({\n\t\tvalue: animatedNumber,\n\t\tscreenSize: effScreenSize,\n\t\tframeSize,\n\t\tsnapOffsets: activePositions,\n\t\tminY: activePositions[0] ?? 0\n\t}), [\n\t\tanimatedNumber,\n\t\teffScreenSize,\n\t\tframeSize,\n\t\tactivePositions\n\t]);\n\tconst { overlayChildren, animatedChildren } = React.useMemo(() => partitionSheetChildren(props.children), [props.children]);\n\tlet contents = /* @__PURE__ */ jsx(LayoutMeasurementController, {\n\t\tdisable: !open,\n\t\tchildren: /* @__PURE__ */ jsx(ParentSheetContext.Provider, {\n\t\t\tvalue: nextParentContext,\n\t\t\tchildren: /* @__PURE__ */ jsx(SheetProvider, {\n\t\t\t\t...providerProps,\n\t\t\t\tkeyboardOccludedHeight,\n\t\t\t\tisKeyboardVisible,\n\t\t\t\tkeyboardStableFrameHeight,\n\t\t\t\tsetHasScrollView,\n\t\t\t\tchildren: /* @__PURE__ */ jsx(GestureSheetProvider, {\n\t\t\t\t\tisDragging,\n\t\t\t\t\tblockPan,\n\t\t\t\t\tsetBlockPan,\n\t\t\t\t\tpanGesture,\n\t\t\t\t\tpanGestureRef,\n\t\t\t\t\tchildren: /* @__PURE__ */ jsxs(SheetAnimatedPositionContext.Provider, {\n\t\t\t\t\t\tvalue: animatedPositionValue,\n\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t/* @__PURE__ */ jsx(SheetOverlayLayerContext.Provider, {\n\t\t\t\t\t\t\t\tvalue: true,\n\t\t\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(AnimatePresence, {\n\t\t\t\t\t\t\t\t\tcustom: { open },\n\t\t\t\t\t\t\t\t\tchildren: shouldHideParentSheet || !open ? null : overlayChildren\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tsnapPointsMode !== \"percent\" && /* @__PURE__ */ jsx(View, {\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\t\t\tinset: 0,\n\t\t\t\t\t\t\t\tpointerEvents: \"none\",\n\t\t\t\t\t\t\t\tonLayout: handleMaxContentViewLayout\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t/* @__PURE__ */ jsx(AnimatedView, {\n\t\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t\t\tonLayout: handleAnimationViewLayout,\n\t\t\t\t\t\t\t\ttransition: isDragging || disableAnimation ? null : transition,\n\t\t\t\t\t\t\t\tdisableClassName: true,\n\t\t\t\t\t\t\t\tstyle: [{\n\t\t\t\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\t\t\t\tzIndex,\n\t\t\t\t\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\t\t\t\t\theight: forcedContentHeight,\n\t\t\t\t\t\t\t\t\tminHeight: forcedContentHeight,\n\t\t\t\t\t\t\t\t\t...applyHidden && { display: \"none\" },\n\t\t\t\t\t\t\t\t\t...(shouldHideParentSheet || !open) && { pointerEvents: \"none\" }\n\t\t\t\t\t\t\t\t}, animatedStyle],\n\t\t\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(SheetDragSurface, {\n\t\t\t\t\t\t\t\t\tgestureHandlerEnabled,\n\t\t\t\t\t\t\t\t\tpanGesture,\n\t\t\t\t\t\t\t\t\tpanConfig,\n\t\t\t\t\t\t\t\t\tchildren: animatedChildren\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t});\n\tconst shouldMountChildren = unmountChildrenWhenHidden ? !isFullyClosed : true;\n\tif (modal) {\n\t\tif (!shouldMountChildren) return null;\n\t\tconst RNGHRoot = getGestureHandlerState().RootView;\n\t\tconst mountedContents = /* @__PURE__ */ jsx(ContainerComponent, { children: contents });\n\t\tconst modalContents = /* @__PURE__ */ jsx(Portal, {\n\t\t\tstackZIndex: zIndex,\n\t\t\thidden: !isVisuallyActive,\n\t\t\t...portalProps,\n\t\t\tchildren: RNGHRoot ? /* @__PURE__ */ jsx(RNGHRoot, {\n\t\t\t\tstyle: open ? rnghRootStyleOpen : rnghRootStyleClosed,\n\t\t\t\tchildren: mountedContents\n\t\t\t}) : mountedContents\n\t\t});\n\t\tif (isWeb) return modalContents;\n\t\treturn /* @__PURE__ */ jsx(SheetInsideSheetContext.Provider, {\n\t\t\tvalue: onInnerSheet,\n\t\t\tchildren: modalContents\n\t\t});\n\t}\n\treturn contents;\n});\nfunction isSheetOverlayComponent(type) {\n\tlet staticConfig = type?.staticConfig;\n\twhile (staticConfig) {\n\t\tif (staticConfig[SHEET_OVERLAY_MARKER]) return true;\n\t\tstaticConfig = staticConfig.parentStaticConfig;\n\t}\n\treturn false;\n}\nfunction partitionSheetChildren(children) {\n\tconst overlayChildren = [];\n\tconst animatedChildren = [];\n\tReact.Children.forEach(children, (child) => {\n\t\tif (!React.isValidElement(child)) {\n\t\t\tanimatedChildren.push(child);\n\t\t\treturn;\n\t\t}\n\t\tif (isSheetOverlayComponent(child.type)) {\n\t\t\toverlayChildren.push(child);\n\t\t\treturn;\n\t\t}\n\t\tanimatedChildren.push(child);\n\t});\n\treturn {\n\t\toverlayChildren,\n\t\tanimatedChildren\n\t};\n}\nfunction getYPositions(mode, point, screenSize, frameSize) {\n\tif (!screenSize || !frameSize) return 0;\n\tif (mode === \"mixed\") {\n\t\tif (typeof point === \"number\") return screenSize - Math.min(screenSize, Math.max(0, point));\n\t\tif (point === \"fit\") return screenSize - Math.min(screenSize, frameSize);\n\t\tif (point.endsWith(\"%\")) {\n\t\t\tconst pct2 = Math.min(100, Math.max(0, Number(point.slice(0, -1)))) / 100;\n\t\t\tif (Number.isNaN(pct2)) {\n\t\t\t\tconsole.warn(formatDiagnostic(\"TAMAGUI_SHEET_SNAP_POINT\", \"Sheet\", \"snapPoints contains an invalid percentage string\", \"Use \\\"fit\\\", a pixel number, or a percentage such as \\\"50%\\\"\", \"snapPoint\", point));\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn Math.round(screenSize - pct2 * screenSize);\n\t\t}\n\t\tconsole.warn(formatDiagnostic(\"TAMAGUI_SHEET_SNAP_POINT\", \"Sheet\", \"snapPoints contains an unsupported mixed-mode value\", \"Use \\\"fit\\\", a pixel number, or a percentage such as \\\"50%\\\"\", \"snapPoint\", point));\n\t\treturn 0;\n\t}\n\tif (mode === \"fit\") {\n\t\tif (point === 0) return screenSize;\n\t\treturn screenSize - Math.min(screenSize, frameSize);\n\t}\n\tif (mode === \"constant\" && typeof point === \"number\") return screenSize - Math.min(screenSize, Math.max(0, point));\n\tconst pct = Math.min(100, Math.max(0, Number(point))) / 100;\n\tif (Number.isNaN(pct)) {\n\t\tconsole.warn(formatDiagnostic(\"TAMAGUI_SHEET_SNAP_POINT\", \"Sheet\", \"snapPoints contains a value that cannot be converted to a percentage\", \"Use a numeric percentage such as 50\", \"snapPoint\", point));\n\t\treturn 0;\n\t}\n\treturn Math.round(screenSize - pct * screenSize);\n}\n\nexport { SheetImplementationCustom, isSheetOverlayComponent };"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,MAAM,aAAa;AACnB,MAAM,oBAAoB;CACzB,OAAO;CACP,QAAQ;AACT;AACA,MAAM,sBAAsB;CAC3B,OAAO;CACP,QAAQ;AACT;AACA,IAAI,wBAAwB;AAC5B,MAAM,oBAAoB,CAAC;AAC3B,MAAM,4BAA4B,mBAAmB,SAAS,2BAA2B,OAAO,cAAc;CAC7G,MAAM,cAAc,MAAM,WAAW,kBAAkB;CACvD,MAAM,mBAAmB,kBAAkB,CAAC,EAAE,OAAO;CACrD,MAAM,EAAE,YAAY,kBAAkB,sBAAsB,QAAQ,OAAO,SAAS,YAAY,SAAS,GAAG,uBAAuB,OAAO,4BAA4B,OAAO,wBAAwB,OAAO,aAAa,oBAAoB,qBAAqB,MAAM,UAAU,iBAAiB;CACnS,MAAM,QAAQ,kBAAkB,KAAK;CACrC,MAAM,gBAAgB,sBAAsB,OAAO,KAAK;CACxD,MAAM,EAAE,WAAW,cAAc,uBAAuB,YAAY,gBAAgB,QAAQ,UAAU,aAAa,cAAc,YAAY,mBAAmB,iBAAiB;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gE,aAAa,KAAK,CAAC;IAC1M,OAAO;GACR;GACA,OAAO,KAAK,MAAM,aAAa,OAAO,UAAU;EACjD;EACA,QAAQ,KAAK,iBAAiB,4BAA4B,SAAS,uDAAuD,gEAAgE,aAAa,KAAK,CAAC;EAC7M,OAAO;CACR;CACA,IAAI,SAAS,OAAO;EACnB,IAAI,UAAU,GAAG,OAAO;EACxB,OAAO,aAAa,KAAK,IAAI,YAAY,SAAS;CACnD;CACA,IAAI,SAAS,cAAc,OAAO,UAAU,UAAU,OAAO,aAAa,KAAK,IAAI,YAAY,KAAK,IAAI,GAAG,KAAK,CAAC;CACjH,MAAM,MAAM,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,OAAO,KAAK,CAAC,CAAC,IAAI;CACxD,IAAI,OAAO,MAAM,GAAG,GAAG;EACtB,QAAQ,KAAK,iBAAiB,4BAA4B,SAAS,wEAAwE,uCAAuC,aAAa,KAAK,CAAC;EACrM,OAAO;CACR;CACA,OAAO,KAAK,MAAM,aAAa,MAAM,UAAU;AAChD"}
|
|
@@ -35,16 +35,17 @@ module.exports = __toCommonJS(SheetImplementationCustom_exports);
|
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_adapt = require("@tamagui/adapt");
|
|
37
37
|
var import_animate_presence = require("@tamagui/animate-presence");
|
|
38
|
+
var import_transitionResolver = require("@tamagui/animation-helpers/transitionResolver");
|
|
38
39
|
var import_compose_refs = require("@tamagui/compose-refs");
|
|
39
40
|
var import_constants = require("@tamagui/constants");
|
|
40
41
|
var import_core = require("@tamagui/core");
|
|
41
42
|
var import_portal = require("@tamagui/portal");
|
|
42
43
|
var import_react = __toESM(require("react"), 1);
|
|
43
|
-
var import_react_native = require("react-native");
|
|
44
44
|
var import_contexts = require("./contexts.native.js");
|
|
45
45
|
var import_constants2 = require("./constants.native.js");
|
|
46
|
-
var import_GestureDetectorWrapper = require("./GestureDetectorWrapper.native.js");
|
|
47
46
|
var import_gestureState = require("./gestureState.native.js");
|
|
47
|
+
var import_SheetDragSurface = require("./SheetDragSurface.native.js");
|
|
48
|
+
var import_stableViewportHeight = require("./stableViewportHeight.native.js");
|
|
48
49
|
var import_GestureSheetContext = require("./GestureSheetContext.native.js");
|
|
49
50
|
var import_helpers = require("./helpers.native.js");
|
|
50
51
|
var import_keyboardAvoidance = require("./keyboardAvoidance.native.js");
|
|
@@ -65,11 +66,6 @@ var rnghRootStyleClosed = {
|
|
|
65
66
|
height: 0
|
|
66
67
|
};
|
|
67
68
|
var sheetEscapeLayers = [];
|
|
68
|
-
var relativeDimensionTo = import_constants.isWeb ? "window" : "screen";
|
|
69
|
-
function getStableViewportHeight() {
|
|
70
|
-
if (import_constants.isWeb && typeof window !== "undefined") return (0, import_webViewport.getStableLayoutViewportHeight)();
|
|
71
|
-
return import_react_native.Dimensions.get(relativeDimensionTo).height;
|
|
72
|
-
}
|
|
73
69
|
var SheetImplementationCustom = (0, import_core.createRefComponent)(function SheetImplementationCustom2(props, forwardedRef) {
|
|
74
70
|
var parentSheet = import_react.default.useContext(import_contexts.ParentSheetContext);
|
|
75
71
|
var safeAreaInsets = (0, import_useSafeAreaInsets.useSafeAreaInsets)();
|
|
@@ -86,18 +82,21 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
86
82
|
var ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef, providerProps.contentRef);
|
|
87
83
|
var animationDriver = (0, import_core.useAnimationDriver)();
|
|
88
84
|
var transitionConfig = (function() {
|
|
89
|
-
var
|
|
85
|
+
var _getTransitionResolver, _resolved_all;
|
|
90
86
|
if (transitionConfigProp) return transitionConfigProp;
|
|
91
|
-
var
|
|
92
|
-
var
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
87
|
+
var resolved = transition ? (_getTransitionResolver = (0, import_transitionResolver.getTransitionResolver)()) === null || _getTransitionResolver === void 0 ? void 0 : _getTransitionResolver.resolve(transition, { animations: animationDriver.animations }) : null;
|
|
88
|
+
var timing = resolved === null || resolved === void 0 ? void 0 : (_resolved_all = resolved.all) === null || _resolved_all === void 0 ? void 0 : _resolved_all.timing;
|
|
89
|
+
if (!timing) return null;
|
|
90
|
+
if (timing.kind === "timing") return {
|
|
91
|
+
type: "timing",
|
|
92
|
+
duration: timing.durationMs
|
|
93
|
+
};
|
|
94
|
+
return {
|
|
95
|
+
type: "spring",
|
|
96
|
+
stiffness: timing.stiffness,
|
|
97
|
+
damping: timing.damping,
|
|
98
|
+
mass: timing.mass
|
|
99
|
+
};
|
|
101
100
|
})();
|
|
102
101
|
var [isShowingInnerSheet, setIsShowingInnerSheet] = import_react.default.useState(false);
|
|
103
102
|
var shouldHideParentSheet = !import_constants.isWeb && modal && isShowingInnerSheet && (0, import_portal.needsPortalRepropagation)();
|
|
@@ -121,7 +120,7 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
121
120
|
isKeyboardVisible,
|
|
122
121
|
frameSize
|
|
123
122
|
]);
|
|
124
|
-
var effScreenSize = isWebKbSheet ? getStableViewportHeight() : screenSize;
|
|
123
|
+
var effScreenSize = isWebKbSheet ? (0, import_stableViewportHeight.getStableViewportHeight)() : screenSize;
|
|
125
124
|
var effectiveFrameSize = open ? frameSize : stableFrameSize.current || frameSize;
|
|
126
125
|
var positions = import_react.default.useMemo(function() {
|
|
127
126
|
return snapPoints.map(function(point) {
|
|
@@ -326,15 +325,11 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
326
325
|
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
327
326
|
if (hasntMeasured && screenSize && frameSize) {
|
|
328
327
|
at.current = screenSize;
|
|
329
|
-
animatedNumber.setValue(screenSize, {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
setTimeout(function() {
|
|
335
|
-
setDisableAnimation(false);
|
|
336
|
-
}, 10);
|
|
337
|
-
});
|
|
328
|
+
animatedNumber.setValue(screenSize, { type: "direct" });
|
|
329
|
+
syncAnimatedPosition(screenSize);
|
|
330
|
+
setTimeout(function() {
|
|
331
|
+
setDisableAnimation(false);
|
|
332
|
+
}, 10);
|
|
338
333
|
return;
|
|
339
334
|
}
|
|
340
335
|
if (disableAnimation) return;
|
|
@@ -371,10 +366,10 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
371
366
|
var disableDrag = (_props_disableDrag = props.disableDrag) !== null && _props_disableDrag !== void 0 ? _props_disableDrag : controller === null || controller === void 0 ? void 0 : controller.disableDrag;
|
|
372
367
|
(0, import_core.useThemeName)();
|
|
373
368
|
var [blockPan, setBlockPan] = import_react.default.useState(false);
|
|
374
|
-
var
|
|
375
|
-
if (disableDrag) return;
|
|
376
|
-
if (!frameSize) return;
|
|
377
|
-
if (isShowingInnerSheet) return;
|
|
369
|
+
var panConfig = import_react.default.useMemo(function() {
|
|
370
|
+
if (disableDrag) return null;
|
|
371
|
+
if (!frameSize) return null;
|
|
372
|
+
if (isShowingInnerSheet) return null;
|
|
378
373
|
var minY = activePositions[0];
|
|
379
374
|
scrollBridge.paneMinY = minY;
|
|
380
375
|
var startY = at.current;
|
|
@@ -456,7 +451,7 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
456
451
|
setPosition(positionIndex);
|
|
457
452
|
animateTo(positionIndex);
|
|
458
453
|
};
|
|
459
|
-
return
|
|
454
|
+
return {
|
|
460
455
|
onMoveShouldSetPanResponder: onMoveShouldSet,
|
|
461
456
|
onPanResponderTerminationRequest: function() {
|
|
462
457
|
return false;
|
|
@@ -473,7 +468,7 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
473
468
|
onPanResponderEnd: finish,
|
|
474
469
|
onPanResponderTerminate: finish,
|
|
475
470
|
onPanResponderRelease: finish
|
|
476
|
-
}
|
|
471
|
+
};
|
|
477
472
|
}, [
|
|
478
473
|
disableDrag,
|
|
479
474
|
isShowingInnerSheet,
|
|
@@ -557,14 +552,14 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
557
552
|
if (!open && stableFrameSize.current !== 0) return;
|
|
558
553
|
var layoutHeight = (_e_nativeEvent = e.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.layout.height;
|
|
559
554
|
if (ignoreLayoutForKeyboard() && frameSize > 0) return;
|
|
560
|
-
var next = modal ? Math.min(layoutHeight, getStableViewportHeight()) : layoutHeight;
|
|
555
|
+
var next = modal ? Math.min(layoutHeight, (0, import_stableViewportHeight.getStableViewportHeight)()) : layoutHeight;
|
|
561
556
|
if (!next) return;
|
|
562
557
|
setFrameSize(Math.round(next));
|
|
563
558
|
});
|
|
564
559
|
var handleMaxContentViewLayout = import_react.default.useCallback(function(e) {
|
|
565
560
|
var _e_nativeEvent;
|
|
566
561
|
if (ignoreLayoutForKeyboard() && screenSize > 0) return;
|
|
567
|
-
var next = Math.min((_e_nativeEvent = e.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.layout.height, getStableViewportHeight());
|
|
562
|
+
var next = Math.min((_e_nativeEvent = e.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.layout.height, (0, import_stableViewportHeight.getStableViewportHeight)());
|
|
568
563
|
if (!next) return;
|
|
569
564
|
setMaxContentSize(Math.round(next));
|
|
570
565
|
}, [ignoreLayoutForKeyboard, screenSize]);
|
|
@@ -627,16 +622,11 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
627
622
|
children: shouldHideParentSheet || !open ? null : overlayChildren
|
|
628
623
|
})
|
|
629
624
|
}),
|
|
630
|
-
snapPointsMode !== "percent" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
left: 0,
|
|
636
|
-
right: 0,
|
|
637
|
-
bottom: 0,
|
|
638
|
-
pointerEvents: "none"
|
|
639
|
-
},
|
|
625
|
+
snapPointsMode !== "percent" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.View, {
|
|
626
|
+
opacity: 0,
|
|
627
|
+
position: "absolute",
|
|
628
|
+
inset: 0,
|
|
629
|
+
pointerEvents: "none",
|
|
640
630
|
onLayout: handleMaxContentViewLayout
|
|
641
631
|
}),
|
|
642
632
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedView, {
|
|
@@ -653,17 +643,10 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
653
643
|
...applyHidden && { display: "none" },
|
|
654
644
|
...(shouldHideParentSheet || !open) && { pointerEvents: "none" }
|
|
655
645
|
}, animatedStyle],
|
|
656
|
-
children:
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
661
|
-
...panResponder === null || panResponder === void 0 ? void 0 : panResponder.panHandlers,
|
|
662
|
-
style: {
|
|
663
|
-
flex: 1,
|
|
664
|
-
width: "100%",
|
|
665
|
-
height: "100%"
|
|
666
|
-
},
|
|
646
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SheetDragSurface.SheetDragSurface, {
|
|
647
|
+
gestureHandlerEnabled,
|
|
648
|
+
panGesture,
|
|
649
|
+
panConfig,
|
|
667
650
|
children: animatedChildren
|
|
668
651
|
})
|
|
669
652
|
})
|
|
@@ -685,13 +668,14 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
685
668
|
}
|
|
686
669
|
var shouldMountChildren = unmountChildrenWhenHidden ? !isFullyClosed : true;
|
|
687
670
|
if (modal) {
|
|
671
|
+
if (!shouldMountChildren) return null;
|
|
688
672
|
var RNGHRoot = (0, import_gestureState.getGestureHandlerState)().RootView;
|
|
689
|
-
var mountedContents =
|
|
673
|
+
var mountedContents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ContainerComponent, { children: contents });
|
|
690
674
|
var modalContents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, {
|
|
691
675
|
stackZIndex: zIndex,
|
|
692
676
|
hidden: !isVisuallyActive,
|
|
693
677
|
...portalProps,
|
|
694
|
-
children:
|
|
678
|
+
children: RNGHRoot ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RNGHRoot, {
|
|
695
679
|
style: open ? rnghRootStyleOpen : rnghRootStyleClosed,
|
|
696
680
|
children: mountedContents
|
|
697
681
|
}) : mountedContents
|
|
@@ -35,16 +35,17 @@ module.exports = __toCommonJS(SheetImplementationCustom_exports);
|
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_adapt = require("@tamagui/adapt");
|
|
37
37
|
var import_animate_presence = require("@tamagui/animate-presence");
|
|
38
|
+
var import_transitionResolver = require("@tamagui/animation-helpers/transitionResolver");
|
|
38
39
|
var import_compose_refs = require("@tamagui/compose-refs");
|
|
39
40
|
var import_constants = require("@tamagui/constants");
|
|
40
41
|
var import_core = require("@tamagui/core");
|
|
41
42
|
var import_portal = require("@tamagui/portal");
|
|
42
43
|
var import_react = __toESM(require("react"), 1);
|
|
43
|
-
var import_react_native = require("react-native");
|
|
44
44
|
var import_contexts = require("./contexts.native.js");
|
|
45
45
|
var import_constants2 = require("./constants.native.js");
|
|
46
|
-
var import_GestureDetectorWrapper = require("./GestureDetectorWrapper.native.js");
|
|
47
46
|
var import_gestureState = require("./gestureState.native.js");
|
|
47
|
+
var import_SheetDragSurface = require("./SheetDragSurface.native.js");
|
|
48
|
+
var import_stableViewportHeight = require("./stableViewportHeight.native.js");
|
|
48
49
|
var import_GestureSheetContext = require("./GestureSheetContext.native.js");
|
|
49
50
|
var import_helpers = require("./helpers.native.js");
|
|
50
51
|
var import_keyboardAvoidance = require("./keyboardAvoidance.native.js");
|
|
@@ -65,11 +66,6 @@ var rnghRootStyleClosed = {
|
|
|
65
66
|
height: 0
|
|
66
67
|
};
|
|
67
68
|
var sheetEscapeLayers = [];
|
|
68
|
-
var relativeDimensionTo = import_constants.isWeb ? "window" : "screen";
|
|
69
|
-
function getStableViewportHeight() {
|
|
70
|
-
if (import_constants.isWeb && typeof window !== "undefined") return (0, import_webViewport.getStableLayoutViewportHeight)();
|
|
71
|
-
return import_react_native.Dimensions.get(relativeDimensionTo).height;
|
|
72
|
-
}
|
|
73
69
|
var SheetImplementationCustom = (0, import_core.createRefComponent)(function SheetImplementationCustom2(props, forwardedRef) {
|
|
74
70
|
var parentSheet = import_react.default.useContext(import_contexts.ParentSheetContext);
|
|
75
71
|
var safeAreaInsets = (0, import_useSafeAreaInsets.useSafeAreaInsets)();
|
|
@@ -86,18 +82,21 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
86
82
|
var ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef, providerProps.contentRef);
|
|
87
83
|
var animationDriver = (0, import_core.useAnimationDriver)();
|
|
88
84
|
var transitionConfig = (function() {
|
|
89
|
-
var
|
|
85
|
+
var _getTransitionResolver, _resolved_all;
|
|
90
86
|
if (transitionConfigProp) return transitionConfigProp;
|
|
91
|
-
var
|
|
92
|
-
var
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
87
|
+
var resolved = transition ? (_getTransitionResolver = (0, import_transitionResolver.getTransitionResolver)()) === null || _getTransitionResolver === void 0 ? void 0 : _getTransitionResolver.resolve(transition, { animations: animationDriver.animations }) : null;
|
|
88
|
+
var timing = resolved === null || resolved === void 0 ? void 0 : (_resolved_all = resolved.all) === null || _resolved_all === void 0 ? void 0 : _resolved_all.timing;
|
|
89
|
+
if (!timing) return null;
|
|
90
|
+
if (timing.kind === "timing") return {
|
|
91
|
+
type: "timing",
|
|
92
|
+
duration: timing.durationMs
|
|
93
|
+
};
|
|
94
|
+
return {
|
|
95
|
+
type: "spring",
|
|
96
|
+
stiffness: timing.stiffness,
|
|
97
|
+
damping: timing.damping,
|
|
98
|
+
mass: timing.mass
|
|
99
|
+
};
|
|
101
100
|
})();
|
|
102
101
|
var [isShowingInnerSheet, setIsShowingInnerSheet] = import_react.default.useState(false);
|
|
103
102
|
var shouldHideParentSheet = !import_constants.isWeb && modal && isShowingInnerSheet && (0, import_portal.needsPortalRepropagation)();
|
|
@@ -121,7 +120,7 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
121
120
|
isKeyboardVisible,
|
|
122
121
|
frameSize
|
|
123
122
|
]);
|
|
124
|
-
var effScreenSize = isWebKbSheet ? getStableViewportHeight() : screenSize;
|
|
123
|
+
var effScreenSize = isWebKbSheet ? (0, import_stableViewportHeight.getStableViewportHeight)() : screenSize;
|
|
125
124
|
var effectiveFrameSize = open ? frameSize : stableFrameSize.current || frameSize;
|
|
126
125
|
var positions = import_react.default.useMemo(function() {
|
|
127
126
|
return snapPoints.map(function(point) {
|
|
@@ -326,15 +325,11 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
326
325
|
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
327
326
|
if (hasntMeasured && screenSize && frameSize) {
|
|
328
327
|
at.current = screenSize;
|
|
329
|
-
animatedNumber.setValue(screenSize, {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
setTimeout(function() {
|
|
335
|
-
setDisableAnimation(false);
|
|
336
|
-
}, 10);
|
|
337
|
-
});
|
|
328
|
+
animatedNumber.setValue(screenSize, { type: "direct" });
|
|
329
|
+
syncAnimatedPosition(screenSize);
|
|
330
|
+
setTimeout(function() {
|
|
331
|
+
setDisableAnimation(false);
|
|
332
|
+
}, 10);
|
|
338
333
|
return;
|
|
339
334
|
}
|
|
340
335
|
if (disableAnimation) return;
|
|
@@ -371,10 +366,10 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
371
366
|
var disableDrag = (_props_disableDrag = props.disableDrag) !== null && _props_disableDrag !== void 0 ? _props_disableDrag : controller === null || controller === void 0 ? void 0 : controller.disableDrag;
|
|
372
367
|
(0, import_core.useThemeName)();
|
|
373
368
|
var [blockPan, setBlockPan] = import_react.default.useState(false);
|
|
374
|
-
var
|
|
375
|
-
if (disableDrag) return;
|
|
376
|
-
if (!frameSize) return;
|
|
377
|
-
if (isShowingInnerSheet) return;
|
|
369
|
+
var panConfig = import_react.default.useMemo(function() {
|
|
370
|
+
if (disableDrag) return null;
|
|
371
|
+
if (!frameSize) return null;
|
|
372
|
+
if (isShowingInnerSheet) return null;
|
|
378
373
|
var minY = activePositions[0];
|
|
379
374
|
scrollBridge.paneMinY = minY;
|
|
380
375
|
var startY = at.current;
|
|
@@ -456,7 +451,7 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
456
451
|
setPosition(positionIndex);
|
|
457
452
|
animateTo(positionIndex);
|
|
458
453
|
};
|
|
459
|
-
return
|
|
454
|
+
return {
|
|
460
455
|
onMoveShouldSetPanResponder: onMoveShouldSet,
|
|
461
456
|
onPanResponderTerminationRequest: function() {
|
|
462
457
|
return false;
|
|
@@ -473,7 +468,7 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
473
468
|
onPanResponderEnd: finish,
|
|
474
469
|
onPanResponderTerminate: finish,
|
|
475
470
|
onPanResponderRelease: finish
|
|
476
|
-
}
|
|
471
|
+
};
|
|
477
472
|
}, [
|
|
478
473
|
disableDrag,
|
|
479
474
|
isShowingInnerSheet,
|
|
@@ -557,14 +552,14 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
557
552
|
if (!open && stableFrameSize.current !== 0) return;
|
|
558
553
|
var layoutHeight = (_e_nativeEvent = e.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.layout.height;
|
|
559
554
|
if (ignoreLayoutForKeyboard() && frameSize > 0) return;
|
|
560
|
-
var next = modal ? Math.min(layoutHeight, getStableViewportHeight()) : layoutHeight;
|
|
555
|
+
var next = modal ? Math.min(layoutHeight, (0, import_stableViewportHeight.getStableViewportHeight)()) : layoutHeight;
|
|
561
556
|
if (!next) return;
|
|
562
557
|
setFrameSize(Math.round(next));
|
|
563
558
|
});
|
|
564
559
|
var handleMaxContentViewLayout = import_react.default.useCallback(function(e) {
|
|
565
560
|
var _e_nativeEvent;
|
|
566
561
|
if (ignoreLayoutForKeyboard() && screenSize > 0) return;
|
|
567
|
-
var next = Math.min((_e_nativeEvent = e.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.layout.height, getStableViewportHeight());
|
|
562
|
+
var next = Math.min((_e_nativeEvent = e.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.layout.height, (0, import_stableViewportHeight.getStableViewportHeight)());
|
|
568
563
|
if (!next) return;
|
|
569
564
|
setMaxContentSize(Math.round(next));
|
|
570
565
|
}, [ignoreLayoutForKeyboard, screenSize]);
|
|
@@ -627,16 +622,11 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
627
622
|
children: shouldHideParentSheet || !open ? null : overlayChildren
|
|
628
623
|
})
|
|
629
624
|
}),
|
|
630
|
-
snapPointsMode !== "percent" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
left: 0,
|
|
636
|
-
right: 0,
|
|
637
|
-
bottom: 0,
|
|
638
|
-
pointerEvents: "none"
|
|
639
|
-
},
|
|
625
|
+
snapPointsMode !== "percent" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.View, {
|
|
626
|
+
opacity: 0,
|
|
627
|
+
position: "absolute",
|
|
628
|
+
inset: 0,
|
|
629
|
+
pointerEvents: "none",
|
|
640
630
|
onLayout: handleMaxContentViewLayout
|
|
641
631
|
}),
|
|
642
632
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedView, {
|
|
@@ -653,17 +643,10 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
653
643
|
...applyHidden && { display: "none" },
|
|
654
644
|
...(shouldHideParentSheet || !open) && { pointerEvents: "none" }
|
|
655
645
|
}, animatedStyle],
|
|
656
|
-
children:
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
661
|
-
...panResponder === null || panResponder === void 0 ? void 0 : panResponder.panHandlers,
|
|
662
|
-
style: {
|
|
663
|
-
flex: 1,
|
|
664
|
-
width: "100%",
|
|
665
|
-
height: "100%"
|
|
666
|
-
},
|
|
646
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SheetDragSurface.SheetDragSurface, {
|
|
647
|
+
gestureHandlerEnabled,
|
|
648
|
+
panGesture,
|
|
649
|
+
panConfig,
|
|
667
650
|
children: animatedChildren
|
|
668
651
|
})
|
|
669
652
|
})
|
|
@@ -685,13 +668,14 @@ var SheetImplementationCustom = (0, import_core.createRefComponent)(function She
|
|
|
685
668
|
}
|
|
686
669
|
var shouldMountChildren = unmountChildrenWhenHidden ? !isFullyClosed : true;
|
|
687
670
|
if (modal) {
|
|
671
|
+
if (!shouldMountChildren) return null;
|
|
688
672
|
var RNGHRoot = (0, import_gestureState.getGestureHandlerState)().RootView;
|
|
689
|
-
var mountedContents =
|
|
673
|
+
var mountedContents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ContainerComponent, { children: contents });
|
|
690
674
|
var modalContents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, {
|
|
691
675
|
stackZIndex: zIndex,
|
|
692
676
|
hidden: !isVisuallyActive,
|
|
693
677
|
...portalProps,
|
|
694
|
-
children:
|
|
678
|
+
children: RNGHRoot ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RNGHRoot, {
|
|
695
679
|
style: open ? rnghRootStyleOpen : rnghRootStyleClosed,
|
|
696
680
|
children: mountedContents
|
|
697
681
|
}) : mountedContents
|