decord/alpha/source/modules/screen/native/useBaseAppContainerDimensions.tsx
github-actions 97fd043558 chore: update source for alpha 347.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4941.js (118.4 MB)
2026-09-19 06:52:51 +00:00

38 lines
1.4 KiB
TypeScript

// Module ID: 4618
// Function ID: 4619
// Name: useBaseAppContainerDimensions
// Dependencies: [19, 1478, 1612, 2]
// Exports: default, getBaseAppContainerDimensions
// Module 4618 (useBaseAppContainerDimensions)
import useWindowDimensions from "useWindowDimensions" /* 1478 */;
import useSafeAreaInsets from "useSafeAreaInsets" /* 1612 */;
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;
};