Interface: RouteTree
API / @xmachines/play-router / RouteTree
Defined in: types.ts:117
Complete route tree with lookup maps
Provides bidirectional mapping between state IDs and URL paths:
- byStateId: Maps state IDs to route nodes (for play.route event targeting)
- byPath: Maps URL paths to route nodes (for browser navigation)
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
byPath | Map<string, RouteNode> | Map full path -> route node Used to look up state ID from URL path for play.route event targeting | types.ts:129 |
byStateId | Map<string, RouteNode> | Map state ID -> route node Used to look up URL path from state ID for browser URL sync | types.ts:124 |
graph? | Graph<MachineNodeData, MachineEdgeData, any, any> | Graph representation of the state machine for advanced queries. Populated by extractMachineRoutes() — use for hierarchy queries, reachability checks, and transition-aware navigation via @statelyai/graph algorithms. Example import { getSuccessors, hasPath } from "@statelyai/graph"; const successors = getSuccessors(tree.graph!, "myMachine.home"); | types.ts:141 |
root | RouteNode | Root route node | types.ts:119 |