Module

Jelly.Component

Package
purescript-jelly
Repository
yukikurage/purescript-jelly

#ComponentF Source

data ComponentF :: (Type -> Type) -> Type -> Typedata ComponentF m f

ComponentF is a functor that represents one operations in ComponentM

Constructors

Instances

#ComponentM Source

newtype ComponentM :: (Type -> Type) -> Type -> Typenewtype ComponentM m a

ComponentM is a monad that represents a component

Constructors

Instances

#Component Source

type Component :: (Type -> Type) -> Typetype Component m = ComponentM m Unit

Usually a in ComponentM m a is Unit, so this is a convenient alias

#foldComponentM Source

foldComponentM :: forall m n. MonadRec n => ((ComponentF m) ~> n) -> (ComponentM m) ~> n

Fold ComponentM into another monad, using foldFree.

#el Source

el :: forall m. String -> Array (Prop m) -> Component m -> Component m

Represents a element

#el' Source

el' :: forall m. String -> Component m -> Component m

Same asel, but without Props

#elNS Source

elNS :: forall m. String -> String -> Array (Prop m) -> Component m -> Component m

Represents a element with a namespace

#elNS' Source

elNS' :: forall m. String -> String -> Component m -> Component m

Same aselNS, but without Props

#elVoid Source

elVoid :: forall m. String -> Array (Prop m) -> Component m

Represents a void element

#elVoid' Source

elVoid' :: forall m. String -> Component m

Same aselVoid, but without Props

#rawSig Source

rawSig :: forall m. Signal String -> Component m

Convert Raw HTML to a Component

#raw Source

raw :: forall m. String -> Component m

Same as rawSig, but with a constant String.

#textSig Source

textSig :: forall m. Signal String -> Component m

Convert a text Signal to Text Node.

#text Source

text :: forall m. String -> Component m

Same as textSig, but with a constant String.

#doctype Source

doctype :: forall m. String -> String -> String -> Component m

Represents a doctype node

#doctypeHtml Source

doctypeHtml :: forall m. Component m

Represents <DOCTYPE html>

#switch Source

switch :: forall m. Signal (Component m) -> Component m

Switch components based on a Signal

#hooks Source

hooks :: forall m. m (Component m) -> Component m

Embeds a hooks into a component