Skip to content
D
Documentation

Overview

reference
1 min readUpdated

@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: 45 exports, including ArchitectureGrid, ArchitectureLayoutOptions, ArchitectureLayoutResult, BulkSelectionOptions
  • Collab: 25 exports, including ActorId, AddOp, applyEntitySet, applyOp
  • Commands: 64 exports, including AddGroupCommand, AddLinkCommand, AddNodeCommand, AddPortCommand
  • Comments: 22 exports, including AnchorSpec, CommentAnchor, CommentMessage, CommentRegisterTree
  • Config: 10 exports, including ConnectionLineStyle, ControlPointEditorConfig, DEFAULT_INTERACTION_CONFIG, DELIBERATE_MODE_CONFIG
  • Dsl: 116 exports, including applyArchitectureModel, applyBlockGrid, ARCHITECTURE_ICONS, architectureModelToFlowchart
  • Engine: 8 exports, including DiagramEngine, DiagramEngineConfig, DiagramMode, isValidDiagramMode
  • Interaction: 24 exports, including areSiblingLanes, clampBoxInto, CollapseOptions, CommandDispatcher
  • Layout: 177 exports, including analyseGraphShape, ApplyLayoutConfig, assessLabelClearance, assessPortRespect
  • Layout — Grid Pack: 12 exports, including BesideSide, CachedCell, GridColumnLayout, GridLayoutCache
  • Layout — Incremental: 11 exports, including affectedRegion, alignToPrevious, constraintsForStrategy, IncrementalOptions
  • Layout — Sugiyama: 11 exports, including createLayeredLayout, inferDirection, LayeredLayoutOptions, LayoutDirection
  • Models: 45 exports, including bumpMutationEpoch, ChangeEntry, CollapsedState, DEFAULT_GROUP_HEADER_HEIGHT
  • Ports: 47 exports, including AnchorSide, ANY_PORT_TYPE, arePortDataTypesCompatible, buildDynamicPortCommands
  • Routing: 40 exports, including AStarHeuristic, AStarOptions, AStarRouter, CostFunction
  • Serialization: 41 exports, including beginIncrementalCapture, canonicalStringify, checksumOf, DeserializedSubgraph
  • State: 9 exports, including ConnectionDragState, ConnectionStateManager, ConnectionValidator, DiagramState
  • Sync: 40 exports, including ActorFrontier, Awareness, AwarenessChange, AwarenessMessage
  • Template Library: 39 exports, including Activity, BadgeLabel, BarChart, ButtonNode
  • Templates: 26 exports, including builtInStencils, DataBindConfig, DragHandlerConfig, FlexDirection
  • Types: 85 exports, including Alignment, ALL_LOD_FEATURES, ArrowStyle, BoundingBox
  • Utils: 17 exports, including boxesIntersect, clampToBox, createBoundingBox, deepClone
  • Validation: 10 exports, including createConnectionGroupValidator, GroupTypeDefinition, isConnectionAllowedByGroup, LinkTypeDefinition

Was this page helpful?

Overview — Grafloria