@tokens-studio/graph-engine
Version:
An execution engine to handle Token Studios generators and resolvers
60 lines • 2.88 kB
TypeScript
export declare const variadicId: (id: string) => string;
export type SchemaObject = {
[key: string]: any;
};
export declare const createVariadicSchema: (baseSchema: any) => {
title: string;
type: string;
items: any;
};
export declare const NUMBER = "https://schemas.tokens.studio/number.json";
export declare const NumberSchema: SchemaObject;
export declare const STRING = "https://schemas.tokens.studio/string.json";
export declare const StringSchema: SchemaObject;
export declare const COLOR = "https://schemas.tokens.studio/color.json";
export declare const ColorSchema: SchemaObject;
export declare const COLOR_OBJECT = "https://schemas.tokens.studio/colorObject.json";
export declare const ColorObjectSchema: SchemaObject;
export declare const DIMENSION = "https://schemas.tokens.studio/dimension.json";
export declare const DimensionSchema: SchemaObject;
export declare const ANY = "https://schemas.tokens.studio/any.json";
export declare const AnySchema: SchemaObject;
export declare const ANY_ARRAY = "https://schemas.tokens.studio/anyArray.json";
export declare const AnyArraySchema: SchemaObject;
export declare const BOOLEAN = "https://schemas.tokens.studio/boolean.json";
export declare const BooleanSchema: SchemaObject;
export declare const OBJECT = "https://schemas.tokens.studio/object.json";
export declare const ObjectSchema: SchemaObject;
export declare const FLOATCURVE = "https://schemas.tokens.studio/floatCurve.json";
export declare const FloatCurveSchema: SchemaObject;
export declare const CURVE = "https://schemas.tokens.studio/curve.json";
export declare const CurveSchema: SchemaObject;
export declare const VEC2 = "https://schemas.tokens.studio/vec2.json";
export declare const Vec2Schema: SchemaObject;
export declare const VEC3 = "https://schemas.tokens.studio/vec3.json";
export declare const Vec3Schema: SchemaObject;
export declare const GRADIENT_STOP = "https://schemas.tokens.studio/gradientStop.json";
export declare const GradientStopSchema: SchemaObject;
export declare const GRADIENT = "https://schemas.tokens.studio/gradient.json";
export declare const GradientSchema: SchemaObject;
export declare const BUFFER = "https://schemas.tokens.studio/buffer.json";
export declare const BufferSchema: SchemaObject;
/**
* Checks whether a schema can be converted to another schema
* @param src
* @param target
* @returns
*/
export declare const canConvertSchemaTypes: (src: SchemaObject, target: SchemaObject) => boolean;
/**
* Handles the actual conversion of a value from one schema to another
* @param srcSchema
* @param targetSchema
* @param src
* @param target
* @returns
*/
export declare const convertSchemaType: (srcSchema: SchemaObject, targetSchema: SchemaObject, src: any) => any;
export type GraphSchema = SchemaObject;
export declare const AllSchemas: SchemaObject[];
//# sourceMappingURL=index.d.ts.map