@tamagui/react-native-web-lite 1.113.0 → 1.113.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/esm/AccessibilityInfo/index.native.js +62 -58
- package/dist/esm/AccessibilityInfo/index.native.js.map +6 -1
- package/dist/esm/ActivityIndicator/__tests__/index-test.native.js +55 -85
- package/dist/esm/ActivityIndicator/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/ActivityIndicator/index.native.js +90 -82
- package/dist/esm/ActivityIndicator/index.native.js.map +6 -1
- package/dist/esm/Alert/index.native.js +18 -14
- package/dist/esm/Alert/index.native.js.map +6 -1
- package/dist/esm/AppRegistry/AppContainer.native.js +26 -30
- package/dist/esm/AppRegistry/AppContainer.native.js.map +6 -1
- package/dist/esm/AppRegistry/__tests__/index-test.native.js +13 -13
- package/dist/esm/AppRegistry/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/AppRegistry/__tests__/index-test.node.native.js +34 -45
- package/dist/esm/AppRegistry/__tests__/index-test.node.native.js.map +6 -1
- package/dist/esm/AppRegistry/index.native.js +55 -50
- package/dist/esm/AppRegistry/index.native.js.map +6 -1
- package/dist/esm/AppRegistry/renderApplication.native.js +27 -33
- package/dist/esm/AppRegistry/renderApplication.native.js.map +6 -1
- package/dist/esm/AppState/__tests__/index-test.native.js +10 -9
- package/dist/esm/AppState/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/AppState/index.native.js +51 -45
- package/dist/esm/AppState/index.native.js.map +6 -1
- package/dist/esm/Appearance/index.native.js +24 -27
- package/dist/esm/Appearance/index.native.js.map +6 -1
- package/dist/esm/BackHandler/index.native.js +13 -11
- package/dist/esm/BackHandler/index.native.js.map +6 -1
- package/dist/esm/Clipboard/index.native.js +26 -21
- package/dist/esm/Clipboard/index.native.js.map +6 -1
- package/dist/esm/DeviceEmitter.native.js +5 -3
- package/dist/esm/DeviceEmitter.native.js.map +6 -1
- package/dist/esm/DeviceInfo/index.native.js +33 -41
- package/dist/esm/DeviceInfo/index.native.js.map +6 -1
- package/dist/esm/Dimensions/__tests__/index-test.native.js +8 -9
- package/dist/esm/Dimensions/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/Dimensions/index.native.js +53 -49
- package/dist/esm/Dimensions/index.native.js.map +6 -1
- package/dist/esm/I18nManager/index.native.js +13 -10
- package/dist/esm/I18nManager/index.native.js.map +6 -1
- package/dist/esm/Image/index.native.js +149 -174
- package/dist/esm/Image/index.native.js.map +6 -1
- package/dist/esm/Image/types.native.js +1 -2
- package/dist/esm/Image/types.native.js.map +6 -1
- package/dist/esm/ImageBackground/__tests__/index-test.native.js +19 -27
- package/dist/esm/ImageBackground/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/ImageBackground/index.native.js +33 -35
- package/dist/esm/ImageBackground/index.native.js.map +6 -1
- package/dist/esm/Keyboard/index.native.js +17 -13
- package/dist/esm/Keyboard/index.native.js.map +6 -1
- package/dist/esm/KeyboardAvoidingView/index.native.js +44 -34
- package/dist/esm/KeyboardAvoidingView/index.native.js.map +6 -1
- package/dist/esm/Linking/__tests__/index-test.native.js +9 -9
- package/dist/esm/Linking/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/Linking/index.native.js +49 -42
- package/dist/esm/Linking/index.native.js.map +6 -1
- package/dist/esm/LogBox/index.native.js +12 -7
- package/dist/esm/LogBox/index.native.js.map +6 -1
- package/dist/esm/Modal/ModalAnimation.native.js +112 -89
- package/dist/esm/Modal/ModalAnimation.native.js.map +6 -1
- package/dist/esm/Modal/ModalContent.native.js +54 -52
- package/dist/esm/Modal/ModalContent.native.js.map +6 -1
- package/dist/esm/Modal/ModalFocusTrap.native.js +52 -49
- package/dist/esm/Modal/ModalFocusTrap.native.js.map +6 -1
- package/dist/esm/Modal/ModalPortal.native.js +11 -9
- package/dist/esm/Modal/ModalPortal.native.js.map +6 -1
- package/dist/esm/Modal/index.native.js +45 -53
- package/dist/esm/Modal/index.native.js.map +6 -1
- package/dist/esm/NativeModules/index.native.js +6 -5
- package/dist/esm/NativeModules/index.native.js.map +6 -1
- package/dist/esm/PanResponder/Alternative.js +122 -157
- package/dist/esm/PanResponder/Alternative.js.map +6 -1
- package/dist/esm/PanResponder/index.native.js +5 -3
- package/dist/esm/PanResponder/index.native.js.map +6 -1
- package/dist/esm/PixelRatio/index.native.js +59 -48
- package/dist/esm/PixelRatio/index.native.js.map +6 -1
- package/dist/esm/Pressable/index.native.js +67 -70
- package/dist/esm/Pressable/index.native.js.map +6 -1
- package/dist/esm/RefreshControl/index.native.js +6 -4
- package/dist/esm/RefreshControl/index.native.js.map +6 -1
- package/dist/esm/SafeAreaView/index.native.js +21 -24
- package/dist/esm/SafeAreaView/index.native.js.map +6 -1
- package/dist/esm/ScrollView/ScrollViewBase.native.js +50 -61
- package/dist/esm/ScrollView/ScrollViewBase.native.js.map +6 -1
- package/dist/esm/ScrollView/index.native.js +211 -183
- package/dist/esm/ScrollView/index.native.js.map +6 -1
- package/dist/esm/Share/index.native.js +36 -29
- package/dist/esm/Share/index.native.js.map +6 -1
- package/dist/esm/StatusBar/index.native.js +6 -3
- package/dist/esm/StatusBar/index.native.js.map +6 -1
- package/dist/esm/Text/index.native.js +100 -128
- package/dist/esm/Text/index.native.js.map +6 -1
- package/dist/esm/Text/types.native.js +1 -2
- package/dist/esm/Text/types.native.js.map +6 -1
- package/dist/esm/TextInput/__tests__/index-test.native.js +259 -445
- package/dist/esm/TextInput/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/TextInput/index.native.js +157 -220
- package/dist/esm/TextInput/index.native.js.map +6 -1
- package/dist/esm/TextInput/types.native.js +1 -2
- package/dist/esm/TextInput/types.native.js.map +6 -1
- package/dist/esm/TouchableOpacity.native.js +67 -63
- package/dist/esm/TouchableOpacity.native.js.map +6 -1
- package/dist/esm/TouchableWithoutFeedback.native.js +45 -49
- package/dist/esm/TouchableWithoutFeedback.native.js.map +6 -1
- package/dist/esm/UnimplementedView.native.js +30 -22
- package/dist/esm/UnimplementedView.native.js.map +6 -1
- package/dist/esm/Vibration/index.native.js +14 -14
- package/dist/esm/Vibration/index.native.js.map +6 -1
- package/dist/esm/View/index.native.js +55 -84
- package/dist/esm/View/index.native.js.map +6 -1
- package/dist/esm/View/types.native.js +1 -2
- package/dist/esm/View/types.native.js.map +6 -1
- package/dist/esm/createElement/__tests__/index-test.native.js +195 -398
- package/dist/esm/createElement/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/createElement/index.native.js +14 -16
- package/dist/esm/createElement/index.native.js.map +6 -1
- package/dist/esm/createReactDOMStyle.native.js +4 -2
- package/dist/esm/createReactDOMStyle.native.js.map +6 -1
- package/dist/esm/findNodeHandle.native.js +7 -4
- package/dist/esm/findNodeHandle.native.js.map +6 -1
- package/dist/esm/index.native.js +133 -55
- package/dist/esm/index.native.js.map +6 -1
- package/dist/esm/render/index.native.js +9 -4
- package/dist/esm/render/index.native.js.map +6 -1
- package/dist/esm/styleTypes.native.js +1 -2
- package/dist/esm/styleTypes.native.js.map +6 -1
- package/dist/esm/types.native.js +1 -2
- package/dist/esm/types.native.js.map +6 -1
- package/dist/esm/useColorScheme/index.native.js +7 -7
- package/dist/esm/useColorScheme/index.native.js.map +6 -1
- package/dist/esm/useLocaleContext/index.native.js +4 -2
- package/dist/esm/useLocaleContext/index.native.js.map +6 -1
- package/dist/esm/useWindowDimensions/index.native.js +9 -9
- package/dist/esm/useWindowDimensions/index.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/Animated.native.js +17 -16
- package/dist/esm/vendor/react-native/Animated/Animated.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/AnimatedEvent.native.js +99 -72
- package/dist/esm/vendor/react-native/Animated/AnimatedEvent.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/AnimatedImplementation.native.js +436 -465
- package/dist/esm/vendor/react-native/Animated/AnimatedImplementation.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/AnimatedMock.native.js +91 -97
- package/dist/esm/vendor/react-native/Animated/AnimatedMock.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/AnimatedPlatformConfig.native.js +1 -2
- package/dist/esm/vendor/react-native/Animated/AnimatedPlatformConfig.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/Easing.native.js +231 -194
- package/dist/esm/vendor/react-native/Animated/Easing.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedHelper.native.js +222 -206
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedHelper.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedModule.native.js +5 -3
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedModule.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedTurboModule.native.js +5 -3
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedTurboModule.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/SpringConfig.native.js +5 -5
- package/dist/esm/vendor/react-native/Animated/SpringConfig.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/animations/Animation.native.js +37 -25
- package/dist/esm/vendor/react-native/Animated/animations/Animation.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/animations/DecayAnimation.native.js +54 -42
- package/dist/esm/vendor/react-native/Animated/animations/DecayAnimation.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/animations/SpringAnimation.native.js +72 -72
- package/dist/esm/vendor/react-native/Animated/animations/SpringAnimation.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/animations/TimingAnimation.native.js +60 -45
- package/dist/esm/vendor/react-native/Animated/animations/TimingAnimation.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/bezier.native.js +20 -23
- package/dist/esm/vendor/react-native/Animated/bezier.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/components/AnimatedImage.native.js +6 -4
- package/dist/esm/vendor/react-native/Animated/components/AnimatedImage.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/components/AnimatedScrollView.native.js +13 -12
- package/dist/esm/vendor/react-native/Animated/components/AnimatedScrollView.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/components/AnimatedText.native.js +6 -4
- package/dist/esm/vendor/react-native/Animated/components/AnimatedText.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/components/AnimatedView.native.js +6 -4
- package/dist/esm/vendor/react-native/Animated/components/AnimatedView.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/createAnimatedComponent.native.js +11 -17
- package/dist/esm/vendor/react-native/Animated/createAnimatedComponent.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedAddition.native.js +55 -39
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedAddition.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedColor.native.js +197 -180
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedColor.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDiffClamp.native.js +51 -39
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDiffClamp.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDivision.native.js +57 -42
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDivision.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedInterpolation.native.js +116 -99
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedInterpolation.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedModulo.native.js +50 -37
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedModulo.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedMultiplication.native.js +55 -39
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedMultiplication.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedNode.native.js +89 -61
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedNode.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedProps.native.js +70 -52
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedProps.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedStyle.native.js +68 -50
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedStyle.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedSubtraction.native.js +55 -39
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedSubtraction.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTracking.native.js +53 -41
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTracking.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTransform.native.js +57 -44
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTransform.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValue.native.js +99 -70
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValue.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValueXY.native.js +82 -64
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValueXY.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedWithChildren.native.js +53 -40
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedWithChildren.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Animated/useAnimatedProps.native.js +58 -50
- package/dist/esm/vendor/react-native/Animated/useAnimatedProps.native.js.map +6 -1
- package/dist/esm/vendor/react-native/FeatureFlags.native.js +10 -8
- package/dist/esm/vendor/react-native/FeatureFlags.native.js.map +6 -1
- package/dist/esm/vendor/react-native/NativeEventEmitter/RCTDeviceEventEmitter.native.js +5 -3
- package/dist/esm/vendor/react-native/NativeEventEmitter/RCTDeviceEventEmitter.native.js.map +6 -1
- package/dist/esm/vendor/react-native/NativeEventEmitter/index.native.js +55 -46
- package/dist/esm/vendor/react-native/NativeEventEmitter/index.native.js.map +6 -1
- package/dist/esm/vendor/react-native/PanResponder/index.native.js +219 -224
- package/dist/esm/vendor/react-native/PanResponder/index.native.js.map +6 -1
- package/dist/esm/vendor/react-native/TouchHistoryMath/index.native.js +81 -58
- package/dist/esm/vendor/react-native/TouchHistoryMath/index.native.js.map +6 -1
- package/dist/esm/vendor/react-native/TurboModule/RCTExport.native.js +1 -2
- package/dist/esm/vendor/react-native/TurboModule/RCTExport.native.js.map +6 -1
- package/dist/esm/vendor/react-native/TurboModule/TurboModuleRegistry.native.js +5 -2
- package/dist/esm/vendor/react-native/TurboModule/TurboModuleRegistry.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Types/CoreEventTypes.native.js +1 -2
- package/dist/esm/vendor/react-native/Types/CoreEventTypes.native.js.map +6 -1
- package/dist/esm/vendor/react-native/Utilities/setAndForwardRef.native.js +6 -5
- package/dist/esm/vendor/react-native/Utilities/setAndForwardRef.native.js.map +6 -1
- package/dist/esm/vendor/react-native/emitter/EventEmitter.native.js +5 -3
- package/dist/esm/vendor/react-native/emitter/EventEmitter.native.js.map +6 -1
- package/dist/esm/vendor/react-native/emitter/EventSubscription.native.js +1 -2
- package/dist/esm/vendor/react-native/emitter/EventSubscription.native.js.map +6 -1
- package/dist/esm/vendor/react-native/emitter/_EmitterSubscription.native.js +33 -24
- package/dist/esm/vendor/react-native/emitter/_EmitterSubscription.native.js.map +6 -1
- package/dist/esm/vendor/react-native/emitter/_EventEmitter.native.js +51 -41
- package/dist/esm/vendor/react-native/emitter/_EventEmitter.native.js.map +6 -1
- package/dist/esm/vendor/react-native/emitter/_EventSubscription.native.js +16 -12
- package/dist/esm/vendor/react-native/emitter/_EventSubscription.native.js.map +6 -1
- package/dist/esm/vendor/react-native/emitter/_EventSubscriptionVendor.native.js +26 -21
- package/dist/esm/vendor/react-native/emitter/_EventSubscriptionVendor.native.js.map +6 -1
- package/dist/esm/vendor/react-native/infoLog/index.native.js +6 -3
- package/dist/esm/vendor/react-native/infoLog/index.native.js.map +6 -1
- package/dist/esm/vendor/react-native/useRefEffect.native.js +8 -4
- package/dist/esm/vendor/react-native/useRefEffect.native.js.map +6 -1
- package/dist/esm/without-animated.native.js +115 -52
- package/dist/esm/without-animated.native.js.map +6 -1
- package/package.json +6 -6
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { InteractionManager } from "@tamagui/react-native-web-internals";
|
|
2
|
-
import NativeAnimatedHelper from "../NativeAnimatedHelper
|
|
3
|
-
import AnimatedInterpolation from "./AnimatedInterpolation
|
|
4
|
-
import AnimatedWithChildren from "./AnimatedWithChildren
|
|
2
|
+
import NativeAnimatedHelper from "../NativeAnimatedHelper";
|
|
3
|
+
import AnimatedInterpolation from "./AnimatedInterpolation";
|
|
4
|
+
import AnimatedWithChildren from "./AnimatedWithChildren";
|
|
5
5
|
function _assert_this_initialized(self) {
|
|
6
|
-
if (self === void 0)
|
|
6
|
+
if (self === void 0)
|
|
7
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
7
8
|
return self;
|
|
8
9
|
}
|
|
9
10
|
function _call_super(_this, derived, args) {
|
|
10
11
|
return derived = _get_prototype_of(derived), _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
11
12
|
}
|
|
12
13
|
function _class_call_check(instance, Constructor) {
|
|
13
|
-
if (!(instance instanceof Constructor))
|
|
14
|
+
if (!(instance instanceof Constructor))
|
|
15
|
+
throw new TypeError("Cannot call a class as a function");
|
|
14
16
|
}
|
|
15
17
|
function _defineProperties(target, props) {
|
|
16
18
|
for (var i = 0; i < props.length; i++) {
|
|
@@ -22,7 +24,7 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
22
24
|
return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor;
|
|
23
25
|
}
|
|
24
26
|
function _get(target, property, receiver) {
|
|
25
|
-
return typeof Reflect < "u" && Reflect.get ? _get = Reflect.get : _get = function
|
|
27
|
+
return typeof Reflect < "u" && Reflect.get ? _get = Reflect.get : _get = function(target2, property2, receiver2) {
|
|
26
28
|
var base = _super_prop_base(target2, property2);
|
|
27
29
|
if (base) {
|
|
28
30
|
var desc = Object.getOwnPropertyDescriptor(base, property2);
|
|
@@ -31,12 +33,13 @@ function _get(target, property, receiver) {
|
|
|
31
33
|
}, _get(target, property, receiver || target);
|
|
32
34
|
}
|
|
33
35
|
function _get_prototype_of(o) {
|
|
34
|
-
return _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function
|
|
36
|
+
return _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function(o2) {
|
|
35
37
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
36
38
|
}, _get_prototype_of(o);
|
|
37
39
|
}
|
|
38
40
|
function _inherits(subClass, superClass) {
|
|
39
|
-
if (typeof superClass != "function" && superClass !== null)
|
|
41
|
+
if (typeof superClass != "function" && superClass !== null)
|
|
42
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
40
43
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
41
44
|
constructor: {
|
|
42
45
|
value: subClass,
|
|
@@ -49,62 +52,68 @@ function _possible_constructor_return(self, call) {
|
|
|
49
52
|
return call && (_type_of(call) === "object" || typeof call == "function") ? call : _assert_this_initialized(self);
|
|
50
53
|
}
|
|
51
54
|
function _set_prototype_of(o, p) {
|
|
52
|
-
return _set_prototype_of = Object.setPrototypeOf || function
|
|
55
|
+
return _set_prototype_of = Object.setPrototypeOf || function(o2, p2) {
|
|
53
56
|
return o2.__proto__ = p2, o2;
|
|
54
57
|
}, _set_prototype_of(o, p);
|
|
55
58
|
}
|
|
56
59
|
function _super_prop_base(object, property) {
|
|
57
|
-
for (; !Object.prototype.hasOwnProperty.call(object, property) && (object = _get_prototype_of(object), object !== null);)
|
|
60
|
+
for (; !Object.prototype.hasOwnProperty.call(object, property) && (object = _get_prototype_of(object), object !== null); )
|
|
61
|
+
;
|
|
58
62
|
return object;
|
|
59
63
|
}
|
|
60
64
|
function _type_of(obj) {
|
|
61
65
|
"@swc/helpers - typeof";
|
|
62
|
-
|
|
63
66
|
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
64
67
|
}
|
|
65
68
|
function _is_native_reflect_construct() {
|
|
66
69
|
try {
|
|
67
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
71
|
+
}));
|
|
72
|
+
} catch {
|
|
73
|
+
}
|
|
74
|
+
return (_is_native_reflect_construct = function() {
|
|
70
75
|
return !!result;
|
|
71
76
|
})();
|
|
72
77
|
}
|
|
73
78
|
var NativeAnimatedAPI = NativeAnimatedHelper.API;
|
|
74
79
|
function _flush(rootNode) {
|
|
75
|
-
var animatedStyles = /* @__PURE__ */new Set();
|
|
80
|
+
var animatedStyles = /* @__PURE__ */ new Set();
|
|
76
81
|
function findAnimatedStyles(node) {
|
|
77
82
|
typeof node.update == "function" ? animatedStyles.add(node) : node.__getChildren().forEach(findAnimatedStyles);
|
|
78
83
|
}
|
|
79
|
-
findAnimatedStyles(rootNode), animatedStyles.forEach(function
|
|
84
|
+
findAnimatedStyles(rootNode), animatedStyles.forEach(function(animatedStyle) {
|
|
80
85
|
return animatedStyle.update();
|
|
81
86
|
});
|
|
82
87
|
}
|
|
83
88
|
function _executeAsAnimatedBatch(id, operation) {
|
|
84
89
|
NativeAnimatedAPI.setWaitingForIdentifier(id), operation(), NativeAnimatedAPI.unsetWaitingForIdentifier(id);
|
|
85
90
|
}
|
|
86
|
-
var AnimatedValue = /* @__PURE__ */function
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
var AnimatedValue = /* @__PURE__ */ function(AnimatedWithChildren2) {
|
|
92
|
+
_inherits(AnimatedValue2, AnimatedWithChildren2);
|
|
93
|
+
function AnimatedValue2(value, config) {
|
|
94
|
+
_class_call_check(this, AnimatedValue2);
|
|
95
|
+
var _this;
|
|
96
|
+
if (_this = _call_super(this, AnimatedValue2), typeof value != "number")
|
|
97
|
+
throw new Error("AnimatedValue: Attempting to set value to undefined");
|
|
98
|
+
return _this._startingValue = _this._value = value, _this._offset = 0, _this._animation = null, config && config.useNativeDriver && _this.__makeNative(), _this;
|
|
99
|
+
}
|
|
100
|
+
return _create_class(AnimatedValue2, [
|
|
101
|
+
{
|
|
95
102
|
key: "__detach",
|
|
96
|
-
value: function
|
|
103
|
+
value: function() {
|
|
97
104
|
var _this = this;
|
|
98
|
-
this.__isNative && NativeAnimatedAPI.getValue(this.__getNativeTag(), function
|
|
105
|
+
this.__isNative && NativeAnimatedAPI.getValue(this.__getNativeTag(), function(value) {
|
|
99
106
|
_this._value = value - _this._offset;
|
|
100
107
|
}), this.stopAnimation(), _get(_get_prototype_of(AnimatedValue2.prototype), "__detach", this).call(this);
|
|
101
108
|
}
|
|
102
|
-
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
103
111
|
key: "__getValue",
|
|
104
|
-
value: function
|
|
112
|
+
value: function() {
|
|
105
113
|
return this._value + this._offset;
|
|
106
114
|
}
|
|
107
|
-
},
|
|
115
|
+
},
|
|
116
|
+
{
|
|
108
117
|
/**
|
|
109
118
|
* Directly set the value. This will stop any animations running on the value
|
|
110
119
|
* and update all the bound properties.
|
|
@@ -112,13 +121,14 @@ var AnimatedValue = /* @__PURE__ */function (AnimatedWithChildren2) {
|
|
|
112
121
|
* See https://reactnative.dev/docs/animatedvalue#setvalue
|
|
113
122
|
*/
|
|
114
123
|
key: "setValue",
|
|
115
|
-
value: function
|
|
124
|
+
value: function(value) {
|
|
116
125
|
var _this = this;
|
|
117
|
-
this._animation && (this._animation.stop(), this._animation = null), this._updateValue(value, !this.__isNative), this.__isNative && _executeAsAnimatedBatch(this.__getNativeTag().toString(), function
|
|
126
|
+
this._animation && (this._animation.stop(), this._animation = null), this._updateValue(value, !this.__isNative), this.__isNative && _executeAsAnimatedBatch(this.__getNativeTag().toString(), function() {
|
|
118
127
|
return NativeAnimatedAPI.setAnimatedNodeValue(_this.__getNativeTag(), value);
|
|
119
128
|
});
|
|
120
129
|
}
|
|
121
|
-
},
|
|
130
|
+
},
|
|
131
|
+
{
|
|
122
132
|
/**
|
|
123
133
|
* Sets an offset that is applied on top of whatever value is set, whether via
|
|
124
134
|
* `setValue`, an animation, or `Animated.event`. Useful for compensating
|
|
@@ -127,10 +137,11 @@ var AnimatedValue = /* @__PURE__ */function (AnimatedWithChildren2) {
|
|
|
127
137
|
* See https://reactnative.dev/docs/animatedvalue#setoffset
|
|
128
138
|
*/
|
|
129
139
|
key: "setOffset",
|
|
130
|
-
value: function
|
|
140
|
+
value: function(offset) {
|
|
131
141
|
this._offset = offset, this.__isNative && NativeAnimatedAPI.setAnimatedNodeOffset(this.__getNativeTag(), offset);
|
|
132
142
|
}
|
|
133
|
-
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
134
145
|
/**
|
|
135
146
|
* Merges the offset value into the base value and resets the offset to zero.
|
|
136
147
|
* The final output of the value is unchanged.
|
|
@@ -138,10 +149,11 @@ var AnimatedValue = /* @__PURE__ */function (AnimatedWithChildren2) {
|
|
|
138
149
|
* See https://reactnative.dev/docs/animatedvalue#flattenoffset
|
|
139
150
|
*/
|
|
140
151
|
key: "flattenOffset",
|
|
141
|
-
value: function
|
|
152
|
+
value: function() {
|
|
142
153
|
this._value += this._offset, this._offset = 0, this.__isNative && NativeAnimatedAPI.flattenAnimatedNodeOffset(this.__getNativeTag());
|
|
143
154
|
}
|
|
144
|
-
},
|
|
155
|
+
},
|
|
156
|
+
{
|
|
145
157
|
/**
|
|
146
158
|
* Sets the offset value to the base value, and resets the base value to zero.
|
|
147
159
|
* The final output of the value is unchanged.
|
|
@@ -149,10 +161,11 @@ var AnimatedValue = /* @__PURE__ */function (AnimatedWithChildren2) {
|
|
|
149
161
|
* See https://reactnative.dev/docs/animatedvalue#extractoffset
|
|
150
162
|
*/
|
|
151
163
|
key: "extractOffset",
|
|
152
|
-
value: function
|
|
164
|
+
value: function() {
|
|
153
165
|
this._offset += this._value, this._value = 0, this.__isNative && NativeAnimatedAPI.extractAnimatedNodeOffset(this.__getNativeTag());
|
|
154
166
|
}
|
|
155
|
-
},
|
|
167
|
+
},
|
|
168
|
+
{
|
|
156
169
|
/**
|
|
157
170
|
* Stops any running animation or tracking. `callback` is invoked with the
|
|
158
171
|
* final value after stopping the animation, which is useful for updating
|
|
@@ -161,35 +174,39 @@ var AnimatedValue = /* @__PURE__ */function (AnimatedWithChildren2) {
|
|
|
161
174
|
* See https://reactnative.dev/docs/animatedvalue#stopanimation
|
|
162
175
|
*/
|
|
163
176
|
key: "stopAnimation",
|
|
164
|
-
value: function
|
|
177
|
+
value: function(callback) {
|
|
165
178
|
this.stopTracking(), this._animation && this._animation.stop(), this._animation = null, callback && (this.__isNative ? NativeAnimatedAPI.getValue(this.__getNativeTag(), callback) : callback(this.__getValue()));
|
|
166
179
|
}
|
|
167
|
-
},
|
|
180
|
+
},
|
|
181
|
+
{
|
|
168
182
|
/**
|
|
169
183
|
* Stops any animation and resets the value to its original.
|
|
170
184
|
*
|
|
171
185
|
* See https://reactnative.dev/docs/animatedvalue#resetanimation
|
|
172
186
|
*/
|
|
173
187
|
key: "resetAnimation",
|
|
174
|
-
value: function
|
|
188
|
+
value: function(callback) {
|
|
175
189
|
this.stopAnimation(callback), this._value = this._startingValue, this.__isNative && NativeAnimatedAPI.setAnimatedNodeValue(this.__getNativeTag(), this._startingValue);
|
|
176
190
|
}
|
|
177
|
-
},
|
|
191
|
+
},
|
|
192
|
+
{
|
|
178
193
|
key: "__onAnimatedValueUpdateReceived",
|
|
179
|
-
value: function
|
|
194
|
+
value: function(value) {
|
|
180
195
|
this._updateValue(value, !1);
|
|
181
196
|
}
|
|
182
|
-
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
183
199
|
/*flush*/
|
|
184
200
|
/**
|
|
185
201
|
* Interpolates the value before updating the property, e.g. mapping 0-1 to
|
|
186
202
|
* 0-10.
|
|
187
203
|
*/
|
|
188
204
|
key: "interpolate",
|
|
189
|
-
value: function
|
|
205
|
+
value: function(config) {
|
|
190
206
|
return new AnimatedInterpolation(this, config);
|
|
191
207
|
}
|
|
192
|
-
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
193
210
|
/**
|
|
194
211
|
* Typically only used internally, but could be used by a custom Animation
|
|
195
212
|
* class.
|
|
@@ -197,51 +214,63 @@ var AnimatedValue = /* @__PURE__ */function (AnimatedWithChildren2) {
|
|
|
197
214
|
* See https://reactnative.dev/docs/animatedvalue#animate
|
|
198
215
|
*/
|
|
199
216
|
key: "animate",
|
|
200
|
-
value: function
|
|
201
|
-
var _this = this,
|
|
202
|
-
handle = null;
|
|
217
|
+
value: function(animation, callback) {
|
|
218
|
+
var _this = this, handle = null;
|
|
203
219
|
animation.__isInteraction && (handle = InteractionManager.createInteractionHandle());
|
|
204
220
|
var previousAnimation = this._animation;
|
|
205
|
-
this._animation && this._animation.stop(), this._animation = animation, animation.start(
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
221
|
+
this._animation && this._animation.stop(), this._animation = animation, animation.start(
|
|
222
|
+
this._value,
|
|
223
|
+
function(value) {
|
|
224
|
+
_this._updateValue(value, !0);
|
|
225
|
+
},
|
|
226
|
+
/* flush */
|
|
227
|
+
function(result) {
|
|
228
|
+
_this._animation = null, handle !== null && InteractionManager.clearInteractionHandle(handle), callback && callback(result);
|
|
229
|
+
},
|
|
230
|
+
previousAnimation,
|
|
231
|
+
this
|
|
232
|
+
);
|
|
211
233
|
}
|
|
212
|
-
},
|
|
234
|
+
},
|
|
235
|
+
{
|
|
213
236
|
/**
|
|
214
237
|
* Typically only used internally.
|
|
215
238
|
*/
|
|
216
239
|
key: "stopTracking",
|
|
217
|
-
value: function
|
|
240
|
+
value: function() {
|
|
218
241
|
this._tracking && this._tracking.__detach(), this._tracking = null;
|
|
219
242
|
}
|
|
220
|
-
},
|
|
243
|
+
},
|
|
244
|
+
{
|
|
221
245
|
/**
|
|
222
246
|
* Typically only used internally.
|
|
223
247
|
*/
|
|
224
248
|
key: "track",
|
|
225
|
-
value: function
|
|
249
|
+
value: function(tracking) {
|
|
226
250
|
this.stopTracking(), this._tracking = tracking, this._tracking && this._tracking.update();
|
|
227
251
|
}
|
|
228
|
-
},
|
|
252
|
+
},
|
|
253
|
+
{
|
|
229
254
|
key: "_updateValue",
|
|
230
|
-
value: function
|
|
231
|
-
if (value === void 0)
|
|
255
|
+
value: function(value, flush) {
|
|
256
|
+
if (value === void 0)
|
|
257
|
+
throw new Error("AnimatedValue: Attempting to set value to undefined");
|
|
232
258
|
this._value = value, flush && _flush(this), _get(_get_prototype_of(AnimatedValue2.prototype), "__callListeners", this).call(this, this.__getValue());
|
|
233
259
|
}
|
|
234
|
-
},
|
|
260
|
+
},
|
|
261
|
+
{
|
|
235
262
|
key: "__getNativeConfig",
|
|
236
|
-
value: function
|
|
263
|
+
value: function() {
|
|
237
264
|
return {
|
|
238
265
|
type: "value",
|
|
239
266
|
value: this._value,
|
|
240
267
|
offset: this._offset
|
|
241
268
|
};
|
|
242
269
|
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
export {
|
|
247
|
-
|
|
270
|
+
}
|
|
271
|
+
]), AnimatedValue2;
|
|
272
|
+
}(AnimatedWithChildren), AnimatedValue_default = AnimatedValue;
|
|
273
|
+
export {
|
|
274
|
+
AnimatedValue_default as default
|
|
275
|
+
};
|
|
276
|
+
//# sourceMappingURL=AnimatedValue.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/vendor/react-native/Animated/n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LC,MAAM;UACNhD,OAAO,KAAKI;UACZiB,QAAQ,KAAKhB;QACf;MACF;;MA1OIN;EAAsBnB,oBAAAA,GA6O5B,wBAAemB;",
|
|
5
|
+
"names": ["InteractionManager", "NativeAnimatedHelper", "AnimatedInterpolation", "AnimatedWithChildren", "NativeAnimatedAPI", "API", "_flush", "rootNode", "animatedStyles", "Set", "findAnimatedStyles", "node", "update", "add", "__getChildren", "forEach", "animatedStyle", "_executeAsAnimatedBatch", "id", "operation", "setWaitingForIdentifier", "unsetWaitingForIdentifier", "AnimatedValue", "value", "config", "Error", "_startingValue", "_value", "_offset", "_animation", "useNativeDriver", "__makeNative", "__detach", "__isNative", "getValue", "__getNativeTag", "stopAnimation", "__getValue", "setValue", "stop", "_updateValue", "toString", "setAnimatedNodeValue", "setOffset", "offset", "setAnimatedNodeOffset", "flattenOffset", "flattenAnimatedNodeOffset", "extractOffset", "extractAnimatedNodeOffset", "callback", "stopTracking", "resetAnimation", "__onAnimatedValueUpdateReceived", "interpolate", "animate", "animation", "handle", "__isInteraction", "createInteractionHandle", "previousAnimation", "start", "result", "clearInteractionHandle", "_tracking", "track", "tracking", "flush", "undefined", "__callListeners", "__getNativeConfig", "type"]
|
|
6
|
+
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { invariant } from "@tamagui/react-native-web-internals";
|
|
2
|
-
import AnimatedValue from "./AnimatedValue
|
|
3
|
-
import AnimatedWithChildren from "./AnimatedWithChildren
|
|
2
|
+
import AnimatedValue from "./AnimatedValue";
|
|
3
|
+
import AnimatedWithChildren from "./AnimatedWithChildren";
|
|
4
4
|
function _assert_this_initialized(self) {
|
|
5
|
-
if (self === void 0)
|
|
5
|
+
if (self === void 0)
|
|
6
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6
7
|
return self;
|
|
7
8
|
}
|
|
8
9
|
function _call_super(_this, derived, args) {
|
|
9
10
|
return derived = _get_prototype_of(derived), _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
11
|
}
|
|
11
12
|
function _class_call_check(instance, Constructor) {
|
|
12
|
-
if (!(instance instanceof Constructor))
|
|
13
|
+
if (!(instance instanceof Constructor))
|
|
14
|
+
throw new TypeError("Cannot call a class as a function");
|
|
13
15
|
}
|
|
14
16
|
function _defineProperties(target, props) {
|
|
15
17
|
for (var i = 0; i < props.length; i++) {
|
|
@@ -21,12 +23,13 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
21
23
|
return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor;
|
|
22
24
|
}
|
|
23
25
|
function _get_prototype_of(o) {
|
|
24
|
-
return _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function
|
|
26
|
+
return _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function(o2) {
|
|
25
27
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
26
28
|
}, _get_prototype_of(o);
|
|
27
29
|
}
|
|
28
30
|
function _inherits(subClass, superClass) {
|
|
29
|
-
if (typeof superClass != "function" && superClass !== null)
|
|
31
|
+
if (typeof superClass != "function" && superClass !== null)
|
|
32
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
30
33
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
31
34
|
constructor: {
|
|
32
35
|
value: subClass,
|
|
@@ -39,37 +42,38 @@ function _possible_constructor_return(self, call) {
|
|
|
39
42
|
return call && (_type_of(call) === "object" || typeof call == "function") ? call : _assert_this_initialized(self);
|
|
40
43
|
}
|
|
41
44
|
function _set_prototype_of(o, p) {
|
|
42
|
-
return _set_prototype_of = Object.setPrototypeOf || function
|
|
45
|
+
return _set_prototype_of = Object.setPrototypeOf || function(o2, p2) {
|
|
43
46
|
return o2.__proto__ = p2, o2;
|
|
44
47
|
}, _set_prototype_of(o, p);
|
|
45
48
|
}
|
|
46
49
|
function _type_of(obj) {
|
|
47
50
|
"@swc/helpers - typeof";
|
|
48
|
-
|
|
49
51
|
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
50
52
|
}
|
|
51
53
|
function _is_native_reflect_construct() {
|
|
52
54
|
try {
|
|
53
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
56
|
+
}));
|
|
57
|
+
} catch {
|
|
58
|
+
}
|
|
59
|
+
return (_is_native_reflect_construct = function() {
|
|
56
60
|
return !!result;
|
|
57
61
|
})();
|
|
58
62
|
}
|
|
59
|
-
var _uniqueId = 1,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
var _uniqueId = 1, AnimatedValueXY = /* @__PURE__ */ function(AnimatedWithChildren2) {
|
|
64
|
+
_inherits(AnimatedValueXY2, AnimatedWithChildren2);
|
|
65
|
+
function AnimatedValueXY2(valueIn) {
|
|
66
|
+
_class_call_check(this, AnimatedValueXY2);
|
|
67
|
+
var _this;
|
|
68
|
+
_this = _call_super(this, AnimatedValueXY2);
|
|
69
|
+
var value = valueIn || {
|
|
70
|
+
x: 0,
|
|
71
|
+
y: 0
|
|
72
|
+
};
|
|
73
|
+
return typeof value.x == "number" && typeof value.y == "number" ? (_this.x = new AnimatedValue(value.x), _this.y = new AnimatedValue(value.y)) : (invariant(value.x instanceof AnimatedValue && value.y instanceof AnimatedValue, "AnimatedValueXY must be initialized with an object of numbers or AnimatedValues."), _this.x = value.x, _this.y = value.y), _this._listeners = {}, _this;
|
|
74
|
+
}
|
|
75
|
+
return _create_class(AnimatedValueXY2, [
|
|
76
|
+
{
|
|
73
77
|
/**
|
|
74
78
|
* Directly set the value. This will stop any animations running on the value
|
|
75
79
|
* and update all the bound properties.
|
|
@@ -77,10 +81,11 @@ var _uniqueId = 1,
|
|
|
77
81
|
* See https://reactnative.dev/docs/animatedvaluexy.html#setvalue
|
|
78
82
|
*/
|
|
79
83
|
key: "setValue",
|
|
80
|
-
value: function
|
|
84
|
+
value: function(value) {
|
|
81
85
|
this.x.setValue(value.x), this.y.setValue(value.y);
|
|
82
86
|
}
|
|
83
|
-
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
84
89
|
/**
|
|
85
90
|
* Sets an offset that is applied on top of whatever value is set, whether
|
|
86
91
|
* via `setValue`, an animation, or `Animated.event`. Useful for compensating
|
|
@@ -89,10 +94,11 @@ var _uniqueId = 1,
|
|
|
89
94
|
* See https://reactnative.dev/docs/animatedvaluexy.html#setoffset
|
|
90
95
|
*/
|
|
91
96
|
key: "setOffset",
|
|
92
|
-
value: function
|
|
97
|
+
value: function(offset) {
|
|
93
98
|
this.x.setOffset(offset.x), this.y.setOffset(offset.y);
|
|
94
99
|
}
|
|
95
|
-
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
96
102
|
/**
|
|
97
103
|
* Merges the offset value into the base value and resets the offset to zero.
|
|
98
104
|
* The final output of the value is unchanged.
|
|
@@ -100,10 +106,11 @@ var _uniqueId = 1,
|
|
|
100
106
|
* See https://reactnative.dev/docs/animatedvaluexy.html#flattenoffset
|
|
101
107
|
*/
|
|
102
108
|
key: "flattenOffset",
|
|
103
|
-
value: function
|
|
109
|
+
value: function() {
|
|
104
110
|
this.x.flattenOffset(), this.y.flattenOffset();
|
|
105
111
|
}
|
|
106
|
-
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
107
114
|
/**
|
|
108
115
|
* Sets the offset value to the base value, and resets the base value to
|
|
109
116
|
* zero. The final output of the value is unchanged.
|
|
@@ -111,28 +118,31 @@ var _uniqueId = 1,
|
|
|
111
118
|
* See https://reactnative.dev/docs/animatedvaluexy.html#extractoffset
|
|
112
119
|
*/
|
|
113
120
|
key: "extractOffset",
|
|
114
|
-
value: function
|
|
121
|
+
value: function() {
|
|
115
122
|
this.x.extractOffset(), this.y.extractOffset();
|
|
116
123
|
}
|
|
117
|
-
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
118
126
|
key: "__getValue",
|
|
119
|
-
value: function
|
|
127
|
+
value: function() {
|
|
120
128
|
return {
|
|
121
129
|
x: this.x.__getValue(),
|
|
122
130
|
y: this.y.__getValue()
|
|
123
131
|
};
|
|
124
132
|
}
|
|
125
|
-
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
126
135
|
/**
|
|
127
136
|
* Stops any animation and resets the value to its original.
|
|
128
137
|
*
|
|
129
138
|
* See https://reactnative.dev/docs/animatedvaluexy.html#resetanimation
|
|
130
139
|
*/
|
|
131
140
|
key: "resetAnimation",
|
|
132
|
-
value: function
|
|
141
|
+
value: function(callback) {
|
|
133
142
|
this.x.resetAnimation(), this.y.resetAnimation(), callback && callback(this.__getValue());
|
|
134
143
|
}
|
|
135
|
-
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
136
146
|
/**
|
|
137
147
|
* Stops any running animation or tracking. `callback` is invoked with the
|
|
138
148
|
* final value after stopping the animation, which is useful for updating
|
|
@@ -141,10 +151,11 @@ var _uniqueId = 1,
|
|
|
141
151
|
* See https://reactnative.dev/docs/animatedvaluexy.html#stopanimation
|
|
142
152
|
*/
|
|
143
153
|
key: "stopAnimation",
|
|
144
|
-
value: function
|
|
154
|
+
value: function(callback) {
|
|
145
155
|
this.x.stopAnimation(), this.y.stopAnimation(), callback && callback(this.__getValue());
|
|
146
156
|
}
|
|
147
|
-
},
|
|
157
|
+
},
|
|
158
|
+
{
|
|
148
159
|
/**
|
|
149
160
|
* Adds an asynchronous listener to the value so you can observe updates from
|
|
150
161
|
* animations. This is useful because there is no way to synchronously read
|
|
@@ -155,19 +166,18 @@ var _uniqueId = 1,
|
|
|
155
166
|
* See https://reactnative.dev/docs/animatedvaluexy.html#addlistener
|
|
156
167
|
*/
|
|
157
168
|
key: "addListener",
|
|
158
|
-
value: function
|
|
159
|
-
var _this = this,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
callback(_this.__getValue());
|
|
164
|
-
};
|
|
169
|
+
value: function(callback) {
|
|
170
|
+
var _this = this, id = String(_uniqueId++), jointCallback = function(_ref) {
|
|
171
|
+
var number = _ref.value;
|
|
172
|
+
callback(_this.__getValue());
|
|
173
|
+
};
|
|
165
174
|
return this._listeners[id] = {
|
|
166
175
|
x: this.x.addListener(jointCallback),
|
|
167
176
|
y: this.y.addListener(jointCallback)
|
|
168
177
|
}, id;
|
|
169
178
|
}
|
|
170
|
-
},
|
|
179
|
+
},
|
|
180
|
+
{
|
|
171
181
|
/**
|
|
172
182
|
* Unregister a listener. The `id` param shall match the identifier
|
|
173
183
|
* previously returned by `addListener()`.
|
|
@@ -175,48 +185,56 @@ var _uniqueId = 1,
|
|
|
175
185
|
* See https://reactnative.dev/docs/animatedvaluexy.html#removelistener
|
|
176
186
|
*/
|
|
177
187
|
key: "removeListener",
|
|
178
|
-
value: function
|
|
188
|
+
value: function(id) {
|
|
179
189
|
this.x.removeListener(this._listeners[id].x), this.y.removeListener(this._listeners[id].y), delete this._listeners[id];
|
|
180
190
|
}
|
|
181
|
-
},
|
|
191
|
+
},
|
|
192
|
+
{
|
|
182
193
|
/**
|
|
183
194
|
* Remove all registered listeners.
|
|
184
195
|
*
|
|
185
196
|
* See https://reactnative.dev/docs/animatedvaluexy.html#removealllisteners
|
|
186
197
|
*/
|
|
187
198
|
key: "removeAllListeners",
|
|
188
|
-
value: function
|
|
199
|
+
value: function() {
|
|
189
200
|
this.x.removeAllListeners(), this.y.removeAllListeners(), this._listeners = {};
|
|
190
201
|
}
|
|
191
|
-
},
|
|
202
|
+
},
|
|
203
|
+
{
|
|
192
204
|
/**
|
|
193
205
|
* Converts `{x, y}` into `{left, top}` for use in style.
|
|
194
206
|
*
|
|
195
207
|
* See https://reactnative.dev/docs/animatedvaluexy.html#getlayout
|
|
196
208
|
*/
|
|
197
209
|
key: "getLayout",
|
|
198
|
-
value: function
|
|
210
|
+
value: function() {
|
|
199
211
|
return {
|
|
200
212
|
left: this.x,
|
|
201
213
|
top: this.y
|
|
202
214
|
};
|
|
203
215
|
}
|
|
204
|
-
},
|
|
216
|
+
},
|
|
217
|
+
{
|
|
205
218
|
/**
|
|
206
219
|
* Converts `{x, y}` into a useable translation transform.
|
|
207
220
|
*
|
|
208
221
|
* See https://reactnative.dev/docs/animatedvaluexy.html#gettranslatetransform
|
|
209
222
|
*/
|
|
210
223
|
key: "getTranslateTransform",
|
|
211
|
-
value: function
|
|
212
|
-
return [
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
224
|
+
value: function() {
|
|
225
|
+
return [
|
|
226
|
+
{
|
|
227
|
+
translateX: this.x
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
translateY: this.y
|
|
231
|
+
}
|
|
232
|
+
];
|
|
217
233
|
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
export {
|
|
222
|
-
|
|
234
|
+
}
|
|
235
|
+
]), AnimatedValueXY2;
|
|
236
|
+
}(AnimatedWithChildren), AnimatedValueXY_default = AnimatedValueXY;
|
|
237
|
+
export {
|
|
238
|
+
AnimatedValueXY_default as default
|
|
239
|
+
};
|
|
240
|
+
//# sourceMappingURL=AnimatedValueXY.js.map
|