Skip to content

Commit 6501fdb

Browse files
chore(all): prepare release 1.0.0-beta.1.2.0
1 parent 87924a6 commit 6501fdb

14 files changed

+680
-756
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aurelia-animator-css",
3-
"version": "1.0.0-beta.1.1.2",
3+
"version": "1.0.0-beta.1.2.0",
44
"description": "An implementation of the abstract Animator interface from templating which enables css-based animations.",
55
"keywords": [
66
"aurelia",

dist/amd/aurelia-animator-css.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
declare module 'aurelia-animator-css' {
2-
import { animationEvent, TemplatingEngine } from 'aurelia-templating';
3-
import { DOM } from 'aurelia-pal';
2+
import {
3+
animationEvent,
4+
TemplatingEngine
5+
} from 'aurelia-templating';
6+
import {
7+
DOM
8+
} from 'aurelia-pal';
49
export interface CssAnimation {
510
className: string;
611
element: HTMLElement;
712
}
813

14+
/**
15+
* An implementation of the Animator using CSS3-Animations.
16+
*/
917
/**
1018
* An implementation of the Animator using CSS3-Animations.
1119
*/

dist/amd/aurelia-animator-css.js

Lines changed: 53 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aureliaTemplating, _aureliaPal) {
22
'use strict';
33

4-
exports.__esModule = true;
4+
Object.defineProperty(exports, "__esModule", {
5+
value: true
6+
});
7+
exports.CssAnimator = undefined;
58
exports.configure = configure;
69

7-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
10+
function _classCallCheck(instance, Constructor) {
11+
if (!(instance instanceof Constructor)) {
12+
throw new TypeError("Cannot call a class as a function");
13+
}
14+
}
815

9-
var CssAnimator = (function () {
16+
var CssAnimator = exports.CssAnimator = function () {
1017
function CssAnimator() {
1118
_classCallCheck(this, CssAnimator);
1219

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

2835
CssAnimator.prototype._getElementAnimationDelay = function _getElementAnimationDelay(element) {
2936
var styl = _aureliaPal.DOM.getComputedStyle(element);
30-
var prop = undefined;
31-
var delay = undefined;
37+
var prop = void 0;
38+
var delay = void 0;
3239

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

4956
CssAnimator.prototype._getElementAnimationNames = function _getElementAnimationNames(element) {
5057
var styl = _aureliaPal.DOM.getComputedStyle(element);
51-
var prefix = undefined;
58+
var prefix = void 0;
5259

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

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

107114
var styleSheets = document.styleSheets;
108-
for (var i = 0; i < styleSheets.length; ++i) {
109-
var cssRules = styleSheets[i].cssRules;
110115

111-
if (!cssRules) {
112-
continue;
113-
}
116+
try {
117+
for (var i = 0; i < styleSheets.length; ++i) {
118+
var cssRules = styleSheets[i].cssRules;
114119

115-
for (var j = 0; j < cssRules.length; ++j) {
116-
var cssRule = cssRules[j];
120+
if (!cssRules) {
121+
continue;
122+
}
117123

118-
if (cssRule.type === keyframesRuleType) {
119-
if (newAnimationNames.indexOf(cssRule.name) !== -1) {
120-
return true;
124+
for (var j = 0; j < cssRules.length; ++j) {
125+
var cssRule = cssRules[j];
126+
127+
if (cssRule.type === keyframesRuleType) {
128+
if (newAnimationNames.indexOf(cssRule.name) !== -1) {
129+
return true;
130+
}
121131
}
122132
}
123133
}
124-
}
134+
} catch (e) {}
125135

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

171-
var animStart = undefined;
181+
var _animStart = void 0;
172182
var animHasStarted = false;
173-
_this4._addMultipleEventListener(element, 'webkitAnimationStart animationstart', animStart = function (evAnimStart) {
183+
_this4._addMultipleEventListener(element, 'webkitAnimationStart animationstart', _animStart = function animStart(evAnimStart) {
174184
animHasStarted = true;
175185
_this4.isAnimating = true;
176186

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

179189
evAnimStart.stopPropagation();
180190

181-
evAnimStart.target.removeEventListener(evAnimStart.type, animStart);
191+
evAnimStart.target.removeEventListener(evAnimStart.type, _animStart);
182192
}, false);
183193

184-
var animEnd = undefined;
185-
_this4._addMultipleEventListener(element, 'webkitAnimationEnd animationend', animEnd = function (evAnimEnd) {
194+
var _animEnd = void 0;
195+
_this4._addMultipleEventListener(element, 'webkitAnimationEnd animationend', _animEnd = function animEnd(evAnimEnd) {
186196
if (!animHasStarted) {
187197
return;
188198
}
@@ -192,7 +202,7 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur
192202
classList.remove('au-enter-active');
193203
classList.remove('au-enter');
194204

195-
evAnimEnd.target.removeEventListener(evAnimEnd.type, animEnd);
205+
evAnimEnd.target.removeEventListener(evAnimEnd.type, _animEnd);
196206

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

253-
var animStart = undefined;
263+
var _animStart2 = void 0;
254264
var animHasStarted = false;
255-
_this5._addMultipleEventListener(element, 'webkitAnimationStart animationstart', animStart = function (evAnimStart) {
265+
_this5._addMultipleEventListener(element, 'webkitAnimationStart animationstart', _animStart2 = function animStart(evAnimStart) {
256266
animHasStarted = true;
257267
_this5.isAnimating = true;
258268

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

261271
evAnimStart.stopPropagation();
262272

263-
evAnimStart.target.removeEventListener(evAnimStart.type, animStart);
273+
evAnimStart.target.removeEventListener(evAnimStart.type, _animStart2);
264274
}, false);
265275

266-
var animEnd = undefined;
267-
_this5._addMultipleEventListener(element, 'webkitAnimationEnd animationend', animEnd = function (evAnimEnd) {
276+
var _animEnd2 = void 0;
277+
_this5._addMultipleEventListener(element, 'webkitAnimationEnd animationend', _animEnd2 = function animEnd(evAnimEnd) {
268278
if (!animHasStarted) {
269279
return;
270280
}
@@ -274,7 +284,7 @@ define(['exports', 'aurelia-templating', 'aurelia-pal'], function (exports, _aur
274284
classList.remove('au-leave-active');
275285
classList.remove('au-leave');
276286

277-
evAnimEnd.target.removeEventListener(evAnimEnd.type, animEnd);
287+
evAnimEnd.target.removeEventListener(evAnimEnd.type, _animEnd2);
278288

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

339-
var animStart = undefined;
349+
var _animStart3 = void 0;
340350
var animHasStarted = false;
341-
_this6._addMultipleEventListener(element, 'webkitAnimationStart animationstart', animStart = function (evAnimStart) {
351+
_this6._addMultipleEventListener(element, 'webkitAnimationStart animationstart', _animStart3 = function animStart(evAnimStart) {
342352
animHasStarted = true;
343353
_this6.isAnimating = true;
344354

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

349359
evAnimStart.stopPropagation();
350360

351-
evAnimStart.target.removeEventListener(evAnimStart.type, animStart);
361+
evAnimStart.target.removeEventListener(evAnimStart.type, _animStart3);
352362
}, false);
353363

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

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

364-
evAnimEnd.target.removeEventListener(evAnimEnd.type, animEnd);
374+
evAnimEnd.target.removeEventListener(evAnimEnd.type, _animEnd3);
365375

366376
_this6.isAnimating = false;
367377

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

403-
var animStart = undefined;
413+
var _animStart4 = void 0;
404414
var animHasStarted = false;
405-
_this7._addMultipleEventListener(element, 'webkitAnimationStart animationstart', animStart = function (evAnimStart) {
415+
_this7._addMultipleEventListener(element, 'webkitAnimationStart animationstart', _animStart4 = function animStart(evAnimStart) {
406416
animHasStarted = true;
407417
_this7.isAnimating = true;
408418

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

413423
evAnimStart.stopPropagation();
414424

415-
evAnimStart.target.removeEventListener(evAnimStart.type, animStart);
425+
evAnimStart.target.removeEventListener(evAnimStart.type, _animStart4);
416426
}, false);
417427

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

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

430-
evAnimEnd.target.removeEventListener(evAnimEnd.type, animEnd);
440+
evAnimEnd.target.removeEventListener(evAnimEnd.type, _animEnd4);
431441

432442
_this7.isAnimating = false;
433443

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

459469
return CssAnimator;
460-
})();
461-
462-
exports.CssAnimator = CssAnimator;
470+
}();
463471

464472
function configure(config, callback) {
465473
var animator = config.container.get(CssAnimator);

dist/aurelia-animator-css.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
declare module 'aurelia-animator-css' {
2-
import { animationEvent, TemplatingEngine } from 'aurelia-templating';
3-
import { DOM } from 'aurelia-pal';
2+
import {
3+
animationEvent,
4+
TemplatingEngine
5+
} from 'aurelia-templating';
6+
import {
7+
DOM
8+
} from 'aurelia-pal';
49
export interface CssAnimation {
510
className: string;
611
element: HTMLElement;
712
}
813

14+
/**
15+
* An implementation of the Animator using CSS3-Animations.
16+
*/
917
/**
1018
* An implementation of the Animator using CSS3-Animations.
1119
*/

dist/aurelia-animator-css.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,22 +150,27 @@ export class CssAnimator {
150150
// loop through the stylesheets searching for the keyframes. no cache is
151151
// used in case of dynamic changes to the stylesheets.
152152
let styleSheets = document.styleSheets;
153-
for (let i = 0; i < styleSheets.length; ++i) {
154-
let cssRules = styleSheets[i].cssRules;
155153

156-
if (!cssRules) {
157-
continue;
158-
}
154+
try {
155+
for (let i = 0; i < styleSheets.length; ++i) {
156+
let cssRules = styleSheets[i].cssRules;
157+
158+
if (!cssRules) {
159+
continue;
160+
}
159161

160-
for (let j = 0; j < cssRules.length; ++j) {
161-
let cssRule = cssRules[j];
162+
for (let j = 0; j < cssRules.length; ++j) {
163+
let cssRule = cssRules[j];
162164

163-
if (cssRule.type === keyframesRuleType) {
164-
if (newAnimationNames.indexOf(cssRule.name) !== -1) {
165-
return true;
165+
if (cssRule.type === keyframesRuleType) {
166+
if (newAnimationNames.indexOf(cssRule.name) !== -1) {
167+
return true;
168+
}
166169
}
167170
}
168171
}
172+
} catch (e) {
173+
//do nothing
169174
}
170175

171176
return false;

dist/commonjs/aurelia-animator-css.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
declare module 'aurelia-animator-css' {
2-
import { animationEvent, TemplatingEngine } from 'aurelia-templating';
3-
import { DOM } from 'aurelia-pal';
2+
import {
3+
animationEvent,
4+
TemplatingEngine
5+
} from 'aurelia-templating';
6+
import {
7+
DOM
8+
} from 'aurelia-pal';
49
export interface CssAnimation {
510
className: string;
611
element: HTMLElement;
712
}
813

14+
/**
15+
* An implementation of the Animator using CSS3-Animations.
16+
*/
917
/**
1018
* An implementation of the Animator using CSS3-Animations.
1119
*/

0 commit comments

Comments
 (0)