import { BoundingBoxDeclaration, BoundingBoxOrigin, ComponentDefinition, DimensionalValue } from '../types'; export declare function setShaderCanvasDimensions(width: number, height: number): void; export declare function getShaderCanvasDimensions(): { width: number; height: number; }; export declare function isDimensionalValue(v: any): v is DimensionalValue; export type SizeConversion = 'canvas-height' | 'half-canvas-height' | 'canvas-width' | 'count-canvas-height'; export interface DimensionalPlan { /** Props that are {x,y} positions (resolved with origin). */ positionProps: Set; /** Size props (scalar) keyed to their px→UV conversion. */ sizeProps: Map; } /** * Derives the extra (non-bbox) dimensional size props from a component's prop configs. * Any prop whose `ui.dimensional` marker is set becomes a scalar size prop keyed to that * conversion — this is what lets an ordinary scalar prop (e.g. softness, rounding) opt into * resize-stable px with a single declaration, with no per-prop renderer plumbing. */ export declare function buildExtraSizeProps(props: Record | undefined): Map | undefined; /** * Builds the dimensional resolution plan from a shader's bbox prop bindings, optionally merging * in `extraSizeProps` (marker-declared scalar props from buildExtraSizeProps). * Returns null only when there are no prop bindings AND no extra size props (filters/generators * position via the `boundingBox` object instead, resolved separately in uvTransform). */ export declare function buildDimensionalPlan(decl: BoundingBoxDeclaration | undefined, extraSizeProps?: Map): DimensionalPlan | null; export declare function bindingSizePx(binding: { as: string; }, v: any, width: number, height: number): number; /** * Per-axis half-extent of a shape's bounding box, in canvas-UV. Used to recover the true render * centre from the stored anchor (resolveOriginCenter) and re-store it (storeCenter). Returns zero when no * size information is available. `props` may carry raw (px / DimensionalValue) size values — both * computeBounds and bindingSizePx handle that. */ export declare function boxHalfExtentsUV(decl: BoundingBoxDeclaration | undefined, props: Record, width: number, height: number): { hwx: number; hhy: number; }; /** * Returns a props object where dimensional shape props are resolved to plain UV values * (numbers / {x,y} numbers) ready for the existing prop transforms, applying the `origin` prop. * * The default origin ('center') resolves the stored centre as-is (zero half-extent), so a centred * shape with plain-number props is returned unchanged (zero overhead) — identical to the legacy * default. Non-centre origins recover the render centre from the stored anchor via the box extent. */ export declare function resolveDimensionalProps(decl: BoundingBoxDeclaration | undefined, rawProps: Record, width: number, height: number, extraSizeProps?: Map): Record; /** * Resolves a single dimensional prop value to its plain UV equivalent, given the shader * declaration, the prop name, the current origin, and live canvas dimensions. Used by the * renderer's update + resize paths to re-resolve from stashed raw values. */ export declare function resolveDimensionalProp(decl: BoundingBoxDeclaration | undefined, propName: string, rawValue: any, origin: BoundingBoxOrigin, width: number, height: number, extraSizeProps?: Map, he?: { hwx: number; hhy: number; }): any; /** Whether a prop is a dimensional (position/size) prop for the given declaration. */ export declare function isDimensionalProp(decl: BoundingBoxDeclaration | undefined, propName: string, extraSizeProps?: Map): boolean; /** Convenience: the set of all dimensional prop names for a declaration. */ export declare function dimensionalPropNames(decl: BoundingBoxDeclaration | undefined, extraSizeProps?: Map): string[]; export type { ComponentDefinition }; //# sourceMappingURL=dimensionalProps.d.ts.map