2026-09-17 08:17:09 +00:00
|
|
|
// Module ID: 11510
|
|
|
|
|
// Function ID: 11511
|
2026-07-29 08:29:29 +00:00
|
|
|
// Name: useKeyboardActionSheetHeight
|
2026-09-17 08:17:09 +00:00
|
|
|
// Dependencies: [5770, 1612, 1478, 5667, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default, getKeyboardActionSheetHeight
|
|
|
|
|
|
2026-09-17 08:17:09 +00:00
|
|
|
// Module 11510 (useKeyboardActionSheetHeight)
|
2026-09-15 14:23:42 +00:00
|
|
|
import useWindowDimensions from "useWindowDimensions" /* 1478 */;
|
|
|
|
|
import useSafeAreaInsets from "useSafeAreaInsets" /* 1612 */;
|
2026-09-17 08:17:09 +00:00
|
|
|
import useCustomKeyboardHeight from "useCustomKeyboardHeight" /* 5667 */;
|
|
|
|
|
import NavigatorConstants from "NavigatorConstants" /* 5770 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const useWindowDimensionsDefault = useWindowDimensions;
|
|
|
|
|
const useSafeAreaInsetsDefault = useSafeAreaInsets;
|
|
|
|
|
const useCustomKeyboardHeightDefault = useCustomKeyboardHeight;
|
|
|
|
|
|
|
|
|
|
const result = size.fileFinishedImporting("modules/action_sheet/native/useKeyboardActionSheetHeight.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function useKeyboardActionSheetHeight() {
|
2026-08-25 06:04:03 +00:00
|
|
|
const tmp2 = useSafeAreaInsetsDefault();
|
|
|
|
|
const tmp3 = useWindowDimensionsDefault({ ignoreKeyboard: true });
|
2026-09-10 05:38:07 +00:00
|
|
|
const maximum = Math.max(0, tmp3.height - NavigatorConstants.NAV_BAR_HEIGHT_MULTILINE - tmp2.top);
|
2026-08-25 06:04:03 +00:00
|
|
|
let minimum = Math.min(useCustomKeyboardHeightDefault(), maximum);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (minimum >= maximum) {
|
2026-08-25 06:04:03 +00:00
|
|
|
const _Math = Math;
|
2026-09-10 05:38:07 +00:00
|
|
|
minimum = Math.max(0, maximum - NavigatorConstants.NAV_BAR_HEIGHT_MULTILINE);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
return { minimum, maximum };
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
|
|
|
|
export const getKeyboardActionSheetHeight = function getKeyboardActionSheetHeight() {
|
2026-08-24 06:08:38 +00:00
|
|
|
const safeAreaInsets = useSafeAreaInsets.getSafeAreaInsets();
|
|
|
|
|
const windowDimensions = useWindowDimensions.getWindowDimensions({ ignoreKeyboard: true });
|
2026-08-25 06:04:03 +00:00
|
|
|
const customKeyboardHeight = useCustomKeyboardHeight.getCustomKeyboardHeight();
|
2026-09-10 05:38:07 +00:00
|
|
|
const maximum = Math.max(0, windowDimensions.height - NavigatorConstants.NAV_BAR_HEIGHT_MULTILINE - safeAreaInsets.top);
|
2026-08-25 06:04:03 +00:00
|
|
|
let minimum = Math.min(customKeyboardHeight, maximum);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (minimum >= maximum) {
|
2026-08-25 06:04:03 +00:00
|
|
|
const _Math = Math;
|
2026-09-10 05:38:07 +00:00
|
|
|
minimum = Math.max(0, maximum - NavigatorConstants.NAV_BAR_HEIGHT_MULTILINE);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
return { minimum, maximum };
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|