2026-09-28 16:18:32 +00:00
|
|
|
// Module ID: 16791
|
|
|
|
|
// Function ID: 16792
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: useLaunchPadState
|
2026-09-28 16:18:32 +00:00
|
|
|
// Dependencies: [19, 11002, 16792, 4566, 11515, 10895, 10896, 2]
|
2026-09-26 17:57:22 +00:00
|
|
|
// Exports: default
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-09-28 16:18:32 +00:00
|
|
|
// Module 16791 (useLaunchPadState)
|
2026-10-01 14:13:23 +00:00
|
|
|
import react from "react" /* 19 */;
|
|
|
|
|
import LaunchPadConstants from "LaunchPadConstants" /* 11002 */;
|
|
|
|
|
import LaunchPadPullTabCache_mod from "LaunchPadPullTabCache" /* 16792 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
let LaunchPadPullTabCache;
|
|
|
|
|
let closure_4;
|
|
|
|
|
let hasOwnProperty;
|
2026-09-18 19:45:33 +00:00
|
|
|
({ LAUNCH_PAD_PULL_TAB_MAX_POSITION: closure_4, LAUNCH_PAD_PULL_TAB_SCALE_OFFSET: hasOwnProperty } = LaunchPadConstants);
|
|
|
|
|
let closure_6 = { active: false, initialLaunchPadPosition: 0, initialPullTabPosition: 0, initialTouchX: 0, initialTouchY: 0, positionOffsetX: 0, positionOffsetY: 0, startTime: -1, requiresPop: false, startShown: false };
|
2026-10-01 14:13:23 +00:00
|
|
|
let __closure = { position: LaunchPadPullTabCache.getLaunchPadPullTabPositionCached(), scale: 1, offset: 0, minimized: false };
|
|
|
|
|
LaunchPadPullTabCache = LaunchPadPullTabCache_mod;
|
2026-09-26 17:57:22 +00:00
|
|
|
let closure_8 = { code: "function setLaunchPadShown_useLaunchPadStateNativeTsx1(shown){const{launchPadShown}=this.__closure;launchPadShown.set(shown);}" };
|
|
|
|
|
let closure_9 = { code: "function setLaunchPadPosition_useLaunchPadStateNativeTsx2(value){const{launchPadSharedState}=this.__closure;launchPadSharedState.set(Math.max(Math.min(value,1),0));}" };
|
|
|
|
|
let closure_10 = { code: "function setLaunchPadPullTabBoundedPosition_useLaunchPadStateNativeTsx3(positionY){const{getWindowDimensionsWorklet,launchPadPullTabState,LAUNCH_PAD_PULL_TAB_MAX_POSITION,getSafeAreaInsetsWorklet,LAUNCH_PAD_PULL_TAB_SCALE_OFFSET,updateSharedValueIfChanged,runOnJS,persistLaunchPadPullTabPosition}=this.__closure;const positionYMax=getWindowDimensionsWorklet().height-launchPadPullTabState.get().offset-LAUNCH_PAD_PULL_TAB_MAX_POSITION;const positionYMin=getSafeAreaInsetsWorklet().top+LAUNCH_PAD_PULL_TAB_SCALE_OFFSET;const position=Math.max(Math.min(positionY,positionYMax),positionYMin);updateSharedValueIfChanged(launchPadPullTabState,{position:position});runOnJS(persistLaunchPadPullTabPosition)(position);}" };
|
|
|
|
|
let closure_11 = { code: "function setLaunchPadPullTabTranslation_useLaunchPadStateNativeTsx4(translationY){const{gestureState,setLaunchPadPullTabBoundedPosition}=this.__closure;const positionY=gestureState.get().initialPullTabPosition+translationY;setLaunchPadPullTabBoundedPosition(positionY);}" };
|
|
|
|
|
let closure_12 = { code: "function setLaunchPadPullTabPosition_useLaunchPadStateNativeTsx5(position,offset){const{updateSharedValueIfChanged,launchPadPullTabState}=this.__closure;updateSharedValueIfChanged(launchPadPullTabState,{position:position,offset:offset});}" };
|
|
|
|
|
let closure_13 = { code: "function setLaunchPadPullTabScale_useLaunchPadStateNativeTsx6(scale){const{updateSharedValueIfChanged,launchPadPullTabState}=this.__closure;updateSharedValueIfChanged(launchPadPullTabState,{scale:scale});}" };
|
|
|
|
|
let closure_14 = { code: "function setLaunchPadPullTabMinimized_useLaunchPadStateNativeTsx7(minimized){const{updateSharedValueIfChanged,launchPadPullTabState}=this.__closure;updateSharedValueIfChanged(launchPadPullTabState,{minimized:minimized});}" };
|
|
|
|
|
let closure_15 = { code: "function onWindowHeightChange_useLaunchPadStateNativeTsx8(){const{launchPadPullTabState,setLaunchPadPullTabBoundedPosition}=this.__closure;const positionY=launchPadPullTabState.get().position;setLaunchPadPullTabBoundedPosition(positionY);}" };
|
2026-09-18 19:45:33 +00:00
|
|
|
let result = size.fileFinishedImporting("modules/launchpad/native/useLaunchPadState.native.tsx");
|
|
|
|
|
|
2026-09-26 17:57:22 +00:00
|
|
|
export default function useLaunchPadState() {
|
2026-10-01 14:13:23 +00:00
|
|
|
let LAUNCH_PAD_PULL_TAB_MAX_POSITION;
|
|
|
|
|
let LAUNCH_PAD_PULL_TAB_SCALE_OFFSET;
|
|
|
|
|
let __initData7;
|
|
|
|
|
let __initData8;
|
|
|
|
|
let sharedValue;
|
|
|
|
|
let sharedValue2;
|
2026-09-26 17:57:22 +00:00
|
|
|
let obj = sharedValue(sharedValue2[3]);
|
2026-09-18 19:45:33 +00:00
|
|
|
sharedValue = obj.useSharedValue(closure_6);
|
2026-09-26 17:57:22 +00:00
|
|
|
let obj2 = sharedValue(sharedValue2[3]);
|
2026-10-01 14:13:23 +00:00
|
|
|
const sharedValue1 = obj2.useSharedValue(obj);
|
2026-09-26 17:57:22 +00:00
|
|
|
let obj3 = sharedValue(sharedValue2[3]);
|
2026-10-01 14:13:23 +00:00
|
|
|
sharedValue2 = obj3.useSharedValue(0);
|
2026-09-26 17:57:22 +00:00
|
|
|
let obj4 = sharedValue(sharedValue2[3]);
|
2026-10-01 14:13:23 +00:00
|
|
|
const sharedValue3 = obj4.useSharedValue(false);
|
|
|
|
|
const items = [sharedValue, sharedValue1, sharedValue2, sharedValue3];
|
|
|
|
|
let obj5 = {
|
2026-09-18 19:45:33 +00:00
|
|
|
launchPadSharedState: sharedValue2,
|
|
|
|
|
launchPadPullTabState: sharedValue1,
|
|
|
|
|
launchPadShown: sharedValue3,
|
|
|
|
|
gestureState: sharedValue,
|
|
|
|
|
updaters: sharedValue3.useMemo(() => {
|
2026-10-01 14:13:23 +00:00
|
|
|
let onWindowHeightChange;
|
|
|
|
|
let setLaunchPadPullTabMinimized;
|
|
|
|
|
let setLaunchPadPullTabPosition;
|
|
|
|
|
let setLaunchPadPullTabScale;
|
|
|
|
|
let setLaunchPadPullTabTranslation;
|
2026-09-18 19:45:33 +00:00
|
|
|
function setLaunchPadShown(arg0) {
|
|
|
|
|
const result = sharedValue3.set(arg0);
|
|
|
|
|
}
|
|
|
|
|
__closure = { launchPadShown: sharedValue3 };
|
|
|
|
|
setLaunchPadShown.__closure = __closure;
|
2026-09-26 17:57:22 +00:00
|
|
|
setLaunchPadShown.__workletHash = 12645438005571;
|
2026-09-18 19:45:33 +00:00
|
|
|
setLaunchPadShown.__initData = __initData;
|
|
|
|
|
function setLaunchPadPosition(arg0) {
|
|
|
|
|
const result = sharedValue2.set(Math.max(Math.min(arg0, 1), 0));
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj2 = { launchPadSharedState: sharedValue2 };
|
|
|
|
|
setLaunchPadPosition.__closure = obj2;
|
2026-09-26 17:57:22 +00:00
|
|
|
setLaunchPadPosition.__workletHash = 6880435508235;
|
2026-09-18 19:45:33 +00:00
|
|
|
setLaunchPadPosition.__initData = __initData2;
|
2026-09-26 17:57:22 +00:00
|
|
|
function setLaunchPadPullTabBoundedPosition(position) {
|
|
|
|
|
const obj = sharedValue(sharedValue2[4]);
|
2026-10-01 14:13:23 +00:00
|
|
|
const diff = obj.getWindowDimensionsWorklet().height - closure_1_1.get().offset - LAUNCH_PAD_PULL_TAB_MAX_POSITION;
|
|
|
|
|
const obj2 = sharedValue(sharedValue2[5]);
|
|
|
|
|
const sum = obj2.getSafeAreaInsetsWorklet().top + LAUNCH_PAD_PULL_TAB_SCALE_OFFSET;
|
2026-09-26 17:57:22 +00:00
|
|
|
const bound = Math.max(Math.min(position, diff), sum);
|
|
|
|
|
sharedValue1(sharedValue2[6])(closure_1_1, { position: bound });
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj3 = sharedValue(sharedValue2[3]);
|
|
|
|
|
obj3.runOnJS(sharedValue(sharedValue2[2]).persistLaunchPadPullTabPosition)(bound);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj3 = { getWindowDimensionsWorklet: sharedValue(sharedValue2[4]).getWindowDimensionsWorklet, launchPadPullTabState: sharedValue1, LAUNCH_PAD_PULL_TAB_MAX_POSITION, getSafeAreaInsetsWorklet: sharedValue(sharedValue2[5]).getSafeAreaInsetsWorklet, LAUNCH_PAD_PULL_TAB_SCALE_OFFSET, updateSharedValueIfChanged: sharedValue1(sharedValue2[6]), runOnJS: sharedValue(sharedValue2[3]).runOnJS, persistLaunchPadPullTabPosition: sharedValue(sharedValue2[2]).persistLaunchPadPullTabPosition };
|
|
|
|
|
setLaunchPadPullTabBoundedPosition.__closure = obj3;
|
2026-09-26 17:57:22 +00:00
|
|
|
setLaunchPadPullTabBoundedPosition.__workletHash = 1905227275114;
|
2026-09-18 19:45:33 +00:00
|
|
|
setLaunchPadPullTabBoundedPosition.__initData = __initData3;
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj4 = { setLaunchPadShown, setLaunchPadPosition, setLaunchPadPullTabTranslation, setLaunchPadPullTabPosition, setLaunchPadPullTabScale, setLaunchPadPullTabMinimized, onWindowHeightChange };
|
|
|
|
|
setLaunchPadPullTabTranslation = function setLaunchPadPullTabTranslation(translationY) {
|
2026-09-26 17:57:22 +00:00
|
|
|
setLaunchPadPullTabBoundedPosition(sharedValue.get().initialPullTabPosition + translationY);
|
2026-10-01 14:13:23 +00:00
|
|
|
};
|
|
|
|
|
const obj5 = { gestureState: setLaunchPadPullTabBoundedPosition, setLaunchPadPullTabBoundedPosition };
|
|
|
|
|
setLaunchPadPullTabTranslation.__closure = obj5;
|
2026-09-26 17:57:22 +00:00
|
|
|
setLaunchPadPullTabTranslation.__workletHash = 11096032645208;
|
2026-09-18 19:45:33 +00:00
|
|
|
setLaunchPadPullTabTranslation.__initData = __initData4;
|
2026-10-01 14:13:23 +00:00
|
|
|
setLaunchPadPullTabPosition = function setLaunchPadPullTabPosition(sum, offset) {
|
|
|
|
|
const obj = { position: sum, offset };
|
|
|
|
|
sharedValue1(sharedValue2[6])(closure_1_1, obj);
|
|
|
|
|
};
|
2026-09-26 17:57:22 +00:00
|
|
|
setLaunchPadPullTabPosition.__closure = { updateSharedValueIfChanged: sharedValue1(sharedValue2[6]), launchPadPullTabState: sharedValue1 };
|
|
|
|
|
setLaunchPadPullTabPosition.__workletHash = 14398804359967;
|
2026-09-18 19:45:33 +00:00
|
|
|
setLaunchPadPullTabPosition.__initData = __initData5;
|
2026-10-01 14:13:23 +00:00
|
|
|
setLaunchPadPullTabScale = function setLaunchPadPullTabScale(scale) {
|
|
|
|
|
const obj = { scale };
|
|
|
|
|
sharedValue1(sharedValue2[6])(closure_1_1, obj);
|
|
|
|
|
};
|
|
|
|
|
({ updateSharedValueIfChanged: sharedValue1(sharedValue2[6]), launchPadPullTabState: sharedValue1 });
|
2026-09-26 17:57:22 +00:00
|
|
|
setLaunchPadPullTabScale.__closure = { updateSharedValueIfChanged: sharedValue1(sharedValue2[6]), launchPadPullTabState: sharedValue1 };
|
|
|
|
|
setLaunchPadPullTabScale.__workletHash = 4772968963371;
|
2026-09-18 19:45:33 +00:00
|
|
|
setLaunchPadPullTabScale.__initData = __initData6;
|
2026-10-01 14:13:23 +00:00
|
|
|
setLaunchPadPullTabMinimized = function setLaunchPadPullTabMinimized(minimized) {
|
|
|
|
|
const obj = { minimized };
|
|
|
|
|
sharedValue1(sharedValue2[6])(closure_1_1, obj);
|
|
|
|
|
};
|
|
|
|
|
({ updateSharedValueIfChanged: sharedValue1(sharedValue2[6]), launchPadPullTabState: sharedValue1 });
|
2026-09-26 17:57:22 +00:00
|
|
|
setLaunchPadPullTabMinimized.__closure = { updateSharedValueIfChanged: sharedValue1(sharedValue2[6]), launchPadPullTabState: sharedValue1 };
|
|
|
|
|
setLaunchPadPullTabMinimized.__workletHash = 2379539261994;
|
2026-09-18 19:45:33 +00:00
|
|
|
setLaunchPadPullTabMinimized.__initData = __initData7;
|
2026-10-01 14:13:23 +00:00
|
|
|
onWindowHeightChange = function onWindowHeightChange() {
|
2026-09-18 19:45:33 +00:00
|
|
|
setLaunchPadPullTabBoundedPosition(sharedValue1.get().position);
|
2026-10-01 14:13:23 +00:00
|
|
|
};
|
2026-09-18 19:45:33 +00:00
|
|
|
onWindowHeightChange.__closure = { launchPadPullTabState: sharedValue1, setLaunchPadPullTabBoundedPosition };
|
2026-09-26 17:57:22 +00:00
|
|
|
onWindowHeightChange.__workletHash = 17230667749428;
|
2026-09-18 19:45:33 +00:00
|
|
|
onWindowHeightChange.__initData = __initData8;
|
2026-10-01 14:13:23 +00:00
|
|
|
({ updateSharedValueIfChanged: sharedValue1(sharedValue2[6]), launchPadPullTabState: sharedValue1 });
|
2026-09-18 19:45:33 +00:00
|
|
|
return obj4;
|
|
|
|
|
}, items)
|
|
|
|
|
};
|
2026-10-01 14:13:23 +00:00
|
|
|
return obj5;
|
2026-09-26 17:57:22 +00:00
|
|
|
};
|