Skip to main content

Module connection

Module connection 

Source
Expand description

Renderer-neutral connection gesture helpers.

Adapters own pointer capture and platform hit testing. The runtime owns deterministic connection activation and handle proximity policy that should feel like XyFlow across renderers.

Structs§

ClosestConnectionHandle
Closest handle resolution result.
ClosestConnectionHandleInput
Input for resolving the closest connection handle near a pointer.
ConnectEdgeRequest
Rules-driven request for connecting two existing ports.
ConnectionDragActivationInput
Screen-space input for deciding whether a connection drag should activate.
ConnectionHandleCandidate
Renderer-normalized handle geometry in canvas coordinates.
ConnectionHandleConnection
XyFlow-shaped connection endpoints resolved from a start handle and target handle.
ConnectionHandleIndicator
XyFlow-style per-handle interaction indicator state.
ConnectionHandleIndicatorInput
Input for resolving XyFlow-style handle interaction indicator state.
ConnectionHandleRef
Stable identity for a renderer handle participating in a connection gesture.
ConnectionTargetCandidate
Renderer-normalized target-handle geometry plus target connectability policy.
ConnectionTargetFromHandlesInput
Input for resolving the current connection target from renderer-normalized handle candidates.
ConnectionTargetHandle
Candidate target handle plus adapter-resolved connectability policy.
ConnectionTargetInput
Input for resolving whether a target handle can complete a connection gesture.
ReconnectEdgeRequest
Rules-driven request for reconnecting one endpoint of an existing edge.
ResolvedConnectionTarget
Resolved target semantics for connection feedback and completion callbacks.

Enums§

ConnectEdgeError
Error returned when a connect request could not be committed.
ConnectionHandleValidity
XyFlow-compatible validity state for a connection target candidate.
ReconnectEdgeError
Error returned when a reconnect request could not be committed.

Constants§

CONNECT_EDGE_TRANSACTION_LABEL
Default transaction label used for committed connect updates.
RECONNECT_EDGE_TRANSACTION_LABEL
Default transaction label used for committed reconnect updates.

Functions§

closest_connection_handle
Returns the nearest handle inside connection_radius, matching XyFlow tie semantics.
connect_edge_transaction
connect_edge_transaction_with_edge_id
connection_drag_threshold_met
Returns whether pointer movement should start a connection drag.
connection_handle_validity
Resolves XyFlow’s true | false | null connection feedback into a Rust enum.
reconnect_edge_transaction
resolve_connection_handle_indicator
Resolves the handle booleans used by XyFlow’s Handle component.
resolve_connection_target
Resolves XyFlow handle target semantics without depending on DOM hit testing.
resolve_connection_target_from_handles
Resolves connection target feedback from renderer-normalized handle geometry and policies.