universal-transition
Advanced tools
Comparing version 0.5.4 to 0.6.0
module.exports = function(require, exports, module) { | ||
with(this) { module.exports = /******/ (function(modules) { // webpackBootstrap | ||
with(this) { module.exports = /******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ | ||
/******/ // object to store loaded and loading wasm modules | ||
/******/ var installedWasmModules = {}; | ||
/******/ | ||
/******/ // The require function | ||
@@ -48,2 +51,7 @@ /******/ function __webpack_require__(moduleId) { | ||
/******/ | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = function(exports) { | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
@@ -64,4 +72,8 @@ /******/ __webpack_require__.n = function(module) { | ||
/******/ | ||
/******/ // object with all compiled WebAssembly.Modules | ||
/******/ __webpack_require__.w = {}; | ||
/******/ | ||
/******/ | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 0); | ||
/******/ return __webpack_require__(__webpack_require__.s = 2); | ||
/******/ }) | ||
@@ -76,72 +88,2 @@ /************************************************************************/ | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = transition; | ||
var _universalEnv = __webpack_require__(1); | ||
var _styleUnit = __webpack_require__(2); | ||
function transition(node, styles, options, callback) { | ||
if (typeof options == 'function' || options == null) { | ||
callback = options; | ||
options = { | ||
timingFunction: 'ease', | ||
duration: 0, | ||
delay: 0 | ||
}; | ||
} | ||
for (var prop in styles) { | ||
styles[prop] = (0, _styleUnit.convertUnit)(styles[prop], prop); | ||
} | ||
if (_universalEnv.isWeex) { | ||
var animation = __weex_require__('@weex-module/animation'); | ||
animation.transition(node.ref, { | ||
styles: styles, | ||
timingFunction: options.timingFunction || 'linear', | ||
delay: options.delay || 0, | ||
duration: options.duration || 0, | ||
needLayout: options.needLayout || false | ||
}, callback || function () {}); | ||
} else if (_universalEnv.isWeb) { | ||
var duration = options.duration || 0; // ms | ||
var timingFunction = options.timingFunction || 'linear'; | ||
var delay = options.delay || 0; // ms | ||
var transitionValue = 'all ' + duration + 'ms ' + timingFunction + ' ' + delay + 'ms'; | ||
node.style.transition = transitionValue; | ||
node.style.webkitTransition = transitionValue; | ||
if (callback) { | ||
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']; | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"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; }; | ||
@@ -159,29 +101,2 @@ | ||
// 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'; | ||
exports['default'] = module.exports; | ||
exports.default = module.exports; | ||
/***/ }), | ||
/* 2 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"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); | ||
}; | ||
exports.isRem = isRem; | ||
@@ -285,4 +200,101 @@ exports.calcRem = calcRem; | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"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' || (typeof WXEnvironment === 'undefined' ? 'undefined' : _typeof(WXEnvironment)) === 'object' && WXEnvironment.platform !== 'Web'; | ||
var isReactNative = exports.isReactNative = typeof __fbBatchedBridgeConfig !== 'undefined'; | ||
exports['default'] = module.exports; | ||
exports.default = module.exports; | ||
/***/ }), | ||
/* 2 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = transition; | ||
var _universalEnv = __webpack_require__(1); | ||
var _styleUnit = __webpack_require__(0); | ||
function transition(node, styles, options, callback) { | ||
if (typeof options == 'function' || options == null) { | ||
callback = options; | ||
options = { | ||
timingFunction: 'ease', | ||
duration: 0, | ||
delay: 0 | ||
}; | ||
} | ||
for (var prop in styles) { | ||
styles[prop] = (0, _styleUnit.convertUnit)(styles[prop], prop); | ||
} | ||
if (_universalEnv.isWeex && node) { | ||
var animation = __weex_require__('@weex-module/animation'); | ||
animation.transition(node.ref, { | ||
styles: styles, | ||
timingFunction: options.timingFunction || 'linear', | ||
delay: options.delay || 0, | ||
duration: options.duration || 0, | ||
needLayout: options.needLayout || false | ||
}, callback || function () {}); | ||
} else if (_universalEnv.isWeb) { | ||
var duration = options.duration || 0; // ms | ||
var timingFunction = options.timingFunction || 'linear'; | ||
var delay = options.delay || 0; // ms | ||
var transitionValue = 'all ' + duration + 'ms ' + timingFunction + ' ' + delay + 'ms'; | ||
node.style.transition = transitionValue; | ||
node.style.webkitTransition = transitionValue; | ||
if (callback) { | ||
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 |
;(function(fn) { | ||
if (typeof exports === "object" && typeof module !== "undefined") { | ||
;(function(fn) { | ||
if (typeof exports === "object" && typeof module !== "undefined") { | ||
module.exports = fn(); | ||
} else if (typeof define === "function") { | ||
define("universal-transition", function(require, exports, module){ | ||
module.exports = fn(); | ||
} else if (typeof define === "function") { | ||
define("universal-transition", function(require, exports, module){ | ||
module.exports = fn(); | ||
}); | ||
}); | ||
} else { | ||
var root; | ||
if (typeof window !== "undefined") { | ||
root = window; | ||
} else if (typeof self !== "undefined") { | ||
root = self; | ||
} else if (typeof global !== "undefined") { | ||
root = global; | ||
} else { | ||
var root; | ||
if (typeof window !== "undefined") { | ||
root = window; | ||
} else if (typeof self !== "undefined") { | ||
root = self; | ||
} else if (typeof global !== "undefined") { | ||
root = global; | ||
} else { | ||
// NOTICE: In JavaScript strict mode, this is null | ||
root = this; | ||
} | ||
root["UniversalTransition"] = fn(); | ||
// NOTICE: In JavaScript strict mode, this is null | ||
root = this; | ||
} | ||
})(function(){ | ||
return /******/ (function(modules) { // webpackBootstrap | ||
root["UniversalTransition"] = fn(); | ||
} | ||
})(function(){ | ||
return /******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ | ||
/******/ // object to store loaded and loading wasm modules | ||
/******/ var installedWasmModules = {}; | ||
/******/ | ||
/******/ // The require function | ||
@@ -70,2 +73,7 @@ /******/ function __webpack_require__(moduleId) { | ||
/******/ | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = function(exports) { | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
@@ -86,4 +94,8 @@ /******/ __webpack_require__.n = function(module) { | ||
/******/ | ||
/******/ // object with all compiled WebAssembly.Modules | ||
/******/ __webpack_require__.w = {}; | ||
/******/ | ||
/******/ | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 0); | ||
/******/ return __webpack_require__(__webpack_require__.s = 2); | ||
/******/ }) | ||
@@ -98,72 +110,2 @@ /************************************************************************/ | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = transition; | ||
var _universalEnv = __webpack_require__(1); | ||
var _styleUnit = __webpack_require__(2); | ||
function transition(node, styles, options, callback) { | ||
if (typeof options == 'function' || options == null) { | ||
callback = options; | ||
options = { | ||
timingFunction: 'ease', | ||
duration: 0, | ||
delay: 0 | ||
}; | ||
} | ||
for (var prop in styles) { | ||
styles[prop] = (0, _styleUnit.convertUnit)(styles[prop], prop); | ||
} | ||
if (_universalEnv.isWeex) { | ||
var animation = __weex_require__('@weex-module/animation'); | ||
animation.transition(node.ref, { | ||
styles: styles, | ||
timingFunction: options.timingFunction || 'linear', | ||
delay: options.delay || 0, | ||
duration: options.duration || 0, | ||
needLayout: options.needLayout || false | ||
}, callback || function () {}); | ||
} else if (_universalEnv.isWeb) { | ||
var duration = options.duration || 0; // ms | ||
var timingFunction = options.timingFunction || 'linear'; | ||
var delay = options.delay || 0; // ms | ||
var transitionValue = 'all ' + duration + 'ms ' + timingFunction + ' ' + delay + 'ms'; | ||
node.style.transition = transitionValue; | ||
node.style.webkitTransition = transitionValue; | ||
if (callback) { | ||
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']; | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"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; }; | ||
@@ -181,29 +123,2 @@ | ||
// 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'; | ||
exports['default'] = module.exports; | ||
exports.default = module.exports; | ||
/***/ }), | ||
/* 2 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"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); | ||
}; | ||
exports.isRem = isRem; | ||
@@ -307,4 +222,101 @@ exports.calcRem = calcRem; | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"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' || (typeof WXEnvironment === 'undefined' ? 'undefined' : _typeof(WXEnvironment)) === 'object' && WXEnvironment.platform !== 'Web'; | ||
var isReactNative = exports.isReactNative = typeof __fbBatchedBridgeConfig !== 'undefined'; | ||
exports['default'] = module.exports; | ||
exports.default = module.exports; | ||
/***/ }), | ||
/* 2 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = transition; | ||
var _universalEnv = __webpack_require__(1); | ||
var _styleUnit = __webpack_require__(0); | ||
function transition(node, styles, options, callback) { | ||
if (typeof options == 'function' || options == null) { | ||
callback = options; | ||
options = { | ||
timingFunction: 'ease', | ||
duration: 0, | ||
delay: 0 | ||
}; | ||
} | ||
for (var prop in styles) { | ||
styles[prop] = (0, _styleUnit.convertUnit)(styles[prop], prop); | ||
} | ||
if (_universalEnv.isWeex && node) { | ||
var animation = __weex_require__('@weex-module/animation'); | ||
animation.transition(node.ref, { | ||
styles: styles, | ||
timingFunction: options.timingFunction || 'linear', | ||
delay: options.delay || 0, | ||
duration: options.duration || 0, | ||
needLayout: options.needLayout || false | ||
}, callback || function () {}); | ||
} else if (_universalEnv.isWeb) { | ||
var duration = options.duration || 0; // ms | ||
var timingFunction = options.timingFunction || 'linear'; | ||
var delay = options.delay || 0; // ms | ||
var transitionValue = 'all ' + duration + 'ms ' + timingFunction + ' ' + delay + 'ms'; | ||
node.style.transition = transitionValue; | ||
node.style.webkitTransition = transitionValue; | ||
if (callback) { | ||
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,1 +0,2 @@ | ||
!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{("undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:this).UniversalTransition=e()}}(function(){return function(e){var n={};function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n,t,r){"function"!=typeof t&&null!=t||(r=t,t={timingFunction:"ease",duration:0,delay:0});for(var u in n)n[u]=(0,i.convertUnit)(n[u],u);if(o.isWeex){var f=__weex_require__("@weex-module/animation");f.transition(e.ref,{styles:n,timingFunction:t.timingFunction||"linear",delay:t.delay||0,duration:t.duration||0,needLayout:t.needLayout||!1},r||function(){})}else if(o.isWeb){var l=t.duration||0,a=t.timingFunction||"linear",d=t.delay||0,s="all "+l+"ms "+a+" "+d+"ms";if(e.style.transition=s,e.style.webkitTransition=s,r){var c=function n(t){t.stopPropagation(),e.removeEventListener("webkitTransitionEnd",n),e.removeEventListener("transitionend",n),e.style.transition="",e.style.webkitTransition="",r()};e.addEventListener("webkitTransitionEnd",c),e.addEventListener("transitionend",c)}for(var y in n){var p=n[y];e.style[y]=p}}};var o=t(1),i=t(2);e.exports=n.default},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 void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===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;n.default=e.exports,n.default=e.exports},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 void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)};n.isRem=d,n.calcRem=s,n.getRem=function(){return a[l]},n.setRem=function(e){a[l]=e},n.isUnitNumber=c,n.convertUnit=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a[l];if(n&&c(e,n))return e*t+"px";if(d(e))return s(e,t);return e};var r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,lines:!0},u="rem",f=/[-+]?\d*\.?\d+rem/g,l="__global_rem_unit__",a="object"===("undefined"==typeof window?"undefined":i(window))?window:"object"===(void 0===a?"undefined":i(a))?a:{};function d(e){return"string"==typeof e&&-1!==e.indexOf(u)}function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a[l];return e.replace(f,function(e){return parseFloat(e)*n+"px"})}function c(e,n){return"number"==typeof e&&!r[n]}null==a[l]&&(a[l]=1),n.default=e.exports,n.default=e.exports}])}); | ||
!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{("undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:this).UniversalTransition=e()}}(function(){return function(e){var n={};function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t.w={},t(t.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 void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)};n.isRem=a,n.calcRem=s,n.getRem=function(){return d[l]},n.setRem=function(e){d[l]=e},n.isUnitNumber=c,n.convertUnit=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d[l];if(n&&c(e,n))return e*t+"px";if(a(e))return s(e,t);return e};var r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,lines:!0},u="rem",f=/[-+]?\d*\.?\d+rem/g,l="__global_rem_unit__",d="object"===("undefined"==typeof window?"undefined":i(window))?window:"object"===(void 0===d?"undefined":i(d))?d:{};function a(e){return"string"==typeof e&&-1!==e.indexOf(u)}function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d[l];return e.replace(f,function(e){return parseFloat(e)*n+"px"})}function c(e,n){return"number"==typeof e&&!r[n]}null==d[l]&&(d[l]=1),n.default=e.exports,n.default=e.exports},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 void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===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||"object"===("undefined"==typeof WXEnvironment?"undefined":i(WXEnvironment))&&"Web"!==WXEnvironment.platform,n.isReactNative="undefined"!=typeof __fbBatchedBridgeConfig;n.default=e.exports,n.default=e.exports},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n,t,r){"function"!=typeof t&&null!=t||(r=t,t={timingFunction:"ease",duration:0,delay:0});for(var u in n)n[u]=(0,i.convertUnit)(n[u],u);if(o.isWeex&&e){var f=__weex_require__("@weex-module/animation");f.transition(e.ref,{styles:n,timingFunction:t.timingFunction||"linear",delay:t.delay||0,duration:t.duration||0,needLayout:t.needLayout||!1},r||function(){})}else if(o.isWeb){var l=t.duration||0,d=t.timingFunction||"linear",a=t.delay||0,s="all "+l+"ms "+d+" "+a+"ms";if(e.style.transition=s,e.style.webkitTransition=s,r){var c=function n(t){t.stopPropagation(),e.removeEventListener("webkitTransitionEnd",n),e.removeEventListener("transitionend",n),e.style.transition="",e.style.webkitTransition="",r()};e.addEventListener("webkitTransitionEnd",c),e.addEventListener("transitionend",c)}for(var y in n){var p=n[y];e.style[y]=p}}};var o=t(1),i=t(0);e.exports=n.default}])}); | ||
//# sourceMappingURL=transition.min.map |
@@ -26,3 +26,3 @@ 'use strict'; | ||
if (_universalEnv.isWeex) { | ||
if (_universalEnv.isWeex && node) { | ||
var animation = __weex_require__('@weex-module/animation'); | ||
@@ -29,0 +29,0 @@ animation.transition(node.ref, { |
{ | ||
"name": "universal-transition", | ||
"version": "0.5.4", | ||
"version": "0.6.0", | ||
"description": "A universal transition API.", | ||
@@ -16,5 +16,5 @@ "license": "BSD-3-Clause", | ||
"dependencies": { | ||
"style-unit": "^0.5.4", | ||
"universal-env": "^0.5.4" | ||
"style-unit": "^0.6.0", | ||
"universal-env": "^0.6.0" | ||
} | ||
} |
@@ -18,3 +18,3 @@ import {isWeex, isWeb} from 'universal-env'; | ||
if (isWeex) { | ||
if (isWeex && node) { | ||
const animation = __weex_require__('@weex-module/animation'); | ||
@@ -31,3 +31,3 @@ animation.transition(node.ref, { | ||
const timingFunction = options.timingFunction || 'linear'; | ||
const delay = options.delay || 0; // ms | ||
const delay = options.delay || 0; // ms | ||
const transitionValue = 'all ' + duration + 'ms ' | ||
@@ -34,0 +34,0 @@ + timingFunction + ' ' + delay + 'ms'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74901
12
722
+ Addedstyle-unit@0.6.5(transitive)
+ Addeduniversal-env@0.6.6(transitive)
- Removedstyle-unit@0.5.4(transitive)
- Removeduniversal-env@0.5.4(transitive)
Updatedstyle-unit@^0.6.0
Updateduniversal-env@^0.6.0