react-native-screen-transitions 4.0.0-alpha.5 → 4.0.0-alpha.7

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 (287) hide show
  1. package/lib/commonjs/components/boundary/components/boundary-lifecycle.js +36 -0
  2. package/lib/commonjs/components/boundary/components/boundary-lifecycle.js.map +1 -0
  3. package/lib/commonjs/components/boundary/components/boundary-target.js +1 -0
  4. package/lib/commonjs/components/boundary/components/boundary-target.js.map +1 -1
  5. package/lib/commonjs/components/boundary/create-boundary-component.js +1 -0
  6. package/lib/commonjs/components/boundary/create-boundary-component.js.map +1 -1
  7. package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +1 -13
  8. package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  9. package/lib/commonjs/components/boundary/hooks/lifecycles/use-refresh-boundary.js +9 -2
  10. package/lib/commonjs/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
  11. package/lib/commonjs/components/boundary/hooks/use-boundary-measurement.js +3 -2
  12. package/lib/commonjs/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  13. package/lib/commonjs/components/boundary/hooks/use-measurer.js +9 -2
  14. package/lib/commonjs/components/boundary/hooks/use-measurer.js.map +1 -1
  15. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/host.js +5 -12
  16. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
  17. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +25 -43
  18. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  19. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +13 -0
  20. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -0
  21. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +8 -31
  22. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
  23. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +14 -19
  24. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
  25. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +3 -1
  26. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  27. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +19 -48
  28. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
  29. package/lib/commonjs/components/boundary/portal/components/boundary-portal/index.js +6 -2
  30. package/lib/commonjs/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
  31. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
  32. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
  33. package/lib/commonjs/components/boundary/providers/boundary-root.provider.js +19 -17
  34. package/lib/commonjs/components/boundary/providers/boundary-root.provider.js.map +1 -1
  35. package/lib/commonjs/components/boundary/utils/refresh-signals.js +19 -5
  36. package/lib/commonjs/components/boundary/utils/refresh-signals.js.map +1 -1
  37. package/lib/commonjs/components/screen-container/layers/backdrop.js +11 -7
  38. package/lib/commonjs/components/screen-container/layers/backdrop.js.map +1 -1
  39. package/lib/commonjs/components/screen-lifecycle/hooks/helpers/close-interception-rules.js +32 -0
  40. package/lib/commonjs/components/screen-lifecycle/hooks/helpers/close-interception-rules.js.map +1 -0
  41. package/lib/commonjs/components/screen-lifecycle/hooks/use-close-completion.js +27 -0
  42. package/lib/commonjs/components/screen-lifecycle/hooks/use-close-completion.js.map +1 -0
  43. package/lib/commonjs/components/screen-lifecycle/hooks/use-close-transition-intent.js +61 -86
  44. package/lib/commonjs/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
  45. package/lib/commonjs/components/screen-lifecycle/hooks/use-transition-start-controller.js +1 -5
  46. package/lib/commonjs/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
  47. package/lib/commonjs/components/screen-lifecycle/index.js +9 -6
  48. package/lib/commonjs/components/screen-lifecycle/index.js.map +1 -1
  49. package/lib/commonjs/hooks/navigation/use-navigation-helpers.js +30 -13
  50. package/lib/commonjs/hooks/navigation/use-navigation-helpers.js.map +1 -1
  51. package/lib/commonjs/providers/helpers/measured-bounds-writes.js +1 -2
  52. package/lib/commonjs/providers/helpers/measured-bounds-writes.js.map +1 -1
  53. package/lib/commonjs/providers/screen/gestures/hooks/use-screen-gesture-config.js +9 -2
  54. package/lib/commonjs/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
  55. package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-lifecycle.js +4 -5
  56. package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  57. package/lib/commonjs/providers/screen/gestures/pan/behavior/use-pan-behavior.js +2 -3
  58. package/lib/commonjs/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  59. package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -5
  60. package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  61. package/lib/commonjs/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -3
  62. package/lib/commonjs/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
  63. package/lib/commonjs/providers/screen/gestures/shared/policy.js +9 -5
  64. package/lib/commonjs/providers/screen/gestures/shared/policy.js.map +1 -1
  65. package/lib/commonjs/providers/screen/styles/helpers/create-interpolator-scope.js +40 -0
  66. package/lib/commonjs/providers/screen/styles/helpers/create-interpolator-scope.js.map +1 -0
  67. package/lib/commonjs/providers/screen/styles/hooks/use-interpolated-style-maps.js +5 -10
  68. package/lib/commonjs/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  69. package/lib/commonjs/providers/stack/blank-stack-state/blank-stack-controller.js +7 -9
  70. package/lib/commonjs/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -1
  71. package/lib/commonjs/stores/bounds/internals/links.js +1 -1
  72. package/lib/commonjs/stores/bounds/internals/links.js.map +1 -1
  73. package/lib/commonjs/stores/system.store.js +1 -2
  74. package/lib/commonjs/stores/system.store.js.map +1 -1
  75. package/lib/commonjs/utils/animation/animate-to-progress.js +0 -22
  76. package/lib/commonjs/utils/animation/animate-to-progress.js.map +1 -1
  77. package/lib/commonjs/utils/navigation/close-action-replay.js +22 -0
  78. package/lib/commonjs/utils/navigation/close-action-replay.js.map +1 -0
  79. package/lib/module/components/boundary/components/boundary-lifecycle.js +32 -0
  80. package/lib/module/components/boundary/components/boundary-lifecycle.js.map +1 -0
  81. package/lib/module/components/boundary/components/boundary-target.js +1 -0
  82. package/lib/module/components/boundary/components/boundary-target.js.map +1 -1
  83. package/lib/module/components/boundary/create-boundary-component.js +1 -0
  84. package/lib/module/components/boundary/create-boundary-component.js.map +1 -1
  85. package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +1 -13
  86. package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  87. package/lib/module/components/boundary/hooks/lifecycles/use-refresh-boundary.js +9 -2
  88. package/lib/module/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
  89. package/lib/module/components/boundary/hooks/use-boundary-measurement.js +3 -2
  90. package/lib/module/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  91. package/lib/module/components/boundary/hooks/use-measurer.js +9 -2
  92. package/lib/module/components/boundary/hooks/use-measurer.js.map +1 -1
  93. package/lib/module/components/boundary/portal/components/boundary-portal/components/host.js +5 -12
  94. package/lib/module/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
  95. package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +27 -45
  96. package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  97. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +8 -0
  98. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -0
  99. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +8 -32
  100. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
  101. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +15 -20
  102. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
  103. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +3 -1
  104. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  105. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +19 -48
  106. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
  107. package/lib/module/components/boundary/portal/components/boundary-portal/index.js +6 -2
  108. package/lib/module/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
  109. package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
  110. package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
  111. package/lib/module/components/boundary/providers/boundary-root.provider.js +20 -18
  112. package/lib/module/components/boundary/providers/boundary-root.provider.js.map +1 -1
  113. package/lib/module/components/boundary/utils/refresh-signals.js +19 -5
  114. package/lib/module/components/boundary/utils/refresh-signals.js.map +1 -1
  115. package/lib/module/components/screen-container/layers/backdrop.js +12 -8
  116. package/lib/module/components/screen-container/layers/backdrop.js.map +1 -1
  117. package/lib/module/components/screen-lifecycle/hooks/helpers/close-interception-rules.js +26 -0
  118. package/lib/module/components/screen-lifecycle/hooks/helpers/close-interception-rules.js.map +1 -0
  119. package/lib/module/components/screen-lifecycle/hooks/use-close-completion.js +22 -0
  120. package/lib/module/components/screen-lifecycle/hooks/use-close-completion.js.map +1 -0
  121. package/lib/module/components/screen-lifecycle/hooks/use-close-transition-intent.js +61 -85
  122. package/lib/module/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
  123. package/lib/module/components/screen-lifecycle/hooks/use-transition-start-controller.js +1 -5
  124. package/lib/module/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
  125. package/lib/module/components/screen-lifecycle/index.js +9 -6
  126. package/lib/module/components/screen-lifecycle/index.js.map +1 -1
  127. package/lib/module/hooks/navigation/use-navigation-helpers.js +30 -13
  128. package/lib/module/hooks/navigation/use-navigation-helpers.js.map +1 -1
  129. package/lib/module/providers/helpers/measured-bounds-writes.js +1 -2
  130. package/lib/module/providers/helpers/measured-bounds-writes.js.map +1 -1
  131. package/lib/module/providers/screen/gestures/hooks/use-screen-gesture-config.js +9 -2
  132. package/lib/module/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
  133. package/lib/module/providers/screen/gestures/pan/behavior/pan-lifecycle.js +4 -5
  134. package/lib/module/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  135. package/lib/module/providers/screen/gestures/pan/behavior/use-pan-behavior.js +2 -3
  136. package/lib/module/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  137. package/lib/module/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -5
  138. package/lib/module/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  139. package/lib/module/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -3
  140. package/lib/module/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
  141. package/lib/module/providers/screen/gestures/shared/policy.js +9 -5
  142. package/lib/module/providers/screen/gestures/shared/policy.js.map +1 -1
  143. package/lib/module/providers/screen/styles/helpers/create-interpolator-scope.js +35 -0
  144. package/lib/module/providers/screen/styles/helpers/create-interpolator-scope.js.map +1 -0
  145. package/lib/module/providers/screen/styles/hooks/use-interpolated-style-maps.js +5 -10
  146. package/lib/module/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  147. package/lib/module/providers/stack/blank-stack-state/blank-stack-controller.js +7 -9
  148. package/lib/module/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -1
  149. package/lib/module/stores/bounds/internals/links.js +1 -1
  150. package/lib/module/stores/bounds/internals/links.js.map +1 -1
  151. package/lib/module/stores/system.store.js +1 -2
  152. package/lib/module/stores/system.store.js.map +1 -1
  153. package/lib/module/utils/animation/animate-to-progress.js +0 -22
  154. package/lib/module/utils/animation/animate-to-progress.js.map +1 -1
  155. package/lib/module/utils/navigation/close-action-replay.js +16 -0
  156. package/lib/module/utils/navigation/close-action-replay.js.map +1 -0
  157. package/lib/typescript/components/boundary/components/boundary-lifecycle.d.ts +18 -0
  158. package/lib/typescript/components/boundary/components/boundary-lifecycle.d.ts.map +1 -0
  159. package/lib/typescript/components/boundary/components/boundary-target.d.ts.map +1 -1
  160. package/lib/typescript/components/boundary/create-boundary-component.d.ts.map +1 -1
  161. package/lib/typescript/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +1 -2
  162. package/lib/typescript/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
  163. package/lib/typescript/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -1
  164. package/lib/typescript/components/boundary/hooks/use-boundary-measurement.d.ts +3 -2
  165. package/lib/typescript/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  166. package/lib/typescript/components/boundary/hooks/use-measurer.d.ts +3 -2
  167. package/lib/typescript/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  168. package/lib/typescript/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -1
  169. package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts +5 -1
  170. package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
  171. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts +4 -0
  172. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts.map +1 -0
  173. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts +4 -17
  174. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -1
  175. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts +3 -1
  176. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts.map +1 -1
  177. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +3 -1
  178. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
  179. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts +5 -9
  180. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -1
  181. package/lib/typescript/components/boundary/portal/components/boundary-portal/index.d.ts +3 -1
  182. package/lib/typescript/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -1
  183. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +2 -1
  184. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
  185. package/lib/typescript/components/boundary/providers/boundary-root.provider.d.ts +2 -1
  186. package/lib/typescript/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  187. package/lib/typescript/components/boundary/types.d.ts +6 -0
  188. package/lib/typescript/components/boundary/types.d.ts.map +1 -1
  189. package/lib/typescript/components/boundary/utils/refresh-signals.d.ts +1 -0
  190. package/lib/typescript/components/boundary/utils/refresh-signals.d.ts.map +1 -1
  191. package/lib/typescript/components/screen-container/layers/backdrop.d.ts.map +1 -1
  192. package/lib/typescript/components/screen-lifecycle/hooks/helpers/close-interception-rules.d.ts +28 -0
  193. package/lib/typescript/components/screen-lifecycle/hooks/helpers/close-interception-rules.d.ts.map +1 -0
  194. package/lib/typescript/components/screen-lifecycle/hooks/use-close-completion.d.ts +7 -0
  195. package/lib/typescript/components/screen-lifecycle/hooks/use-close-completion.d.ts.map +1 -0
  196. package/lib/typescript/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts +2 -7
  197. package/lib/typescript/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -1
  198. package/lib/typescript/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts +1 -3
  199. package/lib/typescript/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -1
  200. package/lib/typescript/components/screen-lifecycle/index.d.ts.map +1 -1
  201. package/lib/typescript/hooks/navigation/use-navigation-helpers.d.ts +1 -0
  202. package/lib/typescript/hooks/navigation/use-navigation-helpers.d.ts.map +1 -1
  203. package/lib/typescript/navigators/react-navigation/index.d.ts +1 -1
  204. package/lib/typescript/providers/screen/gestures/hooks/use-screen-gesture-config.d.ts.map +1 -1
  205. package/lib/typescript/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts +1 -1
  206. package/lib/typescript/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
  207. package/lib/typescript/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
  208. package/lib/typescript/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts +1 -1
  209. package/lib/typescript/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
  210. package/lib/typescript/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts.map +1 -1
  211. package/lib/typescript/providers/screen/gestures/shared/policy.d.ts +2 -1
  212. package/lib/typescript/providers/screen/gestures/shared/policy.d.ts.map +1 -1
  213. package/lib/typescript/providers/screen/gestures/types.d.ts +2 -0
  214. package/lib/typescript/providers/screen/gestures/types.d.ts.map +1 -1
  215. package/lib/typescript/providers/screen/styles/helpers/create-interpolator-scope.d.ts +9 -0
  216. package/lib/typescript/providers/screen/styles/helpers/create-interpolator-scope.d.ts.map +1 -0
  217. package/lib/typescript/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  218. package/lib/typescript/providers/stack/blank-stack-state/blank-stack-controller.d.ts.map +1 -1
  219. package/lib/typescript/stores/system.store.d.ts +1 -2
  220. package/lib/typescript/stores/system.store.d.ts.map +1 -1
  221. package/lib/typescript/utils/animation/animate-to-progress.d.ts +1 -2
  222. package/lib/typescript/utils/animation/animate-to-progress.d.ts.map +1 -1
  223. package/lib/typescript/utils/navigation/close-action-replay.d.ts +4 -0
  224. package/lib/typescript/utils/navigation/close-action-replay.d.ts.map +1 -0
  225. package/package.json +1 -1
  226. package/src/components/boundary/components/boundary-lifecycle.tsx +53 -0
  227. package/src/components/boundary/components/boundary-target.tsx +1 -0
  228. package/src/components/boundary/create-boundary-component.tsx +1 -0
  229. package/src/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +0 -14
  230. package/src/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +13 -2
  231. package/src/components/boundary/hooks/use-boundary-measurement.ts +7 -2
  232. package/src/components/boundary/hooks/use-measurer.ts +11 -1
  233. package/src/components/boundary/portal/components/boundary-portal/components/host.tsx +13 -11
  234. package/src/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +44 -55
  235. package/src/components/boundary/portal/components/boundary-portal/helpers/local-measurement.ts +10 -0
  236. package/src/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts +11 -55
  237. package/src/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts +20 -24
  238. package/src/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +6 -0
  239. package/src/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts +20 -68
  240. package/src/components/boundary/portal/components/boundary-portal/index.tsx +19 -3
  241. package/src/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +3 -2
  242. package/src/components/boundary/providers/boundary-root.provider.tsx +29 -20
  243. package/src/components/boundary/types.ts +9 -0
  244. package/src/components/boundary/utils/refresh-signals.ts +39 -6
  245. package/src/components/screen-container/layers/backdrop.tsx +11 -7
  246. package/src/components/screen-lifecycle/hooks/helpers/close-interception-rules.ts +66 -0
  247. package/src/components/screen-lifecycle/hooks/use-close-completion.ts +25 -0
  248. package/src/components/screen-lifecycle/hooks/use-close-transition-intent.ts +68 -108
  249. package/src/components/screen-lifecycle/hooks/use-transition-start-controller.ts +0 -12
  250. package/src/components/screen-lifecycle/index.tsx +8 -4
  251. package/src/hooks/navigation/use-navigation-helpers.ts +40 -12
  252. package/src/providers/helpers/measured-bounds-writes.ts +1 -1
  253. package/src/providers/screen/gestures/hooks/use-screen-gesture-config.ts +9 -1
  254. package/src/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +4 -6
  255. package/src/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +1 -3
  256. package/src/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +4 -6
  257. package/src/providers/screen/gestures/pinch/behavior/use-pinch-behavior.ts +2 -8
  258. package/src/providers/screen/gestures/shared/policy.ts +17 -6
  259. package/src/providers/screen/gestures/types.ts +2 -0
  260. package/src/providers/screen/styles/helpers/create-interpolator-scope.ts +45 -0
  261. package/src/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +8 -12
  262. package/src/providers/stack/blank-stack-state/blank-stack-controller.ts +7 -7
  263. package/src/stores/bounds/internals/links.ts +1 -1
  264. package/src/stores/system.store.ts +1 -2
  265. package/src/utils/animation/animate-to-progress.ts +0 -23
  266. package/src/utils/navigation/close-action-replay.ts +25 -0
  267. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/active-pair.js +0 -30
  268. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/active-pair.js.map +0 -1
  269. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js +0 -47
  270. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +0 -1
  271. package/lib/commonjs/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js +0 -21
  272. package/lib/commonjs/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js.map +0 -1
  273. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/active-pair.js +0 -25
  274. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/active-pair.js.map +0 -1
  275. package/lib/module/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js +0 -40
  276. package/lib/module/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +0 -1
  277. package/lib/module/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js +0 -16
  278. package/lib/module/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js.map +0 -1
  279. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/active-pair.d.ts +0 -9
  280. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/active-pair.d.ts.map +0 -1
  281. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts +0 -9
  282. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts.map +0 -1
  283. package/lib/typescript/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.d.ts +0 -2
  284. package/lib/typescript/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.d.ts.map +0 -1
  285. package/src/components/boundary/portal/components/boundary-portal/helpers/active-pair.ts +0 -36
  286. package/src/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.ts +0 -45
  287. package/src/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.tsx +0 -15
@@ -1,15 +1,16 @@
1
1
  "use strict";
2
2
 
3
3
  import { useImperativeHandle, useLayoutEffect, useMemo, useRef } from "react";
4
- import { useAnimatedRef } from "react-native-reanimated";
4
+ import { useAnimatedRef, useSharedValue } from "react-native-reanimated";
5
5
  import { useDescriptorsStore } from "../../../providers/screen/descriptors";
6
6
  import { useComposedSlotStyles, useSlotStackingStyles } from "../../../providers/screen/styles";
7
7
  import { useBlankStackStore } from "../../../providers/stack/blank-stack.provider";
8
8
  import { createBoundTag } from "../../../stores/bounds/helpers/link-pairs.helpers";
9
9
  import createProvider from "../../../utils/create-provider";
10
10
  import { logger } from "../../../utils/logger";
11
- import { useBoundaryMeasurement } from "../hooks/use-boundary-measurement";
11
+ import { BoundaryLifecycle } from "../components/boundary-lifecycle";
12
12
  import { resolveBoundaryPortal } from "../portal/utils/resolve-portal";
13
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
14
  // logger.warn prepends the library prefix.
14
15
  const MULTIPLE_TARGETS_WARNING = "Multiple Boundary.Target elements were rendered under the same boundary root. The first target in render order will be measured.";
15
16
  export const TARGET_OUTSIDE_ROOT_WARNING = "Boundary.Target must be rendered inside Transition.Boundary or a component created by createBoundaryComponent.";
@@ -38,7 +39,7 @@ export const {
38
39
  escapeClipping
39
40
  });
40
41
  const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
41
- const isCurrentScreenClosing = useBlankStackStore(store => store?.scenesByKey[currentScreenKey]?.activity === "closing");
42
+ const isCurrentScreenClosing = useBlankStackStore(store => portalRuntime.handoff && store?.scenesByKey[currentScreenKey]?.activity === "closing");
42
43
  const retainedBoundTagRef = useRef(requestedBoundTag);
43
44
  const shouldRetainClosingBoundTag = portalRuntime.handoff && isCurrentScreenClosing;
44
45
 
@@ -49,8 +50,6 @@ export const {
49
50
  retainedBoundTagRef.current = requestedBoundTag;
50
51
  }
51
52
  const boundTag = retainedBoundTagRef.current;
52
- const hasConfiguredInterpolator = useDescriptorsStore(s => s.derivations.hasConfiguredInterpolator);
53
- const runtimeEnabled = enabled && hasConfiguredInterpolator;
54
53
  // Associated slot styles attach whenever the boundary is enabled,
55
54
  // independent of whether an interpolator is configured for this transition.
56
55
  const shouldAttachAssociatedStyles = enabled;
@@ -59,6 +58,7 @@ export const {
59
58
  const associatedStackingStyles = useSlotStackingStyles(boundTag.tag);
60
59
  const rootRef = useAnimatedRef();
61
60
  const measurementRef = useAnimatedRef();
61
+ const localMeasurement = useSharedValue(null);
62
62
  useLayoutEffect(() => {
63
63
  if (__DEV__ && targetCount > 1) {
64
64
  logger.warnOnce("boundary:multiple-targets", MULTIPLE_TARGETS_WARNING);
@@ -66,17 +66,6 @@ export const {
66
66
  }, [targetCount]);
67
67
  const measuredRef = hasTarget || shouldEscapeBoundaryRootToScreenHost ? measurementRef : rootRef;
68
68
  useImperativeHandle(forwardedRef, () => rootRef.current, [rootRef]);
69
- useBoundaryMeasurement({
70
- boundTag,
71
- enabled,
72
- runtimeEnabled,
73
- currentScreenKey,
74
- measuredRef,
75
- style: hasTarget ? targetStyle : style,
76
- handoff: portalRuntime.handoff,
77
- escapeClipping: portalRuntime.escapeClipping,
78
- config
79
- });
80
69
  const shouldRenderBoundaryRootThroughPortal = shouldEscapeBoundaryRootToScreenHost && !hasTarget;
81
70
  const handoffEnabled = enabled && portalRuntime.handoff;
82
71
  // A nested active target takes the full associated style, so the root keeps
@@ -92,15 +81,28 @@ export const {
92
81
  boundTag,
93
82
  currentScreenKey,
94
83
  handoffEnabled,
84
+ localMeasurement,
95
85
  measurementRef,
96
86
  portalRuntime,
97
87
  ref: rootRef,
98
88
  shouldRenderBoundaryRootThroughPortal,
99
89
  shouldRenderHandoffHost: handoffEnabled && !hasTarget
100
- }), [attachedStyle, boundTag, currentScreenKey, handoffEnabled, hasTarget, measurementRef, portalRuntime, rootRef, shouldRenderBoundaryRootThroughPortal]);
90
+ }), [attachedStyle, boundTag, currentScreenKey, handoffEnabled, hasTarget, localMeasurement, measurementRef, portalRuntime, rootRef, shouldRenderBoundaryRootThroughPortal]);
101
91
  return {
102
92
  value,
103
- children: children(value)
93
+ children: /*#__PURE__*/_jsxs(_Fragment, {
94
+ children: [children(value), /*#__PURE__*/_jsx(BoundaryLifecycle, {
95
+ boundTag: boundTag,
96
+ config: config,
97
+ currentScreenKey: currentScreenKey,
98
+ enabled: enabled,
99
+ escapeClipping: portalRuntime.escapeClipping,
100
+ handoff: portalRuntime.handoff,
101
+ localMeasurement: localMeasurement,
102
+ measuredRef: measuredRef,
103
+ style: hasTarget ? targetStyle : style
104
+ })]
105
+ })
104
106
  };
105
107
  });
106
108
  //# sourceMappingURL=boundary-root.provider.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useImperativeHandle","useLayoutEffect","useMemo","useRef","useAnimatedRef","useDescriptorsStore","useComposedSlotStyles","useSlotStackingStyles","useBlankStackStore","createBoundTag","createProvider","logger","useBoundaryMeasurement","resolveBoundaryPortal","MULTIPLE_TARGETS_WARNING","TARGET_OUTSIDE_ROOT_WARNING","BoundaryRootProvider","useBoundaryRootStore","guarded","children","config","enabled","escapeClipping","forwardedRef","group","handoff","hasTarget","id","style","targetCount","targetStyle","requestedBoundTag","String","portalRuntime","currentScreenKey","s","derivations","isCurrentScreenClosing","store","scenesByKey","activity","retainedBoundTagRef","shouldRetainClosingBoundTag","current","boundTag","hasConfiguredInterpolator","runtimeEnabled","shouldAttachAssociatedStyles","shouldEscapeBoundaryRootToScreenHost","associatedStyles","tag","associatedStackingStyles","rootRef","measurementRef","__DEV__","warnOnce","measuredRef","shouldRenderBoundaryRootThroughPortal","handoffEnabled","attachedStyle","undefined","value","ref","shouldRenderHandoffHost"],"sourceRoot":"../../../../../src","sources":["components/boundary/providers/boundary-root.provider.tsx"],"mappings":";;AAAA,SAGCA,mBAAmB,EACnBC,eAAe,EACfC,OAAO,EACPC,MAAM,QACA,OAAO;AAGd,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,mBAAmB,QAAQ,uCAAuC;AAC3E,SACCC,qBAAqB,EACrBC,qBAAqB,QACf,kCAAkC;AACzC,SAASC,kBAAkB,QAAQ,+CAA+C;AAClF,SAASC,cAAc,QAAQ,mDAAmD;AAElF,OAAOC,cA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AACR,OAAO;EACvD;EACA;EACA;EACA;EACA;EACA;EACA;EACA,MAAMkC,aAAa,GAAGZ,4BAA4B,GAC/CrB,SAAS,GACRyB,wBAAwB,GACxBM,qCAAqC,GACpCG,SAAS,GACTX,gBAAgB,GAClBW,SAAS;EAEZ,MAAMC,KAAK,GAAG3D,OAAO,CACpB,OAAO;IACNyD,aAAa;IACbf,QAAQ;IACRV,gBAAgB;IAChBwB,cAAc;IACdL,cAAc;IACdpB,aAAa;IACb6B,GAAG,EAAEV,OAAO;IACZK,qCAAqC;IACrCM,uBAAuB,EAAEL,cAAc,IAAI,CAAChC;EAC7C,CAAC,CAAC,EACF,CACCiC,aAAa,EACbf,QAAQ,EACRV,gBAAgB,EAChBwB,cAAc,EACdhC,SAAS,EACT2B,cAAc,EACdpB,aAAa,EACbmB,OAAO,EACPK,qCAAqC,CAEvC,CAAC;EAED,OAAO;IACNI,KAAK;IACL1C,QAAQ,EAAEA,QAAQ,CAAC0C,KAAK;EACzB,CAAC;AACF,CACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useImperativeHandle","useLayoutEffect","useMemo","useRef","useAnimatedRef","useSharedValue","useDescriptorsStore","useComposedSlotStyles","useSlotStackingStyles","useBlankStackStore","createBoundTag","createProvider","logger","BoundaryLifecycle","resolveBoundaryPortal","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","MULTIPLE_TARGETS_WARNING","TARGET_OUTSIDE_ROOT_WARNING","BoundaryRootProvider","useBoundaryRootStore","guarded","children","config","enabled","escapeClipping","forwardedRef","group","handoff","hasTarget","id","style","targetCount","targetStyle","requestedBoundTag","String","portalRuntime","currentScreenKey","s","derivations","isCurrentScreenClosing","store","scenesByKey","activity","retainedBoundTagRef","shouldRetainClosingBoundTag","current","boundTag","shouldAttachAssociatedStyles","shouldEscapeBoundaryRootToScreenHost","associatedStyles","tag","associatedStackingStyles","rootRef","measurementRef","localMeasurement","__DEV__","warnOnce","measuredRef","shouldRenderBoundaryRootThroughPortal","handoffEnabled","attachedStyle","undefined","value","ref","shouldRenderHandoffHost"],"sourceRoot":"../../../../../src","sources":["components/boundary/providers/boundary-root.provider.tsx"],"mappings":";;AAAA,SAGCA,mBAAmB,EACnBC,eAAe,EACfC,OAAO,EACPC,MAAM,QACA,OAAO;AAGd,SAASC,cAAc,EAAEC,cAAc,QAAQ,yBAAyB;AACxE,SAASC,mBAAmB,QAAQ,uCAAuC;AAC3E,SACCC,qBAAqB,EACrBC,qBAAqB,QACf,kCAAkC;AACzC,SAASC,kBAAkB,QAAQ,+CAA+C;AAClF,SAASC,cAAc,QAAQ,mDAAmD;AAElF,OAAOC,cAAc,MAAM,gCAAgC;AAC3D,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,iBAAiB,QAAQ,kCAAkC;AACpE,SAECC,qBAAqB,QACf,gCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAWxC;AACA,MAAMC,wBAAwB,GAC7B,kIAAkI;AAEnI,OAAO,MAAMC,2BAA2B,GACvC,gHAAgH;AA6BjH,OAAO,MAAM;EAAEC,oBAAoB;EAAEC;AAAqB,CAAC,GAAGb,cAAc,CAC3E,cAAc,EACd;EAAEc,OAAO,EAAE;AAAM,CAClB,CAAC,CACA,CAAC;EACAC,QAAQ;EACRC,MAAM;EACNC,OAAO,GAAG,IAAI;EACdC,cAAc;EACdC,YAAY;EACZC,KAAK;EACLC,OAAO;EACPC,SAAS;EACTC,EAAE;EACFC,KAAK;EACLC,WAAW;EACXC;AACD,CAAC,KAAK;EACL,MAAMC,iBAAiB,GAAGpC,OAAO,CAChC,MAAMQ,cAAc,CAAC6B,MAAM,CAACL,EAAE,CAAC,EAAEH,KAAK,CAAC,EACvC,CAACG,EAAE,EAAEH,KAAK,CACX,CAAC;EACD,MAAMS,aAAa,GAAG1B,qBAAqB,CAAC;IAC3CkB,OAAO;IACPH;EACD,CAAC,CAAC;EAEF,MAAM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oreList":[]}
@@ -23,11 +23,12 @@ export const getRefreshBoundarySignal = params => {
23
23
  linkId,
24
24
  group,
25
25
  shouldRefresh,
26
+ settled = false,
26
27
  closing,
27
28
  linkState
28
29
  } = params;
29
30
  if (!enabled) return null;
30
- if (!shouldRefresh) {
31
+ if (!shouldRefresh && (!group || !settled)) {
31
32
  return null;
32
33
  }
33
34
 
@@ -55,24 +56,37 @@ export const getRefreshBoundarySignal = params => {
55
56
  // Source side:
56
57
  // When the activeId changes, trigger a refresh to ensure the source bounds are captured.
57
58
  if (sourcePairKey) {
58
- const activeId = linkState?.[sourcePairKey]?.groups?.[group]?.activeId;
59
+ const pair = linkState?.[sourcePairKey];
60
+ const groupState = pair?.groups?.[group];
61
+ const activeId = groupState?.activeId;
59
62
  if (activeId !== linkId) {
60
63
  return null;
61
64
  }
62
- return buildRefreshSignal("source", sourcePairKey, [group, linkId, closing ? "closing" : "settled"].join("|"));
65
+
66
+ // The opening member is captured by the initial handshake. A settled
67
+ // refresh is only needed after selection moves to another member.
68
+ if (!shouldRefresh && (groupState?.initialId === undefined || activeId === groupState.initialId || !!pair?.links?.[linkId]?.source)) {
69
+ return null;
70
+ }
71
+ return buildRefreshSignal("source", sourcePairKey, [group, linkId, shouldRefresh ? closing ? "closing" : "settled" : "retarget"].join("|"));
63
72
  }
64
73
  const refreshDestinationPairKey = destinationPairKey;
65
74
  if (!refreshDestinationPairKey) return null;
66
75
 
67
76
  // Destination side:
68
77
  // When the activeId changes, trigger a refresh to ensure the destination bounds are captured.
69
- const activeId = linkState?.[refreshDestinationPairKey]?.groups?.[group]?.activeId;
78
+ const pair = linkState?.[refreshDestinationPairKey];
79
+ const groupState = pair?.groups?.[group];
80
+ const activeId = groupState?.activeId;
70
81
 
71
82
  // Destination retargeting should only measure a concrete member that already
72
83
  // participates in the pair. Missing members fall back to initialId at resolve.
73
84
  if (activeId !== linkId) {
74
85
  return null;
75
86
  }
76
- return buildRefreshSignal("destination", refreshDestinationPairKey, [group, linkId, closing ? "closing" : "settled"].join("|"));
87
+ if (!shouldRefresh && (groupState?.initialId === undefined || activeId === groupState.initialId || !!pair?.links?.[linkId]?.destination)) {
88
+ return null;
89
+ }
90
+ return buildRefreshSignal("destination", refreshDestinationPairKey, [group, linkId, shouldRefresh ? closing ? "closing" : "settled" : "retarget"].join("|"));
77
91
  };
78
92
  //# sourceMappingURL=refresh-signals.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["SOURCE_SIGNAL_PREFIX","DESTINATION_SIGNAL_PREFIX","buildRefreshSignal","type","pairKey","key","prefix","signal","getRefreshBoundarySignal","params","enabled","currentScreenKey","sourcePairKey","destinationPairKey","linkId","group","shouldRefresh","closing","linkState","sourcePair","participates","links","sourceRequests","join","refreshDestinationPairKey","activeId","groups"],"sourceRoot":"../../../../../src","sources":["components/boundary/utils/refresh-signals.ts"],"mappings":";;AAMA,MAAMA,oBAAoB,GAAG,SAAS;AACtC,MAAMC,yBAAyB,GAAG,cAAc;AAMhD,MAAMC,kBAAkB,GAAGA,CAC1BC,IAA2B,EAC3BC,OAAsB,EACtBC,GAAW,KACgB;EAC3B,SAAS;;EACT,MAAMC,MAAM,GACXH,IAAI,KAAK,QAAQ,GAAGH,oBAAoB,GAAGC,yBAAyB;EACrE,OAAO;IACNE,IAAI;IACJC,OAAO;IACPG,MAAM,EAAE,GAAGD,MAAM,GAAGF,OAAO,IAAIC,GAAG;EACnC,CAAC;AACF,CAAC;AAED,OAAO,MAAMG,wBAAwB,GAAIC,MAUxC,IAAmC;EACnC,SAAS;;EACT,MAAM;IACLC,OAAO;IACPC,gBAAgB;IAChBC,aAAa;IACbC,kBAAkB;IAClBC,MAAM;IACNC,KAAK;IACLC,aAAa;IACbC,OAAO;IACPC;EACD,CAAC,GAAGT,MAAM;EAEV,IAAI,CAACC,OAAO,EAAE,OAAO,IAAI;EAEzB,IAAI,CAACM,aAAa,EAAE;IACnB,OAAO,IAAI;EACZ;;EAEA;EACA;EACA,IAAI,CAACD,KAAK,EAAE;IAC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EACA;EACA,MAAMC,QAAQ,GACbP,SAAS,GAAGM,yBAAyB,CAAC,EAAEE,MAAM,GAAGX,KAAK,CAAC,EAAEU,QAAQ;;EAElE;EACA;EACA,IAAIA,QAAQ,KAAKX,MAAM,EAAE;IACxB,OAAO,IAAI;EACZ;EAEA,OAAOZ,kBAAkB,CACxB,aAAa,EACbsB,yBAAyB,EACzB,CAACT,KAAK,EAAED,MAAM,EAAEG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC,CAACM,IAAI,CAAC,GAAG,CAC1D,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["SOURCE_SIGNAL_PREFIX","DESTINATION_SIGNAL_PREFIX","buildRefreshSignal","type","pairKey","key","prefix","signal","getRefreshBoundarySignal","params","enabled","currentScreenKey","sourcePairKey","destinationPairKey","linkId","group","shouldRefresh","settled","closing","linkState","sourcePair","participates","links","sourceRequests","join","refreshDestinationPairKey","pair","groupState","groups","activeId","initialId","undefined","source","destination"],"sourceRoot":"../../../../../src","sources":["components/boundary/utils/refresh-signals.ts"],"mappings":";;AAMA,MAAMA,oBAAoB,GAAG,SAAS;AACtC,MAAMC,yBAAyB,GAAG,cAAc;AAMhD,MAAMC,kBAAkB,GAAGA,CAC1BC,IAA2B,EAC3BC,OAAsB,EACtBC,GAAW,KACgB;EAC3B,SAAS;;EACT,MAAMC,MAAM,GACXH,IAAI,KAAK,QAAQ,GAAGH,oBAAoB,GAAGC,yBAAyB;EACrE,OAAO;IACNE,IAAI;IACJC,OAAO;IACPG,MAAM,EAAE,GAAGD,MAAM,GAAGF,OAAO,IAAIC,GAAG;EACnC,CAAC;AACF,CAAC;AAED,OAAO,MAAMG,wBAAwB,GAAIC,MAWxC,IAAmC;EACnC,SAAS;;EACT,MAAM;IACLC,OAAO;IACPC,gBAAgB;IAChBC,aAAa;IACbC,kBAAkB;IAClBC,MAAM;IACNC,KAAK;IACLC,aAAa;IACbC,OAAO,GAAG,KAAK;IACfC,OAAO;IACPC;EACD,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Pressable, StyleSheet } from "react-native";
5
5
  import Animated from "react-native-reanimated";
6
- import { scheduleOnUI } from "react-native-worklets";
6
+ import { scheduleOnRN, scheduleOnUI } from "react-native-worklets";
7
7
  import { DefaultSnapSpec } from "../../../configs/specs";
8
8
  import { useNavigationHelpers } from "../../../hooks/navigation/use-navigation-helpers";
9
9
  import { useDescriptorsStore } from "../../../providers/screen/descriptors";
@@ -20,12 +20,14 @@ export const BackdropLayer = /*#__PURE__*/memo(function BackdropLayer({
20
20
  isBackdropActive
21
21
  }) {
22
22
  const {
23
- dismissScreen
23
+ isRemovePrevented,
24
+ requestDismiss
24
25
  } = useNavigationHelpers();
25
26
  const routeKey = useDescriptorsStore(store => store.derivations.currentScreenKey);
26
27
  const BackdropComponent = useDescriptorsStore(store => store.options.backdropComponent);
27
28
  const rawSnapPoints = useDescriptorsStore(store => store.options.snapPoints);
28
- const canDismiss = useDescriptorsStore(store => store.options.gestureEnabled !== false);
29
+ const isGestureDismissEnabled = useDescriptorsStore(store => store.options.gestureEnabled !== false);
30
+ const canDismiss = isGestureDismissEnabled && !isRemovePrevented;
29
31
  const transitionSpec = useDescriptorsStore(store => store.options.transitionSpec);
30
32
  const animations = AnimationStore.getBag(routeKey);
31
33
  const {
@@ -36,13 +38,13 @@ export const BackdropLayer = /*#__PURE__*/memo(function BackdropLayer({
36
38
  const AnimatedBackdropComponent = useMemo(() => BackdropComponent && !usesLayerRenderProps(BackdropComponent) ? Animated.createAnimatedComponent(BackdropComponent) : null, [BackdropComponent]);
37
39
  const handleBackdropPress = useCallback(() => {
38
40
  if (backdropBehavior === "dismiss") {
39
- dismissScreen();
41
+ requestDismiss();
40
42
  return;
41
43
  }
42
44
  if (backdropBehavior === "collapse") {
43
45
  // No snap points → fallback to dismiss
44
46
  if (!rawSnapPoints || rawSnapPoints.length === 0) {
45
- dismissScreen();
47
+ requestDismiss();
46
48
  return;
47
49
  }
48
50
  const gestures = GestureStore.getBag(routeKey);
@@ -75,12 +77,14 @@ export const BackdropLayer = /*#__PURE__*/memo(function BackdropLayer({
75
77
  spec,
76
78
  animations,
77
79
  targetProgress,
78
- animationProgress,
79
- onAnimationFinish: shouldDismiss ? dismissScreen : undefined
80
+ animationProgress
80
81
  });
82
+ if (shouldDismiss) {
83
+ scheduleOnRN(requestDismiss);
84
+ }
81
85
  });
82
86
  }
83
- }, [animations, targetProgress, animationProgress, resolvedAutoSnapPoint, backdropBehavior, rawSnapPoints, canDismiss, transitionSpec, dismissScreen, routeKey]);
87
+ }, [animations, targetProgress, animationProgress, resolvedAutoSnapPoint, backdropBehavior, rawSnapPoints, canDismiss, transitionSpec, requestDismiss, routeKey]);
84
88
  const animatedBackdropStyle = useSlotStyles("backdrop");
85
89
  const animatedBackdropProps = useSlotProps("backdrop");
86
90
  const backdropPointerEvents = isBackdropActive ? "auto" : "none";
@@ -1 +1 @@
1
- {"version":3,"names":["memo","useCallback","useMemo","Pressable","StyleSheet","Animated","scheduleOnUI","DefaultSnapSpec","useNavigationHelpers","useDescriptorsStore","useSlotProps","useSlotStyles","AnimationStore","GestureStore","SystemStore","animateToProgress","findCollapseTarget","usesLayerRenderProps","jsx","_jsx","BackdropLayer","backdropBehavior","isBackdropActive","dismissScreen","routeKey","store","derivations","currentScreenKey","BackdropComponent","options","backdropComponent","rawSnapPoints","snapPoints","canDismiss","gestureEnabled","transitionSpec","animations","getBag","targetProgress","animationProgress","resolvedAutoSnapPoint","AnimatedBackdropComponent","createAnimatedComponent","handleBackdropPress","length","gestures","resolvedSnaps","i","point","resolvedPoint","get","push","target","shouldDismiss","transitionProgress","dismissing","set","spec","open","expand","close","collapse","markEntering","onAnimationFinish","undefined","animatedBackdropStyle","animatedBackdropProps","backdropPointerEvents","backdropStyles","absoluteFill","backdropProps","style","pointerEvents","onPress","children","animatedProps","styles","props","View"],"sourceRoot":"../../../../../src","sources":["components/screen-container/layers/backdrop.tsx"],"mappings":";;AAAA,SAA6BA,IAAI,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;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B8B,KAAK,EAAEH,cAAe;MACtBO,aAAa,EAAET,qBAAsB;MACrCM,aAAa,EAAEL;IAAsB,CACrC,CAAC,GACCvC,iBAAiB,gBACpBT,IAAA,CAACS,iBAAiB;MACjBgD,MAAM,EAAER,cAAe;MACvBS,KAAK,EAAEP,aAAc;MACrBE,aAAa,EAAEL;IAAsB,CACrC,CAAC,gBAEFhD,IAAA,CAACd,QAAQ,CAACyE,IAAI;MACbP,KAAK,EAAEH,cAAe;MACtBI,aAAa,EAAEL;IAAsB,CACrC;EACD,CACS,CAAC;AAEd,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["memo","useCallback","useMemo","Pressable","StyleSheet","Animated","scheduleOnRN","scheduleOnUI","DefaultSnapSpec","useNavigationHelpers","useDescriptorsStore","useSlotProps","useSlotStyles","AnimationStore","GestureStore","SystemStore","animateToProgress","findCollapseTarget","usesLayerRenderProps","jsx","_jsx","BackdropLayer","backdropBehavior","isBackdropActive","isRemovePrevented","requestDismiss","routeKey","store","derivations","currentScreenKey","BackdropComponent","options","backdropComponent","rawSnapPoints","snapPoints","isGestureDismissEnabled","gestureEnabled","canDismiss","transitionSpec","animations","getBag","targetProgress","animationProgress","resolvedAutoSnapPoint","AnimatedBackdropComponent","createAnimatedComponent","handleBackdropPress","length","gestures","resolvedSnaps","i","point","resolvedPoint","get","push","target","shouldDismiss","transitionProgress","dismissing","set","spec","open","expand","close","collapse","markEntering","animatedBackdropStyle","animatedBackdropProps","backdropPointerEvents","backdropStyles","absoluteFill","backdropProps","style","pointerEvents","onPress","undefined","children","animatedProps","styles","props","View"],"sourceRoot":"../../../../../src","sources":["components/screen-container/layers/backdrop.tsx"],"mappings":";;AAAA,SAA6BA,IAAI,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACtE,SAASC,SAAS,EAAEC,UAAU,QAAQ,cAAc;AACpD,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,YAAY,EAAEC,YAAY,QAAQ,uBAAuB;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BQ,aAAa,EAAEV,qBAAsB;MACrCM,aAAa,EAAEL;IAAsB,CACrC,CAAC,GACCtC,iBAAiB,gBACpBV,IAAA,CAACU,iBAAiB;MACjBgD,MAAM,EAAET,cAAe;MACvBU,KAAK,EAAER,aAAc;MACrBE,aAAa,EAAEL;IAAsB,CACrC,CAAC,gBAEFhD,IAAA,CAACf,QAAQ,CAAC2E,IAAI;MACbR,KAAK,EAAEH,cAAe;MACtBI,aAAa,EAAEL;IAAsB,CACrC;EACD,CACS,CAAC;AAEd,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ const containsRouteKey = (routes, routeKey) => routes.some(route => route.key === routeKey || (route.state ? containsRouteKey(route.state.routes, routeKey) : false));
4
+ export const doesNavigatorOwnCloseAction = ({
5
+ state,
6
+ action,
7
+ isNested
8
+ }) => {
9
+ if (typeof action.target === "string") {
10
+ return action.target === state.key;
11
+ }
12
+ if (typeof action.source === "string") {
13
+ return containsRouteKey(state.routes, action.source);
14
+ }
15
+ return !isNested;
16
+ };
17
+
18
+ /** Only the focused removable route owns a stack close transition. */
19
+ export const shouldInterceptClose = ({
20
+ enabled,
21
+ ownsAction,
22
+ ancestorDismissing,
23
+ routeIndex,
24
+ focusedIndex
25
+ }) => enabled && ownsAction && !ancestorDismissing && routeIndex > 0 && routeIndex === focusedIndex;
26
+ //# sourceMappingURL=close-interception-rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["containsRouteKey","routes","routeKey","some","route","key","state","doesNavigatorOwnCloseAction","action","isNested","target","source","shouldInterceptClose","enabled","ownsAction","ancestorDismissing","routeIndex","focusedIndex"],"sourceRoot":"../../../../../../src","sources":["components/screen-lifecycle/hooks/helpers/close-interception-rules.ts"],"mappings":";;AAuBA,MAAMA,gBAAgB,GAAGA,CACxBC,MAA6B,EAC7BC,QAAgB,KAEhBD,MAAM,CAACE,IAAI,CACTC,KAAK,IACLA,KAAK,CAACC,GAAG,KAAKH,QAAQ,KACrBE,KAAK,CAACE,KAAK,GAAGN,gBAAgB,CAACI,KAAK,CAACE,KAAK,CAACL,MAAM,EAAEC,QAAQ,CAAC,GAAG,KAAK,CACvE,CAAC;AAEF,OAAO,MAAMK,2BAA2B,GAAGA,CAAC;EAC3CD,KAAK;EACLE,MAAM;EACNC;AAKD,CAAC,KAAc;EACd,IAAI,OAAOD,MAAM,CAACE,MAAM,KAAK,QAAQ,EAAE;IACtC,OAAOF,MAAM,CAACE,MAAM,KAAKJ,KAAK,CAACD,GAAG;EACnC;EAEA,IAAI,OAAOG,MAAM,CAACG,MAAM,KAAK,QAAQ,EAAE;IACtC,OAAOX,gBAAgB,CAACM,KAAK,CAACL,MAAM,EAAEO,MAAM,CAACG,MAAM,CAAC;EACrD;EAEA,OAAO,CAACF,QAAQ;AACjB,CAAC;;AAED;AACA,OAAO,MAAMG,oBAAoB,GAAGA,CAAC;EACpCC,OAAO;EACPC,UAAU;EACVC,kBAAkB;EAClBC,UAAU;EACVC;AACuB,CAAC,KACxBJ,OAAO,IACPC,UAAU,IACV,CAACC,kBAAkB,IACnBC,UAAU,GAAG,CAAC,IACdA,UAAU,KAAKC,YAAY","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ import { useAnimatedReaction } from "react-native-reanimated";
4
+ import { scheduleOnRN } from "react-native-worklets";
5
+ export const useCloseCompletion = ({
6
+ closing,
7
+ animationProgress,
8
+ onComplete
9
+ }) => {
10
+ useAnimatedReaction(() => {
11
+ "worklet";
12
+
13
+ return !!closing.get() && animationProgress.get() <= 0;
14
+ }, (complete, previouslyComplete) => {
15
+ "worklet";
16
+
17
+ if (complete && !previouslyComplete) {
18
+ scheduleOnRN(onComplete);
19
+ }
20
+ });
21
+ };
22
+ //# sourceMappingURL=use-close-completion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useAnimatedReaction","scheduleOnRN","useCloseCompletion","closing","animationProgress","onComplete","get","complete","previouslyComplete"],"sourceRoot":"../../../../../src","sources":["components/screen-lifecycle/hooks/use-close-completion.ts"],"mappings":";;AAAA,SAA2BA,mBAAmB,QAAQ,yBAAyB;AAC/E,SAASC,YAAY,QAAQ,uBAAuB;AAEpD,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC,OAAO;EACPC,iBAAiB;EACjBC;AAKD,CAAC,KAAK;EACLL,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,OAAO,CAAC,CAACG,OAAO,CAACG,GAAG,CAAC,CAAC,IAAIF,iBAAiB,CAACE,GAAG,CAAC,CAAC,IAAI,CAAC;EACvD,CAAC,EACD,CAACC,QAAQ,EAAEC,kBAAkB,KAAK;IACjC,SAAS;;IACT,IAAID,QAAQ,IAAI,CAACC,kBAAkB,EAAE;MACpCP,YAAY,CAACI,UAAU,CAAC;IACzB;EACD,CACD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -1,85 +1,85 @@
1
1
  "use strict";
2
2
 
3
- /** biome-ignore-all lint/correctness/useHookAtTopLevel: STACK_TYPE is stable per navigator */
4
3
  import { useLayoutEffect, useMemo, useRef } from "react";
4
+ import { useNavigationHelpers } from "../../../hooks/navigation/use-navigation-helpers";
5
5
  import useStableCallback from "../../../hooks/use-stable-callback";
6
+ import { hasTransitionsEnabled } from "../../../providers/screen/animation/helpers/has-transitions-enabled";
6
7
  import { useDescriptorsStore } from "../../../providers/screen/descriptors";
7
8
  import { useBlankStackStore } from "../../../providers/stack/blank-stack.provider";
8
9
  import { useStackCoreStore } from "../../../providers/stack/core.provider";
9
10
  import { GestureStore } from "../../../stores/gesture.store";
10
- import { LifecycleTransitionRequestKind } from "../../../stores/system.store";
11
11
  import { StackType } from "../../../types/stack.types";
12
+ import { dispatchCloseAction, isCloseActionReplay } from "../../../utils/navigation/close-action-replay";
13
+ import { doesNavigatorOwnCloseAction, shouldInterceptClose } from "./helpers/close-interception-rules";
12
14
  import { resetStoresForScreen } from "./helpers/reset-stores-for-screen";
13
- const useBlankStackClose = ({
14
- current,
15
- requestLifecycleTransition,
16
- resetStores
17
- }) => {
15
+ export function useCloseTransitionIntent(current) {
16
+ const routeKey = current.route.key;
17
+ const {
18
+ STACK_TYPE: stackType,
19
+ TRANSITIONS_ALWAYS_ON: transitionsAlwaysOn
20
+ } = useStackCoreStore(store => store.flags);
18
21
  const handleCloseRoute = useBlankStackStore(store => store?.handleCloseRoute);
19
- const isClosing = useBlankStackStore(store => store?.scenesByKey[current.route.key]?.activity === "closing");
20
- useLayoutEffect(() => {
21
- if (!isClosing) {
22
- return;
23
- }
24
- requestLifecycleTransition(LifecycleTransitionRequestKind.BlankStackClose, 0);
25
- }, [isClosing, requestLifecycleTransition]);
26
- const handleBlankStackCloseEnd = useStableCallback(finished => {
27
- if (!finished) return;
28
- if (!handleCloseRoute) {
29
- throw new Error("Blank stack close handler was not found.");
30
- }
31
- handleCloseRoute({
32
- route: current.route
33
- });
34
- requestAnimationFrame(() => {
35
- resetStores();
36
- });
37
- });
38
- return {
39
- handleBlankStackCloseEnd
40
- };
41
- };
42
-
43
- /**
44
- * Native stack close - listens to beforeRemove navigation event.
45
- */
46
- const useNativeStackClose = ({
47
- current,
48
- requestLifecycleTransition,
49
- resetStores
50
- }) => {
51
- const parentScreenKey = useDescriptorsStore(store => store.derivations.parentScreenKey);
22
+ const isBlankStackClosing = useBlankStackStore(store => store?.scenesByKey[routeKey]?.activity === "closing");
23
+ const ancestorKeys = useDescriptorsStore(store => store.derivations.ancestorKeys);
24
+ const parentScreenKey = ancestorKeys[0];
25
+ const {
26
+ dismissScreen,
27
+ requestDismiss
28
+ } = useNavigationHelpers();
52
29
  const pendingActionRef = useRef(null);
53
30
  const nearestAncestorDismissing = useMemo(() => {
54
31
  if (!parentScreenKey) return null;
55
32
  return GestureStore.peekBag(parentScreenKey)?.dismissing ?? null;
56
33
  }, [parentScreenKey]);
57
- const handleNativeCloseEnd = useStableCallback(finished => {
58
- if (!finished || !pendingActionRef.current) {
59
- pendingActionRef.current = null;
60
- return;
34
+ useLayoutEffect(() => {
35
+ if (isBlankStackClosing) {
36
+ requestDismiss();
61
37
  }
62
- current.navigation.dispatch(pendingActionRef.current);
38
+ }, [isBlankStackClosing, requestDismiss]);
39
+ const completeClose = useStableCallback(() => {
40
+ const pendingAction = pendingActionRef.current;
63
41
  pendingActionRef.current = null;
64
- requestAnimationFrame(() => {
65
- resetStores();
66
- });
42
+ if (pendingAction) {
43
+ dispatchCloseAction(pendingAction, action => {
44
+ current.navigation.dispatch(action);
45
+ });
46
+ } else if (stackType !== StackType.NATIVE && handleCloseRoute) {
47
+ handleCloseRoute({
48
+ route: current.route
49
+ });
50
+ } else {
51
+ dismissScreen();
52
+ }
53
+ resetStoresForScreen(routeKey);
67
54
  });
68
- const handleBeforeRemove = useStableCallback(e => {
69
- const options = current.options;
70
- const isEnabled = options.enableTransitions;
71
- const navigation = current.navigation;
72
- const routeKey = current.route.key;
73
- const state = navigation.getState();
55
+ const handleBeforeRemove = useStableCallback(event => {
56
+ if (isCloseActionReplay(event.data.action)) {
57
+ return;
58
+ }
59
+ const state = current.navigation.getState();
74
60
  const routeIndex = state.routes.findIndex(route => route.key === routeKey);
75
- const isFirstScreen = routeIndex <= 0;
76
- if (!isEnabled || nearestAncestorDismissing?.get() || isFirstScreen) {
77
- resetStores();
61
+ const action = event.data.action;
62
+ const ownsAction = doesNavigatorOwnCloseAction({
63
+ state,
64
+ action,
65
+ isNested: ancestorKeys.length > 0
66
+ });
67
+ const shouldIntercept = shouldInterceptClose({
68
+ enabled: hasTransitionsEnabled(current.options, transitionsAlwaysOn),
69
+ ownsAction,
70
+ ancestorDismissing: !!nearestAncestorDismissing?.get(),
71
+ routeIndex,
72
+ focusedIndex: state.index
73
+ });
74
+ if (!shouldIntercept) {
75
+ return;
76
+ }
77
+ pendingActionRef.current ??= event.data.action;
78
+ if (!requestDismiss()) {
79
+ pendingActionRef.current = null;
78
80
  return;
79
81
  }
80
- e.preventDefault();
81
- pendingActionRef.current = e.data.action;
82
- requestLifecycleTransition(LifecycleTransitionRequestKind.NativeClose, 0);
82
+ event.preventDefault();
83
83
  });
84
84
 
85
85
  // biome-ignore lint/correctness/useExhaustiveDependencies: navigation listener should only rebind when the navigator instance changes
@@ -87,31 +87,7 @@ const useNativeStackClose = ({
87
87
  return current.navigation.addListener?.("beforeRemove", handleBeforeRemove);
88
88
  }, [current.navigation]);
89
89
  return {
90
- handleNativeCloseEnd
91
- };
92
- };
93
-
94
- /**
95
- * Handles close transition intent and returns finish callbacks for cleanup.
96
- */
97
- export function useCloseTransitionIntent(current, system) {
98
- const routeKey = current.route.key;
99
- const stackType = useStackCoreStore(store => store.flags.STACK_TYPE);
100
- const isNativeStack = stackType === StackType.NATIVE;
101
- const {
102
- requestLifecycleTransition
103
- } = system.actions;
104
- const resetStores = useStableCallback(() => {
105
- resetStoresForScreen(routeKey);
106
- });
107
- const closeParams = {
108
- current,
109
- requestLifecycleTransition,
110
- resetStores
90
+ completeClose
111
91
  };
112
- if (isNativeStack) {
113
- return useNativeStackClose(closeParams);
114
- }
115
- return useBlankStackClose(closeParams);
116
92
  }
117
93
  //# sourceMappingURL=use-close-transition-intent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useLayoutEffect","useMemo","useRef","useStableCallback","useDescriptorsStore","useBlankStackStore","useStackCoreStore","GestureStore","LifecycleTransitionRequestKind","StackType","resetStoresForScreen","useBlankStackClose","current","requestLifecycleTransition","resetStores","handleCloseRoute","store","isClosing","scenesByKey","route","key","activity","BlankStackClose","handleBlankStackCloseEnd","finished","Error","requestAnimationFrame","useNativeStackClose","parentScreenKey","derivations","pendingActionRef","nearestAncestorDismissing","peekBag","dismissing","handleNativeCloseEnd","navigation","dispatch","handleBeforeRemove","e","options","isEnabled","enableTransitions","routeKey","state","getState","routeIndex","routes","findIndex","isFirstScreen","get","preventDefault","data","action","NativeClose","addListener","useCloseTransitionIntent","system","stackType","flags","STACK_TYPE","isNativeStack","NATIVE","actions","closeParams"],"sourceRoot":"../../../../../src","sources":["components/screen-lifecycle/hooks/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AAOjC,mBAAmB,CAACoC,WAAW,CAAC;EACxC;EAEA,OAAOpD,kBAAkB,CAACoD,WAAW,CAAC;AACvC","ignoreList":[]}
1
+ {"version":3,"names":["useLayoutEffect","useMemo","useRef","useNavigationHelpers","useStableCallback","hasTransitionsEnabled","useDescriptorsStore","useBlankStackStore","useStackCoreStore","GestureStore","StackType","dispatchCloseAction","isCloseActionReplay","doesNavigatorOwnCloseAction","shouldInterceptClose","resetStoresForScreen","useCloseTransitionIntent","current","routeKey","route","key","STACK_TYPE","stackType","TRANSITIONS_ALWAYS_ON","transitionsAlwaysOn","store","flags","handleCloseRoute","isBlankStackClosing","scenesByKey","activity","ancestorKeys","derivations","parentScreenKey","dismissScreen","requestDismiss","pendingActionRef","nearestAncestorDismissing","peekBag","dismissing","completeClose","pendingAction","action","navigation","dispatch","NATIVE","handleBeforeRemove","event","data","state","getState","routeIndex","routes","findIndex","ownsAction","isNested","length","shouldIntercept","enabled","options","ancestorDismissing","get","focusedIndex","index","preventDefault","addListener"],"sourceRoot":"../../../../../src","sources":["components/screen-lifecycle/hooks/use-close-transition-intent.ts"],"mappings":";;AAAA,SAASA,eAAe,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACxD,SAASC,oBAAoB,QAAQ,kDAAkD;AACvF,OAAOC,iBAAiB,MAAM,oCAAoC;AAClE,SAASC,qBAAqB,QAAQ,qEAAqE;AAC3G,SAECC,mBAAmB,QACb,uCAAuC;AAC9C,SAASC,kBAAkB,QAAQ,+CAA+C;AAClF,SAASC,iBAAiB,QAAQ,wCAAwC;AAC1E,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SACCC,mBAAmB,EACnBC,mBAAmB,QACb,+CAA+C;AACtD,SACCC,2BAA2B,EAC3BC,oBAAoB,QACd,oCAAoC;AAC3C,SAASC,oBAAoB,QAAQ,mCAAmC;AAExE,OAAO,SAASC,wBAAwBA,CAACC,OAAuB,EAE9D;EACD,MA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B,KAAK,CAACC,IAAI,CAACN,MAAM;IAC9C,IAAI,CAACP,cAAc,CAAC,CAAC,EAAE;MACtBC,gBAAgB,CAACnB,OAAO,GAAG,IAAI;MAC/B;IACD;IAEA8B,KAAK,CAACiB,cAAc,CAAC,CAAC;EACvB,CAAC,CAAC;;EAEF;EACAhE,eAAe,CAAC,MAAM;IACrB,OAAOiB,OAAO,CAAC0B,UAAU,CAACsB,WAAW,GAAG,cAAc,EAAEnB,kBAAkB,CAAC;EAC5E,CAAC,EAAE,CAAC7B,OAAO,CAAC0B,UAAU,CAAC,CAAC;EAExB,OAAO;IAAEH;EAAc,CAAC;AACzB","ignoreList":[]}
@@ -7,9 +7,7 @@ import { animateToProgress } from "../../../utils/animation/animate-to-progress"
7
7
  export const useTransitionStartController = ({
8
8
  current,
9
9
  animations,
10
- system,
11
- onBlankStackCloseFinish,
12
- onNativeCloseFinish
10
+ system
13
11
  }) => {
14
12
  const {
15
13
  targetProgress,
@@ -37,7 +35,6 @@ export const useTransitionStartController = ({
37
35
  if (blockCount > 0) {
38
36
  return;
39
37
  }
40
- const onAnimationFinish = kind === LifecycleTransitionRequestKind.BlankStackClose ? onBlankStackCloseFinish : kind === LifecycleTransitionRequestKind.NativeClose ? onNativeCloseFinish : undefined;
41
38
  animateToProgress({
42
39
  target,
43
40
  spec: transitionSpec,
@@ -45,7 +42,6 @@ export const useTransitionStartController = ({
45
42
  animations,
46
43
  targetProgress,
47
44
  animationProgress,
48
- onAnimationFinish,
49
45
  isDragging
50
46
  });
51
47
  clearLifecycleTransitionRequest();
@@ -1 +1 @@
1
- {"version":3,"names":["useAnimatedReaction","GestureStore","LifecycleTransitionRequestKind","animateToProgress","useTransitionStartController","current","animations","system","onBlankStackCloseFinish","onNativeCloseFinish","targetProgress","animationProgress","pendingLifecycleRequestKind","pendingLifecycleRequestTarget","pendingLifecycleStartBlockCount","clearLifecycleTransitionRequest","actions","transitionSpec","options","isDragging","getValue","route","key","get","next","kind","target","blockCount","None","onAnimationFinish","BlankStackClose","NativeClose","undefined","spec","emitWillAnimate","Open","entering"],"sourceRoot":"../../../../../src","sources":["components/screen-lifecycle/hooks/use-transition-start-controller.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAG7D,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SACCC,8BAA8B,QAExB,8BAA8B;AACrC,SAASC,iBAAiB,QAAQ,8CAA8C;AAEhF,OAAO,MAAMC,4BAA4B,GAAGA,CAAC;EAC5CC,OAAO;EACPC,UAAU;EACVC,MAAM;EACNC,uBAAuB;EACvBC;AAOD,CAAC,KAAK;EACL,MAAM;IACLC,cAAc;IACdC,iBAAiB;IACjBC,2BAA2B;IAC3BC,6BAA6B;IAC7BC;EACD,CAAC,GAAGP,MAAM;EACV,MAAM;IAAEQ;EAAgC,CAAC,GAAGR,MAAM,CAACS,OAAO;EAC1D,MAAMC,cAAc,GAAGZ,OAAO,CAACa,OAAO,CAACD,cAAc;EACrD,MAAME,UAAU,GAAGlB,YAAY,CAACmB,QAAQ,CAACf,OAAO,CAACgB,KAAK,CAACC,GAAG,EAAE,UAAU,CAAC;EAEvEtB,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,OAAO,CACNY,2BAA2B,CAACW,GAAG,CAAC,CAAC,EACjCV,6BAA6B,CAACU,GAAG,CAAC,CAAC,EACnCT,+BAA+B,CAACS,GAAG,CAAC,CAAC,CACrC;EACF,CAAC,EACAC,IAAI,IAAK;IACT,SAAS;;IACT,MAAM,CAACC,IAAI,EAAEC,MAAM,EAAEC,UAAU,CAAC,GAAGH,IAAI;IAEvC,IAAIC,IAAI,KAAKvB,8BAA8B,CAAC0B,IAAI,EAAE;MACjD;IACD;IAEA,IAAID,UAAU,GAAG,CAAC,EAAE;MACnB;IACD;IAEA,MAAME,iBAAiB,GACtBJ,IAAI,KAAKvB,8BAA8B,CAAC4B,eAAe,GACpDtB,uBAAuB,GACvBiB,IAAI,KAAKvB,8BAA8B,CAAC6B,WAAW,GAClDtB,mBAAmB,GACnBuB,SAAS;IAEd7B,iBAAiB,CAAC;MACjBuB,MAAM;MACNO,IAAI,EAAEhB,cAAc;MACpBiB,eAAe,EACdT,IAAI,KAAKvB,8BAA8B,CAACiC,IAAI,IAC5C,CAAC7B,UAAU,CAAC8B,QAAQ,CAACb,GAAG,CAAC,CAAC;MAC3BjB,UAAU;MACVI,cAAc;MACdC,iBAAiB;MACjBkB,iBAAiB;MACjBV;IACD,CAAC,CAAC;IAEFJ,+BAA+B,CAAC,CAAC;EAClC,CACD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useAnimatedReaction","GestureStore","LifecycleTransitionRequestKind","animateToProgress","useTransitionStartController","current","animations","system","targetProgress","animationProgress","pendingLifecycleRequestKind","pendingLifecycleRequestTarget","pendingLifecycleStartBlockCount","clearLifecycleTransitionRequest","actions","transitionSpec","options","isDragging","getValue","route","key","get","next","kind","target","blockCount","None","spec","emitWillAnimate","Open","entering"],"sourceRoot":"../../../../../src","sources":["components/screen-lifecycle/hooks/use-transition-start-controller.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAG7D,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SACCC,8BAA8B,QAExB,8BAA8B;AACrC,SAASC,iBAAiB,QAAQ,8CAA8C;AAEhF,OAAO,MAAMC,4BAA4B,GAAGA,CAAC;EAC5CC,OAAO;EACPC,UAAU;EACVC;AAKD,CAAC,KAAK;EACL,MAAM;IACLC,cAAc;IACdC,iBAAiB;IACjBC,2BAA2B;IAC3BC,6BAA6B;IAC7BC;EACD,CAAC,GAAGL,MAAM;EACV,MAAM;IAAEM;EAAgC,CAAC,GAAGN,MAAM,CAACO,OAAO;EAC1D,MAAMC,cAAc,GAAGV,OAAO,CAACW,OAAO,CAACD,cAAc;EACrD,MAAME,UAAU,GAAGhB,YAAY,CAACiB,QAAQ,CAACb,OAAO,CAACc,KAAK,CAACC,GAAG,EAAE,UAAU,CAAC;EAEvE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