decord/source/design/animation/reanimated/spring/spring.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

43 lines
2.2 KiB
TypeScript

// Module ID: 5024
// Function ID: 5025
// Name: spring
// Dependencies: [4607, 4608, 4341, 2]
// Exports: withSpring
// Module 5024 (spring)
import ReanimatedRexport from "ReanimatedRexport" /* 4341 */;
import ReanimatedConstants from "ReanimatedConstants" /* 4607 */;
import reanimated_AccessibilityPreferencesSharedValue from "reanimated/AccessibilityPreferencesSharedValue" /* 4608 */;
import size from "module_2" /* 2 */;
const CONFIG_NEVER_ANIMATE = ReanimatedConstants.CONFIG_NEVER_ANIMATE;
function withSpring(targetHeight, SUBTLE_SPRING, fn, fn2) {
let str = fn;
if (fn === undefined) {
str = "respect-motion-settings";
}
const accessibilityPreferencesSharedValue = reanimated_AccessibilityPreferencesSharedValue.accessibilityPreferencesSharedValue;
if ("animate-always" === str) {
let tmp7 = SUBTLE_SPRING;
if (tmp4) {
let obj = SUBTLE_SPRING;
if (SUBTLE_SPRING == null) {
obj = {};
}
const obj2 = {};
const merged = Object.assign(obj);
obj2.reduceMotion = tmp(4341).ReduceMotion.Never;
tmp7 = obj2;
}
let tmp5 = tmp7;
} else {
tmp5 = CONFIG_NEVER_ANIMATE;
}
return ReanimatedRexport.withSpring(targetHeight, tmp5, fn2);
}
withSpring.__closure = { accessibilityPreferencesSharedValue: reanimated_AccessibilityPreferencesSharedValue.accessibilityPreferencesSharedValue, CONFIG_NEVER_ANIMATE, ReduceMotion: ReanimatedRexport.ReduceMotion, REAwithSpring: ReanimatedRexport.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);}" };
const result = size.fileFinishedImporting("design/animation/reanimated/spring/spring.tsx");
export { withSpring };