Socket
Socket
Sign inDemoInstall

react-motion

Package Overview
Dependencies
5
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.6 to 0.4.7

2

bower.json
{
"name": "react-motion",
"version": "0.4.6",
"version": "0.4.7",
"homepage": "https://github.com/chenglou/react-motion",

@@ -5,0 +5,0 @@ "authors": [

@@ -1166,9 +1166,11 @@ (function webpackUniversalModuleDefinition(root, factory) {

// dest doesn't change, that's owner's
function mergeAndSync(willEnter, willLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldLastIdealStyles, oldLastIdealVelocities) {
function mergeAndSync(willEnter, willLeave, didLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldLastIdealStyles, oldLastIdealVelocities) {
var newMergedPropsStyles = _mergeDiff2['default'](oldMergedPropsStyles, destStyles, function (oldIndex, oldMergedPropsStyle) {
var leavingStyle = willLeave(oldMergedPropsStyle);
if (leavingStyle == null) {
didLeave({ key: oldMergedPropsStyle.key, data: oldMergedPropsStyle.data });
return null;
}
if (_shouldStopAnimation2['default'](oldCurrentStyles[oldIndex], leavingStyle, oldCurrentVelocities[oldIndex])) {
didLeave({ key: oldMergedPropsStyle.key, data: oldMergedPropsStyle.data });
return null;

@@ -1227,4 +1229,5 @@ }

children: _react.PropTypes.func.isRequired,
willEnter: _react.PropTypes.func,
willLeave: _react.PropTypes.func,
willEnter: _react.PropTypes.func
didLeave: _react.PropTypes.func
},

@@ -1241,3 +1244,4 @@

return null;
}
},
didLeave: function didLeave() {}
};

@@ -1252,2 +1256,3 @@ },

var willLeave = _props.willLeave;
var didLeave = _props.didLeave;

@@ -1289,3 +1294,3 @@ var destStyles = typeof styles === 'function' ? styles(defaultStyles) : styles;

// and will always be present.
willEnter, willLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldCurrentStyles, // oldLastIdealStyles really
willEnter, willLeave, didLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldCurrentStyles, // oldLastIdealStyles really
oldCurrentVelocities);

@@ -1323,3 +1328,3 @@

clearUnreadPropStyle: function clearUnreadPropStyle(unreadPropStyles) {
var _mergeAndSync2 = mergeAndSync(this.props.willEnter, this.props.willLeave, this.state.mergedPropsStyles, unreadPropStyles, this.state.currentStyles, this.state.currentVelocities, this.state.lastIdealStyles, this.state.lastIdealVelocities);
var _mergeAndSync2 = mergeAndSync(this.props.willEnter, this.props.willLeave, this.props.didLeave, this.state.mergedPropsStyles, unreadPropStyles, this.state.currentStyles, this.state.currentVelocities, this.state.lastIdealStyles, this.state.lastIdealVelocities);

@@ -1415,3 +1420,3 @@ var mergedPropsStyles = _mergeAndSync2[0];

var _mergeAndSync3 = mergeAndSync(_this.props.willEnter, _this.props.willLeave, _this.state.mergedPropsStyles, destStyles, _this.state.currentStyles, _this.state.currentVelocities, _this.state.lastIdealStyles, _this.state.lastIdealVelocities);
var _mergeAndSync3 = mergeAndSync(_this.props.willEnter, _this.props.willLeave, _this.props.didLeave, _this.state.mergedPropsStyles, destStyles, _this.state.currentStyles, _this.state.currentVelocities, _this.state.lastIdealStyles, _this.state.lastIdealVelocities);

@@ -1418,0 +1423,0 @@ var newMergedPropsStyles = _mergeAndSync3[0];

@@ -6,2 +6,5 @@ Legend:

### 0.4.7 (December 15th 2016)
- [I] `didLeave` for `TransitionMotion`! Please check the README for more.
### 0.4.4 (June 4th 2016)

@@ -8,0 +11,0 @@ - [F] Small fix to component unmounting bug (https://github.com/chenglou/react-motion/commit/49ea396041b0031b95f4941cc7efce200fcca454). It's not clear why this is erroring, but people want the temp fix.

@@ -115,9 +115,11 @@ 'use strict';

// dest doesn't change, that's owner's
function mergeAndSync(willEnter, willLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldLastIdealStyles, oldLastIdealVelocities) {
function mergeAndSync(willEnter, willLeave, didLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldLastIdealStyles, oldLastIdealVelocities) {
var newMergedPropsStyles = _mergeDiff2['default'](oldMergedPropsStyles, destStyles, function (oldIndex, oldMergedPropsStyle) {
var leavingStyle = willLeave(oldMergedPropsStyle);
if (leavingStyle == null) {
didLeave({ key: oldMergedPropsStyle.key, data: oldMergedPropsStyle.data });
return null;
}
if (_shouldStopAnimation2['default'](oldCurrentStyles[oldIndex], leavingStyle, oldCurrentVelocities[oldIndex])) {
didLeave({ key: oldMergedPropsStyle.key, data: oldMergedPropsStyle.data });
return null;

@@ -176,4 +178,5 @@ }

children: _react.PropTypes.func.isRequired,
willEnter: _react.PropTypes.func,
willLeave: _react.PropTypes.func,
willEnter: _react.PropTypes.func
didLeave: _react.PropTypes.func
},

@@ -190,3 +193,4 @@

return null;
}
},
didLeave: function didLeave() {}
};

@@ -201,2 +205,3 @@ },

var willLeave = _props.willLeave;
var didLeave = _props.didLeave;

@@ -238,3 +243,3 @@ var destStyles = typeof styles === 'function' ? styles(defaultStyles) : styles;

// and will always be present.
willEnter, willLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldCurrentStyles, // oldLastIdealStyles really
willEnter, willLeave, didLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldCurrentStyles, // oldLastIdealStyles really
oldCurrentVelocities);

@@ -272,3 +277,3 @@

clearUnreadPropStyle: function clearUnreadPropStyle(unreadPropStyles) {
var _mergeAndSync2 = mergeAndSync(this.props.willEnter, this.props.willLeave, this.state.mergedPropsStyles, unreadPropStyles, this.state.currentStyles, this.state.currentVelocities, this.state.lastIdealStyles, this.state.lastIdealVelocities);
var _mergeAndSync2 = mergeAndSync(this.props.willEnter, this.props.willLeave, this.props.didLeave, this.state.mergedPropsStyles, unreadPropStyles, this.state.currentStyles, this.state.currentVelocities, this.state.lastIdealStyles, this.state.lastIdealVelocities);

@@ -364,3 +369,3 @@ var mergedPropsStyles = _mergeAndSync2[0];

var _mergeAndSync3 = mergeAndSync(_this.props.willEnter, _this.props.willLeave, _this.state.mergedPropsStyles, destStyles, _this.state.currentStyles, _this.state.currentVelocities, _this.state.lastIdealStyles, _this.state.lastIdealVelocities);
var _mergeAndSync3 = mergeAndSync(_this.props.willEnter, _this.props.willLeave, _this.props.didLeave, _this.state.mergedPropsStyles, destStyles, _this.state.currentStyles, _this.state.currentVelocities, _this.state.lastIdealStyles, _this.state.lastIdealVelocities);

@@ -367,0 +372,0 @@ var newMergedPropsStyles = _mergeAndSync3[0];

{
"name": "react-motion",
"version": "0.4.6",
"version": "0.4.7",
"description": "A spring that solves your animation problems.",

@@ -50,3 +50,3 @@ "main": "lib/react-motion.js",

"flow_check": "flow check",
"prerelease": "rm -rf lib && babel src --out-dir lib && flow-copy-source -v src lib && webpack --config webpack.prod.config.js",
"prepublish": "rm -rf lib && babel src --out-dir lib && flow-copy-source -v src lib && webpack --config webpack.prod.config.js",
"test": "karma start ./karma.conf.js --single-run",

@@ -53,0 +53,0 @@ "test:travis": "karma start ./karma.conf.js --single-run",

@@ -65,3 +65,3 @@ # React-Motion

To build the repo yourself: `npm run prerelease`.
To build the repo yourself: `npm run prepublish`.

@@ -68,0 +68,0 @@ ## What does this library try to solve?

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc