| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
React.Types
- newtype ForeignNode = ForeignNode JSAny
- newtype RawAttrs = RawAttrs JSAny
- newtype ReactArray = ReactArray JSAny
- newtype ForeignClass = ForeignClass JSAny
- newtype RenderHandle = RenderHandle Int
- data EvtType
- data EventHandler signal = EventHandler {}
- newtype RawEvent = RawEvent JSAny
- type Attrs = [(JSString, JSON)]
- data ReactNode signal
- = Parent JSString Attrs [EventHandler signal] [ReactNode signal]
- | Leaf JSString Attrs [EventHandler signal]
- | Text String
- data Easing
- = Linear
- | EaseInQuad
- | EaseOutQuad
- | EaseInOutQuad
- | EaseInCubic
- | EaseOutCubic
- | EaseInOutCubic
- | EaseInQuart
- | EaseOutQuart
- | EaseInOutQuart
- | EaseInQuint
- | EaseOutQuint
- | EaseInOutQuint
- | EaseInElastic
- | EaseOutElastic
- | EaseInOutElastic
- | EaseInBounce
- | EaseOutBounce
- | EaseInOutBounce
- | EaseBezier Double Double Double Double
- | EaseInSine
- | EaseOutSine
- class Animatable a where
- data family PageState ty :: *
- data family AnimationState ty :: *
- data family Signal ty :: *
- data AnimConfig ty = forall a . (Animatable a, Show a) => AnimConfig {
- duration :: Double
- from :: a
- lens :: Traversal' (AnimationState ty) a
- easing :: Easing
- onComplete :: Bool -> Maybe (Signal ty)
- data RunningAnim ty = RunningAnim {
- config :: AnimConfig ty
- beganAt :: Double
- newtype ReactT ty m a = ReactT {
- runReactT :: AnimationState ty -> m ([ReactNode (Signal ty)], a)
- type React ty = ReactT ty Identity
- class Attributable h a where
- (<!) :: h -> a -> h
- (<!?) :: Attributable h a => h -> (Bool, a) -> h
- (<!>) :: [ReactNode signal] -> (JSString, JSON) -> [ReactNode signal]
- (<!<) :: [ReactNode signal] -> EventHandler signal -> [ReactNode signal]
- data EventProperties e = EventProperties {
- bubbles :: !Bool
- cancelable :: !Bool
- currentTarget :: !e
- defaultPrevented :: !Bool
- eventPhase :: !Int
- isTrusted :: !Bool
- evtTarget :: !e
- eventType :: !JSString
- data ModifierKeys = ModifierKeys {}
- data MouseEvent = MouseEvent {}
- data KeyboardEvent = KeyboardEvent {}
- newtype ChangeEvent = ChangeEvent {
- targetValue :: JSString
- data FocusEvent e = FocusEvent {
- domEventTarget :: !e
- relatedTarget :: !e
Documentation
data EvtType
data EventHandler signal
Instances
| (Monad m, (~) * sig (Signal ty)) => Attributable (ReactT ty m a) (EventHandler sig) |
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] |
data Easing
Standard easing functions. These are used to interpolate smoothly.
Constructors
class Animatable a where
Properties that can animate.
Numeric values like width and height, as well as colors.
Methods
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
Instances
| Animatable Double | |
| Animatable () | |
| Animatable Color | |
| (Animatable a, Animatable b) => Animatable (a, b) | |
| (Animatable a, Animatable b, Animatable c) => Animatable (a, b, c) |
data family PageState ty :: *
Instances
| data PageState () = UnitPageState |
data family AnimationState ty :: *
Instances
| data AnimationState () = UnitAnimationState |
data family Signal ty :: *
Instances
| data Signal () = UnitSignal |
data AnimConfig ty
Constructors
| forall a . (Animatable a, Show a) => AnimConfig | |
Fields
| |
data RunningAnim ty
Constructors
| RunningAnim | |
Fields
| |
newtype ReactT ty m a
Constructors
| ReactT | |
Fields
| |
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) |
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] -> EventHandler signal -> [ReactNode signal]
data EventProperties e
Constructors
| EventProperties | |
Fields
| |
Instances
| NFData e => NFData (EventProperties e) |
data ModifierKeys
Instances
data FocusEvent e
Constructors
| FocusEvent | |
Fields
| |
Instances
| NFData e => NFData (FocusEvent e) |