|
@@ -672,7 +672,11 @@ export interface OptionsAnimationPropertyConfig {
|
672
|
672
|
interpolation?: 'accelerate' | 'decelerate';
|
673
|
673
|
}
|
674
|
674
|
|
675
|
|
-export interface OptionsAnimationProperties {
|
|
675
|
+/**
|
|
676
|
+ * Used to animate the actual content added to the hierarchy.
|
|
677
|
+ * Content can be a React component (component) or any other layout (Stack, BottomTabs etc)
|
|
678
|
+ */
|
|
679
|
+export interface ScreenAnimationOptions {
|
676
|
680
|
/**
|
677
|
681
|
* Animate the element over translateX
|
678
|
682
|
*/
|
|
@@ -735,31 +739,19 @@ export interface IconInsets {
|
735
|
739
|
right?: number;
|
736
|
740
|
}
|
737
|
741
|
|
738
|
|
-export interface OptionsAnimationPropertiesId extends OptionsAnimationProperties {
|
|
742
|
+export interface ViewAnimationOptions extends ScreenAnimationOptions {
|
739
|
743
|
/**
|
740
|
744
|
* ID of the Top Bar we want to animate
|
741
|
745
|
*/
|
742
|
746
|
id?: string;
|
743
|
747
|
}
|
744
|
748
|
|
745
|
|
-export interface OptionsAnimationSeparate {
|
|
749
|
+/**
|
|
750
|
+ * Used for describing stack commands animations.
|
|
751
|
+ */
|
|
752
|
+export interface StackAnimationOptions {
|
746
|
753
|
/**
|
747
|
754
|
* Wait for the View to render before start animation
|
748
|
|
- * Example:
|
749
|
|
- ```js
|
750
|
|
- animations: {
|
751
|
|
- push: {
|
752
|
|
- waitForRender: true
|
753
|
|
- },
|
754
|
|
- showModal: {
|
755
|
|
- waitForRender: true
|
756
|
|
- },
|
757
|
|
- setRoot: {
|
758
|
|
- waitForRender: true
|
759
|
|
- }
|
760
|
|
- }
|
761
|
|
- }
|
762
|
|
- ```
|
763
|
755
|
*/
|
764
|
756
|
waitForRender?: boolean;
|
765
|
757
|
/**
|
|
@@ -770,38 +762,41 @@ export interface OptionsAnimationSeparate {
|
770
|
762
|
/**
|
771
|
763
|
* Configure animations for the top bar
|
772
|
764
|
*/
|
773
|
|
- topBar?: OptionsAnimationPropertiesId;
|
|
765
|
+ topBar?: ViewAnimationOptions;
|
774
|
766
|
/**
|
775
|
767
|
* Configure animations for the bottom tabs
|
776
|
768
|
*/
|
777
|
|
- bottomTabs?: OptionsAnimationPropertiesId;
|
|
769
|
+ bottomTabs?: ViewAnimationOptions;
|
778
|
770
|
/**
|
779
|
771
|
* Configure animations for the content (Screen)
|
780
|
772
|
*/
|
781
|
|
- content?: OptionsAnimationPropertiesId;
|
|
773
|
+ content?: ViewAnimationOptions;
|
782
|
774
|
}
|
783
|
775
|
|
784
|
|
-export interface OptionsAnimations {
|
|
776
|
+/**
|
|
777
|
+ * Used for configuring command animations
|
|
778
|
+ */
|
|
779
|
+export interface AnimationOptions {
|
785
|
780
|
/**
|
786
|
781
|
* Configure the setRoot animation
|
787
|
782
|
*/
|
788
|
|
- setRoot?: OptionsAnimationProperties;
|
|
783
|
+ setRoot?: ScreenAnimationOptions;
|
789
|
784
|
/**
|
790
|
785
|
* Configure what animates when a screen is pushed
|
791
|
786
|
*/
|
792
|
|
- push?: OptionsAnimationSeparate;
|
|
787
|
+ push?: StackAnimationOptions;
|
793
|
788
|
/**
|
794
|
789
|
* Configure what animates when a screen is popped
|
795
|
790
|
*/
|
796
|
|
- pop?: OptionsAnimationSeparate;
|
|
791
|
+ pop?: StackAnimationOptions;
|
797
|
792
|
/**
|
798
|
793
|
* Configure what animates when modal is shown
|
799
|
794
|
*/
|
800
|
|
- showModal?: OptionsAnimationProperties;
|
|
795
|
+ showModal?: ScreenAnimationOptions;
|
801
|
796
|
/**
|
802
|
797
|
* Configure what animates when modal is dismissed
|
803
|
798
|
*/
|
804
|
|
- dismissModal?: OptionsAnimationProperties;
|
|
799
|
+ dismissModal?: ScreenAnimationOptions;
|
805
|
800
|
}
|
806
|
801
|
|
807
|
802
|
export interface OptionsCustomTransition {
|
|
@@ -906,7 +901,7 @@ setRoot: {
|
906
|
901
|
}
|
907
|
902
|
```
|
908
|
903
|
*/
|
909
|
|
- animations?: OptionsAnimations;
|
|
904
|
+ animations?: AnimationOptions;
|
910
|
905
|
|
911
|
906
|
/**
|
912
|
907
|
* Custom Transition used for animate shared element between two screens
|