decord/source/modules/launchpad/native/LaunchPadWrapper.tsx

157 lines
6.9 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 16311
// Function ID: 16312
2026-07-20 16:05:17 +00:00
// Name: LaunchPadWrapper
2026-08-25 06:04:03 +00:00
// Dependencies: [32, 19, 17, 10512, 676, 21, 4380, 712, 11055, 1231, 4234, 16312, 8879, 698, 16309, 4348, 4812, 5435, 4120, 16314, 4799, 1236, 4763, 16316, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 16311 (LaunchPadWrapper)
2026-08-24 06:08:38 +00:00
import ThemesDefault from "Themes" /* 712 */;
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
2026-08-25 06:04:03 +00:00
import { LaunchPadTypes } from "LAUNCH_PAD_SPRING_CONFIG" /* 10512 */;
2026-08-24 06:08:38 +00:00
import ME from "ME" /* 676 */;
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
({ View: c5, Pressable: closure_6, TouchableOpacity: error, StyleSheet: closure_8 } = get_ActivityIndicator);
2026-07-29 08:29:29 +00:00
({ AnalyticEvents: c10, ComponentActions: unpackModuleId } = ME);
({ jsx: closure_12, jsxs: map1 } = jsxProd);
createCacheKey = { modalWrapper: null, a11yDismiss: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { height: "100%", width: "100%", paddingTop: ThemesDefault.space.PX_8 };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
createCacheKey[1] = { position: "absolute", top: 0, width: "100%", height: ThemesDefault.space.PX_8 };
let closure_14 = createCacheKey.createStyles(createCacheKey);
let obj1 = { position: "absolute", top: 0, width: "100%", height: ThemesDefault.space.PX_8 };
let result = require("set").fileFinishedImporting("modules/launchpad/native/LaunchPadWrapper.tsx");
2026-07-20 16:05:17 +00:00
export default function LaunchPadWrapper(launchPadType) {
launchPadType = launchPadType.launchPadType;
2026-07-29 08:29:29 +00:00
updaters = launchPadType;
2026-07-20 16:05:17 +00:00
({ gestureState, launchPadShown, launchPadSharedState, updaters } = launchPadType);
2026-07-29 08:29:29 +00:00
let isModalOpen;
let callback;
let ref;
2026-08-24 06:08:38 +00:00
closure_5 = undefined;
2026-07-29 08:29:29 +00:00
callback = undefined;
2026-08-24 06:08:38 +00:00
const tmp = callback3();
2026-07-29 08:29:29 +00:00
let obj = updaters(isModalOpen[10]);
2026-07-23 10:11:24 +00:00
isModalOpen = obj.useIsModalOpen();
({ launchPadCoverStyles, launchPadStyles } = updaters(isModalOpen[11])({ launchPadSharedState, launchPadShown, gestureState }));
2026-07-29 08:29:29 +00:00
const tmp7 = updaters(isModalOpen[12])(launchPadShown);
callback = tmp7;
ref = ref.useRef(!tmp7);
closure_5 = callback(ref.useState({}), 2)[1];
const items = [tmp7];
const effect = ref.useEffect(() => {
2026-08-24 06:08:38 +00:00
if (closure_3) {
2026-07-20 16:05:17 +00:00
ref.current = false;
} else {
const _setTimeout = setTimeout;
const timeout = setTimeout(() => {
2026-08-24 06:08:38 +00:00
closure_4.current = true;
2026-07-29 08:29:29 +00:00
callback({});
2026-07-20 16:05:17 +00:00
}, 1000);
return () => clearTimeout(closure_0);
}
}, items);
const items1 = [updaters];
2026-07-23 10:11:24 +00:00
callback = ref.useCallback(() => updaters.setLaunchPadPosition(0), items1);
2026-07-29 08:29:29 +00:00
const items2 = [tmp7];
2026-07-23 10:11:24 +00:00
const effect1 = ref.useEffect(() => {
2026-08-24 06:08:38 +00:00
if (closure_3) {
updaters(isModalOpen[13]).track(closure_1_10.LAUNCHPAD_OPENED);
2026-07-20 16:05:17 +00:00
const obj = updaters(isModalOpen[13]);
}
}, items2);
2026-07-29 08:29:29 +00:00
const items3 = [launchPadType, tmp7, isModalOpen];
2026-07-23 10:11:24 +00:00
const effect2 = ref.useEffect(() => {
2026-08-24 06:08:38 +00:00
if (updaters === closure_1_9.PULL_TAB) {
2026-07-20 16:05:17 +00:00
if (!isModalOpen) {
2026-07-29 08:29:29 +00:00
const result = updaters(isModalOpen[14]).setLaunchPadPullTabExclusionRect();
2026-08-24 06:08:38 +00:00
if (closure_3) {
2026-07-29 08:29:29 +00:00
const result1 = tmp2(tmp3[15]).triggerHapticFeedback(tmp2(tmp3[15]).HapticFeedbackTypes.IMPACT_LIGHT);
const tmp2Result = tmp2(tmp3[15]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj = updaters(isModalOpen[14]);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const result2 = updaters(isModalOpen[14]).clearLaunchPadPullTabExclusionRect();
2026-07-20 16:05:17 +00:00
}, items3);
const items4 = [launchPadShown];
2026-07-29 08:29:29 +00:00
const effect3 = ref.useEffect(() => () => callback(table[14]).clearLaunchPadPullTabExclusionRect(), items4);
2026-07-23 10:11:24 +00:00
updaters(isModalOpen[16])(() => {
2026-08-24 06:08:38 +00:00
if (closure_3) {
2026-07-20 16:05:17 +00:00
callback();
}
2026-08-24 06:08:38 +00:00
return closure_3;
2026-07-20 16:05:17 +00:00
});
2026-07-29 08:29:29 +00:00
const items5 = [updaters];
const effect4 = ref.useEffect(() => {
function showLaunchPad() {
showLaunchPad.setLaunchPadShown(true);
showLaunchPad.setLaunchPadPosition(1);
}
function hideLaunchPad() {
showLaunchPad.setLaunchPadShown(false);
showLaunchPad.setLaunchPadPosition(0);
}
2026-08-24 06:08:38 +00:00
closure_2 = updaters(isModalOpen[8]).addRouteChangeListener(hideLaunchPad);
2026-07-29 08:29:29 +00:00
let ComponentDispatch = updaters(isModalOpen[9]).ComponentDispatch;
2026-08-24 06:08:38 +00:00
const subscription = ComponentDispatch.subscribe(closure_1_11.LAUNCH_PAD_SHOW, showLaunchPad);
2026-07-29 08:29:29 +00:00
let ComponentDispatch2 = updaters(isModalOpen[9]).ComponentDispatch;
2026-08-24 06:08:38 +00:00
const subscription1 = ComponentDispatch2.subscribe(closure_1_11.LAUNCH_PAD_HIDE, hideLaunchPad);
2026-07-29 08:29:29 +00:00
return () => {
callback();
const ComponentDispatch = updaters(isModalOpen[9]).ComponentDispatch;
2026-08-24 06:08:38 +00:00
ComponentDispatch.unsubscribe(closure_2_11.LAUNCH_PAD_SHOW, showLaunchPad);
2026-07-29 08:29:29 +00:00
const ComponentDispatch2 = updaters(isModalOpen[9]).ComponentDispatch;
2026-08-24 06:08:38 +00:00
ComponentDispatch2.unsubscribe(closure_2_11.LAUNCH_PAD_HIDE, hideLaunchPad);
2026-07-29 08:29:29 +00:00
};
}, items5);
obj = { style: absoluteFill.absoluteFill, pointerEvents: "box-none", children: null };
const tmp6 = updaters(isModalOpen[11])({ launchPadSharedState, launchPadShown, gestureState });
const items6 = [callback2(updaters(isModalOpen[18]).View, { style: launchPadCoverStyles, pointerEvents: "none" }), , ];
let tmp20Result = null;
2026-07-20 16:05:17 +00:00
if (launchPadType === LaunchPadTypes.PULL_TAB) {
2026-07-29 08:29:29 +00:00
tmp20Result = null;
2026-07-20 16:05:17 +00:00
if (!isModalOpen) {
2026-07-29 08:29:29 +00:00
obj = { gestureState: null, launchPadSharedState: null, launchPadPullTabState: null, updaters: null };
obj[0] = gestureState;
obj[1] = launchPadSharedState;
obj[2] = launchPadType.launchPadPullTabState;
obj[3] = updaters;
tmp20Result = tmp20(tmp5(tmp3[19]), obj);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
items6[1] = tmp20Result;
2026-08-24 06:08:38 +00:00
obj1 = { style: launchPadStyles, pointerEvents: "none", children: null };
2026-07-29 08:29:29 +00:00
const obj2 = { nativeID: "launch-pad", style: tmp.modalWrapper, onAccessibilityEscape: callback, accessibilityViewIsModal: tmp7, children: null };
2026-07-20 16:05:17 +00:00
let str2 = "no";
2026-07-29 08:29:29 +00:00
if (tmp7) {
2026-07-20 16:05:17 +00:00
str2 = "yes";
}
2026-07-29 08:29:29 +00:00
const obj3 = { importantForAccessibility: str2, accessibilityRole: "button", accessibilityLabel: null, onPress: null, style: null };
const intl = tmp2(tmp3[21]).intl;
obj3[2] = intl.string(updaters(isModalOpen[21]).t.WAI6xu);
obj3[3] = callback;
obj3[4] = tmp.a11yDismiss;
const items7 = [callback2(callback, obj3), callback2(closure_7, { accessible: false, "aria-hidden": true, onPress: callback, style: absoluteFill.absoluteFillObject }), ];
let tmp23 = !tmp7;
if (!tmp7) {
tmp23 = tmp16;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj4 = { accessible: false, "aria-hidden": true, onPress: callback, style: absoluteFill.absoluteFillObject };
tmp16 = updaters(isModalOpen[17])(ref);
const tmp18 = closure_5;
const tmp19 = absoluteFill;
const tmp22 = callback;
items7[2] = callback2(updaters(isModalOpen[22]).Freeze, { freeze: tmp23, children: callback2(updaters(isModalOpen[23]), { visible: tmp7, sharedState: launchPadSharedState }) });
obj2[4] = items7;
obj1[2] = closure_13(updaters(isModalOpen[20]).AccessibilityView, obj2);
items6[2] = callback2(updaters(isModalOpen[18]).View, obj1);
obj[2] = items6;
return closure_13(tmp18, obj);
2026-07-20 16:05:17 +00:00
};