Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4907.js (118.4 MB)
67 lines
2.6 KiB
TypeScript
67 lines
2.6 KiB
TypeScript
// Module ID: 15227
|
|
// Function ID: 15228
|
|
// Name: useVisibilityTransition
|
|
// Dependencies: [32, 19, 4458, 4723, 2]
|
|
// Exports: useVisibilityTransition
|
|
|
|
// Module 15227 (useVisibilityTransition)
|
|
import ReanimatedRexport from "ReanimatedRexport" /* 4458 */;
|
|
import timing from "timing" /* 4723 */;
|
|
import _slicedToArray from "module_32" /* 32 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
let closure_4 = { code: "function useVisibilityTransitionTsx1(){const{withTiming,visibility,visible,entranceTiming,exitTiming,runOnJS,animationCallbackJSThread}=this.__closure;return{opacity:withTiming(visibility,visible?entranceTiming:exitTiming,'respect-motion-settings',function(){'worklet';runOnJS(animationCallbackJSThread)();})};}" };
|
|
let closure_5 = { code: "function useVisibilityTransitionTsx2(){const{runOnJS,animationCallbackJSThread}=this.__closure;runOnJS(animationCallbackJSThread)();}" };
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/quests/native/BountiesModal/useVisibilityTransition.tsx");
|
|
|
|
export const useVisibilityTransition = function useVisibilityTransition(visible) {
|
|
visible = visible.visible;
|
|
const entranceTiming = visible.entranceTiming;
|
|
const exitTiming = visible.exitTiming;
|
|
noop = undefined;
|
|
__initData = undefined;
|
|
let num;
|
|
let tmp = exitTiming(noop.useState(false), 2);
|
|
noop = tmp2;
|
|
let tmp3 = exitTiming(noop.useState(visible), 2);
|
|
if (tmp3[0] !== visible) {
|
|
tmp3[1](visible);
|
|
if (!visible) {
|
|
tmp2(true);
|
|
}
|
|
}
|
|
__initData = noop.useCallback(() => {
|
|
closure_3(false);
|
|
}, []);
|
|
num = 0;
|
|
if (visible) {
|
|
num = 1;
|
|
}
|
|
let obj2 = { opacityStyle: null, shouldRender: null };
|
|
let fn = function k() {
|
|
const obj2 = { opacity: null };
|
|
const fn = function n() {
|
|
visible(entranceTiming[2]).runOnJS(callback)();
|
|
};
|
|
const obj = timing;
|
|
const tmp3 = num;
|
|
const tmp4 = visible ? entranceTiming : exitTiming;
|
|
fn.__closure = { runOnJS: ReanimatedRexport.runOnJS, animationCallbackJSThread };
|
|
fn.__workletHash = 11904317879470;
|
|
fn.__initData = __initData;
|
|
obj2.opacity = obj.withTiming(tmp3, tmp4, "respect-motion-settings", fn);
|
|
return obj2;
|
|
};
|
|
const obj3 = visible(entranceTiming[2]);
|
|
fn.__closure = { withTiming: visible(entranceTiming[3]).withTiming, visibility: num, visible, entranceTiming, exitTiming, runOnJS: visible(entranceTiming[2]).runOnJS, animationCallbackJSThread: __initData };
|
|
fn.__workletHash = 12648900540770;
|
|
fn.__initData = __initData;
|
|
obj2.opacityStyle = obj3.useAnimatedStyle(fn);
|
|
if (!visible) {
|
|
visible = tmp[0];
|
|
}
|
|
obj2.shouldRender = visible;
|
|
return obj2;
|
|
};
|