import { BoundingBoxConfig, BoundingBoxDeclaration } from '../types';
/**
* Layout measurement — "child, how big are you?"
*
* The single sizing question a layout pass asks of a layer. One implementation, four answers,
* tried in order:
*
* 1. `computeBounds` — content-tight measurement (Text run, Blob, Ring, shape effects).
* 2. `propBindings` — size props converted through their declared binding (Circle radius…).
* 3. explicit box — an authored `boundingBox` on the node metadata (any layer, incl.
* media and resize-fit generators sized deliberately).
* 4. natural size — media intrinsic dimensions from the naturalSize registry
* (the `
` analog).
*
* A layer none of these can answer for (filters, full-frame generators) returns null — it is
* OUT OF FLOW: no slot in a stack, no contribution to a group's content size.
*
* `availableWidthPx` is accepted but currently unused by every measurer — it is the future slot
* for text wrapping ("how tall are you GIVEN this width"). Callers must pass it today so the
* signature never changes when wrapping lands.
*/
export interface MeasureInput {
/** Component type name (media natural-size keying). */
type: string;
/** True for filters (requiresChild) — they NEVER answer, even with an explicit box. A
* filter's box is a clip WINDOW over the composite below ("where the effect applies"),
* not an element size; giving it a flow slot stacks a distortion of its own siblings. */
requiresChild?: boolean;
/** The shader's runtime bounding-box declaration (with computeBounds, when defined). */
decl: BoundingBoxDeclaration | undefined;
/** The node's current props (raw — measurers handle DimensionalValues themselves). */
props: Record;
/** The node's authored boundingBox metadata, if any. */
boundingBox?: Partial | null;
/** Width offered by the layout container. Unused until text wrapping; pass it anyway. */
availableWidthPx: number;
}
export interface MeasuredSize {
widthPx: number;
heightPx: number;
}
/**
* Measure a layer for layout. Returns null when the layer has no answerable size (out of flow).
*/
export declare function measureNode(input: MeasureInput, cw: number, ch: number): MeasuredSize | null;
//# sourceMappingURL=measure.d.ts.map