react-native-screen-transitions 4.0.0-alpha.8 → 4.0.0

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 (308) hide show
  1. package/README.md +6 -11
  2. package/lib/commonjs/components/boundary/create-boundary-component.js +5 -1
  3. package/lib/commonjs/components/boundary/create-boundary-component.js.map +1 -1
  4. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +53 -1
  5. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
  6. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +43 -8
  7. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  8. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +2 -3
  9. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  10. package/lib/commonjs/components/boundary/portal/teleport.js +1 -13
  11. package/lib/commonjs/components/boundary/portal/teleport.js.map +1 -1
  12. package/lib/commonjs/components/boundary/utils/source-signals.js +6 -4
  13. package/lib/commonjs/components/boundary/utils/source-signals.js.map +1 -1
  14. package/lib/commonjs/components/overlay/helpers/get-active-overlay.js +3 -24
  15. package/lib/commonjs/components/overlay/helpers/get-active-overlay.js.map +1 -1
  16. package/lib/commonjs/components/overlay/helpers/retain-ready-overlay-resources.js +4 -3
  17. package/lib/commonjs/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -1
  18. package/lib/commonjs/components/overlay/hooks/use-overlay-slot.js +1 -2
  19. package/lib/commonjs/components/overlay/hooks/use-overlay-slot.js.map +1 -1
  20. package/lib/commonjs/components/overlay/variations/float-overlay.js +0 -2
  21. package/lib/commonjs/components/overlay/variations/float-overlay.js.map +1 -1
  22. package/lib/commonjs/components/overlay/variations/overlay-host.js +18 -15
  23. package/lib/commonjs/components/overlay/variations/overlay-host.js.map +1 -1
  24. package/lib/commonjs/components/screen-container/layers/content.js +10 -5
  25. package/lib/commonjs/components/screen-container/layers/content.js.map +1 -1
  26. package/lib/commonjs/components/screen-container/layers/surface.js +50 -0
  27. package/lib/commonjs/components/screen-container/layers/surface.js.map +1 -0
  28. package/lib/commonjs/components/stack-view.js +7 -29
  29. package/lib/commonjs/components/stack-view.js.map +1 -1
  30. package/lib/commonjs/configs/index.js +1 -4
  31. package/lib/commonjs/configs/index.js.map +1 -1
  32. package/lib/commonjs/configs/presets.js +1 -384
  33. package/lib/commonjs/configs/presets.js.map +1 -1
  34. package/lib/commonjs/constants.js +2 -1
  35. package/lib/commonjs/constants.js.map +1 -1
  36. package/lib/commonjs/navigators/create-blank-stack-navigator.js +7 -67
  37. package/lib/commonjs/navigators/create-blank-stack-navigator.js.map +1 -1
  38. package/lib/commonjs/navigators/expo-router/index.js +1 -18
  39. package/lib/commonjs/navigators/expo-router/index.js.map +1 -1
  40. package/lib/commonjs/navigators/react-navigation/index.js +1 -3
  41. package/lib/commonjs/navigators/react-navigation/index.js.map +1 -1
  42. package/lib/commonjs/providers/screen/animation/animation.provider.js +6 -1
  43. package/lib/commonjs/providers/screen/animation/animation.provider.js.map +1 -1
  44. package/lib/commonjs/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
  45. package/lib/commonjs/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  46. package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js +20 -5
  47. package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -1
  48. package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/index.js +16 -1
  49. package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  50. package/lib/commonjs/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
  51. package/lib/commonjs/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
  52. package/lib/commonjs/providers/screen/animation/use-screen-animation.js +1 -8
  53. package/lib/commonjs/providers/screen/animation/use-screen-animation.js.map +1 -1
  54. package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-release.js +28 -6
  55. package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
  56. package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-release.js +26 -6
  57. package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
  58. package/lib/commonjs/providers/screen/gestures/shared/policy.js +1 -0
  59. package/lib/commonjs/providers/screen/gestures/shared/policy.js.map +1 -1
  60. package/lib/commonjs/providers/screen/gestures/shared/snap-points.js +71 -1
  61. package/lib/commonjs/providers/screen/gestures/shared/snap-points.js.map +1 -1
  62. package/lib/commonjs/providers/screen/options/helpers.js +8 -1
  63. package/lib/commonjs/providers/screen/options/helpers.js.map +1 -1
  64. package/lib/commonjs/providers/screen/styles/constants.js +4 -1
  65. package/lib/commonjs/providers/screen/styles/constants.js.map +1 -1
  66. package/lib/commonjs/providers/screen/styles/hooks/slot-resolvers.js +1 -9
  67. package/lib/commonjs/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
  68. package/lib/commonjs/providers/screen/styles/slot.provider.js +3 -1
  69. package/lib/commonjs/providers/screen/styles/slot.provider.js.map +1 -1
  70. package/lib/commonjs/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js +10 -4
  71. package/lib/commonjs/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js.map +1 -1
  72. package/lib/commonjs/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js +4 -3
  73. package/lib/commonjs/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js.map +1 -1
  74. package/lib/commonjs/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.js.map +1 -1
  75. package/lib/commonjs/providers/stack/blank-stack-state/helpers/state-equality.js +9 -2
  76. package/lib/commonjs/providers/stack/blank-stack-state/helpers/state-equality.js.map +1 -1
  77. package/lib/commonjs/utils/create-provider.js +14 -3
  78. package/lib/commonjs/utils/create-provider.js.map +1 -1
  79. package/lib/module/components/boundary/create-boundary-component.js +6 -2
  80. package/lib/module/components/boundary/create-boundary-component.js.map +1 -1
  81. package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +50 -0
  82. package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
  83. package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +44 -9
  84. package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  85. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +2 -3
  86. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  87. package/lib/module/components/boundary/portal/teleport.js +1 -14
  88. package/lib/module/components/boundary/portal/teleport.js.map +1 -1
  89. package/lib/module/components/boundary/utils/source-signals.js +6 -4
  90. package/lib/module/components/boundary/utils/source-signals.js.map +1 -1
  91. package/lib/module/components/overlay/helpers/get-active-overlay.js +3 -24
  92. package/lib/module/components/overlay/helpers/get-active-overlay.js.map +1 -1
  93. package/lib/module/components/overlay/helpers/retain-ready-overlay-resources.js +4 -3
  94. package/lib/module/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -1
  95. package/lib/module/components/overlay/hooks/use-overlay-slot.js +1 -2
  96. package/lib/module/components/overlay/hooks/use-overlay-slot.js.map +1 -1
  97. package/lib/module/components/overlay/variations/float-overlay.js +0 -2
  98. package/lib/module/components/overlay/variations/float-overlay.js.map +1 -1
  99. package/lib/module/components/overlay/variations/overlay-host.js +19 -16
  100. package/lib/module/components/overlay/variations/overlay-host.js.map +1 -1
  101. package/lib/module/components/screen-container/layers/content.js +10 -5
  102. package/lib/module/components/screen-container/layers/content.js.map +1 -1
  103. package/lib/module/components/screen-container/layers/surface.js +45 -0
  104. package/lib/module/components/screen-container/layers/surface.js.map +1 -0
  105. package/lib/module/components/stack-view.js +7 -29
  106. package/lib/module/components/stack-view.js.map +1 -1
  107. package/lib/module/configs/index.js +2 -5
  108. package/lib/module/configs/index.js.map +1 -1
  109. package/lib/module/configs/presets.js +0 -380
  110. package/lib/module/configs/presets.js.map +1 -1
  111. package/lib/module/constants.js +1 -0
  112. package/lib/module/constants.js.map +1 -1
  113. package/lib/module/navigators/create-blank-stack-navigator.js +7 -66
  114. package/lib/module/navigators/create-blank-stack-navigator.js.map +1 -1
  115. package/lib/module/navigators/expo-router/index.js +1 -18
  116. package/lib/module/navigators/expo-router/index.js.map +1 -1
  117. package/lib/module/navigators/react-navigation/index.js +1 -3
  118. package/lib/module/navigators/react-navigation/index.js.map +1 -1
  119. package/lib/module/providers/screen/animation/animation.provider.js +4 -0
  120. package/lib/module/providers/screen/animation/animation.provider.js.map +1 -1
  121. package/lib/module/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
  122. package/lib/module/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  123. package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js +20 -5
  124. package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -1
  125. package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/index.js +16 -1
  126. package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  127. package/lib/module/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
  128. package/lib/module/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
  129. package/lib/module/providers/screen/animation/use-screen-animation.js +2 -9
  130. package/lib/module/providers/screen/animation/use-screen-animation.js.map +1 -1
  131. package/lib/module/providers/screen/gestures/pan/behavior/pan-release.js +29 -7
  132. package/lib/module/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
  133. package/lib/module/providers/screen/gestures/pinch/behavior/pinch-release.js +27 -7
  134. package/lib/module/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
  135. package/lib/module/providers/screen/gestures/shared/policy.js +2 -1
  136. package/lib/module/providers/screen/gestures/shared/policy.js.map +1 -1
  137. package/lib/module/providers/screen/gestures/shared/snap-points.js +66 -0
  138. package/lib/module/providers/screen/gestures/shared/snap-points.js.map +1 -1
  139. package/lib/module/providers/screen/options/helpers.js +9 -2
  140. package/lib/module/providers/screen/options/helpers.js.map +1 -1
  141. package/lib/module/providers/screen/styles/constants.js +4 -1
  142. package/lib/module/providers/screen/styles/constants.js.map +1 -1
  143. package/lib/module/providers/screen/styles/hooks/slot-resolvers.js +2 -10
  144. package/lib/module/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
  145. package/lib/module/providers/screen/styles/slot.provider.js +1 -0
  146. package/lib/module/providers/screen/styles/slot.provider.js.map +1 -1
  147. package/lib/module/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js +11 -5
  148. package/lib/module/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js.map +1 -1
  149. package/lib/module/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js +5 -4
  150. package/lib/module/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js.map +1 -1
  151. package/lib/module/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.js.map +1 -1
  152. package/lib/module/providers/stack/blank-stack-state/helpers/state-equality.js +7 -1
  153. package/lib/module/providers/stack/blank-stack-state/helpers/state-equality.js.map +1 -1
  154. package/lib/module/types/animation.types.js +10 -0
  155. package/lib/module/types/animation.types.js.map +1 -1
  156. package/lib/module/utils/create-provider.js +14 -3
  157. package/lib/module/utils/create-provider.js.map +1 -1
  158. package/lib/typescript/components/boundary/create-boundary-component.d.ts.map +1 -1
  159. package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts +20 -1
  160. package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts.map +1 -1
  161. package/lib/typescript/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
  162. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
  163. package/lib/typescript/components/boundary/portal/teleport.d.ts +1 -1
  164. package/lib/typescript/components/boundary/portal/teleport.d.ts.map +1 -1
  165. package/lib/typescript/components/boundary/utils/source-signals.d.ts.map +1 -1
  166. package/lib/typescript/components/overlay/helpers/get-active-overlay.d.ts +2 -8
  167. package/lib/typescript/components/overlay/helpers/get-active-overlay.d.ts.map +1 -1
  168. package/lib/typescript/components/overlay/helpers/retain-ready-overlay-resources.d.ts +2 -1
  169. package/lib/typescript/components/overlay/helpers/retain-ready-overlay-resources.d.ts.map +1 -1
  170. package/lib/typescript/components/overlay/hooks/use-overlay-slot.d.ts.map +1 -1
  171. package/lib/typescript/components/overlay/variations/float-overlay.d.ts.map +1 -1
  172. package/lib/typescript/components/overlay/variations/overlay-host.d.ts +2 -3
  173. package/lib/typescript/components/overlay/variations/overlay-host.d.ts.map +1 -1
  174. package/lib/typescript/components/screen-container/layers/content.d.ts.map +1 -1
  175. package/lib/typescript/components/screen-container/layers/surface.d.ts +7 -0
  176. package/lib/typescript/components/screen-container/layers/surface.d.ts.map +1 -0
  177. package/lib/typescript/components/stack-view.d.ts +1 -1
  178. package/lib/typescript/components/stack-view.d.ts.map +1 -1
  179. package/lib/typescript/configs/index.d.ts +0 -9
  180. package/lib/typescript/configs/index.d.ts.map +1 -1
  181. package/lib/typescript/configs/presets.d.ts +0 -9
  182. package/lib/typescript/configs/presets.d.ts.map +1 -1
  183. package/lib/typescript/constants.d.ts +2 -1
  184. package/lib/typescript/constants.d.ts.map +1 -1
  185. package/lib/typescript/index.d.ts +1 -10
  186. package/lib/typescript/index.d.ts.map +1 -1
  187. package/lib/typescript/navigators/create-blank-stack-navigator.d.ts +2 -4
  188. package/lib/typescript/navigators/create-blank-stack-navigator.d.ts.map +1 -1
  189. package/lib/typescript/navigators/expo-router/index.d.ts +3 -3
  190. package/lib/typescript/navigators/expo-router/index.d.ts.map +1 -1
  191. package/lib/typescript/navigators/react-navigation/index.d.ts +1 -1
  192. package/lib/typescript/navigators/react-navigation/index.d.ts.map +1 -1
  193. package/lib/typescript/providers/screen/animation/animation.provider.d.ts +10 -1
  194. package/lib/typescript/providers/screen/animation/animation.provider.d.ts.map +1 -1
  195. package/lib/typescript/providers/screen/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
  196. package/lib/typescript/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.d.ts +2 -1
  197. package/lib/typescript/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.d.ts.map +1 -1
  198. package/lib/typescript/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
  199. package/lib/typescript/providers/screen/animation/helpers/selected-interpolator-options.d.ts.map +1 -1
  200. package/lib/typescript/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
  201. package/lib/typescript/providers/screen/gestures/pan/behavior/pan-release.d.ts.map +1 -1
  202. package/lib/typescript/providers/screen/gestures/pinch/behavior/pinch-release.d.ts.map +1 -1
  203. package/lib/typescript/providers/screen/gestures/shared/policy.d.ts +2 -1
  204. package/lib/typescript/providers/screen/gestures/shared/policy.d.ts.map +1 -1
  205. package/lib/typescript/providers/screen/gestures/shared/snap-points.d.ts +11 -0
  206. package/lib/typescript/providers/screen/gestures/shared/snap-points.d.ts.map +1 -1
  207. package/lib/typescript/providers/screen/gestures/types.d.ts +2 -0
  208. package/lib/typescript/providers/screen/gestures/types.d.ts.map +1 -1
  209. package/lib/typescript/providers/screen/options/helpers.d.ts.map +1 -1
  210. package/lib/typescript/providers/screen/options/types.d.ts +1 -0
  211. package/lib/typescript/providers/screen/options/types.d.ts.map +1 -1
  212. package/lib/typescript/providers/screen/styles/constants.d.ts.map +1 -1
  213. package/lib/typescript/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -1
  214. package/lib/typescript/providers/screen/styles/slot.provider.d.ts +11 -2
  215. package/lib/typescript/providers/screen/styles/slot.provider.d.ts.map +1 -1
  216. package/lib/typescript/providers/stack/blank-stack-state/helpers/build-blank-stack-state.d.ts +3 -3
  217. package/lib/typescript/providers/stack/blank-stack-state/helpers/build-blank-stack-state.d.ts.map +1 -1
  218. package/lib/typescript/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.d.ts.map +1 -1
  219. package/lib/typescript/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.d.ts +3 -2
  220. package/lib/typescript/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.d.ts.map +1 -1
  221. package/lib/typescript/providers/stack/blank-stack-state/helpers/state-equality.d.ts +4 -4
  222. package/lib/typescript/providers/stack/blank-stack-state/helpers/state-equality.d.ts.map +1 -1
  223. package/lib/typescript/providers/stack/blank-stack-state/helpers/types.d.ts +6 -5
  224. package/lib/typescript/providers/stack/blank-stack-state/helpers/types.d.ts.map +1 -1
  225. package/lib/typescript/providers/stack/blank-stack.provider.d.ts +3 -1
  226. package/lib/typescript/providers/stack/blank-stack.provider.d.ts.map +1 -1
  227. package/lib/typescript/types/animation.types.d.ts +16 -12
  228. package/lib/typescript/types/animation.types.d.ts.map +1 -1
  229. package/lib/typescript/types/blank-stack.types.d.ts +2 -23
  230. package/lib/typescript/types/blank-stack.types.d.ts.map +1 -1
  231. package/lib/typescript/types/index.d.ts +2 -2
  232. package/lib/typescript/types/index.d.ts.map +1 -1
  233. package/lib/typescript/types/providers/blank-stack-provider.types.d.ts +8 -6
  234. package/lib/typescript/types/providers/blank-stack-provider.types.d.ts.map +1 -1
  235. package/lib/typescript/types/screen.types.d.ts +50 -0
  236. package/lib/typescript/types/screen.types.d.ts.map +1 -1
  237. package/lib/typescript/utils/create-provider.d.ts +4 -1
  238. package/lib/typescript/utils/create-provider.d.ts.map +1 -1
  239. package/package.json +3 -8
  240. package/src/components/boundary/create-boundary-component.tsx +10 -2
  241. package/src/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.ts +89 -0
  242. package/src/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +97 -14
  243. package/src/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +2 -6
  244. package/src/components/boundary/portal/teleport.ts +2 -23
  245. package/src/components/boundary/utils/source-signals.ts +6 -4
  246. package/src/components/overlay/helpers/get-active-overlay.ts +4 -36
  247. package/src/components/overlay/helpers/retain-ready-overlay-resources.ts +10 -1
  248. package/src/components/overlay/hooks/use-overlay-slot.ts +1 -5
  249. package/src/components/overlay/variations/float-overlay.tsx +9 -12
  250. package/src/components/overlay/variations/overlay-host.tsx +24 -22
  251. package/src/components/screen-container/layers/content.tsx +12 -7
  252. package/src/components/screen-container/layers/surface.tsx +65 -0
  253. package/src/components/stack-view.tsx +8 -39
  254. package/src/configs/index.ts +0 -6
  255. package/src/configs/presets.ts +0 -447
  256. package/src/constants.ts +2 -0
  257. package/src/index.ts +4 -1
  258. package/src/navigators/create-blank-stack-navigator.tsx +16 -124
  259. package/src/navigators/expo-router/index.tsx +0 -23
  260. package/src/navigators/react-navigation/index.tsx +0 -3
  261. package/src/providers/screen/animation/animation.provider.tsx +60 -54
  262. package/src/providers/screen/animation/helpers/build-screen-transition-options.ts +1 -0
  263. package/src/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.ts +26 -0
  264. package/src/providers/screen/animation/helpers/hydrate-transition-state/index.ts +20 -0
  265. package/src/providers/screen/animation/helpers/selected-interpolator-options.ts +1 -0
  266. package/src/providers/screen/animation/use-screen-animation.tsx +2 -14
  267. package/src/providers/screen/gestures/pan/behavior/pan-release.ts +46 -7
  268. package/src/providers/screen/gestures/pinch/behavior/pinch-release.ts +45 -4
  269. package/src/providers/screen/gestures/shared/policy.ts +4 -0
  270. package/src/providers/screen/gestures/shared/snap-points.ts +87 -0
  271. package/src/providers/screen/gestures/types.ts +2 -0
  272. package/src/providers/screen/options/helpers.ts +18 -0
  273. package/src/providers/screen/options/types.ts +1 -0
  274. package/src/providers/screen/styles/constants.ts +2 -1
  275. package/src/providers/screen/styles/hooks/slot-resolvers.tsx +2 -17
  276. package/src/providers/screen/styles/slot.provider.tsx +2 -1
  277. package/src/providers/stack/blank-stack-state/helpers/build-blank-stack-state.ts +30 -12
  278. package/src/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.ts +11 -3
  279. package/src/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.ts +2 -2
  280. package/src/providers/stack/blank-stack-state/helpers/state-equality.ts +27 -16
  281. package/src/providers/stack/blank-stack-state/helpers/types.ts +9 -4
  282. package/src/types/animation.types.ts +16 -13
  283. package/src/types/blank-stack.types.ts +1 -29
  284. package/src/types/index.ts +4 -1
  285. package/src/types/providers/blank-stack-provider.types.ts +14 -11
  286. package/src/types/screen.types.ts +57 -0
  287. package/src/utils/create-provider.tsx +22 -4
  288. package/lib/commonjs/components/boundary/portal/utils/teleport-control.js +0 -16
  289. package/lib/commonjs/components/boundary/portal/utils/teleport-control.js.map +0 -1
  290. package/lib/commonjs/providers/navigation/navigation-host.provider.js +0 -56
  291. package/lib/commonjs/providers/navigation/navigation-host.provider.js.map +0 -1
  292. package/lib/commonjs/providers/navigation/react-navigation-host.js +0 -23
  293. package/lib/commonjs/providers/navigation/react-navigation-host.js.map +0 -1
  294. package/lib/module/components/boundary/portal/utils/teleport-control.js +0 -11
  295. package/lib/module/components/boundary/portal/utils/teleport-control.js.map +0 -1
  296. package/lib/module/providers/navigation/navigation-host.provider.js +0 -50
  297. package/lib/module/providers/navigation/navigation-host.provider.js.map +0 -1
  298. package/lib/module/providers/navigation/react-navigation-host.js +0 -19
  299. package/lib/module/providers/navigation/react-navigation-host.js.map +0 -1
  300. package/lib/typescript/components/boundary/portal/utils/teleport-control.d.ts +0 -3
  301. package/lib/typescript/components/boundary/portal/utils/teleport-control.d.ts.map +0 -1
  302. package/lib/typescript/providers/navigation/navigation-host.provider.d.ts +0 -21
  303. package/lib/typescript/providers/navigation/navigation-host.provider.d.ts.map +0 -1
  304. package/lib/typescript/providers/navigation/react-navigation-host.d.ts +0 -3
  305. package/lib/typescript/providers/navigation/react-navigation-host.d.ts.map +0 -1
  306. package/src/components/boundary/portal/utils/teleport-control.ts +0 -13
  307. package/src/providers/navigation/navigation-host.provider.tsx +0 -75
  308. package/src/providers/navigation/react-navigation-host.tsx +0 -24
@@ -114,6 +114,7 @@ export interface PanGesturePolicy {
114
114
  gestureReleaseVelocityScale: number;
115
115
  gestureActivationArea: ResolvedGestureActivationArea;
116
116
  gestureSnapLocked: boolean;
117
+ sheetSnapBehavior: NonNullable<ScreenTransitionConfig["sheetSnapBehavior"]>;
117
118
  sheetScrollGestureBehavior: NonNullable<
118
119
  ScreenTransitionConfig["sheetScrollGestureBehavior"]
119
120
  >;
@@ -129,6 +130,7 @@ export interface PinchGesturePolicy {
129
130
  gestureSensitivity: NonNullable<ScreenTransitionConfig["gestureSensitivity"]>;
130
131
  gestureSnapVelocityImpact: number;
131
132
  gestureSnapLocked: boolean;
133
+ sheetSnapBehavior: NonNullable<ScreenTransitionConfig["sheetSnapBehavior"]>;
132
134
  gestureReleaseVelocityScale: number;
133
135
  transitionSpec: TransitionSpec | undefined;
134
136
  }
@@ -7,6 +7,7 @@ import {
7
7
  DEFAULT_GESTURE_TRACKING,
8
8
  DEFAULT_GESTURE_VELOCITY_IMPACT,
9
9
  DEFAULT_SHEET_SCROLL_GESTURE_BEHAVIOR,
10
+ DEFAULT_SHEET_SNAP_BEHAVIOR,
10
11
  } from "../../../constants";
11
12
  import type {
12
13
  GestureDirection,
@@ -129,6 +130,14 @@ const resolveSheetScrollGestureBehaviorOption = (
129
130
  : fallback;
130
131
  };
131
132
 
133
+ const resolveSheetSnapBehaviorOption = (
134
+ value: unknown,
135
+ fallback: RequiredScreenOption<"sheetSnapBehavior">,
136
+ ): RequiredScreenOption<"sheetSnapBehavior"> => {
137
+ "worklet";
138
+ return value === "continuous" || value === "step" ? value : fallback;
139
+ };
140
+
132
141
  const resolveGestureTrackingOption = (
133
142
  value: unknown,
134
143
  fallback: RequiredScreenOption<"gestureTracking">,
@@ -205,6 +214,7 @@ const areScreenOptionsEqual = (
205
214
  left.gestureSnapVelocityImpact === right.gestureSnapVelocityImpact &&
206
215
  left.gestureReleaseVelocityScale === right.gestureReleaseVelocityScale &&
207
216
  left.gestureSnapLocked === right.gestureSnapLocked &&
217
+ left.sheetSnapBehavior === right.sheetSnapBehavior &&
208
218
  left.sheetScrollGestureBehavior === right.sheetScrollGestureBehavior &&
209
219
  left.backdropBehavior === right.backdropBehavior &&
210
220
  left.transitionSpec === right.transitionSpec &&
@@ -249,6 +259,10 @@ export const resolveBaseScreenOptions = (
249
259
  options.gestureSnapLocked,
250
260
  DEFAULT_GESTURE_SNAP_LOCKED,
251
261
  ),
262
+ sheetSnapBehavior: resolveSheetSnapBehaviorOption(
263
+ options.sheetSnapBehavior,
264
+ DEFAULT_SHEET_SNAP_BEHAVIOR,
265
+ ),
252
266
  sheetScrollGestureBehavior: resolveSheetScrollGestureBehaviorOption(
253
267
  resolveSheetScrollGestureBehavior(options),
254
268
  DEFAULT_SHEET_SCROLL_GESTURE_BEHAVIOR,
@@ -315,6 +329,10 @@ export const syncScreenOptionsOverrides = (
315
329
  options?.gestureSnapLocked,
316
330
  base.gestureSnapLocked,
317
331
  ),
332
+ sheetSnapBehavior: resolveSheetSnapBehaviorOption(
333
+ options?.sheetSnapBehavior,
334
+ base.sheetSnapBehavior,
335
+ ),
318
336
  sheetScrollGestureBehavior: resolveSheetScrollGestureBehaviorOption(
319
337
  options?.sheetScrollGestureBehavior,
320
338
  base.sheetScrollGestureBehavior,
@@ -18,6 +18,7 @@ export type ScreenOptionsSnapshot = {
18
18
  gestureSnapVelocityImpact: RequiredScreenOption<"gestureSnapVelocityImpact">;
19
19
  gestureReleaseVelocityScale: RequiredScreenOption<"gestureReleaseVelocityScale">;
20
20
  gestureSnapLocked: RequiredScreenOption<"gestureSnapLocked">;
21
+ sheetSnapBehavior: RequiredScreenOption<"sheetSnapBehavior">;
21
22
  sheetScrollGestureBehavior: RequiredScreenOption<"sheetScrollGestureBehavior">;
22
23
  backdropBehavior: OptionalScreenOption<"backdropBehavior">;
23
24
  transitionSpec: OptionalScreenOption<"transitionSpec">;
@@ -22,6 +22,7 @@ const IDENTITY_TRANSFORM = [
22
22
  * please add its identity value here in a PR.
23
23
  */
24
24
  export const STYLE_RESET_VALUES: Record<string, unknown> = {
25
+ filter: [{ blur: 0.01 }],
25
26
  transform: IDENTITY_TRANSFORM,
26
27
  translateX: 0,
27
28
  translateY: 0,
@@ -67,8 +68,8 @@ export const PROP_RESET_VALUES: Record<string, unknown> = {
67
68
  const RESERVED_STYLE_SLOT_IDS = {
68
69
  overlay: true,
69
70
  content: true,
70
- backdrop: true,
71
71
  surface: true,
72
+ backdrop: true,
72
73
  [NAVIGATION_MASK_ELEMENT_STYLE_ID]: true,
73
74
  [NAVIGATION_MASK_CONTAINER_STYLE_ID]: true,
74
75
  } as const;
@@ -1,29 +1,14 @@
1
1
  import { useMemo } from "react";
2
2
  import { useAnimatedProps, useAnimatedStyle } from "react-native-reanimated";
3
3
  import { NO_PROPS, NO_STYLES } from "../../../../constants";
4
- import { useNavigationRoute } from "../../../navigation/navigation-host.provider";
5
4
  import {
6
5
  composeSlotStyleWithLocalTransform,
7
6
  getLocalTransformForSlotComposition,
8
7
  } from "../helpers/compose-slot-style";
9
- import { useOptionalScreenSlotStore } from "../slot.provider";
8
+ import { useScreenSlotStore } from "../slot.provider";
10
9
 
11
10
  const useCurrentScreenSlotsMap = () => {
12
- const routeKey = useNavigationRoute().key;
13
- const localSlotsMap = useOptionalScreenSlotStore(
14
- (store) => store?.slotsMap ?? null,
15
- );
16
- const keyedSlotsMap = useOptionalScreenSlotStore(
17
- localSlotsMap ? null : routeKey,
18
- (store) => store.slotsMap,
19
- );
20
- const slotsMap = localSlotsMap ?? keyedSlotsMap;
21
-
22
- if (!slotsMap) {
23
- throw new Error(`ScreenSlotStore is unavailable for route "${routeKey}"`);
24
- }
25
-
26
- return slotsMap;
11
+ return useScreenSlotStore((store) => store.slotsMap);
27
12
  };
28
13
 
29
14
  export const useSlotStyles = (slotId: string | undefined) => {
@@ -18,8 +18,8 @@ type Props = { children: ReactNode };
18
18
  export type ScreenSlotName =
19
19
  | "overlay"
20
20
  | "content"
21
- | "backdrop"
22
21
  | "surface"
22
+ | "backdrop"
23
23
  | typeof NAVIGATION_MASK_CONTAINER_STYLE_ID
24
24
  | typeof NAVIGATION_MASK_ELEMENT_STYLE_ID;
25
25
 
@@ -34,6 +34,7 @@ const createScreenSlotProvider = createProvider("ScreenSlot", {
34
34
  })<Props, ScreenSlotContextValue>;
35
35
 
36
36
  export const {
37
+ StoreProvider: ScreenSlotStoreProvider,
37
38
  ScreenSlotProvider,
38
39
  useOptionalScreenSlotStore,
39
40
  useScreenSlotStore,
@@ -1,5 +1,9 @@
1
1
  import type { BlankStackDescriptor } from "../../../../types/blank-stack.types";
2
- import type { BlankStackProviderProps } from "../../../../types/providers/blank-stack-provider.types";
2
+ import type {
3
+ BlankStackDescriptorSource,
4
+ BlankStackDescriptorSources,
5
+ BlankStackProviderProps,
6
+ } from "../../../../types/providers/blank-stack-provider.types";
3
7
  import type {
4
8
  BaseStackScene,
5
9
  StackSceneActivity,
@@ -9,6 +13,7 @@ import { resolveSceneNeighbors } from "./navigation/resolve-scene-neighbors";
9
13
  import {
10
14
  areDescriptorSourcesEquivalent,
11
15
  areDescriptorsEqual,
16
+ areRecordsShallowEqual,
12
17
  areRouteChildStateMapsEqual,
13
18
  getRouteChildState,
14
19
  routeKeyListsAreEqual,
@@ -24,7 +29,7 @@ import type {
24
29
  type BuildBlankStackStateParams = {
25
30
  props: BlankStackProviderProps;
26
31
  routes: BlankStackRoutes;
27
- descriptors: BlankStackDescriptors;
32
+ descriptors: BlankStackDescriptorSources;
28
33
  closingRouteKeys: ReadonlySet<string>;
29
34
  previousState?: LocalRoutesState;
30
35
  };
@@ -35,9 +40,9 @@ const resolveStableDescriptorSource = ({
35
40
  previousState,
36
41
  }: {
37
42
  routeKey: string;
38
- sourceDescriptor: BlankStackDescriptor;
43
+ sourceDescriptor: BlankStackDescriptorSource;
39
44
  previousState?: LocalRoutesState;
40
- }): BlankStackDescriptor => {
45
+ }): BlankStackDescriptorSource => {
41
46
  const previousSourceDescriptor = previousState?.sourceDescriptors[routeKey];
42
47
 
43
48
  if (
@@ -125,6 +130,7 @@ const getSceneActivityWindow = ({
125
130
  };
126
131
 
127
132
  const buildBaseScenes = ({
133
+ props,
128
134
  routes,
129
135
  descriptors,
130
136
  closingRouteKeys,
@@ -136,7 +142,7 @@ const buildBaseScenes = ({
136
142
  const routeKeys: string[] = [];
137
143
  const scenes: BaseStackScene<BlankStackDescriptor>[] = [];
138
144
  const routeChildStates: Record<string, unknown> = {};
139
- const sourceDescriptors: BlankStackDescriptors = {};
145
+ const sourceDescriptors: BlankStackDescriptorSources = {};
140
146
  const blankStackDescriptors: BlankStackDescriptors = {};
141
147
  let shouldShowFloatOverlay = false;
142
148
 
@@ -169,14 +175,28 @@ const buildBaseScenes = ({
169
175
  });
170
176
 
171
177
  const previousDescriptor = previousState?.descriptors[route.key];
178
+ const descriptorRoute =
179
+ previousDescriptor &&
180
+ childStateUnchanged &&
181
+ areRecordsShallowEqual(
182
+ previousDescriptor.route as unknown as Record<string, unknown>,
183
+ route as unknown as Record<string, unknown>,
184
+ )
185
+ ? previousDescriptor.route
186
+ : route;
172
187
  const descriptor =
173
188
  previousDescriptor &&
174
189
  childStateUnchanged &&
175
- previousDescriptor.route === sourceDescriptor.route &&
176
- previousDescriptor.navigation === sourceDescriptor.navigation &&
190
+ previousDescriptor.route === descriptorRoute &&
191
+ previousDescriptor.navigation === props.navigation &&
177
192
  previousDescriptor.options === sourceDescriptor.options
178
193
  ? previousDescriptor
179
- : sourceDescriptor;
194
+ : ({
195
+ route: descriptorRoute,
196
+ navigation: props.navigation,
197
+ options: sourceDescriptor.options,
198
+ render: sourceDescriptor.render,
199
+ } as BlankStackDescriptor);
180
200
 
181
201
  routeKeys.push(route.key);
182
202
  routeChildStates[route.key] = routeChildState;
@@ -206,12 +226,10 @@ const buildBaseScenes = ({
206
226
 
207
227
  const withSceneRelationships = ({
208
228
  scenes,
209
- sourceDescriptors,
210
229
  closingRouteKeys,
211
230
  previousState,
212
231
  }: {
213
232
  scenes: BaseStackScene<BlankStackDescriptor>[];
214
- sourceDescriptors: BlankStackDescriptors;
215
233
  closingRouteKeys: ReadonlySet<string>;
216
234
  previousState?: LocalRoutesState;
217
235
  }): BaseStackScene<BlankStackDescriptor>[] => {
@@ -231,7 +249,7 @@ const withSceneRelationships = ({
231
249
 
232
250
  const relationshipScenes = scenes.map((scene) => ({
233
251
  route: scene.route,
234
- descriptor: sourceDescriptors[scene.route.key] ?? scene.descriptor,
252
+ descriptor: scene.descriptor,
235
253
  }));
236
254
 
237
255
  const nextScenes = scenes.map((scene, sceneIndex) => {
@@ -296,7 +314,6 @@ export const buildBlankStackState = (
296
314
 
297
315
  const scenes = withSceneRelationships({
298
316
  scenes: baseScenes,
299
- sourceDescriptors,
300
317
  closingRouteKeys: params.closingRouteKeys,
301
318
  previousState: params.previousState,
302
319
  });
@@ -305,6 +322,7 @@ export const buildBlankStackState = (
305
322
 
306
323
  return {
307
324
  routes: params.routes,
325
+ navigation: params.props.navigation,
308
326
  descriptors:
309
327
  params.previousState &&
310
328
  areDescriptorsEqual(
@@ -7,7 +7,7 @@ import {
7
7
  areDescriptorsEqual,
8
8
  areRouteChildStateMapsEqual,
9
9
  getRouteChildStateMap,
10
- routesHaveSameKeys,
10
+ routesAreShallowlyEqual,
11
11
  setsAreEqual,
12
12
  } from "./state-equality";
13
13
  import type { BlankStackRoutes, LocalRoutesState } from "./types";
@@ -39,6 +39,7 @@ export const deriveBlankStackState = ({
39
39
  const nextDescriptors = props.descriptors;
40
40
  const nextRouteChildStates = getRouteChildStateMap(nextRoutesSnapshot);
41
41
  const nextFocusedRouteKey = nextRoutesSnapshot[props.state.index]?.key;
42
+ const navigationUnchanged = current.navigation === props.navigation;
42
43
  const focusedRouteUnchanged = current.focusedRouteKey === nextFocusedRouteKey;
43
44
  const closingRouteKeysUnchanged = setsAreEqual(
44
45
  current.closingRouteKeys,
@@ -50,6 +51,7 @@ export const deriveBlankStackState = ({
50
51
  );
51
52
 
52
53
  const alreadyAligned =
54
+ navigationUnchanged &&
53
55
  focusedRouteUnchanged &&
54
56
  closingRouteKeysUnchanged &&
55
57
  routeChildStatesUnchanged &&
@@ -61,10 +63,11 @@ export const deriveBlankStackState = ({
61
63
  }
62
64
 
63
65
  const logicallyAligned =
66
+ navigationUnchanged &&
64
67
  focusedRouteUnchanged &&
65
68
  closingRouteKeysUnchanged &&
66
69
  routeChildStatesUnchanged &&
67
- routesHaveSameKeys(current.routes, nextRoutesSnapshot) &&
70
+ routesAreShallowlyEqual(current.routes, nextRoutesSnapshot) &&
68
71
  areDescriptorSourceMapsEquivalent(
69
72
  current.sourceDescriptors,
70
73
  nextDescriptors,
@@ -92,7 +95,12 @@ export const deriveBlankStackState = ({
92
95
  closingRouteKeys,
93
96
  );
94
97
 
95
- if (!routesChanged && !descriptorsChanged && !closingRouteKeysChanged) {
98
+ if (
99
+ navigationUnchanged &&
100
+ !routesChanged &&
101
+ !descriptorsChanged &&
102
+ !closingRouteKeysChanged
103
+ ) {
96
104
  return current;
97
105
  }
98
106
 
@@ -1,9 +1,9 @@
1
+ import type { BlankStackDescriptorSources } from "../../../../types/providers/blank-stack-provider.types";
1
2
  import type { RouteWithKey } from "../../../../types/stack.types";
2
3
  import { composeDescriptors } from "./navigation/compose-descriptors";
3
4
  import { syncRoutesWithRemoved } from "./navigation/sync-routes-with-removed";
4
5
  import { routesHaveSameKeys } from "./state-equality";
5
6
  import type {
6
- BlankStackDescriptors,
7
7
  BlankStackRoutes,
8
8
  LocalRoutesState,
9
9
  ReconciledRoutes,
@@ -13,7 +13,7 @@ type ReconcileBlankStackRoutesParams = {
13
13
  current: LocalRoutesState;
14
14
  previousRoutesSnapshot: BlankStackRoutes;
15
15
  nextRoutesSnapshot: BlankStackRoutes;
16
- nextDescriptors: BlankStackDescriptors;
16
+ nextDescriptors: BlankStackDescriptorSources;
17
17
  closingRouteKeys: Set<string>;
18
18
  };
19
19
 
@@ -1,6 +1,8 @@
1
- import type { BlankStackDescriptor } from "../../../../types/blank-stack.types";
1
+ import type {
2
+ BlankStackDescriptorSource,
3
+ BlankStackDescriptorSources,
4
+ } from "../../../../types/providers/blank-stack-provider.types";
2
5
  import type { RouteWithKey } from "../../../../types/stack.types";
3
- import type { BlankStackDescriptors } from "./types";
4
6
 
5
7
  export const areDescriptorsEqual = <
6
8
  DescriptorMap extends Record<string, unknown>,
@@ -54,6 +56,22 @@ export const routesHaveSameKeys = <Route extends RouteWithKey>(
54
56
  return a.every((route, index) => route.key === b[index]?.key);
55
57
  };
56
58
 
59
+ export const routesAreShallowlyEqual = <Route extends RouteWithKey>(
60
+ previous: readonly Route[],
61
+ next: readonly Route[],
62
+ ): boolean => {
63
+ if (!routesHaveSameKeys(previous, next)) {
64
+ return false;
65
+ }
66
+
67
+ return previous.every((route, index) =>
68
+ areRecordsShallowEqual(
69
+ route as unknown as Record<string, unknown>,
70
+ next[index] as unknown as Record<string, unknown>,
71
+ ),
72
+ );
73
+ };
74
+
57
75
  export const getRouteChildState = (route: RouteWithKey): unknown => {
58
76
  if (!route || typeof route !== "object") {
59
77
  return undefined;
@@ -111,25 +129,18 @@ export const areRecordsShallowEqual = (
111
129
  };
112
130
 
113
131
  export const areDescriptorSourcesEquivalent = (
114
- previous: BlankStackDescriptor,
115
- next: BlankStackDescriptor,
132
+ previous: BlankStackDescriptorSource,
133
+ next: BlankStackDescriptorSource,
116
134
  ): boolean => {
117
- return (
118
- previous.navigation === next.navigation &&
119
- areRecordsShallowEqual(
120
- previous.route as unknown as Record<string, unknown>,
121
- next.route as unknown as Record<string, unknown>,
122
- ) &&
123
- areRecordsShallowEqual(
124
- previous.options as unknown as Record<string, unknown>,
125
- next.options as unknown as Record<string, unknown>,
126
- )
135
+ return areRecordsShallowEqual(
136
+ previous.options as unknown as Record<string, unknown>,
137
+ next.options as unknown as Record<string, unknown>,
127
138
  );
128
139
  };
129
140
 
130
141
  export const areDescriptorSourceMapsEquivalent = (
131
- previous: BlankStackDescriptors,
132
- next: BlankStackDescriptors,
142
+ previous: BlankStackDescriptorSources,
143
+ next: BlankStackDescriptorSources,
133
144
  ): boolean => {
134
145
  if (previous === next) return true;
135
146
 
@@ -1,18 +1,23 @@
1
1
  import type { BlankStackDescriptor } from "../../../../types/blank-stack.types";
2
- import type { BlankStackProviderProps } from "../../../../types/providers/blank-stack-provider.types";
3
2
  import type {
3
+ BlankStackDescriptorSources,
4
+ BlankStackProviderProps,
5
+ } from "../../../../types/providers/blank-stack-provider.types";
6
+ import type {
7
+ BaseStackNavigation,
4
8
  BaseStackRoute,
5
9
  BaseStackScene,
6
10
  } from "../../../../types/stack.types";
7
11
 
8
- export type BlankStackRoutes = BlankStackDescriptor["route"][];
12
+ export type BlankStackRoutes = BaseStackRoute[];
9
13
 
10
14
  export type BlankStackDescriptors = Record<string, BlankStackDescriptor>;
11
15
 
12
16
  export type LocalRoutesState = {
13
17
  routes: BlankStackRoutes;
14
18
  descriptors: BlankStackDescriptors;
15
- sourceDescriptors: BlankStackDescriptors;
19
+ sourceDescriptors: BlankStackDescriptorSources;
20
+ navigation: BaseStackNavigation;
16
21
  focusedRouteKey?: string;
17
22
  routeChildStates: Record<string, unknown>;
18
23
  scenes: BaseStackScene<BlankStackDescriptor>[];
@@ -35,7 +40,7 @@ export type BlankStackController = {
35
40
 
36
41
  export type ReconciledRoutes = {
37
42
  routes: BlankStackRoutes;
38
- descriptors: BlankStackDescriptors;
43
+ descriptors: BlankStackDescriptorSources;
39
44
  };
40
45
 
41
46
  export type SceneActivityWindow = {
@@ -29,6 +29,7 @@ export type ScreenTransitionOptions = Pick<
29
29
  | "gestureSnapVelocityImpact"
30
30
  | "gestureReleaseVelocityScale"
31
31
  | "gestureSnapLocked"
32
+ | "sheetSnapBehavior"
32
33
  | "sheetScrollGestureBehavior"
33
34
  | "backdropBehavior"
34
35
  >;
@@ -278,19 +279,25 @@ export type ScreenStyleInterpolator = (
278
279
  */
279
280
  export type AnimatedViewStyle = ViewStyle & TextStyle;
280
281
 
281
- export type BoundaryTeleportControl =
282
- | boolean
283
- | {
284
- enabled?: boolean;
285
- };
282
+ /**
283
+ * Selects which matched boundary owns handoff content during a transition.
284
+ *
285
+ * `"auto"` follows the navigator's default ownership lifecycle. Use an
286
+ * explicit target when ownership needs to change at a precise interpolator
287
+ * frame, such as returning content to its source as soon as dismissal begins.
288
+ *
289
+ * @default "auto"
290
+ */
291
+ export type BoundaryHandoffTarget = "auto" | "source" | "destination";
286
292
 
287
293
  export type TransitionSlotProps = Record<string, unknown> & {
288
294
  /**
289
- * Controls whether a handoff or clipping-escape boundary should attach for
290
- * the current interpolator frame. `false` detaches the portal while keeping
291
- * hostName ownership internal.
295
+ * Selects which matched boundary owns handoff content for the current
296
+ * interpolator frame.
297
+ *
298
+ * @default "auto"
292
299
  */
293
- teleport?: BoundaryTeleportControl;
300
+ handoffTarget?: BoundaryHandoffTarget;
294
301
  };
295
302
 
296
303
  type TransitionSlotDefinition = {
@@ -344,8 +351,6 @@ export type NormalizedTransitionInterpolatedStyle = {
344
351
  content?: NormalizedTransitionSlotStyle;
345
352
  /** Animated style and props for the backdrop layer between screens. */
346
353
  backdrop?: NormalizedTransitionSlotStyle;
347
- /** Animated style and props for the surface component layer within the screen. */
348
- surface?: NormalizedTransitionSlotStyle;
349
354
  /** Animated style and props for the navigation mask container layer. */
350
355
  [NAVIGATION_MASK_CONTAINER_STYLE_ID]?: NormalizedTransitionSlotStyle;
351
356
  /** Animated style and props for the navigation mask element layer. */
@@ -376,8 +381,6 @@ export type TransitionInterpolatedStyle = {
376
381
  content?: TransitionSlotStyle;
377
382
  /** Animated style and props for the backdrop layer between screens. */
378
383
  backdrop?: TransitionSlotStyle;
379
- /** Animated style and props for the surface component layer within the screen. */
380
- surface?: TransitionSlotStyle;
381
384
  /** Animated style and props for the navigation mask container layer. */
382
385
  [NAVIGATION_MASK_CONTAINER_STYLE_ID]?: TransitionSlotStyle;
383
386
  /** Animated style and props for the navigation mask element layer. */
@@ -1,7 +1,6 @@
1
1
  import type {
2
2
  DefaultNavigatorOptions,
3
3
  Descriptor,
4
- NavigationHelpers,
5
4
  NavigationProp,
6
5
  ParamListBase,
7
6
  RouteProp,
@@ -48,32 +47,6 @@ export type BlankStackOptionsArgs<
48
47
  theme: Theme;
49
48
  };
50
49
 
51
- export type BlankStackNavigationHelpers = NavigationHelpers<
52
- ParamListBase,
53
- BlankStackNavigationEventMap
54
- >;
55
-
56
- /**
57
- * Additional props accepted by the blank stack navigator.
58
- *
59
- * These can be passed to `<BlankStack.Navigator />` in the dynamic API, and
60
- * they are also supported as top-level keys in static navigator config.
61
- */
62
- export interface BlankStackFactoryOptions {
63
- /**
64
- * Creates an isolated navigation tree for embedded flows.
65
- *
66
- * Use this when the blank stack needs to live inside another screen or host
67
- * application without joining the parent React Navigation tree.
68
- *
69
- * When enabled, the navigator:
70
- * - wraps itself in `NavigationIndependentTree` + `NavigationContainer`
71
- *
72
- * Leave this disabled for normal top-level app stacks.
73
- */
74
- independent?: boolean;
75
- }
76
-
77
50
  /**
78
51
  * Props passed to overlay components in blank-stack.
79
52
  * Uses the shared OverlayProps type with blank-stack's navigation type.
@@ -121,8 +94,7 @@ export type BlankStackNavigatorProps = DefaultNavigatorOptions<
121
94
  BlankStackNavigationEventMap,
122
95
  BlankStackNavigationProp<ParamListBase>
123
96
  > &
124
- StackRouterOptions &
125
- BlankStackFactoryOptions;
97
+ StackRouterOptions;
126
98
 
127
99
  export type BlankStackDescriptor = Descriptor<
128
100
  BlankStackNavigationOptions,
@@ -2,7 +2,7 @@ export { FALSE, TRUE } from "../constants";
2
2
  export type {
3
3
  AnimatedViewStyle,
4
4
  AnimationConfig,
5
- BoundaryTeleportControl,
5
+ BoundaryHandoffTarget,
6
6
  ScreenInterpolationProps,
7
7
  ScreenStyleInterpolator,
8
8
  ScreenTransitionAccessor,
@@ -60,7 +60,10 @@ export type {
60
60
  ScreenContentComponentProps,
61
61
  ScreenKey,
62
62
  ScreenLayerComponentProps,
63
+ ScreenSurfaceComponent,
64
+ ScreenSurfaceComponentProps,
63
65
  ScreenTransitionConfig,
66
+ SheetSnapBehavior,
64
67
  TransitionAwareProps,
65
68
  } from "./screen.types";
66
69
  export type {
@@ -1,24 +1,27 @@
1
- import type {
2
- BlankStackDescriptor,
3
- BlankStackNavigationHelpers,
4
- } from "../blank-stack.types";
1
+ import type { NavigatorDescriptor } from "standard-navigation";
2
+ import type { BlankStackNavigationOptions } from "../blank-stack.types";
5
3
  import type {
6
4
  BaseStackDescriptor,
5
+ BaseStackNavigation,
7
6
  BaseStackRoute,
8
7
  BaseStackScene,
9
8
  BaseStackState,
10
9
  } from "../stack.types";
11
10
 
12
11
  export interface BlankStackProviderProps {
13
- state: BaseStackState<BlankStackDescriptor["route"]>;
14
- navigation: BlankStackNavigationHelpers;
15
- descriptors: Record<string, BlankStackDescriptor>;
16
- describe: (
17
- route: BlankStackDescriptor["route"],
18
- placeholder: boolean,
19
- ) => BlankStackDescriptor;
12
+ state: BaseStackState<BaseStackRoute>;
13
+ navigation: BaseStackNavigation;
14
+ descriptors: BlankStackDescriptorSources;
20
15
  }
21
16
 
17
+ export type BlankStackDescriptorSource =
18
+ NavigatorDescriptor<BlankStackNavigationOptions>;
19
+
20
+ export type BlankStackDescriptorSources = Record<
21
+ string,
22
+ BlankStackDescriptorSource
23
+ >;
24
+
22
25
  export interface BlankStackStoreValue {
23
26
  navigatorKey: string;
24
27
  routeKeys: string[];