repoweaver
Version:
A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies
1 lines • 5.3 kB
JSON
{"ast":null,"code":"'use strict';\n\nimport NativeAnimatedHelper from \"../NativeAnimatedHelper\";\nvar startNativeAnimationNextId = 1;\nclass Animation {\n start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {}\n stop() {\n if (this.__nativeId) {\n NativeAnimatedHelper.API.stopAnimation(this.__nativeId);\n }\n }\n __getNativeAnimationConfig() {\n throw new Error('This animation type cannot be offloaded to native');\n }\n __debouncedOnEnd(result) {\n var onEnd = this.__onEnd;\n this.__onEnd = null;\n onEnd && onEnd(result);\n }\n __startNativeAnimation(animatedValue) {\n var startNativeAnimationWaitId = startNativeAnimationNextId + \":startAnimation\";\n startNativeAnimationNextId += 1;\n NativeAnimatedHelper.API.setWaitingForIdentifier(startNativeAnimationWaitId);\n try {\n var config = this.__getNativeAnimationConfig();\n animatedValue.__makeNative(config.platformConfig);\n this.__nativeId = NativeAnimatedHelper.generateNewAnimationId();\n NativeAnimatedHelper.API.startAnimatingNode(this.__nativeId, animatedValue.__getNativeTag(), config, this.__debouncedOnEnd.bind(this));\n } catch (e) {\n throw e;\n } finally {\n NativeAnimatedHelper.API.unsetWaitingForIdentifier(startNativeAnimationWaitId);\n }\n }\n}\nexport default Animation;","map":{"version":3,"names":["NativeAnimatedHelper","startNativeAnimationNextId","Animation","start","fromValue","onUpdate","onEnd","previousAnimation","animatedValue","stop","__nativeId","API","stopAnimation","__getNativeAnimationConfig","Error","__debouncedOnEnd","result","__onEnd","__startNativeAnimation","startNativeAnimationWaitId","setWaitingForIdentifier","config","__makeNative","platformConfig","generateNewAnimationId","startAnimatingNode","__getNativeTag","bind","e","unsetWaitingForIdentifier"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-web/dist/vendor/react-native/Animated/animations/Animation.js"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n\n'use strict';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar startNativeAnimationNextId = 1;\n\n// Important note: start() and stop() will only be called at most once.\n// Once an animation has been stopped or finished its course, it will\n// not be reused.\nclass Animation {\n start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {}\n stop() {\n if (this.__nativeId) {\n NativeAnimatedHelper.API.stopAnimation(this.__nativeId);\n }\n }\n __getNativeAnimationConfig() {\n // Subclasses that have corresponding animation implementation done in native\n // should override this method\n throw new Error('This animation type cannot be offloaded to native');\n }\n // Helper function for subclasses to make sure onEnd is only called once.\n __debouncedOnEnd(result) {\n var onEnd = this.__onEnd;\n this.__onEnd = null;\n onEnd && onEnd(result);\n }\n __startNativeAnimation(animatedValue) {\n var startNativeAnimationWaitId = startNativeAnimationNextId + \":startAnimation\";\n startNativeAnimationNextId += 1;\n NativeAnimatedHelper.API.setWaitingForIdentifier(startNativeAnimationWaitId);\n try {\n var config = this.__getNativeAnimationConfig();\n animatedValue.__makeNative(config.platformConfig);\n this.__nativeId = NativeAnimatedHelper.generateNewAnimationId();\n NativeAnimatedHelper.API.startAnimatingNode(this.__nativeId, animatedValue.__getNativeTag(), config,\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this.__debouncedOnEnd.bind(this));\n } catch (e) {\n throw e;\n } finally {\n NativeAnimatedHelper.API.unsetWaitingForIdentifier(startNativeAnimationWaitId);\n }\n }\n}\nexport default Animation;"],"mappings":"AAUA,YAAY;;AAEZ,OAAOA,oBAAoB;AAC3B,IAAIC,0BAA0B,GAAG,CAAC;AAKlC,MAAMC,SAAS,CAAC;EACdC,KAAKA,CAACC,SAAS,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,iBAAiB,EAAEC,aAAa,EAAE,CAAC;EACrEC,IAAIA,CAAA,EAAG;IACL,IAAI,IAAI,CAACC,UAAU,EAAE;MACnBV,oBAAoB,CAACW,GAAG,CAACC,aAAa,CAAC,IAAI,CAACF,UAAU,CAAC;IACzD;EACF;EACAG,0BAA0BA,CAAA,EAAG;IAG3B,MAAM,IAAIC,KAAK,CAAC,mDAAmD,CAAC;EACtE;EAEAC,gBAAgBA,CAACC,MAAM,EAAE;IACvB,IAAIV,KAAK,GAAG,IAAI,CAACW,OAAO;IACxB,IAAI,CAACA,OAAO,GAAG,IAAI;IACnBX,KAAK,IAAIA,KAAK,CAACU,MAAM,CAAC;EACxB;EACAE,sBAAsBA,CAACV,aAAa,EAAE;IACpC,IAAIW,0BAA0B,GAAGlB,0BAA0B,GAAG,iBAAiB;IAC/EA,0BAA0B,IAAI,CAAC;IAC/BD,oBAAoB,CAACW,GAAG,CAACS,uBAAuB,CAACD,0BAA0B,CAAC;IAC5E,IAAI;MACF,IAAIE,MAAM,GAAG,IAAI,CAACR,0BAA0B,CAAC,CAAC;MAC9CL,aAAa,CAACc,YAAY,CAACD,MAAM,CAACE,cAAc,CAAC;MACjD,IAAI,CAACb,UAAU,GAAGV,oBAAoB,CAACwB,sBAAsB,CAAC,CAAC;MAC/DxB,oBAAoB,CAACW,GAAG,CAACc,kBAAkB,CAAC,IAAI,CAACf,UAAU,EAAEF,aAAa,CAACkB,cAAc,CAAC,CAAC,EAAEL,MAAM,EAEnG,IAAI,CAACN,gBAAgB,CAACY,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC,CAAC,OAAOC,CAAC,EAAE;MACV,MAAMA,CAAC;IACT,CAAC,SAAS;MACR5B,oBAAoB,CAACW,GAAG,CAACkB,yBAAyB,CAACV,0BAA0B,CAAC;IAChF;EACF;AACF;AACA,eAAejB,SAAS","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}