///
import { Gestalt as Constraint } from './gestalt';
import { BBoxValues, MaybeBBoxValues } from "./kiwiBBoxTransform";
import * as Compile from './compileWithRef';
import { RelativeBFValue, BFRef, Ref } from './absoluteDataPaths';
declare type ShapeRelation = {
[key in `${string}->${string}`]?: Constraint[];
};
export declare type Relation = T[];
export declare type RelationInstance = T extends Array ? T[number] : T;
declare type Impossible = {
[P in K]: never;
};
declare type NoExtraProperties = U & Impossible>;
import type { Merge, Simplify } from 'type-fest';
declare type ShapeRecord4 = (Simplify]: ShapeValue;
}, Simplify>;
}, {
[key in `$$${string}`]?: 'ref' | ShapeFn>;
}>>>> & {
[key in keyof Shapes]: unknown;
});
export declare type Shape_, T> = {
dataMap?: Compile.DataMap;
isSet?: boolean;
inheritFrame?: boolean;
bbox?: MaybeBBoxValues;
renderFn?: (canvas: BBoxValues, index?: number) => JSX.Element;
shapes?: NoExtraProperties;
rels?: ShapeRelation;
};
export declare type ShapeGroup = {
dataMap?: Compile.DataMap;
isSet?: boolean;
inheritFrame?: boolean;
bbox?: MaybeBBoxValues;
renderFn?: (canvas: BBoxValues, index?: number) => JSX.Element;
shapes?: any;
rels?: ShapeRelation;
};
export declare type ShapeEx = ShapeGroup | ({} extends T ? never : ShapeFn);
export declare type ShapeFn = (data: T) => ShapeValue;
export declare type ShapeValue = ShapeGroup<{}>;
export declare type Shape = {} extends T ? ShapeValue : ShapeFn;
export declare function lowerShape(g: 'ref'): T extends Ref ? 'ref' : never;
export declare function lowerShape(g: ShapeEx): Shape;
export declare const createShape: , T>(shape_: Shape_) => Shape;
export declare const compileShapeValue: (g: ShapeValue | BFRef) => Compile.Glyph;
export declare function render(shape: ShapeValue): JSX.Element;
export declare function render(data: T, shapeFn: ShapeFn): JSX.Element;
export {};
//# sourceMappingURL=unifiedShapeAPIFinal.d.ts.map