@nativescript/core 8.9.3-next-06-26-2025-15909826459 → 8.9.3-next-06-28-2025-15947264752
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nativescript/core",
|
|
3
|
-
"version": "8.9.3-next-06-
|
|
3
|
+
"version": "8.9.3-next-06-28-2025-15947264752",
|
|
4
4
|
"description": "A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.",
|
|
5
5
|
"main": "index",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -2,6 +2,7 @@ import { Color } from '../../../color';
|
|
|
2
2
|
import { RootLayoutBase, defaultShadeCoverOptions } from './root-layout-common';
|
|
3
3
|
import { parseLinearGradient } from '../../../css/parser';
|
|
4
4
|
import { LinearGradient } from '../../styling/linear-gradient';
|
|
5
|
+
import { layout } from '../../../utils';
|
|
5
6
|
export * from './root-layout-common';
|
|
6
7
|
export class RootLayout extends RootLayoutBase {
|
|
7
8
|
insertChild(view, atIndex) {
|
|
@@ -30,11 +31,19 @@ export class RootLayout extends RootLayoutBase {
|
|
|
30
31
|
view.nativeViewProtected.bringToFront();
|
|
31
32
|
}
|
|
32
33
|
_initShadeCover(view, shadeOptions) {
|
|
33
|
-
const
|
|
34
|
+
const options = {
|
|
34
35
|
...defaultShadeCoverOptions.animation.enterFrom,
|
|
35
36
|
...shadeOptions?.animation?.enterFrom,
|
|
36
37
|
};
|
|
37
|
-
|
|
38
|
+
const nativeView = view?.nativeViewProtected;
|
|
39
|
+
if (nativeView) {
|
|
40
|
+
nativeView.setAlpha(options.opacity);
|
|
41
|
+
nativeView.setScaleX(float(options.scaleX));
|
|
42
|
+
nativeView.setScaleY(float(options.scaleY));
|
|
43
|
+
nativeView.setTranslationX(layout.toDevicePixels(options.translateX));
|
|
44
|
+
nativeView.setTranslationY(layout.toDevicePixels(options.translateY));
|
|
45
|
+
nativeView.setRotation(float(options.rotate));
|
|
46
|
+
}
|
|
38
47
|
}
|
|
39
48
|
_updateShadeCover(view, shadeOptions) {
|
|
40
49
|
const options = {
|
|
@@ -42,6 +51,19 @@ export class RootLayout extends RootLayoutBase {
|
|
|
42
51
|
...shadeOptions,
|
|
43
52
|
};
|
|
44
53
|
const duration = options.animation?.enterFrom?.duration || defaultShadeCoverOptions.animation.enterFrom.duration;
|
|
54
|
+
const isBackgroundGradient = options.color && options.color.startsWith('linear-gradient');
|
|
55
|
+
if (isBackgroundGradient) {
|
|
56
|
+
if (view.backgroundColor) {
|
|
57
|
+
view.backgroundColor = undefined;
|
|
58
|
+
}
|
|
59
|
+
const parsedGradient = parseLinearGradient(options.color);
|
|
60
|
+
view.backgroundImage = LinearGradient.parse(parsedGradient.value);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
if (view.backgroundImage) {
|
|
64
|
+
view.backgroundImage = undefined;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
45
67
|
return this._playAnimation(this._getAnimationSet(view, {
|
|
46
68
|
translateX: 0,
|
|
47
69
|
translateY: 0,
|
|
@@ -49,7 +71,7 @@ export class RootLayout extends RootLayoutBase {
|
|
|
49
71
|
scaleY: 1,
|
|
50
72
|
rotate: 0,
|
|
51
73
|
opacity: options.opacity,
|
|
52
|
-
}, options.color), duration);
|
|
74
|
+
}, isBackgroundGradient ? null : options.color), duration);
|
|
53
75
|
}
|
|
54
76
|
_closeShadeCover(view, shadeOptions) {
|
|
55
77
|
const exitState = {
|
|
@@ -58,26 +80,15 @@ export class RootLayout extends RootLayoutBase {
|
|
|
58
80
|
};
|
|
59
81
|
return this._playAnimation(this._getAnimationSet(view, exitState), exitState?.duration);
|
|
60
82
|
}
|
|
61
|
-
_getAnimationSet(view, shadeCoverAnimation, backgroundColor
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
animationSet[
|
|
65
|
-
animationSet[1] = android.animation.ObjectAnimator.ofFloat(view.nativeViewProtected, 'translationY', [shadeCoverAnimation.translateY]);
|
|
83
|
+
_getAnimationSet(view, shadeCoverAnimation, backgroundColor) {
|
|
84
|
+
const animationSet = Array.create(android.animation.Animator, backgroundColor ? 7 : 6);
|
|
85
|
+
animationSet[0] = android.animation.ObjectAnimator.ofFloat(view.nativeViewProtected, 'translationX', [layout.toDevicePixels(shadeCoverAnimation.translateX)]);
|
|
86
|
+
animationSet[1] = android.animation.ObjectAnimator.ofFloat(view.nativeViewProtected, 'translationY', [layout.toDevicePixels(shadeCoverAnimation.translateY)]);
|
|
66
87
|
animationSet[2] = android.animation.ObjectAnimator.ofFloat(view.nativeViewProtected, 'scaleX', [shadeCoverAnimation.scaleX]);
|
|
67
88
|
animationSet[3] = android.animation.ObjectAnimator.ofFloat(view.nativeViewProtected, 'scaleY', [shadeCoverAnimation.scaleY]);
|
|
68
89
|
animationSet[4] = android.animation.ObjectAnimator.ofFloat(view.nativeViewProtected, 'rotation', [shadeCoverAnimation.rotate]);
|
|
69
90
|
animationSet[5] = android.animation.ObjectAnimator.ofFloat(view.nativeViewProtected, 'alpha', [shadeCoverAnimation.opacity]);
|
|
70
|
-
if (
|
|
71
|
-
if (view.backgroundColor) {
|
|
72
|
-
view.backgroundColor = undefined;
|
|
73
|
-
}
|
|
74
|
-
const parsedGradient = parseLinearGradient(backgroundColor);
|
|
75
|
-
view.backgroundImage = LinearGradient.parse(parsedGradient.value);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
if (view.backgroundImage) {
|
|
79
|
-
view.backgroundImage = undefined;
|
|
80
|
-
}
|
|
91
|
+
if (backgroundColor) {
|
|
81
92
|
animationSet[6] = this._getBackgroundColorAnimator(view, backgroundColor);
|
|
82
93
|
}
|
|
83
94
|
return animationSet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../../../../packages/core/ui/layouts/root-layout/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../../../../packages/core/ui/layouts/root-layout/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,cAAc,sBAAsB,CAAC;AAErC,MAAM,OAAO,UAAW,SAAQ,cAAc;IAC7C,WAAW,CAAC,IAAU,EAAE,OAAe;QACtC,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC;YACtC,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,CAAC;gBACjC,gEAAgE;gBAChE,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;oBAC9B,IAAI,CAAC,mBAAmB,CAAC,kBAAkB,CAC1C,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC;wBACrC,OAAO,EAAE,UAAU,IAAI,EAAE,KAAK;4BAC7B,OAAO,IAAI,CAAC;wBACb,CAAC;qBACD,CAAC,CACF,CAAC;gBACH,CAAC;YACF,CAAC;YACD,OAAO,IAAI,CAAC;QACb,CAAC;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IACD,WAAW,CAAC,IAAU;QACrB,IAAI,IAAI,CAAC,mBAAmB,EAAE,IAAI,IAAI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