import { RectangularNode , SEdge , SNodeSchema , SEdgeSchema , SModelElementSchema } from 'sprotty' ; export interface DependencyGraphNodeSchema extends SNodeSchema { name : string ; requiredVersions : string [ ] ; resolved ? : boolean ; hidden ? : boolean ; version ? : string ; description ? : string ; url ? : string ; error ? : string ; } export function isNode ( element ? ) { return element !== undefined && element . type === 'node' ; } export class DependencyGraphNode extends RectangularNode { name : string = '' ; versions : string [ ] = [ ] ; resolved : boolean = false ; hidden : boolean = false ; description ? : string ; url ? : string ; error ? : string ; } export interface DependencyGraphEdgeSchema extends SEdgeSchema { optional ? : boolean ; } export function isEdge ( element ? ) { return element !== undefined && element . type === 'edge' ; } export class DependencyGraphEdge extends SEdge { optional : boolean = false ; constructor ( ) { super ( ) ; this . sourceAnchorCorrection = 1 ; this . targetAnchorCorrection = 1.5 ; } }