decord/source/modules/screen/native/useBaseAppContainerDimensions.tsx
github-actions 4f02868c60 chore: update source for alpha 346.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
2026-09-11 10:30:06 +00:00

38 lines
1.4 KiB
TypeScript

// Module ID: 4469
// Function ID: 4470
// Name: useBaseAppContainerDimensions
// Dependencies: [19, 1477, 1611, 2]
// Exports: default, getBaseAppContainerDimensions
// Module 4469 (useBaseAppContainerDimensions)
import useWindowDimensions from "useWindowDimensions" /* 1477 */;
import useSafeAreaInsets from "useSafeAreaInsets" /* 1611 */;
import noop from "module_19" /* 19 */;
const useWindowDimensionsDefault = useWindowDimensions;
const useSafeAreaInsetsDefault = useSafeAreaInsets;
require = fn;
let size = fn(2);
const result = size.fileFinishedImporting("modules/screen/native/useBaseAppContainerDimensions.tsx");
export default function useBaseAppContainerDimensions() {
let size = useWindowDimensionsDefault();
const width = size.width;
const height = size.height;
const rect = useSafeAreaInsetsDefault();
const left = rect.left;
const right = rect.right;
const items = [width, height, left, right];
return noop.useMemo(() => {
const size = { width: width - left - right, height };
return size;
}, items);
};
export const getBaseAppContainerDimensions = function getBaseAppContainerDimensions() {
const windowDimensions = useWindowDimensions.getWindowDimensions();
({ width, height } = windowDimensions);
const rect = useSafeAreaInsets.getSafeAreaInsets();
const size = { width: width - rect.left - rect.right, height };
return size;
};