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

Web Worker batch routing

TypeDescription
SmartEdgeBatchRoutingProviderPropsProps for SmartEdgeBatchRoutingProvider
SmartEdgeBatchOptionsProvider default options (preset plus serializable fields)
SmartEdgeBatchOverride{ preset?, options? } read from edge.data.smartEdge
SmartEdgeBatchEdgeDataShape of edge.data for per-edge overrides
SerializableSmartEdgeOptionsWorker-safe subset of options (no functions)
EdgeRouteInputEdge geometry accepted by useSmartEdgeRoute
BatchEdgeInputA single serializable edge in a batch
BatchRoutingInput{ nodes, edges } input to routeSmartEdgesBatch
BatchRoutingResultsRouted results keyed by edge id

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
Grid, GridNodePathfinding grid types
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";