@angular/animations 21.0.0-next.9 → 21.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/_private_export-chunk.mjs +289 -1159
- package/fesm2022/_private_export-chunk.mjs.map +1 -1
- package/fesm2022/_util-chunk.mjs +305 -527
- package/fesm2022/_util-chunk.mjs.map +1 -1
- package/fesm2022/animations.mjs +177 -185
- package/fesm2022/animations.mjs.map +1 -1
- package/fesm2022/browser-testing.mjs +95 -111
- package/fesm2022/browser-testing.mjs.map +1 -1
- package/fesm2022/browser.mjs +3371 -3961
- package/fesm2022/browser.mjs.map +1 -1
- package/package.json +2 -2
- package/types/_animation_driver-chunk.d.ts +1 -1
- package/types/_animation_player-chunk.d.ts +1 -1
- package/types/animations.d.ts +1 -1
- package/types/browser-testing.d.ts +1 -1
- package/types/browser.d.ts +1 -1
package/fesm2022/_util-chunk.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0-
|
|
2
|
+
* @license Angular v21.0.0-rc.1
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -9,480 +9,258 @@ import { ɵRuntimeError as _RuntimeError } from '@angular/core';
|
|
|
9
9
|
|
|
10
10
|
const LINE_START = '\n - ';
|
|
11
11
|
function invalidTimingValue(exp) {
|
|
12
|
-
|
|
12
|
+
return new _RuntimeError(3000, ngDevMode && `The provided timing value "${exp}" is invalid.`);
|
|
13
13
|
}
|
|
14
14
|
function negativeStepValue() {
|
|
15
|
-
|
|
15
|
+
return new _RuntimeError(3100, ngDevMode && 'Duration values below 0 are not allowed for this animation step.');
|
|
16
16
|
}
|
|
17
17
|
function negativeDelayValue() {
|
|
18
|
-
|
|
18
|
+
return new _RuntimeError(3101, ngDevMode && 'Delay values below 0 are not allowed for this animation step.');
|
|
19
19
|
}
|
|
20
20
|
function invalidStyleParams(varName) {
|
|
21
|
-
|
|
22
|
-
`Unable to resolve the local animation param ${varName} in the given list of values`);
|
|
21
|
+
return new _RuntimeError(3001, ngDevMode && `Unable to resolve the local animation param ${varName} in the given list of values`);
|
|
23
22
|
}
|
|
24
23
|
function invalidParamValue(varName) {
|
|
25
|
-
|
|
24
|
+
return new _RuntimeError(3003, ngDevMode && `Please provide a value for the animation param ${varName}`);
|
|
26
25
|
}
|
|
27
26
|
function invalidNodeType(nodeType) {
|
|
28
|
-
|
|
27
|
+
return new _RuntimeError(3004, ngDevMode && `Unable to resolve animation metadata node #${nodeType}`);
|
|
29
28
|
}
|
|
30
29
|
function invalidCssUnitValue(userProvidedProperty, value) {
|
|
31
|
-
|
|
30
|
+
return new _RuntimeError(3005, ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`);
|
|
32
31
|
}
|
|
33
32
|
function invalidTrigger() {
|
|
34
|
-
|
|
35
|
-
"animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))");
|
|
33
|
+
return new _RuntimeError(3006, ngDevMode && "animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))");
|
|
36
34
|
}
|
|
37
35
|
function invalidDefinition() {
|
|
38
|
-
|
|
36
|
+
return new _RuntimeError(3007, ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()');
|
|
39
37
|
}
|
|
40
38
|
function invalidState(metadataName, missingSubs) {
|
|
41
|
-
|
|
42
|
-
`state("${metadataName}", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`);
|
|
39
|
+
return new _RuntimeError(3008, ngDevMode && `state("${metadataName}", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`);
|
|
43
40
|
}
|
|
44
41
|
function invalidStyleValue(value) {
|
|
45
|
-
|
|
42
|
+
return new _RuntimeError(3002, ngDevMode && `The provided style string value ${value} is not allowed.`);
|
|
46
43
|
}
|
|
47
44
|
function invalidParallelAnimation(prop, firstStart, firstEnd, secondStart, secondEnd) {
|
|
48
|
-
|
|
49
|
-
`The CSS property "${prop}" that exists between the times of "${firstStart}ms" and "${firstEnd}ms" is also being animated in a parallel animation between the times of "${secondStart}ms" and "${secondEnd}ms"`);
|
|
45
|
+
return new _RuntimeError(3010, ngDevMode && `The CSS property "${prop}" that exists between the times of "${firstStart}ms" and "${firstEnd}ms" is also being animated in a parallel animation between the times of "${secondStart}ms" and "${secondEnd}ms"`);
|
|
50
46
|
}
|
|
51
47
|
function invalidKeyframes() {
|
|
52
|
-
|
|
48
|
+
return new _RuntimeError(3011, ngDevMode && `keyframes() must be placed inside of a call to animate()`);
|
|
53
49
|
}
|
|
54
50
|
function invalidOffset() {
|
|
55
|
-
|
|
51
|
+
return new _RuntimeError(3012, ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`);
|
|
56
52
|
}
|
|
57
53
|
function keyframeOffsetsOutOfOrder() {
|
|
58
|
-
|
|
54
|
+
return new _RuntimeError(3200, ngDevMode && `Please ensure that all keyframe offsets are in order`);
|
|
59
55
|
}
|
|
60
56
|
function keyframesMissingOffsets() {
|
|
61
|
-
|
|
57
|
+
return new _RuntimeError(3202, ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`);
|
|
62
58
|
}
|
|
63
59
|
function invalidStagger() {
|
|
64
|
-
|
|
60
|
+
return new _RuntimeError(3013, ngDevMode && `stagger() can only be used inside of query()`);
|
|
65
61
|
}
|
|
66
62
|
function invalidQuery(selector) {
|
|
67
|
-
|
|
68
|
-
`\`query("${selector}")\` returned zero elements. (Use \`query("${selector}", { optional: true })\` if you wish to allow this.)`);
|
|
63
|
+
return new _RuntimeError(3014, ngDevMode && `\`query("${selector}")\` returned zero elements. (Use \`query("${selector}", { optional: true })\` if you wish to allow this.)`);
|
|
69
64
|
}
|
|
70
65
|
function invalidExpression(expr) {
|
|
71
|
-
|
|
66
|
+
return new _RuntimeError(3015, ngDevMode && `The provided transition expression "${expr}" is not supported`);
|
|
72
67
|
}
|
|
73
68
|
function invalidTransitionAlias(alias) {
|
|
74
|
-
|
|
69
|
+
return new _RuntimeError(3016, ngDevMode && `The transition alias value "${alias}" is not supported`);
|
|
75
70
|
}
|
|
76
71
|
function validationFailed(errors) {
|
|
77
|
-
|
|
72
|
+
return new _RuntimeError(3500, ngDevMode && `animation validation failed:\n${errors.map(err => err.message).join('\n')}`);
|
|
78
73
|
}
|
|
79
74
|
function buildingFailed(errors) {
|
|
80
|
-
|
|
75
|
+
return new _RuntimeError(3501, ngDevMode && `animation building failed:\n${errors.map(err => err.message).join('\n')}`);
|
|
81
76
|
}
|
|
82
77
|
function triggerBuildFailed(name, errors) {
|
|
83
|
-
|
|
84
|
-
`The animation trigger "${name}" has failed to build due to the following errors:\n - ${errors
|
|
85
|
-
.map((err) => err.message)
|
|
86
|
-
.join('\n - ')}`);
|
|
78
|
+
return new _RuntimeError(3404, ngDevMode && `The animation trigger "${name}" has failed to build due to the following errors:\n - ${errors.map(err => err.message).join('\n - ')}`);
|
|
87
79
|
}
|
|
88
80
|
function animationFailed(errors) {
|
|
89
|
-
|
|
90
|
-
`Unable to animate due to the following errors:${LINE_START}${errors
|
|
91
|
-
.map((err) => err.message)
|
|
92
|
-
.join(LINE_START)}`);
|
|
81
|
+
return new _RuntimeError(3502, ngDevMode && `Unable to animate due to the following errors:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);
|
|
93
82
|
}
|
|
94
83
|
function registerFailed(errors) {
|
|
95
|
-
|
|
96
|
-
`Unable to build the animation due to the following errors: ${errors
|
|
97
|
-
.map((err) => err.message)
|
|
98
|
-
.join('\n')}`);
|
|
84
|
+
return new _RuntimeError(3503, ngDevMode && `Unable to build the animation due to the following errors: ${errors.map(err => err.message).join('\n')}`);
|
|
99
85
|
}
|
|
100
86
|
function missingOrDestroyedAnimation() {
|
|
101
|
-
|
|
87
|
+
return new _RuntimeError(3300, ngDevMode && "The requested animation doesn't exist or has already been destroyed");
|
|
102
88
|
}
|
|
103
89
|
function createAnimationFailed(errors) {
|
|
104
|
-
|
|
105
|
-
`Unable to create the animation due to the following errors:${errors
|
|
106
|
-
.map((err) => err.message)
|
|
107
|
-
.join('\n')}`);
|
|
90
|
+
return new _RuntimeError(3504, ngDevMode && `Unable to create the animation due to the following errors:${errors.map(err => err.message).join('\n')}`);
|
|
108
91
|
}
|
|
109
92
|
function missingPlayer(id) {
|
|
110
|
-
|
|
93
|
+
return new _RuntimeError(3301, ngDevMode && `Unable to find the timeline player referenced by ${id}`);
|
|
111
94
|
}
|
|
112
95
|
function missingTrigger(phase, name) {
|
|
113
|
-
|
|
114
|
-
`Unable to listen on the animation trigger event "${phase}" because the animation trigger "${name}" doesn\'t exist!`);
|
|
96
|
+
return new _RuntimeError(3302, ngDevMode && `Unable to listen on the animation trigger event "${phase}" because the animation trigger "${name}" doesn\'t exist!`);
|
|
115
97
|
}
|
|
116
98
|
function missingEvent(name) {
|
|
117
|
-
|
|
118
|
-
`Unable to listen on the animation trigger "${name}" because the provided event is undefined!`);
|
|
99
|
+
return new _RuntimeError(3303, ngDevMode && `Unable to listen on the animation trigger "${name}" because the provided event is undefined!`);
|
|
119
100
|
}
|
|
120
101
|
function unsupportedTriggerEvent(phase, name) {
|
|
121
|
-
|
|
122
|
-
`The provided animation trigger event "${phase}" for the animation trigger "${name}" is not supported!`);
|
|
102
|
+
return new _RuntimeError(3400, ngDevMode && `The provided animation trigger event "${phase}" for the animation trigger "${name}" is not supported!`);
|
|
123
103
|
}
|
|
124
104
|
function unregisteredTrigger(name) {
|
|
125
|
-
|
|
105
|
+
return new _RuntimeError(3401, ngDevMode && `The provided animation trigger "${name}" has not been registered!`);
|
|
126
106
|
}
|
|
127
107
|
function triggerTransitionsFailed(errors) {
|
|
128
|
-
|
|
129
|
-
`Unable to process animations due to the following failed trigger transitions\n ${errors
|
|
130
|
-
.map((err) => err.message)
|
|
131
|
-
.join('\n')}`);
|
|
108
|
+
return new _RuntimeError(3402, ngDevMode && `Unable to process animations due to the following failed trigger transitions\n ${errors.map(err => err.message).join('\n')}`);
|
|
132
109
|
}
|
|
133
110
|
function transitionFailed(name, errors) {
|
|
134
|
-
|
|
111
|
+
return new _RuntimeError(3505, ngDevMode && `@${name} has failed due to:\n ${errors.map(err => err.message).join('\n- ')}`);
|
|
135
112
|
}
|
|
136
113
|
|
|
137
|
-
|
|
138
|
-
* Set of all animatable CSS properties
|
|
139
|
-
*
|
|
140
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties
|
|
141
|
-
*/
|
|
142
|
-
const ANIMATABLE_PROP_SET = new Set([
|
|
143
|
-
'-moz-outline-radius',
|
|
144
|
-
'-moz-outline-radius-bottomleft',
|
|
145
|
-
'-moz-outline-radius-bottomright',
|
|
146
|
-
'-moz-outline-radius-topleft',
|
|
147
|
-
'-moz-outline-radius-topright',
|
|
148
|
-
'-ms-grid-columns',
|
|
149
|
-
'-ms-grid-rows',
|
|
150
|
-
'-webkit-line-clamp',
|
|
151
|
-
'-webkit-text-fill-color',
|
|
152
|
-
'-webkit-text-stroke',
|
|
153
|
-
'-webkit-text-stroke-color',
|
|
154
|
-
'accent-color',
|
|
155
|
-
'all',
|
|
156
|
-
'backdrop-filter',
|
|
157
|
-
'background',
|
|
158
|
-
'background-color',
|
|
159
|
-
'background-position',
|
|
160
|
-
'background-size',
|
|
161
|
-
'block-size',
|
|
162
|
-
'border',
|
|
163
|
-
'border-block-end',
|
|
164
|
-
'border-block-end-color',
|
|
165
|
-
'border-block-end-width',
|
|
166
|
-
'border-block-start',
|
|
167
|
-
'border-block-start-color',
|
|
168
|
-
'border-block-start-width',
|
|
169
|
-
'border-bottom',
|
|
170
|
-
'border-bottom-color',
|
|
171
|
-
'border-bottom-left-radius',
|
|
172
|
-
'border-bottom-right-radius',
|
|
173
|
-
'border-bottom-width',
|
|
174
|
-
'border-color',
|
|
175
|
-
'border-end-end-radius',
|
|
176
|
-
'border-end-start-radius',
|
|
177
|
-
'border-image-outset',
|
|
178
|
-
'border-image-slice',
|
|
179
|
-
'border-image-width',
|
|
180
|
-
'border-inline-end',
|
|
181
|
-
'border-inline-end-color',
|
|
182
|
-
'border-inline-end-width',
|
|
183
|
-
'border-inline-start',
|
|
184
|
-
'border-inline-start-color',
|
|
185
|
-
'border-inline-start-width',
|
|
186
|
-
'border-left',
|
|
187
|
-
'border-left-color',
|
|
188
|
-
'border-left-width',
|
|
189
|
-
'border-radius',
|
|
190
|
-
'border-right',
|
|
191
|
-
'border-right-color',
|
|
192
|
-
'border-right-width',
|
|
193
|
-
'border-start-end-radius',
|
|
194
|
-
'border-start-start-radius',
|
|
195
|
-
'border-top',
|
|
196
|
-
'border-top-color',
|
|
197
|
-
'border-top-left-radius',
|
|
198
|
-
'border-top-right-radius',
|
|
199
|
-
'border-top-width',
|
|
200
|
-
'border-width',
|
|
201
|
-
'bottom',
|
|
202
|
-
'box-shadow',
|
|
203
|
-
'caret-color',
|
|
204
|
-
'clip',
|
|
205
|
-
'clip-path',
|
|
206
|
-
'color',
|
|
207
|
-
'column-count',
|
|
208
|
-
'column-gap',
|
|
209
|
-
'column-rule',
|
|
210
|
-
'column-rule-color',
|
|
211
|
-
'column-rule-width',
|
|
212
|
-
'column-width',
|
|
213
|
-
'columns',
|
|
214
|
-
'filter',
|
|
215
|
-
'flex',
|
|
216
|
-
'flex-basis',
|
|
217
|
-
'flex-grow',
|
|
218
|
-
'flex-shrink',
|
|
219
|
-
'font',
|
|
220
|
-
'font-size',
|
|
221
|
-
'font-size-adjust',
|
|
222
|
-
'font-stretch',
|
|
223
|
-
'font-variation-settings',
|
|
224
|
-
'font-weight',
|
|
225
|
-
'gap',
|
|
226
|
-
'grid-column-gap',
|
|
227
|
-
'grid-gap',
|
|
228
|
-
'grid-row-gap',
|
|
229
|
-
'grid-template-columns',
|
|
230
|
-
'grid-template-rows',
|
|
231
|
-
'height',
|
|
232
|
-
'inline-size',
|
|
233
|
-
'input-security',
|
|
234
|
-
'inset',
|
|
235
|
-
'inset-block',
|
|
236
|
-
'inset-block-end',
|
|
237
|
-
'inset-block-start',
|
|
238
|
-
'inset-inline',
|
|
239
|
-
'inset-inline-end',
|
|
240
|
-
'inset-inline-start',
|
|
241
|
-
'left',
|
|
242
|
-
'letter-spacing',
|
|
243
|
-
'line-clamp',
|
|
244
|
-
'line-height',
|
|
245
|
-
'margin',
|
|
246
|
-
'margin-block-end',
|
|
247
|
-
'margin-block-start',
|
|
248
|
-
'margin-bottom',
|
|
249
|
-
'margin-inline-end',
|
|
250
|
-
'margin-inline-start',
|
|
251
|
-
'margin-left',
|
|
252
|
-
'margin-right',
|
|
253
|
-
'margin-top',
|
|
254
|
-
'mask',
|
|
255
|
-
'mask-border',
|
|
256
|
-
'mask-position',
|
|
257
|
-
'mask-size',
|
|
258
|
-
'max-block-size',
|
|
259
|
-
'max-height',
|
|
260
|
-
'max-inline-size',
|
|
261
|
-
'max-lines',
|
|
262
|
-
'max-width',
|
|
263
|
-
'min-block-size',
|
|
264
|
-
'min-height',
|
|
265
|
-
'min-inline-size',
|
|
266
|
-
'min-width',
|
|
267
|
-
'object-position',
|
|
268
|
-
'offset',
|
|
269
|
-
'offset-anchor',
|
|
270
|
-
'offset-distance',
|
|
271
|
-
'offset-path',
|
|
272
|
-
'offset-position',
|
|
273
|
-
'offset-rotate',
|
|
274
|
-
'opacity',
|
|
275
|
-
'order',
|
|
276
|
-
'outline',
|
|
277
|
-
'outline-color',
|
|
278
|
-
'outline-offset',
|
|
279
|
-
'outline-width',
|
|
280
|
-
'padding',
|
|
281
|
-
'padding-block-end',
|
|
282
|
-
'padding-block-start',
|
|
283
|
-
'padding-bottom',
|
|
284
|
-
'padding-inline-end',
|
|
285
|
-
'padding-inline-start',
|
|
286
|
-
'padding-left',
|
|
287
|
-
'padding-right',
|
|
288
|
-
'padding-top',
|
|
289
|
-
'perspective',
|
|
290
|
-
'perspective-origin',
|
|
291
|
-
'right',
|
|
292
|
-
'rotate',
|
|
293
|
-
'row-gap',
|
|
294
|
-
'scale',
|
|
295
|
-
'scroll-margin',
|
|
296
|
-
'scroll-margin-block',
|
|
297
|
-
'scroll-margin-block-end',
|
|
298
|
-
'scroll-margin-block-start',
|
|
299
|
-
'scroll-margin-bottom',
|
|
300
|
-
'scroll-margin-inline',
|
|
301
|
-
'scroll-margin-inline-end',
|
|
302
|
-
'scroll-margin-inline-start',
|
|
303
|
-
'scroll-margin-left',
|
|
304
|
-
'scroll-margin-right',
|
|
305
|
-
'scroll-margin-top',
|
|
306
|
-
'scroll-padding',
|
|
307
|
-
'scroll-padding-block',
|
|
308
|
-
'scroll-padding-block-end',
|
|
309
|
-
'scroll-padding-block-start',
|
|
310
|
-
'scroll-padding-bottom',
|
|
311
|
-
'scroll-padding-inline',
|
|
312
|
-
'scroll-padding-inline-end',
|
|
313
|
-
'scroll-padding-inline-start',
|
|
314
|
-
'scroll-padding-left',
|
|
315
|
-
'scroll-padding-right',
|
|
316
|
-
'scroll-padding-top',
|
|
317
|
-
'scroll-snap-coordinate',
|
|
318
|
-
'scroll-snap-destination',
|
|
319
|
-
'scrollbar-color',
|
|
320
|
-
'shape-image-threshold',
|
|
321
|
-
'shape-margin',
|
|
322
|
-
'shape-outside',
|
|
323
|
-
'tab-size',
|
|
324
|
-
'text-decoration',
|
|
325
|
-
'text-decoration-color',
|
|
326
|
-
'text-decoration-thickness',
|
|
327
|
-
'text-emphasis',
|
|
328
|
-
'text-emphasis-color',
|
|
329
|
-
'text-indent',
|
|
330
|
-
'text-shadow',
|
|
331
|
-
'text-underline-offset',
|
|
332
|
-
'top',
|
|
333
|
-
'transform',
|
|
334
|
-
'transform-origin',
|
|
335
|
-
'translate',
|
|
336
|
-
'vertical-align',
|
|
337
|
-
'visibility',
|
|
338
|
-
'width',
|
|
339
|
-
'word-spacing',
|
|
340
|
-
'z-index',
|
|
341
|
-
'zoom',
|
|
342
|
-
]);
|
|
114
|
+
const ANIMATABLE_PROP_SET = new Set(['-moz-outline-radius', '-moz-outline-radius-bottomleft', '-moz-outline-radius-bottomright', '-moz-outline-radius-topleft', '-moz-outline-radius-topright', '-ms-grid-columns', '-ms-grid-rows', '-webkit-line-clamp', '-webkit-text-fill-color', '-webkit-text-stroke', '-webkit-text-stroke-color', 'accent-color', 'all', 'backdrop-filter', 'background', 'background-color', 'background-position', 'background-size', 'block-size', 'border', 'border-block-end', 'border-block-end-color', 'border-block-end-width', 'border-block-start', 'border-block-start-color', 'border-block-start-width', 'border-bottom', 'border-bottom-color', 'border-bottom-left-radius', 'border-bottom-right-radius', 'border-bottom-width', 'border-color', 'border-end-end-radius', 'border-end-start-radius', 'border-image-outset', 'border-image-slice', 'border-image-width', 'border-inline-end', 'border-inline-end-color', 'border-inline-end-width', 'border-inline-start', 'border-inline-start-color', 'border-inline-start-width', 'border-left', 'border-left-color', 'border-left-width', 'border-radius', 'border-right', 'border-right-color', 'border-right-width', 'border-start-end-radius', 'border-start-start-radius', 'border-top', 'border-top-color', 'border-top-left-radius', 'border-top-right-radius', 'border-top-width', 'border-width', 'bottom', 'box-shadow', 'caret-color', 'clip', 'clip-path', 'color', 'column-count', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', 'column-width', 'columns', 'filter', 'flex', 'flex-basis', 'flex-grow', 'flex-shrink', 'font', 'font-size', 'font-size-adjust', 'font-stretch', 'font-variation-settings', 'font-weight', 'gap', 'grid-column-gap', 'grid-gap', 'grid-row-gap', 'grid-template-columns', 'grid-template-rows', 'height', 'inline-size', 'input-security', 'inset', 'inset-block', 'inset-block-end', 'inset-block-start', 'inset-inline', 'inset-inline-end', 'inset-inline-start', 'left', 'letter-spacing', 'line-clamp', 'line-height', 'margin', 'margin-block-end', 'margin-block-start', 'margin-bottom', 'margin-inline-end', 'margin-inline-start', 'margin-left', 'margin-right', 'margin-top', 'mask', 'mask-border', 'mask-position', 'mask-size', 'max-block-size', 'max-height', 'max-inline-size', 'max-lines', 'max-width', 'min-block-size', 'min-height', 'min-inline-size', 'min-width', 'object-position', 'offset', 'offset-anchor', 'offset-distance', 'offset-path', 'offset-position', 'offset-rotate', 'opacity', 'order', 'outline', 'outline-color', 'outline-offset', 'outline-width', 'padding', 'padding-block-end', 'padding-block-start', 'padding-bottom', 'padding-inline-end', 'padding-inline-start', 'padding-left', 'padding-right', 'padding-top', 'perspective', 'perspective-origin', 'right', 'rotate', 'row-gap', 'scale', 'scroll-margin', 'scroll-margin-block', 'scroll-margin-block-end', 'scroll-margin-block-start', 'scroll-margin-bottom', 'scroll-margin-inline', 'scroll-margin-inline-end', 'scroll-margin-inline-start', 'scroll-margin-left', 'scroll-margin-right', 'scroll-margin-top', 'scroll-padding', 'scroll-padding-block', 'scroll-padding-block-end', 'scroll-padding-block-start', 'scroll-padding-bottom', 'scroll-padding-inline', 'scroll-padding-inline-end', 'scroll-padding-inline-start', 'scroll-padding-left', 'scroll-padding-right', 'scroll-padding-top', 'scroll-snap-coordinate', 'scroll-snap-destination', 'scrollbar-color', 'shape-image-threshold', 'shape-margin', 'shape-outside', 'tab-size', 'text-decoration', 'text-decoration-color', 'text-decoration-thickness', 'text-emphasis', 'text-emphasis-color', 'text-indent', 'text-shadow', 'text-underline-offset', 'top', 'transform', 'transform-origin', 'translate', 'vertical-align', 'visibility', 'width', 'word-spacing', 'z-index', 'zoom']);
|
|
343
115
|
|
|
344
116
|
function optimizeGroupPlayer(players) {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
117
|
+
switch (players.length) {
|
|
118
|
+
case 0:
|
|
119
|
+
return new NoopAnimationPlayer();
|
|
120
|
+
case 1:
|
|
121
|
+
return players[0];
|
|
122
|
+
default:
|
|
123
|
+
return new AnimationGroupPlayer(players);
|
|
124
|
+
}
|
|
353
125
|
}
|
|
354
126
|
function normalizeKeyframes$1(normalizer, keyframes, preStyles = new Map(), postStyles = new Map()) {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
normalizedKeyframe.set(normalizedProp, normalizedValue);
|
|
381
|
-
});
|
|
382
|
-
if (!isSameOffset) {
|
|
383
|
-
normalizedKeyframes.push(normalizedKeyframe);
|
|
127
|
+
const errors = [];
|
|
128
|
+
const normalizedKeyframes = [];
|
|
129
|
+
let previousOffset = -1;
|
|
130
|
+
let previousKeyframe = null;
|
|
131
|
+
keyframes.forEach(kf => {
|
|
132
|
+
const offset = kf.get('offset');
|
|
133
|
+
const isSameOffset = offset == previousOffset;
|
|
134
|
+
const normalizedKeyframe = isSameOffset && previousKeyframe || new Map();
|
|
135
|
+
kf.forEach((val, prop) => {
|
|
136
|
+
let normalizedProp = prop;
|
|
137
|
+
let normalizedValue = val;
|
|
138
|
+
if (prop !== 'offset') {
|
|
139
|
+
normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);
|
|
140
|
+
switch (normalizedValue) {
|
|
141
|
+
case _PRE_STYLE:
|
|
142
|
+
normalizedValue = preStyles.get(prop);
|
|
143
|
+
break;
|
|
144
|
+
case AUTO_STYLE:
|
|
145
|
+
normalizedValue = postStyles.get(prop);
|
|
146
|
+
break;
|
|
147
|
+
default:
|
|
148
|
+
normalizedValue = normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors);
|
|
149
|
+
break;
|
|
384
150
|
}
|
|
385
|
-
|
|
386
|
-
|
|
151
|
+
}
|
|
152
|
+
normalizedKeyframe.set(normalizedProp, normalizedValue);
|
|
387
153
|
});
|
|
388
|
-
if (
|
|
389
|
-
|
|
154
|
+
if (!isSameOffset) {
|
|
155
|
+
normalizedKeyframes.push(normalizedKeyframe);
|
|
390
156
|
}
|
|
391
|
-
|
|
157
|
+
previousKeyframe = normalizedKeyframe;
|
|
158
|
+
previousOffset = offset;
|
|
159
|
+
});
|
|
160
|
+
if (errors.length) {
|
|
161
|
+
throw animationFailed(errors);
|
|
162
|
+
}
|
|
163
|
+
return normalizedKeyframes;
|
|
392
164
|
}
|
|
393
165
|
function listenOnPlayer(player, eventName, event, callback) {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
166
|
+
switch (eventName) {
|
|
167
|
+
case 'start':
|
|
168
|
+
player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player)));
|
|
169
|
+
break;
|
|
170
|
+
case 'done':
|
|
171
|
+
player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player)));
|
|
172
|
+
break;
|
|
173
|
+
case 'destroy':
|
|
174
|
+
player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player)));
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
405
177
|
}
|
|
406
178
|
function copyAnimationEvent(e, phaseName, player) {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
179
|
+
const totalTime = player.totalTime;
|
|
180
|
+
const disabled = player.disabled ? true : false;
|
|
181
|
+
const event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime, disabled);
|
|
182
|
+
const data = e['_data'];
|
|
183
|
+
if (data != null) {
|
|
184
|
+
event['_data'] = data;
|
|
185
|
+
}
|
|
186
|
+
return event;
|
|
415
187
|
}
|
|
416
188
|
function makeAnimationEvent(element, triggerName, fromState, toState, phaseName = '', totalTime = 0, disabled) {
|
|
417
|
-
|
|
189
|
+
return {
|
|
190
|
+
element,
|
|
191
|
+
triggerName,
|
|
192
|
+
fromState,
|
|
193
|
+
toState,
|
|
194
|
+
phaseName,
|
|
195
|
+
totalTime,
|
|
196
|
+
disabled: !!disabled
|
|
197
|
+
};
|
|
418
198
|
}
|
|
419
199
|
function getOrSetDefaultValue(map, key, defaultValue) {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
200
|
+
let value = map.get(key);
|
|
201
|
+
if (!value) {
|
|
202
|
+
map.set(key, value = defaultValue);
|
|
203
|
+
}
|
|
204
|
+
return value;
|
|
425
205
|
}
|
|
426
206
|
function parseTimelineCommand(command) {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
207
|
+
const separatorPos = command.indexOf(':');
|
|
208
|
+
const id = command.substring(1, separatorPos);
|
|
209
|
+
const action = command.slice(separatorPos + 1);
|
|
210
|
+
return [id, action];
|
|
431
211
|
}
|
|
432
|
-
const documentElement = /* @__PURE__ */
|
|
212
|
+
const documentElement = /* @__PURE__ */(() => typeof document === 'undefined' ? null : document.documentElement)();
|
|
433
213
|
function getParentElement(element) {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
214
|
+
const parent = element.parentNode || element.host || null;
|
|
215
|
+
if (parent === documentElement) {
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
return parent;
|
|
439
219
|
}
|
|
440
220
|
function containsVendorPrefix(prop) {
|
|
441
|
-
|
|
442
|
-
// cc: http://shouldiprefix.com/
|
|
443
|
-
return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit
|
|
221
|
+
return prop.substring(1, 6) == 'ebkit';
|
|
444
222
|
}
|
|
445
223
|
let _CACHED_BODY = null;
|
|
446
224
|
let _IS_WEBKIT = false;
|
|
447
225
|
function validateStyleProperty(prop) {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
}
|
|
226
|
+
if (!_CACHED_BODY) {
|
|
227
|
+
_CACHED_BODY = getBodyNode() || {};
|
|
228
|
+
_IS_WEBKIT = _CACHED_BODY.style ? 'WebkitAppearance' in _CACHED_BODY.style : false;
|
|
229
|
+
}
|
|
230
|
+
let result = true;
|
|
231
|
+
if (_CACHED_BODY.style && !containsVendorPrefix(prop)) {
|
|
232
|
+
result = prop in _CACHED_BODY.style;
|
|
233
|
+
if (!result && _IS_WEBKIT) {
|
|
234
|
+
const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1);
|
|
235
|
+
result = camelProp in _CACHED_BODY.style;
|
|
459
236
|
}
|
|
460
|
-
|
|
237
|
+
}
|
|
238
|
+
return result;
|
|
461
239
|
}
|
|
462
240
|
function validateWebAnimatableStyleProperty(prop) {
|
|
463
|
-
|
|
241
|
+
return ANIMATABLE_PROP_SET.has(prop);
|
|
464
242
|
}
|
|
465
243
|
function getBodyNode() {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
244
|
+
if (typeof document != 'undefined') {
|
|
245
|
+
return document.body;
|
|
246
|
+
}
|
|
247
|
+
return null;
|
|
470
248
|
}
|
|
471
249
|
function containsElement(elm1, elm2) {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
}
|
|
476
|
-
elm2 = getParentElement(elm2);
|
|
250
|
+
while (elm2) {
|
|
251
|
+
if (elm2 === elm1) {
|
|
252
|
+
return true;
|
|
477
253
|
}
|
|
478
|
-
|
|
254
|
+
elm2 = getParentElement(elm2);
|
|
255
|
+
}
|
|
256
|
+
return false;
|
|
479
257
|
}
|
|
480
258
|
function invokeQuery(element, selector, multi) {
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
259
|
+
if (multi) {
|
|
260
|
+
return Array.from(element.querySelectorAll(selector));
|
|
261
|
+
}
|
|
262
|
+
const elem = element.querySelector(selector);
|
|
263
|
+
return elem ? [elem] : [];
|
|
486
264
|
}
|
|
487
265
|
|
|
488
266
|
const ONE_SECOND = 1000;
|
|
@@ -495,202 +273,202 @@ const NG_TRIGGER_SELECTOR = '.ng-trigger';
|
|
|
495
273
|
const NG_ANIMATING_CLASSNAME = 'ng-animating';
|
|
496
274
|
const NG_ANIMATING_SELECTOR = '.ng-animating';
|
|
497
275
|
function resolveTimingValue(value) {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
return 0;
|
|
503
|
-
return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);
|
|
276
|
+
if (typeof value == 'number') return value;
|
|
277
|
+
const matches = value.match(/^(-?[\.\d]+)(m?s)/);
|
|
278
|
+
if (!matches || matches.length < 2) return 0;
|
|
279
|
+
return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);
|
|
504
280
|
}
|
|
505
281
|
function _convertTimeValueToMS(value, unit) {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
282
|
+
switch (unit) {
|
|
283
|
+
case 's':
|
|
284
|
+
return value * ONE_SECOND;
|
|
285
|
+
default:
|
|
286
|
+
return value;
|
|
287
|
+
}
|
|
512
288
|
}
|
|
513
289
|
function resolveTiming(timings, errors, allowNegativeValues) {
|
|
514
|
-
|
|
515
|
-
? timings
|
|
516
|
-
: parseTimeExpression(timings, errors, allowNegativeValues);
|
|
290
|
+
return timings.hasOwnProperty('duration') ? timings : parseTimeExpression(timings, errors, allowNegativeValues);
|
|
517
291
|
}
|
|
518
292
|
const PARSE_TIME_EXPRESSION_REGEX = /^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;
|
|
519
293
|
function parseTimeExpression(exp, errors, allowNegativeValues) {
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);
|
|
533
|
-
}
|
|
534
|
-
const easingVal = matches[5];
|
|
535
|
-
if (easingVal) {
|
|
536
|
-
easing = easingVal;
|
|
537
|
-
}
|
|
294
|
+
let duration;
|
|
295
|
+
let delay = 0;
|
|
296
|
+
let easing = '';
|
|
297
|
+
if (typeof exp === 'string') {
|
|
298
|
+
const matches = exp.match(PARSE_TIME_EXPRESSION_REGEX);
|
|
299
|
+
if (matches === null) {
|
|
300
|
+
errors.push(invalidTimingValue(exp));
|
|
301
|
+
return {
|
|
302
|
+
duration: 0,
|
|
303
|
+
delay: 0,
|
|
304
|
+
easing: ''
|
|
305
|
+
};
|
|
538
306
|
}
|
|
539
|
-
|
|
540
|
-
|
|
307
|
+
duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);
|
|
308
|
+
const delayMatch = matches[3];
|
|
309
|
+
if (delayMatch != null) {
|
|
310
|
+
delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);
|
|
541
311
|
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
if (duration < 0) {
|
|
546
|
-
errors.push(negativeStepValue());
|
|
547
|
-
containsErrors = true;
|
|
548
|
-
}
|
|
549
|
-
if (delay < 0) {
|
|
550
|
-
errors.push(negativeDelayValue());
|
|
551
|
-
containsErrors = true;
|
|
552
|
-
}
|
|
553
|
-
if (containsErrors) {
|
|
554
|
-
errors.splice(startIndex, 0, invalidTimingValue(exp));
|
|
555
|
-
}
|
|
312
|
+
const easingVal = matches[5];
|
|
313
|
+
if (easingVal) {
|
|
314
|
+
easing = easingVal;
|
|
556
315
|
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
316
|
+
} else {
|
|
317
|
+
duration = exp;
|
|
318
|
+
}
|
|
319
|
+
if (!allowNegativeValues) {
|
|
320
|
+
let containsErrors = false;
|
|
321
|
+
let startIndex = errors.length;
|
|
322
|
+
if (duration < 0) {
|
|
323
|
+
errors.push(negativeStepValue());
|
|
324
|
+
containsErrors = true;
|
|
325
|
+
}
|
|
326
|
+
if (delay < 0) {
|
|
327
|
+
errors.push(negativeDelayValue());
|
|
328
|
+
containsErrors = true;
|
|
562
329
|
}
|
|
563
|
-
if (
|
|
564
|
-
|
|
330
|
+
if (containsErrors) {
|
|
331
|
+
errors.splice(startIndex, 0, invalidTimingValue(exp));
|
|
565
332
|
}
|
|
566
|
-
|
|
333
|
+
}
|
|
334
|
+
return {
|
|
335
|
+
duration,
|
|
336
|
+
delay,
|
|
337
|
+
easing
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
function normalizeKeyframes(keyframes) {
|
|
341
|
+
if (!keyframes.length) {
|
|
342
|
+
return [];
|
|
343
|
+
}
|
|
344
|
+
if (keyframes[0] instanceof Map) {
|
|
345
|
+
return keyframes;
|
|
346
|
+
}
|
|
347
|
+
return keyframes.map(kf => new Map(Object.entries(kf)));
|
|
567
348
|
}
|
|
568
349
|
function normalizeStyles(styles) {
|
|
569
|
-
|
|
350
|
+
return Array.isArray(styles) ? new Map(...styles) : new Map(styles);
|
|
570
351
|
}
|
|
571
352
|
function setStyles(element, styles, formerStyles) {
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
353
|
+
styles.forEach((val, prop) => {
|
|
354
|
+
const camelProp = dashCaseToCamelCase(prop);
|
|
355
|
+
if (formerStyles && !formerStyles.has(prop)) {
|
|
356
|
+
formerStyles.set(prop, element.style[camelProp]);
|
|
357
|
+
}
|
|
358
|
+
element.style[camelProp] = val;
|
|
359
|
+
});
|
|
579
360
|
}
|
|
580
361
|
function eraseStyles(element, styles) {
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
362
|
+
styles.forEach((_, prop) => {
|
|
363
|
+
const camelProp = dashCaseToCamelCase(prop);
|
|
364
|
+
element.style[camelProp] = '';
|
|
365
|
+
});
|
|
585
366
|
}
|
|
586
367
|
function normalizeAnimationEntry(steps) {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
return steps;
|
|
368
|
+
if (Array.isArray(steps)) {
|
|
369
|
+
if (steps.length == 1) return steps[0];
|
|
370
|
+
return sequence(steps);
|
|
371
|
+
}
|
|
372
|
+
return steps;
|
|
593
373
|
}
|
|
594
374
|
function validateStyleParams(value, options, errors) {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
375
|
+
const params = options.params || {};
|
|
376
|
+
const matches = extractStyleParams(value);
|
|
377
|
+
if (matches.length) {
|
|
378
|
+
matches.forEach(varName => {
|
|
379
|
+
if (!params.hasOwnProperty(varName)) {
|
|
380
|
+
errors.push(invalidStyleParams(varName));
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
}
|
|
604
384
|
}
|
|
605
|
-
const PARAM_REGEX = /* @__PURE__ */
|
|
385
|
+
const PARAM_REGEX = /* @__PURE__ */new RegExp(`${SUBSTITUTION_EXPR_START}\\s*(.+?)\\s*${SUBSTITUTION_EXPR_END}`, 'g');
|
|
606
386
|
function extractStyleParams(value) {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
}
|
|
613
|
-
PARAM_REGEX.lastIndex = 0;
|
|
387
|
+
let params = [];
|
|
388
|
+
if (typeof value === 'string') {
|
|
389
|
+
let match;
|
|
390
|
+
while (match = PARAM_REGEX.exec(value)) {
|
|
391
|
+
params.push(match[1]);
|
|
614
392
|
}
|
|
615
|
-
|
|
393
|
+
PARAM_REGEX.lastIndex = 0;
|
|
394
|
+
}
|
|
395
|
+
return params;
|
|
616
396
|
}
|
|
617
397
|
function interpolateParams(value, params, errors) {
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
// we do this to assert that numeric values stay as they are
|
|
629
|
-
return str == original ? value : str;
|
|
398
|
+
const original = `${value}`;
|
|
399
|
+
const str = original.replace(PARAM_REGEX, (_, varName) => {
|
|
400
|
+
let localVal = params[varName];
|
|
401
|
+
if (localVal == null) {
|
|
402
|
+
errors.push(invalidParamValue(varName));
|
|
403
|
+
localVal = '';
|
|
404
|
+
}
|
|
405
|
+
return localVal.toString();
|
|
406
|
+
});
|
|
407
|
+
return str == original ? value : str;
|
|
630
408
|
}
|
|
631
409
|
const DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
632
410
|
function dashCaseToCamelCase(input) {
|
|
633
|
-
|
|
411
|
+
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
634
412
|
}
|
|
635
413
|
function camelCaseToDashCase(input) {
|
|
636
|
-
|
|
414
|
+
return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
637
415
|
}
|
|
638
416
|
function allowPreviousPlayerStylesMerge(duration, delay) {
|
|
639
|
-
|
|
417
|
+
return duration === 0 || delay === 0;
|
|
640
418
|
}
|
|
641
419
|
function balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles) {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
}
|
|
420
|
+
if (previousStyles.size && keyframes.length) {
|
|
421
|
+
let startingKeyframe = keyframes[0];
|
|
422
|
+
let missingStyleProps = [];
|
|
423
|
+
previousStyles.forEach((val, prop) => {
|
|
424
|
+
if (!startingKeyframe.has(prop)) {
|
|
425
|
+
missingStyleProps.push(prop);
|
|
426
|
+
}
|
|
427
|
+
startingKeyframe.set(prop, val);
|
|
428
|
+
});
|
|
429
|
+
if (missingStyleProps.length) {
|
|
430
|
+
for (let i = 1; i < keyframes.length; i++) {
|
|
431
|
+
let kf = keyframes[i];
|
|
432
|
+
missingStyleProps.forEach(prop => kf.set(prop, computeStyle(element, prop)));
|
|
433
|
+
}
|
|
657
434
|
}
|
|
658
|
-
|
|
435
|
+
}
|
|
436
|
+
return keyframes;
|
|
659
437
|
}
|
|
660
438
|
function visitDslNode(visitor, node, context) {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
439
|
+
switch (node.type) {
|
|
440
|
+
case AnimationMetadataType.Trigger:
|
|
441
|
+
return visitor.visitTrigger(node, context);
|
|
442
|
+
case AnimationMetadataType.State:
|
|
443
|
+
return visitor.visitState(node, context);
|
|
444
|
+
case AnimationMetadataType.Transition:
|
|
445
|
+
return visitor.visitTransition(node, context);
|
|
446
|
+
case AnimationMetadataType.Sequence:
|
|
447
|
+
return visitor.visitSequence(node, context);
|
|
448
|
+
case AnimationMetadataType.Group:
|
|
449
|
+
return visitor.visitGroup(node, context);
|
|
450
|
+
case AnimationMetadataType.Animate:
|
|
451
|
+
return visitor.visitAnimate(node, context);
|
|
452
|
+
case AnimationMetadataType.Keyframes:
|
|
453
|
+
return visitor.visitKeyframes(node, context);
|
|
454
|
+
case AnimationMetadataType.Style:
|
|
455
|
+
return visitor.visitStyle(node, context);
|
|
456
|
+
case AnimationMetadataType.Reference:
|
|
457
|
+
return visitor.visitReference(node, context);
|
|
458
|
+
case AnimationMetadataType.AnimateChild:
|
|
459
|
+
return visitor.visitAnimateChild(node, context);
|
|
460
|
+
case AnimationMetadataType.AnimateRef:
|
|
461
|
+
return visitor.visitAnimateRef(node, context);
|
|
462
|
+
case AnimationMetadataType.Query:
|
|
463
|
+
return visitor.visitQuery(node, context);
|
|
464
|
+
case AnimationMetadataType.Stagger:
|
|
465
|
+
return visitor.visitStagger(node, context);
|
|
466
|
+
default:
|
|
467
|
+
throw invalidNodeType(node.type);
|
|
468
|
+
}
|
|
691
469
|
}
|
|
692
470
|
function computeStyle(element, prop) {
|
|
693
|
-
|
|
471
|
+
return window.getComputedStyle(element)[prop];
|
|
694
472
|
}
|
|
695
473
|
|
|
696
474
|
export { ENTER_CLASSNAME, LEAVE_CLASSNAME, NG_ANIMATING_CLASSNAME, NG_ANIMATING_SELECTOR, NG_TRIGGER_CLASSNAME, NG_TRIGGER_SELECTOR, SUBSTITUTION_EXPR_START, allowPreviousPlayerStylesMerge, balancePreviousStylesIntoKeyframes, buildingFailed, camelCaseToDashCase, computeStyle, containsElement, createAnimationFailed, dashCaseToCamelCase, eraseStyles, extractStyleParams, getOrSetDefaultValue, getParentElement, interpolateParams, invalidCssUnitValue, invalidDefinition, invalidExpression, invalidKeyframes, invalidOffset, invalidParallelAnimation, invalidQuery, invalidStagger, invalidState, invalidStyleValue, invalidTransitionAlias, invalidTrigger, invokeQuery, keyframeOffsetsOutOfOrder, keyframesMissingOffsets, listenOnPlayer, makeAnimationEvent, missingEvent, missingOrDestroyedAnimation, missingPlayer, missingTrigger, normalizeAnimationEntry, normalizeKeyframes$1 as normalizeKeyframes, normalizeKeyframes as normalizeKeyframes$1, normalizeStyles, optimizeGroupPlayer, parseTimelineCommand, registerFailed, resolveTiming, resolveTimingValue, setStyles, transitionFailed, triggerBuildFailed, triggerTransitionsFailed, unregisteredTrigger, unsupportedTriggerEvent, validateStyleParams, validateStyleProperty, validateWebAnimatableStyleProperty, validationFailed, visitDslNode };
|