@angular/animations 14.0.0-next.13 → 14.0.0-next.16
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/browser/{browser.d.ts → index.d.ts} +240 -239
- package/browser/testing/{testing.d.ts → index.d.ts} +48 -47
- package/esm2020/browser/src/dsl/animation_ast_builder.mjs +17 -17
- package/esm2020/browser/src/dsl/animation_timeline_builder.mjs +4 -4
- package/esm2020/browser/src/dsl/animation_timeline_instruction.mjs +2 -2
- package/esm2020/browser/src/dsl/animation_transition_instruction.mjs +2 -2
- package/esm2020/browser/src/dsl/animation_trigger.mjs +3 -3
- package/esm2020/browser/src/error_helpers.mjs +37 -37
- package/esm2020/browser/src/render/animation_driver.mjs +3 -3
- package/esm2020/browser/src/render/special_cased_styles.mjs +8 -8
- package/esm2020/browser/src/util.mjs +13 -13
- package/esm2020/src/animation_metadata.mjs +14 -14
- package/esm2020/src/version.mjs +1 -1
- package/fesm2015/animations.mjs +14 -14
- package/fesm2015/animations.mjs.map +1 -1
- package/fesm2015/browser/testing.mjs +50 -50
- package/fesm2015/browser/testing.mjs.map +1 -1
- package/fesm2015/browser.mjs +83 -83
- package/fesm2015/browser.mjs.map +1 -1
- package/fesm2020/animations.mjs +14 -14
- package/fesm2020/animations.mjs.map +1 -1
- package/fesm2020/browser/testing.mjs +50 -50
- package/fesm2020/browser/testing.mjs.map +1 -1
- package/fesm2020/browser.mjs +83 -83
- package/fesm2020/browser.mjs.map +1 -1
- package/{animations.d.ts → index.d.ts} +1618 -1617
- package/package.json +6 -6
- package/browser/package.json +0 -10
- package/browser/testing/package.json +0 -9
package/fesm2015/browser.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-next.
|
|
2
|
+
* @license Angular v14.0.0-next.16
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -18,127 +18,127 @@ import { ɵRuntimeError, Injectable } from '@angular/core';
|
|
|
18
18
|
const NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || !!ngDevMode;
|
|
19
19
|
const LINE_START = '\n - ';
|
|
20
20
|
function invalidTimingValue(exp) {
|
|
21
|
-
return new ɵRuntimeError(3000 /* INVALID_TIMING_VALUE */, NG_DEV_MODE$1 && `The provided timing value "${exp}" is invalid.`);
|
|
21
|
+
return new ɵRuntimeError(3000 /* RuntimeErrorCode.INVALID_TIMING_VALUE */, NG_DEV_MODE$1 && `The provided timing value "${exp}" is invalid.`);
|
|
22
22
|
}
|
|
23
23
|
function negativeStepValue() {
|
|
24
|
-
return new ɵRuntimeError(3100 /* NEGATIVE_STEP_VALUE */, NG_DEV_MODE$1 && 'Duration values below 0 are not allowed for this animation step.');
|
|
24
|
+
return new ɵRuntimeError(3100 /* RuntimeErrorCode.NEGATIVE_STEP_VALUE */, NG_DEV_MODE$1 && 'Duration values below 0 are not allowed for this animation step.');
|
|
25
25
|
}
|
|
26
26
|
function negativeDelayValue() {
|
|
27
|
-
return new ɵRuntimeError(3101 /* NEGATIVE_DELAY_VALUE */, NG_DEV_MODE$1 && 'Delay values below 0 are not allowed for this animation step.');
|
|
27
|
+
return new ɵRuntimeError(3101 /* RuntimeErrorCode.NEGATIVE_DELAY_VALUE */, NG_DEV_MODE$1 && 'Delay values below 0 are not allowed for this animation step.');
|
|
28
28
|
}
|
|
29
29
|
function invalidStyleParams(varName) {
|
|
30
|
-
return new ɵRuntimeError(3001 /* INVALID_STYLE_PARAMS */, NG_DEV_MODE$1 &&
|
|
30
|
+
return new ɵRuntimeError(3001 /* RuntimeErrorCode.INVALID_STYLE_PARAMS */, NG_DEV_MODE$1 &&
|
|
31
31
|
`Unable to resolve the local animation param ${varName} in the given list of values`);
|
|
32
32
|
}
|
|
33
33
|
function invalidParamValue(varName) {
|
|
34
|
-
return new ɵRuntimeError(3003 /* INVALID_PARAM_VALUE */, NG_DEV_MODE$1 && `Please provide a value for the animation param ${varName}`);
|
|
34
|
+
return new ɵRuntimeError(3003 /* RuntimeErrorCode.INVALID_PARAM_VALUE */, NG_DEV_MODE$1 && `Please provide a value for the animation param ${varName}`);
|
|
35
35
|
}
|
|
36
36
|
function invalidNodeType(nodeType) {
|
|
37
|
-
return new ɵRuntimeError(3004 /* INVALID_NODE_TYPE */, NG_DEV_MODE$1 && `Unable to resolve animation metadata node #${nodeType}`);
|
|
37
|
+
return new ɵRuntimeError(3004 /* RuntimeErrorCode.INVALID_NODE_TYPE */, NG_DEV_MODE$1 && `Unable to resolve animation metadata node #${nodeType}`);
|
|
38
38
|
}
|
|
39
39
|
function invalidCssUnitValue(userProvidedProperty, value) {
|
|
40
|
-
return new ɵRuntimeError(3005 /* INVALID_CSS_UNIT_VALUE */, NG_DEV_MODE$1 && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`);
|
|
40
|
+
return new ɵRuntimeError(3005 /* RuntimeErrorCode.INVALID_CSS_UNIT_VALUE */, NG_DEV_MODE$1 && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`);
|
|
41
41
|
}
|
|
42
42
|
function invalidTrigger() {
|
|
43
|
-
return new ɵRuntimeError(3006 /* INVALID_TRIGGER */, NG_DEV_MODE$1 &&
|
|
43
|
+
return new ɵRuntimeError(3006 /* RuntimeErrorCode.INVALID_TRIGGER */, NG_DEV_MODE$1 &&
|
|
44
44
|
'animation triggers cannot be prefixed with an `@` sign (e.g. trigger(\'@foo\', [...]))');
|
|
45
45
|
}
|
|
46
46
|
function invalidDefinition() {
|
|
47
|
-
return new ɵRuntimeError(3007 /* INVALID_DEFINITION */, NG_DEV_MODE$1 && 'only state() and transition() definitions can sit inside of a trigger()');
|
|
47
|
+
return new ɵRuntimeError(3007 /* RuntimeErrorCode.INVALID_DEFINITION */, NG_DEV_MODE$1 && 'only state() and transition() definitions can sit inside of a trigger()');
|
|
48
48
|
}
|
|
49
49
|
function invalidState(metadataName, missingSubs) {
|
|
50
|
-
return new ɵRuntimeError(3008 /* INVALID_STATE */, NG_DEV_MODE$1 &&
|
|
50
|
+
return new ɵRuntimeError(3008 /* RuntimeErrorCode.INVALID_STATE */, NG_DEV_MODE$1 &&
|
|
51
51
|
`state("${metadataName}", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`);
|
|
52
52
|
}
|
|
53
53
|
function invalidStyleValue(value) {
|
|
54
|
-
return new ɵRuntimeError(3002 /* INVALID_STYLE_VALUE */, NG_DEV_MODE$1 && `The provided style string value ${value} is not allowed.`);
|
|
54
|
+
return new ɵRuntimeError(3002 /* RuntimeErrorCode.INVALID_STYLE_VALUE */, NG_DEV_MODE$1 && `The provided style string value ${value} is not allowed.`);
|
|
55
55
|
}
|
|
56
56
|
function invalidProperty(prop) {
|
|
57
|
-
return new ɵRuntimeError(3009 /* INVALID_PROPERTY */, NG_DEV_MODE$1 &&
|
|
57
|
+
return new ɵRuntimeError(3009 /* RuntimeErrorCode.INVALID_PROPERTY */, NG_DEV_MODE$1 &&
|
|
58
58
|
`The provided animation property "${prop}" is not a supported CSS property for animations`);
|
|
59
59
|
}
|
|
60
60
|
function invalidParallelAnimation(prop, firstStart, firstEnd, secondStart, secondEnd) {
|
|
61
|
-
return new ɵRuntimeError(3010 /* INVALID_PARALLEL_ANIMATION */, NG_DEV_MODE$1 &&
|
|
61
|
+
return new ɵRuntimeError(3010 /* RuntimeErrorCode.INVALID_PARALLEL_ANIMATION */, NG_DEV_MODE$1 &&
|
|
62
62
|
`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"`);
|
|
63
63
|
}
|
|
64
64
|
function invalidKeyframes() {
|
|
65
|
-
return new ɵRuntimeError(3011 /* INVALID_KEYFRAMES */, NG_DEV_MODE$1 && `keyframes() must be placed inside of a call to animate()`);
|
|
65
|
+
return new ɵRuntimeError(3011 /* RuntimeErrorCode.INVALID_KEYFRAMES */, NG_DEV_MODE$1 && `keyframes() must be placed inside of a call to animate()`);
|
|
66
66
|
}
|
|
67
67
|
function invalidOffset() {
|
|
68
|
-
return new ɵRuntimeError(3012 /* INVALID_OFFSET */, NG_DEV_MODE$1 && `Please ensure that all keyframe offsets are between 0 and 1`);
|
|
68
|
+
return new ɵRuntimeError(3012 /* RuntimeErrorCode.INVALID_OFFSET */, NG_DEV_MODE$1 && `Please ensure that all keyframe offsets are between 0 and 1`);
|
|
69
69
|
}
|
|
70
70
|
function keyframeOffsetsOutOfOrder() {
|
|
71
|
-
return new ɵRuntimeError(3200 /* KEYFRAME_OFFSETS_OUT_OF_ORDER */, NG_DEV_MODE$1 && `Please ensure that all keyframe offsets are in order`);
|
|
71
|
+
return new ɵRuntimeError(3200 /* RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER */, NG_DEV_MODE$1 && `Please ensure that all keyframe offsets are in order`);
|
|
72
72
|
}
|
|
73
73
|
function keyframesMissingOffsets() {
|
|
74
|
-
return new ɵRuntimeError(3202 /* KEYFRAMES_MISSING_OFFSETS */, NG_DEV_MODE$1 && `Not all style() steps within the declared keyframes() contain offsets`);
|
|
74
|
+
return new ɵRuntimeError(3202 /* RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS */, NG_DEV_MODE$1 && `Not all style() steps within the declared keyframes() contain offsets`);
|
|
75
75
|
}
|
|
76
76
|
function invalidStagger() {
|
|
77
|
-
return new ɵRuntimeError(3013 /* INVALID_STAGGER */, NG_DEV_MODE$1 && `stagger() can only be used inside of query()`);
|
|
77
|
+
return new ɵRuntimeError(3013 /* RuntimeErrorCode.INVALID_STAGGER */, NG_DEV_MODE$1 && `stagger() can only be used inside of query()`);
|
|
78
78
|
}
|
|
79
79
|
function invalidQuery(selector) {
|
|
80
|
-
return new ɵRuntimeError(3014 /* INVALID_QUERY */, NG_DEV_MODE$1 &&
|
|
80
|
+
return new ɵRuntimeError(3014 /* RuntimeErrorCode.INVALID_QUERY */, NG_DEV_MODE$1 &&
|
|
81
81
|
`\`query("${selector}")\` returned zero elements. (Use \`query("${selector}", { optional: true })\` if you wish to allow this.)`);
|
|
82
82
|
}
|
|
83
83
|
function invalidExpression(expr) {
|
|
84
|
-
return new ɵRuntimeError(3015 /* INVALID_EXPRESSION */, NG_DEV_MODE$1 && `The provided transition expression "${expr}" is not supported`);
|
|
84
|
+
return new ɵRuntimeError(3015 /* RuntimeErrorCode.INVALID_EXPRESSION */, NG_DEV_MODE$1 && `The provided transition expression "${expr}" is not supported`);
|
|
85
85
|
}
|
|
86
86
|
function invalidTransitionAlias(alias) {
|
|
87
|
-
return new ɵRuntimeError(3016 /* INVALID_TRANSITION_ALIAS */, NG_DEV_MODE$1 && `The transition alias value "${alias}" is not supported`);
|
|
87
|
+
return new ɵRuntimeError(3016 /* RuntimeErrorCode.INVALID_TRANSITION_ALIAS */, NG_DEV_MODE$1 && `The transition alias value "${alias}" is not supported`);
|
|
88
88
|
}
|
|
89
89
|
function validationFailed(errors) {
|
|
90
|
-
return new ɵRuntimeError(3500 /* VALIDATION_FAILED */, NG_DEV_MODE$1 && `animation validation failed:\n${errors.map(err => err.message).join('\n')}`);
|
|
90
|
+
return new ɵRuntimeError(3500 /* RuntimeErrorCode.VALIDATION_FAILED */, NG_DEV_MODE$1 && `animation validation failed:\n${errors.map(err => err.message).join('\n')}`);
|
|
91
91
|
}
|
|
92
92
|
function buildingFailed(errors) {
|
|
93
|
-
return new ɵRuntimeError(3501 /* BUILDING_FAILED */, NG_DEV_MODE$1 && `animation building failed:\n${errors.map(err => err.message).join('\n')}`);
|
|
93
|
+
return new ɵRuntimeError(3501 /* RuntimeErrorCode.BUILDING_FAILED */, NG_DEV_MODE$1 && `animation building failed:\n${errors.map(err => err.message).join('\n')}`);
|
|
94
94
|
}
|
|
95
95
|
function triggerBuildFailed(name, errors) {
|
|
96
|
-
return new ɵRuntimeError(3404 /* TRIGGER_BUILD_FAILED */, NG_DEV_MODE$1 &&
|
|
96
|
+
return new ɵRuntimeError(3404 /* RuntimeErrorCode.TRIGGER_BUILD_FAILED */, NG_DEV_MODE$1 &&
|
|
97
97
|
`The animation trigger "${name}" has failed to build due to the following errors:\n - ${errors.map(err => err.message).join('\n - ')}`);
|
|
98
98
|
}
|
|
99
99
|
function animationFailed(errors) {
|
|
100
|
-
return new ɵRuntimeError(3502 /* ANIMATION_FAILED */, NG_DEV_MODE$1 &&
|
|
100
|
+
return new ɵRuntimeError(3502 /* RuntimeErrorCode.ANIMATION_FAILED */, NG_DEV_MODE$1 &&
|
|
101
101
|
`Unable to animate due to the following errors:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);
|
|
102
102
|
}
|
|
103
103
|
function registerFailed(errors) {
|
|
104
|
-
return new ɵRuntimeError(3503 /* REGISTRATION_FAILED */, NG_DEV_MODE$1 &&
|
|
104
|
+
return new ɵRuntimeError(3503 /* RuntimeErrorCode.REGISTRATION_FAILED */, NG_DEV_MODE$1 &&
|
|
105
105
|
`Unable to build the animation due to the following errors: ${errors.map(err => err.message).join('\n')}`);
|
|
106
106
|
}
|
|
107
107
|
function missingOrDestroyedAnimation() {
|
|
108
|
-
return new ɵRuntimeError(3300 /* MISSING_OR_DESTROYED_ANIMATION */, NG_DEV_MODE$1 && 'The requested animation doesn\'t exist or has already been destroyed');
|
|
108
|
+
return new ɵRuntimeError(3300 /* RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION */, NG_DEV_MODE$1 && 'The requested animation doesn\'t exist or has already been destroyed');
|
|
109
109
|
}
|
|
110
110
|
function createAnimationFailed(errors) {
|
|
111
|
-
return new ɵRuntimeError(3504 /* CREATE_ANIMATION_FAILED */, NG_DEV_MODE$1 &&
|
|
111
|
+
return new ɵRuntimeError(3504 /* RuntimeErrorCode.CREATE_ANIMATION_FAILED */, NG_DEV_MODE$1 &&
|
|
112
112
|
`Unable to create the animation due to the following errors:${errors.map(err => err.message).join('\n')}`);
|
|
113
113
|
}
|
|
114
114
|
function missingPlayer(id) {
|
|
115
|
-
return new ɵRuntimeError(3301 /* MISSING_PLAYER */, NG_DEV_MODE$1 && `Unable to find the timeline player referenced by ${id}`);
|
|
115
|
+
return new ɵRuntimeError(3301 /* RuntimeErrorCode.MISSING_PLAYER */, NG_DEV_MODE$1 && `Unable to find the timeline player referenced by ${id}`);
|
|
116
116
|
}
|
|
117
117
|
function missingTrigger(phase, name) {
|
|
118
|
-
return new ɵRuntimeError(3302 /* MISSING_TRIGGER */, NG_DEV_MODE$1 &&
|
|
118
|
+
return new ɵRuntimeError(3302 /* RuntimeErrorCode.MISSING_TRIGGER */, NG_DEV_MODE$1 &&
|
|
119
119
|
`Unable to listen on the animation trigger event "${phase}" because the animation trigger "${name}" doesn\'t exist!`);
|
|
120
120
|
}
|
|
121
121
|
function missingEvent(name) {
|
|
122
|
-
return new ɵRuntimeError(3303 /* MISSING_EVENT */, NG_DEV_MODE$1 &&
|
|
122
|
+
return new ɵRuntimeError(3303 /* RuntimeErrorCode.MISSING_EVENT */, NG_DEV_MODE$1 &&
|
|
123
123
|
`Unable to listen on the animation trigger "${name}" because the provided event is undefined!`);
|
|
124
124
|
}
|
|
125
125
|
function unsupportedTriggerEvent(phase, name) {
|
|
126
|
-
return new ɵRuntimeError(3400 /* UNSUPPORTED_TRIGGER_EVENT */, NG_DEV_MODE$1 &&
|
|
126
|
+
return new ɵRuntimeError(3400 /* RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT */, NG_DEV_MODE$1 &&
|
|
127
127
|
`The provided animation trigger event "${phase}" for the animation trigger "${name}" is not supported!`);
|
|
128
128
|
}
|
|
129
129
|
function unregisteredTrigger(name) {
|
|
130
|
-
return new ɵRuntimeError(3401 /* UNREGISTERED_TRIGGER */, NG_DEV_MODE$1 && `The provided animation trigger "${name}" has not been registered!`);
|
|
130
|
+
return new ɵRuntimeError(3401 /* RuntimeErrorCode.UNREGISTERED_TRIGGER */, NG_DEV_MODE$1 && `The provided animation trigger "${name}" has not been registered!`);
|
|
131
131
|
}
|
|
132
132
|
function triggerTransitionsFailed(errors) {
|
|
133
|
-
return new ɵRuntimeError(3402 /* TRIGGER_TRANSITIONS_FAILED */, NG_DEV_MODE$1 &&
|
|
133
|
+
return new ɵRuntimeError(3402 /* RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED */, NG_DEV_MODE$1 &&
|
|
134
134
|
`Unable to process animations due to the following failed trigger transitions\n ${errors.map(err => err.message).join('\n')}`);
|
|
135
135
|
}
|
|
136
136
|
function triggerParsingFailed(name, errors) {
|
|
137
|
-
return new ɵRuntimeError(3403 /* TRIGGER_PARSING_FAILED */, NG_DEV_MODE$1 &&
|
|
137
|
+
return new ɵRuntimeError(3403 /* RuntimeErrorCode.TRIGGER_PARSING_FAILED */, NG_DEV_MODE$1 &&
|
|
138
138
|
`Animation parsing for the ${name} trigger have failed:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);
|
|
139
139
|
}
|
|
140
140
|
function transitionFailed(name, errors) {
|
|
141
|
-
return new ɵRuntimeError(3505 /* TRANSITION_FAILED */, NG_DEV_MODE$1 &&
|
|
141
|
+
return new ɵRuntimeError(3505 /* RuntimeErrorCode.TRANSITION_FAILED */, NG_DEV_MODE$1 &&
|
|
142
142
|
`@${name} has failed due to:\n ${errors.map(err => err.message).join('\n- ')}`);
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -580,9 +580,9 @@ class NoopAnimationDriver {
|
|
|
580
580
|
return new NoopAnimationPlayer(duration, delay);
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
584
|
-
NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
585
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
583
|
+
NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
584
|
+
NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: NoopAnimationDriver });
|
|
585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: NoopAnimationDriver, decorators: [{
|
|
586
586
|
type: Injectable
|
|
587
587
|
}] });
|
|
588
588
|
/**
|
|
@@ -856,31 +856,31 @@ function balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles)
|
|
|
856
856
|
}
|
|
857
857
|
function visitDslNode(visitor, node, context) {
|
|
858
858
|
switch (node.type) {
|
|
859
|
-
case 7 /* Trigger */:
|
|
859
|
+
case 7 /* AnimationMetadataType.Trigger */:
|
|
860
860
|
return visitor.visitTrigger(node, context);
|
|
861
|
-
case 0 /* State */:
|
|
861
|
+
case 0 /* AnimationMetadataType.State */:
|
|
862
862
|
return visitor.visitState(node, context);
|
|
863
|
-
case 1 /* Transition */:
|
|
863
|
+
case 1 /* AnimationMetadataType.Transition */:
|
|
864
864
|
return visitor.visitTransition(node, context);
|
|
865
|
-
case 2 /* Sequence */:
|
|
865
|
+
case 2 /* AnimationMetadataType.Sequence */:
|
|
866
866
|
return visitor.visitSequence(node, context);
|
|
867
|
-
case 3 /* Group */:
|
|
867
|
+
case 3 /* AnimationMetadataType.Group */:
|
|
868
868
|
return visitor.visitGroup(node, context);
|
|
869
|
-
case 4 /* Animate */:
|
|
869
|
+
case 4 /* AnimationMetadataType.Animate */:
|
|
870
870
|
return visitor.visitAnimate(node, context);
|
|
871
|
-
case 5 /* Keyframes */:
|
|
871
|
+
case 5 /* AnimationMetadataType.Keyframes */:
|
|
872
872
|
return visitor.visitKeyframes(node, context);
|
|
873
|
-
case 6 /* Style */:
|
|
873
|
+
case 6 /* AnimationMetadataType.Style */:
|
|
874
874
|
return visitor.visitStyle(node, context);
|
|
875
|
-
case 8 /* Reference */:
|
|
875
|
+
case 8 /* AnimationMetadataType.Reference */:
|
|
876
876
|
return visitor.visitReference(node, context);
|
|
877
|
-
case 9 /* AnimateChild */:
|
|
877
|
+
case 9 /* AnimationMetadataType.AnimateChild */:
|
|
878
878
|
return visitor.visitAnimateChild(node, context);
|
|
879
|
-
case 10 /* AnimateRef */:
|
|
879
|
+
case 10 /* AnimationMetadataType.AnimateRef */:
|
|
880
880
|
return visitor.visitAnimateRef(node, context);
|
|
881
|
-
case 11 /* Query */:
|
|
881
|
+
case 11 /* AnimationMetadataType.Query */:
|
|
882
882
|
return visitor.visitQuery(node, context);
|
|
883
|
-
case 12 /* Stagger */:
|
|
883
|
+
case 12 /* AnimationMetadataType.Stagger */:
|
|
884
884
|
return visitor.visitStagger(node, context);
|
|
885
885
|
default:
|
|
886
886
|
throw invalidNodeType(node.type);
|
|
@@ -1089,7 +1089,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1089
1089
|
}
|
|
1090
1090
|
metadata.definitions.forEach(def => {
|
|
1091
1091
|
this._resetContextStyleTimingState(context);
|
|
1092
|
-
if (def.type == 0 /* State */) {
|
|
1092
|
+
if (def.type == 0 /* AnimationMetadataType.State */) {
|
|
1093
1093
|
const stateDef = def;
|
|
1094
1094
|
const name = stateDef.name;
|
|
1095
1095
|
name.toString().split(/\s*,\s*/).forEach(n => {
|
|
@@ -1098,7 +1098,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1098
1098
|
});
|
|
1099
1099
|
stateDef.name = name;
|
|
1100
1100
|
}
|
|
1101
|
-
else if (def.type == 1 /* Transition */) {
|
|
1101
|
+
else if (def.type == 1 /* AnimationMetadataType.Transition */) {
|
|
1102
1102
|
const transition = this.visitTransition(def, context);
|
|
1103
1103
|
queryCount += transition.queryCount;
|
|
1104
1104
|
depCount += transition.depCount;
|
|
@@ -1109,7 +1109,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
});
|
|
1111
1111
|
return {
|
|
1112
|
-
type: 7 /* Trigger */,
|
|
1112
|
+
type: 7 /* AnimationMetadataType.Trigger */,
|
|
1113
1113
|
name: metadata.name,
|
|
1114
1114
|
states,
|
|
1115
1115
|
transitions,
|
|
@@ -1141,7 +1141,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
1143
|
return {
|
|
1144
|
-
type: 0 /* State */,
|
|
1144
|
+
type: 0 /* AnimationMetadataType.State */,
|
|
1145
1145
|
name: metadata.name,
|
|
1146
1146
|
style: styleAst,
|
|
1147
1147
|
options: astParams ? { params: astParams } : null
|
|
@@ -1153,7 +1153,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1153
1153
|
const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);
|
|
1154
1154
|
const matchers = parseTransitionExpr(metadata.expr, context.errors);
|
|
1155
1155
|
return {
|
|
1156
|
-
type: 1 /* Transition */,
|
|
1156
|
+
type: 1 /* AnimationMetadataType.Transition */,
|
|
1157
1157
|
matchers,
|
|
1158
1158
|
animation,
|
|
1159
1159
|
queryCount: context.queryCount,
|
|
@@ -1163,7 +1163,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1163
1163
|
}
|
|
1164
1164
|
visitSequence(metadata, context) {
|
|
1165
1165
|
return {
|
|
1166
|
-
type: 2 /* Sequence */,
|
|
1166
|
+
type: 2 /* AnimationMetadataType.Sequence */,
|
|
1167
1167
|
steps: metadata.steps.map(s => visitDslNode(this, s, context)),
|
|
1168
1168
|
options: normalizeAnimationOptions(metadata.options)
|
|
1169
1169
|
};
|
|
@@ -1179,7 +1179,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1179
1179
|
});
|
|
1180
1180
|
context.currentTime = furthestTime;
|
|
1181
1181
|
return {
|
|
1182
|
-
type: 3 /* Group */,
|
|
1182
|
+
type: 3 /* AnimationMetadataType.Group */,
|
|
1183
1183
|
steps,
|
|
1184
1184
|
options: normalizeAnimationOptions(metadata.options)
|
|
1185
1185
|
};
|
|
@@ -1189,7 +1189,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1189
1189
|
context.currentAnimateTimings = timingAst;
|
|
1190
1190
|
let styleAst;
|
|
1191
1191
|
let styleMetadata = metadata.styles ? metadata.styles : style({});
|
|
1192
|
-
if (styleMetadata.type == 5 /* Keyframes */) {
|
|
1192
|
+
if (styleMetadata.type == 5 /* AnimationMetadataType.Keyframes */) {
|
|
1193
1193
|
styleAst = this.visitKeyframes(styleMetadata, context);
|
|
1194
1194
|
}
|
|
1195
1195
|
else {
|
|
@@ -1210,7 +1210,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1210
1210
|
}
|
|
1211
1211
|
context.currentAnimateTimings = null;
|
|
1212
1212
|
return {
|
|
1213
|
-
type: 4 /* Animate */,
|
|
1213
|
+
type: 4 /* AnimationMetadataType.Animate */,
|
|
1214
1214
|
timings: timingAst,
|
|
1215
1215
|
style: styleAst,
|
|
1216
1216
|
options: null
|
|
@@ -1256,7 +1256,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1256
1256
|
}
|
|
1257
1257
|
});
|
|
1258
1258
|
return {
|
|
1259
|
-
type: 6 /* Style */,
|
|
1259
|
+
type: 6 /* AnimationMetadataType.Style */,
|
|
1260
1260
|
styles,
|
|
1261
1261
|
easing: collectedEasing,
|
|
1262
1262
|
offset: metadata.offset,
|
|
@@ -1316,7 +1316,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1316
1316
|
});
|
|
1317
1317
|
}
|
|
1318
1318
|
visitKeyframes(metadata, context) {
|
|
1319
|
-
const ast = { type: 5 /* Keyframes */, styles: [], options: null };
|
|
1319
|
+
const ast = { type: 5 /* AnimationMetadataType.Keyframes */, styles: [], options: null };
|
|
1320
1320
|
if (!context.currentAnimateTimings) {
|
|
1321
1321
|
context.errors.push(invalidKeyframes());
|
|
1322
1322
|
return ast;
|
|
@@ -1372,7 +1372,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1372
1372
|
}
|
|
1373
1373
|
visitReference(metadata, context) {
|
|
1374
1374
|
return {
|
|
1375
|
-
type: 8 /* Reference */,
|
|
1375
|
+
type: 8 /* AnimationMetadataType.Reference */,
|
|
1376
1376
|
animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),
|
|
1377
1377
|
options: normalizeAnimationOptions(metadata.options)
|
|
1378
1378
|
};
|
|
@@ -1380,13 +1380,13 @@ class AnimationAstBuilderVisitor {
|
|
|
1380
1380
|
visitAnimateChild(metadata, context) {
|
|
1381
1381
|
context.depCount++;
|
|
1382
1382
|
return {
|
|
1383
|
-
type: 9 /* AnimateChild */,
|
|
1383
|
+
type: 9 /* AnimationMetadataType.AnimateChild */,
|
|
1384
1384
|
options: normalizeAnimationOptions(metadata.options)
|
|
1385
1385
|
};
|
|
1386
1386
|
}
|
|
1387
1387
|
visitAnimateRef(metadata, context) {
|
|
1388
1388
|
return {
|
|
1389
|
-
type: 10 /* AnimateRef */,
|
|
1389
|
+
type: 10 /* AnimationMetadataType.AnimateRef */,
|
|
1390
1390
|
animation: this.visitReference(metadata.animation, context),
|
|
1391
1391
|
options: normalizeAnimationOptions(metadata.options)
|
|
1392
1392
|
};
|
|
@@ -1404,7 +1404,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1404
1404
|
context.currentQuery = null;
|
|
1405
1405
|
context.currentQuerySelector = parentSelector;
|
|
1406
1406
|
return {
|
|
1407
|
-
type: 11 /* Query */,
|
|
1407
|
+
type: 11 /* AnimationMetadataType.Query */,
|
|
1408
1408
|
selector,
|
|
1409
1409
|
limit: options.limit || 0,
|
|
1410
1410
|
optional: !!options.optional,
|
|
@@ -1422,7 +1422,7 @@ class AnimationAstBuilderVisitor {
|
|
|
1422
1422
|
{ duration: 0, delay: 0, easing: 'full' } :
|
|
1423
1423
|
resolveTiming(metadata.timings, context.errors, true);
|
|
1424
1424
|
return {
|
|
1425
|
-
type: 12 /* Stagger */,
|
|
1425
|
+
type: 12 /* AnimationMetadataType.Stagger */,
|
|
1426
1426
|
animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),
|
|
1427
1427
|
timings,
|
|
1428
1428
|
options: null
|
|
@@ -1517,7 +1517,7 @@ function makeTimingAst(duration, delay, easing) {
|
|
|
1517
1517
|
|
|
1518
1518
|
function createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing = null, subTimeline = false) {
|
|
1519
1519
|
return {
|
|
1520
|
-
type: 1 /* TimelineAnimation */,
|
|
1520
|
+
type: 1 /* AnimationTransitionInstructionType.TimelineAnimation */,
|
|
1521
1521
|
element,
|
|
1522
1522
|
keyframes,
|
|
1523
1523
|
preStyleProps,
|
|
@@ -1737,7 +1737,7 @@ class AnimationTimelineBuilderVisitor {
|
|
|
1737
1737
|
ctx = context.createSubContext(options);
|
|
1738
1738
|
ctx.transformIntoNewTimeline();
|
|
1739
1739
|
if (options.delay != null) {
|
|
1740
|
-
if (ctx.previousNode.type == 6 /* Style */) {
|
|
1740
|
+
if (ctx.previousNode.type == 6 /* AnimationMetadataType.Style */) {
|
|
1741
1741
|
ctx.currentTimeline.snapshotCurrentStyles();
|
|
1742
1742
|
ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
|
|
1743
1743
|
}
|
|
@@ -1796,7 +1796,7 @@ class AnimationTimelineBuilderVisitor {
|
|
|
1796
1796
|
timeline.snapshotCurrentStyles();
|
|
1797
1797
|
}
|
|
1798
1798
|
const style = ast.style;
|
|
1799
|
-
if (style.type == 5 /* Keyframes */) {
|
|
1799
|
+
if (style.type == 5 /* AnimationMetadataType.Keyframes */) {
|
|
1800
1800
|
this.visitKeyframes(style, context);
|
|
1801
1801
|
}
|
|
1802
1802
|
else {
|
|
@@ -1852,7 +1852,7 @@ class AnimationTimelineBuilderVisitor {
|
|
|
1852
1852
|
const options = (ast.options || {});
|
|
1853
1853
|
const delay = options.delay ? resolveTimingValue(options.delay) : 0;
|
|
1854
1854
|
if (delay &&
|
|
1855
|
-
(context.previousNode.type === 6 /* Style */ ||
|
|
1855
|
+
(context.previousNode.type === 6 /* AnimationMetadataType.Style */ ||
|
|
1856
1856
|
(startTime == 0 && context.currentTimeline.hasCurrentStyleProperties()))) {
|
|
1857
1857
|
context.currentTimeline.snapshotCurrentStyles();
|
|
1858
1858
|
context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
|
|
@@ -2431,7 +2431,7 @@ class WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {
|
|
|
2431
2431
|
*/
|
|
2432
2432
|
function createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, totalTime, errors) {
|
|
2433
2433
|
return {
|
|
2434
|
-
type: 0 /* TransitionAnimation */,
|
|
2434
|
+
type: 0 /* AnimationTransitionInstructionType.TransitionAnimation */,
|
|
2435
2435
|
element,
|
|
2436
2436
|
triggerName,
|
|
2437
2437
|
isRemovalTransition,
|
|
@@ -2582,9 +2582,9 @@ class AnimationTrigger {
|
|
|
2582
2582
|
}
|
|
2583
2583
|
function createFallbackTransition(triggerName, states, normalizer) {
|
|
2584
2584
|
const matchers = [(fromState, toState) => true];
|
|
2585
|
-
const animation = { type: 2 /* Sequence */, steps: [], options: null };
|
|
2585
|
+
const animation = { type: 2 /* AnimationMetadataType.Sequence */, steps: [], options: null };
|
|
2586
2586
|
const transition = {
|
|
2587
|
-
type: 1 /* Transition */,
|
|
2587
|
+
type: 1 /* AnimationMetadataType.Transition */,
|
|
2588
2588
|
animation,
|
|
2589
2589
|
matchers,
|
|
2590
2590
|
options: null,
|
|
@@ -4369,7 +4369,7 @@ class SpecialCasedStyles {
|
|
|
4369
4369
|
this._element = _element;
|
|
4370
4370
|
this._startStyles = _startStyles;
|
|
4371
4371
|
this._endStyles = _endStyles;
|
|
4372
|
-
this._state = 0 /* Pending */;
|
|
4372
|
+
this._state = 0 /* SpecialCasedStylesState.Pending */;
|
|
4373
4373
|
let initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element);
|
|
4374
4374
|
if (!initialStyles) {
|
|
4375
4375
|
SpecialCasedStyles.initialStylesByElement.set(_element, initialStyles = new Map());
|
|
@@ -4377,27 +4377,27 @@ class SpecialCasedStyles {
|
|
|
4377
4377
|
this._initialStyles = initialStyles;
|
|
4378
4378
|
}
|
|
4379
4379
|
start() {
|
|
4380
|
-
if (this._state < 1 /* Started */) {
|
|
4380
|
+
if (this._state < 1 /* SpecialCasedStylesState.Started */) {
|
|
4381
4381
|
if (this._startStyles) {
|
|
4382
4382
|
setStyles(this._element, this._startStyles, this._initialStyles);
|
|
4383
4383
|
}
|
|
4384
|
-
this._state = 1 /* Started */;
|
|
4384
|
+
this._state = 1 /* SpecialCasedStylesState.Started */;
|
|
4385
4385
|
}
|
|
4386
4386
|
}
|
|
4387
4387
|
finish() {
|
|
4388
4388
|
this.start();
|
|
4389
|
-
if (this._state < 2 /* Finished */) {
|
|
4389
|
+
if (this._state < 2 /* SpecialCasedStylesState.Finished */) {
|
|
4390
4390
|
setStyles(this._element, this._initialStyles);
|
|
4391
4391
|
if (this._endStyles) {
|
|
4392
4392
|
setStyles(this._element, this._endStyles);
|
|
4393
4393
|
this._endStyles = null;
|
|
4394
4394
|
}
|
|
4395
|
-
this._state = 1 /* Started */;
|
|
4395
|
+
this._state = 1 /* SpecialCasedStylesState.Started */;
|
|
4396
4396
|
}
|
|
4397
4397
|
}
|
|
4398
4398
|
destroy() {
|
|
4399
4399
|
this.finish();
|
|
4400
|
-
if (this._state < 3 /* Destroyed */) {
|
|
4400
|
+
if (this._state < 3 /* SpecialCasedStylesState.Destroyed */) {
|
|
4401
4401
|
SpecialCasedStyles.initialStylesByElement.delete(this._element);
|
|
4402
4402
|
if (this._startStyles) {
|
|
4403
4403
|
eraseStyles(this._element, this._startStyles);
|
|
@@ -4408,7 +4408,7 @@ class SpecialCasedStyles {
|
|
|
4408
4408
|
this._endStyles = null;
|
|
4409
4409
|
}
|
|
4410
4410
|
setStyles(this._element, this._initialStyles);
|
|
4411
|
-
this._state = 3 /* Destroyed */;
|
|
4411
|
+
this._state = 3 /* SpecialCasedStylesState.Destroyed */;
|
|
4412
4412
|
}
|
|
4413
4413
|
}
|
|
4414
4414
|
}
|