@angular/platform-browser 21.0.0-next.1 → 21.0.0-next.10
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/_browser-chunk.mjs +424 -0
- package/fesm2022/_browser-chunk.mjs.map +1 -0
- package/fesm2022/_dom_renderer-chunk.mjs +796 -0
- package/fesm2022/_dom_renderer-chunk.mjs.map +1 -0
- package/fesm2022/animations-async.mjs +237 -0
- package/fesm2022/animations-async.mjs.map +1 -0
- package/fesm2022/animations.mjs +159 -173
- package/fesm2022/animations.mjs.map +1 -1
- package/fesm2022/platform-browser.mjs +619 -915
- package/fesm2022/platform-browser.mjs.map +1 -1
- package/fesm2022/testing.mjs +107 -75
- package/fesm2022/testing.mjs.map +1 -1
- package/package.json +10 -10
- package/{browser.d.d.ts → types/_browser-chunk.d.ts} +16 -11
- package/{animations/async/index.d.ts → types/animations-async.d.ts} +2 -2
- package/{animations/index.d.ts → types/animations.d.ts} +3 -3
- package/{index.d.ts → types/platform-browser.d.ts} +36 -30
- package/{testing/index.d.ts → types/testing.d.ts} +3 -3
- package/fesm2022/animations/async.mjs +0 -302
- package/fesm2022/animations/async.mjs.map +0 -1
- package/fesm2022/browser.mjs +0 -560
- package/fesm2022/browser.mjs.map +0 -1
- package/fesm2022/dom_renderer.mjs +0 -837
- package/fesm2022/dom_renderer.mjs.map +0 -1
package/fesm2022/animations.mjs
CHANGED
|
@@ -1,199 +1,185 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0-next.
|
|
3
|
-
* (c) 2010-2025 Google LLC. https://angular.
|
|
2
|
+
* @license Angular v21.0.0-next.10
|
|
3
|
+
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { Injectable, Inject, ANIMATION_MODULE_TYPE, RendererFactory2, NgZone, NgModule, ɵperformanceMarkFeature as _performanceMarkFeature } from '@angular/core';
|
|
8
|
+
import { Injectable, Inject, ANIMATION_MODULE_TYPE, RendererFactory2, inject, NgZone, NgModule, ɵperformanceMarkFeature as _performanceMarkFeature } from '@angular/core';
|
|
9
9
|
export { ANIMATION_MODULE_TYPE } from '@angular/core';
|
|
10
10
|
import * as i1 from '@angular/animations/browser';
|
|
11
11
|
import { ɵAnimationEngine as _AnimationEngine, AnimationDriver, NoopAnimationDriver, ɵWebAnimationsDriver as _WebAnimationsDriver, ɵAnimationStyleNormalizer as _AnimationStyleNormalizer, ɵWebAnimationsStyleNormalizer as _WebAnimationsStyleNormalizer, ɵAnimationRendererFactory as _AnimationRendererFactory } from '@angular/animations/browser';
|
|
12
12
|
import { DOCUMENT } from '@angular/common';
|
|
13
|
-
import { DomRendererFactory2 } from './
|
|
14
|
-
import { BrowserModule } from './
|
|
13
|
+
import { DomRendererFactory2 } from './_dom_renderer-chunk.mjs';
|
|
14
|
+
import { BrowserModule } from './_browser-chunk.mjs';
|
|
15
15
|
|
|
16
16
|
class InjectableAnimationEngine extends _AnimationEngine {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
constructor(doc, driver, normalizer) {
|
|
18
|
+
super(doc, driver, normalizer);
|
|
19
|
+
}
|
|
20
|
+
ngOnDestroy() {
|
|
21
|
+
this.flush();
|
|
22
|
+
}
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
24
|
+
minVersion: "12.0.0",
|
|
25
|
+
version: "21.0.0-next.10",
|
|
26
|
+
ngImport: i0,
|
|
27
|
+
type: InjectableAnimationEngine,
|
|
28
|
+
deps: [{
|
|
29
|
+
token: DOCUMENT
|
|
30
|
+
}, {
|
|
31
|
+
token: i1.AnimationDriver
|
|
32
|
+
}, {
|
|
33
|
+
token: i1.ɵAnimationStyleNormalizer
|
|
34
|
+
}],
|
|
35
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
36
|
+
});
|
|
37
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
38
|
+
minVersion: "12.0.0",
|
|
39
|
+
version: "21.0.0-next.10",
|
|
40
|
+
ngImport: i0,
|
|
41
|
+
type: InjectableAnimationEngine
|
|
42
|
+
});
|
|
28
43
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
45
|
+
minVersion: "12.0.0",
|
|
46
|
+
version: "21.0.0-next.10",
|
|
47
|
+
ngImport: i0,
|
|
48
|
+
type: InjectableAnimationEngine,
|
|
49
|
+
decorators: [{
|
|
50
|
+
type: Injectable
|
|
51
|
+
}],
|
|
52
|
+
ctorParameters: () => [{
|
|
53
|
+
type: Document,
|
|
54
|
+
decorators: [{
|
|
55
|
+
type: Inject,
|
|
56
|
+
args: [DOCUMENT]
|
|
57
|
+
}]
|
|
58
|
+
}, {
|
|
59
|
+
type: i1.AnimationDriver
|
|
60
|
+
}, {
|
|
61
|
+
type: i1.ɵAnimationStyleNormalizer
|
|
62
|
+
}]
|
|
63
|
+
});
|
|
35
64
|
function instantiateDefaultStyleNormalizer() {
|
|
36
|
-
|
|
65
|
+
return new _WebAnimationsStyleNormalizer();
|
|
37
66
|
}
|
|
38
|
-
function instantiateRendererFactory(
|
|
39
|
-
|
|
67
|
+
function instantiateRendererFactory() {
|
|
68
|
+
return new _AnimationRendererFactory(inject(DomRendererFactory2), inject(_AnimationEngine), inject(NgZone));
|
|
40
69
|
}
|
|
41
|
-
const SHARED_ANIMATION_PROVIDERS = [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
{
|
|
66
|
-
provide: AnimationDriver,
|
|
67
|
-
useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode
|
|
68
|
-
? new NoopAnimationDriver()
|
|
69
|
-
: new _WebAnimationsDriver(),
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
provide: ANIMATION_MODULE_TYPE,
|
|
73
|
-
useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode ? 'NoopAnimations' : 'BrowserAnimations',
|
|
74
|
-
},
|
|
75
|
-
...SHARED_ANIMATION_PROVIDERS,
|
|
76
|
-
];
|
|
70
|
+
const SHARED_ANIMATION_PROVIDERS = [{
|
|
71
|
+
provide: _AnimationStyleNormalizer,
|
|
72
|
+
useFactory: instantiateDefaultStyleNormalizer
|
|
73
|
+
}, {
|
|
74
|
+
provide: _AnimationEngine,
|
|
75
|
+
useClass: InjectableAnimationEngine
|
|
76
|
+
}, {
|
|
77
|
+
provide: RendererFactory2,
|
|
78
|
+
useFactory: instantiateRendererFactory
|
|
79
|
+
}];
|
|
80
|
+
const BROWSER_NOOP_ANIMATIONS_PROVIDERS = [{
|
|
81
|
+
provide: AnimationDriver,
|
|
82
|
+
useClass: NoopAnimationDriver
|
|
83
|
+
}, {
|
|
84
|
+
provide: ANIMATION_MODULE_TYPE,
|
|
85
|
+
useValue: 'NoopAnimations'
|
|
86
|
+
}, ...SHARED_ANIMATION_PROVIDERS];
|
|
87
|
+
const BROWSER_ANIMATIONS_PROVIDERS = [{
|
|
88
|
+
provide: AnimationDriver,
|
|
89
|
+
useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode ? new NoopAnimationDriver() : new _WebAnimationsDriver()
|
|
90
|
+
}, {
|
|
91
|
+
provide: ANIMATION_MODULE_TYPE,
|
|
92
|
+
useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode ? 'NoopAnimations' : 'BrowserAnimations'
|
|
93
|
+
}, ...SHARED_ANIMATION_PROVIDERS];
|
|
77
94
|
|
|
78
|
-
/**
|
|
79
|
-
* Exports `BrowserModule` with additional dependency-injection providers
|
|
80
|
-
* for use with animations. See [Animations](guide/animations).
|
|
81
|
-
* @publicApi
|
|
82
|
-
*
|
|
83
|
-
* @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23
|
|
84
|
-
*/
|
|
85
95
|
class BrowserAnimationsModule {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
96
|
+
static withConfig(config) {
|
|
97
|
+
return {
|
|
98
|
+
ngModule: BrowserAnimationsModule,
|
|
99
|
+
providers: config.disableAnimations ? BROWSER_NOOP_ANIMATIONS_PROVIDERS : BROWSER_ANIMATIONS_PROVIDERS
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
103
|
+
minVersion: "12.0.0",
|
|
104
|
+
version: "21.0.0-next.10",
|
|
105
|
+
ngImport: i0,
|
|
106
|
+
type: BrowserAnimationsModule,
|
|
107
|
+
deps: [],
|
|
108
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
109
|
+
});
|
|
110
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
111
|
+
minVersion: "14.0.0",
|
|
112
|
+
version: "21.0.0-next.10",
|
|
113
|
+
ngImport: i0,
|
|
114
|
+
type: BrowserAnimationsModule,
|
|
115
|
+
exports: [BrowserModule]
|
|
116
|
+
});
|
|
117
|
+
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
118
|
+
minVersion: "12.0.0",
|
|
119
|
+
version: "21.0.0-next.10",
|
|
120
|
+
ngImport: i0,
|
|
121
|
+
type: BrowserAnimationsModule,
|
|
122
|
+
providers: BROWSER_ANIMATIONS_PROVIDERS,
|
|
123
|
+
imports: [BrowserModule]
|
|
124
|
+
});
|
|
113
125
|
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
*
|
|
128
|
-
* The function is useful when you want to enable animations in an application
|
|
129
|
-
* bootstrapped using the `bootstrapApplication` function. In this scenario there
|
|
130
|
-
* is no need to import the `BrowserAnimationsModule` NgModule at all, just add
|
|
131
|
-
* providers returned by this function to the `providers` list as show below.
|
|
132
|
-
*
|
|
133
|
-
* ```ts
|
|
134
|
-
* bootstrapApplication(RootComponent, {
|
|
135
|
-
* providers: [
|
|
136
|
-
* provideAnimations()
|
|
137
|
-
* ]
|
|
138
|
-
* });
|
|
139
|
-
* ```
|
|
140
|
-
*
|
|
141
|
-
* @publicApi
|
|
142
|
-
*
|
|
143
|
-
* @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23
|
|
144
|
-
*
|
|
145
|
-
*/
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
127
|
+
minVersion: "12.0.0",
|
|
128
|
+
version: "21.0.0-next.10",
|
|
129
|
+
ngImport: i0,
|
|
130
|
+
type: BrowserAnimationsModule,
|
|
131
|
+
decorators: [{
|
|
132
|
+
type: NgModule,
|
|
133
|
+
args: [{
|
|
134
|
+
exports: [BrowserModule],
|
|
135
|
+
providers: BROWSER_ANIMATIONS_PROVIDERS
|
|
136
|
+
}]
|
|
137
|
+
}]
|
|
138
|
+
});
|
|
146
139
|
function provideAnimations() {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
// alterations are performed to the `provideAnimations` call results in app code.
|
|
150
|
-
return [...BROWSER_ANIMATIONS_PROVIDERS];
|
|
140
|
+
_performanceMarkFeature('NgEagerAnimations');
|
|
141
|
+
return [...BROWSER_ANIMATIONS_PROVIDERS];
|
|
151
142
|
}
|
|
152
|
-
/**
|
|
153
|
-
* A null player that must be imported to allow disabling of animations.
|
|
154
|
-
* @publicApi
|
|
155
|
-
*
|
|
156
|
-
* @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23
|
|
157
|
-
*/
|
|
158
143
|
class NoopAnimationsModule {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
144
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
145
|
+
minVersion: "12.0.0",
|
|
146
|
+
version: "21.0.0-next.10",
|
|
147
|
+
ngImport: i0,
|
|
148
|
+
type: NoopAnimationsModule,
|
|
149
|
+
deps: [],
|
|
150
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
151
|
+
});
|
|
152
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
153
|
+
minVersion: "14.0.0",
|
|
154
|
+
version: "21.0.0-next.10",
|
|
155
|
+
ngImport: i0,
|
|
156
|
+
type: NoopAnimationsModule,
|
|
157
|
+
exports: [BrowserModule]
|
|
158
|
+
});
|
|
159
|
+
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
160
|
+
minVersion: "12.0.0",
|
|
161
|
+
version: "21.0.0-next.10",
|
|
162
|
+
ngImport: i0,
|
|
163
|
+
type: NoopAnimationsModule,
|
|
164
|
+
providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,
|
|
165
|
+
imports: [BrowserModule]
|
|
166
|
+
});
|
|
162
167
|
}
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
*
|
|
177
|
-
* The function is useful when you want to bootstrap an application using
|
|
178
|
-
* the `bootstrapApplication` function, but you need to disable animations
|
|
179
|
-
* (for example, when running tests).
|
|
180
|
-
*
|
|
181
|
-
* ```ts
|
|
182
|
-
* bootstrapApplication(RootComponent, {
|
|
183
|
-
* providers: [
|
|
184
|
-
* provideNoopAnimations()
|
|
185
|
-
* ]
|
|
186
|
-
* });
|
|
187
|
-
* ```
|
|
188
|
-
*
|
|
189
|
-
* @publicApi
|
|
190
|
-
*
|
|
191
|
-
* @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23
|
|
192
|
-
*/
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
169
|
+
minVersion: "12.0.0",
|
|
170
|
+
version: "21.0.0-next.10",
|
|
171
|
+
ngImport: i0,
|
|
172
|
+
type: NoopAnimationsModule,
|
|
173
|
+
decorators: [{
|
|
174
|
+
type: NgModule,
|
|
175
|
+
args: [{
|
|
176
|
+
exports: [BrowserModule],
|
|
177
|
+
providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS
|
|
178
|
+
}]
|
|
179
|
+
}]
|
|
180
|
+
});
|
|
193
181
|
function provideNoopAnimations() {
|
|
194
|
-
|
|
195
|
-
// alterations are performed to the `provideNoopAnimations` call results in app code.
|
|
196
|
-
return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];
|
|
182
|
+
return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];
|
|
197
183
|
}
|
|
198
184
|
|
|
199
185
|
export { BrowserAnimationsModule, NoopAnimationsModule, provideAnimations, provideNoopAnimations, InjectableAnimationEngine as ɵInjectableAnimationEngine };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animations.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/animations/src/providers.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/animations/src/module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n AnimationDriver,\n NoopAnimationDriver,\n ɵAnimationEngine as AnimationEngine,\n ɵAnimationRendererFactory as AnimationRendererFactory,\n ɵAnimationStyleNormalizer as AnimationStyleNormalizer,\n ɵWebAnimationsDriver as WebAnimationsDriver,\n ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer,\n} from '@angular/animations/browser';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ANIMATION_MODULE_TYPE,\n inject,\n Inject,\n Injectable,\n NgZone,\n OnDestroy,\n Provider,\n RendererFactory2,\n ɵChangeDetectionScheduler as ChangeDetectionScheduler,\n} from '@angular/core';\nimport {ɵDomRendererFactory2 as DomRendererFactory2} from '../../index';\n\n@Injectable()\nexport class InjectableAnimationEngine extends AnimationEngine implements OnDestroy {\n // The `ApplicationRef` is injected here explicitly to force the dependency ordering.\n // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they\n // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.\n constructor(\n @Inject(DOCUMENT) doc: Document,\n driver: AnimationDriver,\n normalizer: AnimationStyleNormalizer,\n ) {\n super(doc, driver, normalizer);\n }\n\n ngOnDestroy(): void {\n this.flush();\n }\n}\n\nexport function instantiateDefaultStyleNormalizer() {\n return new WebAnimationsStyleNormalizer();\n}\n\nexport function instantiateRendererFactory(\n renderer: DomRendererFactory2,\n engine: AnimationEngine,\n zone: NgZone,\n) {\n return new AnimationRendererFactory(renderer, engine, zone);\n}\n\nconst SHARED_ANIMATION_PROVIDERS: Provider[] = [\n {provide: AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer},\n {provide: AnimationEngine, useClass: InjectableAnimationEngine},\n {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n deps: [DomRendererFactory2, AnimationEngine, NgZone],\n },\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nexport const BROWSER_NOOP_ANIMATIONS_PROVIDERS: Provider[] = [\n {provide: AnimationDriver, useClass: NoopAnimationDriver},\n {provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations'},\n ...SHARED_ANIMATION_PROVIDERS,\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nexport const BROWSER_ANIMATIONS_PROVIDERS: Provider[] = [\n // Note: the `ngServerMode` happen inside factories to give the variable time to initialize.\n {\n provide: AnimationDriver,\n useFactory: () =>\n typeof ngServerMode !== 'undefined' && ngServerMode\n ? new NoopAnimationDriver()\n : new WebAnimationsDriver(),\n },\n {\n provide: ANIMATION_MODULE_TYPE,\n useFactory: () =>\n typeof ngServerMode !== 'undefined' && ngServerMode ? 'NoopAnimations' : 'BrowserAnimations',\n },\n ...SHARED_ANIMATION_PROVIDERS,\n];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {\n ModuleWithProviders,\n NgModule,\n Provider,\n ɵperformanceMarkFeature as performanceMarkFeature,\n} from '@angular/core';\nimport {BrowserModule} from '../../index';\n\nimport {BROWSER_ANIMATIONS_PROVIDERS, BROWSER_NOOP_ANIMATIONS_PROVIDERS} from './providers';\n\n/**\n * Object used to configure the behavior of {@link BrowserAnimationsModule}\n * @publicApi\n *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\n */\nexport interface BrowserAnimationsModuleConfig {\n /**\n * Whether animations should be disabled. Passing this is identical to providing the\n * `NoopAnimationsModule`, but it can be controlled based on a runtime value.\n */\n disableAnimations?: boolean;\n}\n\n/**\n * Exports `BrowserModule` with additional dependency-injection providers\n * for use with animations. See [Animations](guide/animations).\n * @publicApi\n *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\n */\n@NgModule({\n exports: [BrowserModule],\n providers: BROWSER_ANIMATIONS_PROVIDERS,\n})\nexport class BrowserAnimationsModule {\n /**\n * Configures the module based on the specified object.\n *\n * @param config Object used to configure the behavior of the `BrowserAnimationsModule`.\n * @see {@link BrowserAnimationsModuleConfig}\n *\n * @usageNotes\n * When registering the `BrowserAnimationsModule`, you can use the `withConfig`\n * function as follows:\n * ```ts\n * @NgModule({\n * imports: [BrowserAnimationsModule.withConfig(config)]\n * })\n * class MyNgModule {}\n * ```\n */\n static withConfig(\n config: BrowserAnimationsModuleConfig,\n ): ModuleWithProviders<BrowserAnimationsModule> {\n return {\n ngModule: BrowserAnimationsModule,\n providers: config.disableAnimations\n ? BROWSER_NOOP_ANIMATIONS_PROVIDERS\n : BROWSER_ANIMATIONS_PROVIDERS,\n };\n }\n}\n\n/**\n * Returns the set of dependency-injection providers\n * to enable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to enable animations in an application\n * bootstrapped using the `bootstrapApplication` function. In this scenario there\n * is no need to import the `BrowserAnimationsModule` NgModule at all, just add\n * providers returned by this function to the `providers` list as show below.\n *\n * ```ts\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\n *\n */\nexport function provideAnimations(): Provider[] {\n performanceMarkFeature('NgEagerAnimations');\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideAnimations` call results in app code.\n return [...BROWSER_ANIMATIONS_PROVIDERS];\n}\n\n/**\n * A null player that must be imported to allow disabling of animations.\n * @publicApi\n *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\n */\n@NgModule({\n exports: [BrowserModule],\n providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,\n})\nexport class NoopAnimationsModule {}\n\n/**\n * Returns the set of dependency-injection providers\n * to disable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to bootstrap an application using\n * the `bootstrapApplication` function, but you need to disable animations\n * (for example, when running tests).\n *\n * ```ts\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideNoopAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\n */\nexport function provideNoopAnimations(): Provider[] {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideNoopAnimations` call results in app code.\n return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];\n}\n"],"names":["AnimationEngine","WebAnimationsStyleNormalizer","AnimationRendererFactory","AnimationStyleNormalizer","WebAnimationsDriver","performanceMarkFeature"],"mappings":";;;;;;;;;;;;;;;AAgCM,MAAO,yBAA0B,SAAQA,gBAAe,CAAA;;;;AAI5D,IAAA,WAAA,CACoB,GAAa,EAC/B,MAAuB,EACvB,UAAoC,EAAA;AAEpC,QAAA,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC;;IAGhC,WAAW,GAAA;QACT,IAAI,CAAC,KAAK,EAAE;;AAbH,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,kBAK1B,QAAQ,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,eAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,yBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAA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oB,YAHrB,aAAa,CAAA,EAAA,CAAA;+GAGZ,oBAAoB,EAAA,SAAA,EAFpB,iCAAiC,EAAA,OAAA,EAAA,CADlC,aAAa,CAAA,EAAA,CAAA;;kGAGZ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;AACxB,oBAAA,SAAS,EAAE,iCAAiC;AAC7C,iBAAA;;AAGD;;;;;;;;;;;;;;;;;;;;;;AAsBG;SACa,qBAAqB,GAAA;;;AAGnC,IAAA,OAAO,CAAC,GAAG,iCAAiC,CAAC;AAC/C;;;;"}
|
|
1
|
+
{"version":3,"file":"animations.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/animations/src/providers.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n AnimationDriver,\n NoopAnimationDriver,\n ɵAnimationEngine as AnimationEngine,\n ɵAnimationRendererFactory as AnimationRendererFactory,\n ɵAnimationStyleNormalizer as AnimationStyleNormalizer,\n ɵWebAnimationsDriver as WebAnimationsDriver,\n ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer,\n} from '@angular/animations/browser';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ANIMATION_MODULE_TYPE,\n inject,\n Inject,\n Injectable,\n NgZone,\n OnDestroy,\n Provider,\n RendererFactory2,\n} from '@angular/core';\nimport {ɵDomRendererFactory2 as DomRendererFactory2} from '../../index';\n\n@Injectable()\nexport class InjectableAnimationEngine extends AnimationEngine implements OnDestroy {\n // The `ApplicationRef` is injected here explicitly to force the dependency ordering.\n // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they\n // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.\n constructor(\n @Inject(DOCUMENT) doc: Document,\n driver: AnimationDriver,\n normalizer: AnimationStyleNormalizer,\n ) {\n super(doc, driver, normalizer);\n }\n\n ngOnDestroy(): void {\n this.flush();\n }\n}\n\nexport function instantiateDefaultStyleNormalizer() {\n return new WebAnimationsStyleNormalizer();\n}\n\nexport function instantiateRendererFactory() {\n return new AnimationRendererFactory(\n inject(DomRendererFactory2),\n inject(AnimationEngine),\n inject(NgZone),\n );\n}\n\nconst SHARED_ANIMATION_PROVIDERS: Provider[] = [\n {provide: AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer},\n {provide: AnimationEngine, useClass: InjectableAnimationEngine},\n {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n },\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nexport const BROWSER_NOOP_ANIMATIONS_PROVIDERS: Provider[] = [\n {provide: AnimationDriver, useClass: NoopAnimationDriver},\n {provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations'},\n ...SHARED_ANIMATION_PROVIDERS,\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nexport const BROWSER_ANIMATIONS_PROVIDERS: Provider[] = [\n // Note: the `ngServerMode` happen inside factories to give the variable time to initialize.\n {\n provide: AnimationDriver,\n useFactory: () =>\n typeof ngServerMode !== 'undefined' && ngServerMode\n ? new NoopAnimationDriver()\n : new WebAnimationsDriver(),\n },\n {\n provide: ANIMATION_MODULE_TYPE,\n useFactory: () =>\n typeof ngServerMode !== 'undefined' && ngServerMode ? 'NoopAnimations' : 'BrowserAnimations',\n },\n ...SHARED_ANIMATION_PROVIDERS,\n];\n"],"names":["InjectableAnimationEngine","AnimationEngine","constructor","normalizer","ngOnDestroy","flush","ɵfac","i0","ɵɵngDeclareFactory","minVersion","version","ngImport","type","deps","token","DOCUMENT","i1","AnimationDriver","ɵAnimationStyleNormalizer","target","ɵɵFactoryTarget","Injectable","ɵprov","ɵɵngDeclareInjectable","ctorParameters","Document","decorators","Inject","inject","DomRendererFactory2","NgZone","provide","AnimationStyleNormalizer","useFactory","instantiateDefaultStyleNormalizer","RendererFactory2","instantiateRendererFactory","BROWSER_NOOP_ANIMATIONS_PROVIDERS"],"mappings":";;;;;;;;;;;;;;;AA+BM,MAAAA,yBAAA,SAAAC,gBAAA,CAAA;AAqBNC,EAAAA,yBAA0CC,UAAA,EAAA;;;AAQ1CC,EAAAA;AACE,IAAA,IAAA,CAAAC,KAAA,EAAA;AACA;AACA,EAAA,OAAAC,IAAA,GAAAC,EAAA,CAAAC,kBAAA,CAAA;IAAAC,UAAA,EAAA,QAAA;IAAAC,OAAA,EAAA,mBAAA;AAAAC,IAAAA,QAAA,EAAAJ,EAAA;AAAAK,IAAAA,IAAA,EAAAZ,yBAAA;IAAAa,IAAA,EAAA,CAAA;AAAAC,MAAAA,KAAA,EAAAC;AAAA,KAAA,EAAA;MAAAD,KAAA,EAAAE,EAAA,CAAAC;AAAA,KAAA,EAAA;MAAAH,KAAA,EAAAE,EAAA,CAAAE;AAAA,KAAA,CAAA;AAAAC,IAAAA,MAAA,EAAAZ,EAAA,CAAAa,eAAA,CAAAC;AAAA,GAAA,CAAA;AACE,EAAA,OAAAC,KACsC,GAAAf,EACvC,CAAAgB,qBACF,CAAA;IAAAd,UAAA,EAAA,QAAA;IAAAC,OAAA,EAAA,mBAAA;AAAAC,IAAAA,QAAA,EAAAJ,EAAA;AAAAK,IAAAA,IAAA,EAAAZ;AAAA,GAAA,CAAA;;;;;;;;AAMKY,IAAAA,IAAO,EAAAS;AACX,GAAA,CAAA;gBAAU,EAAAG,MAAA,CAAA;AAAAZ,IAAAA,IAAA,EAAAa,QAAA;IAAAC,UAAA,EAAA,CAAA;AACVd,MAAAA,IAAA,EAAAe,MAAA;;;;;;;;;;;;;sCAVE,CAAAC,MAAA,CAAAC,mBAAA,CAAAD,EAAAA,MAAA,CAAA3B,gBAAA,CAAA,EAAA2B,MAAA,CAAAE,MAAA,C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