repoweaver
Version:
A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies
1 lines • 6.85 kB
JSON
{"ast":null,"code":"'use strict';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport AnimatedValue from \"./AnimatedValue\";\nimport AnimatedNode from \"./AnimatedNode\";\nimport { generateNewAnimationId, shouldUseNativeDriver } from \"../NativeAnimatedHelper\";\nclass AnimatedTracking extends AnimatedNode {\n constructor(value, parent, animationClass, animationConfig, callback) {\n super();\n this._value = value;\n this._parent = parent;\n this._animationClass = animationClass;\n this._animationConfig = animationConfig;\n this._useNativeDriver = shouldUseNativeDriver(animationConfig);\n this._callback = callback;\n this.__attach();\n }\n __makeNative() {\n this.__isNative = true;\n this._parent.__makeNative();\n super.__makeNative();\n this._value.__makeNative();\n }\n __getValue() {\n return this._parent.__getValue();\n }\n __attach() {\n this._parent.__addChild(this);\n if (this._useNativeDriver) {\n this.__makeNative();\n }\n }\n __detach() {\n this._parent.__removeChild(this);\n super.__detach();\n }\n update() {\n this._value.animate(new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n toValue: this._animationConfig.toValue.__getValue()\n })), this._callback);\n }\n __getNativeConfig() {\n var animation = new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n toValue: undefined\n }));\n var animationConfig = animation.__getNativeAnimationConfig();\n return {\n type: 'tracking',\n animationId: generateNewAnimationId(),\n animationConfig,\n toValue: this._parent.__getNativeTag(),\n value: this._value.__getNativeTag()\n };\n }\n}\nexport default AnimatedTracking;","map":{"version":3,"names":["_objectSpread","AnimatedValue","AnimatedNode","generateNewAnimationId","shouldUseNativeDriver","AnimatedTracking","constructor","value","parent","animationClass","animationConfig","callback","_value","_parent","_animationClass","_animationConfig","_useNativeDriver","_callback","__attach","__makeNative","__isNative","__getValue","__addChild","__detach","__removeChild","update","animate","toValue","__getNativeConfig","animation","undefined","__getNativeAnimationConfig","type","animationId","__getNativeTag"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedTracking.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 _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedNode from './AnimatedNode';\nimport { generateNewAnimationId, shouldUseNativeDriver } from '../NativeAnimatedHelper';\nclass AnimatedTracking extends AnimatedNode {\n constructor(value, parent, animationClass, animationConfig, callback) {\n super();\n this._value = value;\n this._parent = parent;\n this._animationClass = animationClass;\n this._animationConfig = animationConfig;\n this._useNativeDriver = shouldUseNativeDriver(animationConfig);\n this._callback = callback;\n this.__attach();\n }\n __makeNative() {\n this.__isNative = true;\n this._parent.__makeNative();\n super.__makeNative();\n this._value.__makeNative();\n }\n __getValue() {\n return this._parent.__getValue();\n }\n __attach() {\n this._parent.__addChild(this);\n if (this._useNativeDriver) {\n // when the tracking starts we need to convert this node to a \"native node\"\n // so that the parent node will be made \"native\" too. This is necessary as\n // if we don't do this `update` method will get called. At that point it\n // may be too late as it would mean the JS driver has already started\n // updating node values\n this.__makeNative();\n }\n }\n __detach() {\n this._parent.__removeChild(this);\n super.__detach();\n }\n update() {\n this._value.animate(new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n toValue: this._animationConfig.toValue.__getValue()\n })), this._callback);\n }\n __getNativeConfig() {\n var animation = new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n // remove toValue from the config as it's a ref to Animated.Value\n toValue: undefined\n }));\n var animationConfig = animation.__getNativeAnimationConfig();\n return {\n type: 'tracking',\n animationId: generateNewAnimationId(),\n animationConfig,\n toValue: this._parent.__getNativeTag(),\n value: this._value.__getNativeTag()\n };\n }\n}\nexport default AnimatedTracking;"],"mappings":"AAUA,YAAY;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a,CAACA,aAAa,CAAC,CAAC,CAAC,EAAE,IAAI,CAACe,gBAAgB,CAAC,EAAE,CAAC,CAAC,EAAE;MACvGY,OAAO,EAAE,IAAI,CAACZ,gBAAgB,CAACY,OAAO,CAACN,UAAU,CAAC;IACpD,CAAC,CAAC,CAAC,EAAE,IAAI,CAACJ,SAAS,CAAC;EACtB;EACAW,iBAAiBA,CAAA,EAAG;IAClB,IAAIC,SAAS,GAAG,IAAI,IAAI,CAACf,eAAe,CAACd,aAAa,CAACA,aAAa,CAAC,CAAC,CAAC,EAAE,IAAI,CAACe,gBAAgB,CAAC,EAAE,CAAC,CAAC,EAAE;MAEnGY,OAAO,EAAEG;IACX,CAAC,CAAC,CAAC;IACH,IAAIpB,eAAe,GAAGmB,SAAS,CAACE,0BAA0B,CAAC,CAAC;IAC5D,OAAO;MACLC,IAAI,EAAE,UAAU;MAChBC,WAAW,EAAE9B,sBAAsB,CAAC,CAAC;MACrCO,eAAe;MACfiB,OAAO,EAAE,IAAI,CAACd,OAAO,CAACqB,cAAc,CAAC,CAAC;MACtC3B,KAAK,EAAE,IAAI,CAACK,MAAM,CAACsB,cAAc,CAAC;IACpC,CAAC;EACH;AACF;AACA,eAAe7B,gBAAgB","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}