react-native-screen-transitions 3.4.0-alpha.0 → 3.4.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 (535) hide show
  1. package/README.md +11 -1046
  2. package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js +69 -2
  3. package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
  4. package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js +9 -0
  5. package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
  6. package/lib/commonjs/shared/animation/snap-to.js +5 -1
  7. package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
  8. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +195 -0
  9. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
  10. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
  11. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
  12. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
  13. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
  14. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +54 -0
  15. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
  16. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +40 -8
  17. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
  18. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +72 -0
  19. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
  20. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
  21. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
  22. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +7 -4
  23. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
  24. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
  25. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
  26. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
  27. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
  28. package/lib/commonjs/shared/components/create-boundary-component/index.js +22 -8
  29. package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
  30. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +5 -10
  31. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -1
  32. package/lib/commonjs/shared/components/create-transition-aware-component.js +3 -2
  33. package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
  34. package/lib/commonjs/shared/components/native-screen-container.js +12 -6
  35. package/lib/commonjs/shared/components/native-screen-container.js.map +1 -1
  36. package/lib/commonjs/shared/components/native-screen.js +35 -8
  37. package/lib/commonjs/shared/components/native-screen.js.map +1 -1
  38. package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js +2 -2
  39. package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
  40. package/lib/commonjs/shared/components/overlay/index.js +1 -3
  41. package/lib/commonjs/shared/components/overlay/index.js.map +1 -1
  42. package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +2 -16
  43. package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -1
  44. package/lib/commonjs/shared/components/scene-view.js +2 -4
  45. package/lib/commonjs/shared/components/scene-view.js.map +1 -1
  46. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +60 -0
  47. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
  48. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +9 -6
  49. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  50. package/lib/commonjs/shared/components/screen-container/layers/content.js +16 -56
  51. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  52. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +86 -0
  53. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -0
  54. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
  55. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js +17 -4
  56. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
  57. package/lib/commonjs/shared/constants.js +6 -2
  58. package/lib/commonjs/shared/constants.js.map +1 -1
  59. package/lib/commonjs/shared/hooks/gestures/resolve-screen-gesture-target.js +49 -0
  60. package/lib/commonjs/shared/hooks/gestures/resolve-screen-gesture-target.js.map +1 -0
  61. package/lib/commonjs/shared/hooks/gestures/types.js +2 -0
  62. package/lib/commonjs/shared/hooks/gestures/types.js.map +1 -0
  63. package/lib/commonjs/shared/hooks/gestures/use-screen-gesture.js +7 -3
  64. package/lib/commonjs/shared/hooks/gestures/use-screen-gesture.js.map +1 -1
  65. package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
  66. package/lib/commonjs/shared/index.js +15 -3
  67. package/lib/commonjs/shared/index.js.map +1 -1
  68. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +61 -25
  69. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  70. package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js +11 -6
  71. package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js.map +1 -1
  72. package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js +44 -0
  73. package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -0
  74. package/lib/commonjs/shared/providers/layout-anchor.provider.js +4 -6
  75. package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +1 -1
  76. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +31 -17
  77. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
  78. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -9
  79. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
  80. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +25 -13
  81. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  82. package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +33 -0
  83. package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -0
  84. package/lib/commonjs/shared/providers/screen/animation/types.js +2 -0
  85. package/lib/commonjs/shared/providers/screen/animation/types.js.map +1 -0
  86. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +9 -3
  87. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  88. package/lib/commonjs/shared/providers/stack/core.provider.js +14 -21
  89. package/lib/commonjs/shared/providers/stack/core.provider.js.map +1 -1
  90. package/lib/commonjs/shared/providers/stack/direct.provider.js +1 -1
  91. package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
  92. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js +1 -1
  93. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
  94. package/lib/commonjs/shared/stores/animation.store.js +10 -2
  95. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  96. package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +1 -1
  97. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +7 -0
  98. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  99. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +6 -0
  100. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  101. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js +33 -9
  102. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
  103. package/lib/commonjs/shared/utils/bounds/helpers/geometry.js +3 -2
  104. package/lib/commonjs/shared/utils/bounds/helpers/geometry.js.map +1 -1
  105. package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js +3 -2
  106. package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js.map +1 -1
  107. package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js +2 -2
  108. package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js.map +1 -1
  109. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js +4 -8
  110. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
  111. package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js +4 -3
  112. package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js.map +1 -1
  113. package/lib/commonjs/shared/utils/bounds/index.js +13 -3
  114. package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
  115. package/lib/commonjs/shared/utils/bounds/types/frame-props.js +6 -0
  116. package/lib/commonjs/shared/utils/bounds/types/frame-props.js.map +1 -0
  117. package/lib/commonjs/shared/utils/bounds/zoom/accessor.js +54 -0
  118. package/lib/commonjs/shared/utils/bounds/zoom/accessor.js.map +1 -0
  119. package/lib/commonjs/shared/utils/bounds/zoom/build.js +548 -0
  120. package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -0
  121. package/lib/commonjs/shared/utils/bounds/zoom/config.js +118 -0
  122. package/lib/commonjs/shared/utils/bounds/zoom/config.js.map +1 -0
  123. package/lib/commonjs/shared/utils/bounds/zoom/index.js +20 -0
  124. package/lib/commonjs/shared/utils/bounds/zoom/index.js.map +1 -0
  125. package/lib/commonjs/shared/utils/bounds/zoom/types.js.map +1 -0
  126. package/lib/commonjs/shared/utils/gesture/validate-snap-points.js +11 -5
  127. package/lib/commonjs/shared/utils/gesture/validate-snap-points.js.map +1 -1
  128. package/lib/commonjs/shared/utils/overlay/visibility.js +2 -9
  129. package/lib/commonjs/shared/utils/overlay/visibility.js.map +1 -1
  130. package/lib/commonjs/shared/utils/resolve-screen-transition-options.js +25 -0
  131. package/lib/commonjs/shared/utils/resolve-screen-transition-options.js.map +1 -0
  132. package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js +69 -3
  133. package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
  134. package/lib/module/component-stack/navigators/create-component-stack-navigator.js +9 -0
  135. package/lib/module/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
  136. package/lib/module/shared/animation/snap-to.js +5 -1
  137. package/lib/module/shared/animation/snap-to.js.map +1 -1
  138. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +182 -0
  139. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
  140. package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
  141. package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
  142. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
  143. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
  144. package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +49 -0
  145. package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
  146. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +41 -8
  147. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
  148. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +67 -0
  149. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
  150. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
  151. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
  152. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +7 -4
  153. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
  154. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
  155. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
  156. package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
  157. package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
  158. package/lib/module/shared/components/create-boundary-component/index.js +22 -8
  159. package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
  160. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +5 -10
  161. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -1
  162. package/lib/module/shared/components/create-transition-aware-component.js +3 -2
  163. package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
  164. package/lib/module/shared/components/native-screen-container.js +12 -6
  165. package/lib/module/shared/components/native-screen-container.js.map +1 -1
  166. package/lib/module/shared/components/native-screen.js +35 -8
  167. package/lib/module/shared/components/native-screen.js.map +1 -1
  168. package/lib/module/shared/components/overlay/helpers/get-active-overlay.js +3 -3
  169. package/lib/module/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
  170. package/lib/module/shared/components/overlay/index.js +1 -3
  171. package/lib/module/shared/components/overlay/index.js.map +1 -1
  172. package/lib/module/shared/components/overlay/variations/overlay-host.js +3 -17
  173. package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -1
  174. package/lib/module/shared/components/scene-view.js +3 -5
  175. package/lib/module/shared/components/scene-view.js.map +1 -1
  176. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +56 -0
  177. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
  178. package/lib/module/shared/components/screen-container/layers/backdrop.js +9 -6
  179. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  180. package/lib/module/shared/components/screen-container/layers/content.js +18 -58
  181. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  182. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +81 -0
  183. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -0
  184. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
  185. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js +17 -4
  186. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
  187. package/lib/module/shared/constants.js +6 -2
  188. package/lib/module/shared/constants.js.map +1 -1
  189. package/lib/module/shared/hooks/gestures/resolve-screen-gesture-target.js +45 -0
  190. package/lib/module/shared/hooks/gestures/resolve-screen-gesture-target.js.map +1 -0
  191. package/lib/module/shared/hooks/gestures/types.js +2 -0
  192. package/lib/module/shared/hooks/gestures/types.js.map +1 -0
  193. package/lib/module/shared/hooks/gestures/use-screen-gesture.js +7 -4
  194. package/lib/module/shared/hooks/gestures/use-screen-gesture.js.map +1 -1
  195. package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
  196. package/lib/module/shared/index.js +1 -2
  197. package/lib/module/shared/index.js.map +1 -1
  198. package/lib/module/shared/providers/gestures/handlers/use-handlers.js +61 -25
  199. package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  200. package/lib/module/shared/providers/gestures/helpers/gesture-activation.js +11 -6
  201. package/lib/module/shared/providers/gestures/helpers/gesture-activation.js.map +1 -1
  202. package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js +38 -0
  203. package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -0
  204. package/lib/module/shared/providers/layout-anchor.provider.js +4 -6
  205. package/lib/module/shared/providers/layout-anchor.provider.js.map +1 -1
  206. package/lib/module/shared/providers/screen/animation/animation.provider.js +30 -15
  207. package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
  208. package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -9
  209. package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
  210. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +25 -13
  211. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  212. package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +29 -0
  213. package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -0
  214. package/lib/module/shared/providers/screen/animation/index.js.map +1 -1
  215. package/lib/module/shared/providers/screen/animation/types.js +2 -0
  216. package/lib/module/shared/providers/screen/animation/types.js.map +1 -0
  217. package/lib/module/shared/providers/screen/animation/use-screen-animation.js +9 -3
  218. package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  219. package/lib/module/shared/providers/stack/core.provider.js +14 -21
  220. package/lib/module/shared/providers/stack/core.provider.js.map +1 -1
  221. package/lib/module/shared/providers/stack/direct.provider.js +2 -2
  222. package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
  223. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +2 -2
  224. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
  225. package/lib/module/shared/stores/animation.store.js +10 -2
  226. package/lib/module/shared/stores/animation.store.js.map +1 -1
  227. package/lib/module/shared/stores/bounds/internals/presence.js.map +1 -1
  228. package/lib/module/shared/stores/bounds/internals/resolver.js +7 -0
  229. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  230. package/lib/module/shared/utils/animation/animate-to-progress.js +6 -0
  231. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  232. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js +33 -9
  233. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
  234. package/lib/module/shared/utils/bounds/helpers/geometry.js +3 -2
  235. package/lib/module/shared/utils/bounds/helpers/geometry.js.map +1 -1
  236. package/lib/module/shared/utils/bounds/helpers/interpolators.js +3 -2
  237. package/lib/module/shared/utils/bounds/helpers/interpolators.js.map +1 -1
  238. package/lib/module/shared/utils/bounds/helpers/link-accessor.js +2 -2
  239. package/lib/module/shared/utils/bounds/helpers/link-accessor.js.map +1 -1
  240. package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js +4 -8
  241. package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
  242. package/lib/module/shared/utils/bounds/helpers/style-composers.js +4 -3
  243. package/lib/module/shared/utils/bounds/helpers/style-composers.js.map +1 -1
  244. package/lib/module/shared/utils/bounds/index.js +13 -3
  245. package/lib/module/shared/utils/bounds/index.js.map +1 -1
  246. package/lib/module/shared/utils/bounds/types/frame-props.js +4 -0
  247. package/lib/module/shared/utils/bounds/types/frame-props.js.map +1 -0
  248. package/lib/module/shared/utils/bounds/zoom/accessor.js +49 -0
  249. package/lib/module/shared/utils/bounds/zoom/accessor.js.map +1 -0
  250. package/lib/module/shared/utils/bounds/zoom/build.js +543 -0
  251. package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -0
  252. package/lib/module/shared/utils/bounds/zoom/config.js +112 -0
  253. package/lib/module/shared/utils/bounds/zoom/config.js.map +1 -0
  254. package/lib/module/shared/utils/bounds/zoom/index.js +5 -0
  255. package/lib/module/shared/utils/bounds/zoom/index.js.map +1 -0
  256. package/lib/module/shared/utils/bounds/zoom/types.js.map +1 -0
  257. package/lib/module/shared/utils/gesture/validate-snap-points.js +11 -5
  258. package/lib/module/shared/utils/gesture/validate-snap-points.js.map +1 -1
  259. package/lib/module/shared/utils/overlay/visibility.js +1 -7
  260. package/lib/module/shared/utils/overlay/visibility.js.map +1 -1
  261. package/lib/module/shared/utils/resolve-screen-transition-options.js +19 -0
  262. package/lib/module/shared/utils/resolve-screen-transition-options.js.map +1 -0
  263. package/lib/typescript/blank-stack/index.d.ts +1 -1
  264. package/lib/typescript/blank-stack/index.d.ts.map +1 -1
  265. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +29 -4
  266. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
  267. package/lib/typescript/blank-stack/types.d.ts +33 -4
  268. package/lib/typescript/blank-stack/types.d.ts.map +1 -1
  269. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +8 -0
  270. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
  271. package/lib/typescript/shared/animation/snap-to.d.ts.map +1 -1
  272. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +81 -0
  273. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +1 -0
  274. package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +1 -1
  275. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts +2 -3
  276. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +1 -1
  277. package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts +11 -0
  278. package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts.map +1 -0
  279. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +2 -2
  280. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts.map +1 -1
  281. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts +11 -0
  282. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts.map +1 -0
  283. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts.map +1 -1
  284. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +1 -1
  285. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts +3 -3
  286. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts.map +1 -1
  287. package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts +2 -2
  288. package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts.map +1 -1
  289. package/lib/typescript/shared/components/create-boundary-component/index.d.ts +5 -3
  290. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  291. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +2 -4
  292. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
  293. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -1
  294. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +1 -1
  295. package/lib/typescript/shared/components/create-transition-aware-component.d.ts +1 -0
  296. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  297. package/lib/typescript/shared/components/native-screen-container.d.ts.map +1 -1
  298. package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
  299. package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts +1 -1
  300. package/lib/typescript/shared/components/overlay/index.d.ts +0 -2
  301. package/lib/typescript/shared/components/overlay/index.d.ts.map +1 -1
  302. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
  303. package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
  304. package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts +3 -0
  305. package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -0
  306. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  307. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  308. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +9 -0
  309. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -0
  310. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +1 -1
  311. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +1 -1
  312. package/lib/typescript/shared/constants.d.ts +3 -0
  313. package/lib/typescript/shared/constants.d.ts.map +1 -1
  314. package/lib/typescript/shared/hooks/gestures/resolve-screen-gesture-target.d.ts +10 -0
  315. package/lib/typescript/shared/hooks/gestures/resolve-screen-gesture-target.d.ts.map +1 -0
  316. package/lib/typescript/shared/hooks/gestures/types.d.ts +4 -0
  317. package/lib/typescript/shared/hooks/gestures/types.d.ts.map +1 -0
  318. package/lib/typescript/shared/hooks/gestures/use-screen-gesture.d.ts +4 -2
  319. package/lib/typescript/shared/hooks/gestures/use-screen-gesture.d.ts.map +1 -1
  320. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -2
  321. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
  322. package/lib/typescript/shared/index.d.ts +16 -18
  323. package/lib/typescript/shared/index.d.ts.map +1 -1
  324. package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts +1 -1
  325. package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
  326. package/lib/typescript/shared/providers/gestures/helpers/gesture-activation.d.ts.map +1 -1
  327. package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts +18 -0
  328. package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts.map +1 -0
  329. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +1 -1
  330. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +1 -1
  331. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +6 -3
  332. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
  333. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +0 -2
  334. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -1
  335. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  336. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts +11 -0
  337. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts.map +1 -0
  338. package/lib/typescript/shared/providers/screen/animation/index.d.ts +1 -1
  339. package/lib/typescript/shared/providers/screen/animation/index.d.ts.map +1 -1
  340. package/lib/typescript/shared/providers/screen/animation/types.d.ts +4 -0
  341. package/lib/typescript/shared/providers/screen/animation/types.d.ts.map +1 -0
  342. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts +5 -1
  343. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
  344. package/lib/typescript/shared/providers/stack/core.provider.d.ts +2 -0
  345. package/lib/typescript/shared/providers/stack/core.provider.d.ts.map +1 -1
  346. package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
  347. package/lib/typescript/shared/stores/animation.store.d.ts +8 -2
  348. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  349. package/lib/typescript/shared/stores/bounds/internals/presence.d.ts.map +1 -1
  350. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  351. package/lib/typescript/shared/stores/bounds/types.d.ts +2 -0
  352. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  353. package/lib/typescript/shared/types/animation.types.d.ts +33 -51
  354. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  355. package/lib/typescript/shared/types/bounds.types.d.ts +46 -9
  356. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  357. package/lib/typescript/shared/types/index.d.ts +3 -3
  358. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  359. package/lib/typescript/shared/types/overlay.types.d.ts +1 -22
  360. package/lib/typescript/shared/types/overlay.types.d.ts.map +1 -1
  361. package/lib/typescript/shared/types/screen.types.d.ts +62 -37
  362. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  363. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  364. package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts +2 -2
  365. package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts.map +1 -1
  366. package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -1
  367. package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts +3 -2
  368. package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts.map +1 -1
  369. package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts +3 -2
  370. package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts.map +1 -1
  371. package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts +3 -2
  372. package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts.map +1 -1
  373. package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts +2 -1
  374. package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts.map +1 -1
  375. package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts +4 -3
  376. package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +1 -1
  377. package/lib/typescript/shared/utils/bounds/index.d.ts +2 -2
  378. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  379. package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts +5 -0
  380. package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts.map +1 -0
  381. package/lib/typescript/shared/utils/bounds/types/options.d.ts +5 -4
  382. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  383. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +17 -0
  384. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +1 -0
  385. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +4 -0
  386. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -0
  387. package/lib/typescript/shared/utils/bounds/zoom/config.d.ts +43 -0
  388. package/lib/typescript/shared/utils/bounds/zoom/config.d.ts.map +1 -0
  389. package/lib/typescript/shared/utils/bounds/zoom/index.d.ts +3 -0
  390. package/lib/typescript/shared/utils/bounds/zoom/index.d.ts.map +1 -0
  391. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +17 -0
  392. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -0
  393. package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts +5 -3
  394. package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts.map +1 -1
  395. package/lib/typescript/shared/utils/overlay/visibility.d.ts +1 -4
  396. package/lib/typescript/shared/utils/overlay/visibility.d.ts.map +1 -1
  397. package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts +5 -0
  398. package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts.map +1 -0
  399. package/package.json +3 -2
  400. package/src/blank-stack/index.ts +1 -0
  401. package/src/blank-stack/navigators/create-blank-stack-navigator.tsx +138 -19
  402. package/src/blank-stack/types.ts +33 -5
  403. package/src/component-stack/navigators/create-component-stack-navigator.tsx +8 -0
  404. package/src/shared/animation/snap-to.ts +12 -1
  405. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +258 -0
  406. package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +7 -17
  407. package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +38 -28
  408. package/src/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.ts +58 -0
  409. package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +41 -10
  410. package/src/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.ts +82 -0
  411. package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +24 -12
  412. package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +11 -9
  413. package/src/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.ts +29 -26
  414. package/src/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.ts +26 -17
  415. package/src/shared/components/create-boundary-component/index.tsx +25 -6
  416. package/src/shared/components/create-boundary-component/types.ts +8 -4
  417. package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +2 -14
  418. package/src/shared/components/create-transition-aware-component.tsx +5 -2
  419. package/src/shared/components/native-screen-container.tsx +11 -3
  420. package/src/shared/components/native-screen.tsx +65 -20
  421. package/src/shared/components/overlay/helpers/get-active-overlay.ts +3 -3
  422. package/src/shared/components/overlay/index.ts +0 -2
  423. package/src/shared/components/overlay/variations/overlay-host.tsx +2 -16
  424. package/src/shared/components/scene-view.tsx +0 -3
  425. package/src/shared/components/screen-container/hooks/use-content-layout.ts +82 -0
  426. package/src/shared/components/screen-container/layers/backdrop.tsx +25 -6
  427. package/src/shared/components/screen-container/layers/content.tsx +23 -82
  428. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +101 -0
  429. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts +1 -2
  430. package/src/shared/components/screen-lifecycle/hooks/use-open-transition.ts +20 -6
  431. package/src/shared/constants.ts +6 -2
  432. package/src/shared/hooks/gestures/resolve-screen-gesture-target.ts +66 -0
  433. package/src/shared/hooks/gestures/types.ts +5 -0
  434. package/src/shared/hooks/gestures/use-screen-gesture.ts +10 -3
  435. package/src/shared/hooks/navigation/use-stack.tsx +1 -2
  436. package/src/shared/index.ts +14 -16
  437. package/src/shared/providers/gestures/handlers/use-handlers.ts +75 -29
  438. package/src/shared/providers/gestures/helpers/gesture-activation.ts +11 -6
  439. package/src/shared/providers/gestures/helpers/gesture-snap-points.ts +72 -0
  440. package/src/shared/providers/layout-anchor.provider.tsx +2 -5
  441. package/src/shared/providers/register-bounds.provider.tsx +1 -1
  442. package/src/shared/providers/screen/animation/animation.provider.tsx +46 -10
  443. package/src/shared/providers/screen/animation/helpers/derivations.ts +0 -8
  444. package/src/shared/providers/screen/animation/helpers/pipeline.ts +51 -14
  445. package/src/shared/providers/screen/animation/helpers/resolve-screen-animation-target.ts +44 -0
  446. package/src/shared/providers/screen/animation/index.tsx +4 -1
  447. package/src/shared/providers/screen/animation/types.ts +5 -0
  448. package/src/shared/providers/screen/animation/use-screen-animation.tsx +16 -3
  449. package/src/shared/providers/stack/core.provider.tsx +27 -14
  450. package/src/shared/providers/stack/direct.provider.tsx +2 -5
  451. package/src/shared/providers/stack/helpers/use-processed-routes.ts +2 -2
  452. package/src/shared/stores/animation.store.ts +21 -5
  453. package/src/shared/stores/bounds/internals/presence.ts +3 -1
  454. package/src/shared/stores/bounds/internals/resolver.ts +13 -1
  455. package/src/shared/stores/bounds/types.ts +2 -0
  456. package/src/shared/types/animation.types.ts +32 -58
  457. package/src/shared/types/bounds.types.ts +30 -10
  458. package/src/shared/types/index.ts +2 -15
  459. package/src/shared/types/overlay.types.ts +1 -28
  460. package/src/shared/types/screen.types.ts +67 -38
  461. package/src/shared/utils/animation/animate-to-progress.ts +7 -0
  462. package/src/shared/utils/bounds/helpers/build-bounds-options.ts +2 -2
  463. package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +47 -8
  464. package/src/shared/utils/bounds/helpers/geometry.ts +3 -2
  465. package/src/shared/utils/bounds/helpers/interpolators.ts +8 -6
  466. package/src/shared/utils/bounds/helpers/link-accessor.ts +10 -6
  467. package/src/shared/utils/bounds/helpers/resolve-bound-tag.ts +7 -10
  468. package/src/shared/utils/bounds/helpers/style-composers.ts +4 -3
  469. package/src/shared/utils/bounds/index.ts +22 -13
  470. package/src/shared/utils/bounds/types/frame-props.ts +5 -0
  471. package/src/shared/utils/bounds/types/options.ts +6 -4
  472. package/src/shared/utils/bounds/zoom/accessor.ts +69 -0
  473. package/src/shared/utils/bounds/zoom/build.ts +715 -0
  474. package/src/shared/utils/bounds/zoom/config.ts +179 -0
  475. package/src/shared/utils/bounds/zoom/index.ts +2 -0
  476. package/src/shared/utils/bounds/zoom/types.ts +22 -0
  477. package/src/shared/utils/gesture/validate-snap-points.ts +20 -8
  478. package/src/shared/utils/overlay/visibility.ts +1 -16
  479. package/src/shared/utils/resolve-screen-transition-options.ts +37 -0
  480. package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js +0 -64
  481. package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js.map +0 -1
  482. package/lib/commonjs/shared/providers/viewport.provider.js +0 -33
  483. package/lib/commonjs/shared/providers/viewport.provider.js.map +0 -1
  484. package/lib/commonjs/shared/utils/bounds/helpers/math.js +0 -132
  485. package/lib/commonjs/shared/utils/bounds/helpers/math.js.map +0 -1
  486. package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js +0 -45
  487. package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js.map +0 -1
  488. package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js +0 -60
  489. package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js.map +0 -1
  490. package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js +0 -20
  491. package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js.map +0 -1
  492. package/lib/commonjs/shared/utils/bounds/sugar/navigation/types.js.map +0 -1
  493. package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js +0 -295
  494. package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js.map +0 -1
  495. package/lib/module/shared/components/overlay/variations/screen-overlay.js +0 -61
  496. package/lib/module/shared/components/overlay/variations/screen-overlay.js.map +0 -1
  497. package/lib/module/shared/providers/viewport.provider.js +0 -27
  498. package/lib/module/shared/providers/viewport.provider.js.map +0 -1
  499. package/lib/module/shared/utils/bounds/helpers/math.js +0 -115
  500. package/lib/module/shared/utils/bounds/helpers/math.js.map +0 -1
  501. package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js +0 -40
  502. package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js.map +0 -1
  503. package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js +0 -54
  504. package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js.map +0 -1
  505. package/lib/module/shared/utils/bounds/sugar/navigation/index.js +0 -15
  506. package/lib/module/shared/utils/bounds/sugar/navigation/index.js.map +0 -1
  507. package/lib/module/shared/utils/bounds/sugar/navigation/types.js.map +0 -1
  508. package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js +0 -290
  509. package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js.map +0 -1
  510. package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts +0 -10
  511. package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts.map +0 -1
  512. package/lib/typescript/shared/providers/viewport.provider.d.ts +0 -13
  513. package/lib/typescript/shared/providers/viewport.provider.d.ts.map +0 -1
  514. package/lib/typescript/shared/utils/bounds/helpers/math.d.ts +0 -38
  515. package/lib/typescript/shared/utils/bounds/helpers/math.d.ts.map +0 -1
  516. package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts +0 -16
  517. package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts.map +0 -1
  518. package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts +0 -17
  519. package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts.map +0 -1
  520. package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts +0 -3
  521. package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts.map +0 -1
  522. package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts +0 -18
  523. package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts.map +0 -1
  524. package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts +0 -4
  525. package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts.map +0 -1
  526. package/src/shared/components/overlay/variations/screen-overlay.tsx +0 -68
  527. package/src/shared/providers/viewport.provider.tsx +0 -39
  528. package/src/shared/utils/bounds/helpers/math.ts +0 -161
  529. package/src/shared/utils/bounds/helpers/navigation-accessor.ts +0 -61
  530. package/src/shared/utils/bounds/sugar/navigation/helpers.ts +0 -74
  531. package/src/shared/utils/bounds/sugar/navigation/index.ts +0 -14
  532. package/src/shared/utils/bounds/sugar/navigation/types.ts +0 -26
  533. package/src/shared/utils/bounds/sugar/navigation/zoom.ts +0 -348
  534. /package/lib/commonjs/shared/utils/bounds/{sugar/navigation → zoom}/types.js +0 -0
  535. /package/lib/module/shared/utils/bounds/{sugar/navigation → zoom}/types.js +0 -0
@@ -0,0 +1,179 @@
1
+ import { BoundStore } from "../../../stores/bounds";
2
+ import type { BoundsNavigationZoomOptions } from "../../../types/bounds.types";
3
+ import type { BoundId, BoundsOptions } from "../types/options";
4
+ import type { ResolveTag } from "./types";
5
+
6
+ const DEFAULT_DRAG_RESISTANCE = 0.4;
7
+ const DEFAULT_DRAG_DIRECTIONAL_SCALE_MIN = 0.25;
8
+ const DEFAULT_DRAG_DIRECTIONAL_SCALE_MAX = 1.06;
9
+
10
+ type ZoomMask = NonNullable<BoundsNavigationZoomOptions["mask"]>;
11
+ type ZoomRadiusValue = Exclude<ZoomMask["borderRadius"], undefined>;
12
+ type ZoomEdgeInsets = ZoomMask["outset"];
13
+
14
+ const DEFAULT_MASK_BORDER_RADIUS: ZoomRadiusValue = 12;
15
+
16
+ const ZERO_OUTSET = Object.freeze({
17
+ top: 0,
18
+ right: 0,
19
+ bottom: 0,
20
+ left: 0,
21
+ });
22
+
23
+ type ResolvedZoomOutset = {
24
+ top: number;
25
+ right: number;
26
+ bottom: number;
27
+ left: number;
28
+ };
29
+
30
+ export type ResolvedZoomOptions = {
31
+ mask: {
32
+ borderRadius: ZoomRadiusValue;
33
+ borderTopLeftRadius?: ZoomRadiusValue;
34
+ borderTopRightRadius?: ZoomRadiusValue;
35
+ borderBottomLeftRadius?: ZoomRadiusValue;
36
+ borderBottomRightRadius?: ZoomRadiusValue;
37
+ borderCurve?: "circular" | "continuous";
38
+ outset: ResolvedZoomOutset;
39
+ };
40
+ motion: {
41
+ dragResistance: number;
42
+ dragDirectionalScaleMin: number;
43
+ dragDirectionalScaleMax: number;
44
+ };
45
+ };
46
+
47
+ export const toNumber = (value: unknown, fallback = 0): number => {
48
+ "worklet";
49
+ return typeof value === "number" ? value : fallback;
50
+ };
51
+
52
+ const isFiniteNumber = (value: unknown): value is number => {
53
+ "worklet";
54
+ return typeof value === "number" && Number.isFinite(value);
55
+ };
56
+
57
+ const normalizeOutset = (value?: ZoomEdgeInsets): ResolvedZoomOutset => {
58
+ "worklet";
59
+ if (typeof value === "number") {
60
+ return {
61
+ top: value,
62
+ right: value,
63
+ bottom: value,
64
+ left: value,
65
+ };
66
+ }
67
+
68
+ if (!value) {
69
+ return ZERO_OUTSET;
70
+ }
71
+
72
+ return {
73
+ top: isFiniteNumber(value.top) ? value.top : 0,
74
+ right: isFiniteNumber(value.right) ? value.right : 0,
75
+ bottom: isFiniteNumber(value.bottom) ? value.bottom : 0,
76
+ left: isFiniteNumber(value.left) ? value.left : 0,
77
+ };
78
+ };
79
+
80
+ const normalizeZoomOptions = (
81
+ zoomOptions?: BoundsNavigationZoomOptions,
82
+ ): ResolvedZoomOptions => {
83
+ "worklet";
84
+
85
+ const resolvedMaskRadius =
86
+ zoomOptions?.mask?.borderRadius ??
87
+ (isFiniteNumber(zoomOptions?.maskBorderRadius)
88
+ ? zoomOptions?.maskBorderRadius
89
+ : DEFAULT_MASK_BORDER_RADIUS);
90
+
91
+ return {
92
+ mask: {
93
+ borderRadius: resolvedMaskRadius,
94
+ borderTopLeftRadius: zoomOptions?.mask?.borderTopLeftRadius,
95
+ borderTopRightRadius: zoomOptions?.mask?.borderTopRightRadius,
96
+ borderBottomLeftRadius: zoomOptions?.mask?.borderBottomLeftRadius,
97
+ borderBottomRightRadius: zoomOptions?.mask?.borderBottomRightRadius,
98
+ borderCurve: zoomOptions?.mask?.borderCurve,
99
+ outset: normalizeOutset(zoomOptions?.mask?.outset),
100
+ },
101
+ motion: {
102
+ dragResistance: isFiniteNumber(zoomOptions?.motion?.dragResistance)
103
+ ? zoomOptions.motion.dragResistance
104
+ : DEFAULT_DRAG_RESISTANCE,
105
+ dragDirectionalScaleMin: isFiniteNumber(
106
+ zoomOptions?.motion?.dragDirectionalScaleMin,
107
+ )
108
+ ? zoomOptions.motion.dragDirectionalScaleMin
109
+ : DEFAULT_DRAG_DIRECTIONAL_SCALE_MIN,
110
+ dragDirectionalScaleMax: DEFAULT_DRAG_DIRECTIONAL_SCALE_MAX,
111
+ },
112
+ };
113
+ };
114
+
115
+ export const resolveZoomConfig = ({
116
+ id,
117
+ group,
118
+ zoomOptions,
119
+ currentRouteKey,
120
+ resolveTag,
121
+ defaultAnchor,
122
+ }: {
123
+ id: BoundId;
124
+ group?: string;
125
+ zoomOptions?: BoundsNavigationZoomOptions;
126
+ currentRouteKey?: string;
127
+ resolveTag: ResolveTag;
128
+ defaultAnchor: BoundsOptions["anchor"] | undefined;
129
+ }): {
130
+ resolvedTag: string;
131
+ sharedOptions: Partial<BoundsOptions>;
132
+ explicitTarget: BoundsOptions["target"] | undefined;
133
+ zoomOptions: ResolvedZoomOptions;
134
+ } | null => {
135
+ "worklet";
136
+ const resolvedTag = resolveTag({ id, group });
137
+ if (!resolvedTag) return null;
138
+
139
+ // Try direct boundary config for the current screen first.
140
+ const boundaryConfig = currentRouteKey
141
+ ? BoundStore.getBoundaryConfig(resolvedTag, currentRouteKey)
142
+ : null;
143
+
144
+ // Fallback: when the current screen has no Boundary (e.g. a zoom detail
145
+ // screen without a destination element), inherit config from the link's
146
+ // source screen so that props like scaleMode propagate to both sides.
147
+ let effectiveConfig = boundaryConfig;
148
+ if (!effectiveConfig) {
149
+ // For no-destination navigation zoom, the focused route won't appear in
150
+ // a completed link yet. Fall back to the latest unscoped link so source
151
+ // boundary defaults (anchor/scaleMode/target) still propagate.
152
+ const scopedLink = currentRouteKey
153
+ ? BoundStore.getActiveLink(resolvedTag, currentRouteKey)
154
+ : null;
155
+ const link = scopedLink ?? BoundStore.getActiveLink(resolvedTag);
156
+ if (link?.source) {
157
+ effectiveConfig = BoundStore.getBoundaryConfig(
158
+ resolvedTag,
159
+ link.source.screenKey,
160
+ );
161
+ }
162
+ }
163
+
164
+ const sharedOptions: Partial<BoundsOptions> = {
165
+ anchor: zoomOptions?.anchor ?? effectiveConfig?.anchor ?? defaultAnchor,
166
+ scaleMode:
167
+ zoomOptions?.scaleMode ?? effectiveConfig?.scaleMode ?? "uniform",
168
+ };
169
+
170
+ const explicitTarget = zoomOptions?.target ?? effectiveConfig?.target;
171
+ const resolvedZoomOptions = normalizeZoomOptions(zoomOptions);
172
+
173
+ return {
174
+ resolvedTag,
175
+ sharedOptions,
176
+ explicitTarget,
177
+ zoomOptions: resolvedZoomOptions,
178
+ };
179
+ };
@@ -0,0 +1,2 @@
1
+ export { createZoomAccessor } from "./accessor";
2
+ export { buildZoomStyles } from "./build";
@@ -0,0 +1,22 @@
1
+ import type { BoundsNavigationZoomOptions } from "../../../types/bounds.types";
2
+ import type { BoundsFrameProps } from "../types/frame-props";
3
+ import type { BoundId, BoundsOptions } from "../types/options";
4
+
5
+ export type ResolveTag = (params: {
6
+ id?: BoundId;
7
+ group?: string;
8
+ }) => string | undefined;
9
+
10
+ export type ComputeRaw = (
11
+ overrides: Partial<BoundsOptions>,
12
+ frameProps?: BoundsFrameProps,
13
+ ) => Record<string, unknown>;
14
+
15
+ export type BuildZoomStylesParams = {
16
+ id: BoundId;
17
+ group?: string;
18
+ zoomOptions?: BoundsNavigationZoomOptions;
19
+ props: BoundsFrameProps;
20
+ resolveTag: ResolveTag;
21
+ computeRaw: ComputeRaw;
22
+ };
@@ -1,26 +1,33 @@
1
+ import type { SnapPoint } from "../../types/screen.types";
2
+
1
3
  /**
2
- * Filters snap points to only valid, finite values.
4
+ * Filters snap points to only valid, finite numeric values.
3
5
  * Excludes zero (dismiss) when canDismiss is false.
4
6
  */
5
7
  export function sanitizeSnapPoints(
6
- snapPoints: number[],
8
+ snapPoints: SnapPoint[],
7
9
  canDismiss: boolean,
8
10
  ): number[] {
9
11
  "worklet";
10
- return snapPoints.filter((point) =>
11
- canDismiss ? Number.isFinite(point) : Number.isFinite(point) && point > 0,
12
+ return snapPoints.filter(
13
+ (point): point is number =>
14
+ typeof point === "number" &&
15
+ (canDismiss
16
+ ? Number.isFinite(point)
17
+ : Number.isFinite(point) && point > 0),
12
18
  );
13
19
  }
14
20
 
15
21
  export interface EffectiveSnapPointsResult {
16
22
  hasSnapPoints: boolean;
23
+ hasAutoSnapPoint: boolean;
17
24
  snapPoints: number[];
18
25
  minSnapPoint: number;
19
26
  maxSnapPoint: number;
20
27
  }
21
28
 
22
29
  interface ValidateSnapPointsOptions {
23
- snapPoints?: number[];
30
+ snapPoints?: SnapPoint[];
24
31
  canDismiss?: boolean;
25
32
  }
26
33
 
@@ -31,17 +38,21 @@ export const validateSnapPoints = ({
31
38
  if (!snapPoints || snapPoints.length === 0) {
32
39
  return {
33
40
  hasSnapPoints: false,
41
+ hasAutoSnapPoint: false,
34
42
  snapPoints: [],
35
43
  minSnapPoint: -1,
36
44
  maxSnapPoint: -1,
37
45
  };
38
46
  }
39
47
 
48
+ const hasAuto = snapPoints.includes("auto");
40
49
  const normalizedSnaps = sanitizeSnapPoints(snapPoints, canDismiss ?? false);
41
50
 
42
- if (normalizedSnaps.length === 0) {
51
+ // hasSnapPoints is true if there are valid numeric points OR an 'auto' point
52
+ if (normalizedSnaps.length === 0 && !hasAuto) {
43
53
  return {
44
54
  hasSnapPoints: false,
55
+ hasAutoSnapPoint: false,
45
56
  snapPoints: [],
46
57
  minSnapPoint: -1,
47
58
  maxSnapPoint: -1,
@@ -50,11 +61,12 @@ export const validateSnapPoints = ({
50
61
 
51
62
  const sortedSnaps = normalizedSnaps.slice().sort((a, b) => a - b);
52
63
  // Clamp to snap point bounds (dismiss at 0 only if allowed)
53
- const minProgress = canDismiss ? 0 : sortedSnaps[0];
54
- const maxProgress = sortedSnaps[sortedSnaps.length - 1];
64
+ const minProgress = canDismiss ? 0 : (sortedSnaps[0] ?? -1);
65
+ const maxProgress = sortedSnaps[sortedSnaps.length - 1] ?? -1;
55
66
 
56
67
  return {
57
68
  hasSnapPoints: true,
69
+ hasAutoSnapPoint: hasAuto,
58
70
  snapPoints: sortedSnaps,
59
71
  minSnapPoint: minProgress,
60
72
  maxSnapPoint: maxProgress,
@@ -1,23 +1,8 @@
1
- import type { OverlayMode } from "../../types/overlay.types";
2
-
3
1
  type OverlayOptionsLike = {
4
2
  overlay?: unknown;
5
- overlayMode?: OverlayMode;
6
3
  overlayShown?: boolean;
7
4
  };
8
5
 
9
- const isOverlayVisible = (options?: OverlayOptionsLike): boolean => {
6
+ export const isOverlayVisible = (options?: OverlayOptionsLike): boolean => {
10
7
  return Boolean(options?.overlay) && options?.overlayShown !== false;
11
8
  };
12
-
13
- export const isFloatOverlayVisible = (
14
- options?: OverlayOptionsLike,
15
- ): boolean => {
16
- return isOverlayVisible(options) && options?.overlayMode !== "screen";
17
- };
18
-
19
- export const isScreenOverlayVisible = (
20
- options?: OverlayOptionsLike,
21
- ): boolean => {
22
- return isOverlayVisible(options) && options?.overlayMode === "screen";
23
- };
@@ -0,0 +1,37 @@
1
+ import type {
2
+ ScreenTransitionConfig,
3
+ SheetScrollGestureBehavior,
4
+ } from "../types/screen.types";
5
+
6
+ export const DEFAULT_SHEET_SCROLL_GESTURE_BEHAVIOR: SheetScrollGestureBehavior =
7
+ "expand-and-collapse";
8
+
9
+ export const resolveSheetScrollGestureBehavior = (
10
+ options: Pick<
11
+ ScreenTransitionConfig,
12
+ "sheetScrollGestureBehavior" | "expandViaScrollView"
13
+ >,
14
+ ): SheetScrollGestureBehavior => {
15
+ const explicitBehavior = options.sheetScrollGestureBehavior;
16
+ if (explicitBehavior) return explicitBehavior;
17
+
18
+ const legacyBehavior = options.expandViaScrollView;
19
+ if (legacyBehavior !== undefined) {
20
+ return legacyBehavior ? "expand-and-collapse" : "collapse-only";
21
+ }
22
+
23
+ return DEFAULT_SHEET_SCROLL_GESTURE_BEHAVIOR;
24
+ };
25
+
26
+ export const resolveNavigationMaskEnabled = (
27
+ options: Pick<
28
+ ScreenTransitionConfig,
29
+ "navigationMaskEnabled" | "maskEnabled"
30
+ >,
31
+ ): boolean => {
32
+ if (options.navigationMaskEnabled !== undefined) {
33
+ return options.navigationMaskEnabled;
34
+ }
35
+
36
+ return options.maskEnabled ?? false;
37
+ };
@@ -1,64 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ScreenOverlay = ScreenOverlay;
7
- var _react = require("react");
8
- var _snapTo = require("../../../animation/snap-to");
9
- var _useOptimisticFocusedIndex = require("../../../hooks/navigation/use-optimistic-focused-index");
10
- var _useStack = require("../../../hooks/navigation/use-stack");
11
- var _descriptors = require("../../../providers/screen/descriptors");
12
- var _visibility = require("../../../utils/overlay/visibility");
13
- var _overlayHost = require("./overlay-host");
14
- var _jsxRuntime = require("react/jsx-runtime");
15
- /**
16
- * Screen overlay component that renders per-screen.
17
- * Gets current descriptor from keys context.
18
- *
19
- * @deprecated Screen overlays are deprecated. For per-screen overlays, render an
20
- * absolute-positioned view directly in your screen component and use `useScreenAnimation()`
21
- * to access animation values. This component will be removed in a future version.
22
- */
23
- function ScreenOverlay() {
24
- const {
25
- current
26
- } = (0, _descriptors.useDescriptors)();
27
- const {
28
- flags,
29
- routes,
30
- optimisticFocusedIndex,
31
- routeKeys
32
- } = (0, _useStack.useStack)();
33
- const focusedIndex = (0, _useOptimisticFocusedIndex.useOptimisticFocusedIndex)(optimisticFocusedIndex, routeKeys.length);
34
- const options = current.options;
35
- const scene = (0, _react.useMemo)(() => ({
36
- descriptor: current,
37
- route: current.route
38
- }), [current]);
39
- const overlayScreenState = (0, _react.useMemo)(() => ({
40
- index: routeKeys.indexOf(current.route.key),
41
- options: current.options,
42
- routes,
43
- focusedRoute: routes[focusedIndex] ?? current.route,
44
- focusedIndex,
45
- meta: current.options?.meta,
46
- navigation: current.navigation,
47
- snapTo: index => {
48
- (0, _snapTo.snapDescriptorToIndex)(current, index);
49
- }
50
- }), [current, routeKeys, routes, focusedIndex]);
51
-
52
- // Skip screens without enableTransitions (native-stack only)
53
- if (!flags.TRANSITIONS_ALWAYS_ON && !options.enableTransitions) {
54
- return null;
55
- }
56
- if (!(0, _visibility.isScreenOverlayVisible)(options)) {
57
- return null;
58
- }
59
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_overlayHost.OverlayHost, {
60
- scene: scene,
61
- overlayScreenState: overlayScreenState
62
- });
63
- }
64
- //# sourceMappingURL=screen-overlay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_snapTo","_useOptimisticFocusedIndex","_useStack","_descriptors","_visibility","_overlayHost","_jsxRuntime","ScreenOverlay","current","useDescriptors","flags","routes","optimisticFocusedIndex","routeKeys","useStack","focusedIndex","useOptimisticFocusedIndex","length","options","scene","useMemo","descriptor","route","overlayScreenState","index","indexOf","key","focusedRoute","meta","navigation","snapTo","snapDescriptorToIndex","TRANSITIONS_ALWAYS_ON","enableTransitions","isScreenOverlayVisible","jsx","OverlayHost"],"sourceRoot":"../../../../../../src","sources":["shared/components/overlay/variations/screen-overlay.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAA6C,IAAAO,WAAA,GAAAP,OAAA;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASQ,aAAaA,CAAA,EAAG;EAC/B,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,2BAAc,EAAkB,CAAC;EACrD,MAAM;IAAEC,KAAK;IAAEC,MAAM;IAAEC,sBAAsB;IAAEC;EAAU,CAAC,GAAG,IAAAC,kBAAQ,EAAC,CAAC;EACvE,MAAMC,YAAY,GAAG,IAAAC,oDAAyB,EAC7CJ,sBAAsB,EACtBC,SAAS,CAACI,MACX,CAAC;EAED,MAAMC,OAAO,GAAGV,OAAO,CAACU,OAAO;EAE/B,MAAMC,KAAK,GAAG,IAAAC,cAAO,EACpB,OAAO;IACNC,UAAU,EAAEb,OAAO;IACnBc,KAAK,EAAEd,OAAO,CAACc;EAChB,CAAC,CAAC,EACF,CAACd,OAAO,CACT,CAAC;EAED,MAAMe,kBAAkB,GAAG,IAAAH,cAAO,EAGjC,OAAO;IACNI,KAAK,EAAEX,SAAS,CAACY,OAAO,CAACjB,OAAO,CAACc,KAAK,CAACI,GAAG,CAAC;IAC3CR,OAAO,EAAEV,OAAO,CAACU,OAAO;IACxBP,MAAM;IACNgB,YAAY,EAAEhB,MAAM,CAACI,YAAY,CAAC,IAAIP,OAAO,CAACc,KAAK;IACnDP,YAAY;IACZa,IAAI,EAAEpB,OAAO,CAACU,OAAO,EAAEU,IAAI;IAC3BC,UAAU,EAAErB,OAAO,CAACqB,UAAU;IAC9BC,MAAM,EAAGN,KAAa,IAAK;MAC1B,IAAAO,6BAAqB,EAACvB,OAAO,EAAEgB,KAAK,CAAC;IACtC;EACD,CAAC,CAAC,EACF,CAAChB,OAAO,EAAEK,SAAS,EAAEF,MAAM,EAAEI,YAAY,CAC1C,CAAC;;EAED;EACA,IAAI,CAACL,KAAK,CAACsB,qBAAqB,IAAI,CAACd,OAAO,CAACe,iBAAiB,EAAE;IAC/D,OAAO,IAAI;EACZ;EAEA,IAAI,CAAC,IAAAC,kCAAsB,EAAChB,OAAO,CAAC,EAAE;IACrC,OAAO,IAAI;EACZ;EAEA,oBAAO,IAAAZ,WAAA,CAAA6B,GAAA,EAAC9B,YAAA,CAAA+B,WAAW;IAACjB,KAAK,EAAEA,KAAM;IAACI,kBAAkB,EAAEA;EAAmB,CAAE,CAAC;AAC7E","ignoreList":[]}
@@ -1,33 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useViewportContext = exports.ViewportProvider = void 0;
7
- var _react = require("react");
8
- var _reactNative = require("react-native");
9
- var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
10
- var _createProvider = _interopRequireDefault(require("../utils/create-provider"));
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- const {
13
- ViewportProvider,
14
- useViewportContext
15
- } = (0, _createProvider.default)("Viewport", {
16
- guarded: true
17
- })(({
18
- children
19
- }) => {
20
- const dimensions = (0, _reactNative.useWindowDimensions)();
21
- const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
22
- const value = (0, _react.useMemo)(() => ({
23
- dimensions,
24
- insets
25
- }), [dimensions, insets]);
26
- return {
27
- value,
28
- children
29
- };
30
- });
31
- exports.useViewportContext = useViewportContext;
32
- exports.ViewportProvider = ViewportProvider;
33
- //# sourceMappingURL=viewport.provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reactNativeSafeAreaContext","_createProvider","_interopRequireDefault","e","__esModule","default","ViewportProvider","useViewportContext","createProvider","guarded","children","dimensions","useWindowDimensions","insets","useSafeAreaInsets","value","useMemo","exports"],"sourceRoot":"../../../../src","sources":["shared/providers/viewport.provider.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAIA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAsD,SAAAI,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAWtD,MAAM;EAAEG,gBAAgB;EAAEC;AAAmB,CAAC,GAAG,IAAAC,uBAAc,EAAC,UAAU,EAAE;EAC3EC,OAAO,EAAE;AACV,CAAC,CAAC,CAA8C,CAAC;EAAEC;AAAS,CAAC,KAAK;EACjE,MAAMC,UAAU,GAAG,IAAAC,gCAAmB,EAAC,CAAC;EACxC,MAAMC,MAAM,GAAG,IAAAC,6CAAiB,EAAC,CAAC;EAElC,MAAMC,KAAK,GAAG,IAAAC,cAAO,EACpB,OAAO;IACNL,UAAU;IACVE;EACD,CAAC,CAAC,EACF,CAACF,UAAU,EAAEE,MAAM,CACpB,CAAC;EAED,OAAO;IACNE,KAAK;IACLL;EACD,CAAC;AACF,CAAC,CAAC;AAACO,OAAA,CAAAV,kBAAA,GAAAA,kBAAA;AAAAU,OAAA,CAAAX,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -1,132 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.safeDivide = exports.normalizedToTranslation = exports.normalizedToScale = exports.mapRangeClamped = exports.lerp = exports.inverseLerp = exports.computeCenterScaleShift = exports.composeCompensatedTranslation = exports.compensateTranslationForParentScale = exports.combineScales = exports.clamp01 = exports.clamp = exports.applyPowerCurve = void 0;
7
- const clamp = (value, min, max) => {
8
- "worklet";
9
-
10
- const lower = min < max ? min : max;
11
- const upper = max > min ? max : min;
12
- if (value < lower) return lower;
13
- if (value > upper) return upper;
14
- return value;
15
- };
16
- exports.clamp = clamp;
17
- const clamp01 = value => {
18
- "worklet";
19
-
20
- return clamp(value, 0, 1);
21
- };
22
- exports.clamp01 = clamp01;
23
- const lerp = (from, to, t) => {
24
- "worklet";
25
-
26
- return from + (to - from) * t;
27
- };
28
- exports.lerp = lerp;
29
- const safeDivide = (numerator, denominator, fallback = 0) => {
30
- "worklet";
31
-
32
- if (denominator === 0) return fallback;
33
- return numerator / denominator;
34
- };
35
- exports.safeDivide = safeDivide;
36
- const inverseLerp = (value, inMin, inMax) => {
37
- "worklet";
38
-
39
- return safeDivide(value - inMin, inMax - inMin, 0);
40
- };
41
- exports.inverseLerp = inverseLerp;
42
- const mapRangeClamped = (value, inMin, inMax, outMin, outMax) => {
43
- "worklet";
44
-
45
- const t = clamp01(inverseLerp(value, inMin, inMax));
46
- return lerp(outMin, outMax, t);
47
- };
48
- exports.mapRangeClamped = mapRangeClamped;
49
- const applyPowerCurve = (value, exponent) => {
50
- "worklet";
51
-
52
- const safeExponent = exponent > 0 ? exponent : 1;
53
- const magnitude = Math.abs(value) ** safeExponent;
54
- return value < 0 ? -magnitude : magnitude;
55
- };
56
- exports.applyPowerCurve = applyPowerCurve;
57
- const normalizedToTranslation = ({
58
- normalized,
59
- dimension,
60
- resistance
61
- }) => {
62
- "worklet";
63
-
64
- const distance = Math.max(0, dimension) * resistance;
65
- return mapRangeClamped(normalized, -1, 1, -distance, distance);
66
- };
67
- exports.normalizedToTranslation = normalizedToTranslation;
68
- const normalizedToScale = ({
69
- normalized,
70
- outputRange,
71
- exponent = 1,
72
- positiveOnly = true
73
- }) => {
74
- "worklet";
75
-
76
- const [outputStart, outputEnd] = outputRange;
77
- const raw = positiveOnly ? mapRangeClamped(normalized, 0, 1, outputStart, outputEnd) : mapRangeClamped(normalized, -1, 1, outputStart, outputEnd);
78
- return applyPowerCurve(raw, exponent);
79
- };
80
- exports.normalizedToScale = normalizedToScale;
81
- const combineScales = (scaleX, scaleY, mode = "multiply") => {
82
- "worklet";
83
-
84
- switch (mode) {
85
- case "average":
86
- return (scaleX + scaleY) / 2;
87
- case "max":
88
- return Math.max(scaleX, scaleY);
89
- case "min":
90
- return Math.min(scaleX, scaleY);
91
- default:
92
- return scaleX * scaleY;
93
- }
94
- };
95
- exports.combineScales = combineScales;
96
- const computeCenterScaleShift = ({
97
- center,
98
- containerCenter,
99
- scale
100
- }) => {
101
- "worklet";
102
-
103
- return (center - containerCenter) * (scale - 1);
104
- };
105
- exports.computeCenterScaleShift = computeCenterScaleShift;
106
- const compensateTranslationForParentScale = ({
107
- translation,
108
- parentScale,
109
- epsilon
110
- }) => {
111
- "worklet";
112
-
113
- const safeParentScale = Math.max(parentScale, epsilon);
114
- return safeDivide(translation, safeParentScale, translation);
115
- };
116
- exports.compensateTranslationForParentScale = compensateTranslationForParentScale;
117
- const composeCompensatedTranslation = ({
118
- gesture,
119
- parentScale,
120
- centerShift = 0,
121
- epsilon
122
- }) => {
123
- "worklet";
124
-
125
- return compensateTranslationForParentScale({
126
- translation: gesture,
127
- parentScale,
128
- epsilon
129
- }) + centerShift;
130
- };
131
- exports.composeCompensatedTranslation = composeCompensatedTranslation;
132
- //# sourceMappingURL=math.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["clamp","value","min","max","lower","upper","exports","clamp01","lerp","from","to","t","safeDivide","numerator","denominator","fallback","inverseLerp","inMin","inMax","mapRangeClamped","outMin","outMax","applyPowerCurve","exponent","safeExponent","magnitude","Math","abs","normalizedToTranslation","normalized","dimension","resistance","distance","normalizedToScale","outputRange","positiveOnly","outputStart","outputEnd","raw","combineScales","scaleX","scaleY","mode","computeCenterScaleShift","center","containerCenter","scale","compensateTranslationForParentScale","translation","parentScale","epsilon","safeParentScale","composeCompensatedTranslation","gesture","centerShift"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/helpers/math.ts"],"mappings":";;;;;;AAEO,MAAMA,KAAK,GAAGA,CAACC,KAAa,EAAEC,GAAW,EAAEC,GAAW,KAAa;EACzE,SAAS;;EACT,MAAMC,KAAK,GAAGF,GAAG,GAAGC,GAAG,GAAGD,GAAG,GAAGC,GAAG;EACnC,MAAME,KAAK,GAAGF,GAAG,GAAGD,GAAG,GAAGC,GAAG,GAAGD,GAAG;EAEnC,IAAID,KAAK,GAAGG,KAAK,EAAE,OAAOA,KAAK;EAC/B,IAAIH,KAAK,GAAGI,KAAK,EAAE,OAAOA,KAAK;EAE/B,OAAOJ,KAAK;AACb,CAAC;AAACK,OAAA,CAAAN,KAAA,GAAAA,KAAA;AAEK,MAAMO,OAAO,GAAIN,KAAa,IAAa;EACjD,SAAS;;EACT,OAAOD,KAAK,CAACC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;AAC1B,CAAC;AAACK,OAAA,CAAAC,OAAA,GAAAA,OAAA;AAEK,MAAMC,IAAI,GAAGA,CAACC,IAAY,EAAEC,EAAU,EAAEC,CAAS,KAAa;EACpE,SAAS;;EACT,OAAOF,IAAI,GAAG,CAACC,EAAE,GAAGD,IAAI,IAAIE,CAAC;AAC9B,CAAC;AAACL,OAAA,CAAAE,IAAA,GAAAA,IAAA;AAEK,MAAMI,UAAU,GAAGA,CACzBC,SAAiB,EACjBC,WAAmB,EACnBC,QAAQ,GAAG,CAAC,KACA;EACZ,SAAS;;EACT,IAAID,WAAW,KAAK,CAAC,EAAE,OAAOC,QAAQ;EACtC,OAAOF,SAAS,GAAGC,WAAW;AAC/B,CAAC;AAACR,OAAA,CAAAM,UAAA,GAAAA,UAAA;AAEK,MAAMI,WAAW,GAAGA,CAC1Bf,KAAa,EACbgB,KAAa,EACbC,KAAa,KACD;EACZ,SAAS;;EACT,OAAON,UAAU,CAACX,KAAK,GAAGgB,KAAK,EAAEC,KAAK,GAAGD,KAAK,EAAE,CAAC,CAAC;AACnD,CAAC;AAACX,OAAA,CAAAU,WAAA,GAAAA,WAAA;AAEK,MAAMG,eAAe,GAAGA,CAC9BlB,KAAa,EACbgB,KAAa,EACbC,KAAa,EACbE,MAAc,EACdC,MAAc,KACF;EACZ,SAAS;;EACT,MAAMV,CAAC,GAAGJ,OAAO,CAACS,WAAW,CAACf,KAAK,EAAEgB,KAAK,EAAEC,KAAK,CAAC,CAAC;EACnD,OAAOV,IAAI,CAACY,MAAM,EAAEC,MAAM,EAAEV,CAAC,CAAC;AAC/B,CAAC;AAACL,OAAA,CAAAa,eAAA,GAAAA,eAAA;AAEK,MAAMG,eAAe,GAAGA,CAACrB,KAAa,EAAEsB,QAAgB,KAAa;EAC3E,SAAS;;EACT,MAAMC,YAAY,GAAGD,QAAQ,GAAG,CAAC,GAAGA,QAAQ,GAAG,CAAC;EAChD,MAAME,SAAS,GAAGC,IAAI,CAACC,GAAG,CAAC1B,KAAK,CAAC,IAAIuB,YAAY;EACjD,OAAOvB,KAAK,GAAG,CAAC,GAAG,CAACwB,SAAS,GAAGA,SAAS;AAC1C,CAAC;AAACnB,OAAA,CAAAgB,eAAA,GAAAA,eAAA;AAEK,MAAMM,uBAAuB,GAAGA,CAAC;EACvCC,UAAU;EACVC,SAAS;EACTC;AAKD,CAAC,KAAa;EACb,SAAS;;EACT,MAAMC,QAAQ,GAAGN,IAAI,CAACvB,GAAG,CAAC,CAAC,EAAE2B,SAAS,CAAC,GAAGC,UAAU;EACpD,OAAOZ,eAAe,CAACU,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAACG,QAAQ,EAAEA,QAAQ,CAAC;AAC/D,CAAC;AAAC1B,OAAA,CAAAsB,uBAAA,GAAAA,uBAAA;AAEK,MAAMK,iBAAiB,GAAGA,CAAC;EACjCJ,UAAU;EACVK,WAAW;EACXX,QAAQ,GAAG,CAAC;EACZY,YAAY,GAAG;AAMhB,CAAC,KAAa;EACb,SAAS;;EACT,MAAM,CAACC,WAAW,EAAEC,SAAS,CAAC,GAAGH,WAAW;EAC5C,MAAMI,GAAG,GAAGH,YAAY,GACrBhB,eAAe,CAACU,UAAU,EAAE,CAAC,EAAE,CAAC,EAAEO,WAAW,EAAEC,SAAS,CAAC,GACzDlB,eAAe,CAACU,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAEO,WAAW,EAAEC,SAAS,CAAC;EAE7D,OAAOf,eAAe,CAACgB,GAAG,EAAEf,QAAQ,CAAC;AACtC,CAAC;AAACjB,OAAA,CAAA2B,iBAAA,GAAAA,iBAAA;AAEK,MAAMM,aAAa,GAAGA,CAC5BC,MAAc,EACdC,MAAc,EACdC,IAAuB,GAAG,UAAU,KACxB;EACZ,SAAS;;EAET,QAAQA,IAAI;IACX,KAAK,SAAS;MACb,OAAO,CAACF,MAAM,GAAGC,MAAM,IAAI,CAAC;IAC7B,KAAK,KAAK;MACT,OAAOf,IAAI,CAACvB,GAAG,CAACqC,MAAM,EAAEC,MAAM,CAAC;IAChC,KAAK,KAAK;MACT,OAAOf,IAAI,CAACxB,GAAG,CAACsC,MAAM,EAAEC,MAAM,CAAC;IAChC;MACC,OAAOD,MAAM,GAAGC,MAAM;EACxB;AACD,CAAC;AAACnC,OAAA,CAAAiC,aAAA,GAAAA,aAAA;AAEK,MAAMI,uBAAuB,GAAGA,CAAC;EACvCC,MAAM;EACNC,eAAe;EACfC;AAKD,CAAC,KAAa;EACb,SAAS;;EACT,OAAO,CAACF,MAAM,GAAGC,eAAe,KAAKC,KAAK,GAAG,CAAC,CAAC;AAChD,CAAC;AAACxC,OAAA,CAAAqC,uBAAA,GAAAA,uBAAA;AAEK,MAAMI,mCAAmC,GAAGA,CAAC;EACnDC,WAAW;EACXC,WAAW;EACXC;AAKD,CAAC,KAAa;EACb,SAAS;;EACT,MAAMC,eAAe,GAAGzB,IAAI,CAACvB,GAAG,CAAC8C,WAAW,EAAEC,OAAO,CAAC;EACtD,OAAOtC,UAAU,CAACoC,WAAW,EAAEG,eAAe,EAAEH,WAAW,CAAC;AAC7D,CAAC;AAAC1C,OAAA,CAAAyC,mCAAA,GAAAA,mCAAA;AAEK,MAAMK,6BAA6B,GAAGA,CAAC;EAC7CC,OAAO;EACPJ,WAAW;EACXK,WAAW,GAAG,CAAC;EACfJ;AAMD,CAAC,KAAa;EACb,SAAS;;EACT,OACCH,mCAAmC,CAAC;IACnCC,WAAW,EAAEK,OAAO;IACpBJ,WAAW;IACXC;EACD,CAAC,CAAC,GAAGI,WAAW;AAElB,CAAC;AAAChD,OAAA,CAAA8C,6BAAA,GAAAA,6BAAA","ignoreList":[]}
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createNavigationAccessor = void 0;
7
- var _navigation = require("../sugar/navigation");
8
- const createNavigationAccessor = ({
9
- id,
10
- group,
11
- getProps,
12
- resolveBoundTag,
13
- computeRaw,
14
- zoomBaseOptions
15
- }) => {
16
- "worklet";
17
-
18
- const resolvedId = id ?? "";
19
- const computeNavigationPresetStyles = (preset, navigationOptions) => {
20
- "worklet";
21
-
22
- const frameProps = getProps();
23
- return (0, _navigation.buildNavigationStyles)({
24
- id: resolvedId,
25
- group,
26
- preset,
27
- navigationOptions,
28
- props: frameProps,
29
- resolveTag: resolveBoundTag,
30
- computeRaw: overrides => computeRaw({
31
- ...(overrides ?? {}),
32
- raw: true
33
- }, frameProps)
34
- });
35
- };
36
- return {
37
- zoom: () => {
38
- "worklet";
39
-
40
- return computeNavigationPresetStyles("zoom", zoomBaseOptions);
41
- }
42
- };
43
- };
44
- exports.createNavigationAccessor = createNavigationAccessor;
45
- //# sourceMappingURL=navigation-accessor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_navigation","require","createNavigationAccessor","id","group","getProps","resolveBoundTag","computeRaw","zoomBaseOptions","resolvedId","computeNavigationPresetStyles","preset","navigationOptions","frameProps","buildNavigationStyles","props","resolveTag","overrides","raw","zoom","exports"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/helpers/navigation-accessor.ts"],"mappings":";;;;;;AAEA,IAAAA,WAAA,GAAAC,OAAA;AAgBO,MAAMC,wBAAwB,GAAGA,CAAC;EACxCC,EAAE;EACFC,KAAK;EACLC,QAAQ;EACRC,eAAe;EACfC,UAAU;EACVC;AACyB,CAAC,KAAK;EAC/B,SAAS;;EAET,MAAMC,UAAU,GAAGN,EAAE,IAAI,EAAE;EAE3B,MAAMO,6BAA6B,GAAGA,CACrCC,MAAc,EACdC,iBAA2C,KACvC;IACJ,SAAS;;IACT,MAAMC,UAAU,GAAGR,QAAQ,CAAC,CAAC;IAC7B,OAAO,IAAAS,iCAAqB,EAAC;MAC5BX,EAAE,EAAEM,UAAU;MACdL,KAAK;MACLO,MAAM;MACNC,iBAAiB;MACjBG,KAAK,EAAEF,UAAU;MACjBG,UAAU,EAAEV,eAAe;MAC3BC,UAAU,EAAGU,SAAS,IACrBV,UAAU,CACT;QACC,IAAIU,SAAS,IAAI,CAAC,CAAC,CAAC;QACpBC,GAAG,EAAE;MACN,CAAC,EACDL,UACD;IACF,CAAC,CAAC;EACH,CAAC;EAED,OAAO;IACNM,IAAI,EAAEA,CAAA,KAAM;MACX,SAAS;;MACT,OAAOT,6BAA6B,CAAC,MAAM,EAAEF,eAAe,CAAC;IAC9D;EACD,CAAC;AACF,CAAC;AAACY,OAAA,CAAAlB,wBAAA,GAAAA,wBAAA","ignoreList":[]}