decord/alpha/source/modules/launchpad/native/useLaunchPadPullTabMinimized.tsx

149 lines
5.7 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 17851
// Function ID: 17852
2026-07-29 08:29:29 +00:00
// Name: useLaunchPadPullTabMinimized
2026-10-09 10:00:15 +00:00
// Dependencies: [19, 17, 558, 576, 4811, 10986, 2]
2026-07-20 16:05:17 +00:00
2026-10-09 10:00:15 +00:00
// Module 17851 (useLaunchPadPullTabMinimized)
import ReanimatedRexport from "ReanimatedRexport" /* 4811 */;
import VoicePanelUtils from "VoicePanelUtils" /* 10986 */;
2026-10-03 08:58:59 +00:00
import react from "react" /* 19 */;
import react_native from "react-native" /* 17 */;
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
let isScrollingOrDragging;
let tmp3;
const DCDScrollTracker = react_native.NativeModules.DCDScrollTracker;
let tmp32;
2026-07-20 16:05:17 +00:00
if (DCDScrollTracker) {
2026-10-03 08:58:59 +00:00
const self = this;
const self2 = this;
tmp32 = new tmp3(DCDScrollTracker);
2026-07-20 16:05:17 +00:00
}
let closure_3 = tmp32;
2026-10-03 08:58:59 +00:00
let ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
let closure_4 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsMinimizedDuringScroll() {
2026-10-03 08:58:59 +00:00
let sharedValue;
let tmp3;
let tmp4;
let obj = sharedValue(576);
const cResult = obj.c(3);
2026-10-09 10:00:15 +00:00
const obj2 = sharedValue(4811);
2026-10-03 08:58:59 +00:00
sharedValue = obj2.useSharedValue(false);
if (cResult[0] !== sharedValue) {
const fn = function t() {
let closure_0 = -1;
let obj = closure_1_3;
let addListenerResult;
if (closure_1_3 != null) {
addListenerResult = obj.addListener("isScrollingOrDragging", (isScrollingOrDragging) => {
let timeout;
isScrollingOrDragging = isScrollingOrDragging.isScrollingOrDragging;
clearTimeout(timeout);
if (isScrollingOrDragging) {
let result = sharedValue.set(true);
} else {
const _setTimeout = setTimeout;
timeout = setTimeout(() => {
const result = closure_1_0.set(false);
}, 1000);
}
});
}
let closure_1 = addListenerResult;
return () => {
clearTimeout(closure_0);
const obj = closure_1;
if (closure_1 != null) {
obj.remove();
}
};
};
const items = [sharedValue];
cResult[0] = sharedValue;
cResult[1] = fn;
cResult[2] = items;
tmp4 = items;
tmp3 = fn;
} else {
tmp3 = cResult[1];
tmp4 = cResult[2];
}
const effect = react.useEffect(tmp3, tmp4);
return sharedValue;
2026-10-08 09:57:35 +00:00
}) : (function useIsMinimizedDuringScroll() {
2026-10-03 08:58:59 +00:00
let sharedValue;
2026-10-09 10:00:15 +00:00
let obj = sharedValue(4811);
2026-10-03 08:58:59 +00:00
sharedValue = obj.useSharedValue(false);
2026-07-29 08:29:29 +00:00
const items = [sharedValue];
2026-10-03 08:58:59 +00:00
const effect = react.useEffect(() => {
let closure_0 = -1;
let obj = closure_1_3;
2026-07-29 08:29:29 +00:00
let addListenerResult;
2026-10-03 08:58:59 +00:00
if (closure_1_3 != null) {
addListenerResult = obj.addListener("isScrollingOrDragging", (isScrollingOrDragging) => {
let timeout;
isScrollingOrDragging = isScrollingOrDragging.isScrollingOrDragging;
2026-07-29 08:29:29 +00:00
clearTimeout(timeout);
2026-10-03 08:58:59 +00:00
if (isScrollingOrDragging) {
let result = sharedValue.set(true);
2026-07-29 08:29:29 +00:00
} else {
const _setTimeout = setTimeout;
timeout = setTimeout(() => {
const result = closure_1_0.set(false);
2026-07-29 08:29:29 +00:00
}, 1000);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
});
}
2026-10-03 08:58:59 +00:00
let closure_1 = addListenerResult;
2026-07-29 08:29:29 +00:00
return () => {
clearTimeout(closure_0);
2026-10-03 08:58:59 +00:00
const obj = closure_1;
if (closure_1 != null) {
obj.remove();
2026-07-29 08:29:29 +00:00
}
};
}, items);
2026-10-03 08:58:59 +00:00
return sharedValue;
});
const __initData = { code: "function useLaunchPadPullTabMinimizedTsx1(){const{launchPadPullTabState,isVoicePanelOpen,launchPadSharedState,isMinimizedDuringScroll}=this.__closure;const isMinimized=(launchPadPullTabState.get().minimized||isVoicePanelOpen)&&launchPadSharedState.get()<=0;return isMinimized||isMinimizedDuringScroll.get();}" };
const __initData2 = { code: "function useLaunchPadPullTabMinimizedTsx2(){const{launchPadPullTabState,isVoicePanelOpen,launchPadSharedState,isMinimizedDuringScroll}=this.__closure;const isMinimized=(launchPadPullTabState.get().minimized||isVoicePanelOpen)&&launchPadSharedState.get()<=0;return isMinimized||isMinimizedDuringScroll.get();}" };
ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
const tmp6 = ReactCompilerGating.isReactCompilerEnabled() ? (function useLaunchPadPullTabMinimized(launchPadSharedState) {
2026-10-03 08:58:59 +00:00
launchPadSharedState = launchPadSharedState.launchPadSharedState;
const launchPadPullTabState = launchPadSharedState.launchPadPullTabState;
const obj = VoicePanelUtils;
const isVoicePanelFullscreen = obj.useIsVoicePanelFullscreen();
const tmp2 = closure_4();
closure_3 = tmp2;
const fn = function t() {
const value = (launchPadPullTabState.get().minimized || isVoicePanelFullscreen) && launchPadSharedState.get() <= 0 || closure_3.get();
2026-07-20 16:05:17 +00:00
return value;
};
2026-10-03 08:58:59 +00:00
fn.__closure = { launchPadPullTabState, isVoicePanelOpen: isVoicePanelFullscreen, launchPadSharedState, isMinimizedDuringScroll: tmp2 };
2026-07-20 16:05:17 +00:00
fn.__workletHash = 14263056934448;
fn.__initData = __initData;
2026-10-03 08:58:59 +00:00
const obj2 = ReanimatedRexport;
return obj2.useDerivedValue(fn);
2026-10-08 09:57:35 +00:00
}) : (function useLaunchPadPullTabMinimized(launchPadSharedState) {
2026-10-03 08:58:59 +00:00
launchPadSharedState = launchPadSharedState.launchPadSharedState;
const launchPadPullTabState = launchPadSharedState.launchPadPullTabState;
const obj = VoicePanelUtils;
const isVoicePanelFullscreen = obj.useIsVoicePanelFullscreen();
const tmp2 = closure_4();
closure_3 = tmp2;
const fn = function l() {
const value = (launchPadPullTabState.get().minimized || isVoicePanelFullscreen) && launchPadSharedState.get() <= 0 || closure_3.get();
return value;
};
fn.__closure = { launchPadPullTabState, isVoicePanelOpen: isVoicePanelFullscreen, launchPadSharedState, isMinimizedDuringScroll: tmp2 };
fn.__workletHash = 12013643918259;
fn.__initData = __initData2;
const obj2 = ReanimatedRexport;
return obj2.useDerivedValue(fn);
});
let result = size.fileFinishedImporting("modules/launchpad/native/useLaunchPadPullTabMinimized.tsx");
export default tmp6;