react-native-screen-transitions 3.4.0-alpha.3 → 3.4.0-alpha.5

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 (328) hide show
  1. package/lib/commonjs/component-stack/components/component-screen.js +1 -1
  2. package/lib/commonjs/component-stack/components/component-screen.js.map +1 -1
  3. package/lib/commonjs/shared/animation/snap-to.js +6 -3
  4. package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
  5. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +1 -1
  6. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
  7. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +47 -4
  8. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
  9. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +2 -2
  10. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
  11. package/lib/commonjs/shared/components/create-boundary-component/index.js +6 -6
  12. package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
  13. package/lib/commonjs/shared/components/native-screen.js +3 -3
  14. package/lib/commonjs/shared/components/native-screen.js.map +1 -1
  15. package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js +1 -1
  16. package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js.map +1 -1
  17. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +18 -14
  18. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  19. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +8 -5
  20. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  21. package/lib/commonjs/shared/components/screen-container/layers/content.js +12 -28
  22. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  23. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +17 -4
  24. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  25. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +4 -2
  26. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +1 -1
  27. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +6 -1
  28. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
  29. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js +13 -11
  30. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
  31. package/lib/commonjs/shared/components/screen-lifecycle/index.js +5 -3
  32. package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -1
  33. package/lib/commonjs/shared/configs/presets.js +3 -4
  34. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  35. package/lib/commonjs/shared/constants.js +16 -2
  36. package/lib/commonjs/shared/constants.js.map +1 -1
  37. package/lib/commonjs/shared/hooks/animation/use-associated-style.js +2 -2
  38. package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +1 -1
  39. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +12 -9
  40. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  41. package/lib/commonjs/shared/providers/gestures/helpers/gesture-physics.js +3 -2
  42. package/lib/commonjs/shared/providers/gestures/helpers/gesture-physics.js.map +1 -1
  43. package/lib/commonjs/shared/providers/gestures/helpers/gesture-reset.js +7 -5
  44. package/lib/commonjs/shared/providers/gestures/helpers/gesture-reset.js.map +1 -1
  45. package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js +5 -5
  46. package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -1
  47. package/lib/commonjs/shared/providers/gestures/helpers/gesture-targets.js +9 -6
  48. package/lib/commonjs/shared/providers/gestures/helpers/gesture-targets.js.map +1 -1
  49. package/lib/commonjs/shared/providers/gestures/helpers/register-direction-claims.js +1 -1
  50. package/lib/commonjs/shared/providers/gestures/helpers/register-direction-claims.js.map +1 -1
  51. package/lib/commonjs/shared/providers/gestures/use-build-gestures.js +1 -1
  52. package/lib/commonjs/shared/providers/gestures/use-build-gestures.js.map +1 -1
  53. package/lib/commonjs/shared/providers/register-bounds.provider.js +5 -5
  54. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  55. package/lib/commonjs/shared/providers/screen/animation/helpers/has-transitions-enabled.js +17 -0
  56. package/lib/commonjs/shared/providers/screen/animation/helpers/has-transitions-enabled.js.map +1 -0
  57. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js +72 -0
  58. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -0
  59. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +22 -108
  60. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  61. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +42 -0
  62. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -0
  63. package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js +17 -3
  64. package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +1 -1
  65. package/lib/commonjs/shared/providers/screen/styles.provider.js +4 -1
  66. package/lib/commonjs/shared/providers/screen/styles.provider.js.map +1 -1
  67. package/lib/commonjs/shared/providers/stack/direct.provider.js +1 -1
  68. package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
  69. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js +1 -1
  70. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
  71. package/lib/commonjs/shared/stores/animation.store.js +12 -40
  72. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  73. package/lib/commonjs/shared/stores/gesture.store.js +13 -33
  74. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  75. package/lib/commonjs/shared/stores/system.store.js +31 -0
  76. package/lib/commonjs/shared/stores/system.store.js.map +1 -0
  77. package/lib/commonjs/shared/types/bounds.types.js +1 -3
  78. package/lib/commonjs/shared/types/bounds.types.js.map +1 -1
  79. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +2 -2
  80. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  81. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
  82. package/lib/commonjs/shared/utils/bounds/index.js +23 -50
  83. package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
  84. package/lib/commonjs/shared/utils/bounds/zoom/build.js +108 -362
  85. package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
  86. package/lib/commonjs/shared/utils/bounds/zoom/config.js +15 -101
  87. package/lib/commonjs/shared/utils/bounds/zoom/config.js.map +1 -1
  88. package/lib/commonjs/shared/utils/bounds/zoom/math.js +154 -0
  89. package/lib/commonjs/shared/utils/bounds/zoom/math.js.map +1 -0
  90. package/lib/commonjs/shared/utils/bounds/zoom/types.js +1 -3
  91. package/lib/commonjs/shared/utils/bounds/zoom/types.js.map +1 -1
  92. package/lib/commonjs/shared/utils/create-store.js +54 -0
  93. package/lib/commonjs/shared/utils/create-store.js.map +1 -0
  94. package/lib/module/component-stack/components/component-screen.js +1 -1
  95. package/lib/module/component-stack/components/component-screen.js.map +1 -1
  96. package/lib/module/shared/animation/snap-to.js +6 -3
  97. package/lib/module/shared/animation/snap-to.js.map +1 -1
  98. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +1 -1
  99. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
  100. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +48 -5
  101. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
  102. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +2 -2
  103. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
  104. package/lib/module/shared/components/create-boundary-component/index.js +6 -6
  105. package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
  106. package/lib/module/shared/components/native-screen.js +3 -3
  107. package/lib/module/shared/components/native-screen.js.map +1 -1
  108. package/lib/module/shared/components/screen-container/deferred-visibility-host.js +2 -2
  109. package/lib/module/shared/components/screen-container/deferred-visibility-host.js.map +1 -1
  110. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +18 -14
  111. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  112. package/lib/module/shared/components/screen-container/layers/backdrop.js +8 -5
  113. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  114. package/lib/module/shared/components/screen-container/layers/content.js +13 -29
  115. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  116. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +19 -6
  117. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  118. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +4 -2
  119. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +1 -1
  120. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +6 -1
  121. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
  122. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js +13 -11
  123. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
  124. package/lib/module/shared/components/screen-lifecycle/index.js +5 -3
  125. package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
  126. package/lib/module/shared/configs/presets.js +3 -4
  127. package/lib/module/shared/configs/presets.js.map +1 -1
  128. package/lib/module/shared/constants.js +16 -2
  129. package/lib/module/shared/constants.js.map +1 -1
  130. package/lib/module/shared/hooks/animation/use-associated-style.js +2 -2
  131. package/lib/module/shared/hooks/animation/use-associated-style.js.map +1 -1
  132. package/lib/module/shared/providers/gestures/handlers/use-handlers.js +12 -9
  133. package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  134. package/lib/module/shared/providers/gestures/helpers/gesture-physics.js +3 -2
  135. package/lib/module/shared/providers/gestures/helpers/gesture-physics.js.map +1 -1
  136. package/lib/module/shared/providers/gestures/helpers/gesture-reset.js +7 -5
  137. package/lib/module/shared/providers/gestures/helpers/gesture-reset.js.map +1 -1
  138. package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js +5 -5
  139. package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -1
  140. package/lib/module/shared/providers/gestures/helpers/gesture-targets.js +9 -6
  141. package/lib/module/shared/providers/gestures/helpers/gesture-targets.js.map +1 -1
  142. package/lib/module/shared/providers/gestures/helpers/register-direction-claims.js +1 -1
  143. package/lib/module/shared/providers/gestures/helpers/register-direction-claims.js.map +1 -1
  144. package/lib/module/shared/providers/gestures/use-build-gestures.js +1 -1
  145. package/lib/module/shared/providers/gestures/use-build-gestures.js.map +1 -1
  146. package/lib/module/shared/providers/register-bounds.provider.js +5 -5
  147. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  148. package/lib/module/shared/providers/screen/animation/helpers/has-transitions-enabled.js +12 -0
  149. package/lib/module/shared/providers/screen/animation/helpers/has-transitions-enabled.js.map +1 -0
  150. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js +67 -0
  151. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -0
  152. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +22 -108
  153. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  154. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +37 -0
  155. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -0
  156. package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js +15 -2
  157. package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +1 -1
  158. package/lib/module/shared/providers/screen/styles.provider.js +5 -2
  159. package/lib/module/shared/providers/screen/styles.provider.js.map +1 -1
  160. package/lib/module/shared/providers/stack/direct.provider.js +1 -1
  161. package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
  162. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +1 -1
  163. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
  164. package/lib/module/shared/stores/animation.store.js +12 -40
  165. package/lib/module/shared/stores/animation.store.js.map +1 -1
  166. package/lib/module/shared/stores/gesture.store.js +13 -33
  167. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  168. package/lib/module/shared/stores/system.store.js +27 -0
  169. package/lib/module/shared/stores/system.store.js.map +1 -0
  170. package/lib/module/shared/types/bounds.types.js +9 -1
  171. package/lib/module/shared/types/bounds.types.js.map +1 -1
  172. package/lib/module/shared/utils/animation/animate-to-progress.js +2 -2
  173. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  174. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
  175. package/lib/module/shared/utils/bounds/index.js +23 -50
  176. package/lib/module/shared/utils/bounds/index.js.map +1 -1
  177. package/lib/module/shared/utils/bounds/zoom/build.js +101 -355
  178. package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
  179. package/lib/module/shared/utils/bounds/zoom/config.js +12 -98
  180. package/lib/module/shared/utils/bounds/zoom/config.js.map +1 -1
  181. package/lib/module/shared/utils/bounds/zoom/math.js +136 -0
  182. package/lib/module/shared/utils/bounds/zoom/math.js.map +1 -0
  183. package/lib/module/shared/utils/bounds/zoom/types.js +1 -1
  184. package/lib/module/shared/utils/bounds/zoom/types.js.map +1 -1
  185. package/lib/module/shared/utils/create-store.js +50 -0
  186. package/lib/module/shared/utils/create-store.js.map +1 -0
  187. package/lib/typescript/shared/animation/snap-to.d.ts.map +1 -1
  188. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +1 -2
  189. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts.map +1 -1
  190. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts.map +1 -1
  191. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  192. package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
  193. package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -1
  194. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  195. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  196. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  197. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts.map +1 -1
  198. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts +2 -1
  199. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +1 -1
  200. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts +2 -1
  201. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +1 -1
  202. package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -1
  203. package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
  204. package/lib/typescript/shared/constants.d.ts.map +1 -1
  205. package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts.map +1 -1
  206. package/lib/typescript/shared/index.d.ts +3 -3
  207. package/lib/typescript/shared/index.d.ts.map +1 -1
  208. package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
  209. package/lib/typescript/shared/providers/gestures/helpers/gesture-physics.d.ts.map +1 -1
  210. package/lib/typescript/shared/providers/gestures/helpers/gesture-reset.d.ts.map +1 -1
  211. package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts +2 -2
  212. package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts.map +1 -1
  213. package/lib/typescript/shared/providers/gestures/helpers/gesture-targets.d.ts.map +1 -1
  214. package/lib/typescript/shared/providers/gestures/use-build-gestures.d.ts.map +1 -1
  215. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  216. package/lib/typescript/shared/providers/screen/animation/helpers/has-transitions-enabled.d.ts +8 -0
  217. package/lib/typescript/shared/providers/screen/animation/helpers/has-transitions-enabled.d.ts.map +1 -0
  218. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts +22 -0
  219. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts.map +1 -0
  220. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +4 -2
  221. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  222. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +21 -0
  223. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -0
  224. package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts +6 -2
  225. package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts.map +1 -1
  226. package/lib/typescript/shared/providers/screen/styles.provider.d.ts.map +1 -1
  227. package/lib/typescript/shared/stores/animation.store.d.ts +10 -17
  228. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  229. package/lib/typescript/shared/stores/gesture.store.d.ts +24 -14
  230. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  231. package/lib/typescript/shared/stores/system.store.d.ts +27 -0
  232. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -0
  233. package/lib/typescript/shared/types/animation.types.d.ts +38 -9
  234. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  235. package/lib/typescript/shared/types/bounds.types.d.ts +14 -42
  236. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  237. package/lib/typescript/shared/types/index.d.ts +2 -2
  238. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  239. package/lib/typescript/shared/types/screen.types.d.ts +11 -0
  240. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  241. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts +3 -1
  242. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  243. package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -1
  244. package/lib/typescript/shared/utils/bounds/index.d.ts +2 -3
  245. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  246. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +2 -3
  247. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
  248. package/lib/typescript/shared/utils/bounds/zoom/config.d.ts +15 -41
  249. package/lib/typescript/shared/utils/bounds/zoom/config.d.ts.map +1 -1
  250. package/lib/typescript/shared/utils/bounds/zoom/math.d.ts +44 -0
  251. package/lib/typescript/shared/utils/bounds/zoom/math.d.ts.map +1 -0
  252. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +8 -13
  253. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -1
  254. package/lib/typescript/shared/utils/create-store.d.ts +14 -0
  255. package/lib/typescript/shared/utils/create-store.d.ts.map +1 -0
  256. package/package.json +1 -1
  257. package/src/component-stack/components/component-screen.tsx +1 -1
  258. package/src/shared/animation/snap-to.ts +10 -4
  259. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +1 -1
  260. package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +82 -10
  261. package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +2 -5
  262. package/src/shared/components/create-boundary-component/index.tsx +6 -12
  263. package/src/shared/components/native-screen.tsx +3 -9
  264. package/src/shared/components/screen-container/deferred-visibility-host.tsx +2 -2
  265. package/src/shared/components/screen-container/hooks/use-content-layout.ts +42 -43
  266. package/src/shared/components/screen-container/layers/backdrop.tsx +12 -6
  267. package/src/shared/components/screen-container/layers/content.tsx +17 -49
  268. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +26 -5
  269. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.ts +4 -2
  270. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts +8 -0
  271. package/src/shared/components/screen-lifecycle/hooks/use-open-transition.ts +21 -10
  272. package/src/shared/components/screen-lifecycle/index.tsx +8 -2
  273. package/src/shared/configs/presets.ts +8 -7
  274. package/src/shared/constants.ts +14 -0
  275. package/src/shared/hooks/animation/use-associated-style.ts +2 -8
  276. package/src/shared/index.ts +2 -0
  277. package/src/shared/providers/gestures/handlers/use-handlers.ts +13 -10
  278. package/src/shared/providers/gestures/helpers/gesture-physics.ts +4 -2
  279. package/src/shared/providers/gestures/helpers/gesture-reset.ts +9 -5
  280. package/src/shared/providers/gestures/helpers/gesture-snap-points.ts +12 -10
  281. package/src/shared/providers/gestures/helpers/gesture-targets.ts +14 -6
  282. package/src/shared/providers/gestures/helpers/register-direction-claims.ts +1 -1
  283. package/src/shared/providers/gestures/use-build-gestures.ts +1 -3
  284. package/src/shared/providers/register-bounds.provider.tsx +5 -11
  285. package/src/shared/providers/screen/animation/helpers/has-transitions-enabled.ts +14 -0
  286. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state.ts +108 -0
  287. package/src/shared/providers/screen/animation/helpers/pipeline.ts +37 -199
  288. package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +77 -0
  289. package/src/shared/providers/screen/helpers/resolve-interpolated-style-output.ts +24 -4
  290. package/src/shared/providers/screen/styles.provider.tsx +5 -1
  291. package/src/shared/providers/stack/direct.provider.tsx +1 -1
  292. package/src/shared/providers/stack/helpers/use-processed-routes.ts +1 -1
  293. package/src/shared/stores/animation.store.ts +11 -61
  294. package/src/shared/stores/gesture.store.ts +25 -45
  295. package/src/shared/stores/system.store.ts +44 -0
  296. package/src/shared/types/animation.types.ts +41 -9
  297. package/src/shared/types/bounds.types.ts +25 -25
  298. package/src/shared/types/index.ts +2 -0
  299. package/src/shared/types/screen.types.ts +12 -0
  300. package/src/shared/utils/animation/animate-to-progress.ts +4 -2
  301. package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +0 -1
  302. package/src/shared/utils/bounds/index.ts +26 -75
  303. package/src/shared/utils/bounds/zoom/build.ts +179 -502
  304. package/src/shared/utils/bounds/zoom/config.ts +14 -164
  305. package/src/shared/utils/bounds/zoom/math.ts +193 -0
  306. package/src/shared/utils/bounds/zoom/types.ts +15 -17
  307. package/src/shared/utils/create-store.ts +62 -0
  308. package/lib/commonjs/shared/utils/bounds/types/frame-props.js +0 -6
  309. package/lib/commonjs/shared/utils/bounds/types/frame-props.js.map +0 -1
  310. package/lib/commonjs/shared/utils/bounds/zoom/accessor.js +0 -54
  311. package/lib/commonjs/shared/utils/bounds/zoom/accessor.js.map +0 -1
  312. package/lib/commonjs/shared/utils/bounds/zoom/index.js +0 -20
  313. package/lib/commonjs/shared/utils/bounds/zoom/index.js.map +0 -1
  314. package/lib/module/shared/utils/bounds/types/frame-props.js +0 -4
  315. package/lib/module/shared/utils/bounds/types/frame-props.js.map +0 -1
  316. package/lib/module/shared/utils/bounds/zoom/accessor.js +0 -49
  317. package/lib/module/shared/utils/bounds/zoom/accessor.js.map +0 -1
  318. package/lib/module/shared/utils/bounds/zoom/index.js +0 -5
  319. package/lib/module/shared/utils/bounds/zoom/index.js.map +0 -1
  320. package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts +0 -5
  321. package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts.map +0 -1
  322. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +0 -17
  323. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +0 -1
  324. package/lib/typescript/shared/utils/bounds/zoom/index.d.ts +0 -3
  325. package/lib/typescript/shared/utils/bounds/zoom/index.d.ts.map +0 -1
  326. package/src/shared/utils/bounds/types/frame-props.ts +0 -5
  327. package/src/shared/utils/bounds/zoom/accessor.ts +0 -69
  328. package/src/shared/utils/bounds/zoom/index.ts +0 -2
@@ -1,179 +1,29 @@
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";
1
+ import type { BoundsOptions } from "../types/options";
5
2
 
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"];
3
+ export const ZOOM_SHARED_OPTIONS = Object.freeze({
4
+ anchor: "top" as const,
5
+ scaleMode: "uniform" as const,
6
+ });
13
7
 
14
- const DEFAULT_MASK_BORDER_RADIUS: ZoomRadiusValue = 12;
8
+ export const ZOOM_DRAG_RESISTANCE = 0.4;
9
+ export const ZOOM_DRAG_DIRECTIONAL_SCALE_MIN = 0.25;
10
+ export const ZOOM_DRAG_DIRECTIONAL_SCALE_MAX = 1.06;
15
11
 
16
- const ZERO_OUTSET = Object.freeze({
12
+ export const ZOOM_MASK_OUTSET = Object.freeze({
17
13
  top: 0,
18
14
  right: 0,
19
15
  bottom: 0,
20
16
  left: 0,
21
17
  });
22
18
 
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
- };
19
+ export const getZoomAnchor = (
20
+ target: BoundsOptions["target"] | undefined,
21
+ ): BoundsOptions["anchor"] => {
22
+ "worklet";
23
+ return target === "bound" ? "center" : ZOOM_SHARED_OPTIONS.anchor;
45
24
  };
46
25
 
47
26
  export const toNumber = (value: unknown, fallback = 0): number => {
48
27
  "worklet";
49
28
  return typeof value === "number" ? value : fallback;
50
29
  };
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,193 @@
1
+ import { interpolate } from "react-native-reanimated";
2
+
3
+ export type CombinedScaleMode = "multiply" | "average" | "max" | "min";
4
+
5
+ export const clamp = (value: number, min: number, max: number): number => {
6
+ "worklet";
7
+ const lower = min < max ? min : max;
8
+ const upper = max > min ? max : min;
9
+
10
+ if (value < lower) return lower;
11
+ if (value > upper) return upper;
12
+
13
+ return value;
14
+ };
15
+
16
+ export const clamp01 = (value: number): number => {
17
+ "worklet";
18
+ return clamp(value, 0, 1);
19
+ };
20
+
21
+ export const lerp = (from: number, to: number, t: number): number => {
22
+ "worklet";
23
+ return from + (to - from) * t;
24
+ };
25
+
26
+ export const safeDivide = (
27
+ numerator: number,
28
+ denominator: number,
29
+ fallback = 0,
30
+ ): number => {
31
+ "worklet";
32
+ if (denominator === 0) return fallback;
33
+ return numerator / denominator;
34
+ };
35
+
36
+ export const inverseLerp = (
37
+ value: number,
38
+ inMin: number,
39
+ inMax: number,
40
+ ): number => {
41
+ "worklet";
42
+ return safeDivide(value - inMin, inMax - inMin, 0);
43
+ };
44
+
45
+ export const mapRangeClamped = (
46
+ value: number,
47
+ inMin: number,
48
+ inMax: number,
49
+ outMin: number,
50
+ outMax: number,
51
+ ): number => {
52
+ "worklet";
53
+ const t = clamp01(inverseLerp(value, inMin, inMax));
54
+ return lerp(outMin, outMax, t);
55
+ };
56
+
57
+ export const applyPowerCurve = (value: number, exponent: number): number => {
58
+ "worklet";
59
+ const safeExponent = exponent > 0 ? exponent : 1;
60
+ const magnitude = Math.abs(value) ** safeExponent;
61
+ return value < 0 ? -magnitude : magnitude;
62
+ };
63
+
64
+ export const normalizedToTranslation = ({
65
+ normalized,
66
+ dimension,
67
+ resistance,
68
+ }: {
69
+ normalized: number;
70
+ dimension: number;
71
+ resistance: number;
72
+ }): number => {
73
+ "worklet";
74
+ const distance = Math.max(0, dimension) * resistance;
75
+ return mapRangeClamped(normalized, -1, 1, -distance, distance);
76
+ };
77
+
78
+ export const normalizedToScale = ({
79
+ normalized,
80
+ outputRange,
81
+ exponent = 1,
82
+ positiveOnly = true,
83
+ }: {
84
+ normalized: number;
85
+ outputRange: readonly [number, number];
86
+ exponent?: number;
87
+ positiveOnly?: boolean;
88
+ }): number => {
89
+ "worklet";
90
+ const [outputStart, outputEnd] = outputRange;
91
+ const raw = positiveOnly
92
+ ? mapRangeClamped(normalized, 0, 1, outputStart, outputEnd)
93
+ : mapRangeClamped(normalized, -1, 1, outputStart, outputEnd);
94
+
95
+ return applyPowerCurve(raw, exponent);
96
+ };
97
+
98
+ export const combineScales = (
99
+ scaleX: number,
100
+ scaleY: number,
101
+ mode: CombinedScaleMode = "multiply",
102
+ ): number => {
103
+ "worklet";
104
+
105
+ switch (mode) {
106
+ case "average":
107
+ return (scaleX + scaleY) / 2;
108
+ case "max":
109
+ return Math.max(scaleX, scaleY);
110
+ case "min":
111
+ return Math.min(scaleX, scaleY);
112
+ default:
113
+ return scaleX * scaleY;
114
+ }
115
+ };
116
+
117
+ export const computeCenterScaleShift = ({
118
+ center,
119
+ containerCenter,
120
+ scale,
121
+ }: {
122
+ center: number;
123
+ containerCenter: number;
124
+ scale: number;
125
+ }): number => {
126
+ "worklet";
127
+ return (center - containerCenter) * (scale - 1);
128
+ };
129
+
130
+ export const compensateTranslationForParentScale = ({
131
+ translation,
132
+ parentScale,
133
+ epsilon,
134
+ }: {
135
+ translation: number;
136
+ parentScale: number;
137
+ epsilon: number;
138
+ }): number => {
139
+ "worklet";
140
+ const safeParentScale = Math.max(parentScale, epsilon);
141
+ return safeDivide(translation, safeParentScale, translation);
142
+ };
143
+
144
+ export const composeCompensatedTranslation = ({
145
+ gesture,
146
+ parentScale,
147
+ centerShift = 0,
148
+ epsilon,
149
+ }: {
150
+ gesture: number;
151
+ parentScale: number;
152
+ centerShift?: number;
153
+ epsilon: number;
154
+ }): number => {
155
+ "worklet";
156
+ return (
157
+ compensateTranslationForParentScale({
158
+ translation: gesture,
159
+ parentScale,
160
+ epsilon,
161
+ }) + centerShift
162
+ );
163
+ };
164
+
165
+ export const resolveDirectionalDragScale = ({
166
+ normalized,
167
+ dismissDirection,
168
+ shrinkMin,
169
+ growMax,
170
+ exponent,
171
+ }: {
172
+ normalized: number;
173
+ dismissDirection: "positive" | "negative";
174
+ shrinkMin: number;
175
+ growMax: number;
176
+ exponent: number;
177
+ }) => {
178
+ "worklet";
179
+
180
+ const dismissalRelative =
181
+ dismissDirection === "negative" ? -normalized : normalized;
182
+
183
+ if (dismissalRelative >= 0) {
184
+ return normalizedToScale({
185
+ normalized: dismissalRelative,
186
+ outputRange: [1, shrinkMin],
187
+ exponent,
188
+ });
189
+ }
190
+
191
+ const oppositeDrag = Math.min(1, Math.abs(dismissalRelative));
192
+ return interpolate(oppositeDrag, [0, 1], [1, growMax], "clamp");
193
+ };
@@ -1,22 +1,20 @@
1
- import type { BoundsNavigationZoomOptions } from "../../../types/bounds.types";
2
- import type { BoundsFrameProps } from "../types/frame-props";
3
- import type { BoundId, BoundsOptions } from "../types/options";
1
+ import {
2
+ NAVIGATION_MASK_CONTAINER_STYLE_ID,
3
+ NAVIGATION_MASK_ELEMENT_STYLE_ID,
4
+ } from "../../../constants";
5
+ import type {
6
+ BoundsInterpolationProps,
7
+ BoundsNavigationZoomOptions,
8
+ BoundsNavigationZoomStyle,
9
+ } from "../../../types/bounds.types";
4
10
 
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>;
11
+ export type ZoomInterpolatedStyle = BoundsNavigationZoomStyle & {
12
+ [NAVIGATION_MASK_CONTAINER_STYLE_ID]?: BoundsNavigationZoomStyle[typeof NAVIGATION_MASK_CONTAINER_STYLE_ID];
13
+ [NAVIGATION_MASK_ELEMENT_STYLE_ID]?: BoundsNavigationZoomStyle[typeof NAVIGATION_MASK_ELEMENT_STYLE_ID];
14
+ };
14
15
 
15
16
  export type BuildZoomStylesParams = {
16
- id: BoundId;
17
- group?: string;
17
+ resolvedTag?: string;
18
18
  zoomOptions?: BoundsNavigationZoomOptions;
19
- props: BoundsFrameProps;
20
- resolveTag: ResolveTag;
21
- computeRaw: ComputeRaw;
19
+ props: BoundsInterpolationProps;
22
20
  };
@@ -0,0 +1,62 @@
1
+ import type { ScreenKey } from "../types/screen.types";
2
+
3
+ interface CreateStoreOptions<TBag> {
4
+ createBag: () => TBag;
5
+ disposeBag: (bag: TBag) => void;
6
+ }
7
+
8
+ export function createStore<TBag>({
9
+ createBag,
10
+ disposeBag,
11
+ }: CreateStoreOptions<TBag>) {
12
+ const store: Record<ScreenKey, TBag> = {};
13
+ let cachedBag: TBag | undefined;
14
+
15
+ function peekBag(routeKey: ScreenKey): TBag | undefined {
16
+ return store[routeKey];
17
+ }
18
+
19
+ function getBag(routeKey: ScreenKey): TBag {
20
+ let bag = store[routeKey];
21
+ if (!bag) {
22
+ bag = createBag();
23
+ store[routeKey] = bag;
24
+ }
25
+ return bag;
26
+ }
27
+
28
+ function getValue<K extends keyof TBag>(
29
+ routeKey: ScreenKey,
30
+ key: K,
31
+ ): TBag[K] {
32
+ return getBag(routeKey)[key];
33
+ }
34
+
35
+ /**
36
+ * Returns a lazily-created singleton bag that is not keyed to a route. This is
37
+ * useful for stable fallback state, such as neutral gesture values for screens
38
+ * that should not own live route-specific state.
39
+ */
40
+ function getCachedBag(): TBag {
41
+ if (!cachedBag) {
42
+ cachedBag = createBag();
43
+ }
44
+ return cachedBag;
45
+ }
46
+
47
+ function clearBag(routeKey: ScreenKey) {
48
+ const bag = store[routeKey];
49
+ if (bag) {
50
+ disposeBag(bag);
51
+ }
52
+ delete store[routeKey];
53
+ }
54
+
55
+ return {
56
+ peekBag,
57
+ getBag,
58
+ getValue,
59
+ getCachedBag,
60
+ clearBag,
61
+ };
62
+ }
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=frame-props.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/types/frame-props.ts"],"mappings":"","ignoreList":[]}
@@ -1,54 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createZoomAccessor = void 0;
7
- var _build = require("./build");
8
- const createZoomAccessor = ({
9
- id,
10
- group,
11
- getProps,
12
- resolveBoundTag,
13
- computeRaw,
14
- zoomBaseOptions
15
- }) => {
16
- "worklet";
17
-
18
- const resolvedId = id ?? "";
19
- const computeZoomStyles = zoomOptions => {
20
- "worklet";
21
-
22
- const frameProps = getProps();
23
- return (0, _build.buildZoomStyles)({
24
- id: resolvedId,
25
- group,
26
- zoomOptions,
27
- props: frameProps,
28
- resolveTag: resolveBoundTag,
29
- computeRaw: overrides => computeRaw({
30
- ...(overrides ?? {}),
31
- raw: true
32
- }, frameProps)
33
- });
34
- };
35
- return {
36
- zoom: options => {
37
- "worklet";
38
-
39
- const mergedOptions = zoomBaseOptions || options ? {
40
- ...(zoomBaseOptions ?? {}),
41
- ...(options ?? {}),
42
- ...(options?.mask ? {
43
- mask: options.mask
44
- } : {}),
45
- ...(options?.motion ? {
46
- motion: options.motion
47
- } : {})
48
- } : undefined;
49
- return computeZoomStyles(mergedOptions);
50
- }
51
- };
52
- };
53
- exports.createZoomAccessor = createZoomAccessor;
54
- //# sourceMappingURL=accessor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_build","require","createZoomAccessor","id","group","getProps","resolveBoundTag","computeRaw","zoomBaseOptions","resolvedId","computeZoomStyles","zoomOptions","frameProps","buildZoomStyles","props","resolveTag","overrides","raw","zoom","options","mergedOptions","mask","motion","undefined","exports"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/zoom/accessor.ts"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAiBO,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC,EAAE;EACFC,KAAK;EACLC,QAAQ;EACRC,eAAe;EACfC,UAAU;EACVC;AACmB,CAAC,KAAK;EACzB,SAAS;;EAET,MAAMC,UAAU,GAAGN,EAAE,IAAI,EAAE;EAE3B,MAAMO,iBAAiB,GAAIC,WAAyC,IAAK;IACxE,SAAS;;IACT,MAAMC,UAAU,GAAGP,QAAQ,CAAC,CAAC;IAC7B,OAAO,IAAAQ,sBAAe,EAAC;MACtBV,EAAE,EAAEM,UAAU;MACdL,KAAK;MACLO,WAAW;MACXG,KAAK,EAAEF,UAAU;MACjBG,UAAU,EAAET,eAAe;MAC3BC,UAAU,EAAGS,SAAS,IACrBT,UAAU,CACT;QACC,IAAIS,SAAS,IAAI,CAAC,CAAC,CAAC;QACpBC,GAAG,EAAE;MACN,CAAC,EACDL,UACD;IACF,CAAC,CAAC;EACH,CAAC;EAED,OAAO;IACNM,IAAI,EAAGC,OAAqC,IAAK;MAChD,SAAS;;MACT,MAAMC,aAAa,GAClBZ,eAAe,IAAIW,OAAO,GACvB;QACA,IAAIX,eAAe,IAAI,CAAC,CAAC,CAAC;QAC1B,IAAIW,OAAO,IAAI,CAAC,CAAC,CAAC;QAClB,IAAIA,OAAO,EAAEE,IAAI,GAAG;UAAEA,IAAI,EAAEF,OAAO,CAACE;QAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAChD,IAAIF,OAAO,EAAEG,MAAM,GAAG;UAAEA,MAAM,EAAEH,OAAO,CAACG;QAAO,CAAC,GAAG,CAAC,CAAC;MACtD,CAAC,GACAC,SAAS;MACb,OAAOb,iBAAiB,CAACU,aAAa,CAAC;IACxC;EACD,CAAC;AACF,CAAC;AAACI,OAAA,CAAAtB,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "buildZoomStyles", {
7
- enumerable: true,
8
- get: function () {
9
- return _build.buildZoomStyles;
10
- }
11
- });
12
- Object.defineProperty(exports, "createZoomAccessor", {
13
- enumerable: true,
14
- get: function () {
15
- return _accessor.createZoomAccessor;
16
- }
17
- });
18
- var _accessor = require("./accessor");
19
- var _build = require("./build");
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_accessor","require","_build"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/zoom/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- "use strict";
2
-
3
- export {};
4
- //# sourceMappingURL=frame-props.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/types/frame-props.ts"],"mappings":"","ignoreList":[]}
@@ -1,49 +0,0 @@
1
- "use strict";
2
-
3
- import { buildZoomStyles } from "./build";
4
- export const createZoomAccessor = ({
5
- id,
6
- group,
7
- getProps,
8
- resolveBoundTag,
9
- computeRaw,
10
- zoomBaseOptions
11
- }) => {
12
- "worklet";
13
-
14
- const resolvedId = id ?? "";
15
- const computeZoomStyles = zoomOptions => {
16
- "worklet";
17
-
18
- const frameProps = getProps();
19
- return buildZoomStyles({
20
- id: resolvedId,
21
- group,
22
- zoomOptions,
23
- props: frameProps,
24
- resolveTag: resolveBoundTag,
25
- computeRaw: overrides => computeRaw({
26
- ...(overrides ?? {}),
27
- raw: true
28
- }, frameProps)
29
- });
30
- };
31
- return {
32
- zoom: options => {
33
- "worklet";
34
-
35
- const mergedOptions = zoomBaseOptions || options ? {
36
- ...(zoomBaseOptions ?? {}),
37
- ...(options ?? {}),
38
- ...(options?.mask ? {
39
- mask: options.mask
40
- } : {}),
41
- ...(options?.motion ? {
42
- motion: options.motion
43
- } : {})
44
- } : undefined;
45
- return computeZoomStyles(mergedOptions);
46
- }
47
- };
48
- };
49
- //# sourceMappingURL=accessor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["buildZoomStyles","createZoomAccessor","id","group","getProps","resolveBoundTag","computeRaw","zoomBaseOptions","resolvedId","computeZoomStyles","zoomOptions","frameProps","props","resolveTag","overrides","raw","zoom","options","mergedOptions","mask","motion","undefined"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/zoom/accessor.ts"],"mappings":";;AAIA,SAASA,eAAe,QAAQ,SAAS;AAiBzC,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC,EAAE;EACFC,KAAK;EACLC,QAAQ;EACRC,eAAe;EACfC,UAAU;EACVC;AACmB,CAAC,KAAK;EACzB,SAAS;;EAET,MAAMC,UAAU,GAAGN,EAAE,IAAI,EAAE;EAE3B,MAAMO,iBAAiB,GAAIC,WAAyC,IAAK;IACxE,SAAS;;IACT,MAAMC,UAAU,GAAGP,QAAQ,CAAC,CAAC;IAC7B,OAAOJ,eAAe,CAAC;MACtBE,EAAE,EAAEM,UAAU;MACdL,KAAK;MACLO,WAAW;MACXE,KAAK,EAAED,UAAU;MACjBE,UAAU,EAAER,eAAe;MAC3BC,UAAU,EAAGQ,SAAS,IACrBR,UAAU,CACT;QACC,IAAIQ,SAAS,IAAI,CAAC,CAAC,CAAC;QACpBC,GAAG,EAAE;MACN,CAAC,EACDJ,UACD;IACF,CAAC,CAAC;EACH,CAAC;EAED,OAAO;IACNK,IAAI,EAAGC,OAAqC,IAAK;MAChD,SAAS;;MACT,MAAMC,aAAa,GAClBX,eAAe,IAAIU,OAAO,GACvB;QACA,IAAIV,eAAe,IAAI,CAAC,CAAC,CAAC;QAC1B,IAAIU,OAAO,IAAI,CAAC,CAAC,CAAC;QAClB,IAAIA,OAAO,EAAEE,IAAI,GAAG;UAAEA,IAAI,EAAEF,OAAO,CAACE;QAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAChD,IAAIF,OAAO,EAAEG,MAAM,GAAG;UAAEA,MAAM,EAAEH,OAAO,CAACG;QAAO,CAAC,GAAG,CAAC,CAAC;MACtD,CAAC,GACAC,SAAS;MACb,OAAOZ,iBAAiB,CAACS,aAAa,CAAC;IACxC;EACD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- export { createZoomAccessor } from "./accessor";
4
- export { buildZoomStyles } from "./build";
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createZoomAccessor","buildZoomStyles"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/zoom/index.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAC/C,SAASC,eAAe,QAAQ,SAAS","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- import type { ScreenInterpolationProps } from "../../../types/animation.types";
2
- export type BoundsFrameProps = Omit<ScreenInterpolationProps, "bounds"> & {
3
- navigationMaskEnabled: boolean;
4
- };
5
- //# sourceMappingURL=frame-props.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"frame-props.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/types/frame-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,GAAG;IACzE,qBAAqB,EAAE,OAAO,CAAC;CAC/B,CAAC"}
@@ -1,17 +0,0 @@
1
- import type { BoundsNavigationZoomOptions } from "../../../types/bounds.types";
2
- import type { ResolveBoundTagParams } from "../helpers/resolve-bound-tag";
3
- import type { BoundsFrameProps } from "../types/frame-props";
4
- import type { BoundId, BoundsOptions } from "../types/options";
5
- type ZoomAccessorParams = {
6
- id?: BoundId;
7
- group?: string;
8
- getProps: () => BoundsFrameProps;
9
- resolveBoundTag: (params: ResolveBoundTagParams) => string | undefined;
10
- computeRaw: (overrides?: Partial<BoundsOptions>, frameProps?: BoundsFrameProps) => Record<string, unknown>;
11
- zoomBaseOptions?: Pick<BoundsNavigationZoomOptions, "anchor" | "scaleMode" | "target">;
12
- };
13
- export declare const createZoomAccessor: ({ id, group, getProps, resolveBoundTag, computeRaw, zoomBaseOptions, }: ZoomAccessorParams) => {
14
- zoom: (options?: BoundsNavigationZoomOptions) => import("../../..").TransitionInterpolatedStyle | null;
15
- };
16
- export {};
17
- //# sourceMappingURL=accessor.d.ts.map