Core diagram types and utilities for Syster SysML v2 modeller
npm install @opensyster/diagram-coreCore data types and conversion utilities for SysML v2 diagrams.
``bash`
npm install @syster/diagram-core
`typescript
import {
convertLspToDiagram,
applyAutoLayout,
SysMLNodeType,
SysMLEdgeType
} from '@syster/diagram-core';
// Convert LSP diagram data to React Flow format
const { nodes, edges } = convertLspToDiagram(lspDiagramData);
// Apply automatic layout
const layoutedNodes = applyAutoLayout(nodes, edges);
`
- Type definitions for SysML diagram nodes and edges
- LSP to React Flow data conversion
- Automatic layout algorithms
- SysML-specific node/edge type mappings
MIT
This project includes a DevContainer configuration for a consistent development environment.
Using VS Code:
1. Install the Dev Containers extension
2. Open this repository in VS Code
3. Click "Reopen in Container" when prompted (or use Command Palette: "Dev Containers: Reopen in Container")
What's included:
- Node.js 20 LTS
- Bun runtime
- ESLint, Prettier
- GitHub CLI
- All VS Code extensions pre-configured
If not using DevContainer:
`bashInstall dependencies
npm installor
bun install