react-native-reanimated-carousel
Version:
Simple carousel component.fully implemented using Reanimated 2.Infinitely scrolling, very smooth.
2 lines • 4.02 kB
JavaScript
Object.defineProperty(exports,"__esModule",{value:true});exports.dealWithAnimation=void 0;var _reactNativeReanimated=require("react-native-reanimated");var _worklet_13418076816509_init_data={code:"function dealWithAnimation(withAnimation) {\n const {\n withSpring,\n withTiming\n } = this._closure;\n switch (withAnimation.type) {\n case \"spring\":\n return function (value, cb) {\n return withSpring(value, withAnimation.config, function (isFinished) {\n return cb(isFinished);\n });\n };\n case \"timing\":\n return function (value, cb) {\n return withTiming(value, withAnimation.config, function (isFinished) {\n return cb(isFinished);\n });\n };\n }\n}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/utils/dealWithAnimation.ts",sourceMap:"{\"version\":3,\"names\":[\"dealWithAnimation\",\"withAnimation\",\"withSpring\",\"withTiming\",\"_closure\",\"type\",\"value\",\"cb\",\"config\",\"isFinished\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/utils/dealWithAnimation.ts\"],\"mappings\":\"AAIO,SAAAA,iBAASA,CACdC,aAAA,EACD;EAAA;IAAAC,UAAA;IAAAC;EAAA,SAAAC,QAAA;EAEC,QAAQH,aAAa,CAACI,IAAI;IACxB,KAAK,QAAQ;MACX,OAAO,UAACC,KAAK,EAAEC,EAAE;QAAA,OAAKL,UAAU,CAACI,KAAK,EAAEL,aAAa,CAACO,MAAM,EAAE,UAAAC,UAAU;UAAA,OACtEF,EAAE,CAACE,UAAqB,CAC1B;QAAA,EAAC;MAAA;IACH,KAAK,QAAQ;MACX,OAAO,UAACH,KAAK,EAAEC,EAAE;QAAA,OAAKJ,UAAU,CAACG,KAAK,EAAEL,aAAa,CAACO,MAAM,EAAE,UAAAC,UAAU;UAAA,OACtEF,EAAE,CAACE,UAAqB,CAC1B;QAAA,EAAC;MAAA;EACL;AACF\"}"};var _worklet_6414328185064_init_data={code:"function anonymous(isFinished) {\n const {\n cb\n } = this._closure;\n return cb(isFinished);\n}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/utils/dealWithAnimation.ts",sourceMap:"{\"version\":3,\"names\":[\"anonymous\",\"isFinished\",\"cb\",\"_closure\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/utils/dealWithAnimation.ts\"],\"mappings\":\"AAUoE,SAAAA,UAAAC,UAAU;EAAA;IAAAC;EAAA,SAAAC,QAAA;EAAA,OACtED,EAAE,CAACD,UAAqB;AAAA\"}"};var _worklet_6414328185064_init_data2={code:"function anonymous(isFinished) {\n const {\n cb\n } = this._closure;\n return cb(isFinished);\n}",location:"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/utils/dealWithAnimation.ts",sourceMap:"{\"version\":3,\"names\":[\"anonymous\",\"isFinished\",\"cb\",\"_closure\"],\"sources\":[\"/home/runner/work/react-native-reanimated-carousel/react-native-reanimated-carousel/src/utils/dealWithAnimation.ts\"],\"mappings\":\"AAcoE,SAAAA,UAAAC,UAAU;EAAA;IAAAC;EAAA,SAAAC,QAAA;EAAA,OACtED,EAAE,CAACD,UAAqB;AAAA\"}"};var dealWithAnimation=function(){var _e=[new global.Error(),-3,-27];var _f=function _f(withAnimation){switch(withAnimation.type){case"spring":return function(value,cb){return(0,_reactNativeReanimated.withSpring)(value,withAnimation.config,function(){var _e=[new global.Error(),-2,-27];var _f=function _f(isFinished){return cb(isFinished);};_f._closure={cb:cb};_f.__initData=_worklet_6414328185064_init_data;_f.__workletHash=6414328185064;_f.__stackDetails=_e;_f.__version="3.3.0";return _f;}());};case"timing":return function(value,cb){return(0,_reactNativeReanimated.withTiming)(value,withAnimation.config,function(){var _e=[new global.Error(),-2,-27];var _f=function _f(isFinished){return cb(isFinished);};_f._closure={cb:cb};_f.__initData=_worklet_6414328185064_init_data2;_f.__workletHash=6414328185064;_f.__stackDetails=_e;_f.__version="3.3.0";return _f;}());};}};_f._closure={withSpring:_reactNativeReanimated.withSpring,withTiming:_reactNativeReanimated.withTiming};_f.__initData=_worklet_13418076816509_init_data;_f.__workletHash=13418076816509;_f.__stackDetails=_e;_f.__version="3.3.0";return _f;}();exports.dealWithAnimation=dealWithAnimation;
//# sourceMappingURL=dealWithAnimation.js.map