package grouping

Import Path
	github.com/pancsta/d2/d2layouts/d2talalayout/internal/grouping (on go.dev)

Dependency Relation
	imports 13 packages, and imported by 3 packages

Involved Source Files cluster_discovery.go clusters.go join.go lifecycle.go Package grouping discovers and manages layout groups that temporarily move as a single vessel.
Package-Level Functions (total 10)
AddCluster installs a discovered cluster and its temporary vessel into the mutable layout graph.
AddClusters discovers interchangeable sibling nodes and replaces accepted groups with temporary vessels for node placement.
AddSequences replaces each discovered step run with a temporary vessel.
AssignArrangement selects the cluster axis from node dimensions. Randomness is consumed only for square clusters, preserving the engine's seed contract.
Cleanup restores cluster and sequence members after node placement and retires the temporary vessels while retaining rediscovery metadata.
CreateVessel builds the temporary placement node representing a cluster.
JoinDistancedClusters incrementally pulls disconnected placement islands toward their common center without introducing overlap.
PaddingBetween calculates the spacing between adjacent cluster members.
ResetClusters removes inactive vessel metadata so a later layout rediscovers clusters from ordinary nodes and edges.
SequenceDefiningEdges returns the IDs of edges consumed when step nodes are replaced by sequence vessels.