UNPKG

repoweaver

Version:

A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies

1 lines 12.9 kB
{"ast":null,"code":"'use strict';\n\nimport AnimatedValue from \"../nodes/AnimatedValue\";\nimport AnimatedValueXY from \"../nodes/AnimatedValueXY\";\nimport AnimatedInterpolation from \"../nodes/AnimatedInterpolation\";\nimport Easing from \"../../../../exports/Easing\";\nimport Animation from \"./Animation\";\nimport { shouldUseNativeDriver } from \"../NativeAnimatedHelper\";\nimport AnimatedColor from \"../nodes/AnimatedColor\";\nvar _easeInOut;\nfunction easeInOut() {\n if (!_easeInOut) {\n _easeInOut = Easing.inOut(Easing.ease);\n }\n return _easeInOut;\n}\nclass TimingAnimation extends Animation {\n constructor(config) {\n var _config$easing, _config$duration, _config$delay, _config$iterations, _config$isInteraction;\n super();\n this._toValue = config.toValue;\n this._easing = (_config$easing = config.easing) !== null && _config$easing !== void 0 ? _config$easing : easeInOut();\n this._duration = (_config$duration = config.duration) !== null && _config$duration !== void 0 ? _config$duration : 500;\n this._delay = (_config$delay = config.delay) !== null && _config$delay !== void 0 ? _config$delay : 0;\n this.__iterations = (_config$iterations = config.iterations) !== null && _config$iterations !== void 0 ? _config$iterations : 1;\n this._useNativeDriver = shouldUseNativeDriver(config);\n this._platformConfig = config.platformConfig;\n this.__isInteraction = (_config$isInteraction = config.isInteraction) !== null && _config$isInteraction !== void 0 ? _config$isInteraction : !this._useNativeDriver;\n }\n __getNativeAnimationConfig() {\n var frameDuration = 1000.0 / 60.0;\n var frames = [];\n var numFrames = Math.round(this._duration / frameDuration);\n for (var frame = 0; frame < numFrames; frame++) {\n frames.push(this._easing(frame / numFrames));\n }\n frames.push(this._easing(1));\n return {\n type: 'frames',\n frames,\n toValue: this._toValue,\n iterations: this.__iterations,\n platformConfig: this._platformConfig\n };\n }\n start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {\n this.__active = true;\n this._fromValue = fromValue;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n var start = () => {\n if (this._duration === 0 && !this._useNativeDriver) {\n this._onUpdate(this._toValue);\n this.__debouncedOnEnd({\n finished: true\n });\n } else {\n this._startTime = Date.now();\n if (this._useNativeDriver) {\n this.__startNativeAnimation(animatedValue);\n } else {\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n }\n };\n if (this._delay) {\n this._timeout = setTimeout(start, this._delay);\n } else {\n start();\n }\n }\n onUpdate() {\n var now = Date.now();\n if (now >= this._startTime + this._duration) {\n if (this._duration === 0) {\n this._onUpdate(this._toValue);\n } else {\n this._onUpdate(this._fromValue + this._easing(1) * (this._toValue - this._fromValue));\n }\n this.__debouncedOnEnd({\n finished: true\n });\n return;\n }\n this._onUpdate(this._fromValue + this._easing((now - this._startTime) / this._duration) * (this._toValue - this._fromValue));\n if (this.__active) {\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n }\n stop() {\n super.stop();\n this.__active = false;\n clearTimeout(this._timeout);\n global.cancelAnimationFrame(this._animationFrame);\n this.__debouncedOnEnd({\n finished: false\n });\n }\n}\nexport default TimingAnimation;","map":{"version":3,"names":["AnimatedValue","AnimatedValueXY","AnimatedInterpolation","Easing","Animation","shouldUseNativeDriver","AnimatedColor","_easeInOut","easeInOut","inOut","ease","TimingAnimation","constructor","config","_config$easing","_config$duration","_config$delay","_config$iterations","_config$isInteraction","_toValue","toValue","_easing","easing","_duration","duration","_delay","delay","__iterations","iterations","_useNativeDriver","_platformConfig","platformConfig","__isInteraction","isInteraction","__getNativeAnimationConfig","frameDuration","frames","numFrames","Math","round","frame","push","type","start","fromValue","onUpdate","onEnd","previousAnimation","animatedValue","__active","_fromValue","_onUpdate","__onEnd","__debouncedOnEnd","finished","_startTime","Date","now","__startNativeAnimation","_animationFrame","requestAnimationFrame","bind","_timeout","setTimeout","stop","clearTimeout","global","cancelAnimationFrame"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-web/dist/vendor/react-native/Animated/animations/TimingAnimation.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 AnimatedValue from '../nodes/AnimatedValue';\nimport AnimatedValueXY from '../nodes/AnimatedValueXY';\nimport AnimatedInterpolation from '../nodes/AnimatedInterpolation';\nimport Easing from '../../../../exports/Easing';\nimport Animation from './Animation';\nimport { shouldUseNativeDriver } from '../NativeAnimatedHelper';\nimport AnimatedColor from '../nodes/AnimatedColor';\nvar _easeInOut;\nfunction easeInOut() {\n if (!_easeInOut) {\n _easeInOut = Easing.inOut(Easing.ease);\n }\n return _easeInOut;\n}\nclass TimingAnimation extends Animation {\n constructor(config) {\n var _config$easing, _config$duration, _config$delay, _config$iterations, _config$isInteraction;\n super();\n this._toValue = config.toValue;\n this._easing = (_config$easing = config.easing) !== null && _config$easing !== void 0 ? _config$easing : easeInOut();\n this._duration = (_config$duration = config.duration) !== null && _config$duration !== void 0 ? _config$duration : 500;\n this._delay = (_config$delay = config.delay) !== null && _config$delay !== void 0 ? _config$delay : 0;\n this.__iterations = (_config$iterations = config.iterations) !== null && _config$iterations !== void 0 ? _config$iterations : 1;\n this._useNativeDriver = shouldUseNativeDriver(config);\n this._platformConfig = config.platformConfig;\n this.__isInteraction = (_config$isInteraction = config.isInteraction) !== null && _config$isInteraction !== void 0 ? _config$isInteraction : !this._useNativeDriver;\n }\n __getNativeAnimationConfig() {\n var frameDuration = 1000.0 / 60.0;\n var frames = [];\n var numFrames = Math.round(this._duration / frameDuration);\n for (var frame = 0; frame < numFrames; frame++) {\n frames.push(this._easing(frame / numFrames));\n }\n frames.push(this._easing(1));\n return {\n type: 'frames',\n frames,\n toValue: this._toValue,\n iterations: this.__iterations,\n platformConfig: this._platformConfig\n };\n }\n start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {\n this.__active = true;\n this._fromValue = fromValue;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n var start = () => {\n // Animations that sometimes have 0 duration and sometimes do not\n // still need to use the native driver when duration is 0 so as to\n // not cause intermixed JS and native animations.\n if (this._duration === 0 && !this._useNativeDriver) {\n this._onUpdate(this._toValue);\n this.__debouncedOnEnd({\n finished: true\n });\n } else {\n this._startTime = Date.now();\n if (this._useNativeDriver) {\n this.__startNativeAnimation(animatedValue);\n } else {\n this._animationFrame = requestAnimationFrame(\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this.onUpdate.bind(this));\n }\n }\n };\n if (this._delay) {\n this._timeout = setTimeout(start, this._delay);\n } else {\n start();\n }\n }\n onUpdate() {\n var now = Date.now();\n if (now >= this._startTime + this._duration) {\n if (this._duration === 0) {\n this._onUpdate(this._toValue);\n } else {\n this._onUpdate(this._fromValue + this._easing(1) * (this._toValue - this._fromValue));\n }\n this.__debouncedOnEnd({\n finished: true\n });\n return;\n }\n this._onUpdate(this._fromValue + this._easing((now - this._startTime) / this._duration) * (this._toValue - this._fromValue));\n if (this.__active) {\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n }\n stop() {\n super.stop();\n this.__active = false;\n clearTimeout(this._timeout);\n global.cancelAnimationFrame(this._animationFrame);\n this.__debouncedOnEnd({\n finished: false\n });\n }\n}\nexport default TimingAnimation;"],"mappings":"AAUA,YAAY;;AAEZ,OAAOA,aAAa;AACpB,OAAOC,eAAe;AACtB,OAAOC,qBAAqB;AAC5B,OAAOC,MAAM;AACb,OAAOC,SAAS;AAChB,SAASC,qBAAqB;AAC9B,OAAOC,aAAa;AACpB,IAAIC,UAAU;AACd,SAASC,SAASA,CAAA,EAAG;EACnB,IAAI,CAACD,UAAU,EAAE;IACfA,UAAU,GAAGJ,MAAM,CAACM,KAAK,CAACN,MAAM,CAACO,IAAI,CAAC;EACxC;EACA,OAAOH,UAAU;AACnB;AACA,MAAMI,eAAe,SAASP,SAAS,CAAC;EACt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