import { World } from '../world'; interface PluginProp { type?: 'string' | 'number' | 'color' | 'boolean'; default: string | number | boolean; } interface PluginProps { [propName: string]: string | PluginProp; } interface PluginJson { type: 'Plugin'; id: string; name: string; visible: boolean; layer: number; unit: 'px' | '%'; width: number; height: number; position: 'px' | '%'; toLeft: boolean; left: number; toTop: boolean; top: number; translate: 'px' | '%'; x: number; y: number; rotate: number; pluginName: string; pluginProps: PluginProps; } interface PluginObject { $el: Element; $props: { [propName: string]: string | PluginProp; }; $mount: (el: Element) => void; $destroy: () => void; enter?: (world: World) => void; leave?: (world: World) => void; update?: () => void; } interface PluginClass { new (props?: { propsData: PluginProps; }): PluginObject; } interface Plugin { name: string; label: string; image: string; pluginClass: PluginClass; json?: PluginJson; } export { PluginProps, PluginJson, PluginObject, PluginClass, Plugin };