import { Box, type DOMElement, useInput } from "ink"; import { type ComponentPropsWithoutRef, type ForwardRefExoticComponent, forwardRef, type RefAttributes } from "react"; import { useScreenSize } from "./useScreenSize.js"; export type BoxProps = ComponentPropsWithoutRef; // Explicit type annotation to avoid TS2742 (portable type) errors caused by // deep inferred generic types from ink's Box component pulling in transient dependencies. export const FullScreenBox: ForwardRefExoticComponent> = forwardRef< DOMElement, BoxProps >(function FullScreenBox(props, ref) { useInput(() => {}); // prevent input from rendering and shifting the layout const { height, width } = useScreenSize(); return ; });