import { Component } from "./types"; export interface Schema { assets: { [id: string]: Asset.Entry; }; traits: Template.Entries; templates: Template.Entries; objects: { [id: string]: Instance.Entry; }; game: any; version: number; } export declare namespace Asset { type ID = string; interface Entry { id: ID; name: string; url: string; } } export declare namespace Field { export type ID = string; export interface Definition { id: ID; type: "text" | "image"; name?: string; value?: Value; } interface Text { value: string; } interface Image { assetID: Asset.ID; } export type Value = Text | Image; export {}; } export declare namespace Template { type ID = string; interface Side { layers?: Layer[]; } interface Layer { parts?: Part.Map; partOrder?: Part.ID[]; isVisible?: object; isLocked?: boolean; traitLayout?: { traitID: string; }; } type Entries = { [id: string]: Entry; }; interface Entry { id: ID; type: Component; deps: string[]; properties: { [id: string]: any; }; behaviors: { [id: string]: any; }; layout: { geometry: Geometry; faces: Side[]; }; } interface Geometry { width: number; height: number; } namespace Part { export type ID = string; interface Rect { type: "rect"; id: ID; x: number; y: number; rotation: number; width: number; height: number; fill: string; stroke: string; } interface Circle { type: "circle"; id: ID; x: number; y: number; rotation: number; width: number; height: number; fill: string; stroke: string; } interface Text { type: "text"; id: ID; x: number; y: number; rotation: number; width: number; height: number; color: string; fontSize: number; fontFamily?: string; bold?: boolean; italic?: boolean; text: string; propertyID?: string; } interface Image { type: "image"; assetID: Asset.ID; propertyID?: string; id: ID; x: number; y: number; rotation: number; width: number; height: number; } export type Entry = Rect | Circle | Text | Image; export type Map = { [id: string]: Entry; }; export {}; } } export declare namespace Instance { type ID = string; interface Entry { id: ID; templateID: Template.ID; overrides?: { [id: string]: Field.Value; }; } } export interface KeyValue { [key: string]: T; }