@akylas/nativescript 9.0.24 → 9.1.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.
Files changed (585) hide show
  1. package/abortcontroller/abortsignal.js.map +1 -1
  2. package/abortcontroller/index.js.map +1 -1
  3. package/accessibility/accessibility-common.js.map +1 -1
  4. package/accessibility/accessibility-css-helper.js.map +1 -1
  5. package/accessibility/accessibility-properties.js.map +1 -1
  6. package/accessibility/accessibility-service-common.js.map +1 -1
  7. package/accessibility/accessibility-service.android.js.map +1 -1
  8. package/accessibility/accessibility-service.ios.js.map +1 -1
  9. package/accessibility/accessibility-types.js.map +1 -1
  10. package/accessibility/font-scale-common.js.map +1 -1
  11. package/accessibility/font-scale.android.js.map +1 -1
  12. package/accessibility/font-scale.ios.js.map +1 -1
  13. package/accessibility/index.android.js.map +1 -1
  14. package/accessibility/index.ios.js.map +1 -1
  15. package/animation-frame/animation-native.android.js.map +1 -1
  16. package/animation-frame/animation-native.ios.js.map +1 -1
  17. package/animation-frame/index.js.map +1 -1
  18. package/application/application-common.d.ts +199 -3
  19. package/application/application-common.js +425 -55
  20. package/application/application-common.js.map +1 -1
  21. package/application/application-interfaces.d.ts +67 -1
  22. package/application/application-interfaces.js.map +1 -1
  23. package/application/application-shims.js.map +1 -1
  24. package/application/application.android.d.ts +39 -0
  25. package/application/application.android.js +242 -17
  26. package/application/application.android.js.map +1 -1
  27. package/application/application.d.ts +161 -54
  28. package/application/application.ios.d.ts +189 -28
  29. package/application/application.ios.js +885 -379
  30. package/application/application.ios.js.map +1 -1
  31. package/application/helpers-common.d.ts +5 -0
  32. package/application/helpers-common.js +23 -1
  33. package/application/helpers-common.js.map +1 -1
  34. package/application/helpers.android.js.map +1 -1
  35. package/application/helpers.ios.js.map +1 -1
  36. package/application/index.android.js.map +1 -1
  37. package/application/index.ios.js.map +1 -1
  38. package/application/scene-delegate-bridge.d.ts +60 -0
  39. package/application/scene-delegate-bridge.js +138 -0
  40. package/application/scene-delegate-bridge.js.map +1 -0
  41. package/application-settings/application-settings-common.js.map +1 -1
  42. package/application-settings/index.android.js.map +1 -1
  43. package/application-settings/index.ios.js.map +1 -1
  44. package/bundle-entry-points.js.map +1 -1
  45. package/cli-hooks/before-checkForChanges.mjs +0 -11
  46. package/color/color-common.js +16 -5
  47. package/color/color-common.js.map +1 -1
  48. package/color/color-types.js.map +1 -1
  49. package/color/color-utils.d.ts +4 -1
  50. package/color/color-utils.js +14 -9
  51. package/color/color-utils.js.map +1 -1
  52. package/color/index.android.js.map +1 -1
  53. package/color/index.ios.js.map +1 -1
  54. package/color/known-colors.js.map +1 -1
  55. package/config/config.interface.d.ts +44 -2
  56. package/config/config.interface.js.map +1 -1
  57. package/config/index.js.map +1 -1
  58. package/connectivity/index.android.js.map +1 -1
  59. package/connectivity/index.ios.js.map +1 -1
  60. package/console/index.js.map +1 -1
  61. package/core-types/animation-types.js.map +1 -1
  62. package/core-types/index.d.ts +25 -2
  63. package/core-types/index.js +23 -0
  64. package/core-types/index.js.map +1 -1
  65. package/core-types/validators.js.map +1 -1
  66. package/css/CSS3Parser.js +3 -2
  67. package/css/CSS3Parser.js.map +1 -1
  68. package/css/CSSNativeScript.js.map +1 -1
  69. package/css/css-tree-parser.js +5 -1
  70. package/css/css-tree-parser.js.map +1 -1
  71. package/css/lib/parse/index.js +5 -1
  72. package/css/lib/parse/index.js.map +1 -1
  73. package/css/parser.js +20 -3
  74. package/css/parser.js.map +1 -1
  75. package/css/reworkcss.js.map +1 -1
  76. package/css/system-classes.d.ts +9 -0
  77. package/css/system-classes.js +23 -0
  78. package/css/system-classes.js.map +1 -1
  79. package/css-mediaquery/index.js +4 -4
  80. package/css-mediaquery/index.js.map +1 -1
  81. package/css-value/reworkcss-value.js.map +1 -1
  82. package/data/observable/index.d.ts +23 -0
  83. package/data/observable/index.js +50 -9
  84. package/data/observable/index.js.map +1 -1
  85. package/data/observable-array/index.js.map +1 -1
  86. package/data/virtual-array/index.js.map +1 -1
  87. package/debugger/InspectorBackendCommands.js.map +1 -1
  88. package/debugger/devtools-elements-interfaces.js.map +1 -1
  89. package/debugger/devtools-elements.common.js.map +1 -1
  90. package/debugger/devtools-elements.js.map +1 -1
  91. package/debugger/dom-types.js +31 -1
  92. package/debugger/dom-types.js.map +1 -1
  93. package/debugger/index.js.map +1 -1
  94. package/debugger/webinspector-css.js.map +1 -1
  95. package/debugger/webinspector-dom.js.map +1 -1
  96. package/debugger/webinspector-network.android.js.map +1 -1
  97. package/debugger/webinspector-network.ios.js.map +1 -1
  98. package/file-system/file-system-access.android.js.map +1 -1
  99. package/file-system/file-system-access.ios.js +21 -13
  100. package/file-system/file-system-access.ios.js.map +1 -1
  101. package/file-system/index.d.ts +3 -3
  102. package/file-system/index.js.map +1 -1
  103. package/fps-meter/fps-native.android.js.map +1 -1
  104. package/fps-meter/fps-native.ios.js.map +1 -1
  105. package/fps-meter/index.js.map +1 -1
  106. package/global-types.d.ts +39 -33
  107. package/globals/global-utils.d.ts +6 -1
  108. package/globals/global-utils.js +10 -5
  109. package/globals/global-utils.js.map +1 -1
  110. package/globals/index.js +18 -5
  111. package/globals/index.js.map +1 -1
  112. package/globals/polyfills/polyfill-xhr.js.map +1 -1
  113. package/globals/polyfills/utils.js +2 -0
  114. package/globals/polyfills/utils.js.map +1 -1
  115. package/http/http-interfaces.js.map +1 -1
  116. package/http/http-request/http-request-common.js.map +1 -1
  117. package/http/http-request/index.android.js.map +1 -1
  118. package/http/http-request/index.ios.js.map +1 -1
  119. package/http/http-request-internal/http-request-internal-common.d.ts +5 -1
  120. package/http/http-request-internal/http-request-internal-common.js +10 -0
  121. package/http/http-request-internal/http-request-internal-common.js.map +1 -1
  122. package/http/http-request-internal/index.android.d.ts +7 -1
  123. package/http/http-request-internal/index.android.js +2 -2
  124. package/http/http-request-internal/index.android.js.map +1 -1
  125. package/http/http-request-internal/index.ios.d.ts +7 -1
  126. package/http/http-request-internal/index.ios.js +2 -2
  127. package/http/http-request-internal/index.ios.js.map +1 -1
  128. package/http/index.js.map +1 -1
  129. package/image-asset/image-asset-common.js.map +1 -1
  130. package/image-asset/index.android.js.map +1 -1
  131. package/image-asset/index.ios.js.map +1 -1
  132. package/image-source/image-source-common.js.map +1 -1
  133. package/image-source/index.android.js.map +1 -1
  134. package/image-source/index.ios.js.map +1 -1
  135. package/index.d.ts +2 -0
  136. package/index.js +1 -0
  137. package/index.js.map +1 -1
  138. package/inspector_modules.js +1 -1
  139. package/inspector_modules.js.map +1 -1
  140. package/matrix/index.js.map +1 -1
  141. package/media-query-list/index.js.map +1 -1
  142. package/module-name-resolver/helpers.js.map +1 -1
  143. package/module-name-resolver/index.js.map +1 -1
  144. package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
  145. package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
  146. package/native-window/index.d.ts +426 -0
  147. package/native-window/index.js +4 -0
  148. package/native-window/index.js.map +1 -0
  149. package/native-window/native-window-common.d.ts +153 -0
  150. package/native-window/native-window-common.js +340 -0
  151. package/native-window/native-window-common.js.map +1 -0
  152. package/native-window/native-window-interfaces.d.ts +186 -0
  153. package/native-window/native-window-interfaces.js +90 -0
  154. package/native-window/native-window-interfaces.js.map +1 -0
  155. package/native-window/native-window.android.d.ts +59 -0
  156. package/native-window/native-window.android.js +175 -0
  157. package/native-window/native-window.android.js.map +1 -0
  158. package/native-window/native-window.ios.d.ts +61 -0
  159. package/native-window/native-window.ios.js +220 -0
  160. package/native-window/native-window.ios.js.map +1 -0
  161. package/native-window/window-base.d.ts +111 -0
  162. package/native-window/window-base.js +91 -0
  163. package/native-window/window-base.js.map +1 -0
  164. package/package.json +3 -2
  165. package/platform/common.js.map +1 -1
  166. package/platform/device/index.android.js.map +1 -1
  167. package/platform/device/index.ios.js.map +1 -1
  168. package/platform/index.js.map +1 -1
  169. package/platform/screen/index.android.js.map +1 -1
  170. package/platform/screen/index.ios.d.ts +1 -0
  171. package/platform/screen/index.ios.js +6 -2
  172. package/platform/screen/index.ios.js.map +1 -1
  173. package/platforms/android/java/org/nativescript/widgets/BorderDrawable.java +5 -6
  174. package/platforms/android/java/org/nativescript/widgets/BoxShadowDrawable.java +0 -6
  175. package/platforms/android/java/org/nativescript/widgets/CommonLayoutParams.java +56 -0
  176. package/platforms/android/java/org/nativescript/widgets/ContentLayout.java +20 -4
  177. package/platforms/android/java/org/nativescript/widgets/CustomTransition.java +26 -9
  178. package/platforms/android/java/org/nativescript/widgets/FlexLine.java +3 -3
  179. package/platforms/android/java/org/nativescript/widgets/FlexboxLayout.java +194 -731
  180. package/platforms/android/java/org/nativescript/widgets/ImageView.java +2 -2
  181. package/platforms/android/java/org/nativescript/widgets/Utils.java +37 -9
  182. package/platforms/android/java/org/nativescript/widgets/ViewHelper.java +78 -0
  183. package/platforms/android/java/org/nativescript/widgets/image/BitmapOwner.java +1 -4
  184. package/platforms/android/java/org/nativescript/widgets/image/Worker.java +99 -76
  185. package/platforms/android/native-api-usage.json +11 -0
  186. package/platforms/ios/src/NativeScriptMainWindow.swift +72 -39
  187. package/profiling/index.js.map +1 -1
  188. package/references.d.ts +5 -2
  189. package/text/formatted-string.js.map +1 -1
  190. package/text/index.android.js.map +1 -1
  191. package/text/index.ios.js.map +1 -1
  192. package/text/span.js.map +1 -1
  193. package/text/text-common.js +1 -1
  194. package/text/text-common.js.map +1 -1
  195. package/timer/index.android.js.map +1 -1
  196. package/timer/index.ios.js.map +1 -1
  197. package/trace/index.d.ts +2 -2
  198. package/trace/index.js.map +1 -1
  199. package/ui/action-bar/action-bar-common.js.map +1 -1
  200. package/ui/action-bar/index.android.js +2 -7
  201. package/ui/action-bar/index.android.js.map +1 -1
  202. package/ui/action-bar/index.d.ts +13 -1
  203. package/ui/action-bar/index.ios.js +26 -0
  204. package/ui/action-bar/index.ios.js.map +1 -1
  205. package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
  206. package/ui/activity-indicator/index.android.js.map +1 -1
  207. package/ui/activity-indicator/index.ios.js.map +1 -1
  208. package/ui/animation/animation-common.js.map +1 -1
  209. package/ui/animation/animation-interfaces.js.map +1 -1
  210. package/ui/animation/animation-shared.js.map +1 -1
  211. package/ui/animation/animation-types.js.map +1 -1
  212. package/ui/animation/index.android.js.map +1 -1
  213. package/ui/animation/index.ios.js.map +1 -1
  214. package/ui/animation/keyframe-animation.d.ts +3 -1
  215. package/ui/animation/keyframe-animation.js +72 -3
  216. package/ui/animation/keyframe-animation.js.map +1 -1
  217. package/ui/builder/binding-builder.js.map +1 -1
  218. package/ui/builder/component-builder/index.js.map +1 -1
  219. package/ui/builder/index.js +9 -1
  220. package/ui/builder/index.js.map +1 -1
  221. package/ui/button/button-common.js.map +1 -1
  222. package/ui/button/index.android.js.map +1 -1
  223. package/ui/button/index.ios.js.map +1 -1
  224. package/ui/content-view/index.js.map +1 -1
  225. package/ui/core/bindable/bindable-expressions.js.map +1 -1
  226. package/ui/core/bindable/bindable-resources.js.map +1 -1
  227. package/ui/core/bindable/bindable-types.js.map +1 -1
  228. package/ui/core/bindable/index.js +2 -1
  229. package/ui/core/bindable/index.js.map +1 -1
  230. package/ui/core/control-state-change/index.android.js.map +1 -1
  231. package/ui/core/control-state-change/index.ios.js.map +1 -1
  232. package/ui/core/properties/index.d.ts +37 -2
  233. package/ui/core/properties/index.js +209 -32
  234. package/ui/core/properties/index.js.map +1 -1
  235. package/ui/core/properties/property-shared.js +11 -2
  236. package/ui/core/properties/property-shared.js.map +1 -1
  237. package/ui/core/view/index.android.d.ts +5 -0
  238. package/ui/core/view/index.android.js +78 -6
  239. package/ui/core/view/index.android.js.map +1 -1
  240. package/ui/core/view/index.d.ts +58 -1
  241. package/ui/core/view/index.ios.d.ts +1 -0
  242. package/ui/core/view/index.ios.js +48 -11
  243. package/ui/core/view/index.ios.js.map +1 -1
  244. package/ui/core/view/view-common.d.ts +37 -0
  245. package/ui/core/view/view-common.js +81 -0
  246. package/ui/core/view/view-common.js.map +1 -1
  247. package/ui/core/view/view-helper/index.android.d.ts +1 -0
  248. package/ui/core/view/view-helper/index.android.js +8 -0
  249. package/ui/core/view/view-helper/index.android.js.map +1 -1
  250. package/ui/core/view/view-helper/index.d.ts +46 -0
  251. package/ui/core/view/view-helper/index.ios.d.ts +42 -0
  252. package/ui/core/view/view-helper/index.ios.js +170 -5
  253. package/ui/core/view/view-helper/index.ios.js.map +1 -1
  254. package/ui/core/view/view-helper/view-helper-common.js +21 -3
  255. package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
  256. package/ui/core/view/view-helper/view-helper-shared.js.map +1 -1
  257. package/ui/core/view/view-interfaces.js.map +1 -1
  258. package/ui/core/view-base/index.js +80 -36
  259. package/ui/core/view-base/index.js.map +1 -1
  260. package/ui/core/view-base/utils.js.map +1 -1
  261. package/ui/core/weak-event-listener/index.js.map +1 -1
  262. package/ui/date-picker/date-picker-common.js.map +1 -1
  263. package/ui/date-picker/index.android.js.map +1 -1
  264. package/ui/date-picker/index.ios.js.map +1 -1
  265. package/ui/dialogs/dialogs-common.js.map +1 -1
  266. package/ui/dialogs/index.android.js +5 -5
  267. package/ui/dialogs/index.android.js.map +1 -1
  268. package/ui/dialogs/index.ios.js.map +1 -1
  269. package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
  270. package/ui/editable-text-base/index.android.js +2 -1
  271. package/ui/editable-text-base/index.android.js.map +1 -1
  272. package/ui/editable-text-base/index.ios.js.map +1 -1
  273. package/ui/embedding/index.android.js.map +1 -1
  274. package/ui/embedding/index.ios.js.map +1 -1
  275. package/ui/enums/enums.js.map +1 -1
  276. package/ui/enums/index.js.map +1 -1
  277. package/ui/frame/activity.android.js.map +1 -1
  278. package/ui/frame/fragment.android.js.map +1 -1
  279. package/ui/frame/fragment.ios.js.map +1 -1
  280. package/ui/frame/fragment.transitions.android.d.ts +4 -4
  281. package/ui/frame/fragment.transitions.android.js +95 -78
  282. package/ui/frame/fragment.transitions.android.js.map +1 -1
  283. package/ui/frame/fragment.transitions.types.js.map +1 -1
  284. package/ui/frame/frame-common.d.ts +14 -2
  285. package/ui/frame/frame-common.js +51 -24
  286. package/ui/frame/frame-common.js.map +1 -1
  287. package/ui/frame/frame-constants.d.ts +9 -0
  288. package/ui/frame/frame-constants.js +10 -0
  289. package/ui/frame/frame-constants.js.map +1 -0
  290. package/ui/frame/frame-helper-for-android.d.ts +2 -2
  291. package/ui/frame/frame-helper-for-android.js +14 -5
  292. package/ui/frame/frame-helper-for-android.js.map +1 -1
  293. package/ui/frame/frame-helpers.js.map +1 -1
  294. package/ui/frame/frame-interfaces.d.ts +1 -1
  295. package/ui/frame/frame-interfaces.js.map +1 -1
  296. package/ui/frame/frame-stack.d.ts +22 -1
  297. package/ui/frame/frame-stack.js +43 -5
  298. package/ui/frame/frame-stack.js.map +1 -1
  299. package/ui/frame/index.android.d.ts +1 -2
  300. package/ui/frame/index.android.js +152 -53
  301. package/ui/frame/index.android.js.map +1 -1
  302. package/ui/frame/index.d.ts +15 -5
  303. package/ui/frame/index.ios.d.ts +1 -1
  304. package/ui/frame/index.ios.js +86 -26
  305. package/ui/frame/index.ios.js.map +1 -1
  306. package/ui/gestures/gestures-common.js.map +1 -1
  307. package/ui/gestures/gestures-types.d.ts +2 -0
  308. package/ui/gestures/gestures-types.js.map +1 -1
  309. package/ui/gestures/index.android.d.ts +1 -1
  310. package/ui/gestures/index.android.js +159 -124
  311. package/ui/gestures/index.android.js.map +1 -1
  312. package/ui/gestures/index.ios.js +30 -1
  313. package/ui/gestures/index.ios.js.map +1 -1
  314. package/ui/gestures/touch-manager.d.ts +1 -2
  315. package/ui/gestures/touch-manager.js +79 -50
  316. package/ui/gestures/touch-manager.js.map +1 -1
  317. package/ui/html-view/html-view-common.js.map +1 -1
  318. package/ui/html-view/index.android.js.map +1 -1
  319. package/ui/html-view/index.ios.js.map +1 -1
  320. package/ui/image/image-common.js +1 -1
  321. package/ui/image/image-common.js.map +1 -1
  322. package/ui/image/index.android.js +13 -1
  323. package/ui/image/index.android.js.map +1 -1
  324. package/ui/image/index.ios.js.map +1 -1
  325. package/ui/image/symbol-effects-common.js.map +1 -1
  326. package/ui/image/symbol-effects.android.js.map +1 -1
  327. package/ui/image/symbol-effects.ios.js.map +1 -1
  328. package/ui/image-cache/image-cache-common.js.map +1 -1
  329. package/ui/image-cache/index.android.js.map +1 -1
  330. package/ui/image-cache/index.ios.js.map +1 -1
  331. package/ui/index.d.ts +1 -1
  332. package/ui/index.js.map +1 -1
  333. package/ui/label/index.android.js.map +1 -1
  334. package/ui/label/index.ios.js.map +1 -1
  335. package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
  336. package/ui/layouts/absolute-layout/index.android.js.map +1 -1
  337. package/ui/layouts/absolute-layout/index.ios.js +3 -0
  338. package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
  339. package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -1
  340. package/ui/layouts/dock-layout/index.android.js.map +1 -1
  341. package/ui/layouts/dock-layout/index.ios.js +3 -0
  342. package/ui/layouts/dock-layout/index.ios.js.map +1 -1
  343. package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +7 -0
  344. package/ui/layouts/flexbox-layout/flexbox-layout-common.js +18 -0
  345. package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
  346. package/ui/layouts/flexbox-layout/index.android.d.ts +5 -0
  347. package/ui/layouts/flexbox-layout/index.android.js +15 -0
  348. package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
  349. package/ui/layouts/flexbox-layout/index.d.ts +19 -1
  350. package/ui/layouts/flexbox-layout/index.ios.d.ts +2 -0
  351. package/ui/layouts/flexbox-layout/index.ios.js +246 -195
  352. package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
  353. package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -1
  354. package/ui/layouts/grid-layout/index.android.js.map +1 -1
  355. package/ui/layouts/grid-layout/index.ios.js +3 -0
  356. package/ui/layouts/grid-layout/index.ios.js.map +1 -1
  357. package/ui/layouts/index.js.map +1 -1
  358. package/ui/layouts/layout-base-common.d.ts +1 -0
  359. package/ui/layouts/layout-base-common.js +23 -1
  360. package/ui/layouts/layout-base-common.js.map +1 -1
  361. package/ui/layouts/layout-base.android.js.map +1 -1
  362. package/ui/layouts/layout-base.ios.js.map +1 -1
  363. package/ui/layouts/liquid-glass/index.android.js.map +1 -1
  364. package/ui/layouts/liquid-glass/index.ios.d.ts +0 -1
  365. package/ui/layouts/liquid-glass/index.ios.js +2 -43
  366. package/ui/layouts/liquid-glass/index.ios.js.map +1 -1
  367. package/ui/layouts/liquid-glass/liquid-glass-common.js.map +1 -1
  368. package/ui/layouts/liquid-glass-container/index.android.js.map +1 -1
  369. package/ui/layouts/liquid-glass-container/index.ios.d.ts +0 -1
  370. package/ui/layouts/liquid-glass-container/index.ios.js +2 -43
  371. package/ui/layouts/liquid-glass-container/index.ios.js.map +1 -1
  372. package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js.map +1 -1
  373. package/ui/layouts/root-layout/index.android.js.map +1 -1
  374. package/ui/layouts/root-layout/index.ios.js.map +1 -1
  375. package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
  376. package/ui/layouts/root-layout/root-layout-stack.js.map +1 -1
  377. package/ui/layouts/stack-layout/index.android.js.map +1 -1
  378. package/ui/layouts/stack-layout/index.ios.js +3 -0
  379. package/ui/layouts/stack-layout/index.ios.js.map +1 -1
  380. package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -1
  381. package/ui/layouts/wrap-layout/index.android.js.map +1 -1
  382. package/ui/layouts/wrap-layout/index.ios.js +3 -0
  383. package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
  384. package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
  385. package/ui/list-picker/index.android.js.map +1 -1
  386. package/ui/list-picker/index.ios.js.map +1 -1
  387. package/ui/list-picker/list-picker-common.js.map +1 -1
  388. package/ui/list-view/index.android.js +2 -2
  389. package/ui/list-view/index.android.js.map +1 -1
  390. package/ui/list-view/index.d.ts +47 -3
  391. package/ui/list-view/index.ios.d.ts +13 -3
  392. package/ui/list-view/index.ios.js +132 -41
  393. package/ui/list-view/index.ios.js.map +1 -1
  394. package/ui/list-view/list-view-common.d.ts +19 -0
  395. package/ui/list-view/list-view-common.js +30 -0
  396. package/ui/list-view/list-view-common.js.map +1 -1
  397. package/ui/page/events.js.map +1 -1
  398. package/ui/page/index.android.js.map +1 -1
  399. package/ui/page/index.d.ts +1 -1
  400. package/ui/page/index.ios.d.ts +3 -1
  401. package/ui/page/index.ios.js +26 -17
  402. package/ui/page/index.ios.js.map +1 -1
  403. package/ui/page/page-common.d.ts +5 -1
  404. package/ui/page/page-common.js.map +1 -1
  405. package/ui/placeholder/index.android.js.map +1 -1
  406. package/ui/placeholder/index.js.map +1 -1
  407. package/ui/placeholder/placeholder-common.js.map +1 -1
  408. package/ui/progress/index.android.js.map +1 -1
  409. package/ui/progress/index.ios.js.map +1 -1
  410. package/ui/progress/progress-common.js.map +1 -1
  411. package/ui/proxy-view-container/index.js.map +1 -1
  412. package/ui/repeater/index.d.ts +2 -1
  413. package/ui/repeater/index.js.map +1 -1
  414. package/ui/scroll-view/index.android.d.ts +2 -1
  415. package/ui/scroll-view/index.android.js +4 -1
  416. package/ui/scroll-view/index.android.js.map +1 -1
  417. package/ui/scroll-view/index.d.ts +53 -0
  418. package/ui/scroll-view/index.ios.d.ts +13 -1
  419. package/ui/scroll-view/index.ios.js +100 -20
  420. package/ui/scroll-view/index.ios.js.map +1 -1
  421. package/ui/scroll-view/scroll-view-common.d.ts +13 -0
  422. package/ui/scroll-view/scroll-view-common.js +27 -0
  423. package/ui/scroll-view/scroll-view-common.js.map +1 -1
  424. package/ui/search-bar/index.android.js.map +1 -1
  425. package/ui/search-bar/index.ios.js.map +1 -1
  426. package/ui/search-bar/search-bar-common.js.map +1 -1
  427. package/ui/segmented-bar/index.android.js.map +1 -1
  428. package/ui/segmented-bar/index.ios.js.map +1 -1
  429. package/ui/segmented-bar/segmented-bar-common.d.ts +5 -1
  430. package/ui/segmented-bar/segmented-bar-common.js +6 -1
  431. package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
  432. package/ui/slider/index.android.js.map +1 -1
  433. package/ui/slider/index.ios.js.map +1 -1
  434. package/ui/slider/slider-common.js.map +1 -1
  435. package/ui/split-view/index.android.js.map +1 -1
  436. package/ui/split-view/index.ios.js.map +1 -1
  437. package/ui/split-view/split-view-common.js.map +1 -1
  438. package/ui/styling/background-common.d.ts +2 -0
  439. package/ui/styling/background-common.js +8 -0
  440. package/ui/styling/background-common.js.map +1 -1
  441. package/ui/styling/background.android.d.ts +4 -1
  442. package/ui/styling/background.android.js +5 -2
  443. package/ui/styling/background.android.js.map +1 -1
  444. package/ui/styling/background.d.ts +1 -1
  445. package/ui/styling/background.ios.js +9 -2
  446. package/ui/styling/background.ios.js.map +1 -1
  447. package/ui/styling/box-shadow.js.map +1 -1
  448. package/ui/styling/clip-path-function.js.map +1 -1
  449. package/ui/styling/converters.js.map +1 -1
  450. package/ui/styling/css-animation-parser.js.map +1 -1
  451. package/ui/styling/css-selector.d.ts +60 -13
  452. package/ui/styling/css-selector.js +311 -50
  453. package/ui/styling/css-selector.js.map +1 -1
  454. package/ui/styling/css-shadow.js.map +1 -1
  455. package/ui/styling/css-stroke.js.map +1 -1
  456. package/ui/styling/css-transform.js.map +1 -1
  457. package/ui/styling/css-utils.d.ts +16 -0
  458. package/ui/styling/css-utils.js +121 -7
  459. package/ui/styling/css-utils.js.map +1 -1
  460. package/ui/styling/font-common.js.map +1 -1
  461. package/ui/styling/font-interfaces.js.map +1 -1
  462. package/ui/styling/font.android.js.map +1 -1
  463. package/ui/styling/font.ios.js.map +1 -1
  464. package/ui/styling/length-shared.d.ts +2 -0
  465. package/ui/styling/length-shared.js +29 -2
  466. package/ui/styling/length-shared.js.map +1 -1
  467. package/ui/styling/linear-gradient.js.map +1 -1
  468. package/ui/styling/style/index.d.ts +16 -0
  469. package/ui/styling/style/index.js +1 -0
  470. package/ui/styling/style/index.js.map +1 -1
  471. package/ui/styling/style-properties.d.ts +5 -0
  472. package/ui/styling/style-properties.js +172 -101
  473. package/ui/styling/style-properties.js.map +1 -1
  474. package/ui/styling/style-scope.d.ts +24 -3
  475. package/ui/styling/style-scope.js +455 -63
  476. package/ui/styling/style-scope.js.map +1 -1
  477. package/ui/styling/styling-profile.js.map +1 -1
  478. package/ui/styling/styling-shared.js.map +1 -1
  479. package/ui/switch/index.android.js.map +1 -1
  480. package/ui/switch/index.ios.js +5 -1
  481. package/ui/switch/index.ios.js.map +1 -1
  482. package/ui/switch/switch-common.js.map +1 -1
  483. package/ui/tab-view/index.android.js +4 -1
  484. package/ui/tab-view/index.android.js.map +1 -1
  485. package/ui/tab-view/index.d.ts +5 -3
  486. package/ui/tab-view/index.ios.d.ts +2 -1
  487. package/ui/tab-view/index.ios.js +81 -18
  488. package/ui/tab-view/index.ios.js.map +1 -1
  489. package/ui/tab-view/tab-view-common.d.ts +6 -1
  490. package/ui/tab-view/tab-view-common.js +17 -1
  491. package/ui/tab-view/tab-view-common.js.map +1 -1
  492. package/ui/text-base/formatted-string.js.map +1 -1
  493. package/ui/text-base/index.android.js +5 -8
  494. package/ui/text-base/index.android.js.map +1 -1
  495. package/ui/text-base/index.ios.d.ts +3 -0
  496. package/ui/text-base/index.ios.js +25 -3
  497. package/ui/text-base/index.ios.js.map +1 -1
  498. package/ui/text-base/span.js.map +1 -1
  499. package/ui/text-base/text-base-common.js.map +1 -1
  500. package/ui/text-field/index.android.js.map +1 -1
  501. package/ui/text-field/index.ios.js +13 -5
  502. package/ui/text-field/index.ios.js.map +1 -1
  503. package/ui/text-field/text-field-common.js.map +1 -1
  504. package/ui/text-view/index.android.js.map +1 -1
  505. package/ui/text-view/index.ios.js.map +1 -1
  506. package/ui/text-view/text-view-common.js.map +1 -1
  507. package/ui/time-picker/index.android.js.map +1 -1
  508. package/ui/time-picker/index.ios.js.map +1 -1
  509. package/ui/time-picker/time-picker-common.js.map +1 -1
  510. package/ui/transition/fade-transition.android.js.map +1 -1
  511. package/ui/transition/fade-transition.ios.js.map +1 -1
  512. package/ui/transition/flip-transition.android.js.map +1 -1
  513. package/ui/transition/index.android.js.map +1 -1
  514. package/ui/transition/index.d.ts +2 -1
  515. package/ui/transition/index.ios.js.map +1 -1
  516. package/ui/transition/modal-transition.android.js.map +1 -1
  517. package/ui/transition/modal-transition.ios.js +33 -5
  518. package/ui/transition/modal-transition.ios.js.map +1 -1
  519. package/ui/transition/page-transition.android.d.ts +4 -0
  520. package/ui/transition/page-transition.android.js +174 -45
  521. package/ui/transition/page-transition.android.js.map +1 -1
  522. package/ui/transition/page-transition.ios.d.ts +5 -0
  523. package/ui/transition/page-transition.ios.js +298 -36
  524. package/ui/transition/page-transition.ios.js.map +1 -1
  525. package/ui/transition/shared-transition-helper.android.d.ts +3 -0
  526. package/ui/transition/shared-transition-helper.android.js +9 -0
  527. package/ui/transition/shared-transition-helper.android.js.map +1 -1
  528. package/ui/transition/shared-transition-helper.d.ts +7 -0
  529. package/ui/transition/shared-transition-helper.ios.d.ts +48 -0
  530. package/ui/transition/shared-transition-helper.ios.js +977 -95
  531. package/ui/transition/shared-transition-helper.ios.js.map +1 -1
  532. package/ui/transition/shared-transition.d.ts +134 -0
  533. package/ui/transition/shared-transition.js +90 -2
  534. package/ui/transition/shared-transition.js.map +1 -1
  535. package/ui/transition/slide-transition.android.js.map +1 -1
  536. package/ui/transition/slide-transition.ios.js.map +1 -1
  537. package/ui/utils.android.js.map +1 -1
  538. package/ui/utils.d.ts +2 -0
  539. package/ui/utils.ios.js.map +1 -1
  540. package/ui/web-view/index.android.js.map +1 -1
  541. package/ui/web-view/index.ios.js.map +1 -1
  542. package/ui/web-view/web-view-common.js.map +1 -1
  543. package/ui/web-view/web-view-interfaces.js.map +1 -1
  544. package/utils/animation-helpers.js.map +1 -1
  545. package/utils/common.js.map +1 -1
  546. package/utils/constants.android.js.map +1 -1
  547. package/utils/constants.ios.js.map +1 -1
  548. package/utils/debug-source.js.map +1 -1
  549. package/utils/debug.js.map +1 -1
  550. package/utils/index.android.js.map +1 -1
  551. package/utils/index.ios.js.map +1 -1
  552. package/utils/layout-helper/index.android.js.map +1 -1
  553. package/utils/layout-helper/index.ios.js +11 -3
  554. package/utils/layout-helper/index.ios.js.map +1 -1
  555. package/utils/layout-helper/layout-helper-common.js.map +1 -1
  556. package/utils/layout-helper/layout-helper-shared.js.map +1 -1
  557. package/utils/lazy.js.map +1 -1
  558. package/utils/macrotask-scheduler.js.map +1 -1
  559. package/utils/mainthread-helper.android.js.map +1 -1
  560. package/utils/mainthread-helper.ios.js.map +1 -1
  561. package/utils/module-merge.js.map +1 -1
  562. package/utils/native-helper-for-android.js +6 -2
  563. package/utils/native-helper-for-android.js.map +1 -1
  564. package/utils/native-helper.android.d.ts +66 -2
  565. package/utils/native-helper.android.js.map +1 -1
  566. package/utils/native-helper.d.ts +2 -2
  567. package/utils/native-helper.ios.d.ts +52 -2
  568. package/utils/native-helper.ios.js +35 -5
  569. package/utils/native-helper.ios.js.map +1 -1
  570. package/utils/native-helper.types.d.ts +2 -0
  571. package/utils/number-utils.js.map +1 -1
  572. package/utils/platform-check.d.ts +1 -1
  573. package/utils/platform-check.js.map +1 -1
  574. package/utils/shared.js.map +1 -1
  575. package/utils/types.js.map +1 -1
  576. package/utils/utils-shared.js.map +1 -1
  577. package/wgc/atob.js.map +1 -1
  578. package/wgc/btoa.js.map +1 -1
  579. package/wgc/crypto/SubtleCrypto.js.map +1 -1
  580. package/wgc/crypto/index.d.ts +1 -1
  581. package/wgc/crypto/index.js +12 -8
  582. package/wgc/crypto/index.js.map +1 -1
  583. package/wgc/index.js.map +1 -1
  584. package/xhr/index.js.map +1 -1
  585. package/xml/index.js.map +1 -1
@@ -2,7 +2,7 @@ import { CORE_ANIMATION_DEFAULTS, getDurationWithDampingFromSpring } from '../..
2
2
  import { isNumber } from '../../utils/types';
3
3
  import { Transition } from '.';
4
4
  import { SharedTransition, SharedTransitionAnimationType } from './shared-transition';
5
- import { SharedTransitionHelper } from './shared-transition-helper';
5
+ import { SharedTransitionHelper, removeInteractiveDismissShadow, syncInteractiveDismissShadow } from './shared-transition-helper';
6
6
  import { GestureStateTypes } from '../gestures';
7
7
  export class ModalTransition extends Transition {
8
8
  iosPresentedController(presented, presenting, source) {
@@ -37,7 +37,15 @@ export class ModalTransition extends Transition {
37
37
  _interactiveDismissGestureHandler(args) {
38
38
  if (args?.ios?.view) {
39
39
  const state = SharedTransition.getState(this.id);
40
- const percent = state.interactive?.dismiss?.percentFormula ? state.interactive.dismiss.percentFormula(args) : args.deltaY / (args.ios.view.bounds.size.height / 2);
40
+ const morph = !!state.interactive?.dismiss?.morph;
41
+ const morphOptions = typeof state.interactive?.dismiss?.morph === 'object' ? state.interactive.dismiss.morph : null;
42
+ const viewH = args.ios.view.bounds.size.height;
43
+ const dist = Math.hypot(args.deltaX, args.deltaY);
44
+ const morphPercent = dist / viewH;
45
+ // 1:1 with finger movement (SwiftUI default). Dragging across the full
46
+ // view height corresponds to percent = 1. Halving the divisor — the
47
+ // previous default — made the modal run twice as fast as the finger.
48
+ const percent = state.interactive?.dismiss?.percentFormula ? state.interactive.dismiss.percentFormula(args) : morph ? morphPercent : args.deltaY / viewH;
41
49
  if (SharedTransition.DEBUG) {
42
50
  console.log('Interactive dismissal percentage:', percent);
43
51
  }
@@ -47,16 +55,30 @@ export class ModalTransition extends Transition {
47
55
  interactiveBegan: true,
48
56
  interactiveCancelled: false,
49
57
  });
58
+ // Dismiss shadow is applied from SharedTransitionHelper.interactiveStart
59
+ // (it runs after UIKit has reparented the modal view into the
60
+ // transition's containerView).
50
61
  if (this._interactiveStartCallback) {
51
62
  this._interactiveStartCallback();
52
63
  }
53
64
  break;
54
65
  case GestureStateTypes.changed:
55
- if (percent < 1) {
56
- if (this.interactiveController) {
57
- this.interactiveController.updateInteractiveTransition(percent);
66
+ if (morph) {
67
+ const presentedView = this.presented?.view;
68
+ if (presentedView) {
69
+ const minScale = morphOptions?.minScale ?? 0.5;
70
+ const scale = Math.max(minScale, 1 - dist / viewH);
71
+ presentedView.transform = CGAffineTransformConcat(CGAffineTransformMakeTranslation(args.deltaX, args.deltaY), CGAffineTransformMakeScale(scale, scale));
58
72
  }
59
73
  }
74
+ if (percent < 1 && this.interactiveController) {
75
+ this.interactiveController.updateInteractiveTransition(percent);
76
+ }
77
+ // Mirror the modal's current visual state onto the sibling shadow
78
+ // layer. Done for both morph (direct transform) and non-morph
79
+ // (UIViewPropertyAnimator-driven frame/cornerRadius) — sync reads
80
+ // the presentation layer so it works for both.
81
+ syncInteractiveDismissShadow(this.presented?.view);
60
82
  break;
61
83
  case GestureStateTypes.cancelled:
62
84
  case GestureStateTypes.ended:
@@ -71,6 +93,12 @@ export class ModalTransition extends Transition {
71
93
  });
72
94
  this.interactiveController.cancelInteractiveTransition();
73
95
  }
96
+ // Always restore the modal's layer state we touched to render
97
+ // the dismiss shadow — both on cancel (view is being kept) and
98
+ // on finish (the same NS view instance may be reused on a
99
+ // subsequent presentation, and leaked shadow state would
100
+ // stack up across dismissals).
101
+ removeInteractiveDismissShadow(this.presented?.view);
74
102
  }
75
103
  break;
76
104
  }
@@ -1 +1 @@
1
- {"version":3,"file":"modal-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/modal-transition.ios.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AAC1G,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAqD,MAAM,GAAG,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAuB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErE,MAAM,OAAO,eAAgB,SAAQ,UAAU;IAe9C,sBAAsB,CAAC,SAA2B,EAAE,UAA4B,EAAE,MAAwB;QACzG,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CAAC;4BAC/B,IAAI,CAAC,qBAAqB,CAAC,2BAA2B,EAAE,CAAC;wBAC1D,CAAC;6BAAM,CAAC;4BACP,gBAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE;gCACrC,oBAAoB,EAAE,IAAI;6BAC1B,CAAC,CAAC;4BACH,IAAI,CAAC,qBAAqB,CAAC,2BAA2B,EAAE,CAAC;wBAC1D,CAAC;oBACF,CAAC;oBACD,MAAM;YACR,CAAC;QACF,CAAC;IACF,CAAC;CACD;;;;;IA/F6C,CAAC;;;;;IAEO,CAAC;;;;;;;;;;;YAYyB,CAAC;QAAa,CAAC;IAC1F,CAAC;;;;;;;QAM4C,CAAC;IAAS,CAAC;;;;;;;QAYhC,CAAC;IAAS,CAAC;;;;;;;QAOQ,CAAC;IAC1C,CAAC;;;AAKK,CAAC;;;;;IA9CuB,CAAC;;;;;IAEC,CAAC;;;;;;;;;gBAaT,CAAC;;;gBAKlB,CAAC;;;gBAOH,CAAC;;;gBAEU,CAAC;YACT,CAAC;QAAa,CAAC;;IAGkB,CAAC;;;;;;;YAO3B,CAAC;;QAIuB,CAAC;IAAQ,CAAC;;;AAEe,CAAC"}
1
+ {"version":3,"file":"modal-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/modal-transition.ios.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AAC1G,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAqD,MAAM,GAAG,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,8BAA8B,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAClI,OAAO,EAAuB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErE,MAAM,OAAO,eAAgB,SAAQ,UAA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CAAC,qBAAqB,CAAC,2BAA2B,EAAE,CAAC;wBAC1D,CAAC;6BAAM,CAAC;4BACP,gBAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE;gCACrC,oBAAoB,EAAE,IAAI;6BAC1B,CAAC,CAAC;4BACH,IAAI,CAAC,qBAAqB,CAAC,2BAA2B,EAAE,CAAC;wBAC1D,CAAC;wBACD,8DAA8D;wBAC9D,+DAA+D;wBAC/D,0DAA0D;wBAC1D,yDAAyD;wBACzD,+BAA+B;wBAC/B,8BAA8B,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;oBACtD,CAAC;oBACD,MAAM;YACR,CAAC;QACF,CAAC;IACF,CAAC;CACD;;;;;IA3H6C,CAAC;;;;;IAEO,CAAC;;;;;;;;;;;YAYrC,CAAC;QAAa,CAAC;IAAS,CAAC;;;;;;;QAM+F,CAAC;IAAS,CAAC;;;;;;;QAU9I,CAAC;IAAS,CAAC;;;;;;;QASsF,CAAC;IAAS,CAAC;;;AAMjH,CAAC;;;;;IA7CkC,CAAC;;;;;IAEC,CAAC;;;;;;;;;gBAY4B,CAAC;;;gBAIlC,CAAC;;;gBAKF,CAAC;;;gBAKgB,CAAC;YAAsB,CAAC;QAAY,CAAC;;IAE9D,CAAC;;;;;;;YASmD,CAAC;;QAE7E,CAAC;IAAS,CAAC;;;AAKJ,CAAC","sourcesContent":["import type { View } from '../core/view';\nimport { CORE_ANIMATION_DEFAULTS, getDurationWithDampingFromSpring } from '../../utils/animation-helpers';\nimport { isNumber } from '../../utils/types';\nimport { Transition, SharedElementSettings, TransitionInteractiveState } from '.';\nimport { SharedTransition, SharedTransitionAnimationType } from './shared-transition';\nimport { SharedTransitionHelper, removeInteractiveDismissShadow, syncInteractiveDismissShadow } from './shared-transition-helper';\nimport { PanGestureEventData, GestureStateTypes } from '../gestures';\n\nexport class ModalTransition extends Transition {\n\tdeclare transitionController: ModalTransitionController;\n\tdeclare interactiveController: UIPercentDrivenInteractiveTransition;\n\tinteractiveGestureRecognizer: UIScreenEdgePanGestureRecognizer;\n\tdeclare presented: UIViewController;\n\tdeclare presenting: UIViewController;\n\tdeclare sharedElements: {\n\t\tpresented?: Array<SharedElementSettings>;\n\t\tpresenting?: Array<SharedElementSettings>;\n\t\t// independent sharedTransitionTags which are part of the shared transition but only on one page\n\t\tindependent?: Array<SharedElementSettings & { isPresented?: boolean }>;\n\t};\n\tprivate _interactiveStartCallback: () => void;\n\tprivate _interactiveDismissGesture: (args: any /*PanGestureEventData*/) => void;\n\n\tiosPresentedController(presented: UIViewController, presenting: UIViewController, source: UIViewController): UIViewControllerAnimatedTransitioning {\n\t\tthis.transitionController = ModalTransitionController.initWithOwner(new WeakRef(this));\n\t\tthis.presented = presented;\n\t\t// console.log('presenting:', presenting)\n\t\treturn this.transitionController;\n\t}\n\n\tiosDismissedController(dismissed: UIViewController): UIViewControllerAnimatedTransitioning {\n\t\tthis.transitionController = ModalTransitionController.initWithOwner(new WeakRef(this));\n\t\tthis.presented = dismissed;\n\t\treturn this.transitionController;\n\t}\n\n\tiosInteractionDismiss(animator: UIViewControllerAnimatedTransitioning): UIViewControllerInteractiveTransitioning {\n\t\t// console.log('-- iosInteractionDismiss --');\n\t\tthis.interactiveController = PercentInteractiveController.initWithOwner(new WeakRef(this));\n\t\treturn this.interactiveController;\n\t}\n\n\tiosInteractionPresented(animator: UIViewControllerAnimatedTransitioning): UIViewControllerInteractiveTransitioning {\n\t\t// console.log('-- iosInteractionPresented --');\n\t\treturn null;\n\t}\n\n\tsetupInteractiveGesture(startCallback: () => void, view: View) {\n\t\tthis._interactiveStartCallback = startCallback;\n\t\tthis._interactiveDismissGesture = this._interactiveDismissGestureHandler.bind(this);\n\t\tview.on('pan', this._interactiveDismissGesture);\n\t\t// this.interactiveGestureRecognizer = UIScreenEdgePanGestureRecognizer.alloc().initWithTargetAction()\n\t\t// \t\t\tlet edgeSwipeGestureRecognizer = UIScreenEdgePanGestureRecognizer(target: self, action: #selector(handleSwipe(_:)))\n\t\t// edgeSwipeGestureRecognizer.edges = .left\n\t\t// view.addGestureRecognizer(edgeSwipeGestureRecognizer)\n\t}\n\n\tprivate _interactiveDismissGestureHandler(args: PanGestureEventData) {\n\t\tif (args?.ios?.view) {\n\t\t\tconst state = SharedTransition.getState(this.id);\n\t\t\tconst morph = !!state.interactive?.dismiss?.morph;\n\t\t\tconst morphOptions = typeof state.interactive?.dismiss?.morph === 'object' ? state.interactive.dismiss.morph : null;\n\t\t\tconst viewH = args.ios.view.bounds.size.height;\n\t\t\tconst dist = Math.hypot(args.deltaX, args.deltaY);\n\t\t\tconst morphPercent = dist / viewH;\n\t\t\t// 1:1 with finger movement (SwiftUI default). Dragging across the full\n\t\t\t// view height corresponds to percent = 1. Halving the divisor — the\n\t\t\t// previous default — made the modal run twice as fast as the finger.\n\t\t\tconst percent = state.interactive?.dismiss?.percentFormula ? state.interactive.dismiss.percentFormula(args) : morph ? morphPercent : args.deltaY / viewH;\n\t\t\tif (SharedTransition.DEBUG) {\n\t\t\t\tconsole.log('Interactive dismissal percentage:', percent);\n\t\t\t}\n\t\t\tswitch (args.state) {\n\t\t\t\tcase GestureStateTypes.began:\n\t\t\t\t\tSharedTransition.updateState(this.id, {\n\t\t\t\t\t\tinteractiveBegan: true,\n\t\t\t\t\t\tinteractiveCancelled: false,\n\t\t\t\t\t});\n\t\t\t\t\t// Dismiss shadow is applied from SharedTransitionHelper.interactiveStart\n\t\t\t\t\t// (it runs after UIKit has reparented the modal view into the\n\t\t\t\t\t// transition's containerView).\n\t\t\t\t\tif (this._interactiveStartCallback) {\n\t\t\t\t\t\tthis._interactiveStartCallback();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase GestureStateTypes.changed:\n\t\t\t\t\tif (morph) {\n\t\t\t\t\t\tconst presentedView = this.presented?.view;\n\t\t\t\t\t\tif (presentedView) {\n\t\t\t\t\t\t\tconst minScale = morphOptions?.minScale ?? 0.5;\n\t\t\t\t\t\t\tconst scale = Math.max(minScale, 1 - dist / viewH);\n\t\t\t\t\t\t\tpresentedView.transform = CGAffineTransformConcat(CGAffineTransformMakeTranslation(args.deltaX, args.deltaY), CGAffineTransformMakeScale(scale, scale));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (percent < 1 && this.interactiveController) {\n\t\t\t\t\t\tthis.interactiveController.updateInteractiveTransition(percent);\n\t\t\t\t\t}\n\t\t\t\t\t// Mirror the modal's current visual state onto the sibling shadow\n\t\t\t\t\t// layer. Done for both morph (direct transform) and non-morph\n\t\t\t\t\t// (UIViewPropertyAnimator-driven frame/cornerRadius) — sync reads\n\t\t\t\t\t// the presentation layer so it works for both.\n\t\t\t\t\tsyncInteractiveDismissShadow(this.presented?.view);\n\t\t\t\t\tbreak;\n\t\t\t\tcase GestureStateTypes.cancelled:\n\t\t\t\tcase GestureStateTypes.ended:\n\t\t\t\t\tif (this.interactiveController) {\n\t\t\t\t\t\tconst finishThreshold = isNumber(state.interactive?.dismiss?.finishThreshold) ? state.interactive.dismiss.finishThreshold : 0.5;\n\t\t\t\t\t\tif (percent > finishThreshold) {\n\t\t\t\t\t\t\tthis.interactiveController.finishInteractiveTransition();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSharedTransition.updateState(this.id, {\n\t\t\t\t\t\t\t\tinteractiveCancelled: true,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthis.interactiveController.cancelInteractiveTransition();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Always restore the modal's layer state we touched to render\n\t\t\t\t\t\t// the dismiss shadow — both on cancel (view is being kept) and\n\t\t\t\t\t\t// on finish (the same NS view instance may be reused on a\n\t\t\t\t\t\t// subsequent presentation, and leaked shadow state would\n\t\t\t\t\t\t// stack up across dismissals).\n\t\t\t\t\t\tremoveInteractiveDismissShadow(this.presented?.view);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\n@NativeClass()\nclass PercentInteractiveController extends UIPercentDrivenInteractiveTransition implements UIViewControllerInteractiveTransitioning {\n\tstatic ObjCProtocols = [UIViewControllerInteractiveTransitioning];\n\towner: WeakRef<ModalTransition>;\n\tinteractiveState: TransitionInteractiveState;\n\n\tstatic initWithOwner(owner: WeakRef<ModalTransition>) {\n\t\tconst ctrl = <PercentInteractiveController>PercentInteractiveController.new();\n\t\tctrl.owner = owner;\n\t\treturn ctrl;\n\t}\n\n\tstartInteractiveTransition(transitionContext: UIViewControllerContextTransitioning) {\n\t\t// console.log('startInteractiveTransition');\n\t\tif (!this.interactiveState) {\n\t\t\tthis.interactiveState = {\n\t\t\t\ttransitionContext,\n\t\t\t};\n\t\t\tconst owner = this.owner?.deref();\n\t\t\tif (owner) {\n\t\t\t\tconst state = SharedTransition.getState(owner.id);\n\t\t\t\tSharedTransitionHelper.interactiveStart(state, this.interactiveState, 'modal');\n\t\t\t}\n\t\t}\n\t}\n\n\tupdateInteractiveTransition(percentComplete: number) {\n\t\tconst owner = this.owner?.deref();\n\t\tif (owner) {\n\t\t\tconst state = SharedTransition.getState(owner.id);\n\t\t\tSharedTransitionHelper.interactiveUpdate(state, this.interactiveState, 'modal', percentComplete);\n\t\t}\n\t}\n\n\tcancelInteractiveTransition() {\n\t\t// console.log('cancelInteractiveTransition');\n\t\tconst owner = this.owner?.deref();\n\t\tif (owner) {\n\t\t\tconst state = SharedTransition.getState(owner.id);\n\t\t\tSharedTransitionHelper.interactiveCancel(state, this.interactiveState, 'modal');\n\t\t}\n\t}\n\n\tfinishInteractiveTransition() {\n\t\t// console.log('finishInteractiveTransition');\n\t\tconst owner = this.owner?.deref();\n\t\tif (owner) {\n\t\t\tconst state = SharedTransition.getState(owner.id);\n\t\t\tSharedTransitionHelper.interactiveFinish(state, this.interactiveState, 'modal');\n\t\t}\n\t}\n}\n\n@NativeClass()\nclass ModalTransitionController extends NSObject implements UIViewControllerAnimatedTransitioning {\n\tstatic ObjCProtocols = [UIViewControllerAnimatedTransitioning];\n\towner: WeakRef<ModalTransition>;\n\n\tstatic initWithOwner(owner: WeakRef<ModalTransition>) {\n\t\tconst ctrl = <ModalTransitionController>ModalTransitionController.new();\n\t\tctrl.owner = owner;\n\t\treturn ctrl;\n\t}\n\n\ttransitionDuration(transitionContext: UIViewControllerContextTransitioning): number {\n\t\tconst owner = this.owner.deref();\n\t\tif (owner) {\n\t\t\tconst state = SharedTransition.getState(owner.id);\n\t\t\tswitch (state?.activeType) {\n\t\t\t\tcase SharedTransitionAnimationType.present:\n\t\t\t\t\tif (isNumber(state?.pageEnd?.duration)) {\n\t\t\t\t\t\treturn state.pageEnd?.duration / 1000;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn getDurationWithDampingFromSpring(state.pageEnd?.spring).duration;\n\t\t\t\t\t}\n\n\t\t\t\tcase SharedTransitionAnimationType.dismiss:\n\t\t\t\t\tif (isNumber(state?.pageReturn?.duration)) {\n\t\t\t\t\t\treturn state.pageReturn?.duration / 1000;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn getDurationWithDampingFromSpring(state.pageReturn?.spring).duration;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn CORE_ANIMATION_DEFAULTS.duration;\n\t}\n\n\tanimateTransition(transitionContext: UIViewControllerContextTransitioning): void {\n\t\t// console.log('ModalTransitionController animateTransition');\n\t\tconst owner = this.owner.deref();\n\t\tif (owner) {\n\t\t\t// console.log('owner.id:', owner.id);\n\t\t\tconst state = SharedTransition.getState(owner.id);\n\t\t\tif (!state) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tSharedTransitionHelper.animate(state, transitionContext, 'modal');\n\t\t}\n\t}\n}\n"]}
@@ -4,6 +4,10 @@ import { ExpandedEntry } from '../frame/fragment.transitions.android';
4
4
  export declare class PageTransition extends Transition {
5
5
  private pageLoadedTimeout;
6
6
  constructor(duration?: number, curve?: any, pageLoadedTimeout?: number);
7
+ /**
8
+ * The curve of the pageEnd/pageReturn config (depending on the direction) or the one of the transition
9
+ */
10
+ private resolveCurve;
7
11
  createAndroidAnimator(transitionType: string): globalAndroid.animation.AnimatorSet;
8
12
  androidFragmentTransactionCallback(fragmentTransaction: androidx.fragment.app.FragmentTransaction, currentEntry: ExpandedEntry, newEntry: BackstackEntry): void;
9
13
  onTransitionEnd(entry: any): void;
@@ -6,6 +6,8 @@ import { ContentView } from '../content-view';
6
6
  import { GridLayout } from '../layouts/grid-layout';
7
7
  import { Screen } from '../../platform/screen';
8
8
  import { android as androidUtils } from '../../utils/native-helper';
9
+ import { _resolveAnimationCurve } from '../animation';
10
+ import lazy from '../../utils/lazy';
9
11
  var SnapshotViewGroup = (function (_super) {
10
12
  __extends(SnapshotViewGroup, _super);
11
13
  function SnapshotViewGroup(context) {
@@ -24,57 +26,187 @@ class ContentViewSnapshot extends ContentView {
24
26
  return new SnapshotViewGroup(this._context);
25
27
  }
26
28
  }
27
- var CustomSpringInterpolator = (function (_super) {
28
- __extends(CustomSpringInterpolator, _super);
29
- function CustomSpringInterpolator() {
30
- return _super !== null && _super.apply(this, arguments) || this;
31
- }
32
- CustomSpringInterpolator.prototype.getInterpolation = function (input) {
33
- var res = _super.prototype.getInterpolation.call(this, input) * 1.1;
34
- if (res > 1) {
35
- return float(1);
29
+ // Material "standard" easing (FastOutSlowIn). Overridable with the `curve` of the PageTransition or of pageEnd/pageReturn.
30
+ const defaultCurve = lazy(() => androidx.core.view.animation.PathInterpolatorCompat.create(0.4, 0, 0.2, 1));
31
+ // Views we gave a transition name to. They are reset when a transition ends, whatever the transition instance:
32
+ // the instance used to go back is a different one than the one used to go forward and the views of the page
33
+ // we return to (eg pager/list cells which are recycled) must not keep a stale name, or the next transition
34
+ // would pick the wrong view (wrong start/end frame).
35
+ const namedViews = new Set();
36
+ // What we changed on views for the duration of a transition (scale type, outline...), to undo when it ends
37
+ const transitionRestores = [];
38
+ /**
39
+ * Progress (0 at the bounds of the view we leave, 1 at the own bounds of the view we enter) of the shared element,
40
+ * deduced from its current size. Following the real size (instead of running our own animator) keeps whatever we animate
41
+ * in sync with the transition, whatever its duration, interpolator or spring.
42
+ */
43
+ function createProgress(fromView, toView) {
44
+ const startW = fromView.getWidth();
45
+ const startH = fromView.getHeight();
46
+ const dw = toView.getWidth() - startW;
47
+ const dh = toView.getHeight() - startH;
48
+ return (w, h) => {
49
+ if (Math.abs(dw) < 2 && Math.abs(dh) < 2) {
50
+ return 1;
36
51
  }
37
- return float(res);
52
+ return Math.abs(dw) >= Math.abs(dh) ? (w - startW) / dw : (h - startH) / dh;
38
53
  };
39
- return CustomSpringInterpolator;
40
- }(android.view.animation.AnticipateOvershootInterpolator));
41
- var CustomLinearInterpolator = (function (_super) {
42
- __extends(CustomLinearInterpolator, _super);
43
- function CustomLinearInterpolator() {
44
- return _super !== null && _super.apply(this, arguments) || this;
54
+ }
55
+ function getCornerRadius(view) {
56
+ const v = view;
57
+ // in dip. Uniform radius only: an outline can't do more
58
+ const radius = Math.max(v.effectiveBorderTopLeftRadius || 0, v.effectiveBorderTopRightRadius || 0, v.effectiveBorderBottomRightRadius || 0, v.effectiveBorderBottomLeftRadius || 0, v.roundTopLeftRadius || 0, v.roundTopRightRadius || 0, v.roundBottomRightRadius || 0, v.roundBottomLeftRadius || 0);
59
+ return radius * Screen.mainScreen.scale;
60
+ }
61
+ /**
62
+ * The entering view gets the size of the view we leave then animates to its own: animate its corner radius the same way
63
+ * (eg a rounded thumbnail <-> a fullscreen image) instead of jumping to the radius of the entering view on the first frame.
64
+ */
65
+ function animateCornerRadius(from, to, progress) {
66
+ const nativeView = to.nativeViewProtected;
67
+ if (!nativeView) {
68
+ return;
45
69
  }
46
- CustomLinearInterpolator.prototype.getInterpolation = function (input) {
47
- var res = _super.prototype.getInterpolation.call(this, input) * 1.1;
48
- if (res > 1) {
49
- return float(1);
50
- }
51
- return float(res);
70
+ const fromRadius = getCornerRadius(from);
71
+ const toRadius = getCornerRadius(to);
72
+ if (Math.abs(fromRadius - toRadius) < 1) {
73
+ return;
74
+ }
75
+ const previousProvider = nativeView.getOutlineProvider();
76
+ const previousClip = nativeView.getClipToOutline();
77
+ nativeView.setOutlineProvider(new android.view.ViewOutlineProvider({
78
+ getOutline(view, outline) {
79
+ const w = view.getWidth();
80
+ const h = view.getHeight();
81
+ outline.setRoundRect(0, 0, w, h, Math.max(0, fromRadius + (toRadius - fromRadius) * progress(w, h)));
82
+ },
83
+ }));
84
+ nativeView.setClipToOutline(true);
85
+ transitionRestores.push(() => {
86
+ nativeView.setOutlineProvider(previousProvider);
87
+ nativeView.setClipToOutline(previousClip);
88
+ nativeView.invalidateOutline();
89
+ });
90
+ }
91
+ /**
92
+ * The entering view (eg a cropped thumbnail) gets the bounds of the view we leave (eg a fullscreen fit image). With its own
93
+ * scale type it shows a cropped, "zoomed in" image on the first frames, before the animation brings it down.
94
+ * Plain ImageViews are handled here, other image views through the handlers registered with SharedTransition.registerElementHandler.
95
+ */
96
+ function animateScaleType(from, to, progress, isBack, imageTransform) {
97
+ const fromNative = from?.nativeViewProtected;
98
+ const toNative = to?.nativeViewProtected;
99
+ if (!fromNative || !toNative) {
100
+ return;
101
+ }
102
+ // custom views (eg the image views of plugins with their own scale type handling) are handled by the plugins
103
+ const context = {
104
+ from: from,
105
+ to: to,
106
+ isBack,
107
+ progress,
108
+ onEnd: (restore) => transitionRestores.push(restore),
109
+ skipImageTransform: () => imageTransform?.excludeTarget(toNative, true),
52
110
  };
53
- return CustomLinearInterpolator;
54
- }(android.view.animation.LinearInterpolator));
111
+ for (const handler of SharedTransition.getElementHandlers()) {
112
+ try {
113
+ if (handler.handle(context)) {
114
+ return;
115
+ }
116
+ }
117
+ catch (err) {
118
+ console.error('PageTransition: shared element handler failed', err);
119
+ }
120
+ }
121
+ if (fromNative instanceof android.widget.ImageView && toNative instanceof android.widget.ImageView) {
122
+ // ChangeImageTransform animates the matrix from the scale type of the view we leave. Only fix the way back
123
+ const fromType = fromNative.getScaleType();
124
+ const toType = toNative.getScaleType();
125
+ if (isBack && fromType !== toType && fromType !== android.widget.ImageView.ScaleType.MATRIX) {
126
+ toNative.setScaleType(fromType);
127
+ transitionRestores.push(() => toNative.setScaleType(toType));
128
+ }
129
+ return;
130
+ }
131
+ }
132
+ function animateSharedElement(from, to, isBack, imageTransform) {
133
+ const fromNative = from?.nativeViewProtected;
134
+ const toNative = to?.nativeViewProtected;
135
+ if (!fromNative || !toNative) {
136
+ return;
137
+ }
138
+ const progress = createProgress(fromNative, toNative);
139
+ try {
140
+ animateScaleType(from, to, progress, isBack, imageTransform);
141
+ animateCornerRadius(from, to, progress);
142
+ }
143
+ catch (err) {
144
+ // never break the navigation for a cosmetic animation
145
+ console.error('PageTransition: failed to animate the shared element', err);
146
+ }
147
+ }
55
148
  function setTransitionName(view, value) {
56
149
  if (!view?.sharedTransitionTag) {
57
150
  return;
58
151
  }
59
152
  try {
60
153
  androidx.core.view.ViewCompat.setTransitionName(view.nativeView, value !== undefined ? value : view.sharedTransitionTag);
154
+ if (value === null) {
155
+ namedViews.delete(view);
156
+ }
157
+ else {
158
+ namedViews.add(view);
159
+ }
61
160
  }
62
161
  catch (err) {
63
162
  // ignore
64
163
  }
65
164
  }
165
+ function runTransitionRestores() {
166
+ const restores = transitionRestores.splice(0, transitionRestores.length);
167
+ for (const restore of restores) {
168
+ try {
169
+ restore();
170
+ }
171
+ catch (err) {
172
+ // ignore
173
+ }
174
+ }
175
+ }
176
+ function resetNamedViews() {
177
+ runTransitionRestores();
178
+ const views = Array.from(namedViews);
179
+ namedViews.clear();
180
+ for (const view of views) {
181
+ const nativeView = view.nativeViewProtected;
182
+ if (!nativeView) {
183
+ continue;
184
+ }
185
+ try {
186
+ androidx.core.view.ViewCompat.setTransitionName(nativeView, null);
187
+ nativeView.setTransitionAlpha(1);
188
+ }
189
+ catch (err) {
190
+ // ignore
191
+ }
192
+ }
193
+ }
66
194
  export class PageTransition extends Transition {
67
195
  constructor(duration, curve, pageLoadedTimeout = 0) {
68
- // disable custom curves until we can fix the issue with the animation not completing
69
- if (curve) {
70
- console.warn('PageTransition does not support custom curves at the moment. The passed in curve will be ignored.');
71
- }
72
196
  if (typeof duration !== 'number') {
73
197
  duration = 500;
74
198
  }
75
- super(duration);
199
+ // curve: same values as Animation curves (string, CubicBezierAnimationCurve, android Interpolator)
200
+ super(duration, curve ?? defaultCurve());
76
201
  this.pageLoadedTimeout = pageLoadedTimeout;
77
202
  }
203
+ /**
204
+ * The curve of the pageEnd/pageReturn config (depending on the direction) or the one of the transition
205
+ */
206
+ resolveCurve(state) {
207
+ const curve = state.activeType === SharedTransitionAnimationType.present ? state.pageEnd?.curve : state.pageReturn?.curve;
208
+ return curve ? _resolveAnimationCurve(curve) : this.getCurve();
209
+ }
78
210
  createAndroidAnimator(transitionType) {
79
211
  const state = SharedTransition.getState(this.id);
80
212
  const pageStart = state.pageStart;
@@ -137,17 +269,12 @@ export class PageTransition extends Transition {
137
269
  translationX: translationXValues,
138
270
  translationY: translationYValues,
139
271
  };
272
+ const interpolator = this.resolveCurve(state);
140
273
  const animations = new java.util.HashSet();
141
274
  for (const prop in properties) {
142
275
  // console.log(prop, ' ', properties[prop][1]);
143
276
  const animator = android.animation.ObjectAnimator.ofFloat(null, prop, properties[prop]);
144
- if (customDuration) {
145
- // duration always overrides default spring
146
- animator.setInterpolator(new CustomLinearInterpolator());
147
- }
148
- else {
149
- animator.setInterpolator(new CustomSpringInterpolator());
150
- }
277
+ animator.setInterpolator(interpolator);
151
278
  animations.add(animator);
152
279
  }
153
280
  animationSet.playTogether(animations);
@@ -205,6 +332,9 @@ export class PageTransition extends Transition {
205
332
  // independentView.opacity = 0;
206
333
  // }
207
334
  // }
335
+ const frame = toPage.frame;
336
+ const isBack = !!frame?.backStack?.includes?.(newEntry);
337
+ let imageTransform;
208
338
  const onPageLoaded = () => {
209
339
  // add a timeout so that Views like ListView / CollectionView can have their children instantiated
210
340
  setTimeout(() => {
@@ -214,7 +344,10 @@ export class PageTransition extends Transition {
214
344
  presented = presented.filter((v) => keys.indexOf(v.sharedTransitionTag) !== -1);
215
345
  }
216
346
  // const sharedElementTags = sharedElements.map((v) => v.sharedTransitionTag);
217
- presented.forEach((v) => setTransitionName(v));
347
+ presented.forEach((v) => {
348
+ setTransitionName(v);
349
+ animateSharedElement(presenting.find((p) => p.sharedTransitionTag === v.sharedTransitionTag), v, isBack, imageTransform);
350
+ });
218
351
  newFragment.startPostponedEnterTransition();
219
352
  }, this.pageLoadedTimeout);
220
353
  };
@@ -231,15 +364,10 @@ export class PageTransition extends Transition {
231
364
  transitionSet.addTransition(new androidx.transition.ChangeBounds());
232
365
  transitionSet.addTransition(new androidx.transition.ChangeClipBounds());
233
366
  transitionSet.addTransition(new androidx.transition.ChangeTransform());
234
- transitionSet.addTransition(new androidx.transition.ChangeImageTransform());
367
+ imageTransform = new androidx.transition.ChangeImageTransform();
368
+ transitionSet.addTransition(imageTransform);
235
369
  transitionSet.setOrdering(androidx.transition.TransitionSet.ORDERING_TOGETHER);
236
- if (customDuration) {
237
- // duration always overrides default spring
238
- transitionSet.setInterpolator(new CustomLinearInterpolator());
239
- }
240
- else {
241
- transitionSet.setInterpolator(new CustomSpringInterpolator());
242
- }
370
+ transitionSet.setInterpolator(this.resolveCurve(state));
243
371
  // postpone enter until we call "loaded" on the new page
244
372
  newFragment.postponeEnterTransition();
245
373
  newFragment.setSharedElementEnterTransition(transitionSet);
@@ -270,6 +398,7 @@ export class PageTransition extends Transition {
270
398
  }
271
399
  }
272
400
  onTransitionEnd(entry) {
401
+ resetNamedViews();
273
402
  // as we use hide on fragments instead of remove
274
403
  // we need to reset setTransitionName after transition end
275
404
  // otherwise it will break next transitions using the same transitionName
@@ -1 +1 @@
1
- {"version":3,"file":"page-transition.android.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/page-transition.android.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,gBAAg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AAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAEpH,OAAO;QACN,UAAU;QACV,QAAQ;KACR,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"page-transition.android.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/page-transition.android.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,6BAA6B,EAAoD,MAAM,qBAAqB,CAAC;AAE1J,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,IAAI,MAAM,kBAAkB,CAAC;;;;;;IATmB,CAAC;;;IACnD,CAAC;;IAA+D,CAAC;;AAC5B,CAAC;AAuB3C,MAAM,mBAAoB,SAAQ,WAAW;IAC5C,gBAAgB;QACf,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC;CACD;AAED,2HAA2H;AAC3H,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,EAAE,CAAO,QAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAwC,CAAC,CAAC;AAE1J,+GAA+G;AAC/G,4GAA4G;AAC5G,2GAA2G;AAC3G,qDAAqD;AACrD,MA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AAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,oBAAoB,CAAC,IAAU;IACvC,MAAM,UAAU,GAAG,IAAI,mBAAmB,EAAE,CAAC;IAC7C,MAAM,QAAQ,GAAG,IAAI,UAAU,EAAE,CAAC,CAAC,kDAAkD;IACrF,UAAU,CAAC,OAAO,GAAG,QAAQ,CAAC;IAC9B,UAAU,CAAC,UAAU,GAAG,UAAU,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxB,UAAU,CAAC,gBAAgB,CAAC,YAAY,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAClE,UAAU,CAAC,UAAU,EAAE,CAAC;IAExB,YAAY,CAAC,kBAAkB,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAEpH,OAAO;QACN,UAAU;QACV,QAAQ;KACR,CAAC;AACH,CAAC","sourcesContent":["import type { View } from '../core/view';\nimport type { ViewBase } from '../core/view-base';\nimport type { BackstackEntry } from '../frame';\nimport { isNumber } from '../../utils/types';\nimport { Transition } from '.';\nimport { getRectFromProps, SharedTransition, SharedTransitionAnimationType, SharedTransitionEventData, SharedTransitionState } from './shared-transition';\nimport type { SharedElementTransitionContext } from './shared-transition';\nimport { ImageSource } from '../../image-source';\nimport { ContentView } from '../content-view';\nimport { GridLayout } from '../layouts/grid-layout';\nimport { Screen } from '../../platform/screen';\nimport { ExpandedEntry } from '../frame/fragment.transitions.android';\nimport { android as androidUtils } from '../../utils/native-helper';\nimport { _resolveAnimationCurve } from '../animation';\nimport lazy from '../../utils/lazy';\n// import { Image } from '../image';\n\n@NativeClass\nclass SnapshotViewGroup extends android.view.ViewGroup {\n\tconstructor(context: android.content.Context) {\n\t\tsuper(context);\n\t\treturn global.__native(this);\n\t}\n\tpublic onMeasure(): void {\n\t\tthis.setMeasuredDimension(0, 0);\n\t}\n\tpublic onLayout(): void {\n\t\t//\n\t}\n}\nclass ContentViewSnapshot extends ContentView {\n\tcreateNativeView() {\n\t\treturn new SnapshotViewGroup(this._context);\n\t}\n}\n\n// Material \"standard\" easing (FastOutSlowIn). Overridable with the `curve` of the PageTransition or of pageEnd/pageReturn.\nconst defaultCurve = lazy(() => (<any>androidx).core.view.animation.PathInterpolatorCompat.create(0.4, 0, 0.2, 1) as android.view.animation.Interpolator);\n\n// Views we gave a transition name to. They are reset when a transition ends, whatever the transition instance:\n// the instance used to go back is a different one than the one used to go forward and the views of the page\n// we return to (eg pager/list cells which are recycled) must not keep a stale name, or the next transition\n// would pick the wrong view (wrong start/end frame).\nconst namedViews = new Set<ViewBase>();\n// What we changed on views for the duration of a transition (scale type, outline...), to undo when it ends\nconst transitionRestores: Array<() => void> = [];\n\n/**\n * Progress (0 at the bounds of the view we leave, 1 at the own bounds of the view we enter) of the shared element,\n * deduced from its current size. Following the real size (instead of running our own animator) keeps whatever we animate\n * in sync with the transition, whatever its duration, interpolator or spring.\n */\nfunction createProgress(fromView: android.view.View, toView: android.view.View) {\n\tconst startW = fromView.getWidth();\n\tconst startH = fromView.getHeight();\n\tconst dw = toView.getWidth() - startW;\n\tconst dh = toView.getHeight() - startH;\n\treturn (w: number, h: number) => {\n\t\tif (Math.abs(dw) < 2 && Math.abs(dh) < 2) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn Math.abs(dw) >= Math.abs(dh) ? (w - startW) / dw : (h - startH) / dh;\n\t};\n}\n\nfunction getCornerRadius(view: ViewBase) {\n\tconst v = view as any;\n\t// in dip. Uniform radius only: an outline can't do more\n\tconst radius = Math.max(\n\t\tv.effectiveBorderTopLeftRadius || 0,\n\t\tv.effectiveBorderTopRightRadius || 0,\n\t\tv.effectiveBorderBottomRightRadius || 0,\n\t\tv.effectiveBorderBottomLeftRadius || 0,\n\t\tv.roundTopLeftRadius || 0,\n\t\tv.roundTopRightRadius || 0,\n\t\tv.roundBottomRightRadius || 0,\n\t\tv.roundBottomLeftRadius || 0,\n\t);\n\treturn radius * Screen.mainScreen.scale;\n}\n\n/**\n * The entering view gets the size of the view we leave then animates to its own: animate its corner radius the same way\n * (eg a rounded thumbnail <-> a fullscreen image) instead of jumping to the radius of the entering view on the first frame.\n */\nfunction animateCornerRadius(from: ViewBase, to: ViewBase, progress: (w: number, h: number) => number) {\n\tconst nativeView = to.nativeViewProtected as android.view.View;\n\tif (!nativeView) {\n\t\treturn;\n\t}\n\tconst fromRadius = getCornerRadius(from);\n\tconst toRadius = getCornerRadius(to);\n\tif (Math.abs(fromRadius - toRadius) < 1) {\n\t\treturn;\n\t}\n\tconst previousProvider = nativeView.getOutlineProvider();\n\tconst previousClip = nativeView.getClipToOutline();\n\tnativeView.setOutlineProvider(\n\t\tnew (android.view.ViewOutlineProvider as any)({\n\t\t\tgetOutline(view: android.view.View, outline: android.graphics.Outline) {\n\t\t\t\tconst w = view.getWidth();\n\t\t\t\tconst h = view.getHeight();\n\t\t\t\toutline.setRoundRect(0, 0, w, h, Math.max(0, fromRadius + (toRadius - fromRadius) * progress(w, h)));\n\t\t\t},\n\t\t}),\n\t);\n\tnativeView.setClipToOutline(true);\n\ttransitionRestores.push(() => {\n\t\tnativeView.setOutlineProvider(previousProvider);\n\t\tnativeView.setClipToOutline(previousClip);\n\t\tnativeView.invalidateOutline();\n\t});\n}\n\n/**\n * The entering view (eg a cropped thumbnail) gets the bounds of the view we leave (eg a fullscreen fit image). With its own\n * scale type it shows a cropped, \"zoomed in\" image on the first frames, before the animation brings it down.\n * Plain ImageViews are handled here, other image views through the handlers registered with SharedTransition.registerElementHandler.\n */\nfunction animateScaleType(from: ViewBase, to: ViewBase, progress: (w: number, h: number) => number, isBack: boolean, imageTransform: androidx.transition.Transition) {\n\tconst fromNative = from?.nativeViewProtected;\n\tconst toNative = to?.nativeViewProtected;\n\tif (!fromNative || !toNative) {\n\t\treturn;\n\t}\n\t// custom views (eg the image views of plugins with their own scale type handling) are handled by the plugins\n\tconst context: SharedElementTransitionContext = {\n\t\tfrom: from as View,\n\t\tto: to as View,\n\t\tisBack,\n\t\tprogress,\n\t\tonEnd: (restore) => transitionRestores.push(restore),\n\t\tskipImageTransform: () => imageTransform?.excludeTarget(toNative, true),\n\t};\n\tfor (const handler of SharedTransition.getElementHandlers()) {\n\t\ttry {\n\t\t\tif (handler.handle(context)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('PageTransition: shared element handler failed', err);\n\t\t}\n\t}\n\tif (fromNative instanceof android.widget.ImageView && toNative instanceof android.widget.ImageView) {\n\t\t// ChangeImageTransform animates the matrix from the scale type of the view we leave. Only fix the way back\n\t\tconst fromType = fromNative.getScaleType();\n\t\tconst toType = toNative.getScaleType();\n\t\tif (isBack && fromType !== toType && fromType !== android.widget.ImageView.ScaleType.MATRIX) {\n\t\t\ttoNative.setScaleType(fromType);\n\t\t\ttransitionRestores.push(() => toNative.setScaleType(toType));\n\t\t}\n\t\treturn;\n\t}\n}\n\nfunction animateSharedElement(from: ViewBase, to: ViewBase, isBack: boolean, imageTransform: androidx.transition.Transition) {\n\tconst fromNative = from?.nativeViewProtected as android.view.View;\n\tconst toNative = to?.nativeViewProtected as android.view.View;\n\tif (!fromNative || !toNative) {\n\t\treturn;\n\t}\n\tconst progress = createProgress(fromNative, toNative);\n\ttry {\n\t\tanimateScaleType(from, to, progress, isBack, imageTransform);\n\t\tanimateCornerRadius(from, to, progress);\n\t} catch (err) {\n\t\t// never break the navigation for a cosmetic animation\n\t\tconsole.error('PageTransition: failed to animate the shared element', err);\n\t}\n}\n\nfunction setTransitionName(view: ViewBase, value?) {\n\tif (!view?.sharedTransitionTag) {\n\t\treturn;\n\t}\n\ttry {\n\t\tandroidx.core.view.ViewCompat.setTransitionName(view.nativeView, value !== undefined ? value : view.sharedTransitionTag);\n\t\tif (value === null) {\n\t\t\tnamedViews.delete(view);\n\t\t} else {\n\t\t\tnamedViews.add(view);\n\t\t}\n\t} catch (err) {\n\t\t// ignore\n\t}\n}\n\nfunction runTransitionRestores() {\n\tconst restores = transitionRestores.splice(0, transitionRestores.length);\n\tfor (const restore of restores) {\n\t\ttry {\n\t\t\trestore();\n\t\t} catch (err) {\n\t\t\t// ignore\n\t\t}\n\t}\n}\n\nfunction resetNamedViews() {\n\trunTransitionRestores();\n\tconst views = Array.from(namedViews);\n\tnamedViews.clear();\n\tfor (const view of views) {\n\t\tconst nativeView = view.nativeViewProtected as android.view.View;\n\t\tif (!nativeView) {\n\t\t\tcontinue;\n\t\t}\n\t\ttry {\n\t\t\tandroidx.core.view.ViewCompat.setTransitionName(nativeView, null);\n\t\t\tnativeView.setTransitionAlpha(1);\n\t\t} catch (err) {\n\t\t\t// ignore\n\t\t}\n\t}\n}\n\nexport class PageTransition extends Transition {\n\tconstructor(\n\t\tduration?: number,\n\t\tcurve?: any,\n\t\tprivate pageLoadedTimeout: number = 0,\n\t) {\n\t\tif (typeof duration !== 'number') {\n\t\t\tduration = 500;\n\t\t}\n\t\t// curve: same values as Animation curves (string, CubicBezierAnimationCurve, android Interpolator)\n\t\tsuper(duration, curve ?? defaultCurve());\n\t}\n\n\t/**\n\t * The curve of the pageEnd/pageReturn config (depending on the direction) or the one of the transition\n\t */\n\tprivate resolveCurve(state: SharedTransitionState): android.view.animation.Interpolator {\n\t\tconst curve = state.activeType === SharedTransitionAnimationType.present ? state.pageEnd?.curve : state.pageReturn?.curve;\n\t\treturn curve ? _resolveAnimationCurve(curve) : this.getCurve();\n\t}\n\n\tcreateAndroidAnimator(transitionType: string) {\n\t\tconst state = SharedTransition.getState(this.id);\n\t\tconst pageStart = state.pageStart;\n\t\tconst startFrame = getRectFromProps(pageStart, {\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t\twidth: Screen.mainScreen.widthPixels,\n\t\t\theight: Screen.mainScreen.heightPixels,\n\t\t});\n\t\tconst pageEnd = state.pageEnd;\n\t\tconst endFrame = getRectFromProps(pageEnd);\n\t\tconst pageReturn = state.pageReturn;\n\t\tconst returnFrame = getRectFromProps(pageReturn);\n\n\t\tlet customDuration = -1;\n\t\tif (state.activeType === SharedTransitionAnimationType.present && isNumber(pageEnd?.duration)) {\n\t\t\tcustomDuration = pageEnd.duration;\n\t\t} else if (isNumber(state.pageReturn?.duration)) {\n\t\t\tcustomDuration = state.pageReturn.duration;\n\t\t}\n\n\t\tconst animationSet = new android.animation.AnimatorSet();\n\t\tanimationSet.setDuration(customDuration > -1 ? customDuration : this.getDuration());\n\n\t\tconst alphaValues = Array.create('float', 2);\n\t\tconst translationXValues = Array.create('float', 2);\n\t\tconst translationYValues = Array.create('float', 2);\n\t\tswitch (transitionType) {\n\t\t\tcase Transition.AndroidTransitionType.enter:\n\t\t\t\t// incoming page (to)\n\t\t\t\talphaValues[0] = isNumber(pageStart?.opacity) ? pageStart?.opacity : 0;\n\t\t\t\talphaValues[1] = isNumber(pageEnd?.opacity) ? pageEnd?.opacity : 1;\n\t\t\t\ttranslationYValues[0] = startFrame.y;\n\t\t\t\ttranslationYValues[1] = endFrame.y;\n\t\t\t\ttranslationXValues[0] = startFrame.x;\n\t\t\t\ttranslationXValues[1] = endFrame.x;\n\t\t\t\tbreak;\n\t\t\tcase Transition.AndroidTransitionType.exit:\n\t\t\t\t// current page (from)\n\t\t\t\talphaValues[0] = 1;\n\t\t\t\talphaValues[1] = 0;\n\t\t\t\ttranslationYValues[0] = 0;\n\t\t\t\ttranslationYValues[1] = 0;\n\t\t\t\tbreak;\n\t\t\tcase Transition.AndroidTransitionType.popEnter:\n\t\t\t\t// current page (returning to)\n\t\t\t\talphaValues[0] = 0;\n\t\t\t\talphaValues[1] = 1;\n\t\t\t\tbreak;\n\t\t\tcase Transition.AndroidTransitionType.popExit:\n\t\t\t\t// removing page (to)\n\t\t\t\talphaValues[0] = isNumber(pageEnd?.opacity) ? pageEnd?.opacity : 1;\n\t\t\t\talphaValues[1] = isNumber(pageStart?.opacity) ? pageStart?.opacity : 0;\n\t\t\t\ttranslationYValues[0] = endFrame.y;\n\t\t\t\ttranslationYValues[1] = startFrame.y;\n\t\t\t\ttranslationXValues[0] = endFrame.x;\n\t\t\t\ttranslationXValues[1] = startFrame.x;\n\t\t\t\tbreak;\n\t\t}\n\t\tconst properties = {\n\t\t\talpha: alphaValues,\n\t\t\ttranslationX: translationXValues,\n\t\t\ttranslationY: translationYValues,\n\t\t};\n\n\t\tconst interpolator = this.resolveCurve(state);\n\t\tconst animations = new java.util.HashSet<any>();\n\t\tfor (const prop in properties) {\n\t\t\t// console.log(prop, ' ', properties[prop][1]);\n\t\t\tconst animator = android.animation.ObjectAnimator.ofFloat(null, prop, properties[prop]);\n\t\t\tanimator.setInterpolator(interpolator);\n\t\t\tanimations.add(animator);\n\t\t}\n\n\t\tanimationSet.playTogether(animations);\n\n\t\treturn animationSet;\n\t}\n\n\tandroidFragmentTransactionCallback(fragmentTransaction: androidx.fragment.app.FragmentTransaction, currentEntry: ExpandedEntry, newEntry: BackstackEntry) {\n\t\tconst fromPage = currentEntry.resolvedPage;\n\t\tconst toPage = newEntry.resolvedPage;\n\t\tconst newFragment: androidx.fragment.app.Fragment = newEntry.fragment;\n\t\tconst state = SharedTransition.getState(this.id);\n\t\tif (!state) {\n\t\t\t// when navigating transition is set on the currentEntry but never cleaned up\n\t\t\t// which means that on a next navigation forward (without transition) and back\n\t\t\t// we will go here with an empty state!\n\t\t\tcurrentEntry.transition = null;\n\t\t\treturn;\n\t\t}\n\n\t\tconst pageStart = state.pageStart;\n\t\tconst pageEnd = state.pageEnd;\n\n\t\t//we can't look for presented right now as the toPage might not be loaded\n\t\t// and thus some views like ListView/Pager... might not have loaded their \"children\"\n\t\t// presented will be handled in loaded event of toPage\n\t\tlet { presenting } = SharedTransition.getSharedElements(fromPage, null);\n\n\t\tif (pageStart?.sharedTransitionTags) {\n\t\t\tconst keys = Object.keys(pageStart?.sharedTransitionTags);\n\t\t\tpresenting = presenting.filter((v) => keys.indexOf(v.sharedTransitionTag) !== -1);\n\t\t}\n\t\t// Note: we can enhance android more over time with element targeting across different screens\n\t\t// const pageStart = state.pageStart;\n\t\t// const pageEndIndependentTags = Object.keys(pageEnd?.sharedTransitionTags || {});\n\t\t// console.log('pageEndIndependentTags:', pageEndIndependentTags);\n\t\t// for (const tag of pageEndIndependentTags) {\n\t\t// \t// only consider start when there's a matching end\n\t\t// \tconst pageStartIndependentProps = pageStart?.sharedTransitionTags[tag];\n\t\t// \tif (pageStartIndependentProps) {\n\t\t// \t\tconsole.log('pageStartIndependentProps:', tag, pageStartIndependentProps);\n\t\t// \t}\n\t\t// \tconst pageEndIndependentProps = pageEnd?.sharedTransitionTags[tag];\n\t\t// \tlet independentView = presenting.find((v) => v.sharedTransitionTag === tag);\n\t\t// \tlet isPresented = false;\n\t\t// \tif (!independentView) {\n\t\t// \t\tindependentView = presented.find((v) => v.sharedTransitionTag === tag);\n\t\t// \t\tif (!independentView) {\n\t\t// \t\t\tbreak;\n\t\t// \t\t}\n\t\t// \t\tisPresented = true;\n\t\t// \t}\n\t\t// \tif (independentView) {\n\t\t// \t\tconsole.log('independentView:', independentView);\n\t\t// \t\tconst imageSource = renderToImageSource(independentView);\n\t\t// \t\tconst image = new Image();\n\t\t// \t\timage.src = imageSource;\n\t\t// \t\tconst { hostView } = loadViewInBackground(image);\n\t\t// \t\t(<any>fromPage).addChild(hostView);\n\t\t// \t\tindependentView.opacity = 0;\n\t\t// \t}\n\t\t// }\n\t\tconst frame = toPage.frame as any;\n\t\tconst isBack = !!frame?.backStack?.includes?.(newEntry);\n\t\tlet imageTransform: androidx.transition.Transition;\n\t\tconst onPageLoaded = () => {\n\t\t\t// add a timeout so that Views like ListView / CollectionView can have their children instantiated\n\t\t\tsetTimeout(() => {\n\t\t\t\tlet { presented } = SharedTransition.getSharedElements(fromPage, toPage);\n\t\t\t\tif (pageEnd?.sharedTransitionTags) {\n\t\t\t\t\tconst keys = Object.keys(pageEnd?.sharedTransitionTags);\n\t\t\t\t\tpresented = presented.filter((v) => keys.indexOf(v.sharedTransitionTag) !== -1);\n\t\t\t\t}\n\t\t\t\t// const sharedElementTags = sharedElements.map((v) => v.sharedTransitionTag);\n\t\t\t\tpresented.forEach((v) => {\n\t\t\t\t\tsetTransitionName(v);\n\t\t\t\t\tanimateSharedElement(\n\t\t\t\t\t\tpresenting.find((p) => p.sharedTransitionTag === v.sharedTransitionTag),\n\t\t\t\t\t\tv,\n\t\t\t\t\t\tisBack,\n\t\t\t\t\t\timageTransform,\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t\tnewFragment.startPostponedEnterTransition();\n\t\t\t}, this.pageLoadedTimeout);\n\t\t};\n\n\t\tfragmentTransaction.setReorderingAllowed(true);\n\n\t\tlet customDuration = -1;\n\t\tif (state.activeType === SharedTransitionAnimationType.present && isNumber(pageEnd?.duration)) {\n\t\t\tcustomDuration = pageEnd.duration;\n\t\t} else if (isNumber(state.pageReturn?.duration)) {\n\t\t\tcustomDuration = state.pageReturn.duration;\n\t\t}\n\n\t\tconst transitionSet = new androidx.transition.TransitionSet();\n\t\ttransitionSet.setDuration(customDuration > -1 ? customDuration : this.getDuration());\n\t\ttransitionSet.addTransition(new androidx.transition.ChangeBounds());\n\t\ttransitionSet.addTransition(new androidx.transition.ChangeClipBounds());\n\t\ttransitionSet.addTransition(new androidx.transition.ChangeTransform());\n\t\timageTransform = new androidx.transition.ChangeImageTransform();\n\t\ttransitionSet.addTransition(imageTransform);\n\t\ttransitionSet.setOrdering(androidx.transition.TransitionSet.ORDERING_TOGETHER);\n\n\t\ttransitionSet.setInterpolator(this.resolveCurve(state));\n\n\t\t// postpone enter until we call \"loaded\" on the new page\n\t\tnewFragment.postponeEnterTransition();\n\t\tnewFragment.setSharedElementEnterTransition(transitionSet);\n\t\tnewFragment.setSharedElementReturnTransition(transitionSet);\n\n\t\t// Guard against duplicate shared element names being added to the same transaction\n\t\tconst addedSharedElementNames = new Set();\n\t\tpresenting.forEach((v) => {\n\t\t\tconst name = v?.sharedTransitionTag;\n\t\t\tconst nativeView = v?.nativeView;\n\t\t\tif (!name || !nativeView || addedSharedElementNames.has(name)) {\n\t\t\t\t// prevent duplicates or invalid items\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetTransitionName(v);\n\t\t\ttry {\n\t\t\t\tfragmentTransaction.addSharedElement(nativeView, name);\n\t\t\t\taddedSharedElementNames.add(name);\n\t\t\t} catch (err) {\n\t\t\t\t// ignore duplicates or issues adding shared element to avoid crashing\n\t\t\t}\n\t\t});\n\t\tif (toPage.isLoaded) {\n\t\t\tonPageLoaded();\n\t\t} else {\n\t\t\ttoPage.once('loaded', onPageLoaded);\n\t\t}\n\t}\n\tonTransitionEnd(entry) {\n\t\tresetNamedViews();\n\t\t// as we use hide on fragments instead of remove\n\t\t// we need to reset setTransitionName after transition end\n\t\t// otherwise it will break next transitions using the same transitionName\n\t\tconst fromPage = entry?.resolvedPage;\n\t\tconst { presenting } = SharedTransition.getSharedElements(fromPage, null);\n\t\tpresenting.forEach((v) => {\n\t\t\tsetTransitionName(v, null);\n\t\t\t// androidx.transition.ChangeTransform does not restore setTransitionAlpha\n\t\t\t// which makes the view invisible.\n\t\t\t// can be a problem when the transition view on the return animation is not the same as enter\n\t\t\t// one example is RecyclerView to ViewPager transition\n\t\t\t(v.nativeViewProtected as android.view.View).setTransitionAlpha(1);\n\t\t});\n\t}\n}\n\nfunction renderToImageSource(hostView: View): ImageSource {\n\tconst bitmap = android.graphics.Bitmap.createBitmap(hostView.android.getWidth(), hostView.android.getHeight(), android.graphics.Bitmap.Config.ARGB_8888);\n\tconst canvas = new android.graphics.Canvas(bitmap);\n\t// ensure we start with a blank transparent canvas\n\tcanvas.drawARGB(0, 0, 0, 0);\n\thostView.android.draw(canvas);\n\treturn new ImageSource(bitmap);\n}\n\nfunction loadViewInBackground(view: View) {\n\tconst hiddenHost = new ContentViewSnapshot();\n\tconst hostView = new GridLayout(); // use a host view to ensure margins are respected\n\thiddenHost.content = hostView;\n\thiddenHost.visibility = 'collapse';\n\thostView.addChild(view);\n\thiddenHost._setupAsRootView(androidUtils.getApplicationContext());\n\thiddenHost.callLoaded();\n\n\tandroidUtils.getCurrentActivity().addContentView(hiddenHost.android, new android.view.ViewGroup.LayoutParams(0, 0));\n\n\treturn {\n\t\thiddenHost,\n\t\thostView,\n\t};\n}\n"]}
@@ -17,6 +17,11 @@ export declare class PageTransition extends Transition {
17
17
  private _interactiveStartCallback;
18
18
  private _interactiveDismissGesture;
19
19
  private _interactiveGestureTeardown;
20
+ private _gesturePhase;
21
+ private _gestureScrollY;
22
+ private _innerScroll;
23
+ private _scrollWasEnabled;
24
+ private _morphTarget;
20
25
  iosNavigatedController(navigationController: UINavigationController, operation: number, fromVC: UIViewController, toVC: UIViewController): UIViewControllerAnimatedTransitioning;
21
26
  iosInteractionDismiss(animator: UIViewControllerAnimatedTransitioning): UIViewControllerInteractiveTransitioning;
22
27
  setupInteractiveGesture(startCallback: () => void, view: View): () => void;