Type definitions for LiveFlow.
This module contains all the base types used throughout the LiveFlow library.
Summary
Types
Background pattern type
Bounding box with min/max coordinates
Connection mode for edges
2D coordinate point
Dimensions of an element
Edge marker configuration
Type of edge path rendering
Extent constraint for node movement
Type of handle (source emits connections, target receives)
Unique identifier for nodes and edges
Marker type for edge endpoints
Node type identifier
Position of a handle on a node
Rectangle with position and dimensions
Functions
Checks if a position is horizontal (left or right).
Returns the opposite position.
Checks if a position is vertical (top or bottom).
Types
@type background_pattern() :: :dots | :lines | :cross | nil
Background pattern type
@type bounds() :: %{min: coordinate(), max: coordinate()}
Bounding box with min/max coordinates
@type connection_mode() :: :strict | :loose
Connection mode for edges
2D coordinate point
Dimensions of an element
@type edge_marker() :: %{ optional(:type) => marker_type(), optional(:color) => String.t(), optional(:width) => number(), optional(:height) => number(), optional(:stroke_width) => number() }
Edge marker configuration
@type edge_type() :: :bezier | :straight | :step | :smoothstep | atom()
Type of edge path rendering
@type extent() :: :parent | bounds() | nil
Extent constraint for node movement
@type handle_type() :: :source | :target
Type of handle (source emits connections, target receives)
@type id() :: String.t()
Unique identifier for nodes and edges
@type marker_type() :: :arrow | :arrow_closed | :circle | :circle_filled | :diamond | :diamond_filled | :none | atom()
Marker type for edge endpoints
@type node_type() :: :default | :input | :output | atom()
Node type identifier
@type position() :: :top | :bottom | :left | :right
Position of a handle on a node
Rectangle with position and dimensions