@yahoo/uds-mobile 2.7.1 → 2.9.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/_virtual/_rolldown/runtime.cjs +12 -22
- package/dist/_virtual/_rolldown/runtime.js +6 -11
- package/dist/bin/fixtures/dist/index.mjs +17 -20
- package/dist/bin/fonts/dist/index.mjs +22 -13
- package/dist/bin/generateTheme.mjs +2 -5
- package/dist/bin/mobile/scripts/utils/configToRNMappings.mjs +1 -2
- package/dist/bin/modes/dist/index.mjs +1 -2
- package/dist/bin/palette/dist/index.mjs +15 -4
- package/dist/bin/uds-mobile.mjs +1 -3
- package/dist/components/AndroidBackHandler.cjs +3 -5
- package/dist/components/AndroidBackHandler.js +1 -2
- package/dist/components/AndroidBackHandler.js.map +1 -1
- package/dist/components/Avatar.cjs +6 -8
- package/dist/components/Avatar.d.cts +2 -2
- package/dist/components/Avatar.d.cts.map +1 -1
- package/dist/components/Avatar.d.ts +2 -2
- package/dist/components/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar.js +1 -2
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/Badge.cjs +6 -8
- package/dist/components/Badge.d.cts +2 -2
- package/dist/components/Badge.d.cts.map +1 -1
- package/dist/components/Badge.d.ts +2 -2
- package/dist/components/Badge.d.ts.map +1 -1
- package/dist/components/Badge.js +1 -2
- package/dist/components/Badge.js.map +1 -1
- package/dist/components/Banner/Banner.cjs +7 -9
- package/dist/components/Banner/Banner.d.cts +2 -2
- package/dist/components/Banner/Banner.d.cts.map +1 -1
- package/dist/components/Banner/Banner.d.ts +2 -2
- package/dist/components/Banner/Banner.d.ts.map +1 -1
- package/dist/components/Banner/Banner.js +1 -2
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Banner/BannerContent.cjs +3 -5
- package/dist/components/Banner/BannerContent.d.cts +2 -2
- package/dist/components/Banner/BannerContent.d.cts.map +1 -1
- package/dist/components/Banner/BannerContent.d.ts +2 -2
- package/dist/components/Banner/BannerContent.d.ts.map +1 -1
- package/dist/components/Banner/BannerContent.js +1 -2
- package/dist/components/Banner/BannerContent.js.map +1 -1
- package/dist/components/Banner/BannerDescription.cjs +4 -6
- package/dist/components/Banner/BannerDescription.d.cts +2 -2
- package/dist/components/Banner/BannerDescription.d.cts.map +1 -1
- package/dist/components/Banner/BannerDescription.d.ts +2 -2
- package/dist/components/Banner/BannerDescription.d.ts.map +1 -1
- package/dist/components/Banner/BannerDescription.js +1 -2
- package/dist/components/Banner/BannerDescription.js.map +1 -1
- package/dist/components/Banner/BannerTitle.cjs +4 -6
- package/dist/components/Banner/BannerTitle.d.cts +2 -2
- package/dist/components/Banner/BannerTitle.d.cts.map +1 -1
- package/dist/components/Banner/BannerTitle.d.ts +2 -2
- package/dist/components/Banner/BannerTitle.d.ts.map +1 -1
- package/dist/components/Banner/BannerTitle.js +1 -2
- package/dist/components/Banner/BannerTitle.js.map +1 -1
- package/dist/components/Banner/index.cjs +6 -7
- package/dist/components/Banner/index.js +1 -2
- package/dist/components/Banner/utils.cjs +3 -5
- package/dist/components/Banner/utils.js +1 -2
- package/dist/components/Banner/utils.js.map +1 -1
- package/dist/components/BlurTarget.cjs +3 -5
- package/dist/components/BlurTarget.d.cts +2 -2
- package/dist/components/BlurTarget.d.cts.map +1 -1
- package/dist/components/BlurTarget.d.ts +2 -2
- package/dist/components/BlurTarget.d.ts.map +1 -1
- package/dist/components/BlurTarget.js +1 -2
- package/dist/components/BlurTarget.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +16 -18
- package/dist/components/BottomSheet/BottomSheet.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +1 -2
- package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetContent.cjs +4 -6
- package/dist/components/BottomSheet/BottomSheetContent.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetContent.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetContent.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetContent.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetContent.js +1 -2
- package/dist/components/BottomSheet/BottomSheetContent.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetDismiss.cjs +4 -6
- package/dist/components/BottomSheet/BottomSheetDismiss.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetDismiss.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetDismiss.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetDismiss.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetDismiss.js +1 -2
- package/dist/components/BottomSheet/BottomSheetDismiss.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetHandle.cjs +5 -7
- package/dist/components/BottomSheet/BottomSheetHandle.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetHandle.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetHandle.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetHandle.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetHandle.js +1 -2
- package/dist/components/BottomSheet/BottomSheetHandle.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetHeader.cjs +4 -6
- package/dist/components/BottomSheet/BottomSheetHeader.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetHeader.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetHeader.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetHeader.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetHeader.js +1 -2
- package/dist/components/BottomSheet/BottomSheetHeader.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetInternalProvider.cjs +3 -5
- package/dist/components/BottomSheet/BottomSheetInternalProvider.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetInternalProvider.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetInternalProvider.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetInternalProvider.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetInternalProvider.js +1 -2
- package/dist/components/BottomSheet/BottomSheetInternalProvider.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetProvider.cjs +4 -6
- package/dist/components/BottomSheet/BottomSheetProvider.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetProvider.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetProvider.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetProvider.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetProvider.js +1 -2
- package/dist/components/BottomSheet/BottomSheetProvider.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetTrigger.cjs +4 -6
- package/dist/components/BottomSheet/BottomSheetTrigger.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetTrigger.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetTrigger.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetTrigger.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetTrigger.js +1 -2
- package/dist/components/BottomSheet/BottomSheetTrigger.js.map +1 -1
- package/dist/components/BottomSheet/index.cjs +10 -11
- package/dist/components/BottomSheet/index.js +1 -2
- package/dist/components/BottomSheet/useBottomSheetDrag.cjs +4 -6
- package/dist/components/BottomSheet/useBottomSheetDrag.js +1 -2
- package/dist/components/BottomSheet/useBottomSheetDrag.js.map +1 -1
- package/dist/components/BottomSheet/useBottomSheetScroll.cjs +4 -6
- package/dist/components/BottomSheet/useBottomSheetScroll.d.cts +5 -5
- package/dist/components/BottomSheet/useBottomSheetScroll.d.ts +5 -5
- package/dist/components/BottomSheet/useBottomSheetScroll.js +1 -2
- package/dist/components/BottomSheet/useBottomSheetScroll.js.map +1 -1
- package/dist/components/BottomSheet/useBottomSheetSnapModel.cjs +6 -8
- package/dist/components/BottomSheet/useBottomSheetSnapModel.js +3 -4
- package/dist/components/BottomSheet/useBottomSheetSnapModel.js.map +1 -1
- package/dist/components/BottomSheet/useBottomSheetStore.cjs +3 -5
- package/dist/components/BottomSheet/useBottomSheetStore.js +1 -2
- package/dist/components/BottomSheet/useBottomSheetStore.js.map +1 -1
- package/dist/components/BottomSheet/useExpansionMargins.cjs +4 -6
- package/dist/components/BottomSheet/useExpansionMargins.js +1 -2
- package/dist/components/BottomSheet/useExpansionMargins.js.map +1 -1
- package/dist/components/BottomSheet/useKeyboardAvoidance.cjs +3 -5
- package/dist/components/BottomSheet/useKeyboardAvoidance.js +1 -2
- package/dist/components/BottomSheet/useKeyboardAvoidance.js.map +1 -1
- package/dist/components/BottomSheet/utils.cjs +2 -4
- package/dist/components/BottomSheet/utils.js +1 -1
- package/dist/components/BottomSheet/utils.js.map +1 -1
- package/dist/components/Box.cjs +3 -5
- package/dist/components/Box.d.cts +2 -2
- package/dist/components/Box.d.cts.map +1 -1
- package/dist/components/Box.d.ts +2 -2
- package/dist/components/Box.d.ts.map +1 -1
- package/dist/components/Box.js +1 -2
- package/dist/components/Box.js.map +1 -1
- package/dist/components/Button.cjs +8 -10
- package/dist/components/Button.d.cts +2 -2
- package/dist/components/Button.d.cts.map +1 -1
- package/dist/components/Button.d.ts +2 -2
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +1 -2
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Checkbox.cjs +9 -11
- package/dist/components/Checkbox.d.cts +2 -2
- package/dist/components/Checkbox.d.cts.map +1 -1
- package/dist/components/Checkbox.d.ts +2 -2
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +1 -2
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/Chip.cjs +7 -9
- package/dist/components/Chip.d.cts +2 -2
- package/dist/components/Chip.d.cts.map +1 -1
- package/dist/components/Chip.d.ts +2 -2
- package/dist/components/Chip.d.ts.map +1 -1
- package/dist/components/Chip.js +1 -2
- package/dist/components/Chip.js.map +1 -1
- package/dist/components/HStack.cjs +4 -6
- package/dist/components/HStack.d.cts +2 -2
- package/dist/components/HStack.d.cts.map +1 -1
- package/dist/components/HStack.d.ts +2 -2
- package/dist/components/HStack.d.ts.map +1 -1
- package/dist/components/HStack.js +1 -2
- package/dist/components/HStack.js.map +1 -1
- package/dist/components/Icon.cjs +3 -5
- package/dist/components/Icon.d.cts +4 -4
- package/dist/components/Icon.d.cts.map +1 -1
- package/dist/components/Icon.d.ts +4 -4
- package/dist/components/Icon.d.ts.map +1 -1
- package/dist/components/Icon.js +1 -2
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/IconButton.cjs +7 -9
- package/dist/components/IconButton.d.cts +2 -2
- package/dist/components/IconButton.d.cts.map +1 -1
- package/dist/components/IconButton.d.ts +2 -2
- package/dist/components/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton.js +1 -2
- package/dist/components/IconButton.js.map +1 -1
- package/dist/components/IconSlot.cjs +4 -6
- package/dist/components/IconSlot.d.cts +2 -2
- package/dist/components/IconSlot.d.cts.map +1 -1
- package/dist/components/IconSlot.d.ts +2 -2
- package/dist/components/IconSlot.d.ts.map +1 -1
- package/dist/components/IconSlot.js +1 -2
- package/dist/components/IconSlot.js.map +1 -1
- package/dist/components/Image.cjs +3 -5
- package/dist/components/Image.d.cts +2 -2
- package/dist/components/Image.d.cts.map +1 -1
- package/dist/components/Image.d.ts +2 -2
- package/dist/components/Image.d.ts.map +1 -1
- package/dist/components/Image.js +1 -2
- package/dist/components/Image.js.map +1 -1
- package/dist/components/Input.cjs +7 -9
- package/dist/components/Input.d.cts +2 -2
- package/dist/components/Input.d.cts.map +1 -1
- package/dist/components/Input.d.ts +2 -2
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.js +1 -2
- package/dist/components/Input.js.map +1 -1
- package/dist/components/Link.cjs +4 -6
- package/dist/components/Link.d.cts +2 -2
- package/dist/components/Link.d.cts.map +1 -1
- package/dist/components/Link.d.ts +2 -2
- package/dist/components/Link.d.ts.map +1 -1
- package/dist/components/Link.js +1 -2
- package/dist/components/Link.js.map +1 -1
- package/dist/components/Pressable.cjs +3 -5
- package/dist/components/Pressable.d.cts +4 -4
- package/dist/components/Pressable.d.cts.map +1 -1
- package/dist/components/Pressable.d.ts +4 -4
- package/dist/components/Pressable.d.ts.map +1 -1
- package/dist/components/Pressable.js +1 -2
- package/dist/components/Pressable.js.map +1 -1
- package/dist/components/Radio.cjs +8 -10
- package/dist/components/Radio.d.cts +2 -2
- package/dist/components/Radio.d.cts.map +1 -1
- package/dist/components/Radio.d.ts +2 -2
- package/dist/components/Radio.d.ts.map +1 -1
- package/dist/components/Radio.js +1 -2
- package/dist/components/Radio.js.map +1 -1
- package/dist/components/Screen.cjs +5 -7
- package/dist/components/Screen.d.cts +2 -2
- package/dist/components/Screen.d.cts.map +1 -1
- package/dist/components/Screen.d.ts +2 -2
- package/dist/components/Screen.d.ts.map +1 -1
- package/dist/components/Screen.js +1 -2
- package/dist/components/Screen.js.map +1 -1
- package/dist/components/Scrim.cjs +4 -6
- package/dist/components/Scrim.d.cts +2 -2
- package/dist/components/Scrim.d.cts.map +1 -1
- package/dist/components/Scrim.d.ts +2 -2
- package/dist/components/Scrim.d.ts.map +1 -1
- package/dist/components/Scrim.js +1 -2
- package/dist/components/Scrim.js.map +1 -1
- package/dist/components/Switch.cjs +6 -8
- package/dist/components/Switch.d.cts +2 -2
- package/dist/components/Switch.d.cts.map +1 -1
- package/dist/components/Switch.d.ts +2 -2
- package/dist/components/Switch.d.ts.map +1 -1
- package/dist/components/Switch.js +1 -2
- package/dist/components/Switch.js.map +1 -1
- package/dist/components/Text.cjs +3 -5
- package/dist/components/Text.d.cts +2 -2
- package/dist/components/Text.d.cts.map +1 -1
- package/dist/components/Text.d.ts +2 -2
- package/dist/components/Text.d.ts.map +1 -1
- package/dist/components/Text.js +1 -2
- package/dist/components/Text.js.map +1 -1
- package/dist/components/UDSProvider.cjs +4 -6
- package/dist/components/UDSProvider.d.cts +2 -2
- package/dist/components/UDSProvider.d.cts.map +1 -1
- package/dist/components/UDSProvider.d.ts +2 -2
- package/dist/components/UDSProvider.d.ts.map +1 -1
- package/dist/components/UDSProvider.js +1 -2
- package/dist/components/UDSProvider.js.map +1 -1
- package/dist/components/VStack.cjs +4 -6
- package/dist/components/VStack.d.cts +2 -2
- package/dist/components/VStack.d.cts.map +1 -1
- package/dist/components/VStack.d.ts +2 -2
- package/dist/components/VStack.d.ts.map +1 -1
- package/dist/components/VStack.js +1 -2
- package/dist/components/VStack.js.map +1 -1
- package/dist/jest/index.cjs +8 -10
- package/dist/jest/index.js +1 -2
- package/dist/jest/index.js.map +1 -1
- package/dist/jest/mocks/icons.cjs +8 -11
- package/dist/jest/mocks/icons.js +1 -2
- package/dist/jest/mocks/icons.js.map +1 -1
- package/dist/jest/mocks/react-native.cjs +6 -5
- package/dist/jest/mocks/react-native.js +1 -2
- package/dist/jest/mocks/react-native.js.map +1 -1
- package/dist/jest/mocks/reanimated.cjs +11 -10
- package/dist/jest/mocks/reanimated.js +1 -2
- package/dist/jest/mocks/reanimated.js.map +1 -1
- package/dist/jest/mocks/styles.cjs +8 -11
- package/dist/jest/mocks/styles.js +1 -2
- package/dist/jest/mocks/styles.js.map +1 -1
- package/dist/jest/mocks/svg.cjs +11 -10
- package/dist/jest/mocks/svg.js +2 -3
- package/dist/jest/mocks/svg.js.map +1 -1
- package/dist/jest/mocks/unistyles.cjs +8 -11
- package/dist/jest/mocks/unistyles.js +1 -2
- package/dist/jest/mocks/unistyles.js.map +1 -1
- package/dist/jest/setup.cjs +6 -8
- package/dist/jest/setup.js +1 -2
- package/dist/jest/setup.js.map +1 -1
- package/dist/motion-tokens/dist/index.cjs +1 -3
- package/dist/motion-tokens/dist/index.js +1 -1
- package/dist/motion-tokens/dist/index.js.map +1 -1
- package/dist/motion.cjs +3 -5
- package/dist/motion.js +1 -2
- package/dist/motion.js.map +1 -1
- package/dist/native/UDSScreenCornerRadiusModule.cjs +2 -4
- package/dist/native/UDSScreenCornerRadiusModule.js +1 -1
- package/dist/portal.cjs +3 -5
- package/dist/portal.d.cts +2 -2
- package/dist/portal.d.cts.map +1 -1
- package/dist/portal.d.ts +2 -2
- package/dist/portal.d.ts.map +1 -1
- package/dist/portal.js +1 -2
- package/dist/portal.js.map +1 -1
- package/fonts/uds-icons.ttf +0 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import * as react_native_reanimated0 from "react-native-reanimated";
|
|
2
|
+
import * as _$react_native_reanimated0 from "react-native-reanimated";
|
|
3
3
|
import Animated from "react-native-reanimated";
|
|
4
|
-
import * as react_native_gesture_handler_lib_typescript_handlers_gestures_nativeGesture0 from "react-native-gesture-handler/lib/typescript/handlers/gestures/nativeGesture";
|
|
4
|
+
import * as _$react_native_gesture_handler_lib_typescript_handlers_gestures_nativeGesture0 from "react-native-gesture-handler/lib/typescript/handlers/gestures/nativeGesture";
|
|
5
5
|
|
|
6
6
|
//#region src/components/BottomSheet/useBottomSheetScroll.d.ts
|
|
7
7
|
/**
|
|
@@ -35,9 +35,9 @@ import * as react_native_gesture_handler_lib_typescript_handlers_gestures_native
|
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
declare function useBottomSheetScroll(): {
|
|
38
|
-
scrollHandler: react_native_reanimated0.ScrollHandlerProcessed<Record<string, unknown>>;
|
|
39
|
-
scrollableRef: react_native_reanimated0.AnimatedRef<Animated.ScrollView>;
|
|
40
|
-
nativeGesture: react_native_gesture_handler_lib_typescript_handlers_gestures_nativeGesture0.NativeGesture;
|
|
38
|
+
scrollHandler: _$react_native_reanimated0.ScrollHandlerProcessed<Record<string, unknown>>;
|
|
39
|
+
scrollableRef: _$react_native_reanimated0.AnimatedRef<Animated.ScrollView>;
|
|
40
|
+
nativeGesture: _$react_native_gesture_handler_lib_typescript_handlers_gestures_nativeGesture0.NativeGesture;
|
|
41
41
|
animatedProps: Partial<{
|
|
42
42
|
scrollEnabled: boolean;
|
|
43
43
|
decelerationRate: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import * as react_native_reanimated0 from "react-native-reanimated";
|
|
2
|
+
import * as _$react_native_reanimated0 from "react-native-reanimated";
|
|
3
3
|
import Animated from "react-native-reanimated";
|
|
4
|
-
import * as react_native_gesture_handler_lib_typescript_handlers_gestures_nativeGesture0 from "react-native-gesture-handler/lib/typescript/handlers/gestures/nativeGesture";
|
|
4
|
+
import * as _$react_native_gesture_handler_lib_typescript_handlers_gestures_nativeGesture0 from "react-native-gesture-handler/lib/typescript/handlers/gestures/nativeGesture";
|
|
5
5
|
|
|
6
6
|
//#region src/components/BottomSheet/useBottomSheetScroll.d.ts
|
|
7
7
|
/**
|
|
@@ -35,9 +35,9 @@ import * as react_native_gesture_handler_lib_typescript_handlers_gestures_native
|
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
declare function useBottomSheetScroll(): {
|
|
38
|
-
scrollHandler: react_native_reanimated0.ScrollHandlerProcessed<Record<string, unknown>>;
|
|
39
|
-
scrollableRef: react_native_reanimated0.AnimatedRef<Animated.ScrollView>;
|
|
40
|
-
nativeGesture: react_native_gesture_handler_lib_typescript_handlers_gestures_nativeGesture0.NativeGesture;
|
|
38
|
+
scrollHandler: _$react_native_reanimated0.ScrollHandlerProcessed<Record<string, unknown>>;
|
|
39
|
+
scrollableRef: _$react_native_reanimated0.AnimatedRef<Animated.ScrollView>;
|
|
40
|
+
nativeGesture: _$react_native_gesture_handler_lib_typescript_handlers_gestures_nativeGesture0.NativeGesture;
|
|
41
41
|
animatedProps: Partial<{
|
|
42
42
|
scrollEnabled: boolean;
|
|
43
43
|
decelerationRate: number;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { useBottomSheetInternalContext } from "./BottomSheetInternalProvider.js";
|
|
3
3
|
import { useAnimatedProps, useAnimatedRef, useAnimatedScrollHandler } from "react-native-reanimated";
|
|
4
4
|
import { Gesture } from "react-native-gesture-handler";
|
|
5
|
-
|
|
6
5
|
//#region src/components/BottomSheet/useBottomSheetScroll.ts
|
|
7
6
|
/**
|
|
8
7
|
* Low-level hook for consumers who need a custom scrollable (e.g. `FlatList`,
|
|
@@ -54,7 +53,7 @@ function useBottomSheetScroll() {
|
|
|
54
53
|
animatedProps
|
|
55
54
|
};
|
|
56
55
|
}
|
|
57
|
-
|
|
58
56
|
//#endregion
|
|
59
57
|
export { useBottomSheetScroll };
|
|
58
|
+
|
|
60
59
|
//# sourceMappingURL=useBottomSheetScroll.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBottomSheetScroll.js","names":[],"sources":["../../../src/components/BottomSheet/useBottomSheetScroll.ts"],"sourcesContent":["import { Gesture } from 'react-native-gesture-handler';\nimport type Animated from 'react-native-reanimated';\nimport {\n useAnimatedProps,\n useAnimatedRef,\n useAnimatedScrollHandler,\n} from 'react-native-reanimated';\n\nimport { useBottomSheetInternalContext } from './BottomSheetInternalProvider';\n\n/**\n * Low-level hook for consumers who need a custom scrollable (e.g. `FlatList`,\n * `SectionList`) instead of `<BottomSheetContent>`.\n *\n * Returns all the props needed to wire a scrollable into the sheet's\n * scroll-lock coordination (scrollEnabled toggle, offset tracking, gesture composition).\n *\n * Must be rendered inside a `<BottomSheet>`.\n *\n * @throws If used outside a `<BottomSheet>` component tree.\n *\n * @returns `{ scrollHandler, scrollableRef, nativeGesture, animatedProps }`\n *\n * @example\n * ```tsx\n * const { scrollHandler, scrollableRef, nativeGesture, animatedProps } = useBottomSheetScroll();\n *\n * <GestureDetector gesture={nativeGesture}>\n * <Animated.FlatList\n * ref={scrollableRef}\n * onScroll={scrollHandler}\n * scrollEventThrottle={16}\n * animatedProps={animatedProps}\n * bounces={false}\n * overScrollMode=\"never\"\n * {...otherProps}\n * />\n * </GestureDetector>\n * ```\n */\nfunction useBottomSheetScroll() {\n const internalCtx = useBottomSheetInternalContext();\n const scrollableRef = useAnimatedRef<Animated.ScrollView>();\n\n const animatedProps = useAnimatedProps(() => ({\n scrollEnabled: !internalCtx?.scrollLocked.value,\n decelerationRate: internalCtx?.scrollLocked.value ? 0 : 0.998,\n }));\n\n const scrollHandler = useAnimatedScrollHandler({\n onScroll: (event) => {\n if (!internalCtx) {\n return;\n }\n internalCtx.scrollOffsetY.value = event.contentOffset.y;\n },\n });\n\n if (!internalCtx) {\n throw new Error('useBottomSheetScroll must be used inside a BottomSheet component.');\n }\n\n const { panGestureRef } = internalCtx;\n\n const nativeGesture = Gesture.Native().simultaneousWithExternalGesture(panGestureRef);\n\n return {\n scrollHandler,\n scrollableRef,\n nativeGesture,\n animatedProps,\n };\n}\n\nexport { useBottomSheetScroll };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useBottomSheetScroll.js","names":[],"sources":["../../../src/components/BottomSheet/useBottomSheetScroll.ts"],"sourcesContent":["import { Gesture } from 'react-native-gesture-handler';\nimport type Animated from 'react-native-reanimated';\nimport {\n useAnimatedProps,\n useAnimatedRef,\n useAnimatedScrollHandler,\n} from 'react-native-reanimated';\n\nimport { useBottomSheetInternalContext } from './BottomSheetInternalProvider';\n\n/**\n * Low-level hook for consumers who need a custom scrollable (e.g. `FlatList`,\n * `SectionList`) instead of `<BottomSheetContent>`.\n *\n * Returns all the props needed to wire a scrollable into the sheet's\n * scroll-lock coordination (scrollEnabled toggle, offset tracking, gesture composition).\n *\n * Must be rendered inside a `<BottomSheet>`.\n *\n * @throws If used outside a `<BottomSheet>` component tree.\n *\n * @returns `{ scrollHandler, scrollableRef, nativeGesture, animatedProps }`\n *\n * @example\n * ```tsx\n * const { scrollHandler, scrollableRef, nativeGesture, animatedProps } = useBottomSheetScroll();\n *\n * <GestureDetector gesture={nativeGesture}>\n * <Animated.FlatList\n * ref={scrollableRef}\n * onScroll={scrollHandler}\n * scrollEventThrottle={16}\n * animatedProps={animatedProps}\n * bounces={false}\n * overScrollMode=\"never\"\n * {...otherProps}\n * />\n * </GestureDetector>\n * ```\n */\nfunction useBottomSheetScroll() {\n const internalCtx = useBottomSheetInternalContext();\n const scrollableRef = useAnimatedRef<Animated.ScrollView>();\n\n const animatedProps = useAnimatedProps(() => ({\n scrollEnabled: !internalCtx?.scrollLocked.value,\n decelerationRate: internalCtx?.scrollLocked.value ? 0 : 0.998,\n }));\n\n const scrollHandler = useAnimatedScrollHandler({\n onScroll: (event) => {\n if (!internalCtx) {\n return;\n }\n internalCtx.scrollOffsetY.value = event.contentOffset.y;\n },\n });\n\n if (!internalCtx) {\n throw new Error('useBottomSheetScroll must be used inside a BottomSheet component.');\n }\n\n const { panGestureRef } = internalCtx;\n\n const nativeGesture = Gesture.Native().simultaneousWithExternalGesture(panGestureRef);\n\n return {\n scrollHandler,\n scrollableRef,\n nativeGesture,\n animatedProps,\n };\n}\n\nexport { useBottomSheetScroll };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAS,uBAAuB;CAC9B,MAAM,cAAc,+BAA+B;CACnD,MAAM,gBAAgB,gBAAqC;CAE3D,MAAM,gBAAgB,wBAAwB;EAC5C,eAAe,CAAC,aAAa,aAAa;EAC1C,kBAAkB,aAAa,aAAa,QAAQ,IAAI;EACzD,EAAE;CAEH,MAAM,gBAAgB,yBAAyB,EAC7C,WAAW,UAAU;AACnB,MAAI,CAAC,YACH;AAEF,cAAY,cAAc,QAAQ,MAAM,cAAc;IAEzD,CAAC;AAEF,KAAI,CAAC,YACH,OAAM,IAAI,MAAM,oEAAoE;CAGtF,MAAM,EAAE,kBAAkB;AAI1B,QAAO;EACL;EACA;EACA,eALoB,QAAQ,QAAQ,CAAC,gCAAgC,cAKxD;EACb;EACD"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
3
|
-
|
|
4
|
-
const require_motion = require(
|
|
5
|
-
const require_components_BottomSheet_utils = require(
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_motion = require("../../motion.cjs");
|
|
5
|
+
const require_components_BottomSheet_utils = require("./utils.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
let react_native_reanimated = require("react-native-reanimated");
|
|
8
|
-
|
|
9
8
|
//#region src/components/BottomSheet/useBottomSheetSnapModel.ts
|
|
10
9
|
/**
|
|
11
10
|
* Spring configuration for sheet snap/close animations.
|
|
@@ -29,7 +28,7 @@ function useBottomSheetSnapModel({ snapPointsProp, height, defaultSnapPointIndex
|
|
|
29
28
|
const resolvedSnapPoints = (0, react.useMemo)(() => {
|
|
30
29
|
if (snapPointsProp?.length) return snapPointsProp;
|
|
31
30
|
if (height !== void 0) return [height];
|
|
32
|
-
return [
|
|
31
|
+
return ["40%"];
|
|
33
32
|
}, [height, snapPointsProp]);
|
|
34
33
|
const translateY = (0, react_native_reanimated.useSharedValue)(9999);
|
|
35
34
|
const activeSnapIndex = (0, react_native_reanimated.useSharedValue)(require_components_BottomSheet_utils.clampIndex(snapPointIndexProp ?? defaultSnapPointIndex, resolvedSnapPoints.length));
|
|
@@ -136,7 +135,6 @@ function useBottomSheetSnapModel({ snapPointsProp, height, defaultSnapPointIndex
|
|
|
136
135
|
])
|
|
137
136
|
};
|
|
138
137
|
}
|
|
139
|
-
|
|
140
138
|
//#endregion
|
|
141
139
|
exports.SHEET_SPRING_CONFIG = SHEET_SPRING_CONFIG;
|
|
142
|
-
exports.useBottomSheetSnapModel = useBottomSheetSnapModel;
|
|
140
|
+
exports.useBottomSheetSnapModel = useBottomSheetSnapModel;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
2
|
import { MOTION_CONFIG } from "../../motion.js";
|
|
3
|
-
import {
|
|
3
|
+
import { clampIndex, resolveHeightToPx } from "./utils.js";
|
|
4
4
|
import { useCallback, useMemo } from "react";
|
|
5
5
|
import { runOnJS, useSharedValue, withSpring } from "react-native-reanimated";
|
|
6
|
-
|
|
7
6
|
//#region src/components/BottomSheet/useBottomSheetSnapModel.ts
|
|
8
7
|
/**
|
|
9
8
|
* Spring configuration for sheet snap/close animations.
|
|
@@ -27,7 +26,7 @@ function useBottomSheetSnapModel({ snapPointsProp, height, defaultSnapPointIndex
|
|
|
27
26
|
const resolvedSnapPoints = useMemo(() => {
|
|
28
27
|
if (snapPointsProp?.length) return snapPointsProp;
|
|
29
28
|
if (height !== void 0) return [height];
|
|
30
|
-
return [
|
|
29
|
+
return ["40%"];
|
|
31
30
|
}, [height, snapPointsProp]);
|
|
32
31
|
const translateY = useSharedValue(9999);
|
|
33
32
|
const activeSnapIndex = useSharedValue(clampIndex(snapPointIndexProp ?? defaultSnapPointIndex, resolvedSnapPoints.length));
|
|
@@ -134,7 +133,7 @@ function useBottomSheetSnapModel({ snapPointsProp, height, defaultSnapPointIndex
|
|
|
134
133
|
])
|
|
135
134
|
};
|
|
136
135
|
}
|
|
137
|
-
|
|
138
136
|
//#endregion
|
|
139
137
|
export { SHEET_SPRING_CONFIG, useBottomSheetSnapModel };
|
|
138
|
+
|
|
140
139
|
//# sourceMappingURL=useBottomSheetSnapModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBottomSheetSnapModel.js","names":[],"sources":["../../../src/components/BottomSheet/useBottomSheetSnapModel.ts"],"sourcesContent":["import { useCallback, useMemo } from 'react';\nimport type { SharedValue } from 'react-native-reanimated';\nimport { runOnJS, useSharedValue, withSpring } from 'react-native-reanimated';\n\nimport { MOTION_CONFIG } from '../../motion';\nimport type { BottomSheetHeight } from './types';\nimport { clampIndex, DEFAULT_SNAP_POINT, resolveHeightToPx } from './utils';\n\n/**\n * Spring configuration for sheet snap/close animations.\n * Uses the UDS `smooth['3']` motion preset.\n */\nconst SHEET_SPRING_CONFIG = {\n damping: MOTION_CONFIG.smooth['3'].damping,\n stiffness: MOTION_CONFIG.smooth['3'].stiffness,\n mass: 1,\n} as const;\n\n/** @internal */\ninterface UseBottomSheetSnapModelParams {\n snapPointsProp?: BottomSheetHeight[];\n height?: BottomSheetHeight;\n defaultSnapPointIndex: number;\n snapPointIndexProp?: number;\n onSnapPointChange?: (index: number, height: BottomSheetHeight) => void;\n containerHeight: SharedValue<number>;\n /** Bottom inset in px (margin + safe area). */\n bottomInsetPx: number;\n /** Top safe-area inset in px — limits maximum sheet height. */\n topInsetPx: number;\n /** Horizontal margin in px (currently informational, not used in snap math). */\n sideInsetPx: number;\n /** Whether margins collapse at the max snap point. */\n fullWidthAtMaxSnap: boolean;\n /** Bottom inset at max snap when fullWidthAtMaxSnap (safe area only, no margin). */\n expandedBottomInsetPx: number;\n}\n\ninterface UseBottomSheetSnapModelResult {\n /** The resolved snap points array. */\n resolvedSnapPoints: BottomSheetHeight[];\n /** Animated translateY position of the sheet. */\n translateY: SharedValue<number>;\n /** Current active snap index. */\n activeSnapIndex: SharedValue<number>;\n /** Whether the sheet is currently animating. */\n isAnimating: SharedValue<boolean>;\n /** Compute translateY for a given snap index (worklet). */\n getTranslateYForSnap: (index: number) => number;\n /** Compute the closed translateY position (worklet). */\n getClosedTranslateY: () => number;\n /** Animate to a specific snap index. */\n animateToSnap: (index: number) => void;\n /** Animate to the closed position. Optional callback fires on JS thread when complete. */\n animateToClose: (onComplete?: () => void) => void;\n /** Animate to a specific snap index from within a worklet. */\n animateToSnapWorklet: (index: number) => void;\n /** Animate to the closed position from within a worklet. */\n animateToCloseWorklet: () => void;\n}\n\n/**\n * Manages the snap-point position model for the bottom sheet.\n *\n * Resolves snap point strings to pixel positions, provides spring-animated\n * `animateToSnap` / `animateToClose` functions for both JS and UI threads,\n * and exposes shared values for `translateY`, `activeSnapIndex`, and `isAnimating`.\n *\n * Position model: `translateY = containerHeight - snapHeightPx - bottomInsetPx`\n */\nfunction useBottomSheetSnapModel({\n snapPointsProp,\n height,\n defaultSnapPointIndex,\n snapPointIndexProp,\n onSnapPointChange,\n containerHeight,\n bottomInsetPx,\n topInsetPx,\n fullWidthAtMaxSnap,\n expandedBottomInsetPx,\n}: UseBottomSheetSnapModelParams): UseBottomSheetSnapModelResult {\n const resolvedSnapPoints = useMemo<BottomSheetHeight[]>(() => {\n if (snapPointsProp?.length) {\n return snapPointsProp;\n }\n if (height !== undefined) {\n return [height];\n }\n return [DEFAULT_SNAP_POINT];\n }, [height, snapPointsProp]);\n\n // Start off-screen (will be set to closed position on first layout).\n const translateY = useSharedValue(9999);\n const activeSnapIndex = useSharedValue(\n clampIndex(snapPointIndexProp ?? defaultSnapPointIndex, resolvedSnapPoints.length),\n );\n const isAnimating = useSharedValue(false);\n\n /**\n * Compute translateY for a snap index.\n * Position model: translateY = containerHeight - snapHeightPx - bottomInsetPx\n */\n const getTranslateYForSnap = useCallback(\n (index: number): number => {\n 'worklet';\n const clamped = clampIndex(index, resolvedSnapPoints.length);\n const sp = resolvedSnapPoints[clamped]!;\n const heightPx = resolveHeightToPx(sp, containerHeight.value);\n // At max snap with fullWidthAtMaxSnap, margins collapse so use reduced bottom inset.\n const isExpandedMaxSnap = fullWidthAtMaxSnap && clamped === resolvedSnapPoints.length - 1;\n const effectiveBottomInset = isExpandedMaxSnap ? expandedBottomInsetPx : bottomInsetPx;\n const maxHeight = containerHeight.value - effectiveBottomInset - topInsetPx;\n const clampedHeight = Math.max(0, Math.min(heightPx, maxHeight));\n return containerHeight.value - clampedHeight - effectiveBottomInset;\n },\n [\n resolvedSnapPoints,\n containerHeight,\n bottomInsetPx,\n topInsetPx,\n fullWidthAtMaxSnap,\n expandedBottomInsetPx,\n ],\n );\n\n /** Compute the closed (off-screen) translateY. */\n const getClosedTranslateY = useCallback((): number => {\n 'worklet';\n return containerHeight.value + bottomInsetPx;\n }, [containerHeight, bottomInsetPx]);\n\n /** Emit snap point change callback on the JS thread. */\n const emitSnapChange = useCallback(\n (index: number) => {\n onSnapPointChange?.(index, resolvedSnapPoints[index]!);\n },\n [onSnapPointChange, resolvedSnapPoints],\n );\n\n /** Animate to snap index — call from JS thread. */\n const animateToSnap = useCallback(\n (index: number) => {\n const clamped = clampIndex(index, resolvedSnapPoints.length);\n const targetY = getTranslateYForSnap(clamped);\n\n isAnimating.value = true;\n activeSnapIndex.value = clamped;\n translateY.value = withSpring(targetY, SHEET_SPRING_CONFIG, (finished) => {\n 'worklet';\n if (finished) {\n isAnimating.value = false;\n }\n });\n\n emitSnapChange(clamped);\n },\n [\n resolvedSnapPoints,\n getTranslateYForSnap,\n isAnimating,\n activeSnapIndex,\n translateY,\n emitSnapChange,\n ],\n );\n\n /** Animate to closed position — call from JS thread. */\n const animateToClose = useCallback(\n (onComplete?: () => void) => {\n const targetY = getClosedTranslateY();\n isAnimating.value = true;\n translateY.value = withSpring(targetY, SHEET_SPRING_CONFIG, (finished) => {\n 'worklet';\n if (finished) {\n isAnimating.value = false;\n if (onComplete) {\n runOnJS(onComplete)();\n }\n }\n });\n },\n [getClosedTranslateY, isAnimating, translateY],\n );\n\n /** Animate to snap — safe to call from a worklet (onEnd handler). */\n const animateToSnapWorklet = useCallback(\n (index: number) => {\n 'worklet';\n const clamped = clampIndex(index, resolvedSnapPoints.length);\n const targetY = getTranslateYForSnap(clamped);\n\n isAnimating.value = true;\n activeSnapIndex.value = clamped;\n translateY.value = withSpring(targetY, SHEET_SPRING_CONFIG, (finished) => {\n if (finished) {\n isAnimating.value = false;\n }\n });\n\n runOnJS(emitSnapChange)(clamped);\n },\n [\n resolvedSnapPoints,\n getTranslateYForSnap,\n isAnimating,\n activeSnapIndex,\n translateY,\n emitSnapChange,\n ],\n );\n\n /** Animate to closed — safe to call from a worklet. */\n const animateToCloseWorklet = useCallback(() => {\n 'worklet';\n const targetY = getClosedTranslateY();\n isAnimating.value = true;\n translateY.value = withSpring(targetY, SHEET_SPRING_CONFIG, (finished) => {\n if (finished) {\n isAnimating.value = false;\n }\n });\n }, [getClosedTranslateY, isAnimating, translateY]);\n\n return {\n resolvedSnapPoints,\n translateY,\n activeSnapIndex,\n isAnimating,\n getTranslateYForSnap,\n getClosedTranslateY,\n animateToSnap,\n animateToClose,\n animateToSnapWorklet,\n animateToCloseWorklet,\n };\n}\n\nexport { SHEET_SPRING_CONFIG, useBottomSheetSnapModel };\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,sBAAsB;CAC1B,SAAS,cAAc,OAAO,KAAK;CACnC,WAAW,cAAc,OAAO,KAAK;CACrC,MAAM;CACP;;;;;;;;;;AAsDD,SAAS,wBAAwB,EAC/B,gBACA,QACA,uBACA,oBACA,mBACA,iBACA,eACA,YACA,oBACA,yBAC+D;CAC/D,MAAM,qBAAqB,cAAmC;AAC5D,MAAI,gBAAgB,OAClB,QAAO;AAET,MAAI,WAAW,OACb,QAAO,CAAC,OAAO;AAEjB,SAAO,CAAC,mBAAmB;IAC1B,CAAC,QAAQ,eAAe,CAAC;CAG5B,MAAM,aAAa,eAAe,KAAK;CACvC,MAAM,kBAAkB,eACtB,WAAW,sBAAsB,uBAAuB,mBAAmB,OAAO,CACnF;CACD,MAAM,cAAc,eAAe,MAAM;;;;;CAMzC,MAAM,uBAAuB,aAC1B,UAA0B;AACzB;EACA,MAAM,UAAU,WAAW,OAAO,mBAAmB,OAAO;EAC5D,MAAM,KAAK,mBAAmB;EAC9B,MAAM,WAAW,kBAAkB,IAAI,gBAAgB,MAAM;EAG7D,MAAM,uBADoB,sBAAsB,YAAY,mBAAmB,SAAS,IACvC,wBAAwB;EACzE,MAAM,YAAY,gBAAgB,QAAQ,uBAAuB;EACjE,MAAM,gBAAgB,KAAK,IAAI,GAAG,KAAK,IAAI,UAAU,UAAU,CAAC;AAChE,SAAO,gBAAgB,QAAQ,gBAAgB;IAEjD;EACE;EACA;EACA;EACA;EACA;EACA;EACD,CACF;;CAGD,MAAM,sBAAsB,kBAA0B;AACpD;AACA,SAAO,gBAAgB,QAAQ;IAC9B,CAAC,iBAAiB,cAAc,CAAC;;CAGpC,MAAM,iBAAiB,aACpB,UAAkB;AACjB,sBAAoB,OAAO,mBAAmB,OAAQ;IAExD,CAAC,mBAAmB,mBAAmB,CACxC;AAsFD,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA,eA1FoB,aACnB,UAAkB;GACjB,MAAM,UAAU,WAAW,OAAO,mBAAmB,OAAO;GAC5D,MAAM,UAAU,qBAAqB,QAAQ;AAE7C,eAAY,QAAQ;AACpB,mBAAgB,QAAQ;AACxB,cAAW,QAAQ,WAAW,SAAS,sBAAsB,aAAa;AACxE;AACA,QAAI,SACF,aAAY,QAAQ;KAEtB;AAEF,kBAAe,QAAQ;KAEzB;GACE;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EAmEC,gBAhEqB,aACpB,eAA4B;GAC3B,MAAM,UAAU,qBAAqB;AACrC,eAAY,QAAQ;AACpB,cAAW,QAAQ,WAAW,SAAS,sBAAsB,aAAa;AACxE;AACA,QAAI,UAAU;AACZ,iBAAY,QAAQ;AACpB,SAAI,WACF,SAAQ,WAAW,EAAE;;KAGzB;KAEJ;GAAC;GAAqB;GAAa;GAAW,CAC/C;EAkDC,sBA/C2B,aAC1B,UAAkB;AACjB;GACA,MAAM,UAAU,WAAW,OAAO,mBAAmB,OAAO;GAC5D,MAAM,UAAU,qBAAqB,QAAQ;AAE7C,eAAY,QAAQ;AACpB,mBAAgB,QAAQ;AACxB,cAAW,QAAQ,WAAW,SAAS,sBAAsB,aAAa;AACxE,QAAI,SACF,aAAY,QAAQ;KAEtB;AAEF,WAAQ,eAAe,CAAC,QAAQ;KAElC;GACE;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EAwBC,uBArB4B,kBAAkB;AAC9C;GACA,MAAM,UAAU,qBAAqB;AACrC,eAAY,QAAQ;AACpB,cAAW,QAAQ,WAAW,SAAS,sBAAsB,aAAa;AACxE,QAAI,SACF,aAAY,QAAQ;KAEtB;KACD;GAAC;GAAqB;GAAa;GAAW,CAAC;EAajD"}
|
|
1
|
+
{"version":3,"file":"useBottomSheetSnapModel.js","names":[],"sources":["../../../src/components/BottomSheet/useBottomSheetSnapModel.ts"],"sourcesContent":["import { useCallback, useMemo } from 'react';\nimport type { SharedValue } from 'react-native-reanimated';\nimport { runOnJS, useSharedValue, withSpring } from 'react-native-reanimated';\n\nimport { MOTION_CONFIG } from '../../motion';\nimport type { BottomSheetHeight } from './types';\nimport { clampIndex, DEFAULT_SNAP_POINT, resolveHeightToPx } from './utils';\n\n/**\n * Spring configuration for sheet snap/close animations.\n * Uses the UDS `smooth['3']` motion preset.\n */\nconst SHEET_SPRING_CONFIG = {\n damping: MOTION_CONFIG.smooth['3'].damping,\n stiffness: MOTION_CONFIG.smooth['3'].stiffness,\n mass: 1,\n} as const;\n\n/** @internal */\ninterface UseBottomSheetSnapModelParams {\n snapPointsProp?: BottomSheetHeight[];\n height?: BottomSheetHeight;\n defaultSnapPointIndex: number;\n snapPointIndexProp?: number;\n onSnapPointChange?: (index: number, height: BottomSheetHeight) => void;\n containerHeight: SharedValue<number>;\n /** Bottom inset in px (margin + safe area). */\n bottomInsetPx: number;\n /** Top safe-area inset in px — limits maximum sheet height. */\n topInsetPx: number;\n /** Horizontal margin in px (currently informational, not used in snap math). */\n sideInsetPx: number;\n /** Whether margins collapse at the max snap point. */\n fullWidthAtMaxSnap: boolean;\n /** Bottom inset at max snap when fullWidthAtMaxSnap (safe area only, no margin). */\n expandedBottomInsetPx: number;\n}\n\ninterface UseBottomSheetSnapModelResult {\n /** The resolved snap points array. */\n resolvedSnapPoints: BottomSheetHeight[];\n /** Animated translateY position of the sheet. */\n translateY: SharedValue<number>;\n /** Current active snap index. */\n activeSnapIndex: SharedValue<number>;\n /** Whether the sheet is currently animating. */\n isAnimating: SharedValue<boolean>;\n /** Compute translateY for a given snap index (worklet). */\n getTranslateYForSnap: (index: number) => number;\n /** Compute the closed translateY position (worklet). */\n getClosedTranslateY: () => number;\n /** Animate to a specific snap index. */\n animateToSnap: (index: number) => void;\n /** Animate to the closed position. Optional callback fires on JS thread when complete. */\n animateToClose: (onComplete?: () => void) => void;\n /** Animate to a specific snap index from within a worklet. */\n animateToSnapWorklet: (index: number) => void;\n /** Animate to the closed position from within a worklet. */\n animateToCloseWorklet: () => void;\n}\n\n/**\n * Manages the snap-point position model for the bottom sheet.\n *\n * Resolves snap point strings to pixel positions, provides spring-animated\n * `animateToSnap` / `animateToClose` functions for both JS and UI threads,\n * and exposes shared values for `translateY`, `activeSnapIndex`, and `isAnimating`.\n *\n * Position model: `translateY = containerHeight - snapHeightPx - bottomInsetPx`\n */\nfunction useBottomSheetSnapModel({\n snapPointsProp,\n height,\n defaultSnapPointIndex,\n snapPointIndexProp,\n onSnapPointChange,\n containerHeight,\n bottomInsetPx,\n topInsetPx,\n fullWidthAtMaxSnap,\n expandedBottomInsetPx,\n}: UseBottomSheetSnapModelParams): UseBottomSheetSnapModelResult {\n const resolvedSnapPoints = useMemo<BottomSheetHeight[]>(() => {\n if (snapPointsProp?.length) {\n return snapPointsProp;\n }\n if (height !== undefined) {\n return [height];\n }\n return [DEFAULT_SNAP_POINT];\n }, [height, snapPointsProp]);\n\n // Start off-screen (will be set to closed position on first layout).\n const translateY = useSharedValue(9999);\n const activeSnapIndex = useSharedValue(\n clampIndex(snapPointIndexProp ?? defaultSnapPointIndex, resolvedSnapPoints.length),\n );\n const isAnimating = useSharedValue(false);\n\n /**\n * Compute translateY for a snap index.\n * Position model: translateY = containerHeight - snapHeightPx - bottomInsetPx\n */\n const getTranslateYForSnap = useCallback(\n (index: number): number => {\n 'worklet';\n const clamped = clampIndex(index, resolvedSnapPoints.length);\n const sp = resolvedSnapPoints[clamped]!;\n const heightPx = resolveHeightToPx(sp, containerHeight.value);\n // At max snap with fullWidthAtMaxSnap, margins collapse so use reduced bottom inset.\n const isExpandedMaxSnap = fullWidthAtMaxSnap && clamped === resolvedSnapPoints.length - 1;\n const effectiveBottomInset = isExpandedMaxSnap ? expandedBottomInsetPx : bottomInsetPx;\n const maxHeight = containerHeight.value - effectiveBottomInset - topInsetPx;\n const clampedHeight = Math.max(0, Math.min(heightPx, maxHeight));\n return containerHeight.value - clampedHeight - effectiveBottomInset;\n },\n [\n resolvedSnapPoints,\n containerHeight,\n bottomInsetPx,\n topInsetPx,\n fullWidthAtMaxSnap,\n expandedBottomInsetPx,\n ],\n );\n\n /** Compute the closed (off-screen) translateY. */\n const getClosedTranslateY = useCallback((): number => {\n 'worklet';\n return containerHeight.value + bottomInsetPx;\n }, [containerHeight, bottomInsetPx]);\n\n /** Emit snap point change callback on the JS thread. */\n const emitSnapChange = useCallback(\n (index: number) => {\n onSnapPointChange?.(index, resolvedSnapPoints[index]!);\n },\n [onSnapPointChange, resolvedSnapPoints],\n );\n\n /** Animate to snap index — call from JS thread. */\n const animateToSnap = useCallback(\n (index: number) => {\n const clamped = clampIndex(index, resolvedSnapPoints.length);\n const targetY = getTranslateYForSnap(clamped);\n\n isAnimating.value = true;\n activeSnapIndex.value = clamped;\n translateY.value = withSpring(targetY, SHEET_SPRING_CONFIG, (finished) => {\n 'worklet';\n if (finished) {\n isAnimating.value = false;\n }\n });\n\n emitSnapChange(clamped);\n },\n [\n resolvedSnapPoints,\n getTranslateYForSnap,\n isAnimating,\n activeSnapIndex,\n translateY,\n emitSnapChange,\n ],\n );\n\n /** Animate to closed position — call from JS thread. */\n const animateToClose = useCallback(\n (onComplete?: () => void) => {\n const targetY = getClosedTranslateY();\n isAnimating.value = true;\n translateY.value = withSpring(targetY, SHEET_SPRING_CONFIG, (finished) => {\n 'worklet';\n if (finished) {\n isAnimating.value = false;\n if (onComplete) {\n runOnJS(onComplete)();\n }\n }\n });\n },\n [getClosedTranslateY, isAnimating, translateY],\n );\n\n /** Animate to snap — safe to call from a worklet (onEnd handler). */\n const animateToSnapWorklet = useCallback(\n (index: number) => {\n 'worklet';\n const clamped = clampIndex(index, resolvedSnapPoints.length);\n const targetY = getTranslateYForSnap(clamped);\n\n isAnimating.value = true;\n activeSnapIndex.value = clamped;\n translateY.value = withSpring(targetY, SHEET_SPRING_CONFIG, (finished) => {\n if (finished) {\n isAnimating.value = false;\n }\n });\n\n runOnJS(emitSnapChange)(clamped);\n },\n [\n resolvedSnapPoints,\n getTranslateYForSnap,\n isAnimating,\n activeSnapIndex,\n translateY,\n emitSnapChange,\n ],\n );\n\n /** Animate to closed — safe to call from a worklet. */\n const animateToCloseWorklet = useCallback(() => {\n 'worklet';\n const targetY = getClosedTranslateY();\n isAnimating.value = true;\n translateY.value = withSpring(targetY, SHEET_SPRING_CONFIG, (finished) => {\n if (finished) {\n isAnimating.value = false;\n }\n });\n }, [getClosedTranslateY, isAnimating, translateY]);\n\n return {\n resolvedSnapPoints,\n translateY,\n activeSnapIndex,\n isAnimating,\n getTranslateYForSnap,\n getClosedTranslateY,\n animateToSnap,\n animateToClose,\n animateToSnapWorklet,\n animateToCloseWorklet,\n };\n}\n\nexport { SHEET_SPRING_CONFIG, useBottomSheetSnapModel };\n"],"mappings":";;;;;;;;;;AAYA,MAAM,sBAAsB;CAC1B,SAAS,cAAc,OAAO,KAAK;CACnC,WAAW,cAAc,OAAO,KAAK;CACrC,MAAM;CACP;;;;;;;;;;AAsDD,SAAS,wBAAwB,EAC/B,gBACA,QACA,uBACA,oBACA,mBACA,iBACA,eACA,YACA,oBACA,yBAC+D;CAC/D,MAAM,qBAAqB,cAAmC;AAC5D,MAAI,gBAAgB,OAClB,QAAO;AAET,MAAI,WAAW,KAAA,EACb,QAAO,CAAC,OAAO;AAEjB,SAAO,CAAA,MAAoB;IAC1B,CAAC,QAAQ,eAAe,CAAC;CAG5B,MAAM,aAAa,eAAe,KAAK;CACvC,MAAM,kBAAkB,eACtB,WAAW,sBAAsB,uBAAuB,mBAAmB,OAAO,CACnF;CACD,MAAM,cAAc,eAAe,MAAM;;;;;CAMzC,MAAM,uBAAuB,aAC1B,UAA0B;AACzB;EACA,MAAM,UAAU,WAAW,OAAO,mBAAmB,OAAO;EAC5D,MAAM,KAAK,mBAAmB;EAC9B,MAAM,WAAW,kBAAkB,IAAI,gBAAgB,MAAM;EAG7D,MAAM,uBADoB,sBAAsB,YAAY,mBAAmB,SAAS,IACvC,wBAAwB;EACzE,MAAM,YAAY,gBAAgB,QAAQ,uBAAuB;EACjE,MAAM,gBAAgB,KAAK,IAAI,GAAG,KAAK,IAAI,UAAU,UAAU,CAAC;AAChE,SAAO,gBAAgB,QAAQ,gBAAgB;IAEjD;EACE;EACA;EACA;EACA;EACA;EACA;EACD,CACF;;CAGD,MAAM,sBAAsB,kBAA0B;AACpD;AACA,SAAO,gBAAgB,QAAQ;IAC9B,CAAC,iBAAiB,cAAc,CAAC;;CAGpC,MAAM,iBAAiB,aACpB,UAAkB;AACjB,sBAAoB,OAAO,mBAAmB,OAAQ;IAExD,CAAC,mBAAmB,mBAAmB,CACxC;AAsFD,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA,eA1FoB,aACnB,UAAkB;GACjB,MAAM,UAAU,WAAW,OAAO,mBAAmB,OAAO;GAC5D,MAAM,UAAU,qBAAqB,QAAQ;AAE7C,eAAY,QAAQ;AACpB,mBAAgB,QAAQ;AACxB,cAAW,QAAQ,WAAW,SAAS,sBAAsB,aAAa;AACxE;AACA,QAAI,SACF,aAAY,QAAQ;KAEtB;AAEF,kBAAe,QAAQ;KAEzB;GACE;GACA;GACA;GACA;GACA;GACA;GACD,CAmEY;EACb,gBAhEqB,aACpB,eAA4B;GAC3B,MAAM,UAAU,qBAAqB;AACrC,eAAY,QAAQ;AACpB,cAAW,QAAQ,WAAW,SAAS,sBAAsB,aAAa;AACxE;AACA,QAAI,UAAU;AACZ,iBAAY,QAAQ;AACpB,SAAI,WACF,SAAQ,WAAW,EAAE;;KAGzB;KAEJ;GAAC;GAAqB;GAAa;GAAW,CAkDhC;EACd,sBA/C2B,aAC1B,UAAkB;AACjB;GACA,MAAM,UAAU,WAAW,OAAO,mBAAmB,OAAO;GAC5D,MAAM,UAAU,qBAAqB,QAAQ;AAE7C,eAAY,QAAQ;AACpB,mBAAgB,QAAQ;AACxB,cAAW,QAAQ,WAAW,SAAS,sBAAsB,aAAa;AACxE,QAAI,SACF,aAAY,QAAQ;KAEtB;AAEF,WAAQ,eAAe,CAAC,QAAQ;KAElC;GACE;GACA;GACA;GACA;GACA;GACA;GACD,CAwBmB;EACpB,uBArB4B,kBAAkB;AAC9C;GACA,MAAM,UAAU,qBAAqB;AACrC,eAAY,QAAQ;AACpB,cAAW,QAAQ,WAAW,SAAS,sBAAsB,aAAa;AACxE,QAAI,SACF,aAAY,QAAQ;KAEtB;KACD;GAAC;GAAqB;GAAa;GAAW,CAY1B;EACtB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
|
-
|
|
6
5
|
//#region src/components/BottomSheet/useBottomSheetStore.ts
|
|
7
6
|
/**
|
|
8
7
|
* Creates a lightweight external store for bottom-sheet open/close state.
|
|
@@ -73,7 +72,6 @@ function useBottomSheetStore({ defaultOpen = false, open: openProp } = {}) {
|
|
|
73
72
|
[BOTTOM_SHEET_INTERNAL_STORE_KEY]: store
|
|
74
73
|
};
|
|
75
74
|
}
|
|
76
|
-
|
|
77
75
|
//#endregion
|
|
78
76
|
exports.getBottomSheetInternal = getBottomSheetInternal;
|
|
79
|
-
exports.useBottomSheetStore = useBottomSheetStore;
|
|
77
|
+
exports.useBottomSheetStore = useBottomSheetStore;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
2
|
import { useCallback, useEffect, useState, useSyncExternalStore } from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/components/BottomSheet/useBottomSheetStore.ts
|
|
5
4
|
/**
|
|
6
5
|
* Creates a lightweight external store for bottom-sheet open/close state.
|
|
@@ -71,7 +70,7 @@ function useBottomSheetStore({ defaultOpen = false, open: openProp } = {}) {
|
|
|
71
70
|
[BOTTOM_SHEET_INTERNAL_STORE_KEY]: store
|
|
72
71
|
};
|
|
73
72
|
}
|
|
74
|
-
|
|
75
73
|
//#endregion
|
|
76
74
|
export { getBottomSheetInternal, useBottomSheetStore };
|
|
75
|
+
|
|
77
76
|
//# sourceMappingURL=useBottomSheetStore.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBottomSheetStore.js","names":[],"sources":["../../../src/components/BottomSheet/useBottomSheetStore.ts"],"sourcesContent":["import { useCallback, useEffect, useState, useSyncExternalStore } from 'react';\n\nimport type { BottomSheetController, UseBottomSheetStoreProps } from './types';\n\ntype Listener = () => void;\n\n/**\n * Creates a lightweight external store for bottom-sheet open/close state.\n * Uses the `subscribe` / `getSnapshot` pattern for {@link useSyncExternalStore}.\n *\n * @param initialOpen - Initial open state.\n * @returns Store with `subscribe`, `getSnapshot`, and `setOpen`.\n * @internal\n */\nfunction createBottomSheetStore(initialOpen: boolean) {\n let isOpen = initialOpen;\n const listeners = new Set<Listener>();\n\n function subscribe(listener: Listener) {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n }\n\n function getSnapshot() {\n return isOpen;\n }\n\n function setOpen(next: boolean) {\n if (next === isOpen) {\n return;\n }\n isOpen = next;\n for (const listener of listeners) {\n listener();\n }\n }\n\n return { subscribe, getSnapshot, setOpen };\n}\n\n/** @internal */\nconst BOTTOM_SHEET_INTERNAL_STORE_KEY = '__bottomSheetInternal';\n\ntype InternalStore = ReturnType<typeof createBottomSheetStore>;\n\ntype BottomSheetControllerWithInternal = BottomSheetController & {\n [BOTTOM_SHEET_INTERNAL_STORE_KEY]: InternalStore;\n};\n\n/** @internal — retrieve the internal store from a controller. */\nfunction getBottomSheetInternal(controller: BottomSheetController): InternalStore {\n const internal = (controller as BottomSheetControllerWithInternal)[\n BOTTOM_SHEET_INTERNAL_STORE_KEY\n ];\n if (!internal) {\n throw new Error('Invalid BottomSheet controller. Use `useBottomSheetStore()` to create one.');\n }\n return internal;\n}\n\n/**\n * Creates a {@link BottomSheetController} that manages open/close state.\n *\n * Supports both uncontrolled (`defaultOpen`) and controlled (`open`) modes.\n * The returned controller can be passed to `<BottomSheetProvider controller={...}>`\n * or `<BottomSheet controller={...}>`.\n *\n * @param props - Optional `defaultOpen` and/or controlled `open` value.\n * @returns A stable {@link BottomSheetController} with `open()`, `close()`, and `isOpen`.\n *\n * @example\n * ```tsx\n * const store = useBottomSheetStore();\n * // ...\n * <Button onPress={() => store.open()}>Open</Button>\n * ```\n */\nfunction useBottomSheetStore({\n defaultOpen = false,\n open: openProp,\n}: UseBottomSheetStoreProps = {}): BottomSheetController {\n // Use useState with lazy initializer to create the store once.\n const [store] = useState(() => createBottomSheetStore(openProp ?? defaultOpen));\n\n // Sync controlled `open` prop into store via effect.\n useEffect(() => {\n if (openProp !== undefined) {\n store.setOpen(openProp);\n }\n }, [openProp, store]);\n\n const isOpen = useSyncExternalStore(store.subscribe, store.getSnapshot);\n\n const open = useCallback(() => store.setOpen(true), [store]);\n const close = useCallback(() => store.setOpen(false), [store]);\n\n return {\n open,\n close,\n isOpen,\n [BOTTOM_SHEET_INTERNAL_STORE_KEY]: store,\n } as BottomSheetController;\n}\n\nexport { getBottomSheetInternal, useBottomSheetStore };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useBottomSheetStore.js","names":[],"sources":["../../../src/components/BottomSheet/useBottomSheetStore.ts"],"sourcesContent":["import { useCallback, useEffect, useState, useSyncExternalStore } from 'react';\n\nimport type { BottomSheetController, UseBottomSheetStoreProps } from './types';\n\ntype Listener = () => void;\n\n/**\n * Creates a lightweight external store for bottom-sheet open/close state.\n * Uses the `subscribe` / `getSnapshot` pattern for {@link useSyncExternalStore}.\n *\n * @param initialOpen - Initial open state.\n * @returns Store with `subscribe`, `getSnapshot`, and `setOpen`.\n * @internal\n */\nfunction createBottomSheetStore(initialOpen: boolean) {\n let isOpen = initialOpen;\n const listeners = new Set<Listener>();\n\n function subscribe(listener: Listener) {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n }\n\n function getSnapshot() {\n return isOpen;\n }\n\n function setOpen(next: boolean) {\n if (next === isOpen) {\n return;\n }\n isOpen = next;\n for (const listener of listeners) {\n listener();\n }\n }\n\n return { subscribe, getSnapshot, setOpen };\n}\n\n/** @internal */\nconst BOTTOM_SHEET_INTERNAL_STORE_KEY = '__bottomSheetInternal';\n\ntype InternalStore = ReturnType<typeof createBottomSheetStore>;\n\ntype BottomSheetControllerWithInternal = BottomSheetController & {\n [BOTTOM_SHEET_INTERNAL_STORE_KEY]: InternalStore;\n};\n\n/** @internal — retrieve the internal store from a controller. */\nfunction getBottomSheetInternal(controller: BottomSheetController): InternalStore {\n const internal = (controller as BottomSheetControllerWithInternal)[\n BOTTOM_SHEET_INTERNAL_STORE_KEY\n ];\n if (!internal) {\n throw new Error('Invalid BottomSheet controller. Use `useBottomSheetStore()` to create one.');\n }\n return internal;\n}\n\n/**\n * Creates a {@link BottomSheetController} that manages open/close state.\n *\n * Supports both uncontrolled (`defaultOpen`) and controlled (`open`) modes.\n * The returned controller can be passed to `<BottomSheetProvider controller={...}>`\n * or `<BottomSheet controller={...}>`.\n *\n * @param props - Optional `defaultOpen` and/or controlled `open` value.\n * @returns A stable {@link BottomSheetController} with `open()`, `close()`, and `isOpen`.\n *\n * @example\n * ```tsx\n * const store = useBottomSheetStore();\n * // ...\n * <Button onPress={() => store.open()}>Open</Button>\n * ```\n */\nfunction useBottomSheetStore({\n defaultOpen = false,\n open: openProp,\n}: UseBottomSheetStoreProps = {}): BottomSheetController {\n // Use useState with lazy initializer to create the store once.\n const [store] = useState(() => createBottomSheetStore(openProp ?? defaultOpen));\n\n // Sync controlled `open` prop into store via effect.\n useEffect(() => {\n if (openProp !== undefined) {\n store.setOpen(openProp);\n }\n }, [openProp, store]);\n\n const isOpen = useSyncExternalStore(store.subscribe, store.getSnapshot);\n\n const open = useCallback(() => store.setOpen(true), [store]);\n const close = useCallback(() => store.setOpen(false), [store]);\n\n return {\n open,\n close,\n isOpen,\n [BOTTOM_SHEET_INTERNAL_STORE_KEY]: store,\n } as BottomSheetController;\n}\n\nexport { getBottomSheetInternal, useBottomSheetStore };\n"],"mappings":";;;;;;;;;;;AAcA,SAAS,uBAAuB,aAAsB;CACpD,IAAI,SAAS;CACb,MAAM,4BAAY,IAAI,KAAe;CAErC,SAAS,UAAU,UAAoB;AACrC,YAAU,IAAI,SAAS;AACvB,eAAa;AACX,aAAU,OAAO,SAAS;;;CAI9B,SAAS,cAAc;AACrB,SAAO;;CAGT,SAAS,QAAQ,MAAe;AAC9B,MAAI,SAAS,OACX;AAEF,WAAS;AACT,OAAK,MAAM,YAAY,UACrB,WAAU;;AAId,QAAO;EAAE;EAAW;EAAa;EAAS;;;AAI5C,MAAM,kCAAkC;;AASxC,SAAS,uBAAuB,YAAkD;CAChF,MAAM,WAAY,WAChB;AAEF,KAAI,CAAC,SACH,OAAM,IAAI,MAAM,6EAA6E;AAE/F,QAAO;;;;;;;;;;;;;;;;;;;AAoBT,SAAS,oBAAoB,EAC3B,cAAc,OACd,MAAM,aACsB,EAAE,EAAyB;CAEvD,MAAM,CAAC,SAAS,eAAe,uBAAuB,YAAY,YAAY,CAAC;AAG/E,iBAAgB;AACd,MAAI,aAAa,KAAA,EACf,OAAM,QAAQ,SAAS;IAExB,CAAC,UAAU,MAAM,CAAC;CAErB,MAAM,SAAS,qBAAqB,MAAM,WAAW,MAAM,YAAY;AAKvE,QAAO;EACL,MAJW,kBAAkB,MAAM,QAAQ,KAAK,EAAE,CAAC,MAAM,CAIrD;EACJ,OAJY,kBAAkB,MAAM,QAAQ,MAAM,EAAE,CAAC,MAAM,CAItD;EACL;GACC,kCAAkC;EACpC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
3
|
-
|
|
4
|
-
const require_components_BottomSheet_utils = require(
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_components_BottomSheet_utils = require("./utils.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let react_native_reanimated = require("react-native-reanimated");
|
|
7
|
-
|
|
8
7
|
//#region src/components/BottomSheet/useExpansionMargins.ts
|
|
9
8
|
/**
|
|
10
9
|
* Animates sheet margins from their base values to `0` as the sheet expands
|
|
@@ -52,6 +51,5 @@ function useExpansionMargins({ enabled, baseMarginHorizontal, baseMarginBottom,
|
|
|
52
51
|
thresholdTranslateY
|
|
53
52
|
};
|
|
54
53
|
}
|
|
55
|
-
|
|
56
54
|
//#endregion
|
|
57
|
-
exports.useExpansionMargins = useExpansionMargins;
|
|
55
|
+
exports.useExpansionMargins = useExpansionMargins;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { clampIndex, resolveHeightToPx } from "./utils.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { interpolate, useAnimatedStyle } from "react-native-reanimated";
|
|
5
|
-
|
|
6
5
|
//#region src/components/BottomSheet/useExpansionMargins.ts
|
|
7
6
|
/**
|
|
8
7
|
* Animates sheet margins from their base values to `0` as the sheet expands
|
|
@@ -50,7 +49,7 @@ function useExpansionMargins({ enabled, baseMarginHorizontal, baseMarginBottom,
|
|
|
50
49
|
thresholdTranslateY
|
|
51
50
|
};
|
|
52
51
|
}
|
|
53
|
-
|
|
54
52
|
//#endregion
|
|
55
53
|
export { useExpansionMargins };
|
|
54
|
+
|
|
56
55
|
//# sourceMappingURL=useExpansionMargins.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExpansionMargins.js","names":[],"sources":["../../../src/components/BottomSheet/useExpansionMargins.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { SharedValue } from 'react-native-reanimated';\nimport { interpolate, useAnimatedStyle } from 'react-native-reanimated';\n\nimport type { BottomSheetHeight } from './types';\nimport { clampIndex, resolveHeightToPx } from './utils';\n\n/** @internal */\ninterface UseExpansionMarginsParams {\n /** Whether `fullWidthAtMaxSnap` is enabled on the sheet. */\n enabled: boolean;\n /** Base horizontal margin from configurator tokens (px). */\n baseMarginHorizontal: number;\n /** Base bottom margin from configurator tokens (px). */\n baseMarginBottom: number;\n /** Resolved snap points array. */\n resolvedSnapPoints: BottomSheetHeight[];\n /** Container height (UI-thread shared value). */\n containerHeight: SharedValue<number>;\n /** Bottom inset in px (margin + safe area). */\n bottomInsetPx: number;\n /** Bottom inset at max snap when expanded (safe area only, no margin). */\n expandedBottomInsetPx: number;\n /** The sheet's animated translateY shared value. */\n translateY: SharedValue<number>;\n}\n\n/**\n * Animates sheet margins from their base values to `0` as the sheet expands\n * from the second-highest snap point to the max snap point.\n *\n * Also returns the interpolation thresholds (`maxSnapTranslateY` and\n * `thresholdTranslateY`) so the caller can animate other properties\n * (e.g. the height constraint's effective bottom inset) in sync.\n *\n * @returns An animated margin style and the expansion interpolation thresholds.\n */\nfunction useExpansionMargins({\n enabled,\n baseMarginHorizontal,\n baseMarginBottom,\n resolvedSnapPoints,\n containerHeight,\n bottomInsetPx,\n expandedBottomInsetPx,\n translateY,\n}: UseExpansionMarginsParams) {\n // Compute threshold and max snap translateY positions.\n // Max snap uses expandedBottomInsetPx (margins collapsed), threshold uses bottomInsetPx.\n const { maxSnapTranslateY, thresholdTranslateY } = useMemo(() => {\n if (!enabled || resolvedSnapPoints.length === 0) {\n return { maxSnapTranslateY: 0, thresholdTranslateY: 0 };\n }\n\n const h = containerHeight.value;\n const maxIdx = resolvedSnapPoints.length - 1;\n const maxHeight = resolveHeightToPx(resolvedSnapPoints[maxIdx]!, h);\n const clampedMax = Math.min(maxHeight, h - expandedBottomInsetPx);\n const maxTransY = h - clampedMax - expandedBottomInsetPx;\n\n // Threshold is the second-highest snap, or the max snap if only one exists.\n const thresholdIdx = clampIndex(maxIdx - 1, resolvedSnapPoints.length);\n const thresholdHeight = resolveHeightToPx(resolvedSnapPoints[thresholdIdx]!, h);\n const clampedThreshold = Math.min(thresholdHeight, h - bottomInsetPx);\n const thresholdTransY = h - clampedThreshold - bottomInsetPx;\n\n return { maxSnapTranslateY: maxTransY, thresholdTranslateY: thresholdTransY };\n }, [enabled, resolvedSnapPoints, containerHeight.value, bottomInsetPx, expandedBottomInsetPx]);\n\n const animatedMarginStyle = useAnimatedStyle(() => {\n if (!enabled) {\n return {};\n }\n\n // When translateY moves from thresholdTranslateY to maxSnapTranslateY\n // (sheet expanding), margins go from base values to 0.\n const mh = interpolate(\n translateY.value,\n [maxSnapTranslateY, thresholdTranslateY],\n [0, baseMarginHorizontal],\n 'clamp',\n );\n const mb = interpolate(\n translateY.value,\n [maxSnapTranslateY, thresholdTranslateY],\n [0, baseMarginBottom],\n 'clamp',\n );\n\n return {\n marginLeft: mh,\n marginRight: mh,\n marginBottom: mb,\n };\n });\n\n return { animatedMarginStyle, maxSnapTranslateY, thresholdTranslateY };\n}\n\nexport { useExpansionMargins };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useExpansionMargins.js","names":[],"sources":["../../../src/components/BottomSheet/useExpansionMargins.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { SharedValue } from 'react-native-reanimated';\nimport { interpolate, useAnimatedStyle } from 'react-native-reanimated';\n\nimport type { BottomSheetHeight } from './types';\nimport { clampIndex, resolveHeightToPx } from './utils';\n\n/** @internal */\ninterface UseExpansionMarginsParams {\n /** Whether `fullWidthAtMaxSnap` is enabled on the sheet. */\n enabled: boolean;\n /** Base horizontal margin from configurator tokens (px). */\n baseMarginHorizontal: number;\n /** Base bottom margin from configurator tokens (px). */\n baseMarginBottom: number;\n /** Resolved snap points array. */\n resolvedSnapPoints: BottomSheetHeight[];\n /** Container height (UI-thread shared value). */\n containerHeight: SharedValue<number>;\n /** Bottom inset in px (margin + safe area). */\n bottomInsetPx: number;\n /** Bottom inset at max snap when expanded (safe area only, no margin). */\n expandedBottomInsetPx: number;\n /** The sheet's animated translateY shared value. */\n translateY: SharedValue<number>;\n}\n\n/**\n * Animates sheet margins from their base values to `0` as the sheet expands\n * from the second-highest snap point to the max snap point.\n *\n * Also returns the interpolation thresholds (`maxSnapTranslateY` and\n * `thresholdTranslateY`) so the caller can animate other properties\n * (e.g. the height constraint's effective bottom inset) in sync.\n *\n * @returns An animated margin style and the expansion interpolation thresholds.\n */\nfunction useExpansionMargins({\n enabled,\n baseMarginHorizontal,\n baseMarginBottom,\n resolvedSnapPoints,\n containerHeight,\n bottomInsetPx,\n expandedBottomInsetPx,\n translateY,\n}: UseExpansionMarginsParams) {\n // Compute threshold and max snap translateY positions.\n // Max snap uses expandedBottomInsetPx (margins collapsed), threshold uses bottomInsetPx.\n const { maxSnapTranslateY, thresholdTranslateY } = useMemo(() => {\n if (!enabled || resolvedSnapPoints.length === 0) {\n return { maxSnapTranslateY: 0, thresholdTranslateY: 0 };\n }\n\n const h = containerHeight.value;\n const maxIdx = resolvedSnapPoints.length - 1;\n const maxHeight = resolveHeightToPx(resolvedSnapPoints[maxIdx]!, h);\n const clampedMax = Math.min(maxHeight, h - expandedBottomInsetPx);\n const maxTransY = h - clampedMax - expandedBottomInsetPx;\n\n // Threshold is the second-highest snap, or the max snap if only one exists.\n const thresholdIdx = clampIndex(maxIdx - 1, resolvedSnapPoints.length);\n const thresholdHeight = resolveHeightToPx(resolvedSnapPoints[thresholdIdx]!, h);\n const clampedThreshold = Math.min(thresholdHeight, h - bottomInsetPx);\n const thresholdTransY = h - clampedThreshold - bottomInsetPx;\n\n return { maxSnapTranslateY: maxTransY, thresholdTranslateY: thresholdTransY };\n }, [enabled, resolvedSnapPoints, containerHeight.value, bottomInsetPx, expandedBottomInsetPx]);\n\n const animatedMarginStyle = useAnimatedStyle(() => {\n if (!enabled) {\n return {};\n }\n\n // When translateY moves from thresholdTranslateY to maxSnapTranslateY\n // (sheet expanding), margins go from base values to 0.\n const mh = interpolate(\n translateY.value,\n [maxSnapTranslateY, thresholdTranslateY],\n [0, baseMarginHorizontal],\n 'clamp',\n );\n const mb = interpolate(\n translateY.value,\n [maxSnapTranslateY, thresholdTranslateY],\n [0, baseMarginBottom],\n 'clamp',\n );\n\n return {\n marginLeft: mh,\n marginRight: mh,\n marginBottom: mb,\n };\n });\n\n return { animatedMarginStyle, maxSnapTranslateY, thresholdTranslateY };\n}\n\nexport { useExpansionMargins };\n"],"mappings":";;;;;;;;;;;;;;;AAqCA,SAAS,oBAAoB,EAC3B,SACA,sBACA,kBACA,oBACA,iBACA,eACA,uBACA,cAC4B;CAG5B,MAAM,EAAE,mBAAmB,wBAAwB,cAAc;AAC/D,MAAI,CAAC,WAAW,mBAAmB,WAAW,EAC5C,QAAO;GAAE,mBAAmB;GAAG,qBAAqB;GAAG;EAGzD,MAAM,IAAI,gBAAgB;EAC1B,MAAM,SAAS,mBAAmB,SAAS;EAC3C,MAAM,YAAY,kBAAkB,mBAAmB,SAAU,EAAE;EAEnE,MAAM,YAAY,IADC,KAAK,IAAI,WAAW,IAAI,sBACX,GAAG;EAInC,MAAM,kBAAkB,kBAAkB,mBADrB,WAAW,SAAS,GAAG,mBAAmB,OACU,GAAI,EAAE;AAI/E,SAAO;GAAE,mBAAmB;GAAW,qBAFf,IADC,KAAK,IAAI,iBAAiB,IAAI,cACX,GAAG;GAE8B;IAC5E;EAAC;EAAS;EAAoB,gBAAgB;EAAO;EAAe;EAAsB,CAAC;AA6B9F,QAAO;EAAE,qBA3BmB,uBAAuB;AACjD,OAAI,CAAC,QACH,QAAO,EAAE;GAKX,MAAM,KAAK,YACT,WAAW,OACX,CAAC,mBAAmB,oBAAoB,EACxC,CAAC,GAAG,qBAAqB,EACzB,QACD;AAQD,UAAO;IACL,YAAY;IACZ,aAAa;IACb,cAVS,YACT,WAAW,OACX,CAAC,mBAAmB,oBAAoB,EACxC,CAAC,GAAG,iBAAiB,EACrB,QAMgB;IACjB;IAGyB;EAAE;EAAmB;EAAqB"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let react_native = require("react-native");
|
|
6
6
|
let react_native_reanimated = require("react-native-reanimated");
|
|
7
|
-
|
|
8
7
|
//#region src/components/BottomSheet/useKeyboardAvoidance.ts
|
|
9
8
|
/** Duration (ms) for the keyboard offset animation. */
|
|
10
9
|
const KEYBOARD_ANIMATION_DURATION = 250;
|
|
@@ -48,6 +47,5 @@ function useKeyboardAvoidance({ isOpen, translateY, isAnimating }) {
|
|
|
48
47
|
isAnimating
|
|
49
48
|
]);
|
|
50
49
|
}
|
|
51
|
-
|
|
52
50
|
//#endregion
|
|
53
|
-
exports.useKeyboardAvoidance = useKeyboardAvoidance;
|
|
51
|
+
exports.useKeyboardAvoidance = useKeyboardAvoidance;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
import { Keyboard, Platform } from "react-native";
|
|
4
4
|
import { withTiming } from "react-native-reanimated";
|
|
5
|
-
|
|
6
5
|
//#region src/components/BottomSheet/useKeyboardAvoidance.ts
|
|
7
6
|
/** Duration (ms) for the keyboard offset animation. */
|
|
8
7
|
const KEYBOARD_ANIMATION_DURATION = 250;
|
|
@@ -46,7 +45,7 @@ function useKeyboardAvoidance({ isOpen, translateY, isAnimating }) {
|
|
|
46
45
|
isAnimating
|
|
47
46
|
]);
|
|
48
47
|
}
|
|
49
|
-
|
|
50
48
|
//#endregion
|
|
51
49
|
export { useKeyboardAvoidance };
|
|
50
|
+
|
|
52
51
|
//# sourceMappingURL=useKeyboardAvoidance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyboardAvoidance.js","names":[],"sources":["../../../src/components/BottomSheet/useKeyboardAvoidance.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { Keyboard, Platform } from 'react-native';\nimport type { SharedValue } from 'react-native-reanimated';\nimport { withTiming } from 'react-native-reanimated';\n\n/** Duration (ms) for the keyboard offset animation. */\nconst KEYBOARD_ANIMATION_DURATION = 250;\n\n/** @internal */\ninterface UseKeyboardAvoidanceParams {\n /** Whether the sheet is currently open. */\n isOpen: boolean;\n /** The sheet's animated translateY shared value. */\n translateY: SharedValue<number>;\n /** Whether the sheet is currently animating (snap/close spring). */\n isAnimating: SharedValue<boolean>;\n}\n\n/**\n * Offsets the sheet's `translateY` when the software keyboard opens or closes.\n *\n * - **iOS**: Listens to `keyboardWillShow` / `keyboardWillHide` for smoother,\n * synchronous animation with the keyboard.\n * - **Android**: Listens to `keyboardDidShow` / `keyboardDidHide` (will-events\n * are not available on Android).\n *\n * Captures `translateY` before the offset and restores it when the keyboard hides.\n */\nfunction useKeyboardAvoidance({ isOpen, translateY, isAnimating }: UseKeyboardAvoidanceParams) {\n useEffect(() => {\n if (!isOpen) {\n return;\n }\n\n // Store the translateY before keyboard offset so we can restore it.\n let preKeyboardTranslateY: number | null = null;\n\n const showEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';\n const hideEvent = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';\n\n const showSub = Keyboard.addListener(showEvent, (event) => {\n const keyboardHeight = event.endCoordinates.height;\n if (keyboardHeight <= 0) {\n return;\n }\n\n // Capture current position before offsetting.\n if (preKeyboardTranslateY === null) {\n preKeyboardTranslateY = translateY.value;\n }\n\n // Clear isAnimating so a cancelled snap/close spring doesn't leave\n // drag permanently blocked. The keyboard animation takes over translateY.\n isAnimating.value = false;\n\n // Move sheet up by keyboard height.\n const target = preKeyboardTranslateY - keyboardHeight;\n // Clamp to 0 so the sheet doesn't go above the screen.\n const clamped = Math.max(0, target);\n translateY.value = withTiming(clamped, { duration: KEYBOARD_ANIMATION_DURATION });\n });\n\n const hideSub = Keyboard.addListener(hideEvent, () => {\n if (preKeyboardTranslateY !== null) {\n translateY.value = withTiming(preKeyboardTranslateY, {\n duration: KEYBOARD_ANIMATION_DURATION,\n });\n preKeyboardTranslateY = null;\n }\n });\n\n return () => {\n showSub.remove();\n hideSub.remove();\n };\n }, [isOpen, translateY, isAnimating]);\n}\n\nexport { useKeyboardAvoidance };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useKeyboardAvoidance.js","names":[],"sources":["../../../src/components/BottomSheet/useKeyboardAvoidance.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { Keyboard, Platform } from 'react-native';\nimport type { SharedValue } from 'react-native-reanimated';\nimport { withTiming } from 'react-native-reanimated';\n\n/** Duration (ms) for the keyboard offset animation. */\nconst KEYBOARD_ANIMATION_DURATION = 250;\n\n/** @internal */\ninterface UseKeyboardAvoidanceParams {\n /** Whether the sheet is currently open. */\n isOpen: boolean;\n /** The sheet's animated translateY shared value. */\n translateY: SharedValue<number>;\n /** Whether the sheet is currently animating (snap/close spring). */\n isAnimating: SharedValue<boolean>;\n}\n\n/**\n * Offsets the sheet's `translateY` when the software keyboard opens or closes.\n *\n * - **iOS**: Listens to `keyboardWillShow` / `keyboardWillHide` for smoother,\n * synchronous animation with the keyboard.\n * - **Android**: Listens to `keyboardDidShow` / `keyboardDidHide` (will-events\n * are not available on Android).\n *\n * Captures `translateY` before the offset and restores it when the keyboard hides.\n */\nfunction useKeyboardAvoidance({ isOpen, translateY, isAnimating }: UseKeyboardAvoidanceParams) {\n useEffect(() => {\n if (!isOpen) {\n return;\n }\n\n // Store the translateY before keyboard offset so we can restore it.\n let preKeyboardTranslateY: number | null = null;\n\n const showEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';\n const hideEvent = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';\n\n const showSub = Keyboard.addListener(showEvent, (event) => {\n const keyboardHeight = event.endCoordinates.height;\n if (keyboardHeight <= 0) {\n return;\n }\n\n // Capture current position before offsetting.\n if (preKeyboardTranslateY === null) {\n preKeyboardTranslateY = translateY.value;\n }\n\n // Clear isAnimating so a cancelled snap/close spring doesn't leave\n // drag permanently blocked. The keyboard animation takes over translateY.\n isAnimating.value = false;\n\n // Move sheet up by keyboard height.\n const target = preKeyboardTranslateY - keyboardHeight;\n // Clamp to 0 so the sheet doesn't go above the screen.\n const clamped = Math.max(0, target);\n translateY.value = withTiming(clamped, { duration: KEYBOARD_ANIMATION_DURATION });\n });\n\n const hideSub = Keyboard.addListener(hideEvent, () => {\n if (preKeyboardTranslateY !== null) {\n translateY.value = withTiming(preKeyboardTranslateY, {\n duration: KEYBOARD_ANIMATION_DURATION,\n });\n preKeyboardTranslateY = null;\n }\n });\n\n return () => {\n showSub.remove();\n hideSub.remove();\n };\n }, [isOpen, translateY, isAnimating]);\n}\n\nexport { useKeyboardAvoidance };\n"],"mappings":";;;;;;AAMA,MAAM,8BAA8B;;;;;;;;;;;AAsBpC,SAAS,qBAAqB,EAAE,QAAQ,YAAY,eAA2C;AAC7F,iBAAgB;AACd,MAAI,CAAC,OACH;EAIF,IAAI,wBAAuC;EAE3C,MAAM,YAAY,SAAS,OAAO,QAAQ,qBAAqB;EAC/D,MAAM,YAAY,SAAS,OAAO,QAAQ,qBAAqB;EAE/D,MAAM,UAAU,SAAS,YAAY,YAAY,UAAU;GACzD,MAAM,iBAAiB,MAAM,eAAe;AAC5C,OAAI,kBAAkB,EACpB;AAIF,OAAI,0BAA0B,KAC5B,yBAAwB,WAAW;AAKrC,eAAY,QAAQ;GAGpB,MAAM,SAAS,wBAAwB;AAGvC,cAAW,QAAQ,WADH,KAAK,IAAI,GAAG,OACS,EAAE,EAAE,UAAU,6BAA6B,CAAC;IACjF;EAEF,MAAM,UAAU,SAAS,YAAY,iBAAiB;AACpD,OAAI,0BAA0B,MAAM;AAClC,eAAW,QAAQ,WAAW,uBAAuB,EACnD,UAAU,6BACX,CAAC;AACF,4BAAwB;;IAE1B;AAEF,eAAa;AACX,WAAQ,QAAQ;AAChB,WAAQ,QAAQ;;IAEjB;EAAC;EAAQ;EAAY;EAAY,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
3
|
//#region src/components/BottomSheet/utils.ts
|
|
5
4
|
/** Default snap point used when neither `snapPoints` nor `height` is specified. */
|
|
6
5
|
const DEFAULT_SNAP_POINT = "40%";
|
|
@@ -68,10 +67,9 @@ function resolveSnapPositions(snapPoints, containerHeightPx, bottomInsetPx, maxH
|
|
|
68
67
|
closedTranslateY: containerHeightPx + bottomInsetPx
|
|
69
68
|
};
|
|
70
69
|
}
|
|
71
|
-
|
|
72
70
|
//#endregion
|
|
73
71
|
exports.DEFAULT_SNAP_POINT = DEFAULT_SNAP_POINT;
|
|
74
72
|
exports.clamp = clamp;
|
|
75
73
|
exports.clampIndex = clampIndex;
|
|
76
74
|
exports.resolveHeightToPx = resolveHeightToPx;
|
|
77
|
-
exports.resolveSnapPositions = resolveSnapPositions;
|
|
75
|
+
exports.resolveSnapPositions = resolveSnapPositions;
|
|
@@ -66,7 +66,7 @@ function resolveSnapPositions(snapPoints, containerHeightPx, bottomInsetPx, maxH
|
|
|
66
66
|
closedTranslateY: containerHeightPx + bottomInsetPx
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
|
|
70
69
|
//#endregion
|
|
71
70
|
export { DEFAULT_SNAP_POINT, clamp, clampIndex, resolveHeightToPx, resolveSnapPositions };
|
|
71
|
+
|
|
72
72
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/BottomSheet/utils.ts"],"sourcesContent":["import type { BottomSheetHeight } from './types';\n\n/** Default snap point used when neither `snapPoints` nor `height` is specified. */\nconst DEFAULT_SNAP_POINT: BottomSheetHeight = '40%';\n\n/**\n * Resolves a {@link BottomSheetHeight} string to a pixel value.\n *\n * @param height - A percentage (`'50%'`) or pixel (`'300px'`) string.\n * @param containerHeightPx - The container height in pixels (used for `%` values).\n * @returns The resolved height in pixels, or `0` if the format is invalid.\n */\nfunction resolveHeightToPx(height: BottomSheetHeight, containerHeightPx: number): number {\n 'worklet';\n const trimmed = (height as string).trim();\n\n if (trimmed.endsWith('%')) {\n const pct = Number.parseFloat(trimmed.slice(0, -1));\n if (Number.isFinite(pct)) {\n return (pct / 100) * containerHeightPx;\n }\n }\n\n if (trimmed.endsWith('px')) {\n const px = Number.parseFloat(trimmed.slice(0, -2));\n if (Number.isFinite(px)) {\n return px;\n }\n }\n\n return 0;\n}\n\n/**\n * Clamps an index into the valid range `[0, length - 1]`.\n *\n * @param index - The index to clamp.\n * @param length - The length of the array.\n * @returns The clamped index.\n */\nfunction clampIndex(index: number, length: number): number {\n 'worklet';\n if (length <= 0) {\n return 0;\n }\n return Math.max(0, Math.min(index, length - 1));\n}\n\n/**\n * Clamps a numeric value to `[min, max]`.\n *\n * @param value - The value to clamp.\n * @param min - Lower bound.\n * @param max - Upper bound.\n * @returns The clamped value.\n */\nfunction clamp(value: number, min: number, max: number): number {\n 'worklet';\n return Math.max(min, Math.min(max, value));\n}\n\n/**\n * Resolves an array of snap points into pixel heights and translateY positions.\n *\n * Position model: `translateY = containerHeight - snapHeightPx - bottomInsetPx`\n *\n * @param snapPoints - Array of snap point height strings.\n * @param containerHeightPx - Container height in pixels.\n * @param bottomInsetPx - Bottom inset (margin + safe area) in pixels.\n * @param maxHeightPx - Maximum allowed sheet height in pixels.\n * @returns Object containing `heightsPx`, `translateYs`, and `closedTranslateY`.\n */\nfunction resolveSnapPositions(\n snapPoints: BottomSheetHeight[],\n containerHeightPx: number,\n bottomInsetPx: number,\n maxHeightPx: number,\n) {\n 'worklet';\n const heightsPx = snapPoints.map((sp) =>\n clamp(resolveHeightToPx(sp, containerHeightPx), 0, maxHeightPx),\n );\n const translateYs = heightsPx.map((h) => containerHeightPx - h - bottomInsetPx);\n const closedTranslateY = containerHeightPx + bottomInsetPx;\n\n return { heightsPx, translateYs, closedTranslateY };\n}\n\nexport { clamp, clampIndex, DEFAULT_SNAP_POINT, resolveHeightToPx, resolveSnapPositions };\n"],"mappings":";;;AAGA,MAAM,qBAAwC;;;;;;;;AAS9C,SAAS,kBAAkB,QAA2B,mBAAmC;AACvF;CACA,MAAM,UAAW,OAAkB,MAAM;AAEzC,KAAI,QAAQ,SAAS,IAAI,EAAE;EACzB,MAAM,MAAM,OAAO,WAAW,QAAQ,MAAM,GAAG,GAAG,CAAC;AACnD,MAAI,OAAO,SAAS,IAAI,CACtB,QAAQ,MAAM,MAAO;;AAIzB,KAAI,QAAQ,SAAS,KAAK,EAAE;EAC1B,MAAM,KAAK,OAAO,WAAW,QAAQ,MAAM,GAAG,GAAG,CAAC;AAClD,MAAI,OAAO,SAAS,GAAG,CACrB,QAAO;;AAIX,QAAO;;;;;;;;;AAUT,SAAS,WAAW,OAAe,QAAwB;AACzD;AACA,KAAI,UAAU,EACZ,QAAO;AAET,QAAO,KAAK,IAAI,GAAG,KAAK,IAAI,OAAO,SAAS,EAAE,CAAC;;;;;;;;;;AAWjD,SAAS,MAAM,OAAe,KAAa,KAAqB;AAC9D;AACA,QAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,MAAM,CAAC;;;;;;;;;;;;;AAc5C,SAAS,qBACP,YACA,mBACA,eACA,aACA;AACA;CACA,MAAM,YAAY,WAAW,KAAK,OAChC,MAAM,kBAAkB,IAAI,kBAAkB,EAAE,GAAG,YAAY,CAChE;AAID,QAAO;EAAE;EAAW,aAHA,UAAU,KAAK,MAAM,oBAAoB,IAAI,
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/BottomSheet/utils.ts"],"sourcesContent":["import type { BottomSheetHeight } from './types';\n\n/** Default snap point used when neither `snapPoints` nor `height` is specified. */\nconst DEFAULT_SNAP_POINT: BottomSheetHeight = '40%';\n\n/**\n * Resolves a {@link BottomSheetHeight} string to a pixel value.\n *\n * @param height - A percentage (`'50%'`) or pixel (`'300px'`) string.\n * @param containerHeightPx - The container height in pixels (used for `%` values).\n * @returns The resolved height in pixels, or `0` if the format is invalid.\n */\nfunction resolveHeightToPx(height: BottomSheetHeight, containerHeightPx: number): number {\n 'worklet';\n const trimmed = (height as string).trim();\n\n if (trimmed.endsWith('%')) {\n const pct = Number.parseFloat(trimmed.slice(0, -1));\n if (Number.isFinite(pct)) {\n return (pct / 100) * containerHeightPx;\n }\n }\n\n if (trimmed.endsWith('px')) {\n const px = Number.parseFloat(trimmed.slice(0, -2));\n if (Number.isFinite(px)) {\n return px;\n }\n }\n\n return 0;\n}\n\n/**\n * Clamps an index into the valid range `[0, length - 1]`.\n *\n * @param index - The index to clamp.\n * @param length - The length of the array.\n * @returns The clamped index.\n */\nfunction clampIndex(index: number, length: number): number {\n 'worklet';\n if (length <= 0) {\n return 0;\n }\n return Math.max(0, Math.min(index, length - 1));\n}\n\n/**\n * Clamps a numeric value to `[min, max]`.\n *\n * @param value - The value to clamp.\n * @param min - Lower bound.\n * @param max - Upper bound.\n * @returns The clamped value.\n */\nfunction clamp(value: number, min: number, max: number): number {\n 'worklet';\n return Math.max(min, Math.min(max, value));\n}\n\n/**\n * Resolves an array of snap points into pixel heights and translateY positions.\n *\n * Position model: `translateY = containerHeight - snapHeightPx - bottomInsetPx`\n *\n * @param snapPoints - Array of snap point height strings.\n * @param containerHeightPx - Container height in pixels.\n * @param bottomInsetPx - Bottom inset (margin + safe area) in pixels.\n * @param maxHeightPx - Maximum allowed sheet height in pixels.\n * @returns Object containing `heightsPx`, `translateYs`, and `closedTranslateY`.\n */\nfunction resolveSnapPositions(\n snapPoints: BottomSheetHeight[],\n containerHeightPx: number,\n bottomInsetPx: number,\n maxHeightPx: number,\n) {\n 'worklet';\n const heightsPx = snapPoints.map((sp) =>\n clamp(resolveHeightToPx(sp, containerHeightPx), 0, maxHeightPx),\n );\n const translateYs = heightsPx.map((h) => containerHeightPx - h - bottomInsetPx);\n const closedTranslateY = containerHeightPx + bottomInsetPx;\n\n return { heightsPx, translateYs, closedTranslateY };\n}\n\nexport { clamp, clampIndex, DEFAULT_SNAP_POINT, resolveHeightToPx, resolveSnapPositions };\n"],"mappings":";;;AAGA,MAAM,qBAAwC;;;;;;;;AAS9C,SAAS,kBAAkB,QAA2B,mBAAmC;AACvF;CACA,MAAM,UAAW,OAAkB,MAAM;AAEzC,KAAI,QAAQ,SAAS,IAAI,EAAE;EACzB,MAAM,MAAM,OAAO,WAAW,QAAQ,MAAM,GAAG,GAAG,CAAC;AACnD,MAAI,OAAO,SAAS,IAAI,CACtB,QAAQ,MAAM,MAAO;;AAIzB,KAAI,QAAQ,SAAS,KAAK,EAAE;EAC1B,MAAM,KAAK,OAAO,WAAW,QAAQ,MAAM,GAAG,GAAG,CAAC;AAClD,MAAI,OAAO,SAAS,GAAG,CACrB,QAAO;;AAIX,QAAO;;;;;;;;;AAUT,SAAS,WAAW,OAAe,QAAwB;AACzD;AACA,KAAI,UAAU,EACZ,QAAO;AAET,QAAO,KAAK,IAAI,GAAG,KAAK,IAAI,OAAO,SAAS,EAAE,CAAC;;;;;;;;;;AAWjD,SAAS,MAAM,OAAe,KAAa,KAAqB;AAC9D;AACA,QAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,MAAM,CAAC;;;;;;;;;;;;;AAc5C,SAAS,qBACP,YACA,mBACA,eACA,aACA;AACA;CACA,MAAM,YAAY,WAAW,KAAK,OAChC,MAAM,kBAAkB,IAAI,kBAAkB,EAAE,GAAG,YAAY,CAChE;AAID,QAAO;EAAE;EAAW,aAHA,UAAU,KAAK,MAAM,oBAAoB,IAAI,cAGlC;EAAE,kBAFR,oBAAoB;EAEM"}
|
package/dist/components/Box.cjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let react_native = require("react-native");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
let generated_styles = require("../../generated/styles");
|
|
8
8
|
let react_native_unistyles = require("react-native-unistyles");
|
|
9
|
-
|
|
10
9
|
//#region src/components/Box.tsx
|
|
11
10
|
let BlurView = null;
|
|
12
11
|
let blurLoadState = "pending";
|
|
@@ -224,6 +223,5 @@ const shadowSheet = react_native_unistyles.StyleSheet.create((theme) => ({ shado
|
|
|
224
223
|
const parts = [drop ? theme.boxShadow.drop[drop] : "", inset ? theme.boxShadow.inset[inset] : ""].filter(Boolean);
|
|
225
224
|
return parts.length > 0 ? { boxShadow: parts.join(", ") } : {};
|
|
226
225
|
} }));
|
|
227
|
-
|
|
228
226
|
//#endregion
|
|
229
|
-
exports.Box = Box;
|
|
227
|
+
exports.Box = Box;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { ElevationLevel } from "../types/dist/index.cjs";
|
|
3
3
|
import { SizeProps } from "../types.cjs";
|
|
4
|
-
import * as react from "react";
|
|
4
|
+
import * as _$react from "react";
|
|
5
5
|
import { Ref, RefObject } from "react";
|
|
6
6
|
import { View, ViewProps } from "react-native";
|
|
7
7
|
import { StyleProps } from "../../generated/styles";
|
|
@@ -98,7 +98,7 @@ interface BoxProps extends ViewProps, SizeProps {
|
|
|
98
98
|
* @see {@link HStack} for horizontal layouts
|
|
99
99
|
* @see {@link VStack} for vertical layouts
|
|
100
100
|
*/
|
|
101
|
-
declare const Box: react.NamedExoticComponent<BoxProps>;
|
|
101
|
+
declare const Box: _$react.NamedExoticComponent<BoxProps>;
|
|
102
102
|
//#endregion
|
|
103
103
|
export { Box, type BoxProps };
|
|
104
104
|
//# sourceMappingURL=Box.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.cts","names":[],"sources":["../../src/components/Box.tsx"],"mappings":";;;;;;;;;UAmDU,QAAA,SAAiB,SAAA,EAAW,SAAA;EACpC,GAAA,GAAM,GAAA,CAAI,IAAA;EACV,SAAA,GAAY,cAAA;EACZ,eAAA,GAAkB,UAAA;EAClB,YAAA,GAAe,UAAA;EACf,oBAAA,GAAuB,UAAA;EACvB,kBAAA,GAAqB,UAAA;EACrB,uBAAA,GAA0B,UAAA;EAC1B,qBAAA,GAAwB,UAAA;EACxB,WAAA,GAAc,UAAA;EACd,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,WAAA,GAAc,UAAA;EACd,mBAAA,GAAsB,UAAA;EACtB,qBAAA,GAAwB,UAAA;EACxB,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,YAAA,GAAe,UAAA;EACf,UAAA,GAAa,UAAA;EACb,SAAA,GAAY,UAAA;EACZ,IAAA,GAAO,UAAA;EACP,aAAA,GAAgB,UAAA;EAChB,QAAA,GAAW,UAAA;EACX,UAAA,GAAa,UAAA;EACb,QAAA,GAAW,UAAA;EACX,cAAA,GAAiB,UAAA;EAEjB,OAAA,GAAU,UAAA;EACV,QAAA,GAAW,UAAA;EAIX,OAAA,GAAU,UAAA;EACV,iBAAA,GAAoB,UAAA;EACpB,eAAA,GAAkB,UAAA;EAClB,aAAA,GAAgB,UAAA;EAChB,UAAA,GAAa,UAAA;EACb,YAAA,GAAe,UAAA;EACf,UAAA,GAAa,UAAA;EACb,MAAA,GAAS,UAAA;EACT,cAAA,GAAiB,UAAA;EACjB,gBAAA,GAAmB,UAAA;EACnB,YAAA,GAAe,UAAA;EACf,SAAA,GAAY,UAAA;EACZ,WAAA,GAAc,UAAA;EACd,SAAA,GAAY,UAAA;EACZ,SAAA,GAAY,UAAA;EACZ,MAAA,GAAS,UAAA;EACT,UAAA,GAAa,UAAA;EACb,WAAA,GAAc,UAAA;EACd,6BAAA;EACA,yBAAA;EAJS;;;;EAST,IAAA;EA5DyB;;;;EAiEzB,UAAA,GAAa,SAAA,CAAU,IAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BnB,GAAA,EAAG,
|
|
1
|
+
{"version":3,"file":"Box.d.cts","names":[],"sources":["../../src/components/Box.tsx"],"mappings":";;;;;;;;;UAmDU,QAAA,SAAiB,SAAA,EAAW,SAAA;EACpC,GAAA,GAAM,GAAA,CAAI,IAAA;EACV,SAAA,GAAY,cAAA;EACZ,eAAA,GAAkB,UAAA;EAClB,YAAA,GAAe,UAAA;EACf,oBAAA,GAAuB,UAAA;EACvB,kBAAA,GAAqB,UAAA;EACrB,uBAAA,GAA0B,UAAA;EAC1B,qBAAA,GAAwB,UAAA;EACxB,WAAA,GAAc,UAAA;EACd,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,WAAA,GAAc,UAAA;EACd,mBAAA,GAAsB,UAAA;EACtB,qBAAA,GAAwB,UAAA;EACxB,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,YAAA,GAAe,UAAA;EACf,UAAA,GAAa,UAAA;EACb,SAAA,GAAY,UAAA;EACZ,IAAA,GAAO,UAAA;EACP,aAAA,GAAgB,UAAA;EAChB,QAAA,GAAW,UAAA;EACX,UAAA,GAAa,UAAA;EACb,QAAA,GAAW,UAAA;EACX,cAAA,GAAiB,UAAA;EAEjB,OAAA,GAAU,UAAA;EACV,QAAA,GAAW,UAAA;EAIX,OAAA,GAAU,UAAA;EACV,iBAAA,GAAoB,UAAA;EACpB,eAAA,GAAkB,UAAA;EAClB,aAAA,GAAgB,UAAA;EAChB,UAAA,GAAa,UAAA;EACb,YAAA,GAAe,UAAA;EACf,UAAA,GAAa,UAAA;EACb,MAAA,GAAS,UAAA;EACT,cAAA,GAAiB,UAAA;EACjB,gBAAA,GAAmB,UAAA;EACnB,YAAA,GAAe,UAAA;EACf,SAAA,GAAY,UAAA;EACZ,WAAA,GAAc,UAAA;EACd,SAAA,GAAY,UAAA;EACZ,SAAA,GAAY,UAAA;EACZ,MAAA,GAAS,UAAA;EACT,UAAA,GAAa,UAAA;EACb,WAAA,GAAc,UAAA;EACd,6BAAA;EACA,yBAAA;EAJS;;;;EAST,IAAA;EA5DyB;;;;EAiEzB,UAAA,GAAa,SAAA,CAAU,IAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BnB,GAAA,EAAG,OAAA,CAAA,oBAAA,CAAA,QAAA"}
|
package/dist/components/Box.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { ElevationLevel } from "../types/dist/index.js";
|
|
3
3
|
import { SizeProps } from "../types.js";
|
|
4
|
-
import * as react from "react";
|
|
4
|
+
import * as _$react from "react";
|
|
5
5
|
import { Ref, RefObject } from "react";
|
|
6
6
|
import { View, ViewProps } from "react-native";
|
|
7
7
|
import { StyleProps } from "../../generated/styles";
|
|
@@ -98,7 +98,7 @@ interface BoxProps extends ViewProps, SizeProps {
|
|
|
98
98
|
* @see {@link HStack} for horizontal layouts
|
|
99
99
|
* @see {@link VStack} for vertical layouts
|
|
100
100
|
*/
|
|
101
|
-
declare const Box: react.NamedExoticComponent<BoxProps>;
|
|
101
|
+
declare const Box: _$react.NamedExoticComponent<BoxProps>;
|
|
102
102
|
//#endregion
|
|
103
103
|
export { Box, type BoxProps };
|
|
104
104
|
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","names":[],"sources":["../../src/components/Box.tsx"],"mappings":";;;;;;;;;UAmDU,QAAA,SAAiB,SAAA,EAAW,SAAA;EACpC,GAAA,GAAM,GAAA,CAAI,IAAA;EACV,SAAA,GAAY,cAAA;EACZ,eAAA,GAAkB,UAAA;EAClB,YAAA,GAAe,UAAA;EACf,oBAAA,GAAuB,UAAA;EACvB,kBAAA,GAAqB,UAAA;EACrB,uBAAA,GAA0B,UAAA;EAC1B,qBAAA,GAAwB,UAAA;EACxB,WAAA,GAAc,UAAA;EACd,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,WAAA,GAAc,UAAA;EACd,mBAAA,GAAsB,UAAA;EACtB,qBAAA,GAAwB,UAAA;EACxB,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,YAAA,GAAe,UAAA;EACf,UAAA,GAAa,UAAA;EACb,SAAA,GAAY,UAAA;EACZ,IAAA,GAAO,UAAA;EACP,aAAA,GAAgB,UAAA;EAChB,QAAA,GAAW,UAAA;EACX,UAAA,GAAa,UAAA;EACb,QAAA,GAAW,UAAA;EACX,cAAA,GAAiB,UAAA;EAEjB,OAAA,GAAU,UAAA;EACV,QAAA,GAAW,UAAA;EAIX,OAAA,GAAU,UAAA;EACV,iBAAA,GAAoB,UAAA;EACpB,eAAA,GAAkB,UAAA;EAClB,aAAA,GAAgB,UAAA;EAChB,UAAA,GAAa,UAAA;EACb,YAAA,GAAe,UAAA;EACf,UAAA,GAAa,UAAA;EACb,MAAA,GAAS,UAAA;EACT,cAAA,GAAiB,UAAA;EACjB,gBAAA,GAAmB,UAAA;EACnB,YAAA,GAAe,UAAA;EACf,SAAA,GAAY,UAAA;EACZ,WAAA,GAAc,UAAA;EACd,SAAA,GAAY,UAAA;EACZ,SAAA,GAAY,UAAA;EACZ,MAAA,GAAS,UAAA;EACT,UAAA,GAAa,UAAA;EACb,WAAA,GAAc,UAAA;EACd,6BAAA;EACA,yBAAA;EAJS;;;;EAST,IAAA;EA5DyB;;;;EAiEzB,UAAA,GAAa,SAAA,CAAU,IAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BnB,GAAA,EAAG,
|
|
1
|
+
{"version":3,"file":"Box.d.ts","names":[],"sources":["../../src/components/Box.tsx"],"mappings":";;;;;;;;;UAmDU,QAAA,SAAiB,SAAA,EAAW,SAAA;EACpC,GAAA,GAAM,GAAA,CAAI,IAAA;EACV,SAAA,GAAY,cAAA;EACZ,eAAA,GAAkB,UAAA;EAClB,YAAA,GAAe,UAAA;EACf,oBAAA,GAAuB,UAAA;EACvB,kBAAA,GAAqB,UAAA;EACrB,uBAAA,GAA0B,UAAA;EAC1B,qBAAA,GAAwB,UAAA;EACxB,WAAA,GAAc,UAAA;EACd,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,WAAA,GAAc,UAAA;EACd,mBAAA,GAAsB,UAAA;EACtB,qBAAA,GAAwB,UAAA;EACxB,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,YAAA,GAAe,UAAA;EACf,UAAA,GAAa,UAAA;EACb,SAAA,GAAY,UAAA;EACZ,IAAA,GAAO,UAAA;EACP,aAAA,GAAgB,UAAA;EAChB,QAAA,GAAW,UAAA;EACX,UAAA,GAAa,UAAA;EACb,QAAA,GAAW,UAAA;EACX,cAAA,GAAiB,UAAA;EAEjB,OAAA,GAAU,UAAA;EACV,QAAA,GAAW,UAAA;EAIX,OAAA,GAAU,UAAA;EACV,iBAAA,GAAoB,UAAA;EACpB,eAAA,GAAkB,UAAA;EAClB,aAAA,GAAgB,UAAA;EAChB,UAAA,GAAa,UAAA;EACb,YAAA,GAAe,UAAA;EACf,UAAA,GAAa,UAAA;EACb,MAAA,GAAS,UAAA;EACT,cAAA,GAAiB,UAAA;EACjB,gBAAA,GAAmB,UAAA;EACnB,YAAA,GAAe,UAAA;EACf,SAAA,GAAY,UAAA;EACZ,WAAA,GAAc,UAAA;EACd,SAAA,GAAY,UAAA;EACZ,SAAA,GAAY,UAAA;EACZ,MAAA,GAAS,UAAA;EACT,UAAA,GAAa,UAAA;EACb,WAAA,GAAc,UAAA;EACd,6BAAA;EACA,yBAAA;EAJS;;;;EAST,IAAA;EA5DyB;;;;EAiEzB,UAAA,GAAa,SAAA,CAAU,IAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BnB,GAAA,EAAG,OAAA,CAAA,oBAAA,CAAA,QAAA"}
|
package/dist/components/Box.js
CHANGED
|
@@ -4,7 +4,6 @@ import { Platform, View } from "react-native";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { styles } from "../../generated/styles";
|
|
6
6
|
import { StyleSheet as StyleSheet$1, useUnistyles } from "react-native-unistyles";
|
|
7
|
-
|
|
8
7
|
//#region src/components/Box.tsx
|
|
9
8
|
let BlurView = null;
|
|
10
9
|
let blurLoadState = "pending";
|
|
@@ -222,7 +221,7 @@ const shadowSheet = StyleSheet$1.create((theme) => ({ shadow: (drop, inset) => {
|
|
|
222
221
|
const parts = [drop ? theme.boxShadow.drop[drop] : "", inset ? theme.boxShadow.inset[inset] : ""].filter(Boolean);
|
|
223
222
|
return parts.length > 0 ? { boxShadow: parts.join(", ") } : {};
|
|
224
223
|
} }));
|
|
225
|
-
|
|
226
224
|
//#endregion
|
|
227
225
|
export { Box };
|
|
226
|
+
|
|
228
227
|
//# sourceMappingURL=Box.js.map
|