react-native-reanimated-carousel 4.0.2 → 5.0.0-beta.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 (343) hide show
  1. package/README.md +9 -0
  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/LazyView.js +1 -1
  11. package/lib/commonjs/components/LazyView.js.map +1 -1
  12. package/lib/commonjs/components/Pagination/Basic/PaginationItem.js +1 -1
  13. package/lib/commonjs/components/Pagination/Basic/PaginationItem.js.map +1 -1
  14. package/lib/commonjs/components/Pagination/Basic/index.js +1 -1
  15. package/lib/commonjs/components/Pagination/Basic/index.js.map +1 -1
  16. package/lib/commonjs/components/Pagination/Custom/PaginationItem.js +1 -1
  17. package/lib/commonjs/components/Pagination/Custom/PaginationItem.js.map +1 -1
  18. package/lib/commonjs/components/Pagination/Custom/index.js +1 -1
  19. package/lib/commonjs/components/Pagination/Custom/index.js.map +1 -1
  20. package/lib/commonjs/components/Pagination/index.js +1 -1
  21. package/lib/commonjs/components/Pagination/index.js.map +1 -1
  22. package/lib/commonjs/components/ScrollViewGesture.js +1 -1
  23. package/lib/commonjs/components/ScrollViewGesture.js.map +1 -1
  24. package/lib/commonjs/constants/index.js +1 -1
  25. package/lib/commonjs/constants/index.js.map +1 -1
  26. package/lib/commonjs/hooks/useAutoPlay.js +1 -1
  27. package/lib/commonjs/hooks/useAutoPlay.js.map +1 -1
  28. package/lib/commonjs/hooks/useCarouselController.js +1 -1
  29. package/lib/commonjs/hooks/useCarouselController.js.map +1 -1
  30. package/lib/commonjs/hooks/useCheckMounted.js.map +1 -1
  31. package/lib/commonjs/hooks/useCommonVariables.js +1 -1
  32. package/lib/commonjs/hooks/useCommonVariables.js.map +1 -1
  33. package/lib/commonjs/hooks/useInitProps.js +1 -1
  34. package/lib/commonjs/hooks/useInitProps.js.map +1 -1
  35. package/lib/commonjs/hooks/useLayoutConfig.js.map +1 -1
  36. package/lib/commonjs/hooks/useOffsetX.js +1 -1
  37. package/lib/commonjs/hooks/useOffsetX.js.map +1 -1
  38. package/lib/commonjs/hooks/useOnProgressChange.js +1 -1
  39. package/lib/commonjs/hooks/useOnProgressChange.js.map +1 -1
  40. package/lib/commonjs/hooks/usePanGestureProxy.js +1 -1
  41. package/lib/commonjs/hooks/usePanGestureProxy.js.map +1 -1
  42. package/lib/commonjs/hooks/usePropsErrorBoundary.js +1 -1
  43. package/lib/commonjs/hooks/usePropsErrorBoundary.js.map +1 -1
  44. package/lib/commonjs/hooks/useUpdateGestureConfig.js +1 -1
  45. package/lib/commonjs/hooks/useUpdateGestureConfig.js.map +1 -1
  46. package/lib/commonjs/hooks/useVisibleRanges.js +1 -1
  47. package/lib/commonjs/hooks/useVisibleRanges.js.map +1 -1
  48. package/lib/commonjs/index.js +1 -1
  49. package/lib/commonjs/index.js.map +1 -1
  50. package/lib/commonjs/layouts/index.js +1 -1
  51. package/lib/commonjs/layouts/index.js.map +1 -1
  52. package/lib/commonjs/layouts/normal.js +1 -1
  53. package/lib/commonjs/layouts/normal.js.map +1 -1
  54. package/lib/commonjs/layouts/parallax.js +1 -1
  55. package/lib/commonjs/layouts/parallax.js.map +1 -1
  56. package/lib/commonjs/layouts/stack.js +1 -1
  57. package/lib/commonjs/layouts/stack.js.map +1 -1
  58. package/lib/commonjs/package.json +1 -0
  59. package/lib/commonjs/store/index.js +1 -1
  60. package/lib/commonjs/store/index.js.map +1 -1
  61. package/lib/commonjs/types.js.map +1 -1
  62. package/lib/commonjs/utils/compute-offset-if-data-changed.js +1 -1
  63. package/lib/commonjs/utils/compute-offset-if-data-changed.js.map +1 -1
  64. package/lib/commonjs/utils/compute-offset-if-size-changed.js +1 -1
  65. package/lib/commonjs/utils/compute-offset-if-size-changed.js.map +1 -1
  66. package/lib/commonjs/utils/computed-with-auto-fill-data.js +1 -1
  67. package/lib/commonjs/utils/computed-with-auto-fill-data.js.map +1 -1
  68. package/lib/commonjs/utils/deal-with-animation.js +1 -1
  69. package/lib/commonjs/utils/deal-with-animation.js.map +1 -1
  70. package/lib/commonjs/utils/handleroffset-direction.js +1 -1
  71. package/lib/commonjs/utils/handleroffset-direction.js.map +1 -1
  72. package/lib/commonjs/utils/log.js +1 -1
  73. package/lib/commonjs/utils/log.js.map +1 -1
  74. package/lib/module/components/Carousel.js +1 -25
  75. package/lib/module/components/Carousel.js.map +1 -1
  76. package/lib/module/components/CarouselLayout.js +1 -181
  77. package/lib/module/components/CarouselLayout.js.map +1 -1
  78. package/lib/module/components/ItemLayout.js +1 -79
  79. package/lib/module/components/ItemLayout.js.map +1 -1
  80. package/lib/module/components/ItemRenderer.js +1 -61
  81. package/lib/module/components/ItemRenderer.js.map +1 -1
  82. package/lib/module/components/LazyView.js +1 -9
  83. package/lib/module/components/LazyView.js.map +1 -1
  84. package/lib/module/components/Pagination/Basic/PaginationItem.js +1 -65
  85. package/lib/module/components/Pagination/Basic/PaginationItem.js.map +1 -1
  86. package/lib/module/components/Pagination/Basic/index.js +1 -39
  87. package/lib/module/components/Pagination/Basic/index.js.map +1 -1
  88. package/lib/module/components/Pagination/Custom/PaginationItem.js +1 -70
  89. package/lib/module/components/Pagination/Custom/PaginationItem.js.map +1 -1
  90. package/lib/module/components/Pagination/Custom/index.js +1 -47
  91. package/lib/module/components/Pagination/Custom/index.js.map +1 -1
  92. package/lib/module/components/Pagination/index.js +1 -6
  93. package/lib/module/components/Pagination/index.js.map +1 -1
  94. package/lib/module/components/ScrollViewGesture.js +1 -336
  95. package/lib/module/components/ScrollViewGesture.js.map +1 -1
  96. package/lib/module/constants/index.js +1 -11
  97. package/lib/module/constants/index.js.map +1 -1
  98. package/lib/module/hooks/useAutoPlay.js +1 -44
  99. package/lib/module/hooks/useAutoPlay.js.map +1 -1
  100. package/lib/module/hooks/useCarouselController.js +1 -268
  101. package/lib/module/hooks/useCarouselController.js.map +1 -1
  102. package/lib/module/hooks/useCheckMounted.js +1 -11
  103. package/lib/module/hooks/useCheckMounted.js.map +1 -1
  104. package/lib/module/hooks/useCommonVariables.js +1 -91
  105. package/lib/module/hooks/useCommonVariables.js.map +1 -1
  106. package/lib/module/hooks/useInitProps.js +1 -65
  107. package/lib/module/hooks/useInitProps.js.map +1 -1
  108. package/lib/module/hooks/useLayoutConfig.js +1 -28
  109. package/lib/module/hooks/useLayoutConfig.js.map +1 -1
  110. package/lib/module/hooks/useOffsetX.js +1 -41
  111. package/lib/module/hooks/useOffsetX.js.map +1 -1
  112. package/lib/module/hooks/useOnProgressChange.js +1 -37
  113. package/lib/module/hooks/useOnProgressChange.js.map +1 -1
  114. package/lib/module/hooks/usePanGestureProxy.js +1 -104
  115. package/lib/module/hooks/usePanGestureProxy.js.map +1 -1
  116. package/lib/module/hooks/usePropsErrorBoundary.js +1 -26
  117. package/lib/module/hooks/usePropsErrorBoundary.js.map +1 -1
  118. package/lib/module/hooks/useUpdateGestureConfig.js +1 -9
  119. package/lib/module/hooks/useUpdateGestureConfig.js.map +1 -1
  120. package/lib/module/hooks/useVisibleRanges.js +1 -62
  121. package/lib/module/hooks/useVisibleRanges.js.map +1 -1
  122. package/lib/module/index.js +1 -3
  123. package/lib/module/index.js.map +1 -1
  124. package/lib/module/layouts/index.js +1 -9
  125. package/lib/module/layouts/index.js.map +1 -1
  126. package/lib/module/layouts/normal.js +1 -19
  127. package/lib/module/layouts/normal.js.map +1 -1
  128. package/lib/module/layouts/parallax.js +1 -30
  129. package/lib/module/layouts/parallax.js.map +1 -1
  130. package/lib/module/layouts/stack.js +1 -198
  131. package/lib/module/layouts/stack.js.map +1 -1
  132. package/lib/module/store/index.js +1 -48
  133. package/lib/module/store/index.js.map +1 -1
  134. package/lib/module/types.js +1 -1
  135. package/lib/module/types.js.map +1 -1
  136. package/lib/module/utils/compute-offset-if-data-changed.js +1 -42
  137. package/lib/module/utils/compute-offset-if-data-changed.js.map +1 -1
  138. package/lib/module/utils/compute-offset-if-size-changed.js +1 -10
  139. package/lib/module/utils/compute-offset-if-size-changed.js.map +1 -1
  140. package/lib/module/utils/computed-with-auto-fill-data.js +1 -109
  141. package/lib/module/utils/computed-with-auto-fill-data.js.map +1 -1
  142. package/lib/module/utils/deal-with-animation.js +1 -12
  143. package/lib/module/utils/deal-with-animation.js.map +1 -1
  144. package/lib/module/utils/handleroffset-direction.js +1 -8
  145. package/lib/module/utils/handleroffset-direction.js.map +1 -1
  146. package/lib/module/utils/log.js +1 -12
  147. package/lib/module/utils/log.js.map +1 -1
  148. package/lib/typescript/components/Carousel.d.ts +6 -2
  149. package/lib/typescript/components/Carousel.d.ts.map +1 -0
  150. package/lib/typescript/components/CarouselLayout.d.ts +1 -0
  151. package/lib/typescript/components/CarouselLayout.d.ts.map +1 -0
  152. package/lib/typescript/components/ItemLayout.d.ts +2 -2
  153. package/lib/typescript/components/ItemLayout.d.ts.map +1 -0
  154. package/lib/typescript/components/ItemRenderer.d.ts +1 -0
  155. package/lib/typescript/components/ItemRenderer.d.ts.map +1 -0
  156. package/lib/typescript/components/LazyView.d.ts +1 -0
  157. package/lib/typescript/components/LazyView.d.ts.map +1 -0
  158. package/lib/typescript/components/Pagination/Basic/PaginationItem.d.ts +4 -2
  159. package/lib/typescript/components/Pagination/Basic/PaginationItem.d.ts.map +1 -0
  160. package/lib/typescript/components/Pagination/Basic/index.d.ts +2 -0
  161. package/lib/typescript/components/Pagination/Basic/index.d.ts.map +1 -0
  162. package/lib/typescript/components/Pagination/Custom/PaginationItem.d.ts +6 -3
  163. package/lib/typescript/components/Pagination/Custom/PaginationItem.d.ts.map +1 -0
  164. package/lib/typescript/components/Pagination/Custom/index.d.ts +6 -3
  165. package/lib/typescript/components/Pagination/Custom/index.d.ts.map +1 -0
  166. package/lib/typescript/components/Pagination/index.d.ts +1 -0
  167. package/lib/typescript/components/Pagination/index.d.ts.map +1 -0
  168. package/lib/typescript/components/ScrollViewGesture.d.ts +3 -2
  169. package/lib/typescript/components/ScrollViewGesture.d.ts.map +1 -0
  170. package/lib/typescript/constants/index.d.ts +3 -2
  171. package/lib/typescript/constants/index.d.ts.map +1 -0
  172. package/lib/typescript/hooks/useAutoPlay.d.ts +2 -0
  173. package/lib/typescript/hooks/useAutoPlay.d.ts.map +1 -0
  174. package/lib/typescript/hooks/useCarouselController.d.ts +1 -0
  175. package/lib/typescript/hooks/useCarouselController.d.ts.map +1 -0
  176. package/lib/typescript/hooks/useCheckMounted.d.ts +2 -1
  177. package/lib/typescript/hooks/useCheckMounted.d.ts.map +1 -0
  178. package/lib/typescript/hooks/useCommonVariables.d.ts +7 -4
  179. package/lib/typescript/hooks/useCommonVariables.d.ts.map +1 -0
  180. package/lib/typescript/hooks/useInitProps.d.ts +2 -1
  181. package/lib/typescript/hooks/useInitProps.d.ts.map +1 -0
  182. package/lib/typescript/hooks/useLayoutConfig.d.ts +1 -0
  183. package/lib/typescript/hooks/useLayoutConfig.d.ts.map +1 -0
  184. package/lib/typescript/hooks/useOffsetX.d.ts +4 -3
  185. package/lib/typescript/hooks/useOffsetX.d.ts.map +1 -0
  186. package/lib/typescript/hooks/useOnProgressChange.d.ts +4 -2
  187. package/lib/typescript/hooks/useOnProgressChange.d.ts.map +1 -0
  188. package/lib/typescript/hooks/usePanGestureProxy.d.ts +1 -0
  189. package/lib/typescript/hooks/usePanGestureProxy.d.ts.map +1 -0
  190. package/lib/typescript/hooks/usePropsErrorBoundary.d.ts +1 -0
  191. package/lib/typescript/hooks/usePropsErrorBoundary.d.ts.map +1 -0
  192. package/lib/typescript/hooks/useUpdateGestureConfig.d.ts +1 -0
  193. package/lib/typescript/hooks/useUpdateGestureConfig.d.ts.map +1 -0
  194. package/lib/typescript/hooks/useVisibleRanges.d.ts +4 -3
  195. package/lib/typescript/hooks/useVisibleRanges.d.ts.map +1 -0
  196. package/lib/typescript/index.d.ts +1 -0
  197. package/lib/typescript/index.d.ts.map +1 -0
  198. package/lib/typescript/layouts/index.d.ts +1 -0
  199. package/lib/typescript/layouts/index.d.ts.map +1 -0
  200. package/lib/typescript/layouts/normal.d.ts +1 -0
  201. package/lib/typescript/layouts/normal.d.ts.map +1 -0
  202. package/lib/typescript/layouts/parallax.d.ts +1 -0
  203. package/lib/typescript/layouts/parallax.d.ts.map +1 -0
  204. package/lib/typescript/layouts/stack.d.ts +1 -0
  205. package/lib/typescript/layouts/stack.d.ts.map +1 -0
  206. package/lib/typescript/store/index.d.ts +3 -4
  207. package/lib/typescript/store/index.d.ts.map +1 -0
  208. package/lib/typescript/types.d.ts +9 -9
  209. package/lib/typescript/types.d.ts.map +1 -0
  210. package/lib/typescript/utils/compute-offset-if-data-changed.d.ts +1 -0
  211. package/lib/typescript/utils/compute-offset-if-data-changed.d.ts.map +1 -0
  212. package/lib/typescript/utils/compute-offset-if-size-changed.d.ts +1 -0
  213. package/lib/typescript/utils/compute-offset-if-size-changed.d.ts.map +1 -0
  214. package/lib/typescript/utils/computed-with-auto-fill-data.d.ts +1 -0
  215. package/lib/typescript/utils/computed-with-auto-fill-data.d.ts.map +1 -0
  216. package/lib/typescript/utils/deal-with-animation.d.ts +1 -0
  217. package/lib/typescript/utils/deal-with-animation.d.ts.map +1 -0
  218. package/lib/typescript/utils/handleroffset-direction.d.ts +1 -0
  219. package/lib/typescript/utils/handleroffset-direction.d.ts.map +1 -0
  220. package/lib/typescript/utils/log.d.ts +2 -1
  221. package/lib/typescript/utils/log.d.ts.map +1 -0
  222. package/package.json +146 -127
  223. package/src/components/Carousel.test.tsx +58 -47
  224. package/src/components/Carousel.tsx +7 -1
  225. package/src/components/CarouselLayout.tsx +40 -20
  226. package/src/components/ItemLayout.tsx +12 -8
  227. package/src/components/ItemRenderer.tsx +3 -2
  228. package/src/components/LazyView.test.tsx +61 -0
  229. package/src/components/Pagination/Basic/PaginationItem.tsx +24 -6
  230. package/src/components/Pagination/Basic/index.tsx +3 -0
  231. package/src/components/Pagination/Custom/PaginationItem.tsx +23 -11
  232. package/src/components/Pagination/Custom/index.tsx +7 -4
  233. package/src/components/ScrollViewGesture.tsx +47 -11
  234. package/src/components/rnr-demo.test.tsx +41 -34
  235. package/src/constants/index.ts +2 -2
  236. package/src/hooks/useAutoPlay.ts +10 -3
  237. package/src/hooks/useCarouselController.test.tsx +312 -14
  238. package/src/hooks/useCarouselController.tsx +57 -10
  239. package/src/hooks/useCommonVariables.test.tsx +219 -4
  240. package/src/hooks/useCommonVariables.ts +65 -22
  241. package/src/hooks/useInitProps.ts +3 -9
  242. package/src/hooks/useOffsetX.ts +4 -2
  243. package/src/hooks/useOnProgressChange.test.tsx +44 -9
  244. package/src/hooks/useOnProgressChange.ts +16 -11
  245. package/src/hooks/usePanGestureProxy.test.tsx +1 -1
  246. package/src/hooks/usePropsErrorBoundary.ts +18 -6
  247. package/src/hooks/useVisibleRanges.tsx +10 -8
  248. package/src/layouts/parallax.test.ts +239 -0
  249. package/src/layouts/stack.test.ts +235 -36
  250. package/src/store/index.test.tsx +314 -0
  251. package/src/store/index.tsx +2 -4
  252. package/src/types.ts +8 -9
  253. package/src/utils/compute-offset-if-data-changed.test.ts +104 -1
  254. package/src/utils/compute-offset-if-size-changed.ts +4 -0
  255. package/src/utils/computed-with-auto-fill-data.test.ts +86 -0
  256. package/src/utils/deal-with-animation.test.ts +90 -0
  257. package/src/utils/handleroffset-direction.test.ts +72 -0
  258. package/src/utils/log.test.ts +70 -0
  259. package/src/utils/log.ts +1 -1
  260. package/lib/commonjs/components/Carousel.test.js +0 -9
  261. package/lib/commonjs/components/Carousel.test.js.map +0 -1
  262. package/lib/commonjs/components/rnr-demo.test.js +0 -2
  263. package/lib/commonjs/components/rnr-demo.test.js.map +0 -1
  264. package/lib/commonjs/hooks/useAutoPlay.test.js +0 -2
  265. package/lib/commonjs/hooks/useAutoPlay.test.js.map +0 -1
  266. package/lib/commonjs/hooks/useCarouselController.test.js +0 -2
  267. package/lib/commonjs/hooks/useCarouselController.test.js.map +0 -1
  268. package/lib/commonjs/hooks/useCheckMounted.test.js +0 -2
  269. package/lib/commonjs/hooks/useCheckMounted.test.js.map +0 -1
  270. package/lib/commonjs/hooks/useCommonVariables.test.js +0 -2
  271. package/lib/commonjs/hooks/useCommonVariables.test.js.map +0 -1
  272. package/lib/commonjs/hooks/useInitProps.test.js +0 -2
  273. package/lib/commonjs/hooks/useInitProps.test.js.map +0 -1
  274. package/lib/commonjs/hooks/useLayoutConfig.test.js +0 -2
  275. package/lib/commonjs/hooks/useLayoutConfig.test.js.map +0 -1
  276. package/lib/commonjs/hooks/useOffsetX.test.js +0 -15
  277. package/lib/commonjs/hooks/useOffsetX.test.js.map +0 -1
  278. package/lib/commonjs/hooks/useOnProgressChange.test.js +0 -2
  279. package/lib/commonjs/hooks/useOnProgressChange.test.js.map +0 -1
  280. package/lib/commonjs/hooks/usePanGestureProxy.test.js +0 -2
  281. package/lib/commonjs/hooks/usePanGestureProxy.test.js.map +0 -1
  282. package/lib/commonjs/hooks/useUpdateGestureConfig.test.js +0 -2
  283. package/lib/commonjs/hooks/useUpdateGestureConfig.test.js.map +0 -1
  284. package/lib/commonjs/hooks/useVisibleRanges.test.js +0 -68
  285. package/lib/commonjs/hooks/useVisibleRanges.test.js.map +0 -1
  286. package/lib/commonjs/layouts/stack.test.js +0 -34
  287. package/lib/commonjs/layouts/stack.test.js.map +0 -1
  288. package/lib/commonjs/utils/compute-offset-if-data-changed.test.js +0 -2
  289. package/lib/commonjs/utils/compute-offset-if-data-changed.test.js.map +0 -1
  290. package/lib/commonjs/utils/compute-offset-if-size-changed.test.js +0 -2
  291. package/lib/commonjs/utils/compute-offset-if-size-changed.test.js.map +0 -1
  292. package/lib/commonjs/utils/computed-with-auto-fill-data.test.js +0 -2
  293. package/lib/commonjs/utils/computed-with-auto-fill-data.test.js.map +0 -1
  294. package/lib/commonjs/utils/deal-with-animation.test.js +0 -2
  295. package/lib/commonjs/utils/deal-with-animation.test.js.map +0 -1
  296. package/lib/commonjs/utils/handleroffset-direction.test.js +0 -2
  297. package/lib/commonjs/utils/handleroffset-direction.test.js.map +0 -1
  298. package/lib/commonjs/utils/index.test.js +0 -2
  299. package/lib/commonjs/utils/index.test.js.map +0 -1
  300. package/lib/commonjs/utils/log.test.js +0 -2
  301. package/lib/commonjs/utils/log.test.js.map +0 -1
  302. package/lib/module/components/Carousel.test.js +0 -668
  303. package/lib/module/components/Carousel.test.js.map +0 -1
  304. package/lib/module/components/rnr-demo.test.js +0 -33
  305. package/lib/module/components/rnr-demo.test.js.map +0 -1
  306. package/lib/module/hooks/useAutoPlay.test.js +0 -151
  307. package/lib/module/hooks/useAutoPlay.test.js.map +0 -1
  308. package/lib/module/hooks/useCarouselController.test.js +0 -446
  309. package/lib/module/hooks/useCarouselController.test.js.map +0 -1
  310. package/lib/module/hooks/useCheckMounted.test.js +0 -41
  311. package/lib/module/hooks/useCheckMounted.test.js.map +0 -1
  312. package/lib/module/hooks/useCommonVariables.test.js +0 -34
  313. package/lib/module/hooks/useCommonVariables.test.js.map +0 -1
  314. package/lib/module/hooks/useInitProps.test.js +0 -119
  315. package/lib/module/hooks/useInitProps.test.js.map +0 -1
  316. package/lib/module/hooks/useLayoutConfig.test.js +0 -234
  317. package/lib/module/hooks/useLayoutConfig.test.js.map +0 -1
  318. package/lib/module/hooks/useOffsetX.test.js +0 -48
  319. package/lib/module/hooks/useOffsetX.test.js.map +0 -1
  320. package/lib/module/hooks/useOnProgressChange.test.js +0 -158
  321. package/lib/module/hooks/useOnProgressChange.test.js.map +0 -1
  322. package/lib/module/hooks/usePanGestureProxy.test.js +0 -406
  323. package/lib/module/hooks/usePanGestureProxy.test.js.map +0 -1
  324. package/lib/module/hooks/useUpdateGestureConfig.test.js +0 -88
  325. package/lib/module/hooks/useUpdateGestureConfig.test.js.map +0 -1
  326. package/lib/module/hooks/useVisibleRanges.test.js +0 -157
  327. package/lib/module/hooks/useVisibleRanges.test.js.map +0 -1
  328. package/lib/module/layouts/stack.test.js +0 -50
  329. package/lib/module/layouts/stack.test.js.map +0 -1
  330. package/lib/module/utils/compute-offset-if-data-changed.test.js +0 -27
  331. package/lib/module/utils/compute-offset-if-data-changed.test.js.map +0 -1
  332. package/lib/module/utils/compute-offset-if-size-changed.test.js +0 -69
  333. package/lib/module/utils/compute-offset-if-size-changed.test.js.map +0 -1
  334. package/lib/module/utils/computed-with-auto-fill-data.test.js +0 -176
  335. package/lib/module/utils/computed-with-auto-fill-data.test.js.map +0 -1
  336. package/lib/module/utils/deal-with-animation.test.js +0 -72
  337. package/lib/module/utils/deal-with-animation.test.js.map +0 -1
  338. package/lib/module/utils/handleroffset-direction.test.js +0 -41
  339. package/lib/module/utils/handleroffset-direction.test.js.map +0 -1
  340. package/lib/module/utils/index.test.js +0 -71
  341. package/lib/module/utils/index.test.js.map +0 -1
  342. package/lib/module/utils/log.test.js +0 -55
  343. package/lib/module/utils/log.test.js.map +0 -1
package/README.md CHANGED
@@ -16,6 +16,15 @@
16
16
  - [Getting Started](https://rn-carousel.dev)
17
17
  - [Examples](https://rn-carousel.dev/Examples/summary)
18
18
 
19
+ ## 📊 Version Compatibility
20
+
21
+ | Carousel Version | Expo SDK | React Native | Reanimated | Gesture Handler | Worklets |
22
+ |------------------|----------|--------------|------------|-----------------|------------|
23
+ | **v5.0.0-beta** | **54+** | **0.80+** | **4.0.0+** | **2.9.0+** | **0.5.0+** |
24
+ | v4.x | 50-53 | 0.70.3+ | 3.0.0+ | 2.9.0+ | ❌ |
25
+ | v3.x | 47-49 | 0.66.0+ | 2.0.0+ | 2.0.0+ | ❌ |
26
+
27
+
19
28
  ## Sponsors
20
29
 
21
30
  <p align="center">
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _useCommonVariables=require("../hooks/useCommonVariables");var _useInitProps=require("../hooks/useInitProps");var _usePropsErrorBoundary=require("../hooks/usePropsErrorBoundary");var _store=require("../store");var _CarouselLayout=require("./CarouselLayout");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Carousel.tsx";var Carousel=_react.default.forwardRef(function(_props,ref){var props=(0,_useInitProps.useInitProps)(_props);var dataLength=props.dataLength;var commonVariables=(0,_useCommonVariables.useCommonVariables)(props);(0,_usePropsErrorBoundary.usePropsErrorBoundary)(Object.assign({},props,{dataLength:dataLength}));return(0,_jsxRuntime.jsx)(_store.GlobalStateProvider,{value:{props:props,common:commonVariables},children:(0,_jsxRuntime.jsx)(_CarouselLayout.CarouselLayout,{ref:ref})});});var _default=Carousel;exports.default=_default;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _useCommonVariables=require("../hooks/useCommonVariables");var _useInitProps=require("../hooks/useInitProps");var _usePropsErrorBoundary=require("../hooks/usePropsErrorBoundary");var _store=require("../store");var _CarouselLayout=require("./CarouselLayout");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Carousel.tsx";var Carousel=_react.default.forwardRef(function(_props,ref){var props=(0,_useInitProps.useInitProps)(_props);var dataLength=props.dataLength;var commonVariables=(0,_useCommonVariables.useCommonVariables)(props);(0,_usePropsErrorBoundary.usePropsErrorBoundary)(Object.assign({},props,{dataLength:dataLength}));return(0,_jsxRuntime.jsx)(_store.GlobalStateProvider,{value:{props:props,common:commonVariables},children:(0,_jsxRuntime.jsx)(_CarouselLayout.CarouselLayout,{ref:ref})});});var _default=exports.default=Carousel;
2
2
  //# sourceMappingURL=Carousel.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Carousel.tsx"],"names":["Carousel","React","forwardRef","_props","ref","props","dataLength","commonVariables","common"],"mappings":"mKAAA,oDACA,+DACA,mDACA,qEACA,+BAEA,gD,2LAEA,GAAMA,CAAAA,QAAQ,CAAGC,eAAMC,UAAN,CAAyD,SAACC,MAAD,CAASC,GAAT,CAAiB,CACzF,GAAMC,CAAAA,KAAK,CAAG,+BAAaF,MAAb,CAAd,CACA,GAAQG,CAAAA,UAAR,CAAuBD,KAAvB,CAAQC,UAAR,CACA,GAAMC,CAAAA,eAAe,CAAG,2CAAmBF,KAAnB,CAAxB,CACA,kEAA2BA,KAA3B,EAAkCC,UAAU,CAAVA,UAAlC,IAEA,MACE,oBAAC,0BAAD,EAAqB,KAAK,CAAE,CAAED,KAAK,CAALA,KAAF,CAASG,MAAM,CAAED,eAAjB,CAA5B,UACE,oBAAC,8BAAD,EAAgB,GAAG,CAAEH,GAArB,EADF,EADF,CAKD,CAXgB,CAAjB,C,aAaeJ,Q","sourcesContent":["import React from \"react\";\nimport { useCommonVariables } from \"../hooks/useCommonVariables\";\nimport { useInitProps } from \"../hooks/useInitProps\";\nimport { usePropsErrorBoundary } from \"../hooks/usePropsErrorBoundary\";\nimport { GlobalStateProvider } from \"../store\";\nimport type { ICarouselInstance, TCarouselProps } from \"../types\";\nimport { CarouselLayout } from \"./CarouselLayout\";\n\nconst Carousel = React.forwardRef<ICarouselInstance, TCarouselProps<any>>((_props, ref) => {\n const props = useInitProps(_props);\n const { dataLength } = props;\n const commonVariables = useCommonVariables(props);\n usePropsErrorBoundary({ ...props, dataLength });\n\n return (\n <GlobalStateProvider value={{ props, common: commonVariables }}>\n <CarouselLayout ref={ref} />\n </GlobalStateProvider>\n );\n});\n\nexport default Carousel as <T>(props: React.PropsWithChildren<TCarouselProps<T>>) => JSX.Element;\n"]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_useCommonVariables","_useInitProps","_usePropsErrorBoundary","_store","_CarouselLayout","_jsxRuntime","_this","_jsxFileName","Carousel","React","forwardRef","_props","ref","props","useInitProps","dataLength","commonVariables","useCommonVariables","usePropsErrorBoundary","Object","assign","jsx","GlobalStateProvider","value","common","children","CarouselLayout","_default","exports","default"],"sourceRoot":"../../../src","sources":["components/Carousel.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,mBAAA,CAAAD,OAAA,gCACA,IAAAE,aAAA,CAAAF,OAAA,0BACA,IAAAG,sBAAA,CAAAH,OAAA,mCACA,IAAAI,MAAA,CAAAJ,OAAA,aAEA,IAAAK,eAAA,CAAAL,OAAA,qBAAkD,IAAAM,WAAA,CAAAN,OAAA,0BAAAO,KAAA,MAAAC,YAAA,mHAElD,GAAM,CAAAC,QAAQ,CAAGC,cAAK,CAACC,UAAU,CAAyC,SAACC,MAAM,CAAEC,GAAG,CAAK,CACzF,GAAM,CAAAC,KAAK,CAAG,GAAAC,0BAAY,EAACH,MAAM,CAAC,CAClC,GAAQ,CAAAI,UAAU,CAAKF,KAAK,CAApBE,UAAU,CAClB,GAAM,CAAAC,eAAe,CAAG,GAAAC,sCAAkB,EAACJ,KAAK,CAAC,CACjD,GAAAK,4CAAqB,EAAAC,MAAA,CAAAC,MAAA,IAAMP,KAAK,EAAEE,UAAU,CAAVA,UAAU,EAAE,CAAC,CAE/C,MACE,GAAAV,WAAA,CAAAgB,GAAA,EAAClB,MAAA,CAAAmB,mBAAmB,EAACC,KAAK,CAAE,CAAEV,KAAK,CAALA,KAAK,CAAEW,MAAM,CAAER,eAAgB,CAAE,CAAAS,QAAA,CAC7D,GAAApB,WAAA,CAAAgB,GAAA,EAACjB,eAAA,CAAAsB,cAAc,EAACd,GAAG,CAAEA,GAAI,CAAE,CAAC,CACT,CAAC,CAE1B,CAAC,CAAC,CAAC,IAAAe,QAAA,CAAAC,OAAA,CAAAC,OAAA,CAQYrB,QAAQ","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CarouselLayout=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeGestureHandler=require("react-native-gesture-handler");var _reactNativeReanimated=require("react-native-reanimated");var _useAutoPlay2=require("../hooks/useAutoPlay");var _useCarouselController=require("../hooks/useCarouselController");var _useCommonVariables=require("../hooks/useCommonVariables");var _useLayoutConfig=require("../hooks/useLayoutConfig");var _useOnProgressChange=require("../hooks/useOnProgressChange");var _store=require("../store");var _computedWithAutoFillData=require("../utils/computed-with-auto-fill-data");var _ItemRenderer=require("./ItemRenderer");var _ScrollViewGesture=require("./ScrollViewGesture");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx";var _worklet_12600340162670_init_data={code:"function anonymous(){const{size,dataLength,handlerOffset,loop}=this.__closure;const totalSize=size*dataLength;const x=handlerOffset.value%totalSize;if(!loop)return handlerOffset.value;return Number.isNaN(x)?0:x;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AAyDkC,QAAAA,UAAA,EAAM,0DACpC,KAAMC,UAAS,CAAGC,IAAI,CAAGC,UAAzB,CACA,KAAMC,EAAC,CAAGC,aAAa,CAACC,KAAdD,CAAsBJ,SAAhC,CAEA,GAAI,CAACM,IAAL,CAAW,MAAOF,cAAa,CAACC,KAArB,CAEX,MAAOE,OAAM,CAACC,KAAPD,CAAaJ,CAAbI,EAAkB,CAAlBA,CAAsBJ,CAA7B,CAN8B\",\"names\":[\"anonymous\",\"totalSize\",\"size\",\"dataLength\",\"x\",\"handlerOffset\",\"value\",\"loop\",\"Number\",\"isNaN\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"]}",version:"3.10.1"};var _worklet_4516433107907_init_data={code:"function anonymous(){const{width,height}=this.__closure;return{width:width||\"100%\",height:height||\"100%\"};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AAmIuC,QAAAA,UAAA,EAAM,oCAOvC,OAGAC,MAAMC,KAAED,EAAM,MAHd,CADFA,MAAA,CAAAA,MAAA,QACE\",\"names\":[\"anonymous\",\"height\",\"width\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"]}",version:"3.10.1"};var CarouselLayout=_react.default.forwardRef(function(_props,ref){var _useGlobalState=(0,_store.useGlobalState)(),props=_useGlobalState.props,layout=_useGlobalState.layout;var itemDimensions=layout.itemDimensions;var testID=props.testID,loop=props.loop,autoFillData=props.autoFillData,data=props.data,dataLength=props.dataLength,rawDataLength=props.rawDataLength,mode=props.mode,style=props.style,containerStyle=props.containerStyle,width=props.width,height=props.height,vertical=props.vertical,autoPlay=props.autoPlay,windowSize=props.windowSize,autoPlayReverse=props.autoPlayReverse,autoPlayInterval=props.autoPlayInterval,scrollAnimationDuration=props.scrollAnimationDuration,withAnimation=props.withAnimation,fixedDirection=props.fixedDirection,renderItem=props.renderItem,onScrollEnd=props.onScrollEnd,onSnapToItem=props.onSnapToItem,_onScrollStart=props.onScrollStart,onProgressChange=props.onProgressChange,customAnimation=props.customAnimation,defaultIndex=props.defaultIndex;var commonVariables=(0,_useCommonVariables.useCommonVariables)(props);var size=commonVariables.size,handlerOffset=commonVariables.handlerOffset;var layoutConfig=(0,_useLayoutConfig.useLayoutConfig)(Object.assign({},props,{size:size}));var offsetX=(0,_reactNativeReanimated.useDerivedValue)(function(){var _e=[new global.Error(),-5,-27];var anonymous=function anonymous(){var totalSize=size*dataLength;var x=handlerOffset.value%totalSize;if(!loop)return handlerOffset.value;return Number.isNaN(x)?0:x;};anonymous.__closure={size:size,dataLength:dataLength,handlerOffset:handlerOffset,loop:loop};anonymous.__workletHash=12600340162670;anonymous.__initData=_worklet_12600340162670_init_data;anonymous.__stackDetails=_e;return anonymous;}(),[loop,size,dataLength,handlerOffset]);(0,_useOnProgressChange.useOnProgressChange)({autoFillData:autoFillData,loop:loop,size:size,offsetX:offsetX,rawDataLength:rawDataLength,onProgressChange:onProgressChange});var carouselController=(0,_useCarouselController.useCarouselController)({ref:ref,loop:loop,size:size,dataLength:dataLength,autoFillData:autoFillData,handlerOffset:handlerOffset,withAnimation:withAnimation,defaultIndex:defaultIndex,fixedDirection:fixedDirection,duration:scrollAnimationDuration,onScrollEnd:function onScrollEnd(){return(0,_reactNativeReanimated.runOnJS)(_onScrollEnd)();},onScrollStart:function onScrollStart(){return!!_onScrollStart&&(0,_reactNativeReanimated.runOnJS)(_onScrollStart)();}});var getSharedIndex=carouselController.getSharedIndex;var _onScrollEnd=_react.default.useCallback(function(){var _sharedIndex=Math.round(getSharedIndex());var realIndex=(0,_computedWithAutoFillData.computedRealIndexWithAutoFillData)({index:_sharedIndex,dataLength:rawDataLength,loop:loop,autoFillData:autoFillData});if(onSnapToItem)onSnapToItem(realIndex);if(onScrollEnd)onScrollEnd(realIndex);},[loop,autoFillData,rawDataLength,getSharedIndex,onSnapToItem,onScrollEnd]);var _useAutoPlay=(0,_useAutoPlay2.useAutoPlay)({autoPlay:autoPlay,autoPlayInterval:autoPlayInterval,autoPlayReverse:autoPlayReverse,carouselController:carouselController}),startAutoPlay=_useAutoPlay.start,pauseAutoPlay=_useAutoPlay.pause;var scrollViewGestureOnScrollStart=_react.default.useCallback(function(){pauseAutoPlay();_onScrollStart==null?void 0:_onScrollStart();},[_onScrollStart,pauseAutoPlay]);var scrollViewGestureOnScrollEnd=_react.default.useCallback(function(){startAutoPlay();_onScrollEnd();},[_onScrollEnd,startAutoPlay]);var scrollViewGestureOnTouchBegin=_react.default.useCallback(pauseAutoPlay,[pauseAutoPlay]);var scrollViewGestureOnTouchEnd=_react.default.useCallback(startAutoPlay,[startAutoPlay]);var layoutStyle=(0,_reactNativeReanimated.useAnimatedStyle)(function(){var _e=[new global.Error(),-3,-27];var anonymous=function anonymous(){return{width:width||"100%",height:height||"100%"};};anonymous.__closure={width:width,height:height};anonymous.__workletHash=4516433107907;anonymous.__initData=_worklet_4516433107907_init_data;anonymous.__stackDetails=_e;return anonymous;}(),[width,height,size,itemDimensions]);return(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView,{style:[styles.layoutContainer,containerStyle],children:(0,_jsxRuntime.jsx)(_ScrollViewGesture.ScrollViewGesture,{size:size,translation:handlerOffset,style:[styles.contentContainer,layoutStyle,style,vertical?styles.itemsVertical:styles.itemsHorizontal],testID:testID,onScrollStart:scrollViewGestureOnScrollStart,onScrollEnd:scrollViewGestureOnScrollEnd,onTouchBegin:scrollViewGestureOnTouchBegin,onTouchEnd:scrollViewGestureOnTouchEnd,children:(0,_jsxRuntime.jsx)(_ItemRenderer.ItemRenderer,{data:data,dataLength:dataLength,rawDataLength:rawDataLength,loop:loop,size:size,windowSize:windowSize,autoFillData:autoFillData,offsetX:offsetX,handlerOffset:handlerOffset,layoutConfig:layoutConfig,renderItem:renderItem,customAnimation:customAnimation})},mode)});});exports.CarouselLayout=CarouselLayout;var styles=_reactNative.StyleSheet.create({layoutContainer:{display:"flex"},contentContainer:{overflow:"hidden"},itemsHorizontal:{flexDirection:"row"},itemsVertical:{flexDirection:"column"}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CarouselLayout=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeGestureHandler=require("react-native-gesture-handler");var _reactNativeReanimated=require("react-native-reanimated");var _reactNativeWorklets=require("react-native-worklets");var _useAutoPlay2=require("../hooks/useAutoPlay");var _useCarouselController=require("../hooks/useCarouselController");var _useLayoutConfig=require("../hooks/useLayoutConfig");var _useOnProgressChange=require("../hooks/useOnProgressChange");var _store=require("../store");var _computedWithAutoFillData=require("../utils/computed-with-auto-fill-data");var _ItemRenderer=require("./ItemRenderer");var _ScrollViewGesture=require("./ScrollViewGesture");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx";var _worklet_3946037569780_init_data={code:"function CarouselLayoutTsx1(){const{resolvedSize,sizePhase}=this.__closure;var _resolvedSize$value;const currentSize=(_resolvedSize$value=resolvedSize.value)!==null&&_resolvedSize$value!==void 0?_resolvedSize$value:0;return sizePhase.value===\"ready\"&&currentSize>0;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"CarouselLayoutTsx1\",\"resolvedSize\",\"sizePhase\",\"__closure\",\"_resolvedSize$value\",\"currentSize\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"],\"mappings\":\"AAwDsC,SAAAA,kBAAMA,CAAA,QAAAC,YAAA,CAAAC,SAAA,OAAAC,SAAA,KAAAC,mBAAA,CACxC,KAAM,CAAAC,WAAW,EAAAD,mBAAA,CAAGH,YAAY,CAACK,KAAK,UAAAF,mBAAA,UAAAA,mBAAA,CAAI,CAAC,CAC3C,MAAO,CAAAF,SAAS,CAACI,KAAK,GAAK,OAAO,EAAID,WAAW,CAAG,CAAC,CACvD\",\"ignoreList\":[]}"};var _worklet_16262770443858_init_data={code:"function CarouselLayoutTsx2(){const{resolvedSize,dataLength,handlerOffset,loop}=this.__closure;var _resolvedSize$value;const currentSize=(_resolvedSize$value=resolvedSize.value)!==null&&_resolvedSize$value!==void 0?_resolvedSize$value:0;if(currentSize<=0)return 0;const totalSize=currentSize*dataLength;const value=handlerOffset.value;if(!loop||totalSize===0){return value;}const x=value%totalSize;return Number.isNaN(x)?0:x;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"CarouselLayoutTsx2\",\"resolvedSize\",\"dataLength\",\"handlerOffset\",\"loop\",\"__closure\",\"_resolvedSize$value\",\"currentSize\",\"value\",\"totalSize\",\"x\",\"Number\",\"isNaN\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"],\"mappings\":\"AA6DkC,SAAAA,kBAAMA,CAAA,QAAAC,YAAA,CAAAC,UAAA,CAAAC,aAAA,CAAAC,IAAA,OAAAC,SAAA,KAAAC,mBAAA,CACpC,KAAM,CAAAC,WAAW,EAAAD,mBAAA,CAAGL,YAAY,CAACO,KAAK,UAAAF,mBAAA,UAAAA,mBAAA,CAAI,CAAC,CAC3C,GAAIC,WAAW,EAAI,CAAC,CAAE,MAAO,EAAC,CAE9B,KAAM,CAAAE,SAAS,CAAGF,WAAW,CAAGL,UAAU,CAC1C,KAAM,CAAAM,KAAK,CAAGL,aAAa,CAACK,KAAK,CACjC,GAAI,CAACJ,IAAI,EAAIK,SAAS,GAAK,CAAC,CAAE,CAC5B,MAAO,CAAAD,KAAK,CACd,CAEA,KAAM,CAAAE,CAAC,CAAGF,KAAK,CAAGC,SAAS,CAC3B,MAAO,CAAAE,MAAM,CAACC,KAAK,CAACF,CAAC,CAAC,CAAG,CAAC,CAAGA,CAAC,CAChC\",\"ignoreList\":[]}"};var _worklet_3527531179707_init_data={code:"function CarouselLayoutTsx3(){const{isSizeReady}=this.__closure;return{ready:isSizeReady.value};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"CarouselLayoutTsx3\",\"isSizeReady\",\"__closure\",\"ready\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"],\"mappings\":\"AAoII,SAAAA,mBAAA,QAAAC,WAAA,OAAAC,SAAA,OAAO,CAAEC,KAAK,CAAEF,WAAW,CAACG,KAAM,CAAC\",\"ignoreList\":[]}"};var _worklet_1429000311911_init_data={code:"function CarouselLayoutTsx4(state,previous){const{autoPlay,scheduleOnRN,triggerAutoPlay,pauseAutoPlay}=this.__closure;if(!autoPlay)return;if(state.ready===(previous===null||previous===void 0?void 0:previous.ready))return;if(state.ready)scheduleOnRN(triggerAutoPlay);else scheduleOnRN(pauseAutoPlay);}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"CarouselLayoutTsx4\",\"state\",\"previous\",\"autoPlay\",\"scheduleOnRN\",\"triggerAutoPlay\",\"pauseAutoPlay\",\"__closure\",\"ready\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"],\"mappings\":\"AAqII,QAAC,CAAAA,kBAAeA,CAAKC,KAAA,CAAAC,QAAA,QAAAC,QAAA,CAAAC,YAAA,CAAAC,eAAA,CAAAC,aAAA,OAAAC,SAAA,CACnB,GAAI,CAACJ,QAAQ,CAAE,OACf,GAAIF,KAAK,CAACO,KAAK,IAAKN,QAAQ,SAARA,QAAQ,iBAARA,QAAQ,CAAEM,KAAK,EAAE,OAErC,GAAIP,KAAK,CAACO,KAAK,CAAEJ,YAAY,CAACC,eAAe,CAAC,CAAC,IAC1C,CAAAD,YAAY,CAACE,aAAa,CAAC,CAClC\",\"ignoreList\":[]}"};var _worklet_6564864835538_init_data={code:"function CarouselLayoutTsx5(){const{width,height,isSizeReady}=this.__closure;return{width:width||\"100%\",height:height||\"100%\",opacity:isSizeReady.value?1:0};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"CarouselLayoutTsx5\",\"width\",\"height\",\"isSizeReady\",\"__closure\",\"opacity\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"],\"mappings\":\"AA6JuC,SAAAA,kBAAMA,CAAA,QAAAC,KAAA,CAAAC,MAAA,CAAAC,WAAA,OAAAC,SAAA,CACzC,MAAO,CACLH,KAAK,CAAEA,KAAK,EAAI,MAAM,CACtBC,MAAM,CAAEA,MAAM,EAAI,MAAM,CACxBG,OAAO,CAAEF,WAAW,CAACG,KAAK,CAAG,CAAC,CAAG,CACnC,CAAC,CACH\",\"ignoreList\":[]}"};var CarouselLayout=exports.CarouselLayout=_react.default.forwardRef(function(_props,ref){var _useGlobalState=(0,_store.useGlobalState)(),props=_useGlobalState.props,layout=_useGlobalState.layout,common=_useGlobalState.common;var itemDimensions=layout.itemDimensions;var testID=props.testID,loop=props.loop,autoFillData=props.autoFillData,data=props.data,dataLength=props.dataLength,rawDataLength=props.rawDataLength,mode=props.mode,style=props.style,containerStyle=props.containerStyle,width=props.width,height=props.height,vertical=props.vertical,autoPlay=props.autoPlay,windowSize=props.windowSize,autoPlayReverse=props.autoPlayReverse,autoPlayInterval=props.autoPlayInterval,scrollAnimationDuration=props.scrollAnimationDuration,withAnimation=props.withAnimation,fixedDirection=props.fixedDirection,renderItem=props.renderItem,onScrollEnd=props.onScrollEnd,onSnapToItem=props.onSnapToItem,_onScrollStart=props.onScrollStart,onProgressChange=props.onProgressChange,customAnimation=props.customAnimation,defaultIndex=props.defaultIndex;var size=common.size,handlerOffset=common.handlerOffset,resolvedSize=common.resolvedSize,sizePhase=common.sizePhase;var layoutConfig=(0,_useLayoutConfig.useLayoutConfig)(Object.assign({},props,{size:size}));var isSizeReady=(0,_reactNativeReanimated.useDerivedValue)(function CarouselLayoutTsx1Factory(_ref){var _worklet_3946037569780_init_data=_ref._worklet_3946037569780_init_data,resolvedSize=_ref.resolvedSize,sizePhase=_ref.sizePhase;var _e=[new global.Error(),-3,-27];var CarouselLayoutTsx1=function CarouselLayoutTsx1(){var _resolvedSize$value;var currentSize=(_resolvedSize$value=resolvedSize.value)!=null?_resolvedSize$value:0;return sizePhase.value==="ready"&&currentSize>0;};CarouselLayoutTsx1.__closure={resolvedSize:resolvedSize,sizePhase:sizePhase};CarouselLayoutTsx1.__workletHash=3946037569780;CarouselLayoutTsx1.__pluginVersion="0.5.1";CarouselLayoutTsx1.__initData=_worklet_3946037569780_init_data;CarouselLayoutTsx1.__stackDetails=_e;return CarouselLayoutTsx1;}({_worklet_3946037569780_init_data:_worklet_3946037569780_init_data,resolvedSize:resolvedSize,sizePhase:sizePhase}),[resolvedSize,sizePhase]);var offsetX=(0,_reactNativeReanimated.useDerivedValue)(function CarouselLayoutTsx2Factory(_ref2){var _worklet_16262770443858_init_data=_ref2._worklet_16262770443858_init_data,resolvedSize=_ref2.resolvedSize,dataLength=_ref2.dataLength,handlerOffset=_ref2.handlerOffset,loop=_ref2.loop;var _e=[new global.Error(),-5,-27];var CarouselLayoutTsx2=function CarouselLayoutTsx2(){var _resolvedSize$value2;var currentSize=(_resolvedSize$value2=resolvedSize.value)!=null?_resolvedSize$value2:0;if(currentSize<=0)return 0;var totalSize=currentSize*dataLength;var value=handlerOffset.value;if(!loop||totalSize===0){return value;}var x=value%totalSize;return Number.isNaN(x)?0:x;};CarouselLayoutTsx2.__closure={resolvedSize:resolvedSize,dataLength:dataLength,handlerOffset:handlerOffset,loop:loop};CarouselLayoutTsx2.__workletHash=16262770443858;CarouselLayoutTsx2.__pluginVersion="0.5.1";CarouselLayoutTsx2.__initData=_worklet_16262770443858_init_data;CarouselLayoutTsx2.__stackDetails=_e;return CarouselLayoutTsx2;}({_worklet_16262770443858_init_data:_worklet_16262770443858_init_data,resolvedSize:resolvedSize,dataLength:dataLength,handlerOffset:handlerOffset,loop:loop}),[loop,dataLength,handlerOffset,resolvedSize]);(0,_useOnProgressChange.useOnProgressChange)({autoFillData:autoFillData,loop:loop,size:size,sizeReady:isSizeReady,offsetX:offsetX,rawDataLength:rawDataLength,onProgressChange:onProgressChange});var carouselController=(0,_useCarouselController.useCarouselController)({ref:ref,loop:loop,size:size,dataLength:dataLength,autoFillData:autoFillData,handlerOffset:handlerOffset,withAnimation:withAnimation,defaultIndex:defaultIndex,fixedDirection:fixedDirection,duration:scrollAnimationDuration,onScrollEnd:function onScrollEnd(){return(0,_reactNativeWorklets.scheduleOnRN)(_onScrollEnd);},onScrollStart:function onScrollStart(){return!!_onScrollStart&&(0,_reactNativeWorklets.scheduleOnRN)(_onScrollStart);}});var getSharedIndex=carouselController.getSharedIndex;var _onScrollEnd=_react.default.useCallback(function(){var _sharedIndex=Math.round(getSharedIndex());var realIndex=(0,_computedWithAutoFillData.computedRealIndexWithAutoFillData)({index:_sharedIndex,dataLength:rawDataLength,loop:loop,autoFillData:autoFillData});if(onSnapToItem)onSnapToItem(realIndex);if(onScrollEnd)onScrollEnd(realIndex);},[loop,autoFillData,rawDataLength,getSharedIndex,onSnapToItem,onScrollEnd]);var _useAutoPlay=(0,_useAutoPlay2.useAutoPlay)({autoPlay:autoPlay,autoPlayInterval:autoPlayInterval,autoPlayReverse:autoPlayReverse,carouselController:carouselController}),startAutoPlay=_useAutoPlay.start,pauseAutoPlay=_useAutoPlay.pause,triggerAutoPlay=_useAutoPlay.trigger;(0,_reactNativeReanimated.useAnimatedReaction)(function CarouselLayoutTsx3Factory(_ref3){var _worklet_3527531179707_init_data=_ref3._worklet_3527531179707_init_data,isSizeReady=_ref3.isSizeReady;var _e=[new global.Error(),-2,-27];var CarouselLayoutTsx3=function CarouselLayoutTsx3(){return{ready:isSizeReady.value};};CarouselLayoutTsx3.__closure={isSizeReady:isSizeReady};CarouselLayoutTsx3.__workletHash=3527531179707;CarouselLayoutTsx3.__pluginVersion="0.5.1";CarouselLayoutTsx3.__initData=_worklet_3527531179707_init_data;CarouselLayoutTsx3.__stackDetails=_e;return CarouselLayoutTsx3;}({_worklet_3527531179707_init_data:_worklet_3527531179707_init_data,isSizeReady:isSizeReady}),function CarouselLayoutTsx4Factory(_ref4){var _worklet_1429000311911_init_data=_ref4._worklet_1429000311911_init_data,autoPlay=_ref4.autoPlay,scheduleOnRN=_ref4.scheduleOnRN,triggerAutoPlay=_ref4.triggerAutoPlay,pauseAutoPlay=_ref4.pauseAutoPlay;var _e=[new global.Error(),-5,-27];var CarouselLayoutTsx4=function CarouselLayoutTsx4(state,previous){if(!autoPlay)return;if(state.ready===(previous==null?void 0:previous.ready))return;if(state.ready)scheduleOnRN(triggerAutoPlay);else scheduleOnRN(pauseAutoPlay);};CarouselLayoutTsx4.__closure={autoPlay:autoPlay,scheduleOnRN:scheduleOnRN,triggerAutoPlay:triggerAutoPlay,pauseAutoPlay:pauseAutoPlay};CarouselLayoutTsx4.__workletHash=1429000311911;CarouselLayoutTsx4.__pluginVersion="0.5.1";CarouselLayoutTsx4.__initData=_worklet_1429000311911_init_data;CarouselLayoutTsx4.__stackDetails=_e;return CarouselLayoutTsx4;}({_worklet_1429000311911_init_data:_worklet_1429000311911_init_data,autoPlay:autoPlay,scheduleOnRN:_reactNativeWorklets.scheduleOnRN,triggerAutoPlay:triggerAutoPlay,pauseAutoPlay:pauseAutoPlay}),[autoPlay]);var scrollViewGestureOnScrollStart=_react.default.useCallback(function(){pauseAutoPlay();_onScrollStart==null||_onScrollStart();},[_onScrollStart,pauseAutoPlay]);var scrollViewGestureOnScrollEnd=_react.default.useCallback(function(){startAutoPlay();_onScrollEnd();},[_onScrollEnd,startAutoPlay]);var scrollViewGestureOnTouchBegin=_react.default.useCallback(pauseAutoPlay,[pauseAutoPlay]);var scrollViewGestureOnTouchEnd=_react.default.useCallback(startAutoPlay,[startAutoPlay]);var layoutStyle=(0,_reactNativeReanimated.useAnimatedStyle)(function CarouselLayoutTsx5Factory(_ref5){var _worklet_6564864835538_init_data=_ref5._worklet_6564864835538_init_data,width=_ref5.width,height=_ref5.height,isSizeReady=_ref5.isSizeReady;var _e=[new global.Error(),-4,-27];var CarouselLayoutTsx5=function CarouselLayoutTsx5(){return{width:width||"100%",height:height||"100%",opacity:isSizeReady.value?1:0};};CarouselLayoutTsx5.__closure={width:width,height:height,isSizeReady:isSizeReady};CarouselLayoutTsx5.__workletHash=6564864835538;CarouselLayoutTsx5.__pluginVersion="0.5.1";CarouselLayoutTsx5.__initData=_worklet_6564864835538_init_data;CarouselLayoutTsx5.__stackDetails=_e;return CarouselLayoutTsx5;}({_worklet_6564864835538_init_data:_worklet_6564864835538_init_data,width:width,height:height,isSizeReady:isSizeReady}),[width,height,itemDimensions,isSizeReady]);return(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView,{style:[styles.layoutContainer,containerStyle],children:(0,_jsxRuntime.jsx)(_ScrollViewGesture.ScrollViewGesture,{size:size,translation:handlerOffset,style:[styles.contentContainer,layoutStyle,style,vertical?styles.itemsVertical:styles.itemsHorizontal],testID:testID,onScrollStart:scrollViewGestureOnScrollStart,onScrollEnd:scrollViewGestureOnScrollEnd,onTouchBegin:scrollViewGestureOnTouchBegin,onTouchEnd:scrollViewGestureOnTouchEnd,children:(0,_jsxRuntime.jsx)(_ItemRenderer.ItemRenderer,{data:data,dataLength:dataLength,rawDataLength:rawDataLength,loop:loop,size:size,windowSize:windowSize,autoFillData:autoFillData,offsetX:offsetX,handlerOffset:handlerOffset,layoutConfig:layoutConfig,renderItem:renderItem,customAnimation:customAnimation})},mode)});});var styles=_reactNative.StyleSheet.create({layoutContainer:{display:"flex"},contentContainer:{overflow:"hidden"},itemsHorizontal:{flexDirection:"row"},itemsVertical:{flexDirection:"column"}});
2
2
  //# sourceMappingURL=CarouselLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["CarouselLayout.tsx"],"names":["CarouselLayout","React","forwardRef","_props","ref","props","layout","itemDimensions","testID","loop","autoFillData","data","dataLength","rawDataLength","mode","style","containerStyle","width","height","vertical","autoPlay","windowSize","autoPlayReverse","autoPlayInterval","scrollAnimationDuration","withAnimation","fixedDirection","renderItem","onScrollEnd","onSnapToItem","onScrollStart","onProgressChange","customAnimation","defaultIndex","commonVariables","size","handlerOffset","layoutConfig","offsetX","totalSize","x","value","Number","isNaN","carouselController","duration","_onScrollEnd","getSharedIndex","useCallback","_sharedIndex","Math","round","realIndex","index","startAutoPlay","start","pauseAutoPlay","pause","scrollViewGestureOnScrollStart","scrollViewGestureOnScrollEnd","scrollViewGestureOnTouchBegin","scrollViewGestureOnTouchEnd","layoutStyle","styles","layoutContainer","contentContainer","itemsVertical","itemsHorizontal","StyleSheet","create","display","overflow","flexDirection"],"mappings":"0KAAA,oDACA,yCACA,uEACA,8DACA,kDACA,qEACA,+DACA,yDACA,iEACA,+BAEA,+EACA,4CACA,sD,kuDAIO,GAAMA,CAAAA,cAAc,CAAGC,eAAMC,UAAN,CAAoC,SAACC,MAAD,CAASC,GAAT,CAAiB,CACjF,oBAA0B,2BAA1B,CAAQC,KAAR,iBAAQA,KAAR,CAAeC,MAAf,iBAAeA,MAAf,CACA,GAAQC,CAAAA,cAAR,CAA2BD,MAA3B,CAAQC,cAAR,CAEA,GACEC,CAAAA,MADF,CA8BIH,KA9BJ,CACEG,MADF,CAEEC,IAFF,CA8BIJ,KA9BJ,CAEEI,IAFF,CAGEC,YAHF,CA8BIL,KA9BJ,CAGEK,YAHF,CAKEC,IALF,CA8BIN,KA9BJ,CAKEM,IALF,CAOEC,UAPF,CA8BIP,KA9BJ,CAOEO,UAPF,CASEC,aATF,CA8BIR,KA9BJ,CASEQ,aATF,CAUEC,IAVF,CA8BIT,KA9BJ,CAUES,IAVF,CAWEC,KAXF,CA8BIV,KA9BJ,CAWEU,KAXF,CAYEC,cAZF,CA8BIX,KA9BJ,CAYEW,cAZF,CAaEC,KAbF,CA8BIZ,KA9BJ,CAaEY,KAbF,CAcEC,MAdF,CA8BIb,KA9BJ,CAcEa,MAdF,CAeEC,QAfF,CA8BId,KA9BJ,CAeEc,QAfF,CAgBEC,QAhBF,CA8BIf,KA9BJ,CAgBEe,QAhBF,CAiBEC,UAjBF,CA8BIhB,KA9BJ,CAiBEgB,UAjBF,CAkBEC,eAlBF,CA8BIjB,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CAA/B,UACE,oBAAC,oCAAD,EACE,IAAI,CAAEmB,IADR,CAGE,WAAW,CAAEC,aAHf,CAIE,KAAK,CAAE,CACL2B,MAAM,CAACE,gBADF,CAELH,WAFK,CAGL/C,KAHK,CAILI,QAAQ,CAAG4C,MAAM,CAACG,aAAV,CAA0BH,MAAM,CAACI,eAJpC,CAJT,CAUE,MAAM,CAAE3D,MAVV,CAWE,aAAa,CAAEkD,8BAXjB,CAYE,WAAW,CAAEC,4BAZf,CAaE,YAAY,CAAEC,6BAbhB,CAcE,UAAU,CAAEC,2BAdd,UAgBE,oBAAC,0BAAD,EACE,IAAI,CAAElD,IADR,CAEE,UAAU,CAAEC,UAFd,CAGE,aAAa,CAAEC,aAHjB,CAIE,IAAI,CAAEJ,IAJR,CAKE,IAAI,CAAE0B,IALR,CAME,UAAU,CAAEd,UANd,CAOE,YAAY,CAAEX,YAPhB,CAQE,OAAO,CAAE4B,OARX,CASE,aAAa,CAAEF,aATjB,CAUE,YAAY,CAAEC,YAVhB,CAWE,UAAU,CAAEV,UAXd,CAYE,eAAe,CAAEK,eAZnB,EAhBF,EAEOlB,IAFP,CADF,EADF,CAmCD,CAnK6B,CAAvB,C,sCAqKP,GAAMiD,CAAAA,MAAM,CAAGK,wBAAWC,MAAX,CAAkB,CAC/BL,eAAe,CAAE,CACfM,OAAO,CAAE,MADM,CADc,CAI/BL,gBAAgB,CAAE,CAChBM,QAAQ,CAAE,QADM,CAJa,CAO/BJ,eAAe,CAAE,CACfK,aAAa,CAAE,KADA,CAPc,CAU/BN,aAAa,CAAE,CACbM,aAAa,CAAE,QADF,CAVgB,CAAlB,CAAf","sourcesContent":["import React from \"react\";\nimport { StyleSheet, type ViewStyle } from \"react-native\";\nimport { GestureHandlerRootView } from \"react-native-gesture-handler\";\nimport { runOnJS, useAnimatedStyle, useDerivedValue } from \"react-native-reanimated\";\nimport { useAutoPlay } from \"../hooks/useAutoPlay\";\nimport { useCarouselController } from \"../hooks/useCarouselController\";\nimport { useCommonVariables } from \"../hooks/useCommonVariables\";\nimport { useLayoutConfig } from \"../hooks/useLayoutConfig\";\nimport { useOnProgressChange } from \"../hooks/useOnProgressChange\";\nimport { useGlobalState } from \"../store\";\nimport { ICarouselInstance } from \"../types\";\nimport { computedRealIndexWithAutoFillData } from \"../utils/computed-with-auto-fill-data\";\nimport { ItemRenderer } from \"./ItemRenderer\";\nimport { ScrollViewGesture } from \"./ScrollViewGesture\";\n\nexport type TAnimationStyle = (value: number) => ViewStyle;\n\nexport const CarouselLayout = React.forwardRef<ICarouselInstance>((_props, ref) => {\n const { props, layout } = useGlobalState();\n const { itemDimensions } = layout;\n\n const {\n testID,\n loop,\n autoFillData,\n // Fill data with autoFillData\n data,\n // Length of fill data\n dataLength,\n // Length of raw data\n rawDataLength,\n mode,\n style,\n containerStyle,\n width,\n height,\n vertical,\n autoPlay,\n windowSize,\n autoPlayReverse,\n autoPlayInterval,\n scrollAnimationDuration,\n withAnimation,\n fixedDirection,\n renderItem,\n onScrollEnd,\n onSnapToItem,\n onScrollStart,\n onProgressChange,\n customAnimation,\n defaultIndex,\n } = props;\n\n const commonVariables = useCommonVariables(props);\n const { size, handlerOffset } = commonVariables;\n const layoutConfig = useLayoutConfig({ ...props, size });\n\n const offsetX = useDerivedValue(() => {\n const totalSize = size * dataLength;\n const x = handlerOffset.value % totalSize;\n\n if (!loop) return handlerOffset.value;\n\n return Number.isNaN(x) ? 0 : x;\n }, [loop, size, dataLength, handlerOffset]);\n\n useOnProgressChange({\n autoFillData,\n loop,\n size,\n offsetX,\n rawDataLength,\n onProgressChange,\n });\n\n const carouselController = useCarouselController({\n ref,\n loop,\n size,\n dataLength,\n autoFillData,\n handlerOffset,\n withAnimation,\n defaultIndex,\n fixedDirection,\n duration: scrollAnimationDuration,\n onScrollEnd: () => runOnJS(_onScrollEnd)(),\n onScrollStart: () => !!onScrollStart && runOnJS(onScrollStart)(),\n });\n\n const {\n getSharedIndex,\n // index, // Animated index. Could be used for dynamic dimension\n } = carouselController;\n\n const _onScrollEnd = React.useCallback(() => {\n const _sharedIndex = Math.round(getSharedIndex());\n\n const realIndex = computedRealIndexWithAutoFillData({\n index: _sharedIndex,\n dataLength: rawDataLength,\n loop,\n autoFillData,\n });\n\n if (onSnapToItem) onSnapToItem(realIndex);\n\n if (onScrollEnd) onScrollEnd(realIndex);\n }, [loop, autoFillData, rawDataLength, getSharedIndex, onSnapToItem, onScrollEnd]);\n\n const { start: startAutoPlay, pause: pauseAutoPlay } = useAutoPlay({\n autoPlay,\n autoPlayInterval,\n autoPlayReverse,\n carouselController,\n });\n\n const scrollViewGestureOnScrollStart = React.useCallback(() => {\n pauseAutoPlay();\n onScrollStart?.();\n }, [onScrollStart, pauseAutoPlay]);\n\n const scrollViewGestureOnScrollEnd = React.useCallback(() => {\n startAutoPlay();\n _onScrollEnd();\n }, [_onScrollEnd, startAutoPlay]);\n\n const scrollViewGestureOnTouchBegin = React.useCallback(pauseAutoPlay, [pauseAutoPlay]);\n\n const scrollViewGestureOnTouchEnd = React.useCallback(startAutoPlay, [startAutoPlay]);\n\n const layoutStyle = useAnimatedStyle(() => {\n // const dimension = itemDimensions.value[index.value];\n\n // if (!dimension) {\n // return {};\n // }\n return {\n // height: dimension.height, // For dynamic dimension in the future\n\n width: width || \"100%\", // [width is deprecated]\n height: height || \"100%\", // [height is deprecated]\n };\n }, [width, height, size, itemDimensions]);\n\n return (\n <GestureHandlerRootView style={[styles.layoutContainer, containerStyle]}>\n <ScrollViewGesture\n size={size}\n key={mode}\n translation={handlerOffset}\n style={[\n styles.contentContainer, // [deprecated]\n layoutStyle,\n style,\n vertical ? styles.itemsVertical : styles.itemsHorizontal,\n ]}\n testID={testID}\n onScrollStart={scrollViewGestureOnScrollStart}\n onScrollEnd={scrollViewGestureOnScrollEnd}\n onTouchBegin={scrollViewGestureOnTouchBegin}\n onTouchEnd={scrollViewGestureOnTouchEnd}\n >\n <ItemRenderer\n data={data}\n dataLength={dataLength}\n rawDataLength={rawDataLength}\n loop={loop}\n size={size}\n windowSize={windowSize}\n autoFillData={autoFillData}\n offsetX={offsetX}\n handlerOffset={handlerOffset}\n layoutConfig={layoutConfig}\n renderItem={renderItem}\n customAnimation={customAnimation}\n />\n </ScrollViewGesture>\n </GestureHandlerRootView>\n );\n});\n\nconst styles = StyleSheet.create({\n layoutContainer: {\n display: \"flex\",\n },\n contentContainer: {\n overflow: \"hidden\",\n },\n itemsHorizontal: {\n flexDirection: \"row\",\n },\n itemsVertical: {\n flexDirection: \"column\",\n },\n});\n"]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeGestureHandler","_reactNativeReanimated","_reactNativeWorklets","_useAutoPlay2","_useCarouselController","_useLayoutConfig","_useOnProgressChange","_store","_computedWithAutoFillData","_ItemRenderer","_ScrollViewGesture","_jsxRuntime","_this","_jsxFileName","_worklet_3946037569780_init_data","code","location","sourceMap","_worklet_16262770443858_init_data","_worklet_3527531179707_init_data","_worklet_1429000311911_init_data","_worklet_6564864835538_init_data","CarouselLayout","exports","React","forwardRef","_props","ref","_useGlobalState","useGlobalState","props","layout","common","itemDimensions","testID","loop","autoFillData","data","dataLength","rawDataLength","mode","style","containerStyle","width","height","vertical","autoPlay","windowSize","autoPlayReverse","autoPlayInterval","scrollAnimationDuration","withAnimation","fixedDirection","renderItem","onScrollEnd","onSnapToItem","onScrollStart","onProgressChange","customAnimation","defaultIndex","size","handlerOffset","resolvedSize","sizePhase","layoutConfig","useLayoutConfig","Object","assign","isSizeReady","useDerivedValue","CarouselLayoutTsx1Factory","_ref","_e","global","Error","CarouselLayoutTsx1","_resolvedSize$value","currentSize","value","__closure","__workletHash","__pluginVersion","__initData","__stackDetails","offsetX","CarouselLayoutTsx2Factory","_ref2","CarouselLayoutTsx2","_resolvedSize$value2","totalSize","x","Number","isNaN","useOnProgressChange","sizeReady","carouselController","useCarouselController","duration","scheduleOnRN","_onScrollEnd","getSharedIndex","useCallback","_sharedIndex","Math","round","realIndex","computedRealIndexWithAutoFillData","index","_useAutoPlay","useAutoPlay","startAutoPlay","start","pauseAutoPlay","pause","triggerAutoPlay","trigger","useAnimatedReaction","CarouselLayoutTsx3Factory","_ref3","CarouselLayoutTsx3","ready","CarouselLayoutTsx4Factory","_ref4","CarouselLayoutTsx4","state","previous","scrollViewGestureOnScrollStart","scrollViewGestureOnScrollEnd","scrollViewGestureOnTouchBegin","scrollViewGestureOnTouchEnd","layoutStyle","useAnimatedStyle","CarouselLayoutTsx5Factory","_ref5","CarouselLayoutTsx5","opacity","jsx","GestureHandlerRootView","styles","layoutContainer","children","ScrollViewGesture","translation","contentContainer","itemsVertical","itemsHorizontal","onTouchBegin","onTouchEnd","ItemRenderer","StyleSheet","create","display","overflow","flexDirection"],"sourceRoot":"../../../src","sources":["components/CarouselLayout.tsx"],"mappings":"0KAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,0BAAA,CAAAF,OAAA,iCACA,IAAAG,sBAAA,CAAAH,OAAA,4BACA,IAAAI,oBAAA,CAAAJ,OAAA,0BACA,IAAAK,aAAA,CAAAL,OAAA,yBACA,IAAAM,sBAAA,CAAAN,OAAA,mCACA,IAAAO,gBAAA,CAAAP,OAAA,6BACA,IAAAQ,oBAAA,CAAAR,OAAA,iCACA,IAAAS,MAAA,CAAAT,OAAA,aAEA,IAAAU,yBAAA,CAAAV,OAAA,0CACA,IAAAW,aAAA,CAAAX,OAAA,mBACA,IAAAY,kBAAA,CAAAZ,OAAA,wBAAwD,IAAAa,WAAA,CAAAb,OAAA,0BAAAc,KAAA,MAAAC,YAAA,6HAAAC,gCAAA,EAAAC,IAAA,gRAAAC,QAAA,yHAAAC,SAAA,2iBAAAC,iCAAA,EAAAH,IAAA,8aAAAC,QAAA,yHAAAC,SAAA,o4BAAAE,gCAAA,EAAAJ,IAAA,qGAAAC,QAAA,yHAAAC,SAAA,2WAAAG,gCAAA,EAAAL,IAAA,gTAAAC,QAAA,yHAAAC,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AC,CACE,CAAC,CAE7B,CAAC,CAAC,CAEF,GAAM,CAAAkG,MAAM,CAAGW,uBAAU,CAACC,MAAM,CAAC,CAC/BX,eAAe,CAAE,CACfY,OAAO,CAAE,MACX,CAAC,CACDR,gBAAgB,CAAE,CAChBS,QAAQ,CAAE,QACZ,CAAC,CACDP,eAAe,CAAE,CACfQ,aAAa,CAAE,KACjB,CAAC,CACDT,aAAa,CAAE,CACbS,aAAa,CAAE,QACjB,CACF,CAAC,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ItemLayout=void 0;var _react=_interopRequireDefault(require("react"));var _reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated"));var _useOffsetX=require("../hooks/useOffsetX");var _store=require("../store");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx";function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}var _worklet_11069938922586_init_data={code:"function anonymous(){const{x,size}=this.__closure;return x.value/size;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AAyDyC,QAAAA,UAAA,sCAAOC,EAACC,MAADD,CAASE,IAAhB\",\"names\":[\"anonymous\",\"x\",\"value\",\"size\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"]}",version:"3.10.1"};var _worklet_9197407963063_init_data={code:"function anonymous(){const{animationStyle,x,size,index}=this.__closure;return animationStyle(x.value/size,index);}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AA2DI,QAAAA,UAAA,2DAAMC,eAAeC,CAACA,CAACC,MAADD,CAASE,IAAVF,CAAgBG,KAAhBH,CAArB\",\"names\":[\"anonymous\",\"animationStyle\",\"x\",\"value\",\"size\",\"index\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"]}",version:"3.10.1"};var ItemLayout=function ItemLayout(props){var handlerOffset=props.handlerOffset,index=props.index,children=props.children,visibleRanges=props.visibleRanges,animationStyle=props.animationStyle;var _useGlobalState=(0,_store.useGlobalState)(),_useGlobalState$props=_useGlobalState.props,loop=_useGlobalState$props.loop,dataLength=_useGlobalState$props.dataLength,width=_useGlobalState$props.width,height=_useGlobalState$props.height,vertical=_useGlobalState$props.vertical,customConfig=_useGlobalState$props.customConfig,mode=_useGlobalState$props.mode,modeConfig=_useGlobalState$props.modeConfig;var size=vertical?height:width;var offsetXConfig=Object.assign({handlerOffset:handlerOffset,index:index,size:size,dataLength:dataLength,loop:loop},typeof customConfig==="function"?customConfig():{});if(mode==="horizontal-stack"){var _ref=modeConfig,snapDirection=_ref.snapDirection,showLength=_ref.showLength;offsetXConfig={handlerOffset:handlerOffset,index:index,size:size,dataLength:dataLength,loop:loop,type:snapDirection==="right"?"negative":"positive",viewCount:showLength};}var x=(0,_useOffsetX.useOffsetX)(offsetXConfig,visibleRanges);var animationValue=(0,_reactNativeReanimated.useDerivedValue)(function(){var _e=[new global.Error(),-3,-27];var anonymous=function anonymous(){return x.value/size;};anonymous.__closure={x:x,size:size};anonymous.__workletHash=11069938922586;anonymous.__initData=_worklet_11069938922586_init_data;anonymous.__stackDetails=_e;return anonymous;}(),[x,size]);var animatedStyle=(0,_reactNativeReanimated.useAnimatedStyle)(function(){var _e=[new global.Error(),-5,-27];var anonymous=function anonymous(){return animationStyle(x.value/size,index);};anonymous.__closure={animationStyle:animationStyle,x:x,size:size,index:index};anonymous.__workletHash=9197407963063;anonymous.__initData=_worklet_9197407963063_init_data;anonymous.__stackDetails=_e;return anonymous;}(),[animationStyle,index,x,size]);return(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[{width:width||"100%",height:height||"100%",position:"absolute",pointerEvents:"box-none"},animatedStyle],testID:`__CAROUSEL_ITEM_${index}__`,children:children({animationValue:animationValue})});};exports.ItemLayout=ItemLayout;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ItemLayout=void 0;var _react=_interopRequireDefault(require("react"));var _reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated"));var _useOffsetX=require("../hooks/useOffsetX");var _store=require("../store");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var _worklet_12950939411875_init_data={code:"function ItemLayoutTsx1(){const{size,x}=this.__closure;if(!size)return 0;return x.value/size;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemLayoutTsx1\",\"size\",\"x\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AA0DyC,SAAAA,cAAMA,CAAA,QAAAC,IAAA,CAAAC,CAAA,OAAAC,SAAA,CAC3C,GAAI,CAACF,IAAI,CAAE,MAAO,EAAC,CACnB,MAAO,CAAAC,CAAC,CAACE,KAAK,CAAGH,IAAI,CACvB\",\"ignoreList\":[]}"};var _worklet_4654073476244_init_data={code:"function ItemLayoutTsx2(){const{size,animationStyle,x,index}=this.__closure;const safeSize=size||1;return animationStyle(x.value/safeSize,index);}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemLayoutTsx2\",\"size\",\"animationStyle\",\"x\",\"index\",\"__closure\",\"safeSize\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AA8DoD,SAAAA,cAAMA,CAAA,QAAAC,IAAA,CAAAC,cAAA,CAAAC,CAAA,CAAAC,KAAA,OAAAC,SAAA,CACtD,KAAM,CAAAC,QAAQ,CAAGL,IAAI,EAAI,CAAC,CAC1B,MAAO,CAAAC,cAAc,CAACC,CAAC,CAACI,KAAK,CAAGD,QAAQ,CAAEF,KAAK,CAAC,CAClD\",\"ignoreList\":[]}"};var ItemLayout=exports.ItemLayout=function ItemLayout(props){var _ref;var handlerOffset=props.handlerOffset,index=props.index,children=props.children,visibleRanges=props.visibleRanges,animationStyle=props.animationStyle;var _useGlobalState=(0,_store.useGlobalState)(),_useGlobalState$props=_useGlobalState.props,loop=_useGlobalState$props.loop,dataLength=_useGlobalState$props.dataLength,width=_useGlobalState$props.width,height=_useGlobalState$props.height,vertical=_useGlobalState$props.vertical,customConfig=_useGlobalState$props.customConfig,mode=_useGlobalState$props.mode,modeConfig=_useGlobalState$props.modeConfig,common=_useGlobalState.common;var fallbackSize=common.size;var size=(_ref=vertical?height:width)!=null?_ref:fallbackSize;var offsetXConfig=Object.assign({handlerOffset:handlerOffset,index:index,size:size,dataLength:dataLength,loop:loop},typeof customConfig==="function"?customConfig():{});if(mode==="horizontal-stack"){var _ref2=modeConfig,snapDirection=_ref2.snapDirection,showLength=_ref2.showLength;offsetXConfig={handlerOffset:handlerOffset,index:index,size:size,dataLength:dataLength,loop:loop,type:snapDirection==="right"?"negative":"positive",viewCount:showLength};}var x=(0,_useOffsetX.useOffsetX)(offsetXConfig,visibleRanges);var animationValue=(0,_reactNativeReanimated.useDerivedValue)(function ItemLayoutTsx1Factory(_ref3){var _worklet_12950939411875_init_data=_ref3._worklet_12950939411875_init_data,size=_ref3.size,x=_ref3.x;var _e=[new global.Error(),-3,-27];var ItemLayoutTsx1=function ItemLayoutTsx1(){if(!size)return 0;return x.value/size;};ItemLayoutTsx1.__closure={size:size,x:x};ItemLayoutTsx1.__workletHash=12950939411875;ItemLayoutTsx1.__pluginVersion="0.5.1";ItemLayoutTsx1.__initData=_worklet_12950939411875_init_data;ItemLayoutTsx1.__stackDetails=_e;return ItemLayoutTsx1;}({_worklet_12950939411875_init_data:_worklet_12950939411875_init_data,size:size,x:x}),[x,size]);var animatedStyle=(0,_reactNativeReanimated.useAnimatedStyle)(function ItemLayoutTsx2Factory(_ref4){var _worklet_4654073476244_init_data=_ref4._worklet_4654073476244_init_data,size=_ref4.size,animationStyle=_ref4.animationStyle,x=_ref4.x,index=_ref4.index;var _e=[new global.Error(),-5,-27];var ItemLayoutTsx2=function ItemLayoutTsx2(){var safeSize=size||1;return animationStyle(x.value/safeSize,index);};ItemLayoutTsx2.__closure={size:size,animationStyle:animationStyle,x:x,index:index};ItemLayoutTsx2.__workletHash=4654073476244;ItemLayoutTsx2.__pluginVersion="0.5.1";ItemLayoutTsx2.__initData=_worklet_4654073476244_init_data;ItemLayoutTsx2.__stackDetails=_e;return ItemLayoutTsx2;}({_worklet_4654073476244_init_data:_worklet_4654073476244_init_data,size:size,animationStyle:animationStyle,x:x,index:index}),[animationStyle,index,x,size]);return(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[{width:width||"100%",height:height||"100%",position:"absolute",pointerEvents:"box-none"},animatedStyle],testID:`__CAROUSEL_ITEM_${index}__`,children:children({animationValue:animationValue})});};
2
2
  //# sourceMappingURL=ItemLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ItemLayout.tsx"],"names":["ItemLayout","props","handlerOffset","index","children","visibleRanges","animationStyle","loop","dataLength","width","height","vertical","customConfig","mode","modeConfig","size","offsetXConfig","snapDirection","showLength","type","viewCount","x","animationValue","value","animatedStyle","position","pointerEvents"],"mappings":"sKAAA,oDAGA,uFAIA,+CAGA,+B,i1EAIO,GAAMA,CAAAA,UAQX,CAAG,QARQA,CAAAA,UAQR,CAACC,KAAD,CAAW,CACd,GAAQC,CAAAA,aAAR,CAA0ED,KAA1E,CAAQC,aAAR,CAAuBC,KAAvB,CAA0EF,KAA1E,CAAuBE,KAAvB,CAA8BC,QAA9B,CAA0EH,KAA1E,CAA8BG,QAA9B,CAAwCC,aAAxC,CAA0EJ,KAA1E,CAAwCI,aAAxC,CAAuDC,cAAvD,CAA0EL,KAA1E,CAAuDK,cAAvD,CAEA,oBAII,2BAJJ,uCACEL,KADF,CACWM,IADX,uBACWA,IADX,CACiBC,UADjB,uBACiBA,UADjB,CAC6BC,KAD7B,uBAC6BA,KAD7B,CACoCC,MADpC,uBACo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OAAqCZ,KAArC,4IADoB,GAEpB,CAACG,cAAD,CAAiBH,KAAjB,CAAwBkB,CAAxB,CAA2BN,IAA3B,CAFoB,CAAtB,CAWA,MACE,oBAAC,8BAAD,CAAU,IAAV,EACE,KAAK,CAAE,CACL,CACEN,KAAK,CAAEA,KAAK,EAAI,MADlB,CAEEC,MAAM,CAAEA,MAAM,EAAI,MAFpB,CAGEe,QAAQ,CAAE,UAHZ,CAIEC,aAAa,CAAE,UAJjB,CADK,CAOLF,aAPK,CADT,CAgBE,MAAM,CAAG,mBAAkBrB,KAAM,IAhBnC,UAkBGC,QAAQ,CAAC,CAAEkB,cAAc,CAAdA,cAAF,CAAD,CAlBX,EADF,CAsBD,CA7EM,C","sourcesContent":["import React from \"react\";\nimport type { ViewStyle } from \"react-native\";\nimport type { SharedValue } from \"react-native-reanimated\";\nimport Animated, { useAnimatedStyle, useDerivedValue } from \"react-native-reanimated\";\n\nimport { TCarouselProps } from \"src/types\";\nimport type { IOpts } from \"../hooks/useOffsetX\";\nimport { useOffsetX } from \"../hooks/useOffsetX\";\nimport type { IVisibleRanges } from \"../hooks/useVisibleRanges\";\nimport type { ILayoutConfig } from \"../layouts/stack\";\nimport { useGlobalState } from \"../store\";\n\nexport type TAnimationStyle = NonNullable<TCarouselProps[\"customAnimation\"]>;\n\nexport const ItemLayout: React.FC<{\n index: number;\n handlerOffset: SharedValue<number>;\n visibleRanges: IVisibleRanges;\n animationStyle: TAnimationStyle;\n children: (ctx: {\n animationValue: Animated.SharedValue<number>;\n }) => React.ReactElement;\n}> = (props) => {\n const { handlerOffset, index, children, visibleRanges, animationStyle } = props;\n\n const {\n props: { loop, dataLength, width, height, vertical, customConfig, mode, modeConfig },\n // TODO: For dynamic dimension in the future\n // layout: { updateItemDimensions },\n } = useGlobalState();\n\n const size = vertical ? height : width;\n\n let offsetXConfig: IOpts = {\n handlerOffset,\n index,\n size,\n dataLength,\n loop,\n ...(typeof customConfig === \"function\" ? customConfig() : {}),\n };\n\n if (mode === \"horizontal-stack\") {\n const { snapDirection, showLength } = modeConfig as ILayoutConfig;\n\n offsetXConfig = {\n handlerOffset,\n index,\n size,\n dataLength,\n loop,\n type: snapDirection === \"right\" ? \"negative\" : \"positive\",\n viewCount: showLength,\n };\n }\n\n const x = useOffsetX(offsetXConfig, visibleRanges);\n const animationValue = useDerivedValue(() => x.value / size, [x, size]);\n const animatedStyle = useAnimatedStyle<ViewStyle>(\n () => animationStyle(x.value / size, index),\n [animationStyle, index, x, size]\n );\n\n // TODO: For dynamic dimension in the future\n // function handleLayout(e: LayoutChangeEvent) {\n // const { width, height } = e.nativeEvent.layout;\n // updateItemDimensions(index, { width, height });\n // }\n\n return (\n <Animated.View\n style={[\n {\n width: width || \"100%\",\n height: height || \"100%\",\n position: \"absolute\",\n pointerEvents: \"box-none\",\n },\n animatedStyle,\n ]}\n // onLayout={handleLayout}\n /**\n * We use this testID to know when the carousel item is ready to be tested in test.\n * e.g.\n * The testID of first item will be changed to __CAROUSEL_ITEM_0_READY__ from __CAROUSEL_ITEM_0_NOT_READY__ when the item is ready.\n * */\n testID={`__CAROUSEL_ITEM_${index}__`}\n >\n {children({ animationValue })}\n </Animated.View>\n );\n};\n"]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeReanimated","_interopRequireWildcard","_useOffsetX","_store","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_worklet_12950939411875_init_data","code","location","sourceMap","_worklet_4654073476244_init_data","ItemLayout","exports","props","_ref","handlerOffset","index","children","visibleRanges","animationStyle","_useGlobalState","useGlobalState","_useGlobalState$props","loop","dataLength","width","height","vertical","customConfig","mode","modeConfig","common","fallbackSize","size","offsetXConfig","assign","_ref2","snapDirection","showLength","type","viewCount","x","useOffsetX","animationValue","useDerivedValue","ItemLayoutTsx1Factory","_ref3","_e","global","Error","ItemLayoutTsx1","value","__closure","__workletHash","__pluginVersion","__initData","__stackDetails","animatedStyle","useAnimatedStyle","ItemLayoutTsx2Factory","_ref4","ItemLayoutTsx2","safeSize","jsx","View","style","position","pointerEvents","testID"],"sourceRoot":"../../../src","sources":["components/ItemLayout.tsx"],"mappings":"sKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAGA,IAAAC,sBAAA,CAAAC,uBAAA,CAAAF,OAAA,6BAIA,IAAAG,WAAA,CAAAH,OAAA,wBAGA,IAAAI,MAAA,CAAAJ,OAAA,aAA0C,IAAAK,WAAA,CAAAL,OAAA,0BAAAM,KAAA,MAAAC,YAAA,8HAAAL,wBAAAM,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAR,uBAAA,UAAAA,wBAAAM,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,KAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,SAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,EAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,CAAAQ,CAAA,WAAAM,EAAA,IAAAd,CAAA,aAAAc,EAAA,KAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,CAAAc,EAAA,KAAAP,CAAA,EAAAD,CAAA,CAAAW,MAAA,CAAAC,cAAA,GAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,CAAAc,EAAA,KAAAP,CAAA,CAAAK,GAAA,EAAAL,CAAA,CAAAM,GAAA,EAAAP,CAAA,CAAAE,CAAA,CAAAM,EAAA,CAAA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E,GAAAlD,WAAA,CAAAgF,GAAA,EAACpF,sBAAA,CAAAiB,OAAQ,CAACoE,IAAI,EACZC,KAAK,CAAE,CACL,CACExC,KAAK,CAAEA,KAAK,EAAI,MAAM,CACtBC,MAAM,CAAEA,MAAM,EAAI,MAAM,CACxBwC,QAAQ,CAAE,UAAU,CACpBC,aAAa,CAAE,UACjB,CAAC,CACDV,aAAa,CACb,CAOFW,MAAM,CAAE,mBAAmBpD,KAAK,IAAK,CAAAC,QAAA,CAEpCA,QAAQ,CAAC,CAAE0B,cAAc,CAAdA,cAAe,CAAC,CAAC,CAChB,CAAC,CAEpB,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ItemRenderer=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireDefault(require("react"));var _reactNativeReanimated=require("react-native-reanimated");var _ItemLayout=require("./ItemLayout");var _useVisibleRanges=require("../hooks/useVisibleRanges");var _computedWithAutoFillData=require("../utils/computed-with-auto-fill-data");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemRenderer.tsx";var _worklet_2954499259449_init_data={code:"function anonymous(){const{visibleRanges}=this.__closure;return visibleRanges.value;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemRenderer.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AAwDI,QAAAA,UAAA,6CAAMC,cAAcC,MAApB\",\"names\":[\"anonymous\",\"visibleRanges\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemRenderer.tsx\"]}",version:"3.10.1"};var _worklet_2858598482480_init_data={code:"function anonymous(ranges){const{runOnJS,setDisplayedItems}=this.__closure;return runOnJS(setDisplayedItems)(ranges);}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemRenderer.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AAyDKA,mBAAMA,MAANA,CAAM,uDAAKC,QAAQC,mBAARD,CAA2BD,MAA3BC,CAAL,CAAND\",\"names\":[\"ranges\",\"runOnJS\",\"setDisplayedItems\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemRenderer.tsx\"]}",version:"3.10.1"};var ItemRenderer=function ItemRenderer(props){var data=props.data,size=props.size,windowSize=props.windowSize,handlerOffset=props.handlerOffset,offsetX=props.offsetX,dataLength=props.dataLength,rawDataLength=props.rawDataLength,loop=props.loop,autoFillData=props.autoFillData,layoutConfig=props.layoutConfig,renderItem=props.renderItem,customAnimation=props.customAnimation;var visibleRanges=(0,_useVisibleRanges.useVisibleRanges)({total:dataLength,viewSize:size,translation:handlerOffset,windowSize:windowSize,loop:loop});var _React$useState=_react.default.useState(null),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),displayedItems=_React$useState2[0],setDisplayedItems=_React$useState2[1];(0,_reactNativeReanimated.useAnimatedReaction)(function(){var _e=[new global.Error(),-2,-27];var anonymous=function anonymous(){return visibleRanges.value;};anonymous.__closure={visibleRanges:visibleRanges};anonymous.__workletHash=2954499259449;anonymous.__initData=_worklet_2954499259449_init_data;anonymous.__stackDetails=_e;return anonymous;}(),function(){var _e=[new global.Error(),-3,-27];var anonymous=function anonymous(ranges){return(0,_reactNativeReanimated.runOnJS)(setDisplayedItems)(ranges);};anonymous.__closure={runOnJS:_reactNativeReanimated.runOnJS,setDisplayedItems:setDisplayedItems};anonymous.__workletHash=2858598482480;anonymous.__initData=_worklet_2858598482480_init_data;anonymous.__stackDetails=_e;return anonymous;}(),[visibleRanges]);if(!displayedItems)return null;return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:data.map(function(item,index){var realIndex=(0,_computedWithAutoFillData.computedRealIndexWithAutoFillData)({index:index,dataLength:rawDataLength,loop:loop,autoFillData:autoFillData});var negativeRange=displayedItems.negativeRange,positiveRange=displayedItems.positiveRange;var shouldRender=index>=negativeRange[0]&&index<=negativeRange[1]||index>=positiveRange[0]&&index<=positiveRange[1];if(!shouldRender)return null;return(0,_jsxRuntime.jsx)(_ItemLayout.ItemLayout,{index:index,handlerOffset:offsetX,visibleRanges:visibleRanges,animationStyle:customAnimation||layoutConfig,children:function children(_ref){var animationValue=_ref.animationValue;return renderItem({item:item,index:realIndex,animationValue:animationValue});}},index);})});};exports.ItemRenderer=ItemRenderer;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ItemRenderer=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireDefault(require("react"));var _reactNativeReanimated=require("react-native-reanimated");var _reactNativeWorklets=require("react-native-worklets");var _ItemLayout=require("./ItemLayout");var _useVisibleRanges=require("../hooks/useVisibleRanges");var _computedWithAutoFillData=require("../utils/computed-with-auto-fill-data");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemRenderer.tsx";var _worklet_5016581810892_init_data={code:"function ItemRendererTsx1(){const{visibleRanges}=this.__closure;return visibleRanges.value;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemRenderer.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemRendererTsx1\",\"visibleRanges\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemRenderer.tsx\"],\"mappings\":\"AAyDI,SAAAA,iBAAA,QAAAC,aAAA,OAAAC,SAAA,OAAM,CAAAD,aAAc,CAAAE,KAAA\",\"ignoreList\":[]}"};var _worklet_11262215567435_init_data={code:"function ItemRendererTsx2(ranges){const{scheduleOnRN,setDisplayedItems}=this.__closure;return scheduleOnRN(setDisplayedItems,ranges);}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemRenderer.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemRendererTsx2\",\"ranges\",\"scheduleOnRN\",\"setDisplayedItems\",\"__closure\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemRenderer.tsx\"],\"mappings\":\"AA0DK,SAAAA,gBAAMA,CAAAC,MAAA,QAAAC,YAAA,CAAAC,iBAAA,OAAAC,SAAA,OAAK,CAAAF,YAAa,CAAAC,iBAAiB,CAAEF,MAAM\",\"ignoreList\":[]}"};var ItemRenderer=exports.ItemRenderer=function ItemRenderer(props){var data=props.data,size=props.size,windowSize=props.windowSize,handlerOffset=props.handlerOffset,offsetX=props.offsetX,dataLength=props.dataLength,rawDataLength=props.rawDataLength,loop=props.loop,autoFillData=props.autoFillData,layoutConfig=props.layoutConfig,renderItem=props.renderItem,customAnimation=props.customAnimation;var visibleRanges=(0,_useVisibleRanges.useVisibleRanges)({total:dataLength,viewSize:size,translation:handlerOffset,windowSize:windowSize,loop:loop});var _React$useState=_react.default.useState(null),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),displayedItems=_React$useState2[0],setDisplayedItems=_React$useState2[1];(0,_reactNativeReanimated.useAnimatedReaction)(function ItemRendererTsx1Factory(_ref){var _worklet_5016581810892_init_data=_ref._worklet_5016581810892_init_data,visibleRanges=_ref.visibleRanges;var _e=[new global.Error(),-2,-27];var ItemRendererTsx1=function ItemRendererTsx1(){return visibleRanges.value;};ItemRendererTsx1.__closure={visibleRanges:visibleRanges};ItemRendererTsx1.__workletHash=5016581810892;ItemRendererTsx1.__pluginVersion="0.5.1";ItemRendererTsx1.__initData=_worklet_5016581810892_init_data;ItemRendererTsx1.__stackDetails=_e;return ItemRendererTsx1;}({_worklet_5016581810892_init_data:_worklet_5016581810892_init_data,visibleRanges:visibleRanges}),function ItemRendererTsx2Factory(_ref2){var _worklet_11262215567435_init_data=_ref2._worklet_11262215567435_init_data,scheduleOnRN=_ref2.scheduleOnRN,setDisplayedItems=_ref2.setDisplayedItems;var _e=[new global.Error(),-3,-27];var ItemRendererTsx2=function ItemRendererTsx2(ranges){return scheduleOnRN(setDisplayedItems,ranges);};ItemRendererTsx2.__closure={scheduleOnRN:scheduleOnRN,setDisplayedItems:setDisplayedItems};ItemRendererTsx2.__workletHash=11262215567435;ItemRendererTsx2.__pluginVersion="0.5.1";ItemRendererTsx2.__initData=_worklet_11262215567435_init_data;ItemRendererTsx2.__stackDetails=_e;return ItemRendererTsx2;}({_worklet_11262215567435_init_data:_worklet_11262215567435_init_data,scheduleOnRN:_reactNativeWorklets.scheduleOnRN,setDisplayedItems:setDisplayedItems}),[visibleRanges]);if(!displayedItems)return null;return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:data.map(function(item,index){var realIndex=(0,_computedWithAutoFillData.computedRealIndexWithAutoFillData)({index:index,dataLength:rawDataLength,loop:loop,autoFillData:autoFillData});var negativeRange=displayedItems.negativeRange,positiveRange=displayedItems.positiveRange;var shouldRender=index>=negativeRange[0]&&index<=negativeRange[1]||index>=positiveRange[0]&&index<=positiveRange[1];if(!shouldRender)return null;return(0,_jsxRuntime.jsx)(_ItemLayout.ItemLayout,{index:index,handlerOffset:offsetX,visibleRanges:visibleRanges,animationStyle:customAnimation||layoutConfig,children:function children(_ref3){var animationValue=_ref3.animationValue;return renderItem({item:item,index:realIndex,animationValue:animationValue});}},index);})});};
2
2
  //# sourceMappingURL=ItemRenderer.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ItemRenderer.tsx"],"names":["ItemRenderer","props","data","size","windowSize","handlerOffset","offsetX","dataLength","rawDataLength","loop","autoFillData","layoutConfig","renderItem","customAnimation","visibleRanges","total","viewSize","translation","React","useState","displayedItems","setDisplayedItems","value","ranges","runOnJS","map","item","index","realIndex","negativeRange","positiveRange","shouldRender","animationValue"],"mappings":"oQAAA,oDAIA,8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ClDD,KAAK,CAALA,KADkD,CAElDpB,UAAU,CAAEC,aAFsC,CAGlDC,IAAI,CAAJA,IAHkD,CAIlDC,YAAY,CAAZA,YAJkD,CAAlC,CAAlB,CAOA,GAAQmB,CAAAA,aAAR,CAAyCT,cAAzC,CAAQS,aAAR,CAAuBC,aAAvB,CAAyCV,cAAzC,CAAuBU,aAAvB,CAEA,GAAMC,CAAAA,YAAY,CACfJ,KAAK,EAAIE,aAAa,CAAC,CAAD,CAAtB,EAA6BF,KAAK,EAAIE,aAAa,CAAC,CAAD,CAApD,EACCF,KAAK,EAAIG,aAAa,CAAC,CAAD,CAAtB,EAA6BH,KAAK,EAAIG,aAAa,CAAC,CAAD,CAFtD,CAIA,GAAI,CAACC,YAAL,CAAmB,MAAO,KAAP,CAEnB,MACE,oBAAC,sBAAD,EAEE,KAAK,CAAEJ,KAFT,CAGE,aAAa,CAAErB,OAHjB,CAIE,aAAa,CAAEQ,aAJjB,CAKE,cAAc,CAAED,eAAe,EAAIF,YALrC,UAOG,2BAAGqB,CAAAA,cAAH,MAAGA,cAAH,OACCpB,CAAAA,UAAU,CAAC,CACTc,IAAI,CAAJA,IADS,CAETC,KAAK,CAAEC,SAFE,CAGTI,cAAc,CAAdA,cAHS,CAAD,CADX,EAPH,EACOL,KADP,CADF,CAiBD,CAjCA,CADH,EADF,CAsCD,CAxEM,C","sourcesContent":["import React from \"react\";\nimport type { FC } from \"react\";\nimport type { ViewStyle } from \"react-native\";\nimport type { SharedValue } from \"react-native-reanimated\";\nimport { runOnJS, useAnimatedReaction } from \"react-native-reanimated\";\n\nimport type { TAnimationStyle } from \"./ItemLayout\";\nimport { ItemLayout } from \"./ItemLayout\";\n\nimport type { VisibleRanges } from \"../hooks/useVisibleRanges\";\nimport { useVisibleRanges } from \"../hooks/useVisibleRanges\";\nimport type { CarouselRenderItem } from \"../types\";\nimport { computedRealIndexWithAutoFillData } from \"../utils/computed-with-auto-fill-data\";\n\ninterface Props {\n data: any[];\n dataLength: number;\n rawDataLength: number;\n loop: boolean;\n size: number;\n windowSize?: number;\n autoFillData: boolean;\n offsetX: SharedValue<number>;\n handlerOffset: SharedValue<number>;\n layoutConfig: TAnimationStyle;\n renderItem: CarouselRenderItem<any>;\n customAnimation?: (value: number, index: number) => ViewStyle;\n}\n\nexport const ItemRenderer: FC<Props> = (props) => {\n const {\n data,\n size,\n windowSize,\n handlerOffset,\n offsetX,\n dataLength,\n rawDataLength,\n loop,\n autoFillData,\n layoutConfig,\n renderItem,\n customAnimation,\n } = props;\n\n const visibleRanges = useVisibleRanges({\n total: dataLength,\n viewSize: size,\n translation: handlerOffset,\n windowSize,\n loop,\n });\n\n const [displayedItems, setDisplayedItems] = React.useState<VisibleRanges>(null!);\n\n useAnimatedReaction(\n () => visibleRanges.value,\n (ranges) => runOnJS(setDisplayedItems)(ranges),\n [visibleRanges]\n );\n\n if (!displayedItems) return null;\n\n return (\n <>\n {data.map((item, index) => {\n const realIndex = computedRealIndexWithAutoFillData({\n index,\n dataLength: rawDataLength,\n loop,\n autoFillData,\n });\n\n const { negativeRange, positiveRange } = displayedItems;\n\n const shouldRender =\n (index >= negativeRange[0] && index <= negativeRange[1]) ||\n (index >= positiveRange[0] && index <= positiveRange[1]);\n\n if (!shouldRender) return null;\n\n return (\n <ItemLayout\n key={index}\n index={index}\n handlerOffset={offsetX}\n visibleRanges={visibleRanges}\n animationStyle={customAnimation || layoutConfig}\n >\n {({ animationValue }) =>\n renderItem({\n item,\n index: realIndex,\n animationValue,\n })\n }\n </ItemLayout>\n );\n })}\n </>\n );\n};\n"]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeReanimated","_reactNativeWorklets","_ItemLayout","_useVisibleRanges","_computedWithAutoFillData","_jsxRuntime","_this","_jsxFileName","_worklet_5016581810892_init_data","code","location","sourceMap","_worklet_11262215567435_init_data","ItemRenderer","exports","props","data","size","windowSize","handlerOffset","offsetX","dataLength","rawDataLength","loop","autoFillData","layoutConfig","renderItem","customAnimation","visibleRanges","useVisibleRanges","total","viewSize","translation","_React$useState","React","useState","_React$useState2","_slicedToArray2","default","displayedItems","setDisplayedItems","useAnimatedReaction","ItemRendererTsx1Factory","_ref","_e","global","Error","ItemRendererTsx1","value","__closure","__workletHash","__pluginVersion","__initData","__stackDetails","ItemRendererTsx2Factory","_ref2","scheduleOnRN","ItemRendererTsx2","ranges","jsx","Fragment","children","map","item","index","realIndex","computedRealIndexWithAutoFillData","negativeRange","positiveRange","shouldRender","ItemLayout","animationStyle","_ref3","animationValue"],"sourceRoot":"../../../src","sources":["components/ItemRenderer.tsx"],"mappings":"oQAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAIA,IAAAC,sBAAA,CAAAD,OAAA,4BACA,IAAAE,oBAAA,CAAAF,OAAA,0BAGA,IAAAG,WAAA,CAAAH,OAAA,iBAGA,IAAAI,iBAAA,CAAAJ,OAAA,8BAEA,IAAAK,yBAAA,CAAAL,OAAA,0CAA0F,IAAAM,WAAA,CAAAN,OAAA,0BAAAO,KAAA,MAAAC,YAAA,2HAAAC,gCAAA,EAAAC,IAAA,gGAAAC,QAAA,uHAAAC,SAAA,+UAAAC,iCAAA,EAAAH,IAAA,0IAAAC,QAAA,uHAAAC,SAAA,sYAiBnF,GAAM,CAAAE,YAAuB,CAAAC,OAAA,CAAAD,YAAA,CAAG,QAA1B,CAAAA,YAAuBA,CAAIE,KAAK,CAAK,CAChD,GACE,CAAAC,IAAI,CAYFD,KAAK,CAZPC,IAAI,CACJC,IAAI,CAWFF,KAAK,CAXPE,IAAI,CACJC,UAAU,CAURH,KAAK,CAVPG,UAAU,CACVC,aAAa,CASXJ,KAAK,CATPI,aAAa,CACbC,OAAO,CAQLL,KAAK,CARPK,OAAO,CACPC,UAAU,CAORN,KAAK,CAPPM,UAAU,CACVC,aAAa,CAMXP,KAAK,CANPO,aAAa,CACbC,IAAI,CAKFR,KAAK,CALPQ,IAAI,CACJC,YAAY,CAIVT,KAAK,CAJPS,YAAY,CACZC,YAA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,CAAEA,KAAM,CACb7C,aAAa,CAAEC,OAAQ,CACvBQ,aAAa,CAAEA,aAAc,CAC7B2C,cAAc,CAAE5C,eAAe,EAAIF,YAAa,CAAAoC,QAAA,CAE/C,SAAAA,SAAAW,KAAA,KAAG,CAAAC,cAAc,CAAAD,KAAA,CAAdC,cAAc,OAChB,CAAA/C,UAAU,CAAC,CACTqC,IAAI,CAAJA,IAAI,CACJC,KAAK,CAAEC,SAAS,CAChBQ,cAAc,CAAdA,cACF,CAAC,CAAC,IAXCT,KAaK,CAAC,CAEjB,CAAC,CAAC,CACF,CAAC,CAEP,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.LazyView=void 0;var _react=_interopRequireDefault(require("react"));var _jsxRuntime=require("react/jsx-runtime");var LazyView=function LazyView(props){var shouldUpdate=props.shouldUpdate,children=props.children;if(!shouldUpdate)return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{});return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:children});};exports.LazyView=LazyView;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.LazyView=void 0;var _react=_interopRequireDefault(require("react"));var _jsxRuntime=require("react/jsx-runtime");var LazyView=exports.LazyView=function LazyView(props){var shouldUpdate=props.shouldUpdate,children=props.children;if(!shouldUpdate)return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{});return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:children});};
2
2
  //# sourceMappingURL=LazyView.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["LazyView.tsx"],"names":["LazyView","props","shouldUpdate","children"],"mappings":"oKACA,oD,6CAMO,GAAMA,CAAAA,QAA4C,CAAG,QAA/CA,CAAAA,QAA+C,CAACC,KAAD,CAAW,CACrE,GAAQC,CAAAA,YAAR,CAAmCD,KAAnC,CAAQC,YAAR,CAAsBC,QAAtB,CAAmCF,KAAnC,CAAsBE,QAAtB,CAEA,GAAI,CAACD,YAAL,CAAmB,MAAO,4CAAP,CAEnB,MAAO,mDAAGC,QAAH,EAAP,CACD,CANM,C","sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React from \"react\";\n\ninterface Props {\n shouldUpdate: boolean;\n}\n\nexport const LazyView: React.FC<PropsWithChildren<Props>> = (props) => {\n const { shouldUpdate, children } = props;\n\n if (!shouldUpdate) return <></>;\n\n return <>{children}</>;\n};\n"]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_jsxRuntime","LazyView","exports","props","shouldUpdate","children","jsx","Fragment"],"sourceRoot":"../../../src","sources":["components/LazyView.tsx"],"mappings":"oKACA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAA0B,IAAAC,WAAA,CAAAD,OAAA,sBAMnB,GAAM,CAAAE,QAA4C,CAAAC,OAAA,CAAAD,QAAA,CAAG,QAA/C,CAAAA,QAA4CA,CAAIE,KAAK,CAAK,CACrE,GAAQ,CAAAC,YAAY,CAAeD,KAAK,CAAhCC,YAAY,CAAEC,QAAQ,CAAKF,KAAK,CAAlBE,QAAQ,CAE9B,GAAI,CAACD,YAAY,CAAE,MAAO,GAAAJ,WAAA,CAAAM,GAAA,EAAAN,WAAA,CAAAO,QAAA,GAAI,CAAC,CAE/B,MAAO,GAAAP,WAAA,CAAAM,GAAA,EAAAN,WAAA,CAAAO,QAAA,EAAAF,QAAA,CAAGA,QAAQ,CAAG,CAAC,CACxB,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PaginationItem=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Basic/PaginationItem.tsx";function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}var _worklet_14422051368407_init_data={code:"function anonymous(){const{horizontal,height,width,index,animValue,count,interpolate,Extrapolation}=this.__closure;var _animValue,_animValue2;const size=horizontal?height:width;let inputRange=[index-1,index,index+1];let outputRange=[-size,0,size];if(index===0&&((_animValue=animValue)===null||_animValue===void 0?void 0:_animValue.value)>count-1){inputRange=[count-1,count,count+1];outputRange=[-size,0,size];}return{transform:[{translateX:interpolate((_animValue2=animValue)===null||_animValue2===void 0?void 0:_animValue2.value,inputRange,outputRange,Extrapolation.CLAMP)}]};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Basic/PaginationItem.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AA6CqC,QAAAA,UAAA,EAAM,kGAAAC,WAAA,CAAAC,WAAA,oCACvC,GAAAC,WAAaC,OAAU,CAAGC,CAAbD,CAAaC,KAAbD,CAAsBE,KAAnC,EAAaF,CAAb,CACA,GAAID,YAAU,CAAII,OAAQ,CAARA,CAAWA,IAAXA,CAAlB,CACA,GAAIC,WAAe,CAACC,WAASA,CAA7BC,SAAoBD,IAApB,IAAoBA,EAApBR,UAAA,SAAoBQ,CAApB,MAAoBA,CAApBR,UAAA,CAAAU,KAAmB,EAAnBC,KAAA,uCAEAJ,WAAS,CAALD,OAAeG,CAAfH,CAAeG,IAAfH,CAAJ,CACEJ,CACAK,OACFK,SAAA,qJADEL,EAMIM\",\"names\":[\"anonymous\",\"_animValue\",\"_animValue2\",\"inputRange\",\"horizontal\",\"height\",\"width\",\"index\",\"outputRange\",\"size\",\"animValue\",\"value\",\"count\",\"transform\",\"translateX\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Basic/PaginationItem.tsx\"]}",version:"3.10.1"};var PaginationItem=function PaginationItem(props){var animValue=props.animValue,dotStyle=props.dotStyle,activeDotStyle=props.activeDotStyle,index=props.index,count=props.count,size=props.size,horizontal=props.horizontal,children=props.children,onPress=props.onPress;var defaultDotSize=10;var sizes={width:size||(dotStyle==null?void 0:dotStyle.width)||defaultDotSize,height:size||(dotStyle==null?void 0:dotStyle.height)||defaultDotSize};var width=sizes.width;var height=sizes.height;var animStyle=(0,_reactNativeReanimated.useAnimatedStyle)(function(){var _e=[new global.Error(),-9,-27];var anonymous=function anonymous(){var size=horizontal?height:width;var inputRange=[index-1,index,index+1];var outputRange=[-size,0,size];if(index===0&&(animValue==null?void 0:animValue.value)>count-1){inputRange=[count-1,count,count+1];outputRange=[-size,0,size];}return{transform:[{translateX:(0,_reactNativeReanimated.interpolate)(animValue==null?void 0:animValue.value,inputRange,outputRange,_reactNativeReanimated.Extrapolation.CLAMP)}]};};anonymous.__closure={horizontal:horizontal,height:height,width:width,index:index,animValue:animValue,count:count,interpolate:_reactNativeReanimated.interpolate,Extrapolation:_reactNativeReanimated.Extrapolation};anonymous.__workletHash=14422051368407;anonymous.__initData=_worklet_14422051368407_init_data;anonymous.__stackDetails=_e;return anonymous;}(),[animValue,index,count,horizontal]);return(0,_jsxRuntime.jsx)(_reactNative.TouchableWithoutFeedback,{onPress:onPress,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{width:width,height:height,overflow:"hidden",transform:[{rotateZ:horizontal?"90deg":"0deg"}]},dotStyle],children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[{backgroundColor:"black",flex:1},animStyle,activeDotStyle],children:children})})});};exports.PaginationItem=PaginationItem;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PaginationItem=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Basic/PaginationItem.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var _worklet_3529979869107_init_data={code:"function PaginationItemTsx1(){const{horizontal,height,width,index,animValue,count,interpolate,Extrapolation}=this.__closure;var _animValue,_animValue2;const size=horizontal?height:width;let inputRange=[index-1,index,index+1];let outputRange=[-size,0,size];if(index===0&&((_animValue=animValue)===null||_animValue===void 0?void 0:_animValue.value)>count-1){inputRange=[count-1,count,count+1];outputRange=[-size,0,size];}return{transform:[{translateX:interpolate((_animValue2=animValue)===null||_animValue2===void 0?void 0:_animValue2.value,inputRange,outputRange,Extrapolation.CLAMP)}]};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Basic/PaginationItem.tsx",sourceMap:"{\"version\":3,\"names\":[\"PaginationItemTsx1\",\"horizontal\",\"height\",\"width\",\"index\",\"animValue\",\"count\",\"interpolate\",\"Extrapolation\",\"__closure\",\"_animValue\",\"_animValue2\",\"size\",\"inputRange\",\"outputRange\",\"value\",\"transform\",\"translateX\",\"CLAMP\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Basic/PaginationItem.tsx\"],\"mappings\":\"AAyDqC,SAAAA,kBAAMA,CAAA,QAAAC,UAAA,CAAAC,MAAA,CAAAC,KAAA,CAAAC,KAAA,CAAAC,SAAA,CAAAC,KAAA,CAAAC,WAAA,CAAAC,aAAA,OAAAC,SAAA,KAAAC,UAAA,CAAAC,WAAA,CACvC,KAAM,CAAAC,IAAI,CAAGX,UAAU,CAAGC,MAAM,CAAGC,KAAK,CACxC,GAAI,CAAAU,UAAU,CAAG,CAACT,KAAK,CAAG,CAAC,CAAEA,KAAK,CAAEA,KAAK,CAAG,CAAC,CAAC,CAC9C,GAAI,CAAAU,WAAW,CAAG,CAAC,CAACF,IAAI,CAAE,CAAC,CAAEA,IAAI,CAAC,CAElC,GAAIR,KAAK,GAAK,CAAC,EAAI,EAAAM,UAAA,CAAAL,SAAS,UAAAK,UAAA,iBAATA,UAAA,CAAWK,KAAK,EAAGT,KAAK,CAAG,CAAC,CAAE,CAC/CO,UAAU,CAAG,CAACP,KAAK,CAAG,CAAC,CAAEA,KAAK,CAAEA,KAAK,CAAG,CAAC,CAAC,CAC1CQ,WAAW,CAAG,CAAC,CAACF,IAAI,CAAE,CAAC,CAAEA,IAAI,CAAC,CAChC,CAEA,MAAO,CACLI,SAAS,CAAE,CACT,CACEC,UAAU,CAAEV,WAAW,EAAAI,WAAA,CAACN,SAAS,UAAAM,WAAA,iBAATA,WAAA,CAAWI,KAAK,CAAEF,UAAU,CAAEC,WAAW,CAAEN,aAAa,CAACU,KAAK,CACxF,CAAC,CAEL,CAAC,CACH\",\"ignoreList\":[]}"};var PaginationItem=exports.PaginationItem=function PaginationItem(props){var animValue=props.animValue,dotStyle=props.dotStyle,activeDotStyle=props.activeDotStyle,index=props.index,count=props.count,size=props.size,horizontal=props.horizontal,children=props.children,onPress=props.onPress,accessibilityLabel=props.accessibilityLabel;var defaultDotSize=10;var sizes={width:size||(dotStyle==null?void 0:dotStyle.width)||defaultDotSize,height:size||(dotStyle==null?void 0:dotStyle.height)||defaultDotSize};var width=sizes.width;var height=sizes.height;var animStyle=(0,_reactNativeReanimated.useAnimatedStyle)(function PaginationItemTsx1Factory(_ref){var _worklet_3529979869107_init_data=_ref._worklet_3529979869107_init_data,horizontal=_ref.horizontal,height=_ref.height,width=_ref.width,index=_ref.index,animValue=_ref.animValue,count=_ref.count,interpolate=_ref.interpolate,Extrapolation=_ref.Extrapolation;var _e=[new global.Error(),-9,-27];var PaginationItemTsx1=function PaginationItemTsx1(){var size=horizontal?height:width;var inputRange=[index-1,index,index+1];var outputRange=[-size,0,size];if(index===0&&(animValue==null?void 0:animValue.value)>count-1){inputRange=[count-1,count,count+1];outputRange=[-size,0,size];}return{transform:[{translateX:interpolate(animValue==null?void 0:animValue.value,inputRange,outputRange,Extrapolation.CLAMP)}]};};PaginationItemTsx1.__closure={horizontal:horizontal,height:height,width:width,index:index,animValue:animValue,count:count,interpolate:interpolate,Extrapolation:Extrapolation};PaginationItemTsx1.__workletHash=3529979869107;PaginationItemTsx1.__pluginVersion="0.5.1";PaginationItemTsx1.__initData=_worklet_3529979869107_init_data;PaginationItemTsx1.__stackDetails=_e;return PaginationItemTsx1;}({_worklet_3529979869107_init_data:_worklet_3529979869107_init_data,horizontal:horizontal,height:height,width:width,index:index,animValue:animValue,count:count,interpolate:_reactNativeReanimated.interpolate,Extrapolation:_reactNativeReanimated.Extrapolation}),[animValue,index,count,horizontal]);return(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:onPress,accessibilityLabel:accessibilityLabel,accessibilityRole:"button",accessibilityHint:animValue.value===index?"":`Go to ${accessibilityLabel}`,accessibilityState:{selected:animValue.value===index},children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{width:width,height:height,overflow:"hidden",transform:[{rotateZ:horizontal?"90deg":"0deg"}]},dotStyle],children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[{backgroundColor:"black",flex:1},animStyle,activeDotStyle],children:children})})});};
2
2
  //# sourceMappingURL=PaginationItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PaginationItem.tsx"],"names":["PaginationItem","props","animValue","dotStyle","activeDotStyle","index","count","size","horizontal","children","onPress","defaultDotSize","sizes","width","height","animStyle","inputRange","outputRange","value","transform","translateX","Extrapolation","CLAMP","interpolate","overflow","rotateZ","backgroundColor","flex"],"mappings":"0KACA,oDAEA,yCACA,uF,4uFAOO,GAAMA,CAAAA,cAWZ,CAAG,QAXSA,CAAAA,cAWT,CAACC,KAAD,CAAW,CACb,GAAQC,CAAAA,SAAR,CACED,KADF,CAAQC,SAAR,CAAmBC,QAAnB,CACEF,KADF,CAAmBE,QAAnB,CAA6BC,cAA7B,CACEH,KADF,CAA6BG,cAA7B,CAA6CC,KAA7C,CACEJ,KADF,CAA6CI,KAA7C,CAAoDC,KAApD,CACEL,KADF,CAAoDK,KAApD,CAA2DC,IAA3D,CACEN,KADF,CAA2DM,IAA3D,CAAiEC,UAAjE,CACEP,KADF,CAAiEO,UAAjE,CAA6EC,QAA7E,CACER,KADF,CAA6EQ,QAA7E,CAAuFC,OAAvF,CACET,KADF,CAAuFS,OAAvF,CAGA,GAAMC,CAAAA,cAAc,CAAG,EAAvB,CAEA,GAAMC,CAAAA,KAAK,CAAG,CACZC,KAAK,CAAEN,IAAI,GAAIJ,QAAJ,cAAIA,QAAQ,CAAEU,KAAd,CAAJ,EAA2BF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,oBAAC,iBAAD,EACE,KAAK,CAAE,CACL,CACEG,KAAK,CAALA,KADF,CAEEC,MAAM,CAANA,MAFF,CAGEU,QAAQ,CAAE,QAHZ,CAIEL,SAAS,CAAE,CACT,CACEM,OAAO,CAAEjB,UAAU,CAAG,OAAH,CAAa,MADlC,CADS,CAJb,CADK,CAWLL,QAXK,CADT,UAeE,oBAAC,8BAAD,CAAU,IAAV,EACE,KAAK,CAAE,CACL,CACEuB,eAAe,CAAE,OADnB,CAEEC,IAAI,CAAE,CAFR,CADK,CAKLZ,SALK,CAMLX,cANK,CADT,UAUGK,QAVH,EAfF,EADF,EADF,CAgCD,CArFM,C","sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport type { ViewStyle } from \"react-native\";\nimport { TouchableWithoutFeedback, View } from \"react-native\";\nimport Animated, { Extrapolation, interpolate, useAnimatedStyle } from \"react-native-reanimated\";\n\nexport type DotStyle = Omit<ViewStyle, \"width\" | \"height\"> & {\n width?: number;\n height?: number;\n};\n\nexport const PaginationItem: React.FC<\n PropsWithChildren<{\n index: number;\n count: number;\n size?: number;\n animValue: Animated.SharedValue<number>;\n horizontal?: boolean;\n dotStyle?: DotStyle;\n activeDotStyle?: DotStyle;\n onPress: () => void;\n }>\n> = (props) => {\n const { animValue, dotStyle, activeDotStyle, index, count, size, horizontal, children, onPress } =\n props;\n\n const defaultDotSize = 10;\n\n const sizes = {\n width: size || dotStyle?.width || defaultDotSize,\n height: size || dotStyle?.height || defaultDotSize,\n };\n\n /**\n * TODO: Keep this for future implementation\n * Used to change the size of the active dot with animation\n */\n // const animatedSize = {\n // width: activeDotStyle?.width,\n // height: activeDotStyle?.height,\n // };\n\n const width = sizes.width;\n const height = sizes.height;\n\n const animStyle = useAnimatedStyle(() => {\n const size = horizontal ? height : width;\n let inputRange = [index - 1, index, index + 1];\n let outputRange = [-size, 0, size];\n\n if (index === 0 && animValue?.value > count - 1) {\n inputRange = [count - 1, count, count + 1];\n outputRange = [-size, 0, size];\n }\n\n return {\n transform: [\n {\n translateX: interpolate(animValue?.value, inputRange, outputRange, Extrapolation.CLAMP),\n },\n ],\n };\n }, [animValue, index, count, horizontal]);\n\n return (\n <TouchableWithoutFeedback onPress={onPress}>\n <View\n style={[\n {\n width,\n height,\n overflow: \"hidden\",\n transform: [\n {\n rotateZ: horizontal ? \"90deg\" : \"0deg\",\n },\n ],\n },\n dotStyle,\n ]}\n >\n <Animated.View\n style={[\n {\n backgroundColor: \"black\",\n flex: 1,\n },\n animStyle,\n activeDotStyle,\n ]}\n >\n {children}\n </Animated.View>\n </View>\n </TouchableWithoutFeedback>\n );\n};\n"]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_worklet_3529979869107_init_data","code","location","sourceMap","PaginationItem","exports","props","animValue","dotStyle","activeDotStyle","index","count","size","horizontal","children","onPress","accessibilityLabel","defaultDotSize","sizes","width","height","animStyle","useAnimatedStyle","PaginationItemTsx1Factory","_ref","interpolate","Extrapolation","_e","global","Error","PaginationItemTsx1","inputRange","outputRange","value","transform","translateX","CLAMP","__closure","__workletHash","__pluginVersion","__initData","__stackDetails","jsx","Pressable","accessibilityRole","accessibilityHint","accessibilityState","selected","View","style","overflow","rotateZ","backgroundColor","flex"],"sourceRoot":"../../../../../src","sources":["components/Pagination/Basic/PaginationItem.tsx"],"mappings":"0KACA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,YAAA,CAAAD,OAAA,iBAEA,IAAAE,sBAAA,CAAAC,uBAAA,CAAAH,OAAA,6BAAiG,IAAAI,WAAA,CAAAJ,OAAA,0BAAAK,KAAA,MAAAC,YAAA,mJAAAH,wBAAAI,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAA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,CAAEE,UAAU,CAAC,CAAC,CAEzC,MACE,GAAApC,WAAA,CAAAiE,GAAA,EAACpE,YAAA,CAAAqE,SAAS,EACR5B,OAAO,CAAEA,OAAQ,CACjBC,kBAAkB,CAAEA,kBAAmB,CACvC4B,iBAAiB,CAAC,QAAQ,CAC1BC,iBAAiB,CAAEtC,SAAS,CAAC0B,KAAK,GAAKvB,KAAK,CAAG,EAAE,CAAG,SAASM,kBAAkB,EAAG,CAClF8B,kBAAkB,CAAE,CAAEC,QAAQ,CAAExC,SAAS,CAAC0B,KAAK,GAAKvB,KAAM,CAAE,CAAAI,QAAA,CAE5D,GAAArC,WAAA,CAAAiE,GAAA,EAACpE,YAAA,CAAA0E,IAAI,EACHC,KAAK,CAAE,CACL,CACE9B,KAAK,CAALA,KAAK,CACLC,MAAM,CAANA,MAAM,CACN8B,QAAQ,CAAE,QAAQ,CAClBhB,SAAS,CAAE,CACT,CACEiB,OAAO,CAAEtC,UAAU,CAAG,OAAO,CAAG,MAClC,CAAC,CAEL,CAAC,CACDL,QAAQ,CACR,CAAAM,QAAA,CAEF,GAAArC,WAAA,CAAAiE,GAAA,EAACnE,sBAAA,CAAAe,OAAQ,CAAC0D,IAAI,EACZC,KAAK,CAAE,CACL,CACEG,eAAe,CAAE,OAAO,CACxBC,IAAI,CAAE,CACR,CAAC,CACDhC,SAAS,CACTZ,cAAc,CACd,CAAAK,QAAA,CAEDA,QAAQ,CACI,CAAC,CACZ,CAAC,CACE,CAAC,CAEhB,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Basic=void 0;var _reactNative=require("react-native");var _react=_interopRequireDefault(require("react"));var _PaginationItem=require("./PaginationItem");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Basic/index.tsx";var Basic=function Basic(props){var activeDotStyle=props.activeDotStyle,dotStyle=props.dotStyle,progress=props.progress,_props$horizontal=props.horizontal,horizontal=_props$horizontal===void 0?true:_props$horizontal,data=props.data,size=props.size,containerStyle=props.containerStyle,renderItem=props.renderItem,_onPress=props.onPress;if(typeof size==="string"||typeof(dotStyle==null?void 0:dotStyle.width)==="string"||typeof(dotStyle==null?void 0:dotStyle.height)==="string")throw new Error("size/width/height must be a number");return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{justifyContent:"space-between",alignSelf:"center"},horizontal?{flexDirection:"row"}:{flexDirection:"column"},containerStyle],children:data.map(function(item,index){return(0,_jsxRuntime.jsx)(_PaginationItem.PaginationItem,{index:index,size:size,count:data.length,dotStyle:dotStyle,animValue:progress,horizontal:!horizontal,activeDotStyle:activeDotStyle,onPress:function onPress(){return _onPress==null?void 0:_onPress(index);},children:renderItem==null?void 0:renderItem(item,index)},index);})});};exports.Basic=Basic;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Basic=void 0;var _reactNative=require("react-native");var _react=_interopRequireDefault(require("react"));var _PaginationItem=require("./PaginationItem");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Basic/index.tsx";var Basic=exports.Basic=function Basic(props){var activeDotStyle=props.activeDotStyle,dotStyle=props.dotStyle,progress=props.progress,_props$horizontal=props.horizontal,horizontal=_props$horizontal===void 0?true:_props$horizontal,data=props.data,size=props.size,containerStyle=props.containerStyle,renderItem=props.renderItem,_onPress=props.onPress,carouselName=props.carouselName;if(typeof size==="string"||typeof(dotStyle==null?void 0:dotStyle.width)==="string"||typeof(dotStyle==null?void 0:dotStyle.height)==="string")throw new Error("size/width/height must be a number");return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{justifyContent:"space-between",alignSelf:"center"},horizontal?{flexDirection:"row"}:{flexDirection:"column"},containerStyle],children:data.map(function(item,index){return(0,_jsxRuntime.jsx)(_PaginationItem.PaginationItem,{index:index,size:size,count:data.length,dotStyle:dotStyle,animValue:progress,horizontal:!horizontal,activeDotStyle:activeDotStyle,onPress:function onPress(){return _onPress==null?void 0:_onPress(index);},accessibilityLabel:`Slide ${index+1} of ${data.length} - ${carouselName}`,children:renderItem==null?void 0:renderItem(item,index)},index);})});};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.tsx"],"names":["Basic","props","activeDotStyle","dotStyle","progress","horizontal","data","size","containerStyle","renderItem","onPress","width","height","Error","justifyContent","alignSelf","flexDirection","map","item","index","length"],"mappings":"iKAAA,yCAGA,oDAEA,gD,yMAcO,GAAMA,CAAAA,KAAK,CAAG,QAARA,CAAAA,KAAQ,CAAeC,KAAf,CAAwC,CAC3D,GACEC,CAAAA,cADF,CAUID,KAVJ,CACEC,cADF,CAEEC,QAFF,CAUIF,KAVJ,CAEEE,QAFF,CAGEC,QAHF,CAUIH,KAVJ,CAGEG,QAHF,mBAUIH,KAVJ,CAIEI,UAJF,CAIEA,UAJF,4BAIe,IAJf,mBAKEC,IALF,CAUIL,KAVJ,CAKEK,IALF,CAMEC,IANF,CAUIN,KAVJ,CAMEM,IANF,CAOEC,cAPF,CAUIP,KAVJ,CAOEO,cAPF,CAQEC,UARF,CAUIR,KAVJ,CAQEQ,UARF,CASEC,QATF,CAUIT,KAVJ,CASES,OATF,CAYA,GACE,MAAOH,CAAAA,IAAP,GAAgB,QAAhB,EACA,OAAOJ,QAAP,cAAOA,QAAQ,CAAEQ,KAAjB,IAA2B,QAD3B,EAEA,OAAOR,QAAP,cAAOA,QAAQ,CAAES,MAAjB,IAA4B,QAH9B,CAKE,KAAM,IAAIC,CAAAA,KAAJ,CAAU,oCAAV,CAAN,CAEF,MACE,oBAAC,iBAAD,EACE,KAAK,CAAE,CACL,CACEC,cAAc,CAAE,eADlB,CAEEC,SAAS,CAAE,QAFb,CADK,CAKLV,UAAU,CACN,CACEW,aAAa,CAAE,KADjB,CADM,CAIN,CACEA,aAAa,CAAE,QADjB,CATC,CAYLR,cAZK,CADT,UAgBGF,IAAI,CAACW,GAAL,CAAS,SAACC,IAAD,CAAOC,KAAP,CAAiB,CACzB,MACE,oBAAC,8BAAD,EAEE,KAAK,CAAEA,KAFT,CAGE,IAAI,CAAEZ,IAHR,CAIE,KAAK,CAAED,IAAI,CAACc,MAJd,CAKE,QAAQ,CAAEjB,QALZ,CAME,SAAS,CAAEC,QANb,CAOE,UAAU,CAAE,CAACC,UAPf,CAQE,cAAc,CAAEH,cARlB,CASE,OAAO,CAAE,yBAAMQ,CAAAA,QAAN,cAAMA,QAAO,CAAGS,KAAH,CAAb,EATX,UAWGV,UAXH,cAWGA,UAAU,CAAGS,IAAH,CAASC,KAAT,CAXb,EACOA,KADP,CADF,CAeD,CAhBA,CAhBH,EADF,CAoCD,CAxDM,C","sourcesContent":["import { type StyleProp, View, type ViewStyle } from \"react-native\";\nimport type { SharedValue } from \"react-native-reanimated\";\n\nimport React from \"react\";\nimport type { DotStyle } from \"./PaginationItem\";\nimport { PaginationItem } from \"./PaginationItem\";\n\nexport interface BasicProps<T> {\n progress: SharedValue<number>;\n horizontal?: boolean;\n data: Array<T>;\n renderItem?: (item: T, index: number) => React.ReactNode;\n containerStyle?: StyleProp<ViewStyle>;\n dotStyle?: DotStyle;\n activeDotStyle?: DotStyle;\n size?: number;\n onPress?: (index: number) => void;\n}\n\nexport const Basic = <T extends {}>(props: BasicProps<T>) => {\n const {\n activeDotStyle,\n dotStyle,\n progress,\n horizontal = true,\n data,\n size,\n containerStyle,\n renderItem,\n onPress,\n } = props;\n\n if (\n typeof size === \"string\" ||\n typeof dotStyle?.width === \"string\" ||\n typeof dotStyle?.height === \"string\"\n )\n throw new Error(\"size/width/height must be a number\");\n\n return (\n <View\n style={[\n {\n justifyContent: \"space-between\",\n alignSelf: \"center\",\n },\n horizontal\n ? {\n flexDirection: \"row\",\n }\n : {\n flexDirection: \"column\",\n },\n containerStyle,\n ]}\n >\n {data.map((item, index) => {\n return (\n <PaginationItem\n key={index}\n index={index}\n size={size}\n count={data.length}\n dotStyle={dotStyle}\n animValue={progress}\n horizontal={!horizontal}\n activeDotStyle={activeDotStyle}\n onPress={() => onPress?.(index)}\n >\n {renderItem?.(item, index)}\n </PaginationItem>\n );\n })}\n </View>\n );\n};\n"]}
1
+ {"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_PaginationItem","_jsxRuntime","_this","_jsxFileName","Basic","exports","props","activeDotStyle","dotStyle","progress","_props$horizontal","horizontal","data","size","containerStyle","renderItem","onPress","carouselName","width","height","Error","jsx","View","style","justifyContent","alignSelf","flexDirection","children","map","item","index","PaginationItem","count","length","animValue","accessibilityLabel"],"sourceRoot":"../../../../../src","sources":["components/Pagination/Basic/index.tsx"],"mappings":"iKAAA,IAAAA,YAAA,CAAAC,OAAA,iBAGA,IAAAC,MAAA,CAAAC,sBAAA,CAAAF,OAAA,WAEA,IAAAG,eAAA,CAAAH,OAAA,qBAAkD,IAAAI,WAAA,CAAAJ,OAAA,0BAAAK,KAAA,MAAAC,YAAA,iIAe3C,GAAM,CAAAC,KAAK,CAAAC,OAAA,CAAAD,KAAA,CAAG,QAAR,CAAAA,KAAKA,CAAkBE,KAAoB,CAAK,CAC3D,GACE,CAAAC,cAAc,CAUZD,KAAK,CAVPC,cAAc,CACdC,QAAQ,CASNF,KAAK,CATPE,QAAQ,CACRC,QAAQ,CAQNH,KAAK,CARPG,QAAQ,CAAAC,iBAAA,CAQNJ,KAAK,CAPPK,UAAU,CAAVA,UAAU,CAAAD,iBAAA,UAAG,IAAI,CAAAA,iBAAA,CACjBE,IAAI,CAMFN,KAAK,CANPM,IAAI,CACJC,IAAI,CAKFP,KAAK,CALPO,IAAI,CACJC,cAAc,CAIZR,KAAK,CAJPQ,cAAc,CACdC,UAAU,CAGRT,KAAK,CAHPS,UAAU,CACVC,QAAO,CAELV,KAAK,CAFPU,OAAO,CACPC,YAAY,C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/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PaginationItem=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated"));var _jsxRuntime=require("react/jsx-runtime");var _excluded=["width","height","borderRadius","backgroundColor"],_excluded2=["width","height","borderRadius","backgroundColor"];var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Custom/PaginationItem.tsx";function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}var _worklet_10273207657391_init_data={code:"function anonymous(){const{runOnJS,handleCustomAnimation,animValue}=this.__closure;var _animValue;runOnJS(handleCustomAnimation)((_animValue=animValue)===null||_animValue===void 0?void 0:_animValue.value);}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Custom/PaginationItem.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AAuDkB,QAAAA,UAAA,EAAM,kEAAAC,WAAA,4GACpBC\",\"names\":[\"anonymous\",\"_animValue\",\"runOnJS\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Custom/PaginationItem.tsx\"]}",version:"3.10.1"};var _worklet_9217897742613_init_data={code:"function anonymous(){const{size,defaultDotSize,dotStyle,activeDotStyle,animValue,index,count,interpolate,Extrapolation,interpolateColor,customReanimatedStyleRef}=this.__closure;var _dotStyle,_activeDotStyle,_animValue,_animValue2,_animValue3,_ref,_ref2,_customReanimatedStyl,_restStyle$transform,_customReanimatedStyl2,_customReanimatedStyl3;const{width=size||defaultDotSize,height=size||defaultDotSize,borderRadius:borderRadius,backgroundColor=\"#FFF\",...restDotStyle}=(_dotStyle=dotStyle)!==null&&_dotStyle!==void 0?_dotStyle:{};const{width:activeWidth=width,height:activeHeight=height,borderRadius:activeBorderRadius,backgroundColor:activeBackgroundColor=\"#000\",...restActiveDotStyle}=(_activeDotStyle=activeDotStyle)!==null&&_activeDotStyle!==void 0?_activeDotStyle:{};let val=Math.abs(((_animValue=animValue)===null||_animValue===void 0?void 0:_animValue.value)-index);if(index===0&&((_animValue2=animValue)===null||_animValue2===void 0?void 0:_animValue2.value)>count-1)val=Math.abs(((_animValue3=animValue)===null||_animValue3===void 0?void 0:_animValue3.value)-count);const inputRange=[0,1,2];const restStyle=(_ref=val===0?restActiveDotStyle:restDotStyle)!==null&&_ref!==void 0?_ref:{};return{width:interpolate(val,inputRange,[activeWidth,width,width],Extrapolation.CLAMP),height:interpolate(val,inputRange,[activeHeight,height,height],Extrapolation.CLAMP),borderRadius:interpolate(val,inputRange,[(_ref2=activeBorderRadius!==null&&activeBorderRadius!==void 0?activeBorderRadius:borderRadius)!==null&&_ref2!==void 0?_ref2:0,borderRadius!==null&&borderRadius!==void 0?borderRadius:0,borderRadius!==null&&borderRadius!==void 0?borderRadius:0],Extrapolation.CLAMP),backgroundColor:interpolateColor(val,inputRange,[activeBackgroundColor,backgroundColor,backgroundColor]),...restStyle,...((_customReanimatedStyl=customReanimatedStyleRef.value)!==null&&_customReanimatedStyl!==void 0?_customReanimatedStyl:{}),transform:[...((_restStyle$transform=restStyle===null||restStyle===void 0?void 0:restStyle.transform)!==null&&_restStyle$transform!==void 0?_restStyle$transform:[]),...((_customReanimatedStyl2=(_customReanimatedStyl3=customReanimatedStyleRef.value)===null||_customReanimatedStyl3===void 0?void 0:_customReanimatedStyl3.transform)!==null&&_customReanimatedStyl2!==void 0?_customReanimatedStyl2:[])]};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Custom/PaginationItem.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AA2DqC,QAAAA,UAAA,EAAoB,gKAAAC,UAAA,CAAAC,eAAA,CAAAC,UAAA,CAAAC,WAAA,CAAAC,WAAA,CAAAC,IAAA,CAAAC,KAAA,CAAAC,qBAAA,CAAAC,oBAAA,CAAAC,sBAAA,CAAAC,sBAAA,OACrDC,KAAM,CAAAC,IAAA,EAAAC,eACJF,MAAK,CAAGC,IAAI,EAAIC,eAChBC,YAASF,CAAIG,aACbA,uBACAC,iBACA,CAAGC,kBAAH,IAAGA,IAAH,EAAGA,kBAAH,CAAGA,SAAH,CAAGA,GALC,MAONN,KAAM,CAAAO,WAAA,CAAAP,KAPA,CAQJA,MAAK,CAAEO,YAAW,CAAGP,MARjB,CASJG,YAAQK,mBATJ,CAUJJ,eAAcK,sBAHV,OAPA,CAWJJ,qBAXI,EAYJ,CAAGK,8BAAH,IAAGA,IAAH,EAAGA,wBAAH,CAAGA,eAAH,CAAGA,EAZC,CAOA,GAAAC,IAAA,CAAAC,IAAA,CAAAC,GAAA,GAAAtB,UAMFuB,UANE,UAAAvB,UAAA,iBAAAA,UAAN,CAAAwB,KAAM,EAANC,KAAM,EAON,GAAIL,KAAG,GAAO,CAAVA,EAAeM,2BAAS,IAATA,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AA,SAAIK,CAAJ,MAAIA,CAAJL,SAAA,CAAAM,SAAA,UAAA7B,oBAfK,SAeL,CAfKA,oBAeL,CAfK,EAeL,EAfK,KAAAC,sBAAA,EAAAC,sBAAA,CAAA0B,wBAAA,CAAAV,KAAA,UAAAhB,sBAAA,iBAAAA,sBAAA,CAAA2B,SAAA,UAAA5B,sBAAA,UAAAA,sBAAA,IAeL,CAjBIsB,CAAN,CAEO\",\"names\":[\"anonymous\",\"_dotStyle\",\"_activeDotStyle\",\"_animValue\",\"_animValue2\",\"_animValue3\",\"_ref\",\"_ref2\",\"_customReanimatedStyl\",\"_restStyle$transform\",\"_customReanimatedStyl2\",\"_customReanimatedStyl3\",\"width\",\"size\",\"defaultDotSize\",\"height\",\"borderRadius\",\"backgroundColor\",\"restDotStyle\",\"activeWidth\",\"activeHeight\",\"activeBorderRadius\",\"restActiveDotStyle\",\"val\",\"Math\",\"abs\",\"activeDotStyle\",\"value\",\"index\",\"animValue\",\"count\",\"inputRange\",\"restStyle\",\"interpolate\",\"Extrapolation\",\"CLAMP\",\"activeBackgroundColor\",\"customReanimatedStyleRef\",\"transform\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Custom/PaginationItem.tsx\"]}",version:"3.10.1"};var PaginationItem=function PaginationItem(props){var defaultDotSize=10;var animValue=props.animValue,dotStyle=props.dotStyle,activeDotStyle=props.activeDotStyle,index=props.index,count=props.count,size=props.size,horizontal=props.horizontal,children=props.children,customReanimatedStyle=props.customReanimatedStyle,onPress=props.onPress;var customReanimatedStyleRef=(0,_reactNativeReanimated.useSharedValue)({});var handleCustomAnimation=function handleCustomAnimation(progress){var _customReanimatedStyl;customReanimatedStyleRef.value=(_customReanimatedStyl=customReanimatedStyle==null?void 0:customReanimatedStyle(progress,index,count))!=null?_customReanimatedStyl:{};};(0,_reactNativeReanimated.useDerivedValue)(function(){var _e=[new global.Error(),-4,-27];var anonymous=function anonymous(){(0,_reactNativeReanimated.runOnJS)(handleCustomAnimation)(animValue==null?void 0:animValue.value);};anonymous.__closure={runOnJS:_reactNativeReanimated.runOnJS,handleCustomAnimation:handleCustomAnimation,animValue:animValue};anonymous.__workletHash=10273207657391;anonymous.__initData=_worklet_10273207657391_init_data;anonymous.__stackDetails=_e;return anonymous;}());var animStyle=(0,_reactNativeReanimated.useAnimatedStyle)(function(){var _e=[new global.Error(),-12,-27];var anonymous=function anonymous(){var _ref3,_ref4,_customReanimatedStyl2,_restStyle$transform,_customReanimatedStyl3,_customReanimatedStyl4;var _ref=dotStyle!=null?dotStyle:{},_ref$width=_ref.width,width=_ref$width===void 0?size||defaultDotSize:_ref$width,_ref$height=_ref.height,height=_ref$height===void 0?size||defaultDotSize:_ref$height,borderRadius=_ref.borderRadius,_ref$backgroundColor=_ref.backgroundColor,backgroundColor=_ref$backgroundColor===void 0?"#FFF":_ref$backgroundColor,restDotStyle=(0,_objectWithoutProperties2.default)(_ref,_excluded);var _ref2=activeDotStyle!=null?activeDotStyle:{},_ref2$width=_ref2.width,activeWidth=_ref2$width===void 0?width:_ref2$width,_ref2$height=_ref2.height,activeHeight=_ref2$height===void 0?height:_ref2$height,activeBorderRadius=_ref2.borderRadius,_ref2$backgroundColor=_ref2.backgroundColor,activeBackgroundColor=_ref2$backgroundColor===void 0?"#000":_ref2$backgroundColor,restActiveDotStyle=(0,_objectWithoutProperties2.default)(_ref2,_excluded2);var val=Math.abs((animValue==null?void 0:animValue.value)-index);if(index===0&&(animValue==null?void 0:animValue.value)>count-1)val=Math.abs((animValue==null?void 0:animValue.value)-count);var inputRange=[0,1,2];var restStyle=(_ref3=val===0?restActiveDotStyle:restDotStyle)!=null?_ref3:{};return Object.assign({width:(0,_reactNativeReanimated.interpolate)(val,inputRange,[activeWidth,width,width],_reactNativeReanimated.Extrapolation.CLAMP),height:(0,_reactNativeReanimated.interpolate)(val,inputRange,[activeHeight,height,height],_reactNativeReanimated.Extrapolation.CLAMP),borderRadius:(0,_reactNativeReanimated.interpolate)(val,inputRange,[(_ref4=activeBorderRadius!=null?activeBorderRadius:borderRadius)!=null?_ref4:0,borderRadius!=null?borderRadius:0,borderRadius!=null?borderRadius:0],_reactNativeReanimated.Extrapolation.CLAMP),backgroundColor:(0,_reactNativeReanimated.interpolateColor)(val,inputRange,[activeBackgroundColor,backgroundColor,backgroundColor])},restStyle,(_customReanimatedStyl2=customReanimatedStyleRef.value)!=null?_customReanimatedStyl2:{},{transform:[].concat((0,_toConsumableArray2.default)((_restStyle$transform=restStyle==null?void 0:restStyle.transform)!=null?_restStyle$transform:[]),(0,_toConsumableArray2.default)((_customReanimatedStyl3=(_customReanimatedStyl4=customReanimatedStyleRef.value)==null?void 0:_customReanimatedStyl4.transform)!=null?_customReanimatedStyl3:[]))});};anonymous.__closure={size:size,defaultDotSize:defaultDotSize,dotStyle:dotStyle,activeDotStyle:activeDotStyle,animValue:animValue,index:index,count:count,interpolate:_reactNativeReanimated.interpolate,Extrapolation:_reactNativeReanimated.Extrapolation,interpolateColor:_reactNativeReanimated.interpolateColor,customReanimatedStyleRef:customReanimatedStyleRef};anonymous.__workletHash=9217897742613;anonymous.__initData=_worklet_9217897742613_init_data;anonymous.__stackDetails=_e;return anonymous;}(),[animValue,index,count,horizontal,dotStyle,activeDotStyle,customReanimatedStyle]);return(0,_jsxRuntime.jsx)(_reactNative.TouchableWithoutFeedback,{onPress:onPress,children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[{overflow:"hidden",transform:[{rotateZ:horizontal?"90deg":"0deg"}]},dotStyle,animStyle],children:children})});};exports.PaginationItem=PaginationItem;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PaginationItem=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated"));var _reactNativeWorklets=require("react-native-worklets");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["width","height","borderRadius","backgroundColor"],_excluded2=["width","height","borderRadius","backgroundColor"];var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Custom/PaginationItem.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var _worklet_15771819902534_init_data={code:"function PaginationItemTsx1(){const{scheduleOnRN,handleCustomAnimation,animValue}=this.__closure;var _animValue;scheduleOnRN(handleCustomAnimation,(_animValue=animValue)===null||_animValue===void 0?void 0:_animValue.value);}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Custom/PaginationItem.tsx",sourceMap:"{\"version\":3,\"names\":[\"PaginationItemTsx1\",\"scheduleOnRN\",\"handleCustomAnimation\",\"animValue\",\"__closure\",\"_animValue\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Custom/PaginationItem.tsx\"],\"mappings\":\"AA6DkB,SAAAA,kBAAMA,CAAA,QAAAC,YAAA,CAAAC,qBAAA,CAAAC,SAAA,OAAAC,SAAA,KAAAC,UAAA,CACpBJ,YAAY,CAACC,qBAAqB,EAAAG,UAAA,CAAEF,SAAS,UAAAE,UAAA,iBAATA,UAAA,CAAWC,KAAK,CAAC,CACvD\",\"ignoreList\":[]}"};var _worklet_17402342231346_init_data={code:"function PaginationItemTsx2(){const{size,defaultDotSize,dotStyle,activeDotStyle,animValue,index,count,interpolate,Extrapolation,interpolateColor,customReanimatedStyleRef}=this.__closure;var _dotStyle,_activeDotStyle,_animValue,_animValue2,_animValue3,_ref,_ref2,_customReanimatedStyl,_restStyle$transform,_customReanimatedStyl2,_customReanimatedStyl3;const{width=size||defaultDotSize,height=size||defaultDotSize,borderRadius:borderRadius,backgroundColor=\"#FFF\",...restDotStyle}=(_dotStyle=dotStyle)!==null&&_dotStyle!==void 0?_dotStyle:{};const{width:activeWidth=width,height:activeHeight=height,borderRadius:activeBorderRadius,backgroundColor:activeBackgroundColor=\"#000\",...restActiveDotStyle}=(_activeDotStyle=activeDotStyle)!==null&&_activeDotStyle!==void 0?_activeDotStyle:{};let val=Math.abs(((_animValue=animValue)===null||_animValue===void 0?void 0:_animValue.value)-index);if(index===0&&((_animValue2=animValue)===null||_animValue2===void 0?void 0:_animValue2.value)>count-1)val=Math.abs(((_animValue3=animValue)===null||_animValue3===void 0?void 0:_animValue3.value)-count);const inputRange=[0,1,2];const restStyle=(_ref=val===0?restActiveDotStyle:restDotStyle)!==null&&_ref!==void 0?_ref:{};return{width:interpolate(val,inputRange,[activeWidth,width,width],Extrapolation.CLAMP),height:interpolate(val,inputRange,[activeHeight,height,height],Extrapolation.CLAMP),borderRadius:interpolate(val,inputRange,[(_ref2=activeBorderRadius!==null&&activeBorderRadius!==void 0?activeBorderRadius:borderRadius)!==null&&_ref2!==void 0?_ref2:0,borderRadius!==null&&borderRadius!==void 0?borderRadius:0,borderRadius!==null&&borderRadius!==void 0?borderRadius:0],Extrapolation.CLAMP),backgroundColor:interpolateColor(val,inputRange,[activeBackgroundColor,backgroundColor,backgroundColor]),...restStyle,...((_customReanimatedStyl=customReanimatedStyleRef.value)!==null&&_customReanimatedStyl!==void 0?_customReanimatedStyl:{}),transform:[...((_restStyle$transform=restStyle===null||restStyle===void 0?void 0:restStyle.transform)!==null&&_restStyle$transform!==void 0?_restStyle$transform:[]),...((_customReanimatedStyl2=(_customReanimatedStyl3=customReanimatedStyleRef.value)===null||_customReanimatedStyl3===void 0?void 0:_customReanimatedStyl3.transform)!==null&&_customReanimatedStyl2!==void 0?_customReanimatedStyl2:[])]};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Custom/PaginationItem.tsx",sourceMap:"{\"version\":3,\"names\":[\"PaginationItemTsx2\",\"size\",\"defaultDotSize\",\"dotStyle\",\"activeDotStyle\",\"animValue\",\"index\",\"count\",\"interpolate\",\"Extrapolation\",\"interpolateColor\",\"customReanimatedStyleRef\",\"__closure\",\"_dotStyle\",\"_activeDotStyle\",\"_animValue\",\"_animValue2\",\"_animValue3\",\"_ref\",\"_ref2\",\"_customReanimatedStyl\",\"_restStyle$transform\",\"_customReanimatedStyl2\",\"_customReanimatedStyl3\",\"width\",\"height\",\"borderRadius\",\"backgroundColor\",\"restDotStyle\",\"activeWidth\",\"activeHeight\",\"activeBorderRadius\",\"activeBackgroundColor\",\"restActiveDotStyle\",\"val\",\"Math\",\"abs\",\"value\",\"inputRange\",\"restStyle\",\"CLAMP\",\"transform\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/Pagination/Custom/PaginationItem.tsx\"],\"mappings\":\"AAiEqC,SAAAA,kBAA4BA,CAAA,QAAAC,IAAA,CAAAC,cAAA,CAAAC,QAAA,CAAAC,cAAA,CAAAC,SAAA,CAAAC,KAAA,CAAAC,KAAA,CAAAC,WAAA,CAAAC,aAAA,CAAAC,gBAAA,CAAAC,wBAAA,OAAAC,SAAA,KAAAC,SAAA,CAAAC,eAAA,CAAAC,UAAA,CAAAC,WAAA,CAAAC,WAAA,CAAAC,IAAA,CAAAC,KAAA,CAAAC,qBAAA,CAAAC,oBAAA,CAAAC,sBAAA,CAAAC,sBAAA,CAC7D,KAAM,CACJC,KAAK,CAAGvB,IAAI,EAAIC,cAAc,C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C,CACrFf,MAAM,CAAEjB,WAAW,CAAC0B,GAAG,CAAEI,UAAU,CAAE,CAACR,YAAY,CAAEL,MAAM,CAAEA,MAAM,CAAC,CAAEhB,aAAa,CAAC+B,KAAK,CAAC,CACzFd,YAAY,CAAElB,WAAW,CACvB0B,GAAG,CACHI,UAAU,CACV,EAAAnB,KAAA,CAACY,kBAAkB,SAAlBA,kBAAkB,UAAlBA,kBAAkB,CAAIL,YAAY,UAAAP,KAAA,UAAAA,KAAA,CAAI,CAAC,CAAEO,YAAY,SAAZA,YAAY,UAAZA,YAAY,CAAI,CAAC,CAAEA,YAAY,SAAZA,YAAY,UAAZA,YAAY,CAAI,CAAC,CAAC,CAC/EjB,aAAa,CAAC+B,KAChB,CAAC,CACDb,eAAe,CAAEjB,gBAAgB,CAACwB,GAAG,CAAEI,UAAU,CAAE,CACjDN,qBAAqB,CACrBL,eAAe,CACfA,eAAe,CAChB,CAAC,CACF,GAAGY,SAAS,CACZ,KAAAnB,qBAAA,CAAIT,wBAAwB,CAAC0B,KAAK,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,CAAC,CAAC,CAAC,CACzCqB,SAAS,CAAE,CACT,KAAApB,oBAAA,CAAIkB,SAAS,SAATA,SAAS,iBAATA,SAAS,CAAEE,SAAS,UAAApB,oBAAA,UAAAA,oBAAA,CAAI,EAAE,CAAC,CAC/B,KAAAC,sBAAA,EAAAC,sBAAA,CAAIZ,wBAAwB,CAAC0B,KAAK,UAAAd,sBAAA,iBAA9BA,sBAAA,CAAgCkB,SAAS,UAAAnB,sBAAA,UAAAA,sBAAA,CAAI,EAAE,CAAC,CAExD,CAAC,CACH\",\"ignoreList\":[]}"};var PaginationItem=exports.PaginationItem=function PaginationItem(props){var defaultDotSize=10;var animValue=props.animValue,dotStyle=props.dotStyle,activeDotStyle=props.activeDotStyle,index=props.index,count=props.count,size=props.size,horizontal=props.horizontal,children=props.children,customReanimatedStyle=props.customReanimatedStyle,onPress=props.onPress,accessibilityLabel=props.accessibilityLabel;var customReanimatedStyleRef=(0,_reactNativeReanimated.useSharedValue)({});var handleCustomAnimation=function handleCustomAnimation(progress){var _customReanimatedStyl;customReanimatedStyleRef.value=(_customReanimatedStyl=customReanimatedStyle==null?void 0:customReanimatedStyle(progress,index,count))!=null?_customReanimatedStyl:{};};(0,_reactNativeReanimated.useDerivedValue)(function PaginationItemTsx1Factory(_ref){var _worklet_15771819902534_init_data=_ref._worklet_15771819902534_init_data,scheduleOnRN=_ref.scheduleOnRN,handleCustomAnimation=_ref.handleCustomAnimation,animValue=_ref.animValue;var _e=[new global.Error(),-4,-27];var PaginationItemTsx1=function PaginationItemTsx1(){scheduleOnRN(handleCustomAnimation,animValue==null?void 0:animValue.value);};PaginationItemTsx1.__closure={scheduleOnRN:scheduleOnRN,handleCustomAnimation:handleCustomAnimation,animValue:animValue};PaginationItemTsx1.__workletHash=15771819902534;PaginationItemTsx1.__pluginVersion="0.5.1";PaginationItemTsx1.__initData=_worklet_15771819902534_init_data;PaginationItemTsx1.__stackDetails=_e;return PaginationItemTsx1;}({_worklet_15771819902534_init_data:_worklet_15771819902534_init_data,scheduleOnRN:_reactNativeWorklets.scheduleOnRN,handleCustomAnimation:handleCustomAnimation,animValue:animValue}));var animStyle=(0,_reactNativeReanimated.useAnimatedStyle)(function PaginationItemTsx2Factory(_ref2){var _worklet_17402342231346_init_data=_ref2._worklet_17402342231346_init_data,size=_ref2.size,defaultDotSize=_ref2.defaultDotSize,dotStyle=_ref2.dotStyle,activeDotStyle=_ref2.activeDotStyle,animValue=_ref2.animValue,index=_ref2.index,count=_ref2.count,interpolate=_ref2.interpolate,Extrapolation=_ref2.Extrapolation,interpolateColor=_ref2.interpolateColor,customReanimatedStyleRef=_ref2.customReanimatedStyleRef;var _e=[new global.Error(),-12,-27];var PaginationItemTsx2=function PaginationItemTsx2(){var _ref5,_ref6,_customReanimatedStyl2,_restStyle$transform,_customReanimatedStyl3,_customReanimatedStyl4;var _ref3=dotStyle!=null?dotStyle:{},_ref3$width=_ref3.width,width=_ref3$width===void 0?size||defaultDotSize:_ref3$width,_ref3$height=_ref3.height,height=_ref3$height===void 0?size||defaultDotSize:_ref3$height,borderRadius=_ref3.borderRadius,_ref3$backgroundColor=_ref3.backgroundColor,backgroundColor=_ref3$backgroundColor===void 0?"#FFF":_ref3$backgroundColor,restDotStyle=(0,_objectWithoutProperties2.default)(_ref3,_excluded);var _ref4=activeDotStyle!=null?activeDotStyle:{},_ref4$width=_ref4.width,activeWidth=_ref4$width===void 0?width:_ref4$width,_ref4$height=_ref4.height,activeHeight=_ref4$height===void 0?height:_ref4$height,activeBorderRadius=_ref4.borderRadius,_ref4$backgroundColor=_ref4.backgroundColor,activeBackgroundColor=_ref4$backgroundColor===void 0?"#000":_ref4$backgroundColor,restActiveDotStyle=(0,_objectWithoutProperties2.default)(_ref4,_excluded2);var val=Math.abs((animValue==null?void 0:animValue.value)-index);if(index===0&&(animValue==null?void 0:animValue.value)>count-1)val=Math.abs((animValue==null?void 0:animValue.value)-count);var inputRange=[0,1,2];var restStyle=(_ref5=val===0?restActiveDotStyle:restDotStyle)!=null?_ref5:{};return Object.assign({width:interpolate(val,inputRange,[activeWidth,width,width],Extrapolation.CLAMP),height:interpolate(val,inputRange,[activeHeight,height,height],Extrapolation.CLAMP),borderRadius:interpolate(val,inputRange,[(_ref6=activeBorderRadius!=null?activeBorderRadius:borderRadius)!=null?_ref6:0,borderRadius!=null?borderRadius:0,borderRadius!=null?borderRadius:0],Extrapolation.CLAMP),backgroundColor:interpolateColor(val,inputRange,[activeBackgroundColor,backgroundColor,backgroundColor])},restStyle,(_customReanimatedStyl2=customReanimatedStyleRef.value)!=null?_customReanimatedStyl2:{},{transform:[].concat((0,_toConsumableArray2.default)((_restStyle$transform=restStyle==null?void 0:restStyle.transform)!=null?_restStyle$transform:[]),(0,_toConsumableArray2.default)((_customReanimatedStyl3=(_customReanimatedStyl4=customReanimatedStyleRef.value)==null?void 0:_customReanimatedStyl4.transform)!=null?_customReanimatedStyl3:[]))});};PaginationItemTsx2.__closure={size:size,defaultDotSize:defaultDotSize,dotStyle:dotStyle,activeDotStyle:activeDotStyle,animValue:animValue,index:index,count:count,interpolate:interpolate,Extrapolation:Extrapolation,interpolateColor:interpolateColor,customReanimatedStyleRef:customReanimatedStyleRef};PaginationItemTsx2.__workletHash=17402342231346;PaginationItemTsx2.__pluginVersion="0.5.1";PaginationItemTsx2.__initData=_worklet_17402342231346_init_data;PaginationItemTsx2.__stackDetails=_e;return PaginationItemTsx2;}({_worklet_17402342231346_init_data:_worklet_17402342231346_init_data,size:size,defaultDotSize:defaultDotSize,dotStyle:dotStyle,activeDotStyle:activeDotStyle,animValue:animValue,index:index,count:count,interpolate:_reactNativeReanimated.interpolate,Extrapolation:_reactNativeReanimated.Extrapolation,interpolateColor:_reactNativeReanimated.interpolateColor,customReanimatedStyleRef:customReanimatedStyleRef}),[animValue,index,count,horizontal,dotStyle,activeDotStyle,customReanimatedStyle]);return(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:onPress,accessibilityLabel:accessibilityLabel,accessibilityRole:"button",accessibilityHint:animValue.value===index?"":`Go to ${accessibilityLabel}`,accessibilityState:{selected:animValue.value===index},children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[{overflow:"hidden",transform:[{rotateZ:horizontal?"90deg":"0deg"}]},dotStyle,animStyle],children:children})});};
2
2
  //# sourceMappingURL=PaginationItem.js.map