@nativescript/core 8.5.0-alpha.2 → 8.5.0-alpha.3

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.
Files changed (77) hide show
  1. package/file-system/file-system-access.android.d.ts +13 -0
  2. package/file-system/file-system-access.android.js +141 -0
  3. package/file-system/file-system-access.android.js.map +1 -1
  4. package/file-system/file-system-access.d.ts +12 -0
  5. package/file-system/file-system-access.ios.d.ts +7 -0
  6. package/file-system/file-system-access.ios.js +56 -0
  7. package/file-system/file-system-access.ios.js.map +1 -1
  8. package/package.json +1 -1
  9. package/platforms/android/widgets-release.aar +0 -0
  10. package/ui/core/view/index.android.js +1 -22
  11. package/ui/core/view/index.android.js.map +1 -1
  12. package/ui/core/view/index.ios.js +28 -12
  13. package/ui/core/view/index.ios.js.map +1 -1
  14. package/ui/core/view/view-common.d.ts +4 -0
  15. package/ui/core/view/view-common.js +26 -12
  16. package/ui/core/view/view-common.js.map +1 -1
  17. package/ui/core/view/view-helper/index.ios.d.ts +10 -0
  18. package/ui/core/view/view-helper/index.ios.js +99 -40
  19. package/ui/core/view/view-helper/index.ios.js.map +1 -1
  20. package/ui/frame/fragment.transitions.d.ts +0 -4
  21. package/ui/frame/frame-common.d.ts +2 -2
  22. package/ui/frame/frame-common.js.map +1 -1
  23. package/ui/frame/index.android.js +2 -4
  24. package/ui/frame/index.android.js.map +1 -1
  25. package/ui/frame/index.ios.js +58 -9
  26. package/ui/frame/index.ios.js.map +1 -1
  27. package/ui/index.d.ts +2 -0
  28. package/ui/index.js +2 -0
  29. package/ui/index.js.map +1 -1
  30. package/ui/page/index.ios.d.ts +4 -1
  31. package/ui/page/index.ios.js +81 -56
  32. package/ui/page/index.ios.js.map +1 -1
  33. package/ui/styling/background.ios.js +3 -0
  34. package/ui/styling/background.ios.js.map +1 -1
  35. package/ui/transition/fade-transition.d.ts +1 -3
  36. package/ui/transition/fade-transition.ios.d.ts +14 -1
  37. package/ui/transition/fade-transition.ios.js +60 -26
  38. package/ui/transition/fade-transition.ios.js.map +1 -1
  39. package/ui/transition/index.android.d.ts +0 -3
  40. package/ui/transition/index.android.js +0 -5
  41. package/ui/transition/index.android.js.map +1 -1
  42. package/ui/transition/index.d.ts +9 -9
  43. package/ui/transition/index.ios.d.ts +0 -3
  44. package/ui/transition/index.ios.js +0 -33
  45. package/ui/transition/index.ios.js.map +1 -1
  46. package/ui/transition/modal-transition.android.d.ts +3 -4
  47. package/ui/transition/modal-transition.android.js +4 -51
  48. package/ui/transition/modal-transition.android.js.map +1 -1
  49. package/ui/transition/modal-transition.ios.d.ts +6 -1
  50. package/ui/transition/modal-transition.ios.js +287 -79
  51. package/ui/transition/modal-transition.ios.js.map +1 -1
  52. package/ui/transition/page-transition.android.d.ts +4 -4
  53. package/ui/transition/page-transition.android.js +44 -33
  54. package/ui/transition/page-transition.android.js.map +1 -1
  55. package/ui/transition/page-transition.ios.d.ts +21 -1
  56. package/ui/transition/page-transition.ios.js +471 -181
  57. package/ui/transition/page-transition.ios.js.map +1 -1
  58. package/ui/transition/shared-transition.d.ts +80 -7
  59. package/ui/transition/shared-transition.js +37 -8
  60. package/ui/transition/shared-transition.js.map +1 -1
  61. package/ui/transition/slide-transition.android.d.ts +1 -1
  62. package/ui/transition/slide-transition.android.js +1 -1
  63. package/ui/transition/slide-transition.android.js.map +1 -1
  64. package/ui/transition/slide-transition.d.ts +1 -1
  65. package/ui/transition/slide-transition.ios.d.ts +15 -2
  66. package/ui/transition/slide-transition.ios.js +86 -52
  67. package/ui/transition/slide-transition.ios.js.map +1 -1
  68. package/utils/native-helper.d.ts +35 -0
  69. package/utils/native-helper.ios.d.ts +13 -0
  70. package/utils/native-helper.ios.js +73 -0
  71. package/utils/native-helper.ios.js.map +1 -1
  72. package/utils/number-utils.d.ts +10 -0
  73. package/utils/number-utils.js +12 -0
  74. package/utils/number-utils.js.map +1 -1
  75. package/ui/frame/fragment.transitions.ios.d.ts +0 -2
  76. package/ui/frame/fragment.transitions.ios.js +0 -71
  77. package/ui/frame/fragment.transitions.ios.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"page-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/page-transition.ios.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAExG,MAAM,OAAO,cAAe,SAAQ,UAAU;IAQ7C,oBAAoB,CAAC,iBAAuD,EAAE,YAA8B,EAAE,UAA4B,EAAE,SAA0C;QACrL,OAAO,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;QAC9D,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;QAE3C,sCAAsC;QACtC,MAAM,KAAK,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,EAAE;YACX,OAAO;SACP;QACD,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QACnD,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;QACrC,8BAA8B;QAC9B,QAAQ,SAAS,EAAE;YAClB,iDAAyC,CAAC,CAAC;gBAC1C,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC;gBAC5B,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;gBAExD,mEAAmE;gBACnE,iBAAiB,CAAC,aAAa,CAAC,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,YAAY,CAAC,IA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KAAK,CAAC,WAAW,EAAE,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC;oBACvH,MAAM,SAAS,GAAG,OAAO,KAAK,CAAC,WAAW,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC;oBAC3H,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;oBAExE,kBAAkB,EAAE,CAAC;gBACtB,CAAC,EACD,GAAG,EAAE;oBACJ,cAAc,EAAE,CAAC;gBAClB,CAAC,CACD,CAAC;gBACF,MAAM;aACN;SACD;IACF,CAAC;CACD"}
1
+ {"version":3,"file":"page-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/page-transition.ios.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAuB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAExH,MAAM,OAAO,cAAe,SAAQ,UAAU;IAe7C,sBAAsB,CAAC,oBAA4C,EAAE,SAAiB,EAAE,MAAwB,EAAE,IAAsB;QACvI,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;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,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC;wBAChI,IAAI,OAAO,GAAG,eAAe,EAAE;4BAC9B,IAAI,IAAI,CAAC,2BAA2B,EAAE;gCACrC,IAAI,CAAC,2BAA2B,EAAE,CAAC;gCACnC,IAAI,CAAC,2BAA2B,GAAG,IAAI,CAAC;6BACxC;4BACD,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"}
@@ -1,20 +1,50 @@
1
1
  import type { Transition } from '.';
2
2
  import { ViewBase } from '../core/view-base';
3
3
  import type { View } from '../core/view';
4
+ import type { PanGestureEventData } from '../gestures';
4
5
  export declare const DEFAULT_DURATION = 0.35;
6
+ export declare const DEFAULT_SPRING: {
7
+ tension: number;
8
+ friction: number;
9
+ };
5
10
  export declare enum SharedTransitionAnimationType {
6
11
  present = 0,
7
12
  dismiss = 1
8
13
  }
14
+ export interface SharedTransitionInteractiveOptions {
15
+ /**
16
+ * When the pan exceeds this percentage and you let go, finish the transition.
17
+ * Default 0.5
18
+ */
19
+ finishThreshold?: number;
20
+ /**
21
+ * You can create your own percent formula used for determing the interactive value.
22
+ * By default, we handle this via a formula like this for an interactive page back transition:
23
+ * - return eventData.deltaX / (eventData.ios.view.bounds.size.width / 2);
24
+ * @param eventData PanGestureEventData
25
+ * @returns The percentage value to be used as the finish/cancel threshold
26
+ */
27
+ percentFormula?: (eventData: PanGestureEventData) => number;
28
+ }
9
29
  export interface SharedTransitionConfig {
10
30
  /**
11
- * Page which will start the transition
31
+ * Page which will start the transition.
12
32
  */
13
33
  page?: ViewBase;
14
34
  /**
15
- * Preconfigured transition or your own custom configured one
35
+ * Preconfigured transition or your own custom configured one.
16
36
  */
17
37
  instance?: Transition;
38
+ /**
39
+ * Interactive transition settings. (iOS only at the moment)
40
+ */
41
+ interactive?: {
42
+ /**
43
+ * Whether you want to allow interactive dismissal.
44
+ * Defaults to using 'pan' gesture for dismissal however you can customize your own.
45
+ */
46
+ dismiss?: SharedTransitionInteractiveOptions;
47
+ };
18
48
  /**
19
49
  * View settings to start your transition.
20
50
  */
@@ -31,6 +61,8 @@ export interface SharedTransitionConfig {
31
61
  export interface SharedTransitionState extends SharedTransitionConfig {
32
62
  activeType?: SharedTransitionAnimationType;
33
63
  toPage?: ViewBase;
64
+ interactiveBegan?: boolean;
65
+ interactiveCancelled?: boolean;
34
66
  }
35
67
  type SharedTransitionPageProperties = {
36
68
  x?: number;
@@ -39,23 +71,64 @@ type SharedTransitionPageProperties = {
39
71
  height?: number;
40
72
  opacity?: number;
41
73
  /**
42
- * Duration in milliseconds
74
+ * Linear duration in milliseconds
75
+ * Note: When this is defined, it will override spring options and use only linear animation.
43
76
  */
44
77
  duration?: number;
78
+ /**
79
+ * Spring animation settings.
80
+ * Defaults to 140 tension with 10 friction.
81
+ */
82
+ spring?: {
83
+ tension?: number;
84
+ friction?: number;
85
+ mass?: number;
86
+ delay?: number;
87
+ velocity?: number;
88
+ animateOptions?: any;
89
+ };
45
90
  };
46
91
  /**
47
- * Shared Element Transitions (experimental)
48
- *
49
- * Note: some APIs may change in future releases
92
+ * Shared Element Transitions (preview)
93
+ * Allows you to auto animate between shared elements on two different screesn to create smooth navigational experiences.
94
+ * View components can define sharedTransitionTag="name" alone with a transition through this API.
50
95
  */
51
96
  export declare class SharedTransition {
52
- static custom(instance: Transition, options: SharedTransitionConfig): {
97
+ /**
98
+ * Configure a custom transition with presentation/dismissal options.
99
+ * @param transition The custom Transition instance.
100
+ * @param options
101
+ * @returns a configured SharedTransition instance for use with navigational APIs.
102
+ */
103
+ static custom(transition: Transition, options?: SharedTransitionConfig): {
53
104
  instance: Transition;
54
105
  };
106
+ /**
107
+ * Enable to see various console logging output of Shared Element Transition behavior.
108
+ */
109
+ static DEBUG: boolean;
110
+ /**
111
+ * @private
112
+ */
55
113
  static currentStack: Array<SharedTransitionState>;
114
+ /**
115
+ * @private
116
+ */
56
117
  static updateState(id: number, state: SharedTransitionState): void;
118
+ /**
119
+ * @private
120
+ */
57
121
  static getState(id: number): SharedTransitionState;
122
+ /**
123
+ * @private
124
+ */
58
125
  static finishState(id: number): void;
126
+ /**
127
+ * Gather view collections based on sharedTransitionTag details.
128
+ * @param fromPage Page moving away from
129
+ * @param toPage Page moving to
130
+ * @returns Collections of views pertaining to shared elements or particular pages
131
+ */
59
132
  static getSharedElements(fromPage: ViewBase, toPage: ViewBase): {
60
133
  sharedElements: Array<View>;
61
134
  presented: Array<View>;
@@ -1,5 +1,9 @@
1
1
  import { querySelectorAll } from '../core/view-base';
2
2
  export const DEFAULT_DURATION = 0.35;
3
+ export const DEFAULT_SPRING = {
4
+ tension: 140,
5
+ friction: 10,
6
+ };
3
7
  // always increment when adding new transitions to be able to track their state
4
8
  export var SharedTransitionAnimationType;
5
9
  (function (SharedTransitionAnimationType) {
@@ -7,19 +11,28 @@ export var SharedTransitionAnimationType;
7
11
  SharedTransitionAnimationType[SharedTransitionAnimationType["dismiss"] = 1] = "dismiss";
8
12
  })(SharedTransitionAnimationType || (SharedTransitionAnimationType = {}));
9
13
  /**
10
- * Shared Element Transitions (experimental)
11
- *
12
- * Note: some APIs may change in future releases
14
+ * Shared Element Transitions (preview)
15
+ * Allows you to auto animate between shared elements on two different screesn to create smooth navigational experiences.
16
+ * View components can define sharedTransitionTag="name" alone with a transition through this API.
13
17
  */
14
18
  export class SharedTransition {
15
- static custom(instance, options) {
16
- SharedTransition.updateState(instance.id, {
17
- ...options,
18
- instance,
19
+ /**
20
+ * Configure a custom transition with presentation/dismissal options.
21
+ * @param transition The custom Transition instance.
22
+ * @param options
23
+ * @returns a configured SharedTransition instance for use with navigational APIs.
24
+ */
25
+ static custom(transition, options) {
26
+ SharedTransition.updateState(transition.id, {
27
+ ...(options || {}),
28
+ instance: transition,
19
29
  activeType: SharedTransitionAnimationType.present,
20
30
  });
21
- return { instance };
31
+ return { instance: transition };
22
32
  }
33
+ /**
34
+ * @private
35
+ */
23
36
  static updateState(id, state) {
24
37
  if (!SharedTransition.currentStack) {
25
38
  SharedTransition.currentStack = [];
@@ -36,15 +49,27 @@ export class SharedTransition {
36
49
  SharedTransition.currentStack.push(state);
37
50
  }
38
51
  }
52
+ /**
53
+ * @private
54
+ */
39
55
  static getState(id) {
40
56
  return SharedTransition.currentStack.find((t) => t.instance.id === id);
41
57
  }
58
+ /**
59
+ * @private
60
+ */
42
61
  static finishState(id) {
43
62
  const index = SharedTransition.currentStack.findIndex((t) => t.instance.id === id);
44
63
  if (index > -1) {
45
64
  SharedTransition.currentStack.splice(index, 1);
46
65
  }
47
66
  }
67
+ /**
68
+ * Gather view collections based on sharedTransitionTag details.
69
+ * @param fromPage Page moving away from
70
+ * @param toPage Page moving to
71
+ * @returns Collections of views pertaining to shared elements or particular pages
72
+ */
48
73
  static getSharedElements(fromPage, toPage) {
49
74
  // 1. Presented view: gather all sharedTransitionTag views
50
75
  const presentedSharedElements = querySelectorAll(toPage, 'sharedTransitionTag');
@@ -61,4 +86,8 @@ export class SharedTransition {
61
86
  };
62
87
  }
63
88
  }
89
+ /**
90
+ * Enable to see various console logging output of Shared Element Transition behavior.
91
+ */
92
+ SharedTransition.DEBUG = false;
64
93
  //# sourceMappingURL=shared-transition.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared-transition.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/shared-transition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAY,MAAM,mBAAmB,CAAC;AAG/D,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AACrC,+EAA+E;AAC/E,MAAM,CAAN,IAAY,6BAGX;AAHD,WAAY,6BAA6B;IACxC,uFAAO,CAAA;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AAC,EAAE;YACf,gBAAgB,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;SAC/C;IACF,CAAC;IACD,MAAM,CAAC,iBAAiB,CACvB,QAAkB,EAClB,MAAgB;QAMhB,0DAA0D;QAC1D,MAAM,uBAAuB,GAAgB,gBAAgB,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;QAC7F,uFAAuF;QAEvF,2DAA2D;QAC3D,MAAM,wBAAwB,GAAgB,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;QAChG,yFAAyF;QAEzF,yEAAyE;QACzE,MAAM,aAAa,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;QAChF,OAAO;YACN,cAAc,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;YACrG,SAAS,EAAE,uBAAuB;YAClC,UAAU,EAAE,wBAAwB;SACpC,CAAC;IACH,CAAC;CACD"}
1
+ {"version":3,"file":"shared-transition.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/shared-transition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAY,MAAM,mBAAmB,CAAC;AAI/D,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,EAAE;CACZ,CAAC;AACF,+EAA+E;AAC/E,MAAM,CAAN,IAAY,6BAGX;AAHD,WAAY,6BAA6B;IACxC,uFAAO,CAAA;IACP,uFAAO,CAAA;AACR,CAAC,EAHW,6BAA6B,KAA7B,6BAA6B,QAGxC;AA+ED;;;;GAIG;AACH,MAAM,OAAO,gBAAgB;IAC5B;;;;;OAKG;IACH,MAA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AY,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;SAC/C;IACF,CAAC;IACD;;;;;OAKG;IACH,MAAM,CAAC,iBAAiB,CACvB,QAAkB,EAClB,MAAgB;QAMhB,0DAA0D;QAC1D,MAAM,uBAAuB,GAAgB,gBAAgB,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;QAC7F,uFAAuF;QAEvF,2DAA2D;QAC3D,MAAM,wBAAwB,GAAgB,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;QAChG,yFAAyF;QAEzF,yEAAyE;QACzE,MAAM,aAAa,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;QAChF,OAAO;YACN,cAAc,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;YACrG,SAAS,EAAE,uBAAuB;YAClC,UAAU,EAAE,wBAAwB;SACpC,CAAC;IACH,CAAC;;AAtED;;GAEG;AACI,sBAAK,GAAG,KAAK,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { Transition } from '.';
2
2
  export declare class SlideTransition extends Transition {
3
3
  private _direction;
4
- constructor(direction: string, duration: number, curve: any);
4
+ constructor(direction: string, duration?: number, curve?: any);
5
5
  createAndroidAnimator(transitionType: string): android.animation.Animator;
6
6
  toString(): string;
7
7
  }
@@ -4,7 +4,7 @@ import lazy from '../../utils/lazy';
4
4
  const screenWidth = lazy(() => Screen.mainScreen.widthPixels);
5
5
  const screenHeight = lazy(() => Screen.mainScreen.heightPixels);
6
6
  export class SlideTransition extends Transition {
7
- constructor(direction, duration, curve) {
7
+ constructor(direction, duration = 350, curve) {
8
8
  super(duration, curve);
9
9
  this._direction = direction;
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"slide-transition.android.js","sourceRoot":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M;iBACP;gBACD,MAAM;SACP;QAED,IAAI,IAAI,CAAC;QAET,IAAI,IAAI,CAAC,UAAU,KAAK,MAAM,IAAI,IAAI,CAAC,UAAU,KAAK,OAAO,EAAE;YAC9D,IAAI,GAAG,cAAc,CAAC;SACtB;aAAM;YACN,IAAI,GAAG,cAAc,CAAC;SACtB;QAED,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC;QACzF,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACpC,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC3B,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;SAC/B;QACD,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAE1C,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;QACxD,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3B,OAAO,WAAW,CAAC;IACpB,CAAC;IAEM,QAAQ;QACd,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;IACjD,CAAC;CACD"}
1
+ {"version":3,"file":"slide-transition.android.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/slide-transition.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,IAAI,MAAM,kBAAkB,CAAC;AAEpC,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;AAC9D,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAA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,CAAC;QACpC,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC3B,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;SAC/B;QACD,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAE1C,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;QACxD,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3B,OAAO,WAAW,CAAC;IACpB,CAAC;IAEM,QAAQ;QACd,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;IACjD,CAAC;CACD"}
@@ -1,5 +1,5 @@
1
1
  import { Transition } from '.';
2
2
 
3
3
  export class SlideTransition extends Transition {
4
- constructor(direction: string, duration: number, nativeCurve: any);
4
+ constructor(direction: string, duration?: number, nativeCurve?: any);
5
5
  }
@@ -1,6 +1,19 @@
1
1
  import { Transition } from '.';
2
2
  export declare class SlideTransition extends Transition {
3
- private _direction;
3
+ transitionController: SlideTransitionController;
4
+ presented: UIViewController;
5
+ presenting: UIViewController;
6
+ operation: number;
7
+ direction: string;
4
8
  constructor(direction: string, duration: number, curve: any);
5
- animateIOSTransition(transitionContext: UIViewControllerContextTransitioning, fromViewCtrl: UIViewController, toViewCtrl: UIViewController, operation: UINavigationControllerOperation): void;
9
+ iosNavigatedController(navigationController: UINavigationController, operation: number, fromVC: UIViewController, toVC: UIViewController): UIViewControllerAnimatedTransitioning;
10
+ }
11
+ export declare class SlideTransitionController extends NSObject implements UIViewControllerAnimatedTransitioning {
12
+ static ObjCProtocols: {
13
+ prototype: UIViewControllerAnimatedTransitioning;
14
+ }[];
15
+ owner: WeakRef<SlideTransition>;
16
+ static initWithOwner(owner: WeakRef<SlideTransition>): SlideTransitionController;
17
+ transitionDuration(transitionContext: UIViewControllerContextTransitioning): number;
18
+ animateTransition(transitionContext: UIViewControllerContextTransitioning): void;
6
19
  }
@@ -1,61 +1,95 @@
1
1
  import { Transition } from '.';
2
2
  import { Screen } from '../../platform';
3
- const leftEdge = CGAffineTransformMakeTranslation(-Screen.mainScreen.widthDIPs, 0);
4
- const rightEdge = CGAffineTransformMakeTranslation(Screen.mainScreen.widthDIPs, 0);
5
- const topEdge = CGAffineTransformMakeTranslation(0, -Screen.mainScreen.heightDIPs);
6
- const bottomEdge = CGAffineTransformMakeTranslation(0, Screen.mainScreen.heightDIPs);
3
+ import { DEFAULT_DURATION } from './shared-transition';
7
4
  export class SlideTransition extends Transition {
8
5
  constructor(direction, duration, curve) {
9
6
  super(duration, curve);
10
- this._direction = direction;
7
+ this.direction = direction;
11
8
  }
12
- animateIOSTransition(transitionContext, fromViewCtrl, toViewCtrl, operation) {
13
- const toView = toViewCtrl.view;
14
- const originalToViewTransform = toView.transform;
15
- const fromView = fromViewCtrl.view;
16
- const originalFromViewTransform = fromView.transform;
17
- let fromViewEndTransform;
18
- let toViewBeginTransform;
19
- const push = operation === 1 /* UINavigationControllerOperation.Push */;
20
- switch (this._direction) {
21
- case 'left':
22
- toViewBeginTransform = push ? rightEdge : leftEdge;
23
- fromViewEndTransform = push ? leftEdge : rightEdge;
24
- break;
25
- case 'right':
26
- toViewBeginTransform = push ? leftEdge : rightEdge;
27
- fromViewEndTransform = push ? rightEdge : leftEdge;
28
- break;
29
- case 'top':
30
- toViewBeginTransform = push ? bottomEdge : topEdge;
31
- fromViewEndTransform = push ? topEdge : bottomEdge;
32
- break;
33
- case 'bottom':
34
- toViewBeginTransform = push ? topEdge : bottomEdge;
35
- fromViewEndTransform = push ? bottomEdge : topEdge;
36
- break;
37
- }
38
- toView.transform = toViewBeginTransform;
39
- fromView.transform = CGAffineTransformIdentity;
40
- switch (operation) {
41
- case 1 /* UINavigationControllerOperation.Push */:
42
- transitionContext.containerView.insertSubviewAboveSubview(toView, fromView);
43
- break;
44
- case 2 /* UINavigationControllerOperation.Pop */:
45
- transitionContext.containerView.insertSubviewBelowSubview(toView, fromView);
46
- break;
47
- }
48
- const duration = this.getDuration();
49
- const curve = this.getCurve();
50
- UIView.animateWithDurationAnimationsCompletion(duration, () => {
51
- UIView.setAnimationCurve(curve);
52
- toView.transform = CGAffineTransformIdentity;
53
- fromView.transform = fromViewEndTransform;
54
- }, (finished) => {
55
- toView.transform = originalToViewTransform;
56
- fromView.transform = originalFromViewTransform;
57
- transitionContext.completeTransition(finished);
58
- });
9
+ iosNavigatedController(navigationController, operation, fromVC, toVC) {
10
+ this.transitionController = SlideTransitionController.initWithOwner(new WeakRef(this));
11
+ this.presented = toVC;
12
+ this.presenting = fromVC;
13
+ this.operation = operation;
14
+ // console.log('presenting:', presenting)
15
+ return this.transitionController;
59
16
  }
60
17
  }
18
+ var SlideTransitionController = /** @class */ (function (_super) {
19
+ __extends(SlideTransitionController, _super);
20
+ function SlideTransitionController() {
21
+ return _super !== null && _super.apply(this, arguments) || this;
22
+ }
23
+ SlideTransitionController.initWithOwner = function (owner) {
24
+ var ctrl = SlideTransitionController.new();
25
+ ctrl.owner = owner;
26
+ return ctrl;
27
+ };
28
+ SlideTransitionController.prototype.transitionDuration = function (transitionContext) {
29
+ var owner = this.owner.deref();
30
+ if (owner) {
31
+ return owner.getDuration();
32
+ }
33
+ return DEFAULT_DURATION;
34
+ };
35
+ SlideTransitionController.prototype.animateTransition = function (transitionContext) {
36
+ // console.log('SlideTransitionController animateTransition');
37
+ var owner = this.owner.deref();
38
+ if (owner) {
39
+ var toView_1 = owner.presented.view;
40
+ var originalToViewTransform_1 = toView_1.transform;
41
+ var fromView_1 = owner.presenting.view;
42
+ var originalFromViewTransform_1 = fromView_1.transform;
43
+ var fromViewEndTransform_1;
44
+ var toViewBeginTransform = void 0;
45
+ var push = owner.operation === UINavigationControllerOperation.Push;
46
+ var leftEdge = CGAffineTransformMakeTranslation(-Screen.mainScreen.widthDIPs, 0);
47
+ var rightEdge = CGAffineTransformMakeTranslation(Screen.mainScreen.widthDIPs, 0);
48
+ var topEdge = CGAffineTransformMakeTranslation(0, -Screen.mainScreen.heightDIPs);
49
+ var bottomEdge = CGAffineTransformMakeTranslation(0, Screen.mainScreen.heightDIPs);
50
+ switch (owner.direction) {
51
+ case 'left':
52
+ toViewBeginTransform = push ? rightEdge : leftEdge;
53
+ fromViewEndTransform_1 = push ? leftEdge : rightEdge;
54
+ break;
55
+ case 'right':
56
+ toViewBeginTransform = push ? leftEdge : rightEdge;
57
+ fromViewEndTransform_1 = push ? rightEdge : leftEdge;
58
+ break;
59
+ case 'top':
60
+ toViewBeginTransform = push ? bottomEdge : topEdge;
61
+ fromViewEndTransform_1 = push ? topEdge : bottomEdge;
62
+ break;
63
+ case 'bottom':
64
+ toViewBeginTransform = push ? topEdge : bottomEdge;
65
+ fromViewEndTransform_1 = push ? bottomEdge : topEdge;
66
+ break;
67
+ }
68
+ toView_1.transform = toViewBeginTransform;
69
+ fromView_1.transform = CGAffineTransformIdentity;
70
+ switch (owner.operation) {
71
+ case UINavigationControllerOperation.Push:
72
+ transitionContext.containerView.insertSubviewAboveSubview(toView_1, fromView_1);
73
+ break;
74
+ case UINavigationControllerOperation.Pop:
75
+ transitionContext.containerView.insertSubviewBelowSubview(toView_1, fromView_1);
76
+ break;
77
+ }
78
+ var duration = owner.getDuration();
79
+ var curve_1 = owner.getCurve();
80
+ UIView.animateWithDurationAnimationsCompletion(duration, function () {
81
+ UIView.setAnimationCurve(curve_1);
82
+ toView_1.transform = CGAffineTransformIdentity;
83
+ fromView_1.transform = fromViewEndTransform_1;
84
+ }, function (finished) {
85
+ toView_1.transform = originalToViewTransform_1;
86
+ fromView_1.transform = originalFromViewTransform_1;
87
+ transitionContext.completeTransition(finished);
88
+ });
89
+ }
90
+ };
91
+ SlideTransitionController.ObjCProtocols = [UIViewControllerAnimatedTransitioning];
92
+ return SlideTransitionController;
93
+ }(NSObject));
94
+ export { SlideTransitionController };
61
95
  //# sourceMappingURL=slide-transition.ios.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slide-transition.ios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AAC;YAChC,MAAM,CAAC,SAAS,GAAG,yBAAyB,CAAC;YAC7C,QAAQ,CAAC,SAAS,GAAG,oBAAoB,CAAC;QAC3C,CAAC,EACD,CAAC,QAAiB,EAAE,EAAE;YACrB,MAAM,CAAC,SAAS,GAAG,uBAAuB,CAAC;YAC3C,QAAQ,CAAC,SAAS,GAAG,yBAAyB,CAAC;YAC/C,iBAAiB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAChD,CAAC,CACD,CAAC;IACH,CAAC;CACD"}
1
+ {"version":3,"file":"slide-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/slide-transition.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,OAAO,eAAgB,SAAQ,UAAU;IAO9C,YAAY,SAAiB,EAAE,QAAgB,EAAE,KAAU;QAC1D,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC5B,CAAC;IAED,sBAAsB,CAAC,oBAA4C,EAAE,SAAiB,EAAE,MAAwB,EAAE,IAAsB;QACvI,IAAI,CAAC,oBAAoB,GAAG,yBAAyB,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACvF,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,yCAAyC;QACzC,OAAO,IAAI,CAAC,oBAAoB,CAAC;IAClC,CAAC;CACD"}
@@ -231,4 +231,39 @@ export namespace iOSNativeHelper {
231
231
  * Checks whether the application is running on real device and not on simulator.
232
232
  */
233
233
  export function isRealDevice(): boolean;
234
+
235
+ /**
236
+ * Debug utility to insert CGRect values into logging output.
237
+ * Note: when printing a CGRect directly it will print blank so this helps show the values.
238
+ * @param rect CGRect
239
+ */
240
+ export function printCGRect(rect: CGRect): void;
241
+
242
+ /**
243
+ * Take a snapshot of a View on screen.
244
+ * @param view view to snapshot
245
+ * @param scale screen scale
246
+ */
247
+ export function snapshotView(view: UIView, scale: number): UIImage;
248
+
249
+ /**
250
+ * Copy layer properties from one view to another.
251
+ * @param view a view to copy layer properties to
252
+ * @param toView a view to copy later properties from
253
+ */
254
+ export function copyLayerProperties(view: UIView, toView: UIView): void;
255
+
256
+ /**
257
+ * Animate views with a configurable spring effect
258
+ * @param options various animation settings for the spring
259
+ * - tension: number
260
+ * - friction: number
261
+ * - mass: number
262
+ * - delay: number
263
+ * - velocity: number
264
+ * - animateOptions: UIViewAnimationOptions
265
+ * - animations: () => void, Callback containing the property changes you want animated
266
+ * - completion: (finished: boolean) => void, Callback when animation is finished
267
+ */
268
+ export function animateWithSpring(options?: { tension?: number; friction?: number; mass?: number; delay?: number; velocity?: number; animateOptions?: UIViewAnimationOptions; animations?: () => void; completion?: (finished?: boolean) => void });
234
269
  }
@@ -21,4 +21,17 @@ export declare namespace iOSNativeHelper {
21
21
  function getShadowLayer(nativeView: UIView, name?: string, create?: boolean): CALayer;
22
22
  function createUIDocumentInteractionControllerDelegate(): NSObject;
23
23
  function isRealDevice(): true | NSArray<string>;
24
+ function printCGRect(rect: CGRect): string;
25
+ function snapshotView(view: UIView, scale: number): UIImage;
26
+ function copyLayerProperties(view: UIView, toView: UIView): void;
27
+ function animateWithSpring(options?: {
28
+ tension?: number;
29
+ friction?: number;
30
+ mass?: number;
31
+ delay?: number;
32
+ velocity?: number;
33
+ animateOptions?: UIViewAnimationOptions;
34
+ animations?: () => void;
35
+ completion?: (finished?: boolean) => void;
36
+ }): void;
24
37
  }
@@ -315,5 +315,78 @@ export var iOSNativeHelper;
315
315
  }
316
316
  }
317
317
  iOSNativeHelper.isRealDevice = isRealDevice;
318
+ function printCGRect(rect) {
319
+ if (rect) {
320
+ return `CGRect(${rect.origin.x} ${rect.origin.y} ${rect.size.width} ${rect.size.height})`;
321
+ }
322
+ }
323
+ iOSNativeHelper.printCGRect = printCGRect;
324
+ function snapshotView(view, scale) {
325
+ if (view instanceof UIImageView) {
326
+ return view.image;
327
+ }
328
+ // console.log('snapshotView view.frame:', printRect(view.frame));
329
+ UIGraphicsBeginImageContextWithOptions(CGSizeMake(view.frame.size.width, view.frame.size.height), false, scale);
330
+ view.layer.renderInContext(UIGraphicsGetCurrentContext());
331
+ const image = UIGraphicsGetImageFromCurrentImageContext();
332
+ UIGraphicsEndImageContext();
333
+ return image;
334
+ }
335
+ iOSNativeHelper.snapshotView = snapshotView;
336
+ function copyLayerProperties(view, toView) {
337
+ const viewPropertiesToMatch = ['backgroundColor'];
338
+ const layerPropertiesToMatch = ['cornerRadius', 'borderWidth', 'borderColor'];
339
+ viewPropertiesToMatch.forEach((property) => {
340
+ if (view[property] !== toView[property]) {
341
+ // console.log('| -- matching view property:', property);
342
+ view[property] = toView[property];
343
+ }
344
+ });
345
+ layerPropertiesToMatch.forEach((property) => {
346
+ if (view.layer[property] !== toView.layer[property]) {
347
+ // console.log('| -- matching layer property:', property);
348
+ view.layer[property] = toView.layer[property];
349
+ }
350
+ });
351
+ }
352
+ iOSNativeHelper.copyLayerProperties = copyLayerProperties;
353
+ function animateWithSpring(options) {
354
+ const opt = {
355
+ tension: 140,
356
+ friction: 10,
357
+ mass: 1.0,
358
+ delay: 0,
359
+ velocity: 0,
360
+ animateOptions: null,
361
+ animations: null,
362
+ completion: null,
363
+ ...(options || {}),
364
+ };
365
+ // console.log('createSpringAnimator', opt);
366
+ const damping = opt.friction / Math.sqrt(2 * opt.tension);
367
+ const undampedFrequency = Math.sqrt(opt.tension / opt.mass);
368
+ // console.log({
369
+ // damping,
370
+ // undampedFrequency
371
+ // })
372
+ const epsilon = 0.001;
373
+ let duration = 0;
374
+ if (damping < 1) {
375
+ // console.log('damping < 1');
376
+ const a = Math.sqrt(1 - Math.pow(damping, 2));
377
+ const b = opt.velocity / (a * undampedFrequency);
378
+ const c = damping / a;
379
+ const d = -((b - c) / epsilon);
380
+ if (d > 0) {
381
+ duration = Math.log(d) / (damping * undampedFrequency);
382
+ }
383
+ }
384
+ if (duration === 0) {
385
+ UIView.animateWithDurationAnimationsCompletion(0, opt.animations, opt.completion);
386
+ return;
387
+ }
388
+ UIView.animateWithDurationDelayUsingSpringWithDampingInitialSpringVelocityOptionsAnimationsCompletion(duration, opt.delay, damping, opt.velocity, opt.animateOptions, opt.animations, opt.completion);
389
+ }
390
+ iOSNativeHelper.animateWithSpring = animateWithSpring;
318
391
  })(iOSNativeHelper || (iOSNativeHelper = {}));
319
392
  //# sourceMappingURL=native-helper.ios.js.map