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,279 +0,0 @@
1
- module.exports = function(grunt) {
2
- grunt.loadNpmTasks('grunt-contrib-uglify');
3
- grunt.loadNpmTasks('grunt-gjslint');
4
- grunt.loadNpmTasks('grunt-checkrepo');
5
- grunt.loadNpmTasks('grunt-karma');
6
- grunt.loadNpmTasks('grunt-saucelabs');
7
- grunt.loadNpmTasks('grunt-git-status');
8
- grunt.loadNpmTasks('grunt-template');
9
-
10
- var targetConfig = require('./target-config.js');
11
-
12
- var sourceMap = require('source-map');
13
-
14
- var config = {
15
- uglify: {},
16
- template: {},
17
- wrap: {},
18
- sourceMapConcat: {},
19
- };
20
-
21
- function concat(sources, target, defines) {
22
- config.uglify[target] = {
23
- options: {
24
- sourceMap: true,
25
- sourceMapName: target + '.map',
26
- wrap: false,
27
- compress: {
28
- global_defs: defines,
29
- dead_code: false
30
- },
31
- mangle: false
32
- },
33
- nonull: true,
34
- dest: target,
35
- src: sources
36
- };
37
- return 'uglify:' + target;
38
- }
39
-
40
- function compress(source, target, defines) {
41
- var name = concat([source], target, defines);
42
- var record = config.uglify[target];
43
- record.options.sourceMapIn = source + '.map';
44
- record.options.banner = grunt.file.read('templates/boilerplate');
45
- record.options.wrap = true;
46
- record.options.compress.dead_code = true;
47
- record.options.mangle = { eval: true };
48
- return name;
49
- }
50
-
51
- function genTarget(target) {
52
- var config = targetConfig[target];
53
- var newGens = [
54
- generateFromTemplate('templates/web-animations.js', {target: target}, target + '.dev.js'),
55
- generateFromTemplate('templates/web-animations.html', {src: config.src}, target + '.dev.html'),
56
- generateFromTemplate('templates/runner.html', {target: target}, 'test/runner-' + target + '.html')];
57
- return newGens;
58
- }
59
-
60
- function generateFromTemplate(source, data, target) {
61
- var targetSpec = {};
62
- targetSpec[target] = [source];
63
- config.template[target] = {
64
- options: {
65
- data: data
66
- },
67
- files: targetSpec
68
- }
69
- return 'template:' + target;
70
- }
71
-
72
- function guard(source, target) {
73
- config.wrap[target] = {
74
- source: source,
75
- preamble: '(function() {\n' +
76
- ' if (document.documentElement.animate) {\n' +
77
- ' var player = document.documentElement.animate([], 0);\n' +
78
- ' var load = true;\n' +
79
- ' if (player) {\n' +
80
- ' load = false;\n' +
81
- ' "play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(t) {\n' +
82
- ' if (player[t] === undefined) {\n' +
83
- ' load = true;\n' +
84
- ' }\n' +
85
- ' });\n' +
86
- ' }\n' +
87
- ' if (!load) { return; }' +
88
- ' }\n',
89
- postamble: '})();'
90
- };
91
- return 'wrap:' + target;
92
- }
93
-
94
- function concatWithMaps(sources, target) {
95
- config.sourceMapConcat[target] = {
96
- sources: sources
97
- }
98
- return 'sourceMapConcat:' + target;
99
- };
100
-
101
- var concatDefines = {
102
- WEB_ANIMATIONS_TESTING: false
103
- };
104
-
105
- function buildMinifill(target) {
106
- var config = targetConfig[target];
107
- return genTarget(target).concat([
108
- concat(config.scopeSrc.concat(config.sharedSrc).concat(config.minifillSrc), 'inter-raw-' + target + '.js', concatDefines),
109
- guard('inter-raw-' + target + '.js', 'inter-' + target + '.js'),
110
- compress('inter-' + target + '.js', target + '.min.js', concatDefines)
111
- ]);
112
- }
113
-
114
- function buildMaxifill(target) {
115
- var config = targetConfig[target];
116
- return genTarget(target).concat([
117
- concat(config.scopeSrc.concat(config.sharedSrc), 'inter-' + target + '-preamble.js', concatDefines),
118
- concat(config.minifillSrc, 'inter-component-' + target + 'minifill.js', concatDefines),
119
- guard('inter-component-' + target + 'minifill.js', 'inter-guarded-' + target + '-minifill.js'),
120
- concat(config.maxifillSrc, 'inter-component-' + target + '.js', concatDefines),
121
- concatWithMaps(['inter-' + target + '-preamble.js', 'inter-guarded-' + target + '-minifill.js', 'inter-component-' + target + '.js'],
122
- 'inter-' + target + '.js'),
123
- compress('inter-' + target + '.js', target + '.min.js', concatDefines)
124
- ]);
125
- }
126
-
127
- grunt.registerTask('web-animations', buildMinifill('web-animations'));
128
- grunt.registerTask('web-animations-next', buildMaxifill('web-animations-next'));
129
- grunt.registerTask('web-animations-next-lite', buildMaxifill('web-animations-next-lite'));
130
-
131
- var testTargets = {'web-animations': {}, 'web-animations-next': {}};
132
-
133
- grunt.initConfig({
134
- uglify: config.uglify,
135
- template: config.template,
136
- wrap: config.wrap,
137
- sourceMapConcat: config.sourceMapConcat,
138
- checkrepo: {
139
- all: {
140
- clean: true,
141
- },
142
- },
143
- 'git-status': {
144
- all: {
145
- },
146
- },
147
- gjslint: {
148
- options: {
149
- flags: [
150
- '--nojsdoc',
151
- '--strict',
152
- '--disable 7,121,110', // 7: Wrong blank line count
153
- // 121: Illegal comma at end of object literal
154
- // 110: Line too long
155
- ],
156
- reporter: {
157
- name: 'console'
158
- }
159
- },
160
- all: {
161
- src: [
162
- 'src/*.js',
163
- 'test/*.js',
164
- 'test/js/*.js',
165
- ],
166
- }
167
- },
168
- test: testTargets,
169
- sauce: testTargets,
170
- });
171
-
172
-
173
- grunt.task.registerMultiTask('test', 'Run <target> tests under Karma', function() {
174
- var done = this.async();
175
- var karmaConfig = require('karma/lib/config').parseConfig(require('path').resolve('test/karma-config.js'), {});
176
- var config = targetConfig[this.target];
177
- karmaConfig.files = ['test/runner.js'].concat(config.src, config.test);
178
- var karmaServer = require('karma').server;
179
- karmaServer.start(karmaConfig, function(exitCode) {
180
- done(exitCode === 0);
181
- });
182
- });
183
-
184
- grunt.task.registerMultiTask('sauce', 'Run <target> tests under Karma on Saucelabs', function() {
185
- var done = this.async();
186
- var karmaConfig = require('karma/lib/config').parseConfig(require('path').resolve('test/karma-config-ci.js'), {});
187
- var config = targetConfig[this.target];
188
- karmaConfig.files = ['test/runner.js'].concat(config.src, config.test);
189
- karmaConfig.sauceLabs.testName = 'web-animation-next ' + this.target + ' Unit tests';
190
- var karmaServer = require('karma').server;
191
- karmaServer.start(karmaConfig, function(exitCode) {
192
- done(exitCode === 0);
193
- });
194
- });
195
-
196
- grunt.task.registerMultiTask('sourceMapConcat', 'concat source files and produce combined source map',
197
- function() {
198
- var sources = this.data.sources.map(grunt.file.read);
199
- var sourceMaps = this.data.sources.map(function(f) { return grunt.file.read(f + '.map'); });
200
- var out = "";
201
- var outMapGenerator = new sourceMap.SourceMapGenerator({file: this.target});
202
- var lineDelta = 0;
203
- for (var i = 0; i < sources.length; i++) {
204
- out += sources[i];
205
- new sourceMap.SourceMapConsumer(sourceMaps[i]).eachMapping(function(mapping) {
206
- outMapGenerator.addMapping({
207
- generated: {line: mapping.generatedLine + lineDelta, column: mapping.generatedColumn},
208
- original: {line: mapping.originalLine, column: mapping.originalColumn},
209
- source: mapping.source, name: mapping.name});
210
- });
211
- var sourceLines = sources[i].split('\n');
212
- lineDelta += sourceLines.length;
213
- if (sources[i][sources[i].length - 1] !== '\n') {
214
- out += '\n';
215
- }
216
- }
217
- grunt.file.write(this.target, out);
218
- grunt.file.write(this.target + '.map', outMapGenerator.toString());
219
- });
220
-
221
- grunt.task.registerMultiTask('wrap', 'Wrap <target> source file and update source map',
222
- function() {
223
- var inFile = grunt.file.read(this.data.source);
224
- var inMap = grunt.file.read(this.data.source + '.map');
225
- var inLines = inFile.split('\n');
226
- var i = 0;
227
-
228
- // Discover copyright header
229
- while (inLines[i].length < 2 || inLines[i].substring(0, 2) == '//') {
230
- i++;
231
- }
232
-
233
- // Fix mapping footer
234
- var postamble = this.data.postamble;
235
- if (inLines[inLines.length - 1].substring(0, 21) == '//# sourceMappingURL=') {
236
- postamble += '\n//# sourceMappingURL=' + this.target + '.map';
237
- }
238
-
239
- if (i > 0) {
240
- var banner = inLines.slice(0, i).join('\n') + '\n';
241
- } else {
242
- var banner = '';
243
- }
244
-
245
- var source = inLines.slice(i, inLines.length - 1).join('\n');
246
-
247
- grunt.file.write(this.target, banner + this.data.preamble + source + postamble);
248
- var preLines = this.data.preamble.split('\n');
249
- var lineDelta = preLines.length;
250
- if (this.data.preamble[this.data.preamble.length - 1] == '\n') {
251
- var charDelta = 0;
252
- } else {
253
- var charDelta = preLines[lineDelta - 1].length;
254
- lineDelta -= 1;
255
- }
256
- var inMapConsumer = new sourceMap.SourceMapConsumer(inMap);
257
- var outMapGenerator = new sourceMap.SourceMapGenerator({file: this.target});
258
- inMapConsumer.eachMapping(function(mapping) {
259
- if (mapping.generatedLine == i + 1) {
260
- mapping.generatedColumn += charDelta;
261
- }
262
- mapping.generatedLine += lineDelta;
263
- outMapGenerator.addMapping(
264
- {generated: {line: mapping.generatedLine, column: mapping.generatedColumn},
265
- original: {line: mapping.originalLine, column: mapping.originalColumn},
266
- source: mapping.source, name: mapping.name});
267
- });
268
- grunt.file.write(this.target + '.map', outMapGenerator.toString());
269
- });
270
-
271
- grunt.task.registerTask('clean', 'Remove files generated by grunt', function() {
272
- grunt.file.expand('web-animations*').concat(grunt.file.expand('test/runner-*.html')).concat(grunt.file.expand('inter-*')).forEach(function(file) {
273
- grunt.file.delete(file);
274
- grunt.log.writeln('File ' + file + ' removed');
275
- });
276
- });
277
-
278
- grunt.task.registerTask('default', ['web-animations', 'web-animations-next', 'web-animations-next-lite', 'gjslint']);
279
- };
@@ -1,76 +0,0 @@
1
- ### 1.0.4 - *December 8 2014*
2
-
3
- * Fix a critical bug where deprecation logic wasn't being loaded
4
- when `web-animations-next` and `web-animations-next-lite` were
5
- executed on top of a native `element.animate`.
6
-
7
- ### 1.0.3 - *December 4 2014*
8
-
9
- * Fix a critical bug on iOS 7 and Safari <= 6. Due to limitations,
10
- inline style patching is not supported on these platforms.
11
-
12
- ### 1.0.2 - *November 28 2014*
13
-
14
- * Deprecated `AnimationTiming.playbackRate`.
15
-
16
- For example, this is no longer supported:
17
-
18
- var player = element.animate(
19
- keyframes,
20
- {duration: 1000, playbackRate: 2});
21
-
22
- Use `AnimationPlayer.playbackRate` instead:
23
-
24
- var player = element.animate(
25
- keyframes,
26
- {duration: 1000});
27
- player.playbackRate = 2;
28
-
29
- If you have any feedback on this change, please start a discussion
30
- on the public-fx mailing list:
31
- http://lists.w3.org/Archives/Public/public-fx/
32
-
33
- Or file an issue against the specification on GitHub:
34
- https://github.com/w3c/web-animations/issues/new
35
-
36
- ### 1.0.1 - *November 26 2014*
37
-
38
- * Players should be constructed in idle state
39
- * `play()` and `reverse()` should not force a start times
40
- * Add `requestAnimationFrame` ids and `cancelAnimationFrame`
41
-
42
- ### 1.0.0 — *November 21 2014*
43
-
44
- The web-animations-js hackers are pleased to announce the release of
45
- a new codebase for the Web Animations Polyfill:
46
- https://github.com/web-animations/web-animations-js
47
-
48
- The previous polyfill has been moved to:
49
- https://github.com/web-animations/web-animations-js-legacy
50
-
51
- The new codebase is focused on code-size -- our smallest target is
52
- now only 33kb or 11kb after gzip.
53
-
54
- We've implemented native fallback. If the target browser provides
55
- Web Animations features natively, the Polyfill will use them.
56
-
57
- We now provide three different build targets:
58
-
59
- `web-animations.min.js` - Tracks the Web Animations features that
60
- are supported natively in browsers. Today that means Element.animate
61
- and Playback Control in Chrome. If you’re not sure what features you
62
- will need, start with this.
63
-
64
- `web-animations-next.min.js` - All of web-animations.min.js plus
65
- features that are still undergoing discussion or have yet to be
66
- implemented natively.
67
-
68
- `web-animations-next-lite.min.js` - A cut down version of
69
- web-animations-next, removes several lesser used property handlers
70
- and some of the larger and less used features such as matrix
71
- interpolation/decomposition.
72
-
73
- Not all features of the previous polyfill have been ported to the
74
- new codebase; most notably mutation of Animations and Groups and
75
- Additive Animations are not yet supported. These features are still
76
- important and will be implemented in the coming weeks.
@@ -1,33 +0,0 @@
1
- {
2
- "name": "web-animations-js",
3
- "private": true,
4
- "repository": {
5
- "type": "git",
6
- "url": "https://github.com/web-animations/web-animations-js.git"
7
- },
8
- "devDependencies": {
9
- "mocha": "1.21.4",
10
- "chai": "^1.9.1",
11
- "grunt": "~0.4.5",
12
- "grunt-contrib-uglify": "^0.4.0",
13
- "grunt-gjslint": "^0.1.4",
14
- "grunt-karma": "^0.8.2",
15
- "karma": "^0.12.14",
16
- "karma-mocha": "^0.1.3",
17
- "karma-chai": "^0.1.0",
18
- "karma-chrome-launcher": "~0.1.4",
19
- "karma-firefox-launcher": "~0.1.3",
20
- "karma-ie-launcher": "~0.1.5",
21
- "karma-safari-launcher": "~0.1.1",
22
- "karma-sauce-launcher": "~0.2.3",
23
- "grunt-checkrepo": "~0.1.0",
24
- "grunt-saucelabs": "~4.0.2",
25
- "grunt-checkrepo": "~0.1.0",
26
- "grunt-git-status": "~1.0.0",
27
- "grunt-template": "~0.2.3",
28
- "source-map": "~0.1.40"
29
- },
30
- "scripts": {
31
- "test": "grunt test gjslint git-status checkrepo"
32
- }
33
- }
@@ -1,139 +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 groupChildDuration(node) {
18
- return node._timing.delay + node.activeDuration + node._timing.endDelay;
19
- };
20
-
21
- function KeyframeEffect(effect) {
22
- this._frames = shared.normalizeKeyframes(effect);
23
- }
24
-
25
- KeyframeEffect.prototype = {
26
- getFrames: function() { return this._frames; }
27
- };
28
-
29
- scope.Animation = function(target, effect, timingInput) {
30
- this.target = target;
31
-
32
- // TODO: Store a clone, not the same instance.
33
- this._timingInput = timingInput;
34
- this._timing = shared.normalizeTimingInput(timingInput);
35
-
36
- // TODO: Make modifications to timing update the underlying player
37
- this.timing = shared.makeTiming(timingInput);
38
- // TODO: Make this a live object - will need to separate normalization of
39
- // keyframes into a shared module.
40
- if (typeof effect == 'function')
41
- this.effect = effect;
42
- else
43
- this.effect = new KeyframeEffect(effect);
44
- this._effect = effect;
45
- this.activeDuration = shared.calculateActiveDuration(this._timing);
46
- return this;
47
- };
48
-
49
- var originalElementAnimate = Element.prototype.animate;
50
- Element.prototype.animate = function(effect, timing) {
51
- return scope.timeline.play(new scope.Animation(this, effect, timing));
52
- };
53
-
54
- var nullTarget = document.createElement('div');
55
- scope.newUnderlyingPlayerForAnimation = function(animation) {
56
- var target = animation.target || nullTarget;
57
- var effect = animation._effect;
58
- if (typeof effect == 'function') {
59
- effect = [];
60
- }
61
- return originalElementAnimate.apply(target, [effect, animation._timingInput]);
62
- };
63
-
64
- scope.bindPlayerForAnimation = function(player) {
65
- if (player.source && typeof player.source.effect == 'function') {
66
- scope.bindPlayerForCustomEffect(player);
67
- }
68
- };
69
-
70
- var pendingGroups = [];
71
- scope.awaitStartTime = function(groupPlayer) {
72
- if (groupPlayer.startTime !== null || !groupPlayer._isGroup)
73
- return;
74
- if (pendingGroups.length == 0) {
75
- requestAnimationFrame(updatePendingGroups);
76
- }
77
- pendingGroups.push(groupPlayer);
78
- };
79
- function updatePendingGroups() {
80
- var updated = false;
81
- while (pendingGroups.length) {
82
- pendingGroups.shift()._updateChildren();
83
- updated = true;
84
- }
85
- return updated;
86
- }
87
- var originalGetComputedStyle = window.getComputedStyle;
88
- Object.defineProperty(window, 'getComputedStyle', {
89
- configurable: true,
90
- enumerable: true,
91
- value: function() {
92
- var result = originalGetComputedStyle.apply(this, arguments);
93
- if (updatePendingGroups())
94
- result = originalGetComputedStyle.apply(this, arguments);
95
- return result;
96
- },
97
- });
98
-
99
- // TODO: Call into this less frequently.
100
- scope.Player.prototype._updateChildren = function() {
101
- if (this.startTime === null || !this.source || !this._isGroup)
102
- return;
103
- var offset = this.source._timing.delay;
104
- for (var i = 0; i < this.source.children.length; i++) {
105
- var child = this.source.children[i];
106
- var childPlayer;
107
-
108
- if (i >= this._childPlayers.length) {
109
- childPlayer = window.document.timeline.play(child);
110
- child.player = this.source.player;
111
- this._childPlayers.push(childPlayer);
112
- } else {
113
- childPlayer = this._childPlayers[i];
114
- }
115
-
116
- if (childPlayer.startTime != this.startTime + offset) {
117
- childPlayer.startTime = this.startTime + offset;
118
- childPlayer._updateChildren();
119
- }
120
-
121
- if (this.playbackRate == -1 && this.currentTime < offset && childPlayer.currentTime !== -1) {
122
- childPlayer.currentTime = -1;
123
- }
124
-
125
- if (this.source instanceof window.AnimationSequence)
126
- offset += groupChildDuration(child);
127
- }
128
- };
129
-
130
- window.Animation = scope.Animation;
131
- window.Element.prototype.getAnimationPlayers = function() {
132
- return document.timeline.getAnimationPlayers().filter(function(player) {
133
- return player.source !== null && player.source.target == this;
134
- }.bind(this));
135
- };
136
-
137
- scope.groupChildDuration = groupChildDuration;
138
-
139
- }(webAnimationsShared, webAnimationsMaxifill, webAnimationsTesting));