# @grafloria/engine

Headless diagram engine — graph model, commands and undo, layout engines (ELK, dagre, force, tree), Mermaid-compatible text format, collaboration op-log

## Install

```bash
npm install @grafloria/engine
```

## What it exports

- [Core](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-core): 45 exports, including `ArchitectureGrid`, `ArchitectureLayoutOptions`, `ArchitectureLayoutResult`, `BulkSelectionOptions`
- [Collab](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-collab): 25 exports, including `ActorId`, `AddOp`, `applyEntitySet`, `applyOp`
- [Commands](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-commands): 64 exports, including `AddGroupCommand`, `AddLinkCommand`, `AddNodeCommand`, `AddPortCommand`
- [Comments](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-comments): 22 exports, including `AnchorSpec`, `CommentAnchor`, `CommentMessage`, `CommentRegisterTree`
- [Config](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-config): 10 exports, including `ConnectionLineStyle`, `ControlPointEditorConfig`, `DEFAULT_INTERACTION_CONFIG`, `DELIBERATE_MODE_CONFIG`
- [Dsl](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-dsl): 116 exports, including `applyArchitectureModel`, `applyBlockGrid`, `ARCHITECTURE_ICONS`, `architectureModelToFlowchart`
- [Engine](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-engine): 8 exports, including `DiagramEngine`, `DiagramEngineConfig`, `DiagramMode`, `isValidDiagramMode`
- [Interaction](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-interaction): 24 exports, including `areSiblingLanes`, `clampBoxInto`, `CollapseOptions`, `CommandDispatcher`
- [Layout](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-layout): 177 exports, including `analyseGraphShape`, `ApplyLayoutConfig`, `assessLabelClearance`, `assessPortRespect`
- [Layout — Grid Pack](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-layout-grid-pack): 12 exports, including `BesideSide`, `CachedCell`, `GridColumnLayout`, `GridLayoutCache`
- [Layout — Incremental](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-layout-incremental): 11 exports, including `affectedRegion`, `alignToPrevious`, `constraintsForStrategy`, `IncrementalOptions`
- [Layout — Sugiyama](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-layout-sugiyama): 11 exports, including `createLayeredLayout`, `inferDirection`, `LayeredLayoutOptions`, `LayoutDirection`
- [Models](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-models): 45 exports, including `bumpMutationEpoch`, `ChangeEntry`, `CollapsedState`, `DEFAULT_GROUP_HEADER_HEIGHT`
- [Ports](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-ports): 47 exports, including `AnchorSide`, `ANY_PORT_TYPE`, `arePortDataTypesCompatible`, `buildDynamicPortCommands`
- [Routing](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-routing): 40 exports, including `AStarHeuristic`, `AStarOptions`, `AStarRouter`, `CostFunction`
- [Serialization](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-serialization): 41 exports, including `beginIncrementalCapture`, `canonicalStringify`, `checksumOf`, `DeserializedSubgraph`
- [State](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-state): 9 exports, including `ConnectionDragState`, `ConnectionStateManager`, `ConnectionValidator`, `DiagramState`
- [Sync](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-sync): 40 exports, including `ActorFrontier`, `Awareness`, `AwarenessChange`, `AwarenessMessage`
- [Template Library](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-template-library): 39 exports, including `Activity`, `BadgeLabel`, `BarChart`, `ButtonNode`
- [Templates](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-templates): 26 exports, including `builtInStencils`, `DataBindConfig`, `DragHandlerConfig`, `FlexDirection`
- [Types](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-types): 85 exports, including `Alignment`, `ALL_LOD_FEATURES`, `ArrowStyle`, `BoundingBox`
- [Utils](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-utils): 17 exports, including `boxesIntersect`, `clampToBox`, `createBoundingBox`, `deepClone`
- [Validation](https://atloria.dev/p/grafloria-h7YM7amryF/developer/grafloria-engine-validation): 10 exports, including `createConnectionGroupValidator`, `GroupTypeDefinition`, `isConnectionAllowedByGroup`, `LinkTypeDefinition`
