decord/source/modules/search/native/hooks/usePlaceholderStyles.tsx

88 lines
3.7 KiB
TypeScript
Raw Normal View History

2026-07-30 10:14:41 +00:00
// Module ID: 15478
// Function ID: 15479
2026-07-20 16:05:17 +00:00
// Name: useFullscreenPlaceholderCount
2026-07-30 10:14:41 +00:00
// Dependencies: [4181, 9097, 1474, 589, 4050, 4190, 1297, 2]
2026-07-20 16:05:17 +00:00
// Exports: useFullscreenPlaceholderCount, usePlaceholderAnimatedStyle
2026-07-30 10:14:41 +00:00
// Module 15478 (useFullscreenPlaceholderCount)
2026-07-29 08:29:29 +00:00
import maybeApplyNoTextColorForLightCustomTheme from "maybeApplyNoTextColorForLightCustomTheme";
2026-07-23 10:11:24 +00:00
import { FADE_LAYOUT_ANIMATION_DURATION as closure_4 } from "SearchAutocompleteSelectAnalyticsActions";
const require = arg1;
2026-07-20 16:05:17 +00:00
let closure_5 = { code: "function usePlaceholderStylesTsx1(){const{useReducedMotion,visible,withRepeat,withSequence,withTiming,STANDARD_EASING,FADE_LAYOUT_ANIMATION_DURATION}=this.__closure;if(useReducedMotion){return{opacity:visible?1:0};}if(visible){return{opacity:withRepeat(withSequence(withTiming(0.5,{duration:0}),withTiming(1,{duration:1300,easing:STANDARD_EASING}),withTiming(0.5,{duration:1300,easing:STANDARD_EASING})),-1)};}return{opacity:withTiming(0,{duration:FADE_LAYOUT_ANIMATION_DURATION})};}" };
2026-07-23 10:11:24 +00:00
const result = require("useWindowDimensions").fileFinishedImporting("modules/search/native/hooks/usePlaceholderStyles.tsx");
2026-07-20 16:05:17 +00:00
export const useFullscreenPlaceholderCount = function useFullscreenPlaceholderCount(arg0) {
let numColumns;
let placeholderHeight;
({ placeholderHeight, numColumns } = arg0);
2026-07-29 08:29:29 +00:00
return Math.ceil(importDefault(1474)({ ignoreKeyboard: true }).height / placeholderHeight) * numColumns;
2026-07-20 16:05:17 +00:00
};
export const usePlaceholderAnimatedStyle = function usePlaceholderAnimatedStyle(visible) {
2026-07-23 10:11:24 +00:00
const _require = visible;
2026-07-29 08:29:29 +00:00
let obj = _require(589);
const items = [maybeApplyNoTextColorForLightCustomTheme];
const stateFromStores = obj.useStateFromStores(items, () => useReducedMotion.useReducedMotion);
2026-07-20 16:05:17 +00:00
class A {
constructor() {
2026-07-29 08:29:29 +00:00
obj = { opacity: null };
2026-07-23 10:11:24 +00:00
tmp = closure_0;
2026-07-20 16:05:17 +00:00
if (closure_1) {
2026-07-29 08:29:29 +00:00
num5 = 0;
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-07-29 08:29:29 +00:00
num5 = 1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[0] = num5;
2026-07-20 16:05:17 +00:00
tmp5 = obj;
} else {
2026-07-23 10:11:24 +00:00
tmp2 = closure_0;
tmp3 = outer1_2;
2026-07-20 16:05:17 +00:00
if (tmp) {
tmp2Result = tmp2(tmp3[4]);
2026-07-29 08:29:29 +00:00
tmp6 = closure_0;
tmp7 = outer1_2;
obj5 = closure_0(outer1_2[4]);
tmp8 = closure_0;
tmp9 = outer1_2;
obj6 = closure_0(outer1_2[5]);
num2 = 0.5;
tmp11 = closure_0;
tmp12 = outer1_2;
withTimingResult = obj6.withTiming(0.5, { duration: 0 });
obj7 = closure_0(outer1_2[5]);
obj = { duration: 1300, easing: null };
tmp13 = closure_0;
tmp14 = outer1_2;
obj[1] = closure_0(outer1_2[6]).STANDARD_EASING;
num3 = 1;
tmp16 = closure_0;
tmp17 = outer1_2;
withTimingResult1 = obj7.withTiming(1, obj);
obj9 = closure_0(outer1_2[5]);
obj1 = { duration: 1300, easing: null };
tmp18 = closure_0;
tmp19 = outer1_2;
obj1[1] = closure_0(outer1_2[6]).STANDARD_EASING;
num4 = -1;
obj[0] = tmp2Result.withRepeat(obj5.withSequence(withTimingResult, withTimingResult1, obj9.withTiming(0.5, obj1)), -1);
2026-07-20 16:05:17 +00:00
tmp5 = obj;
} else {
2026-07-29 08:29:29 +00:00
tmp2Result1 = tmp2(tmp3[5]);
obj2 = { duration: null };
2026-07-23 10:11:24 +00:00
tmp4 = outer1_4;
2026-07-29 08:29:29 +00:00
obj2[0] = outer1_4;
num = 0;
obj[0] = tmp2Result1.withTiming(0, obj2);
2026-07-20 16:05:17 +00:00
tmp5 = obj;
}
}
return tmp5;
}
}
2026-07-29 08:29:29 +00:00
obj = { useReducedMotion: stateFromStores, visible, withRepeat: _require(4050).withRepeat, withSequence: _require(4050).withSequence, withTiming: _require(4190).withTiming, STANDARD_EASING: _require(1297).STANDARD_EASING, FADE_LAYOUT_ANIMATION_DURATION: closure_4 };
2026-07-20 16:05:17 +00:00
A.__closure = obj;
A.__workletHash = 9750536800906;
A.__initData = closure_5;
2026-07-29 08:29:29 +00:00
return _require(4050).useAnimatedStyle(A);
2026-07-20 16:05:17 +00:00
};