@nativescript/core 8.5.0-alpha.0 → 8.5.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abortcontroller/abortsignal.js +5 -5
- package/abortcontroller/abortsignal.js.map +1 -1
- package/accessibility/accessibility-common.d.ts +1 -1
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/accessibility-properties.js +5 -13
- package/accessibility/accessibility-properties.js.map +1 -1
- package/accessibility/font-scale.android.js.map +1 -1
- package/accessibility/index.android.d.ts +2 -2
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.d.ts +1 -2
- package/accessibility/index.ios.d.ts +1 -2
- package/accessibility/index.ios.js.map +1 -1
- package/animation-frame/animation-native.ios.d.ts +1 -1
- package/application/application-common.d.ts +5 -4
- package/application/application-common.js +5 -5
- package/application/application-common.js.map +1 -1
- package/application/application-interfaces.d.ts +27 -5
- package/application/index.android.d.ts +12 -12
- package/application/index.android.js.map +1 -1
- package/application/index.d.ts +30 -35
- package/application/index.ios.d.ts +1 -0
- package/application/index.ios.js +23 -28
- package/application/index.ios.js.map +1 -1
- package/core-types/index.d.ts +10 -10
- package/css/CSS3Parser.d.ts +3 -3
- package/css/parser.d.ts +17 -17
- package/data/observable/index.d.ts +140 -165
- package/data/observable/index.js +102 -6
- package/data/observable/index.js.map +1 -1
- package/file-system/file-system-access.android.d.ts +13 -0
- package/file-system/file-system-access.android.js +149 -1
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.d.ts +12 -0
- package/file-system/file-system-access.ios.d.ts +7 -0
- package/file-system/file-system-access.ios.js +56 -0
- package/file-system/file-system-access.ios.js.map +1 -1
- package/fps-meter/fps-native.android.js.map +1 -1
- package/global-types.d.ts +94 -104
- package/globals/index.js.map +1 -1
- package/image-source/index.android.js +5 -5
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.ios.js +5 -5
- package/image-source/index.ios.js.map +1 -1
- package/index.d.ts +2 -0
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/platform/index.android.d.ts +2 -2
- package/platform/index.ios.d.ts +2 -2
- package/platforms/android/widgets-release.aar +0 -0
- package/profiling/index.js +1 -1
- package/profiling/index.js.map +1 -1
- package/ui/action-bar/action-bar-common.js +4 -4
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.d.ts +2 -2
- package/ui/animation/animation-interfaces.d.ts +4 -4
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/xml2ui.js +3 -3
- package/ui/builder/xml2ui.js.map +1 -1
- package/ui/button/index.d.ts +2 -2
- package/ui/core/properties/index.js +6 -6
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/view/index.android.d.ts +1 -1
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.ios.js +39 -23
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +5 -1
- package/ui/core/view/view-common.js +33 -12
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.d.ts +9 -9
- package/ui/core/view/view-helper/index.ios.d.ts +10 -0
- package/ui/core/view/view-helper/index.ios.js +99 -40
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view-base/index.d.ts +454 -532
- package/ui/core/view-base/index.js +168 -5
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/core/weak-event-listener/index.js.map +1 -1
- package/ui/dialogs/dialogs-common.js +1 -0
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/dialogs/index.android.js +7 -9
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/editable-text-base/editable-text-base-common.js +1 -2
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
- package/ui/editable-text-base/index.android.js +2 -7
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/frame/fragment.transitions.d.ts +0 -4
- package/ui/frame/frame-common.d.ts +8 -2
- package/ui/frame/frame-common.js +11 -2
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/index.android.d.ts +2 -1
- package/ui/frame/index.android.js +26 -10
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +3 -3
- package/ui/frame/index.ios.js +58 -8
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.js +5 -5
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/index.android.js +3 -3
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.d.ts +2 -2
- package/ui/gestures/index.ios.js +6 -6
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.d.ts +2 -2
- package/ui/image-cache/image-cache-common.d.ts +5 -5
- package/ui/image-cache/image-cache-common.js +2 -2
- package/ui/image-cache/image-cache-common.js.map +1 -1
- package/ui/image-cache/index.d.ts +3 -3
- package/ui/index.d.ts +8 -2
- package/ui/index.js +7 -2
- package/ui/index.js.map +1 -1
- package/ui/label/index.android.js +1 -0
- package/ui/label/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +12 -12
- package/ui/layouts/grid-layout/grid-layout-common.d.ts +1 -1
- package/ui/layouts/root-layout/root-layout-common.js +45 -36
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
- package/ui/list-view/index.d.ts +6 -6
- package/ui/list-view/list-view-common.js +8 -2
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/index.ios.d.ts +4 -1
- package/ui/page/index.ios.js +84 -58
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.d.ts +72 -39
- package/ui/placeholder/index.android.d.ts +2 -2
- package/ui/placeholder/index.d.ts +2 -2
- package/ui/repeater/index.js +2 -1
- package/ui/repeater/index.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.d.ts +4 -4
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.d.ts +3 -3
- package/ui/segmented-bar/index.d.ts +2 -2
- package/ui/segmented-bar/segmented-bar-common.d.ts +2 -2
- package/ui/styling/background.ios.js +3 -0
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/css-animation-parser.d.ts +12 -7
- package/ui/styling/css-animation-parser.js +90 -36
- package/ui/styling/css-animation-parser.js.map +1 -1
- package/ui/styling/css-selector.d.ts +1 -1
- package/ui/styling/css-utils.d.ts +1 -0
- package/ui/styling/css-utils.js +12 -0
- package/ui/styling/css-utils.js.map +1 -0
- package/ui/styling/font-common.js +6 -6
- package/ui/styling/font-common.js.map +1 -1
- package/ui/styling/font-interfaces.d.ts +3 -3
- package/ui/styling/font.ios.js +2 -1
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/style/index.d.ts +3 -0
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.js +5 -13
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.js +7 -5
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/tab-view/index.d.ts +2 -2
- package/ui/tab-view/tab-view-common.d.ts +2 -2
- package/ui/text-base/index.ios.js +21 -4
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/span.js.map +1 -1
- package/ui/transition/fade-transition.d.ts +1 -3
- package/ui/transition/fade-transition.ios.d.ts +14 -1
- package/ui/transition/fade-transition.ios.js +60 -26
- package/ui/transition/fade-transition.ios.js.map +1 -1
- package/ui/transition/index.android.d.ts +5 -5
- package/ui/transition/index.android.js +7 -6
- package/ui/transition/index.android.js.map +1 -1
- package/ui/transition/index.d.ts +38 -14
- package/ui/transition/index.ios.d.ts +5 -10
- package/ui/transition/index.ios.js +8 -22
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.android.d.ts +5 -0
- package/ui/transition/modal-transition.android.js +7 -0
- package/ui/transition/modal-transition.android.js.map +1 -0
- package/ui/transition/modal-transition.d.ts +2 -0
- package/ui/transition/modal-transition.ios.d.ts +34 -0
- package/ui/transition/modal-transition.ios.js +160 -0
- package/ui/transition/modal-transition.ios.js.map +1 -0
- package/ui/transition/page-transition.android.d.ts +6 -0
- package/ui/transition/page-transition.android.js +182 -0
- package/ui/transition/page-transition.android.js.map +1 -0
- package/ui/transition/page-transition.d.ts +2 -0
- package/ui/transition/page-transition.ios.d.ts +34 -0
- package/ui/transition/page-transition.ios.js +181 -0
- package/ui/transition/page-transition.ios.js.map +1 -0
- package/ui/transition/shared-transition-helper.android.d.ts +5 -0
- package/ui/transition/shared-transition-helper.android.js +6 -0
- package/ui/transition/shared-transition-helper.android.js.map +1 -0
- package/ui/transition/shared-transition-helper.d.ts +10 -0
- package/ui/transition/shared-transition-helper.ios.d.ts +14 -0
- package/ui/transition/shared-transition-helper.ios.js +471 -0
- package/ui/transition/shared-transition-helper.ios.js.map +1 -0
- package/ui/transition/shared-transition.d.ts +230 -0
- package/ui/transition/shared-transition.js +192 -0
- package/ui/transition/shared-transition.js.map +1 -0
- package/ui/transition/slide-transition.android.d.ts +1 -1
- package/ui/transition/slide-transition.android.js +1 -1
- package/ui/transition/slide-transition.android.js.map +1 -1
- package/ui/transition/slide-transition.d.ts +1 -1
- package/ui/transition/slide-transition.ios.d.ts +15 -2
- package/ui/transition/slide-transition.ios.js +86 -52
- package/ui/transition/slide-transition.ios.js.map +1 -1
- package/ui/web-view/index.d.ts +3 -3
- package/ui/web-view/web-view-interfaces.d.ts +1 -1
- package/utils/index.d.ts +0 -82
- package/utils/mainthread-helper.android.js +2 -2
- package/utils/mainthread-helper.android.js.map +1 -1
- package/utils/native-helper.d.ts +35 -0
- package/utils/native-helper.ios.d.ts +13 -0
- package/utils/native-helper.ios.js +73 -0
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/number-utils.d.ts +10 -0
- package/utils/number-utils.js +12 -0
- package/utils/number-utils.js.map +1 -1
- package/utils/typescript-utils.d.ts +6 -0
- package/xhr/index.js +28 -28
- package/xhr/index.js.map +1 -1
- package/xml/index.js.map +1 -1
- package/ui/frame/fragment.transitions.ios.d.ts +0 -2
- package/ui/frame/fragment.transitions.ios.js +0 -71
- package/ui/frame/fragment.transitions.ios.js.map +0 -1
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { Transition } from '.';
|
|
2
2
|
export declare class FadeTransition extends Transition {
|
|
3
|
-
|
|
3
|
+
transitionController: FadeTransitionController;
|
|
4
|
+
presented: UIViewController;
|
|
5
|
+
presenting: UIViewController;
|
|
6
|
+
operation: number;
|
|
7
|
+
iosNavigatedController(navigationController: UINavigationController, operation: number, fromVC: UIViewController, toVC: UIViewController): UIViewControllerAnimatedTransitioning;
|
|
8
|
+
}
|
|
9
|
+
export declare class FadeTransitionController extends NSObject implements UIViewControllerAnimatedTransitioning {
|
|
10
|
+
static ObjCProtocols: {
|
|
11
|
+
prototype: UIViewControllerAnimatedTransitioning;
|
|
12
|
+
}[];
|
|
13
|
+
owner: WeakRef<FadeTransition>;
|
|
14
|
+
static initWithOwner(owner: WeakRef<FadeTransition>): FadeTransitionController;
|
|
15
|
+
transitionDuration(transitionContext: UIViewControllerContextTransitioning): number;
|
|
16
|
+
animateTransition(transitionContext: UIViewControllerContextTransitioning): void;
|
|
4
17
|
}
|
|
@@ -1,31 +1,65 @@
|
|
|
1
1
|
import { Transition } from '.';
|
|
2
|
+
import { DEFAULT_DURATION } from './shared-transition';
|
|
2
3
|
export class FadeTransition extends Transition {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
switch (operation) {
|
|
11
|
-
case 1 /* UINavigationControllerOperation.Push */:
|
|
12
|
-
transitionContext.containerView.insertSubviewAboveSubview(toView, fromView);
|
|
13
|
-
break;
|
|
14
|
-
case 2 /* UINavigationControllerOperation.Pop */:
|
|
15
|
-
transitionContext.containerView.insertSubviewBelowSubview(toView, fromView);
|
|
16
|
-
break;
|
|
17
|
-
}
|
|
18
|
-
const duration = this.getDuration();
|
|
19
|
-
const curve = this.getCurve();
|
|
20
|
-
UIView.animateWithDurationAnimationsCompletion(duration, () => {
|
|
21
|
-
UIView.setAnimationCurve(curve);
|
|
22
|
-
toView.alpha = 1.0;
|
|
23
|
-
fromView.alpha = 0.0;
|
|
24
|
-
}, (finished) => {
|
|
25
|
-
toView.alpha = originalToViewAlpha;
|
|
26
|
-
fromView.alpha = originalFromViewAlpha;
|
|
27
|
-
transitionContext.completeTransition(finished);
|
|
28
|
-
});
|
|
4
|
+
iosNavigatedController(navigationController, operation, fromVC, toVC) {
|
|
5
|
+
this.transitionController = FadeTransitionController.initWithOwner(new WeakRef(this));
|
|
6
|
+
this.presented = toVC;
|
|
7
|
+
this.presenting = fromVC;
|
|
8
|
+
this.operation = operation;
|
|
9
|
+
// console.log('presenting:', this.presenting);
|
|
10
|
+
return this.transitionController;
|
|
29
11
|
}
|
|
30
12
|
}
|
|
13
|
+
var FadeTransitionController = /** @class */ (function (_super) {
|
|
14
|
+
__extends(FadeTransitionController, _super);
|
|
15
|
+
function FadeTransitionController() {
|
|
16
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
17
|
+
}
|
|
18
|
+
FadeTransitionController.initWithOwner = function (owner) {
|
|
19
|
+
var ctrl = FadeTransitionController.new();
|
|
20
|
+
ctrl.owner = owner;
|
|
21
|
+
return ctrl;
|
|
22
|
+
};
|
|
23
|
+
FadeTransitionController.prototype.transitionDuration = function (transitionContext) {
|
|
24
|
+
var owner = this.owner.deref();
|
|
25
|
+
if (owner) {
|
|
26
|
+
return owner.getDuration();
|
|
27
|
+
}
|
|
28
|
+
return DEFAULT_DURATION;
|
|
29
|
+
};
|
|
30
|
+
FadeTransitionController.prototype.animateTransition = function (transitionContext) {
|
|
31
|
+
var owner = this.owner.deref();
|
|
32
|
+
if (owner) {
|
|
33
|
+
// console.log('FadeTransitionController animateTransition:', owner.operation);
|
|
34
|
+
var toView_1 = owner.presented.view;
|
|
35
|
+
var originalToViewAlpha_1 = toView_1.alpha;
|
|
36
|
+
var fromView_1 = owner.presenting.view;
|
|
37
|
+
var originalFromViewAlpha_1 = fromView_1.alpha;
|
|
38
|
+
toView_1.alpha = 0.0;
|
|
39
|
+
fromView_1.alpha = 1.0;
|
|
40
|
+
switch (owner.operation) {
|
|
41
|
+
case UINavigationControllerOperation.Push:
|
|
42
|
+
transitionContext.containerView.insertSubviewAboveSubview(toView_1, fromView_1);
|
|
43
|
+
break;
|
|
44
|
+
case UINavigationControllerOperation.Pop:
|
|
45
|
+
transitionContext.containerView.insertSubviewBelowSubview(toView_1, fromView_1);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
var duration = owner.getDuration();
|
|
49
|
+
var curve_1 = owner.getCurve();
|
|
50
|
+
UIView.animateWithDurationAnimationsCompletion(duration, function () {
|
|
51
|
+
UIView.setAnimationCurve(curve_1);
|
|
52
|
+
toView_1.alpha = 1.0;
|
|
53
|
+
fromView_1.alpha = 0.0;
|
|
54
|
+
}, function (finished) {
|
|
55
|
+
toView_1.alpha = originalToViewAlpha_1;
|
|
56
|
+
fromView_1.alpha = originalFromViewAlpha_1;
|
|
57
|
+
transitionContext.completeTransition(finished);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
FadeTransitionController.ObjCProtocols = [UIViewControllerAnimatedTransitioning];
|
|
62
|
+
return FadeTransitionController;
|
|
63
|
+
}(NSObject));
|
|
64
|
+
export { FadeTransitionController };
|
|
31
65
|
//# sourceMappingURL=fade-transition.ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fade-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/fade-transition.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"fade-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/fade-transition.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,OAAO,cAAe,SAAQ,UAAU;IAM7C,sBAAsB,CAAC,oBAA4C,EAAE,SAAiB,EAAE,MAAwB,EAAE,IAAsB;QACvI,IAAI,CAAC,oBAAoB,GAAG,wBAAwB,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACtF,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,+CAA+C;QAC/C,OAAO,IAAI,CAAC,oBAAoB,CAAC;IAClC,CAAC;CACD"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Transition as TransitionType } from '.';
|
|
2
|
+
export declare class Transition implements TransitionType {
|
|
2
3
|
static AndroidTransitionType: {
|
|
3
4
|
enter: string;
|
|
4
5
|
exit: string;
|
|
5
6
|
popEnter: string;
|
|
6
7
|
popExit: string;
|
|
7
8
|
};
|
|
9
|
+
id: number;
|
|
8
10
|
private _duration;
|
|
9
11
|
private _interpolator;
|
|
10
|
-
|
|
11
|
-
constructor(duration: number, curve?: any);
|
|
12
|
+
constructor(duration?: number, curve?: any);
|
|
12
13
|
getDuration(): number;
|
|
14
|
+
setDuration(value: number): void;
|
|
13
15
|
getCurve(): android.view.animation.Interpolator;
|
|
14
16
|
animateIOSTransition(transitionContext: any, fromViewCtrl: any, toViewCtrl: any, operation: any): void;
|
|
15
17
|
createAndroidAnimator(transitionType: string): android.animation.Animator;
|
|
16
18
|
toString(): string;
|
|
17
19
|
}
|
|
18
|
-
export declare class CustomTransitionModal extends Transition {
|
|
19
|
-
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
// Types.
|
|
2
1
|
import { _resolveAnimationCurve } from '../animation';
|
|
3
2
|
import lazy from '../../utils/lazy';
|
|
4
3
|
const _defaultInterpolator = lazy(() => new android.view.animation.AccelerateDecelerateInterpolator());
|
|
5
4
|
let transitionId = 0;
|
|
6
5
|
export class Transition {
|
|
7
|
-
constructor(duration, curve) {
|
|
6
|
+
constructor(duration = 350, curve) {
|
|
8
7
|
this._duration = duration;
|
|
9
8
|
this._interpolator = curve ? _resolveAnimationCurve(curve) : _defaultInterpolator();
|
|
10
|
-
|
|
9
|
+
transitionId++;
|
|
10
|
+
this.id = transitionId;
|
|
11
11
|
}
|
|
12
12
|
getDuration() {
|
|
13
13
|
return this._duration;
|
|
14
14
|
}
|
|
15
|
+
setDuration(value) {
|
|
16
|
+
this._duration = value;
|
|
17
|
+
}
|
|
15
18
|
getCurve() {
|
|
16
19
|
return this._interpolator;
|
|
17
20
|
}
|
|
@@ -22,7 +25,7 @@ export class Transition {
|
|
|
22
25
|
throw new Error('Abstract method call');
|
|
23
26
|
}
|
|
24
27
|
toString() {
|
|
25
|
-
return `Transition@${this.
|
|
28
|
+
return `Transition@${this.id}`;
|
|
26
29
|
}
|
|
27
30
|
}
|
|
28
31
|
Transition.AndroidTransitionType = {
|
|
@@ -31,6 +34,4 @@ Transition.AndroidTransitionType = {
|
|
|
31
34
|
popEnter: 'popEnter',
|
|
32
35
|
popExit: 'popExit',
|
|
33
36
|
};
|
|
34
|
-
export class CustomTransitionModal extends Transition {
|
|
35
|
-
}
|
|
36
37
|
//# sourceMappingURL=index.android.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/index.android.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AAGpC,MAAM,oBAAoB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,OAAO,CAAC,IAAI,CA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export type SharedElementSettings = { view: View; startFrame: any; endFrame?: any; startOpacity?: number; endOpacity?: number; scale?: { x?: number; y?: number }; startTransform?: any; snapshot?: any };
|
|
4
|
+
export type TransitionNavigationType = 'page' | 'modal';
|
|
5
|
+
export interface TransitionInteractiveState {
|
|
6
|
+
started?: false;
|
|
7
|
+
added?: boolean;
|
|
8
|
+
transitionContext?: any;
|
|
9
|
+
propertyAnimator?: any;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
export declare class
|
|
12
|
-
|
|
12
|
+
export declare class Transition {
|
|
13
|
+
id: number;
|
|
14
|
+
transitionController?: any;
|
|
15
|
+
interactiveController?: any;
|
|
16
|
+
presented?: any;
|
|
17
|
+
presenting?: any;
|
|
18
|
+
sharedElements?: {
|
|
19
|
+
presented?: Array<SharedElementSettings>;
|
|
20
|
+
presenting?: Array<SharedElementSettings>;
|
|
21
|
+
// independent sharedTransitionTags which are part of the shared transition but only on one page
|
|
22
|
+
independent?: Array<SharedElementSettings & { isPresented?: boolean }>;
|
|
23
|
+
};
|
|
24
|
+
static AndroidTransitionType?: { enter?: string; exit?: string; popEnter?: string; popExit?: string };
|
|
25
|
+
constructor(duration?: number, nativeCurve?: any /* UIViewAnimationCurve | string | CubicBezierAnimationCurve | android.view.animation.Interpolator | android.view.animation.LinearInterpolator */);
|
|
26
|
+
getDuration(): number;
|
|
27
|
+
setDuration(value: number): void;
|
|
28
|
+
getCurve(): any;
|
|
29
|
+
animateIOSTransition(transitionContext: any /*UIViewControllerContextTransitioning */, fromViewCtrl: any /* UIViewController */, toViewCtrl: any /* UIViewController */, operation: any /* UINavigationControllerOperation */): void;
|
|
30
|
+
createAndroidAnimator(transitionType: string): any;
|
|
13
31
|
|
|
14
|
-
|
|
32
|
+
setupInteractiveGesture?(startCallback: () => void, view: View): void;
|
|
15
33
|
|
|
16
|
-
|
|
34
|
+
iosDismissedController?(dismissed: any /* UIViewController */): any /* UIViewControllerAnimatedTransitioning */;
|
|
17
35
|
|
|
18
|
-
|
|
36
|
+
iosPresentedController?(presented: any /* UIViewController */, presenting: any /* UIViewController */, source: any /* UIViewController */): any /* UIViewControllerAnimatedTransitioning */;
|
|
19
37
|
|
|
20
|
-
|
|
38
|
+
iosInteractionDismiss?(animator: any /* UIViewControllerAnimatedTransitioning */): any /* UIViewControllerInteractiveTransitioning */;
|
|
39
|
+
|
|
40
|
+
iosInteractionPresented?(animator: any /* UIViewControllerAnimatedTransitioning */): any /* UIViewControllerInteractiveTransitioning */;
|
|
41
|
+
|
|
42
|
+
iosNavigatedController?(navigationController: any /* UINavigationController */, operation: number, fromVC: any /* UIViewController */, toVC: any /* UIViewController */): any /* UIViewControllerAnimatedTransitioning */;
|
|
43
|
+
|
|
44
|
+
androidFragmentTransactionCallback?(fragmentTransaction: any /* androidx.fragment.app.FragmentTransaction */, currentEntry: BackstackEntry, newEntry: BackstackEntry): void;
|
|
21
45
|
}
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Transition as TransitionType } from '.';
|
|
2
|
+
export declare class Transition implements TransitionType {
|
|
2
3
|
static AndroidTransitionType: {};
|
|
4
|
+
id: number;
|
|
3
5
|
private _duration;
|
|
4
6
|
private _curve;
|
|
5
|
-
|
|
6
|
-
constructor(duration: number, curve?: UIViewAnimationCurve);
|
|
7
|
+
constructor(duration?: number, nativeCurve?: UIViewAnimationCurve);
|
|
7
8
|
getDuration(): number;
|
|
9
|
+
setDuration(value: number): void;
|
|
8
10
|
getCurve(): UIViewAnimationCurve;
|
|
9
11
|
animateIOSTransition(transitionContext: UIViewControllerContextTransitioning, fromViewCtrl: UIViewController, toViewCtrl: UIViewController, operation: UINavigationControllerOperation): void;
|
|
10
12
|
createAndroidAnimator(transitionType: string): any;
|
|
11
13
|
toString(): string;
|
|
12
14
|
}
|
|
13
|
-
export declare class CustomTransitionModal extends Transition {
|
|
14
|
-
dismissedController?(dismissed: UIViewController): UIViewControllerAnimatedTransitioning;
|
|
15
|
-
presentedController?(presented: UIViewController, presenting: UIViewController, source: UIViewController): UIViewControllerAnimatedTransitioning;
|
|
16
|
-
interactionDismiss?(animator: UIViewControllerAnimatedTransitioning): UIViewControllerInteractiveTransitioning;
|
|
17
|
-
interactionPresented?(animator: UIViewControllerAnimatedTransitioning): UIViewControllerInteractiveTransitioning;
|
|
18
|
-
presentedViewController?(presented: UIViewController, presenting: UIViewController, source: UIViewController): UIPresentationController;
|
|
19
|
-
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
let transitionId = 0;
|
|
2
2
|
export class Transition {
|
|
3
|
-
constructor(duration,
|
|
3
|
+
constructor(duration = 350, nativeCurve = 0 /* UIViewAnimationCurve.EaseInOut */) {
|
|
4
4
|
this._duration = duration ? duration / 1000 : 0.35;
|
|
5
|
-
this._curve =
|
|
6
|
-
|
|
5
|
+
this._curve = nativeCurve;
|
|
6
|
+
transitionId++;
|
|
7
|
+
this.id = transitionId;
|
|
7
8
|
}
|
|
8
9
|
getDuration() {
|
|
9
10
|
return this._duration;
|
|
10
11
|
}
|
|
12
|
+
setDuration(value) {
|
|
13
|
+
this._duration = value;
|
|
14
|
+
}
|
|
11
15
|
getCurve() {
|
|
12
16
|
return this._curve;
|
|
13
17
|
}
|
|
@@ -18,26 +22,8 @@ export class Transition {
|
|
|
18
22
|
throw new Error('Abstract method call');
|
|
19
23
|
}
|
|
20
24
|
toString() {
|
|
21
|
-
return `Transition@${this.
|
|
25
|
+
return `Transition@${this.id}`;
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
Transition.AndroidTransitionType = {};
|
|
25
|
-
export class CustomTransitionModal extends Transition {
|
|
26
|
-
// Extend this class to create your own
|
|
27
|
-
dismissedController(dismissed) {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
presentedController(presented, presenting, source) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
interactionDismiss(animator) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
interactionPresented(animator) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
presentedViewController(presented, presenting, source) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
29
|
//# sourceMappingURL=index.ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/index.ios.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/index.ios.ts"],"names":[],"mappings":"AAEA,IAAI,YAAY,GAAG,CAAC,CAAC;AACrB,MAAM,OAAO,UAAU;IAMtB,YAAY,WAAmB,GAAG,EAAE,oDAAkE;QACrG,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC;QAC1B,YAAY,EAAE,CAAC;QACf,IAAI,CAAC,EAAE,GAAG,YAAY,CAAC;IACxB,CAAC;IAEM,WAAW;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAEM,WAAW,CAAC,KAAa;QAC/B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACxB,CAAC;IAEM,QAAQ;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAEM,oBAAoB,CAAC,iBAAuD,EAAE,YAA8B,EAAE,UAA4B,EAAE,SAA0C;QAC5L,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACzC,CAAC;IAEM,qBAAqB,CAAC,cAAsB;QAClD,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACzC,CAAC;IAEM,QAAQ;QACd,OAAO,cAAc,IAAI,CAAC,EAAE,EAAE,CAAC;IAChC,CAAC;;AAlCM,gCAAqB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BackstackEntry } from '../frame';
|
|
2
|
+
import { FadeTransition } from './fade-transition';
|
|
3
|
+
export declare class ModalTransition extends FadeTransition {
|
|
4
|
+
androidFragmentTransactionCallback(fragmentTransaction: androidx.fragment.app.FragmentTransaction, currentEntry: BackstackEntry, newEntry: BackstackEntry): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FadeTransition } from './fade-transition';
|
|
2
|
+
export class ModalTransition extends FadeTransition {
|
|
3
|
+
androidFragmentTransactionCallback(fragmentTransaction, currentEntry, newEntry) {
|
|
4
|
+
console.log('Not currently supported on Android.');
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=modal-transition.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-transition.android.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/modal-transition.android.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,OAAO,eAAgB,SAAQ,cAAc;IAClD,kCAAkC,CAAC,mBAA8D,EAAE,YAA4B,EAAE,QAAwB;QACxJ,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;IACpD,CAAC;CACD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { View } from '../core/view';
|
|
2
|
+
import { Transition, SharedElementSettings } from '.';
|
|
3
|
+
export declare class ModalTransition extends Transition {
|
|
4
|
+
transitionController: ModalTransitionController;
|
|
5
|
+
interactiveController: UIPercentDrivenInteractiveTransition;
|
|
6
|
+
interactiveGestureRecognizer: UIScreenEdgePanGestureRecognizer;
|
|
7
|
+
presented: UIViewController;
|
|
8
|
+
presenting: UIViewController;
|
|
9
|
+
sharedElements: {
|
|
10
|
+
presented?: Array<SharedElementSettings>;
|
|
11
|
+
presenting?: Array<SharedElementSettings>;
|
|
12
|
+
independent?: Array<SharedElementSettings & {
|
|
13
|
+
isPresented?: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
16
|
+
private _interactiveStartCallback;
|
|
17
|
+
private _interactiveDismissGesture;
|
|
18
|
+
iosPresentedController(presented: UIViewController, presenting: UIViewController, source: UIViewController): UIViewControllerAnimatedTransitioning;
|
|
19
|
+
iosDismissedController(dismissed: UIViewController): UIViewControllerAnimatedTransitioning;
|
|
20
|
+
iosInteractionDismiss(animator: UIViewControllerAnimatedTransitioning): UIViewControllerInteractiveTransitioning;
|
|
21
|
+
iosInteractionPresented(animator: UIViewControllerAnimatedTransitioning): UIViewControllerInteractiveTransitioning;
|
|
22
|
+
setupInteractiveGesture(startCallback: () => void, view: View): void;
|
|
23
|
+
private _interactiveDismissGestureHandler;
|
|
24
|
+
}
|
|
25
|
+
declare class ModalTransitionController extends NSObject implements UIViewControllerAnimatedTransitioning {
|
|
26
|
+
static ObjCProtocols: {
|
|
27
|
+
prototype: UIViewControllerAnimatedTransitioning;
|
|
28
|
+
}[];
|
|
29
|
+
owner: WeakRef<ModalTransition>;
|
|
30
|
+
static initWithOwner(owner: WeakRef<ModalTransition>): ModalTransitionController;
|
|
31
|
+
transitionDuration(transitionContext: UIViewControllerContextTransitioning): number;
|
|
32
|
+
animateTransition(transitionContext: UIViewControllerContextTransitioning): void;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { isNumber } from '../../utils/types';
|
|
2
|
+
import { Transition } from '.';
|
|
3
|
+
import { SharedTransition, DEFAULT_DURATION } from './shared-transition';
|
|
4
|
+
import { SharedTransitionHelper } from './shared-transition-helper';
|
|
5
|
+
import { GestureStateTypes } from '../gestures';
|
|
6
|
+
export class ModalTransition extends Transition {
|
|
7
|
+
iosPresentedController(presented, presenting, source) {
|
|
8
|
+
this.transitionController = ModalTransitionController.initWithOwner(new WeakRef(this));
|
|
9
|
+
this.presented = presented;
|
|
10
|
+
// console.log('presenting:', presenting)
|
|
11
|
+
return this.transitionController;
|
|
12
|
+
}
|
|
13
|
+
iosDismissedController(dismissed) {
|
|
14
|
+
this.transitionController = ModalTransitionController.initWithOwner(new WeakRef(this));
|
|
15
|
+
this.presented = dismissed;
|
|
16
|
+
return this.transitionController;
|
|
17
|
+
}
|
|
18
|
+
iosInteractionDismiss(animator) {
|
|
19
|
+
// console.log('-- iosInteractionDismiss --');
|
|
20
|
+
this.interactiveController = PercentInteractiveController.initWithOwner(new WeakRef(this));
|
|
21
|
+
return this.interactiveController;
|
|
22
|
+
}
|
|
23
|
+
iosInteractionPresented(animator) {
|
|
24
|
+
// console.log('-- iosInteractionPresented --');
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
setupInteractiveGesture(startCallback, view) {
|
|
28
|
+
this._interactiveStartCallback = startCallback;
|
|
29
|
+
this._interactiveDismissGesture = this._interactiveDismissGestureHandler.bind(this);
|
|
30
|
+
view.on('pan', this._interactiveDismissGesture);
|
|
31
|
+
// this.interactiveGestureRecognizer = UIScreenEdgePanGestureRecognizer.alloc().initWithTargetAction()
|
|
32
|
+
// let edgeSwipeGestureRecognizer = UIScreenEdgePanGestureRecognizer(target: self, action: #selector(handleSwipe(_:)))
|
|
33
|
+
// edgeSwipeGestureRecognizer.edges = .left
|
|
34
|
+
// view.addGestureRecognizer(edgeSwipeGestureRecognizer)
|
|
35
|
+
}
|
|
36
|
+
_interactiveDismissGestureHandler(args) {
|
|
37
|
+
if (args?.ios?.view) {
|
|
38
|
+
const state = SharedTransition.getState(this.id);
|
|
39
|
+
const percent = state.interactive?.dismiss?.percentFormula ? state.interactive.dismiss.percentFormula(args) : args.deltaY / (args.ios.view.bounds.size.height / 2);
|
|
40
|
+
if (SharedTransition.DEBUG) {
|
|
41
|
+
console.log('Interactive dismissal percentage:', percent);
|
|
42
|
+
}
|
|
43
|
+
switch (args.state) {
|
|
44
|
+
case GestureStateTypes.began:
|
|
45
|
+
SharedTransition.updateState(this.id, {
|
|
46
|
+
interactiveBegan: true,
|
|
47
|
+
interactiveCancelled: false,
|
|
48
|
+
});
|
|
49
|
+
if (this._interactiveStartCallback) {
|
|
50
|
+
this._interactiveStartCallback();
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
case GestureStateTypes.changed:
|
|
54
|
+
if (percent < 1) {
|
|
55
|
+
if (this.interactiveController) {
|
|
56
|
+
this.interactiveController.updateInteractiveTransition(percent);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
60
|
+
case GestureStateTypes.cancelled:
|
|
61
|
+
case GestureStateTypes.ended:
|
|
62
|
+
if (this.interactiveController) {
|
|
63
|
+
const finishThreshold = isNumber(state.interactive?.dismiss?.finishThreshold) ? state.interactive.dismiss.finishThreshold : 0.5;
|
|
64
|
+
if (percent > finishThreshold) {
|
|
65
|
+
this.interactiveController.finishInteractiveTransition();
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
SharedTransition.updateState(this.id, {
|
|
69
|
+
interactiveCancelled: true,
|
|
70
|
+
});
|
|
71
|
+
this.interactiveController.cancelInteractiveTransition();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
var PercentInteractiveController = /** @class */ (function (_super) {
|
|
80
|
+
__extends(PercentInteractiveController, _super);
|
|
81
|
+
function PercentInteractiveController() {
|
|
82
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
83
|
+
}
|
|
84
|
+
PercentInteractiveController.initWithOwner = function (owner) {
|
|
85
|
+
var ctrl = PercentInteractiveController.new();
|
|
86
|
+
ctrl.owner = owner;
|
|
87
|
+
return ctrl;
|
|
88
|
+
};
|
|
89
|
+
PercentInteractiveController.prototype.startInteractiveTransition = function (transitionContext) {
|
|
90
|
+
var _a;
|
|
91
|
+
// console.log('startInteractiveTransition');
|
|
92
|
+
if (!this.interactiveState) {
|
|
93
|
+
this.interactiveState = {
|
|
94
|
+
transitionContext: transitionContext,
|
|
95
|
+
};
|
|
96
|
+
var owner = (_a = this.owner) === null || _a === void 0 ? void 0 : _a.deref();
|
|
97
|
+
if (owner) {
|
|
98
|
+
var state = SharedTransition.getState(owner.id);
|
|
99
|
+
SharedTransitionHelper.interactiveStart(state, this.interactiveState, 'modal');
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
PercentInteractiveController.prototype.updateInteractiveTransition = function (percentComplete) {
|
|
104
|
+
var _a;
|
|
105
|
+
var owner = (_a = this.owner) === null || _a === void 0 ? void 0 : _a.deref();
|
|
106
|
+
if (owner) {
|
|
107
|
+
var state = SharedTransition.getState(owner.id);
|
|
108
|
+
SharedTransitionHelper.interactiveUpdate(state, this.interactiveState, 'modal', percentComplete);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
PercentInteractiveController.prototype.cancelInteractiveTransition = function () {
|
|
112
|
+
var _a;
|
|
113
|
+
// console.log('cancelInteractiveTransition');
|
|
114
|
+
var owner = (_a = this.owner) === null || _a === void 0 ? void 0 : _a.deref();
|
|
115
|
+
if (owner) {
|
|
116
|
+
var state = SharedTransition.getState(owner.id);
|
|
117
|
+
SharedTransitionHelper.interactiveCancel(state, this.interactiveState, 'modal');
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
PercentInteractiveController.prototype.finishInteractiveTransition = function () {
|
|
121
|
+
var _a;
|
|
122
|
+
// console.log('finishInteractiveTransition');
|
|
123
|
+
var owner = (_a = this.owner) === null || _a === void 0 ? void 0 : _a.deref();
|
|
124
|
+
if (owner) {
|
|
125
|
+
var state = SharedTransition.getState(owner.id);
|
|
126
|
+
SharedTransitionHelper.interactiveFinish(state, this.interactiveState, 'modal');
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
PercentInteractiveController.ObjCProtocols = [UIViewControllerInteractiveTransitioning];
|
|
130
|
+
return PercentInteractiveController;
|
|
131
|
+
}(UIPercentDrivenInteractiveTransition));
|
|
132
|
+
var ModalTransitionController = /** @class */ (function (_super) {
|
|
133
|
+
__extends(ModalTransitionController, _super);
|
|
134
|
+
function ModalTransitionController() {
|
|
135
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
136
|
+
}
|
|
137
|
+
ModalTransitionController.initWithOwner = function (owner) {
|
|
138
|
+
var ctrl = ModalTransitionController.new();
|
|
139
|
+
ctrl.owner = owner;
|
|
140
|
+
return ctrl;
|
|
141
|
+
};
|
|
142
|
+
ModalTransitionController.prototype.transitionDuration = function (transitionContext) {
|
|
143
|
+
return DEFAULT_DURATION;
|
|
144
|
+
};
|
|
145
|
+
ModalTransitionController.prototype.animateTransition = function (transitionContext) {
|
|
146
|
+
// console.log('ModalTransitionController animateTransition');
|
|
147
|
+
var owner = this.owner.deref();
|
|
148
|
+
if (owner) {
|
|
149
|
+
// console.log('owner.id:', owner.id);
|
|
150
|
+
var state = SharedTransition.getState(owner.id);
|
|
151
|
+
if (!state) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
SharedTransitionHelper.animate(state, transitionContext, 'modal');
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
ModalTransitionController.ObjCProtocols = [UIViewControllerAnimatedTransitioning];
|
|
158
|
+
return ModalTransitionController;
|
|
159
|
+
}(NSObject));
|
|
160
|
+
//# sourceMappingURL=modal-transition.ios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/modal-transition.ios.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAqD,MAAM,GAAG,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAuB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEr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I,IAAI,OAAO,GAAG,eAAe,EAAE;4BAC9B,IAAI,CAAC,qBAAqB,CAAC,2BAA2B,EAAE,CAAC;yBACzD;6BAAM;4BACN,gBAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE;gCACrC,oBAAoB,EAAE,IAAI;6BAC1B,CAAC,CAAC;4BACH,IAAI,CAAC,qBAAqB,CAAC,2BAA2B,EAAE,CAAC;yBACzD;qBACD;oBACD,MAAM;aACP;SACD;IACF,CAAC;CACD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BackstackEntry } from '../frame';
|
|
2
|
+
import { FadeTransition } from './fade-transition';
|
|
3
|
+
export declare class PageTransition extends FadeTransition {
|
|
4
|
+
constructor(duration?: number, curve?: any);
|
|
5
|
+
androidFragmentTransactionCallback(fragmentTransaction: androidx.fragment.app.FragmentTransaction, currentEntry: BackstackEntry, newEntry: BackstackEntry): void;
|
|
6
|
+
}
|