Skip to content
D
Documentation

Components — interfaces

reference
5 min readUpdated

Interfaces

Import these from @grafloria/angular.

Interfaces

ClosestHit

ts
interface ClosestHit

Properties

NameTypeDefaultDescription
tnumberFraction along the path, 0-1.
pointPoint
distancenumber

GrafloriaCollabOptions

The uniform collab contract every Grafloria wrapper shares.

ts
interface GrafloriaCollabOptions

Properties

NameTypeDefaultDescription
transportSyncTransport
actorstring
presence?boolean | BindPresenceOptionsLive cursors + remote selection outlines. true for defaults.

GrafloriaLayoutRequest

Request shape for the declarative [layout] input / applyLayout().

ts
interface GrafloriaLayoutRequest

Properties

NameTypeDefaultDescription
namestringRegistry layout name: 'elk' | 'dagre' | 'force' | 'tree' | 'grid' | 'auto' | …
options?Record<string, unknown>

GrafloriaWidgetTemplateContext

Template context for <ng-template grafloriaWidget> widget templates.

ts
interface GrafloriaWidgetTemplateContext

Properties

NameTypeDefaultDescription
$implicitDashboardWidgetSpec
dataRecord<string, unknown>

InsertNodeOnEdgeOptions

ts
interface InsertNodeOnEdgeOptions

Properties

NameTypeDefaultDescription
nodeType?stringType of the node dropped onto the edge (default 'basic').
size?{ width: number; height: number }Size of the inserted node (default 100×50).
data?Record<string, any>Seed data/label for the new node.
label?stringLabel written to the node's label metadata (what most shapes render).
configure?(node: NodeModel) => voidHook to customise the node before it is committed (set style, ports, …).

LinkActionContext

Card B — what a link-toolbar button is handed.

Unlike a node action (which only needs the node), an edge action needs to know WHERE on the edge it was invoked: "insert node here" is meaningless without the split point.

ts
interface LinkActionContext

Properties

NameTypeDefaultDescription
linkLinkModel
engineDiagramEngine
tnumberFraction along the RENDERED path where the toolbar sits (0-1).
pointPointWorld-space point at t — i.e. exactly under the button the user pressed.
tangent?PointUnit direction of travel at t; decides which sides an inserted node connects on.

LinkToolbarAction

Mirrors node-toolbar's ToolbarAction, retyped around LinkActionContext. (Same shape, same rendering contract, same keyboard handling.)

ts
interface LinkToolbarAction

Properties

NameTypeDefaultDescription
idstring
labelstring
icon?string
tooltip?string
disabled?boolean
hidden?boolean
visible?(ctx: LinkActionContext) => boolean
onClick(ctx: LinkActionContext) => void
group?string
shortcut?string

NodeToolbarConfig

Comprehensive configuration object for NodeToolbar

ts
interface NodeToolbarConfig

Properties

NameTypeDefaultDescription
position?ToolbarPosition
alignment?ToolbarAlignment
offset?number
actions?ToolbarAction[]
actionGroups?ToolbarActionGroup[]
template?TemplateRef<any>
style?ToolbarStyleConfig
animation?ToolbarAnimationConfig
behavior?ToolbarBehaviorConfig
ariaLabel?string
positioningStrategy?PositioningStrategy

Point

ts
interface Point

Properties

NameTypeDefaultDescription
xnumber
ynumber

PropertyPanelChangeEvent

Property panel change event (UI-level event).

ts
interface PropertyPanelChangeEvent

Properties

NameTypeDefaultDescription
nodesPropertyDiagramNode[]
propertystring
valueany

SaveEvent

Save event.

ts
interface SaveEvent

Properties

NameTypeDefaultDescription
nodesPropertyDiagramNode[]
changesRecord<string, any>

ToolbarAction

ts
interface ToolbarAction

Properties

NameTypeDefaultDescription
idstring
labelstring
icon?string
tooltip?string
disabled?boolean
hidden?boolean
visible?(node: NodeModel) => boolean
onClick(node: NodeModel) => void
group?string
shortcut?string

ToolbarActionGroup

Toolbar Action Group Organizes actions into logical groups with visual separators

ts
interface ToolbarActionGroup

Properties

NameTypeDefaultDescription
idstring
label?string
actionsToolbarAction[]
separator?'before' | 'after' | 'both' | 'none'

ToolbarAnimationConfig

ts
interface ToolbarAnimationConfig

Properties

NameTypeDefaultDescription
enabled?boolean
duration?string
easing?string
preset?AnimationPreset

ToolbarBehaviorConfig

ts
interface ToolbarBehaviorConfig

Properties

NameTypeDefaultDescription
autoHide?boolean
closeOnClickOutside?boolean
followNode?boolean
enableKeyboardNav?boolean
hideOnMultiSelect?boolean
showAs?'toolbar' | 'contextMenu' | 'both'
contextMenuTrigger?'rightClick' | 'longPress' | 'both'

ToolbarConfig

ts
interface ToolbarConfig

Properties

NameTypeDefaultDescription
position?ToolbarPosition
alignment?ToolbarAlignment
actions?ToolbarAction[]
template?TemplateRef<any>
offset?number
canvasElement?HTMLElement
viewport?{ x: number; y: number; width: number; height: number }
zoom?number
behavior?ToolbarBehaviorConfig
style?ToolbarStyleConfig

ToolbarStyleConfig

ts
interface ToolbarStyleConfig

Properties

NameTypeDefaultDescription
backgroundColor?string
borderColor?string
borderRadius?string
boxShadow?string
padding?string
zIndex?number
transitionDuration?string

ValidationErrorEvent

Validation error event.

ts
interface ValidationErrorEvent

Properties

NameTypeDefaultDescription
propertystring
errorsstring[]

Was this page helpful?

Components — interfaces — Grafloria