0 | module Web.Internal.AnimationTypes
11 | namespace AnimationPlayState
14 | data AnimationPlayState = Idle | Running | Paused | Finished
17 | Show AnimationPlayState where
19 | show Running = "running"
20 | show Paused = "paused"
21 | show Finished = "finished"
24 | Eq AnimationPlayState where
25 | (==) = (==) `on` show
28 | Ord AnimationPlayState where
29 | compare = compare `on` show
32 | read : String -> Maybe AnimationPlayState
33 | read "idle" = Just Idle
34 | read "running" = Just Running
35 | read "paused" = Just Paused
36 | read "finished" = Just Finished
40 | ToFFI AnimationPlayState String where
44 | FromFFI AnimationPlayState String where
51 | data FillMode = None | Forwards | Backwards | Both | Auto
56 | show Forwards = "forwards"
57 | show Backwards = "backwards"
63 | (==) = (==) `on` show
67 | compare = compare `on` show
70 | read : String -> Maybe FillMode
71 | read "none" = Just None
72 | read "forwards" = Just Forwards
73 | read "backwards" = Just Backwards
74 | read "both" = Just Both
75 | read "auto" = Just Auto
79 | ToFFI FillMode String where
83 | FromFFI FillMode String where
87 | namespace PlaybackDirection
90 | data PlaybackDirection = Normal | Reverse | Alternate | AlternateReverse
93 | Show PlaybackDirection where
94 | show Normal = "normal"
95 | show Reverse = "reverse"
96 | show Alternate = "alternate"
97 | show AlternateReverse = "alternate-reverse"
100 | Eq PlaybackDirection where
101 | (==) = (==) `on` show
104 | Ord PlaybackDirection where
105 | compare = compare `on` show
108 | read : String -> Maybe PlaybackDirection
109 | read "normal" = Just Normal
110 | read "reverse" = Just Reverse
111 | read "alternate" = Just Alternate
112 | read "alternate-reverse" = Just AlternateReverse
116 | ToFFI PlaybackDirection String where
120 | FromFFI PlaybackDirection String where
124 | namespace IterationCompositeOperation
127 | data IterationCompositeOperation = Replace | Accumulate
130 | Show IterationCompositeOperation where
131 | show Replace = "replace"
132 | show Accumulate = "accumulate"
135 | Eq IterationCompositeOperation where
136 | (==) = (==) `on` show
139 | Ord IterationCompositeOperation where
140 | compare = compare `on` show
143 | read : String -> Maybe IterationCompositeOperation
144 | read "replace" = Just Replace
145 | read "accumulate" = Just Accumulate
149 | ToFFI IterationCompositeOperation String where
153 | FromFFI IterationCompositeOperation String where
157 | namespace CompositeOperation
160 | data CompositeOperation = Replace | Add | Accumulate
163 | Show CompositeOperation where
164 | show Replace = "replace"
166 | show Accumulate = "accumulate"
169 | Eq CompositeOperation where
170 | (==) = (==) `on` show
173 | Ord CompositeOperation where
174 | compare = compare `on` show
177 | read : String -> Maybe CompositeOperation
178 | read "replace" = Just Replace
179 | read "add" = Just Add
180 | read "accumulate" = Just Accumulate
184 | ToFFI CompositeOperation String where
188 | FromFFI CompositeOperation String where
192 | namespace CompositeOperationOrAuto
195 | data CompositeOperationOrAuto = Replace | Add | Accumulate | Auto
198 | Show CompositeOperationOrAuto where
199 | show Replace = "replace"
201 | show Accumulate = "accumulate"
205 | Eq CompositeOperationOrAuto where
206 | (==) = (==) `on` show
209 | Ord CompositeOperationOrAuto where
210 | compare = compare `on` show
213 | read : String -> Maybe CompositeOperationOrAuto
214 | read "replace" = Just Replace
215 | read "add" = Just Add
216 | read "accumulate" = Just Accumulate
217 | read "auto" = Just Auto
221 | ToFFI CompositeOperationOrAuto String where
225 | FromFFI CompositeOperationOrAuto String where
234 | export data Animation : Type where [external]
237 | ToFFI Animation Animation where toFFI = id
240 | FromFFI Animation Animation where fromFFI = Just
243 | SafeCast Animation where
244 | safeCast = unsafeCastOnPrototypeName "Animation"
246 | export data AnimationEffect : Type where [external]
249 | ToFFI AnimationEffect AnimationEffect where toFFI = id
252 | FromFFI AnimationEffect AnimationEffect where fromFFI = Just
255 | SafeCast AnimationEffect where
256 | safeCast = unsafeCastOnPrototypeName "AnimationEffect"
258 | export data AnimationPlaybackEvent : Type where [external]
261 | ToFFI AnimationPlaybackEvent AnimationPlaybackEvent where toFFI = id
264 | FromFFI AnimationPlaybackEvent AnimationPlaybackEvent where fromFFI = Just
267 | SafeCast AnimationPlaybackEvent where
268 | safeCast = unsafeCastOnPrototypeName "AnimationPlaybackEvent"
270 | export data AnimationTimeline : Type where [external]
273 | ToFFI AnimationTimeline AnimationTimeline where toFFI = id
276 | FromFFI AnimationTimeline AnimationTimeline where fromFFI = Just
279 | SafeCast AnimationTimeline where
280 | safeCast = unsafeCastOnPrototypeName "AnimationTimeline"
282 | export data DocumentTimeline : Type where [external]
285 | ToFFI DocumentTimeline DocumentTimeline where toFFI = id
288 | FromFFI DocumentTimeline DocumentTimeline where fromFFI = Just
291 | SafeCast DocumentTimeline where
292 | safeCast = unsafeCastOnPrototypeName "DocumentTimeline"
294 | export data KeyframeEffect : Type where [external]
297 | ToFFI KeyframeEffect KeyframeEffect where toFFI = id
300 | FromFFI KeyframeEffect KeyframeEffect where fromFFI = Just
303 | SafeCast KeyframeEffect where
304 | safeCast = unsafeCastOnPrototypeName "KeyframeEffect"
311 | export data AnimationPlaybackEventInit : Type where [external]
314 | ToFFI AnimationPlaybackEventInit AnimationPlaybackEventInit where toFFI = id
317 | FromFFI AnimationPlaybackEventInit AnimationPlaybackEventInit where fromFFI = Just
319 | export data BaseComputedKeyframe : Type where [external]
322 | ToFFI BaseComputedKeyframe BaseComputedKeyframe where toFFI = id
325 | FromFFI BaseComputedKeyframe BaseComputedKeyframe where fromFFI = Just
327 | export data BaseKeyframe : Type where [external]
330 | ToFFI BaseKeyframe BaseKeyframe where toFFI = id
333 | FromFFI BaseKeyframe BaseKeyframe where fromFFI = Just
335 | export data BasePropertyIndexedKeyframe : Type where [external]
338 | ToFFI BasePropertyIndexedKeyframe BasePropertyIndexedKeyframe where toFFI = id
341 | FromFFI BasePropertyIndexedKeyframe BasePropertyIndexedKeyframe where fromFFI = Just
343 | export data ComputedEffectTiming : Type where [external]
346 | ToFFI ComputedEffectTiming ComputedEffectTiming where toFFI = id
349 | FromFFI ComputedEffectTiming ComputedEffectTiming where fromFFI = Just
351 | export data DocumentTimelineOptions : Type where [external]
354 | ToFFI DocumentTimelineOptions DocumentTimelineOptions where toFFI = id
357 | FromFFI DocumentTimelineOptions DocumentTimelineOptions where fromFFI = Just
359 | export data EffectTiming : Type where [external]
362 | ToFFI EffectTiming EffectTiming where toFFI = id
365 | FromFFI EffectTiming EffectTiming where fromFFI = Just
367 | export data KeyframeAnimationOptions : Type where [external]
370 | ToFFI KeyframeAnimationOptions KeyframeAnimationOptions where toFFI = id
373 | FromFFI KeyframeAnimationOptions KeyframeAnimationOptions where fromFFI = Just
375 | export data KeyframeEffectOptions : Type where [external]
378 | ToFFI KeyframeEffectOptions KeyframeEffectOptions where toFFI = id
381 | FromFFI KeyframeEffectOptions KeyframeEffectOptions where fromFFI = Just
383 | export data OptionalEffectTiming : Type where [external]
386 | ToFFI OptionalEffectTiming OptionalEffectTiming where toFFI = id
389 | FromFFI OptionalEffectTiming OptionalEffectTiming where fromFFI = Just
396 | export data Animatable : Type where [external]
399 | ToFFI Animatable Animatable where toFFI = id
402 | FromFFI Animatable Animatable where fromFFI = Just