@tamagui/react-native-web-lite 1.116.1 → 1.116.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/AccessibilityInfo/index.js +96 -0
- package/dist/cjs/ActivityIndicator/__tests__/index-test.js +116 -0
- package/dist/cjs/ActivityIndicator/index.js +108 -0
- package/dist/cjs/Alert/index.js +25 -0
- package/dist/cjs/AppRegistry/AppContainer.js +41 -0
- package/dist/cjs/AppRegistry/__tests__/index-test.js +77 -0
- package/dist/cjs/AppRegistry/__tests__/index-test.node.js +131 -0
- package/dist/cjs/AppRegistry/index.js +98 -0
- package/dist/cjs/AppRegistry/renderApplication.js +51 -0
- package/dist/cjs/AppState/__tests__/index-test.js +33 -0
- package/dist/cjs/AppState/index.js +71 -0
- package/dist/cjs/Appearance/index.js +41 -0
- package/dist/cjs/BackHandler/index.js +32 -0
- package/dist/cjs/Clipboard/index.js +47 -0
- package/dist/cjs/DeviceEmitter.js +29 -0
- package/dist/cjs/DeviceInfo/index.js +62 -0
- package/dist/cjs/Dimensions/__tests__/index-test.js +51 -0
- package/dist/cjs/Dimensions/index.js +74 -0
- package/dist/cjs/I18nManager/index.js +30 -0
- package/dist/cjs/Image/index.js +253 -0
- package/dist/cjs/Image/types.js +14 -0
- package/dist/cjs/ImageBackground/__tests__/index-test.js +48 -0
- package/dist/cjs/ImageBackground/index.js +62 -0
- package/dist/cjs/Keyboard/index.js +35 -0
- package/dist/cjs/KeyboardAvoidingView/index.js +56 -0
- package/dist/cjs/Linking/__tests__/index-test.js +38 -0
- package/dist/cjs/Linking/index.js +86 -0
- package/dist/cjs/LogBox/index.js +31 -0
- package/dist/cjs/Modal/ModalAnimation.js +137 -0
- package/dist/cjs/Modal/ModalContent.js +75 -0
- package/dist/cjs/Modal/ModalFocusTrap.js +105 -0
- package/dist/cjs/Modal/ModalPortal.js +43 -0
- package/dist/cjs/Modal/index.js +92 -0
- package/dist/cjs/NativeModules/index.js +25 -0
- package/dist/cjs/PanResponder/index.js +29 -0
- package/dist/cjs/PixelRatio/index.js +60 -0
- package/dist/cjs/Pressable/index.js +140 -0
- package/dist/cjs/RefreshControl/index.js +48 -0
- package/dist/cjs/SafeAreaView/index.js +43 -0
- package/dist/cjs/ScrollView/ScrollViewBase.js +124 -0
- package/dist/cjs/ScrollView/index.js +374 -0
- package/dist/cjs/Share/index.js +56 -0
- package/dist/cjs/StatusBar/index.js +31 -0
- package/dist/cjs/Text/index.js +152 -0
- package/dist/cjs/Text/types.js +14 -0
- package/dist/cjs/TextInput/__tests__/index-test.js +422 -0
- package/dist/cjs/TextInput/index.js +260 -0
- package/dist/cjs/TextInput/types.js +14 -0
- package/dist/cjs/TouchableOpacity.js +123 -0
- package/dist/cjs/TouchableWithoutFeedback.js +90 -0
- package/dist/cjs/UnimplementedView.js +36 -0
- package/dist/cjs/Vibration/index.js +31 -0
- package/dist/cjs/View/index.js +101 -0
- package/dist/cjs/View/types.js +14 -0
- package/dist/cjs/createElement/__tests__/index-test.js +536 -0
- package/dist/cjs/createElement/index.js +37 -0
- package/dist/cjs/createReactDOMStyle.js +21 -0
- package/dist/cjs/findNodeHandle.js +29 -0
- package/dist/cjs/index.js +110 -0
- package/dist/cjs/render/index.js +45 -0
- package/dist/cjs/styleTypes.js +14 -0
- package/dist/cjs/types.js +14 -0
- package/dist/cjs/useColorScheme/index.js +39 -0
- package/dist/cjs/useLocaleContext/index.js +21 -0
- package/dist/cjs/useWindowDimensions/index.js +41 -0
- package/dist/cjs/vendor/react-native/Animated/Animated.js +35 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedEvent.js +143 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedImplementation.js +458 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedMock.js +126 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedPlatformConfig.js +2 -0
- package/dist/cjs/vendor/react-native/Animated/Easing.js +189 -0
- package/dist/cjs/vendor/react-native/Animated/NativeAnimatedHelper.js +335 -0
- package/dist/cjs/vendor/react-native/Animated/NativeAnimatedModule.js +29 -0
- package/dist/cjs/vendor/react-native/Animated/NativeAnimatedTurboModule.js +29 -0
- package/dist/cjs/vendor/react-native/Animated/SpringConfig.js +70 -0
- package/dist/cjs/vendor/react-native/Animated/animations/Animation.js +64 -0
- package/dist/cjs/vendor/react-native/Animated/animations/DecayAnimation.js +63 -0
- package/dist/cjs/vendor/react-native/Animated/animations/SpringAnimation.js +146 -0
- package/dist/cjs/vendor/react-native/Animated/animations/TimingAnimation.js +82 -0
- package/dist/cjs/vendor/react-native/Animated/bezier.js +72 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedImage.js +29 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedScrollView.js +38 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedText.js +29 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedView.js +29 -0
- package/dist/cjs/vendor/react-native/Animated/createAnimatedComponent.js +42 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedAddition.js +57 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedColor.js +197 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedDiffClamp.js +60 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedDivision.js +58 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedInterpolation.js +175 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedModulo.js +58 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedMultiplication.js +57 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedNode.js +136 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedProps.js +112 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedStyle.js +100 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedSubtraction.js +57 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedTracking.js +76 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedTransform.js +100 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedValue.js +182 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedValueXY.js +167 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedWithChildren.js +67 -0
- package/dist/cjs/vendor/react-native/Animated/useAnimatedProps.js +89 -0
- package/dist/cjs/vendor/react-native/FeatureFlags.js +28 -0
- package/dist/cjs/vendor/react-native/NativeEventEmitter/RCTDeviceEventEmitter.js +29 -0
- package/dist/cjs/vendor/react-native/NativeEventEmitter/index.js +73 -0
- package/dist/cjs/vendor/react-native/PanResponder/index.js +272 -0
- package/dist/cjs/vendor/react-native/TouchHistoryMath/index.js +118 -0
- package/dist/cjs/vendor/react-native/TurboModule/RCTExport.js +2 -0
- package/dist/cjs/vendor/react-native/TurboModule/TurboModuleRegistry.js +28 -0
- package/dist/cjs/vendor/react-native/Types/CoreEventTypes.js +15 -0
- package/dist/cjs/vendor/react-native/Utilities/setAndForwardRef.js +29 -0
- package/dist/cjs/vendor/react-native/emitter/EventEmitter.js +30 -0
- package/dist/cjs/vendor/react-native/emitter/EventSubscription.js +2 -0
- package/dist/cjs/vendor/react-native/emitter/_EmitterSubscription.js +55 -0
- package/dist/cjs/vendor/react-native/emitter/_EventEmitter.js +135 -0
- package/dist/cjs/vendor/react-native/emitter/_EventSubscription.js +37 -0
- package/dist/cjs/vendor/react-native/emitter/_EventSubscriptionVendor.js +76 -0
- package/dist/cjs/vendor/react-native/infoLog/index.js +25 -0
- package/dist/cjs/vendor/react-native/useRefEffect.js +30 -0
- package/dist/cjs/without-animated.js +95 -0
- package/package.json +6 -6
- package/dist/cjs/PanResponder/Alternative.cjs +0 -198
- package/dist/cjs/PanResponder/Alternative.cjs.map +0 -6
- /package/dist/cjs/AccessibilityInfo/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/ActivityIndicator/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/ActivityIndicator/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Alert/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/AppRegistry/{AppContainer.cjs.map → AppContainer.js.map} +0 -0
- /package/dist/cjs/AppRegistry/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/AppRegistry/__tests__/{index-test.node.cjs.map → index-test.node.js.map} +0 -0
- /package/dist/cjs/AppRegistry/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/AppRegistry/{renderApplication.cjs.map → renderApplication.js.map} +0 -0
- /package/dist/cjs/AppState/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/AppState/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Appearance/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/BackHandler/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Clipboard/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/{DeviceEmitter.cjs.map → DeviceEmitter.js.map} +0 -0
- /package/dist/cjs/DeviceInfo/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Dimensions/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/Dimensions/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/I18nManager/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Image/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Image/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/ImageBackground/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/ImageBackground/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Keyboard/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/KeyboardAvoidingView/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Linking/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/Linking/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/LogBox/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Modal/{ModalAnimation.cjs.map → ModalAnimation.js.map} +0 -0
- /package/dist/cjs/Modal/{ModalContent.cjs.map → ModalContent.js.map} +0 -0
- /package/dist/cjs/Modal/{ModalFocusTrap.cjs.map → ModalFocusTrap.js.map} +0 -0
- /package/dist/cjs/Modal/{ModalPortal.cjs.map → ModalPortal.js.map} +0 -0
- /package/dist/cjs/Modal/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/NativeModules/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/PanResponder/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/PixelRatio/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Pressable/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/RefreshControl/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/SafeAreaView/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/ScrollView/{ScrollViewBase.cjs.map → ScrollViewBase.js.map} +0 -0
- /package/dist/cjs/ScrollView/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Share/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/StatusBar/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Text/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Text/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/TextInput/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/TextInput/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/TextInput/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/{TouchableOpacity.cjs.map → TouchableOpacity.js.map} +0 -0
- /package/dist/cjs/{TouchableWithoutFeedback.cjs.map → TouchableWithoutFeedback.js.map} +0 -0
- /package/dist/cjs/{UnimplementedView.cjs.map → UnimplementedView.js.map} +0 -0
- /package/dist/cjs/Vibration/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/View/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/View/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/createElement/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/createElement/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/{createReactDOMStyle.cjs.map → createReactDOMStyle.js.map} +0 -0
- /package/dist/cjs/{findNodeHandle.cjs.map → findNodeHandle.js.map} +0 -0
- /package/dist/cjs/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/render/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/{styleTypes.cjs.map → styleTypes.js.map} +0 -0
- /package/dist/cjs/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/useColorScheme/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/useLocaleContext/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/useWindowDimensions/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{Animated.cjs.map → Animated.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{AnimatedEvent.cjs.map → AnimatedEvent.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{AnimatedImplementation.cjs.map → AnimatedImplementation.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{AnimatedMock.cjs.map → AnimatedMock.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{AnimatedPlatformConfig.cjs.map → AnimatedPlatformConfig.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{Easing.cjs.map → Easing.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{NativeAnimatedHelper.cjs.map → NativeAnimatedHelper.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{NativeAnimatedModule.cjs.map → NativeAnimatedModule.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{NativeAnimatedTurboModule.cjs.map → NativeAnimatedTurboModule.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{SpringConfig.cjs.map → SpringConfig.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/animations/{Animation.cjs.map → Animation.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/animations/{DecayAnimation.cjs.map → DecayAnimation.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/animations/{SpringAnimation.cjs.map → SpringAnimation.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/animations/{TimingAnimation.cjs.map → TimingAnimation.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{bezier.cjs.map → bezier.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/components/{AnimatedImage.cjs.map → AnimatedImage.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/components/{AnimatedScrollView.cjs.map → AnimatedScrollView.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/components/{AnimatedText.cjs.map → AnimatedText.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/components/{AnimatedView.cjs.map → AnimatedView.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{createAnimatedComponent.cjs.map → createAnimatedComponent.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedAddition.cjs.map → AnimatedAddition.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedColor.cjs.map → AnimatedColor.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedDiffClamp.cjs.map → AnimatedDiffClamp.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedDivision.cjs.map → AnimatedDivision.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedInterpolation.cjs.map → AnimatedInterpolation.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedModulo.cjs.map → AnimatedModulo.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedMultiplication.cjs.map → AnimatedMultiplication.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedNode.cjs.map → AnimatedNode.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedProps.cjs.map → AnimatedProps.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedStyle.cjs.map → AnimatedStyle.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedSubtraction.cjs.map → AnimatedSubtraction.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedTracking.cjs.map → AnimatedTracking.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedTransform.cjs.map → AnimatedTransform.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedValue.cjs.map → AnimatedValue.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedValueXY.cjs.map → AnimatedValueXY.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedWithChildren.cjs.map → AnimatedWithChildren.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{useAnimatedProps.cjs.map → useAnimatedProps.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/{FeatureFlags.cjs.map → FeatureFlags.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/NativeEventEmitter/{RCTDeviceEventEmitter.cjs.map → RCTDeviceEventEmitter.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/NativeEventEmitter/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/PanResponder/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/TouchHistoryMath/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/TurboModule/{RCTExport.cjs.map → RCTExport.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/TurboModule/{TurboModuleRegistry.cjs.map → TurboModuleRegistry.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Types/{CoreEventTypes.cjs.map → CoreEventTypes.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Utilities/{setAndForwardRef.cjs.map → setAndForwardRef.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/emitter/{EventEmitter.cjs.map → EventEmitter.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/emitter/{EventSubscription.cjs.map → EventSubscription.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/emitter/{_EmitterSubscription.cjs.map → _EmitterSubscription.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/emitter/{_EventEmitter.cjs.map → _EventEmitter.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/emitter/{_EventSubscription.cjs.map → _EventSubscription.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/emitter/{_EventSubscriptionVendor.cjs.map → _EventSubscriptionVendor.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/infoLog/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/{useRefEffect.cjs.map → useRefEffect.js.map} +0 -0
- /package/dist/cjs/{without-animated.cjs.map → without-animated.js.map} +0 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var ScrollView_exports = {};
|
|
24
|
+
__export(ScrollView_exports, {
|
|
25
|
+
default: () => ScrollView_default
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(ScrollView_exports);
|
|
28
|
+
var import_react = __toESM(require("react")), import_react_native_web_internals = require("@tamagui/react-native-web-internals"), import_View = __toESM(require("../View/index")), import_ScrollViewBase = __toESM(require("./ScrollViewBase")), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
const IS_ANIMATING_TOUCH_START_THRESHOLD_MS = 16;
|
|
30
|
+
class ScrollView extends import_react.default.Component {
|
|
31
|
+
_scrollNodeRef;
|
|
32
|
+
_innerViewRef;
|
|
33
|
+
keyboardWillOpenTo = null;
|
|
34
|
+
additionalScrollOffset = 0;
|
|
35
|
+
isTouching = !1;
|
|
36
|
+
lastMomentumScrollBeginTime = 0;
|
|
37
|
+
lastMomentumScrollEndTime = 0;
|
|
38
|
+
// Reset to false every time becomes responder. This is used to:
|
|
39
|
+
// - Determine if the scroll view has been scrolled and therefore should
|
|
40
|
+
// refuse to give up its responder lock.
|
|
41
|
+
// - Determine if releasing should dismiss the keyboard when we are in
|
|
42
|
+
// tap-to-dismiss mode (!this.props.keyboardShouldPersistTaps).
|
|
43
|
+
observedScrollSinceBecomingResponder = !1;
|
|
44
|
+
becameResponderWhileAnimating = !1;
|
|
45
|
+
/**
|
|
46
|
+
* Returns a reference to the underlying scroll responder, which supports
|
|
47
|
+
* operations like `scrollTo`. All ScrollView-like components should
|
|
48
|
+
* implement this method so that they can be composed while providing access
|
|
49
|
+
* to the underlying scroll responder's methods.
|
|
50
|
+
*/
|
|
51
|
+
getScrollResponder() {
|
|
52
|
+
return this.mixin;
|
|
53
|
+
}
|
|
54
|
+
getScrollableNode() {
|
|
55
|
+
return this._scrollNodeRef;
|
|
56
|
+
}
|
|
57
|
+
getInnerViewRef() {
|
|
58
|
+
return this._innerViewRef;
|
|
59
|
+
}
|
|
60
|
+
getInnerViewNode() {
|
|
61
|
+
return this._innerViewRef;
|
|
62
|
+
}
|
|
63
|
+
getNativeScrollRef() {
|
|
64
|
+
return this._scrollNodeRef;
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
const {
|
|
68
|
+
contentContainerStyle,
|
|
69
|
+
horizontal,
|
|
70
|
+
onContentSizeChange,
|
|
71
|
+
refreshControl,
|
|
72
|
+
stickyHeaderIndices,
|
|
73
|
+
pagingEnabled,
|
|
74
|
+
/* eslint-disable */
|
|
75
|
+
forwardedRef,
|
|
76
|
+
keyboardDismissMode,
|
|
77
|
+
onScroll,
|
|
78
|
+
centerContent,
|
|
79
|
+
/* eslint-enable */
|
|
80
|
+
...other
|
|
81
|
+
} = this.props;
|
|
82
|
+
if (process.env.NODE_ENV !== "production" && this.props.style) {
|
|
83
|
+
const style = import_react_native_web_internals.StyleSheet.flatten(this.props.style), childLayoutProps = ["alignItems", "justifyContent"].filter(
|
|
84
|
+
(prop) => style && style[prop] !== void 0
|
|
85
|
+
);
|
|
86
|
+
(0, import_react_native_web_internals.invariant)(
|
|
87
|
+
childLayoutProps.length === 0,
|
|
88
|
+
`ScrollView child layout (${JSON.stringify(childLayoutProps)}) must be applied through the contentContainerStyle prop.`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
let contentSizeChangeProps = {};
|
|
92
|
+
onContentSizeChange && (contentSizeChangeProps = {
|
|
93
|
+
onLayout: this._handleContentOnLayout.bind(this)
|
|
94
|
+
});
|
|
95
|
+
const hasStickyHeaderIndices = !horizontal && Array.isArray(stickyHeaderIndices), children = hasStickyHeaderIndices || pagingEnabled ? import_react.default.Children.map(this.props.children, (child, i) => {
|
|
96
|
+
const isSticky = hasStickyHeaderIndices && stickyHeaderIndices.indexOf(i) > -1;
|
|
97
|
+
return child != null && (isSticky || pagingEnabled) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
98
|
+
import_View.default,
|
|
99
|
+
{
|
|
100
|
+
style: import_react_native_web_internals.StyleSheet.compose(
|
|
101
|
+
isSticky && styles.stickyHeader,
|
|
102
|
+
pagingEnabled && styles.pagingEnabledChild
|
|
103
|
+
),
|
|
104
|
+
children: child
|
|
105
|
+
}
|
|
106
|
+
) : child;
|
|
107
|
+
}) : this.props.children, contentContainer = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
108
|
+
import_View.default,
|
|
109
|
+
{
|
|
110
|
+
...contentSizeChangeProps,
|
|
111
|
+
collapsable: !1,
|
|
112
|
+
ref: this._setInnerViewRef.bind(this),
|
|
113
|
+
style: [
|
|
114
|
+
horizontal && styles.contentContainerHorizontal,
|
|
115
|
+
centerContent && styles.contentContainerCenterContent,
|
|
116
|
+
contentContainerStyle
|
|
117
|
+
],
|
|
118
|
+
children
|
|
119
|
+
}
|
|
120
|
+
), baseStyle = horizontal ? styles.baseHorizontal : styles.baseVertical, pagingEnabledStyle = horizontal ? styles.pagingEnabledHorizontal : styles.pagingEnabledVertical, props = {
|
|
121
|
+
...other,
|
|
122
|
+
style: [baseStyle, pagingEnabled && pagingEnabledStyle, this.props.style],
|
|
123
|
+
onTouchStart: this.scrollResponderHandleTouchStart.bind(this),
|
|
124
|
+
onTouchMove: this.scrollResponderHandleTouchMove.bind(this),
|
|
125
|
+
onTouchEnd: this.scrollResponderHandleTouchEnd.bind(this),
|
|
126
|
+
onScrollBeginDrag: this.scrollResponderHandleScrollBeginDrag.bind(this),
|
|
127
|
+
onScrollEndDrag: this.scrollResponderHandleScrollEndDrag.bind(this),
|
|
128
|
+
onMomentumScrollBegin: this.scrollResponderHandleMomentumScrollBegin.bind(this),
|
|
129
|
+
onMomentumScrollEnd: this.scrollResponderHandleMomentumScrollEnd.bind(this),
|
|
130
|
+
onStartShouldSetResponder: this.scrollResponderHandleStartShouldSetResponder.bind(this),
|
|
131
|
+
onStartShouldSetResponderCapture: this.scrollResponderHandleStartShouldSetResponderCapture.bind(this),
|
|
132
|
+
onScrollShouldSetResponder: this.scrollResponderHandleScrollShouldSetResponder.bind(this),
|
|
133
|
+
onScroll: this._handleScroll.bind(this),
|
|
134
|
+
onResponderGrant: this.scrollResponderHandleResponderGrant.bind(this),
|
|
135
|
+
onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest.bind(this),
|
|
136
|
+
onResponderRelease: this.scrollResponderHandleResponderRelease.bind(this),
|
|
137
|
+
onResponderReject: this.scrollResponderHandleResponderReject.bind(this)
|
|
138
|
+
}, ScrollViewClass = import_ScrollViewBase.default;
|
|
139
|
+
(0, import_react_native_web_internals.invariant)(ScrollViewClass !== void 0, "ScrollViewClass must not be undefined");
|
|
140
|
+
const scrollView = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollViewClass, { ...props, ref: this._setScrollNodeRef.bind(this), children: contentContainer });
|
|
141
|
+
return refreshControl ? import_react.default.cloneElement(refreshControl, { style: props.style }, scrollView) : scrollView;
|
|
142
|
+
}
|
|
143
|
+
_handleContentOnLayout(e) {
|
|
144
|
+
const { width, height } = e.nativeEvent.layout;
|
|
145
|
+
this.props.onContentSizeChange(width, height);
|
|
146
|
+
}
|
|
147
|
+
_handleScroll(e) {
|
|
148
|
+
process.env.NODE_ENV !== "production" && this.props.onScroll && this.props.scrollEventThrottle == null && console.info(
|
|
149
|
+
"You specified `onScroll` on a <ScrollView> but not `scrollEventThrottle`. You will only receive one event. Using `16` you get all the events but be aware that it may cause frame drops, use a bigger number if you don't need as much precision."
|
|
150
|
+
), this.props.keyboardDismissMode === "on-drag" && (0, import_react_native_web_internals.dismissKeyboard)(), this.scrollResponderHandleScroll(e);
|
|
151
|
+
}
|
|
152
|
+
_setInnerViewRef(node) {
|
|
153
|
+
this._innerViewRef = node;
|
|
154
|
+
}
|
|
155
|
+
_setScrollNodeRef(node) {
|
|
156
|
+
this._scrollNodeRef = node, node != null && (node.getScrollResponder = this.getScrollResponder, node.getInnerViewNode = this.getInnerViewNode, node.getInnerViewRef = this.getInnerViewRef, node.getNativeScrollRef = this.getNativeScrollRef, node.getScrollableNode = this.getScrollableNode, node.scrollTo = this.scrollTo, node.scrollToEnd = this.scrollToEnd, node.scrollResponderZoomTo = this.scrollResponderZoomTo, node.scrollResponderScrollNativeHandleToKeyboard = this.scrollResponderScrollNativeHandleToKeyboard), (0, import_react_native_web_internals.mergeRefs)(this.props.forwardedRef)(node);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Invoke this from an `onScroll` event.
|
|
160
|
+
*/
|
|
161
|
+
scrollResponderHandleScrollShouldSetResponder() {
|
|
162
|
+
return this.isTouching;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Merely touch starting is not sufficient for a scroll view to become the
|
|
166
|
+
* responder. Being the "responder" means that the very next touch move/end
|
|
167
|
+
* event will result in an action/movement.
|
|
168
|
+
*
|
|
169
|
+
* Invoke this from an `onStartShouldSetResponder` event.
|
|
170
|
+
*
|
|
171
|
+
* `onStartShouldSetResponder` is used when the next move/end will trigger
|
|
172
|
+
* some UI movement/action, but when you want to yield priority to views
|
|
173
|
+
* nested inside of the view.
|
|
174
|
+
*
|
|
175
|
+
* There may be some cases where scroll views actually should return `true`
|
|
176
|
+
* from `onStartShouldSetResponder`: Any time we are detecting a standard tap
|
|
177
|
+
* that gives priority to nested views.
|
|
178
|
+
*
|
|
179
|
+
* - If a single tap on the scroll view triggers an action such as
|
|
180
|
+
* recentering a map style view yet wants to give priority to interaction
|
|
181
|
+
* views inside (such as dropped pins or labels), then we would return true
|
|
182
|
+
* from this method when there is a single touch.
|
|
183
|
+
*
|
|
184
|
+
* - Similar to the previous case, if a two finger "tap" should trigger a
|
|
185
|
+
* zoom, we would check the `touches` count, and if `>= 2`, we would return
|
|
186
|
+
* true.
|
|
187
|
+
*
|
|
188
|
+
*/
|
|
189
|
+
scrollResponderHandleStartShouldSetResponder() {
|
|
190
|
+
return !1;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* There are times when the scroll view wants to become the responder
|
|
194
|
+
* (meaning respond to the next immediate `touchStart/touchEnd`), in a way
|
|
195
|
+
* that *doesn't* give priority to nested views (hence the capture phase):
|
|
196
|
+
*
|
|
197
|
+
* - Currently animating.
|
|
198
|
+
* - Tapping anywhere that is not the focused input, while the keyboard is
|
|
199
|
+
* up (which should dismiss the keyboard).
|
|
200
|
+
*
|
|
201
|
+
* Invoke this from an `onStartShouldSetResponderCapture` event.
|
|
202
|
+
*/
|
|
203
|
+
scrollResponderHandleStartShouldSetResponderCapture(e) {
|
|
204
|
+
return this.scrollResponderIsAnimating();
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Invoke this from an `onResponderReject` event.
|
|
208
|
+
*
|
|
209
|
+
* Some other element is not yielding its role as responder. Normally, we'd
|
|
210
|
+
* just disable the `UIScrollView`, but a touch has already began on it, the
|
|
211
|
+
* `UIScrollView` will not accept being disabled after that. The easiest
|
|
212
|
+
* solution for now is to accept the limitation of disallowing this
|
|
213
|
+
* altogether. To improve this, find a way to disable the `UIScrollView` after
|
|
214
|
+
* a touch has already started.
|
|
215
|
+
*/
|
|
216
|
+
scrollResponderHandleResponderReject() {
|
|
217
|
+
(0, import_react_native_web_internals.warning)(!1, "ScrollView doesn't take rejection well - scrolls anyway");
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* We will allow the scroll view to give up its lock iff it acquired the lock
|
|
221
|
+
* during an animation. This is a very useful default that happens to satisfy
|
|
222
|
+
* many common user experiences.
|
|
223
|
+
*
|
|
224
|
+
* - Stop a scroll on the left edge, then turn that into an outer view's
|
|
225
|
+
* backswipe.
|
|
226
|
+
* - Stop a scroll mid-bounce at the top, continue pulling to have the outer
|
|
227
|
+
* view dismiss.
|
|
228
|
+
* - However, without catching the scroll view mid-bounce (while it is
|
|
229
|
+
* motionless), if you drag far enough for the scroll view to become
|
|
230
|
+
* responder (and therefore drag the scroll view a bit), any backswipe
|
|
231
|
+
* navigation of a swipe gesture higher in the view hierarchy, should be
|
|
232
|
+
* rejected.
|
|
233
|
+
*/
|
|
234
|
+
scrollResponderHandleTerminationRequest() {
|
|
235
|
+
return !this.observedScrollSinceBecomingResponder;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Invoke this from an `onTouchEnd` event.
|
|
239
|
+
*
|
|
240
|
+
* @param {SyntheticEvent} e Event.
|
|
241
|
+
*/
|
|
242
|
+
scrollResponderHandleTouchEnd(e) {
|
|
243
|
+
const nativeEvent = e.nativeEvent;
|
|
244
|
+
this.isTouching = nativeEvent.touches.length !== 0, this.props.onTouchEnd && this.props.onTouchEnd(e);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Invoke this from an `onResponderRelease` event.
|
|
248
|
+
*/
|
|
249
|
+
scrollResponderHandleResponderRelease(e) {
|
|
250
|
+
this.props.onResponderRelease && this.props.onResponderRelease(e);
|
|
251
|
+
const currentlyFocusedTextInput = import_react_native_web_internals.TextInputState.currentlyFocusedField();
|
|
252
|
+
!this.props.keyboardShouldPersistTaps && currentlyFocusedTextInput != null && e.target !== currentlyFocusedTextInput && !this.observedScrollSinceBecomingResponder && !this.becameResponderWhileAnimating && (this.props.onScrollResponderKeyboardDismissed && this.props.onScrollResponderKeyboardDismissed(e), import_react_native_web_internals.TextInputState.blurTextInput(currentlyFocusedTextInput));
|
|
253
|
+
}
|
|
254
|
+
scrollResponderHandleScroll(e) {
|
|
255
|
+
this.observedScrollSinceBecomingResponder = !0, this.props.onScroll && this.props.onScroll(e);
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Invoke this from an `onResponderGrant` event.
|
|
259
|
+
*/
|
|
260
|
+
scrollResponderHandleResponderGrant(e) {
|
|
261
|
+
this.observedScrollSinceBecomingResponder = !1, this.props.onResponderGrant && this.props.onResponderGrant(e), this.becameResponderWhileAnimating = this.scrollResponderIsAnimating();
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Unfortunately, `onScrollBeginDrag` also fires when *stopping* the scroll
|
|
265
|
+
* animation, and there's not an easy way to distinguish a drag vs. stopping
|
|
266
|
+
* momentum.
|
|
267
|
+
*
|
|
268
|
+
* Invoke this from an `onScrollBeginDrag` event.
|
|
269
|
+
*/
|
|
270
|
+
scrollResponderHandleScrollBeginDrag(e) {
|
|
271
|
+
this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Invoke this from an `onScrollEndDrag` event.
|
|
275
|
+
*/
|
|
276
|
+
scrollResponderHandleScrollEndDrag(e) {
|
|
277
|
+
this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Invoke this from an `onMomentumScrollBegin` event.
|
|
281
|
+
*/
|
|
282
|
+
scrollResponderHandleMomentumScrollBegin(e) {
|
|
283
|
+
this.lastMomentumScrollBeginTime = Date.now(), this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Invoke this from an `onMomentumScrollEnd` event.
|
|
287
|
+
*/
|
|
288
|
+
scrollResponderHandleMomentumScrollEnd(e) {
|
|
289
|
+
this.lastMomentumScrollEndTime = Date.now(), this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Invoke this from an `onTouchStart` event.
|
|
293
|
+
*
|
|
294
|
+
* Since we know that the `SimpleEventPlugin` occurs later in the plugin
|
|
295
|
+
* order, after `ResponderEventPlugin`, we can detect that we were *not*
|
|
296
|
+
* permitted to be the responder (presumably because a contained view became
|
|
297
|
+
* responder). The `onResponderReject` won't fire in that case - it only
|
|
298
|
+
* fires when a *current* responder rejects our request.
|
|
299
|
+
*
|
|
300
|
+
* @param {SyntheticEvent} e Touch Start event.
|
|
301
|
+
*/
|
|
302
|
+
scrollResponderHandleTouchStart(e) {
|
|
303
|
+
this.isTouching = !0, this.props.onTouchStart && this.props.onTouchStart(e);
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Invoke this from an `onTouchMove` event.
|
|
307
|
+
*
|
|
308
|
+
* Since we know that the `SimpleEventPlugin` occurs later in the plugin
|
|
309
|
+
* order, after `ResponderEventPlugin`, we can detect that we were *not*
|
|
310
|
+
* permitted to be the responder (presumably because a contained view became
|
|
311
|
+
* responder). The `onResponderReject` won't fire in that case - it only
|
|
312
|
+
* fires when a *current* responder rejects our request.
|
|
313
|
+
*
|
|
314
|
+
* @param {SyntheticEvent} e Touch Start event.
|
|
315
|
+
*/
|
|
316
|
+
scrollResponderHandleTouchMove(e) {
|
|
317
|
+
this.props.onTouchMove && this.props.onTouchMove(e);
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* A helper function for this class that lets us quickly determine if the
|
|
321
|
+
* view is currently animating. This is particularly useful to know when
|
|
322
|
+
* a touch has just started or ended.
|
|
323
|
+
*/
|
|
324
|
+
scrollResponderIsAnimating() {
|
|
325
|
+
return Date.now() - this.lastMomentumScrollEndTime < IS_ANIMATING_TOUCH_START_THRESHOLD_MS || this.lastMomentumScrollEndTime < this.lastMomentumScrollBeginTime;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
const commonStyle = {
|
|
329
|
+
flexGrow: 1,
|
|
330
|
+
flexShrink: 1,
|
|
331
|
+
// Enable hardware compositing in modern browsers.
|
|
332
|
+
// Creates a new layer with its own backing surface that can significantly
|
|
333
|
+
// improve scroll performance.
|
|
334
|
+
transform: [{ translateZ: 0 }],
|
|
335
|
+
// iOS native scrolling
|
|
336
|
+
WebkitOverflowScrolling: "touch"
|
|
337
|
+
}, styles = {
|
|
338
|
+
baseVertical: {
|
|
339
|
+
...commonStyle,
|
|
340
|
+
flexDirection: "column",
|
|
341
|
+
overflowX: "hidden",
|
|
342
|
+
overflowY: "auto"
|
|
343
|
+
},
|
|
344
|
+
baseHorizontal: {
|
|
345
|
+
...commonStyle,
|
|
346
|
+
flexDirection: "row",
|
|
347
|
+
overflowX: "auto",
|
|
348
|
+
overflowY: "hidden"
|
|
349
|
+
},
|
|
350
|
+
contentContainerHorizontal: {
|
|
351
|
+
flexDirection: "row"
|
|
352
|
+
},
|
|
353
|
+
contentContainerCenterContent: {
|
|
354
|
+
justifyContent: "center",
|
|
355
|
+
flexGrow: 1
|
|
356
|
+
},
|
|
357
|
+
stickyHeader: {
|
|
358
|
+
position: "sticky",
|
|
359
|
+
top: 0,
|
|
360
|
+
zIndex: 10
|
|
361
|
+
},
|
|
362
|
+
pagingEnabledHorizontal: {
|
|
363
|
+
scrollSnapType: "x mandatory"
|
|
364
|
+
},
|
|
365
|
+
pagingEnabledVertical: {
|
|
366
|
+
scrollSnapType: "y mandatory"
|
|
367
|
+
},
|
|
368
|
+
pagingEnabledChild: {
|
|
369
|
+
scrollSnapAlign: "start"
|
|
370
|
+
}
|
|
371
|
+
}, ForwardedScrollView = import_react.default.forwardRef((props, forwardedRef) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollView, { ...props, forwardedRef }));
|
|
372
|
+
ForwardedScrollView.displayName = "ScrollView";
|
|
373
|
+
var ScrollView_default = ForwardedScrollView;
|
|
374
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var Share_exports = {};
|
|
16
|
+
__export(Share_exports, {
|
|
17
|
+
default: () => Share_default
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(Share_exports);
|
|
20
|
+
var import_react_native_web_internals = require("@tamagui/react-native-web-internals");
|
|
21
|
+
class Share {
|
|
22
|
+
static share(content, options = {}) {
|
|
23
|
+
return (0, import_react_native_web_internals.invariant)(
|
|
24
|
+
typeof content == "object" && content !== null,
|
|
25
|
+
"Content to share must be a valid object"
|
|
26
|
+
), (0, import_react_native_web_internals.invariant)(
|
|
27
|
+
typeof content.url == "string" || typeof content.message == "string",
|
|
28
|
+
"At least one of URL and message is required"
|
|
29
|
+
), (0, import_react_native_web_internals.invariant)(
|
|
30
|
+
typeof options == "object" && options !== null,
|
|
31
|
+
"Options must be a valid object"
|
|
32
|
+
), (0, import_react_native_web_internals.invariant)(
|
|
33
|
+
!content.title || typeof content.title == "string",
|
|
34
|
+
"Invalid title: title should be a string."
|
|
35
|
+
), window.navigator.share !== void 0 ? window.navigator.share({
|
|
36
|
+
title: content.title,
|
|
37
|
+
text: content.message,
|
|
38
|
+
url: content.url
|
|
39
|
+
}) : Promise.reject(new Error("Share is not supported in this browser"));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The content was successfully shared.
|
|
43
|
+
*/
|
|
44
|
+
static get sharedAction() {
|
|
45
|
+
return "sharedAction";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The dialog has been dismissed.
|
|
49
|
+
* @platform ios
|
|
50
|
+
*/
|
|
51
|
+
static get dismissedAction() {
|
|
52
|
+
return "dismissedAction";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
var Share_default = Share;
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var StatusBar_exports = {};
|
|
16
|
+
__export(StatusBar_exports, {
|
|
17
|
+
default: () => StatusBar_default
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(StatusBar_exports);
|
|
20
|
+
const emptyFunction = () => {
|
|
21
|
+
};
|
|
22
|
+
function StatusBar() {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
StatusBar.setBackgroundColor = emptyFunction;
|
|
26
|
+
StatusBar.setBarStyle = emptyFunction;
|
|
27
|
+
StatusBar.setHidden = emptyFunction;
|
|
28
|
+
StatusBar.setNetworkActivityIndicatorVisible = emptyFunction;
|
|
29
|
+
StatusBar.setTranslucent = emptyFunction;
|
|
30
|
+
var StatusBar_default = StatusBar;
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var Text_exports = {};
|
|
24
|
+
__export(Text_exports, {
|
|
25
|
+
default: () => Text_default
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(Text_exports);
|
|
28
|
+
var React = __toESM(require("react")), import_react_native_web_internals = require("@tamagui/react-native-web-internals"), import_react_native_web_internals2 = require("@tamagui/react-native-web-internals"), import_createElement = __toESM(require("../createElement/index")), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
const pickProps = (props) => (0, import_react_native_web_internals2.pick)(props, import_react_native_web_internals2.forwardPropsListText), Text = React.forwardRef(
|
|
30
|
+
(props, forwardedRef) => {
|
|
31
|
+
const {
|
|
32
|
+
hrefAttrs,
|
|
33
|
+
numberOfLines,
|
|
34
|
+
onClick,
|
|
35
|
+
onLayout,
|
|
36
|
+
onPress,
|
|
37
|
+
onMoveShouldSetResponder,
|
|
38
|
+
onMoveShouldSetResponderCapture,
|
|
39
|
+
onResponderEnd,
|
|
40
|
+
onResponderGrant,
|
|
41
|
+
onResponderMove,
|
|
42
|
+
onResponderReject,
|
|
43
|
+
onResponderRelease,
|
|
44
|
+
onResponderStart,
|
|
45
|
+
onResponderTerminate,
|
|
46
|
+
onResponderTerminationRequest,
|
|
47
|
+
onScrollShouldSetResponder,
|
|
48
|
+
onScrollShouldSetResponderCapture,
|
|
49
|
+
onSelectionChangeShouldSetResponder,
|
|
50
|
+
onSelectionChangeShouldSetResponderCapture,
|
|
51
|
+
onStartShouldSetResponder,
|
|
52
|
+
onStartShouldSetResponderCapture,
|
|
53
|
+
selectable,
|
|
54
|
+
...rest
|
|
55
|
+
} = props, hasTextAncestor = React.useContext(import_react_native_web_internals.TextAncestorContext), hostRef = React.useRef(null), { direction: contextDirection } = (0, import_react_native_web_internals2.useLocaleContext)();
|
|
56
|
+
(0, import_react_native_web_internals2.useElementLayout)(hostRef, onLayout), (0, import_react_native_web_internals2.useResponderEvents)(hostRef, {
|
|
57
|
+
onMoveShouldSetResponder,
|
|
58
|
+
onMoveShouldSetResponderCapture,
|
|
59
|
+
onResponderEnd,
|
|
60
|
+
onResponderGrant,
|
|
61
|
+
onResponderMove,
|
|
62
|
+
onResponderReject,
|
|
63
|
+
onResponderRelease,
|
|
64
|
+
onResponderStart,
|
|
65
|
+
onResponderTerminate,
|
|
66
|
+
onResponderTerminationRequest,
|
|
67
|
+
onScrollShouldSetResponder,
|
|
68
|
+
onScrollShouldSetResponderCapture,
|
|
69
|
+
onSelectionChangeShouldSetResponder,
|
|
70
|
+
onSelectionChangeShouldSetResponderCapture,
|
|
71
|
+
onStartShouldSetResponder,
|
|
72
|
+
onStartShouldSetResponderCapture
|
|
73
|
+
});
|
|
74
|
+
const handleClick = React.useCallback(
|
|
75
|
+
(e) => {
|
|
76
|
+
onClick != null ? onClick(e) : onPress != null && (e.stopPropagation(), onPress(e));
|
|
77
|
+
},
|
|
78
|
+
[onClick, onPress]
|
|
79
|
+
);
|
|
80
|
+
let component = hasTextAncestor ? "span" : "div";
|
|
81
|
+
const langDirection = props.lang != null ? (0, import_react_native_web_internals.getLocaleDirection)(props.lang) : null, componentDirection = props.dir || langDirection, writingDirection = componentDirection || contextDirection, supportedProps = pickProps(rest);
|
|
82
|
+
if (supportedProps.dir = componentDirection, hasTextAncestor || (supportedProps.dir = componentDirection ?? "auto"), (onClick || onPress) && (supportedProps.onClick = handleClick), supportedProps.style = [
|
|
83
|
+
numberOfLines != null && numberOfLines > 1 && { WebkitLineClamp: numberOfLines },
|
|
84
|
+
hasTextAncestor === !0 ? styles.textHasAncestor$raw : styles.text,
|
|
85
|
+
numberOfLines === 1 && styles.textOneLine,
|
|
86
|
+
numberOfLines != null && numberOfLines > 1 && styles.textMultiLine,
|
|
87
|
+
props.style,
|
|
88
|
+
selectable === !0 && styles.selectable,
|
|
89
|
+
selectable === !1 && styles.notSelectable,
|
|
90
|
+
onPress && styles.pressable
|
|
91
|
+
], props.href != null && (component = "a", hrefAttrs != null)) {
|
|
92
|
+
const { download, rel, target } = hrefAttrs;
|
|
93
|
+
download != null && (supportedProps.download = download), rel != null && (supportedProps.rel = rel), typeof target == "string" && (supportedProps.target = target.charAt(0) !== "_" ? "_" + target : target);
|
|
94
|
+
}
|
|
95
|
+
const platformMethodsRef = (0, import_react_native_web_internals2.usePlatformMethods)(supportedProps), setRef = (0, import_react_native_web_internals2.useMergeRefs)(hostRef, platformMethodsRef, forwardedRef);
|
|
96
|
+
supportedProps.ref = setRef;
|
|
97
|
+
const element = (0, import_createElement.default)(component, supportedProps, {
|
|
98
|
+
writingDirection
|
|
99
|
+
});
|
|
100
|
+
return hasTextAncestor ? element : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native_web_internals.TextAncestorContext.Provider, { value: !0, children: element });
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
Text.displayName = "Text";
|
|
104
|
+
const textStyle = {
|
|
105
|
+
backgroundColor: "transparent",
|
|
106
|
+
border: "0 solid black",
|
|
107
|
+
boxSizing: "border-box",
|
|
108
|
+
color: "black",
|
|
109
|
+
display: "inline",
|
|
110
|
+
font: "14px System",
|
|
111
|
+
listStyle: "none",
|
|
112
|
+
margin: 0,
|
|
113
|
+
padding: 0,
|
|
114
|
+
textAlign: "inherit",
|
|
115
|
+
textDecoration: "none",
|
|
116
|
+
whiteSpace: "pre-wrap",
|
|
117
|
+
wordWrap: "break-word"
|
|
118
|
+
}, styles = {
|
|
119
|
+
text: textStyle,
|
|
120
|
+
textHasAncestor$raw: {
|
|
121
|
+
...textStyle,
|
|
122
|
+
color: "inherit",
|
|
123
|
+
font: "inherit",
|
|
124
|
+
whiteSpace: "inherit"
|
|
125
|
+
},
|
|
126
|
+
textOneLine: {
|
|
127
|
+
maxWidth: "100%",
|
|
128
|
+
overflow: "hidden",
|
|
129
|
+
textOverflow: "ellipsis",
|
|
130
|
+
whiteSpace: "nowrap",
|
|
131
|
+
wordWrap: "normal"
|
|
132
|
+
},
|
|
133
|
+
// See #13
|
|
134
|
+
textMultiLine: {
|
|
135
|
+
display: "-webkit-box",
|
|
136
|
+
maxWidth: "100%",
|
|
137
|
+
overflow: "hidden",
|
|
138
|
+
textOverflow: "ellipsis",
|
|
139
|
+
WebkitBoxOrient: "vertical"
|
|
140
|
+
},
|
|
141
|
+
notSelectable: {
|
|
142
|
+
userSelect: "none"
|
|
143
|
+
},
|
|
144
|
+
selectable: {
|
|
145
|
+
userSelect: "text"
|
|
146
|
+
},
|
|
147
|
+
pressable: {
|
|
148
|
+
cursor: "pointer"
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
var Text_default = Text;
|
|
152
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
|
+
return to;
|
|
10
|
+
};
|
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
12
|
+
var types_exports = {};
|
|
13
|
+
module.exports = __toCommonJS(types_exports);
|
|
14
|
+
//# sourceMappingURL=types.js.map
|