@angular/animations 19.2.1 → 19.2.2
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/index.d.ts +133 -158
- package/browser/testing/index.d.ts +10 -14
- package/fesm2022/animations.mjs +9 -27
- package/fesm2022/animations.mjs.map +1 -1
- package/fesm2022/browser/testing.mjs +10 -22
- package/fesm2022/browser/testing.mjs.map +1 -1
- package/fesm2022/browser.mjs +46 -85
- package/fesm2022/browser.mjs.map +1 -1
- package/index.d.ts +1047 -1090
- package/package.json +2 -2
package/fesm2022/browser.mjs
CHANGED
@@ -1,148 +1,138 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v19.2.
|
2
|
+
* @license Angular v19.2.2
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
6
6
|
|
7
|
-
import { ɵAnimationGroupPlayer, NoopAnimationPlayer, AUTO_STYLE, ɵPRE_STYLE
|
7
|
+
import { ɵAnimationGroupPlayer as _AnimationGroupPlayer, NoopAnimationPlayer, AUTO_STYLE, ɵPRE_STYLE as _PRE_STYLE, AnimationMetadataType, sequence, style } from '@angular/animations';
|
8
8
|
import * as i0 from '@angular/core';
|
9
|
-
import { ɵRuntimeError, Injectable } from '@angular/core';
|
9
|
+
import { ɵRuntimeError as _RuntimeError, Injectable } from '@angular/core';
|
10
10
|
|
11
11
|
const LINE_START = '\n - ';
|
12
12
|
function invalidTimingValue(exp) {
|
13
|
-
return new
|
13
|
+
return new _RuntimeError(3000 /* RuntimeErrorCode.INVALID_TIMING_VALUE */, ngDevMode && `The provided timing value "${exp}" is invalid.`);
|
14
14
|
}
|
15
15
|
function negativeStepValue() {
|
16
|
-
return new
|
16
|
+
return new _RuntimeError(3100 /* RuntimeErrorCode.NEGATIVE_STEP_VALUE */, ngDevMode && 'Duration values below 0 are not allowed for this animation step.');
|
17
17
|
}
|
18
18
|
function negativeDelayValue() {
|
19
|
-
return new
|
19
|
+
return new _RuntimeError(3101 /* RuntimeErrorCode.NEGATIVE_DELAY_VALUE */, ngDevMode && 'Delay values below 0 are not allowed for this animation step.');
|
20
20
|
}
|
21
21
|
function invalidStyleParams(varName) {
|
22
|
-
return new
|
22
|
+
return new _RuntimeError(3001 /* RuntimeErrorCode.INVALID_STYLE_PARAMS */, ngDevMode &&
|
23
23
|
`Unable to resolve the local animation param ${varName} in the given list of values`);
|
24
24
|
}
|
25
25
|
function invalidParamValue(varName) {
|
26
|
-
return new
|
26
|
+
return new _RuntimeError(3003 /* RuntimeErrorCode.INVALID_PARAM_VALUE */, ngDevMode && `Please provide a value for the animation param ${varName}`);
|
27
27
|
}
|
28
28
|
function invalidNodeType(nodeType) {
|
29
|
-
return new
|
29
|
+
return new _RuntimeError(3004 /* RuntimeErrorCode.INVALID_NODE_TYPE */, ngDevMode && `Unable to resolve animation metadata node #${nodeType}`);
|
30
30
|
}
|
31
31
|
function invalidCssUnitValue(userProvidedProperty, value) {
|
32
|
-
return new
|
32
|
+
return new _RuntimeError(3005 /* RuntimeErrorCode.INVALID_CSS_UNIT_VALUE */, ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`);
|
33
33
|
}
|
34
34
|
function invalidTrigger() {
|
35
|
-
return new
|
35
|
+
return new _RuntimeError(3006 /* RuntimeErrorCode.INVALID_TRIGGER */, ngDevMode &&
|
36
36
|
"animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))");
|
37
37
|
}
|
38
38
|
function invalidDefinition() {
|
39
|
-
return new
|
39
|
+
return new _RuntimeError(3007 /* RuntimeErrorCode.INVALID_DEFINITION */, ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()');
|
40
40
|
}
|
41
41
|
function invalidState(metadataName, missingSubs) {
|
42
|
-
return new
|
42
|
+
return new _RuntimeError(3008 /* RuntimeErrorCode.INVALID_STATE */, ngDevMode &&
|
43
43
|
`state("${metadataName}", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`);
|
44
44
|
}
|
45
45
|
function invalidStyleValue(value) {
|
46
|
-
return new
|
47
|
-
}
|
48
|
-
function invalidProperty(prop) {
|
49
|
-
return new ɵRuntimeError(3009 /* RuntimeErrorCode.INVALID_PROPERTY */, ngDevMode &&
|
50
|
-
`The provided animation property "${prop}" is not a supported CSS property for animations`);
|
46
|
+
return new _RuntimeError(3002 /* RuntimeErrorCode.INVALID_STYLE_VALUE */, ngDevMode && `The provided style string value ${value} is not allowed.`);
|
51
47
|
}
|
52
48
|
function invalidParallelAnimation(prop, firstStart, firstEnd, secondStart, secondEnd) {
|
53
|
-
return new
|
49
|
+
return new _RuntimeError(3010 /* RuntimeErrorCode.INVALID_PARALLEL_ANIMATION */, ngDevMode &&
|
54
50
|
`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"`);
|
55
51
|
}
|
56
52
|
function invalidKeyframes() {
|
57
|
-
return new
|
53
|
+
return new _RuntimeError(3011 /* RuntimeErrorCode.INVALID_KEYFRAMES */, ngDevMode && `keyframes() must be placed inside of a call to animate()`);
|
58
54
|
}
|
59
55
|
function invalidOffset() {
|
60
|
-
return new
|
56
|
+
return new _RuntimeError(3012 /* RuntimeErrorCode.INVALID_OFFSET */, ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`);
|
61
57
|
}
|
62
58
|
function keyframeOffsetsOutOfOrder() {
|
63
|
-
return new
|
59
|
+
return new _RuntimeError(3200 /* RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER */, ngDevMode && `Please ensure that all keyframe offsets are in order`);
|
64
60
|
}
|
65
61
|
function keyframesMissingOffsets() {
|
66
|
-
return new
|
62
|
+
return new _RuntimeError(3202 /* RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS */, ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`);
|
67
63
|
}
|
68
64
|
function invalidStagger() {
|
69
|
-
return new
|
65
|
+
return new _RuntimeError(3013 /* RuntimeErrorCode.INVALID_STAGGER */, ngDevMode && `stagger() can only be used inside of query()`);
|
70
66
|
}
|
71
67
|
function invalidQuery(selector) {
|
72
|
-
return new
|
68
|
+
return new _RuntimeError(3014 /* RuntimeErrorCode.INVALID_QUERY */, ngDevMode &&
|
73
69
|
`\`query("${selector}")\` returned zero elements. (Use \`query("${selector}", { optional: true })\` if you wish to allow this.)`);
|
74
70
|
}
|
75
71
|
function invalidExpression(expr) {
|
76
|
-
return new
|
72
|
+
return new _RuntimeError(3015 /* RuntimeErrorCode.INVALID_EXPRESSION */, ngDevMode && `The provided transition expression "${expr}" is not supported`);
|
77
73
|
}
|
78
74
|
function invalidTransitionAlias(alias) {
|
79
|
-
return new
|
75
|
+
return new _RuntimeError(3016 /* RuntimeErrorCode.INVALID_TRANSITION_ALIAS */, ngDevMode && `The transition alias value "${alias}" is not supported`);
|
80
76
|
}
|
81
77
|
function validationFailed(errors) {
|
82
|
-
return new
|
78
|
+
return new _RuntimeError(3500 /* RuntimeErrorCode.VALIDATION_FAILED */, ngDevMode && `animation validation failed:\n${errors.map((err) => err.message).join('\n')}`);
|
83
79
|
}
|
84
80
|
function buildingFailed(errors) {
|
85
|
-
return new
|
81
|
+
return new _RuntimeError(3501 /* RuntimeErrorCode.BUILDING_FAILED */, ngDevMode && `animation building failed:\n${errors.map((err) => err.message).join('\n')}`);
|
86
82
|
}
|
87
83
|
function triggerBuildFailed(name, errors) {
|
88
|
-
return new
|
84
|
+
return new _RuntimeError(3404 /* RuntimeErrorCode.TRIGGER_BUILD_FAILED */, ngDevMode &&
|
89
85
|
`The animation trigger "${name}" has failed to build due to the following errors:\n - ${errors
|
90
86
|
.map((err) => err.message)
|
91
87
|
.join('\n - ')}`);
|
92
88
|
}
|
93
89
|
function animationFailed(errors) {
|
94
|
-
return new
|
90
|
+
return new _RuntimeError(3502 /* RuntimeErrorCode.ANIMATION_FAILED */, ngDevMode &&
|
95
91
|
`Unable to animate due to the following errors:${LINE_START}${errors
|
96
92
|
.map((err) => err.message)
|
97
93
|
.join(LINE_START)}`);
|
98
94
|
}
|
99
95
|
function registerFailed(errors) {
|
100
|
-
return new
|
96
|
+
return new _RuntimeError(3503 /* RuntimeErrorCode.REGISTRATION_FAILED */, ngDevMode &&
|
101
97
|
`Unable to build the animation due to the following errors: ${errors
|
102
98
|
.map((err) => err.message)
|
103
99
|
.join('\n')}`);
|
104
100
|
}
|
105
101
|
function missingOrDestroyedAnimation() {
|
106
|
-
return new
|
102
|
+
return new _RuntimeError(3300 /* RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION */, ngDevMode && "The requested animation doesn't exist or has already been destroyed");
|
107
103
|
}
|
108
104
|
function createAnimationFailed(errors) {
|
109
|
-
return new
|
105
|
+
return new _RuntimeError(3504 /* RuntimeErrorCode.CREATE_ANIMATION_FAILED */, ngDevMode &&
|
110
106
|
`Unable to create the animation due to the following errors:${errors
|
111
107
|
.map((err) => err.message)
|
112
108
|
.join('\n')}`);
|
113
109
|
}
|
114
110
|
function missingPlayer(id) {
|
115
|
-
return new
|
111
|
+
return new _RuntimeError(3301 /* RuntimeErrorCode.MISSING_PLAYER */, ngDevMode && `Unable to find the timeline player referenced by ${id}`);
|
116
112
|
}
|
117
113
|
function missingTrigger(phase, name) {
|
118
|
-
return new
|
114
|
+
return new _RuntimeError(3302 /* RuntimeErrorCode.MISSING_TRIGGER */, ngDevMode &&
|
119
115
|
`Unable to listen on the animation trigger event "${phase}" because the animation trigger "${name}" doesn\'t exist!`);
|
120
116
|
}
|
121
117
|
function missingEvent(name) {
|
122
|
-
return new
|
118
|
+
return new _RuntimeError(3303 /* RuntimeErrorCode.MISSING_EVENT */, ngDevMode &&
|
123
119
|
`Unable to listen on the animation trigger "${name}" because the provided event is undefined!`);
|
124
120
|
}
|
125
121
|
function unsupportedTriggerEvent(phase, name) {
|
126
|
-
return new
|
122
|
+
return new _RuntimeError(3400 /* RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT */, ngDevMode &&
|
127
123
|
`The provided animation trigger event "${phase}" for the animation trigger "${name}" is not supported!`);
|
128
124
|
}
|
129
125
|
function unregisteredTrigger(name) {
|
130
|
-
return new
|
126
|
+
return new _RuntimeError(3401 /* RuntimeErrorCode.UNREGISTERED_TRIGGER */, ngDevMode && `The provided animation trigger "${name}" has not been registered!`);
|
131
127
|
}
|
132
128
|
function triggerTransitionsFailed(errors) {
|
133
|
-
return new
|
129
|
+
return new _RuntimeError(3402 /* RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED */, ngDevMode &&
|
134
130
|
`Unable to process animations due to the following failed trigger transitions\n ${errors
|
135
131
|
.map((err) => err.message)
|
136
132
|
.join('\n')}`);
|
137
133
|
}
|
138
|
-
function triggerParsingFailed(name, errors) {
|
139
|
-
return new ɵRuntimeError(3403 /* RuntimeErrorCode.TRIGGER_PARSING_FAILED */, ngDevMode &&
|
140
|
-
`Animation parsing for the ${name} trigger have failed:${LINE_START}${errors
|
141
|
-
.map((err) => err.message)
|
142
|
-
.join(LINE_START)}`);
|
143
|
-
}
|
144
134
|
function transitionFailed(name, errors) {
|
145
|
-
return new
|
135
|
+
return new _RuntimeError(3505 /* RuntimeErrorCode.TRANSITION_FAILED */, ngDevMode && `@${name} has failed due to:\n ${errors.map((err) => err.message).join('\n- ')}`);
|
146
136
|
}
|
147
137
|
|
148
138
|
/**
|
@@ -359,7 +349,7 @@ function optimizeGroupPlayer(players) {
|
|
359
349
|
case 1:
|
360
350
|
return players[0];
|
361
351
|
default:
|
362
|
-
return new
|
352
|
+
return new _AnimationGroupPlayer(players);
|
363
353
|
}
|
364
354
|
}
|
365
355
|
function normalizeKeyframes$1(normalizer, keyframes, preStyles = new Map(), postStyles = new Map()) {
|
@@ -377,7 +367,7 @@ function normalizeKeyframes$1(normalizer, keyframes, preStyles = new Map(), post
|
|
377
367
|
if (prop !== 'offset') {
|
378
368
|
normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);
|
379
369
|
switch (normalizedValue) {
|
380
|
-
case
|
370
|
+
case _PRE_STYLE:
|
381
371
|
normalizedValue = preStyles.get(prop);
|
382
372
|
break;
|
383
373
|
case AUTO_STYLE:
|
@@ -495,14 +485,6 @@ function invokeQuery(element, selector, multi) {
|
|
495
485
|
const elem = element.querySelector(selector);
|
496
486
|
return elem ? [elem] : [];
|
497
487
|
}
|
498
|
-
function hypenatePropsKeys(original) {
|
499
|
-
const newMap = new Map();
|
500
|
-
original.forEach((val, prop) => {
|
501
|
-
const newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');
|
502
|
-
newMap.set(newProp, val);
|
503
|
-
});
|
504
|
-
return newMap;
|
505
|
-
}
|
506
488
|
|
507
489
|
/**
|
508
490
|
* @publicApi
|
@@ -548,10 +530,10 @@ class NoopAnimationDriver {
|
|
548
530
|
animate(element, keyframes, duration, delay, easing, previousPlayers = [], scrubberAccessRequested) {
|
549
531
|
return new NoopAnimationPlayer(duration, delay);
|
550
532
|
}
|
551
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
552
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
533
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
534
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NoopAnimationDriver });
|
553
535
|
}
|
554
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NoopAnimationDriver, decorators: [{
|
555
537
|
type: Injectable
|
556
538
|
}] });
|
557
539
|
/**
|
@@ -852,9 +834,6 @@ function warnTriggerBuild(name, warnings) {
|
|
852
834
|
function warnRegister(warnings) {
|
853
835
|
console.warn(`Animation built with the following warnings:${createListOfWarnings(warnings)}`);
|
854
836
|
}
|
855
|
-
function triggerParsingWarnings(name, warnings) {
|
856
|
-
console.warn(`Animation parsing for the ${name} trigger presents the following warnings:${createListOfWarnings(warnings)}`);
|
857
|
-
}
|
858
837
|
function pushUnrecognizedPropertiesWarning(warnings, props) {
|
859
838
|
if (props.length) {
|
860
839
|
warnings.push(`The following provided properties are not recognized: ${props.join(', ')}`);
|
@@ -2148,7 +2127,7 @@ class TimelineBuilder {
|
|
2148
2127
|
this._keyframes.forEach((keyframe, time) => {
|
2149
2128
|
const finalKeyframe = new Map([...this._backFill, ...keyframe]);
|
2150
2129
|
finalKeyframe.forEach((value, prop) => {
|
2151
|
-
if (value ===
|
2130
|
+
if (value === _PRE_STYLE) {
|
2152
2131
|
preStyleProps.add(prop);
|
2153
2132
|
}
|
2154
2133
|
else if (value === AUTO_STYLE) {
|
@@ -2455,7 +2434,7 @@ class AnimationTrigger {
|
|
2455
2434
|
ast.transitions.forEach((ast) => {
|
2456
2435
|
this.transitionFactories.push(new AnimationTransitionFactory(name, ast, this.states));
|
2457
2436
|
});
|
2458
|
-
this.fallbackTransition = createFallbackTransition(name, this.states
|
2437
|
+
this.fallbackTransition = createFallbackTransition(name, this.states);
|
2459
2438
|
}
|
2460
2439
|
get containsQueries() {
|
2461
2440
|
return this.ast.queryCount > 0;
|
@@ -3608,7 +3587,7 @@ class TransitionAnimationEngine {
|
|
3608
3587
|
// PRE STAGE: fill the ! styles
|
3609
3588
|
const preStylesMap = new Map();
|
3610
3589
|
enterNodeMap.forEach((nodes, root) => {
|
3611
|
-
cloakAndComputeStyles(preStylesMap, this.driver, new Set(nodes), allPreStyleElements,
|
3590
|
+
cloakAndComputeStyles(preStylesMap, this.driver, new Set(nodes), allPreStyleElements, _PRE_STYLE);
|
3612
3591
|
});
|
3613
3592
|
replaceNodes.forEach((node) => {
|
3614
3593
|
const post = postStylesMap.get(node);
|
@@ -4104,7 +4083,7 @@ function flattenGroupPlayers(players) {
|
|
4104
4083
|
function _flattenGroupPlayersRecur(players, finalPlayers) {
|
4105
4084
|
for (let i = 0; i < players.length; i++) {
|
4106
4085
|
const player = players[i];
|
4107
|
-
if (player instanceof
|
4086
|
+
if (player instanceof _AnimationGroupPlayer) {
|
4108
4087
|
_flattenGroupPlayersRecur(player.players, finalPlayers);
|
4109
4088
|
}
|
4110
4089
|
else {
|
@@ -4872,23 +4851,5 @@ class AnimationRendererFactory {
|
|
4872
4851
|
}
|
4873
4852
|
}
|
4874
4853
|
|
4875
|
-
/**
|
4876
|
-
* @module
|
4877
|
-
* @description
|
4878
|
-
* Entry point for all animation APIs of the animation browser package.
|
4879
|
-
*/
|
4880
|
-
|
4881
|
-
/**
|
4882
|
-
* @module
|
4883
|
-
* @description
|
4884
|
-
* Entry point for all public APIs of this package.
|
4885
|
-
*/
|
4886
|
-
|
4887
|
-
// This file is not used to build this module. It is only used during editing
|
4888
|
-
|
4889
|
-
/**
|
4890
|
-
* Generated bundle index. Do not edit.
|
4891
|
-
*/
|
4892
|
-
|
4893
4854
|
export { AnimationDriver, NoopAnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationRenderer as ɵAnimationRenderer, AnimationRendererFactory as ɵAnimationRendererFactory, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, BaseAnimationRenderer as ɵBaseAnimationRenderer, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, camelCaseToDashCase as ɵcamelCaseToDashCase, containsElement as ɵcontainsElement, createEngine as ɵcreateEngine, getParentElement as ɵgetParentElement, invokeQuery as ɵinvokeQuery, normalizeKeyframes as ɵnormalizeKeyframes, validateStyleProperty as ɵvalidateStyleProperty, validateWebAnimatableStyleProperty as ɵvalidateWebAnimatableStyleProperty };
|
4894
4855
|
//# sourceMappingURL=browser.mjs.map
|