Module

Sigil.Svg.Emit

Package
purescript-sigil
Repository
afcondon/purescript-sigil

Emit: LayoutNode → Effect Element.

Uses shared attribute mapping from Sigil.Svg.Attrs and calls thin SVG DOM FFI helpers.

#emit Source

emit :: LayoutNode -> Dimensions -> Effect Element

Emit a layout tree as a detached SVG element with the given dimensions.

#emitNode Source

emitNode :: LayoutNode -> Effect Element

Emit a single LayoutNode to a DOM element.

#renderClassDeclIntoSvg Source

renderClassDeclIntoSvg :: String -> { methods :: Array { ast :: Maybe RenderType, name :: String }, name :: String, superclasses :: Array SuperclassInfo, typeParams :: Array String } -> Effect Unit

Render a class definition into a DOM element selected by CSS selector.

#renderSignatureIntoSvg Source

renderSignatureIntoSvg :: String -> { ast :: RenderType, className :: Maybe String, name :: String, sig :: String, typeParams :: Array String } -> Effect Unit

Render a signature into a DOM element selected by CSS selector.

#renderAdtIntoSvg Source

renderAdtIntoSvg :: String -> { constructors :: Array { args :: Array RenderType, name :: String }, keyword :: Maybe String, name :: String, typeParams :: Array String } -> Effect Unit

Render an ADT into a DOM element selected by CSS selector.