Module
Sigil.Hats
- Package
- purescript-sigil-hats
- Repository
- afcondon/purescript-sigil-hats
Bridge from Sigil LayoutNode trees to HATS Tree values.
Uses toSvgPrimitive from Sigil.Svg.Attrs so that the HATS path
produces identical SVG attributes to the DOM FFI emit path.
#toTree Source
toTree :: LayoutNode -> TreeConvert a LayoutNode to a HATS Tree, using the shared attribute mapping.
#renderClassDeclSvg Source
renderClassDeclSvg :: { methods :: Array { ast :: Maybe RenderType, name :: String }, name :: String, superclasses :: Array SuperclassInfo, typeParams :: Array String } -> TreeRender a type class definition as a HATS Tree.
#renderSignatureSvg Source
renderSignatureSvg :: { ast :: RenderType, className :: Maybe String, name :: String, sig :: String, typeParams :: Array String } -> TreeRender a value/type-synonym signature as a HATS Tree.
#renderSigletSvg Source
renderSigletSvg :: { ast :: RenderType, maxHeight :: Number, maxWidth :: Number } -> Maybe TreeRender a siglet (elided miniature type signature) as a HATS Tree. Returns Nothing if the type can't fit in the given dimensions.
- Modules
- Sigil.
Hats