react-native-screen-transitions 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +211 -156
  3. package/lib/commonjs/__tests__ /geometry.test.js +178 -0
  4. package/lib/commonjs/__tests__ /geometry.test.js.map +1 -0
  5. package/lib/commonjs/components/bounds-activator.js +33 -0
  6. package/lib/commonjs/components/bounds-activator.js.map +1 -0
  7. package/lib/commonjs/components/controllers/screen-lifecycle.js +66 -0
  8. package/lib/commonjs/components/controllers/screen-lifecycle.js.map +1 -0
  9. package/lib/commonjs/components/create-transition-aware-component.js +96 -0
  10. package/lib/commonjs/components/create-transition-aware-component.js.map +1 -0
  11. package/lib/commonjs/components/root-transition-aware.js +56 -0
  12. package/lib/commonjs/components/root-transition-aware.js.map +1 -0
  13. package/lib/commonjs/configs/index.js +12 -0
  14. package/lib/commonjs/configs/index.js.map +1 -0
  15. package/lib/commonjs/configs/presets.js +206 -0
  16. package/lib/commonjs/configs/presets.js.map +1 -0
  17. package/lib/commonjs/configs/specs.js +14 -0
  18. package/lib/commonjs/configs/specs.js.map +1 -0
  19. package/lib/commonjs/hooks/animation/use-associated-style.js +36 -0
  20. package/lib/commonjs/hooks/animation/use-associated-style.js.map +1 -0
  21. package/lib/commonjs/hooks/animation/use-screen-animation.js +120 -0
  22. package/lib/commonjs/hooks/animation/use-screen-animation.js.map +1 -0
  23. package/lib/commonjs/hooks/bounds/use-bound-measurer.js +52 -0
  24. package/lib/commonjs/hooks/bounds/use-bound-measurer.js.map +1 -0
  25. package/lib/commonjs/hooks/gestures/use-build-gestures.js +239 -0
  26. package/lib/commonjs/hooks/gestures/use-build-gestures.js.map +1 -0
  27. package/lib/commonjs/hooks/gestures/use-scroll-progress.js +57 -0
  28. package/lib/commonjs/hooks/gestures/use-scroll-progress.js.map +1 -0
  29. package/lib/commonjs/hooks/use-stable-callback.js +17 -0
  30. package/lib/commonjs/hooks/use-stable-callback.js.map +1 -0
  31. package/lib/commonjs/index.js +37 -0
  32. package/lib/commonjs/index.js.map +1 -0
  33. package/lib/commonjs/integrations/native-stack/navigators/createNativeStackNavigator.js +68 -0
  34. package/lib/commonjs/integrations/native-stack/navigators/createNativeStackNavigator.js.map +1 -0
  35. package/lib/commonjs/integrations/native-stack/utils/debounce.js +16 -0
  36. package/lib/commonjs/integrations/native-stack/utils/debounce.js.map +1 -0
  37. package/lib/commonjs/integrations/native-stack/utils/getModalRoutesKeys.js +17 -0
  38. package/lib/commonjs/integrations/native-stack/utils/getModalRoutesKeys.js.map +1 -0
  39. package/lib/commonjs/integrations/native-stack/utils/useAnimatedHeaderHeight.js +18 -0
  40. package/lib/commonjs/integrations/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -0
  41. package/lib/commonjs/integrations/native-stack/utils/useDismissedRouteError.js +22 -0
  42. package/lib/commonjs/integrations/native-stack/utils/useDismissedRouteError.js.map +1 -0
  43. package/lib/commonjs/integrations/native-stack/utils/useInvalidPreventRemoveError.js +25 -0
  44. package/lib/commonjs/integrations/native-stack/utils/useInvalidPreventRemoveError.js.map +1 -0
  45. package/lib/commonjs/integrations/native-stack/views/FontProcessor.js +10 -0
  46. package/lib/commonjs/integrations/native-stack/views/FontProcessor.js.map +1 -0
  47. package/lib/commonjs/integrations/native-stack/views/FontProcessor.native.js +18 -0
  48. package/lib/commonjs/integrations/native-stack/views/FontProcessor.native.js.map +1 -0
  49. package/lib/commonjs/integrations/native-stack/views/FooterComponent.js +17 -0
  50. package/lib/commonjs/integrations/native-stack/views/FooterComponent.js.map +1 -0
  51. package/lib/commonjs/integrations/native-stack/views/NativeStackView.js +138 -0
  52. package/lib/commonjs/integrations/native-stack/views/NativeStackView.js.map +1 -0
  53. package/lib/commonjs/integrations/native-stack/views/NativeStackView.native.js +497 -0
  54. package/lib/commonjs/integrations/native-stack/views/NativeStackView.native.js.map +1 -0
  55. package/lib/commonjs/integrations/native-stack/views/useHeaderConfigProps.js +203 -0
  56. package/lib/commonjs/integrations/native-stack/views/useHeaderConfigProps.js.map +1 -0
  57. package/lib/commonjs/package.json +1 -0
  58. package/lib/commonjs/providers/gestures.js +64 -0
  59. package/lib/commonjs/providers/gestures.js.map +1 -0
  60. package/lib/commonjs/providers/keys.js +35 -0
  61. package/lib/commonjs/providers/keys.js.map +1 -0
  62. package/lib/commonjs/stores/animations.js +39 -0
  63. package/lib/commonjs/stores/animations.js.map +1 -0
  64. package/lib/commonjs/stores/bounds.js +64 -0
  65. package/lib/commonjs/stores/bounds.js.map +1 -0
  66. package/lib/commonjs/stores/gestures.js +38 -0
  67. package/lib/commonjs/stores/gestures.js.map +1 -0
  68. package/lib/commonjs/stores/navigator-dismiss-state.js +23 -0
  69. package/lib/commonjs/stores/navigator-dismiss-state.js.map +1 -0
  70. package/lib/commonjs/stores/utils/reset-stores-for-screen.js +20 -0
  71. package/lib/commonjs/stores/utils/reset-stores-for-screen.js.map +1 -0
  72. package/lib/commonjs/types/animation.js +6 -0
  73. package/lib/commonjs/types/animation.js.map +1 -0
  74. package/lib/commonjs/types/bounds.js +6 -0
  75. package/lib/commonjs/types/bounds.js.map +1 -0
  76. package/lib/commonjs/types/core.js +6 -0
  77. package/lib/commonjs/types/core.js.map +1 -0
  78. package/lib/commonjs/types/gesture.js +2 -0
  79. package/lib/commonjs/types/gesture.js.map +1 -0
  80. package/lib/commonjs/types/navigator.js +6 -0
  81. package/lib/commonjs/types/navigator.js.map +1 -0
  82. package/lib/commonjs/types/utils.js +2 -0
  83. package/lib/commonjs/types/utils.js.map +1 -0
  84. package/lib/commonjs/utils/animation/animate.js +18 -0
  85. package/lib/commonjs/utils/animation/animate.js.map +1 -0
  86. package/lib/commonjs/utils/animation/run-transition.js +48 -0
  87. package/lib/commonjs/utils/animation/run-transition.js.map +1 -0
  88. package/lib/commonjs/utils/bounds/_types/builder.js +6 -0
  89. package/lib/commonjs/utils/bounds/_types/builder.js.map +1 -0
  90. package/lib/commonjs/utils/bounds/_types/geometry.js +2 -0
  91. package/lib/commonjs/utils/bounds/_types/geometry.js.map +1 -0
  92. package/lib/commonjs/utils/bounds/_types/get-bounds.js +6 -0
  93. package/lib/commonjs/utils/bounds/_types/get-bounds.js.map +1 -0
  94. package/lib/commonjs/utils/bounds/build-bound-styles.js +145 -0
  95. package/lib/commonjs/utils/bounds/build-bound-styles.js.map +1 -0
  96. package/lib/commonjs/utils/bounds/constants.js +31 -0
  97. package/lib/commonjs/utils/bounds/constants.js.map +1 -0
  98. package/lib/commonjs/utils/bounds/flatten-styles.js +27 -0
  99. package/lib/commonjs/utils/bounds/flatten-styles.js.map +1 -0
  100. package/lib/commonjs/utils/bounds/geometry.js +94 -0
  101. package/lib/commonjs/utils/bounds/geometry.js.map +1 -0
  102. package/lib/commonjs/utils/bounds/get-bounds.js +51 -0
  103. package/lib/commonjs/utils/bounds/get-bounds.js.map +1 -0
  104. package/lib/commonjs/utils/bounds/index.js +38 -0
  105. package/lib/commonjs/utils/bounds/index.js.map +1 -0
  106. package/lib/commonjs/utils/bounds/style-composers.js +199 -0
  107. package/lib/commonjs/utils/bounds/style-composers.js.map +1 -0
  108. package/lib/commonjs/utils/gesture/apply-gesture-activation-criteria.js +81 -0
  109. package/lib/commonjs/utils/gesture/apply-gesture-activation-criteria.js.map +1 -0
  110. package/lib/commonjs/utils/gesture/map-gesture-to-progress.js +17 -0
  111. package/lib/commonjs/utils/gesture/map-gesture-to-progress.js.map +1 -0
  112. package/lib/commonjs/utils/gesture/normalize-gesture-translation.js +21 -0
  113. package/lib/commonjs/utils/gesture/normalize-gesture-translation.js.map +1 -0
  114. package/lib/commonjs/utils/index.js +17 -0
  115. package/lib/commonjs/utils/index.js.map +1 -0
  116. package/lib/module/__tests__ /geometry.test.js +178 -0
  117. package/lib/module/__tests__ /geometry.test.js.map +1 -0
  118. package/lib/module/components/bounds-activator.js +28 -0
  119. package/lib/module/components/bounds-activator.js.map +1 -0
  120. package/lib/module/components/controllers/screen-lifecycle.js +60 -0
  121. package/lib/module/components/controllers/screen-lifecycle.js.map +1 -0
  122. package/lib/module/components/create-transition-aware-component.js +91 -0
  123. package/lib/module/components/create-transition-aware-component.js.map +1 -0
  124. package/lib/module/components/root-transition-aware.js +51 -0
  125. package/lib/module/components/root-transition-aware.js.map +1 -0
  126. package/lib/module/configs/index.js +5 -0
  127. package/lib/module/configs/index.js.map +1 -0
  128. package/lib/module/configs/presets.js +197 -0
  129. package/lib/module/configs/presets.js.map +1 -0
  130. package/lib/module/configs/specs.js +10 -0
  131. package/lib/module/configs/specs.js.map +1 -0
  132. package/lib/module/hooks/animation/use-associated-style.js +32 -0
  133. package/lib/module/hooks/animation/use-associated-style.js.map +1 -0
  134. package/lib/module/hooks/animation/use-screen-animation.js +115 -0
  135. package/lib/module/hooks/animation/use-screen-animation.js.map +1 -0
  136. package/lib/module/hooks/bounds/use-bound-measurer.js +47 -0
  137. package/lib/module/hooks/bounds/use-bound-measurer.js.map +1 -0
  138. package/lib/module/hooks/gestures/use-build-gestures.js +234 -0
  139. package/lib/module/hooks/gestures/use-build-gestures.js.map +1 -0
  140. package/lib/module/hooks/gestures/use-scroll-progress.js +52 -0
  141. package/lib/module/hooks/gestures/use-scroll-progress.js.map +1 -0
  142. package/lib/module/hooks/use-stable-callback.js +13 -0
  143. package/lib/module/hooks/use-stable-callback.js.map +1 -0
  144. package/lib/module/index.js +21 -0
  145. package/lib/module/index.js.map +1 -0
  146. package/lib/module/integrations/native-stack/navigators/createNativeStackNavigator.js +63 -0
  147. package/lib/module/integrations/native-stack/navigators/createNativeStackNavigator.js.map +1 -0
  148. package/lib/module/integrations/native-stack/utils/debounce.js +12 -0
  149. package/lib/module/integrations/native-stack/utils/debounce.js.map +1 -0
  150. package/lib/module/integrations/native-stack/utils/getModalRoutesKeys.js +12 -0
  151. package/lib/module/integrations/native-stack/utils/getModalRoutesKeys.js.map +1 -0
  152. package/lib/module/integrations/native-stack/utils/useAnimatedHeaderHeight.js +12 -0
  153. package/lib/module/integrations/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -0
  154. package/lib/module/integrations/native-stack/utils/useDismissedRouteError.js +17 -0
  155. package/lib/module/integrations/native-stack/utils/useDismissedRouteError.js.map +1 -0
  156. package/lib/module/integrations/native-stack/utils/useInvalidPreventRemoveError.js +20 -0
  157. package/lib/module/integrations/native-stack/utils/useInvalidPreventRemoveError.js.map +1 -0
  158. package/lib/module/integrations/native-stack/views/FontProcessor.js +6 -0
  159. package/lib/module/integrations/native-stack/views/FontProcessor.js.map +1 -0
  160. package/lib/module/integrations/native-stack/views/FontProcessor.native.js +12 -0
  161. package/lib/module/integrations/native-stack/views/FontProcessor.native.js.map +1 -0
  162. package/lib/module/integrations/native-stack/views/FooterComponent.js +13 -0
  163. package/lib/module/integrations/native-stack/views/FooterComponent.js.map +1 -0
  164. package/lib/module/integrations/native-stack/views/NativeStackView.js +133 -0
  165. package/lib/module/integrations/native-stack/views/NativeStackView.js.map +1 -0
  166. package/lib/module/integrations/native-stack/views/NativeStackView.native.js +492 -0
  167. package/lib/module/integrations/native-stack/views/NativeStackView.native.js.map +1 -0
  168. package/lib/module/integrations/native-stack/views/useHeaderConfigProps.js +199 -0
  169. package/lib/module/integrations/native-stack/views/useHeaderConfigProps.js.map +1 -0
  170. package/lib/module/providers/gestures.js +58 -0
  171. package/lib/module/providers/gestures.js.map +1 -0
  172. package/lib/module/providers/keys.js +29 -0
  173. package/lib/module/providers/keys.js.map +1 -0
  174. package/lib/module/stores/animations.js +33 -0
  175. package/lib/module/stores/animations.js.map +1 -0
  176. package/lib/module/stores/bounds.js +60 -0
  177. package/lib/module/stores/bounds.js.map +1 -0
  178. package/lib/module/stores/gestures.js +34 -0
  179. package/lib/module/stores/gestures.js.map +1 -0
  180. package/lib/module/stores/navigator-dismiss-state.js +19 -0
  181. package/lib/module/stores/navigator-dismiss-state.js.map +1 -0
  182. package/lib/module/stores/utils/reset-stores-for-screen.js +16 -0
  183. package/lib/module/stores/utils/reset-stores-for-screen.js.map +1 -0
  184. package/lib/module/types/animation.js +4 -0
  185. package/lib/module/types/animation.js.map +1 -0
  186. package/lib/module/types/bounds.js +4 -0
  187. package/lib/module/types/bounds.js.map +1 -0
  188. package/lib/module/types/core.js +4 -0
  189. package/lib/module/types/core.js.map +1 -0
  190. package/lib/module/types/gesture.js +2 -0
  191. package/lib/module/types/gesture.js.map +1 -0
  192. package/lib/module/types/navigator.js +4 -0
  193. package/lib/module/types/navigator.js.map +1 -0
  194. package/lib/module/types/utils.js +2 -0
  195. package/lib/module/types/utils.js.map +1 -0
  196. package/lib/module/utils/animation/animate.js +13 -0
  197. package/lib/module/utils/animation/animate.js.map +1 -0
  198. package/lib/module/utils/animation/run-transition.js +43 -0
  199. package/lib/module/utils/animation/run-transition.js.map +1 -0
  200. package/lib/module/utils/bounds/_types/builder.js +4 -0
  201. package/lib/module/utils/bounds/_types/builder.js.map +1 -0
  202. package/lib/module/utils/bounds/_types/geometry.js +2 -0
  203. package/lib/module/utils/bounds/_types/geometry.js.map +1 -0
  204. package/lib/module/utils/bounds/_types/get-bounds.js +4 -0
  205. package/lib/module/utils/bounds/_types/get-bounds.js.map +1 -0
  206. package/lib/module/utils/bounds/build-bound-styles.js +141 -0
  207. package/lib/module/utils/bounds/build-bound-styles.js.map +1 -0
  208. package/lib/module/utils/bounds/constants.js +26 -0
  209. package/lib/module/utils/bounds/constants.js.map +1 -0
  210. package/lib/module/utils/bounds/flatten-styles.js +23 -0
  211. package/lib/module/utils/bounds/flatten-styles.js.map +1 -0
  212. package/lib/module/utils/bounds/geometry.js +89 -0
  213. package/lib/module/utils/bounds/geometry.js.map +1 -0
  214. package/lib/module/utils/bounds/get-bounds.js +46 -0
  215. package/lib/module/utils/bounds/get-bounds.js.map +1 -0
  216. package/lib/module/utils/bounds/index.js +33 -0
  217. package/lib/module/utils/bounds/index.js.map +1 -0
  218. package/lib/module/utils/bounds/style-composers.js +191 -0
  219. package/lib/module/utils/bounds/style-composers.js.map +1 -0
  220. package/lib/module/utils/gesture/apply-gesture-activation-criteria.js +76 -0
  221. package/lib/module/utils/gesture/apply-gesture-activation-criteria.js.map +1 -0
  222. package/lib/module/utils/gesture/map-gesture-to-progress.js +12 -0
  223. package/lib/module/utils/gesture/map-gesture-to-progress.js.map +1 -0
  224. package/lib/module/utils/gesture/normalize-gesture-translation.js +16 -0
  225. package/lib/module/utils/gesture/normalize-gesture-translation.js.map +1 -0
  226. package/lib/module/utils/index.js +4 -0
  227. package/lib/module/utils/index.js.map +1 -0
  228. package/lib/typescript/components/bounds-activator.d.ts +8 -0
  229. package/lib/typescript/components/bounds-activator.d.ts.map +1 -0
  230. package/lib/typescript/components/controllers/screen-lifecycle.d.ts +6 -0
  231. package/lib/typescript/components/controllers/screen-lifecycle.d.ts.map +1 -0
  232. package/lib/typescript/components/create-transition-aware-component.d.ts +9 -0
  233. package/lib/typescript/components/create-transition-aware-component.d.ts.map +1 -0
  234. package/lib/typescript/components/root-transition-aware.d.ts +6 -0
  235. package/lib/typescript/components/root-transition-aware.d.ts.map +1 -0
  236. package/lib/typescript/configs/index.d.ts +3 -0
  237. package/lib/typescript/configs/index.d.ts.map +1 -0
  238. package/lib/typescript/configs/presets.d.ts +9 -0
  239. package/lib/typescript/configs/presets.d.ts.map +1 -0
  240. package/lib/typescript/configs/specs.d.ts +3 -0
  241. package/lib/typescript/configs/specs.d.ts.map +1 -0
  242. package/lib/typescript/hooks/animation/use-associated-style.d.ts +11 -0
  243. package/lib/typescript/hooks/animation/use-associated-style.d.ts.map +1 -0
  244. package/lib/typescript/hooks/animation/use-screen-animation.d.ts +7 -0
  245. package/lib/typescript/hooks/animation/use-screen-animation.d.ts.map +1 -0
  246. package/lib/typescript/hooks/bounds/use-bound-measurer.d.ts +18 -0
  247. package/lib/typescript/hooks/bounds/use-bound-measurer.d.ts.map +1 -0
  248. package/lib/typescript/hooks/gestures/use-build-gestures.d.ts +11 -0
  249. package/lib/typescript/hooks/gestures/use-build-gestures.d.ts.map +1 -0
  250. package/lib/typescript/hooks/gestures/use-scroll-progress.d.ts +14 -0
  251. package/lib/typescript/hooks/gestures/use-scroll-progress.d.ts.map +1 -0
  252. package/lib/typescript/hooks/use-stable-callback.d.ts +2 -0
  253. package/lib/typescript/hooks/use-stable-callback.d.ts.map +1 -0
  254. package/lib/typescript/index.d.ts +1275 -0
  255. package/lib/typescript/index.d.ts.map +1 -0
  256. package/lib/typescript/integrations/native-stack/navigators/createNativeStackNavigator.d.ts +16 -0
  257. package/lib/typescript/integrations/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -0
  258. package/lib/typescript/integrations/native-stack/utils/debounce.d.ts +2 -0
  259. package/lib/typescript/integrations/native-stack/utils/debounce.d.ts.map +1 -0
  260. package/lib/typescript/integrations/native-stack/utils/getModalRoutesKeys.d.ts +4 -0
  261. package/lib/typescript/integrations/native-stack/utils/getModalRoutesKeys.d.ts.map +1 -0
  262. package/lib/typescript/integrations/native-stack/utils/useAnimatedHeaderHeight.d.ts +5 -0
  263. package/lib/typescript/integrations/native-stack/utils/useAnimatedHeaderHeight.d.ts.map +1 -0
  264. package/lib/typescript/integrations/native-stack/utils/useDismissedRouteError.d.ts +6 -0
  265. package/lib/typescript/integrations/native-stack/utils/useDismissedRouteError.d.ts.map +1 -0
  266. package/lib/typescript/integrations/native-stack/utils/useInvalidPreventRemoveError.d.ts +3 -0
  267. package/lib/typescript/integrations/native-stack/utils/useInvalidPreventRemoveError.d.ts.map +1 -0
  268. package/lib/typescript/integrations/native-stack/views/FontProcessor.d.ts +2 -0
  269. package/lib/typescript/integrations/native-stack/views/FontProcessor.d.ts.map +1 -0
  270. package/lib/typescript/integrations/native-stack/views/FontProcessor.native.d.ts +2 -0
  271. package/lib/typescript/integrations/native-stack/views/FontProcessor.native.d.ts.map +1 -0
  272. package/lib/typescript/integrations/native-stack/views/FooterComponent.d.ts +7 -0
  273. package/lib/typescript/integrations/native-stack/views/FooterComponent.d.ts.map +1 -0
  274. package/lib/typescript/integrations/native-stack/views/NativeStackView.d.ts +11 -0
  275. package/lib/typescript/integrations/native-stack/views/NativeStackView.d.ts.map +1 -0
  276. package/lib/typescript/integrations/native-stack/views/NativeStackView.native.d.ts +11 -0
  277. package/lib/typescript/integrations/native-stack/views/NativeStackView.native.d.ts.map +1 -0
  278. package/lib/typescript/integrations/native-stack/views/useHeaderConfigProps.d.ts +44 -0
  279. package/lib/typescript/integrations/native-stack/views/useHeaderConfigProps.d.ts.map +1 -0
  280. package/lib/typescript/providers/gestures.d.ts +22 -0
  281. package/lib/typescript/providers/gestures.d.ts.map +1 -0
  282. package/lib/typescript/providers/keys.d.ts +16 -0
  283. package/lib/typescript/providers/keys.d.ts.map +1 -0
  284. package/lib/typescript/stores/animations.d.ts +17 -0
  285. package/lib/typescript/stores/animations.d.ts.map +1 -0
  286. package/lib/typescript/stores/bounds.d.ts +21 -0
  287. package/lib/typescript/stores/bounds.d.ts.map +1 -0
  288. package/lib/typescript/stores/gestures.d.ts +21 -0
  289. package/lib/typescript/stores/gestures.d.ts.map +1 -0
  290. package/lib/typescript/stores/navigator-dismiss-state.d.ts +7 -0
  291. package/lib/typescript/stores/navigator-dismiss-state.d.ts.map +1 -0
  292. package/lib/typescript/stores/utils/reset-stores-for-screen.d.ts +6 -0
  293. package/lib/typescript/stores/utils/reset-stores-for-screen.d.ts.map +1 -0
  294. package/lib/typescript/types/animation.d.ts +65 -0
  295. package/lib/typescript/types/animation.d.ts.map +1 -0
  296. package/lib/typescript/types/bounds.d.ts +73 -0
  297. package/lib/typescript/types/bounds.d.ts.map +1 -0
  298. package/lib/typescript/types/core.d.ts +47 -0
  299. package/lib/typescript/types/core.d.ts.map +1 -0
  300. package/lib/typescript/types/gesture.d.ts +28 -0
  301. package/lib/typescript/types/gesture.d.ts.map +1 -0
  302. package/lib/typescript/types/navigator.d.ts +683 -0
  303. package/lib/typescript/types/navigator.d.ts.map +1 -0
  304. package/lib/typescript/types/utils.d.ts +5 -0
  305. package/lib/typescript/types/utils.d.ts.map +1 -0
  306. package/lib/typescript/utils/animation/animate.d.ts +4 -0
  307. package/lib/typescript/utils/animation/animate.d.ts.map +1 -0
  308. package/lib/typescript/utils/animation/run-transition.d.ts +11 -0
  309. package/lib/typescript/utils/animation/run-transition.d.ts.map +1 -0
  310. package/lib/typescript/utils/bounds/_types/builder.d.ts +36 -0
  311. package/lib/typescript/utils/bounds/_types/builder.d.ts.map +1 -0
  312. package/lib/typescript/utils/bounds/_types/geometry.d.ts +16 -0
  313. package/lib/typescript/utils/bounds/_types/geometry.d.ts.map +1 -0
  314. package/lib/typescript/utils/bounds/_types/get-bounds.d.ts +10 -0
  315. package/lib/typescript/utils/bounds/_types/get-bounds.d.ts.map +1 -0
  316. package/lib/typescript/utils/bounds/build-bound-styles.d.ts +4 -0
  317. package/lib/typescript/utils/bounds/build-bound-styles.d.ts.map +1 -0
  318. package/lib/typescript/utils/bounds/constants.d.ts +7 -0
  319. package/lib/typescript/utils/bounds/constants.d.ts.map +1 -0
  320. package/lib/typescript/utils/bounds/flatten-styles.d.ts +2 -0
  321. package/lib/typescript/utils/bounds/flatten-styles.d.ts.map +1 -0
  322. package/lib/typescript/utils/bounds/geometry.d.ts +24 -0
  323. package/lib/typescript/utils/bounds/geometry.d.ts.map +1 -0
  324. package/lib/typescript/utils/bounds/get-bounds.d.ts +4 -0
  325. package/lib/typescript/utils/bounds/get-bounds.d.ts.map +1 -0
  326. package/lib/typescript/utils/bounds/index.d.ts +15 -0
  327. package/lib/typescript/utils/bounds/index.d.ts.map +1 -0
  328. package/lib/typescript/utils/bounds/style-composers.d.ts +40 -0
  329. package/lib/typescript/utils/bounds/style-composers.d.ts.map +1 -0
  330. package/lib/typescript/utils/gesture/apply-gesture-activation-criteria.d.ts +17 -0
  331. package/lib/typescript/utils/gesture/apply-gesture-activation-criteria.d.ts.map +1 -0
  332. package/lib/typescript/utils/gesture/map-gesture-to-progress.d.ts +5 -0
  333. package/lib/typescript/utils/gesture/map-gesture-to-progress.d.ts.map +1 -0
  334. package/lib/typescript/utils/gesture/normalize-gesture-translation.d.ts +6 -0
  335. package/lib/typescript/utils/gesture/normalize-gesture-translation.d.ts.map +1 -0
  336. package/lib/typescript/utils/index.d.ts +2 -0
  337. package/lib/typescript/utils/index.d.ts.map +1 -0
  338. package/package.json +67 -54
  339. package/dist/index.d.mts +0 -1513
  340. package/dist/index.d.ts +0 -1513
  341. package/dist/index.js +0 -1283
  342. package/dist/index.js.map +0 -1
  343. package/dist/index.mjs +0 -1279
  344. package/dist/index.mjs.map +0 -1
package/dist/index.mjs DELETED
@@ -1,1279 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
- // src/index.ts
8
- import { FlatList, Pressable, ScrollView, View as View2 } from "react-native";
9
-
10
- // src/components/create-transition-aware-component.tsx
11
- import { forwardRef, memo } from "react";
12
- import { StyleSheet } from "react-native";
13
- import Animated, {
14
- useAnimatedStyle as useAnimatedStyle2
15
- } from "react-native-reanimated";
16
-
17
- // src/components/transition-gesture-handler-provider.tsx
18
- import { useMemo as useMemo2 } from "react";
19
- import { GestureDetector } from "react-native-gesture-handler";
20
- import { useSharedValue as useSharedValue3 } from "react-native-reanimated";
21
-
22
- // src/contexts/gesture.ts
23
- import { createContext, useContext } from "react";
24
- import { Gesture } from "react-native-gesture-handler";
25
- import { useSharedValue } from "react-native-reanimated";
26
- var GestureContext = createContext(
27
- void 0
28
- );
29
- var useGestureContext = () => {
30
- const context = useContext(GestureContext);
31
- const scrollProgressFallback = useSharedValue({
32
- x: 0,
33
- y: 0,
34
- contentHeight: 0,
35
- contentWidth: 0,
36
- layoutHeight: 0,
37
- layoutWidth: 0
38
- });
39
- if (!context) {
40
- return {
41
- panGesture: Gesture.Pan(),
42
- nativeGesture: Gesture.Native(),
43
- scrollProgress: scrollProgressFallback,
44
- isPlaceholder: true
45
- };
46
- }
47
- return context;
48
- };
49
-
50
- // src/hooks/use-build-gestures.tsx
51
- import { useNavigation } from "@react-navigation/native";
52
- import { useCallback, useMemo } from "react";
53
- import { useWindowDimensions } from "react-native";
54
- import {
55
- Gesture as Gesture2
56
- } from "react-native-gesture-handler";
57
- import {
58
- interpolate,
59
- runOnJS as runOnJS2,
60
- useSharedValue as useSharedValue2
61
- } from "react-native-reanimated";
62
-
63
- // src/configs/specs.ts
64
- var specs_exports = {};
65
- __export(specs_exports, {
66
- DefaultSpec: () => DefaultSpec
67
- });
68
- var DefaultSpec = {
69
- stiffness: 1e3,
70
- damping: 500,
71
- mass: 3,
72
- overshootClamping: true,
73
- restSpeedThreshold: 0.01
74
- };
75
-
76
- // src/animation-engine.ts
77
- import {
78
- cancelAnimation,
79
- makeMutable,
80
- runOnJS
81
- } from "react-native-reanimated";
82
-
83
- // src/store/utils/create-vanilla-store.ts
84
- import { produce } from "immer";
85
- import { useSyncExternalStore } from "react";
86
- function createVanillaStore(initialState) {
87
- let state = initialState;
88
- const listeners = /* @__PURE__ */ new Set();
89
- const getState = () => state;
90
- const setState = (updater) => {
91
- const nextState = produce(state, updater);
92
- if (nextState !== state) {
93
- state = nextState;
94
- listeners.forEach((listener) => listener());
95
- }
96
- };
97
- const subscribe = (listener) => {
98
- listeners.add(listener);
99
- return () => listeners.delete(listener);
100
- };
101
- const subscribeWithSelector = (selector, listener) => {
102
- let previousSelectedState = selector(state);
103
- const internalListener = () => {
104
- const currentSelectedState = selector(getState());
105
- if (!Object.is(previousSelectedState, currentSelectedState)) {
106
- listener(currentSelectedState, previousSelectedState);
107
- previousSelectedState = currentSelectedState;
108
- }
109
- };
110
- const unsubscribe = subscribe(internalListener);
111
- listener(previousSelectedState, previousSelectedState);
112
- return unsubscribe;
113
- };
114
- function useStore(selector) {
115
- return useSyncExternalStore(subscribe, () => selector(getState()));
116
- }
117
- Object.assign(useStore, {
118
- setState,
119
- getState,
120
- subscribe,
121
- subscribeWithSelector
122
- });
123
- return useStore;
124
- }
125
-
126
- // src/store/utils/handle-screen-dismiss.tsx
127
- import { StackActions } from "@react-navigation/native";
128
- var handleScreenDismiss = (screenBeingDismissed, navigation) => {
129
- const { screens } = ScreenStore.use.getState();
130
- const dismissedScreen = screens[screenBeingDismissed];
131
- if (!dismissedScreen) {
132
- navigation.goBack();
133
- return;
134
- }
135
- const childScreens = Object.values(screens).filter(
136
- (screen) => screen.parentNavigatorKey === dismissedScreen.navigatorKey
137
- );
138
- if (childScreens.length > 0) {
139
- ScreenStore.updateScreen(dismissedScreen.id, {
140
- closing: true
141
- });
142
- navigation.dispatch(StackActions.pop(childScreens.length));
143
- } else {
144
- navigation.goBack();
145
- }
146
- };
147
-
148
- // src/store/utils/remove-screen.tsx
149
- var removeScreen = (key) => {
150
- if (!key) return;
151
- ScreenStore.use.setState(({ screens, screenKeys }) => {
152
- delete screens[key];
153
- const indexToRemove = screenKeys.indexOf(key);
154
- if (indexToRemove > -1) {
155
- screenKeys.splice(indexToRemove, 1);
156
- }
157
- });
158
- };
159
-
160
- // src/store/utils/should-skip-prevent-default.tsx
161
- var shouldSkipPreventDefault = (key, navigatorState) => {
162
- if (!key) return false;
163
- const { screens } = ScreenStore.use.getState();
164
- const currentScreen = screens[key];
165
- const isLastScreenInStack = navigatorState.routes.length === 1 && navigatorState.routes[0].key === key;
166
- const isParentNavigatorExiting = Boolean(
167
- currentScreen?.parentNavigatorKey && Object.values(screens).some(
168
- (screen) => screen.navigatorKey === currentScreen.parentNavigatorKey && screen.closing
169
- )
170
- );
171
- return isLastScreenInStack || isParentNavigatorExiting;
172
- };
173
-
174
- // src/store/utils/update-screen.tsx
175
- var updateScreen = (key, value) => {
176
- if (!key) return;
177
- ScreenStore.use.setState(({ screenKeys, screens }) => {
178
- const currentScreen = screens[key];
179
- if (currentScreen) {
180
- screens[key] = {
181
- ...currentScreen,
182
- ...value
183
- };
184
- } else {
185
- const { name = "", status = 0, closing = false, ...rest } = value;
186
- const newIndex = screenKeys.length;
187
- screens[key] = {
188
- id: key,
189
- index: newIndex,
190
- name,
191
- status,
192
- closing,
193
- ...rest
194
- };
195
- screenKeys.push(key);
196
- }
197
- });
198
- };
199
-
200
- // src/store/index.ts
201
- var useScreenStore = createVanillaStore({
202
- screens: {},
203
- screenKeys: []
204
- });
205
- var ScreenStore = {
206
- use: useScreenStore,
207
- updateScreen,
208
- removeScreen,
209
- handleScreenDismiss,
210
- shouldSkipPreventDefault
211
- };
212
-
213
- // src/utils/animate.ts
214
- import {
215
- withSpring,
216
- withTiming
217
- } from "react-native-reanimated";
218
- var animate = (toValue, config, callback) => {
219
- "worklet";
220
- const isSpring = typeof config === "object" && !("duration" in config) && !("easing" in config);
221
- if (!isSpring) {
222
- return withTiming(toValue, config, callback);
223
- }
224
- return withSpring(toValue, config, callback);
225
- };
226
-
227
- // src/animation-engine.ts
228
- var animationValues = {
229
- screenProgress: {},
230
- gestureX: {},
231
- gestureY: {},
232
- normalizedGestureX: {},
233
- normalizedGestureY: {},
234
- gestureDragging: {},
235
- isDismissing: {}
236
- };
237
- var triggerAnimation = (screen) => {
238
- "worklet";
239
- const { id, closing, status, transitionSpec, onAnimationFinish } = screen;
240
- const progressValue = animationValues.screenProgress[id];
241
- if (!progressValue && __DEV__) {
242
- console.warn(`Animation values not found for screen: ${id}`);
243
- return;
244
- }
245
- const animationConfig = closing ? transitionSpec?.close : transitionSpec?.open;
246
- const targetValue = status || 0;
247
- progressValue.value = animate(targetValue, animationConfig, (finished) => {
248
- "worklet";
249
- if (finished && onAnimationFinish) {
250
- runOnJS(onAnimationFinish)(true);
251
- }
252
- });
253
- };
254
- ScreenStore.use.subscribeWithSelector(
255
- (state) => state.screens,
256
- (currScreens, prevScreens) => {
257
- const currKeys = Object.keys(currScreens);
258
- const prevKeys = Object.keys(prevScreens);
259
- const incomingKeys = currKeys.filter((k) => !prevKeys.includes(k));
260
- const removedKeys = prevKeys.filter((k) => !currKeys.includes(k));
261
- const changedKeys = currKeys.filter(
262
- (k) => currScreens[k] !== prevScreens[k]
263
- );
264
- const animatableValues = Object.values(animationValues);
265
- for (const incomingKey of incomingKeys) {
266
- for (const value of animatableValues) {
267
- value[incomingKey] = makeMutable(0);
268
- }
269
- }
270
- for (const removedKey of removedKeys) {
271
- for (const value of animatableValues) {
272
- cancelAnimation(value[removedKey]);
273
- delete value[removedKey];
274
- }
275
- }
276
- for (const changedKey of changedKeys) {
277
- const currentScreen = currScreens[changedKey];
278
- if (currentScreen) {
279
- triggerAnimation(currentScreen);
280
- }
281
- }
282
- }
283
- );
284
-
285
- // src/utils/create-config.ts
286
- var createConfig = ({
287
- navigation: reactNavigation,
288
- route,
289
- ...config
290
- }) => {
291
- return {
292
- focus: (e) => {
293
- const parentNavigatorKey = reactNavigation.getParent()?.getState?.()?.key;
294
- const navigatorKey = reactNavigation.getState().key;
295
- ScreenStore.updateScreen(e.target, {
296
- id: e.target,
297
- name: route.name,
298
- status: 1,
299
- closing: false,
300
- navigatorKey,
301
- parentNavigatorKey,
302
- ...config
303
- });
304
- },
305
- beforeRemove: (e) => {
306
- const shouldSkipPreventDefault2 = ScreenStore.shouldSkipPreventDefault(
307
- e.target,
308
- reactNavigation.getState()
309
- );
310
- if (shouldSkipPreventDefault2) {
311
- ScreenStore.removeScreen(e.target);
312
- return;
313
- }
314
- e.preventDefault();
315
- const handleFinish = (finished) => {
316
- if (!finished) return;
317
- if (reactNavigation.canGoBack()) {
318
- reactNavigation.dispatch(e.data?.action);
319
- ScreenStore.removeScreen(e.target);
320
- }
321
- };
322
- ScreenStore.updateScreen(e.target, {
323
- status: 0,
324
- closing: true,
325
- onAnimationFinish: handleFinish
326
- });
327
- }
328
- };
329
- };
330
- var createScreenConfig = (config) => {
331
- return {
332
- listeners: (l) => createConfig({ ...l, ...config || {} })
333
- };
334
- };
335
-
336
- // src/utils/default-screen-options.ts
337
- var defaultScreenOptions = () => ({
338
- presentation: "containedTransparentModal",
339
- headerShown: false,
340
- animation: "none"
341
- });
342
-
343
- // src/utils/noop-interpolator.ts
344
- var noopinterpolator = () => {
345
- "worklet";
346
- return {
347
- contentStyle: {},
348
- overlayStyle: {}
349
- };
350
- };
351
-
352
- // src/utils/gesture/apply-gesture-activation-criteria.ts
353
- var applyGestureActivationCriteria = ({
354
- gestureDirection,
355
- gestureResponseDistance,
356
- panGesture
357
- }) => {
358
- const directions = Array.isArray(gestureDirection) ? gestureDirection : [gestureDirection];
359
- if (directions.includes("bidirectional")) {
360
- return {
361
- activeOffsetX: [
362
- -gestureResponseDistance,
363
- gestureResponseDistance
364
- ],
365
- activeOffsetY: [
366
- -gestureResponseDistance,
367
- gestureResponseDistance
368
- ]
369
- };
370
- }
371
- const allowedDown = directions.includes("vertical");
372
- const allowedUp = directions.includes("vertical-inverted");
373
- const allowedRight = directions.includes("horizontal");
374
- const allowedLeft = directions.includes("horizontal-inverted");
375
- const toleranceX = 15;
376
- const toleranceY = 20;
377
- const dist = gestureResponseDistance;
378
- const result = {};
379
- const hasHorizontal = allowedLeft || allowedRight;
380
- if (hasHorizontal) {
381
- if (allowedLeft && allowedRight) {
382
- result.activeOffsetX = [-dist, dist];
383
- } else if (allowedLeft) {
384
- result.activeOffsetX = -dist;
385
- } else if (allowedRight) {
386
- result.activeOffsetX = dist;
387
- }
388
- if (allowedRight && !allowedLeft) {
389
- result.failOffsetX = -dist;
390
- } else if (allowedLeft && !allowedRight) {
391
- result.failOffsetX = dist;
392
- }
393
- } else {
394
- result.failOffsetX = [-toleranceX, toleranceX];
395
- }
396
- const hasVertical = allowedUp || allowedDown;
397
- if (hasVertical) {
398
- if (allowedUp && allowedDown) {
399
- result.activeOffsetY = [-dist, dist];
400
- } else if (allowedUp) {
401
- result.activeOffsetY = -dist;
402
- } else if (allowedDown) {
403
- result.activeOffsetY = dist;
404
- }
405
- if (allowedDown && !allowedUp) {
406
- result.failOffsetY = -dist;
407
- } else if (allowedUp && !allowedDown) {
408
- result.failOffsetY = dist;
409
- }
410
- } else {
411
- result.failOffsetY = [-toleranceY, toleranceY];
412
- }
413
- if (result?.activeOffsetX) {
414
- panGesture.activeOffsetX(result.activeOffsetX);
415
- }
416
- if (result?.activeOffsetY) {
417
- panGesture.activeOffsetY(result.activeOffsetY);
418
- }
419
- if (result?.failOffsetX) {
420
- panGesture.failOffsetX(result.failOffsetX);
421
- }
422
- if (result?.failOffsetY) {
423
- panGesture.failOffsetY(result.failOffsetY);
424
- }
425
- panGesture.enableTrackpadTwoFingerGesture(true);
426
- return panGesture;
427
- };
428
-
429
- // src/utils/gesture/map-gesture-to-progress.ts
430
- var mapGestureToProgress = (translation, dimension) => {
431
- "worklet";
432
- const rawProgress = translation / dimension;
433
- return Math.max(0, Math.min(1, rawProgress));
434
- };
435
-
436
- // src/hooks/use-key.tsx
437
- import { useRoute } from "@react-navigation/native";
438
- var useKey = () => useRoute().key;
439
-
440
- // src/hooks/use-build-gestures.tsx
441
- var GESTURE_VELOCITY_IMPACT = 0.3;
442
- var DEFAULT_GESTURE_RESPONSE_DISTANCE = 50;
443
- var DEFAULT_GESTURE_DIRECTION = "horizontal";
444
- var DEFAULT_GESTURE_ENABLED = false;
445
- var useBuildGestures = ({
446
- scrollProgress
447
- }) => {
448
- const key = useKey();
449
- const dimensions = useWindowDimensions();
450
- const navigation = useNavigation();
451
- const currentScreen = ScreenStore.use(
452
- useCallback((state) => state.screens[key], [key])
453
- );
454
- const handleDismiss = useCallback(
455
- (screenBeingDismissed) => {
456
- ScreenStore.handleScreenDismiss(screenBeingDismissed, navigation);
457
- },
458
- [navigation]
459
- );
460
- const initialTouch = useSharedValue2({
461
- x: 0,
462
- y: 0
463
- });
464
- const translateX = animationValues.gestureX[key];
465
- const translateY = animationValues.gestureY[key];
466
- const normalizedGestureX = animationValues.normalizedGestureX[key];
467
- const normalizedGestureY = animationValues.normalizedGestureY[key];
468
- const isDragging = animationValues.gestureDragging[key];
469
- const isDismissing = animationValues.isDismissing[key];
470
- const progress = animationValues.screenProgress[key] || 0;
471
- const {
472
- gestureDirection = DEFAULT_GESTURE_DIRECTION,
473
- gestureEnabled = DEFAULT_GESTURE_ENABLED,
474
- transitionSpec = {
475
- open: DefaultSpec,
476
- close: DefaultSpec
477
- },
478
- gestureVelocityImpact = GESTURE_VELOCITY_IMPACT,
479
- gestureResponseDistance = DEFAULT_GESTURE_RESPONSE_DISTANCE
480
- } = currentScreen ?? {};
481
- const directions = Array.isArray(gestureDirection) ? gestureDirection : [gestureDirection];
482
- const nativeGesture = Gesture2.Native();
483
- const onTouchesDown = useCallback(
484
- (e) => {
485
- "worklet";
486
- const firstTouch = e.changedTouches[0];
487
- initialTouch.value = { x: firstTouch.x, y: firstTouch.y };
488
- },
489
- [initialTouch]
490
- );
491
- const onTouchesMove = useCallback(
492
- (e, manager) => {
493
- "worklet";
494
- const touch = e.changedTouches[0];
495
- const deltaX = touch.x - initialTouch.value.x;
496
- const deltaY = touch.y - initialTouch.value.y;
497
- const isVerticalSwipe = Math.abs(deltaY) > Math.abs(deltaX);
498
- const isHorizontalSwipe = Math.abs(deltaX) > Math.abs(deltaY);
499
- const isSwipingDown = isVerticalSwipe && deltaY > 0;
500
- const isSwipingUp = isVerticalSwipe && deltaY < 0;
501
- const isSwipingRight = isHorizontalSwipe && deltaX > 0;
502
- const isSwipingLeft = isHorizontalSwipe && deltaX < 0;
503
- const minMovement = 5;
504
- const hasEnoughMovement = Math.abs(deltaX) > minMovement || Math.abs(deltaY) > minMovement;
505
- if (!hasEnoughMovement) return;
506
- if (isDragging.value) {
507
- manager.activate();
508
- return;
509
- }
510
- let shouldActivate = false;
511
- for (const direction of directions) {
512
- switch (direction) {
513
- case "vertical":
514
- if (isSwipingDown) {
515
- shouldActivate = scrollProgress.value.y <= 0;
516
- }
517
- break;
518
- case "vertical-inverted":
519
- if (isSwipingUp) {
520
- const maxScrollableY = scrollProgress.value.contentHeight - scrollProgress.value.layoutHeight;
521
- shouldActivate = scrollProgress.value.y >= maxScrollableY;
522
- }
523
- break;
524
- case "horizontal":
525
- if (isSwipingRight) {
526
- shouldActivate = scrollProgress.value.x <= 0;
527
- }
528
- break;
529
- case "horizontal-inverted":
530
- if (isSwipingLeft) {
531
- const maxProgress = scrollProgress.value.contentWidth - scrollProgress.value.layoutWidth;
532
- shouldActivate = scrollProgress.value.x >= maxProgress;
533
- }
534
- break;
535
- case "bidirectional":
536
- if (isSwipingDown) {
537
- shouldActivate = scrollProgress.value.y <= 0;
538
- } else if (isSwipingUp) {
539
- shouldActivate = scrollProgress.value.y <= 0;
540
- } else if (isSwipingRight || isSwipingLeft) {
541
- shouldActivate = true;
542
- }
543
- break;
544
- }
545
- if (shouldActivate) break;
546
- }
547
- if ((shouldActivate || isDragging.value) && !isDismissing.value) {
548
- manager.activate();
549
- } else {
550
- manager.fail();
551
- }
552
- },
553
- [initialTouch, directions, scrollProgress, isDragging, isDismissing]
554
- );
555
- const onStart = useCallback(() => {
556
- "worklet";
557
- isDragging.value = 1;
558
- isDismissing.value = 0;
559
- }, [isDragging, isDismissing]);
560
- const onUpdate = useCallback(
561
- (event) => {
562
- "worklet";
563
- let gestureProgress = 0;
564
- translateX.value = event.translationX;
565
- translateY.value = event.translationY;
566
- normalizedGestureX.value = interpolate(
567
- event.translationX,
568
- [-dimensions.width, dimensions.width],
569
- [-1, 1],
570
- "clamp"
571
- );
572
- normalizedGestureY.value = interpolate(
573
- event.translationY,
574
- [-dimensions.height, dimensions.height],
575
- [-1, 1],
576
- "clamp"
577
- );
578
- if (directions.includes("bidirectional")) {
579
- const distance = Math.sqrt(
580
- event.translationX ** 2 + event.translationY ** 2
581
- );
582
- gestureProgress = mapGestureToProgress(distance, dimensions.width);
583
- } else {
584
- let maxProgress = 0;
585
- const allowedDown = directions.includes("vertical");
586
- const allowedUp = directions.includes("vertical-inverted");
587
- const allowedRight = directions.includes("horizontal");
588
- const allowedLeft = directions.includes("horizontal-inverted");
589
- if (allowedRight && event.translationX > 0) {
590
- const currentProgress = mapGestureToProgress(
591
- event.translationX,
592
- dimensions.width
593
- );
594
- maxProgress = Math.max(maxProgress, currentProgress);
595
- }
596
- if (allowedLeft && event.translationX < 0) {
597
- const currentProgress = mapGestureToProgress(
598
- -event.translationX,
599
- dimensions.width
600
- );
601
- maxProgress = Math.max(maxProgress, currentProgress);
602
- }
603
- if (allowedDown && event.translationY > 0) {
604
- const currentProgress = mapGestureToProgress(
605
- event.translationY,
606
- dimensions.height
607
- );
608
- maxProgress = Math.max(maxProgress, currentProgress);
609
- }
610
- if (allowedUp && event.translationY < 0) {
611
- const currentProgress = mapGestureToProgress(
612
- -event.translationY,
613
- dimensions.height
614
- );
615
- maxProgress = Math.max(maxProgress, currentProgress);
616
- }
617
- gestureProgress = maxProgress;
618
- }
619
- progress.value = 1 - gestureProgress;
620
- },
621
- [
622
- dimensions,
623
- directions,
624
- translateX,
625
- translateY,
626
- normalizedGestureX,
627
- normalizedGestureY,
628
- progress
629
- ]
630
- );
631
- const onEnd = useCallback(
632
- (event) => {
633
- "worklet";
634
- const { translationX, translationY, velocityX, velocityY } = event;
635
- const dismissThreshold = 0.5;
636
- if (directions.includes("bidirectional")) {
637
- const finalX = Math.abs(
638
- translationX + velocityX * gestureVelocityImpact
639
- );
640
- const finalY = Math.abs(
641
- translationY + velocityY * gestureVelocityImpact
642
- );
643
- const finalDistance = Math.sqrt(finalX ** 2 + finalY ** 2);
644
- isDismissing.value = Number(
645
- finalDistance > dimensions.width * dismissThreshold
646
- );
647
- } else {
648
- const allowedDown = directions.includes("vertical");
649
- const allowedUp = directions.includes("vertical-inverted");
650
- const allowedRight = directions.includes("horizontal");
651
- const allowedLeft = directions.includes("horizontal-inverted");
652
- if (allowedRight && translationX + velocityX * gestureVelocityImpact > dimensions.width * dismissThreshold) {
653
- isDismissing.value = 1;
654
- } else if (allowedLeft && -translationX - velocityX * gestureVelocityImpact > dimensions.width * dismissThreshold) {
655
- isDismissing.value = 1;
656
- } else if (allowedDown && translationY + velocityY * gestureVelocityImpact > dimensions.height * dismissThreshold) {
657
- isDismissing.value = 1;
658
- } else if (allowedUp && -translationY - velocityY * gestureVelocityImpact > dimensions.height * dismissThreshold) {
659
- isDismissing.value = 1;
660
- }
661
- }
662
- const finalProgress = isDismissing.value ? 0 : 1;
663
- const spec = isDismissing.value ? transitionSpec?.close : transitionSpec?.open;
664
- const onFinish = isDismissing.value ? (isFinished) => {
665
- "worklet";
666
- if (isFinished) runOnJS2(handleDismiss)(currentScreen?.id);
667
- } : void 0;
668
- progress.value = animate(finalProgress, spec, onFinish);
669
- translateX.value = animate(0, spec);
670
- translateY.value = animate(0, spec);
671
- normalizedGestureX.value = animate(0, spec);
672
- normalizedGestureY.value = animate(0, spec);
673
- isDragging.value = 0;
674
- },
675
- [
676
- dimensions,
677
- directions,
678
- translateX,
679
- translateY,
680
- normalizedGestureX,
681
- normalizedGestureY,
682
- progress,
683
- handleDismiss,
684
- currentScreen?.id,
685
- transitionSpec?.close,
686
- transitionSpec?.open,
687
- gestureVelocityImpact,
688
- isDragging,
689
- isDismissing
690
- ]
691
- );
692
- const panGesture = useMemo(
693
- () => Gesture2.Pan().enabled(gestureEnabled).manualActivation(true).onTouchesDown(onTouchesDown).onTouchesMove(onTouchesMove).onStart(onStart).onUpdate(onUpdate).onEnd(onEnd).blocksExternalGesture(nativeGesture),
694
- [
695
- gestureEnabled,
696
- nativeGesture,
697
- onTouchesDown,
698
- onTouchesMove,
699
- onStart,
700
- onUpdate,
701
- onEnd
702
- ]
703
- );
704
- applyGestureActivationCriteria({
705
- gestureDirection,
706
- gestureResponseDistance,
707
- panGesture
708
- });
709
- return { panGesture, nativeGesture };
710
- };
711
-
712
- // src/components/transition-gesture-handler-provider.tsx
713
- import { jsx } from "react/jsx-runtime";
714
- var TransitionGestureHandlerProvider = ({
715
- children
716
- }) => {
717
- const scrollProgress = useSharedValue3({
718
- x: 0,
719
- y: 0,
720
- contentHeight: 0,
721
- contentWidth: 0,
722
- layoutHeight: 0,
723
- layoutWidth: 0
724
- });
725
- const { panGesture, nativeGesture } = useBuildGestures({
726
- scrollProgress
727
- });
728
- const value = useMemo2(() => {
729
- return {
730
- panGesture,
731
- scrollProgress,
732
- nativeGesture
733
- };
734
- }, [panGesture, scrollProgress, nativeGesture]);
735
- return /* @__PURE__ */ jsx(GestureContext.Provider, { value, children: /* @__PURE__ */ jsx(GestureDetector, { gesture: panGesture, children }) });
736
- };
737
-
738
- // src/hooks/use-screen-animation.tsx
739
- import { useCallback as useCallback2, useMemo as useMemo3 } from "react";
740
- import { useWindowDimensions as useWindowDimensions2 } from "react-native";
741
- import { useSharedValue as useSharedValue4 } from "react-native-reanimated";
742
- import { useSafeAreaInsets } from "react-native-safe-area-context";
743
- var useAnimationBuilder = () => {
744
- const key = useKey();
745
- const dimensions = useWindowDimensions2();
746
- const insets = useSafeAreaInsets();
747
- const progressFallback = useSharedValue4(0);
748
- const gestureDraggingFallback = useSharedValue4(0);
749
- const gestureXFallback = useSharedValue4(0);
750
- const gestureYFallback = useSharedValue4(0);
751
- const normalizedGestureXFallback = useSharedValue4(0);
752
- const normalizedGestureYFallback = useSharedValue4(0);
753
- const isDismissingFallback = useSharedValue4(0);
754
- const currentScreen = ScreenStore.use(
755
- useCallback2((state) => state.screens[key], [key])
756
- );
757
- const actualNextScreen = ScreenStore.use(
758
- useCallback2(
759
- (state) => {
760
- const current = state.screens[key];
761
- if (!current) return void 0;
762
- const nextKey = state.screenKeys[current.index + 1];
763
- const nextScreen = nextKey ? state.screens[nextKey] : void 0;
764
- const shouldUseNext = nextScreen?.navigatorKey === current?.navigatorKey;
765
- return shouldUseNext ? nextScreen : void 0;
766
- },
767
- [key]
768
- )
769
- );
770
- const getAnimationValuesForScreen = useCallback2(
771
- (screenId) => ({
772
- progress: animationValues.screenProgress[screenId] || progressFallback,
773
- gesture: {
774
- isDragging: animationValues.gestureDragging[screenId] || gestureDraggingFallback,
775
- x: animationValues.gestureX[screenId] || gestureXFallback,
776
- y: animationValues.gestureY[screenId] || gestureYFallback,
777
- normalizedX: animationValues.normalizedGestureX[screenId] || normalizedGestureXFallback,
778
- normalizedY: animationValues.normalizedGestureY[screenId] || normalizedGestureYFallback,
779
- isDismissing: animationValues.isDismissing[screenId] || isDismissingFallback
780
- }
781
- }),
782
- [
783
- progressFallback,
784
- gestureDraggingFallback,
785
- gestureXFallback,
786
- gestureYFallback,
787
- normalizedGestureXFallback,
788
- normalizedGestureYFallback,
789
- isDismissingFallback
790
- ]
791
- );
792
- return useMemo3(() => {
793
- return {
794
- current: getAnimationValuesForScreen(key),
795
- next: actualNextScreen ? getAnimationValuesForScreen(actualNextScreen.id) : void 0,
796
- layouts: { screen: dimensions },
797
- insets,
798
- closing: currentScreen?.closing || false,
799
- screenStyleInterpolator: actualNextScreen?.screenStyleInterpolator || currentScreen?.screenStyleInterpolator || noopinterpolator
800
- };
801
- }, [
802
- key,
803
- currentScreen,
804
- actualNextScreen,
805
- dimensions,
806
- insets,
807
- getAnimationValuesForScreen
808
- ]);
809
- };
810
- var _useScreenAnimation = () => {
811
- return useAnimationBuilder();
812
- };
813
- var useScreenAnimation = () => {
814
- const { screenStyleInterpolator: _, ...animationProps } = useAnimationBuilder();
815
- return animationProps;
816
- };
817
-
818
- // src/hooks/use-skip-first-frame.tsx
819
- import { useEffect } from "react";
820
- import { useAnimatedStyle, useSharedValue as useSharedValue5 } from "react-native-reanimated";
821
- var useSkipFirstFrame = () => {
822
- const opacity = useSharedValue5(0);
823
- const style = useAnimatedStyle(() => {
824
- "worklet";
825
- return {
826
- opacity: opacity.value
827
- };
828
- });
829
- useEffect(() => {
830
- requestAnimationFrame(() => {
831
- opacity.value = 1;
832
- });
833
- }, [opacity]);
834
- return { style };
835
- };
836
-
837
- // src/components/create-transition-aware-component.tsx
838
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
839
- function createTransitionAwareComponent(Wrapped) {
840
- const AnimatedComponent = Animated.createAnimatedComponent(Wrapped);
841
- const Inner = forwardRef(
842
- (props, ref) => {
843
- const { children, style, ...rest } = props;
844
- const { screenStyleInterpolator, ...screenInterpolationProps } = _useScreenAnimation();
845
- const screenContainerStyle = useAnimatedStyle2(() => {
846
- "worklet";
847
- return screenStyleInterpolator(screenInterpolationProps).contentStyle || {};
848
- });
849
- const overlayStyle = useAnimatedStyle2(() => {
850
- "worklet";
851
- return screenStyleInterpolator(screenInterpolationProps).overlayStyle || {};
852
- });
853
- const { style: flickerFixStyle } = useSkipFirstFrame();
854
- return /* @__PURE__ */ jsx2(TransitionGestureHandlerProvider, { children: /* @__PURE__ */ jsxs(Animated.View, { style: [{ flex: 1 }, flickerFixStyle], children: [
855
- /* @__PURE__ */ jsx2(
856
- Animated.View,
857
- {
858
- style: [StyleSheet.absoluteFillObject, overlayStyle],
859
- pointerEvents: "none"
860
- }
861
- ),
862
- /* @__PURE__ */ jsx2(
863
- AnimatedComponent,
864
- {
865
- ...rest,
866
- ref,
867
- style: [
868
- { flex: 1, position: "relative" },
869
- screenContainerStyle,
870
- style
871
- ],
872
- children
873
- }
874
- )
875
- ] }) });
876
- }
877
- );
878
- Inner.displayName = `Transition(${Wrapped.displayName || Wrapped.name || "Component"})`;
879
- return memo(Inner);
880
- }
881
-
882
- // src/components/create-transition-aware-scrollable.tsx
883
- import { forwardRef as forwardRef2, memo as memo2 } from "react";
884
- import { View } from "react-native";
885
- import { GestureDetector as GestureDetector2 } from "react-native-gesture-handler";
886
- import Animated2 from "react-native-reanimated";
887
-
888
- // src/hooks/use-scroll-progress.tsx
889
- import { useCallback as useCallback3 } from "react";
890
- import { useAnimatedScrollHandler } from "react-native-reanimated";
891
- var useScrollProgress = (props) => {
892
- const { scrollProgress } = useGestureContext();
893
- const scrollHandler = useAnimatedScrollHandler({
894
- onScroll: (event) => {
895
- scrollProgress.modify((value) => {
896
- "worklet";
897
- return {
898
- ...value,
899
- x: event.contentOffset.x,
900
- y: event.contentOffset.y,
901
- layoutHeight: event.layoutMeasurement.height,
902
- layoutWidth: event.layoutMeasurement.width,
903
- contentHeight: event.contentSize.height,
904
- contentWidth: event.contentSize.width
905
- };
906
- });
907
- }
908
- });
909
- const onContentSizeChange = useCallback3(
910
- (width, height) => {
911
- props.onContentSizeChange?.(width, height);
912
- scrollProgress.modify((value) => {
913
- "worklet";
914
- return {
915
- ...value,
916
- contentWidth: width,
917
- contentHeight: height
918
- };
919
- });
920
- },
921
- [scrollProgress, props.onContentSizeChange]
922
- );
923
- return {
924
- scrollHandler,
925
- onContentSizeChange
926
- };
927
- };
928
-
929
- // src/components/create-transition-aware-scrollable.tsx
930
- import { jsx as jsx3 } from "react/jsx-runtime";
931
- function createTransitionAwareScrollable(ScrollableComponent) {
932
- const WithTransitionAwareness = createTransitionAwareComponent(View);
933
- const AnimatedScrollableComponent = Animated2.createAnimatedComponent(ScrollableComponent);
934
- const WithScrollAwareness = forwardRef2((props, ref) => {
935
- const { nativeGesture } = useGestureContext();
936
- const { scrollHandler, onContentSizeChange } = useScrollProgress({
937
- onScroll: props.onScroll,
938
- onContentSizeChange: props.onContentSizeChange
939
- });
940
- return /* @__PURE__ */ jsx3(GestureDetector2, { gesture: nativeGesture, children: /* @__PURE__ */ jsx3(
941
- AnimatedScrollableComponent,
942
- {
943
- ...props,
944
- ref,
945
- onScroll: scrollHandler,
946
- onContentSizeChange,
947
- scrollEventThrottle: props.scrollEventThrottle || 16
948
- }
949
- ) });
950
- });
951
- const Wrapped = forwardRef2((props, ref) => {
952
- const { isPlaceholder } = useGestureContext();
953
- if (isPlaceholder) {
954
- return /* @__PURE__ */ jsx3(WithTransitionAwareness, { children: /* @__PURE__ */ jsx3(WithScrollAwareness, { ...props, ref }) });
955
- }
956
- return /* @__PURE__ */ jsx3(WithScrollAwareness, { ...props, ref });
957
- });
958
- WithScrollAwareness.displayName = `Transition(${ScrollableComponent.displayName || ScrollableComponent.name || "Component"})`;
959
- return memo2(Wrapped);
960
- }
961
-
962
- // src/configs/presets.ts
963
- var presets_exports = {};
964
- __export(presets_exports, {
965
- DraggableCard: () => DraggableCard,
966
- ElasticCard: () => ElasticCard,
967
- SlideFromBottom: () => SlideFromBottom,
968
- SlideFromTop: () => SlideFromTop,
969
- ZoomIn: () => ZoomIn
970
- });
971
- import {
972
- Extrapolation,
973
- interpolate as interpolate2,
974
- interpolateColor
975
- } from "react-native-reanimated";
976
- var SlideFromTop = (config = {}) => {
977
- return {
978
- gestureEnabled: true,
979
- gestureDirection: "vertical-inverted",
980
- screenStyleInterpolator: ({
981
- current,
982
- next,
983
- layouts: {
984
- screen: { height }
985
- }
986
- }) => {
987
- "worklet";
988
- const progress = current.progress.value + (next?.progress.value ?? 0);
989
- const y = interpolate2(progress, [0, 1, 2], [-height, 0, height]);
990
- return {
991
- contentStyle: {
992
- transform: [{ translateY: y }]
993
- }
994
- };
995
- },
996
- transitionSpec: {
997
- open: DefaultSpec,
998
- close: DefaultSpec
999
- },
1000
- ...config
1001
- };
1002
- };
1003
- var ZoomIn = (config = {}) => {
1004
- return {
1005
- gestureEnabled: false,
1006
- screenStyleInterpolator: ({ current, next }) => {
1007
- "worklet";
1008
- const progress = current.progress.value + (next?.progress.value ?? 0);
1009
- const scale = interpolate2(
1010
- progress,
1011
- [0, 1, 2],
1012
- [0.5, 1, 0.5],
1013
- Extrapolation.CLAMP
1014
- );
1015
- const opacity = interpolate2(
1016
- progress,
1017
- [0, 1, 2],
1018
- [0, 1, 0],
1019
- Extrapolation.CLAMP
1020
- );
1021
- return {
1022
- contentStyle: {
1023
- transform: [{ scale }],
1024
- opacity
1025
- }
1026
- };
1027
- },
1028
- transitionSpec: {
1029
- open: DefaultSpec,
1030
- close: DefaultSpec
1031
- },
1032
- ...config
1033
- };
1034
- };
1035
- var SlideFromBottom = (config = {}) => {
1036
- return {
1037
- gestureEnabled: true,
1038
- gestureDirection: "vertical",
1039
- screenStyleInterpolator: ({
1040
- current,
1041
- next,
1042
- layouts: {
1043
- screen: { height }
1044
- }
1045
- }) => {
1046
- "worklet";
1047
- const progress = current.progress.value + (next?.progress.value ?? 0);
1048
- const y = interpolate2(progress, [0, 1, 2], [height, 0, -height]);
1049
- return {
1050
- contentStyle: {
1051
- transform: [{ translateY: y }]
1052
- }
1053
- };
1054
- },
1055
- transitionSpec: {
1056
- open: DefaultSpec,
1057
- close: DefaultSpec
1058
- },
1059
- ...config
1060
- };
1061
- };
1062
- var DraggableCard = (config = {}) => {
1063
- return {
1064
- gestureEnabled: true,
1065
- gestureDirection: ["horizontal", "vertical"],
1066
- screenStyleInterpolator: ({ current, next, layouts: { screen } }) => {
1067
- "worklet";
1068
- const progress = current.progress.value + (next?.progress.value ?? 0);
1069
- const scale = interpolate2(progress, [0, 1, 2], [0, 1, 0.75]);
1070
- const translateY = interpolate2(
1071
- current.gesture.normalizedY.value,
1072
- [-1, 1],
1073
- [-screen.height * 0.5, screen.height * 0.5],
1074
- "clamp"
1075
- );
1076
- const translateX = interpolate2(
1077
- current.gesture.normalizedX.value,
1078
- [-1, 1],
1079
- [-screen.width * 0.5, screen.width * 0.5],
1080
- "clamp"
1081
- );
1082
- return {
1083
- contentStyle: {
1084
- transform: [{ scale }, { translateY }, { translateX }]
1085
- }
1086
- };
1087
- },
1088
- transitionSpec: {
1089
- open: DefaultSpec,
1090
- close: DefaultSpec
1091
- },
1092
- ...config
1093
- };
1094
- };
1095
- var ElasticCard = (config = { elasticFactor: 0.5 }) => {
1096
- return {
1097
- gestureEnabled: true,
1098
- gestureDirection: "bidirectional",
1099
- screenStyleInterpolator: ({ current, next, layouts: { screen } }) => {
1100
- "worklet";
1101
- const progress = current.progress.value + (next?.progress.value ?? 0);
1102
- const scale = interpolate2(progress, [0, 1, 2], [0, 1, 0.8]);
1103
- const maxElasticityX = screen.width * (config.elasticFactor ?? 0.5);
1104
- const maxElasticityY = screen.height * (config.elasticFactor ?? 0.5);
1105
- const translateX = interpolate2(
1106
- current.gesture.normalizedX.value,
1107
- [-1, 0, 1],
1108
- [-maxElasticityX, 0, maxElasticityX],
1109
- "clamp"
1110
- );
1111
- const translateY = interpolate2(
1112
- current.gesture.normalizedY.value,
1113
- [-1, 0, 1],
1114
- [-maxElasticityY, 0, maxElasticityY],
1115
- "clamp"
1116
- );
1117
- const overlayColor = interpolateColor(
1118
- current.progress.value,
1119
- [0, 1],
1120
- ["rgba(0,0,0,0)", "rgba(0,0,0,0.5)"]
1121
- );
1122
- return {
1123
- contentStyle: {
1124
- transform: [{ scale }, { translateX }, { translateY }]
1125
- },
1126
- overlayStyle: {
1127
- backgroundColor: !next ? overlayColor : "rgba(0,0,0,0)"
1128
- }
1129
- };
1130
- },
1131
- ...config
1132
- };
1133
- };
1134
-
1135
- // src/navigator/create-transitionable-stack-navigator.tsx
1136
- import {
1137
- createNavigatorFactory,
1138
- StackRouter,
1139
- useNavigationBuilder
1140
- } from "@react-navigation/native";
1141
- import {
1142
- NativeStackView
1143
- } from "@react-navigation/native-stack";
1144
- import React, { Children, isValidElement, useMemo as useMemo4 } from "react";
1145
- import { jsx as jsx4 } from "react/jsx-runtime";
1146
- var DEFAULT_SCREEN_OPTIONS = {
1147
- presentation: "containedTransparentModal",
1148
- headerShown: false,
1149
- animation: "none"
1150
- /**
1151
- * EXPERIMENTAL:
1152
- When handling forward navigation, this would be the prop we would use to prevent the underlying screen from not being interactable.
1153
- - pointerEvents: "box-none",
1154
- */
1155
- };
1156
- var CONFLICTING_SCREEN_OPTIONS = {
1157
- gestureEnabled: false,
1158
- gestureDirection: "horizontal"
1159
- };
1160
- function TransitionableStackNavigator({
1161
- id,
1162
- initialRouteName,
1163
- children,
1164
- layout,
1165
- screenListeners,
1166
- screenOptions,
1167
- screenLayout,
1168
- UNSTABLE_router,
1169
- ...rest
1170
- }) {
1171
- const screenProcessor = useMemo4(() => {
1172
- const childOptions = /* @__PURE__ */ new Map();
1173
- const modifiedChildren = Children.toArray(children).filter(isValidElement).map((child) => {
1174
- const resolvedOptions = typeof child.props.options === "function" ? child.props.options({
1175
- route: child.props.route,
1176
- navigation: child.props.navigation
1177
- }) : child.props.options || {};
1178
- childOptions.set(child.props.name, resolvedOptions);
1179
- const skipDefaultScreenOptions = resolvedOptions?.skipDefaultScreenOptions === true;
1180
- return React.cloneElement(child, {
1181
- ...child.props,
1182
- options: {
1183
- ...skipDefaultScreenOptions ? {} : DEFAULT_SCREEN_OPTIONS,
1184
- ...resolvedOptions,
1185
- ...CONFLICTING_SCREEN_OPTIONS
1186
- }
1187
- });
1188
- });
1189
- return {
1190
- children: modifiedChildren,
1191
- childOptions
1192
- };
1193
- }, [children]);
1194
- const screenListenersWithTransitions = useMemo4(() => {
1195
- return (props) => {
1196
- const resolvedNavigatorConfig = typeof screenOptions === "function" ? screenOptions({
1197
- navigation: props.navigation,
1198
- route: props.route,
1199
- theme: {}
1200
- }) : screenOptions;
1201
- const resolvedChildConfig = screenProcessor.childOptions.get(props.route.name);
1202
- const mergedConfig = {
1203
- ...resolvedNavigatorConfig,
1204
- ...resolvedChildConfig
1205
- //Child should override navigator config
1206
- };
1207
- const transitionListeners = createConfig({
1208
- navigation: props.navigation,
1209
- route: props.route,
1210
- screenStyleInterpolator: mergedConfig.screenStyleInterpolator,
1211
- transitionSpec: mergedConfig.transitionSpec,
1212
- gestureEnabled: mergedConfig.gestureEnabled,
1213
- gestureDirection: mergedConfig.gestureDirection,
1214
- gestureResponseDistance: typeof mergedConfig.gestureResponseDistance === "number" ? mergedConfig.gestureResponseDistance : void 0,
1215
- gestureVelocityImpact: mergedConfig.gestureVelocityImpact
1216
- });
1217
- const existingListeners = typeof screenListeners === "function" ? screenListeners(props) : screenListeners || {};
1218
- return {
1219
- ...existingListeners,
1220
- ...transitionListeners
1221
- };
1222
- };
1223
- }, [screenListeners, screenOptions, screenProcessor.childOptions]);
1224
- const buildingBlocks = {
1225
- id,
1226
- initialRouteName,
1227
- children: screenProcessor.children,
1228
- layout,
1229
- screenListeners: screenListenersWithTransitions,
1230
- screenOptions,
1231
- screenLayout,
1232
- UNSTABLE_router
1233
- };
1234
- const { state, describe, descriptors, navigation, NavigationContent } = useNavigationBuilder(StackRouter, buildingBlocks);
1235
- return /* @__PURE__ */ jsx4(NavigationContent, { children: /* @__PURE__ */ jsx4(NativeStackView, { ...rest, state, navigation, descriptors, describe }) });
1236
- }
1237
- function createTransitionableStackNavigator() {
1238
- return createNavigatorFactory(TransitionableStackNavigator)();
1239
- }
1240
-
1241
- // src/index.ts
1242
- var index_default = {
1243
- View: createTransitionAwareComponent(View2),
1244
- Pressable: createTransitionAwareComponent(Pressable),
1245
- ScrollView: createTransitionAwareScrollable(ScrollView),
1246
- FlatList: createTransitionAwareScrollable(FlatList),
1247
- defaultScreenOptions,
1248
- presets: presets_exports,
1249
- specs: specs_exports,
1250
- /**
1251
- * Create a transition aware component
1252
- */
1253
- createTransitionAwareComponent,
1254
- /**
1255
- * Create a transition aware scrollable component
1256
- */
1257
- createTransitionAwareScrollable,
1258
- /**
1259
- * Create a transitionable native stack navigator.
1260
- *
1261
- */
1262
- createTransitionableStackNavigator,
1263
- /**
1264
- * @deprecated Use {@link createTransitionableStackNavigator} instead.
1265
- */
1266
- createConfig,
1267
- /**
1268
- * @deprecated Use {@link createTransitionableStackNavigator} instead.
1269
- */
1270
- createScreenConfig
1271
- /**
1272
- * @deprecated Use {@link createTransitionableStackNavigator} instead.
1273
- */
1274
- };
1275
- export {
1276
- index_default as default,
1277
- useScreenAnimation
1278
- };
1279
- //# sourceMappingURL=index.mjs.map