react-native-reanimated-carousel 5.0.0-beta.8 → 5.1.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 (402) hide show
  1. package/README.md +31 -29
  2. package/lib/commonjs/components/Carousel.js +1 -1
  3. package/lib/commonjs/components/Carousel.js.map +1 -1
  4. package/lib/commonjs/components/CarouselLayout.js +1 -1
  5. package/lib/commonjs/components/CarouselLayout.js.map +1 -1
  6. package/lib/commonjs/components/ItemLayout.js +1 -1
  7. package/lib/commonjs/components/ItemLayout.js.map +1 -1
  8. package/lib/commonjs/components/ItemRenderer.js +1 -1
  9. package/lib/commonjs/components/ItemRenderer.js.map +1 -1
  10. package/lib/commonjs/components/Pagination/PaginationItem.js +2 -0
  11. package/lib/commonjs/components/Pagination/PaginationItem.js.map +1 -0
  12. package/lib/commonjs/components/Pagination/index.js +1 -1
  13. package/lib/commonjs/components/Pagination/index.js.map +1 -1
  14. package/lib/commonjs/components/ScrollViewGesture.js +1 -1
  15. package/lib/commonjs/components/ScrollViewGesture.js.map +1 -1
  16. package/lib/commonjs/hooks/useAutoPlay.js +1 -1
  17. package/lib/commonjs/hooks/useAutoPlay.js.map +1 -1
  18. package/lib/commonjs/hooks/useCarouselController.js +1 -1
  19. package/lib/commonjs/hooks/useCarouselController.js.map +1 -1
  20. package/lib/commonjs/hooks/useCommonVariables.js +1 -1
  21. package/lib/commonjs/hooks/useCommonVariables.js.map +1 -1
  22. package/lib/commonjs/hooks/useInitProps.js +1 -1
  23. package/lib/commonjs/hooks/useInitProps.js.map +1 -1
  24. package/lib/commonjs/hooks/useLayoutConfig.js +1 -1
  25. package/lib/commonjs/hooks/useLayoutConfig.js.map +1 -1
  26. package/lib/commonjs/hooks/useOffsetX.js.map +1 -1
  27. package/lib/commonjs/hooks/useOnProgressChange.js +1 -1
  28. package/lib/commonjs/hooks/useOnProgressChange.js.map +1 -1
  29. package/lib/commonjs/hooks/usePanGestureProxy.js.map +1 -1
  30. package/lib/commonjs/hooks/usePropsErrorBoundary.js +1 -1
  31. package/lib/commonjs/hooks/usePropsErrorBoundary.js.map +1 -1
  32. package/lib/commonjs/hooks/useUpdateGestureConfig.js.map +1 -1
  33. package/lib/commonjs/hooks/useVisibleRanges.js.map +1 -1
  34. package/lib/commonjs/index.js +1 -1
  35. package/lib/commonjs/index.js.map +1 -1
  36. package/lib/commonjs/layouts/index.js.map +1 -1
  37. package/lib/commonjs/layouts/normal.js +1 -1
  38. package/lib/commonjs/layouts/normal.js.map +1 -1
  39. package/lib/commonjs/layouts/parallax.js +1 -1
  40. package/lib/commonjs/layouts/parallax.js.map +1 -1
  41. package/lib/commonjs/layouts/stack.js +1 -1
  42. package/lib/commonjs/layouts/stack.js.map +1 -1
  43. package/lib/commonjs/public-types.js +2 -0
  44. package/lib/commonjs/public-types.js.map +1 -0
  45. package/lib/commonjs/store/index.js.map +1 -1
  46. package/lib/commonjs/utils/carousel-direction.js +2 -0
  47. package/lib/commonjs/utils/carousel-direction.js.map +1 -0
  48. package/lib/commonjs/utils/carousel-math.js +2 -0
  49. package/lib/commonjs/utils/carousel-math.js.map +1 -0
  50. package/lib/commonjs/utils/computed-with-auto-fill-data.js.map +1 -1
  51. package/lib/commonjs/utils/deal-with-animation.js +1 -1
  52. package/lib/commonjs/utils/deal-with-animation.js.map +1 -1
  53. package/lib/module/components/Carousel.js +1 -1
  54. package/lib/module/components/Carousel.js.map +1 -1
  55. package/lib/module/components/CarouselLayout.js +1 -1
  56. package/lib/module/components/CarouselLayout.js.map +1 -1
  57. package/lib/module/components/ItemLayout.js +1 -1
  58. package/lib/module/components/ItemLayout.js.map +1 -1
  59. package/lib/module/components/ItemRenderer.js +1 -1
  60. package/lib/module/components/ItemRenderer.js.map +1 -1
  61. package/lib/module/components/LazyView.js +1 -1
  62. package/lib/module/components/LazyView.js.map +1 -1
  63. package/lib/module/components/Pagination/PaginationItem.js +2 -0
  64. package/lib/module/components/Pagination/PaginationItem.js.map +1 -0
  65. package/lib/module/components/Pagination/index.js +1 -1
  66. package/lib/module/components/Pagination/index.js.map +1 -1
  67. package/lib/module/components/ScrollViewGesture.js +1 -1
  68. package/lib/module/components/ScrollViewGesture.js.map +1 -1
  69. package/lib/module/constants/index.js +1 -1
  70. package/lib/module/constants/index.js.map +1 -1
  71. package/lib/module/hooks/useAutoPlay.js +1 -1
  72. package/lib/module/hooks/useAutoPlay.js.map +1 -1
  73. package/lib/module/hooks/useCarouselController.js +1 -1
  74. package/lib/module/hooks/useCarouselController.js.map +1 -1
  75. package/lib/module/hooks/useCheckMounted.js +1 -1
  76. package/lib/module/hooks/useCheckMounted.js.map +1 -1
  77. package/lib/module/hooks/useCommonVariables.js +1 -1
  78. package/lib/module/hooks/useCommonVariables.js.map +1 -1
  79. package/lib/module/hooks/useInitProps.js +1 -1
  80. package/lib/module/hooks/useInitProps.js.map +1 -1
  81. package/lib/module/hooks/useLayoutConfig.js +1 -1
  82. package/lib/module/hooks/useLayoutConfig.js.map +1 -1
  83. package/lib/module/hooks/useOffsetX.js +1 -1
  84. package/lib/module/hooks/useOffsetX.js.map +1 -1
  85. package/lib/module/hooks/useOnProgressChange.js +1 -1
  86. package/lib/module/hooks/useOnProgressChange.js.map +1 -1
  87. package/lib/module/hooks/usePanGestureProxy.js +1 -1
  88. package/lib/module/hooks/usePanGestureProxy.js.map +1 -1
  89. package/lib/module/hooks/usePropsErrorBoundary.js +1 -1
  90. package/lib/module/hooks/usePropsErrorBoundary.js.map +1 -1
  91. package/lib/module/hooks/useUpdateGestureConfig.js +1 -1
  92. package/lib/module/hooks/useUpdateGestureConfig.js.map +1 -1
  93. package/lib/module/hooks/useVisibleRanges.js +1 -1
  94. package/lib/module/hooks/useVisibleRanges.js.map +1 -1
  95. package/lib/module/index.js +1 -1
  96. package/lib/module/index.js.map +1 -1
  97. package/lib/module/layouts/index.js +1 -1
  98. package/lib/module/layouts/index.js.map +1 -1
  99. package/lib/module/layouts/normal.js +1 -1
  100. package/lib/module/layouts/normal.js.map +1 -1
  101. package/lib/module/layouts/parallax.js +1 -1
  102. package/lib/module/layouts/parallax.js.map +1 -1
  103. package/lib/module/layouts/stack.js +1 -1
  104. package/lib/module/layouts/stack.js.map +1 -1
  105. package/lib/module/package.json +1 -0
  106. package/lib/module/public-types.js +2 -0
  107. package/lib/module/public-types.js.map +1 -0
  108. package/lib/module/store/index.js +1 -1
  109. package/lib/module/store/index.js.map +1 -1
  110. package/lib/module/types.js +1 -1
  111. package/lib/module/utils/carousel-direction.js +2 -0
  112. package/lib/module/utils/carousel-direction.js.map +1 -0
  113. package/lib/module/utils/carousel-math.js +2 -0
  114. package/lib/module/utils/carousel-math.js.map +1 -0
  115. package/lib/module/utils/compute-gesture-translation.js +1 -1
  116. package/lib/module/utils/compute-gesture-translation.js.map +1 -1
  117. package/lib/module/utils/compute-offset-if-size-changed.js +1 -1
  118. package/lib/module/utils/compute-offset-if-size-changed.js.map +1 -1
  119. package/lib/module/utils/computed-with-auto-fill-data.js +1 -1
  120. package/lib/module/utils/computed-with-auto-fill-data.js.map +1 -1
  121. package/lib/module/utils/deal-with-animation.js +1 -1
  122. package/lib/module/utils/deal-with-animation.js.map +1 -1
  123. package/lib/module/utils/log.js +1 -1
  124. package/lib/module/utils/log.js.map +1 -1
  125. package/lib/module/utils/sanitize-animation-style.js +1 -1
  126. package/lib/module/utils/sanitize-animation-style.js.map +1 -1
  127. package/lib/typescript/commonjs/components/Carousel.d.ts +8 -0
  128. package/lib/typescript/commonjs/components/Carousel.d.ts.map +1 -0
  129. package/lib/typescript/{components → commonjs/components}/CarouselLayout.d.ts +5 -8
  130. package/lib/typescript/commonjs/components/CarouselLayout.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/components/ItemLayout.d.ts +21 -0
  132. package/lib/typescript/commonjs/components/ItemLayout.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/components/ItemRenderer.d.ts +24 -0
  134. package/lib/typescript/commonjs/components/ItemRenderer.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/components/LazyView.d.ts.map +1 -0
  136. package/lib/typescript/commonjs/components/Pagination/PaginationItem.d.ts +14 -0
  137. package/lib/typescript/commonjs/components/Pagination/PaginationItem.d.ts.map +1 -0
  138. package/lib/typescript/commonjs/components/Pagination/index.d.ts +4 -0
  139. package/lib/typescript/commonjs/components/Pagination/index.d.ts.map +1 -0
  140. package/lib/typescript/{components → commonjs/components}/ScrollViewGesture.d.ts +3 -4
  141. package/lib/typescript/commonjs/components/ScrollViewGesture.d.ts.map +1 -0
  142. package/lib/typescript/commonjs/constants/index.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/hooks/useAutoPlay.d.ts +12 -0
  144. package/lib/typescript/commonjs/hooks/useAutoPlay.d.ts.map +1 -0
  145. package/lib/typescript/commonjs/hooks/useCarouselController.d.ts +29 -0
  146. package/lib/typescript/commonjs/hooks/useCarouselController.d.ts.map +1 -0
  147. package/lib/typescript/commonjs/hooks/useCheckMounted.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/hooks/useCommonVariables.d.ts +18 -0
  149. package/lib/typescript/commonjs/hooks/useCommonVariables.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/hooks/useInitProps.d.ts +25 -0
  151. package/lib/typescript/commonjs/hooks/useInitProps.d.ts.map +1 -0
  152. package/lib/typescript/commonjs/hooks/useLayoutConfig.d.ts +8 -0
  153. package/lib/typescript/commonjs/hooks/useLayoutConfig.d.ts.map +1 -0
  154. package/lib/typescript/commonjs/hooks/useOffsetX.d.ts +13 -0
  155. package/lib/typescript/commonjs/hooks/useOffsetX.d.ts.map +1 -0
  156. package/lib/typescript/commonjs/hooks/useOnProgressChange.d.ts +12 -0
  157. package/lib/typescript/commonjs/hooks/useOnProgressChange.d.ts.map +1 -0
  158. package/lib/typescript/{hooks → commonjs/hooks}/usePanGestureProxy.d.ts +4 -3
  159. package/lib/typescript/commonjs/hooks/usePanGestureProxy.d.ts.map +1 -0
  160. package/lib/typescript/commonjs/hooks/usePropsErrorBoundary.d.ts +3 -0
  161. package/lib/typescript/commonjs/hooks/usePropsErrorBoundary.d.ts.map +1 -0
  162. package/lib/typescript/commonjs/hooks/useUpdateGestureConfig.d.ts +9 -0
  163. package/lib/typescript/commonjs/hooks/useUpdateGestureConfig.d.ts.map +1 -0
  164. package/lib/typescript/{hooks → commonjs/hooks}/useVisibleRanges.d.ts +6 -6
  165. package/lib/typescript/commonjs/hooks/useVisibleRanges.d.ts.map +1 -0
  166. package/lib/typescript/commonjs/index.d.ts +4 -0
  167. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  168. package/lib/typescript/{layouts → commonjs/layouts}/index.d.ts +0 -1
  169. package/lib/typescript/commonjs/layouts/index.d.ts.map +1 -0
  170. package/lib/typescript/commonjs/layouts/normal.d.ts +15 -0
  171. package/lib/typescript/commonjs/layouts/normal.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/layouts/parallax.d.ts +27 -0
  173. package/lib/typescript/commonjs/layouts/parallax.d.ts.map +1 -0
  174. package/lib/typescript/commonjs/layouts/stack.d.ts +10 -0
  175. package/lib/typescript/commonjs/layouts/stack.d.ts.map +1 -0
  176. package/lib/typescript/commonjs/package.json +1 -0
  177. package/lib/typescript/commonjs/public-types.d.ts +171 -0
  178. package/lib/typescript/commonjs/public-types.d.ts.map +1 -0
  179. package/lib/typescript/{store → commonjs/store}/index.d.ts +8 -8
  180. package/lib/typescript/commonjs/store/index.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/types.d.ts +15 -0
  182. package/lib/typescript/commonjs/types.d.ts.map +1 -0
  183. package/lib/typescript/commonjs/utils/carousel-direction.d.ts +9 -0
  184. package/lib/typescript/commonjs/utils/carousel-direction.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/utils/carousel-math.d.ts +28 -0
  186. package/lib/typescript/commonjs/utils/carousel-math.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/utils/compute-gesture-translation.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/utils/compute-offset-if-size-changed.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/utils/computed-with-auto-fill-data.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/utils/deal-with-animation.d.ts +3 -0
  191. package/lib/typescript/commonjs/utils/deal-with-animation.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/utils/log.d.ts.map +1 -0
  193. package/lib/typescript/commonjs/utils/sanitize-animation-style.d.ts.map +1 -0
  194. package/lib/typescript/module/components/Carousel.d.ts +8 -0
  195. package/lib/typescript/module/components/Carousel.d.ts.map +1 -0
  196. package/lib/typescript/module/components/CarouselLayout.d.ts +14 -0
  197. package/lib/typescript/module/components/CarouselLayout.d.ts.map +1 -0
  198. package/lib/typescript/module/components/ItemLayout.d.ts +21 -0
  199. package/lib/typescript/module/components/ItemLayout.d.ts.map +1 -0
  200. package/lib/typescript/module/components/ItemRenderer.d.ts +24 -0
  201. package/lib/typescript/module/components/ItemRenderer.d.ts.map +1 -0
  202. package/lib/typescript/module/components/LazyView.d.ts +8 -0
  203. package/lib/typescript/module/components/LazyView.d.ts.map +1 -0
  204. package/lib/typescript/module/components/Pagination/PaginationItem.d.ts +14 -0
  205. package/lib/typescript/module/components/Pagination/PaginationItem.d.ts.map +1 -0
  206. package/lib/typescript/module/components/Pagination/index.d.ts +4 -0
  207. package/lib/typescript/module/components/Pagination/index.d.ts.map +1 -0
  208. package/lib/typescript/module/components/ScrollViewGesture.d.ts +18 -0
  209. package/lib/typescript/module/components/ScrollViewGesture.d.ts.map +1 -0
  210. package/lib/typescript/module/constants/index.d.ts +9 -0
  211. package/lib/typescript/module/constants/index.d.ts.map +1 -0
  212. package/lib/typescript/module/hooks/useAutoPlay.d.ts +12 -0
  213. package/lib/typescript/module/hooks/useAutoPlay.d.ts.map +1 -0
  214. package/lib/typescript/module/hooks/useCarouselController.d.ts +29 -0
  215. package/lib/typescript/module/hooks/useCarouselController.d.ts.map +1 -0
  216. package/lib/typescript/module/hooks/useCheckMounted.d.ts +3 -0
  217. package/lib/typescript/module/hooks/useCheckMounted.d.ts.map +1 -0
  218. package/lib/typescript/module/hooks/useCommonVariables.d.ts +18 -0
  219. package/lib/typescript/module/hooks/useCommonVariables.d.ts.map +1 -0
  220. package/lib/typescript/module/hooks/useInitProps.d.ts +25 -0
  221. package/lib/typescript/module/hooks/useInitProps.d.ts.map +1 -0
  222. package/lib/typescript/module/hooks/useLayoutConfig.d.ts +8 -0
  223. package/lib/typescript/module/hooks/useLayoutConfig.d.ts.map +1 -0
  224. package/lib/typescript/module/hooks/useOffsetX.d.ts +13 -0
  225. package/lib/typescript/module/hooks/useOffsetX.d.ts.map +1 -0
  226. package/lib/typescript/module/hooks/useOnProgressChange.d.ts +12 -0
  227. package/lib/typescript/module/hooks/useOnProgressChange.d.ts.map +1 -0
  228. package/lib/typescript/module/hooks/usePanGestureProxy.d.ts +11 -0
  229. package/lib/typescript/module/hooks/usePanGestureProxy.d.ts.map +1 -0
  230. package/lib/typescript/module/hooks/usePropsErrorBoundary.d.ts +3 -0
  231. package/lib/typescript/module/hooks/usePropsErrorBoundary.d.ts.map +1 -0
  232. package/lib/typescript/module/hooks/useUpdateGestureConfig.d.ts +9 -0
  233. package/lib/typescript/module/hooks/useUpdateGestureConfig.d.ts.map +1 -0
  234. package/lib/typescript/module/hooks/useVisibleRanges.d.ts +22 -0
  235. package/lib/typescript/module/hooks/useVisibleRanges.d.ts.map +1 -0
  236. package/lib/typescript/module/index.d.ts +4 -0
  237. package/lib/typescript/module/index.d.ts.map +1 -0
  238. package/lib/typescript/module/layouts/index.d.ts +10 -0
  239. package/lib/typescript/module/layouts/index.d.ts.map +1 -0
  240. package/lib/typescript/module/layouts/normal.d.ts +15 -0
  241. package/lib/typescript/module/layouts/normal.d.ts.map +1 -0
  242. package/lib/typescript/module/layouts/parallax.d.ts +27 -0
  243. package/lib/typescript/module/layouts/parallax.d.ts.map +1 -0
  244. package/lib/typescript/module/layouts/stack.d.ts +10 -0
  245. package/lib/typescript/module/layouts/stack.d.ts.map +1 -0
  246. package/lib/typescript/module/package.json +1 -0
  247. package/lib/typescript/module/public-types.d.ts +171 -0
  248. package/lib/typescript/module/public-types.d.ts.map +1 -0
  249. package/lib/typescript/module/store/index.d.ts +35 -0
  250. package/lib/typescript/module/store/index.d.ts.map +1 -0
  251. package/lib/typescript/module/types.d.ts +15 -0
  252. package/lib/typescript/module/types.d.ts.map +1 -0
  253. package/lib/typescript/module/utils/carousel-direction.d.ts +9 -0
  254. package/lib/typescript/module/utils/carousel-direction.d.ts.map +1 -0
  255. package/lib/typescript/module/utils/carousel-math.d.ts +28 -0
  256. package/lib/typescript/module/utils/carousel-math.d.ts.map +1 -0
  257. package/lib/typescript/module/utils/compute-gesture-translation.d.ts +9 -0
  258. package/lib/typescript/module/utils/compute-gesture-translation.d.ts.map +1 -0
  259. package/lib/typescript/module/utils/compute-offset-if-size-changed.d.ts +6 -0
  260. package/lib/typescript/module/utils/compute-offset-if-size-changed.d.ts.map +1 -0
  261. package/lib/typescript/module/utils/computed-with-auto-fill-data.d.ts +23 -0
  262. package/lib/typescript/module/utils/computed-with-auto-fill-data.d.ts.map +1 -0
  263. package/lib/typescript/module/utils/deal-with-animation.d.ts +3 -0
  264. package/lib/typescript/module/utils/deal-with-animation.d.ts.map +1 -0
  265. package/lib/typescript/module/utils/log.d.ts +7 -0
  266. package/lib/typescript/module/utils/log.d.ts.map +1 -0
  267. package/lib/typescript/module/utils/sanitize-animation-style.d.ts +3 -0
  268. package/lib/typescript/module/utils/sanitize-animation-style.d.ts.map +1 -0
  269. package/package.json +31 -6
  270. package/scripts/codemods/v5.mjs +502 -0
  271. package/src/components/Carousel.tsx +5 -5
  272. package/src/components/CarouselLayout.tsx +52 -89
  273. package/src/components/ItemLayout.tsx +57 -48
  274. package/src/components/ItemRenderer.tsx +29 -18
  275. package/src/components/Pagination/PaginationItem.tsx +166 -0
  276. package/src/components/Pagination/index.tsx +105 -6
  277. package/src/components/ScrollViewGesture.tsx +92 -177
  278. package/src/hooks/useAutoPlay.ts +23 -18
  279. package/src/hooks/useCarouselController.tsx +196 -342
  280. package/src/hooks/useCommonVariables.ts +159 -71
  281. package/src/hooks/useInitProps.ts +161 -71
  282. package/src/hooks/useLayoutConfig.ts +21 -12
  283. package/src/hooks/useOffsetX.ts +6 -6
  284. package/src/hooks/useOnProgressChange.ts +23 -48
  285. package/src/hooks/usePanGestureProxy.ts +8 -8
  286. package/src/hooks/usePropsErrorBoundary.ts +32 -90
  287. package/src/hooks/useUpdateGestureConfig.ts +6 -3
  288. package/src/hooks/useVisibleRanges.tsx +6 -6
  289. package/src/index.tsx +14 -9
  290. package/src/layouts/index.tsx +0 -2
  291. package/src/layouts/normal.ts +14 -4
  292. package/src/layouts/parallax.ts +32 -59
  293. package/src/layouts/stack.ts +30 -70
  294. package/src/public-types.ts +209 -0
  295. package/src/store/index.tsx +7 -7
  296. package/src/types.ts +30 -322
  297. package/src/utils/carousel-direction.ts +39 -0
  298. package/src/utils/carousel-math.ts +156 -0
  299. package/src/utils/computed-with-auto-fill-data.ts +2 -2
  300. package/src/utils/deal-with-animation.ts +11 -9
  301. package/lib/commonjs/components/Pagination/Basic/PaginationItem.js +0 -2
  302. package/lib/commonjs/components/Pagination/Basic/PaginationItem.js.map +0 -1
  303. package/lib/commonjs/components/Pagination/Basic/index.js +0 -2
  304. package/lib/commonjs/components/Pagination/Basic/index.js.map +0 -1
  305. package/lib/commonjs/components/Pagination/Custom/PaginationItem.js +0 -2
  306. package/lib/commonjs/components/Pagination/Custom/PaginationItem.js.map +0 -1
  307. package/lib/commonjs/components/Pagination/Custom/index.js +0 -2
  308. package/lib/commonjs/components/Pagination/Custom/index.js.map +0 -1
  309. package/lib/commonjs/utils/compute-offset-if-data-changed.js +0 -2
  310. package/lib/commonjs/utils/compute-offset-if-data-changed.js.map +0 -1
  311. package/lib/commonjs/utils/handleroffset-direction.js +0 -2
  312. package/lib/commonjs/utils/handleroffset-direction.js.map +0 -1
  313. package/lib/module/components/Pagination/Basic/PaginationItem.js +0 -2
  314. package/lib/module/components/Pagination/Basic/PaginationItem.js.map +0 -1
  315. package/lib/module/components/Pagination/Basic/index.js +0 -2
  316. package/lib/module/components/Pagination/Basic/index.js.map +0 -1
  317. package/lib/module/components/Pagination/Custom/PaginationItem.js +0 -2
  318. package/lib/module/components/Pagination/Custom/PaginationItem.js.map +0 -1
  319. package/lib/module/components/Pagination/Custom/index.js +0 -2
  320. package/lib/module/components/Pagination/Custom/index.js.map +0 -1
  321. package/lib/module/utils/compute-offset-if-data-changed.js +0 -2
  322. package/lib/module/utils/compute-offset-if-data-changed.js.map +0 -1
  323. package/lib/module/utils/handleroffset-direction.js +0 -2
  324. package/lib/module/utils/handleroffset-direction.js.map +0 -1
  325. package/lib/typescript/components/Carousel.d.ts +0 -8
  326. package/lib/typescript/components/Carousel.d.ts.map +0 -1
  327. package/lib/typescript/components/CarouselLayout.d.ts.map +0 -1
  328. package/lib/typescript/components/ItemLayout.d.ts +0 -20
  329. package/lib/typescript/components/ItemLayout.d.ts.map +0 -1
  330. package/lib/typescript/components/ItemRenderer.d.ts +0 -23
  331. package/lib/typescript/components/ItemRenderer.d.ts.map +0 -1
  332. package/lib/typescript/components/LazyView.d.ts.map +0 -1
  333. package/lib/typescript/components/Pagination/Basic/PaginationItem.d.ts +0 -29
  334. package/lib/typescript/components/Pagination/Basic/PaginationItem.d.ts.map +0 -1
  335. package/lib/typescript/components/Pagination/Basic/index.d.ts +0 -23
  336. package/lib/typescript/components/Pagination/Basic/index.d.ts.map +0 -1
  337. package/lib/typescript/components/Pagination/Custom/PaginationItem.d.ts +0 -35
  338. package/lib/typescript/components/Pagination/Custom/PaginationItem.d.ts.map +0 -1
  339. package/lib/typescript/components/Pagination/Custom/index.d.ts +0 -26
  340. package/lib/typescript/components/Pagination/Custom/index.d.ts.map +0 -1
  341. package/lib/typescript/components/Pagination/index.d.ts +0 -5
  342. package/lib/typescript/components/Pagination/index.d.ts.map +0 -1
  343. package/lib/typescript/components/ScrollViewGesture.d.ts.map +0 -1
  344. package/lib/typescript/constants/index.d.ts.map +0 -1
  345. package/lib/typescript/hooks/useAutoPlay.d.ts +0 -12
  346. package/lib/typescript/hooks/useAutoPlay.d.ts.map +0 -1
  347. package/lib/typescript/hooks/useCarouselController.d.ts +0 -28
  348. package/lib/typescript/hooks/useCarouselController.d.ts.map +0 -1
  349. package/lib/typescript/hooks/useCheckMounted.d.ts.map +0 -1
  350. package/lib/typescript/hooks/useCommonVariables.d.ts +0 -13
  351. package/lib/typescript/hooks/useCommonVariables.d.ts.map +0 -1
  352. package/lib/typescript/hooks/useInitProps.d.ts +0 -10
  353. package/lib/typescript/hooks/useInitProps.d.ts.map +0 -1
  354. package/lib/typescript/hooks/useLayoutConfig.d.ts +0 -8
  355. package/lib/typescript/hooks/useLayoutConfig.d.ts.map +0 -1
  356. package/lib/typescript/hooks/useOffsetX.d.ts +0 -13
  357. package/lib/typescript/hooks/useOffsetX.d.ts.map +0 -1
  358. package/lib/typescript/hooks/useOnProgressChange.d.ts +0 -11
  359. package/lib/typescript/hooks/useOnProgressChange.d.ts.map +0 -1
  360. package/lib/typescript/hooks/usePanGestureProxy.d.ts.map +0 -1
  361. package/lib/typescript/hooks/usePropsErrorBoundary.d.ts +0 -5
  362. package/lib/typescript/hooks/usePropsErrorBoundary.d.ts.map +0 -1
  363. package/lib/typescript/hooks/useUpdateGestureConfig.d.ts +0 -6
  364. package/lib/typescript/hooks/useUpdateGestureConfig.d.ts.map +0 -1
  365. package/lib/typescript/hooks/useVisibleRanges.d.ts.map +0 -1
  366. package/lib/typescript/index.d.ts +0 -7
  367. package/lib/typescript/index.d.ts.map +0 -1
  368. package/lib/typescript/layouts/index.d.ts.map +0 -1
  369. package/lib/typescript/layouts/normal.d.ts +0 -13
  370. package/lib/typescript/layouts/normal.d.ts.map +0 -1
  371. package/lib/typescript/layouts/parallax.d.ts +0 -47
  372. package/lib/typescript/layouts/parallax.d.ts.map +0 -1
  373. package/lib/typescript/layouts/stack.d.ts +0 -38
  374. package/lib/typescript/layouts/stack.d.ts.map +0 -1
  375. package/lib/typescript/store/index.d.ts.map +0 -1
  376. package/lib/typescript/types.d.ts +0 -302
  377. package/lib/typescript/types.d.ts.map +0 -1
  378. package/lib/typescript/utils/compute-gesture-translation.d.ts.map +0 -1
  379. package/lib/typescript/utils/compute-offset-if-data-changed.d.ts +0 -9
  380. package/lib/typescript/utils/compute-offset-if-data-changed.d.ts.map +0 -1
  381. package/lib/typescript/utils/compute-offset-if-size-changed.d.ts.map +0 -1
  382. package/lib/typescript/utils/computed-with-auto-fill-data.d.ts.map +0 -1
  383. package/lib/typescript/utils/deal-with-animation.d.ts +0 -3
  384. package/lib/typescript/utils/deal-with-animation.d.ts.map +0 -1
  385. package/lib/typescript/utils/handleroffset-direction.d.ts +0 -4
  386. package/lib/typescript/utils/handleroffset-direction.d.ts.map +0 -1
  387. package/lib/typescript/utils/log.d.ts.map +0 -1
  388. package/lib/typescript/utils/sanitize-animation-style.d.ts.map +0 -1
  389. package/src/components/Pagination/Basic/PaginationItem.tsx +0 -149
  390. package/src/components/Pagination/Basic/index.tsx +0 -98
  391. package/src/components/Pagination/Custom/PaginationItem.tsx +0 -166
  392. package/src/components/Pagination/Custom/index.tsx +0 -111
  393. package/src/utils/compute-offset-if-data-changed.ts +0 -44
  394. package/src/utils/handleroffset-direction.ts +0 -18
  395. /package/lib/typescript/{components → commonjs/components}/LazyView.d.ts +0 -0
  396. /package/lib/typescript/{constants → commonjs/constants}/index.d.ts +0 -0
  397. /package/lib/typescript/{hooks → commonjs/hooks}/useCheckMounted.d.ts +0 -0
  398. /package/lib/typescript/{utils → commonjs/utils}/compute-gesture-translation.d.ts +0 -0
  399. /package/lib/typescript/{utils → commonjs/utils}/compute-offset-if-size-changed.d.ts +0 -0
  400. /package/lib/typescript/{utils → commonjs/utils}/computed-with-auto-fill-data.d.ts +0 -0
  401. /package/lib/typescript/{utils → commonjs/utils}/log.d.ts +0 -0
  402. /package/lib/typescript/{utils → commonjs/utils}/sanitize-animation-style.d.ts +0 -0
@@ -0,0 +1,28 @@
1
+ export declare function positiveModulo(value: number, divisor: number): number;
2
+ export declare function getLogicalProgress(offset: number, itemSize: number): number;
3
+ export declare function getOffsetForLogicalPage(page: number, itemSize: number): number;
4
+ export declare function getNearestLogicalPage(offset: number, itemSize: number): number;
5
+ export declare function getSettledRawIndex(progress: number, count: number): number;
6
+ export declare function getNearestLoopPosition(rawIndex: number, progress: number, count: number): number;
7
+ export declare function getRelativeProgress(params: {
8
+ rawIndex: number;
9
+ progress: number;
10
+ count: number;
11
+ loop: boolean;
12
+ }): number;
13
+ export declare function getBoundedLoopOffset(offset: number, itemSize: number, count: number): number;
14
+ export declare function getShortestLoopTargetPage(params: {
15
+ currentPage: number;
16
+ targetIndex: number;
17
+ count: number;
18
+ }): number;
19
+ export declare function reconcileOffsetAfterDataChange(params: {
20
+ offset: number;
21
+ itemSize: number;
22
+ previousCount: number;
23
+ nextCount: number;
24
+ defaultIndex: number;
25
+ loop: boolean;
26
+ retainedIndex?: number | undefined;
27
+ }): number;
28
+ //# sourceMappingURL=carousel-math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carousel-math.d.ts","sourceRoot":"","sources":["../../../../src/utils/carousel-math.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAOrE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAK3E;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAM9E;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAI9E;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAK1E;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAyBhG;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf,GAAG,MAAM,CAQT;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAe5F;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CAoBT;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,GAAG,MAAM,CAyBT"}
@@ -0,0 +1,9 @@
1
+ export declare function computeGestureTranslation(options: {
2
+ loop: boolean;
3
+ overscrollEnabled: boolean;
4
+ currentTranslation: number;
5
+ panOffset: number;
6
+ panTranslation: number;
7
+ max: number;
8
+ }): number;
9
+ //# sourceMappingURL=compute-gesture-translation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compute-gesture-translation.d.ts","sourceRoot":"","sources":["../../../../src/utils/compute-gesture-translation.ts"],"names":[],"mappings":"AAAA,wBAAgB,yBAAyB,CAAC,OAAO,EAAE;IACjD,IAAI,EAAE,OAAO,CAAC;IACd,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,MAAM,CAqBT"}
@@ -0,0 +1,6 @@
1
+ export declare function computeOffsetIfSizeChanged(params: {
2
+ handlerOffset: number;
3
+ prevSize: number;
4
+ size: number;
5
+ }): number;
6
+ //# sourceMappingURL=compute-offset-if-size-changed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compute-offset-if-size-changed.d.ts","sourceRoot":"","sources":["../../../../src/utils/compute-offset-if-size-changed.ts"],"names":[],"mappings":"AAAA,wBAAgB,0BAA0B,CAAC,MAAM,EAAE;IACjD,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,UASA"}
@@ -0,0 +1,23 @@
1
+ type BaseParams<T extends object> = {
2
+ autoFillData: boolean;
3
+ loop: boolean;
4
+ } & T;
5
+ export declare function convertToSharedIndex(params: BaseParams<{
6
+ index: number;
7
+ rawDataLength: number;
8
+ }>): number;
9
+ export declare function computedOffsetXValueWithAutoFillData(params: BaseParams<{
10
+ rawDataLength: number;
11
+ value: number;
12
+ size: number;
13
+ }>): number;
14
+ export declare function computedRealIndexWithAutoFillData(params: BaseParams<{
15
+ index: number;
16
+ dataLength: number;
17
+ }>): number;
18
+ export declare function computedFillDataWithAutoFillData<T>(params: BaseParams<{
19
+ data: T[];
20
+ dataLength: number;
21
+ }>): T[];
22
+ export {};
23
+ //# sourceMappingURL=computed-with-auto-fill-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computed-with-auto-fill-data.d.ts","sourceRoot":"","sources":["../../../../src/utils/computed-with-auto-fill-data.ts"],"names":[],"mappings":"AASA,KAAK,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;CACf,GAAG,CAAC,CAAC;AAEN,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,UAchG;AAED,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,UAAU,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,UAgBH;AAED,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,UAcH;AAED,wBAAgB,gCAAgC,CAAC,CAAC,EAChD,MAAM,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,GACD,CAAC,EAAE,CAaL"}
@@ -0,0 +1,3 @@
1
+ import type { CarouselAnimation } from "../types";
2
+ export declare function dealWithAnimation(animation: CarouselAnimation): (value: number, cb: (isFinished: boolean) => void) => number;
3
+ //# sourceMappingURL=deal-with-animation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deal-with-animation.d.ts","sourceRoot":"","sources":["../../../../src/utils/deal-with-animation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,iBAAiB,GAC3B,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,KAAK,MAAM,CAY9D"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * In worklet
3
+ * e.g. scheduleOnRN(lop, ...);
4
+ */
5
+ export declare function log(...msg: any): void;
6
+ export declare function round(number: number): number;
7
+ //# sourceMappingURL=log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/utils/log.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,QAE9B;AAED,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,UAGnC"}
@@ -0,0 +1,3 @@
1
+ import type { ViewStyle } from "react-native";
2
+ export declare function sanitizeAnimationStyle(style: ViewStyle): ViewStyle;
3
+ //# sourceMappingURL=sanitize-animation-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitize-animation-style.d.ts","sourceRoot":"","sources":["../../../../src/utils/sanitize-animation-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAelE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-reanimated-carousel",
3
- "version": "5.0.0-beta.8",
3
+ "version": "5.1.0",
4
4
  "packageManager": "yarn@4.0.2",
5
5
  "description": "A performant, customizable carousel for React Native powered by Reanimated.",
6
6
  "author": "Doho <zhaodonghao586@outlook.com> (https://github.com/dohooo)",
@@ -21,11 +21,30 @@
21
21
  "main": "lib/commonjs/index",
22
22
  "module": "lib/module/index",
23
23
  "react-native": "src/index.tsx",
24
- "types": "lib/typescript/index.d.ts",
24
+ "types": "lib/typescript/module/index.d.ts",
25
25
  "source": "src/index",
26
+ "bin": {
27
+ "rnrc-v5-codemod": "scripts/codemods/v5.mjs"
28
+ },
29
+ "exports": {
30
+ ".": {
31
+ "react-native": "./src/index.tsx",
32
+ "import": {
33
+ "types": "./lib/typescript/module/index.d.ts",
34
+ "default": "./lib/module/index.js"
35
+ },
36
+ "require": {
37
+ "types": "./lib/typescript/commonjs/index.d.ts",
38
+ "default": "./lib/commonjs/index.js"
39
+ },
40
+ "default": "./lib/module/index.js"
41
+ },
42
+ "./package.json": "./package.json"
43
+ },
26
44
  "files": [
27
45
  "lib",
28
46
  "src",
47
+ "scripts/codemods/v5.mjs",
29
48
  "!src/**/*.test.ts",
30
49
  "!src/**/*.test.tsx"
31
50
  ],
@@ -35,7 +54,8 @@
35
54
  "test:watch": "jest --watch",
36
55
  "test:coverage": "jest --coverage",
37
56
  "test:ci": "jest --coverage --ci --runInBand --reporters=default --reporters=jest-junit",
38
- "types": "tsc --noEmit",
57
+ "types": "tsc --noEmit && yarn types:public",
58
+ "types:public": "tsc -p tsconfig.type-tests.json",
39
59
  "lint": "biome check .",
40
60
  "lint:fix": "biome check --write .",
41
61
  "format": "biome format .",
@@ -49,6 +69,9 @@
49
69
  "e2e:comprehensive": "APP_ID=${APP_ID:-com.react-native-reanimated-carousel.example} maestro test e2e/",
50
70
  "compat:expo": "bash scripts/test-packed-expo-consumer.sh",
51
71
  "web:smoke": "playwright test --config=playwright.config.ts",
72
+ "web:packed-smoke": "playwright test --config=playwright.config.ts e2e-web/packed-package.spec.ts",
73
+ "package:check": "node scripts/check-package-entries.mjs",
74
+ "package:packed-check": "node scripts/check-packed-package.mjs",
52
75
  "changeset:check": "node scripts/check-changeset-style.mjs"
53
76
  },
54
77
  "resolutions": {
@@ -60,7 +83,7 @@
60
83
  "peerDependencies": {
61
84
  "react": ">=18.0.0",
62
85
  "react-native": ">=0.80.0",
63
- "react-native-gesture-handler": ">=2.9.0",
86
+ "react-native-gesture-handler": ">=2.9.0 <4.0.0",
64
87
  "react-native-reanimated": ">=4.1.0",
65
88
  "react-native-worklets": ">=0.5.0"
66
89
  },
@@ -135,14 +158,16 @@
135
158
  "commonjs",
136
159
  {
137
160
  "babelrc": false,
138
- "configFile": "./babel.config.js"
161
+ "configFile": "./babel.config.js",
162
+ "esm": true
139
163
  }
140
164
  ],
141
165
  [
142
166
  "module",
143
167
  {
144
168
  "babelrc": false,
145
- "configFile": "./babel.config.js"
169
+ "configFile": "./babel.config.js",
170
+ "esm": true
146
171
  }
147
172
  ],
148
173
  [