Skip to content

Commit 3bc05d2

Browse files
committed
[wip] add react-strict-animated library
Note: still working on the build/package structure so not quite ready for review yet This introduces a new package to the RSD repo that provides a subset of React Native's API that works on both web and native, and built with integration of react-strict-dom in mind. The native implementation is largely a thin passthrough to the proper Animated API and some settings pre-configured (such as `useAnimatedDriver` always being enabled). The web side is a new Animated implementation that ends up being driven by the Web Animations API.
1 parent 86a8033 commit 3bc05d2

35 files changed

+3308
-221
lines changed

flow-typed/environments/web-animations.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ type DocumentTimelineOptions = {|
6767
|};
6868

6969
type EffectTiming = {|
70+
delay: number,
7071
direction: PlaybackDirection,
72+
duration: number | string,
7173
easing: string,
7274
fill: FillMode,
7375
iterations: number,
@@ -81,14 +83,14 @@ type GetAnimationsOptions = {|
8183

8284
type KeyframeAnimationOptions = {|
8385
...KeyframeEffectOptions,
84-
id: string,
85-
timeline: AnimationTimeline | null,
86+
id?: string,
87+
timeline?: AnimationTimeline | null,
8688
|};
8789

8890
type KeyframeEffectOptions = {|
89-
...EffectTiming,
90-
composite: CompositeOperation,
91-
pseudoElement: string | null,
91+
...Partial<EffectTiming>,
92+
composite?: CompositeOperation,
93+
pseudoElement?: string | null,
9294
|};
9395

9496
type Keyframe = {

0 commit comments

Comments
 (0)