Skip to content

Commit

Permalink
chore(all): prepare release 1.0.0-beta.1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Mar 23, 2016
1 parent 87924a6 commit 6501fdb
Show file tree
Hide file tree
Showing 14 changed files with 680 additions and 756 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-animator-css",
"version": "1.0.0-beta.1.1.2",
"version": "1.0.0-beta.1.2.0",
"description": "An implementation of the abstract Animator interface from templating which enables css-based animations.",
"keywords": [
"aurelia",
Expand Down
12 changes: 10 additions & 2 deletions dist/amd/aurelia-animator-css.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
declare module 'aurelia-animator-css' {
import { animationEvent, TemplatingEngine } from 'aurelia-templating';
import { DOM } from 'aurelia-pal';
import {
animationEvent,
TemplatingEngine
} from 'aurelia-templating';
import {
DOM
} from 'aurelia-pal';
export interface CssAnimation {
className: string;
element: HTMLElement;
}

/**
* An implementation of the Animator using CSS3-Animations.
*/
/**
* An implementation of the Animator using CSS3-Animations.
*/
Expand Down
98 changes: 53 additions & 45 deletions dist/amd/aurelia-animator-css.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aureliaTemplating, _aureliaPal) {
'use strict';

exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CssAnimator = undefined;
exports.configure = configure;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}

var CssAnimator = (function () {
var CssAnimator = exports.CssAnimator = function () {
function CssAnimator() {
_classCallCheck(this, CssAnimator);

Expand All @@ -27,8 +34,8 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur

CssAnimator.prototype._getElementAnimationDelay = function _getElementAnimationDelay(element) {
var styl = _aureliaPal.DOM.getComputedStyle(element);
var prop = undefined;
var delay = undefined;
var prop = void 0;
var delay = void 0;

if (styl.getPropertyValue('animation-delay')) {
prop = 'animation-delay';
Expand All @@ -48,7 +55,7 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur

CssAnimator.prototype._getElementAnimationNames = function _getElementAnimationNames(element) {
var styl = _aureliaPal.DOM.getComputedStyle(element);
var prefix = undefined;
var prefix = void 0;

if (styl.getPropertyValue('animation-name')) {
prefix = '';
Expand Down Expand Up @@ -79,7 +86,7 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur
}

return false;
})['catch'](function () {
}).catch(function () {
_this._triggerDOMEvent(_aureliaTemplating.animationEvent.animateTimeout, element);
});
};
Expand All @@ -105,23 +112,26 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur
var keyframesRuleType = window.CSSRule.KEYFRAMES_RULE || window.CSSRule.MOZ_KEYFRAMES_RULE || window.CSSRule.WEBKIT_KEYFRAMES_RULE;

var styleSheets = document.styleSheets;
for (var i = 0; i < styleSheets.length; ++i) {
var cssRules = styleSheets[i].cssRules;

if (!cssRules) {
continue;
}
try {
for (var i = 0; i < styleSheets.length; ++i) {
var cssRules = styleSheets[i].cssRules;

for (var j = 0; j < cssRules.length; ++j) {
var cssRule = cssRules[j];
if (!cssRules) {
continue;
}

if (cssRule.type === keyframesRuleType) {
if (newAnimationNames.indexOf(cssRule.name) !== -1) {
return true;
for (var j = 0; j < cssRules.length; ++j) {
var cssRule = cssRules[j];

if (cssRule.type === keyframesRuleType) {
if (newAnimationNames.indexOf(cssRule.name) !== -1) {
return true;
}
}
}
}
}
} catch (e) {}

return false;
};
Expand Down Expand Up @@ -168,21 +178,21 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur
classList.add('au-enter');
var prevAnimationNames = _this4._getElementAnimationNames(element);

var animStart = undefined;
var _animStart = void 0;
var animHasStarted = false;
_this4._addMultipleEventListener(element, 'webkitAnimationStart animationstart', animStart = function (evAnimStart) {
_this4._addMultipleEventListener(element, 'webkitAnimationStart animationstart', _animStart = function animStart(evAnimStart) {
animHasStarted = true;
_this4.isAnimating = true;

_this4._triggerDOMEvent(_aureliaTemplating.animationEvent.enterActive, element);

evAnimStart.stopPropagation();

evAnimStart.target.removeEventListener(evAnimStart.type, animStart);
evAnimStart.target.removeEventListener(evAnimStart.type, _animStart);
}, false);

var animEnd = undefined;
_this4._addMultipleEventListener(element, 'webkitAnimationEnd animationend', animEnd = function (evAnimEnd) {
var _animEnd = void 0;
_this4._addMultipleEventListener(element, 'webkitAnimationEnd animationend', _animEnd = function animEnd(evAnimEnd) {
if (!animHasStarted) {
return;
}
Expand All @@ -192,7 +202,7 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur
classList.remove('au-enter-active');
classList.remove('au-enter');

evAnimEnd.target.removeEventListener(evAnimEnd.type, animEnd);
evAnimEnd.target.removeEventListener(evAnimEnd.type, _animEnd);

if (_this4.useAnimationDoneClasses && _this4.animationEnteredClass !== undefined && _this4.animationEnteredClass !== null) {
classList.add(_this4.animationEnteredClass);
Expand Down Expand Up @@ -250,21 +260,21 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur
classList.add('au-leave');
var prevAnimationNames = _this5._getElementAnimationNames(element);

var animStart = undefined;
var _animStart2 = void 0;
var animHasStarted = false;
_this5._addMultipleEventListener(element, 'webkitAnimationStart animationstart', animStart = function (evAnimStart) {
_this5._addMultipleEventListener(element, 'webkitAnimationStart animationstart', _animStart2 = function animStart(evAnimStart) {
animHasStarted = true;
_this5.isAnimating = true;

_this5._triggerDOMEvent(_aureliaTemplating.animationEvent.leaveActive, element);

evAnimStart.stopPropagation();

evAnimStart.target.removeEventListener(evAnimStart.type, animStart);
evAnimStart.target.removeEventListener(evAnimStart.type, _animStart2);
}, false);

var animEnd = undefined;
_this5._addMultipleEventListener(element, 'webkitAnimationEnd animationend', animEnd = function (evAnimEnd) {
var _animEnd2 = void 0;
_this5._addMultipleEventListener(element, 'webkitAnimationEnd animationend', _animEnd2 = function animEnd(evAnimEnd) {
if (!animHasStarted) {
return;
}
Expand All @@ -274,7 +284,7 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur
classList.remove('au-leave-active');
classList.remove('au-leave');

evAnimEnd.target.removeEventListener(evAnimEnd.type, animEnd);
evAnimEnd.target.removeEventListener(evAnimEnd.type, _animEnd2);

if (_this5.useAnimationDoneClasses && _this5.animationLeftClass !== undefined && _this5.animationLeftClass !== null) {
classList.add(_this5.animationLeftClass);
Expand Down Expand Up @@ -336,9 +346,9 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur
classList.remove(className);
var prevAnimationNames = _this6._getElementAnimationNames(element);

var animStart = undefined;
var _animStart3 = void 0;
var animHasStarted = false;
_this6._addMultipleEventListener(element, 'webkitAnimationStart animationstart', animStart = function (evAnimStart) {
_this6._addMultipleEventListener(element, 'webkitAnimationStart animationstart', _animStart3 = function animStart(evAnimStart) {
animHasStarted = true;
_this6.isAnimating = true;

Expand All @@ -348,11 +358,11 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur

evAnimStart.stopPropagation();

evAnimStart.target.removeEventListener(evAnimStart.type, animStart);
evAnimStart.target.removeEventListener(evAnimStart.type, _animStart3);
}, false);

var animEnd = undefined;
_this6._addMultipleEventListener(element, 'webkitAnimationEnd animationend', animEnd = function (evAnimEnd) {
var _animEnd3 = void 0;
_this6._addMultipleEventListener(element, 'webkitAnimationEnd animationend', _animEnd3 = function animEnd(evAnimEnd) {
if (!animHasStarted) {
return;
}
Expand All @@ -361,7 +371,7 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur

classList.remove(className + '-remove');

evAnimEnd.target.removeEventListener(evAnimEnd.type, animEnd);
evAnimEnd.target.removeEventListener(evAnimEnd.type, _animEnd3);

_this6.isAnimating = false;

Expand Down Expand Up @@ -400,9 +410,9 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur
_this7._triggerDOMEvent(_aureliaTemplating.animationEvent.addClassBegin, element);
}

var animStart = undefined;
var _animStart4 = void 0;
var animHasStarted = false;
_this7._addMultipleEventListener(element, 'webkitAnimationStart animationstart', animStart = function (evAnimStart) {
_this7._addMultipleEventListener(element, 'webkitAnimationStart animationstart', _animStart4 = function animStart(evAnimStart) {
animHasStarted = true;
_this7.isAnimating = true;

Expand All @@ -412,11 +422,11 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur

evAnimStart.stopPropagation();

evAnimStart.target.removeEventListener(evAnimStart.type, animStart);
evAnimStart.target.removeEventListener(evAnimStart.type, _animStart4);
}, false);

var animEnd = undefined;
_this7._addMultipleEventListener(element, 'webkitAnimationEnd animationend', animEnd = function (evAnimEnd) {
var _animEnd4 = void 0;
_this7._addMultipleEventListener(element, 'webkitAnimationEnd animationend', _animEnd4 = function animEnd(evAnimEnd) {
if (!animHasStarted) {
return;
}
Expand All @@ -427,7 +437,7 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur

classList.remove(className + '-add');

evAnimEnd.target.removeEventListener(evAnimEnd.type, animEnd);
evAnimEnd.target.removeEventListener(evAnimEnd.type, _animEnd4);

_this7.isAnimating = false;

Expand Down Expand Up @@ -457,9 +467,7 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur
};

return CssAnimator;
})();

exports.CssAnimator = CssAnimator;
}();

function configure(config, callback) {
var animator = config.container.get(CssAnimator);
Expand Down
12 changes: 10 additions & 2 deletions dist/aurelia-animator-css.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
declare module 'aurelia-animator-css' {
import { animationEvent, TemplatingEngine } from 'aurelia-templating';
import { DOM } from 'aurelia-pal';
import {
animationEvent,
TemplatingEngine
} from 'aurelia-templating';
import {
DOM
} from 'aurelia-pal';
export interface CssAnimation {
className: string;
element: HTMLElement;
}

/**
* An implementation of the Animator using CSS3-Animations.
*/
/**
* An implementation of the Animator using CSS3-Animations.
*/
Expand Down
25 changes: 15 additions & 10 deletions dist/aurelia-animator-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,27 @@ export class CssAnimator {
// loop through the stylesheets searching for the keyframes. no cache is
// used in case of dynamic changes to the stylesheets.
let styleSheets = document.styleSheets;
for (let i = 0; i < styleSheets.length; ++i) {
let cssRules = styleSheets[i].cssRules;

if (!cssRules) {
continue;
}
try {
for (let i = 0; i < styleSheets.length; ++i) {
let cssRules = styleSheets[i].cssRules;

if (!cssRules) {
continue;
}

for (let j = 0; j < cssRules.length; ++j) {
let cssRule = cssRules[j];
for (let j = 0; j < cssRules.length; ++j) {
let cssRule = cssRules[j];

if (cssRule.type === keyframesRuleType) {
if (newAnimationNames.indexOf(cssRule.name) !== -1) {
return true;
if (cssRule.type === keyframesRuleType) {
if (newAnimationNames.indexOf(cssRule.name) !== -1) {
return true;
}
}
}
}
} catch (e) {
//do nothing
}

return false;
Expand Down
12 changes: 10 additions & 2 deletions dist/commonjs/aurelia-animator-css.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
declare module 'aurelia-animator-css' {
import { animationEvent, TemplatingEngine } from 'aurelia-templating';
import { DOM } from 'aurelia-pal';
import {
animationEvent,
TemplatingEngine
} from 'aurelia-templating';
import {
DOM
} from 'aurelia-pal';
export interface CssAnimation {
className: string;
element: HTMLElement;
}

/**
* An implementation of the Animator using CSS3-Animations.
*/
/**
* An implementation of the Animator using CSS3-Animations.
*/
Expand Down
Loading

0 comments on commit 6501fdb

Please sign in to comment.