import { type ReactNode } from "react"; export interface SizeBuckets { /** For most mobile phones — or any box that narrow. */ small: boolean; /** iPad Mini through a 16" MacBook Pro — or any box that wide. */ medium: boolean; /** Most external monitors — or any box that wide. */ large: boolean; } export declare function deriveSizeBuckets(width: number): SizeBuckets; /** A width that lands in the same bucket the window is in, for the first frame. */ export declare function screenSeedWidth(screen: SizeBuckets): number; /** Null means no enclosing boundary — the window is the container. */ export declare const ContainerSizeContext: import("react").Context; /** * Publishes a measured width to descendants as buckets. * * The value is memoized on the buckets, not the width, so a resize that does not * cross a threshold produces no new value and re-renders no consumer. That * matters because a subtree under one boundary can hold dozens of readers, and a * drag on a resizable panel emits a measurement per frame. * * It renders nothing itself, so it is unit-testable; the measuring wrapper that * feeds it a width lives in `size_boundary`. */ export declare function ContainerSizeProvider(props: { width: number; children: ReactNode; }): import("react").JSX.Element; /** The nearest boundary's buckets, or null when nothing encloses this component. */ export declare function useEnclosingContainerSize(): SizeBuckets | null; /** * ONE BOX'S OWN WIDTH, measured — put `measure` on the element as its `ref`. * * `null` until the first observation, which is the frame a browser paints before * it has laid anything out and the whole answer where there is no layout engine * at all: a server render, a jsdom test. A surface that FORKS on the width * renders its unmeasured frame invisible rather than guessing, so the first * paint anybody sees is already in the right mode. * * The `ref` callback returns the disconnect, which React 19 runs as its cleanup — * so the observer's life is the element's, with no effect to keep in step. */ export declare function useMeasuredWidth(): { measure: (node: HTMLElement | null) => (() => void) | undefined; width: number | null; }; /** A measured box. `null` on both axes until the first observation. */ export interface MeasuredSize { width: number; height: number; } /** * BOTH axes of one box, for the rare thing that needs the height too — a canvas, * a virtualized grid. * * Separate from `useMeasuredWidth` because the RE-RENDER contract differs, which * is the whole reason either exists: a width reader must not wake for a height * change (a mobile keyboard, a growing sibling), and a box reader has to. */ export declare function useMeasuredSize(): { measure: (node: HTMLElement | null) => (() => void) | undefined; size: MeasuredSize | null; };