import "./auto_sizer.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type MeasuredSize } from "./container_size"; import { type StyleProps } from "./style_props"; export type AutoSizerChildProps = MeasuredSize; export interface AutoSizerProps extends StyleProps { /** Freeze the height at its first measurement and follow the width only. */ autoSizeWidthOnly?: boolean; /** Freeze the width at its first measurement and follow the height only. */ autoSizeHeightOnly?: boolean; onResize?: (size: AutoSizerChildProps) => void; /** Children are not rendered until the box has been measured. */ children: React.ReactNode | ((size: AutoSizerChildProps) => React.ReactNode); testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * Hands its children the size of the box it fills. * * For the things that cannot be laid out by CSS at all — a canvas that must be * given pixel dimensions, a virtualized grid that computes which rows exist. * Anything a stylesheet can size should be sized by one. * * Nothing renders until the first measurement, which is deliberate: a child * given 0×0 draws once at the wrong size and then again, and a canvas cannot * take that back. */ export declare function AutoSizer(props: AutoSizerProps): React.ReactElement>;