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

87 lines
3.7 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 15967
// Function ID: 15968
2026-07-20 16:05:17 +00:00
// Name: useFullscreenPlaceholderCount
2026-08-24 06:08:38 +00:00
// Dependencies: [4669, 8546, 1494, 589, 4119, 4671, 1297, 2]
2026-07-20 16:05:17 +00:00
// Exports: useFullscreenPlaceholderCount, usePlaceholderAnimatedStyle
2026-08-24 06:08:38 +00:00
// Module 15967 (useFullscreenPlaceholderCount)
import useWindowDimensionsDefault from "useWindowDimensions" /* 1494 */;
import closure_3 from "maybeApplyNoTextColorForLightCustomTheme" /* 4669 */;
import { FADE_LAYOUT_ANIMATION_DURATION as closure_4 } from "MessageEmbedTypes" /* 8546 */;
2026-07-23 10:11:24 +00:00
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-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/search/native/hooks/usePlaceholderStyles.tsx");
2026-07-20 16:05:17 +00:00
export const useFullscreenPlaceholderCount = function useFullscreenPlaceholderCount(arg0) {
({ placeholderHeight, numColumns } = arg0);
2026-08-24 06:08:38 +00:00
return Math.ceil(useWindowDimensionsDefault({ 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);
2026-08-24 06:08:38 +00:00
const items = [closure_3];
2026-07-29 08:29:29 +00:00
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;
2026-08-24 06:08:38 +00:00
tmp3 = closure_1_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;
2026-08-24 06:08:38 +00:00
tmp7 = closure_1_2;
obj5 = closure_0(closure_1_2[4]);
2026-07-29 08:29:29 +00:00
tmp8 = closure_0;
2026-08-24 06:08:38 +00:00
tmp9 = closure_1_2;
obj6 = closure_0(closure_1_2[5]);
2026-07-29 08:29:29 +00:00
num2 = 0.5;
tmp11 = closure_0;
2026-08-24 06:08:38 +00:00
tmp12 = closure_1_2;
2026-07-29 08:29:29 +00:00
withTimingResult = obj6.withTiming(0.5, { duration: 0 });
2026-08-24 06:08:38 +00:00
obj7 = closure_0(closure_1_2[5]);
2026-07-29 08:29:29 +00:00
obj = { duration: 1300, easing: null };
tmp13 = closure_0;
2026-08-24 06:08:38 +00:00
tmp14 = closure_1_2;
obj[1] = closure_0(closure_1_2[6]).STANDARD_EASING;
2026-07-29 08:29:29 +00:00
num3 = 1;
tmp16 = closure_0;
2026-08-24 06:08:38 +00:00
tmp17 = closure_1_2;
2026-07-29 08:29:29 +00:00
withTimingResult1 = obj7.withTiming(1, obj);
2026-08-24 06:08:38 +00:00
obj9 = closure_0(closure_1_2[5]);
2026-07-29 08:29:29 +00:00
obj1 = { duration: 1300, easing: null };
tmp18 = closure_0;
2026-08-24 06:08:38 +00:00
tmp19 = closure_1_2;
obj1[1] = closure_0(closure_1_2[6]).STANDARD_EASING;
2026-07-29 08:29:29 +00:00
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-08-24 06:08:38 +00:00
tmp4 = closure_1_4;
obj2[0] = closure_1_4;
2026-07-29 08:29:29 +00:00
num = 0;
obj[0] = tmp2Result1.withTiming(0, obj2);
2026-07-20 16:05:17 +00:00
tmp5 = obj;
}
}
return tmp5;
}
}
2026-08-24 06:08:38 +00:00
obj = { useReducedMotion: stateFromStores, visible, withRepeat: _require(4119).withRepeat, withSequence: _require(4119).withSequence, withTiming: _require(4671).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-08-24 06:08:38 +00:00
return _require(4119).useAnimatedStyle(A);
2026-07-20 16:05:17 +00:00
};