react-native-screen-transitions 3.9.0-alpha.1 → 3.9.0-alpha.2

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 (298) hide show
  1. package/lib/commonjs/shared/components/boundary/components/boundary-target.js +10 -10
  2. package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
  3. package/lib/commonjs/shared/components/boundary/create-boundary-component.js +45 -109
  4. package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
  5. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +103 -0
  6. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -0
  7. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js +7 -4
  8. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +1 -1
  9. package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js +24 -14
  10. package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +1 -1
  11. package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js +3 -4
  12. package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +1 -1
  13. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +6 -8
  14. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  15. package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js +6 -3
  16. package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +1 -1
  17. package/lib/commonjs/shared/components/boundary/index.js +2 -2
  18. package/lib/commonjs/shared/components/boundary/portal/components/portal.js +3 -3
  19. package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -1
  20. package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js +36 -0
  21. package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js.map +1 -0
  22. package/lib/commonjs/shared/components/boundary/providers/{boundary-owner.provider.js → boundary-root.provider.js} +21 -23
  23. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -0
  24. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +33 -2
  25. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
  26. package/lib/commonjs/shared/components/create-transition-aware-component.js +2 -20
  27. package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
  28. package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +1 -1
  29. package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
  30. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +2 -14
  31. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  32. package/lib/commonjs/shared/components/screen-container/layers/content.js +4 -16
  33. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  34. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +4 -15
  35. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  36. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +4 -16
  37. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -1
  38. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +142 -24
  39. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  40. package/lib/commonjs/shared/providers/screen/screen-composer.js +1 -1
  41. package/lib/commonjs/shared/providers/screen/screen-composer.js.map +1 -1
  42. package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js +32 -0
  43. package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js.map +1 -0
  44. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +7 -8
  45. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  46. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
  47. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js +1 -20
  48. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js.map +1 -1
  49. package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js +1 -11
  50. package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
  51. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +23 -36
  52. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  53. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +1 -19
  54. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  55. package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +8 -3
  56. package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
  57. package/lib/commonjs/shared/providers/screen/styles/index.js +25 -7
  58. package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -1
  59. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +103 -0
  60. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -0
  61. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +16 -1
  62. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  63. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +8 -1
  64. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  65. package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js +59 -0
  66. package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
  67. package/lib/commonjs/shared/utils/logger.js +11 -0
  68. package/lib/commonjs/shared/utils/logger.js.map +1 -1
  69. package/lib/module/shared/components/boundary/components/boundary-target.js +10 -10
  70. package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
  71. package/lib/module/shared/components/boundary/create-boundary-component.js +47 -111
  72. package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
  73. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +98 -0
  74. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -0
  75. package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js +7 -4
  76. package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +1 -1
  77. package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js +24 -14
  78. package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +1 -1
  79. package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js +3 -4
  80. package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +1 -1
  81. package/lib/module/shared/components/boundary/hooks/use-measurer.js +6 -8
  82. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  83. package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js +6 -3
  84. package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +1 -1
  85. package/lib/module/shared/components/boundary/index.js +2 -2
  86. package/lib/module/shared/components/boundary/portal/components/portal.js +4 -4
  87. package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -1
  88. package/lib/module/shared/components/boundary/portal/resolve-portal.js +31 -0
  89. package/lib/module/shared/components/boundary/portal/resolve-portal.js.map +1 -0
  90. package/lib/module/shared/components/boundary/providers/{boundary-owner.provider.js → boundary-root.provider.js} +18 -20
  91. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -0
  92. package/lib/module/shared/components/boundary/utils/destination-signals.js +33 -2
  93. package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
  94. package/lib/module/shared/components/create-transition-aware-component.js +4 -22
  95. package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
  96. package/lib/module/shared/components/overlay/variations/float-overlay.js +2 -2
  97. package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
  98. package/lib/module/shared/components/screen-container/layers/backdrop.js +4 -16
  99. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  100. package/lib/module/shared/components/screen-container/layers/content.js +4 -16
  101. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  102. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +5 -16
  103. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  104. package/lib/module/shared/components/screen-container/layers/surface-container.js +4 -16
  105. package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
  106. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +143 -25
  107. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  108. package/lib/module/shared/providers/screen/screen-composer.js +2 -2
  109. package/lib/module/shared/providers/screen/screen-composer.js.map +1 -1
  110. package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js +26 -0
  111. package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js.map +1 -0
  112. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +7 -8
  113. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  114. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
  115. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js +0 -18
  116. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js.map +1 -1
  117. package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js +0 -9
  118. package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
  119. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +22 -35
  120. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  121. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +1 -19
  122. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  123. package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +9 -4
  124. package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
  125. package/lib/module/shared/providers/screen/styles/index.js +1 -1
  126. package/lib/module/shared/providers/screen/styles/index.js.map +1 -1
  127. package/lib/module/shared/providers/screen/styles/slot.provider.js +91 -0
  128. package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -0
  129. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +14 -0
  130. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  131. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +9 -2
  132. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  133. package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js +58 -0
  134. package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
  135. package/lib/module/shared/utils/logger.js +11 -0
  136. package/lib/module/shared/utils/logger.js.map +1 -1
  137. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +2 -1
  138. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
  139. package/lib/typescript/component-stack/components/component-screen.d.ts +1 -1
  140. package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
  141. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +2 -1
  142. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
  143. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +1 -1
  144. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
  145. package/lib/typescript/native-stack/views/NativeStackView.d.ts +2 -1
  146. package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -1
  147. package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts +2 -2
  148. package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts +1 -1
  149. package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts.map +1 -1
  150. package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts +1 -1
  151. package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts.map +1 -1
  152. package/lib/typescript/shared/components/activity/variants/activity-container.d.ts +1 -1
  153. package/lib/typescript/shared/components/activity/variants/activity-container.d.ts.map +1 -1
  154. package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts +1 -1
  155. package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts.map +1 -1
  156. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +1 -1
  157. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
  158. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
  159. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +32 -0
  160. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -0
  161. package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts +2 -1
  162. package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +1 -1
  163. package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts +3 -2
  164. package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +1 -1
  165. package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts +2 -2
  166. package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +1 -1
  167. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +3 -5
  168. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  169. package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts +3 -3
  170. package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +1 -1
  171. package/lib/typescript/shared/components/boundary/index.d.ts +7 -211
  172. package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
  173. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts +2 -2
  174. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -1
  175. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +1 -1
  176. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -1
  177. package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts +1 -1
  178. package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts.map +1 -1
  179. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +1 -1
  180. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -1
  181. package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts +14 -0
  182. package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts.map +1 -0
  183. package/lib/typescript/shared/components/boundary/providers/{boundary-owner.provider.d.ts → boundary-root.provider.d.ts} +12 -14
  184. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -0
  185. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +1 -0
  186. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
  187. package/lib/typescript/shared/components/create-transition-aware-component.d.ts +5 -6
  188. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  189. package/lib/typescript/shared/components/masked-view.d.ts +1 -1
  190. package/lib/typescript/shared/components/masked-view.d.ts.map +1 -1
  191. package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts +1 -1
  192. package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
  193. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
  194. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
  195. package/lib/typescript/shared/components/scene-view.d.ts +1 -1
  196. package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
  197. package/lib/typescript/shared/components/screen-container/index.d.ts +1 -1
  198. package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -1
  199. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +1 -1
  200. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  201. package/lib/typescript/shared/components/screen-container/layers/content.d.ts +1 -1
  202. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  203. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +1 -1
  204. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  205. package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts +1 -1
  206. package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -1
  207. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -1
  208. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
  209. package/lib/typescript/shared/index.d.ts +663 -919
  210. package/lib/typescript/shared/index.d.ts.map +1 -1
  211. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  212. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts +1 -1
  213. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
  214. package/lib/typescript/shared/providers/screen/screen-composer.d.ts +1 -1
  215. package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -1
  216. package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +1 -1
  217. package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts.map +1 -1
  218. package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts +16 -0
  219. package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts.map +1 -0
  220. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts +3 -4
  221. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
  222. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts.map +1 -1
  223. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.d.ts +0 -1
  224. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.d.ts.map +1 -1
  225. package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts +0 -1
  226. package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts.map +1 -1
  227. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +0 -5
  228. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  229. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +2 -3
  230. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  231. package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts.map +1 -1
  232. package/lib/typescript/shared/providers/screen/styles/index.d.ts +1 -1
  233. package/lib/typescript/shared/providers/screen/styles/index.d.ts.map +1 -1
  234. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +23 -0
  235. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -0
  236. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +6 -1
  237. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
  238. package/lib/typescript/shared/stores/bounds/types.d.ts +13 -0
  239. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  240. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
  241. package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts +9 -0
  242. package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
  243. package/lib/typescript/shared/utils/logger.d.ts +6 -0
  244. package/lib/typescript/shared/utils/logger.d.ts.map +1 -1
  245. package/package.json +1 -1
  246. package/src/shared/components/boundary/components/boundary-target.tsx +12 -12
  247. package/src/shared/components/boundary/create-boundary-component.tsx +59 -155
  248. package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +127 -0
  249. package/src/shared/components/boundary/hooks/use-boundary-presence.ts +7 -5
  250. package/src/shared/components/boundary/hooks/use-initial-destination-measurement.ts +27 -11
  251. package/src/shared/components/boundary/hooks/use-initial-source-measurement.ts +5 -5
  252. package/src/shared/components/boundary/hooks/use-measurer.ts +11 -14
  253. package/src/shared/components/boundary/hooks/use-refresh-boundary.ts +5 -5
  254. package/src/shared/components/boundary/index.tsx +2 -2
  255. package/src/shared/components/boundary/portal/components/portal.tsx +3 -3
  256. package/src/shared/components/boundary/portal/resolve-portal.ts +40 -0
  257. package/src/shared/components/boundary/providers/{boundary-owner.provider.tsx → boundary-root.provider.tsx} +27 -32
  258. package/src/shared/components/boundary/utils/destination-signals.ts +53 -2
  259. package/src/shared/components/create-transition-aware-component.tsx +3 -25
  260. package/src/shared/components/overlay/variations/float-overlay.tsx +3 -3
  261. package/src/shared/components/screen-container/layers/backdrop.tsx +4 -17
  262. package/src/shared/components/screen-container/layers/content.tsx +4 -16
  263. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +8 -18
  264. package/src/shared/components/screen-container/layers/surface-container.tsx +4 -17
  265. package/src/shared/providers/screen/animation/helpers/pipeline.ts +250 -68
  266. package/src/shared/providers/screen/screen-composer.tsx +3 -3
  267. package/src/shared/providers/screen/styles/helpers/opening-phase.ts +25 -0
  268. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +8 -10
  269. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts +0 -1
  270. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.ts +0 -24
  271. package/src/shared/providers/screen/styles/helpers/visibility-gate.ts +0 -12
  272. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +29 -37
  273. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +0 -18
  274. package/src/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.tsx +17 -4
  275. package/src/shared/providers/screen/styles/index.tsx +8 -4
  276. package/src/shared/providers/screen/styles/slot.provider.tsx +111 -0
  277. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +17 -0
  278. package/src/shared/stores/bounds/types.ts +14 -0
  279. package/src/shared/utils/bounds/navigation/zoom/build.ts +9 -1
  280. package/src/shared/utils/bounds/navigation/zoom/helpers.ts +96 -0
  281. package/src/shared/utils/logger.ts +12 -0
  282. package/lib/commonjs/shared/components/boundary/providers/boundary-owner.provider.js.map +0 -1
  283. package/lib/commonjs/shared/providers/screen/styles/helpers/preserve-animated-props-only.js +0 -26
  284. package/lib/commonjs/shared/providers/screen/styles/helpers/preserve-animated-props-only.js.map +0 -1
  285. package/lib/commonjs/shared/providers/screen/styles/styles.provider.js +0 -61
  286. package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +0 -1
  287. package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js.map +0 -1
  288. package/lib/module/shared/providers/screen/styles/helpers/preserve-animated-props-only.js +0 -21
  289. package/lib/module/shared/providers/screen/styles/helpers/preserve-animated-props-only.js.map +0 -1
  290. package/lib/module/shared/providers/screen/styles/styles.provider.js +0 -53
  291. package/lib/module/shared/providers/screen/styles/styles.provider.js.map +0 -1
  292. package/lib/typescript/shared/components/boundary/providers/boundary-owner.provider.d.ts.map +0 -1
  293. package/lib/typescript/shared/providers/screen/styles/helpers/preserve-animated-props-only.d.ts +0 -3
  294. package/lib/typescript/shared/providers/screen/styles/helpers/preserve-animated-props-only.d.ts.map +0 -1
  295. package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts +0 -14
  296. package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +0 -1
  297. package/src/shared/providers/screen/styles/helpers/preserve-animated-props-only.ts +0 -22
  298. package/src/shared/providers/screen/styles/styles.provider.tsx +0 -60
@@ -35,7 +35,7 @@ Host.displayName = "Transition.Boundary.Host";
35
35
  * Use:
36
36
  * - `Boundary.View` for passive/shared elements.
37
37
  * - `Boundary.Trigger` for tappable elements that start navigation.
38
- * - `Boundary.Target` to measure a nested descendant instead of the owner.
38
+ * - `Boundary.Target` to measure a nested descendant instead of the root.
39
39
  * - `Boundary.Host` to make nested portal placement explicit.
40
40
  */
41
41
  export const Boundary = {
@@ -48,7 +48,7 @@ export const Boundary = {
48
48
  */
49
49
  Trigger: BoundaryTrigger,
50
50
  /**
51
- * Optional nested measurement override inside a boundary owner.
51
+ * Optional nested measurement override inside a boundary root.
52
52
  */
53
53
  Target: BoundaryTarget,
54
54
  /**
@@ -17,7 +17,7 @@ import Animated, {
17
17
  useSharedValue,
18
18
  } from "react-native-reanimated";
19
19
  import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
20
- import { useScreenStyles } from "../../../../providers/screen/styles";
20
+ import { useScreenSlots } from "../../../../providers/screen/styles";
21
21
  import { AnimationStore } from "../../../../stores/animation.store";
22
22
  import { getLinkKeyFromTag } from "../../../../stores/bounds/helpers/link-pairs.helpers";
23
23
  import { getLink } from "../../../../stores/bounds/internals/links";
@@ -83,7 +83,7 @@ export const Portal = memo(function Portal({
83
83
  !mode || mode === true
84
84
  ? "current-screen"
85
85
  : (mode.attachTo ?? "current-screen");
86
- const { stylesMap } = useScreenStyles();
86
+ const { slotsMap } = useScreenSlots();
87
87
  const sourcePairKey = useDescriptorsStore((s) => s.derivations.sourcePairKey);
88
88
  const currentScreenKey = useDescriptorsStore(
89
89
  (s) => s.derivations.currentScreenKey,
@@ -229,7 +229,7 @@ export const Portal = memo(function Portal({
229
229
  // re-parented before the host is visually ready. Closing stays attached
230
230
  // through progress 0 so the final frame can land in the matched host.
231
231
  const attachThreshold = closing.get() === 1 ? 0 : 0.001;
232
- const { teleport, ...slotProps } = stylesMap.get()[id]?.props ?? {};
232
+ const { teleport, ...slotProps } = slotsMap.get()[id]?.props ?? {};
233
233
  const shouldTeleport = isTeleportEnabled(teleport);
234
234
 
235
235
  return {
@@ -0,0 +1,40 @@
1
+ import type { BoundsPortalAttachTarget } from "../../../stores/bounds/types";
2
+ import { logger } from "../../../utils/logger";
3
+ import type { BoundaryPortal } from "../types";
4
+ import { isTeleportAvailable } from "./teleport";
5
+
6
+ /**
7
+ * Resolves the `portal` prop against teleport availability. When
8
+ * `react-native-teleport` is missing, portal boundaries degrade to inline
9
+ * rendering and we warn once for the whole app.
10
+ */
11
+ export const resolveBoundaryPortal = (
12
+ portal?: BoundaryPortal,
13
+ ): BoundaryPortal | undefined => {
14
+ if (isTeleportAvailable) {
15
+ return portal;
16
+ }
17
+
18
+ if (portal) {
19
+ logger.warnOnce(
20
+ "boundary:teleport-missing",
21
+ "react-native-teleport is not installed and will fallback to default behavior.",
22
+ );
23
+ }
24
+
25
+ return undefined;
26
+ };
27
+
28
+ /**
29
+ * Resolves which screen host a portal'd boundary attaches to. Object form may
30
+ * pin an explicit `attachTo`; bare `true` defaults to the current screen.
31
+ */
32
+ export const resolvePortalHost = (
33
+ portal?: BoundaryPortal,
34
+ ): BoundsPortalAttachTarget | undefined => {
35
+ if (typeof portal === "object") {
36
+ return portal.attachTo ?? "current-screen";
37
+ }
38
+
39
+ return portal ? "current-screen" : undefined;
40
+ };
@@ -1,8 +1,10 @@
1
1
  import type React from "react";
2
- import { type ReactNode, useCallback, useMemo, useRef, useState } from "react";
2
+ import { type ReactNode, useCallback, useMemo, useState } from "react";
3
3
  import type { View } from "react-native";
4
4
  import type Animated from "react-native-reanimated";
5
5
  import type { AnimatedRef, StyleProps } from "react-native-reanimated";
6
+ import { useAnimatedRef } from "react-native-reanimated";
7
+ import type { BoundTag } from "../../../stores/bounds/types";
6
8
  import createProvider from "../../../utils/create-provider";
7
9
  import { logger } from "../../../utils/logger";
8
10
  import type { BoundaryPortal } from "../types";
@@ -11,8 +13,7 @@ type BoundaryAssociatedStyle = React.ComponentProps<
11
13
  typeof Animated.View
12
14
  >["style"];
13
15
 
14
- interface BoundaryOwnerContextValue {
15
- ownerRef: AnimatedRef<View>;
16
+ interface BoundaryRootContextValue {
16
17
  registerTargetRef: (
17
18
  targetRef: AnimatedRef<View>,
18
19
  preparedStyles: StyleProps,
@@ -21,7 +22,7 @@ interface BoundaryOwnerContextValue {
21
22
  unregisterTargetRef: (targetRef: AnimatedRef<View>) => void;
22
23
  activeTargetRef: AnimatedRef<View> | null;
23
24
  associatedTargetStyles?: BoundaryAssociatedStyle;
24
- entryTag: string;
25
+ boundTag: BoundTag;
25
26
  portal?: BoundaryPortal;
26
27
  }
27
28
 
@@ -34,30 +35,28 @@ type BoundaryTargetEntry = {
34
35
 
35
36
  // logger.warn prepends the library prefix.
36
37
  const MULTIPLE_TARGETS_WARNING =
37
- "Multiple Boundary.Target elements were rendered under the same boundary owner. The first registered target will be measured.";
38
+ "Multiple Boundary.Target elements were rendered under the same boundary root. The first registered target will be measured.";
38
39
 
39
- export const TARGET_OUTSIDE_OWNER_WARNING =
40
- "Boundary.Target must be rendered inside a Boundary owner (Boundary.View, Boundary.Trigger, or a component created by createBoundaryComponent).";
40
+ export const TARGET_OUTSIDE_ROOT_WARNING =
41
+ "Boundary.Target must be rendered inside a Boundary root (Boundary.View, Boundary.Trigger, or a component created by createBoundaryComponent).";
41
42
 
42
- interface BoundaryOwnerProps {
43
- value: BoundaryOwnerContextValue;
43
+ interface BoundaryRootProps {
44
+ value: BoundaryRootContextValue;
44
45
  children: ReactNode;
45
46
  }
46
47
 
47
- export const { BoundaryOwnerProvider, useBoundaryOwnerContext } =
48
- createProvider("BoundaryOwner", { guarded: false })<
49
- BoundaryOwnerProps,
50
- BoundaryOwnerContextValue
51
- >((props) => props);
48
+ export const { BoundaryRootProvider, useBoundaryRootContext } = createProvider(
49
+ "BoundaryRoot",
50
+ { guarded: false },
51
+ )<BoundaryRootProps, BoundaryRootContextValue>((props) => props);
52
52
 
53
- export const useBoundaryOwner = (params: {
54
- ownerRef: AnimatedRef<View>;
53
+ export const useBoundaryRootState = (params: {
55
54
  associatedTargetStyles?: BoundaryAssociatedStyle;
56
- entryTag: string;
55
+ boundTag: BoundTag;
57
56
  portal?: BoundaryPortal;
58
57
  }) => {
59
- const { ownerRef, associatedTargetStyles, entryTag, portal } = params;
60
- const warnedAboutMultipleTargetsRef = useRef(false);
58
+ const { associatedTargetStyles, boundTag, portal } = params;
59
+ const rootRef = useAnimatedRef<View>();
61
60
  const [targetEntry, setTargetEntry] = useState<BoundaryTargetEntry | null>(
62
61
  null,
63
62
  );
@@ -73,13 +72,11 @@ export const useBoundaryOwner = (params: {
73
72
  return prev;
74
73
  }
75
74
 
76
- if (
77
- __DEV__ &&
78
- prev !== null &&
79
- !warnedAboutMultipleTargetsRef.current
80
- ) {
81
- warnedAboutMultipleTargetsRef.current = true;
82
- logger.warn(MULTIPLE_TARGETS_WARNING);
75
+ if (__DEV__ && prev !== null) {
76
+ logger.warnOnce(
77
+ "boundary:multiple-targets",
78
+ MULTIPLE_TARGETS_WARNING,
79
+ );
83
80
  }
84
81
 
85
82
  return (
@@ -100,30 +97,28 @@ export const useBoundaryOwner = (params: {
100
97
 
101
98
  const contextValue = useMemo(
102
99
  () => ({
103
- ownerRef,
104
100
  registerTargetRef,
105
101
  unregisterTargetRef,
106
102
  activeTargetRef: targetEntry?.ref ?? null,
107
103
  associatedTargetStyles,
108
- entryTag,
104
+ boundTag,
109
105
  portal,
110
106
  }),
111
107
  [
112
- ownerRef,
113
108
  registerTargetRef,
114
109
  unregisterTargetRef,
115
110
  targetEntry,
116
111
  associatedTargetStyles,
117
- entryTag,
112
+ boundTag,
118
113
  portal,
119
114
  ],
120
115
  );
121
116
 
122
117
  return {
118
+ ref: rootRef,
123
119
  contextValue,
124
120
  hasActiveTarget: targetEntry !== null,
125
- measuredRef: targetEntry?.measurementRef ?? ownerRef,
121
+ measuredRef: targetEntry?.measurementRef ?? rootRef,
126
122
  targetPreparedStyles: targetEntry?.preparedStyles,
127
- portal,
128
123
  };
129
124
  };
@@ -1,13 +1,40 @@
1
+ import {
2
+ createPendingPairKey,
3
+ getActiveGroupId,
4
+ getLinkKeyFromTag,
5
+ getSourceScreenKeyFromPairKey,
6
+ } from "../../../stores/bounds/helpers/link-pairs.helpers";
1
7
  import type {
2
8
  LinkPairsState,
3
9
  ScreenPairKey,
4
10
  } from "../../../stores/bounds/types";
5
11
 
12
+ const hasPendingSourceLinks = (
13
+ linkState: LinkPairsState | undefined,
14
+ pendingPairKey: ScreenPairKey,
15
+ ) => {
16
+ "worklet";
17
+ const links = linkState?.[pendingPairKey]?.links;
18
+
19
+ if (!links) {
20
+ return false;
21
+ }
22
+
23
+ for (const key in links) {
24
+ if (links[key]?.source) {
25
+ return true;
26
+ }
27
+ }
28
+
29
+ return false;
30
+ };
31
+
6
32
  export const getInitialDestinationMeasurePairKey = (params: {
7
33
  enabled: boolean;
8
34
  destinationPairKey?: ScreenPairKey;
9
35
  ancestorDestinationPairKey?: ScreenPairKey;
10
36
  linkId: string;
37
+ group?: string;
11
38
  linkState?: LinkPairsState;
12
39
  }): ScreenPairKey | null => {
13
40
  "worklet";
@@ -16,6 +43,7 @@ export const getInitialDestinationMeasurePairKey = (params: {
16
43
  destinationPairKey,
17
44
  ancestorDestinationPairKey,
18
45
  linkId,
46
+ group,
19
47
  linkState,
20
48
  } = params;
21
49
  const measurePairKey = destinationPairKey ?? ancestorDestinationPairKey;
@@ -24,8 +52,31 @@ export const getInitialDestinationMeasurePairKey = (params: {
24
52
  return null;
25
53
  }
26
54
 
55
+ const linkKey = getLinkKeyFromTag(linkId);
27
56
  const hasDestination =
28
- linkState?.[measurePairKey]?.links?.[linkId]?.destination;
57
+ linkState?.[measurePairKey]?.links?.[linkKey]?.destination;
58
+
59
+ if (hasDestination) {
60
+ return null;
61
+ }
62
+
63
+ const sourceScreenKey = getSourceScreenKeyFromPairKey(measurePairKey);
64
+ const pendingPairKey = createPendingPairKey(sourceScreenKey);
65
+ const hasPendingSources = hasPendingSourceLinks(linkState, pendingPairKey);
66
+ const pendingSource = linkState?.[pendingPairKey]?.links?.[linkKey]?.source;
67
+
68
+ if (hasPendingSources && !pendingSource) {
69
+ return null;
70
+ }
71
+
72
+ const activeGroupId =
73
+ group && linkState
74
+ ? getActiveGroupId(linkState, measurePairKey, group)
75
+ : null;
76
+
77
+ if (!hasPendingSources && activeGroupId && activeGroupId !== linkKey) {
78
+ return null;
79
+ }
29
80
 
30
- return hasDestination ? null : measurePairKey;
81
+ return measurePairKey;
31
82
  };
@@ -5,18 +5,15 @@ import type { View } from "react-native";
5
5
  import { GestureDetector } from "react-native-gesture-handler";
6
6
  import Animated, {
7
7
  runOnUI,
8
- useAnimatedProps,
9
8
  useAnimatedRef,
10
- useAnimatedStyle,
11
9
  useComposedEventHandler,
12
10
  } from "react-native-reanimated";
13
- import { NO_PROPS, NO_STYLES } from "../constants";
14
11
  import { RegisterBoundsProvider } from "../providers/register-bounds.provider";
15
12
  import {
16
13
  ScrollMetadataOwnerProvider,
17
14
  useScrollGestureCoordination,
18
15
  } from "../providers/screen/gestures/scroll-coordination";
19
- import { useScreenStyles } from "../providers/screen/styles";
16
+ import { useSlotProps, useSlotStyles } from "../providers/screen/styles";
20
17
  import type { TransitionAwareProps } from "../types/screen.types";
21
18
 
22
19
  interface CreateTransitionAwareComponentOptions {
@@ -128,28 +125,9 @@ export function createTransitionAwareComponent<P extends object>(
128
125
  } = props as any;
129
126
 
130
127
  const animatedRef = useAnimatedRef<View>();
131
- const { stylesMap } = useScreenStyles();
132
128
  const associatedId = sharedBoundTag || styleId;
133
-
134
- const associatedStyles = useAnimatedStyle(() => {
135
- "worklet";
136
-
137
- if (!associatedId) {
138
- return NO_STYLES;
139
- }
140
-
141
- return stylesMap.get()[associatedId]?.style ?? NO_STYLES;
142
- });
143
-
144
- const associatedProps = useAnimatedProps(() => {
145
- "worklet";
146
-
147
- if (!associatedId) {
148
- return NO_PROPS;
149
- }
150
-
151
- return stylesMap.get()[associatedId]?.props ?? NO_PROPS;
152
- });
129
+ const associatedStyles = useSlotStyles(associatedId);
130
+ const associatedProps = useSlotProps(associatedId);
153
131
 
154
132
  return (
155
133
  <RegisterBoundsProvider
@@ -5,7 +5,7 @@ import { ScreenAnimationProvider } from "../../../providers/screen/animation";
5
5
  import type { BaseDescriptor } from "../../../providers/screen/descriptors";
6
6
  import { DescriptorsProvider } from "../../../providers/screen/descriptors";
7
7
  import { ScreenOptionsProvider } from "../../../providers/screen/options";
8
- import { ScreenStylesProvider } from "../../../providers/screen/styles";
8
+ import { ScreenSlotProvider } from "../../../providers/screen/styles";
9
9
  import type { OverlayScreenState } from "../../../types/overlay.types";
10
10
 
11
11
  import { getActiveFloatOverlay } from "../helpers/get-active-overlay";
@@ -67,12 +67,12 @@ export function FloatOverlay() {
67
67
  <DescriptorsProvider current={current} previous={previous} next={next}>
68
68
  <ScreenOptionsProvider>
69
69
  <ScreenAnimationProvider>
70
- <ScreenStylesProvider isFloatingOverlay>
70
+ <ScreenSlotProvider isFloatingOverlay>
71
71
  <OverlayHost
72
72
  scene={scene}
73
73
  overlayScreenState={overlayScreenState}
74
74
  />
75
- </ScreenStylesProvider>
75
+ </ScreenSlotProvider>
76
76
  </ScreenAnimationProvider>
77
77
  </ScreenOptionsProvider>
78
78
  </DescriptorsProvider>
@@ -1,15 +1,10 @@
1
1
  import { memo, useCallback, useMemo } from "react";
2
2
  import { Pressable, StyleSheet } from "react-native";
3
- import Animated, {
4
- runOnUI,
5
- useAnimatedProps,
6
- useAnimatedStyle,
7
- } from "react-native-reanimated";
3
+ import Animated, { runOnUI } from "react-native-reanimated";
8
4
  import { DefaultSnapSpec } from "../../../configs/specs";
9
- import { NO_PROPS, NO_STYLES } from "../../../constants";
10
5
  import { useNavigationHelpers } from "../../../hooks/navigation/use-navigation-helpers";
11
6
  import { useDescriptors } from "../../../providers/screen/descriptors";
12
- import { useScreenStyles } from "../../../providers/screen/styles";
7
+ import { useSlotProps, useSlotStyles } from "../../../providers/screen/styles";
13
8
  import { AnimationStore } from "../../../stores/animation.store";
14
9
  import { GestureStore } from "../../../stores/gesture.store";
15
10
  import { SystemStore } from "../../../stores/system.store";
@@ -24,7 +19,6 @@ export const BackdropLayer = memo(function BackdropLayer({
24
19
  backdropBehavior: BackdropBehavior;
25
20
  isBackdropActive: boolean;
26
21
  }) {
27
- const { stylesMap } = useScreenStyles();
28
22
  const { current } = useDescriptors();
29
23
  const { dismissScreen } = useNavigationHelpers();
30
24
 
@@ -112,15 +106,8 @@ export const BackdropLayer = memo(function BackdropLayer({
112
106
  routeKey,
113
107
  ]);
114
108
 
115
- const animatedBackdropStyle = useAnimatedStyle(() => {
116
- "worklet";
117
- return stylesMap.get().backdrop?.style ?? NO_STYLES;
118
- });
119
-
120
- const animatedBackdropProps = useAnimatedProps(() => {
121
- "worklet";
122
- return stylesMap.get().backdrop?.props ?? NO_PROPS;
123
- });
109
+ const animatedBackdropStyle = useSlotStyles("backdrop");
110
+ const animatedBackdropProps = useSlotProps("backdrop");
124
111
 
125
112
  return (
126
113
  <Pressable
@@ -2,15 +2,11 @@
2
2
  import { memo } from "react";
3
3
  import { StyleSheet, View } from "react-native";
4
4
  import { GestureDetector } from "react-native-gesture-handler";
5
- import Animated, {
6
- useAnimatedProps,
7
- useAnimatedStyle,
8
- } from "react-native-reanimated";
9
- import { NO_PROPS, NO_STYLES } from "../../../constants";
5
+ import Animated from "react-native-reanimated";
10
6
  import { useDescriptors } from "../../../providers/screen/descriptors";
11
7
  import { useGestureContext } from "../../../providers/screen/gestures";
12
8
  import { OriginProvider } from "../../../providers/screen/origin.provider";
13
- import { useScreenStyles } from "../../../providers/screen/styles";
9
+ import { useSlotProps, useSlotStyles } from "../../../providers/screen/styles";
14
10
  import { ScreenFallbackHost } from "../../boundary/portal/components/host";
15
11
  import { useContentLayout } from "../hooks/use-content-layout";
16
12
  import { MaybeMaskedNavigationContainer } from "./maybe-masked-navigation-container";
@@ -24,7 +20,6 @@ type Props = {
24
20
 
25
21
  export const ContentLayer = memo(
26
22
  ({ children, pointerEvents, isBackdropActive }: Props) => {
27
- const { stylesMap } = useScreenStyles();
28
23
  const { current } = useDescriptors();
29
24
 
30
25
  const gestureContext = useGestureContext();
@@ -36,15 +31,8 @@ export const ContentLayer = memo(
36
31
 
37
32
  const handleContentLayout = useContentLayout();
38
33
 
39
- const animatedContentStyle = useAnimatedStyle(() => {
40
- "worklet";
41
- return stylesMap.get().content?.style || NO_STYLES;
42
- });
43
-
44
- const animatedContentProps = useAnimatedProps(() => {
45
- "worklet";
46
- return stylesMap.get().content?.props ?? NO_PROPS;
47
- });
34
+ const animatedContentStyle = useSlotStyles("content");
35
+ const animatedContentProps = useSlotProps("content");
48
36
 
49
37
  return (
50
38
  <GestureDetector gesture={gestureContext!.detectorGesture}>
@@ -1,12 +1,11 @@
1
1
  import { memo, useCallback } from "react";
2
2
  import { StyleSheet, View, type ViewProps } from "react-native";
3
- import Animated, { useAnimatedStyle } from "react-native-reanimated";
3
+ import Animated from "react-native-reanimated";
4
4
  import {
5
5
  NAVIGATION_MASK_CONTAINER_STYLE_ID,
6
6
  NAVIGATION_MASK_ELEMENT_STYLE_ID,
7
- NO_STYLES,
8
7
  } from "../../../constants";
9
- import { useScreenStyles } from "../../../providers/screen/styles";
8
+ import { useSlotStyles } from "../../../providers/screen/styles";
10
9
  import { logger } from "../../../utils/logger";
11
10
 
12
11
  type Props = {
@@ -47,8 +46,6 @@ const MaskedNavigationContainer = memo(
47
46
  children: React.ReactNode;
48
47
  pointerEvents: ViewProps["pointerEvents"];
49
48
  }) => {
50
- const { stylesMap } = useScreenStyles();
51
-
52
49
  const maybeLogWarning = useCallback(() => {
53
50
  if (LazyMaskedView !== View) return;
54
51
  if (hasWarnedMissingMaskedView) return;
@@ -59,19 +56,12 @@ const MaskedNavigationContainer = memo(
59
56
  );
60
57
  }, []);
61
58
 
62
- const animatedNavigationMaskStyle = useAnimatedStyle(() => {
63
- "worklet";
64
- return (
65
- stylesMap.get()[NAVIGATION_MASK_ELEMENT_STYLE_ID]?.style || NO_STYLES
66
- );
67
- });
68
-
69
- const animatedNavigationMaskContainerStyle = useAnimatedStyle(() => {
70
- "worklet";
71
- return (
72
- stylesMap.get()[NAVIGATION_MASK_CONTAINER_STYLE_ID]?.style || NO_STYLES
73
- );
74
- });
59
+ const animatedNavigationMaskStyle = useSlotStyles(
60
+ NAVIGATION_MASK_ELEMENT_STYLE_ID,
61
+ );
62
+ const animatedNavigationMaskContainerStyle = useSlotStyles(
63
+ NAVIGATION_MASK_CONTAINER_STYLE_ID,
64
+ );
75
65
 
76
66
  return (
77
67
  <LazyMaskedView
@@ -1,12 +1,8 @@
1
1
  import { type ComponentType, memo, useMemo } from "react";
2
2
  import { StyleSheet, type ViewProps } from "react-native";
3
- import Animated, {
4
- useAnimatedProps,
5
- useAnimatedStyle,
6
- } from "react-native-reanimated";
7
- import { NO_PROPS, NO_STYLES } from "../../../constants";
3
+ import Animated from "react-native-reanimated";
8
4
  import { useDescriptors } from "../../../providers/screen/descriptors";
9
- import { useScreenStyles } from "../../../providers/screen/styles";
5
+ import { useSlotProps, useSlotStyles } from "../../../providers/screen/styles";
10
6
 
11
7
  type Props = {
12
8
  children: React.ReactNode;
@@ -44,17 +40,8 @@ type AnimatedSurfaceProps = {
44
40
 
45
41
  const AnimatedSurface = memo(
46
42
  ({ children, pointerEvents, SurfaceComponent }: AnimatedSurfaceProps) => {
47
- const { stylesMap } = useScreenStyles();
48
-
49
- const animatedSurfaceStyle = useAnimatedStyle(() => {
50
- "worklet";
51
- return stylesMap.get().surface?.style ?? NO_STYLES;
52
- });
53
-
54
- const animatedSurfaceProps = useAnimatedProps(() => {
55
- "worklet";
56
- return stylesMap.get().surface?.props ?? NO_PROPS;
57
- });
43
+ const animatedSurfaceStyle = useSlotStyles("surface");
44
+ const animatedSurfaceProps = useSlotProps("surface");
58
45
 
59
46
  return (
60
47
  <SurfaceComponent