@akylas/nativescript 9.0.25 → 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 +205 -29
  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 +75 -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,18 +2,72 @@ import { Transition } from '.';
2
2
  import { isNumber } from '../../utils/types';
3
3
  import { CORE_ANIMATION_DEFAULTS, getDurationWithDampingFromSpring } from '../../utils/animation-helpers';
4
4
  import { GestureStateTypes } from '../gestures';
5
+ import { ios as iOSUtils } from '../../utils/native-helper';
5
6
  import { SharedTransition, SharedTransitionAnimationType } from './shared-transition';
6
- import { SharedTransitionHelper } from './shared-transition-helper';
7
+ import { SharedTransitionHelper, removeInteractiveDismissShadow, syncInteractiveDismissShadow } from './shared-transition-helper';
8
+ function _findInnerScroll(view) {
9
+ // Walk the destination's view subtree breadth-first looking for the first
10
+ // UIScrollView. Returned so the dismiss handler can both read its current
11
+ // contentOffset (to tell "was scrolled" from "was at top") and pin it in
12
+ // place while an interactive dismiss is engaged.
13
+ if (!view)
14
+ return null;
15
+ const queue = [view];
16
+ while (queue.length) {
17
+ const v = queue.shift();
18
+ if (!v)
19
+ continue;
20
+ if (v instanceof UIScrollView) {
21
+ return v;
22
+ }
23
+ const subviews = v.subviews;
24
+ if (!subviews)
25
+ continue;
26
+ for (let i = 0; i < subviews.count; i++) {
27
+ queue.push(subviews.objectAtIndex(i));
28
+ }
29
+ }
30
+ return null;
31
+ }
7
32
  export class PageTransition extends Transition {
33
+ constructor() {
34
+ super(...arguments);
35
+ // Tracks the gesture's lifecycle:
36
+ // - 'idle' : no active touch.
37
+ // - 'pending' : touched and might be panning, but we haven't seen enough
38
+ // motion to know whether it's a dismiss or a scroll.
39
+ // - 'active' : confirmed dismiss intent — UIKit interactive transition
40
+ // is engaged and the morph transform tracks the finger.
41
+ // - 'ignored' : determined the gesture is a scroll (or upward at the top
42
+ // of a non-scrolling area); we let the gesture run out
43
+ // without engaging UIKit.
44
+ this._gesturePhase = 'idle';
45
+ this._gestureScrollY = 0;
46
+ // The inner UIScrollView (if any) discovered at gesture-began. Held so we
47
+ // can freeze it (scrollEnabled = false) while the dismiss is active and
48
+ // restore the prior value when the gesture ends.
49
+ this._innerScroll = null;
50
+ // Captured at engagement: the matching source element's frame expressed in
51
+ // the destination view's coordinate system. Morph progress interpolates
52
+ // from identity toward this frame so the destination shrinks into place.
53
+ this._morphTarget = null;
54
+ }
8
55
  iosNavigatedController(navigationController, operation, fromVC, toVC) {
9
56
  this.navigationController = navigationController;
10
- if (!this.transitionController) {
11
- this.presented = toVC;
12
- this.presenting = fromVC;
13
- }
57
+ // the roles come from the operation, not from the first call: a transition instance given at goBack
58
+ // is only ever used for a pop and the page we leave is then the "presented" one
59
+ const isPop = operation === 2 /* UINavigationControllerOperation.Pop */;
60
+ this.presented = isPop ? fromVC : toVC;
61
+ this.presenting = isPop ? toVC : fromVC;
14
62
  this.transitionController = PageTransitionController.initWithOwner(new WeakRef(this));
15
63
  // console.log('iosNavigatedController presenting:', this.presenting);
16
64
  this.operation = operation;
65
+ // do not wait for the end of the present animation to know we are going back
66
+ if (SharedTransition.getState(this.id)) {
67
+ SharedTransition.updateState(this.id, {
68
+ activeType: isPop ? SharedTransitionAnimationType.dismiss : SharedTransitionAnimationType.present,
69
+ });
70
+ }
17
71
  return this.transitionController;
18
72
  }
19
73
  iosInteractionDismiss(animator) {
@@ -40,20 +94,83 @@ export class PageTransition extends Transition {
40
94
  return this._interactiveGestureTeardown;
41
95
  }
42
96
  _interactiveDismissGestureHandler(args) {
43
- if (args?.ios?.view) {
44
- // console.log('this.id:', this.id);
45
- const state = SharedTransition.getState(this.id);
46
- if (!state) {
47
- // cleanup and exit, already shutdown
48
- this._teardownGesture();
49
- return;
50
- }
51
- const percent = state.interactive?.dismiss?.percentFormula ? state.interactive.dismiss.percentFormula(args) : args.deltaX / (args.ios.view.bounds.size.width / 2);
52
- if (SharedTransition.DEBUG) {
53
- console.log('Interactive dismissal percentage:', percent);
97
+ if (!args?.ios?.view)
98
+ return;
99
+ const state = SharedTransition.getState(this.id);
100
+ if (!state) {
101
+ this._teardownGesture();
102
+ return;
103
+ }
104
+ const morph = !!state.interactive?.dismiss?.morph;
105
+ const morphOptions = typeof state.interactive?.dismiss?.morph === 'object' ? state.interactive.dismiss.morph : null;
106
+ const viewW = args.ios.view.bounds.size.width;
107
+ const viewH = args.ios.view.bounds.size.height;
108
+ const dx = args.deltaX;
109
+ const dy = args.deltaY;
110
+ const dist = Math.hypot(dx, dy);
111
+ const morphPercent = dist / viewH;
112
+ const percent = state.interactive?.dismiss?.percentFormula ? state.interactive.dismiss.percentFormula(args) : morph ? morphPercent : dx / viewW;
113
+ if (SharedTransition.DEBUG) {
114
+ console.log('Interactive dismissal percentage:', percent, 'phase:', this._gesturePhase);
115
+ }
116
+ switch (args.state) {
117
+ case GestureStateTypes.began: {
118
+ // Defensive reset: a previous interactive dismiss may have been
119
+ // interrupted before its cleanup ran, leaving a lingering
120
+ // transform on the presented view or alpha=0 on source views.
121
+ // Recover from that here so each gesture starts from a clean
122
+ // slate regardless of prior animation state.
123
+ const presentedView = this.presented?.view;
124
+ if (presentedView) {
125
+ presentedView.transform = CGAffineTransformIdentity;
126
+ presentedView.alpha = 1;
127
+ }
128
+ const sources = state.instance?.sharedElements?._allPresentingViews || [];
129
+ for (const v of sources) {
130
+ if (v?.ios)
131
+ v.ios.alpha = v.opacity ?? 1;
132
+ }
133
+ // Don't engage UIKit yet — we need a few points of motion to know
134
+ // whether this is a dismiss gesture or a scroll. Cache the inner
135
+ // scrollview and its contentOffset at gesture start so the decision
136
+ // can tell "was scrolled" from "was at top".
137
+ this._gesturePhase = 'pending';
138
+ this._innerScroll = _findInnerScroll(this.presented?.view);
139
+ this._gestureScrollY = this._innerScroll?.contentOffset.y ?? 0;
140
+ break;
54
141
  }
55
- switch (args.state) {
56
- case GestureStateTypes.began:
142
+ case GestureStateTypes.changed:
143
+ if (this._gesturePhase === 'ignored')
144
+ return;
145
+ if (this._gesturePhase === 'pending') {
146
+ // Wait for enough motion to make a confident direction call.
147
+ const motionThreshold = 8;
148
+ const absX = Math.abs(dx);
149
+ const absY = Math.abs(dy);
150
+ if (absX < motionThreshold && absY < motionThreshold)
151
+ return;
152
+ const horizontalDominant = absX > absY;
153
+ const downward = dy > 0;
154
+ const scrollWasAtTop = this._gestureScrollY <= 0;
155
+ // Engagement rule:
156
+ // - Primarily horizontal motion → always allow (swipe-back).
157
+ // - Vertical-downward motion → only when the inner scrollview
158
+ // was at its top at gesture start (sheet-style dismiss).
159
+ // - Anything else → ignore so the scrollview can take over.
160
+ const shouldEngage = horizontalDominant || (downward && scrollWasAtTop);
161
+ if (!shouldEngage) {
162
+ this._gesturePhase = 'ignored';
163
+ return;
164
+ }
165
+ this._gesturePhase = 'active';
166
+ // Freeze the inner scrollview at its current offset for the
167
+ // duration of the dismiss so the page contents don't scroll
168
+ // along with the dismiss drag (which would shift the morph
169
+ // source mid-flight and make the snap-back look off).
170
+ if (this._innerScroll) {
171
+ this._scrollWasEnabled = this._innerScroll.scrollEnabled;
172
+ this._innerScroll.scrollEnabled = false;
173
+ }
57
174
  SharedTransition.updateState(this.id, {
58
175
  interactiveBegan: true,
59
176
  interactiveCancelled: false,
@@ -61,30 +178,175 @@ export class PageTransition extends Transition {
61
178
  if (this._interactiveStartCallback) {
62
179
  this._interactiveStartCallback();
63
180
  }
64
- break;
65
- case GestureStateTypes.changed:
66
- if (percent < 1) {
67
- if (this.interactiveController) {
68
- this.interactiveController.updateInteractiveTransition(percent);
181
+ // Compute morph target: the matching source element's frame in
182
+ // the destination view's coordinate system. We capture it once
183
+ // at engagement so subsequent moves interpolate toward a stable
184
+ // anchor, even if the source page is scrolled during the drag.
185
+ this._morphTarget = null;
186
+ const stateNow = SharedTransition.getState(this.id);
187
+ if (morph && stateNow) {
188
+ const presented = stateNow.instance?.sharedElements?.presented?.[0];
189
+ const destTag = presented?.view?.sharedTransitionTag;
190
+ const sources = stateNow.instance?.sharedElements?._allPresentingViews || [];
191
+ const matchingSource = sources.find?.((v) => v?.sharedTransitionTag === destTag) || sources[0];
192
+ const srcIos = matchingSource?.ios;
193
+ const destView = this.presented?.view;
194
+ const destSharedIos = presented?.view?.ios;
195
+ if (srcIos && destView) {
196
+ const f = srcIos.convertRectToView(srcIos.bounds, destView);
197
+ const bounds = destView.bounds;
198
+ if (bounds.size.width > 0 && bounds.size.height > 0 && f.size.width > 0) {
199
+ // Uniform scale during drag — feels grabbed/proportional
200
+ // rather than squished. The release spring switches to
201
+ // non-uniform scale + anchored translation in interactiveFinish
202
+ // so the modal's matched element lands exactly on the source.
203
+ const scaleT = Math.min(f.size.width / bounds.size.width, f.size.height / bounds.size.height);
204
+ // Anchor on the modal's internal matched element so the
205
+ // modal and the matched element snapshot converge on the
206
+ // source thumbnail along the same trajectory, instead of
207
+ // the modal drifting toward a center-of-modal target while
208
+ // the matched snapshot heads to the source.
209
+ let txT;
210
+ let tyT;
211
+ const sharedFrameInModal = destSharedIos ? destSharedIos.convertRectToView(destSharedIos.bounds, destView) : null;
212
+ if (sharedFrameInModal && sharedFrameInModal.size.width > 0 && sharedFrameInModal.size.height > 0) {
213
+ const internalCx = sharedFrameInModal.origin.x + sharedFrameInModal.size.width / 2;
214
+ const internalCy = sharedFrameInModal.origin.y + sharedFrameInModal.size.height / 2;
215
+ txT = f.origin.x + f.size.width / 2 - bounds.size.width / 2 - (internalCx - bounds.size.width / 2) * scaleT;
216
+ tyT = f.origin.y + f.size.height / 2 - bounds.size.height / 2 - (internalCy - bounds.size.height / 2) * scaleT;
217
+ }
218
+ else {
219
+ txT = f.origin.x + f.size.width / 2 - bounds.size.width / 2;
220
+ tyT = f.origin.y + f.size.height / 2 - bounds.size.height / 2;
221
+ }
222
+ this._morphTarget = { scale: scaleT, tx: txT, ty: tyT };
223
+ }
224
+ }
225
+ // Hide every source-side element so it doesn't show through
226
+ // the morphing destination. Restored on cancel/finish.
227
+ for (const v of sources) {
228
+ if (v?.ios)
229
+ v.ios.alpha = 0;
230
+ }
231
+ // Reveal source-only orphan views (e.g. other album thumbnails,
232
+ // section headers' info) so the source page looks intact behind
233
+ // the morphing modal. They were hidden during present; without
234
+ // restoring them now, the user sees blank spots through the
235
+ // shrinking modal where artwork/text should be.
236
+ //
237
+ // We also re-apply each view's NS background to nudge UIKit into
238
+ // re-displaying the layer with its corner-radius mask. Without
239
+ // this, some plugin-backed image views (e.g. SDAnimatedImageView)
240
+ // render their cached content with square corners during the
241
+ // transition's compositor pass even though the layer's
242
+ // cornerRadius/masksToBounds are still set correctly.
243
+ for (const ind of stateNow.instance?.sharedElements?.independent || []) {
244
+ if (!ind.isPresented && ind.view?.ios) {
245
+ ind.view.ios.alpha = ind.view.opacity;
246
+ const v = ind.view;
247
+ if (typeof v._redrawNativeBackground === 'function') {
248
+ try {
249
+ v._redrawNativeBackground(v.style?.backgroundInternal);
250
+ }
251
+ catch (_) { }
252
+ }
253
+ ind.view.ios.layer?.setNeedsDisplay?.();
254
+ }
69
255
  }
256
+ // Dismiss shadow is applied from SharedTransitionHelper.interactiveStart
257
+ // (it runs after UIKit has reparented the presented view into the
258
+ // transition's containerView).
70
259
  }
71
- break;
72
- case GestureStateTypes.cancelled:
73
- case GestureStateTypes.ended:
74
- if (this.interactiveController) {
75
- const finishThreshold = isNumber(state.interactive?.dismiss?.finishThreshold) ? state.interactive.dismiss.finishThreshold : 0.5;
76
- if (percent > finishThreshold) {
77
- this._teardownGesture();
78
- this.interactiveController.finishInteractiveTransition();
260
+ }
261
+ if (this._gesturePhase !== 'active')
262
+ return;
263
+ if (morph) {
264
+ const presentedView = this.presented?.view;
265
+ if (presentedView) {
266
+ const minScale = morphOptions?.minScale ?? 0.2;
267
+ // Interpolate from identity (t=0) toward the source frame
268
+ // (t=1) as the drag progresses. `t` accelerates the morph so
269
+ // the destination noticeably shrinks within typical drag
270
+ // distances rather than staying near full size.
271
+ const t = Math.min(dist / (viewH * 0.5), 1);
272
+ const target = this._morphTarget;
273
+ let scale;
274
+ let tx;
275
+ let ty;
276
+ if (target) {
277
+ const targetScale = Math.max(target.scale, minScale);
278
+ scale = 1 + (targetScale - 1) * t;
279
+ // Blend finger-follow (1-t weight) with target-attract
280
+ // (t weight) so the view feels grabbed but gravitates
281
+ // toward the source as the user commits.
282
+ tx = dx * (1 - t) + target.tx * t;
283
+ ty = dy * (1 - t) + target.ty * t;
79
284
  }
80
285
  else {
81
- SharedTransition.updateState(this.id, {
82
- interactiveCancelled: true,
83
- });
84
- this.interactiveController.cancelInteractiveTransition();
286
+ scale = Math.max(minScale, 1 - t * (1 - minScale));
287
+ tx = dx;
288
+ ty = dy;
85
289
  }
290
+ presentedView.transform = CGAffineTransformConcat(CGAffineTransformMakeTranslation(tx, ty), CGAffineTransformMakeScale(scale, scale));
291
+ }
292
+ }
293
+ if (percent < 1 && this.interactiveController) {
294
+ this.interactiveController.updateInteractiveTransition(percent);
295
+ }
296
+ // Mirror the destination's current visual state onto the sibling
297
+ // shadow layer. Done for both morph (direct transform) and non-morph
298
+ // (UIViewPropertyAnimator-driven) — sync reads the presentation
299
+ // layer so it works for both.
300
+ syncInteractiveDismissShadow(this.presented?.view);
301
+ break;
302
+ case GestureStateTypes.cancelled:
303
+ case GestureStateTypes.ended: {
304
+ const phase = this._gesturePhase;
305
+ this._gesturePhase = 'idle';
306
+ // Restore the inner scrollview's scrollEnabled regardless of
307
+ // whether the gesture engaged or was ignored.
308
+ if (this._innerScroll && this._scrollWasEnabled !== undefined) {
309
+ this._innerScroll.scrollEnabled = this._scrollWasEnabled;
310
+ this._scrollWasEnabled = undefined;
311
+ }
312
+ this._innerScroll = null;
313
+ if (phase !== 'active') {
314
+ // Either the gesture never crossed the engagement threshold or
315
+ // we explicitly ignored it (a scroll). Nothing to wind down.
316
+ return;
317
+ }
318
+ const finishThreshold = isNumber(state.interactive?.dismiss?.finishThreshold) ? state.interactive.dismiss.finishThreshold : 0.5;
319
+ const shouldFinish = percent > finishThreshold;
320
+ if (this.interactiveController) {
321
+ if (shouldFinish) {
322
+ this._teardownGesture();
323
+ this.interactiveController.finishInteractiveTransition();
324
+ }
325
+ else {
326
+ SharedTransition.updateState(this.id, {
327
+ interactiveCancelled: true,
328
+ });
329
+ this.interactiveController.cancelInteractiveTransition();
86
330
  }
87
- break;
331
+ // Always restore the modal's layer state we touched to render
332
+ // the dismiss shadow — on cancel (view is being kept) AND on
333
+ // finish (the same NS view instance may be reused on the next
334
+ // presentation, so leaked layer state stacks across dismissals).
335
+ removeInteractiveDismissShadow(this.presented?.view);
336
+ }
337
+ else if (morph) {
338
+ // Fallback: UIKit didn't engage. Reset the morph transform so the
339
+ // destination doesn't stay stuck.
340
+ const presentedView = this.presented?.view;
341
+ if (presentedView) {
342
+ iOSUtils.animateWithSpring({
343
+ animations: () => {
344
+ presentedView.transform = CGAffineTransformIdentity;
345
+ },
346
+ });
347
+ }
348
+ }
349
+ break;
88
350
  }
89
351
  }
90
352
  }
@@ -1 +1 @@
1
- {"version":3,"file":"page-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/page-transition.ios.ts"],"names":[],"mappings":"AACA,OAAO,EAAqD,UAAU,EAAE,MAAM,GAAG,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AAC1G,OAAO,EAAuB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,MAAM,OAAO,cAAe,SAAQ,UAAU;IAiB7C,sBAAsB,CAAC,oBAA4C,EAAE,SAAiB,EAAE,MAAwB,EAAE,IAAsB;QACvI,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAChC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;QAC1B,CAAC;QACD,IAAI,CAAC,oBAAoB,GAAG,wBAAwB,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACtF,sEAAsE;QAEtE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,OAAO,IAAI,CAAC,oBAAoB,CAAC;IAClC,CAAC;IAED,qBAAqB,CAAC,QAA+C;QACpE,8CAA8C;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gB,EAAE,CAAC;4BACxB,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;IAEO,gBAAgB;QACvB,IAAI,IAAI,CAAC,2BAA2B,EAAE,CAAC;YACtC,IAAI,CAAC,2BAA2B,EAAE,CAAC;YACnC,IAAI,CAAC,2BAA2B,GAAG,IAAI,CAAC;QACzC,CAAC;IACF,CAAC;CACD;;;;;IArHqE,CAAC;;;;;IAEA,CAAC;;;;;;;;;;;YAaO,CAAC;QAAc,CAAC;IAC3F,CAAC;;;;;;;QAM+I,CAAC;IAAS,CAAC;;;;;;;QAavI,CAAC;IAAS,CAAC;;;;;;;QAQL,CAAC;IAAS,CAAC;;;AAGJ,CAAC;;;;;IA9CoB,CAAC;;;;;IAER,CAAC;;;;;;;;;gBAc3B,CAAC;;;gBAIjB,CAAC;;;gBAMM,CAAC;;;gBAKF,CAAC;YACT,CAAC;QAAa,CAAC;;IAGkB,CAAC;;;;;;;YAOhC,CAAC;;QAER,CAAC;IAAM,CAAC;;;AAEmC,CAAC"}
1
+ {"version":3,"file":"page-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/page-transition.ios.ts"],"names":[],"mappings":"AACA,OAAO,EAAqD,UAAU,EAAE,MAAM,GAAG,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AAC1G,OAAO,EAAuB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,GAA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;;QACe,CAAC;IAAS,CAAC;;;AAEhB,CAAC","sourcesContent":["import type { View } from '../core/view';\nimport { SharedElementSettings, TransitionInteractiveState, Transition } from '.';\nimport { isNumber } from '../../utils/types';\nimport { CORE_ANIMATION_DEFAULTS, getDurationWithDampingFromSpring } from '../../utils/animation-helpers';\nimport { PanGestureEventData, GestureStateTypes } from '../gestures';\nimport { ios as iOSUtils } from '../../utils/native-helper';\nimport { SharedTransition, SharedTransitionAnimationType } from './shared-transition';\nimport { SharedTransitionHelper, removeInteractiveDismissShadow, syncInteractiveDismissShadow } from './shared-transition-helper';\n\nfunction _findInnerScroll(view: UIView | undefined | null): UIScrollView | null {\n\t// Walk the destination's view subtree breadth-first looking for the first\n\t// UIScrollView. Returned so the dismiss handler can both read its current\n\t// contentOffset (to tell \"was scrolled\" from \"was at top\") and pin it in\n\t// place while an interactive dismiss is engaged.\n\tif (!view) return null;\n\tconst queue: UIView[] = [view];\n\twhile (queue.length) {\n\t\tconst v = queue.shift();\n\t\tif (!v) continue;\n\t\tif (v instanceof UIScrollView) {\n\t\t\treturn v as UIScrollView;\n\t\t}\n\t\tconst subviews = v.subviews;\n\t\tif (!subviews) continue;\n\t\tfor (let i = 0; i < subviews.count; i++) {\n\t\t\tqueue.push(subviews.objectAtIndex(i));\n\t\t}\n\t}\n\treturn null;\n}\n\nexport class PageTransition extends Transition {\n\tdeclare transitionController: PageTransitionController;\n\tdeclare interactiveController: UIPercentDrivenInteractiveTransition;\n\tdeclare presented: UIViewController;\n\tdeclare presenting: UIViewController;\n\tnavigationController: UINavigationController;\n\toperation: number;\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\tprivate _interactiveGestureTeardown: () => void;\n\t// Tracks the gesture's lifecycle:\n\t// - 'idle' : no active touch.\n\t// - 'pending' : touched and might be panning, but we haven't seen enough\n\t// motion to know whether it's a dismiss or a scroll.\n\t// - 'active' : confirmed dismiss intent — UIKit interactive transition\n\t// is engaged and the morph transform tracks the finger.\n\t// - 'ignored' : determined the gesture is a scroll (or upward at the top\n\t// of a non-scrolling area); we let the gesture run out\n\t// without engaging UIKit.\n\tprivate _gesturePhase: 'idle' | 'pending' | 'active' | 'ignored' = 'idle';\n\tprivate _gestureScrollY: number = 0;\n\t// The inner UIScrollView (if any) discovered at gesture-began. Held so we\n\t// can freeze it (scrollEnabled = false) while the dismiss is active and\n\t// restore the prior value when the gesture ends.\n\tprivate _innerScroll: UIScrollView | null = null;\n\tprivate _scrollWasEnabled: boolean | undefined;\n\t// Captured at engagement: the matching source element's frame expressed in\n\t// the destination view's coordinate system. Morph progress interpolates\n\t// from identity toward this frame so the destination shrinks into place.\n\tprivate _morphTarget: { scale: number; tx: number; ty: number } | null = null;\n\n\tiosNavigatedController(navigationController: UINavigationController, operation: number, fromVC: UIViewController, toVC: UIViewController): UIViewControllerAnimatedTransitioning {\n\t\tthis.navigationController = navigationController;\n\t\t// the roles come from the operation, not from the first call: a transition instance given at goBack\n\t\t// is only ever used for a pop and the page we leave is then the \"presented\" one\n\t\tconst isPop = operation === UINavigationControllerOperation.Pop;\n\t\tthis.presented = isPop ? fromVC : toVC;\n\t\tthis.presenting = isPop ? toVC : fromVC;\n\t\tthis.transitionController = PageTransitionController.initWithOwner(new WeakRef(this));\n\t\t// console.log('iosNavigatedController presenting:', this.presenting);\n\n\t\tthis.operation = operation;\n\t\t// do not wait for the end of the present animation to know we are going back\n\t\tif (SharedTransition.getState(this.id)) {\n\t\t\tSharedTransition.updateState(this.id, {\n\t\t\t\tactiveType: isPop ? SharedTransitionAnimationType.dismiss : SharedTransitionAnimationType.present,\n\t\t\t});\n\t\t}\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\tsetupInteractiveGesture(startCallback: () => void, view: View): () => void {\n\t\t// console.log(' -- setupInteractiveGesture --');\n\t\tthis._interactiveStartCallback = startCallback;\n\t\tif (!this._interactiveDismissGesture) {\n\t\t\t// console.log('setup but tearing down first!');\n\t\t\tview.off('pan', this._interactiveDismissGesture);\n\t\t\tthis._interactiveDismissGesture = this._interactiveDismissGestureHandler.bind(this);\n\t\t}\n\t\tview.on('pan', this._interactiveDismissGesture);\n\n\t\tthis._interactiveGestureTeardown = () => {\n\t\t\t// console.log(`-- TEARDOWN setupInteractiveGesture --`);\n\t\t\tif (view) {\n\t\t\t\tview.off('pan', this._interactiveDismissGesture);\n\t\t\t}\n\t\t\tthis._interactiveDismissGesture = null;\n\t\t};\n\t\treturn this._interactiveGestureTeardown;\n\t}\n\n\tprivate _interactiveDismissGestureHandler(args: PanGestureEventData) {\n\t\tif (!args?.ios?.view) return;\n\t\tconst state = SharedTransition.getState(this.id);\n\t\tif (!state) {\n\t\t\tthis._teardownGesture();\n\t\t\treturn;\n\t\t}\n\n\t\tconst morph = !!state.interactive?.dismiss?.morph;\n\t\tconst morphOptions = typeof state.interactive?.dismiss?.morph === 'object' ? state.interactive.dismiss.morph : null;\n\t\tconst viewW = args.ios.view.bounds.size.width;\n\t\tconst viewH = args.ios.view.bounds.size.height;\n\t\tconst dx = args.deltaX;\n\t\tconst dy = args.deltaY;\n\t\tconst dist = Math.hypot(dx, dy);\n\t\tconst morphPercent = dist / viewH;\n\t\tconst percent = state.interactive?.dismiss?.percentFormula ? state.interactive.dismiss.percentFormula(args) : morph ? morphPercent : dx / viewW;\n\t\tif (SharedTransition.DEBUG) {\n\t\t\tconsole.log('Interactive dismissal percentage:', percent, 'phase:', this._gesturePhase);\n\t\t}\n\t\tswitch (args.state) {\n\t\t\tcase GestureStateTypes.began: {\n\t\t\t\t// Defensive reset: a previous interactive dismiss may have been\n\t\t\t\t// interrupted before its cleanup ran, leaving a lingering\n\t\t\t\t// transform on the presented view or alpha=0 on source views.\n\t\t\t\t// Recover from that here so each gesture starts from a clean\n\t\t\t\t// slate regardless of prior animation state.\n\t\t\t\tconst presentedView = this.presented?.view;\n\t\t\t\tif (presentedView) {\n\t\t\t\t\tpresentedView.transform = CGAffineTransformIdentity;\n\t\t\t\t\tpresentedView.alpha = 1;\n\t\t\t\t}\n\t\t\t\tconst sources = state.instance?.sharedElements?._allPresentingViews || [];\n\t\t\t\tfor (const v of sources) {\n\t\t\t\t\tif (v?.ios) v.ios.alpha = v.opacity ?? 1;\n\t\t\t\t}\n\t\t\t\t// Don't engage UIKit yet — we need a few points of motion to know\n\t\t\t\t// whether this is a dismiss gesture or a scroll. Cache the inner\n\t\t\t\t// scrollview and its contentOffset at gesture start so the decision\n\t\t\t\t// can tell \"was scrolled\" from \"was at top\".\n\t\t\t\tthis._gesturePhase = 'pending';\n\t\t\t\tthis._innerScroll = _findInnerScroll(this.presented?.view);\n\t\t\t\tthis._gestureScrollY = this._innerScroll?.contentOffset.y ?? 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase GestureStateTypes.changed:\n\t\t\t\tif (this._gesturePhase === 'ignored') return;\n\t\t\t\tif (this._gesturePhase === 'pending') {\n\t\t\t\t\t// Wait for enough motion to make a confident direction call.\n\t\t\t\t\tconst motionThreshold = 8;\n\t\t\t\t\tconst absX = Math.abs(dx);\n\t\t\t\t\tconst absY = Math.abs(dy);\n\t\t\t\t\tif (absX < motionThreshold && absY < motionThreshold) return;\n\t\t\t\t\tconst horizontalDominant = absX > absY;\n\t\t\t\t\tconst downward = dy > 0;\n\t\t\t\t\tconst scrollWasAtTop = this._gestureScrollY <= 0;\n\t\t\t\t\t// Engagement rule:\n\t\t\t\t\t// - Primarily horizontal motion → always allow (swipe-back).\n\t\t\t\t\t// - Vertical-downward motion → only when the inner scrollview\n\t\t\t\t\t// was at its top at gesture start (sheet-style dismiss).\n\t\t\t\t\t// - Anything else → ignore so the scrollview can take over.\n\t\t\t\t\tconst shouldEngage = horizontalDominant || (downward && scrollWasAtTop);\n\t\t\t\t\tif (!shouldEngage) {\n\t\t\t\t\t\tthis._gesturePhase = 'ignored';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._gesturePhase = 'active';\n\t\t\t\t\t// Freeze the inner scrollview at its current offset for the\n\t\t\t\t\t// duration of the dismiss so the page contents don't scroll\n\t\t\t\t\t// along with the dismiss drag (which would shift the morph\n\t\t\t\t\t// source mid-flight and make the snap-back look off).\n\t\t\t\t\tif (this._innerScroll) {\n\t\t\t\t\t\tthis._scrollWasEnabled = this._innerScroll.scrollEnabled;\n\t\t\t\t\t\tthis._innerScroll.scrollEnabled = false;\n\t\t\t\t\t}\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\tif (this._interactiveStartCallback) {\n\t\t\t\t\t\tthis._interactiveStartCallback();\n\t\t\t\t\t}\n\t\t\t\t\t// Compute morph target: the matching source element's frame in\n\t\t\t\t\t// the destination view's coordinate system. We capture it once\n\t\t\t\t\t// at engagement so subsequent moves interpolate toward a stable\n\t\t\t\t\t// anchor, even if the source page is scrolled during the drag.\n\t\t\t\t\tthis._morphTarget = null;\n\t\t\t\t\tconst stateNow = SharedTransition.getState(this.id);\n\t\t\t\t\tif (morph && stateNow) {\n\t\t\t\t\t\tconst presented = stateNow.instance?.sharedElements?.presented?.[0];\n\t\t\t\t\t\tconst destTag = presented?.view?.sharedTransitionTag;\n\t\t\t\t\t\tconst sources = (stateNow.instance?.sharedElements as any)?._allPresentingViews || [];\n\t\t\t\t\t\tconst matchingSource = sources.find?.((v: any) => v?.sharedTransitionTag === destTag) || sources[0];\n\t\t\t\t\t\tconst srcIos = matchingSource?.ios;\n\t\t\t\t\t\tconst destView = this.presented?.view;\n\t\t\t\t\t\tconst destSharedIos = presented?.view?.ios;\n\t\t\t\t\t\tif (srcIos && destView) {\n\t\t\t\t\t\t\tconst f = srcIos.convertRectToView(srcIos.bounds, destView);\n\t\t\t\t\t\t\tconst bounds = destView.bounds;\n\t\t\t\t\t\t\tif (bounds.size.width > 0 && bounds.size.height > 0 && f.size.width > 0) {\n\t\t\t\t\t\t\t\t// Uniform scale during drag — feels grabbed/proportional\n\t\t\t\t\t\t\t\t// rather than squished. The release spring switches to\n\t\t\t\t\t\t\t\t// non-uniform scale + anchored translation in interactiveFinish\n\t\t\t\t\t\t\t\t// so the modal's matched element lands exactly on the source.\n\t\t\t\t\t\t\t\tconst scaleT = Math.min(f.size.width / bounds.size.width, f.size.height / bounds.size.height);\n\t\t\t\t\t\t\t\t// Anchor on the modal's internal matched element so the\n\t\t\t\t\t\t\t\t// modal and the matched element snapshot converge on the\n\t\t\t\t\t\t\t\t// source thumbnail along the same trajectory, instead of\n\t\t\t\t\t\t\t\t// the modal drifting toward a center-of-modal target while\n\t\t\t\t\t\t\t\t// the matched snapshot heads to the source.\n\t\t\t\t\t\t\t\tlet txT: number;\n\t\t\t\t\t\t\t\tlet tyT: number;\n\t\t\t\t\t\t\t\tconst sharedFrameInModal = destSharedIos ? destSharedIos.convertRectToView(destSharedIos.bounds, destView) : null;\n\t\t\t\t\t\t\t\tif (sharedFrameInModal && sharedFrameInModal.size.width > 0 && sharedFrameInModal.size.height > 0) {\n\t\t\t\t\t\t\t\t\tconst internalCx = sharedFrameInModal.origin.x + sharedFrameInModal.size.width / 2;\n\t\t\t\t\t\t\t\t\tconst internalCy = sharedFrameInModal.origin.y + sharedFrameInModal.size.height / 2;\n\t\t\t\t\t\t\t\t\ttxT = f.origin.x + f.size.width / 2 - bounds.size.width / 2 - (internalCx - bounds.size.width / 2) * scaleT;\n\t\t\t\t\t\t\t\t\ttyT = f.origin.y + f.size.height / 2 - bounds.size.height / 2 - (internalCy - bounds.size.height / 2) * scaleT;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ttxT = f.origin.x + f.size.width / 2 - bounds.size.width / 2;\n\t\t\t\t\t\t\t\t\ttyT = f.origin.y + f.size.height / 2 - bounds.size.height / 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis._morphTarget = { scale: scaleT, tx: txT, ty: tyT };\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Hide every source-side element so it doesn't show through\n\t\t\t\t\t\t// the morphing destination. Restored on cancel/finish.\n\t\t\t\t\t\tfor (const v of sources) {\n\t\t\t\t\t\t\tif (v?.ios) v.ios.alpha = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Reveal source-only orphan views (e.g. other album thumbnails,\n\t\t\t\t\t\t// section headers' info) so the source page looks intact behind\n\t\t\t\t\t\t// the morphing modal. They were hidden during present; without\n\t\t\t\t\t\t// restoring them now, the user sees blank spots through the\n\t\t\t\t\t\t// shrinking modal where artwork/text should be.\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// We also re-apply each view's NS background to nudge UIKit into\n\t\t\t\t\t\t// re-displaying the layer with its corner-radius mask. Without\n\t\t\t\t\t\t// this, some plugin-backed image views (e.g. SDAnimatedImageView)\n\t\t\t\t\t\t// render their cached content with square corners during the\n\t\t\t\t\t\t// transition's compositor pass even though the layer's\n\t\t\t\t\t\t// cornerRadius/masksToBounds are still set correctly.\n\t\t\t\t\t\tfor (const ind of stateNow.instance?.sharedElements?.independent || []) {\n\t\t\t\t\t\t\tif (!ind.isPresented && ind.view?.ios) {\n\t\t\t\t\t\t\t\tind.view.ios.alpha = ind.view.opacity;\n\t\t\t\t\t\t\t\tconst v: any = ind.view;\n\t\t\t\t\t\t\t\tif (typeof v._redrawNativeBackground === 'function') {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tv._redrawNativeBackground(v.style?.backgroundInternal);\n\t\t\t\t\t\t\t\t\t} catch (_) {}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tind.view.ios.layer?.setNeedsDisplay?.();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Dismiss shadow is applied from SharedTransitionHelper.interactiveStart\n\t\t\t\t\t\t// (it runs after UIKit has reparented the presented view into the\n\t\t\t\t\t\t// transition's containerView).\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this._gesturePhase !== 'active') return;\n\t\t\t\tif (morph) {\n\t\t\t\t\tconst presentedView = this.presented?.view;\n\t\t\t\t\tif (presentedView) {\n\t\t\t\t\t\tconst minScale = morphOptions?.minScale ?? 0.2;\n\t\t\t\t\t\t// Interpolate from identity (t=0) toward the source frame\n\t\t\t\t\t\t// (t=1) as the drag progresses. `t` accelerates the morph so\n\t\t\t\t\t\t// the destination noticeably shrinks within typical drag\n\t\t\t\t\t\t// distances rather than staying near full size.\n\t\t\t\t\t\tconst t = Math.min(dist / (viewH * 0.5), 1);\n\t\t\t\t\t\tconst target = this._morphTarget;\n\t\t\t\t\t\tlet scale: number;\n\t\t\t\t\t\tlet tx: number;\n\t\t\t\t\t\tlet ty: number;\n\t\t\t\t\t\tif (target) {\n\t\t\t\t\t\t\tconst targetScale = Math.max(target.scale, minScale);\n\t\t\t\t\t\t\tscale = 1 + (targetScale - 1) * t;\n\t\t\t\t\t\t\t// Blend finger-follow (1-t weight) with target-attract\n\t\t\t\t\t\t\t// (t weight) so the view feels grabbed but gravitates\n\t\t\t\t\t\t\t// toward the source as the user commits.\n\t\t\t\t\t\t\ttx = dx * (1 - t) + target.tx * t;\n\t\t\t\t\t\t\tty = dy * (1 - t) + target.ty * t;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tscale = Math.max(minScale, 1 - t * (1 - minScale));\n\t\t\t\t\t\t\ttx = dx;\n\t\t\t\t\t\t\tty = dy;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpresentedView.transform = CGAffineTransformConcat(CGAffineTransformMakeTranslation(tx, ty), CGAffineTransformMakeScale(scale, scale));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (percent < 1 && this.interactiveController) {\n\t\t\t\t\tthis.interactiveController.updateInteractiveTransition(percent);\n\t\t\t\t}\n\t\t\t\t// Mirror the destination's current visual state onto the sibling\n\t\t\t\t// shadow layer. Done for both morph (direct transform) and non-morph\n\t\t\t\t// (UIViewPropertyAnimator-driven) — sync reads the presentation\n\t\t\t\t// layer so it works for both.\n\t\t\t\tsyncInteractiveDismissShadow(this.presented?.view);\n\t\t\t\tbreak;\n\t\t\tcase GestureStateTypes.cancelled:\n\t\t\tcase GestureStateTypes.ended: {\n\t\t\t\tconst phase = this._gesturePhase;\n\t\t\t\tthis._gesturePhase = 'idle';\n\t\t\t\t// Restore the inner scrollview's scrollEnabled regardless of\n\t\t\t\t// whether the gesture engaged or was ignored.\n\t\t\t\tif (this._innerScroll && this._scrollWasEnabled !== undefined) {\n\t\t\t\t\tthis._innerScroll.scrollEnabled = this._scrollWasEnabled;\n\t\t\t\t\tthis._scrollWasEnabled = undefined;\n\t\t\t\t}\n\t\t\t\tthis._innerScroll = null;\n\t\t\t\tif (phase !== 'active') {\n\t\t\t\t\t// Either the gesture never crossed the engagement threshold or\n\t\t\t\t\t// we explicitly ignored it (a scroll). Nothing to wind down.\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst finishThreshold = isNumber(state.interactive?.dismiss?.finishThreshold) ? state.interactive.dismiss.finishThreshold : 0.5;\n\t\t\t\tconst shouldFinish = percent > finishThreshold;\n\t\t\t\tif (this.interactiveController) {\n\t\t\t\t\tif (shouldFinish) {\n\t\t\t\t\t\tthis._teardownGesture();\n\t\t\t\t\t\tthis.interactiveController.finishInteractiveTransition();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSharedTransition.updateState(this.id, {\n\t\t\t\t\t\t\tinteractiveCancelled: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.interactiveController.cancelInteractiveTransition();\n\t\t\t\t\t}\n\t\t\t\t\t// Always restore the modal's layer state we touched to render\n\t\t\t\t\t// the dismiss shadow — on cancel (view is being kept) AND on\n\t\t\t\t\t// finish (the same NS view instance may be reused on the next\n\t\t\t\t\t// presentation, so leaked layer state stacks across dismissals).\n\t\t\t\t\tremoveInteractiveDismissShadow(this.presented?.view);\n\t\t\t\t} else if (morph) {\n\t\t\t\t\t// Fallback: UIKit didn't engage. Reset the morph transform so the\n\t\t\t\t\t// destination doesn't stay stuck.\n\t\t\t\t\tconst presentedView = this.presented?.view;\n\t\t\t\t\tif (presentedView) {\n\t\t\t\t\t\tiOSUtils.animateWithSpring({\n\t\t\t\t\t\t\tanimations: () => {\n\t\t\t\t\t\t\t\tpresentedView.transform = CGAffineTransformIdentity;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _teardownGesture() {\n\t\tif (this._interactiveGestureTeardown) {\n\t\t\tthis._interactiveGestureTeardown();\n\t\t\tthis._interactiveGestureTeardown = null;\n\t\t}\n\t}\n}\n\n@NativeClass()\nclass PercentInteractiveController extends UIPercentDrivenInteractiveTransition implements UIViewControllerInteractiveTransitioning {\n\tstatic ObjCProtocols = [UIViewControllerInteractiveTransitioning];\n\towner: WeakRef<PageTransition>;\n\tinteractiveState: TransitionInteractiveState;\n\n\tstatic initWithOwner(owner: WeakRef<PageTransition>) {\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, 'page');\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, 'page', 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, 'page');\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, 'page');\n\t\t}\n\t}\n}\n\n@NativeClass()\nclass PageTransitionController extends NSObject implements UIViewControllerAnimatedTransitioning {\n\tstatic ObjCProtocols = [UIViewControllerAnimatedTransitioning];\n\towner: WeakRef<PageTransition>;\n\n\tstatic initWithOwner(owner: WeakRef<PageTransition>) {\n\t\tconst ctrl = <PageTransitionController>PageTransitionController.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\tconst owner = this.owner.deref();\n\t\tif (owner) {\n\t\t\t// console.log('--- PageTransitionController animateTransition');\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, 'page');\n\t\t}\n\t}\n}\n"]}
@@ -7,3 +7,6 @@ export declare class SharedTransitionHelper {
7
7
  static interactiveCancel(state: SharedTransitionState, interactiveState: TransitionInteractiveState, type: TransitionNavigationType): void;
8
8
  static interactiveFinish(state: SharedTransitionState, interactiveState: TransitionInteractiveState, type: TransitionNavigationType): void;
9
9
  }
10
+ export declare function applyInteractiveDismissShadow(_presentedView: any, _shadow: any): void;
11
+ export declare function syncInteractiveDismissShadow(_presentedView: any): void;
12
+ export declare function removeInteractiveDismissShadow(_presentedView: any): void;
@@ -7,4 +7,13 @@ export class SharedTransitionHelper {
7
7
  static interactiveCancel(state, interactiveState, type) { }
8
8
  static interactiveFinish(state, interactiveState, type) { }
9
9
  }
10
+ export function applyInteractiveDismissShadow(_presentedView, _shadow) {
11
+ // iOS-only
12
+ }
13
+ export function syncInteractiveDismissShadow(_presentedView) {
14
+ // iOS-only
15
+ }
16
+ export function removeInteractiveDismissShadow(_presentedView) {
17
+ // iOS-only
18
+ }
10
19
  //# sourceMappingURL=shared-transition-helper.android.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared-transition-helper.android.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/shared-transition-helper.android.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,sBAAsB;IAClC,MAAM,CAAC,OAAO,CAAC,KAA4B,EAAE,iBAAsB,EAAE,IAA8B;QAClG,6DAA6D;IAC9D,CAAC;IACD,MAAM,CAAC,gBAAgB,CAAC,KAA4B,EAAE,gBAA4C,EAAE,IAA8B,IAAS,CAAC;IAC5I,MAAM,CAAC,iBAAiB,CAAC,KAA4B,EAAE,gBAA4C,EAAE,IAA8B,EAAE,OAAe,IAAS,CAAC;IAC9J,MAAM,CAAC,iBAAiB,CAAC,KAA4B,EAAE,gBAA4C,EAAE,IAA8B,IAAS,CAAC;IAC7I,MAAM,CAAC,iBAAiB,CAAC,KAA4B,EAAE,gBAA4C,EAAE,IAA8B,IAAS,CAAC;CAC7I"}
1
+ {"version":3,"file":"shared-transition-helper.android.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/shared-transition-helper.android.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,sBAAsB;IAClC,MAAM,CAAC,OAAO,CAAC,KAA4B,EAAE,iBAAsB,EAAE,IAA8B;QAClG,6DAA6D;IAC9D,CAAC;IACD,MAAM,CAAC,gBAAgB,CAAC,KAA4B,EAAE,gBAA4C,EAAE,IAA8B,IAAS,CAAC;IAC5I,MAAM,CAAC,iBAAiB,CAAC,KAA4B,EAAE,gBAA4C,EAAE,IAA8B,EAAE,OAAe,IAAS,CAAC;IAC9J,MAAM,CAAC,iBAAiB,CAAC,KAA4B,EAAE,gBAA4C,EAAE,IAA8B,IAAS,CAAC;IAC7I,MAAM,CAAC,iBAAiB,CAAC,KAA4B,EAAE,gBAA4C,EAAE,IAA8B,IAAS,CAAC;CAC7I;AAED,MAAM,UAAU,6BAA6B,CAAC,cAAmB,EAAE,OAAY;IAC9E,WAAW;AACZ,CAAC;AACD,MAAM,UAAU,4BAA4B,CAAC,cAAmB;IAC/D,WAAW;AACZ,CAAC;AACD,MAAM,UAAU,8BAA8B,CAAC,cAAmB;IACjE,WAAW;AACZ,CAAC","sourcesContent":["import type { TransitionInteractiveState, TransitionNavigationType } from '.';\nimport { SharedTransitionState } from './shared-transition';\n\nexport class SharedTransitionHelper {\n\tstatic animate(state: SharedTransitionState, transitionContext: any, type: TransitionNavigationType) {\n\t\t// may be able to consolidate android handling here in future\n\t}\n\tstatic interactiveStart(state: SharedTransitionState, interactiveState: TransitionInteractiveState, type: TransitionNavigationType): void {}\n\tstatic interactiveUpdate(state: SharedTransitionState, interactiveState: TransitionInteractiveState, type: TransitionNavigationType, percent: number): void {}\n\tstatic interactiveCancel(state: SharedTransitionState, interactiveState: TransitionInteractiveState, type: TransitionNavigationType): void {}\n\tstatic interactiveFinish(state: SharedTransitionState, interactiveState: TransitionInteractiveState, type: TransitionNavigationType): void {}\n}\n\nexport function applyInteractiveDismissShadow(_presentedView: any, _shadow: any): void {\n\t// iOS-only\n}\nexport function syncInteractiveDismissShadow(_presentedView: any): void {\n\t// iOS-only\n}\nexport function removeInteractiveDismissShadow(_presentedView: any): void {\n\t// iOS-only\n}\n"]}
@@ -12,3 +12,10 @@ export declare class SharedTransitionHelper {
12
12
  static interactiveCancel(state: SharedTransitionState, interactiveState: TransitionInteractiveState, type: TransitionNavigationType): void;
13
13
  static interactiveFinish(state: SharedTransitionState, interactiveState: TransitionInteractiveState, type: TransitionNavigationType): void;
14
14
  }
15
+
16
+ /** (iOS only) Insert a sibling shadow view behind `presentedView` for the duration of an interactive dismiss. No-op when `shadow` is falsy. */
17
+ export declare function applyInteractiveDismissShadow(presentedView: any, shadow: any): void;
18
+ /** (iOS only) Mirror the modal's current transform onto the shadow view so they morph together. Safe to call when no shadow was applied. */
19
+ export declare function syncInteractiveDismissShadow(presentedView: any): void;
20
+ /** (iOS only) Remove the sibling shadow view inserted by `applyInteractiveDismissShadow`. Safe to call when no shadow was applied. */
21
+ export declare function removeInteractiveDismissShadow(presentedView: any): void;
@@ -4,8 +4,56 @@ interface PlatformTransitionInteractiveState extends TransitionInteractiveState
4
4
  transitionContext?: UIViewControllerContextTransitioning;
5
5
  propertyAnimator?: UIViewPropertyAnimator;
6
6
  }
7
+ /**
8
+ * Apply a drop shadow behind the destination view during an interactive
9
+ * dismiss so it looks elevated above the source (Apple Music–style).
10
+ *
11
+ * Shadow + rounded corners can't coexist on the same CALayer on iOS — both
12
+ * `masksToBounds = true` and `layer.mask` clip the shadow as part of the
13
+ * compositing pipeline. So the shadow lives on a SIBLING CALayer inserted
14
+ * below the modal's layer in its superlayer (the same pattern NS uses for
15
+ * box-shadow via `outerShadowContainerLayer`). The modal keeps its own
16
+ * `cornerRadius` + `masksToBounds` so subviews still clip to the rounded
17
+ * shape.
18
+ *
19
+ * Because the shadow layer is a sibling (not a child), it doesn't inherit
20
+ * the modal's transform automatically — `syncInteractiveDismissShadow`
21
+ * mirrors transform/position/bounds during the drag.
22
+ *
23
+ * Falsy `shadowConfig` is a no-op.
24
+ */
25
+ export declare function applyInteractiveDismissShadow(presentedView: any, shadowConfig: any): void;
26
+ /**
27
+ * Mirror the modal layer's geometry onto the sibling shadow layer so the
28
+ * shadow tracks the interactive drag. Called from the gesture handlers
29
+ * after the modal's state has been updated (either via direct transform
30
+ * in morph mode, or via `interactiveController.updateInteractiveTransition`
31
+ * for the non-morph modal/page case driven by UIViewPropertyAnimator).
32
+ *
33
+ * Reads the layer's **presentation** values when an animation is in flight
34
+ * — model values would point at the animation's end state and snap the
35
+ * shadow there. Falls back to model values when no animation is running.
36
+ */
37
+ export declare function syncInteractiveDismissShadow(presentedView: any): void;
38
+ /**
39
+ * Remove the sibling shadow layer. Safe to call repeatedly / when no
40
+ * shadow was applied.
41
+ */
42
+ export declare function removeInteractiveDismissShadow(presentedView: any): void;
7
43
  export declare class SharedTransitionHelper {
8
44
  static animate(state: SharedTransitionState, transitionContext: UIViewControllerContextTransitioning, type: TransitionNavigationType): void;
45
+ private static run;
46
+ /**
47
+ * Called when the animation setup threw: put everything back in a sane state and always complete the transition,
48
+ * otherwise UIKit stays in the middle of the navigation transition.
49
+ */
50
+ private static recover;
51
+ /**
52
+ * Rebuilds the shared elements to animate on the way back from the pages that are currently shown.
53
+ * The elements recorded on the way in can not be reused: the popped page might now show another photo (same tag
54
+ * pattern, other value) or its views might have been recycled, and the transition passed to goBack can be a new instance.
55
+ */
56
+ private static rebuildDismissElements;
9
57
  static interactiveStart(state: SharedTransitionState, interactiveState: PlatformTransitionInteractiveState, type: TransitionNavigationType): void;
10
58
  static interactiveUpdate(state: SharedTransitionState, interactiveState: PlatformTransitionInteractiveState, type: TransitionNavigationType, percent: number): void;
11
59
  static interactiveCancel(state: SharedTransitionState, interactiveState: PlatformTransitionInteractiveState, type: TransitionNavigationType): void;