This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,15 @@
// Metro module 11346 (f11347).
import { useRef, useEffect } from "react";
import { useAwaitAnimationCompletion } from "./useAwaitAnimationComplete";
export function useAnimationDelayedAutoFocus(a0, a1) {
const awaitAnimationCompletion = useAwaitAnimationCompletion();
const ref = useRef(false);
useEffect(() => {
if (a0 && !ref.current) {
awaitAnimationCompletion(() => {
a1();
});
}
ref.current = true;
}, [a0, a1, awaitAnimationCompletion]);
}
@@ -0,0 +1,13 @@
// Metro module 11339 (f11340).
import { createContext, useMemo, useContext } from "react";
const context = createContext(null);
export function AwaitAnimationContext(props) {
const { children, handleQueuedCallback } = props;
return <context.Provider value={useMemo(() => ({
handleQueuedCallback
}), [handleQueuedCallback])}>{children}</context.Provider>;
}
export function useAwaitAnimationCompletion() {
const context2 = useContext(context);
return context2 == null ? (a0) => a0() : context2.handleQueuedCallback;
}
@@ -0,0 +1,57 @@
// Metro module 11271 (f11272).
import { useContext, useRef, useMemo } from "react";
import useWindowDimensions_native from "../../../screen/useWindowDimensions.native";
import { AppLauncherContext } from "../AppLauncherContext";
import useKeyboardActionSheetHeight from "../../../action_sheet/native/useKeyboardActionSheetHeight";
import Module12 from "../../../../_bundle/Module12";
import * as _ReanimatedRexport from "../../../reanimated/ReanimatedRexport";
import { useAnimatedReaction } from "../../../reanimated/ReanimatedRexport";
const __initData = {
code: "function useBottomSheetFlashListBottomViewabilityInsetTsx1(){const{bottomSheetPosition}=this.__closure;var _bottomSheetPosition$,_bottomSheetPosition;return(_bottomSheetPosition$=(_bottomSheetPosition=bottomSheetPosition)===null||_bottomSheetPosition===void 0?void 0:_bottomSheetPosition.get())!==null&&_bottomSheetPosition$!==void 0?_bottomSheetPosition$:0;}"
};
const __initData2 = {
code: "function useBottomSheetFlashListBottomViewabilityInsetTsx2(sheetPosition){const{distanceBetweenExpandedScreenTopAndSheetTop,runOnJS,handleBottomViewabilityInsetDebounced}=this.__closure;const bottomViewabilityInset=sheetPosition-distanceBetweenExpandedScreenTopAndSheetTop;runOnJS(handleBottomViewabilityInsetDebounced)(bottomViewabilityInset);}"
};
export function useBottomSheetFlashListBottomViewabilityInset() {
const windowDimensions_native = useWindowDimensions_native();
const bottomSheetPosition = useContext(AppLauncherContext)?.bottomSheetPosition;
const maximum = useKeyboardActionSheetHeight().maximum;
const ref = useRef(null);
const distanceBetweenExpandedScreenTopAndSheetTop = windowDimensions_native.height - maximum;
let c18699_2 = distanceBetweenExpandedScreenTopAndSheetTop;
const ref2 = useRef(9999);
const memo = useMemo(() => Module12.debounce(function(a0) {
ref2.current = a0;
const current = ref.current;
if (current != null) {
current.updateViewableItems();
}
}, 200), []);
const u = () => {
let r6 = bottomSheetPosition == null ? void 0 : bottomSheetPosition.get();
if (r6 == null) {
r6 = 0;
}
return r6;
};
u.__closure = {
bottomSheetPosition
};
u.__workletHash = 3750973667946;
u.__initData = __initData;
const r40 = function(a0) {
_ReanimatedRexport.runOnJS(memo)(a0 - c18699_2);
};
r40.__closure = {
distanceBetweenExpandedScreenTopAndSheetTop,
runOnJS: _ReanimatedRexport.runOnJS,
handleBottomViewabilityInsetDebounced: memo
};
r40.__workletHash = 6025307858098;
r40.__initData = __initData2;
useAnimatedReaction(u, r40);
return {
flashListRef: ref,
bottomVisibilityInsetRef: ref2
};
}
@@ -0,0 +1,8 @@
// Metro module 10925 (f10926).
import { ACTION_SHEET_MAX_WIDTH } from "../../../action_sheet/native/ActionSheetConstants";
import useWindowDimensions_native from "../../../screen/useWindowDimensions.native";
import { AppLauncherEntrypoint } from "../../AppLauncherTypes";
export function useDefaultAppLauncherWidth(a0) {
const width = useWindowDimensions_native().width;
return a0 !== AppLauncherEntrypoint.TEXT ? Math.min(width, ACTION_SHEET_MAX_WIDTH) : width;
}
@@ -0,0 +1,18 @@
// Metro module 11336 (f11337).
import { useRef, useCallback } from "react";
export default function useLatch(a0) {
let c18756_0 = a0;
const ref = useRef(false);
return {
setLatch: useCallback((a0) => {
ref.current = a0;
return a0;
}, []),
tryCallback: useCallback(() => {
if (ref.current) {
ref.current = false;
c18756_0();
}
}, [a0])
};
};
@@ -0,0 +1,16 @@
// Metro module 11302 (f11303).
import { useState, useEffect } from "react";
import { useAppLauncherNavigation } from "../AppLauncherNativeConstants";
import { useRoute } from "../../../../_bundle/Module1481";
export default function useNavigationTransitionEnded() {
const [state, setState] = useState(false);
const appLauncherNavigation = useAppLauncherNavigation();
const route = useRoute();
useEffect(() => appLauncherNavigation.addListener("transitionEnd", () => {
const state = appLauncherNavigation.getState();
if (state.routes[state.index].key === route.key) {
setState(true);
}
}), [appLauncherNavigation, route, setState]);
return state;
};
@@ -0,0 +1,8 @@
// Metro module 11228 (f11229).
import { useMemo } from "react";
export function usePlaceholderWidth(a0, a1) {
return useMemo(() => {
const r4 = Math.random();
return r4 * (a1 - a0) + a0;
}, [a0, a1]);
}
@@ -0,0 +1,33 @@
// Metro module 11274 (f11275).
import { useRef, useCallback } from "react";
import { useAppLauncherContext } from "../AppLauncherContext";
import { useFocusEffect } from "../../../../_bundle/Module1481";
import { trackImpression } from "../../../app_analytics/useTrackImpression";
import { ImpressionTypes, ImpressionNames } from "../../../../_bundle/Module503";
export function useTrackAppLauncherItemImpressionOnFirstView() {
const entrypoint = useAppLauncherContext().entrypoint;
const ref = useRef(new Set());
useFocusEffect(useCallback(() => {
ref.current.clear();
}, []));
return {
trackAppLauncherItemImpressionOnFirstView: useCallback(({ itemKey, sectionName, sectionPosition, sectionOverallPosition, applicationId, commandId, applicationFlags }) => {
if (!ref.current.has(itemKey)) {
ref.current.add(itemKey);
trackImpression({
type: ImpressionTypes.VIEW,
name: ImpressionNames.APP_LAUNCHER_ITEM,
properties: {
source: entrypoint,
section_name: sectionName,
section_position: sectionPosition,
section_overall_position: sectionOverallPosition,
application_id: applicationId,
command_id: commandId,
application_flags: applicationFlags
}
});
}
}, [entrypoint])
};
}