decord/source/design/animation/reanimated/timing/timing.tsx
2026-08-24 06:08:38 +00:00

44 lines
2.3 KiB
TypeScript

// Module ID: 4671
// Function ID: 4672
// Name: CONFIG_NEVER_ANIMATE_TIMING
// Dependencies: [4672, 4673, 4119, 2]
// Exports: withTiming
// Module 4671 (CONFIG_NEVER_ANIMATE_TIMING)
import set from "set" /* 2 */;
import _mod4119 from "module_4119" /* 4119 */;
import CONFIG_NEVER_ANIMATE from "CONFIG_NEVER_ANIMATE" /* 4672 */;
import mutable from "mutable" /* 4673 */;
const CONFIG_NEVER_ANIMATE_TIMING = CONFIG_NEVER_ANIMATE.CONFIG_NEVER_ANIMATE_TIMING;
function withTiming(value, timingStandard, fn, fn2) {
let str = fn;
if (fn === undefined) {
str = "respect-motion-settings";
}
const accessibilityPreferencesSharedValue = mutable.accessibilityPreferencesSharedValue;
if ("animate-always" === str) {
let tmp7 = timingStandard;
if (tmp4) {
let obj = timingStandard;
if (timingStandard == null) {
obj = {};
}
obj = {};
const merged = Object.assign(obj);
obj.reduceMotion = tmp(4119).ReduceMotion.Never;
tmp7 = obj;
}
let tmp5 = tmp7;
} else {
tmp5 = CONFIG_NEVER_ANIMATE_TIMING;
}
return _mod4119.withTiming(value, tmp5, fn2);
}
withTiming.__closure = { accessibilityPreferencesSharedValue: mutable.accessibilityPreferencesSharedValue, CONFIG_NEVER_ANIMATE_TIMING, ReduceMotion: _mod4119.ReduceMotion, REAwithTiming: _mod4119.withTiming };
withTiming.__workletHash = 6710776253444;
withTiming.__initData = { code: "function withTiming_timingTsx1(toValue,config,shouldAnimate='respect-motion-settings',callback){const{accessibilityPreferencesSharedValue,CONFIG_NEVER_ANIMATE_TIMING,ReduceMotion,REAwithTiming}=this.__closure;const reducedMotionEnabled=accessibilityPreferencesSharedValue.get().reduceMotion;const animate=shouldAnimate==='animate-always'||shouldAnimate==='respect-motion-settings'&&!reducedMotionEnabled;const configForRea=!animate?CONFIG_NEVER_ANIMATE_TIMING:shouldAnimate==='animate-always'?{...(config!==null&&config!==void 0?config:{}),reduceMotion:ReduceMotion.Never}:config;return REAwithTiming(toValue,configForRea,callback);}" };
let obj = { accessibilityPreferencesSharedValue: mutable.accessibilityPreferencesSharedValue, CONFIG_NEVER_ANIMATE_TIMING, ReduceMotion: _mod4119.ReduceMotion, REAwithTiming: _mod4119.withTiming };
const result = set.fileFinishedImporting("design/animation/reanimated/timing/timing.tsx");
export { withTiming };