Skip to main content

Exported types

Public TypeScript types from @tisoap/react-flow-smart-edge:

Options and configuration​

TypeDescription
GetSmartEdgeOptionsOptions object for getSmartEdge
ConfigureSmartEdgeOptionsOptions for createSmartEdge
SmartEdgeOptionsOptions passed to SmartEdge
SmartEdgePresetPreset name union ("bezier" | "straight" | …)
HopOptionsTuning for the hops option

Editable edges​

TypeDescription
SmartEditableEdgeDataShape of edge.data for editable edges
ControlPointDataSingle waypoint: { id, x, y, active }
GetSmartEdgeWaypointsParamsParams for getSmartEdgeWaypoints

Checkpoint edges​

TypeDescription
SmartCheckpointEdgeDataShape of edge.data for checkpoint edges

Routing provider​

See the SmartEdgeProvider reference for how these fit together.

TypeDescription
SmartEdgeProviderPropsProps for SmartEdgeProvider
SmartEdgeProviderOptionsPartial provider options (preset, routing/drag flags, cache/debounce)
ResolvedProviderOptionsSmartEdgeProviderOptions with every default filled in
SmartEdgeContextValueWhat SmartEdgeProvider exposes through React context
UseSmartEdgePathInputEdge geometry accepted by useSmartEdgePath
UseSmartEdgePathResult{ route, isDragging, hasProvider } returned by useSmartEdgePath
SmartEdgeRouteResultOne edge's routing outcome ({ kind: "routed" | "clear", wasRouted })
SmartEdgeMetricsAggregate counters reported by onMetrics for one completed batch
RegisteredSmartEdgeOne edge registered with the routing scheduler
SmartEdgeBatchItemA single serializable edge in a routeSmartEdgeBatch call

Pluggable functions​

TypeDescription
SVGDrawFunctionCustom SVG path drawer (straight, smooth, step)
SVGSimpleBezierDrawFunctionSimple-bezier drawer (requires handle position)
DrawEdgeFunctionUnion accepted by drawEdge option
EndpointInfoXYPosition plus handle position
SmoothStepOptionsOptions for svgDrawSmoothStepLinePath
PathFindingFunctionCustom pathfinding
FloatingEdgeParamsReturn type of getFloatingEdgeParams

Geometry​

TypeDescription
AvoidAreaAlias of React Flow Rect for avoidAreas
FlatGridTyped-array pathfinding grid
XYPositionRe-exported from @xyflow/react

Components​

TypeDescription
SmartFloatingConnectionLinePropsProps for SmartFloatingConnectionLine

Import types with import type:

import type {
GetSmartEdgeOptions,
AvoidArea,
ControlPointData,
} from "@tisoap/react-flow-smart-edge";