Skip to content
D
Documentation

Types — interfaces s–v

reference
4 min readUpdated

Interfaces S–V

Import these from @grafloria/engine.

Interfaces

SelectionEvent

ts
interface SelectionEvent

Properties

NameTypeDefaultDescription
nodes?string[]
links?string[]
groups?string[]
source?'user' | 'api' | 'pattern'
pattern?string

SelfLoopConfig

SELF-LOOP geometry (source node === target node). The loop leaves the source port, bulges away from the node body and re-enters at the target port. Several self-loops on the same node nest concentrically (size + i * spacing), so each keeps its own label slot.

ts
interface SelfLoopConfig

Properties

NameTypeDefaultDescription
size?numberHow far the loop bulges away from the node body (px). Default 40.
width?numberLateral span of the loop along the node's side (px). Only used when the source and target attachment points coincide (or nearly do) — the two ends are spread by this much so the loop has a body. Default = size.
spacing?numberExtra size added per additional self-loop on the same node (px). Default 18.
side?'auto' | 'top' | 'right' | 'bottom' | 'left'Force the side the loop bulges out of. 'auto' (default) uses the source port's own side.

SerializedEntity

ts
interface SerializedEntity

Properties

NameTypeDefaultDescription
idstring
uuidstring
typestring
versionnumber
metadataRecord<string, any>

SerializedFlexItemConfig

Serialized flex item configuration

ts
interface SerializedFlexItemConfig

Properties

NameTypeDefaultDescription
order?number
flexGrow?number
flexShrink?number
flexBasis?number | 'auto'
alignSelf?string

SerializedGridItemConfig

Serialized grid item configuration

ts
interface SerializedGridItemConfig

Properties

NameTypeDefaultDescription
columnStart?number | 'auto'
columnEnd?number | 'auto'
rowStart?number | 'auto'
rowEnd?number | 'auto'
gridArea?string
justifySelf?string
alignSelf?string

SerializedLayoutConfig

Serialized layout configuration

ts
interface SerializedLayoutConfig

Properties

NameTypeDefaultDescription
typeLayoutType
config?LayoutConfig

Shadow

ts
interface Shadow

Properties

NameTypeDefaultDescription
offsetXnumber
offsetYnumber
blurnumber
colorstring

Size

ts
interface Size

Properties

NameTypeDefaultDescription
widthnumber
heightnumber
depth?number

Transform

ts
interface Transform

Properties

NameTypeDefaultDescription
positionPoint
rotationnumber
scalePoint
originPoint

TransformMatrix

2D Affine Transform Matrix Represents: translate, rotate, scale, skew CSS-compatible format: matrix(a, b, c, d, e, f)

Matrix structure: | a c e | | b d f | | 0 0 1 |

Where:

  • a, d: Scale X and Y (also affected by rotation/skew)
  • b, c: Rotation and skew components
  • e, f: Translation X and Y
ts
interface TransformMatrix

Properties

NameTypeDefaultDescription
anumber
bnumber
cnumber
dnumber
enumber
fnumber

ValidationError

ts
interface ValidationError

Properties

NameTypeDefaultDescription
pathstring
messagestring
codestring
severity'error'

ValidationEvent

ts
interface ValidationEvent

Properties

NameTypeDefaultDescription
type'diagram' | 'node' | 'link' | 'port' | 'group'
entityId?string
result?any
timestamp?number

ValidationResult

ts
interface ValidationResult

Properties

NameTypeDefaultDescription
validboolean
errorsValidationError[]
warningsValidationWarning[]

ValidationWarning

ts
interface ValidationWarning

Properties

NameTypeDefaultDescription
pathstring
messagestring
codestring
severity'warning'

Viewport

ts
interface Viewport

Properties

NameTypeDefaultDescription
xnumber
ynumber
zoomnumber
rotationnumber
width?number
height?number

ViewportEvent

ts
interface ViewportEvent

Properties

NameTypeDefaultDescription
zoom?number
position?{ x: number; y: number }
settings?any

Was this page helpful?

Types — interfaces s–v — Grafloria