import { BoundingBoxDeclaration } from '../types'; /** * Shared bounding-box declaration for the SDF "shape effect" shaders — Glass, Emboss, ThinFilm, * Neon, Crystal, SmokeFill. These place an SDF shape via an isotropic `scale`, a `center`, and a * `rotation`, with no native width/height. The Design Editor drives them through the * propBindings + computeBounds path (like Blob/Ring) so the bounding box scales and rotates them. * * Geometry: each shader remaps screen UV into the 512² SDF field as * sdfUV = (uv - center) · aspect / scale + 0.5 (x), (uv - center) / scale + 0.5 (y) * so the full field spans a `scale·ch` px **square** ((scale/aspect)·cw = scale·ch). The box * therefore has extent `scale·ch` and `scale = widthPx / ch` — mirroring Blob's size↔diameter. * * NOTE: this box matches the FULL field, which letterboxes the shape with padding — so it's looser * than the shape itself. Content-tight bounds (scanning the SDF's zero-crossing extent and locking * to the real content aspect ratio) are a future refinement; until then the box is a square that * fully contains the shape. */ export declare const shapeEffectBoundingBoxDeclaration: BoundingBoxDeclaration; /** * True when the shape effect's analytic shape has independent width/height (rounded rect, ellipse), * so its bounding box should resize non-uniformly (W → radius, H → height) instead of via the * isotropic scale. SVG and single-radius shapes (circle/polygon/star/…) stay uniform. */ export declare function isNonUniformShapeEffect(props: Record): boolean; /** * The shape's content half-extents within the 512² SDF field (field-UV, where the full field is * 0.5). Analytic shapes are bounded by their radius (always-contains — a wrong formula can only be * slightly loose, never tighter than the shape). roundedRect/ellipse use radius (half-width) × * height (half-height). Custom SVG uses scanned content bounds: the editor injects reactive * `_shapeBounds` (so its overlay snaps in), and the renderer fills `getSdfContentBounds`'s cache * (re-resolving the node when its scan resolves) — both content-tight, so anchor/render/overlay * agree. Falls back to the full field until whichever scan resolves. */ export declare function shapeContentExtent(props: Record): { hwf: number; hhf: number; }; /** * Resolve the analytic shape type for the SDF shape-effect shaders: the compile-time * `shapeType` prop wins; otherwise the `shape` config (object or JSON-string form) is * consulted. Only a non-empty string `type` is trusted — bad JSON, missing fields, or an * object-valued `type` fall back to circleSDF instead of leaking into generated sampler * names (`analyticSdf_[object Object]`). */ export declare function resolveShapeType(shapeType: string, shape: unknown): string; //# sourceMappingURL=shapeEffectBounds.d.ts.map