/** Angular2 */ import * as ng from "@angular/core"; /** Joint */ import * as joint from "jointjs"; /** * MarkerType */ export declare enum MarkerType { None = 0, Circle = 1, Arrow = 2, Square = 3 } /** * MarkerDef (Not used, maybe in the future) Just to add color to markers of the connectors */ export interface MarkerDef { color?: string; type: MarkerType; } /** * Vector2D */ export interface Vector2D { x: number; y: number; } /** * Model */ export interface DiagramModel { nodes: DiagramNode[]; links: DiagramLink[]; } /** * Node base */ export interface DiagramNodeBase { id: string; position: Vector2D; } /** * Node */ export interface DiagramNode extends DiagramNodeBase { component: ng.Type | string; componentModule: ng.Type | string; interactiveElementsInComponent?: string[]; size: Vector2D; inputs?: any; outputs?: any; } /** * Node with ports (Not supported yet) */ export interface DiagramNodeWithPorts extends DiagramNode { label: string; color?: string; inPorts?: string[]; outPorts?: string[]; inPortStyle?: MarkerType; outPortStyle?: MarkerType; } /** * Link joint */ export interface LinkJoint { id: string; selector?: string; port?: string; } /** * Link label */ export interface LinkLabel { position: number; text: string; } /** * Link */ export interface DiagramLink { id: string; source: Vector2D | LinkJoint; target: Vector2D | LinkJoint; label?: string; vertices?: Vector2D[]; smooth: boolean; width?: number; dashed: boolean; sourceConnector?: MarkerType; targetConnector?: MarkerType; } /** * Layout options */ export declare type LayoutOptions = joint.layout.LayoutOptions;