Module

Yoga.Tree.Svg.Render

Package
purescript-yoga-tree-svg
Repository
shamansir/purescript-yoga-tree-svg

#Slots Source

type Slots :: Row Typetype Slots = (item :: NodeSlot, pinned :: NodeSlot, preview :: NodeSlot)

#_item Source

_item :: Proxy @Symbol "item"

#_preview Source

_preview :: Proxy @Symbol "preview"

#EdgeMode Source

#NodeStatus Source

#SoftLimit Source

data SoftLimit

Constructors

#NodeQuery Source

data NodeQuery :: forall k. k -> Typedata NodeQuery x

#NodeOutput Source

#GraphConfig Source

type GraphConfig a i = { events :: Events i a, geometry :: Geometry, modes :: Modes, render :: RenderConfig a, theme :: Theme }

#Modes Source

type Modes = { edgeMode :: EdgeMode, nodeMode :: NodeMode, pinMode :: NodeMode, previewMode :: NodeMode }

#RenderConfig Source

type RenderConfig a = { componentSize :: Path -> a -> { height :: Number, width :: Number }, edgeColor :: Theme -> Path -> a -> Path -> a -> Color, edgeLabel :: Path -> a -> Path -> a -> String, valueColor :: Theme -> Path -> a -> Color, valueLabel :: Path -> a -> String, valueLabelColor :: Theme -> Path -> a -> Color, valueLabelWidth :: Path -> a -> Int }

#Events Source

type Events i a = { valueClick :: Path -> a -> i, valueOut :: Path -> a -> i, valueOver :: Path -> a -> i }

#Geometry Source

type Geometry = { baseDistance :: Number, childrenLimit :: SoftLimit, depthLimit :: SoftLimit, scaleFactor :: Number, scaleLimit :: { max :: Number, min :: Number }, valueRadius :: Number }

#ValueConfig Source

type ValueConfig a = { geometry :: Geometry, nodeMode :: NodeMode, render :: RenderConfig a, theme :: Theme }

#NodeComponentInput Source

type NodeComponentInput a = { path :: Path, theme :: Theme, value :: a }

#GraphHtml Source

type GraphHtml :: (Type -> Type) -> Type -> Typetype GraphHtml m i = HTML (ComponentSlot Slots m i) i

#renderGraph Source

renderGraph :: forall a i m. GraphStatus -> GraphConfig a i -> Events i a -> Graph Path (WithStatus a) -> Array (GraphHtml m i)

#renderGraph_ Source

renderGraph_ :: forall a i m. GraphStatus -> GraphConfig a i -> NodeComponent m a -> Events i a -> Graph Path (WithStatus a) -> Array (GraphHtml m i)

#renderGraph' Source

renderGraph' :: forall a i m. GraphStatus -> GraphConfig a i -> Maybe (NodeComponent m a) -> Events i a -> Graph Path (WithStatus a) -> Array (GraphHtml m i)

#renderGraphFrom Source

renderGraphFrom :: forall a i m. From -> GraphStatus -> GraphConfig a i -> Events i a -> Graph Path (WithStatus a) -> Array (GraphHtml m i)

#renderGraphFrom_ Source

renderGraphFrom_ :: forall a i m. From -> GraphStatus -> GraphConfig a i -> NodeComponent m a -> Events i a -> Graph Path (WithStatus a) -> Array (GraphHtml m i)

#renderGraphFrom' Source

renderGraphFrom' :: forall a i m. From -> GraphStatus -> GraphConfig a i -> Maybe (NodeComponent m a) -> Events i a -> Graph Path (WithStatus a) -> Array (GraphHtml m i)

#renderPreview Source

renderPreview :: forall a i m. ValueConfig a -> NodeStatus -> Path -> a -> GraphHtml m i

#renderPreview_ Source

renderPreview_ :: forall a i m. ValueConfig a -> NodeComponent m a -> NodeStatus -> Path -> a -> GraphHtml m i

#renderPreview' Source

renderPreview' :: forall a i m. ValueConfig a -> Maybe (NodeComponent m a) -> NodeStatus -> Path -> a -> GraphHtml m i

#WithStatus Source

#toValueConfig Source

toValueConfig :: forall a i. GraphConfig a i -> ValueConfig a