{"_id":"@admoriarty/react-native-reanimated-carousel","_rev":"1-3ecc495ce5e0f54775bd071a70f2f541","name":"@admoriarty/react-native-reanimated-carousel","dist-tags":{"latest":"2.3.2-fix"},"versions":{"2.3.2-fix":{"name":"@admoriarty/react-native-reanimated-carousel","version":"2.3.2-fix","description":"Simple carousel component.fully implemented using Reanimated 2.Infinitely scrolling, very smooth.","main":"src/index","types":"lib/typescript/index.d.ts","source":"src/index","scripts":{"gif":"node scripts/makegif.js ./scripts/gif-works-directory","test":"jest","typescript":"tsc --noEmit","lint":"eslint \"src/**/*.{js,ts,tsx}\"","dev":"yarn watch 'yarn prepare' ./src","prepare":"bob build","release":"release-it --no-git.requireUpstream","preRelease":"release-it --no-git.requireUpstream --preRelease=beta","ios":"yarn --cwd example ios","ios:pretty":"yarn --cwd example ios:pretty","web":"yarn --cwd example web","web:pretty":"yarn --cwd example web:pretty","android":"yarn --cwd example android","android:pretty":"yarn --cwd example android:pretty","pods":"cd example && pod-install --quiet","bootstrap":"yarn && yarn pods","deploy":"cd example && yarn deploy"},"keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/dohooo/react-native-reanimated-carousel.git"},"author":{"name":"Doho","email":"zhaodonghao586@outlook.com","url":"https://github.com/dohooo"},"license":"MIT","bugs":{"url":"https://github.com/dohooo/react-native-reanimated-carousel/issues"},"homepage":"https://github.com/dohooo/react-native-reanimated-carousel#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"devDependencies":{"@babel/plugin-syntax-dynamic-import":"^7.8.3","@commitlint/config-conventional":"^11.0.0","@react-native-community/eslint-config":"^2.0.0","@release-it/conventional-changelog":"^2.0.0","@types/jest":"^26.0.0","@types/react":"^16.9.19","@types/react-native":"^0.66.16","@types/react-native-snap-carousel":"^3.8.5","babel-plugin-inline-dotenv":"^1.6.0","babel-plugin-module-resolver":"^4.1.0","commitlint":"^11.0.0","cz-conventional-changelog":"^3.3.0","eslint":"^7.2.0","eslint-config-prettier":"^7.0.0","eslint-plugin-prettier":"^3.1.3","gifify":"^2.4.3","husky":"^4.2.5","jest":"^26.0.1","pod-install":"^0.1.0","prettier":"^2.0.5","react":"16.13.1","react-native":"0.63.4","react-native-builder-bob":"^0.18.1","react-native-gesture-handler":"^1.10.3","react-native-reanimated":"^2.2.0","release-it":"^14.2.2","sponsorkit":"^0.1.3","typescript":"^4.0.8"},"peerDependencies":{"react":">=16.8.0","react-native":">=0.6.0","react-native-gesture-handler":"*","react-native-reanimated":">=2.0.0"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"yarn lint"}},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular","types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{}]},"infile":"CHANGELOG.md"}}},"react-native-builder-bob":{"source":"src","output":"lib","targets":[["commonjs",{"configFile":"./babel.config.js"}],"module",["typescript",{"project":"tsconfig.build.json"}]]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"105de2c6bfc0e916a9472375074e0bb1fde0487e","_id":"@admoriarty/react-native-reanimated-carousel@2.3.2-fix","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-1jVzCQQo8eeeiCRwgfZ6WoKtTQ6y4wATT8QUI/ndrNAzuTkVQu2roRrlNBDaIu4PhOLLbT1po3wd6332w8e66w==","shasum":"107d2e6d9ccd4e4099ce9183aeec0ad28afa3864","tarball":"https://registry.npmjs.org/@admoriarty/react-native-reanimated-carousel/-/react-native-reanimated-carousel-2.3.2-fix.tgz","fileCount":154,"unpackedSize":451768,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQ1yMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrU9g/+KqkiuKBktDXS16dHXhC4CLv5lSd69Vnss4LKFYexDpTxVeL/\r\ntxKONlNxJ69Olcz1XPoNFcGSdu4BcBeQdPDhknZ797ukQlZ/RUMYDrpdSZv9\r\naTQ1N0x+RztOUjP+XEkfp1h6ZAcrOiMwC/3rD0tD4hBPfu5fRPT21cqGYRIE\r\n65CxEKms4fY5Xu7OkzlU+tVmYBW7g4eAci/s+gO7dryh8PlL680ogrtfoX01\r\nnOqAcKY+LaIre3DJ3XfIX7zX53ZpEBcaXP6GQ7upk/PrX/FYeXhj3Zm6ruKK\r\nYI/sWqNLWQ4rebeFbaY51LrIvrkomHSoETwxN6hhT8/C7XYb6J06xOQAxPkM\r\n79Skz/qVCFc8AS9S2JeKKjntqEcfPU8Lfox4ui8TdmfD0VEVZsAQPZrTx8li\r\npTe/6XBK74+do5NJQYzqAlq/ivs3hFCARXux+B5KJIRwPljKzEVyd35y6MJJ\r\nGM+B5uSLmtLCmTZziDrckkqutxxhT6eWc0cgyzLXloXFKSJ2+/4IOZ0XmTrh\r\nCFZpu2zboEz4F8S//msnw67dbBXfqMn8uPYxtyVwptEajHyzS6+CRbdV91RG\r\nUynwxrfrEMyEJvWswiFtKUbWqZeKGtCZ0le4cuxOQRKRp6Hwm+uBHqVxoaxO\r\nyW280pSvhMHveVJAbrDyGYZcP/VViYctlsc=\r\n=lHqW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEJQ5HCeCDVPT20qK44E9IVGxjskK/Pd4xbpDScW1Jo9AiEAiQI+gUW9fj1+zeRdn0JbBcg9nW6dUEZJRzOE8as9J5c="}]},"_npmUser":{"name":"admoriarty","email":"develop@ncuhome.cn"},"directories":{},"maintainers":[{"name":"admoriarty","email":"develop@ncuhome.cn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-reanimated-carousel_2.3.2-fix_1648581772144_0.767451175833231"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-29T19:22:52.092Z","2.3.2-fix":"2022-03-29T19:22:52.395Z","modified":"2022-04-04T11:33:45.173Z"},"maintainers":[{"name":"admoriarty","email":"develop@ncuhome.cn"}],"description":"Simple carousel component.fully implemented using Reanimated 2.Infinitely scrolling, very smooth.","homepage":"https://github.com/dohooo/react-native-reanimated-carousel#readme","keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/dohooo/react-native-reanimated-carousel.git"},"author":{"name":"Doho","email":"zhaodonghao586@outlook.com","url":"https://github.com/dohooo"},"bugs":{"url":"https://github.com/dohooo/react-native-reanimated-carousel/issues"},"license":"MIT","readme":"English | [简体中文](./README.zh-CN.md)\n\n# react-native-reanimated-carousel\n\n<img src=\"assets/home-banner.png\" width=\"100%\"/>\n\n![platforms](https://img.shields.io/badge/platforms-Android%20%7C%20iOS%20%7C%20Web-brightgreen.svg?style=flat-square&colorB=191A17)\n[![npm](https://img.shields.io/npm/v/react-native-reanimated-carousel.svg?style=flat-square)](https://www.npmjs.com/package/react-native-reanimated-carousel)\n[![npm](https://img.shields.io/npm/dm/react-native-reanimated-carousel.svg?style=flat-square&colorB=007ec6)](https://www.npmjs.com/package/react-native-reanimated-carousel)\n[![npm](https://img.shields.io/npm/dw/react-native-reanimated-carousel.svg?style=flat-square&colorB=007ec6)](https://www.npmjs.com/package/react-native-reanimated-carousel)\n[![github issues](https://img.shields.io/github/issues/dohooo/react-native-reanimated-carousel.svg?style=flat-square)](https://github.com/dohooo/react-native-reanimated-carousel/issues)\n[![github closed issues](https://img.shields.io/github/issues-closed/dohooo/react-native-reanimated-carousel.svg?style=flat-square&colorB=44cc11)](https://github.com/dohooo/react-native-reanimated-carousel/issues?q=is%3Aissue+is%3Aclosed)\n[![discord chat](https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord)](https://discord.gg/KsXRuDs43y)\n\n## ReactNative community's best use of the carousel component! 🎉🎉🎉\n\n-   **It completely solves this** [[problem]](https://github.com/meliorence/react-native-snap-carousel/issues/632) **for `react-native-snap-carousel`!**\n-   **Simple**、**Infinitely scrolling very smooth**、**Fully implemented using Reanimated 2!**\n\n> V2 has been released! Join it! [[v1 docs]](https://github.com/dohooo/react-native-reanimated-carousel/tree/v1.x.x) \n\n> Support to Web [[demo]](https://dohooo.github.io/react-native-reanimated-carousel/)\n\n> Click on the image to see the code snippets. [[Try it]](https://snack.expo.dev/@zhaodonghao586/simple-carousel) 🍺\n\n<p align=\"center\">\n  <a href=\"./example/src/normal/index.tsx\">\n    <img src=\"assets/normal-horizontal.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/normal/index.tsx\">\n    <img src=\"assets/normal-vertical.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/parallax/index.tsx\">\n    <img src=\"assets/parallax-horizontal.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/parallax/index.tsx\">\n    <img src=\"assets/parallax-vertical.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/stack/index.tsx\">\n    <img src=\"assets/stack-horizontal-left.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/stack/index.tsx\">\n    <img src=\"assets/stack-horizontal-right.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/stack/index.tsx\">\n    <img src=\"assets/stack-vertical-left.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/stack/index.tsx\">\n    <img src=\"assets/stack-vertical-right.gif\" width=\"300\"/>  \n  </a>\n</p>\n\n> Now you can make cool animations with us! Very easy! [[Details]](./docs/custom-animation.md)\n\n<p align=\"center\">\n  <a href=\"./example/src/advanced-parallax/index.tsx\">\n    <img src=\"assets/advanced-parallax.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/pause-advanced-parallax/index.tsx\">\n    <img src=\"assets/pause-advanced-parallax.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/scale-fade-in-out/index.tsx\">\n    <img src=\"assets/scale-fade-in-out.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/rotate-scale-fade-in-out/index.tsx\">\n    <img src=\"assets/rotate-scale-fade-in-out.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/rotate-in-out/index.tsx\">\n    <img src=\"assets/rotate-in-out.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/anim-tab-bar/index.tsx\">\n    <img src=\"assets/anim-tab-bar.gif\" width=\"300\"/>  \n  </a>\n  <a href=\"./example/src/marquee/index.tsx\">\n    <img src=\"assets/marquee.gif\" width=\"300\"/>  \n  </a>\n  <br/>\n  <a href=\"./example/src/flow/index.tsx\">\n    <img src=\"assets/flow.gif\" width=\"300\"/>  \n  </a>\n</p>\n\n## Table of contents\n\n1. [Installation](#Installation)\n1. [Usage](#Usage)\n1. [Props](./docs/props.md)\n1. [Tips](#Tips)\n1. [Reason](#Reason)\n1. [Example](#Example)\n\n## Installation\n\nOpen a Terminal in the project root and run:\n\n```sh\nyarn add react-native-reanimated-carousel\n```\n\nOr if you use npm:\n\n```sh\nnpm install react-native-reanimated-carousel\n```\n\nNow we need to install [`react-native-gesture-handler`](https://github.com/kmagiera/react-native-gesture-handler) and [`react-native-reanimated(>=2.0.0)`](https://github.com/kmagiera/react-native-reanimated).\n\n## Usage\n\n```tsx\nimport Carousel from 'react-native-reanimated-carousel';\n\n<Carousel\n    width={300}\n    height={150}\n    data={[1, 2, 3]}\n    renderItem={({ item }) => <AnyElement />}\n/>;\n```\n\n## Tips\n\n-   Optimizing\n\n    -   When rendering a large number of elements, you can use the 'windowSize' property to control how many items of the current element are rendered. The default is full rendering. After testing without this property, frames will drop when rendering 200 empty views. After setting this property, rendering 1000 empty views is still smooth. (The specific number depends on the phone model tested)\n  \n-   Used in `ScrollView/FlastList`\n\n    -   **[#143](https://github.com/dohooo/react-native-reanimated-carousel/issues/143) - Carousel suppresses ScrollView/FlastList scroll gesture handler:** When using a carousel with a layout oriented to only one direction (vertical/horizontal) and inside a ScrollView/FlatList, it is important for the user experience that the unused axis does not impede the scroll of the list. So that, for example, the x-axis is free we can change the [activeOffsetX](https://docs.swmansion.com/react-native-gesture-handler/docs/1.10.3/api/gesture-handlers/pan-gh/#activeoffsetx) of the gesture handler:\n\n        ```tsx\n        <Carousel\n          {...}\n          panGestureHandlerProps={{\n            activeOffsetX: [-10, 10],\n          }}\n        />\n        ```\n\n-   RTL\n    -   Support to RTL mode with no more configuration needed. But in RTL mode, need to manually set the autoPlayReverse props for autoplay to control scrolling direction.\n-   EXPO\n    -   If use EXPO managed workflow please ensure that the version is greater than 41.Because the old version not support `Reanimated(v2)`.\n\n## Reason\n\n<details>\n<summary>The common RN infinite scroll component. It get stuck on a fast slide. Wait for the next element to appear. This component will not have similar problems.Because using a completely different approach so the best performance is achieved.That's why this library was created.</summary>\n<p align=\"center\">\n  Use react-native-snap-carousel for quick swiping,you can see caton clearly when you reach the junction.(gif 4.6mb)\n</p>\n<p align=\"center\">\n  <img src=\"assets/react-native-snap-carousel.gif\" width=\"50%\"/>\n</p>\n\n<p align=\"center\">\n  Compared with react-native-reanimated-carousel,The actual test was ten slides per second, but it didn't show up very well in gif.\n</p>\n<p align=\"center\">\n  <img src=\"assets/normal-fast.gif\" width=\"50%\"/>\n</p>\n</details>\n\n## Example\n> `:pretty` use pretty images\n```shell\nyarn ios\nyarn ios:pretty\n\nyarn android\nyarn android:pretty\n\nyarn web\nyarn web:pretty\n```\n\n## Sponsors\n\n<p align=\"center\">\n  <a href=\"./sponsorkit/sponsors.svg\">\n    <img src='./sponsorkit/sponsors.png'/>\n  </a>\n</p>\n\n## License\n\nMIT\n","readmeFilename":"README.md"}