react-native-reanimated-carousel 5.0.0-beta.8 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -29
- package/lib/commonjs/components/Carousel.js +1 -1
- package/lib/commonjs/components/Carousel.js.map +1 -1
- package/lib/commonjs/components/CarouselLayout.js +1 -1
- package/lib/commonjs/components/CarouselLayout.js.map +1 -1
- package/lib/commonjs/components/ItemLayout.js +1 -1
- package/lib/commonjs/components/ItemLayout.js.map +1 -1
- package/lib/commonjs/components/ItemRenderer.js +1 -1
- package/lib/commonjs/components/ItemRenderer.js.map +1 -1
- package/lib/commonjs/components/Pagination/PaginationItem.js +2 -0
- package/lib/commonjs/components/Pagination/PaginationItem.js.map +1 -0
- package/lib/commonjs/components/Pagination/index.js +1 -1
- package/lib/commonjs/components/Pagination/index.js.map +1 -1
- package/lib/commonjs/components/ScrollViewGesture.js +1 -1
- package/lib/commonjs/components/ScrollViewGesture.js.map +1 -1
- package/lib/commonjs/hooks/useAutoPlay.js +1 -1
- package/lib/commonjs/hooks/useAutoPlay.js.map +1 -1
- package/lib/commonjs/hooks/useCarouselController.js +1 -1
- package/lib/commonjs/hooks/useCarouselController.js.map +1 -1
- package/lib/commonjs/hooks/useCommonVariables.js +1 -1
- package/lib/commonjs/hooks/useCommonVariables.js.map +1 -1
- package/lib/commonjs/hooks/useInitProps.js +1 -1
- package/lib/commonjs/hooks/useInitProps.js.map +1 -1
- package/lib/commonjs/hooks/useLayoutConfig.js +1 -1
- package/lib/commonjs/hooks/useLayoutConfig.js.map +1 -1
- package/lib/commonjs/hooks/useOffsetX.js.map +1 -1
- package/lib/commonjs/hooks/useOnProgressChange.js +1 -1
- package/lib/commonjs/hooks/useOnProgressChange.js.map +1 -1
- package/lib/commonjs/hooks/usePanGestureProxy.js.map +1 -1
- package/lib/commonjs/hooks/usePropsErrorBoundary.js +1 -1
- package/lib/commonjs/hooks/usePropsErrorBoundary.js.map +1 -1
- package/lib/commonjs/hooks/useUpdateGestureConfig.js.map +1 -1
- package/lib/commonjs/hooks/useVisibleRanges.js.map +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/layouts/index.js.map +1 -1
- package/lib/commonjs/layouts/normal.js +1 -1
- package/lib/commonjs/layouts/normal.js.map +1 -1
- package/lib/commonjs/layouts/parallax.js +1 -1
- package/lib/commonjs/layouts/parallax.js.map +1 -1
- package/lib/commonjs/layouts/stack.js +1 -1
- package/lib/commonjs/layouts/stack.js.map +1 -1
- package/lib/commonjs/public-types.js +2 -0
- package/lib/commonjs/public-types.js.map +1 -0
- package/lib/commonjs/store/index.js.map +1 -1
- package/lib/commonjs/utils/carousel-direction.js +2 -0
- package/lib/commonjs/utils/carousel-direction.js.map +1 -0
- package/lib/commonjs/utils/carousel-math.js +2 -0
- package/lib/commonjs/utils/carousel-math.js.map +1 -0
- package/lib/commonjs/utils/computed-with-auto-fill-data.js.map +1 -1
- package/lib/commonjs/utils/deal-with-animation.js +1 -1
- package/lib/commonjs/utils/deal-with-animation.js.map +1 -1
- package/lib/module/components/Carousel.js +1 -1
- package/lib/module/components/Carousel.js.map +1 -1
- package/lib/module/components/CarouselLayout.js +1 -1
- package/lib/module/components/CarouselLayout.js.map +1 -1
- package/lib/module/components/ItemLayout.js +1 -1
- package/lib/module/components/ItemLayout.js.map +1 -1
- package/lib/module/components/ItemRenderer.js +1 -1
- package/lib/module/components/ItemRenderer.js.map +1 -1
- package/lib/module/components/LazyView.js +1 -1
- package/lib/module/components/LazyView.js.map +1 -1
- package/lib/module/components/Pagination/PaginationItem.js +2 -0
- package/lib/module/components/Pagination/PaginationItem.js.map +1 -0
- package/lib/module/components/Pagination/index.js +1 -1
- package/lib/module/components/Pagination/index.js.map +1 -1
- package/lib/module/components/ScrollViewGesture.js +1 -1
- package/lib/module/components/ScrollViewGesture.js.map +1 -1
- package/lib/module/constants/index.js +1 -1
- package/lib/module/constants/index.js.map +1 -1
- package/lib/module/hooks/useAutoPlay.js +1 -1
- package/lib/module/hooks/useAutoPlay.js.map +1 -1
- package/lib/module/hooks/useCarouselController.js +1 -1
- package/lib/module/hooks/useCarouselController.js.map +1 -1
- package/lib/module/hooks/useCheckMounted.js +1 -1
- package/lib/module/hooks/useCheckMounted.js.map +1 -1
- package/lib/module/hooks/useCommonVariables.js +1 -1
- package/lib/module/hooks/useCommonVariables.js.map +1 -1
- package/lib/module/hooks/useInitProps.js +1 -1
- package/lib/module/hooks/useInitProps.js.map +1 -1
- package/lib/module/hooks/useLayoutConfig.js +1 -1
- package/lib/module/hooks/useLayoutConfig.js.map +1 -1
- package/lib/module/hooks/useOffsetX.js +1 -1
- package/lib/module/hooks/useOffsetX.js.map +1 -1
- package/lib/module/hooks/useOnProgressChange.js +1 -1
- package/lib/module/hooks/useOnProgressChange.js.map +1 -1
- package/lib/module/hooks/usePanGestureProxy.js +1 -1
- package/lib/module/hooks/usePanGestureProxy.js.map +1 -1
- package/lib/module/hooks/usePropsErrorBoundary.js +1 -1
- package/lib/module/hooks/usePropsErrorBoundary.js.map +1 -1
- package/lib/module/hooks/useUpdateGestureConfig.js +1 -1
- package/lib/module/hooks/useUpdateGestureConfig.js.map +1 -1
- package/lib/module/hooks/useVisibleRanges.js +1 -1
- package/lib/module/hooks/useVisibleRanges.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/layouts/index.js +1 -1
- package/lib/module/layouts/index.js.map +1 -1
- package/lib/module/layouts/normal.js +1 -1
- package/lib/module/layouts/normal.js.map +1 -1
- package/lib/module/layouts/parallax.js +1 -1
- package/lib/module/layouts/parallax.js.map +1 -1
- package/lib/module/layouts/stack.js +1 -1
- package/lib/module/layouts/stack.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/public-types.js +2 -0
- package/lib/module/public-types.js.map +1 -0
- package/lib/module/store/index.js +1 -1
- package/lib/module/store/index.js.map +1 -1
- package/lib/module/types.js +1 -1
- package/lib/module/utils/carousel-direction.js +2 -0
- package/lib/module/utils/carousel-direction.js.map +1 -0
- package/lib/module/utils/carousel-math.js +2 -0
- package/lib/module/utils/carousel-math.js.map +1 -0
- package/lib/module/utils/compute-gesture-translation.js +1 -1
- package/lib/module/utils/compute-gesture-translation.js.map +1 -1
- package/lib/module/utils/compute-offset-if-size-changed.js +1 -1
- package/lib/module/utils/compute-offset-if-size-changed.js.map +1 -1
- package/lib/module/utils/computed-with-auto-fill-data.js +1 -1
- package/lib/module/utils/computed-with-auto-fill-data.js.map +1 -1
- package/lib/module/utils/deal-with-animation.js +1 -1
- package/lib/module/utils/deal-with-animation.js.map +1 -1
- package/lib/module/utils/log.js +1 -1
- package/lib/module/utils/log.js.map +1 -1
- package/lib/module/utils/sanitize-animation-style.js +1 -1
- package/lib/module/utils/sanitize-animation-style.js.map +1 -1
- package/lib/typescript/commonjs/components/Carousel.d.ts +8 -0
- package/lib/typescript/commonjs/components/Carousel.d.ts.map +1 -0
- package/lib/typescript/{components → commonjs/components}/CarouselLayout.d.ts +5 -8
- package/lib/typescript/commonjs/components/CarouselLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/ItemLayout.d.ts +21 -0
- package/lib/typescript/commonjs/components/ItemLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/ItemRenderer.d.ts +24 -0
- package/lib/typescript/commonjs/components/ItemRenderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/LazyView.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Pagination/PaginationItem.d.ts +14 -0
- package/lib/typescript/commonjs/components/Pagination/PaginationItem.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Pagination/index.d.ts +4 -0
- package/lib/typescript/commonjs/components/Pagination/index.d.ts.map +1 -0
- package/lib/typescript/{components → commonjs/components}/ScrollViewGesture.d.ts +3 -4
- package/lib/typescript/commonjs/components/ScrollViewGesture.d.ts.map +1 -0
- package/lib/typescript/commonjs/constants/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useAutoPlay.d.ts +12 -0
- package/lib/typescript/commonjs/hooks/useAutoPlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useCarouselController.d.ts +29 -0
- package/lib/typescript/commonjs/hooks/useCarouselController.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useCheckMounted.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useCommonVariables.d.ts +18 -0
- package/lib/typescript/commonjs/hooks/useCommonVariables.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useInitProps.d.ts +25 -0
- package/lib/typescript/commonjs/hooks/useInitProps.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useLayoutConfig.d.ts +8 -0
- package/lib/typescript/commonjs/hooks/useLayoutConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useOffsetX.d.ts +13 -0
- package/lib/typescript/commonjs/hooks/useOffsetX.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useOnProgressChange.d.ts +12 -0
- package/lib/typescript/commonjs/hooks/useOnProgressChange.d.ts.map +1 -0
- package/lib/typescript/{hooks → commonjs/hooks}/usePanGestureProxy.d.ts +4 -3
- package/lib/typescript/commonjs/hooks/usePanGestureProxy.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/usePropsErrorBoundary.d.ts +3 -0
- package/lib/typescript/commonjs/hooks/usePropsErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useUpdateGestureConfig.d.ts +9 -0
- package/lib/typescript/commonjs/hooks/useUpdateGestureConfig.d.ts.map +1 -0
- package/lib/typescript/{hooks → commonjs/hooks}/useVisibleRanges.d.ts +6 -6
- package/lib/typescript/commonjs/hooks/useVisibleRanges.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +4 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/{layouts → commonjs/layouts}/index.d.ts +0 -1
- package/lib/typescript/commonjs/layouts/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/layouts/normal.d.ts +15 -0
- package/lib/typescript/commonjs/layouts/normal.d.ts.map +1 -0
- package/lib/typescript/commonjs/layouts/parallax.d.ts +27 -0
- package/lib/typescript/commonjs/layouts/parallax.d.ts.map +1 -0
- package/lib/typescript/commonjs/layouts/stack.d.ts +10 -0
- package/lib/typescript/commonjs/layouts/stack.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/public-types.d.ts +171 -0
- package/lib/typescript/commonjs/public-types.d.ts.map +1 -0
- package/lib/typescript/{store → commonjs/store}/index.d.ts +8 -8
- package/lib/typescript/commonjs/store/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/types.d.ts +15 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/carousel-direction.d.ts +9 -0
- package/lib/typescript/commonjs/utils/carousel-direction.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/carousel-math.d.ts +28 -0
- package/lib/typescript/commonjs/utils/carousel-math.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/compute-gesture-translation.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/compute-offset-if-size-changed.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/computed-with-auto-fill-data.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/deal-with-animation.d.ts +3 -0
- package/lib/typescript/commonjs/utils/deal-with-animation.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/log.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/sanitize-animation-style.d.ts.map +1 -0
- package/lib/typescript/module/components/Carousel.d.ts +8 -0
- package/lib/typescript/module/components/Carousel.d.ts.map +1 -0
- package/lib/typescript/module/components/CarouselLayout.d.ts +14 -0
- package/lib/typescript/module/components/CarouselLayout.d.ts.map +1 -0
- package/lib/typescript/module/components/ItemLayout.d.ts +21 -0
- package/lib/typescript/module/components/ItemLayout.d.ts.map +1 -0
- package/lib/typescript/module/components/ItemRenderer.d.ts +24 -0
- package/lib/typescript/module/components/ItemRenderer.d.ts.map +1 -0
- package/lib/typescript/module/components/LazyView.d.ts +8 -0
- package/lib/typescript/module/components/LazyView.d.ts.map +1 -0
- package/lib/typescript/module/components/Pagination/PaginationItem.d.ts +14 -0
- package/lib/typescript/module/components/Pagination/PaginationItem.d.ts.map +1 -0
- package/lib/typescript/module/components/Pagination/index.d.ts +4 -0
- package/lib/typescript/module/components/Pagination/index.d.ts.map +1 -0
- package/lib/typescript/module/components/ScrollViewGesture.d.ts +18 -0
- package/lib/typescript/module/components/ScrollViewGesture.d.ts.map +1 -0
- package/lib/typescript/module/constants/index.d.ts +9 -0
- package/lib/typescript/module/constants/index.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useAutoPlay.d.ts +12 -0
- package/lib/typescript/module/hooks/useAutoPlay.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useCarouselController.d.ts +29 -0
- package/lib/typescript/module/hooks/useCarouselController.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useCheckMounted.d.ts +3 -0
- package/lib/typescript/module/hooks/useCheckMounted.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useCommonVariables.d.ts +18 -0
- package/lib/typescript/module/hooks/useCommonVariables.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useInitProps.d.ts +25 -0
- package/lib/typescript/module/hooks/useInitProps.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useLayoutConfig.d.ts +8 -0
- package/lib/typescript/module/hooks/useLayoutConfig.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useOffsetX.d.ts +13 -0
- package/lib/typescript/module/hooks/useOffsetX.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useOnProgressChange.d.ts +12 -0
- package/lib/typescript/module/hooks/useOnProgressChange.d.ts.map +1 -0
- package/lib/typescript/module/hooks/usePanGestureProxy.d.ts +11 -0
- package/lib/typescript/module/hooks/usePanGestureProxy.d.ts.map +1 -0
- package/lib/typescript/module/hooks/usePropsErrorBoundary.d.ts +3 -0
- package/lib/typescript/module/hooks/usePropsErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useUpdateGestureConfig.d.ts +9 -0
- package/lib/typescript/module/hooks/useUpdateGestureConfig.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useVisibleRanges.d.ts +22 -0
- package/lib/typescript/module/hooks/useVisibleRanges.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +4 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/layouts/index.d.ts +10 -0
- package/lib/typescript/module/layouts/index.d.ts.map +1 -0
- package/lib/typescript/module/layouts/normal.d.ts +15 -0
- package/lib/typescript/module/layouts/normal.d.ts.map +1 -0
- package/lib/typescript/module/layouts/parallax.d.ts +27 -0
- package/lib/typescript/module/layouts/parallax.d.ts.map +1 -0
- package/lib/typescript/module/layouts/stack.d.ts +10 -0
- package/lib/typescript/module/layouts/stack.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/public-types.d.ts +171 -0
- package/lib/typescript/module/public-types.d.ts.map +1 -0
- package/lib/typescript/module/store/index.d.ts +35 -0
- package/lib/typescript/module/store/index.d.ts.map +1 -0
- package/lib/typescript/module/types.d.ts +15 -0
- package/lib/typescript/module/types.d.ts.map +1 -0
- package/lib/typescript/module/utils/carousel-direction.d.ts +9 -0
- package/lib/typescript/module/utils/carousel-direction.d.ts.map +1 -0
- package/lib/typescript/module/utils/carousel-math.d.ts +28 -0
- package/lib/typescript/module/utils/carousel-math.d.ts.map +1 -0
- package/lib/typescript/module/utils/compute-gesture-translation.d.ts +9 -0
- package/lib/typescript/module/utils/compute-gesture-translation.d.ts.map +1 -0
- package/lib/typescript/module/utils/compute-offset-if-size-changed.d.ts +6 -0
- package/lib/typescript/module/utils/compute-offset-if-size-changed.d.ts.map +1 -0
- package/lib/typescript/module/utils/computed-with-auto-fill-data.d.ts +23 -0
- package/lib/typescript/module/utils/computed-with-auto-fill-data.d.ts.map +1 -0
- package/lib/typescript/module/utils/deal-with-animation.d.ts +3 -0
- package/lib/typescript/module/utils/deal-with-animation.d.ts.map +1 -0
- package/lib/typescript/module/utils/log.d.ts +7 -0
- package/lib/typescript/module/utils/log.d.ts.map +1 -0
- package/lib/typescript/module/utils/sanitize-animation-style.d.ts +3 -0
- package/lib/typescript/module/utils/sanitize-animation-style.d.ts.map +1 -0
- package/package.json +31 -6
- package/scripts/codemods/v5.mjs +502 -0
- package/src/components/Carousel.tsx +5 -5
- package/src/components/CarouselLayout.tsx +52 -89
- package/src/components/ItemLayout.tsx +57 -48
- package/src/components/ItemRenderer.tsx +29 -18
- package/src/components/Pagination/PaginationItem.tsx +166 -0
- package/src/components/Pagination/index.tsx +105 -6
- package/src/components/ScrollViewGesture.tsx +92 -177
- package/src/hooks/useAutoPlay.ts +23 -18
- package/src/hooks/useCarouselController.tsx +196 -342
- package/src/hooks/useCommonVariables.ts +159 -71
- package/src/hooks/useInitProps.ts +161 -71
- package/src/hooks/useLayoutConfig.ts +21 -12
- package/src/hooks/useOffsetX.ts +6 -6
- package/src/hooks/useOnProgressChange.ts +23 -48
- package/src/hooks/usePanGestureProxy.ts +8 -8
- package/src/hooks/usePropsErrorBoundary.ts +32 -90
- package/src/hooks/useUpdateGestureConfig.ts +6 -3
- package/src/hooks/useVisibleRanges.tsx +6 -6
- package/src/index.tsx +14 -9
- package/src/layouts/index.tsx +0 -2
- package/src/layouts/normal.ts +14 -4
- package/src/layouts/parallax.ts +32 -59
- package/src/layouts/stack.ts +30 -70
- package/src/public-types.ts +209 -0
- package/src/store/index.tsx +7 -7
- package/src/types.ts +30 -322
- package/src/utils/carousel-direction.ts +39 -0
- package/src/utils/carousel-math.ts +156 -0
- package/src/utils/computed-with-auto-fill-data.ts +2 -2
- package/src/utils/deal-with-animation.ts +11 -9
- package/lib/commonjs/components/Pagination/Basic/PaginationItem.js +0 -2
- package/lib/commonjs/components/Pagination/Basic/PaginationItem.js.map +0 -1
- package/lib/commonjs/components/Pagination/Basic/index.js +0 -2
- package/lib/commonjs/components/Pagination/Basic/index.js.map +0 -1
- package/lib/commonjs/components/Pagination/Custom/PaginationItem.js +0 -2
- package/lib/commonjs/components/Pagination/Custom/PaginationItem.js.map +0 -1
- package/lib/commonjs/components/Pagination/Custom/index.js +0 -2
- package/lib/commonjs/components/Pagination/Custom/index.js.map +0 -1
- package/lib/commonjs/utils/compute-offset-if-data-changed.js +0 -2
- package/lib/commonjs/utils/compute-offset-if-data-changed.js.map +0 -1
- package/lib/commonjs/utils/handleroffset-direction.js +0 -2
- package/lib/commonjs/utils/handleroffset-direction.js.map +0 -1
- package/lib/module/components/Pagination/Basic/PaginationItem.js +0 -2
- package/lib/module/components/Pagination/Basic/PaginationItem.js.map +0 -1
- package/lib/module/components/Pagination/Basic/index.js +0 -2
- package/lib/module/components/Pagination/Basic/index.js.map +0 -1
- package/lib/module/components/Pagination/Custom/PaginationItem.js +0 -2
- package/lib/module/components/Pagination/Custom/PaginationItem.js.map +0 -1
- package/lib/module/components/Pagination/Custom/index.js +0 -2
- package/lib/module/components/Pagination/Custom/index.js.map +0 -1
- package/lib/module/utils/compute-offset-if-data-changed.js +0 -2
- package/lib/module/utils/compute-offset-if-data-changed.js.map +0 -1
- package/lib/module/utils/handleroffset-direction.js +0 -2
- package/lib/module/utils/handleroffset-direction.js.map +0 -1
- package/lib/typescript/components/Carousel.d.ts +0 -8
- package/lib/typescript/components/Carousel.d.ts.map +0 -1
- package/lib/typescript/components/CarouselLayout.d.ts.map +0 -1
- package/lib/typescript/components/ItemLayout.d.ts +0 -20
- package/lib/typescript/components/ItemLayout.d.ts.map +0 -1
- package/lib/typescript/components/ItemRenderer.d.ts +0 -23
- package/lib/typescript/components/ItemRenderer.d.ts.map +0 -1
- package/lib/typescript/components/LazyView.d.ts.map +0 -1
- package/lib/typescript/components/Pagination/Basic/PaginationItem.d.ts +0 -29
- package/lib/typescript/components/Pagination/Basic/PaginationItem.d.ts.map +0 -1
- package/lib/typescript/components/Pagination/Basic/index.d.ts +0 -23
- package/lib/typescript/components/Pagination/Basic/index.d.ts.map +0 -1
- package/lib/typescript/components/Pagination/Custom/PaginationItem.d.ts +0 -35
- package/lib/typescript/components/Pagination/Custom/PaginationItem.d.ts.map +0 -1
- package/lib/typescript/components/Pagination/Custom/index.d.ts +0 -26
- package/lib/typescript/components/Pagination/Custom/index.d.ts.map +0 -1
- package/lib/typescript/components/Pagination/index.d.ts +0 -5
- package/lib/typescript/components/Pagination/index.d.ts.map +0 -1
- package/lib/typescript/components/ScrollViewGesture.d.ts.map +0 -1
- package/lib/typescript/constants/index.d.ts.map +0 -1
- package/lib/typescript/hooks/useAutoPlay.d.ts +0 -12
- package/lib/typescript/hooks/useAutoPlay.d.ts.map +0 -1
- package/lib/typescript/hooks/useCarouselController.d.ts +0 -28
- package/lib/typescript/hooks/useCarouselController.d.ts.map +0 -1
- package/lib/typescript/hooks/useCheckMounted.d.ts.map +0 -1
- package/lib/typescript/hooks/useCommonVariables.d.ts +0 -13
- package/lib/typescript/hooks/useCommonVariables.d.ts.map +0 -1
- package/lib/typescript/hooks/useInitProps.d.ts +0 -10
- package/lib/typescript/hooks/useInitProps.d.ts.map +0 -1
- package/lib/typescript/hooks/useLayoutConfig.d.ts +0 -8
- package/lib/typescript/hooks/useLayoutConfig.d.ts.map +0 -1
- package/lib/typescript/hooks/useOffsetX.d.ts +0 -13
- package/lib/typescript/hooks/useOffsetX.d.ts.map +0 -1
- package/lib/typescript/hooks/useOnProgressChange.d.ts +0 -11
- package/lib/typescript/hooks/useOnProgressChange.d.ts.map +0 -1
- package/lib/typescript/hooks/usePanGestureProxy.d.ts.map +0 -1
- package/lib/typescript/hooks/usePropsErrorBoundary.d.ts +0 -5
- package/lib/typescript/hooks/usePropsErrorBoundary.d.ts.map +0 -1
- package/lib/typescript/hooks/useUpdateGestureConfig.d.ts +0 -6
- package/lib/typescript/hooks/useUpdateGestureConfig.d.ts.map +0 -1
- package/lib/typescript/hooks/useVisibleRanges.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -7
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/layouts/index.d.ts.map +0 -1
- package/lib/typescript/layouts/normal.d.ts +0 -13
- package/lib/typescript/layouts/normal.d.ts.map +0 -1
- package/lib/typescript/layouts/parallax.d.ts +0 -47
- package/lib/typescript/layouts/parallax.d.ts.map +0 -1
- package/lib/typescript/layouts/stack.d.ts +0 -38
- package/lib/typescript/layouts/stack.d.ts.map +0 -1
- package/lib/typescript/store/index.d.ts.map +0 -1
- package/lib/typescript/types.d.ts +0 -302
- package/lib/typescript/types.d.ts.map +0 -1
- package/lib/typescript/utils/compute-gesture-translation.d.ts.map +0 -1
- package/lib/typescript/utils/compute-offset-if-data-changed.d.ts +0 -9
- package/lib/typescript/utils/compute-offset-if-data-changed.d.ts.map +0 -1
- package/lib/typescript/utils/compute-offset-if-size-changed.d.ts.map +0 -1
- package/lib/typescript/utils/computed-with-auto-fill-data.d.ts.map +0 -1
- package/lib/typescript/utils/deal-with-animation.d.ts +0 -3
- package/lib/typescript/utils/deal-with-animation.d.ts.map +0 -1
- package/lib/typescript/utils/handleroffset-direction.d.ts +0 -4
- package/lib/typescript/utils/handleroffset-direction.d.ts.map +0 -1
- package/lib/typescript/utils/log.d.ts.map +0 -1
- package/lib/typescript/utils/sanitize-animation-style.d.ts.map +0 -1
- package/src/components/Pagination/Basic/PaginationItem.tsx +0 -149
- package/src/components/Pagination/Basic/index.tsx +0 -98
- package/src/components/Pagination/Custom/PaginationItem.tsx +0 -166
- package/src/components/Pagination/Custom/index.tsx +0 -111
- package/src/utils/compute-offset-if-data-changed.ts +0 -44
- package/src/utils/handleroffset-direction.ts +0 -18
- /package/lib/typescript/{components → commonjs/components}/LazyView.d.ts +0 -0
- /package/lib/typescript/{constants → commonjs/constants}/index.d.ts +0 -0
- /package/lib/typescript/{hooks → commonjs/hooks}/useCheckMounted.d.ts +0 -0
- /package/lib/typescript/{utils → commonjs/utils}/compute-gesture-translation.d.ts +0 -0
- /package/lib/typescript/{utils → commonjs/utils}/compute-offset-if-size-changed.d.ts +0 -0
- /package/lib/typescript/{utils → commonjs/utils}/computed-with-auto-fill-data.d.ts +0 -0
- /package/lib/typescript/{utils → commonjs/utils}/log.d.ts +0 -0
- /package/lib/typescript/{utils → commonjs/utils}/sanitize-animation-style.d.ts +0 -0
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import type { LayoutChangeEvent, StyleProp, ViewStyle } from "react-native";
|
|
2
|
-
import type { PanGesture } from "react-native-gesture-handler";
|
|
3
|
-
import type { SharedValue, WithSpringConfig, WithTimingConfig } from "react-native-reanimated";
|
|
4
|
-
import type { TParallaxModeProps } from "./layouts/parallax";
|
|
5
|
-
import type { TStackModeProps } from "./layouts/stack";
|
|
6
|
-
export type IComputedDirectionTypes<T, VP = {}, HP = {}> = (T & VP & {
|
|
7
|
-
/**
|
|
8
|
-
* Layout items vertically instead of horizontally
|
|
9
|
-
*/
|
|
10
|
-
vertical: true;
|
|
11
|
-
/**
|
|
12
|
-
* Specified carousel container width.
|
|
13
|
-
* @deprecated Use `style={{ width: ... }}` instead.
|
|
14
|
-
*/
|
|
15
|
-
width?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Specified carousel container height.
|
|
18
|
-
* @deprecated Use `style={{ height: ... }}` instead.
|
|
19
|
-
*/
|
|
20
|
-
height?: number;
|
|
21
|
-
}) | (T & HP & {
|
|
22
|
-
/**
|
|
23
|
-
* Layout items vertically instead of horizontally
|
|
24
|
-
*/
|
|
25
|
-
vertical?: false;
|
|
26
|
-
/**
|
|
27
|
-
* Specified carousel container width.
|
|
28
|
-
* @deprecated Use `style={{ width: ... }}` instead.
|
|
29
|
-
*/
|
|
30
|
-
width?: number;
|
|
31
|
-
/**
|
|
32
|
-
* Specified carousel container height.
|
|
33
|
-
* @deprecated Use `style={{ height: ... }}` instead.
|
|
34
|
-
*/
|
|
35
|
-
height?: number;
|
|
36
|
-
});
|
|
37
|
-
export interface CustomConfig {
|
|
38
|
-
type?: "negative" | "positive";
|
|
39
|
-
viewCount?: number;
|
|
40
|
-
}
|
|
41
|
-
export interface WithSpringAnimation {
|
|
42
|
-
type: "spring";
|
|
43
|
-
config: WithSpringConfig;
|
|
44
|
-
}
|
|
45
|
-
export interface WithTimingAnimation {
|
|
46
|
-
type: "timing";
|
|
47
|
-
config: WithTimingConfig;
|
|
48
|
-
}
|
|
49
|
-
export type WithAnimation = WithSpringAnimation | WithTimingAnimation;
|
|
50
|
-
export type TOnProgressChange = ((offsetProgress: number, absoluteProgress: number) => void)
|
|
51
|
-
/**
|
|
52
|
-
* When a SharedValue is provided, the carousel will write `absoluteProgress` into it.
|
|
53
|
-
*/
|
|
54
|
-
| SharedValue<number>;
|
|
55
|
-
export type TCarouselProps<T = any> = {
|
|
56
|
-
/**
|
|
57
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should handle the ref props
|
|
58
|
-
*/
|
|
59
|
-
ref?: React.Ref<ICarouselInstance>;
|
|
60
|
-
/**
|
|
61
|
-
* A shared value used internally as the carousel's translation (scroll offset) state.
|
|
62
|
-
*
|
|
63
|
-
* Prefer using `scrollOffsetValue` (same behavior, clearer name). This prop remains
|
|
64
|
-
* for backwards compatibility.
|
|
65
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should render the correct progress value with the defaultScrollOffsetValue props
|
|
66
|
-
*/
|
|
67
|
-
/**
|
|
68
|
-
* @deprecated Use `scrollOffsetValue` instead.
|
|
69
|
-
*/
|
|
70
|
-
defaultScrollOffsetValue?: SharedValue<number>;
|
|
71
|
-
/**
|
|
72
|
-
* A shared value used internally as the carousel's translation (scroll offset) state.
|
|
73
|
-
*
|
|
74
|
-
* - If provided, the carousel will **mutate** it during gestures/animations.
|
|
75
|
-
* - This is useful when you want to observe the scroll offset outside the carousel.
|
|
76
|
-
*/
|
|
77
|
-
scrollOffsetValue?: SharedValue<number>;
|
|
78
|
-
/**
|
|
79
|
-
* Carousel loop playback.
|
|
80
|
-
* @default true
|
|
81
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should swipe back to the first item when loop is true
|
|
82
|
-
*/
|
|
83
|
-
loop?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Carousel items data set.
|
|
86
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should render correctly
|
|
87
|
-
*/
|
|
88
|
-
data: T[];
|
|
89
|
-
/**
|
|
90
|
-
* Auto fill data array to allow loop playback when the loop props is true.
|
|
91
|
-
* @default true
|
|
92
|
-
* @example
|
|
93
|
-
* [1] => [1, 1, 1]
|
|
94
|
-
* [1, 2] => [1, 2, 1, 2]
|
|
95
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should auto fill data array to allow loop playback when the loop props is true
|
|
96
|
-
*/
|
|
97
|
-
autoFillData?: boolean;
|
|
98
|
-
/**
|
|
99
|
-
* Default index
|
|
100
|
-
* @default 0
|
|
101
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should render the correct item with the defaultIndex props
|
|
102
|
-
*/
|
|
103
|
-
defaultIndex?: number;
|
|
104
|
-
/**
|
|
105
|
-
* Auto play
|
|
106
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should swipe automatically when autoPlay is true
|
|
107
|
-
*/
|
|
108
|
-
autoPlay?: boolean;
|
|
109
|
-
/**
|
|
110
|
-
* Auto play
|
|
111
|
-
* @description reverse playback
|
|
112
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should swipe automatically in reverse when autoPlayReverse is true
|
|
113
|
-
*/
|
|
114
|
-
autoPlayReverse?: boolean;
|
|
115
|
-
/**
|
|
116
|
-
* Auto play
|
|
117
|
-
* @description playback interval
|
|
118
|
-
*/
|
|
119
|
-
autoPlayInterval?: number;
|
|
120
|
-
/**
|
|
121
|
-
* Time a scroll animation takes to finish
|
|
122
|
-
* @default 500 (ms)
|
|
123
|
-
*/
|
|
124
|
-
scrollAnimationDuration?: number;
|
|
125
|
-
/**
|
|
126
|
-
* Carousel container style.
|
|
127
|
-
*/
|
|
128
|
-
style?: StyleProp<ViewStyle>;
|
|
129
|
-
/**
|
|
130
|
-
* Carousel content container style.
|
|
131
|
-
*/
|
|
132
|
-
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
133
|
-
/**
|
|
134
|
-
* Horizontal **page size** used for snapping and animations.
|
|
135
|
-
*
|
|
136
|
-
* This is NOT the same as the container width:
|
|
137
|
-
* - **Container size** comes from `style` (recommended) / deprecated `width` / layout measurement.
|
|
138
|
-
* - **Page size** controls snap distance & animation progress per page.
|
|
139
|
-
*
|
|
140
|
-
* Use this when you want multiple items visible in a single viewport (page size < container width).
|
|
141
|
-
* If not provided, the page size falls back to the carousel container width.
|
|
142
|
-
*/
|
|
143
|
-
itemWidth?: number;
|
|
144
|
-
/**
|
|
145
|
-
* Vertical **page size** used for snapping and animations.
|
|
146
|
-
*
|
|
147
|
-
* See `itemWidth` for the container-size vs page-size distinction.
|
|
148
|
-
* If not provided, the page size falls back to the carousel container height.
|
|
149
|
-
*/
|
|
150
|
-
itemHeight?: number;
|
|
151
|
-
/**
|
|
152
|
-
* @deprecated Previously controlled the outer container width (v4 behaviour).
|
|
153
|
-
* Move this value into `style`, e.g. `style={{ width: 300 }}`.
|
|
154
|
-
*/
|
|
155
|
-
width?: number;
|
|
156
|
-
/**
|
|
157
|
-
* @deprecated Previously controlled the outer container height (v4 behaviour).
|
|
158
|
-
* Move this value into `style`, e.g. `style={{ height: 200 }}`.
|
|
159
|
-
*/
|
|
160
|
-
height?: number;
|
|
161
|
-
/**
|
|
162
|
-
* PanGesture config
|
|
163
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should call the onConfigurePanGesture callback
|
|
164
|
-
*/
|
|
165
|
-
onConfigurePanGesture?: (panGesture: PanGesture) => void;
|
|
166
|
-
/**
|
|
167
|
-
* Determines the maximum number of items will respond to pan gesture events,
|
|
168
|
-
* windowSize={11} will active visible item plus up to 5 items above and 5 below the viewpor,
|
|
169
|
-
* Reducing this number will reduce the calculation of the animation value and may improve performance.
|
|
170
|
-
* @default 0 all items will respond to pan gesture events.
|
|
171
|
-
*/
|
|
172
|
-
windowSize?: number;
|
|
173
|
-
/**
|
|
174
|
-
* When true, the scroll view stops on multiples of the scroll view's size when scrolling.
|
|
175
|
-
* @default true
|
|
176
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should swipe to the next item when pagingEnabled is true
|
|
177
|
-
*/
|
|
178
|
-
pagingEnabled?: boolean;
|
|
179
|
-
/**
|
|
180
|
-
* If enabled, releasing the touch will scroll to the nearest item.
|
|
181
|
-
* valid when pagingEnabled=false
|
|
182
|
-
* @default true
|
|
183
|
-
*/
|
|
184
|
-
snapEnabled?: boolean;
|
|
185
|
-
/**
|
|
186
|
-
* If enabled, items will scroll to the first placement when scrolling past the edge rather than closing to the last. (previous conditions: loop=false)
|
|
187
|
-
* @default true
|
|
188
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should respect overscrollEnabled=false and prevent scrolling beyond bounds
|
|
189
|
-
*/
|
|
190
|
-
overscrollEnabled?: boolean;
|
|
191
|
-
/**
|
|
192
|
-
* If false, Carousel will not respond to any gestures.
|
|
193
|
-
* @default true
|
|
194
|
-
*/
|
|
195
|
-
enabled?: boolean;
|
|
196
|
-
/**
|
|
197
|
-
* Specifies the scrolling animation effect.
|
|
198
|
-
*
|
|
199
|
-
* If provided, it takes precedence over `scrollAnimationDuration`.
|
|
200
|
-
*/
|
|
201
|
-
withAnimation?: WithAnimation;
|
|
202
|
-
/**
|
|
203
|
-
* Used to locate this view in end-to-end tests.
|
|
204
|
-
*/
|
|
205
|
-
testID?: string;
|
|
206
|
-
/**
|
|
207
|
-
* Maximum offset value for once scroll.
|
|
208
|
-
* Carousel cannot scroll over than this value.
|
|
209
|
-
* */
|
|
210
|
-
maxScrollDistancePerSwipe?: number;
|
|
211
|
-
/**
|
|
212
|
-
* Minimum offset value for once scroll.
|
|
213
|
-
* If the translation value is less than this value, the carousel will not scroll.
|
|
214
|
-
* */
|
|
215
|
-
minScrollDistancePerSwipe?: number;
|
|
216
|
-
/**
|
|
217
|
-
* @experimental This API will be changed in the future.
|
|
218
|
-
* If positive, the carousel will scroll to the positive direction and vice versa.
|
|
219
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should swipe to the correct direction when fixedDirection is positive
|
|
220
|
-
* */
|
|
221
|
-
fixedDirection?: "positive" | "negative";
|
|
222
|
-
/**
|
|
223
|
-
* Custom carousel config.
|
|
224
|
-
*/
|
|
225
|
-
customConfig?: CustomConfig | (() => CustomConfig);
|
|
226
|
-
/**
|
|
227
|
-
* Custom animations.
|
|
228
|
-
* Must be worklet-compatible. See https://docs.swmansion.com/react-native-reanimated/docs/guides/worklets/
|
|
229
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should apply the custom animation
|
|
230
|
-
*/
|
|
231
|
-
customAnimation?: (value: number, index: number) => ViewStyle;
|
|
232
|
-
/**
|
|
233
|
-
* Render carousel item.
|
|
234
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should render items correctly
|
|
235
|
-
*/
|
|
236
|
-
renderItem: CarouselRenderItem<T>;
|
|
237
|
-
/**
|
|
238
|
-
* Callback fired when navigating to an item.
|
|
239
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should call the onSnapToItem callback
|
|
240
|
-
*/
|
|
241
|
-
onSnapToItem?: (index: number) => void;
|
|
242
|
-
/**
|
|
243
|
-
* On scroll start
|
|
244
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should call the onScrollStart callback
|
|
245
|
-
*/
|
|
246
|
-
onScrollStart?: () => void;
|
|
247
|
-
/**
|
|
248
|
-
* On scroll end
|
|
249
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should call the onScrollEnd callback
|
|
250
|
-
*/
|
|
251
|
-
onScrollEnd?: (index: number) => void;
|
|
252
|
-
/**
|
|
253
|
-
* On progress change
|
|
254
|
-
* @param offsetProgress Total of offset distance (0 390 780 ...)
|
|
255
|
-
* @param absoluteProgress Convert to index (0 1 2 ...)
|
|
256
|
-
* @test_coverage ✅ tested in Carousel.test.tsx > should call the onProgressChange callback
|
|
257
|
-
*
|
|
258
|
-
* If you want to update a shared value automatically, you can use the shared value as a parameter directly.
|
|
259
|
-
*/
|
|
260
|
-
onProgressChange?: TOnProgressChange;
|
|
261
|
-
onLayout?: (event: LayoutChangeEvent) => void;
|
|
262
|
-
/**
|
|
263
|
-
* If enabled, releasing the touch will scroll to the nearest item.
|
|
264
|
-
* valid when pagingEnabled=false
|
|
265
|
-
* @deprecated please use snapEnabled instead
|
|
266
|
-
*/
|
|
267
|
-
enableSnap?: boolean;
|
|
268
|
-
} & (TParallaxModeProps | TStackModeProps);
|
|
269
|
-
export interface ICarouselInstance {
|
|
270
|
-
/**
|
|
271
|
-
* Scroll to previous item, it takes one optional argument (count),
|
|
272
|
-
* which allows you to specify how many items to cross
|
|
273
|
-
*/
|
|
274
|
-
prev: (opts?: Omit<TCarouselActionOptions, "index">) => void;
|
|
275
|
-
/**
|
|
276
|
-
* Scroll to next item, it takes one optional argument (count),
|
|
277
|
-
* which allows you to specify how many items to cross
|
|
278
|
-
*/
|
|
279
|
-
next: (opts?: Omit<TCarouselActionOptions, "index">) => void;
|
|
280
|
-
/**
|
|
281
|
-
* Get current item index
|
|
282
|
-
*/
|
|
283
|
-
getCurrentIndex: () => number;
|
|
284
|
-
/**
|
|
285
|
-
* Use value to scroll to a position where relative to the current position,
|
|
286
|
-
* scrollTo({count: -2}) is equivalent to prev(2), scrollTo({count: 2}) is equivalent to next(2)
|
|
287
|
-
*/
|
|
288
|
-
scrollTo: (opts?: TCarouselActionOptions) => void;
|
|
289
|
-
}
|
|
290
|
-
export interface CarouselRenderItemInfo<ItemT> {
|
|
291
|
-
item: ItemT;
|
|
292
|
-
index: number;
|
|
293
|
-
animationValue: SharedValue<number>;
|
|
294
|
-
}
|
|
295
|
-
export type CarouselRenderItem<ItemT> = (info: CarouselRenderItemInfo<ItemT>) => React.ReactElement;
|
|
296
|
-
export interface TCarouselActionOptions {
|
|
297
|
-
index?: number;
|
|
298
|
-
count?: number;
|
|
299
|
-
animated?: boolean;
|
|
300
|
-
onFinished?: () => void;
|
|
301
|
-
}
|
|
302
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE/F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD,MAAM,MAAM,uBAAuB,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,IACnD,CAAC,CAAC,GACA,EAAE,GAAG;IACH;;OAEG;IACH,QAAQ,EAAE,IAAI,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,GACJ,CAAC,CAAC,GACA,EAAE,GAAG;IACH;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAET,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAEtE,MAAM,MAAM,iBAAiB,GACzB,CAAC,CAAC,cAAc,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAC;AAC9D;;GAEG;GACD,WAAW,CAAC,MAAM,CAAC,CAAC;AAExB,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,GAAG,IAAI;IACpC;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;;;;;OAMG;IACH;;OAEG;IACH,wBAAwB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/C;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACxC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,IAAI,EAAE,CAAC,EAAE,CAAC;IACV;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,qBAAqB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7C;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAIpB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IACzD;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;SAGK;IACL,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;SAGK;IACL,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;SAIK;IACL,cAAc,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACzC;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,GAAG,CAAC,MAAM,YAAY,CAAC,CAAC;IACnD;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAC9D;;;OAGG;IACH,UAAU,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAG9C;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,CAAC,kBAAkB,GAAG,eAAe,CAAC,CAAC;AAE3C,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAC7D;;;OAGG;IACH,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAC7D;;OAEG;IACH,eAAe,EAAE,MAAM,MAAM,CAAC;IAC9B;;;OAGG;IACH,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,sBAAsB,KAAK,IAAI,CAAC;CACnD;AAED,MAAM,WAAW,sBAAsB,CAAC,KAAK;IAC3C,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACrC;AAED,MAAM,MAAM,kBAAkB,CAAC,KAAK,IAAI,CAAC,IAAI,EAAE,sBAAsB,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,YAAY,CAAC;AAEpG,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compute-gesture-translation.d.ts","sourceRoot":"","sources":["../../../src/utils/compute-gesture-translation.ts"],"names":[],"mappings":"AAAA,wBAAgB,yBAAyB,CAAC,OAAO,EAAE;IACjD,IAAI,EAAE,OAAO,CAAC;IACd,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,MAAM,CAqBT"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare function omitZero(a: number, b: number): number;
|
|
2
|
-
export declare function computeOffsetIfDataChanged(params: {
|
|
3
|
-
direction: number;
|
|
4
|
-
handlerOffset: number;
|
|
5
|
-
size: number;
|
|
6
|
-
previousLength: number;
|
|
7
|
-
currentLength: number;
|
|
8
|
-
}): number;
|
|
9
|
-
//# sourceMappingURL=compute-offset-if-data-changed.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compute-offset-if-data-changed.d.ts","sourceRoot":"","sources":["../../../src/utils/compute-offset-if-data-changed.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAK5C;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB,UA8BA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compute-offset-if-size-changed.d.ts","sourceRoot":"","sources":["../../../src/utils/compute-offset-if-size-changed.ts"],"names":[],"mappings":"AAAA,wBAAgB,0BAA0B,CAAC,MAAM,EAAE;IACjD,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,UASA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computed-with-auto-fill-data.d.ts","sourceRoot":"","sources":["../../../src/utils/computed-with-auto-fill-data.ts"],"names":[],"mappings":"AASA,KAAK,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;CACf,GAAG,CAAC,CAAC;AAEN,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,UAchG;AAED,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,UAAU,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,UAgBH;AAED,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,UAcH;AAED,wBAAgB,gCAAgC,CAAC,CAAC,EAChD,MAAM,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,GACD,CAAC,EAAE,CAaL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deal-with-animation.d.ts","sourceRoot":"","sources":["../../../src/utils/deal-with-animation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,aAAa,GAC3B,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,KAAK,MAAM,CAU9D"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { SharedValue } from "react-native-reanimated";
|
|
2
|
-
import type { TCarouselProps } from "../types";
|
|
3
|
-
export declare function handlerOffsetDirection(handlerOffset: SharedValue<number>, fixedDirection?: TCarouselProps["fixedDirection"]): -1 | 1;
|
|
4
|
-
//# sourceMappingURL=handleroffset-direction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handleroffset-direction.d.ts","sourceRoot":"","sources":["../../../src/utils/handleroffset-direction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,EAClC,cAAc,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,GAChD,CAAC,CAAC,GAAG,CAAC,CAUR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/utils/log.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,QAE9B;AAED,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,UAGnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize-animation-style.d.ts","sourceRoot":"","sources":["../../../src/utils/sanitize-animation-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAelE"}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import type { PropsWithChildren } from "react";
|
|
2
|
-
import React, { useState } from "react";
|
|
3
|
-
import type { AccessibilityRole, AccessibilityState, ViewStyle } from "react-native";
|
|
4
|
-
import { Pressable, View } from "react-native";
|
|
5
|
-
import type { SharedValue } from "react-native-reanimated";
|
|
6
|
-
import Animated, {
|
|
7
|
-
Extrapolation,
|
|
8
|
-
interpolate,
|
|
9
|
-
useAnimatedReaction,
|
|
10
|
-
useAnimatedStyle,
|
|
11
|
-
} from "react-native-reanimated";
|
|
12
|
-
import { scheduleOnRN } from "react-native-worklets";
|
|
13
|
-
|
|
14
|
-
export type DotStyle = Omit<ViewStyle, "width" | "height"> & {
|
|
15
|
-
width?: number;
|
|
16
|
-
height?: number;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type PaginationItemAccessibilityOverrides = {
|
|
20
|
-
accessibilityLabel?: string;
|
|
21
|
-
accessibilityHint?: string;
|
|
22
|
-
accessibilityRole?: AccessibilityRole;
|
|
23
|
-
accessibilityState?: AccessibilityState;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const PaginationItem: React.FC<
|
|
27
|
-
PropsWithChildren<{
|
|
28
|
-
index: number;
|
|
29
|
-
count: number;
|
|
30
|
-
size?: number;
|
|
31
|
-
animValue: SharedValue<number>;
|
|
32
|
-
horizontal?: boolean;
|
|
33
|
-
dotStyle?: DotStyle;
|
|
34
|
-
activeDotStyle?: DotStyle;
|
|
35
|
-
onPress: () => void;
|
|
36
|
-
accessibilityLabel?: string;
|
|
37
|
-
accessibilityHint?: string;
|
|
38
|
-
accessibilityRole?: AccessibilityRole;
|
|
39
|
-
accessibilityState?: AccessibilityState;
|
|
40
|
-
}>
|
|
41
|
-
> = (props) => {
|
|
42
|
-
const {
|
|
43
|
-
animValue,
|
|
44
|
-
dotStyle,
|
|
45
|
-
activeDotStyle,
|
|
46
|
-
index,
|
|
47
|
-
count,
|
|
48
|
-
size,
|
|
49
|
-
horizontal,
|
|
50
|
-
children,
|
|
51
|
-
onPress,
|
|
52
|
-
accessibilityLabel,
|
|
53
|
-
accessibilityHint,
|
|
54
|
-
accessibilityRole,
|
|
55
|
-
accessibilityState,
|
|
56
|
-
} = props;
|
|
57
|
-
|
|
58
|
-
const defaultDotSize = 10;
|
|
59
|
-
|
|
60
|
-
const sizes = {
|
|
61
|
-
width: size || dotStyle?.width || defaultDotSize,
|
|
62
|
-
height: size || dotStyle?.height || defaultDotSize,
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* TODO: Keep this for future implementation
|
|
67
|
-
* Used to change the size of the active dot with animation
|
|
68
|
-
*/
|
|
69
|
-
// const animatedSize = {
|
|
70
|
-
// width: activeDotStyle?.width,
|
|
71
|
-
// height: activeDotStyle?.height,
|
|
72
|
-
// };
|
|
73
|
-
|
|
74
|
-
const width = sizes.width;
|
|
75
|
-
const height = sizes.height;
|
|
76
|
-
|
|
77
|
-
const [isSelected, setIsSelected] = useState(false);
|
|
78
|
-
const resolvedAccessibilityLabel = accessibilityLabel ?? `Slide ${index + 1} of ${count}`;
|
|
79
|
-
const resolvedAccessibilityHint =
|
|
80
|
-
accessibilityHint ?? (isSelected ? "" : `Go to ${resolvedAccessibilityLabel}`);
|
|
81
|
-
const resolvedAccessibilityRole = accessibilityRole ?? "button";
|
|
82
|
-
const resolvedAccessibilityState = accessibilityState ?? { selected: isSelected };
|
|
83
|
-
|
|
84
|
-
useAnimatedReaction(
|
|
85
|
-
() => animValue.value,
|
|
86
|
-
(value) => {
|
|
87
|
-
scheduleOnRN(setIsSelected, value === index);
|
|
88
|
-
},
|
|
89
|
-
[animValue, index]
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
const animStyle = useAnimatedStyle(() => {
|
|
93
|
-
const size = horizontal ? height : width;
|
|
94
|
-
let inputRange = [index - 1, index, index + 1];
|
|
95
|
-
let outputRange = [-size, 0, size];
|
|
96
|
-
|
|
97
|
-
if (index === 0 && animValue?.value > count - 1) {
|
|
98
|
-
inputRange = [count - 1, count, count + 1];
|
|
99
|
-
outputRange = [-size, 0, size];
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return {
|
|
103
|
-
transform: [
|
|
104
|
-
{
|
|
105
|
-
translateX: interpolate(animValue?.value, inputRange, outputRange, Extrapolation.CLAMP),
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
};
|
|
109
|
-
}, [animValue, index, count, horizontal]);
|
|
110
|
-
|
|
111
|
-
return (
|
|
112
|
-
<Pressable
|
|
113
|
-
onPress={onPress}
|
|
114
|
-
accessibilityLabel={resolvedAccessibilityLabel}
|
|
115
|
-
accessibilityRole={resolvedAccessibilityRole}
|
|
116
|
-
accessibilityHint={resolvedAccessibilityHint}
|
|
117
|
-
accessibilityState={resolvedAccessibilityState}
|
|
118
|
-
>
|
|
119
|
-
<View
|
|
120
|
-
style={[
|
|
121
|
-
{
|
|
122
|
-
width,
|
|
123
|
-
height,
|
|
124
|
-
overflow: "hidden",
|
|
125
|
-
transform: [
|
|
126
|
-
{
|
|
127
|
-
rotateZ: horizontal ? "90deg" : "0deg",
|
|
128
|
-
},
|
|
129
|
-
],
|
|
130
|
-
},
|
|
131
|
-
dotStyle,
|
|
132
|
-
]}
|
|
133
|
-
>
|
|
134
|
-
<Animated.View
|
|
135
|
-
style={[
|
|
136
|
-
{
|
|
137
|
-
backgroundColor: "black",
|
|
138
|
-
flex: 1,
|
|
139
|
-
},
|
|
140
|
-
animStyle,
|
|
141
|
-
activeDotStyle,
|
|
142
|
-
]}
|
|
143
|
-
>
|
|
144
|
-
{children}
|
|
145
|
-
</Animated.View>
|
|
146
|
-
</View>
|
|
147
|
-
</Pressable>
|
|
148
|
-
);
|
|
149
|
-
};
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { type StyleProp, View, type ViewStyle } from "react-native";
|
|
2
|
-
import type { SharedValue } from "react-native-reanimated";
|
|
3
|
-
|
|
4
|
-
import React from "react";
|
|
5
|
-
import type { DotStyle, PaginationItemAccessibilityOverrides } from "./PaginationItem";
|
|
6
|
-
import { PaginationItem } from "./PaginationItem";
|
|
7
|
-
|
|
8
|
-
export interface BasicProps<T> {
|
|
9
|
-
progress: SharedValue<number>;
|
|
10
|
-
horizontal?: boolean;
|
|
11
|
-
data: Array<T>;
|
|
12
|
-
renderItem?: (item: T, index: number) => React.ReactNode;
|
|
13
|
-
containerStyle?: StyleProp<ViewStyle>;
|
|
14
|
-
dotStyle?: DotStyle;
|
|
15
|
-
activeDotStyle?: DotStyle;
|
|
16
|
-
size?: number;
|
|
17
|
-
onPress?: (index: number) => void;
|
|
18
|
-
carouselName?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Optional accessibility overrides for each pagination item.
|
|
21
|
-
* Use this to fully control screen reader announcements per dot.
|
|
22
|
-
*/
|
|
23
|
-
paginationItemAccessibility?: (
|
|
24
|
-
index: number,
|
|
25
|
-
length: number
|
|
26
|
-
) => PaginationItemAccessibilityOverrides;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const Basic = <T extends {}>(props: BasicProps<T>) => {
|
|
30
|
-
const {
|
|
31
|
-
activeDotStyle,
|
|
32
|
-
dotStyle,
|
|
33
|
-
progress,
|
|
34
|
-
horizontal = true,
|
|
35
|
-
data,
|
|
36
|
-
size,
|
|
37
|
-
containerStyle,
|
|
38
|
-
renderItem,
|
|
39
|
-
onPress,
|
|
40
|
-
carouselName,
|
|
41
|
-
paginationItemAccessibility,
|
|
42
|
-
} = props;
|
|
43
|
-
|
|
44
|
-
if (
|
|
45
|
-
typeof size === "string" ||
|
|
46
|
-
typeof dotStyle?.width === "string" ||
|
|
47
|
-
typeof dotStyle?.height === "string"
|
|
48
|
-
)
|
|
49
|
-
throw new Error("size/width/height must be a number");
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<View
|
|
53
|
-
style={[
|
|
54
|
-
{
|
|
55
|
-
justifyContent: "space-between",
|
|
56
|
-
alignSelf: "center",
|
|
57
|
-
},
|
|
58
|
-
horizontal
|
|
59
|
-
? {
|
|
60
|
-
flexDirection: "row",
|
|
61
|
-
}
|
|
62
|
-
: {
|
|
63
|
-
flexDirection: "column",
|
|
64
|
-
},
|
|
65
|
-
containerStyle,
|
|
66
|
-
]}
|
|
67
|
-
>
|
|
68
|
-
{data.map((item, index) => {
|
|
69
|
-
const defaultAccessibilityLabel = carouselName
|
|
70
|
-
? `Slide ${index + 1} of ${data.length} - ${carouselName}`
|
|
71
|
-
: `Slide ${index + 1} of ${data.length}`;
|
|
72
|
-
const accessibilityOverrides = paginationItemAccessibility?.(index, data.length) ?? {};
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<PaginationItem
|
|
76
|
-
key={index}
|
|
77
|
-
index={index}
|
|
78
|
-
size={size}
|
|
79
|
-
count={data.length}
|
|
80
|
-
dotStyle={dotStyle}
|
|
81
|
-
animValue={progress}
|
|
82
|
-
horizontal={!horizontal}
|
|
83
|
-
activeDotStyle={activeDotStyle}
|
|
84
|
-
onPress={() => onPress?.(index)}
|
|
85
|
-
accessibilityLabel={
|
|
86
|
-
accessibilityOverrides.accessibilityLabel ?? defaultAccessibilityLabel
|
|
87
|
-
}
|
|
88
|
-
accessibilityHint={accessibilityOverrides.accessibilityHint}
|
|
89
|
-
accessibilityRole={accessibilityOverrides.accessibilityRole}
|
|
90
|
-
accessibilityState={accessibilityOverrides.accessibilityState}
|
|
91
|
-
>
|
|
92
|
-
{renderItem?.(item, index)}
|
|
93
|
-
</PaginationItem>
|
|
94
|
-
);
|
|
95
|
-
})}
|
|
96
|
-
</View>
|
|
97
|
-
);
|
|
98
|
-
};
|