44 lines
2.2 KiB
TypeScript
44 lines
2.2 KiB
TypeScript
// Module ID: 4749
|
|
// Function ID: 4750
|
|
// Name: CONFIG_NEVER_ANIMATE
|
|
// Dependencies: [4672, 4673, 4119, 2]
|
|
// Exports: withSpring
|
|
|
|
// Module 4749 (CONFIG_NEVER_ANIMATE)
|
|
import set from "set" /* 2 */;
|
|
import _mod4119 from "module_4119" /* 4119 */;
|
|
import CONFIG_NEVER_ANIMATE2 from "CONFIG_NEVER_ANIMATE" /* 4672 */;
|
|
import mutable from "mutable" /* 4673 */;
|
|
|
|
const CONFIG_NEVER_ANIMATE = CONFIG_NEVER_ANIMATE2.CONFIG_NEVER_ANIMATE;
|
|
function withSpring(value, SUBTLE_SPRING, fn, fn2) {
|
|
let str = fn;
|
|
if (fn === undefined) {
|
|
str = "respect-motion-settings";
|
|
}
|
|
const accessibilityPreferencesSharedValue = mutable.accessibilityPreferencesSharedValue;
|
|
if ("animate-always" === str) {
|
|
let tmp7 = SUBTLE_SPRING;
|
|
if (tmp4) {
|
|
let obj = SUBTLE_SPRING;
|
|
if (SUBTLE_SPRING == null) {
|
|
obj = {};
|
|
}
|
|
obj = {};
|
|
const merged = Object.assign(obj);
|
|
obj.reduceMotion = tmp(4119).ReduceMotion.Never;
|
|
tmp7 = obj;
|
|
}
|
|
let tmp5 = tmp7;
|
|
} else {
|
|
tmp5 = CONFIG_NEVER_ANIMATE;
|
|
}
|
|
return _mod4119.withSpring(value, tmp5, fn2);
|
|
}
|
|
withSpring.__closure = { accessibilityPreferencesSharedValue: mutable.accessibilityPreferencesSharedValue, CONFIG_NEVER_ANIMATE, ReduceMotion: _mod4119.ReduceMotion, REAwithSpring: _mod4119.withSpring };
|
|
withSpring.__workletHash = 14783154107972;
|
|
withSpring.__initData = { code: "function withSpring_springTsx1(toValue,config,shouldAnimate='respect-motion-settings',callback){const{accessibilityPreferencesSharedValue,CONFIG_NEVER_ANIMATE,ReduceMotion,REAwithSpring}=this.__closure;const reducedMotionEnabled=accessibilityPreferencesSharedValue.get().reduceMotion;const animate=shouldAnimate==='animate-always'||shouldAnimate==='respect-motion-settings'&&!reducedMotionEnabled;const configForRea=!animate?CONFIG_NEVER_ANIMATE:shouldAnimate==='animate-always'?{...(config!==null&&config!==void 0?config:{}),reduceMotion:ReduceMotion.Never}:config;return REAwithSpring(toValue,configForRea,callback);}" };
|
|
let obj = { accessibilityPreferencesSharedValue: mutable.accessibilityPreferencesSharedValue, CONFIG_NEVER_ANIMATE, ReduceMotion: _mod4119.ReduceMotion, REAwithSpring: _mod4119.withSpring };
|
|
const result = set.fileFinishedImporting("design/animation/reanimated/spring/spring.tsx");
|
|
|
|
export { withSpring };
|