react-native-reanimated-carousel 5.1.1 → 5.2.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 +6 -0
- 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 +1 -1
- package/lib/commonjs/components/Pagination/PaginationItem.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/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/useOffsetX.js +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/useVisibleRanges.js +1 -1
- package/lib/commonjs/hooks/useVisibleRanges.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/utils/web-only-dependencies.js +2 -0
- package/lib/commonjs/utils/web-only-dependencies.js.map +1 -0
- 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/Pagination/PaginationItem.js +1 -1
- package/lib/module/components/Pagination/PaginationItem.js.map +1 -1
- package/lib/module/components/ScrollViewGesture.js +1 -1
- package/lib/module/components/ScrollViewGesture.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/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/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/useVisibleRanges.js +1 -1
- package/lib/module/hooks/useVisibleRanges.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/utils/web-only-dependencies.js +2 -0
- package/lib/module/utils/web-only-dependencies.js.map +1 -0
- package/lib/typescript/commonjs/components/CarouselLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/ItemLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/ItemRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Pagination/PaginationItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/ScrollViewGesture.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useCarouselController.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useCommonVariables.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useInitProps.d.ts +2 -1
- package/lib/typescript/commonjs/hooks/useInitProps.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useOffsetX.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useOnProgressChange.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useVisibleRanges.d.ts +1 -0
- package/lib/typescript/commonjs/hooks/useVisibleRanges.d.ts.map +1 -1
- package/lib/typescript/commonjs/layouts/normal.d.ts +2 -9
- package/lib/typescript/commonjs/layouts/normal.d.ts.map +1 -1
- package/lib/typescript/commonjs/layouts/parallax.d.ts +2 -16
- package/lib/typescript/commonjs/layouts/parallax.d.ts.map +1 -1
- package/lib/typescript/commonjs/public-types.d.ts +1 -0
- package/lib/typescript/commonjs/public-types.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/web-only-dependencies.d.ts +7 -0
- package/lib/typescript/commonjs/utils/web-only-dependencies.d.ts.map +1 -0
- package/lib/typescript/module/components/CarouselLayout.d.ts.map +1 -1
- package/lib/typescript/module/components/ItemLayout.d.ts.map +1 -1
- package/lib/typescript/module/components/ItemRenderer.d.ts.map +1 -1
- package/lib/typescript/module/components/Pagination/PaginationItem.d.ts.map +1 -1
- package/lib/typescript/module/components/ScrollViewGesture.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useCarouselController.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useCommonVariables.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useInitProps.d.ts +2 -1
- package/lib/typescript/module/hooks/useInitProps.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useOffsetX.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useOnProgressChange.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useVisibleRanges.d.ts +1 -0
- package/lib/typescript/module/hooks/useVisibleRanges.d.ts.map +1 -1
- package/lib/typescript/module/layouts/normal.d.ts +2 -9
- package/lib/typescript/module/layouts/normal.d.ts.map +1 -1
- package/lib/typescript/module/layouts/parallax.d.ts +2 -16
- package/lib/typescript/module/layouts/parallax.d.ts.map +1 -1
- package/lib/typescript/module/public-types.d.ts +1 -0
- package/lib/typescript/module/public-types.d.ts.map +1 -1
- package/lib/typescript/module/utils/web-only-dependencies.d.ts +7 -0
- package/lib/typescript/module/utils/web-only-dependencies.d.ts.map +1 -0
- package/package.json +3 -2
- package/src/components/CarouselLayout.tsx +15 -4
- package/src/components/ItemLayout.tsx +14 -4
- package/src/components/ItemRenderer.tsx +36 -4
- package/src/components/Pagination/PaginationItem.tsx +22 -20
- package/src/components/ScrollViewGesture.tsx +12 -5
- package/src/hooks/useCarouselController.tsx +3 -2
- package/src/hooks/useCommonVariables.ts +3 -2
- package/src/hooks/useInitProps.ts +13 -0
- package/src/hooks/useOffsetX.ts +11 -1
- package/src/hooks/useOnProgressChange.ts +2 -1
- package/src/hooks/useVisibleRanges.tsx +5 -2
- package/src/layouts/normal.ts +2 -1
- package/src/layouts/parallax.ts +2 -1
- package/src/public-types.ts +1 -0
- package/src/utils/web-only-dependencies.ts +10 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_reactNativeWorklets","_carouselMath","_worklet_9412223421859_init_data","code","location","sourceMap","_worklet_9442973889124_init_data","useOnProgressChange","options","loop","offset","onProgressChange","progress","rawDataLength","size","sizeReady","useAnimatedReaction","useOnProgressChangeTs1Factory","_ref","getLogicalProgress","_e","global","Error","useOnProgressChangeTs1","value","logicalProgress","Math","max","min","__closure","__workletHash","__pluginVersion","__initData","__stackDetails","useOnProgressChangeTs2Factory","_ref2","scheduleOnRN","useOnProgressChangeTs2","nextProgress"],"sourceRoot":"../../../src","sources":["hooks/useOnProgressChange.ts"],"mappings":"yGACA,IAAAA,sBAAA,CAAAC,OAAA,4BACA,IAAAC,oBAAA,CAAAD,OAAA,0BAGA,IAAAE,aAAA,CAAAF,OAAA,
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_reactNativeWorklets","_carouselMath","_webOnlyDependencies","_worklet_9412223421859_init_data","code","location","sourceMap","_worklet_9442973889124_init_data","useOnProgressChange","options","loop","offset","onProgressChange","progress","rawDataLength","size","sizeReady","useAnimatedReaction","useOnProgressChangeTs1Factory","_ref","getLogicalProgress","_e","global","Error","useOnProgressChangeTs1","value","logicalProgress","Math","max","min","__closure","__workletHash","__pluginVersion","__initData","__stackDetails","useOnProgressChangeTs2Factory","_ref2","scheduleOnRN","useOnProgressChangeTs2","nextProgress","webOnlyDependencies"],"sourceRoot":"../../../src","sources":["hooks/useOnProgressChange.ts"],"mappings":"yGACA,IAAAA,sBAAA,CAAAC,OAAA,4BACA,IAAAC,oBAAA,CAAAD,OAAA,0BAGA,IAAAE,aAAA,CAAAF,OAAA,2BACA,IAAAG,oBAAA,CAAAH,OAAA,mCAAqE,IAAAI,gCAAA,EAAAC,IAAA,kUAAAC,QAAA,wHAAAC,SAAA,ixBAAAC,gCAAA,EAAAH,IAAA,qPAAAC,QAAA,wHAAAC,SAAA,giBAE9D,QAAS,CAAAE,mBAAmBA,CAACC,OAQnC,CAAE,CACD,GAAQ,CAAAC,IAAI,CAAyED,OAAO,CAApFC,IAAI,CAAEC,MAAM,CAAiEF,OAAO,CAA9EE,MAAM,CAAEC,gBAAgB,CAA+CH,OAAO,CAAtEG,gBAAgB,CAAEC,QAAQ,CAAqCJ,OAAO,CAApDI,QAAQ,CAAEC,aAAa,CAAsBL,OAAO,CAA1CK,aAAa,CAAEC,IAAI,CAAgBN,OAAO,CAA3BM,IAAI,CAAEC,SAAS,CAAKP,OAAO,CAArBO,SAAS,CAEhF,GAAAC,0CAAmB,EACjB,SAAAC,8BAAAC,IAAA,MAAAhB,gCAAA,CAAAgB,IAAA,CAAAhB,gCAAA,CACOa,SAAS,CAAAG,IAAA,CAATH,SAAS,CAAUD,IAAI,CAAAI,IAAA,CAAJJ,IAAI,CAASD,aAAa,CAAAK,IAAA,CAAbL,aAAa,CAE1BM,kBAAkB,CAAAD,IAAA,CAAlBC,kBAAkB,CAACT,MAAM,CAAAQ,IAAA,CAANR,MAAM,CAC1CD,IAAI,CAAAS,IAAA,CAAJT,IAAI,KAAAW,EAAA,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CC,YAAY,CAAK,CAChB,GAAIA,YAAY,EAAI,IAAI,CAAE,OAC1B,GAAI1B,QAAQ,CAAEA,QAAQ,CAACY,KAAK,CAAGc,YAAY,CAC3C,GAAI3B,gBAAgB,CAAEyB,YAAY,CAACzB,gBAAgB,CAAE2B,YAAY,CAAC,CACpE,CAAC,CAAAD,sBAAA,CAAAR,SAAA,EAFKjB,QAAQ,CAARA,QAAQ,CACRD,gBAAgB,CAAhBA,gBAAgB,CAAEyB,YAAY,CAAZA,YAAY,EAAAC,sBAAA,CAAAP,aAAA,eAAAO,sBAAA,CAAAN,eAAA,SAAAM,sBAAA,CAAAL,UAAA,CAAA1B,gCAAA,CAAA+B,sBAAA,CAAAJ,cAAA,CAAAb,EAAA,QAAAiB,sBAAA,EAHpC,EAAA/B,gCAAA,CAAAA,gCAAA,CAEMM,QAAQ,CAARA,QAAQ,CACRD,gBAAgB,CAAhBA,gBAAgB,CAAEyB,YAAY,CAAZA,iCAAY,GAEpC,GAAAG,wCAAmB,EAAC,CAAC9B,IAAI,CAAEC,MAAM,CAAEC,gBAAgB,CAAEC,QAAQ,CAAEC,aAAa,CAAEC,IAAI,CAAEC,SAAS,CAAC,CAChG,CAAC,CACH","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.computeVisibleRanges=void 0;exports.useVisibleRanges=useVisibleRanges;var _react=require("react");var _reactNativeReanimated=require("react-native-reanimated");var _worklet_857738204961_init_data={code:"function normalizeWindowSize_useVisibleRangesTsx1(total,windowSize){return typeof windowSize===\"number\"&&Number.isFinite(windowSize)&&windowSize>0?windowSize:total;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx",sourceMap:"{\"version\":3,\"names\":[\"normalizeWindowSize_useVisibleRangesTsx1\",\"total\",\"windowSize\",\"Number\",\"isFinite\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx\"],\"mappings\":\"AAaA,SAAAA,wCAAiEA,CAAAC,KAAA,CAAAC,UAAA,EAG/D,MAAO,OAAO,CAAAA,UAAU,GAAK,QAAQ,EAAIC,MAAM,CAACC,QAAQ,CAACF,UAAU,CAAC,EAAIA,UAAU,CAAG,CAAC,CAClFA,UAAU,CACVD,KAAK,CACX\",\"ignoreList\":[]}"};var normalizeWindowSize=function normalizeWindowSize_useVisibleRangesTsx1Factory(_ref){var _worklet_857738204961_init_data=_ref._worklet_857738204961_init_data;var _e=[new global.Error(),1,-27];var normalizeWindowSize=function normalizeWindowSize(total,windowSize){return typeof windowSize==="number"&&Number.isFinite(windowSize)&&windowSize>0?windowSize:total;};normalizeWindowSize.__closure={};normalizeWindowSize.__workletHash=857738204961;normalizeWindowSize.__pluginVersion="0.5.2";normalizeWindowSize.__initData=_worklet_857738204961_init_data;normalizeWindowSize.__stackDetails=_e;return normalizeWindowSize;}({_worklet_857738204961_init_data:_worklet_857738204961_init_data});var _worklet_10467342159726_init_data={code:"function normalizeLoopIndex_useVisibleRangesTsx2(currentIndex,total){return currentIndex<0?currentIndex%total+total:currentIndex;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx",sourceMap:"{\"version\":3,\"names\":[\"normalizeLoopIndex_useVisibleRangesTsx2\",\"currentIndex\",\"total\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx\"],\"mappings\":\"AAqBA,SAAAA,uCAA+DA,CAAAC,YAAE,CAAAC,KAAA,EAG/D,MAAO,CAAAD,YAAY,CAAG,CAAC,CAAIA,YAAY,CAAGC,KAAK,CAAIA,KAAK,CAAGD,YAAY,CACzE\",\"ignoreList\":[]}"};var normalizeLoopIndex=function normalizeLoopIndex_useVisibleRangesTsx2Factory(_ref2){var _worklet_10467342159726_init_data=_ref2._worklet_10467342159726_init_data;var _e=[new global.Error(),1,-27];var normalizeLoopIndex=function normalizeLoopIndex(currentIndex,total){return currentIndex<0?currentIndex%total+total:currentIndex;};normalizeLoopIndex.__closure={};normalizeLoopIndex.__workletHash=10467342159726;normalizeLoopIndex.__pluginVersion="0.5.2";normalizeLoopIndex.__initData=_worklet_10467342159726_init_data;normalizeLoopIndex.__stackDetails=_e;return normalizeLoopIndex;}({_worklet_10467342159726_init_data:_worklet_10467342159726_init_data});var _worklet_12590357434072_init_data={code:"function computeVisibleRanges_useVisibleRangesTsx3(params){const{normalizeWindowSize,normalizeLoopIndex}=this.__closure;const{total=0,loop:loop}=params;const windowSize=normalizeWindowSize(total,params.windowSize);if(total<=0){return{negativeRange:[0,0],positiveRange:[0,-1]};}if(loop&&windowSize>=total){return{negativeRange:[0,0],positiveRange:[0,total-1]};}const positiveCount=Math.round(windowSize/2);const negativeCount=windowSize-positiveCount;let currentIndex=params.currentIndex;if(!Number.isFinite(currentIndex))currentIndex=0;if(!loop){currentIndex=Math.max(0,Math.min(total-1,currentIndex));return{negativeRange:[Math.max(0,currentIndex-(windowSize-1)),currentIndex],positiveRange:[currentIndex,Math.min(total-1,currentIndex+(windowSize-1))]};}currentIndex=normalizeLoopIndex(currentIndex,total);const negativeRange=[(currentIndex-negativeCount+total)%total,(currentIndex-1+total)%total];const positiveRange=[(currentIndex+total)%total,(currentIndex+positiveCount+total)%total];if(negativeRange[0]<total&&negativeRange[0]>negativeRange[1]){negativeRange[1]=total-1;positiveRange[0]=0;}if(positiveRange[0]>positiveRange[1]){negativeRange[1]=total-1;positiveRange[0]=0;}return{negativeRange:negativeRange,positiveRange:positiveRange};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx",sourceMap:"{\"version\":3,\"names\":[\"computeVisibleRanges_useVisibleRangesTsx3\",\"params\",\"normalizeWindowSize\",\"normalizeLoopIndex\",\"__closure\",\"total\",\"loop\",\"windowSize\",\"negativeRange\",\"positiveRange\",\"positiveCount\",\"Math\",\"round\",\"negativeCount\",\"currentIndex\",\"Number\",\"isFinite\",\"max\",\"min\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx\"],\"mappings\":\"AA2BO,SAAAA,yCAKWA,CAAAC,MAAA,QAAAC,mBAAA,CAAAC,kBAAA,OAAAC,SAAA,CAGhB,KAAM,CAAEC,KAAK,CAAG,CAAC,CAAEC,IAAA,CAAAA,IAAK,CAAC,CAAGL,MAAM,CAClC,KAAM,CAAAM,UAAU,CAAGL,mBAAmB,CAACG,KAAK,CAAEJ,MAAM,CAACM,UAAU,CAAC,CAEhE,GAAIF,KAAK,EAAI,CAAC,CAAE,CACd,MAAO,CACLG,aAAa,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CACrBC,aAAa,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CACvB,CAAC,CACH,CAEA,GAAIH,IAAI,EAAIC,UAAU,EAAIF,KAAK,CAAE,CAC/B,MAAO,CACLG,aAAa,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CACrBC,aAAa,CAAE,CAAC,CAAC,CAAEJ,KAAK,CAAG,CAAC,CAC9B,CAAC,CACH,CAEA,KAAM,CAAAK,aAAa,CAAGC,IAAI,CAACC,KAAK,CAACL,UAAU,CAAG,CAAC,CAAC,CAChD,KAAM,CAAAM,aAAa,CAAGN,UAAU,CAAGG,aAAa,CAEhD,GAAI,CAAAI,YAAY,CAAGb,MAAM,CAACa,YAAY,CACtC,GAAI,CAACC,MAAM,CAACC,QAAQ,CAACF,YAAY,CAAC,CAAEA,YAAY,CAAG,CAAC,CAEpD,GAAI,CAACR,IAAI,CAAE,CACTQ,YAAY,CAAGH,IAAI,CAACM,GAAG,CAAC,CAAC,CAAEN,IAAI,CAACO,GAAG,CAACb,KAAK,CAAG,CAAC,CAAES,YAAY,CAAC,CAAC,CAC7D,MAAO,CACLN,aAAa,CAAE,CAACG,IAAI,CAACM,GAAG,CAAC,CAAC,CAAEH,YAAY,EAAIP,UAAU,CAAG,CAAC,CAAC,CAAC,CAAEO,YAAY,CAAC,CAC3EL,aAAa,CAAE,CAACK,YAAY,CAAEH,IAAI,CAACO,GAAG,CAACb,KAAK,CAAG,CAAC,CAAES,YAAY,EAAIP,UAAU,CAAG,CAAC,CAAC,CAAC,CACpF,CAAC,CACH,CAEAO,YAAY,CAAGX,kBAAkB,CAACW,YAAY,CAAET,KAAK,CAAC,CAEtD,KAAM,CAAAG,aAAoB,CAAG,CAC3B,CAACM,YAAY,CAAGD,aAAa,CAAGR,KAAK,EAAIA,KAAK,CAC9C,CAACS,YAAY,CAAG,CAAC,CAAGT,KAAK,EAAIA,KAAK,CACnC,CAED,KAAM,CAAAI,aAAoB,CAAG,CAC3B,CAACK,YAAY,CAAGT,KAAK,EAAIA,KAAK,CAC9B,CAACS,YAAY,CAAGJ,aAAa,CAAGL,KAAK,EAAIA,KAAK,CAC/C,CAED,GAAIG,aAAa,CAAC,CAAC,CAAC,CAAGH,KAAK,EAAIG,aAAa,CAAC,CAAC,CAAC,CAAGA,aAAa,CAAC,CAAC,CAAC,CAAE,CACnEA,aAAa,CAAC,CAAC,CAAC,CAAGH,KAAK,CAAG,CAAC,CAC5BI,aAAa,CAAC,CAAC,CAAC,CAAG,CAAC,CACtB,CACA,GAAIA,aAAa,CAAC,CAAC,CAAC,CAAGA,aAAa,CAAC,CAAC,CAAC,CAAE,CACvCD,aAAa,CAAC,CAAC,CAAC,CAAGH,KAAK,CAAG,CAAC,CAC5BI,aAAa,CAAC,CAAC,CAAC,CAAG,CAAC,CACtB,CAEA,MAAO,CAAED,aAAa,CAAbA,aAAa,CAAEC,aAAA,CAAAA,aAAc,CAAC,CACzC\",\"ignoreList\":[]}"};var computeVisibleRanges=exports.computeVisibleRanges=function computeVisibleRanges_useVisibleRangesTsx3Factory(_ref3){var _worklet_12590357434072_init_data=_ref3._worklet_12590357434072_init_data,normalizeWindowSize=_ref3.normalizeWindowSize,normalizeLoopIndex=_ref3.normalizeLoopIndex;var _e=[new global.Error(),-3,-27];var computeVisibleRanges=function computeVisibleRanges(params){var _params$total=params.total,total=_params$total===void 0?0:_params$total,loop=params.loop;var windowSize=normalizeWindowSize(total,params.windowSize);if(total<=0){return{negativeRange:[0,0],positiveRange:[0,-1]};}if(loop&&windowSize>=total){return{negativeRange:[0,0],positiveRange:[0,total-1]};}var positiveCount=Math.round(windowSize/2);var negativeCount=windowSize-positiveCount;var currentIndex=params.currentIndex;if(!Number.isFinite(currentIndex))currentIndex=0;if(!loop){currentIndex=Math.max(0,Math.min(total-1,currentIndex));return{negativeRange:[Math.max(0,currentIndex-(windowSize-1)),currentIndex],positiveRange:[currentIndex,Math.min(total-1,currentIndex+(windowSize-1))]};}currentIndex=normalizeLoopIndex(currentIndex,total);var negativeRange=[(currentIndex-negativeCount+total)%total,(currentIndex-1+total)%total];var positiveRange=[(currentIndex+total)%total,(currentIndex+positiveCount+total)%total];if(negativeRange[0]<total&&negativeRange[0]>negativeRange[1]){negativeRange[1]=total-1;positiveRange[0]=0;}if(positiveRange[0]>positiveRange[1]){negativeRange[1]=total-1;positiveRange[0]=0;}return{negativeRange:negativeRange,positiveRange:positiveRange};};computeVisibleRanges.__closure={normalizeWindowSize:normalizeWindowSize,normalizeLoopIndex:normalizeLoopIndex};computeVisibleRanges.__workletHash=12590357434072;computeVisibleRanges.__pluginVersion="0.5.2";computeVisibleRanges.__initData=_worklet_12590357434072_init_data;computeVisibleRanges.__stackDetails=_e;return computeVisibleRanges;}({_worklet_12590357434072_init_data:_worklet_12590357434072_init_data,normalizeWindowSize:normalizeWindowSize,normalizeLoopIndex:normalizeLoopIndex});var _worklet_6485309998197_init_data={code:"function useVisibleRangesTsx4(){const{total,computeVisibleRanges,windowSize,loop,viewSize,translation,cachedRanges,isArraysEqual}=this.__closure;if(total<=0){return computeVisibleRanges({total:total,currentIndex:0,windowSize:windowSize,loop:loop});}if(!Number.isFinite(viewSize)||viewSize<=0){return{negativeRange:[0,0],positiveRange:[0,Math.min(total-1,windowSize-1)]};}let currentIndex=Math.round(-translation.value/viewSize);if(!Number.isFinite(currentIndex))currentIndex=0;const newRanges=computeVisibleRanges({total:total,windowSize:windowSize,currentIndex:currentIndex,loop:loop});if(cachedRanges.current&&isArraysEqual(cachedRanges.current.negativeRange,newRanges.negativeRange)&&isArraysEqual(cachedRanges.current.positiveRange,newRanges.positiveRange)){return cachedRanges.current;}cachedRanges.current=newRanges;return newRanges;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx",sourceMap:"{\"version\":3,\"names\":[\"useVisibleRangesTsx4\",\"total\",\"computeVisibleRanges\",\"windowSize\",\"loop\",\"viewSize\",\"translation\",\"cachedRanges\",\"isArraysEqual\",\"__closure\",\"currentIndex\",\"Number\",\"isFinite\",\"negativeRange\",\"positiveRange\",\"Math\",\"min\",\"round\",\"value\",\"newRanges\",\"current\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx\"],\"mappings\":\"AAsGiC,SAAAA,oBAAMA,CAAA,QAAAC,KAAA,CAAAC,oBAAA,CAAAC,UAAA,CAAAC,IAAA,CAAAC,QAAA,CAAAC,WAAA,CAAAC,YAAA,CAAAC,aAAA,OAAAC,SAAA,CACnC,GAAIR,KAAK,EAAI,CAAC,CAAE,CACd,MAAO,CAAAC,oBAAoB,CAAC,CAAED,KAAK,CAALA,KAAK,CAAES,YAAY,CAAE,CAAC,CAAEP,UAAU,CAAVA,UAAU,CAAEC,IAAA,CAAAA,IAAK,CAAC,CAAC,CAC3E,CAGA,GAAI,CAACO,MAAM,CAACC,QAAQ,CAACP,QAAQ,CAAC,EAAIA,QAAQ,EAAI,CAAC,CAAE,CAC/C,MAAO,CACLQ,aAAa,CAAE,CAAC,CAAC,CAAE,CAAC,CAAU,CAC9BC,aAAa,CAAE,CAAC,CAAC,CAAEC,IAAI,CAACC,GAAG,CAACf,KAAK,CAAG,CAAC,CAAEE,UAAU,CAAG,CAAC,CAAC,CACxD,CAAC,CACH,CAEA,GAAI,CAAAO,YAAY,CAAGK,IAAI,CAACE,KAAK,CAAC,CAACX,WAAW,CAACY,KAAK,CAAGb,QAAQ,CAAC,CAC5D,GAAI,CAACM,MAAM,CAACC,QAAQ,CAACF,YAAY,CAAC,CAAEA,YAAY,CAAG,CAAC,CAEpD,KAAM,CAAAS,SAAS,CAAGjB,oBAAoB,CAAC,CAAED,KAAK,CAALA,KAAK,CAAEE,UAAU,CAAVA,UAAU,CAAEO,YAAY,CAAZA,YAAY,CAAEN,IAAA,CAAAA,IAAK,CAAC,CAAC,CAEjF,GACEG,YAAY,CAACa,OAAO,EACpBZ,aAAa,CAACD,YAAY,CAACa,OAAO,CAACP,aAAa,CAAEM,SAAS,CAACN,aAAa,CAAC,EAC1EL,aAAa,CAACD,YAAY,CAACa,OAAO,CAACN,aAAa,CAAEK,SAAS,CAACL,aAAa,CAAC,CAC1E,CACA,MAAO,CAAAP,YAAY,CAACa,OAAO,CAC7B,CAEAb,YAAY,CAACa,OAAO,CAAGD,SAAS,CAChC,MAAO,CAAAA,SAAS,CAClB\",\"ignoreList\":[]}"};function useVisibleRanges(options){var _options$total=options.total,total=_options$total===void 0?0:_options$total,viewSize=options.viewSize,translation=options.translation,_windowSize=options.windowSize,loop=options.loop;var windowSize=normalizeWindowSize(total,_windowSize);var cachedRanges=(0,_react.useRef)(null);var ranges=(0,_reactNativeReanimated.useDerivedValue)(function useVisibleRangesTsx4Factory(_ref4){var _worklet_6485309998197_init_data=_ref4._worklet_6485309998197_init_data,total=_ref4.total,computeVisibleRanges=_ref4.computeVisibleRanges,windowSize=_ref4.windowSize,loop=_ref4.loop,viewSize=_ref4.viewSize,translation=_ref4.translation,cachedRanges=_ref4.cachedRanges,isArraysEqual=_ref4.isArraysEqual;var _e=[new global.Error(),-9,-27];var useVisibleRangesTsx4=function useVisibleRangesTsx4(){if(total<=0){return computeVisibleRanges({total:total,currentIndex:0,windowSize:windowSize,loop:loop});}if(!Number.isFinite(viewSize)||viewSize<=0){return{negativeRange:[0,0],positiveRange:[0,Math.min(total-1,windowSize-1)]};}var currentIndex=Math.round(-translation.value/viewSize);if(!Number.isFinite(currentIndex))currentIndex=0;var newRanges=computeVisibleRanges({total:total,windowSize:windowSize,currentIndex:currentIndex,loop:loop});if(cachedRanges.current&&isArraysEqual(cachedRanges.current.negativeRange,newRanges.negativeRange)&&isArraysEqual(cachedRanges.current.positiveRange,newRanges.positiveRange)){return cachedRanges.current;}cachedRanges.current=newRanges;return newRanges;};useVisibleRangesTsx4.__closure={total:total,computeVisibleRanges:computeVisibleRanges,windowSize:windowSize,loop:loop,viewSize:viewSize,translation:translation,cachedRanges:cachedRanges,isArraysEqual:isArraysEqual};useVisibleRangesTsx4.__workletHash=6485309998197;useVisibleRangesTsx4.__pluginVersion="0.5.2";useVisibleRangesTsx4.__initData=_worklet_6485309998197_init_data;useVisibleRangesTsx4.__stackDetails=_e;return useVisibleRangesTsx4;}({_worklet_6485309998197_init_data:_worklet_6485309998197_init_data,total:total,computeVisibleRanges:computeVisibleRanges,windowSize:windowSize,loop:loop,viewSize:viewSize,translation:translation,cachedRanges:cachedRanges,isArraysEqual:isArraysEqual}),[loop,total,windowSize,translation,viewSize]);return ranges;}var _worklet_1694653230246_init_data={code:"function isArraysEqual_useVisibleRangesTsx5(a,b){if(a.length!==b.length)return false;return a.every(function(value,index){return value===b[index];});}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx",sourceMap:"{\"version\":3,\"names\":[\"isArraysEqual_useVisibleRangesTsx5\",\"a\",\"b\",\"length\",\"every\",\"value\",\"index\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx\"],\"mappings\":\"AAuIA,SAAAA,kCAA0DA,CAAAC,CAAA,CAAAC,CAAA,EAExD,GAAID,CAAC,CAACE,MAAM,GAAKD,CAAC,CAACC,MAAM,CAAE,MAAO,MAAK,CAEvC,MAAO,CAAAF,CAAC,CAACG,KAAK,CAAC,SAACC,KAAK,CAAEC,KAAK,QAAK,CAAAD,KAAK,GAAKH,CAAC,CAACI,KAAK,CAAC,GAAC,CACtD\",\"ignoreList\":[]}"};var isArraysEqual=function isArraysEqual_useVisibleRangesTsx5Factory(_ref5){var _worklet_1694653230246_init_data=_ref5._worklet_1694653230246_init_data;var _e=[new global.Error(),1,-27];var isArraysEqual=function isArraysEqual(a,b){if(a.length!==b.length)return false;return a.every(function(value,index){return value===b[index];});};isArraysEqual.__closure={};isArraysEqual.__workletHash=1694653230246;isArraysEqual.__pluginVersion="0.5.2";isArraysEqual.__initData=_worklet_1694653230246_init_data;isArraysEqual.__stackDetails=_e;return isArraysEqual;}({_worklet_1694653230246_init_data:_worklet_1694653230246_init_data});
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.normalizeWindowSize=exports.computeVisibleRanges=void 0;exports.useVisibleRanges=useVisibleRanges;var _react=require("react");var _reactNativeReanimated=require("react-native-reanimated");var _webOnlyDependencies=require("../utils/web-only-dependencies");var _worklet_857738204961_init_data={code:"function normalizeWindowSize_useVisibleRangesTsx1(total,windowSize){return typeof windowSize===\"number\"&&Number.isFinite(windowSize)&&windowSize>0?windowSize:total;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx",sourceMap:"{\"version\":3,\"names\":[\"normalizeWindowSize_useVisibleRangesTsx1\",\"total\",\"windowSize\",\"Number\",\"isFinite\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx\"],\"mappings\":\"AAeO,SAAAA,wCAAiEA,CAAAC,KAAA,CAAAC,UAAA,EAGtE,MAAO,OAAO,CAAAA,UAAU,GAAK,QAAQ,EAAIC,MAAM,CAACC,QAAQ,CAACF,UAAU,CAAC,EAAIA,UAAU,CAAG,CAAC,CAClFA,UAAU,CACVD,KAAK,CACX\",\"ignoreList\":[]}"};var normalizeWindowSize=exports.normalizeWindowSize=function normalizeWindowSize_useVisibleRangesTsx1Factory(_ref){var _worklet_857738204961_init_data=_ref._worklet_857738204961_init_data;var _e=[new global.Error(),1,-27];var normalizeWindowSize=function normalizeWindowSize(total,windowSize){return typeof windowSize==="number"&&Number.isFinite(windowSize)&&windowSize>0?windowSize:total;};normalizeWindowSize.__closure={};normalizeWindowSize.__workletHash=857738204961;normalizeWindowSize.__pluginVersion="0.5.2";normalizeWindowSize.__initData=_worklet_857738204961_init_data;normalizeWindowSize.__stackDetails=_e;return normalizeWindowSize;}({_worklet_857738204961_init_data:_worklet_857738204961_init_data});var _worklet_10467342159726_init_data={code:"function normalizeLoopIndex_useVisibleRangesTsx2(currentIndex,total){return currentIndex<0?currentIndex%total+total:currentIndex;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx",sourceMap:"{\"version\":3,\"names\":[\"normalizeLoopIndex_useVisibleRangesTsx2\",\"currentIndex\",\"total\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx\"],\"mappings\":\"AAuBA,SAAAA,uCAA+DA,CAAAC,YAAE,CAAAC,KAAA,EAG/D,MAAO,CAAAD,YAAY,CAAG,CAAC,CAAIA,YAAY,CAAGC,KAAK,CAAIA,KAAK,CAAGD,YAAY,CACzE\",\"ignoreList\":[]}"};var normalizeLoopIndex=function normalizeLoopIndex_useVisibleRangesTsx2Factory(_ref2){var _worklet_10467342159726_init_data=_ref2._worklet_10467342159726_init_data;var _e=[new global.Error(),1,-27];var normalizeLoopIndex=function normalizeLoopIndex(currentIndex,total){return currentIndex<0?currentIndex%total+total:currentIndex;};normalizeLoopIndex.__closure={};normalizeLoopIndex.__workletHash=10467342159726;normalizeLoopIndex.__pluginVersion="0.5.2";normalizeLoopIndex.__initData=_worklet_10467342159726_init_data;normalizeLoopIndex.__stackDetails=_e;return normalizeLoopIndex;}({_worklet_10467342159726_init_data:_worklet_10467342159726_init_data});var _worklet_12590357434072_init_data={code:"function computeVisibleRanges_useVisibleRangesTsx3(params){const{normalizeWindowSize,normalizeLoopIndex}=this.__closure;const{total=0,loop:loop}=params;const windowSize=normalizeWindowSize(total,params.windowSize);if(total<=0){return{negativeRange:[0,0],positiveRange:[0,-1]};}if(loop&&windowSize>=total){return{negativeRange:[0,0],positiveRange:[0,total-1]};}const positiveCount=Math.round(windowSize/2);const negativeCount=windowSize-positiveCount;let currentIndex=params.currentIndex;if(!Number.isFinite(currentIndex))currentIndex=0;if(!loop){currentIndex=Math.max(0,Math.min(total-1,currentIndex));return{negativeRange:[Math.max(0,currentIndex-(windowSize-1)),currentIndex],positiveRange:[currentIndex,Math.min(total-1,currentIndex+(windowSize-1))]};}currentIndex=normalizeLoopIndex(currentIndex,total);const negativeRange=[(currentIndex-negativeCount+total)%total,(currentIndex-1+total)%total];const positiveRange=[(currentIndex+total)%total,(currentIndex+positiveCount+total)%total];if(negativeRange[0]<total&&negativeRange[0]>negativeRange[1]){negativeRange[1]=total-1;positiveRange[0]=0;}if(positiveRange[0]>positiveRange[1]){negativeRange[1]=total-1;positiveRange[0]=0;}return{negativeRange:negativeRange,positiveRange:positiveRange};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx",sourceMap:"{\"version\":3,\"names\":[\"computeVisibleRanges_useVisibleRangesTsx3\",\"params\",\"normalizeWindowSize\",\"normalizeLoopIndex\",\"__closure\",\"total\",\"loop\",\"windowSize\",\"negativeRange\",\"positiveRange\",\"positiveCount\",\"Math\",\"round\",\"negativeCount\",\"currentIndex\",\"Number\",\"isFinite\",\"max\",\"min\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx\"],\"mappings\":\"AA6BO,SAAAA,yCAKWA,CAAAC,MAAA,QAA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AAC,CAAC,CAAC,CACpF,CAAC,CACH,CAEAO,YAAY,CAAGX,kBAAkB,CAACW,YAAY,CAAET,KAAK,CAAC,CAEtD,KAAM,CAAAG,aAAoB,CAAG,CAC3B,CAACM,YAAY,CAAGD,aAAa,CAAGR,KAAK,EAAIA,KAAK,CAC9C,CAACS,YAAY,CAAG,CAAC,CAAGT,KAAK,EAAIA,KAAK,CACnC,CAED,KAAM,CAAAI,aAAoB,CAAG,CAC3B,CAACK,YAAY,CAAGT,KAAK,EAAIA,KAAK,CAC9B,CAACS,YAAY,CAAGJ,aAAa,CAAGL,KAAK,EAAIA,KAAK,CAC/C,CAED,GAAIG,aAAa,CAAC,CAAC,CAAC,CAAGH,KAAK,EAAIG,aAAa,CAAC,CAAC,CAAC,CAAGA,aAAa,CAAC,CAAC,CAAC,CAAE,CACnEA,aAAa,CAAC,CAAC,CAAC,CAAGH,KAAK,CAAG,CAAC,CAC5BI,aAAa,CAAC,CAAC,CAAC,CAAG,CAAC,CACtB,CACA,GAAIA,aAAa,CAAC,CAAC,CAAC,CAAGA,aAAa,CAAC,CAAC,CAAC,CAAE,CACvCD,aAAa,CAAC,CAAC,CAAC,CAAGH,KAAK,CAAG,CAAC,CAC5BI,aAAa,CAAC,CAAC,CAAC,CAAG,CAAC,CACtB,CAEA,MAAO,CAAED,aAAa,CAAbA,aAAa,CAAEC,aAAA,CAAAA,aAAc,CAAC,CACzC\",\"ignoreList\":[]}"};var computeVisibleRanges=exports.computeVisibleRanges=function computeVisibleRanges_useVisibleRangesTsx3Factory(_ref3){var _worklet_12590357434072_init_data=_ref3._worklet_12590357434072_init_data,normalizeWindowSize=_ref3.normalizeWindowSize,normalizeLoopIndex=_ref3.normalizeLoopIndex;var _e=[new global.Error(),-3,-27];var computeVisibleRanges=function computeVisibleRanges(params){var _params$total=params.total,total=_params$total===void 0?0:_params$total,loop=params.loop;var windowSize=normalizeWindowSize(total,params.windowSize);if(total<=0){return{negativeRange:[0,0],positiveRange:[0,-1]};}if(loop&&windowSize>=total){return{negativeRange:[0,0],positiveRange:[0,total-1]};}var positiveCount=Math.round(windowSize/2);var negativeCount=windowSize-positiveCount;var currentIndex=params.currentIndex;if(!Number.isFinite(currentIndex))currentIndex=0;if(!loop){currentIndex=Math.max(0,Math.min(total-1,currentIndex));return{negativeRange:[Math.max(0,currentIndex-(windowSize-1)),currentIndex],positiveRange:[currentIndex,Math.min(total-1,currentIndex+(windowSize-1))]};}currentIndex=normalizeLoopIndex(currentIndex,total);var negativeRange=[(currentIndex-negativeCount+total)%total,(currentIndex-1+total)%total];var positiveRange=[(currentIndex+total)%total,(currentIndex+positiveCount+total)%total];if(negativeRange[0]<total&&negativeRange[0]>negativeRange[1]){negativeRange[1]=total-1;positiveRange[0]=0;}if(positiveRange[0]>positiveRange[1]){negativeRange[1]=total-1;positiveRange[0]=0;}return{negativeRange:negativeRange,positiveRange:positiveRange};};computeVisibleRanges.__closure={normalizeWindowSize:normalizeWindowSize,normalizeLoopIndex:normalizeLoopIndex};computeVisibleRanges.__workletHash=12590357434072;computeVisibleRanges.__pluginVersion="0.5.2";computeVisibleRanges.__initData=_worklet_12590357434072_init_data;computeVisibleRanges.__stackDetails=_e;return computeVisibleRanges;}({_worklet_12590357434072_init_data:_worklet_12590357434072_init_data,normalizeWindowSize:normalizeWindowSize,normalizeLoopIndex:normalizeLoopIndex});var _worklet_6485309998197_init_data={code:"function useVisibleRangesTsx4(){const{total,computeVisibleRanges,windowSize,loop,viewSize,translation,cachedRanges,isArraysEqual}=this.__closure;if(total<=0){return computeVisibleRanges({total:total,currentIndex:0,windowSize:windowSize,loop:loop});}if(!Number.isFinite(viewSize)||viewSize<=0){return{negativeRange:[0,0],positiveRange:[0,Math.min(total-1,windowSize-1)]};}let currentIndex=Math.round(-translation.value/viewSize);if(!Number.isFinite(currentIndex))currentIndex=0;const newRanges=computeVisibleRanges({total:total,windowSize:windowSize,currentIndex:currentIndex,loop:loop});if(cachedRanges.current&&isArraysEqual(cachedRanges.current.negativeRange,newRanges.negativeRange)&&isArraysEqual(cachedRanges.current.positiveRange,newRanges.positiveRange)){return cachedRanges.current;}cachedRanges.current=newRanges;return newRanges;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx",sourceMap:"{\"version\":3,\"names\":[\"useVisibleRangesTsx4\",\"total\",\"computeVisibleRanges\",\"windowSize\",\"loop\",\"viewSize\",\"translation\",\"cachedRanges\",\"isArraysEqual\",\"__closure\",\"currentIndex\",\"Number\",\"isFinite\",\"negativeRange\",\"positiveRange\",\"Math\",\"min\",\"round\",\"value\",\"newRanges\",\"current\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx\"],\"mappings\":\"AAyGiC,SAAAA,oBAAMA,CAAA,QAAAC,KAAA,CAAAC,oBAAA,CAAAC,UAAA,CAAAC,IAAA,CAAAC,QAAA,CAAAC,WAAA,CAAAC,YAAA,CAAAC,aAAA,OAAAC,SAAA,CACnC,GAAIR,KAAK,EAAI,CAAC,CAAE,CACd,MAAO,CAAAC,oBAAoB,CAAC,CAAED,KAAK,CAALA,KAAK,CAAES,YAAY,CAAE,CAAC,CAAEP,UAAU,CAAVA,UAAU,CAAEC,IAAA,CAAAA,IAAK,CAAC,CAAC,CAC3E,CAGA,GAAI,CAACO,MAAM,CAACC,QAAQ,CAACP,QAAQ,CAAC,EAAIA,QAAQ,EAAI,CAAC,CAAE,CAC/C,MAAO,CACLQ,aAAa,CAAE,CAAC,CAAC,CAAE,CAAC,CAAU,CAC9BC,aAAa,CAAE,CAAC,CAAC,CAAEC,IAAI,CAACC,GAAG,CAACf,KAAK,CAAG,CAAC,CAAEE,UAAU,CAAG,CAAC,CAAC,CACxD,CAAC,CACH,CAEA,GAAI,CAAAO,YAAY,CAAGK,IAAI,CAACE,KAAK,CAAC,CAACX,WAAW,CAACY,KAAK,CAAGb,QAAQ,CAAC,CAC5D,GAAI,CAACM,MAAM,CAACC,QAAQ,CAACF,YAAY,CAAC,CAAEA,YAAY,CAAG,CAAC,CAEpD,KAAM,CAAAS,SAAS,CAAGjB,oBAAoB,CAAC,CAAED,KAAK,CAALA,KAAK,CAAEE,UAAU,CAAVA,UAAU,CAAEO,YAAY,CAAZA,YAAY,CAAEN,IAAA,CAAAA,IAAK,CAAC,CAAC,CAEjF,GACEG,YAAY,CAACa,OAAO,EACpBZ,aAAa,CAACD,YAAY,CAACa,OAAO,CAACP,aAAa,CAAEM,SAAS,CAACN,aAAa,CAAC,EAC1EL,aAAa,CAACD,YAAY,CAACa,OAAO,CAACN,aAAa,CAAEK,SAAS,CAACL,aAAa,CAAC,CAC1E,CACA,MAAO,CAAAP,YAAY,CAACa,OAAO,CAC7B,CAEAb,YAAY,CAACa,OAAO,CAAGD,SAAS,CAChC,MAAO,CAAAA,SAAS,CAClB\",\"ignoreList\":[]}"};function useVisibleRanges(options){var _options$total=options.total,total=_options$total===void 0?0:_options$total,viewSize=options.viewSize,translation=options.translation,_windowSize=options.windowSize,loop=options.loop;var windowSize=normalizeWindowSize(total,_windowSize);var cachedRanges=(0,_react.useRef)(null);var rangesDependencies=(0,_webOnlyDependencies.webOnlyDependencies)([loop,total,windowSize,translation,viewSize]);var ranges=(0,_reactNativeReanimated.useDerivedValue)(function useVisibleRangesTsx4Factory(_ref4){var _worklet_6485309998197_init_data=_ref4._worklet_6485309998197_init_data,total=_ref4.total,computeVisibleRanges=_ref4.computeVisibleRanges,windowSize=_ref4.windowSize,loop=_ref4.loop,viewSize=_ref4.viewSize,translation=_ref4.translation,cachedRanges=_ref4.cachedRanges,isArraysEqual=_ref4.isArraysEqual;var _e=[new global.Error(),-9,-27];var useVisibleRangesTsx4=function useVisibleRangesTsx4(){if(total<=0){return computeVisibleRanges({total:total,currentIndex:0,windowSize:windowSize,loop:loop});}if(!Number.isFinite(viewSize)||viewSize<=0){return{negativeRange:[0,0],positiveRange:[0,Math.min(total-1,windowSize-1)]};}var currentIndex=Math.round(-translation.value/viewSize);if(!Number.isFinite(currentIndex))currentIndex=0;var newRanges=computeVisibleRanges({total:total,windowSize:windowSize,currentIndex:currentIndex,loop:loop});if(cachedRanges.current&&isArraysEqual(cachedRanges.current.negativeRange,newRanges.negativeRange)&&isArraysEqual(cachedRanges.current.positiveRange,newRanges.positiveRange)){return cachedRanges.current;}cachedRanges.current=newRanges;return newRanges;};useVisibleRangesTsx4.__closure={total:total,computeVisibleRanges:computeVisibleRanges,windowSize:windowSize,loop:loop,viewSize:viewSize,translation:translation,cachedRanges:cachedRanges,isArraysEqual:isArraysEqual};useVisibleRangesTsx4.__workletHash=6485309998197;useVisibleRangesTsx4.__pluginVersion="0.5.2";useVisibleRangesTsx4.__initData=_worklet_6485309998197_init_data;useVisibleRangesTsx4.__stackDetails=_e;return useVisibleRangesTsx4;}({_worklet_6485309998197_init_data:_worklet_6485309998197_init_data,total:total,computeVisibleRanges:computeVisibleRanges,windowSize:windowSize,loop:loop,viewSize:viewSize,translation:translation,cachedRanges:cachedRanges,isArraysEqual:isArraysEqual}),rangesDependencies);return ranges;}var _worklet_1694653230246_init_data={code:"function isArraysEqual_useVisibleRangesTsx5(a,b){if(a.length!==b.length)return false;return a.every(function(value,index){return value===b[index];});}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx",sourceMap:"{\"version\":3,\"names\":[\"isArraysEqual_useVisibleRangesTsx5\",\"a\",\"b\",\"length\",\"every\",\"value\",\"index\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/hooks/useVisibleRanges.tsx\"],\"mappings\":\"AA0IA,SAAAA,kCAA0DA,CAAAC,CAAA,CAAAC,CAAA,EAExD,GAAID,CAAC,CAACE,MAAM,GAAKD,CAAC,CAACC,MAAM,CAAE,MAAO,MAAK,CAEvC,MAAO,CAAAF,CAAC,CAACG,KAAK,CAAC,SAACC,KAAK,CAAEC,KAAK,QAAK,CAAAD,KAAK,GAAKH,CAAC,CAACI,KAAK,CAAC,GAAC,CACtD\",\"ignoreList\":[]}"};var isArraysEqual=function isArraysEqual_useVisibleRangesTsx5Factory(_ref5){var _worklet_1694653230246_init_data=_ref5._worklet_1694653230246_init_data;var _e=[new global.Error(),1,-27];var isArraysEqual=function isArraysEqual(a,b){if(a.length!==b.length)return false;return a.every(function(value,index){return value===b[index];});};isArraysEqual.__closure={};isArraysEqual.__workletHash=1694653230246;isArraysEqual.__pluginVersion="0.5.2";isArraysEqual.__initData=_worklet_1694653230246_init_data;isArraysEqual.__stackDetails=_e;return isArraysEqual;}({_worklet_1694653230246_init_data:_worklet_1694653230246_init_data});
|
|
2
2
|
//# sourceMappingURL=useVisibleRanges.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_worklet_857738204961_init_data","code","location","sourceMap","normalizeWindowSize","normalizeWindowSize_useVisibleRangesTsx1Factory","_ref","_e","global","Error","total","windowSize","Number","isFinite","__closure","__workletHash","__pluginVersion","__initData","__stackDetails","_worklet_10467342159726_init_data","normalizeLoopIndex","normalizeLoopIndex_useVisibleRangesTsx2Factory","_ref2","currentIndex","_worklet_12590357434072_init_data","computeVisibleRanges","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_webOnlyDependencies","_worklet_857738204961_init_data","code","location","sourceMap","normalizeWindowSize","exports","normalizeWindowSize_useVisibleRangesTsx1Factory","_ref","_e","global","Error","total","windowSize","Number","isFinite","__closure","__workletHash","__pluginVersion","__initData","__stackDetails","_worklet_10467342159726_init_data","normalizeLoopIndex","normalizeLoopIndex_useVisibleRangesTsx2Factory","_ref2","currentIndex","_worklet_12590357434072_init_data","computeVisibleRanges","computeVisibleRanges_useVisibleRangesTsx3Factory","_ref3","params","_params$total","loop","negativeRange","positiveRange","positiveCount","Math","round","negativeCount","max","min","_worklet_6485309998197_init_data","useVisibleRanges","options","_options$total","viewSize","translation","_windowSize","cachedRanges","useRef","rangesDependencies","webOnlyDependencies","ranges","useDerivedValue","useVisibleRangesTsx4Factory","_ref4","isArraysEqual","useVisibleRangesTsx4","value","newRanges","current","_worklet_1694653230246_init_data","isArraysEqual_useVisibleRangesTsx5Factory","_ref5","a","b","length","every","index"],"sourceRoot":"../../../src","sources":["hooks/useVisibleRanges.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,OAAA,UAEA,IAAAC,sBAAA,CAAAD,OAAA,4BAEA,IAAAE,oBAAA,CAAAF,OAAA,mCAAqE,IAAAG,+BAAA,EAAAC,IAAA,2KAAAC,QAAA,sHAAAC,SAAA,+cAAAC,mBAAA,CAAAC,OAAA,CAAAD,mBAAA,CAW9D,SAAAE,gDAAAC,IAAA,MAAAP,+BAAA,CAAAO,IAAA,CAAAP,+BAAA,KAAAQ,EAAA,MAAAC,MAAA,CAAAC,KAAA,cAAAN,mBAAA,UAAAA,oBAA6BO,KAAa,CAAEC,UAAmB,CAAE,CAGtE,MAAO,OAAO,CAAAA,UAAU,GAAK,QAAQ,EAAIC,MAAM,CAACC,QAAQ,CAACF,UAAU,CAAC,EAAIA,UAAU,CAAG,CAAC,CAClFA,UAAU,CACVD,KAAK,CACX,CAAC,CAAAP,mBAAA,CAAAW,SAAA,IAAAX,mBAAA,CAAAY,aAAA,cAAAZ,mBAAA,CAAAa,eAAA,SAAAb,mBAAA,CAAAc,UAAA,CAAAlB,+BAAA,CAAAI,mBAAA,CAAAe,cAAA,CAAAX,EAAA,QAAAJ,mBAAA,EANM,EAAAJ,+BAAA,CAAAA,+BAAA,OAAAoB,iCAAA,EAAAnB,IAAA,sIAAAC,QAAA,sHAAAC,SAAA,+YAAAkB,kBAAA,CAQP,SAAAC,+CAAAC,KAAA,MAAAH,iCAAA,CAAAG,KAAA,CAAAH,iCAAA,KAAAZ,EAAA,MAAAC,MAAA,CAAAC,KAAA,cAAAW,kBAAA,UAAAA,mBAA4BG,YAAoB,CAAEb,KAAa,CAAE,CAG/D,MAAO,CAAAa,YAAY,CAAG,CAAC,CAA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AAZA,YAAY,CACZQ,aAAa,CAAbA,aAAa,GAQdN,kBAAkB,CAAC,CAEtB,MAAO,CAAAE,MAAM,CACf,CAAC,IAAAS,gCAAA,EAAA3D,IAAA,0JAAAC,QAAA,sHAAAC,SAAA,qgBAAAoD,aAAA,CAED,SAAAM,0CAAAC,KAAA,MAAAF,gCAAA,CAAAE,KAAA,CAAAF,gCAAA,KAAApD,EAAA,MAAAC,MAAA,CAAAC,KAAA,cAAA6C,aAAA,UAAAA,cAAuBQ,CAAW,CAAEC,CAAW,CAAW,CAExD,GAAID,CAAC,CAACE,MAAM,GAAKD,CAAC,CAACC,MAAM,CAAE,MAAO,MAAK,CAEvC,MAAO,CAAAF,CAAC,CAACG,KAAK,CAAC,SAACT,KAAK,CAAEU,KAAK,QAAK,CAAAV,KAAK,GAAKO,CAAC,CAACG,KAAK,CAAC,GAAC,CACtD,CAAC,CAAAZ,aAAA,CAAAxC,SAAA,IAAAwC,aAAA,CAAAvC,aAAA,eAAAuC,aAAA,CAAAtC,eAAA,SAAAsC,aAAA,CAAArC,UAAA,CAAA0C,gCAAA,CAAAL,aAAA,CAAApC,cAAA,CAAAX,EAAA,QAAA+C,aAAA,EALD,EAAAK,gCAAA,CAAAA,gCAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.normalLayout=normalLayout;var _reactNativeReanimated=require("react-native-reanimated");var _carouselDirection=require("../utils/carousel-direction");var _worklet_7638690459455_init_data={code:"function normalTs1(value){const{interpolate,size,isVertical,toPhysicalHorizontalValue,directionSign}=this.__closure;const logicalTranslate=interpolate(value,[-1,0,1],[-size,0,size]);const translate=isVertical?logicalTranslate:toPhysicalHorizontalValue(logicalTranslate,directionSign);return{transform:[isVertical?{translateY:translate}:{translateX:translate}]};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/layouts/normal.ts",sourceMap:"{\"version\":3,\"names\":[\"normalTs1\",\"value\",\"interpolate\",\"size\",\"isVertical\",\"toPhysicalHorizontalValue\",\"directionSign\",\"__closure\",\"logicalTranslate\",\"translate\",\"transform\",\"translateY\",\"translateX\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/layouts/normal.ts\"],\"mappings\":\"
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.normalLayout=normalLayout;var _reactNativeReanimated=require("react-native-reanimated");var _carouselDirection=require("../utils/carousel-direction");var _worklet_7638690459455_init_data={code:"function normalTs1(value){const{interpolate,size,isVertical,toPhysicalHorizontalValue,directionSign}=this.__closure;const logicalTranslate=interpolate(value,[-1,0,1],[-size,0,size]);const translate=isVertical?logicalTranslate:toPhysicalHorizontalValue(logicalTranslate,directionSign);return{transform:[isVertical?{translateY:translate}:{translateX:translate}]};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/layouts/normal.ts",sourceMap:"{\"version\":3,\"names\":[\"normalTs1\",\"value\",\"interpolate\",\"size\",\"isVertical\",\"toPhysicalHorizontalValue\",\"directionSign\",\"__closure\",\"logicalTranslate\",\"translate\",\"transform\",\"translateY\",\"translateX\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/layouts/normal.ts\"],\"mappings\":\"AAaS,QAAC,CAAAA,SAA6BA,CAAAC,KAAA,QAAAC,WAAA,CAAAC,IAAA,CAAAC,UAAA,CAAAC,yBAAA,CAAAC,aAAA,OAAAC,SAAA,CAEnC,KAAM,CAAAC,gBAAgB,CAAGN,WAAW,CAACD,KAAK,CAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAACE,IAAI,CAAE,CAAC,CAAEA,IAAI,CAAC,CAAC,CACzE,KAAM,CAAAM,SAAS,CAAGL,UAAU,CACxBI,gBAAgB,CAChBH,yBAAyB,CAACG,gBAAgB,CAAEF,aAAa,CAAC,CAE9D,MAAO,CACLI,SAAS,CAAE,CACTN,UAAU,CACN,CACEO,UAAU,CAAEF,SACd,CAAC,CACD,CACEG,UAAU,CAAEH,SACd,CAAC,CAET,CAAC,CACH\",\"ignoreList\":[]}"};function normalLayout(opts){var size=opts.size,isVertical=opts.isVertical,directionSign=opts.directionSign;return function normalTs1Factory(_ref){var _worklet_7638690459455_init_data=_ref._worklet_7638690459455_init_data,interpolate=_ref.interpolate,size=_ref.size,isVertical=_ref.isVertical,toPhysicalHorizontalValue=_ref.toPhysicalHorizontalValue,directionSign=_ref.directionSign;var _e=[new global.Error(),-6,-27];var normalTs1=function normalTs1(value){var logicalTranslate=interpolate(value,[-1,0,1],[-size,0,size]);var translate=isVertical?logicalTranslate:toPhysicalHorizontalValue(logicalTranslate,directionSign);return{transform:[isVertical?{translateY:translate}:{translateX:translate}]};};normalTs1.__closure={interpolate:interpolate,size:size,isVertical:isVertical,toPhysicalHorizontalValue:toPhysicalHorizontalValue,directionSign:directionSign};normalTs1.__workletHash=7638690459455;normalTs1.__pluginVersion="0.5.2";normalTs1.__initData=_worklet_7638690459455_init_data;normalTs1.__stackDetails=_e;return normalTs1;}({_worklet_7638690459455_init_data:_worklet_7638690459455_init_data,interpolate:_reactNativeReanimated.interpolate,size:size,isVertical:isVertical,toPhysicalHorizontalValue:_carouselDirection.toPhysicalHorizontalValue,directionSign:directionSign});}
|
|
2
2
|
//# sourceMappingURL=normal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_carouselDirection","_worklet_7638690459455_init_data","code","location","sourceMap","normalLayout","opts","size","isVertical","directionSign","normalTs1Factory","_ref","interpolate","toPhysicalHorizontalValue","_e","global","Error","normalTs1","value","logicalTranslate","translate","transform","translateY","translateX","__closure","__workletHash","__pluginVersion","__initData","__stackDetails"],"sourceRoot":"../../../src","sources":["layouts/normal.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_carouselDirection","_worklet_7638690459455_init_data","code","location","sourceMap","normalLayout","opts","size","isVertical","directionSign","normalTs1Factory","_ref","interpolate","toPhysicalHorizontalValue","_e","global","Error","normalTs1","value","logicalTranslate","translate","transform","translateY","translateX","__closure","__workletHash","__pluginVersion","__initData","__stackDetails"],"sourceRoot":"../../../src","sources":["layouts/normal.ts"],"mappings":"2FACA,IAAAA,sBAAA,CAAAC,OAAA,4BAGA,IAAAC,kBAAA,CAAAD,OAAA,gCAAwE,IAAAE,gCAAA,EAAAC,IAAA,8WAAAC,QAAA,6GAAAC,SAAA,+0BAEjE,QAAS,CAAAC,YAAYA,CAACC,IAI5B,CAAE,CACD,GAAQ,CAAAC,IAAI,CAAgCD,IAAI,CAAxCC,IAAI,CAAEC,UAAU,CAAoBF,IAAI,CAAlCE,UAAU,CAAEC,aAAa,CAAKH,IAAI,CAAtBG,aAAa,CAEvC,MAAO,UAAAC,iBAAAC,IAAA,MAAAV,gCAAA,CAAAU,IAAA,CAAAV,gCAAA,CAEoBW,WAAW,CAAAD,IAAA,CAAXC,WAAW,CAAsBL,IAAI,CAAAI,IAAA,CAAJJ,IAAI,CAC5CC,UAAU,CAAAG,IAAA,CAAVH,UAAU,CAExBK,yBAAyB,CAAAF,IAAA,CAAzBE,yBAAyB,CAAmBJ,aAAa,CAAAE,IAAA,CAAbF,aAAa,KAAAK,EAAA,MAAAC,MAAA,CAAAC,KAAA,eAAAC,SAAA,UAAAA,UALvDC,KAAa,CAAgB,CAEnC,GAAM,CAAAC,gBAAgB,CAAGP,WAAW,CAACM,KAAK,CAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAACX,IAAI,CAAE,CAAC,CAAEA,IAAI,CAAC,CAAC,CACzE,GAAM,CAAAa,SAAS,CAAGZ,UAAU,CACxBW,gBAAgB,CAChBN,yBAAyB,CAACM,gBAAgB,CAAEV,aAAa,CAAC,CAE9D,MAAO,CACLY,SAAS,CAAE,CACTb,UAAU,CACN,CACEc,UAAU,CAAEF,SACd,CAAC,CACD,CACEG,UAAU,CAAEH,SACd,CAAC,CAET,CAAC,CACH,CAAC,CAAAH,SAAA,CAAAO,SAAA,EAhB0BZ,WAAW,CAAXA,WAAW,CAAsBL,IAAI,CAAJA,IAAI,CAC5CC,UAAU,CAAVA,UAAU,CAExBK,yBAAyB,CAAzBA,yBAAyB,CAAmBJ,aAAa,CAAbA,aAAa,EAAAQ,SAAA,CAAAQ,aAAA,eAAAR,SAAA,CAAAS,eAAA,SAAAT,SAAA,CAAAU,UAAA,CAAA1B,gCAAA,CAAAgB,SAAA,CAAAW,cAAA,CAAAd,EAAA,QAAAG,SAAA,EALxD,EAAAhB,gCAAA,CAAAA,gCAAA,CAEoBW,WAAW,CAAXA,kCAAW,CAAsBL,IAAI,CAAJA,IAAI,CAC5CC,UAAU,CAAVA,UAAU,CAExBK,yBAAyB,CAAzBA,4CAAyB,CAAmBJ,aAAa,CAAbA,aAAa,GAcjE","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.parallaxLayout=parallaxLayout;var _reactNativeReanimated=require("react-native-reanimated");var _carouselDirection=require("../utils/carousel-direction");var _worklet_2826200380736_init_data={code:"function parallaxTs1(relativeProgress){const{interpolate,size,offset,isVertical,toPhysicalHorizontalValue,directionSign,Extrapolation,adjacentScale,scale}=this.__closure;const logicalTranslate=interpolate(relativeProgress,[-1,0,1],[-size+offset,0,size-offset]);const translate=isVertical?logicalTranslate:toPhysicalHorizontalValue(logicalTranslate,directionSign);const zIndex=Math.round(interpolate(relativeProgress,[-1,0,1],[0,size,0],Extrapolation.CLAMP));const animatedScale=interpolate(relativeProgress,[-1,0,1],[adjacentScale,scale,adjacentScale],Extrapolation.CLAMP);return{transform:[isVertical?{translateY:translate}:{translateX:translate},{scale:animatedScale}],zIndex:zIndex};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/layouts/parallax.ts",sourceMap:"{\"version\":3,\"names\":[\"parallaxTs1\",\"relativeProgress\",\"interpolate\",\"size\",\"offset\",\"isVertical\",\"toPhysicalHorizontalValue\",\"directionSign\",\"Extrapolation\",\"adjacentScale\",\"scale\",\"__closure\",\"logicalTranslate\",\"translate\",\"zIndex\",\"Math\",\"round\",\"CLAMP\",\"animatedScale\",\"transform\",\"translateY\",\"translateX\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/layouts/parallax.ts\"],\"mappings\":\"
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.parallaxLayout=parallaxLayout;var _reactNativeReanimated=require("react-native-reanimated");var _carouselDirection=require("../utils/carousel-direction");var _worklet_2826200380736_init_data={code:"function parallaxTs1(relativeProgress){const{interpolate,size,offset,isVertical,toPhysicalHorizontalValue,directionSign,Extrapolation,adjacentScale,scale}=this.__closure;const logicalTranslate=interpolate(relativeProgress,[-1,0,1],[-size+offset,0,size-offset]);const translate=isVertical?logicalTranslate:toPhysicalHorizontalValue(logicalTranslate,directionSign);const zIndex=Math.round(interpolate(relativeProgress,[-1,0,1],[0,size,0],Extrapolation.CLAMP));const animatedScale=interpolate(relativeProgress,[-1,0,1],[adjacentScale,scale,adjacentScale],Extrapolation.CLAMP);return{transform:[isVertical?{translateY:translate}:{translateX:translate},{scale:animatedScale}],zIndex:zIndex};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/layouts/parallax.ts",sourceMap:"{\"version\":3,\"names\":[\"parallaxTs1\",\"relativeProgress\",\"interpolate\",\"size\",\"offset\",\"isVertical\",\"toPhysicalHorizontalValue\",\"directionSign\",\"Extrapolation\",\"adjacentScale\",\"scale\",\"__closure\",\"logicalTranslate\",\"translate\",\"zIndex\",\"Math\",\"round\",\"CLAMP\",\"animatedScale\",\"transform\",\"translateY\",\"translateX\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/layouts/parallax.ts\"],\"mappings\":\"AAoBS,QAAC,CAAAA,YAAAC,gBAAwC,QAAAC,WAAA,CAAAC,IAAA,CAAAC,MAAA,CAAAC,UAAA,CAAAC,yBAAA,CAAAC,aAAA,CAAAC,aAAA,CAAAC,aAAA,CAAAC,KAAA,OAAAC,SAAA,CAE9C,KAAM,CAAAC,gBAAgB,CAAGV,WAAW,CAClCD,gBAAgB,CAChB,CAAC,CAAC,CAAC,CAAE,CAAC,CAAE,CAAC,CAAC,CACV,CAAC,CAACE,IAAI,CAAGC,MAAM,CAAE,CAAC,CAAED,IAAI,CAAGC,MAAM,CACnC,CAAC,CACD,KAAM,CAAAS,SAAS,CAAGR,UAAU,CACxBO,gBAAgB,CAChBN,yBAAyB,CAACM,gBAAgB,CAAEL,aAAa,CAAC,CAE9D,KAAM,CAAAO,MAAM,CAAGC,IAAI,CAACC,KAAK,CACvBd,WAAW,CAACD,gBAAgB,CAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAEE,IAAI,CAAE,CAAC,CAAC,CAAEK,aAAa,CAACS,KAAK,CAC7E,CAAC,CAED,KAAM,CAAAC,aAAa,CAAGhB,WAAW,CAC/BD,gBAAgB,CAChB,CAAC,CAAC,CAAC,CAAE,CAAC,CAAE,CAAC,CAAC,CACV,CAACQ,aAAa,CAAEC,KAAK,CAAED,aAAa,CAAC,CACrCD,aAAa,CAACS,KAChB,CAAC,CAED,MAAO,CACLE,SAAS,CAAE,CACTd,UAAU,CAAG,CAAEe,UAAU,CAAEP,SAAU,CAAC,CAAG,CAAEQ,UAAU,CAAER,SAAU,CAAC,CAClE,CAAEH,KAAK,CAAEQ,aAAc,CAAC,CACzB,CACDJ,MAAA,CAAAA,MACF,CAAC,CACH\",\"ignoreList\":[]}"};function parallaxLayout(baseConfig,config){var size=baseConfig.size,isVertical=baseConfig.isVertical,directionSign=baseConfig.directionSign;var _config$offset=config.offset,offset=_config$offset===void 0?100:_config$offset,_config$scale=config.scale,scale=_config$scale===void 0?0.8:_config$scale,_config$adjacentScale=config.adjacentScale,adjacentScale=_config$adjacentScale===void 0?scale**2:_config$adjacentScale;return function parallaxTs1Factory(_ref){var _worklet_2826200380736_init_data=_ref._worklet_2826200380736_init_data,interpolate=_ref.interpolate,size=_ref.size,offset=_ref.offset,isVertical=_ref.isVertical,toPhysicalHorizontalValue=_ref.toPhysicalHorizontalValue,directionSign=_ref.directionSign,Extrapolation=_ref.Extrapolation,adjacentScale=_ref.adjacentScale,scale=_ref.scale;var _e=[new global.Error(),-10,-27];var parallaxTs1=function parallaxTs1(relativeProgress){var logicalTranslate=interpolate(relativeProgress,[-1,0,1],[-size+offset,0,size-offset]);var translate=isVertical?logicalTranslate:toPhysicalHorizontalValue(logicalTranslate,directionSign);var zIndex=Math.round(interpolate(relativeProgress,[-1,0,1],[0,size,0],Extrapolation.CLAMP));var animatedScale=interpolate(relativeProgress,[-1,0,1],[adjacentScale,scale,adjacentScale],Extrapolation.CLAMP);return{transform:[isVertical?{translateY:translate}:{translateX:translate},{scale:animatedScale}],zIndex:zIndex};};parallaxTs1.__closure={interpolate:interpolate,size:size,offset:offset,isVertical:isVertical,toPhysicalHorizontalValue:toPhysicalHorizontalValue,directionSign:directionSign,Extrapolation:Extrapolation,adjacentScale:adjacentScale,scale:scale};parallaxTs1.__workletHash=2826200380736;parallaxTs1.__pluginVersion="0.5.2";parallaxTs1.__initData=_worklet_2826200380736_init_data;parallaxTs1.__stackDetails=_e;return parallaxTs1;}({_worklet_2826200380736_init_data:_worklet_2826200380736_init_data,interpolate:_reactNativeReanimated.interpolate,size:size,offset:offset,isVertical:isVertical,toPhysicalHorizontalValue:_carouselDirection.toPhysicalHorizontalValue,directionSign:directionSign,Extrapolation:_reactNativeReanimated.Extrapolation,adjacentScale:adjacentScale,scale:scale});}
|
|
2
2
|
//# sourceMappingURL=parallax.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_carouselDirection","_worklet_2826200380736_init_data","code","location","sourceMap","parallaxLayout","baseConfig","config","size","isVertical","directionSign","_config$offset","offset","_config$scale","scale","_config$adjacentScale","adjacentScale","parallaxTs1Factory","_ref","interpolate","toPhysicalHorizontalValue","Extrapolation","_e","global","Error","parallaxTs1","relativeProgress","logicalTranslate","translate","zIndex","Math","round","CLAMP","animatedScale","transform","translateY","translateX","__closure","__workletHash","__pluginVersion","__initData","__stackDetails"],"sourceRoot":"../../../src","sources":["layouts/parallax.ts"],"mappings":"+
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_carouselDirection","_worklet_2826200380736_init_data","code","location","sourceMap","parallaxLayout","baseConfig","config","size","isVertical","directionSign","_config$offset","offset","_config$scale","scale","_config$adjacentScale","adjacentScale","parallaxTs1Factory","_ref","interpolate","toPhysicalHorizontalValue","Extrapolation","_e","global","Error","parallaxTs1","relativeProgress","logicalTranslate","translate","zIndex","Math","round","CLAMP","animatedScale","transform","translateY","translateX","__closure","__workletHash","__pluginVersion","__initData","__stackDetails"],"sourceRoot":"../../../src","sources":["layouts/parallax.ts"],"mappings":"+FACA,IAAAA,sBAAA,CAAAC,OAAA,4BAIA,IAAAC,kBAAA,CAAAD,OAAA,gCAAwE,IAAAE,gCAAA,EAAAC,IAAA,mrBAAAC,QAAA,+GAAAC,SAAA,26CAIjE,QAAS,CAAAC,cAAcA,CAC5BC,UAIC,CACDC,MAAsB,CACtB,CACA,GAAQ,CAAAC,IAAI,CAAgCF,UAAU,CAA9CE,IAAI,CAAEC,UAAU,CAAoBH,UAAU,CAAxCG,UAAU,CAAEC,aAAa,CAAKJ,UAAU,CAA5BI,aAAa,CACvC,IAAAC,cAAA,CAAkEJ,MAAM,CAAhEK,MAAM,CAANA,MAAM,CAAAD,cAAA,UAAG,GAAG,CAAAA,cAAA,CAAAE,aAAA,CAA8CN,MAAM,CAAlDO,KAAK,CAALA,KAAK,CAAAD,aAAA,UAAG,GAAG,CAAAA,aAAA,CAAAE,qBAAA,CAAiCR,MAAM,CAArCS,aAAa,CAAbA,aAAa,CAAAD,qBAAA,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,CAAEF,KAAK,CAAEE,aAAa,CAAC,CACrCK,aAAa,CAACW,KAChB,CAAC,CAED,MAAO,CACLE,SAAS,CAAE,CACTzB,UAAU,CAAG,CAAE0B,UAAU,CAAEP,SAAU,CAAC,CAAG,CAAEQ,UAAU,CAAER,SAAU,CAAC,CAClE,CAAEd,KAAK,CAAEmB,aAAc,CAAC,CACzB,CACDJ,MAAM,CAANA,MACF,CAAC,CACH,CAAC,CAAAJ,WAAA,CAAAY,SAAA,EA3B0BlB,WAAW,CAAXA,WAAW,CAGhCX,IAAI,CAAJA,IAAI,CAAGI,MAAM,CAANA,MAAM,CAECH,UAAU,CAAVA,UAAU,CAExBW,yBAAyB,CAAzBA,yBAAyB,CAAmBV,aAAa,CAAbA,aAAa,CAGHW,aAAa,CAAbA,aAAa,CAMpEL,aAAa,CAAbA,aAAa,CAAEF,KAAK,CAALA,KAAK,EAAAW,WAAA,CAAAa,aAAA,eAAAb,WAAA,CAAAc,eAAA,SAAAd,WAAA,CAAAe,UAAA,CAAAvC,gCAAA,CAAAwB,WAAA,CAAAgB,cAAA,CAAAnB,EAAA,QAAAG,WAAA,EAlBlB,EAAAxB,gCAAA,CAAAA,gCAAA,CAEoBkB,WAAW,CAAXA,kCAAW,CAGhCX,IAAI,CAAJA,IAAI,CAAGI,MAAM,CAANA,MAAM,CAECH,UAAU,CAAVA,UAAU,CAExBW,yBAAyB,CAAzBA,4CAAyB,CAAmBV,aAAa,CAAbA,aAAa,CAGHW,aAAa,CAAbA,oCAAa,CAMpEL,aAAa,CAAbA,aAAa,CAAEF,KAAK,CAALA,KAAK,GAY3B","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.webOnlyDependencies=webOnlyDependencies;var _reactNative=require("react-native");function webOnlyDependencies(dependencies){return _reactNative.Platform.OS==="web"?dependencies:undefined;}
|
|
2
|
+
//# sourceMappingURL=web-only-dependencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","webOnlyDependencies","dependencies","Platform","OS","undefined"],"sourceRoot":"../../../src","sources":["utils/web-only-dependencies.ts"],"mappings":"yGAAA,IAAAA,YAAA,CAAAC,OAAA,iBAOO,QAAS,CAAAC,mBAAmBA,CAAsBC,YAAe,CAAiB,CACvF,MAAO,CAAAC,qBAAQ,CAACC,EAAE,GAAK,KAAK,CAAGF,YAAY,CAAGG,SAAS,CACzD","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["opacity","transform"];var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx";import React from"react";import{StyleSheet,View}from"react-native";import{useAnimatedReaction,useAnimatedStyle,useDerivedValue}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{useAutoPlay}from"../hooks/useAutoPlay";import{useCarouselController}from"../hooks/useCarouselController";import{useLayoutConfig}from"../hooks/useLayoutConfig";import{useOnProgressChange}from"../hooks/useOnProgressChange";import{useGlobalState}from"../store";import{ItemRenderer}from"./ItemRenderer";import{ScrollViewGesture}from"./ScrollViewGesture";import{jsx as _jsx}from"react/jsx-runtime";var _worklet_7095469822190_init_data={code:"function resolveCarouselLayoutStyle_CarouselLayoutTsx1(params){const{flattenedStyle:flattenedStyle,isVertical:isVertical,measuredSize:measuredSize,sizeExplicit:sizeExplicit}=params;const{width:width,height:height}=flattenedStyle;const resolvedMainAxisSize=measuredSize||\"100%\";return{width:width!==null&&width!==void 0?width:isVertical?\"100%\":sizeExplicit?resolvedMainAxisSize:\"100%\",height:height!==null&&height!==void 0?height:isVertical?sizeExplicit?resolvedMainAxisSize:\"100%\":\"100%\"};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"resolveCarouselLayoutStyle_CarouselLayoutTsx1\",\"params\",\"flattenedStyle\",\"isVertical\",\"measuredSize\",\"sizeExplicit\",\"width\",\"height\",\"resolvedMainAxisSize\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"],\"mappings\":\"AAaO,SAAAA,6CAKJA,CAAAC,MAAA,EAGD,KAAM,CAAEC,cAAc,CAAdA,cAAc,CAAEC,UAAU,CAAVA,UAAU,CAAEC,YAAY,CAAZA,YAAY,CAAEC,YAAA,CAAAA,YAAa,CAAC,CAAGJ,MAAM,CACzE,KAAM,CAAEK,KAAK,CAALA,KAAK,CAAEC,MAAA,CAAAA,MAAO,CAAC,CAAGL,cAAc,CACxC,KAAM,CAAAM,oBAAoB,CAAGJ,YAAY,EAAI,MAAM,CAEnD,MAAO,CACLE,KAAK,CAAEA,KAAK,SAALA,KAAK,UAALA,KAAK,CAAKH,UAAU,CAAG,MAAM,CAAGE,YAAY,CAAGG,oBAAoB,CAAG,MAAO,CACpFD,MAAM,CAAEA,MAAM,SAANA,MAAM,UAANA,MAAM,CAAKJ,UAAU,CAAIE,YAAY,CAAGG,oBAAoB,CAAG,MAAM,CAAI,MACnF,CAAC,CACH\",\"ignoreList\":[]}"};export var resolveCarouselLayoutStyle=function resolveCarouselLayoutStyle_CarouselLayoutTsx1Factory(_ref){var _worklet_7095469822190_init_data=_ref._worklet_7095469822190_init_data;var _e=[new global.Error(),1,-27];var resolveCarouselLayoutStyle=function resolveCarouselLayoutStyle(params){var flattenedStyle=params.flattenedStyle,isVertical=params.isVertical,measuredSize=params.measuredSize,sizeExplicit=params.sizeExplicit;var width=flattenedStyle.width,height=flattenedStyle.height;var resolvedMainAxisSize=measuredSize||"100%";return{width:width!=null?width:isVertical?"100%":sizeExplicit?resolvedMainAxisSize:"100%",height:height!=null?height:isVertical?sizeExplicit?resolvedMainAxisSize:"100%":"100%"};};resolveCarouselLayoutStyle.__closure={};resolveCarouselLayoutStyle.__workletHash=7095469822190;resolveCarouselLayoutStyle.__pluginVersion="0.5.2";resolveCarouselLayoutStyle.__initData=_worklet_7095469822190_init_data;resolveCarouselLayoutStyle.__stackDetails=_e;return resolveCarouselLayoutStyle;}({_worklet_7095469822190_init_data:_worklet_7095469822190_init_data});var _worklet_10669107750071_init_data={code:"function CarouselLayoutTsx2(){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\"&¤tSize>0;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"CarouselLayoutTsx2\",\"resolvedSize\",\"sizePhase\",\"__closure\",\"_resolvedSize$value\",\"currentSize\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"],\"mappings\":\"AAoEsC,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_4752441846675_init_data={code:"function CarouselLayoutTsx3(){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\":[\"CarouselLayoutTsx3\",\"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\":\"AAyEkC,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_11542262309628_init_data={code:"function CarouselLayoutTsx4(){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\":[\"CarouselLayoutTsx4\",\"isSizeReady\",\"__closure\",\"ready\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"],\"mappings\":\"AAiII,SAAAA,mBAAA,QAAAC,WAAA,OAAAC,SAAA,OAAO,CAAEC,KAAK,CAAEF,WAAW,CAACG,KAAM,CAAC\",\"ignoreList\":[]}"};var _worklet_12793803422950_init_data={code:"function CarouselLayoutTsx5(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\":[\"CarouselLayoutTsx5\",\"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\":\"AAkII,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_12755254666556_init_data={code:"function CarouselLayoutTsx6(){const{resolvedSize,resolveCarouselLayoutStyle,flattenedStyle,isVertical,sizeExplicit,isSizeReady}=this.__closure;var _resolvedSize$value;const measuredSize=(_resolvedSize$value=resolvedSize.value)!==null&&_resolvedSize$value!==void 0?_resolvedSize$value:0;const{width:width,height:height}=resolveCarouselLayoutStyle({flattenedStyle:flattenedStyle,isVertical:isVertical,measuredSize:measuredSize,sizeExplicit:sizeExplicit});return{width:width,height:height,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\":[\"CarouselLayoutTsx6\",\"resolvedSize\",\"resolveCarouselLayoutStyle\",\"flattenedStyle\",\"isVertical\",\"sizeExplicit\",\"isSizeReady\",\"__closure\",\"_resolvedSize$value\",\"measuredSize\",\"value\",\"width\",\"height\",\"opacity\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"],\"mappings\":\"AAgKuC,SAAAA,kBAAMA,CAAA,QAAAC,YAAA,CAAAC,0BAAA,CAAAC,cAAA,CAAAC,UAAA,CAAAC,YAAA,CAAAC,WAAA,OAAAC,SAAA,KAAAC,mBAAA,CACzC,KAAM,CAAAC,YAAY,EAAAD,mBAAA,CAAGP,YAAY,CAACS,KAAK,UAAAF,mBAAA,UAAAA,mBAAA,CAAI,CAAC,CAC5C,KAAM,CAAEG,KAAK,CAALA,KAAK,CAAEC,MAAA,CAAAA,MAAO,CAAC,CAAGV,0BAA0B,CAAC,CACnDC,cAAc,CAAdA,cAAc,CACdC,UAAU,CAAVA,UAAU,CACVK,YAAY,CAAZA,YAAY,CACZJ,YAAA,CAAAA,YACF,CAAC,CAAC,CAEF,MAAO,CACLM,KAAK,CAALA,KAAK,CACLC,MAAM,CAANA,MAAM,CACNC,OAAO,CAAEP,WAAW,CAACI,KAAK,CAAG,CAAC,CAAG,CACnC,CAAC,CACH\",\"ignoreList\":[]}"};export var CarouselLayout=React.forwardRef(function(_props,ref){var _useGlobalState=useGlobalState(),props=_useGlobalState.props,common=_useGlobalState.common;var testID=props.testID,loop=props.loop,autoFillData=props.autoFillData,data=props.data,rawData=props.rawData,dataLength=props.dataLength,rawDataLength=props.rawDataLength,layout=props.layout,style=props.style,contentContainerStyle=props.contentContainerStyle,orientation=props.orientation,autoplay=props.autoplay,renderWindowSize=props.renderWindowSize,autoplayDirection=props.autoplayDirection,autoplayInterval=props.autoplayInterval,animation=props.animation,renderItem=props.renderItem,onSnapToItem=props.onSnapToItem,onScrollStart=props.onScrollStart,onProgressChange=props.onProgressChange,progress=props.progress,itemAnimation=props.itemAnimation,defaultIndex=props.defaultIndex,keyExtractor=props.keyExtractor;var isVertical=orientation==="vertical";var size=common.size,handlerOffset=common.handlerOffset,resolvedSize=common.resolvedSize,sizePhase=common.sizePhase,sizeExplicit=common.sizeExplicit;var layoutConfig=useLayoutConfig(Object.assign({},props,{size:size}));var isSizeReady=useDerivedValue(function CarouselLayoutTsx2Factory(_ref2){var _worklet_10669107750071_init_data=_ref2._worklet_10669107750071_init_data,resolvedSize=_ref2.resolvedSize,sizePhase=_ref2.sizePhase;var _e=[new global.Error(),-3,-27];var CarouselLayoutTsx2=function CarouselLayoutTsx2(){var _resolvedSize$value;var currentSize=(_resolvedSize$value=resolvedSize.value)!=null?_resolvedSize$value:0;return sizePhase.value==="ready"&¤tSize>0;};CarouselLayoutTsx2.__closure={resolvedSize:resolvedSize,sizePhase:sizePhase};CarouselLayoutTsx2.__workletHash=10669107750071;CarouselLayoutTsx2.__pluginVersion="0.5.2";CarouselLayoutTsx2.__initData=_worklet_10669107750071_init_data;CarouselLayoutTsx2.__stackDetails=_e;return CarouselLayoutTsx2;}({_worklet_10669107750071_init_data:_worklet_10669107750071_init_data,resolvedSize:resolvedSize,sizePhase:sizePhase}),[resolvedSize,sizePhase]);var offsetX=useDerivedValue(function CarouselLayoutTsx3Factory(_ref3){var _worklet_4752441846675_init_data=_ref3._worklet_4752441846675_init_data,resolvedSize=_ref3.resolvedSize,dataLength=_ref3.dataLength,handlerOffset=_ref3.handlerOffset,loop=_ref3.loop;var _e=[new global.Error(),-5,-27];var CarouselLayoutTsx3=function CarouselLayoutTsx3(){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;};CarouselLayoutTsx3.__closure={resolvedSize:resolvedSize,dataLength:dataLength,handlerOffset:handlerOffset,loop:loop};CarouselLayoutTsx3.__workletHash=4752441846675;CarouselLayoutTsx3.__pluginVersion="0.5.2";CarouselLayoutTsx3.__initData=_worklet_4752441846675_init_data;CarouselLayoutTsx3.__stackDetails=_e;return CarouselLayoutTsx3;}({_worklet_4752441846675_init_data:_worklet_4752441846675_init_data,resolvedSize:resolvedSize,dataLength:dataLength,handlerOffset:handlerOffset,loop:loop}),[loop,dataLength,handlerOffset,resolvedSize]);useOnProgressChange({loop:loop,offset:handlerOffset,progress:progress,size:size,sizeReady:isSizeReady,rawDataLength:rawDataLength,onProgressChange:onProgressChange});var _onScrollEnd=React.useCallback(function(realIndex){if(onSnapToItem)onSnapToItem(realIndex);},[onSnapToItem]);var carouselController=useCarouselController({ref:ref,loop:loop,size:size,dataLength:dataLength,rawDataLength:rawDataLength,handlerOffset:handlerOffset,animation:animation,defaultIndex:defaultIndex,onMovementEnd:_onScrollEnd,onScrollStart:onScrollStart});var _useAutoPlay=useAutoPlay({autoplay:autoplay,autoplayDirection:autoplayDirection,autoplayInterval:autoplayInterval,carouselController:carouselController}),startAutoPlay=_useAutoPlay.start,pauseAutoPlay=_useAutoPlay.pause,triggerAutoPlay=_useAutoPlay.trigger;useAnimatedReaction(function CarouselLayoutTsx4Factory(_ref4){var _worklet_11542262309628_init_data=_ref4._worklet_11542262309628_init_data,isSizeReady=_ref4.isSizeReady;var _e=[new global.Error(),-2,-27];var CarouselLayoutTsx4=function CarouselLayoutTsx4(){return{ready:isSizeReady.value};};CarouselLayoutTsx4.__closure={isSizeReady:isSizeReady};CarouselLayoutTsx4.__workletHash=11542262309628;CarouselLayoutTsx4.__pluginVersion="0.5.2";CarouselLayoutTsx4.__initData=_worklet_11542262309628_init_data;CarouselLayoutTsx4.__stackDetails=_e;return CarouselLayoutTsx4;}({_worklet_11542262309628_init_data:_worklet_11542262309628_init_data,isSizeReady:isSizeReady}),function CarouselLayoutTsx5Factory(_ref5){var _worklet_12793803422950_init_data=_ref5._worklet_12793803422950_init_data,autoplay=_ref5.autoplay,scheduleOnRN=_ref5.scheduleOnRN,triggerAutoPlay=_ref5.triggerAutoPlay,pauseAutoPlay=_ref5.pauseAutoPlay;var _e=[new global.Error(),-5,-27];var CarouselLayoutTsx5=function CarouselLayoutTsx5(state,previous){if(!autoplay)return;if(state.ready===(previous==null?void 0:previous.ready))return;if(state.ready)scheduleOnRN(triggerAutoPlay);else scheduleOnRN(pauseAutoPlay);};CarouselLayoutTsx5.__closure={autoplay:autoplay,scheduleOnRN:scheduleOnRN,triggerAutoPlay:triggerAutoPlay,pauseAutoPlay:pauseAutoPlay};CarouselLayoutTsx5.__workletHash=12793803422950;CarouselLayoutTsx5.__pluginVersion="0.5.2";CarouselLayoutTsx5.__initData=_worklet_12793803422950_init_data;CarouselLayoutTsx5.__stackDetails=_e;return CarouselLayoutTsx5;}({_worklet_12793803422950_init_data:_worklet_12793803422950_init_data,autoplay:autoplay,scheduleOnRN:scheduleOnRN,triggerAutoPlay:triggerAutoPlay,pauseAutoPlay:pauseAutoPlay}),[autoplay]);var scrollViewGestureOnScrollStart=React.useCallback(function(){carouselController.startMovement();pauseAutoPlay();onScrollStart==null||onScrollStart();},[carouselController,onScrollStart,pauseAutoPlay]);var scrollViewGestureOnScrollEnd=React.useCallback(function(){var settledIndex=carouselController.settle();startAutoPlay();_onScrollEnd(settledIndex);},[_onScrollEnd,carouselController,startAutoPlay]);var scrollViewGestureOnTouchBegin=React.useCallback(pauseAutoPlay,[pauseAutoPlay]);var scrollViewGestureOnTouchEnd=React.useCallback(startAutoPlay,[startAutoPlay]);var _ref6=StyleSheet.flatten(contentContainerStyle)||{},opacity=_ref6.opacity,transform=_ref6.transform,restContentContainerStyle=_objectWithoutProperties(_ref6,_excluded);var flattenedStyle=StyleSheet.flatten(style)||{};var layoutStyle=useAnimatedStyle(function CarouselLayoutTsx6Factory(_ref7){var _worklet_12755254666556_init_data=_ref7._worklet_12755254666556_init_data,resolvedSize=_ref7.resolvedSize,resolveCarouselLayoutStyle=_ref7.resolveCarouselLayoutStyle,flattenedStyle=_ref7.flattenedStyle,isVertical=_ref7.isVertical,sizeExplicit=_ref7.sizeExplicit,isSizeReady=_ref7.isSizeReady;var _e=[new global.Error(),-7,-27];var CarouselLayoutTsx6=function CarouselLayoutTsx6(){var _resolvedSize$value3;var measuredSize=(_resolvedSize$value3=resolvedSize.value)!=null?_resolvedSize$value3:0;var _resolveCarouselLayou=resolveCarouselLayoutStyle({flattenedStyle:flattenedStyle,isVertical:isVertical,measuredSize:measuredSize,sizeExplicit:sizeExplicit}),width=_resolveCarouselLayou.width,height=_resolveCarouselLayou.height;return{width:width,height:height,opacity:isSizeReady.value?1:0};};CarouselLayoutTsx6.__closure={resolvedSize:resolvedSize,resolveCarouselLayoutStyle:resolveCarouselLayoutStyle,flattenedStyle:flattenedStyle,isVertical:isVertical,sizeExplicit:sizeExplicit,isSizeReady:isSizeReady};CarouselLayoutTsx6.__workletHash=12755254666556;CarouselLayoutTsx6.__pluginVersion="0.5.2";CarouselLayoutTsx6.__initData=_worklet_12755254666556_init_data;CarouselLayoutTsx6.__stackDetails=_e;return CarouselLayoutTsx6;}({_worklet_12755254666556_init_data:_worklet_12755254666556_init_data,resolvedSize:resolvedSize,resolveCarouselLayoutStyle:resolveCarouselLayoutStyle,flattenedStyle:flattenedStyle,isVertical:isVertical,sizeExplicit:sizeExplicit,isSizeReady:isSizeReady}),[flattenedStyle,isSizeReady,isVertical,resolvedSize,sizePhase,sizeExplicit]);return _jsx(View,{testID:testID,style:[styles.layoutContainer,style],onLayout:props.onLayout,children:_jsx(ScrollViewGesture,{size:size,translation:handlerOffset,style:[styles.contentContainer,layoutStyle,restContentContainerStyle,isVertical?styles.itemsVertical:styles.itemsHorizontal],testID:"carousel-content-container",onScrollStart:scrollViewGestureOnScrollStart,onScrollEnd:scrollViewGestureOnScrollEnd,onTouchBegin:scrollViewGestureOnTouchBegin,onTouchEnd:scrollViewGestureOnTouchEnd,children:_jsx(ItemRenderer,{data:data,rawData:rawData,dataLength:dataLength,rawDataLength:rawDataLength,loop:loop,size:size,renderWindowSize:renderWindowSize,defaultIndex:defaultIndex,autoFillData:autoFillData,offsetX:offsetX,handlerOffset:handlerOffset,layoutConfig:layoutConfig,renderItem:renderItem,itemAnimation:itemAnimation,keyExtractor:keyExtractor})},layout==null?void 0:layout.type)});});var styles=StyleSheet.create({layoutContainer:{display:"flex",overflow:"hidden"},contentContainer:{overflow:"hidden"},itemsHorizontal:{flexDirection:"row"},itemsVertical:{flexDirection:"column"}});
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["opacity","transform"];var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx";import React from"react";import{StyleSheet,View}from"react-native";import{useAnimatedReaction,useAnimatedStyle,useDerivedValue}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{useAutoPlay}from"../hooks/useAutoPlay";import{useCarouselController}from"../hooks/useCarouselController";import{useLayoutConfig}from"../hooks/useLayoutConfig";import{useOnProgressChange}from"../hooks/useOnProgressChange";import{useGlobalState}from"../store";import{webOnlyDependencies}from"../utils/web-only-dependencies";import{ItemRenderer}from"./ItemRenderer";import{ScrollViewGesture}from"./ScrollViewGesture";import{jsx as _jsx}from"react/jsx-runtime";var _worklet_7095469822190_init_data={code:"function resolveCarouselLayoutStyle_CarouselLayoutTsx1(params){const{flattenedStyle:flattenedStyle,isVertical:isVertical,measuredSize:measuredSize,sizeExplicit:sizeExplicit}=params;const{width:width,height:height}=flattenedStyle;const resolvedMainAxisSize=measuredSize||\"100%\";return{width:width!==null&&width!==void 0?width:isVertical?\"100%\":sizeExplicit?resolvedMainAxisSize:\"100%\",height:height!==null&&height!==void 0?height:isVertical?sizeExplicit?resolvedMainAxisSize:\"100%\":\"100%\"};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"resolveCarouselLayoutStyle_CarouselLayoutTsx1\",\"params\",\"flattenedStyle\",\"isVertical\",\"measuredSize\",\"sizeExplicit\",\"width\",\"height\",\"resolvedMainAxisSize\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"],\"mappings\":\"AAcO,SAAAA,6CAKJA,CAAAC,MAAA,EAGD,KAAM,CAAEC,cAAc,CAAdA,cAAc,CAAEC,UAAU,CAAVA,UAAU,CAAEC,YAAY,CAAZA,YAAY,CAAEC,YAAA,CAAAA,YAAa,CAAC,CAAGJ,MAAM,CACzE,KAAM,CAAEK,KAAK,CAALA,KAAK,CAAEC,MAAA,CAAAA,MAAO,CAAC,CAAGL,cAAc,CACxC,KAAM,CAAAM,oBAAoB,CAAGJ,YAAY,EAAI,MAAM,CAEnD,MAAO,CACLE,KAAK,CAAEA,KAAK,SAALA,KAAK,UAALA,KAAK,CAAKH,UAAU,CAAG,MAAM,CAAGE,YAAY,CAAGG,oBAAoB,CAAG,MAAO,CACpFD,MAAM,CAAEA,MAAM,SAANA,MAAM,UAANA,MAAM,CAAKJ,UAAU,CAAIE,YAAY,CAAGG,oBAAoB,CAAG,MAAM,CAAI,MACnF,CAAC,CACH\",\"ignoreList\":[]}"};export var resolveCarouselLayoutStyle=function resolveCarouselLayoutStyle_CarouselLayoutTsx1Factory(_ref){var _worklet_7095469822190_init_data=_ref._worklet_7095469822190_init_data;var _e=[new global.Error(),1,-27];var resolveCarouselLayoutStyle=function resolveCarouselLayoutStyle(params){var flattenedStyle=params.flattenedStyle,isVertical=params.isVertical,measuredSize=params.measuredSize,sizeExplicit=params.sizeExplicit;var width=flattenedStyle.width,height=flattenedStyle.height;var resolvedMainAxisSize=measuredSize||"100%";return{width:width!=null?width:isVertical?"100%":sizeExplicit?resolvedMainAxisSize:"100%",height:height!=null?height:isVertical?sizeExplicit?resolvedMainAxisSize:"100%":"100%"};};resolveCarouselLayoutStyle.__closure={};resolveCarouselLayoutStyle.__workletHash=7095469822190;resolveCarouselLayoutStyle.__pluginVersion="0.5.2";resolveCarouselLayoutStyle.__initData=_worklet_7095469822190_init_data;resolveCarouselLayoutStyle.__stackDetails=_e;return resolveCarouselLayoutStyle;}({_worklet_7095469822190_init_data:_worklet_7095469822190_init_data});var _worklet_10669107750071_init_data={code:"function CarouselLayoutTsx2(){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\"&¤tSize>0;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"CarouselLayoutTsx2\",\"resolvedSize\",\"sizePhase\",\"__closure\",\"_resolvedSize$value\",\"currentSize\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"],\"mappings\":\"AAsEsC,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_4752441846675_init_data={code:"function CarouselLayoutTsx3(){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\":[\"CarouselLayoutTsx3\",\"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\":\"AA4EkC,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_11542262309628_init_data={code:"function CarouselLayoutTsx4(){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\":[\"CarouselLayoutTsx4\",\"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_12793803422950_init_data={code:"function CarouselLayoutTsx5(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\":[\"CarouselLayoutTsx5\",\"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_12755254666556_init_data={code:"function CarouselLayoutTsx6(){const{resolvedSize,resolveCarouselLayoutStyle,flattenedStyle,isVertical,sizeExplicit,isSizeReady}=this.__closure;var _resolvedSize$value;const measuredSize=(_resolvedSize$value=resolvedSize.value)!==null&&_resolvedSize$value!==void 0?_resolvedSize$value:0;const{width:width,height:height}=resolveCarouselLayoutStyle({flattenedStyle:flattenedStyle,isVertical:isVertical,measuredSize:measuredSize,sizeExplicit:sizeExplicit});return{width:width,height:height,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\":[\"CarouselLayoutTsx6\",\"resolvedSize\",\"resolveCarouselLayoutStyle\",\"flattenedStyle\",\"isVertical\",\"sizeExplicit\",\"isSizeReady\",\"__closure\",\"_resolvedSize$value\",\"measuredSize\",\"value\",\"width\",\"height\",\"opacity\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/CarouselLayout.tsx\"],\"mappings\":\"AA2KuC,SAAAA,kBAAMA,CAAA,QAAAC,YAAA,CAAAC,0BAAA,CAAAC,cAAA,CAAAC,UAAA,CAAAC,YAAA,CAAAC,WAAA,OAAAC,SAAA,KAAAC,mBAAA,CACzC,KAAM,CAAAC,YAAY,EAAAD,mBAAA,CAAGP,YAAY,CAACS,KAAK,UAAAF,mBAAA,UAAAA,mBAAA,CAAI,CAAC,CAC5C,KAAM,CAAEG,KAAK,CAALA,KAAK,CAAEC,MAAA,CAAAA,MAAO,CAAC,CAAGV,0BAA0B,CAAC,CACnDC,cAAc,CAAdA,cAAc,CACdC,UAAU,CAAVA,UAAU,CACVK,YAAY,CAAZA,YAAY,CACZJ,YAAA,CAAAA,YACF,CAAC,CAAC,CAEF,MAAO,CACLM,KAAK,CAALA,KAAK,CACLC,MAAM,CAANA,MAAM,CACNC,OAAO,CAAEP,WAAW,CAACI,KAAK,CAAG,CAAC,CAAG,CACnC,CAAC,CACH\",\"ignoreList\":[]}"};export var CarouselLayout=React.forwardRef(function(_props,ref){var _useGlobalState=useGlobalState(),props=_useGlobalState.props,common=_useGlobalState.common;var testID=props.testID,loop=props.loop,autoFillData=props.autoFillData,data=props.data,rawData=props.rawData,dataLength=props.dataLength,rawDataLength=props.rawDataLength,layout=props.layout,style=props.style,contentContainerStyle=props.contentContainerStyle,orientation=props.orientation,autoplay=props.autoplay,renderWindowSize=props.renderWindowSize,autoplayDirection=props.autoplayDirection,autoplayInterval=props.autoplayInterval,animation=props.animation,renderItem=props.renderItem,onSnapToItem=props.onSnapToItem,onScrollStart=props.onScrollStart,onProgressChange=props.onProgressChange,progress=props.progress,itemAnimation=props.itemAnimation,defaultIndex=props.defaultIndex,keyExtractor=props.keyExtractor;var isVertical=orientation==="vertical";var size=common.size,handlerOffset=common.handlerOffset,resolvedSize=common.resolvedSize,sizePhase=common.sizePhase,sizeExplicit=common.sizeExplicit;var layoutConfig=useLayoutConfig(Object.assign({},props,{size:size}));var isSizeReadyDependencies=webOnlyDependencies([resolvedSize,sizePhase]);var isSizeReady=useDerivedValue(function CarouselLayoutTsx2Factory(_ref2){var _worklet_10669107750071_init_data=_ref2._worklet_10669107750071_init_data,resolvedSize=_ref2.resolvedSize,sizePhase=_ref2.sizePhase;var _e=[new global.Error(),-3,-27];var CarouselLayoutTsx2=function CarouselLayoutTsx2(){var _resolvedSize$value;var currentSize=(_resolvedSize$value=resolvedSize.value)!=null?_resolvedSize$value:0;return sizePhase.value==="ready"&¤tSize>0;};CarouselLayoutTsx2.__closure={resolvedSize:resolvedSize,sizePhase:sizePhase};CarouselLayoutTsx2.__workletHash=10669107750071;CarouselLayoutTsx2.__pluginVersion="0.5.2";CarouselLayoutTsx2.__initData=_worklet_10669107750071_init_data;CarouselLayoutTsx2.__stackDetails=_e;return CarouselLayoutTsx2;}({_worklet_10669107750071_init_data:_worklet_10669107750071_init_data,resolvedSize:resolvedSize,sizePhase:sizePhase}),isSizeReadyDependencies);var offsetXDependencies=webOnlyDependencies([loop,dataLength,handlerOffset,resolvedSize]);var offsetX=useDerivedValue(function CarouselLayoutTsx3Factory(_ref3){var _worklet_4752441846675_init_data=_ref3._worklet_4752441846675_init_data,resolvedSize=_ref3.resolvedSize,dataLength=_ref3.dataLength,handlerOffset=_ref3.handlerOffset,loop=_ref3.loop;var _e=[new global.Error(),-5,-27];var CarouselLayoutTsx3=function CarouselLayoutTsx3(){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;};CarouselLayoutTsx3.__closure={resolvedSize:resolvedSize,dataLength:dataLength,handlerOffset:handlerOffset,loop:loop};CarouselLayoutTsx3.__workletHash=4752441846675;CarouselLayoutTsx3.__pluginVersion="0.5.2";CarouselLayoutTsx3.__initData=_worklet_4752441846675_init_data;CarouselLayoutTsx3.__stackDetails=_e;return CarouselLayoutTsx3;}({_worklet_4752441846675_init_data:_worklet_4752441846675_init_data,resolvedSize:resolvedSize,dataLength:dataLength,handlerOffset:handlerOffset,loop:loop}),offsetXDependencies);useOnProgressChange({loop:loop,offset:handlerOffset,progress:progress,size:size,sizeReady:isSizeReady,rawDataLength:rawDataLength,onProgressChange:onProgressChange});var _onScrollEnd=React.useCallback(function(realIndex){if(onSnapToItem)onSnapToItem(realIndex);},[onSnapToItem]);var carouselController=useCarouselController({ref:ref,loop:loop,size:size,dataLength:dataLength,rawDataLength:rawDataLength,handlerOffset:handlerOffset,animation:animation,defaultIndex:defaultIndex,onMovementEnd:_onScrollEnd,onScrollStart:onScrollStart});var _useAutoPlay=useAutoPlay({autoplay:autoplay,autoplayDirection:autoplayDirection,autoplayInterval:autoplayInterval,carouselController:carouselController}),startAutoPlay=_useAutoPlay.start,pauseAutoPlay=_useAutoPlay.pause,triggerAutoPlay=_useAutoPlay.trigger;useAnimatedReaction(function CarouselLayoutTsx4Factory(_ref4){var _worklet_11542262309628_init_data=_ref4._worklet_11542262309628_init_data,isSizeReady=_ref4.isSizeReady;var _e=[new global.Error(),-2,-27];var CarouselLayoutTsx4=function CarouselLayoutTsx4(){return{ready:isSizeReady.value};};CarouselLayoutTsx4.__closure={isSizeReady:isSizeReady};CarouselLayoutTsx4.__workletHash=11542262309628;CarouselLayoutTsx4.__pluginVersion="0.5.2";CarouselLayoutTsx4.__initData=_worklet_11542262309628_init_data;CarouselLayoutTsx4.__stackDetails=_e;return CarouselLayoutTsx4;}({_worklet_11542262309628_init_data:_worklet_11542262309628_init_data,isSizeReady:isSizeReady}),function CarouselLayoutTsx5Factory(_ref5){var _worklet_12793803422950_init_data=_ref5._worklet_12793803422950_init_data,autoplay=_ref5.autoplay,scheduleOnRN=_ref5.scheduleOnRN,triggerAutoPlay=_ref5.triggerAutoPlay,pauseAutoPlay=_ref5.pauseAutoPlay;var _e=[new global.Error(),-5,-27];var CarouselLayoutTsx5=function CarouselLayoutTsx5(state,previous){if(!autoplay)return;if(state.ready===(previous==null?void 0:previous.ready))return;if(state.ready)scheduleOnRN(triggerAutoPlay);else scheduleOnRN(pauseAutoPlay);};CarouselLayoutTsx5.__closure={autoplay:autoplay,scheduleOnRN:scheduleOnRN,triggerAutoPlay:triggerAutoPlay,pauseAutoPlay:pauseAutoPlay};CarouselLayoutTsx5.__workletHash=12793803422950;CarouselLayoutTsx5.__pluginVersion="0.5.2";CarouselLayoutTsx5.__initData=_worklet_12793803422950_init_data;CarouselLayoutTsx5.__stackDetails=_e;return CarouselLayoutTsx5;}({_worklet_12793803422950_init_data:_worklet_12793803422950_init_data,autoplay:autoplay,scheduleOnRN:scheduleOnRN,triggerAutoPlay:triggerAutoPlay,pauseAutoPlay:pauseAutoPlay}),webOnlyDependencies([autoplay]));var scrollViewGestureOnScrollStart=React.useCallback(function(){carouselController.startMovement();pauseAutoPlay();onScrollStart==null||onScrollStart();},[carouselController,onScrollStart,pauseAutoPlay]);var scrollViewGestureOnScrollEnd=React.useCallback(function(){var settledIndex=carouselController.settle();startAutoPlay();_onScrollEnd(settledIndex);},[_onScrollEnd,carouselController,startAutoPlay]);var scrollViewGestureOnTouchBegin=React.useCallback(pauseAutoPlay,[pauseAutoPlay]);var scrollViewGestureOnTouchEnd=React.useCallback(startAutoPlay,[startAutoPlay]);var _ref6=StyleSheet.flatten(contentContainerStyle)||{},opacity=_ref6.opacity,transform=_ref6.transform,restContentContainerStyle=_objectWithoutProperties(_ref6,_excluded);var flattenedStyle=StyleSheet.flatten(style)||{};var layoutStyleDependencies=webOnlyDependencies([flattenedStyle,isSizeReady,isVertical,resolvedSize,sizePhase,sizeExplicit]);var layoutStyle=useAnimatedStyle(function CarouselLayoutTsx6Factory(_ref7){var _worklet_12755254666556_init_data=_ref7._worklet_12755254666556_init_data,resolvedSize=_ref7.resolvedSize,resolveCarouselLayoutStyle=_ref7.resolveCarouselLayoutStyle,flattenedStyle=_ref7.flattenedStyle,isVertical=_ref7.isVertical,sizeExplicit=_ref7.sizeExplicit,isSizeReady=_ref7.isSizeReady;var _e=[new global.Error(),-7,-27];var CarouselLayoutTsx6=function CarouselLayoutTsx6(){var _resolvedSize$value3;var measuredSize=(_resolvedSize$value3=resolvedSize.value)!=null?_resolvedSize$value3:0;var _resolveCarouselLayou=resolveCarouselLayoutStyle({flattenedStyle:flattenedStyle,isVertical:isVertical,measuredSize:measuredSize,sizeExplicit:sizeExplicit}),width=_resolveCarouselLayou.width,height=_resolveCarouselLayou.height;return{width:width,height:height,opacity:isSizeReady.value?1:0};};CarouselLayoutTsx6.__closure={resolvedSize:resolvedSize,resolveCarouselLayoutStyle:resolveCarouselLayoutStyle,flattenedStyle:flattenedStyle,isVertical:isVertical,sizeExplicit:sizeExplicit,isSizeReady:isSizeReady};CarouselLayoutTsx6.__workletHash=12755254666556;CarouselLayoutTsx6.__pluginVersion="0.5.2";CarouselLayoutTsx6.__initData=_worklet_12755254666556_init_data;CarouselLayoutTsx6.__stackDetails=_e;return CarouselLayoutTsx6;}({_worklet_12755254666556_init_data:_worklet_12755254666556_init_data,resolvedSize:resolvedSize,resolveCarouselLayoutStyle:resolveCarouselLayoutStyle,flattenedStyle:flattenedStyle,isVertical:isVertical,sizeExplicit:sizeExplicit,isSizeReady:isSizeReady}),layoutStyleDependencies);return _jsx(View,{testID:testID,style:[styles.layoutContainer,style],onLayout:props.onLayout,children:_jsx(ScrollViewGesture,{size:size,translation:handlerOffset,style:[styles.contentContainer,layoutStyle,restContentContainerStyle,isVertical?styles.itemsVertical:styles.itemsHorizontal],testID:"carousel-content-container",onScrollStart:scrollViewGestureOnScrollStart,onScrollEnd:scrollViewGestureOnScrollEnd,onTouchBegin:scrollViewGestureOnTouchBegin,onTouchEnd:scrollViewGestureOnTouchEnd,children:_jsx(ItemRenderer,{data:data,rawData:rawData,dataLength:dataLength,rawDataLength:rawDataLength,loop:loop,size:size,renderWindowSize:renderWindowSize,defaultIndex:defaultIndex,autoFillData:autoFillData,offsetX:offsetX,handlerOffset:handlerOffset,layoutConfig:layoutConfig,renderItem:renderItem,itemAnimation:itemAnimation,keyExtractor:keyExtractor})},layout==null?void 0:layout.type)});});var styles=StyleSheet.create({layoutContainer:{display:"flex",overflow:"hidden"},contentContainer:{overflow:"hidden"},itemsHorizontal:{flexDirection:"row"},itemsVertical:{flexDirection:"column"}});
|
|
2
2
|
//# sourceMappingURL=CarouselLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","useAnimatedReaction","useAnimatedStyle","useDerivedValue","scheduleOnRN","useAutoPlay","useCarouselController","useLayoutConfig","useOnProgressChange","useGlobalState","ItemRenderer","ScrollViewGesture","jsx","_jsx","_worklet_7095469822190_init_data","code","location","sourceMap","resolveCarouselLayoutStyle","resolveCarouselLayoutStyle_CarouselLayoutTsx1Factory","_ref","_e","global","Error","params","flattenedStyle","isVertical","measuredSize","sizeExplicit","width","height","resolvedMainAxisSize","__closure","__workletHash","__pluginVersion","__initData","__stackDetails","_worklet_10669107750071_init_data","_worklet_4752441846675_init_data","_worklet_11542262309628_init_data","_worklet_12793803422950_init_data","_worklet_12755254666556_init_data","CarouselLayout","forwardRef","_props","ref","_useGlobalState","props","common","testID","loop","autoFillData","data","rawData","dataLength","rawDataLength","layout","style","contentContainerStyle","orientation","autoplay","renderWindowSize","autoplayDirection","autoplayInterval","animation","renderItem","onSnapToItem","onScrollStart","onProgressChange","progress","itemAnimation","defaultIndex","keyExtractor","size","handlerOffset","resolvedSize","sizePhase","layoutConfig","Object","assign","isSizeReady","CarouselLayoutTsx2Factory","_ref2","CarouselLayoutTsx2","_resolvedSize$value","currentSize","value","offsetX","CarouselLayoutTsx3Factory","_ref3","CarouselLayoutTsx3","_resolvedSize$value2","totalSize","x","Number","isNaN","offset","sizeReady","_onScrollEnd","useCallback","realIndex","carouselController","onMovementEnd","_useAutoPlay","startAutoPlay","start","pauseAutoPlay","pause","triggerAutoPlay","trigger","CarouselLayoutTsx4Factory","_ref4","CarouselLayoutTsx4","ready","CarouselLayoutTsx5Factory","_ref5","CarouselLayoutTsx5","state","previous","scrollViewGestureOnScrollStart","startMovement","scrollViewGestureOnScrollEnd","settledIndex","settle","scrollViewGestureOnTouchBegin","scrollViewGestureOnTouchEnd","_ref6","flatten","opacity","transform","restContentContainerStyle","_objectWithoutProperties","_excluded","layoutStyle","CarouselLayoutTsx6Factory","_ref7","CarouselLayoutTsx6","_resolvedSize$value3","_resolveCarouselLayou","styles","layoutContainer","onLayout","children","translation","contentContainer","itemsVertical","itemsHorizontal","onScrollEnd","onTouchBegin","onTouchEnd","type","create","display","overflow","flexDirection"],"sourceRoot":"../../../src","sources":["components/CarouselLayout.tsx"],"mappings":"+QAAA,MAAO,CAAAA,KAAK,KAAM,OAAO,CACzB,OAAyBC,UAAU,CAAEC,IAAI,KAAwB,cAAc,CAC/E,OAASC,mBAAmB,CAAEC,gBAAgB,CAAEC,eAAe,KAAQ,yBAAyB,CAChG,OAASC,YAAY,KAAQ,uBAAuB,CACpD,OAASC,WAAW,KAAQ,sBAAsB,CAClD,OAASC,qBAAqB,KAAQ,gCAAgC,CACtE,OAASC,eAAe,KAAQ,0BAA0B,CAC1D,OAASC,mBAAmB,KAAQ,8BAA8B,CAClE,OAASC,cAAc,KAAQ,UAAU,CAEzC,OAASC,YAAY,KAAQ,gBAA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B,YAAY,CAAExB,6BAA8B,CAC5CyB,UAAU,CAAExB,2BAA4B,CAAAiB,QAAA,CAExCjI,IAAA,CAACH,YAAY,EACX0C,IAAI,CAAEA,IAAK,CACXC,OAAO,CAAEA,OAAQ,CACjBC,UAAU,CAAEA,UAAW,CACvBC,aAAa,CAAEA,aAAc,CAC7BL,IAAI,CAAEA,IAAK,CACXuB,IAAI,CAAEA,IAAK,CACXZ,gBAAgB,CAAEA,gBAAiB,CACnCU,YAAY,CAAEA,YAAa,CAC3BpB,YAAY,CAAEA,YAAa,CAC3BoC,OAAO,CAAEA,OAAQ,CACjBb,aAAa,CAAEA,aAAc,CAC7BG,YAAY,CAAEA,YAAa,CAC3BZ,UAAU,CAAEA,UAAW,CACvBK,aAAa,CAAEA,aAAc,CAC7BE,YAAY,CAAEA,YAAa,CAC5B,CAAC,EA9BGhB,MAAM,cAANA,MAAM,CAAE8F,IA+BI,CAAC,CAChB,CAAC,CAEX,CAAC,CAAC,CAEF,GAAM,CAAAX,MAAM,CAAG5I,UAAU,CAACwJ,MAAM,CAAC,CAC/BX,eAAe,CAAE,CACfY,OAAO,CAAE,MAAM,CACfC,QAAQ,CAAE,QACZ,CAAC,CACDT,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
|
+
{"version":3,"names":["React","StyleSheet","View","useAnimatedReaction","useAnimatedStyle","useDerivedValue","scheduleOnRN","useAutoPlay","useCarouselController","useLayoutConfig","useOnProgressChange","useGlobalState","webOnlyDependencies","ItemRenderer","ScrollViewGesture","jsx","_jsx","_worklet_7095469822190_init_data","code","location","sourceMap","resolveCarouselLayoutStyle","resolveCarouselLayoutStyle_CarouselLayoutTsx1Factory","_ref","_e","global","Error","params","flattenedStyle","isVertical","measuredSize","sizeExplicit","width","height","resolvedMainAxisSize","__closure","__workletHash","__pluginVersion","__initData","__stackDetails","_worklet_10669107750071_init_data","_worklet_4752441846675_init_data","_worklet_11542262309628_init_data","_worklet_12793803422950_init_data","_worklet_12755254666556_init_data","CarouselLayout","forwardRef","_props","ref","_useGlobalState","props","common","testID","loop","autoFillData","data","rawData","dataLength","rawDataLength","layout","style","contentContainerStyle","orientation","autoplay","renderWindowSize","autoplayDirection","autoplayInterval","animation","renderItem","onSnapToItem","onScrollStart","onProgressChange","progress","itemAnimation","defaultIndex","keyExtractor","size","handlerOffset","resolvedSize","sizePhase","layoutConfig","Object","assign","isSizeReadyDependencies","isSizeReady","CarouselLayoutTsx2Factory","_ref2","CarouselLayoutTsx2","_resolvedSize$value","currentSize","value","offsetXDependencies","offsetX","CarouselLayoutTsx3Factory","_ref3","CarouselLayoutTsx3","_resolvedSize$value2","totalSize","x","Number","isNaN","offset","sizeReady","_onScrollEnd","useCallback","realIndex","carouselController","onMovementEnd","_useAutoPlay","startAutoPlay","start","pauseAutoPlay","pause","triggerAutoPlay","trigger","CarouselLayoutTsx4Factory","_ref4","CarouselLayoutTsx4","ready","CarouselLayoutTsx5Factory","_ref5","CarouselLayoutTsx5","state","previous","scrollViewGestureOnScrollStart","startMovement","scrollViewGestureOnScrollEnd","settledIndex","settle","scrollViewGestureOnTouchBegin","scrollViewGestureOnTouchEnd","_ref6","flatten","opacity","transform","restContentContainerStyle","_objectWithoutProperties","_excluded","layoutStyleDependencies","layoutStyle","CarouselLayoutTsx6Factory","_ref7","CarouselLayoutTsx6","_resolvedSize$value3","_resolveCarouselLayou","styles","layoutContainer","onLayout","children","translation","contentContainer","itemsVertical","itemsHorizontal","onScrollEnd","onTouchBegin","onTouchEnd","type","create","display","overflow","flexDirection"],"sourceRoot":"../../../src","sources":["components/CarouselLayout.tsx"],"mappings":"+QAAA,MAAO,CAAAA,KAAK,KAAM,OAAO,CACzB,OAAyBC,UAAU,CAAEC,IAAI,KAAwB,cAAc,CAC/E,OAASC,mBAAmB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AAE,CACfY,OAAO,CAAE,MAAM,CACfC,QAAQ,CAAE,QACZ,CAAC,CACDT,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
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx";import React from"react";import{StyleSheet}from"react-native";import Animated,{useAnimatedReaction,useAnimatedStyle,useDerivedValue,useSharedValue}from"react-native-reanimated";import{scheduleOnRN,scheduleOnUI}from"react-native-worklets";import{useOffsetX}from"../hooks/useOffsetX";import{useGlobalState}from"../store";import{getHorizontalStackOffsetType}from"../utils/carousel-direction";import{positiveModulo}from"../utils/carousel-math";import{sanitizeAnimationStyle}from"../utils/sanitize-animation-style";import{jsx as _jsx}from"react/jsx-runtime";var _worklet_13098946080736_init_data={code:"function resolveItemMainAxisSize_ItemLayoutTsx1(params){var _ref;const{explicitSize:explicitSize,effectivePageSize:effectivePageSize,measuredSize:measuredSize}=params;return typeof explicitSize===\"number\"?explicitSize:(_ref=effectivePageSize!==null&&effectivePageSize!==void 0?effectivePageSize:measuredSize)!==null&&_ref!==void 0?_ref:\"100%\";}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"resolveItemMainAxisSize_ItemLayoutTsx1\",\"params\",\"_ref\",\"explicitSize\",\"effectivePageSize\",\"measuredSize\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AAuBO,SAAAA,sCAIJA,CAAAC,MAAA,MAAAC,IAAA,CAGD,KAAM,CAAEC,YAAY,CAAZA,YAAY,CAAEC,iBAAiB,CAAjBA,iBAAiB,CAAEC,YAAA,CAAAA,YAAa,CAAC,CAAGJ,MAAM,CAEhE,MAAO,OAAO,CAAAE,YAAY,GAAK,QAAQ,CACnCA,YAAY,EAAAD,IAAA,CACXE,iBAAiB,SAAjBA,iBAAiB,UAAjBA,iBAAiB,CAAIC,YAAY,UAAAH,IAAA,UAAAA,IAAA,CAAI,MAAO,CACnD\",\"ignoreList\":[]}"};export var resolveItemMainAxisSize=function resolveItemMainAxisSize_ItemLayoutTsx1Factory(_ref){var _worklet_13098946080736_init_data=_ref._worklet_13098946080736_init_data;var _e=[new global.Error(),1,-27];var resolveItemMainAxisSize=function resolveItemMainAxisSize(params){var _ref2;var explicitSize=params.explicitSize,effectivePageSize=params.effectivePageSize,measuredSize=params.measuredSize;return typeof explicitSize==="number"?explicitSize:(_ref2=effectivePageSize!=null?effectivePageSize:measuredSize)!=null?_ref2:"100%";};resolveItemMainAxisSize.__closure={};resolveItemMainAxisSize.__workletHash=13098946080736;resolveItemMainAxisSize.__pluginVersion="0.5.2";resolveItemMainAxisSize.__initData=_worklet_13098946080736_init_data;resolveItemMainAxisSize.__stackDetails=_e;return resolveItemMainAxisSize;}({_worklet_13098946080736_init_data:_worklet_13098946080736_init_data});var _worklet_12404262248346_init_data={code:"function ItemLayoutTsx2(){const{isVertical,styleWidthNumber,itemSize,styleHeightNumber,measuredSize,resolveItemMainAxisSize,effectivePageSize}=this.__closure;var _measuredSize$value$w,_measuredSize$value$h;const widthCandidate=isVertical?styleWidthNumber:itemSize;const heightCandidate=isVertical?itemSize:styleHeightNumber;const computedWidth=isVertical?typeof widthCandidate===\"number\"?widthCandidate:(_measuredSize$value$w=measuredSize.value.width)!==null&&_measuredSize$value$w!==void 0?_measuredSize$value$w:\"100%\":resolveItemMainAxisSize({explicitSize:widthCandidate,effectivePageSize:effectivePageSize,measuredSize:measuredSize.value.width});const computedHeight=isVertical?resolveItemMainAxisSize({explicitSize:heightCandidate,effectivePageSize:effectivePageSize,measuredSize:measuredSize.value.height}):typeof heightCandidate===\"number\"?heightCandidate:(_measuredSize$value$h=measuredSize.value.height)!==null&&_measuredSize$value$h!==void 0?_measuredSize$value$h:\"100%\";return{width:computedWidth,height:computedHeight};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemLayoutTsx2\",\"isVertical\",\"styleWidthNumber\",\"itemSize\",\"styleHeightNumber\",\"measuredSize\",\"resolveItemMainAxisSize\",\"effectivePageSize\",\"__closure\",\"_measuredSize$value$w\",\"_measuredSize$value$h\",\"widthCandidate\",\"heightCandidate\",\"computedWidth\",\"value\",\"width\",\"explicitSize\",\"computedHeight\",\"height\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AAqEsD,SAAAA,cAAMA,CAAA,QAAAC,UAAA,CAAAC,gBAAA,CAAAC,QAAA,CAAAC,iBAAA,CAAAC,YAAA,CAAAC,uBAAA,CAAAC,iBAAA,OAAAC,SAAA,KAAAC,qBAAA,CAAAC,qBAAA,CACxD,KAAM,CAAAC,cAAc,CAAGV,UAAU,CAAGC,gBAAgB,CAAGC,QAAQ,CAC/D,KAAM,CAAAS,eAAe,CAAGX,UAAU,CAAGE,QAAQ,CAAGC,iBAAiB,CAEjE,KAAM,CAAAS,aAAa,CAAGZ,UAAU,CAC5B,MAAO,CAAAU,cAAc,GAAK,QAAQ,CAChCA,cAAc,EAAAF,qBAAA,CACbJ,YAAY,CAACS,KAAK,CAACC,KAAK,UAAAN,qBAAA,UAAAA,qBAAA,CAAI,MAAO,CACtCH,uBAAuB,CAAC,CACtBU,YAAY,CAAEL,cAAc,CAC5BJ,iBAAiB,CAAjBA,iBAAiB,CACjBF,YAAY,CAAEA,YAAY,CAACS,KAAK,CAACC,KACnC,CAAC,CAAC,CAEN,KAAM,CAAAE,cAAc,CAAGhB,UAAU,CAC7BK,uBAAuB,CAAC,CACtBU,YAAY,CAAEJ,eAAe,CAC7BL,iBAAiB,CAAjBA,iBAAiB,CACjBF,YAAY,CAAEA,YAAY,CAACS,KAAK,CAACI,MACnC,CAAC,CAAC,CACF,MAAO,CAAAN,eAAe,GAAK,QAAQ,CACjCA,eAAe,EAAAF,qBAAA,CACdL,YAAY,CAACS,KAAK,CAACI,MAAM,UAAAR,qBAAA,UAAAA,qBAAA,CAAI,MAAO,CAE3C,MAAO,CACLK,KAAK,CAAEF,aAAa,CACpBK,MAAM,CAAED,cACV,CAAC,CACH\",\"ignoreList\":[]}"};var _worklet_12045659402895_init_data={code:"function ItemLayoutTsx3(){const{size,dataLength,positiveModulo,handlerOffset,index}=this.__closure;return size>0&&dataLength>0&&positiveModulo(Math.round(-handlerOffset.value/size),dataLength)===index;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemLayoutTsx3\",\"size\",\"dataLength\",\"positiveModulo\",\"handlerOffset\",\"index\",\"__closure\",\"Math\",\"round\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AAwHsD,SAAAA,cAAMA,CAAA,QAAAC,IAAA,CAAAC,UAAA,CAAAC,cAAA,CAAAC,aAAA,CAAAC,KAAA,OAAAC,SAAA,CAGxD,MACE,CAAAL,IAAI,CAAG,CAAC,EACRC,UAAU,CAAG,CAAC,EACdC,cAAc,CAACI,IAAI,CAACC,KAAK,CAAC,CAACJ,aAAa,CAACK,KAAK,CAAGR,IAAI,CAAC,CAAEC,UAAU,CAAC,GAAKG,KAAK,CAEjF\",\"ignoreList\":[]}"};var _worklet_10884764988886_init_data={code:"function ItemLayoutTsx4(isCurrent,wasCurrent){const{scheduleOnRN,setIsAccessibilityCurrent}=this.__closure;if(isCurrent!==wasCurrent){scheduleOnRN(setIsAccessibilityCurrent,isCurrent);}}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemLayoutTsx4\",\"isCurrent\",\"wasCurrent\",\"scheduleOnRN\",\"setIsAccessibilityCurrent\",\"__closure\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AAsII,QAAC,CAAAA,cAAWA,CAAAC,SAAU,CAAKC,UAAA,QAAAC,YAAA,CAAAC,yBAAA,OAAAC,SAAA,CACzB,GAAIJ,SAAS,GAAKC,UAAU,CAAE,CAC5BC,YAAY,CAACC,yBAAyB,CAAEH,SAAS,CAAC,CACpD,CACF\",\"ignoreList\":[]}"};var _worklet_7865013565607_init_data={code:"function ItemLayoutTsx5(){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\":[\"ItemLayoutTsx5\",\"size\",\"x\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AA8I2C,SAAAA,cAAMA,CAAA,QAAAC,IAAA,CAAAC,CAAA,OAAAC,SAAA,CAC7C,GAAI,CAACF,IAAI,CAAE,MAAO,EAAC,CACnB,MAAO,CAAAC,CAAC,CAACE,KAAK,CAAGH,IAAI,CACvB\",\"ignoreList\":[]}"};var _worklet_12212549227805_init_data={code:"function ItemLayoutTsx6(){const{size,sanitizeAnimationStyle,animationStyle,x,rawIndex}=this.__closure;const safeSize=size||1;return sanitizeAnimationStyle(animationStyle(x.value/safeSize,rawIndex));}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemLayoutTsx6\",\"size\",\"sanitizeAnimationStyle\",\"animationStyle\",\"x\",\"rawIndex\",\"__closure\",\"safeSize\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AAkJoD,SAAAA,cAAMA,CAAA,QAAAC,IAAA,CAAAC,sBAAA,CAAAC,cAAA,CAAAC,CAAA,CAAAC,QAAA,OAAAC,SAAA,CACtD,KAAM,CAAAC,QAAQ,CAAGN,IAAI,EAAI,CAAC,CAC1B,MAAO,CAAAC,sBAAsB,CAACC,cAAc,CAACC,CAAC,CAACI,KAAK,CAAGD,QAAQ,CAAEF,QAAQ,CAAC,CAAC,CAC7E\",\"ignoreList\":[]}"};var _worklet_5927262822367_init_data={code:"function ItemLayoutTsx7(){const{measuredSize,layoutWidth,layoutHeight,updateItemDimensions,index}=this.__closure;const{width:prevWidth,height:prevHeight}=measuredSize.value;if(prevWidth===layoutWidth&&prevHeight===layoutHeight)return;measuredSize.value={width:layoutWidth,height:layoutHeight};updateItemDimensions(index,{width:layoutWidth,height:layoutHeight});}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemLayoutTsx7\",\"measuredSize\",\"layoutWidth\",\"layoutHeight\",\"updateItemDimensions\",\"index\",\"__closure\",\"width\",\"prevWidth\",\"height\",\"prevHeight\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AA0KyB,SAAAA,cAAMA,CAAA,QAAAC,YAAA,CAAAC,WAAA,CAAAC,YAAA,CAAAC,oBAAA,CAAAC,KAAA,OAAAC,SAAA,CACjB,KAAM,CAAEC,KAAK,CAAEC,SAAS,CAAEC,MAAM,CAAEC,UAAW,CAAC,CAAGT,YAAY,CAACU,KAAK,CACnE,GAAIH,SAAS,GAAKN,WAAW,EAAIQ,UAAU,GAAKP,YAAY,CAAE,OAE9DF,YAAY,CAACU,KAAK,CAAG,CACnBJ,KAAK,CAAEL,WAAW,CAClBO,MAAM,CAAEN,YACV,CAAC,CACDC,oBAAoB,CAACC,KAAK,CAAE,CAC1BE,KAAK,CAAEL,WAAW,CAClBO,MAAM,CAAEN,YACV,CAAC,CAAC,CACJ\",\"ignoreList\":[]}"};export var ItemLayout=function ItemLayout(props){var handlerOffset=props.handlerOffset,index=props.index,rawIndex=props.rawIndex,children=props.children,visibleRanges=props.visibleRanges,animationStyle=props.animationStyle;var _useGlobalState=useGlobalState(),_useGlobalState$props=_useGlobalState.props,loop=_useGlobalState$props.loop,dataLength=_useGlobalState$props.dataLength,directionSign=_useGlobalState$props.directionSign,orientation=_useGlobalState$props.orientation,layout=_useGlobalState$props.layout,style=_useGlobalState$props.style,itemSize=_useGlobalState$props.itemSize,common=_useGlobalState.common,updateItemDimensions=_useGlobalState.layout.updateItemDimensions;var measuredSize=useSharedValue({width:null,height:null});var fallbackSize=common.size;var isVertical=orientation==="vertical";var _ref3=StyleSheet.flatten(style)||{},styleWidth=_ref3.width,styleHeight=_ref3.height;var styleWidthNumber=typeof styleWidth==="number"?styleWidth:undefined;var styleHeightNumber=typeof styleHeight==="number"?styleHeight:undefined;var size=(itemSize!=null?itemSize:fallbackSize)||0;var effectivePageSize=size>0?size:undefined;var dimensionsStyle=useAnimatedStyle(function ItemLayoutTsx2Factory(_ref4){var _worklet_12404262248346_init_data=_ref4._worklet_12404262248346_init_data,isVertical=_ref4.isVertical,styleWidthNumber=_ref4.styleWidthNumber,itemSize=_ref4.itemSize,styleHeightNumber=_ref4.styleHeightNumber,measuredSize=_ref4.measuredSize,resolveItemMainAxisSize=_ref4.resolveItemMainAxisSize,effectivePageSize=_ref4.effectivePageSize;var _e=[new global.Error(),-8,-27];var ItemLayoutTsx2=function ItemLayoutTsx2(){var _measuredSize$value$w,_measuredSize$value$h;var widthCandidate=isVertical?styleWidthNumber:itemSize;var heightCandidate=isVertical?itemSize:styleHeightNumber;var computedWidth=isVertical?typeof widthCandidate==="number"?widthCandidate:(_measuredSize$value$w=measuredSize.value.width)!=null?_measuredSize$value$w:"100%":resolveItemMainAxisSize({explicitSize:widthCandidate,effectivePageSize:effectivePageSize,measuredSize:measuredSize.value.width});var computedHeight=isVertical?resolveItemMainAxisSize({explicitSize:heightCandidate,effectivePageSize:effectivePageSize,measuredSize:measuredSize.value.height}):typeof heightCandidate==="number"?heightCandidate:(_measuredSize$value$h=measuredSize.value.height)!=null?_measuredSize$value$h:"100%";return{width:computedWidth,height:computedHeight};};ItemLayoutTsx2.__closure={isVertical:isVertical,styleWidthNumber:styleWidthNumber,itemSize:itemSize,styleHeightNumber:styleHeightNumber,measuredSize:measuredSize,resolveItemMainAxisSize:resolveItemMainAxisSize,effectivePageSize:effectivePageSize};ItemLayoutTsx2.__workletHash=12404262248346;ItemLayoutTsx2.__pluginVersion="0.5.2";ItemLayoutTsx2.__initData=_worklet_12404262248346_init_data;ItemLayoutTsx2.__stackDetails=_e;return ItemLayoutTsx2;}({_worklet_12404262248346_init_data:_worklet_12404262248346_init_data,isVertical:isVertical,styleWidthNumber:styleWidthNumber,itemSize:itemSize,styleHeightNumber:styleHeightNumber,measuredSize:measuredSize,resolveItemMainAxisSize:resolveItemMainAxisSize,effectivePageSize:effectivePageSize}),[effectivePageSize,isVertical,itemSize,styleHeightNumber,styleWidthNumber]);var offsetXConfig={handlerOffset:handlerOffset,index:index,size:size,dataLength:dataLength,loop:loop};if((layout==null?void 0:layout.type)==="horizontal-stack"){var _layout$exitDirection;offsetXConfig={handlerOffset:handlerOffset,index:index,size:size,dataLength:dataLength,loop:loop,type:getHorizontalStackOffsetType((_layout$exitDirection=layout.exitDirection)!=null?_layout$exitDirection:"left",directionSign),viewCount:layout.visibleCount};}var x=useOffsetX(offsetXConfig,visibleRanges);var isCurrentForAccessibility=React.useCallback(function ItemLayoutTsx3Factory(_ref5){var _worklet_12045659402895_init_data=_ref5._worklet_12045659402895_init_data,size=_ref5.size,dataLength=_ref5.dataLength,positiveModulo=_ref5.positiveModulo,handlerOffset=_ref5.handlerOffset,index=_ref5.index;var _e=[new global.Error(),-6,-27];var ItemLayoutTsx3=function ItemLayoutTsx3(){return size>0&&dataLength>0&&positiveModulo(Math.round(-handlerOffset.value/size),dataLength)===index;};ItemLayoutTsx3.__closure={size:size,dataLength:dataLength,positiveModulo:positiveModulo,handlerOffset:handlerOffset,index:index};ItemLayoutTsx3.__workletHash=12045659402895;ItemLayoutTsx3.__pluginVersion="0.5.2";ItemLayoutTsx3.__initData=_worklet_12045659402895_init_data;ItemLayoutTsx3.__stackDetails=_e;return ItemLayoutTsx3;}({_worklet_12045659402895_init_data:_worklet_12045659402895_init_data,size:size,dataLength:dataLength,positiveModulo:positiveModulo,handlerOffset:handlerOffset,index:index}),[dataLength,handlerOffset,index,size]);var _React$useState=React.useState(isCurrentForAccessibility),_React$useState2=_slicedToArray(_React$useState,2),isAccessibilityCurrent=_React$useState2[0],setIsAccessibilityCurrent=_React$useState2[1];useAnimatedReaction(isCurrentForAccessibility,function ItemLayoutTsx4Factory(_ref6){var _worklet_10884764988886_init_data=_ref6._worklet_10884764988886_init_data,scheduleOnRN=_ref6.scheduleOnRN,setIsAccessibilityCurrent=_ref6.setIsAccessibilityCurrent;var _e=[new global.Error(),-3,-27];var ItemLayoutTsx4=function ItemLayoutTsx4(isCurrent,wasCurrent){if(isCurrent!==wasCurrent){scheduleOnRN(setIsAccessibilityCurrent,isCurrent);}};ItemLayoutTsx4.__closure={scheduleOnRN:scheduleOnRN,setIsAccessibilityCurrent:setIsAccessibilityCurrent};ItemLayoutTsx4.__workletHash=10884764988886;ItemLayoutTsx4.__pluginVersion="0.5.2";ItemLayoutTsx4.__initData=_worklet_10884764988886_init_data;ItemLayoutTsx4.__stackDetails=_e;return ItemLayoutTsx4;}({_worklet_10884764988886_init_data:_worklet_10884764988886_init_data,scheduleOnRN:scheduleOnRN,setIsAccessibilityCurrent:setIsAccessibilityCurrent}),[isCurrentForAccessibility]);var relativeProgress=useDerivedValue(function ItemLayoutTsx5Factory(_ref7){var _worklet_7865013565607_init_data=_ref7._worklet_7865013565607_init_data,size=_ref7.size,x=_ref7.x;var _e=[new global.Error(),-3,-27];var ItemLayoutTsx5=function ItemLayoutTsx5(){if(!size)return 0;return x.value/size;};ItemLayoutTsx5.__closure={size:size,x:x};ItemLayoutTsx5.__workletHash=7865013565607;ItemLayoutTsx5.__pluginVersion="0.5.2";ItemLayoutTsx5.__initData=_worklet_7865013565607_init_data;ItemLayoutTsx5.__stackDetails=_e;return ItemLayoutTsx5;}({_worklet_7865013565607_init_data:_worklet_7865013565607_init_data,size:size,x:x}),[x,size]);var animatedStyle=useAnimatedStyle(function ItemLayoutTsx6Factory(_ref8){var _worklet_12212549227805_init_data=_ref8._worklet_12212549227805_init_data,size=_ref8.size,sanitizeAnimationStyle=_ref8.sanitizeAnimationStyle,animationStyle=_ref8.animationStyle,x=_ref8.x,rawIndex=_ref8.rawIndex;var _e=[new global.Error(),-6,-27];var ItemLayoutTsx6=function ItemLayoutTsx6(){var safeSize=size||1;return sanitizeAnimationStyle(animationStyle(x.value/safeSize,rawIndex));};ItemLayoutTsx6.__closure={size:size,sanitizeAnimationStyle:sanitizeAnimationStyle,animationStyle:animationStyle,x:x,rawIndex:rawIndex};ItemLayoutTsx6.__workletHash=12212549227805;ItemLayoutTsx6.__pluginVersion="0.5.2";ItemLayoutTsx6.__initData=_worklet_12212549227805_init_data;ItemLayoutTsx6.__stackDetails=_e;return ItemLayoutTsx6;}({_worklet_12212549227805_init_data:_worklet_12212549227805_init_data,size:size,sanitizeAnimationStyle:sanitizeAnimationStyle,animationStyle:animationStyle,x:x,rawIndex:rawIndex}),[animationStyle,rawIndex,x,size]);var child=children({relativeProgress:relativeProgress});var enhancedChild=React.isValidElement(child)?React.cloneElement(child,{collapsable:false,onLayout:function onLayout(event){var _child$props;var _event$nativeEvent$la=event.nativeEvent.layout,layoutWidth=_event$nativeEvent$la.width,layoutHeight=_event$nativeEvent$la.height;if(layoutWidth>0&&layoutHeight>0){scheduleOnUI(function ItemLayoutTsx7Factory(_ref9){var _worklet_5927262822367_init_data=_ref9._worklet_5927262822367_init_data,measuredSize=_ref9.measuredSize,layoutWidth=_ref9.layoutWidth,layoutHeight=_ref9.layoutHeight,updateItemDimensions=_ref9.updateItemDimensions,index=_ref9.index;var _e=[new global.Error(),-6,-27];var ItemLayoutTsx7=function ItemLayoutTsx7(){var _measuredSize$value=measuredSize.value,prevWidth=_measuredSize$value.width,prevHeight=_measuredSize$value.height;if(prevWidth===layoutWidth&&prevHeight===layoutHeight)return;measuredSize.value={width:layoutWidth,height:layoutHeight};updateItemDimensions(index,{width:layoutWidth,height:layoutHeight});};ItemLayoutTsx7.__closure={measuredSize:measuredSize,layoutWidth:layoutWidth,layoutHeight:layoutHeight,updateItemDimensions:updateItemDimensions,index:index};ItemLayoutTsx7.__workletHash=5927262822367;ItemLayoutTsx7.__pluginVersion="0.5.2";ItemLayoutTsx7.__initData=_worklet_5927262822367_init_data;ItemLayoutTsx7.__stackDetails=_e;return ItemLayoutTsx7;}({_worklet_5927262822367_init_data:_worklet_5927262822367_init_data,measuredSize:measuredSize,layoutWidth:layoutWidth,layoutHeight:layoutHeight,updateItemDimensions:updateItemDimensions,index:index}));}(_child$props=child.props)==null||_child$props.onLayout==null||_child$props.onLayout(event);}}):child;return _jsx(Animated.View,{accessibilityElementsHidden:!isAccessibilityCurrent,accessible:isAccessibilityCurrent?undefined:false,"aria-hidden":!isAccessibilityCurrent,importantForAccessibility:isAccessibilityCurrent?"auto":"no-hide-descendants",style:[{position:"absolute",pointerEvents:"box-none"},dimensionsStyle,animatedStyle],testID:`__CAROUSEL_ITEM_${index}__`,children:enhancedChild});};
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx";import React from"react";import{StyleSheet}from"react-native";import Animated,{useAnimatedReaction,useAnimatedStyle,useDerivedValue,useSharedValue}from"react-native-reanimated";import{scheduleOnRN,scheduleOnUI}from"react-native-worklets";import{useOffsetX}from"../hooks/useOffsetX";import{useGlobalState}from"../store";import{getHorizontalStackOffsetType}from"../utils/carousel-direction";import{positiveModulo}from"../utils/carousel-math";import{sanitizeAnimationStyle}from"../utils/sanitize-animation-style";import{webOnlyDependencies}from"../utils/web-only-dependencies";import{jsx as _jsx}from"react/jsx-runtime";var _worklet_13098946080736_init_data={code:"function resolveItemMainAxisSize_ItemLayoutTsx1(params){var _ref;const{explicitSize:explicitSize,effectivePageSize:effectivePageSize,measuredSize:measuredSize}=params;return typeof explicitSize===\"number\"?explicitSize:(_ref=effectivePageSize!==null&&effectivePageSize!==void 0?effectivePageSize:measuredSize)!==null&&_ref!==void 0?_ref:\"100%\";}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"resolveItemMainAxisSize_ItemLayoutTsx1\",\"params\",\"_ref\",\"explicitSize\",\"effectivePageSize\",\"measuredSize\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AAwBO,SAAAA,sCAIJA,CAAAC,MAAA,MAAAC,IAAA,CAGD,KAAM,CAAEC,YAAY,CAAZA,YAAY,CAAEC,iBAAiB,CAAjBA,iBAAiB,CAAEC,YAAA,CAAAA,YAAa,CAAC,CAAGJ,MAAM,CAEhE,MAAO,OAAO,CAAAE,YAAY,GAAK,QAAQ,CACnCA,YAAY,EAAAD,IAAA,CACXE,iBAAiB,SAAjBA,iBAAiB,UAAjBA,iBAAiB,CAAIC,YAAY,UAAAH,IAAA,UAAAA,IAAA,CAAI,MAAO,CACnD\",\"ignoreList\":[]}"};export var resolveItemMainAxisSize=function resolveItemMainAxisSize_ItemLayoutTsx1Factory(_ref){var _worklet_13098946080736_init_data=_ref._worklet_13098946080736_init_data;var _e=[new global.Error(),1,-27];var resolveItemMainAxisSize=function resolveItemMainAxisSize(params){var _ref2;var explicitSize=params.explicitSize,effectivePageSize=params.effectivePageSize,measuredSize=params.measuredSize;return typeof explicitSize==="number"?explicitSize:(_ref2=effectivePageSize!=null?effectivePageSize:measuredSize)!=null?_ref2:"100%";};resolveItemMainAxisSize.__closure={};resolveItemMainAxisSize.__workletHash=13098946080736;resolveItemMainAxisSize.__pluginVersion="0.5.2";resolveItemMainAxisSize.__initData=_worklet_13098946080736_init_data;resolveItemMainAxisSize.__stackDetails=_e;return resolveItemMainAxisSize;}({_worklet_13098946080736_init_data:_worklet_13098946080736_init_data});var _worklet_12404262248346_init_data={code:"function ItemLayoutTsx2(){const{isVertical,styleWidthNumber,itemSize,styleHeightNumber,measuredSize,resolveItemMainAxisSize,effectivePageSize}=this.__closure;var _measuredSize$value$w,_measuredSize$value$h;const widthCandidate=isVertical?styleWidthNumber:itemSize;const heightCandidate=isVertical?itemSize:styleHeightNumber;const computedWidth=isVertical?typeof widthCandidate===\"number\"?widthCandidate:(_measuredSize$value$w=measuredSize.value.width)!==null&&_measuredSize$value$w!==void 0?_measuredSize$value$w:\"100%\":resolveItemMainAxisSize({explicitSize:widthCandidate,effectivePageSize:effectivePageSize,measuredSize:measuredSize.value.width});const computedHeight=isVertical?resolveItemMainAxisSize({explicitSize:heightCandidate,effectivePageSize:effectivePageSize,measuredSize:measuredSize.value.height}):typeof heightCandidate===\"number\"?heightCandidate:(_measuredSize$value$h=measuredSize.value.height)!==null&&_measuredSize$value$h!==void 0?_measuredSize$value$h:\"100%\";return{width:computedWidth,height:computedHeight};}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemLayoutTsx2\",\"isVertical\",\"styleWidthNumber\",\"itemSize\",\"styleHeightNumber\",\"measuredSize\",\"resolveItemMainAxisSize\",\"effectivePageSize\",\"__closure\",\"_measuredSize$value$w\",\"_measuredSize$value$h\",\"widthCandidate\",\"heightCandidate\",\"computedWidth\",\"value\",\"width\",\"explicitSize\",\"computedHeight\",\"height\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AA6EsD,SAAAA,cAAMA,CAAA,QAAAC,UAAA,CAAAC,gBAAA,CAAAC,QAAA,CAAAC,iBAAA,CAAAC,YAAA,CAAAC,uBAAA,CAAAC,iBAAA,OAAAC,SAAA,KAAAC,qBAAA,CAAAC,qBAAA,CACxD,KAAM,CAAAC,cAAc,CAAGV,UAAU,CAAGC,gBAAgB,CAAGC,QAAQ,CAC/D,KAAM,CAAAS,eAAe,CAAGX,UAAU,CAAGE,QAAQ,CAAGC,iBAAiB,CAEjE,KAAM,CAAAS,aAAa,CAAGZ,UAAU,CAC5B,MAAO,CAAAU,cAAc,GAAK,QAAQ,CAChCA,cAAc,EAAAF,qBAAA,CACbJ,YAAY,CAACS,KAAK,CAACC,KAAK,UAAAN,qBAAA,UAAAA,qBAAA,CAAI,MAAO,CACtCH,uBAAuB,CAAC,CACtBU,YAAY,CAAEL,cAAc,CAC5BJ,iBAAiB,CAAjBA,iBAAiB,CACjBF,YAAY,CAAEA,YAAY,CAACS,KAAK,CAACC,KACnC,CAAC,CAAC,CAEN,KAAM,CAAAE,cAAc,CAAGhB,UAAU,CAC7BK,uBAAuB,CAAC,CACtBU,YAAY,CAAEJ,eAAe,CAC7BL,iBAAiB,CAAjBA,iBAAiB,CACjBF,YAAY,CAAEA,YAAY,CAACS,KAAK,CAACI,MACnC,CAAC,CAAC,CACF,MAAO,CAAAN,eAAe,GAAK,QAAQ,CACjCA,eAAe,EAAAF,qBAAA,CACdL,YAAY,CAACS,KAAK,CAACI,MAAM,UAAAR,qBAAA,UAAAA,qBAAA,CAAI,MAAO,CAE3C,MAAO,CACLK,KAAK,CAAEF,aAAa,CACpBK,MAAM,CAAED,cACV,CAAC,CACH\",\"ignoreList\":[]}"};var _worklet_12045659402895_init_data={code:"function ItemLayoutTsx3(){const{size,dataLength,positiveModulo,handlerOffset,index}=this.__closure;return size>0&&dataLength>0&&positiveModulo(Math.round(-handlerOffset.value/size),dataLength)===index;}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemLayoutTsx3\",\"size\",\"dataLength\",\"positiveModulo\",\"handlerOffset\",\"index\",\"__closure\",\"Math\",\"round\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AAgIsD,SAAAA,cAAMA,CAAA,QAAAC,IAAA,CAAAC,UAAA,CAAAC,cAAA,CAAAC,aAAA,CAAAC,KAAA,OAAAC,SAAA,CAGxD,MACE,CAAAL,IAAI,CAAG,CAAC,EACRC,UAAU,CAAG,CAAC,EACdC,cAAc,CAACI,IAAI,CAACC,KAAK,CAAC,CAACJ,aAAa,CAACK,KAAK,CAAGR,IAAI,CAAC,CAAEC,UAAU,CAAC,GAAKG,KAAK,CAEjF\",\"ignoreList\":[]}"};var _worklet_10884764988886_init_data={code:"function ItemLayoutTsx4(isCurrent,wasCurrent){const{scheduleOnRN,setIsAccessibilityCurrent}=this.__closure;if(isCurrent!==wasCurrent){scheduleOnRN(setIsAccessibilityCurrent,isCurrent);}}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemLayoutTsx4\",\"isCurrent\",\"wasCurrent\",\"scheduleOnRN\",\"setIsAccessibilityCurrent\",\"__closure\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AA8II,QAAC,CAAAA,cAAWA,CAAAC,SAAU,CAAKC,UAAA,QAAAC,YAAA,CAAAC,yBAAA,OAAAC,SAAA,CACzB,GAAIJ,SAAS,GAAKC,UAAU,CAAE,CAC5BC,YAAY,CAACC,yBAAyB,CAAEH,SAAS,CAAC,CACpD,CACF\",\"ignoreList\":[]}"};var _worklet_7865013565607_init_data={code:"function ItemLayoutTsx5(){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\":[\"ItemLayoutTsx5\",\"size\",\"x\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AAuJ2C,SAAAA,cAAMA,CAAA,QAAAC,IAAA,CAAAC,CAAA,OAAAC,SAAA,CAC7C,GAAI,CAACF,IAAI,CAAE,MAAO,EAAC,CACnB,MAAO,CAAAC,CAAC,CAACE,KAAK,CAAGH,IAAI,CACvB\",\"ignoreList\":[]}"};var _worklet_12212549227805_init_data={code:"function ItemLayoutTsx6(){const{size,sanitizeAnimationStyle,animationStyle,x,rawIndex}=this.__closure;const safeSize=size||1;return sanitizeAnimationStyle(animationStyle(x.value/safeSize,rawIndex));}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemLayoutTsx6\",\"size\",\"sanitizeAnimationStyle\",\"animationStyle\",\"x\",\"rawIndex\",\"__closure\",\"safeSize\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AA4JoD,SAAAA,cAAMA,CAAA,QAAAC,IAAA,CAAAC,sBAAA,CAAAC,cAAA,CAAAC,CAAA,CAAAC,QAAA,OAAAC,SAAA,CACtD,KAAM,CAAAC,QAAQ,CAAGN,IAAI,EAAI,CAAC,CAC1B,MAAO,CAAAC,sBAAsB,CAACC,cAAc,CAACC,CAAC,CAACI,KAAK,CAAGD,QAAQ,CAAEF,QAAQ,CAAC,CAAC,CAC7E\",\"ignoreList\":[]}"};var _worklet_5927262822367_init_data={code:"function ItemLayoutTsx7(){const{measuredSize,layoutWidth,layoutHeight,updateItemDimensions,index}=this.__closure;const{width:prevWidth,height:prevHeight}=measuredSize.value;if(prevWidth===layoutWidth&&prevHeight===layoutHeight)return;measuredSize.value={width:layoutWidth,height:layoutHeight};updateItemDimensions(index,{width:layoutWidth,height:layoutHeight});}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx",sourceMap:"{\"version\":3,\"names\":[\"ItemLayoutTsx7\",\"measuredSize\",\"layoutWidth\",\"layoutHeight\",\"updateItemDimensions\",\"index\",\"__closure\",\"width\",\"prevWidth\",\"height\",\"prevHeight\",\"value\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/components/ItemLayout.tsx\"],\"mappings\":\"AAoLyB,SAAAA,cAAMA,CAAA,QAAAC,YAAA,CAAAC,WAAA,CAAAC,YAAA,CAAAC,oBAAA,CAAAC,KAAA,OAAAC,SAAA,CACjB,KAAM,CAAEC,KAAK,CAAEC,SAAS,CAAEC,MAAM,CAAEC,UAAW,CAAC,CAAGT,YAAY,CAACU,KAAK,CACnE,GAAIH,SAAS,GAAKN,WAAW,EAAIQ,UAAU,GAAKP,YAAY,CAAE,OAE9DF,YAAY,CAACU,KAAK,CAAG,CACnBJ,KAAK,CAAEL,WAAW,CAClBO,MAAM,CAAEN,YACV,CAAC,CACDC,oBAAoB,CAACC,KAAK,CAAE,CAC1BE,KAAK,CAAEL,WAAW,CAClBO,MAAM,CAAEN,YACV,CAAC,CAAC,CACJ\",\"ignoreList\":[]}"};export var ItemLayout=function ItemLayout(props){var handlerOffset=props.handlerOffset,index=props.index,rawIndex=props.rawIndex,children=props.children,visibleRanges=props.visibleRanges,animationStyle=props.animationStyle;var _useGlobalState=useGlobalState(),_useGlobalState$props=_useGlobalState.props,loop=_useGlobalState$props.loop,dataLength=_useGlobalState$props.dataLength,directionSign=_useGlobalState$props.directionSign,orientation=_useGlobalState$props.orientation,layout=_useGlobalState$props.layout,style=_useGlobalState$props.style,itemSize=_useGlobalState$props.itemSize,common=_useGlobalState.common,updateItemDimensions=_useGlobalState.layout.updateItemDimensions;var measuredSize=useSharedValue({width:null,height:null});var fallbackSize=common.size;var isVertical=orientation==="vertical";var _ref3=StyleSheet.flatten(style)||{},styleWidth=_ref3.width,styleHeight=_ref3.height;var styleWidthNumber=typeof styleWidth==="number"?styleWidth:undefined;var styleHeightNumber=typeof styleHeight==="number"?styleHeight:undefined;var size=(itemSize!=null?itemSize:fallbackSize)||0;var effectivePageSize=size>0?size:undefined;var dimensionsStyleDependencies=webOnlyDependencies([effectivePageSize,isVertical,itemSize,styleHeightNumber,styleWidthNumber]);var dimensionsStyle=useAnimatedStyle(function ItemLayoutTsx2Factory(_ref4){var _worklet_12404262248346_init_data=_ref4._worklet_12404262248346_init_data,isVertical=_ref4.isVertical,styleWidthNumber=_ref4.styleWidthNumber,itemSize=_ref4.itemSize,styleHeightNumber=_ref4.styleHeightNumber,measuredSize=_ref4.measuredSize,resolveItemMainAxisSize=_ref4.resolveItemMainAxisSize,effectivePageSize=_ref4.effectivePageSize;var _e=[new global.Error(),-8,-27];var ItemLayoutTsx2=function ItemLayoutTsx2(){var _measuredSize$value$w,_measuredSize$value$h;var widthCandidate=isVertical?styleWidthNumber:itemSize;var heightCandidate=isVertical?itemSize:styleHeightNumber;var computedWidth=isVertical?typeof widthCandidate==="number"?widthCandidate:(_measuredSize$value$w=measuredSize.value.width)!=null?_measuredSize$value$w:"100%":resolveItemMainAxisSize({explicitSize:widthCandidate,effectivePageSize:effectivePageSize,measuredSize:measuredSize.value.width});var computedHeight=isVertical?resolveItemMainAxisSize({explicitSize:heightCandidate,effectivePageSize:effectivePageSize,measuredSize:measuredSize.value.height}):typeof heightCandidate==="number"?heightCandidate:(_measuredSize$value$h=measuredSize.value.height)!=null?_measuredSize$value$h:"100%";return{width:computedWidth,height:computedHeight};};ItemLayoutTsx2.__closure={isVertical:isVertical,styleWidthNumber:styleWidthNumber,itemSize:itemSize,styleHeightNumber:styleHeightNumber,measuredSize:measuredSize,resolveItemMainAxisSize:resolveItemMainAxisSize,effectivePageSize:effectivePageSize};ItemLayoutTsx2.__workletHash=12404262248346;ItemLayoutTsx2.__pluginVersion="0.5.2";ItemLayoutTsx2.__initData=_worklet_12404262248346_init_data;ItemLayoutTsx2.__stackDetails=_e;return ItemLayoutTsx2;}({_worklet_12404262248346_init_data:_worklet_12404262248346_init_data,isVertical:isVertical,styleWidthNumber:styleWidthNumber,itemSize:itemSize,styleHeightNumber:styleHeightNumber,measuredSize:measuredSize,resolveItemMainAxisSize:resolveItemMainAxisSize,effectivePageSize:effectivePageSize}),dimensionsStyleDependencies);var offsetXConfig={handlerOffset:handlerOffset,index:index,size:size,dataLength:dataLength,loop:loop};if((layout==null?void 0:layout.type)==="horizontal-stack"){var _layout$exitDirection;offsetXConfig={handlerOffset:handlerOffset,index:index,size:size,dataLength:dataLength,loop:loop,type:getHorizontalStackOffsetType((_layout$exitDirection=layout.exitDirection)!=null?_layout$exitDirection:"left",directionSign),viewCount:layout.visibleCount};}var x=useOffsetX(offsetXConfig,visibleRanges);var isCurrentForAccessibility=React.useCallback(function ItemLayoutTsx3Factory(_ref5){var _worklet_12045659402895_init_data=_ref5._worklet_12045659402895_init_data,size=_ref5.size,dataLength=_ref5.dataLength,positiveModulo=_ref5.positiveModulo,handlerOffset=_ref5.handlerOffset,index=_ref5.index;var _e=[new global.Error(),-6,-27];var ItemLayoutTsx3=function ItemLayoutTsx3(){return size>0&&dataLength>0&&positiveModulo(Math.round(-handlerOffset.value/size),dataLength)===index;};ItemLayoutTsx3.__closure={size:size,dataLength:dataLength,positiveModulo:positiveModulo,handlerOffset:handlerOffset,index:index};ItemLayoutTsx3.__workletHash=12045659402895;ItemLayoutTsx3.__pluginVersion="0.5.2";ItemLayoutTsx3.__initData=_worklet_12045659402895_init_data;ItemLayoutTsx3.__stackDetails=_e;return ItemLayoutTsx3;}({_worklet_12045659402895_init_data:_worklet_12045659402895_init_data,size:size,dataLength:dataLength,positiveModulo:positiveModulo,handlerOffset:handlerOffset,index:index}),[dataLength,handlerOffset,index,size]);var _React$useState=React.useState(isCurrentForAccessibility),_React$useState2=_slicedToArray(_React$useState,2),isAccessibilityCurrent=_React$useState2[0],setIsAccessibilityCurrent=_React$useState2[1];useAnimatedReaction(isCurrentForAccessibility,function ItemLayoutTsx4Factory(_ref6){var _worklet_10884764988886_init_data=_ref6._worklet_10884764988886_init_data,scheduleOnRN=_ref6.scheduleOnRN,setIsAccessibilityCurrent=_ref6.setIsAccessibilityCurrent;var _e=[new global.Error(),-3,-27];var ItemLayoutTsx4=function ItemLayoutTsx4(isCurrent,wasCurrent){if(isCurrent!==wasCurrent){scheduleOnRN(setIsAccessibilityCurrent,isCurrent);}};ItemLayoutTsx4.__closure={scheduleOnRN:scheduleOnRN,setIsAccessibilityCurrent:setIsAccessibilityCurrent};ItemLayoutTsx4.__workletHash=10884764988886;ItemLayoutTsx4.__pluginVersion="0.5.2";ItemLayoutTsx4.__initData=_worklet_10884764988886_init_data;ItemLayoutTsx4.__stackDetails=_e;return ItemLayoutTsx4;}({_worklet_10884764988886_init_data:_worklet_10884764988886_init_data,scheduleOnRN:scheduleOnRN,setIsAccessibilityCurrent:setIsAccessibilityCurrent}),webOnlyDependencies([isCurrentForAccessibility]));var relativeProgressDependencies=webOnlyDependencies([x,size]);var relativeProgress=useDerivedValue(function ItemLayoutTsx5Factory(_ref7){var _worklet_7865013565607_init_data=_ref7._worklet_7865013565607_init_data,size=_ref7.size,x=_ref7.x;var _e=[new global.Error(),-3,-27];var ItemLayoutTsx5=function ItemLayoutTsx5(){if(!size)return 0;return x.value/size;};ItemLayoutTsx5.__closure={size:size,x:x};ItemLayoutTsx5.__workletHash=7865013565607;ItemLayoutTsx5.__pluginVersion="0.5.2";ItemLayoutTsx5.__initData=_worklet_7865013565607_init_data;ItemLayoutTsx5.__stackDetails=_e;return ItemLayoutTsx5;}({_worklet_7865013565607_init_data:_worklet_7865013565607_init_data,size:size,x:x}),relativeProgressDependencies);var animatedStyleDependencies=webOnlyDependencies([animationStyle,rawIndex,x,size]);var animatedStyle=useAnimatedStyle(function ItemLayoutTsx6Factory(_ref8){var _worklet_12212549227805_init_data=_ref8._worklet_12212549227805_init_data,size=_ref8.size,sanitizeAnimationStyle=_ref8.sanitizeAnimationStyle,animationStyle=_ref8.animationStyle,x=_ref8.x,rawIndex=_ref8.rawIndex;var _e=[new global.Error(),-6,-27];var ItemLayoutTsx6=function ItemLayoutTsx6(){var safeSize=size||1;return sanitizeAnimationStyle(animationStyle(x.value/safeSize,rawIndex));};ItemLayoutTsx6.__closure={size:size,sanitizeAnimationStyle:sanitizeAnimationStyle,animationStyle:animationStyle,x:x,rawIndex:rawIndex};ItemLayoutTsx6.__workletHash=12212549227805;ItemLayoutTsx6.__pluginVersion="0.5.2";ItemLayoutTsx6.__initData=_worklet_12212549227805_init_data;ItemLayoutTsx6.__stackDetails=_e;return ItemLayoutTsx6;}({_worklet_12212549227805_init_data:_worklet_12212549227805_init_data,size:size,sanitizeAnimationStyle:sanitizeAnimationStyle,animationStyle:animationStyle,x:x,rawIndex:rawIndex}),animatedStyleDependencies);var child=children({relativeProgress:relativeProgress});var enhancedChild=React.isValidElement(child)?React.cloneElement(child,{collapsable:false,onLayout:function onLayout(event){var _child$props;var _event$nativeEvent$la=event.nativeEvent.layout,layoutWidth=_event$nativeEvent$la.width,layoutHeight=_event$nativeEvent$la.height;if(layoutWidth>0&&layoutHeight>0){scheduleOnUI(function ItemLayoutTsx7Factory(_ref9){var _worklet_5927262822367_init_data=_ref9._worklet_5927262822367_init_data,measuredSize=_ref9.measuredSize,layoutWidth=_ref9.layoutWidth,layoutHeight=_ref9.layoutHeight,updateItemDimensions=_ref9.updateItemDimensions,index=_ref9.index;var _e=[new global.Error(),-6,-27];var ItemLayoutTsx7=function ItemLayoutTsx7(){var _measuredSize$value=measuredSize.value,prevWidth=_measuredSize$value.width,prevHeight=_measuredSize$value.height;if(prevWidth===layoutWidth&&prevHeight===layoutHeight)return;measuredSize.value={width:layoutWidth,height:layoutHeight};updateItemDimensions(index,{width:layoutWidth,height:layoutHeight});};ItemLayoutTsx7.__closure={measuredSize:measuredSize,layoutWidth:layoutWidth,layoutHeight:layoutHeight,updateItemDimensions:updateItemDimensions,index:index};ItemLayoutTsx7.__workletHash=5927262822367;ItemLayoutTsx7.__pluginVersion="0.5.2";ItemLayoutTsx7.__initData=_worklet_5927262822367_init_data;ItemLayoutTsx7.__stackDetails=_e;return ItemLayoutTsx7;}({_worklet_5927262822367_init_data:_worklet_5927262822367_init_data,measuredSize:measuredSize,layoutWidth:layoutWidth,layoutHeight:layoutHeight,updateItemDimensions:updateItemDimensions,index:index}));}(_child$props=child.props)==null||_child$props.onLayout==null||_child$props.onLayout(event);}}):child;return _jsx(Animated.View,{accessibilityElementsHidden:!isAccessibilityCurrent,accessible:isAccessibilityCurrent?undefined:false,"aria-hidden":!isAccessibilityCurrent,importantForAccessibility:isAccessibilityCurrent?"auto":"no-hide-descendants",style:[{position:"absolute",pointerEvents:"box-none"},dimensionsStyle,animatedStyle],testID:`__CAROUSEL_ITEM_${index}__`,children:enhancedChild});};
|
|
2
2
|
//# sourceMappingURL=ItemLayout.js.map
|