@nativescript/core 8.5.0-alpha.2 → 8.5.0-alpha.4
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/file-system/file-system-access.android.d.ts +13 -0
- package/file-system/file-system-access.android.js +141 -0
- 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/package.json +1 -1
- package/platforms/android/widgets-release.aar +0 -0
- package/ui/core/view/index.android.js +1 -22
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.ios.js +28 -12
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +4 -0
- package/ui/core/view/view-common.js +26 -12
- package/ui/core/view/view-common.js.map +1 -1
- 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/frame/fragment.transitions.d.ts +0 -4
- package/ui/frame/frame-common.d.ts +2 -2
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/index.android.js +2 -4
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.ios.js +58 -9
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/index.d.ts +3 -0
- package/ui/index.js +2 -0
- package/ui/index.js.map +1 -1
- package/ui/page/index.ios.d.ts +4 -1
- package/ui/page/index.ios.js +81 -56
- package/ui/page/index.ios.js.map +1 -1
- package/ui/styling/background.ios.js +3 -0
- package/ui/styling/background.ios.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 +0 -3
- package/ui/transition/index.android.js +0 -5
- package/ui/transition/index.android.js.map +1 -1
- package/ui/transition/index.d.ts +28 -9
- package/ui/transition/index.ios.d.ts +0 -3
- package/ui/transition/index.ios.js +0 -33
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.android.d.ts +3 -4
- package/ui/transition/modal-transition.android.js +4 -51
- package/ui/transition/modal-transition.android.js.map +1 -1
- package/ui/transition/modal-transition.ios.d.ts +11 -17
- package/ui/transition/modal-transition.ios.js +116 -206
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.android.d.ts +4 -4
- package/ui/transition/page-transition.android.js +44 -33
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.d.ts +26 -17
- package/ui/transition/page-transition.ios.js +169 -187
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.android.d.ts +4 -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 +9 -0
- package/ui/transition/shared-transition-helper.ios.js +429 -0
- package/ui/transition/shared-transition-helper.ios.js.map +1 -0
- package/ui/transition/shared-transition.d.ts +120 -13
- package/ui/transition/shared-transition.js +91 -11
- package/ui/transition/shared-transition.js.map +1 -1
- 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/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/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,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Transition
|
|
3
|
-
import { SharedTransition,
|
|
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';
|
|
4
6
|
export class ModalTransition extends Transition {
|
|
5
7
|
iosPresentedController(presented, presenting, source) {
|
|
6
8
|
this.transitionController = ModalTransitionController.initWithOwner(new WeakRef(this));
|
|
@@ -14,18 +16,119 @@ export class ModalTransition extends Transition {
|
|
|
14
16
|
return this.transitionController;
|
|
15
17
|
}
|
|
16
18
|
iosInteractionDismiss(animator) {
|
|
17
|
-
console.log('-- iosInteractionDismiss --');
|
|
18
|
-
|
|
19
|
+
// console.log('-- iosInteractionDismiss --');
|
|
20
|
+
this.interactiveController = PercentInteractiveController.initWithOwner(new WeakRef(this));
|
|
21
|
+
return this.interactiveController;
|
|
19
22
|
}
|
|
20
23
|
iosInteractionPresented(animator) {
|
|
21
|
-
console.log('-- iosInteractionPresented --');
|
|
24
|
+
// console.log('-- iosInteractionPresented --');
|
|
22
25
|
return null;
|
|
23
26
|
}
|
|
24
|
-
|
|
25
|
-
|
|
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
|
+
}
|
|
27
77
|
}
|
|
28
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));
|
|
29
132
|
var ModalTransitionController = /** @class */ (function (_super) {
|
|
30
133
|
__extends(ModalTransitionController, _super);
|
|
31
134
|
function ModalTransitionController() {
|
|
@@ -40,208 +143,15 @@ var ModalTransitionController = /** @class */ (function (_super) {
|
|
|
40
143
|
return DEFAULT_DURATION;
|
|
41
144
|
};
|
|
42
145
|
ModalTransitionController.prototype.animateTransition = function (transitionContext) {
|
|
43
|
-
|
|
44
|
-
// console.log('ModalTransitionController animateTransition:', animationType);
|
|
146
|
+
// console.log('ModalTransitionController animateTransition');
|
|
45
147
|
var owner = this.owner.deref();
|
|
46
148
|
if (owner) {
|
|
47
149
|
// console.log('owner.id:', owner.id);
|
|
48
|
-
var
|
|
49
|
-
if (!
|
|
150
|
+
var state = SharedTransition.getState(owner.id);
|
|
151
|
+
if (!state) {
|
|
50
152
|
return;
|
|
51
153
|
}
|
|
52
|
-
|
|
53
|
-
switch (state_1.activeType) {
|
|
54
|
-
case SharedTransitionAnimationType.present: {
|
|
55
|
-
console.log('-- Transition present --');
|
|
56
|
-
transitionContext.containerView.addSubview(owner.presented.view);
|
|
57
|
-
owner.presented.view.layoutIfNeeded();
|
|
58
|
-
var _q = SharedTransition.getSharedElements(state_1.page, state_1.toPage), sharedElements = _q.sharedElements, presented = _q.presented;
|
|
59
|
-
console.log(' ');
|
|
60
|
-
console.log("1. Found sharedTransitionTags to animate:", sharedElements.map(function (v) { return v.sharedTransitionTag; }));
|
|
61
|
-
console.log("2. Take snapshots of shared elements and position them based on presenting view:");
|
|
62
|
-
var _loop_1 = function (presentingView) {
|
|
63
|
-
if (!owner.sharedElements) {
|
|
64
|
-
owner.sharedElements = {
|
|
65
|
-
presented: [],
|
|
66
|
-
presenting: [],
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
var presentingSharedElement = presentingView.ios;
|
|
70
|
-
// console.log('fromTarget instanceof UIImageView:', fromTarget instanceof UIImageView)
|
|
71
|
-
// TODO: discuss whether we should check if UIImage/UIImageView type to always snapshot images or if other view types could be duped/added vs. snapshotted
|
|
72
|
-
// Note: snapshot may be most efficient/simple
|
|
73
|
-
// console.log('---> ', presentingView.sharedTransitionTag, ': ', presentingSharedElement)
|
|
74
|
-
var presentedView = presented.find(function (v) { return v.sharedTransitionTag === presentingView.sharedTransitionTag; });
|
|
75
|
-
var presentedSharedElement = presentedView.ios;
|
|
76
|
-
var sharedElementSnapshot = UIImageView.alloc().init(); // WithImage(snapshotView(presentedSharedElement));
|
|
77
|
-
// treat images differently...
|
|
78
|
-
if (presentedSharedElement instanceof UIImageView) {
|
|
79
|
-
// in case the image is loaded async, we need to update the snapshot when it changes
|
|
80
|
-
// todo: remove listener on transition end
|
|
81
|
-
presentedView.on('imageSourceChange', function () {
|
|
82
|
-
sharedElementSnapshot.image = iosSnapshotView(presentedSharedElement);
|
|
83
|
-
sharedElementSnapshot.tintColor = presentedSharedElement.tintColor;
|
|
84
|
-
});
|
|
85
|
-
sharedElementSnapshot.tintColor = presentedSharedElement.tintColor;
|
|
86
|
-
sharedElementSnapshot.contentMode = presentedSharedElement.contentMode;
|
|
87
|
-
}
|
|
88
|
-
iosMatchLayerProperties(sharedElementSnapshot, presentingSharedElement);
|
|
89
|
-
sharedElementSnapshot.clipsToBounds = true;
|
|
90
|
-
// console.log('---> snapshot: ', sharedElementSnapshot);
|
|
91
|
-
var startFrame = presentingSharedElement.convertRectToView(presentingSharedElement.bounds, transitionContext.containerView);
|
|
92
|
-
var endFrame = presentedSharedElement.convertRectToView(presentedSharedElement.bounds, transitionContext.containerView);
|
|
93
|
-
sharedElementSnapshot.frame = startFrame;
|
|
94
|
-
console.log('---> ', presentingView.sharedTransitionTag, ' frame:', iosPrintRect(sharedElementSnapshot.frame));
|
|
95
|
-
owner.sharedElements.presenting.push({
|
|
96
|
-
view: presentingView,
|
|
97
|
-
startFrame: startFrame,
|
|
98
|
-
endFrame: endFrame,
|
|
99
|
-
snapshot: sharedElementSnapshot,
|
|
100
|
-
startOpacity: presentingView.opacity,
|
|
101
|
-
endOpacity: presentedView.opacity,
|
|
102
|
-
});
|
|
103
|
-
owner.sharedElements.presented.push({
|
|
104
|
-
view: presentedView,
|
|
105
|
-
startFrame: endFrame,
|
|
106
|
-
endFrame: startFrame,
|
|
107
|
-
startOpacity: presentedView.opacity,
|
|
108
|
-
endOpacity: presentingView.opacity,
|
|
109
|
-
});
|
|
110
|
-
// set initial opacity to match the source view opacity
|
|
111
|
-
sharedElementSnapshot.alpha = presentingView.opacity;
|
|
112
|
-
// hide both while animating within the transition context
|
|
113
|
-
presentingView.opacity = 0;
|
|
114
|
-
presentedView.opacity = 0;
|
|
115
|
-
// add snapshot to animate
|
|
116
|
-
transitionContext.containerView.addSubview(sharedElementSnapshot);
|
|
117
|
-
};
|
|
118
|
-
for (var _i = 0, sharedElements_1 = sharedElements; _i < sharedElements_1.length; _i++) {
|
|
119
|
-
var presentingView = sharedElements_1[_i];
|
|
120
|
-
_loop_1(presentingView);
|
|
121
|
-
}
|
|
122
|
-
var cleanupPresent_1 = function () {
|
|
123
|
-
for (var _i = 0, _a = owner.sharedElements.presented; _i < _a.length; _i++) {
|
|
124
|
-
var presented_1 = _a[_i];
|
|
125
|
-
presented_1.view.opacity = presented_1.startOpacity;
|
|
126
|
-
}
|
|
127
|
-
// TODO: Discuss with Igor whether this is necessary
|
|
128
|
-
// potential this could help smooth some shared element transitions
|
|
129
|
-
UIView.animateWithDurationAnimationsCompletion(0, // Igor: disabled for now, we'll talk about this and decide
|
|
130
|
-
function () {
|
|
131
|
-
for (var _i = 0, _a = owner.sharedElements.presenting; _i < _a.length; _i++) {
|
|
132
|
-
var presenting = _a[_i];
|
|
133
|
-
presenting.snapshot.alpha = presenting.endOpacity;
|
|
134
|
-
}
|
|
135
|
-
}, function () {
|
|
136
|
-
for (var _i = 0, _a = owner.sharedElements.presenting; _i < _a.length; _i++) {
|
|
137
|
-
var presenting = _a[_i];
|
|
138
|
-
presenting.snapshot.removeFromSuperview();
|
|
139
|
-
}
|
|
140
|
-
SharedTransition.updateState(owner.id, {
|
|
141
|
-
activeType: SharedTransitionAnimationType.dismiss,
|
|
142
|
-
});
|
|
143
|
-
transitionContext.completeTransition(true);
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
var updateFramePresent_1 = function () {
|
|
147
|
-
// https://stackoverflow.com/a/27997678/1418981
|
|
148
|
-
// In order to have proper layout. Seems mostly needed when presenting.
|
|
149
|
-
// For instance during presentation, destination view doesn't account navigation bar height.
|
|
150
|
-
// Not sure if best to leave all the time?
|
|
151
|
-
// owner.presented.view.setNeedsLayout();
|
|
152
|
-
// owner.presented.view.layoutIfNeeded();
|
|
153
|
-
console.log('3. Animating shared elements:');
|
|
154
|
-
var _loop_2 = function (presented_2) {
|
|
155
|
-
var presentingMatch = owner.sharedElements.presenting.find(function (v) { return v.view.sharedTransitionTag === presented_2.view.sharedTransitionTag; });
|
|
156
|
-
// Workaround wrong origin due ongoing layout process.
|
|
157
|
-
var updatedEndFrame = presented_2.view.ios.convertRectToView(presented_2.view.ios.bounds, transitionContext.containerView);
|
|
158
|
-
var correctedEndFrame = CGRectMake(updatedEndFrame.origin.x, updatedEndFrame.origin.y, presentingMatch.endFrame.size.width, presentingMatch.endFrame.size.height);
|
|
159
|
-
presentingMatch.snapshot.frame = correctedEndFrame;
|
|
160
|
-
// apply view and layer properties to the snapshot view to match the source/presented view
|
|
161
|
-
iosMatchLayerProperties(presentingMatch.snapshot, presented_2.view.ios);
|
|
162
|
-
// create a snapshot of the presented view
|
|
163
|
-
presentingMatch.snapshot.image = iosSnapshotView(presented_2.view.ios);
|
|
164
|
-
// apply correct alpha
|
|
165
|
-
presentingMatch.snapshot.alpha = presentingMatch.endOpacity;
|
|
166
|
-
console.log("---> ".concat(presentingMatch.view.sharedTransitionTag, " animate to: "), iosPrintRect(correctedEndFrame));
|
|
167
|
-
};
|
|
168
|
-
for (var _i = 0, _a = owner.sharedElements.presented; _i < _a.length; _i++) {
|
|
169
|
-
var presented_2 = _a[_i];
|
|
170
|
-
_loop_2(presented_2);
|
|
171
|
-
}
|
|
172
|
-
console.log(' ');
|
|
173
|
-
};
|
|
174
|
-
// starting page properties
|
|
175
|
-
owner.presented.view.alpha = typeof ((_a = state_1.toPageStart) === null || _a === void 0 ? void 0 : _a.opacity) === 'number' ? (_b = state_1.toPageStart) === null || _b === void 0 ? void 0 : _b.opacity : 0;
|
|
176
|
-
var startX = typeof ((_c = state_1.toPageStart) === null || _c === void 0 ? void 0 : _c.x) === 'number' ? (_d = state_1.toPageStart) === null || _d === void 0 ? void 0 : _d.x : 0;
|
|
177
|
-
var startY = typeof ((_e = state_1.toPageStart) === null || _e === void 0 ? void 0 : _e.y) === 'number' ? (_f = state_1.toPageStart) === null || _f === void 0 ? void 0 : _f.y : Screen.mainScreen.heightDIPs;
|
|
178
|
-
var startWidth = typeof ((_g = state_1.toPageStart) === null || _g === void 0 ? void 0 : _g.width) === 'number' ? (_h = state_1.toPageStart) === null || _h === void 0 ? void 0 : _h.width : Screen.mainScreen.widthDIPs;
|
|
179
|
-
var startHeight = typeof ((_j = state_1.toPageStart) === null || _j === void 0 ? void 0 : _j.height) === 'number' ? (_k = state_1.toPageStart) === null || _k === void 0 ? void 0 : _k.height : Screen.mainScreen.heightDIPs;
|
|
180
|
-
owner.presented.view.frame = CGRectMake(startX, startY, startWidth, startHeight);
|
|
181
|
-
UIView.animateWithDurationDelayUsingSpringWithDampingInitialSpringVelocityOptionsAnimationsCompletion(typeof ((_l = state_1.toPageStart) === null || _l === void 0 ? void 0 : _l.duration) === 'number' ? ((_m = state_1.toPageStart) === null || _m === void 0 ? void 0 : _m.duration) / 1000 : DEFAULT_DURATION, 0, 0.5, 3, UIViewAnimationOptions.CurveEaseInOut, function () {
|
|
182
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
183
|
-
// animate page properties to the following:
|
|
184
|
-
owner.presented.view.alpha = typeof ((_a = state_1.toPageEnd) === null || _a === void 0 ? void 0 : _a.opacity) === 'number' ? (_b = state_1.toPageEnd) === null || _b === void 0 ? void 0 : _b.opacity : 1;
|
|
185
|
-
var endX = typeof ((_c = state_1.toPageEnd) === null || _c === void 0 ? void 0 : _c.x) === 'number' ? (_d = state_1.toPageEnd) === null || _d === void 0 ? void 0 : _d.x : 0;
|
|
186
|
-
var endY = typeof ((_e = state_1.toPageEnd) === null || _e === void 0 ? void 0 : _e.y) === 'number' ? (_f = state_1.toPageEnd) === null || _f === void 0 ? void 0 : _f.y : 0;
|
|
187
|
-
var endWidth = typeof ((_g = state_1.toPageEnd) === null || _g === void 0 ? void 0 : _g.width) === 'number' ? (_h = state_1.toPageEnd) === null || _h === void 0 ? void 0 : _h.width : Screen.mainScreen.widthDIPs;
|
|
188
|
-
var endHeight = typeof ((_j = state_1.toPageEnd) === null || _j === void 0 ? void 0 : _j.height) === 'number' ? (_k = state_1.toPageEnd) === null || _k === void 0 ? void 0 : _k.height : Screen.mainScreen.heightDIPs;
|
|
189
|
-
owner.presented.view.frame = CGRectMake(endX, endY, endWidth, endHeight);
|
|
190
|
-
updateFramePresent_1();
|
|
191
|
-
}, function () {
|
|
192
|
-
cleanupPresent_1();
|
|
193
|
-
});
|
|
194
|
-
break;
|
|
195
|
-
}
|
|
196
|
-
case SharedTransitionAnimationType.dismiss: {
|
|
197
|
-
console.log('-- Transition dismiss --');
|
|
198
|
-
// console.log('transitionContext.containerView.subviews.count:', transitionContext.containerView.subviews.count);
|
|
199
|
-
console.log(' ');
|
|
200
|
-
console.log("1. Dismiss sharedTransitionTags to animate:", owner.sharedElements.presented.map(function (p) { return p.view.sharedTransitionTag; }));
|
|
201
|
-
console.log("2. Add back previously stored sharedElements to dismiss:");
|
|
202
|
-
for (var _r = 0, _s = owner.sharedElements.presented; _r < _s.length; _r++) {
|
|
203
|
-
var p = _s[_r];
|
|
204
|
-
p.view.opacity = 0;
|
|
205
|
-
}
|
|
206
|
-
for (var _t = 0, _u = owner.sharedElements.presenting; _t < _u.length; _t++) {
|
|
207
|
-
var p = _u[_t];
|
|
208
|
-
p.snapshot.alpha = p.endOpacity;
|
|
209
|
-
transitionContext.containerView.addSubview(p.snapshot);
|
|
210
|
-
}
|
|
211
|
-
var cleanupDismiss_1 = function () {
|
|
212
|
-
for (var _i = 0, _a = owner.sharedElements.presenting; _i < _a.length; _i++) {
|
|
213
|
-
var presenting = _a[_i];
|
|
214
|
-
presenting.view.opacity = presenting.startOpacity;
|
|
215
|
-
}
|
|
216
|
-
SharedTransition.finishState(owner.id);
|
|
217
|
-
transitionContext.completeTransition(true);
|
|
218
|
-
};
|
|
219
|
-
var updateFrameDismiss_1 = function () {
|
|
220
|
-
console.log('3. Dismissing shared elements:');
|
|
221
|
-
for (var _i = 0, _a = owner.sharedElements.presenting; _i < _a.length; _i++) {
|
|
222
|
-
var presenting = _a[_i];
|
|
223
|
-
iosMatchLayerProperties(presenting.snapshot, presenting.view.ios);
|
|
224
|
-
presenting.snapshot.frame = presenting.startFrame;
|
|
225
|
-
presenting.snapshot.alpha = presenting.startOpacity;
|
|
226
|
-
console.log("---> ".concat(presenting.view.sharedTransitionTag, " animate to: "), iosPrintRect(presenting.startFrame));
|
|
227
|
-
}
|
|
228
|
-
console.log(' ');
|
|
229
|
-
};
|
|
230
|
-
UIView.animateWithDurationDelayUsingSpringWithDampingInitialSpringVelocityOptionsAnimationsCompletion(typeof ((_o = state_1.fromPageEnd) === null || _o === void 0 ? void 0 : _o.duration) === 'number' ? ((_p = state_1.fromPageEnd) === null || _p === void 0 ? void 0 : _p.duration) / 1000 : DEFAULT_DURATION, 0, 0.5, 3, UIViewAnimationOptions.CurveEaseInOut, function () {
|
|
231
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
232
|
-
owner.presented.view.alpha = typeof ((_a = state_1.fromPageEnd) === null || _a === void 0 ? void 0 : _a.opacity) === 'number' ? (_b = state_1.fromPageEnd) === null || _b === void 0 ? void 0 : _b.opacity : 0;
|
|
233
|
-
var endX = typeof ((_c = state_1.fromPageEnd) === null || _c === void 0 ? void 0 : _c.x) === 'number' ? (_d = state_1.fromPageEnd) === null || _d === void 0 ? void 0 : _d.x : 0;
|
|
234
|
-
var endY = typeof ((_e = state_1.fromPageEnd) === null || _e === void 0 ? void 0 : _e.y) === 'number' ? (_f = state_1.fromPageEnd) === null || _f === void 0 ? void 0 : _f.y : Screen.mainScreen.heightDIPs;
|
|
235
|
-
var endWidth = typeof ((_g = state_1.fromPageEnd) === null || _g === void 0 ? void 0 : _g.width) === 'number' ? (_h = state_1.fromPageEnd) === null || _h === void 0 ? void 0 : _h.width : Screen.mainScreen.widthDIPs;
|
|
236
|
-
var endHeight = typeof ((_j = state_1.fromPageEnd) === null || _j === void 0 ? void 0 : _j.height) === 'number' ? (_k = state_1.fromPageEnd) === null || _k === void 0 ? void 0 : _k.height : Screen.mainScreen.heightDIPs;
|
|
237
|
-
owner.presented.view.frame = CGRectMake(endX, endY, endWidth, endHeight);
|
|
238
|
-
updateFrameDismiss_1();
|
|
239
|
-
}, function () {
|
|
240
|
-
cleanupDismiss_1();
|
|
241
|
-
});
|
|
242
|
-
break;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
154
|
+
SharedTransitionHelper.animate(state, transitionContext, 'modal');
|
|
245
155
|
}
|
|
246
156
|
};
|
|
247
157
|
ModalTransitionController.ObjCProtocols = [UIViewControllerAnimatedTransitioning];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/modal-transition.ios.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modal-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/modal-transition.ios.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BackstackEntry } from '../frame';
|
|
2
|
-
import {
|
|
3
|
-
export declare class PageTransition extends
|
|
4
|
-
|
|
5
|
-
|
|
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
6
|
}
|
|
@@ -1,54 +1,65 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FadeTransition } from './fade-transition';
|
|
2
2
|
import { SharedTransition } from './shared-transition';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var CustomInterpolator = /** @class */ (function (_super) {
|
|
4
|
+
__extends(CustomInterpolator, _super);
|
|
5
|
+
function CustomInterpolator() {
|
|
6
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
CustomInterpolator.prototype.getInterpolation = function (input) {
|
|
9
|
+
// HACK: we speed up the interpolation by 10% to fix the issue with the transition not being finished
|
|
10
|
+
// and the views shifting from their intended final position...
|
|
11
|
+
// this is really just a hack and should be fixed properly once we
|
|
12
|
+
// can figure out the root cause of the issue.
|
|
13
|
+
var res = _super.prototype.getInterpolation.call(this, input) * 1.1;
|
|
14
|
+
if (res > 1) {
|
|
15
|
+
return float(1);
|
|
16
|
+
}
|
|
17
|
+
return float(res);
|
|
18
|
+
};
|
|
19
|
+
return CustomInterpolator;
|
|
20
|
+
}(android.view.animation.AnticipateOvershootInterpolator));
|
|
21
|
+
function setTransitionName(view) {
|
|
22
|
+
if (!view.sharedTransitionTag) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
androidx.core.view.ViewCompat.setTransitionName(view.nativeView, view.sharedTransitionTag);
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
// ignore
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export class PageTransition extends FadeTransition {
|
|
33
|
+
constructor(duration, curve) {
|
|
34
|
+
// disable custom curves until we can fix the issue with the animation not completing
|
|
35
|
+
if (curve) {
|
|
36
|
+
console.warn('PageTransition does not support custom curves at the moment. The passed in curve will be ignored.');
|
|
37
|
+
}
|
|
38
|
+
super(duration);
|
|
39
|
+
}
|
|
40
|
+
androidFragmentTransactionCallback(fragmentTransaction, currentEntry, newEntry) {
|
|
9
41
|
const fromPage = currentEntry.resolvedPage;
|
|
10
42
|
const toPage = newEntry.resolvedPage;
|
|
11
|
-
const currentFragment = currentEntry ? currentEntry.fragment : null;
|
|
12
43
|
const newFragment = newEntry.fragment;
|
|
13
|
-
const {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
presented.forEach((v) => {
|
|
17
|
-
console.log({
|
|
18
|
-
presentedSharedElements: true,
|
|
19
|
-
nativeView: !!v.nativeView,
|
|
20
|
-
sharedTransitionTag: v.sharedTransitionTag,
|
|
21
|
-
});
|
|
22
|
-
androidx.core.view.ViewCompat.setTransitionName(v.nativeView, v.sharedTransitionTag);
|
|
23
|
-
});
|
|
24
|
-
// setTimeout(() => {
|
|
44
|
+
const { presented, presenting } = SharedTransition.getSharedElements(fromPage, toPage);
|
|
45
|
+
toPage.once('loaded', () => {
|
|
46
|
+
presented.forEach(setTransitionName);
|
|
25
47
|
newFragment.startPostponedEnterTransition();
|
|
26
|
-
// }, 2000)
|
|
27
|
-
});
|
|
28
|
-
presenting.forEach((v) => {
|
|
29
|
-
console.log({
|
|
30
|
-
presentingSharedElements: true,
|
|
31
|
-
nativeView: !!v.nativeView,
|
|
32
|
-
sharedTransitionTag: v.sharedTransitionTag,
|
|
33
|
-
});
|
|
34
|
-
androidx.core.view.ViewCompat.setTransitionName(v.nativeView, v.sharedTransitionTag);
|
|
35
48
|
});
|
|
36
49
|
presenting.forEach((v) => {
|
|
50
|
+
setTransitionName(v);
|
|
37
51
|
fragmentTransaction.addSharedElement(v.nativeView, v.sharedTransitionTag);
|
|
38
52
|
});
|
|
39
53
|
fragmentTransaction.setReorderingAllowed(true);
|
|
40
54
|
const transitionSet = new androidx.transition.TransitionSet();
|
|
41
|
-
transitionSet.setDuration(
|
|
55
|
+
transitionSet.setDuration(this.getDuration());
|
|
42
56
|
transitionSet.addTransition(new androidx.transition.ChangeBounds());
|
|
43
57
|
transitionSet.addTransition(new androidx.transition.ChangeTransform());
|
|
44
|
-
|
|
58
|
+
transitionSet.setInterpolator(new CustomInterpolator());
|
|
45
59
|
// postpone enter until we call "loaded" on the new page
|
|
46
60
|
newFragment.postponeEnterTransition();
|
|
47
61
|
newFragment.setSharedElementEnterTransition(transitionSet);
|
|
48
62
|
newFragment.setSharedElementReturnTransition(transitionSet);
|
|
49
|
-
// newFragment.setSharedElementReturnTransition(new androidx.transition.ChangeBounds());
|
|
50
|
-
// currentFragment.setSharedElementEnterTransition(new androidx.transition.ChangeBounds());
|
|
51
|
-
// currentFragment.setSharedElementReturnTransition(new androidx.transition.ChangeBounds());
|
|
52
63
|
}
|
|
53
64
|
}
|
|
54
65
|
//# sourceMappingURL=page-transition.android.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-transition.android.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/page-transition.android.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"page-transition.android.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/page-transition.android.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;AAmBvD,SAAS,iBAAiB,CAAC,IAAc;IACxC,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE;QAC9B,OAAO;KACP;IACD,IAAI;QACH,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;KAC3F;IAAC,OAAO,GAAG,EAAE;QACb,SAAS;KACT;AACF,CAAC;AAED,MAAM,OAAO,cAAe,SAAQ,cAAc;IACjD,YAAY,QAAiB,EAAE,KAAW;QACzC,qFAAqF;QACrF,IAAI,KAAK,EAAE;YACV,OAAO,CAAC,IAAI,CAAC,mGAAmG,CAAC,CAAC;SAClH;QACD,KAAK,CAAC,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,kCAAkC,CAAC,mBAA8D,EAAE,YAA4B,EAAE,QAAwB;QACxJ,MAAM,QAAQ,GAAG,YAAY,CAAC,YAAY,CAAC;QAC3C,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC;QACrC,MAAM,WAAW,GAAmC,QAAQ,CAAC,QAAQ,CAAC;QAEtE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAEvF,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;YAC1B,SAAS,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;YACrC,WAAW,CAAC,6BAA6B,EAAE,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACxB,iBAAiB,CAAC,CAAC,CAAC,CAAC;YACrB,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,mBAAmB,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;QAEH,mBAAmB,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAE/C,MAAM,aAAa,GAAG,IAAI,QAAQ,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;QAC9D,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAC9C,aAAa,CAAC,aAAa,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;QACpE,aAAa,CAAC,aAAa,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC;QACvE,aAAa,CAAC,eAAe,CAAC,IAAI,kBAAkB,EAAE,CAAC,CAAC;QAExD,wDAAwD;QACxD,WAAW,CAAC,uBAAuB,EAAE,CAAC;QACtC,WAAW,CAAC,+BAA+B,CAAC,aAAa,CAAC,CAAC;QAC3D,WAAW,CAAC,gCAAgC,CAAC,aAAa,CAAC,CAAC;IAC7D,CAAC;CACD"}
|
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
import type { View } from '../core/view';
|
|
2
|
-
import { Transition } from '.';
|
|
2
|
+
import { SharedElementSettings, Transition } from '.';
|
|
3
3
|
export declare class PageTransition extends Transition {
|
|
4
|
+
transitionController: PageTransitionController;
|
|
5
|
+
interactiveController: UIPercentDrivenInteractiveTransition;
|
|
4
6
|
presented: UIViewController;
|
|
5
7
|
presenting: UIViewController;
|
|
8
|
+
navigationController: UINavigationController;
|
|
9
|
+
operation: number;
|
|
6
10
|
sharedElements: {
|
|
7
|
-
presented?: Array<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
snapshot?: UIImageView;
|
|
12
|
-
startOpacity?: number;
|
|
13
|
-
endOpacity?: number;
|
|
14
|
-
}>;
|
|
15
|
-
presenting?: Array<{
|
|
16
|
-
view: View;
|
|
17
|
-
startFrame: CGRect;
|
|
18
|
-
endFrame?: CGRect;
|
|
19
|
-
snapshot?: UIImageView;
|
|
20
|
-
startOpacity?: number;
|
|
21
|
-
endOpacity?: number;
|
|
11
|
+
presented?: Array<SharedElementSettings>;
|
|
12
|
+
presenting?: Array<SharedElementSettings>;
|
|
13
|
+
independent?: Array<SharedElementSettings & {
|
|
14
|
+
isPresented?: boolean;
|
|
22
15
|
}>;
|
|
23
16
|
};
|
|
24
|
-
|
|
17
|
+
private _interactiveStartCallback;
|
|
18
|
+
private _interactiveDismissGesture;
|
|
19
|
+
private _interactiveGestureTeardown;
|
|
20
|
+
iosNavigatedController(navigationController: UINavigationController, operation: number, fromVC: UIViewController, toVC: UIViewController): UIViewControllerAnimatedTransitioning;
|
|
21
|
+
iosInteractionDismiss(animator: UIViewControllerAnimatedTransitioning): UIViewControllerInteractiveTransitioning;
|
|
22
|
+
setupInteractiveGesture(startCallback: () => void, view: View): () => void;
|
|
23
|
+
private _interactiveDismissGestureHandler;
|
|
24
|
+
}
|
|
25
|
+
declare class PageTransitionController extends NSObject implements UIViewControllerAnimatedTransitioning {
|
|
26
|
+
static ObjCProtocols: {
|
|
27
|
+
prototype: UIViewControllerAnimatedTransitioning;
|
|
28
|
+
}[];
|
|
29
|
+
owner: WeakRef<PageTransition>;
|
|
30
|
+
static initWithOwner(owner: WeakRef<PageTransition>): PageTransitionController;
|
|
31
|
+
transitionDuration(transitionContext: UIViewControllerContextTransitioning): number;
|
|
32
|
+
animateTransition(transitionContext: UIViewControllerContextTransitioning): void;
|
|
25
33
|
}
|
|
34
|
+
export {};
|