decord/alpha/source/modules/screen/native/useBaseAppContainerDimensions.tsx

67 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 4942
// Function ID: 4943
2026-07-20 16:05:17 +00:00
// Name: useBaseAppContainerDimensions
2026-10-09 10:00:15 +00:00
// Dependencies: [19, 1497, 1631, 558, 576, 2]
2026-10-03 08:58:59 +00:00
// Exports: getBaseAppContainerDimensions
2026-07-20 16:05:17 +00:00
2026-10-09 10:00:15 +00:00
// Module 4942 (useBaseAppContainerDimensions)
2026-10-03 08:58:59 +00:00
import react2 from "react" /* 576 */;
2026-10-09 10:00:15 +00:00
import useWindowDimensions from "useWindowDimensions" /* 1497 */;
import useSafeAreaInsets from "useSafeAreaInsets" /* 1631 */;
2026-10-03 08:58:59 +00:00
import react from "react" /* 19 */;
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size_mod from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const useWindowDimensionsDefault = useWindowDimensions;
const useSafeAreaInsetsDefault = useSafeAreaInsets;
2026-10-08 09:57:35 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useBaseAppContainerDimensions() {
2026-10-03 08:58:59 +00:00
let height;
let width;
const obj = react2;
const cResult = obj.c(3);
({ height, width } = useWindowDimensionsDefault());
useWindowDimensionsDefault();
const rect = useSafeAreaInsetsDefault();
const diff = width - rect.left - rect.right;
if (cResult[0] === height) {
let tmp4;
if (cResult[1] === diff) {
tmp4 = cResult[2];
}
return tmp4;
}
size = { width: diff, height };
cResult[0] = height;
cResult[1] = diff;
cResult[2] = size;
tmp4 = size;
2026-10-08 09:57:35 +00:00
}) : (function useBaseAppContainerDimensions() {
2026-10-03 08:58:59 +00:00
size = useWindowDimensionsDefault();
2026-07-20 16:05:17 +00:00
const width = size.width;
const height = size.height;
const rect = useSafeAreaInsetsDefault();
const left = rect.left;
2026-07-20 16:05:17 +00:00
const right = rect.right;
const items = [width, height, left, right];
2026-10-03 08:58:59 +00:00
return react.useMemo(() => {
size = { width: width - left - right, height };
return size;
}, items);
2026-10-03 08:58:59 +00:00
});
let size = size_mod;
const result = size.fileFinishedImporting("modules/screen/native/useBaseAppContainerDimensions.tsx");
export default tmp2;
2026-07-20 16:05:17 +00:00
export const getBaseAppContainerDimensions = function getBaseAppContainerDimensions() {
2026-10-03 08:58:59 +00:00
let height;
let width;
const obj = useWindowDimensions;
const windowDimensions = obj.getWindowDimensions();
2026-07-20 16:05:17 +00:00
({ width, height } = windowDimensions);
2026-10-03 08:58:59 +00:00
const obj2 = useSafeAreaInsets;
const rect = obj2.getSafeAreaInsets();
size = { width: width - rect.left - rect.right, height };
return size;
2026-07-20 16:05:17 +00:00
};