Skip to main content

Module utils

Module utils 

Source
Expand description

Headless helper utilities (XyFlow-style graph helpers).

XyFlow exposes a set of convenience utilities in @xyflow/system/src/utils/* for common graph queries (e.g. “incomers/outgoers”, “connected edges”, “nodes inside rect”, bounds).

In Jellyflow, the canonical document (core::Graph) is port-based (edges connect ports), so these helpers are built on top of runtime::lookups::NodeGraphLookups which provides a stable, headless-safe adjacency surface.

Structs§

GetNodesBoundsOptions
GetNodesInsideOptions

Enums§

NodeInclusion

Functions§

get_connected_edges
Returns all edges incident to the given node (both directions).
get_connected_edges_for_nodes
Returns all edges connected to any node in the given set.
get_incomers
Returns the nodes connected as sources of the given node’s incoming edges.
get_node_position_with_origin
Returns the top-left position for a node, taking node origin into account.
get_node_rect
Returns the node’s canvas-space bounding rect.
get_nodes_bounds
Computes the bounding rect enclosing the given nodes.
get_nodes_inside
Returns the nodes that are inside the given query rect.
get_outgoers
Returns the nodes connected as targets of the given node’s outgoing edges.