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

33 lines
1.2 KiB
TypeScript
Raw Normal View History

// Module ID: 4340
// Function ID: 4341
2026-07-20 16:05:17 +00:00
// Name: useBaseAppContainerDimensions
2026-09-02 09:53:35 +00:00
// Dependencies: [19, 1492, 1627, 2]
2026-07-20 16:05:17 +00:00
// Exports: default, getBaseAppContainerDimensions
// Module 4340 (useBaseAppContainerDimensions)
2026-09-02 09:53:35 +00:00
import useWindowDimensions from "useWindowDimensions" /* 1492 */;
import useSafeAreaInsets from "useSafeAreaInsets" /* 1627 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
const result = require("set").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() {
2026-08-24 06:08:38 +00:00
let obj = useWindowDimensions;
2026-07-20 16:05:17 +00:00
const windowDimensions = obj.getWindowDimensions();
({ width, height } = windowDimensions);
2026-08-24 06:08:38 +00:00
const rect = useSafeAreaInsets.getSafeAreaInsets();
2026-07-20 16:05:17 +00:00
obj = { width: width - rect.left - rect.right, height };
return obj;
};