Files
2026-07-28 01:06:53 +03:00

83 lines
5.8 KiB
TypeScript

/* Metro module 15040; source: modules/search/native/hooks/usePlaceholderStyles.tsx; dependencies: [4502, 9615, 1478, 566, 4017, 4504, 1305, 2] */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as SearchConstantsModule from '../../SearchConstants.tsx'; /* Metro dependency 9615 */
function _fun113822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15237:6, offset: 0x024071f4, size: 169 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {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})};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/search/native/hooks/usePlaceholderStyles.tsx');
exports.useFullscreenPlaceholderCount = useFullscreenPlaceholderCount;
exports.usePlaceholderAnimatedStyle = usePlaceholderAnimatedStyle;
function useFullscreenPlaceholderCount({placeholderHeight, numColumns}) { // fn#113823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15237:764, offset: 0x0240729d, size: 88 bytes, params: 2, frame: 14
const height = (UseWindowDimensionsNative)({ignoreKeyboard: true}).height;
const Math = global.Math;
return Math.ceil(height / placeholderHeight) * numColumns;
}
function usePlaceholderAnimatedStyle(a0) { // fn#113824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15237:936, offset: 0x024072f5, size: 237 bytes, params: 2, frame: 20
const env0_0 = a0;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const usePlaceholderAnimatedStyleA2 = usePlaceholderAnimatedStyleA;
object = {useReducedMotion: useReducedMotion, visible: a0};
object.withRepeat = ReanimatedRexportModule.withRepeat;
object.withSequence = ReanimatedRexportModule.withSequence;
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object.STANDARD_EASING = STANDARD_EASING;
object.FADE_LAYOUT_ANIMATION_DURATION = FADE_LAYOUT_ANIMATION_DURATION;
usePlaceholderAnimatedStyleA2.__closure = object;
usePlaceholderAnimatedStyleA2.__workletHash = 9750536800906;
usePlaceholderAnimatedStyleA2.__initData = env0_5;
return Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [usePlaceholderAnimatedStyleA2]);
function usePlaceholderAnimatedStyleA() { // fn#113826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15237:1077, owner: usePlaceholderAnimatedStyle.A, offset: 0x024073e2, size: 307 bytes, params: 1, frame: 29
var withRepeat;
var moduleValue2;
var withSequence;
var value2;
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
var value3;
var moduleValue5;
var value;
const object = {};
const binding = env0_0;
if (useReducedMotion) {
object.opacity = binding ? 1 : 0;
} else {
value = environment.__proto__;
if (binding) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withRepeat = value.withRepeat;
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue2.withSequence;
value2 = (require(4504) /* metro dependency 4504: timing */).withTiming(0.5, {duration: 0});
value3 = (require(4504) /* metro dependency 4504: timing */).withTiming(1, {duration: 1300,
easing: STANDARD_EASING});
moduleValue5 = require(4504) /* metro dependency 4504: timing */;
object.opacity = Reflect.apply(withRepeat, value, [Reflect.apply(withSequence, moduleValue2, [value2,
value3,
moduleValue5.withTiming(0.5, {duration: 1300, easing: STANDARD_EASING})]), -1]);
} else {
object.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(0,
{duration: FADE_LAYOUT_ANIMATION_DURATION});
}
}
return object;
}
}
}
global.__d(_fun113822, 15040, [4502, 9615, 1478, 566, 4017, 4504, 1305,
2]) /* metro module 15040, dependencies: [4502, 9615, 1478, 566, 4017, 4504, 1305, 2] */;