react-haskell-1.2.0.0: Haskell React bindings

Safe HaskellNone
LanguageHaskell2010

React.Types

Synopsis

Documentation

newtype ForeignNode

Constructors

ForeignNode JSAny 

Instances

Unpack ForeignNode 
Pack ForeignNode 

newtype RawAttrs

Constructors

RawAttrs JSAny 

Instances

Unpack RawAttrs 
Pack RawAttrs 

newtype ReactArray

Constructors

ReactArray JSAny 

Instances

Unpack ReactArray 
Pack ReactArray 

newtype ForeignClass

Constructors

ForeignClass JSAny 

Instances

Unpack ForeignClass 
Pack ForeignClass 

newtype RenderHandle

Constructors

RenderHandle Int 

Instances

Unpack RenderHandle 
Pack RenderHandle 

data EventHandler signal

Constructors

EventHandler 

Fields

handler :: RawEvent -> Maybe signal
 
evtType :: EvtType
 

Instances

(Monad m, (~) * sig (Signal ty)) => Attributable (ReactT ty m a) (EventHandler sig) 

newtype RawEvent

Constructors

RawEvent JSAny 

Instances

Unpack RawEvent 
Pack RawEvent 

type Attrs = [(JSString, JSON)]

data ReactNode signal

Constructors

Parent JSString Attrs [EventHandler signal] [ReactNode signal] 
Leaf JSString Attrs [EventHandler signal] 
Text String

Pre Attrs Handlers [ReactNode]

class Animatable a where

Properties that can animate.

Numeric values like width and height, as well as colors.

Methods

interpolate

Arguments

:: Easing

easing function

-> a

from

-> a

to

-> Double
0..1
ratio of time elapsed
-> a 

Use an easing function to interpolate between two values

animAdd :: a -> a -> a

Add two animations

animSub :: a -> a -> a

Subtract two animations

animZero :: a

data family PageState ty :: *

Instances

data family AnimationState ty :: *

Instances

data family Signal ty :: *

Instances

data Signal () = UnitSignal 

data AnimConfig ty

Constructors

forall a . (Animatable a, Show a) => AnimConfig 

Fields

duration :: Double

How long this animation lasts in milliseconds

from :: a

Where does this animation start (it goes to animZero)

lens :: Traversal' (AnimationState ty) a

Pointer to this field within AnimationState

easing :: Easing

How is the animation eased?

onComplete :: Bool -> Maybe (Signal ty)

Do something when it's finished?

data RunningAnim ty

Constructors

RunningAnim 

Fields

config :: AnimConfig ty
 
beganAt :: Double
 

newtype ReactT ty m a

Constructors

ReactT 

Fields

runReactT :: AnimationState ty -> m ([ReactNode (Signal ty)], a)
 

Instances

Monad m => Monad (ReactT ty m) 
Monad m => Functor (ReactT ty m) 
Monad m => Applicative (ReactT ty m) 
Attributable (ReactT ty m a) x => Attributable (ReactT ty m a -> ReactT ty m a) x 
(Monad m, (~) * a ()) => IsString (ReactT ty m a) 
(Monad m, Monoid a) => Monoid (ReactT ty m a) 
(Monad m, (~) * sig (Signal ty)) => Attributable (ReactT ty m a) (EventHandler sig) 
Monad m => Attributable (ReactT ty m a) (JSString, JSON) 

type React ty = ReactT ty Identity

class Attributable h a where

Methods

(<!) :: h -> a -> h

Instances

Attributable (ReactT ty m a) x => Attributable (ReactT ty m a -> ReactT ty m a) x 
(Monad m, (~) * sig (Signal ty)) => Attributable (ReactT ty m a) (EventHandler sig) 
Monad m => Attributable (ReactT ty m a) (JSString, JSON) 

(<!?) :: Attributable h a => h -> (Bool, a) -> h

(<!>) :: [ReactNode signal] -> (JSString, JSON) -> [ReactNode signal]

(<!<) :: [ReactNode signal] -> EventHandler signal -> [ReactNode signal]

data EventProperties e

Constructors

EventProperties 

Fields

bubbles :: !Bool
 
cancelable :: !Bool
 
currentTarget :: !e
 
defaultPrevented :: !Bool
 
eventPhase :: !Int
 
isTrusted :: !Bool
 
evtTarget :: !e
 
eventType :: !JSString
 

Instances

data KeyboardEvent

Constructors

KeyboardEvent 

Fields

keyboardModifierKeys :: !ModifierKeys
 
charCode :: !Int
 
key :: !JSString
 
keyCode :: !Int
 
locale :: !JSString
 
location :: !Int
 
repeat :: !Bool
 
which :: !Int
 

newtype ChangeEvent

Constructors

ChangeEvent 

Fields

targetValue :: JSString
 

Instances

data FocusEvent e

Constructors

FocusEvent 

Fields

domEventTarget :: !e
 
relatedTarget :: !e
 

Instances