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

33 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 4234
// Function ID: 4235
2026-07-20 16:05:17 +00:00
// Name: useBaseAppContainerDimensions
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 1494, 1629, 2]
2026-07-20 16:05:17 +00:00
// Exports: default, getBaseAppContainerDimensions
2026-08-15 05:55:55 +00:00
// Module 4234 (useBaseAppContainerDimensions)
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
const require = arg1;
const result = require("useSafeAreaInsets").fileFinishedImporting("modules/screen/native/useBaseAppContainerDimensions.tsx");
2026-07-20 16:05:17 +00:00
export default function useBaseAppContainerDimensions() {
2026-07-23 10:11:24 +00:00
const size = height(left[1])();
2026-07-20 16:05:17 +00:00
const width = size.width;
2026-07-23 10:11:24 +00:00
height = size.height;
const rect = height(left[2])();
left = rect.left;
2026-07-20 16:05:17 +00:00
const right = rect.right;
const items = [width, height, left, right];
2026-07-23 10:11:24 +00:00
return right.useMemo(() => ({ width: width - left - right, height }), items);
2026-07-20 16:05:17 +00:00
};
export const getBaseAppContainerDimensions = function getBaseAppContainerDimensions() {
let height;
let width;
2026-08-15 05:55:55 +00:00
let obj = require(1494) /* useWindowDimensions */;
2026-07-20 16:05:17 +00:00
const windowDimensions = obj.getWindowDimensions();
({ width, height } = windowDimensions);
2026-08-15 05:55:55 +00:00
const rect = require(1629) /* useSafeAreaInsets */.getSafeAreaInsets();
2026-07-20 16:05:17 +00:00
obj = { width: width - rect.left - rect.right, height };
return obj;
};