///
import { Gestalt as Constraint } from './gestalt';
import { BBoxValues, MaybeBBoxValues } from "./kiwiBBoxTransform";
import * as Compile from './compileWithRef';
import { RelativeBFValue, RelativeBFRef } from './absoluteDataPaths';
declare type Id = T extends infer U ? {
[K in keyof U]: U[K];
} : never;
declare type ShapeRelation = {
[key in `${string}->${string}`]?: Constraint[];
};
declare type Key = string | number | symbol;
declare type ReservedKeywords = "$canvas" | "$object";
declare const KONT = "KONT";
declare type AllowedFieldsWithType = {
[K in keyof Obj]: Obj[K] extends Type ? K : never;
};
declare type ExtractFieldsOfType = AllowedFieldsWithType[keyof Obj];
declare type OmitRef = Omit>;
export declare type Relation = T[];
declare type RelationInstance = T extends Array ? T[number] : T;
export declare type Shape_ extends never ? object : never, Reserved extends Key> = {
inheritFrame?: boolean;
bbox?: MaybeBBoxValues;
renderFn?: (canvas: BBoxValues, index?: number) => JSX.Element;
shapes?: Record;
rels?: ShapeRelation;
};
export declare type Shape = {
[KONT]: (kont: extends never ? object : never>(_: Shape_) => R) => R;
};
export declare namespace Shape {
const create: extends never ? object : never>(exRecord_: Shape_) => Shape;
const fromCompileShape: (g: Compile.GlyphNoRef) => Shape;
const inhabited: Shape;
}
export declare type HostShapeFn = (d: T) => Shape;
declare type KConstraint = T extends object ? (Extract extends never ? object : never) : object;
export declare type ShapeFn_> = T extends object ? (HostShapeFn | Shape_ | Id & {
object: HostShapeFn;
}> | Id & {
fields: {
[key in keyof OmitRef]: HostShapeFn>;
};
}> | Id & {
object: HostShapeFn;
} & {
fields: {
[key in keyof OmitRef]: HostShapeFn>;
};
}>) : (HostShapeFn | Shape_ | Id & {
object: HostShapeFn;
}>);
export declare type ShapeFn = {
[KONT]: (kont: >(_: ShapeFn_) => R) => R;
};
export declare namespace ShapeFn {
const mkEx: >(exRecord_: ShapeFn_) => ShapeFn;
const shapeFnToHostShapeFn: (gf: ShapeFn) => HostShapeFn;
const create: >(exRecord_: ShapeFn_) => HostShapeFn;
}
export declare const createShape: extends never ? object : never>(exRecord_: Shape_) => Shape;
export declare const createShapeFn: >(exRecord_: ShapeFn_) => HostShapeFn;
export declare const lowerShape: (g: Shape | RelativeBFRef) => Compile.Glyph;
export declare const lowerShapeFn: (gf: HostShapeFn) => (data: T) => Compile.Glyph;
export declare const compileShapeFn: (gf: HostShapeFn) => (data: T) => Compile.Glyph;
export declare type MyList = {
elements: Relation;
neighbors: Relation<{
curr: RelativeBFRef;
next: RelativeBFRef;
}>;
};
export declare function render(shape: Shape): JSX.Element;
export declare function render(data: T, shapeFn: HostShapeFn): JSX.Element;
export {};
//# sourceMappingURL=shapeAPI.d.ts.map