Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

universal-transition

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

universal-transition - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

208

dist/transition.factory.js

@@ -15,5 +15,5 @@ module.exports = function(require, exports, module) {

/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };

@@ -25,3 +25,3 @@ /******/

/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ module.l = true;
/******/

@@ -39,2 +39,28 @@ /******/ // Return the exports of the module

/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__

@@ -44,3 +70,3 @@ /******/ __webpack_require__.p = "";

/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ return __webpack_require__(__webpack_require__.s = 2);
/******/ })

@@ -50,96 +76,98 @@ /************************************************************************/

/* 0 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = transition;
var _universalEnv = __webpack_require__(1);
function transition(node, styles, options, callback) {
if (typeof options == 'function' || options == null) {
callback = options;
options = {
timingFunction: 'ease',
duration: 0,
delay: 0
};
}
if (_universalEnv.isWeex) {
var animation = __webpack_require__(2);
animation.transition(node.ref, {
styles: styles,
timingFunction: options.timingFunction,
delay: options.delay,
duration: options.duration
}, callback || function () {});
} else if (_universalEnv.isWeb) {
var duration = options.duration; // ms
var timingFunction = options.timingFunction;
var delay = options.delay; // ms
var transitionValue = 'all ' + duration + 'ms ' + timingFunction + ' ' + delay + 'ms';
node.style.transition = transitionValue;
node.style.webkitTransition = transitionValue;
if (callback) {
(function () {
var transitionEndHandler = function transitionEndHandler(e) {
e.stopPropagation();
node.removeEventListener('webkitTransitionEnd', transitionEndHandler);
node.removeEventListener('transitionend', transitionEndHandler);
node.style.transition = '';
node.style.webkitTransition = '';
callback();
};
node.addEventListener('webkitTransitionEnd', transitionEndHandler);
node.addEventListener('transitionend', transitionEndHandler);
})();
}
for (var key in styles) {
// TODO add vendor prefix
var value = styles[key];
node.style[key] = value;
}
}
}
module.exports = exports['default'];
"use strict";
/***/ },
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
return typeof obj === "undefined" ? "undefined" : _typeof2(obj);
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj);
};
// https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appcodename
var isWeb = exports.isWeb = (typeof navigator === 'undefined' ? 'undefined' : _typeof(navigator)) === 'object' && (navigator.appCodeName === 'Mozilla' || navigator.product === 'Gecko');
var isNode = exports.isNode = typeof process !== 'undefined' && !!(process.versions && process.versions.node);
var isWeex = exports.isWeex = typeof callNative === 'function';
var isReactNative = exports.isReactNative = typeof __fbBatchedBridgeConfig !== 'undefined';
/***/ }),
/* 1 */
/***/ function(module, exports) {
/***/ (function(module, exports) {
'use strict';
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
return typeof obj === "undefined" ? "undefined" : _typeof2(obj);
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj);
};
// https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appcodename
var isWeb = exports.isWeb = (typeof navigator === 'undefined' ? 'undefined' : _typeof(navigator)) === 'object' && (navigator.appCodeName === 'Mozilla' || navigator.product === 'Gecko');
var isNode = exports.isNode = typeof process !== 'undefined' && !!(process.versions && process.versions.node);
var isWeex = exports.isWeex = typeof callNative === 'function';
var isReactNative = exports.isReactNative = typeof __fbBatchedBridgeConfig !== 'undefined';
module.exports = require("@weex-module/animation");
/***/ },
/***/ }),
/* 2 */
/***/ function(module, exports) {
/***/ (function(module, exports, __webpack_require__) {
module.exports = require("@weex-module/animation");
"use strict";
/***/ }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = transition;
var _universalEnv = __webpack_require__(0);
function transition(node, styles, options, callback) {
if (typeof options == 'function' || options == null) {
callback = options;
options = {
timingFunction: 'ease',
duration: 0,
delay: 0
};
}
if (_universalEnv.isWeex) {
var animation = __webpack_require__(1);
animation.transition(node.ref, {
styles: styles,
timingFunction: options.timingFunction,
delay: options.delay,
duration: options.duration
}, callback || function () {});
} else if (_universalEnv.isWeb) {
var duration = options.duration; // ms
var timingFunction = options.timingFunction;
var delay = options.delay; // ms
var transitionValue = 'all ' + duration + 'ms ' + timingFunction + ' ' + delay + 'ms';
node.style.transition = transitionValue;
node.style.webkitTransition = transitionValue;
if (callback) {
(function () {
var transitionEndHandler = function transitionEndHandler(e) {
e.stopPropagation();
node.removeEventListener('webkitTransitionEnd', transitionEndHandler);
node.removeEventListener('transitionend', transitionEndHandler);
node.style.transition = '';
node.style.webkitTransition = '';
callback();
};
node.addEventListener('webkitTransitionEnd', transitionEndHandler);
node.addEventListener('transitionend', transitionEndHandler);
})();
}
for (var key in styles) {
// TODO add vendor prefix
var value = styles[key];
node.style[key] = value;
}
}
}
module.exports = exports['default'];
/***/ })
/******/ ])}};;
//# sourceMappingURL=transition.factory.map

@@ -37,5 +37,5 @@

/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };

@@ -47,3 +47,3 @@ /******/

/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ module.l = true;
/******/

@@ -61,2 +61,28 @@ /******/ // Return the exports of the module

/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__

@@ -66,3 +92,3 @@ /******/ __webpack_require__.p = "";

/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ return __webpack_require__(__webpack_require__.s = 2);
/******/ })

@@ -72,96 +98,98 @@ /************************************************************************/

/* 0 */
/***/ function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = transition;
var _universalEnv = __webpack_require__(1);
function transition(node, styles, options, callback) {
if (typeof options == 'function' || options == null) {
callback = options;
options = {
timingFunction: 'ease',
duration: 0,
delay: 0
};
}
if (_universalEnv.isWeex) {
var animation = __webpack_require__(2);
animation.transition(node.ref, {
styles: styles,
timingFunction: options.timingFunction,
delay: options.delay,
duration: options.duration
}, callback || function () {});
} else if (_universalEnv.isWeb) {
var duration = options.duration; // ms
var timingFunction = options.timingFunction;
var delay = options.delay; // ms
var transitionValue = 'all ' + duration + 'ms ' + timingFunction + ' ' + delay + 'ms';
node.style.transition = transitionValue;
node.style.webkitTransition = transitionValue;
if (callback) {
(function () {
var transitionEndHandler = function transitionEndHandler(e) {
e.stopPropagation();
node.removeEventListener('webkitTransitionEnd', transitionEndHandler);
node.removeEventListener('transitionend', transitionEndHandler);
node.style.transition = '';
node.style.webkitTransition = '';
callback();
};
node.addEventListener('webkitTransitionEnd', transitionEndHandler);
node.addEventListener('transitionend', transitionEndHandler);
})();
}
for (var key in styles) {
// TODO add vendor prefix
var value = styles[key];
node.style[key] = value;
}
}
}
module.exports = exports['default'];
"use strict";
/***/ },
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
return typeof obj === "undefined" ? "undefined" : _typeof2(obj);
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj);
};
// https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appcodename
var isWeb = exports.isWeb = (typeof navigator === 'undefined' ? 'undefined' : _typeof(navigator)) === 'object' && (navigator.appCodeName === 'Mozilla' || navigator.product === 'Gecko');
var isNode = exports.isNode = typeof process !== 'undefined' && !!(process.versions && process.versions.node);
var isWeex = exports.isWeex = typeof callNative === 'function';
var isReactNative = exports.isReactNative = typeof __fbBatchedBridgeConfig !== 'undefined';
/***/ }),
/* 1 */
/***/ function(module, exports) {
/***/ (function(module, exports) {
'use strict';
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
return typeof obj === "undefined" ? "undefined" : _typeof2(obj);
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj);
};
// https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appcodename
var isWeb = exports.isWeb = (typeof navigator === 'undefined' ? 'undefined' : _typeof(navigator)) === 'object' && (navigator.appCodeName === 'Mozilla' || navigator.product === 'Gecko');
var isNode = exports.isNode = typeof process !== 'undefined' && !!(process.versions && process.versions.node);
var isWeex = exports.isWeex = typeof callNative === 'function';
var isReactNative = exports.isReactNative = typeof __fbBatchedBridgeConfig !== 'undefined';
module.exports = require("@weex-module/animation");
/***/ },
/***/ }),
/* 2 */
/***/ function(module, exports) {
/***/ (function(module, exports, __webpack_require__) {
module.exports = require("@weex-module/animation");
"use strict";
/***/ }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = transition;
var _universalEnv = __webpack_require__(0);
function transition(node, styles, options, callback) {
if (typeof options == 'function' || options == null) {
callback = options;
options = {
timingFunction: 'ease',
duration: 0,
delay: 0
};
}
if (_universalEnv.isWeex) {
var animation = __webpack_require__(1);
animation.transition(node.ref, {
styles: styles,
timingFunction: options.timingFunction,
delay: options.delay,
duration: options.duration
}, callback || function () {});
} else if (_universalEnv.isWeb) {
var duration = options.duration; // ms
var timingFunction = options.timingFunction;
var delay = options.delay; // ms
var transitionValue = 'all ' + duration + 'ms ' + timingFunction + ' ' + delay + 'ms';
node.style.transition = transitionValue;
node.style.webkitTransition = transitionValue;
if (callback) {
(function () {
var transitionEndHandler = function transitionEndHandler(e) {
e.stopPropagation();
node.removeEventListener('webkitTransitionEnd', transitionEndHandler);
node.removeEventListener('transitionend', transitionEndHandler);
node.style.transition = '';
node.style.webkitTransition = '';
callback();
};
node.addEventListener('webkitTransitionEnd', transitionEndHandler);
node.addEventListener('transitionend', transitionEndHandler);
})();
}
for (var key in styles) {
// TODO add vendor prefix
var value = styles[key];
node.style[key] = value;
}
}
}
module.exports = exports['default'];
/***/ })
/******/ ])});;
//# sourceMappingURL=transition.map

@@ -1,2 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define)define("universal-transition",function(n,t,o){o.exports=e()});else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:this,n.Transition=e()}}(function(){return function(e){function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n,t){"use strict";function o(e,n,o,r){if("function"!=typeof o&&null!=o||(r=o,o={timingFunction:"ease",duration:0,delay:0}),i.isWeex){var f=t(2);f.transition(e.ref,{styles:n,timingFunction:o.timingFunction,delay:o.delay,duration:o.duration},r||function(){})}else if(i.isWeb){var s=o.duration,u=o.timingFunction,a=o.delay,d="all "+s+"ms "+u+" "+a+"ms";e.style.transition=d,e.style.webkitTransition=d,r&&!function(){var n=function n(t){t.stopPropagation(),e.removeEventListener("webkitTransitionEnd",n),e.removeEventListener("transitionend",n),e.style.transition="",e.style.webkitTransition="",r()};e.addEventListener("webkitTransitionEnd",n),e.addEventListener("transitionend",n)}();for(var l in n){var y=n[l];e.style[l]=y}}}Object.defineProperty(n,"__esModule",{value:!0}),n.default=o;var i=t(1);e.exports=n.default},function(e,n){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(n,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":t(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":t(e)};n.isWeb="object"===("undefined"==typeof navigator?"undefined":o(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),n.isNode="undefined"!=typeof process&&!(!process.versions||!process.versions.node),n.isWeex="function"==typeof callNative,n.isReactNative="undefined"!=typeof __fbBatchedBridgeConfig},function(e,n){e.exports=require("@weex-module/animation")}])});
//# sourceMappingURL=transition.min.map
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define)define("universal-transition",function(n,t,o){o.exports=e()});else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:this,n.Transition=e()}}(function(){return function(e){function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var t={};return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=2)}([function(e,n,t){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":o(e)};n.isWeb="object"===("undefined"==typeof navigator?"undefined":i(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),n.isNode="undefined"!=typeof process&&!(!process.versions||!process.versions.node),n.isWeex="function"==typeof callNative,n.isReactNative="undefined"!=typeof __fbBatchedBridgeConfig},function(e,n){e.exports=require("@weex-module/animation")},function(e,n,t){"use strict";function o(e,n,o,r){if("function"!=typeof o&&null!=o||(r=o,o={timingFunction:"ease",duration:0,delay:0}),i.isWeex){var u=t(1);u.transition(e.ref,{styles:n,timingFunction:o.timingFunction,delay:o.delay,duration:o.duration},r||function(){})}else if(i.isWeb){var f=o.duration,s=o.timingFunction,a=o.delay,d="all "+f+"ms "+s+" "+a+"ms";e.style.transition=d,e.style.webkitTransition=d,r&&!function(){var n=function n(t){t.stopPropagation(),e.removeEventListener("webkitTransitionEnd",n),e.removeEventListener("transitionend",n),e.style.transition="",e.style.webkitTransition="",r()};e.addEventListener("webkitTransitionEnd",n),e.addEventListener("transitionend",n)}();for(var l in n){var c=n[l];e.style[l]=c}}}Object.defineProperty(n,"__esModule",{value:!0}),n.default=o;var i=t(0);e.exports=n.default}])});
{
"name": "universal-transition",
"version": "0.1.7",
"version": "0.1.8",
"description": "A universal transition API.",

@@ -16,4 +16,4 @@ "license": "BSD-3-Clause",

"dependencies": {
"universal-env": "^0.1.7"
"universal-env": "^0.1.8"
}
}

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc