Exported types
Public TypeScript types from @tisoap/react-flow-smart-edge:
Options and configuration
| Type | Description |
|---|---|
GetSmartEdgeOptions | Options object for getSmartEdge |
ConfigureSmartEdgeOptions | Options for createSmartEdge |
SmartEdgeOptions | Options passed to SmartEdge |
SmartEdgePreset | Preset name union ("bezier" | "straight" | …) |
HopOptions | Tuning for the hops option |
Editable edges
| Type | Description |
|---|---|
SmartEditableEdgeData | Shape of edge.data for editable edges |
ControlPointData | Single waypoint: { id, x, y, active } |
GetSmartEdgeWaypointsParams | Params for getSmartEdgeWaypoints |
Checkpoint edges
| Type | Description |
|---|---|
SmartCheckpointEdgeData | Shape of edge.data for checkpoint edges |
Routing provider
See the SmartEdgeProvider reference for how these fit together.
| Type | Description |
|---|---|
SmartEdgeProviderProps | Props for SmartEdgeProvider |
SmartEdgeProviderOptions | Partial provider options (preset, routing/drag flags, cache/debounce) |
ResolvedProviderOptions | SmartEdgeProviderOptions with every default filled in |
SmartEdgeContextValue | What SmartEdgeProvider exposes through React context |
UseSmartEdgePathInput | Edge geometry accepted by useSmartEdgePath |
UseSmartEdgePathResult | { route, isDragging, hasProvider } returned by useSmartEdgePath |
SmartEdgeRouteResult | One edge's routing outcome ({ kind: "routed" | "clear", wasRouted }) |
SmartEdgeMetrics | Aggregate counters reported by onMetrics for one completed batch |
RegisteredSmartEdge | One edge registered with the routing scheduler |
SmartEdgeBatchItem | A single serializable edge in a routeSmartEdgeBatch call |
Pluggable functions
| Type | Description |
|---|---|
SVGDrawFunction | Custom SVG path drawer (straight, smooth, step) |
SVGSimpleBezierDrawFunction | Simple-bezier drawer (requires handle position) |
DrawEdgeFunction | Union accepted by drawEdge option |
EndpointInfo | XYPosition plus handle position |
SmoothStepOptions | Options for svgDrawSmoothStepLinePath |
PathFindingFunction | Custom pathfinding |
FloatingEdgeParams | Return type of getFloatingEdgeParams |
Geometry
| Type | Description |
|---|---|
AvoidArea | Alias of React Flow Rect for avoidAreas |
FlatGrid | Typed-array pathfinding grid |
XYPosition | Re-exported from @xyflow/react |
Components
| Type | Description |
|---|---|
SmartFloatingConnectionLineProps | Props for SmartFloatingConnectionLine |
Import types with import type:
import type {
GetSmartEdgeOptions,
AvoidArea,
ControlPointData,
} from "@tisoap/react-flow-smart-edge";