polymer-paper-rails 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -18
  3. data/app/assets/components/core-a11y-keys/core-a11y-keys.html +4 -4
  4. data/app/assets/components/core-animation/web-animations.html +1 -1
  5. data/app/assets/components/core-collapse/core-collapse.html +1 -1
  6. data/app/assets/components/core-drawer-panel/core-drawer-panel.css +14 -6
  7. data/app/assets/components/core-drawer-panel/core-drawer-panel.html +32 -8
  8. data/app/assets/components/core-dropdown/core-dropdown.html +8 -2
  9. data/app/assets/components/core-icon/core-icon.html +0 -2
  10. data/app/assets/components/core-icons/av-icons.html +2 -9
  11. data/app/assets/components/core-icons/communication-icons.html +39 -42
  12. data/app/assets/components/core-icons/core-icons.html +231 -235
  13. data/app/assets/components/core-icons/device-icons.html +75 -90
  14. data/app/assets/components/core-icons/editor-icons.html +52 -52
  15. data/app/assets/components/core-icons/hardware-icons.html +40 -41
  16. data/app/assets/components/core-icons/image-icons.html +133 -137
  17. data/app/assets/components/core-icons/maps-icons.html +55 -57
  18. data/app/assets/components/core-icons/notification-icons.html +34 -34
  19. data/app/assets/components/core-icons/social-icons.html +23 -37
  20. data/app/assets/components/core-menu/core-menu.html +8 -3
  21. data/app/assets/components/core-menu/core-submenu.html +2 -2
  22. data/app/assets/components/core-overlay/core-key-helper.html +3 -0
  23. data/app/assets/components/core-overlay/core-overlay-layer.html +3 -0
  24. data/app/assets/components/core-overlay/core-overlay.html +20 -4
  25. data/app/assets/components/core-resizable/core-resizable.html +248 -0
  26. data/app/assets/components/core-scroll-header-panel/core-scroll-header-panel.html +14 -3
  27. data/app/assets/components/core-selection/core-selection.html +1 -1
  28. data/app/assets/components/core-selector/core-selector.html +26 -26
  29. data/app/assets/components/core-style/core-style.html +1 -1
  30. data/app/assets/components/core-toolbar/core-toolbar.html +1 -1
  31. data/app/assets/components/paper-button/paper-button-base.html +56 -12
  32. data/app/assets/components/paper-button/paper-button.html +22 -5
  33. data/app/assets/components/paper-checkbox/paper-checkbox.css +65 -184
  34. data/app/assets/components/paper-checkbox/paper-checkbox.html +47 -55
  35. data/app/assets/components/paper-dialog/paper-action-dialog.html +3 -3
  36. data/app/assets/components/paper-dialog/paper-dialog.html +2 -2
  37. data/app/assets/components/paper-dropdown-menu/paper-dropdown-menu.html +4 -1
  38. data/app/assets/components/{core-elements → paper-elements}/metadata.html +0 -0
  39. data/app/assets/components/{core-elements → paper-elements}/paper-elements.html +1 -0
  40. data/app/assets/components/paper-fab/paper-fab.html +2 -2
  41. data/app/assets/components/paper-input/paper-autogrow-textarea.html +8 -3
  42. data/app/assets/components/paper-input/paper-char-counter.html +121 -0
  43. data/app/assets/components/paper-input/paper-input-decorator.css +1 -21
  44. data/app/assets/components/paper-input/paper-input-decorator.html +130 -51
  45. data/app/assets/components/paper-input/paper-input.html +31 -5
  46. data/app/assets/components/paper-item/paper-item.html +1 -2
  47. data/app/assets/components/paper-progress/paper-progress.html +1 -1
  48. data/app/assets/components/paper-radio-button/paper-radio-button.css +16 -12
  49. data/app/assets/components/paper-radio-button/paper-radio-button.html +9 -3
  50. data/app/assets/components/paper-ripple/paper-ripple.html +2 -1
  51. data/app/assets/components/paper-shadow/paper-shadow.css +10 -10
  52. data/app/assets/components/paper-shadow/paper-shadow.html +8 -1
  53. data/app/assets/components/paper-slider/paper-slider.html +28 -4
  54. data/app/assets/components/paper-spinner/paper-spinner.css +35 -23
  55. data/app/assets/components/paper-spinner/paper-spinner.html +46 -5
  56. data/app/assets/components/paper-tabs/paper-tabs.css +5 -0
  57. data/app/assets/components/paper-tabs/paper-tabs.html +32 -7
  58. data/app/assets/components/paper-toggle-button/paper-toggle-button.css +58 -30
  59. data/app/assets/components/paper-toggle-button/paper-toggle-button.html +69 -44
  60. data/app/assets/components/sampler-scaffold/sampler-scaffold.css +1 -1
  61. data/app/assets/components/web-animations-js/web-animations-next-lite.min.js +17 -0
  62. data/app/assets/components/web-animations-js/web-animations-next.min.js +17 -0
  63. data/app/assets/components/web-animations-js/web-animations.min.js +17 -0
  64. data/app/assets/components/webcomponentsjs/CustomElements.js +634 -0
  65. data/app/assets/components/webcomponentsjs/CustomElements.min.js +11 -0
  66. data/app/assets/components/webcomponentsjs/HTMLImports.js +764 -0
  67. data/app/assets/components/webcomponentsjs/HTMLImports.min.js +11 -0
  68. data/app/assets/components/webcomponentsjs/ShadowDOM.js +4277 -0
  69. data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +13 -0
  70. data/app/assets/components/webcomponentsjs/package.json +31 -0
  71. data/app/assets/components/webcomponentsjs/webcomponents-lite.js +1728 -0
  72. data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +11 -0
  73. data/app/assets/components/webcomponentsjs/webcomponents.js +6114 -0
  74. data/app/assets/components/webcomponentsjs/webcomponents.min.js +14 -0
  75. data/lib/polymer-paper-rails/version.rb +1 -1
  76. metadata +20 -71
  77. data/app/assets/components/core-dropdown/metadata.html +0 -62
  78. data/app/assets/components/core-icons/png-icons.html +0 -19
  79. data/app/assets/components/core-label/core-label.html +0 -124
  80. data/app/assets/components/core-overlay/tests/html/core-overlay-basic.html +0 -127
  81. data/app/assets/components/core-overlay/tests/html/core-overlay-positioning-margin.html +0 -153
  82. data/app/assets/components/core-overlay/tests/html/core-overlay-positioning.html +0 -167
  83. data/app/assets/components/core-overlay/tests/html/core-overlay-scroll.html +0 -130
  84. data/app/assets/components/core-overlay/tests/js/htmltests.js +0 -6
  85. data/app/assets/components/core-overlay/tests/runner.html +0 -14
  86. data/app/assets/components/core-overlay/tests/tests.json +0 -6
  87. data/app/assets/components/core-popup-menu/core-popup-menu.css +0 -28
  88. data/app/assets/components/core-popup-menu/core-popup-menu.html +0 -198
  89. data/app/assets/components/core-popup-menu/core-popup-overlay.html +0 -111
  90. data/app/assets/components/core-popup-menu/metadata.html +0 -62
  91. data/app/assets/components/paper-focusable/paper-focusable.html +0 -146
  92. data/app/assets/components/platform/platform.js +0 -16
  93. data/app/assets/components/web-animations-js/web-animations.js +0 -5529
  94. data/app/assets/components/web-animations-next/Gruntfile.js +0 -279
  95. data/app/assets/components/web-animations-next/History.md +0 -76
  96. data/app/assets/components/web-animations-next/package.json +0 -33
  97. data/app/assets/components/web-animations-next/src/animation-constructor.js +0 -139
  98. data/app/assets/components/web-animations-next/src/animation-node.js +0 -31
  99. data/app/assets/components/web-animations-next/src/animation.js +0 -65
  100. data/app/assets/components/web-animations-next/src/apply-preserving-inline-style.js +0 -192
  101. data/app/assets/components/web-animations-next/src/apply.js +0 -25
  102. data/app/assets/components/web-animations-next/src/box-handler.js +0 -57
  103. data/app/assets/components/web-animations-next/src/color-handler.js +0 -62
  104. data/app/assets/components/web-animations-next/src/deprecation.js +0 -42
  105. data/app/assets/components/web-animations-next/src/dev.js +0 -16
  106. data/app/assets/components/web-animations-next/src/dimension-handler.js +0 -167
  107. data/app/assets/components/web-animations-next/src/effect-callback.js +0 -86
  108. data/app/assets/components/web-animations-next/src/effect.js +0 -110
  109. data/app/assets/components/web-animations-next/src/element-animatable.js +0 -19
  110. data/app/assets/components/web-animations-next/src/font-weight-handler.js +0 -42
  111. data/app/assets/components/web-animations-next/src/group-constructors.js +0 -81
  112. data/app/assets/components/web-animations-next/src/handler-utils.js +0 -177
  113. data/app/assets/components/web-animations-next/src/interpolation.js +0 -49
  114. data/app/assets/components/web-animations-next/src/matrix-decomposition.js +0 -452
  115. data/app/assets/components/web-animations-next/src/matrix-interpolation.js +0 -130
  116. data/app/assets/components/web-animations-next/src/maxifill-player.js +0 -162
  117. data/app/assets/components/web-animations-next/src/normalize-keyframes.js +0 -259
  118. data/app/assets/components/web-animations-next/src/number-handler.js +0 -72
  119. data/app/assets/components/web-animations-next/src/player.js +0 -193
  120. data/app/assets/components/web-animations-next/src/position-handler.js +0 -117
  121. data/app/assets/components/web-animations-next/src/property-interpolation.js +0 -62
  122. data/app/assets/components/web-animations-next/src/property-names.js +0 -35
  123. data/app/assets/components/web-animations-next/src/scope.js +0 -20
  124. data/app/assets/components/web-animations-next/src/shadow-handler.js +0 -108
  125. data/app/assets/components/web-animations-next/src/shape-handler.js +0 -85
  126. data/app/assets/components/web-animations-next/src/tick.js +0 -148
  127. data/app/assets/components/web-animations-next/src/timeline.js +0 -77
  128. data/app/assets/components/web-animations-next/src/timing-utilities.js +0 -242
  129. data/app/assets/components/web-animations-next/src/transform-handler.js +0 -262
  130. data/app/assets/components/web-animations-next/src/visibility-handler.js +0 -29
  131. data/app/assets/components/web-animations-next/target-config.js +0 -124
  132. data/app/assets/components/web-animations-next/target-loader.js +0 -13
  133. data/app/assets/components/web-animations-next/templates/boilerplate +0 -13
  134. data/app/assets/components/web-animations-next/templates/runner.html +0 -26
  135. data/app/assets/components/web-animations-next/templates/web-animations.html +0 -18
  136. data/app/assets/components/web-animations-next/templates/web-animations.js +0 -21
  137. data/app/assets/components/web-animations-next/web-animations-next-lite.dev.html +0 -44
  138. data/app/assets/components/web-animations-next/web-animations-next-lite.dev.js +0 -21
  139. data/app/assets/components/web-animations-next/web-animations-next.dev.html +0 -49
  140. data/app/assets/components/web-animations-next/web-animations-next.dev.js +0 -21
  141. data/app/assets/components/web-animations-next/web-animations.dev.html +0 -44
  142. data/app/assets/components/web-animations-next/web-animations.dev.js +0 -21
  143. data/app/assets/components/web-animations-next/web-animations.html +0 -50
@@ -1,16 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- var WEB_ANIMATIONS_TESTING = false;
16
- var webAnimationsTesting = null;
@@ -1,167 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- (function(scope, testing) {
16
-
17
- function parseDimension(unitRegExp, string) {
18
- string = string.trim().toLowerCase();
19
-
20
- if (string == '0' && 'px'.search(unitRegExp) >= 0)
21
- return {px: 0};
22
-
23
- // If we have parenthesis, we're a calc and need to start with 'calc'.
24
- if (!/^[^(]*$|^calc/.test(string))
25
- return;
26
- string = string.replace(/calc\(/g, '(');
27
-
28
- // We tag units by prefixing them with 'U' (note that we are already
29
- // lowercase) to prevent problems with types which are substrings of
30
- // each other (although prefixes may be problematic!)
31
- var matchedUnits = {};
32
- string = string.replace(unitRegExp, function(match) {
33
- matchedUnits[match] = null;
34
- return 'U' + match;
35
- });
36
- var taggedUnitRegExp = 'U(' + unitRegExp.source + ')';
37
-
38
- // Validating input is simply applying as many reductions as we can.
39
- var typeCheck = string.replace(/[-+]?(\d*\.)?\d+/g, 'N')
40
- .replace(new RegExp('N' + taggedUnitRegExp, 'g'), 'D')
41
- .replace(/\s[+-]\s/g, 'O')
42
- .replace(/\s/g, '');
43
- var reductions = [/N\*(D)/g, /(N|D)[*/]N/g, /(N|D)O\1/g, /\((N|D)\)/g];
44
- var i = 0;
45
- while (i < reductions.length) {
46
- if (reductions[i].test(typeCheck)) {
47
- typeCheck = typeCheck.replace(reductions[i], '$1');
48
- i = 0;
49
- } else {
50
- i++;
51
- }
52
- }
53
- if (typeCheck != 'D')
54
- return;
55
-
56
- for (var unit in matchedUnits) {
57
- var result = eval(string.replace(new RegExp('U' + unit, 'g'), '').replace(new RegExp(taggedUnitRegExp, 'g'), '*0'));
58
- if (!isFinite(result))
59
- return;
60
- matchedUnits[unit] = result;
61
- }
62
- return matchedUnits;
63
- }
64
-
65
- function mergeDimensionsNonNegative(left, right) {
66
- return mergeDimensions(left, right, true);
67
- }
68
-
69
- function mergeDimensions(left, right, nonNegative) {
70
- var units = [], unit;
71
- for (unit in left)
72
- units.push(unit);
73
- for (unit in right) {
74
- if (units.indexOf(unit) < 0)
75
- units.push(unit);
76
- }
77
-
78
- left = units.map(function(unit) { return left[unit] || 0; });
79
- right = units.map(function(unit) { return right[unit] || 0; });
80
- return [left, right, function(values) {
81
- var result = values.map(function(value, i) {
82
- if (values.length == 1 && nonNegative) {
83
- value = Math.max(value, 0);
84
- }
85
- // Scientific notation (e.g. 1e2) is not yet widely supported by browser vendors.
86
- return scope.numberToString(value) + units[i];
87
- }).join(' + ');
88
- return values.length > 1 ? 'calc(' + result + ')' : result;
89
- }];
90
- }
91
-
92
- var lengthUnits = 'px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc';
93
- var parseLength = parseDimension.bind(null, new RegExp(lengthUnits, 'g'));
94
- var parseLengthOrPercent = parseDimension.bind(null, new RegExp(lengthUnits + '|%', 'g'));
95
- var parseAngle = parseDimension.bind(null, /deg|rad|grad|turn/g);
96
-
97
- scope.parseLength = parseLength;
98
- scope.parseLengthOrPercent = parseLengthOrPercent;
99
- scope.consumeLengthOrPercent = scope.consumeParenthesised.bind(null, parseLengthOrPercent);
100
- scope.parseAngle = parseAngle;
101
- scope.mergeDimensions = mergeDimensions;
102
-
103
- var consumeLength = scope.consumeParenthesised.bind(null, parseLength);
104
- var consumeSizePair = scope.consumeRepeated.bind(undefined, consumeLength, /^/);
105
- var consumeSizePairList = scope.consumeRepeated.bind(undefined, consumeSizePair, /^,/);
106
- scope.consumeSizePairList = consumeSizePairList;
107
-
108
- var parseSizePairList = function(input) {
109
- var result = consumeSizePairList(input);
110
- if (result && result[1] == '') {
111
- return result[0];
112
- }
113
- };
114
-
115
- var mergeNonNegativeSizePair = scope.mergeNestedRepeated.bind(undefined, mergeDimensionsNonNegative, ' ');
116
- var mergeNonNegativeSizePairList = scope.mergeNestedRepeated.bind(undefined, mergeNonNegativeSizePair, ',');
117
- scope.mergeNonNegativeSizePair = mergeNonNegativeSizePair;
118
-
119
- scope.addPropertiesHandler(parseSizePairList, mergeNonNegativeSizePairList, [
120
- 'background-size'
121
- ]);
122
-
123
- scope.addPropertiesHandler(parseLengthOrPercent, mergeDimensionsNonNegative, [
124
- 'border-bottom-width',
125
- 'border-image-width',
126
- 'border-left-width',
127
- 'border-right-width',
128
- 'border-top-width',
129
- 'flex-basis',
130
- 'font-size',
131
- 'height',
132
- 'line-height',
133
- 'max-height',
134
- 'max-width',
135
- 'outline-width',
136
- 'width',
137
- ]);
138
-
139
- scope.addPropertiesHandler(parseLengthOrPercent, mergeDimensions, [
140
- 'border-bottom-left-radius',
141
- 'border-bottom-right-radius',
142
- 'border-top-left-radius',
143
- 'border-top-right-radius',
144
- 'bottom',
145
- 'left',
146
- 'letter-spacing',
147
- 'margin-bottom',
148
- 'margin-left',
149
- 'margin-right',
150
- 'margin-top',
151
- 'min-height',
152
- 'min-width',
153
- 'outline-offset',
154
- 'padding-bottom',
155
- 'padding-left',
156
- 'padding-right',
157
- 'padding-top',
158
- 'perspective',
159
- 'right',
160
- 'shape-margin',
161
- 'text-indent',
162
- 'top',
163
- 'vertical-align',
164
- 'word-spacing',
165
- ]);
166
-
167
- })(webAnimationsMinifill, webAnimationsTesting);
@@ -1,86 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- (function(shared, scope, testing) {
15
-
16
- var nullTarget = document.createElement('div');
17
-
18
- var sequenceNumber = 0;
19
- scope.bindPlayerForCustomEffect = function(player) {
20
- var target = player.source.target;
21
- var effect = player.source.effect;
22
- var timing = player.source.timing;
23
- var last = undefined;
24
- timing = shared.normalizeTimingInput(timing);
25
- var callback = function() {
26
- var t = callback._player ? callback._player.currentTime : null;
27
- if (t !== null) {
28
- t = shared.calculateTimeFraction(shared.calculateActiveDuration(timing), t, timing);
29
- if (isNaN(t))
30
- t = null;
31
- }
32
- // FIXME: There are actually more conditions under which the effect
33
- // should be called.
34
- if (t !== last)
35
- effect(t, target, player.source);
36
- last = t;
37
- };
38
-
39
- callback._player = player;
40
- callback._registered = false;
41
- callback._sequenceNumber = sequenceNumber++;
42
- player._callback = callback;
43
- register(callback);
44
- };
45
-
46
- var callbacks = [];
47
- var ticking = false;
48
- function register(callback) {
49
- if (callback._registered)
50
- return;
51
- callback._registered = true;
52
- callbacks.push(callback);
53
- if (!ticking) {
54
- ticking = true;
55
- requestAnimationFrame(tick);
56
- }
57
- }
58
-
59
- function tick(t) {
60
- var updating = callbacks;
61
- callbacks = [];
62
- updating.sort(function(left, right) {
63
- return left._sequenceNumber - right._sequenceNumber;
64
- });
65
- updating.filter(function(callback) {
66
- callback();
67
- if (!callback._player || callback._player.finished || callback._player.paused)
68
- callback._registered = false;
69
- return callback._registered;
70
- });
71
- callbacks.push.apply(callbacks, updating);
72
-
73
- if (callbacks.length) {
74
- ticking = true;
75
- requestAnimationFrame(tick);
76
- } else {
77
- ticking = false;
78
- }
79
- }
80
-
81
- scope.Player.prototype._register = function() {
82
- if (this._callback)
83
- register(this._callback);
84
- };
85
-
86
- })(webAnimationsShared, webAnimationsMaxifill, webAnimationsTesting);
@@ -1,110 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- (function(shared, scope, testing) {
16
-
17
- scope.convertEffectInput = function(effectInput) {
18
- var keyframeEffect = shared.normalizeKeyframes(effectInput);
19
- var propertySpecificKeyframeGroups = makePropertySpecificKeyframeGroups(keyframeEffect);
20
- var interpolations = makeInterpolations(propertySpecificKeyframeGroups);
21
- return function(target, fraction) {
22
- if (fraction != null) {
23
- interpolations.filter(function(interpolation) {
24
- return (fraction <= 0 && interpolation.startTime == 0) ||
25
- (fraction >= 1 && interpolation.endTime == 1) ||
26
- (fraction >= interpolation.startTime && fraction <= interpolation.endTime);
27
- }).forEach(function(interpolation) {
28
- var offsetFraction = fraction - interpolation.startTime;
29
- var localDuration = interpolation.endTime - interpolation.startTime;
30
- var scaledLocalTime = localDuration == 0 ? 0 : interpolation.easing(offsetFraction / localDuration);
31
- scope.apply(target, interpolation.property, interpolation.interpolation(scaledLocalTime));
32
- });
33
- } else {
34
- for (var property in propertySpecificKeyframeGroups)
35
- if (property != 'offset' && property != 'easing' && property != 'composite')
36
- scope.clear(target, property);
37
- }
38
- };
39
- };
40
-
41
-
42
- function makePropertySpecificKeyframeGroups(keyframeEffect) {
43
- var propertySpecificKeyframeGroups = {};
44
-
45
- for (var i = 0; i < keyframeEffect.length; i++) {
46
- for (var member in keyframeEffect[i]) {
47
- if (member != 'offset' && member != 'easing' && member != 'composite') {
48
- var propertySpecificKeyframe = {
49
- offset: keyframeEffect[i].offset,
50
- easing: keyframeEffect[i].easing,
51
- value: keyframeEffect[i][member]
52
- };
53
- propertySpecificKeyframeGroups[member] = propertySpecificKeyframeGroups[member] || [];
54
- propertySpecificKeyframeGroups[member].push(propertySpecificKeyframe);
55
- }
56
- }
57
- }
58
-
59
- for (var groupName in propertySpecificKeyframeGroups) {
60
- var group = propertySpecificKeyframeGroups[groupName];
61
- if (group[0].offset != 0 || group[group.length - 1].offset != 1) {
62
- throw {
63
- type: DOMException.NOT_SUPPORTED_ERR,
64
- name: 'NotSupportedError',
65
- message: 'Partial keyframes are not supported'
66
- };
67
- }
68
- }
69
- return propertySpecificKeyframeGroups;
70
- }
71
-
72
-
73
- function makeInterpolations(propertySpecificKeyframeGroups) {
74
- var interpolations = [];
75
- for (var groupName in propertySpecificKeyframeGroups) {
76
- var group = propertySpecificKeyframeGroups[groupName];
77
- for (var i = 0; i < group.length - 1; i++) {
78
- var startTime = group[i].offset;
79
- var endTime = group[i + 1].offset;
80
- var startValue = group[i].value;
81
- var endValue = group[i + 1].value;
82
- if (startTime == endTime) {
83
- if (endTime == 1) {
84
- startValue = endValue;
85
- } else {
86
- endValue = startValue;
87
- }
88
- }
89
- interpolations.push({
90
- startTime: startTime,
91
- endTime: endTime,
92
- easing: group[i].easing,
93
- property: groupName,
94
- interpolation: scope.propertyInterpolation(groupName, startValue, endValue)
95
- });
96
- }
97
- }
98
- interpolations.sort(function(leftInterpolation, rightInterpolation) {
99
- return leftInterpolation.startTime - rightInterpolation.startTime;
100
- });
101
- return interpolations;
102
- }
103
-
104
-
105
- if (WEB_ANIMATIONS_TESTING) {
106
- testing.makePropertySpecificKeyframeGroups = makePropertySpecificKeyframeGroups;
107
- testing.makeInterpolations = makeInterpolations;
108
- }
109
-
110
- })(webAnimationsShared, webAnimationsMinifill, webAnimationsTesting);
@@ -1,19 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- (function(scope) {
16
- window.Element.prototype.animate = function(effectInput, timingInput) {
17
- return scope.timeline._play(scope.Animation(this, effectInput, timingInput));
18
- };
19
- })(webAnimationsMinifill);
@@ -1,42 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- (function(scope) {
16
- function parse(string) {
17
- var out = Number(string);
18
- if (isNaN(out) || out < 100 || out > 900 || out % 100 !== 0) {
19
- return;
20
- }
21
- return out;
22
- }
23
-
24
- function toCss(value) {
25
- value = Math.round(value / 100) * 100;
26
- value = scope.clamp(100, 900, value);
27
- if (value === 400) {
28
- return 'normal';
29
- }
30
- if (value === 700) {
31
- return 'bold';
32
- }
33
- return String(value);
34
- }
35
-
36
- function merge(left, right) {
37
- return [left, right, toCss];
38
- }
39
-
40
- scope.addPropertiesHandler(parse, merge, ['font-weight']);
41
-
42
- })(webAnimationsMinifill);
@@ -1,81 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- (function(shared, scope, testing) {
16
-
17
- function constructor(children, timingInput) {
18
- this.children = children || [];
19
- this._timing = shared.normalizeTimingInput(timingInput, true);
20
- this.timing = shared.makeTiming(timingInput, true);
21
-
22
- if (this._timing.duration === 'auto')
23
- this._timing.duration = this.activeDuration;
24
- }
25
-
26
- window.AnimationSequence = function() {
27
- constructor.apply(this, arguments);
28
- };
29
-
30
- window.AnimationGroup = function() {
31
- constructor.apply(this, arguments);
32
- };
33
-
34
- window.AnimationSequence.prototype = {
35
- get activeDuration() {
36
- var total = 0;
37
- this.children.forEach(function(child) {
38
- total += scope.groupChildDuration(child);
39
- });
40
- return Math.max(total, 0);
41
- }
42
- };
43
-
44
- window.AnimationGroup.prototype = {
45
- get activeDuration() {
46
- var max = 0;
47
- this.children.forEach(function(child) {
48
- max = Math.max(max, scope.groupChildDuration(child));
49
- });
50
- return max;
51
- }
52
- };
53
-
54
- scope.newUnderlyingPlayerForGroup = function(group) {
55
- var underlyingPlayer;
56
- var ticker = function(tf) {
57
- var player = underlyingPlayer._wrapper;
58
- if (!player.source)
59
- return;
60
- if (tf == null) {
61
- player._removePlayers();
62
- return;
63
- }
64
- if (player.startTime === null)
65
- return;
66
-
67
- player._updateChildren();
68
- };
69
-
70
- underlyingPlayer = scope.timeline.play(new scope.Animation(null, ticker, group._timing));
71
- return underlyingPlayer;
72
- };
73
-
74
- scope.bindPlayerForGroup = function(player) {
75
- player._player._wrapper = player;
76
- player._isGroup = true;
77
- scope.awaitStartTime(player);
78
- };
79
-
80
-
81
- })(webAnimationsShared, webAnimationsMaxifill, webAnimationsTesting);