@material/animation
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -29,5 +29,5 @@ /*! | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ exports: {}, | ||
/******/ id: moduleId, | ||
/******/ loaded: false | ||
/******/ i: moduleId, | ||
/******/ l: false, | ||
/******/ exports: {} | ||
/******/ }; | ||
@@ -39,3 +39,3 @@ | ||
/******/ // Flag the module as loaded | ||
/******/ module.loaded = true; | ||
/******/ module.l = true; | ||
@@ -53,2 +53,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__ | ||
@@ -58,147 +84,146 @@ /******/ __webpack_require__.p = "/assets/"; | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(0); | ||
/******/ return __webpack_require__(__webpack_require__.s = 36); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
/******/ ({ | ||
module.exports = __webpack_require__(1); | ||
/***/ 3: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony export (immutable) */ __webpack_exports__["getCorrectEventName"] = getCorrectEventName; | ||
/* harmony export (immutable) */ __webpack_exports__["getCorrectPropertyName"] = getCorrectPropertyName; | ||
/** | ||
* Copyright 2016 Google Inc. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/***/ }, | ||
/* 1 */ | ||
/***/ function(module, exports) { | ||
var eventTypeMap = { | ||
animationstart: { | ||
noPrefix: 'animationstart', | ||
webkitPrefix: 'webkitAnimationStart' | ||
}, | ||
animationend: { | ||
noPrefix: 'animationend', | ||
webkitPrefix: 'webkitAnimationEnd' | ||
}, | ||
animationiteration: { | ||
noPrefix: 'animationiteration', | ||
webkitPrefix: 'webkitAnimationIteration' | ||
}, | ||
transitionend: { | ||
noPrefix: 'transitionend', | ||
webkitPrefix: 'webkitTransitionEnd' | ||
} | ||
}; | ||
'use strict'; | ||
var cssPropertyMap = { | ||
animation: { | ||
noPrefix: 'animation', | ||
webkitPrefix: '-webkit-animation' | ||
}, | ||
transform: { | ||
noPrefix: 'transform', | ||
webkitPrefix: '-webkit-transform' | ||
}, | ||
transition: { | ||
noPrefix: 'transition', | ||
webkitPrefix: '-webkit-transition' | ||
} | ||
}; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.getCorrectEventName = getCorrectEventName; | ||
exports.getCorrectPropertyName = getCorrectPropertyName; | ||
/** | ||
* Copyright 2016 Google Inc. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
function hasProperShape(windowObj) { | ||
return windowObj.document !== undefined && typeof windowObj.document.createElement === 'function'; | ||
} | ||
var eventTypeMap = { | ||
animationstart: { | ||
noPrefix: 'animationstart', | ||
webkitPrefix: 'webkitAnimationStart' | ||
}, | ||
animationend: { | ||
noPrefix: 'animationend', | ||
webkitPrefix: 'webkitAnimationEnd' | ||
}, | ||
animationiteration: { | ||
noPrefix: 'animationiteration', | ||
webkitPrefix: 'webkitAnimationIteration' | ||
}, | ||
transitionend: { | ||
noPrefix: 'transitionend', | ||
webkitPrefix: 'webkitTransitionEnd' | ||
} | ||
}; | ||
function eventFoundInMaps(eventType) { | ||
return eventType in eventTypeMap || eventType in cssPropertyMap; | ||
} | ||
var cssPropertyMap = { | ||
animation: { | ||
noPrefix: 'animation', | ||
webkitPrefix: '-webkit-animation' | ||
}, | ||
transform: { | ||
noPrefix: 'transform', | ||
webkitPrefix: '-webkit-transform' | ||
}, | ||
transition: { | ||
noPrefix: 'transition', | ||
webkitPrefix: '-webkit-transition' | ||
} | ||
}; | ||
// If 'animation' or 'transition' exist as style property, webkit prefix isn't necessary. Since we are unable to | ||
// see the event types on the element, we must rely on the corresponding style properties. | ||
function getJavaScriptEventName(eventType, map, el) { | ||
switch (eventType) { | ||
case 'animationstart': | ||
case 'animationend': | ||
case 'animationiteration': | ||
return 'animation' in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
case 'transitionend': | ||
return 'transition' in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
default: | ||
return map[eventType].noPrefix; | ||
} | ||
} | ||
function hasProperShape(windowObj) { | ||
return windowObj.document !== undefined && typeof windowObj.document.createElement === 'function'; | ||
} | ||
// Helper function to determine browser prefix for CSS3 animation events | ||
// and property names | ||
// | ||
// Parameters: | ||
// windowObject: Object -- Contains Document with a `createElement()` method | ||
// eventType: string -- The type of animation | ||
// | ||
// returns the value of the event as a string, prefixed if necessary. | ||
// If proper arguments are not supplied, this function will return | ||
// the property or event type without webkit prefix. | ||
// | ||
function getAnimationName(windowObj, eventType) { | ||
if (!hasProperShape(windowObj) || !eventFoundInMaps(eventType)) { | ||
return eventType; | ||
} | ||
function eventFoundInMaps(eventType) { | ||
return eventType in eventTypeMap || eventType in cssPropertyMap; | ||
} | ||
var map = eventType in eventTypeMap ? eventTypeMap : cssPropertyMap; | ||
var el = windowObj.document.createElement('div'); | ||
var eventName = ''; | ||
// If 'animation' or 'transition' exist as style property, webkit prefix isn't necessary. Since we are unable to | ||
// see the event types on the element, we must rely on the corresponding style properties. | ||
function getJavaScriptEventName(eventType, map, el) { | ||
switch (eventType) { | ||
case 'animationstart': | ||
case 'animationend': | ||
case 'animationiteration': | ||
return 'animation' in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
case 'transitionend': | ||
return 'transition' in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
default: | ||
return map[eventType].noPrefix; | ||
} | ||
} | ||
if (map === eventTypeMap) { | ||
eventName = getJavaScriptEventName(eventType, map, el); | ||
} else { | ||
eventName = map[eventType].noPrefix in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
} | ||
// Helper function to determine browser prefix for CSS3 animation events | ||
// and property names | ||
// | ||
// Parameters: | ||
// windowObject: Object -- Contains Document with a `createElement()` method | ||
// eventType: string -- The type of animation | ||
// | ||
// returns the value of the event as a string, prefixed if necessary. | ||
// If proper arguments are not supplied, this function will return | ||
// the property or event type without webkit prefix. | ||
// | ||
function getAnimationName(windowObj, eventType) { | ||
if (!hasProperShape(windowObj) || !eventFoundInMaps(eventType)) { | ||
return eventType; | ||
} | ||
return eventName; | ||
} | ||
var map = eventType in eventTypeMap ? eventTypeMap : cssPropertyMap; | ||
var el = windowObj.document.createElement('div'); | ||
var eventName = ''; | ||
// Public functions to access getAnimationName() for JavaScript events or CSS | ||
// property names. | ||
// | ||
// Parameters: | ||
// windowObject: Object -- Contains Document with a `createElement()` method | ||
// eventType: string -- The type of animation | ||
// | ||
// returns the value of the event as a string, prefixed if necessary. | ||
// If proper arguments are not supplied, this function will return | ||
// the property or event type without webkit prefix. | ||
// | ||
function getCorrectEventName(windowObj, eventType) { | ||
return getAnimationName(windowObj, eventType); | ||
} | ||
if (map === eventTypeMap) { | ||
eventName = getJavaScriptEventName(eventType, map, el); | ||
} else { | ||
eventName = map[eventType].noPrefix in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
} | ||
function getCorrectPropertyName(windowObj, eventType) { | ||
return getAnimationName(windowObj, eventType); | ||
} | ||
return eventName; | ||
} | ||
/***/ }), | ||
// Public functions to access getAnimationName() for JavaScript events or CSS | ||
// property names. | ||
// | ||
// Parameters: | ||
// windowObject: Object -- Contains Document with a `createElement()` method | ||
// eventType: string -- The type of animation | ||
// | ||
// returns the value of the event as a string, prefixed if necessary. | ||
// If proper arguments are not supplied, this function will return | ||
// the property or event type without webkit prefix. | ||
// | ||
function getCorrectEventName(windowObj, eventType) { | ||
return getAnimationName(windowObj, eventType); | ||
} | ||
/***/ 36: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
function getCorrectPropertyName(windowObj, eventType) { | ||
return getAnimationName(windowObj, eventType); | ||
} | ||
module.exports = __webpack_require__(3); | ||
/***/ } | ||
/******/ ]) | ||
}); | ||
; | ||
/***/ }) | ||
/******/ }); | ||
}); |
@@ -6,2 +6,2 @@ /*! | ||
*/ | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.animation=n():(t.mdc=t.mdc||{},t.mdc.animation=n())}(this,function(){return function(t){function n(e){if(i[e])return i[e].exports;var r=i[e]={exports:{},id:e,loaded:!1};return t[e].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}var i={};return n.m=t,n.c=i,n.p="/assets/",n(0)}([function(t,n,i){t.exports=i(4)},,,,function(t,n){"use strict";function i(t){return void 0!==t.document&&"function"==typeof t.document.createElement}function e(t){return t in s||t in c}function r(t,n,i){switch(t){case"animationstart":case"animationend":case"animationiteration":return"animation"in i.style?n[t].noPrefix:n[t].webkitPrefix;case"transitionend":return"transition"in i.style?n[t].noPrefix:n[t].webkitPrefix;default:return n[t].noPrefix}}function o(t,n){if(!i(t)||!e(n))return n;var o=n in s?s:c,a=t.document.createElement("div"),f="";return f=o===s?r(n,o,a):o[n].noPrefix in a.style?o[n].noPrefix:o[n].webkitPrefix}function a(t,n){return o(t,n)}function f(t,n){return o(t,n)}Object.defineProperty(n,"__esModule",{value:!0}),n.getCorrectEventName=a,n.getCorrectPropertyName=f;var s={animationstart:{noPrefix:"animationstart",webkitPrefix:"webkitAnimationStart"},animationend:{noPrefix:"animationend",webkitPrefix:"webkitAnimationEnd"},animationiteration:{noPrefix:"animationiteration",webkitPrefix:"webkitAnimationIteration"},transitionend:{noPrefix:"transitionend",webkitPrefix:"webkitTransitionEnd"}},c={animation:{noPrefix:"animation",webkitPrefix:"-webkit-animation"},transform:{noPrefix:"transform",webkitPrefix:"-webkit-transform"},transition:{noPrefix:"transition",webkitPrefix:"-webkit-transition"}}}])}); | ||
!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.animation=t():(n.mdc=n.mdc||{},n.mdc.animation=t())}(this,function(){return function(n){function t(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return n[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e={};return t.m=n,t.c=e,t.i=function(n){return n},t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:i})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="/assets/",t(t.s=36)}({3:function(n,t,e){"use strict";function i(n){return void 0!==n.document&&"function"==typeof n.document.createElement}function r(n){return n in c||n in s}function o(n,t,e){switch(n){case"animationstart":case"animationend":case"animationiteration":return"animation"in e.style?t[n].noPrefix:t[n].webkitPrefix;case"transitionend":return"transition"in e.style?t[n].noPrefix:t[n].webkitPrefix;default:return t[n].noPrefix}}function a(n,t){if(!i(n)||!r(t))return t;var e=t in c?c:s,a=n.document.createElement("div"),f="";return f=e===c?o(t,e,a):e[t].noPrefix in a.style?e[t].noPrefix:e[t].webkitPrefix}function f(n,t){return a(n,t)}function u(n,t){return a(n,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.getCorrectEventName=f,t.getCorrectPropertyName=u;var c={animationstart:{noPrefix:"animationstart",webkitPrefix:"webkitAnimationStart"},animationend:{noPrefix:"animationend",webkitPrefix:"webkitAnimationEnd"},animationiteration:{noPrefix:"animationiteration",webkitPrefix:"webkitAnimationIteration"},transitionend:{noPrefix:"transitionend",webkitPrefix:"webkitTransitionEnd"}},s={animation:{noPrefix:"animation",webkitPrefix:"-webkit-animation"},transform:{noPrefix:"transform",webkitPrefix:"-webkit-transform"},transition:{noPrefix:"transition",webkitPrefix:"-webkit-transition"}}},36:function(n,t,e){n.exports=e(3)}})}); |
{ | ||
"name": "@material/animation", | ||
"description": "Animation Variables and Mixins used by Material Components for the web", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"license": "Apache-2.0", | ||
"keywords": [ | ||
"material components", | ||
"material design", | ||
"animation" | ||
], | ||
"main": "index.js", | ||
@@ -7,0 +12,0 @@ "repository": { |
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
23922
368