@angular/platform-browser 20.0.0-next.0 → 20.0.0-next.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/animations/async/index.d.ts +17 -26
- package/animations/index.d.ts +33 -44
- package/fesm2022/animations/async.mjs +11 -29
- package/fesm2022/animations/async.mjs.map +1 -1
- package/fesm2022/animations.mjs +24 -42
- package/fesm2022/animations.mjs.map +1 -1
- package/fesm2022/platform-browser.mjs +128 -132
- package/fesm2022/platform-browser.mjs.map +1 -1
- package/fesm2022/testing.mjs +13 -27
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +556 -602
- package/package.json +4 -4
- package/testing/index.d.ts +11 -14
@@ -1,20 +1,12 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v20.0.0-next.
|
3
|
-
* (c) 2010-
|
2
|
+
* @license Angular v20.0.0-next.2
|
3
|
+
* (c) 2010-2025 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
6
6
|
|
7
|
-
|
8
|
-
import { EnvironmentProviders } from '@angular/core';
|
9
7
|
import * as i0 from '@angular/core';
|
10
|
-
import { InjectionToken } from '@angular/core';
|
11
|
-
import {
|
12
|
-
import { OnDestroy } from '@angular/core';
|
13
|
-
import { Renderer2 } from '@angular/core';
|
14
|
-
import { RendererFactory2 } from '@angular/core';
|
15
|
-
import { RendererType2 } from '@angular/core';
|
16
|
-
import { ɵAnimationEngine } from '@angular/animations/browser';
|
17
|
-
import { ɵAnimationRendererFactory } from '@angular/animations/browser';
|
8
|
+
import { EnvironmentProviders, OnDestroy, RendererFactory2, NgZone, RendererType2, Renderer2, InjectionToken } from '@angular/core';
|
9
|
+
import { ɵAnimationEngine as _AnimationEngine, ɵAnimationRendererFactory as _AnimationRendererFactory } from '@angular/animations/browser';
|
18
10
|
|
19
11
|
/**
|
20
12
|
* Returns the set of dependency-injection providers
|
@@ -43,16 +35,9 @@ import { ɵAnimationRendererFactory } from '@angular/animations/browser';
|
|
43
35
|
*
|
44
36
|
* @publicApi
|
45
37
|
*/
|
46
|
-
|
47
|
-
|
48
|
-
/**
|
49
|
-
* Provides a custom scheduler function for the async loading of the animation package.
|
50
|
-
*
|
51
|
-
* Private token for investigation purposes
|
52
|
-
*/
|
53
|
-
export declare const ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN: InjectionToken<(<T>(loadFn: () => T) => T)>;
|
38
|
+
declare function provideAnimationsAsync(type?: 'animations' | 'noop'): EnvironmentProviders;
|
54
39
|
|
55
|
-
|
40
|
+
declare class AsyncAnimationRendererFactory implements OnDestroy, RendererFactory2 {
|
56
41
|
private doc;
|
57
42
|
private delegate;
|
58
43
|
private zone;
|
@@ -68,8 +53,8 @@ export declare class ɵAsyncAnimationRendererFactory implements OnDestroy, Rende
|
|
68
53
|
* @param moduleImpl allows to provide a mock implmentation (or will load the animation module)
|
69
54
|
*/
|
70
55
|
constructor(doc: Document, delegate: RendererFactory2, zone: NgZone, animationType: 'animations' | 'noop', moduleImpl?: Promise<{
|
71
|
-
ɵcreateEngine: (type: "animations" | "noop", doc: Document) =>
|
72
|
-
ɵAnimationRendererFactory: typeof
|
56
|
+
ɵcreateEngine: (type: "animations" | "noop", doc: Document) => _AnimationEngine;
|
57
|
+
ɵAnimationRendererFactory: typeof _AnimationRendererFactory;
|
73
58
|
}> | undefined);
|
74
59
|
/** @nodoc */
|
75
60
|
ngOnDestroy(): void;
|
@@ -90,8 +75,14 @@ export declare class ɵAsyncAnimationRendererFactory implements OnDestroy, Rende
|
|
90
75
|
* @param componentId ID of the component that is being replaced.
|
91
76
|
*/
|
92
77
|
protected componentReplaced(componentId: string): void;
|
93
|
-
static ɵfac: i0.ɵɵFactoryDeclaration
|
94
|
-
static ɵprov: i0.ɵɵInjectableDeclaration
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AsyncAnimationRendererFactory, never>;
|
79
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AsyncAnimationRendererFactory>;
|
95
80
|
}
|
81
|
+
/**
|
82
|
+
* Provides a custom scheduler function for the async loading of the animation package.
|
83
|
+
*
|
84
|
+
* Private token for investigation purposes
|
85
|
+
*/
|
86
|
+
declare const ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN: InjectionToken<(<T>(loadFn: () => T) => T)>;
|
96
87
|
|
97
|
-
export { }
|
88
|
+
export { provideAnimationsAsync, ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN, AsyncAnimationRendererFactory as ɵAsyncAnimationRendererFactory };
|
package/animations/index.d.ts
CHANGED
@@ -1,28 +1,32 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v20.0.0-next.
|
3
|
-
* (c) 2010-
|
2
|
+
* @license Angular v20.0.0-next.2
|
3
|
+
* (c) 2010-2025 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
6
6
|
|
7
|
-
|
8
|
-
import { ANIMATION_MODULE_TYPE } from '@angular/core';
|
9
|
-
import { AnimationDriver } from '@angular/animations/browser';
|
10
7
|
import * as i0 from '@angular/core';
|
8
|
+
import { ModuleWithProviders, Provider, OnDestroy } from '@angular/core';
|
9
|
+
export { ANIMATION_MODULE_TYPE } from '@angular/core';
|
11
10
|
import * as i1 from '@angular/platform-browser';
|
12
|
-
import {
|
13
|
-
import { OnDestroy } from '@angular/core';
|
14
|
-
import { Provider } from '@angular/core';
|
15
|
-
import { ɵAnimationEngine } from '@angular/animations/browser';
|
16
|
-
import { ɵAnimationStyleNormalizer } from '@angular/animations/browser';
|
17
|
-
|
18
|
-
export { ANIMATION_MODULE_TYPE }
|
11
|
+
import { ɵAnimationEngine as _AnimationEngine, AnimationDriver, ɵAnimationStyleNormalizer as _AnimationStyleNormalizer } from '@angular/animations/browser';
|
19
12
|
|
13
|
+
/**
|
14
|
+
* Object used to configure the behavior of {@link BrowserAnimationsModule}
|
15
|
+
* @publicApi
|
16
|
+
*/
|
17
|
+
interface BrowserAnimationsModuleConfig {
|
18
|
+
/**
|
19
|
+
* Whether animations should be disabled. Passing this is identical to providing the
|
20
|
+
* `NoopAnimationsModule`, but it can be controlled based on a runtime value.
|
21
|
+
*/
|
22
|
+
disableAnimations?: boolean;
|
23
|
+
}
|
20
24
|
/**
|
21
25
|
* Exports `BrowserModule` with additional dependency-injection providers
|
22
26
|
* for use with animations. See [Animations](guide/animations).
|
23
27
|
* @publicApi
|
24
28
|
*/
|
25
|
-
|
29
|
+
declare class BrowserAnimationsModule {
|
26
30
|
/**
|
27
31
|
* Configures the module based on the specified object.
|
28
32
|
*
|
@@ -44,29 +48,6 @@ export declare class BrowserAnimationsModule {
|
|
44
48
|
static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserAnimationsModule, never, never, [typeof i1.BrowserModule]>;
|
45
49
|
static ɵinj: i0.ɵɵInjectorDeclaration<BrowserAnimationsModule>;
|
46
50
|
}
|
47
|
-
|
48
|
-
/**
|
49
|
-
* Object used to configure the behavior of {@link BrowserAnimationsModule}
|
50
|
-
* @publicApi
|
51
|
-
*/
|
52
|
-
export declare interface BrowserAnimationsModuleConfig {
|
53
|
-
/**
|
54
|
-
* Whether animations should be disabled. Passing this is identical to providing the
|
55
|
-
* `NoopAnimationsModule`, but it can be controlled based on a runtime value.
|
56
|
-
*/
|
57
|
-
disableAnimations?: boolean;
|
58
|
-
}
|
59
|
-
|
60
|
-
/**
|
61
|
-
* A null player that must be imported to allow disabling of animations.
|
62
|
-
* @publicApi
|
63
|
-
*/
|
64
|
-
export declare class NoopAnimationsModule {
|
65
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NoopAnimationsModule, never>;
|
66
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NoopAnimationsModule, never, never, [typeof i1.BrowserModule]>;
|
67
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NoopAnimationsModule>;
|
68
|
-
}
|
69
|
-
|
70
51
|
/**
|
71
52
|
* Returns the set of dependency-injection providers
|
72
53
|
* to enable animations in an application. See [animations guide](guide/animations)
|
@@ -89,8 +70,16 @@ export declare class NoopAnimationsModule {
|
|
89
70
|
*
|
90
71
|
* @publicApi
|
91
72
|
*/
|
92
|
-
|
93
|
-
|
73
|
+
declare function provideAnimations(): Provider[];
|
74
|
+
/**
|
75
|
+
* A null player that must be imported to allow disabling of animations.
|
76
|
+
* @publicApi
|
77
|
+
*/
|
78
|
+
declare class NoopAnimationsModule {
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NoopAnimationsModule, never>;
|
80
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NoopAnimationsModule, never, never, [typeof i1.BrowserModule]>;
|
81
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NoopAnimationsModule>;
|
82
|
+
}
|
94
83
|
/**
|
95
84
|
* Returns the set of dependency-injection providers
|
96
85
|
* to disable animations in an application. See [animations guide](guide/animations)
|
@@ -112,13 +101,13 @@ export declare function provideAnimations(): Provider[];
|
|
112
101
|
*
|
113
102
|
* @publicApi
|
114
103
|
*/
|
115
|
-
|
104
|
+
declare function provideNoopAnimations(): Provider[];
|
116
105
|
|
117
|
-
|
118
|
-
constructor(doc: Document, driver: AnimationDriver, normalizer:
|
106
|
+
declare class InjectableAnimationEngine extends _AnimationEngine implements OnDestroy {
|
107
|
+
constructor(doc: Document, driver: AnimationDriver, normalizer: _AnimationStyleNormalizer);
|
119
108
|
ngOnDestroy(): void;
|
120
|
-
static ɵfac: i0.ɵɵFactoryDeclaration
|
121
|
-
static ɵprov: i0.ɵɵInjectableDeclaration
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InjectableAnimationEngine, never>;
|
110
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InjectableAnimationEngine>;
|
122
111
|
}
|
123
112
|
|
124
|
-
export { }
|
113
|
+
export { BrowserAnimationsModule, type BrowserAnimationsModuleConfig, NoopAnimationsModule, provideAnimations, provideNoopAnimations, InjectableAnimationEngine as ɵInjectableAnimationEngine };
|
@@ -1,13 +1,13 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v20.0.0-next.
|
3
|
-
* (c) 2010-
|
2
|
+
* @license Angular v20.0.0-next.2
|
3
|
+
* (c) 2010-2025 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
6
6
|
|
7
7
|
import { DOCUMENT } from '@angular/common';
|
8
8
|
import * as i0 from '@angular/core';
|
9
|
-
import { inject, Injector, ɵRuntimeError, ɵChangeDetectionScheduler, Injectable,
|
10
|
-
import { ɵDomRendererFactory2 } from '@angular/platform-browser';
|
9
|
+
import { InjectionToken, inject, Injector, ɵRuntimeError as _RuntimeError, ɵChangeDetectionScheduler as _ChangeDetectionScheduler, Injectable, ɵperformanceMarkFeature as _performanceMarkFeature, makeEnvironmentProviders, NgZone, RendererFactory2, ANIMATION_MODULE_TYPE } from '@angular/core';
|
10
|
+
import { ɵDomRendererFactory2 as _DomRendererFactory2 } from '@angular/platform-browser';
|
11
11
|
|
12
12
|
const ANIMATION_PREFIX = '@';
|
13
13
|
class AsyncAnimationRendererFactory {
|
@@ -61,7 +61,7 @@ class AsyncAnimationRendererFactory {
|
|
61
61
|
}
|
62
62
|
return moduleImplPromise
|
63
63
|
.catch((e) => {
|
64
|
-
throw new
|
64
|
+
throw new _RuntimeError(5300 /* RuntimeErrorCode.ANIMATION_RENDERER_ASYNC_LOADING_FAILURE */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
|
65
65
|
'Async loading for animations package was ' +
|
66
66
|
'enabled, but loading failed. Angular falls back to using regular rendering. ' +
|
67
67
|
"No animations will be displayed and their styles won't be applied.");
|
@@ -104,7 +104,7 @@ class AsyncAnimationRendererFactory {
|
|
104
104
|
?.then((animationRendererFactory) => {
|
105
105
|
const animationRenderer = animationRendererFactory.createRenderer(hostElement, rendererType);
|
106
106
|
dynamicRenderer.use(animationRenderer);
|
107
|
-
this.scheduler ??= this.injector.get(
|
107
|
+
this.scheduler ??= this.injector.get(_ChangeDetectionScheduler, null, { optional: true });
|
108
108
|
this.scheduler?.notify(10 /* NotificationSource.AsyncAnimationsLoaded */);
|
109
109
|
})
|
110
110
|
.catch((e) => {
|
@@ -131,10 +131,10 @@ class AsyncAnimationRendererFactory {
|
|
131
131
|
this._engine?.flush();
|
132
132
|
this.delegate.componentReplaced?.(componentId);
|
133
133
|
}
|
134
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
135
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
134
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: AsyncAnimationRendererFactory, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
135
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: AsyncAnimationRendererFactory });
|
136
136
|
}
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: AsyncAnimationRendererFactory, decorators: [{
|
138
138
|
type: Injectable
|
139
139
|
}], ctorParameters: () => [{ type: Document }, { type: i0.RendererFactory2 }, { type: i0.NgZone }, { type: undefined }, { type: Promise }] });
|
140
140
|
/**
|
@@ -276,7 +276,7 @@ const ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN = new InjectionToken(ngDevMode ? 'a
|
|
276
276
|
* @publicApi
|
277
277
|
*/
|
278
278
|
function provideAnimationsAsync(type = 'animations') {
|
279
|
-
|
279
|
+
_performanceMarkFeature('NgAsyncAnimations');
|
280
280
|
// Animations don't work on the server so we switch them over to no-op automatically.
|
281
281
|
if (typeof ngServerMode !== 'undefined' && ngServerMode) {
|
282
282
|
type = 'noop';
|
@@ -287,7 +287,7 @@ function provideAnimationsAsync(type = 'animations') {
|
|
287
287
|
useFactory: (doc, renderer, zone) => {
|
288
288
|
return new AsyncAnimationRendererFactory(doc, renderer, zone, type);
|
289
289
|
},
|
290
|
-
deps: [DOCUMENT,
|
290
|
+
deps: [DOCUMENT, _DomRendererFactory2, NgZone],
|
291
291
|
},
|
292
292
|
{
|
293
293
|
provide: ANIMATION_MODULE_TYPE,
|
@@ -296,23 +296,5 @@ function provideAnimationsAsync(type = 'animations') {
|
|
296
296
|
]);
|
297
297
|
}
|
298
298
|
|
299
|
-
/**
|
300
|
-
* @module
|
301
|
-
* @description
|
302
|
-
* Entry point for all animation APIs of the animation browser package.
|
303
|
-
*/
|
304
|
-
|
305
|
-
/**
|
306
|
-
* @module
|
307
|
-
* @description
|
308
|
-
* Entry point for all public APIs of this package.
|
309
|
-
*/
|
310
|
-
|
311
|
-
// This file is not used to build this module. It is only used during editing
|
312
|
-
|
313
|
-
/**
|
314
|
-
* Generated bundle index. Do not edit.
|
315
|
-
*/
|
316
|
-
|
317
299
|
export { provideAnimationsAsync, ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN, AsyncAnimationRendererFactory as ɵAsyncAnimationRendererFactory };
|
318
300
|
//# sourceMappingURL=async.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"async.mjs","sources":["../../../../../../../packages/platform-browser/animations/async/src/async_animation_renderer.ts","../../../../../../../packages/platform-browser/animations/async/src/providers.ts","../../../../../../../packages/platform-browser/animations/async/src/async-animations.ts","../../../../../../../packages/platform-browser/animations/async/public_api.ts","../../../../../../../packages/platform-browser/animations/async/index.ts","../../../../../../../packages/platform-browser/animations/async/async.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 ɵAnimationEngine as AnimationEngine,\n ɵAnimationRenderer as AnimationRenderer,\n ɵAnimationRendererFactory as AnimationRendererFactory,\n} from '@angular/animations/browser';\nimport {\n inject,\n Injectable,\n NgZone,\n OnDestroy,\n Renderer2,\n RendererFactory2,\n RendererStyleFlags2,\n RendererType2,\n ɵAnimationRendererType as AnimationRendererType,\n ɵChangeDetectionScheduler as ChangeDetectionScheduler,\n ɵNotificationSource as NotificationSource,\n ɵRuntimeError as RuntimeError,\n InjectionToken,\n type ListenerOptions,\n Injector,\n} from '@angular/core';\nimport {ɵRuntimeErrorCode as RuntimeErrorCode} from '@angular/platform-browser';\n\nconst ANIMATION_PREFIX = '@';\n\n@Injectable()\nexport class AsyncAnimationRendererFactory implements OnDestroy, RendererFactory2 {\n private _rendererFactoryPromise: Promise<AnimationRendererFactory> | null = null;\n private scheduler: ChangeDetectionScheduler | null = null;\n private readonly injector = inject(Injector);\n private readonly loadingSchedulerFn = inject(ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN, {\n optional: true,\n });\n private _engine?: AnimationEngine;\n\n /**\n *\n * @param moduleImpl allows to provide a mock implmentation (or will load the animation module)\n */\n constructor(\n private doc: Document,\n private delegate: RendererFactory2,\n private zone: NgZone,\n private animationType: 'animations' | 'noop',\n private moduleImpl?: Promise<{\n ɵcreateEngine: (type: 'animations' | 'noop', doc: Document) => AnimationEngine;\n ɵAnimationRendererFactory: typeof AnimationRendererFactory;\n }>,\n ) {}\n\n /** @nodoc */\n ngOnDestroy(): void {\n // When the root view is removed, the renderer defers the actual work to the\n // `TransitionAnimationEngine` to do this, and the `TransitionAnimationEngine` doesn't actually\n // remove the DOM node, but just calls `markElementAsRemoved()`. The actual DOM node is not\n // removed until `TransitionAnimationEngine` \"flushes\".\n // Note: we already flush on destroy within the `InjectableAnimationEngine`. The injectable\n // engine is not provided when async animations are used.\n this._engine?.flush();\n }\n\n /**\n * @internal\n */\n private loadImpl(): Promise<AnimationRendererFactory> {\n // Note on the `.then(m => m)` part below: Closure compiler optimizations in g3 require\n // `.then` to be present for a dynamic import (or an import should be `await`ed) to detect\n // the set of imported symbols.\n const loadFn = () => this.moduleImpl ?? import('@angular/animations/browser').then((m) => m);\n\n let moduleImplPromise: typeof this.moduleImpl;\n if (this.loadingSchedulerFn) {\n moduleImplPromise = this.loadingSchedulerFn(loadFn);\n } else {\n moduleImplPromise = loadFn();\n }\n\n return moduleImplPromise\n .catch((e) => {\n throw new RuntimeError(\n RuntimeErrorCode.ANIMATION_RENDERER_ASYNC_LOADING_FAILURE,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Async loading for animations package was ' +\n 'enabled, but loading failed. Angular falls back to using regular rendering. ' +\n \"No animations will be displayed and their styles won't be applied.\",\n );\n })\n .then(({ɵcreateEngine, ɵAnimationRendererFactory}) => {\n // We can't create the renderer yet because we might need the hostElement and the type\n // Both are provided in createRenderer().\n this._engine = ɵcreateEngine(this.animationType, this.doc);\n const rendererFactory = new ɵAnimationRendererFactory(\n this.delegate,\n this._engine,\n this.zone,\n );\n this.delegate = rendererFactory;\n return rendererFactory;\n });\n }\n\n /**\n * This method is delegating the renderer creation to the factories.\n * It uses default factory while the animation factory isn't loaded\n * and will rely on the animation factory once it is loaded.\n *\n * Calling this method will trigger as side effect the loading of the animation module\n * if the renderered component uses animations.\n */\n createRenderer(hostElement: any, rendererType: RendererType2): Renderer2 {\n const renderer = this.delegate.createRenderer(hostElement, rendererType);\n\n if ((renderer as AnimationRenderer).ɵtype === AnimationRendererType.Regular) {\n // The factory is already loaded, this is an animation renderer\n return renderer;\n }\n\n // We need to prevent the DomRenderer to throw an error because of synthetic properties\n if (typeof (renderer as any).throwOnSyntheticProps === 'boolean') {\n (renderer as any).throwOnSyntheticProps = false;\n }\n\n // Using a dynamic renderer to switch the renderer implementation once the module is loaded.\n const dynamicRenderer = new DynamicDelegationRenderer(renderer);\n\n // Kick off the module loading if the component uses animations but the module hasn't been\n // loaded yet.\n if (rendererType?.data?.['animation'] && !this._rendererFactoryPromise) {\n this._rendererFactoryPromise = this.loadImpl();\n }\n\n this._rendererFactoryPromise\n ?.then((animationRendererFactory) => {\n const animationRenderer = animationRendererFactory.createRenderer(\n hostElement,\n rendererType,\n );\n dynamicRenderer.use(animationRenderer);\n this.scheduler ??= this.injector.get(ChangeDetectionScheduler, null, {optional: true});\n this.scheduler?.notify(NotificationSource.AsyncAnimationsLoaded);\n })\n .catch((e) => {\n // Permanently use regular renderer when loading fails.\n dynamicRenderer.use(renderer);\n });\n\n return dynamicRenderer;\n }\n\n begin(): void {\n this.delegate.begin?.();\n }\n\n end(): void {\n this.delegate.end?.();\n }\n\n whenRenderingDone?(): Promise<any> {\n return this.delegate.whenRenderingDone?.() ?? Promise.resolve();\n }\n\n /**\n * Used during HMR to clear any cached data about a component.\n * @param componentId ID of the component that is being replaced.\n */\n protected componentReplaced(componentId: string) {\n // Flush the engine since the renderer destruction waits for animations to be done.\n this._engine?.flush();\n (this.delegate as {componentReplaced?: (id: string) => void}).componentReplaced?.(componentId);\n }\n}\n\n/**\n * The class allows to dynamicly switch between different renderer implementations\n * by changing the delegate renderer.\n */\nexport class DynamicDelegationRenderer implements Renderer2 {\n // List of callbacks that need to be replayed on the animation renderer once its loaded\n private replay: ((renderer: Renderer2) => void)[] | null = [];\n readonly ɵtype = AnimationRendererType.Delegated;\n\n constructor(private delegate: Renderer2) {}\n\n use(impl: Renderer2) {\n this.delegate = impl;\n\n if (this.replay !== null) {\n // Replay queued actions using the animation renderer to apply\n // all events and properties collected while loading was in progress.\n for (const fn of this.replay) {\n fn(impl);\n }\n // Set to `null` to indicate that the queue was processed\n // and we no longer need to collect events and properties.\n this.replay = null;\n }\n }\n\n get data(): {[key: string]: any} {\n return this.delegate.data;\n }\n\n destroy(): void {\n this.replay = null;\n this.delegate.destroy();\n }\n\n createElement(name: string, namespace?: string | null) {\n return this.delegate.createElement(name, namespace);\n }\n\n createComment(value: string): void {\n return this.delegate.createComment(value);\n }\n\n createText(value: string): any {\n return this.delegate.createText(value);\n }\n\n get destroyNode(): ((node: any) => void) | null {\n return this.delegate.destroyNode;\n }\n\n appendChild(parent: any, newChild: any): void {\n this.delegate.appendChild(parent, newChild);\n }\n\n insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean | undefined): void {\n this.delegate.insertBefore(parent, newChild, refChild, isMove);\n }\n\n removeChild(parent: any, oldChild: any, isHostElement?: boolean | undefined): void {\n this.delegate.removeChild(parent, oldChild, isHostElement);\n }\n\n selectRootElement(selectorOrNode: any, preserveContent?: boolean | undefined): any {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n }\n\n parentNode(node: any): any {\n return this.delegate.parentNode(node);\n }\n\n nextSibling(node: any): any {\n return this.delegate.nextSibling(node);\n }\n\n setAttribute(el: any, name: string, value: string, namespace?: string | null | undefined): void {\n this.delegate.setAttribute(el, name, value, namespace);\n }\n\n removeAttribute(el: any, name: string, namespace?: string | null | undefined): void {\n this.delegate.removeAttribute(el, name, namespace);\n }\n\n addClass(el: any, name: string): void {\n this.delegate.addClass(el, name);\n }\n\n removeClass(el: any, name: string): void {\n this.delegate.removeClass(el, name);\n }\n\n setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2 | undefined): void {\n this.delegate.setStyle(el, style, value, flags);\n }\n\n removeStyle(el: any, style: string, flags?: RendererStyleFlags2 | undefined): void {\n this.delegate.removeStyle(el, style, flags);\n }\n\n setProperty(el: any, name: string, value: any): void {\n // We need to keep track of animation properties set on default renderer\n // So we can also set them also on the animation renderer\n if (this.shouldReplay(name)) {\n this.replay!.push((renderer: Renderer2) => renderer.setProperty(el, name, value));\n }\n this.delegate.setProperty(el, name, value);\n }\n\n setValue(node: any, value: string): void {\n this.delegate.setValue(node, value);\n }\n\n listen(\n target: any,\n eventName: string,\n callback: (event: any) => boolean | void,\n options?: ListenerOptions,\n ): () => void {\n // We need to keep track of animation events registred by the default renderer\n // So we can also register them against the animation renderer\n if (this.shouldReplay(eventName)) {\n this.replay!.push((renderer: Renderer2) =>\n renderer.listen(target, eventName, callback, options),\n );\n }\n return this.delegate.listen(target, eventName, callback, options);\n }\n\n private shouldReplay(propOrEventName: string): boolean {\n //`null` indicates that we no longer need to collect events and properties\n return this.replay !== null && propOrEventName.startsWith(ANIMATION_PREFIX);\n }\n}\n\n/**\n * Provides a custom scheduler function for the async loading of the animation package.\n *\n * Private token for investigation purposes\n */\nexport const ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN = new InjectionToken<<T>(loadFn: () => T) => T>(\n ngDevMode ? 'async_animation_loading_scheduler_fn' : '',\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 */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n ANIMATION_MODULE_TYPE,\n EnvironmentProviders,\n makeEnvironmentProviders,\n NgZone,\n RendererFactory2,\n ɵperformanceMarkFeature as performanceMarkFeature,\n} from '@angular/core';\nimport {ɵDomRendererFactory2 as DomRendererFactory2} from '@angular/platform-browser';\n\nimport {AsyncAnimationRendererFactory} from './async_animation_renderer';\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 * When you use this function instead of the eager `provideAnimations()`, animations won't be\n * rendered until the renderer is loaded.\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 * provideAnimationsAsync()\n * ]\n * });\n * ```\n *\n * @param type pass `'noop'` as argument to disable animations.\n *\n * @publicApi\n */\nexport function provideAnimationsAsync(\n type: 'animations' | 'noop' = 'animations',\n): EnvironmentProviders {\n performanceMarkFeature('NgAsyncAnimations');\n\n // Animations don't work on the server so we switch them over to no-op automatically.\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n type = 'noop';\n }\n\n return makeEnvironmentProviders([\n {\n provide: RendererFactory2,\n useFactory: (doc: Document, renderer: DomRendererFactory2, zone: NgZone) => {\n return new AsyncAnimationRendererFactory(doc, renderer, zone, type);\n },\n deps: [DOCUMENT, DomRendererFactory2, NgZone],\n },\n {\n provide: ANIMATION_MODULE_TYPE,\n useValue: type === 'noop' ? 'NoopAnimations' : 'BrowserAnimations',\n },\n ]);\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 */\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation browser package.\n */\nexport {provideAnimationsAsync} from './providers';\nexport * from './private_export';\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 */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/async-animations';\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 */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["RuntimeError","ChangeDetectionScheduler","performanceMarkFeature","DomRendererFactory2"],"mappings":";;;;;;;;;;;AAgCA,MAAM,gBAAgB,GAAG,GAAG,CAAC;MAGhB,6BAA6B,CAAA;AAc9B,IAAA,GAAA,CAAA;AACA,IAAA,QAAA,CAAA;AACA,IAAA,IAAA,CAAA;AACA,IAAA,aAAA,CAAA;AACA,IAAA,UAAA,CAAA;IAjBF,uBAAuB,GAA6C,IAAI,CAAC;IACzE,SAAS,GAAoC,IAAI,CAAC;AACzC,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5B,IAAA,kBAAkB,GAAG,MAAM,CAAC,qCAAqC,EAAE;AAClF,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC,CAAC;AACK,IAAA,O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AA,sBAAsB,CACpC,IAAA,GAA8B,YAAY,EAAA;IAE1CC,uBAAsB,CAAC,mBAAmB,CAAC,CAAA;;AAG3C,IAAA,IAAI,OAAO,YAAY,KAAK,WAAW,IAAI,YAAY,EAAE;QACvD,IAAI,GAAG,MAAM,CAAA;KACf;AAEA,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,gBAAgB;YACzB,UAAU,EAAE,CAAC,GAAa,EAAE,QAA6B,EAAE,IAAY,KAAI;gBACzE,OAAO,IAAI,6BAA6B,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;aACpE;AACD,YAAA,IAAI,EAAE,CAAC,QAAQ,EAAEC,oBAAmB,EAAE,MAAM,CAAC;AAC9C,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,qBAAqB;YAC9B,QAAQ,EAAE,IAAI,KAAK,MAAM,GAAG,gBAAgB,GAAG,mBAAmB;AACnE,SAAA;AACF,KAAA,CAAC,CAAA;AACJ;;AC/DA;;;;AAIG;;ACJH;;;;AAIG;;ACJH;;ACRA;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"async.mjs","sources":["../../../../../../../packages/platform-browser/animations/async/src/async_animation_renderer.ts","../../../../../../../packages/platform-browser/animations/async/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 ɵAnimationEngine as AnimationEngine,\n ɵAnimationRenderer as AnimationRenderer,\n ɵAnimationRendererFactory as AnimationRendererFactory,\n} from '@angular/animations/browser';\nimport {\n inject,\n Injectable,\n NgZone,\n OnDestroy,\n Renderer2,\n RendererFactory2,\n RendererStyleFlags2,\n RendererType2,\n ɵAnimationRendererType as AnimationRendererType,\n ɵChangeDetectionScheduler as ChangeDetectionScheduler,\n ɵNotificationSource as NotificationSource,\n ɵRuntimeError as RuntimeError,\n InjectionToken,\n type ListenerOptions,\n Injector,\n} from '@angular/core';\nimport {ɵRuntimeErrorCode as RuntimeErrorCode} from '@angular/platform-browser';\n\nconst ANIMATION_PREFIX = '@';\n\n@Injectable()\nexport class AsyncAnimationRendererFactory implements OnDestroy, RendererFactory2 {\n private _rendererFactoryPromise: Promise<AnimationRendererFactory> | null = null;\n private scheduler: ChangeDetectionScheduler | null = null;\n private readonly injector = inject(Injector);\n private readonly loadingSchedulerFn = inject(ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN, {\n optional: true,\n });\n private _engine?: AnimationEngine;\n\n /**\n *\n * @param moduleImpl allows to provide a mock implmentation (or will load the animation module)\n */\n constructor(\n private doc: Document,\n private delegate: RendererFactory2,\n private zone: NgZone,\n private animationType: 'animations' | 'noop',\n private moduleImpl?: Promise<{\n ɵcreateEngine: (type: 'animations' | 'noop', doc: Document) => AnimationEngine;\n ɵAnimationRendererFactory: typeof AnimationRendererFactory;\n }>,\n ) {}\n\n /** @nodoc */\n ngOnDestroy(): void {\n // When the root view is removed, the renderer defers the actual work to the\n // `TransitionAnimationEngine` to do this, and the `TransitionAnimationEngine` doesn't actually\n // remove the DOM node, but just calls `markElementAsRemoved()`. The actual DOM node is not\n // removed until `TransitionAnimationEngine` \"flushes\".\n // Note: we already flush on destroy within the `InjectableAnimationEngine`. The injectable\n // engine is not provided when async animations are used.\n this._engine?.flush();\n }\n\n /**\n * @internal\n */\n private loadImpl(): Promise<AnimationRendererFactory> {\n // Note on the `.then(m => m)` part below: Closure compiler optimizations in g3 require\n // `.then` to be present for a dynamic import (or an import should be `await`ed) to detect\n // the set of imported symbols.\n const loadFn = () => this.moduleImpl ?? import('@angular/animations/browser').then((m) => m);\n\n let moduleImplPromise: typeof this.moduleImpl;\n if (this.loadingSchedulerFn) {\n moduleImplPromise = this.loadingSchedulerFn(loadFn);\n } else {\n moduleImplPromise = loadFn();\n }\n\n return moduleImplPromise\n .catch((e) => {\n throw new RuntimeError(\n RuntimeErrorCode.ANIMATION_RENDERER_ASYNC_LOADING_FAILURE,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Async loading for animations package was ' +\n 'enabled, but loading failed. Angular falls back to using regular rendering. ' +\n \"No animations will be displayed and their styles won't be applied.\",\n );\n })\n .then(({ɵcreateEngine, ɵAnimationRendererFactory}) => {\n // We can't create the renderer yet because we might need the hostElement and the type\n // Both are provided in createRenderer().\n this._engine = ɵcreateEngine(this.animationType, this.doc);\n const rendererFactory = new ɵAnimationRendererFactory(\n this.delegate,\n this._engine,\n this.zone,\n );\n this.delegate = rendererFactory;\n return rendererFactory;\n });\n }\n\n /**\n * This method is delegating the renderer creation to the factories.\n * It uses default factory while the animation factory isn't loaded\n * and will rely on the animation factory once it is loaded.\n *\n * Calling this method will trigger as side effect the loading of the animation module\n * if the renderered component uses animations.\n */\n createRenderer(hostElement: any, rendererType: RendererType2): Renderer2 {\n const renderer = this.delegate.createRenderer(hostElement, rendererType);\n\n if ((renderer as AnimationRenderer).ɵtype === AnimationRendererType.Regular) {\n // The factory is already loaded, this is an animation renderer\n return renderer;\n }\n\n // We need to prevent the DomRenderer to throw an error because of synthetic properties\n if (typeof (renderer as any).throwOnSyntheticProps === 'boolean') {\n (renderer as any).throwOnSyntheticProps = false;\n }\n\n // Using a dynamic renderer to switch the renderer implementation once the module is loaded.\n const dynamicRenderer = new DynamicDelegationRenderer(renderer);\n\n // Kick off the module loading if the component uses animations but the module hasn't been\n // loaded yet.\n if (rendererType?.data?.['animation'] && !this._rendererFactoryPromise) {\n this._rendererFactoryPromise = this.loadImpl();\n }\n\n this._rendererFactoryPromise\n ?.then((animationRendererFactory) => {\n const animationRenderer = animationRendererFactory.createRenderer(\n hostElement,\n rendererType,\n );\n dynamicRenderer.use(animationRenderer);\n this.scheduler ??= this.injector.get(ChangeDetectionScheduler, null, {optional: true});\n this.scheduler?.notify(NotificationSource.AsyncAnimationsLoaded);\n })\n .catch((e) => {\n // Permanently use regular renderer when loading fails.\n dynamicRenderer.use(renderer);\n });\n\n return dynamicRenderer;\n }\n\n begin(): void {\n this.delegate.begin?.();\n }\n\n end(): void {\n this.delegate.end?.();\n }\n\n whenRenderingDone?(): Promise<any> {\n return this.delegate.whenRenderingDone?.() ?? Promise.resolve();\n }\n\n /**\n * Used during HMR to clear any cached data about a component.\n * @param componentId ID of the component that is being replaced.\n */\n protected componentReplaced(componentId: string) {\n // Flush the engine since the renderer destruction waits for animations to be done.\n this._engine?.flush();\n (this.delegate as {componentReplaced?: (id: string) => void}).componentReplaced?.(componentId);\n }\n}\n\n/**\n * The class allows to dynamicly switch between different renderer implementations\n * by changing the delegate renderer.\n */\nexport class DynamicDelegationRenderer implements Renderer2 {\n // List of callbacks that need to be replayed on the animation renderer once its loaded\n private replay: ((renderer: Renderer2) => void)[] | null = [];\n readonly ɵtype = AnimationRendererType.Delegated;\n\n constructor(private delegate: Renderer2) {}\n\n use(impl: Renderer2) {\n this.delegate = impl;\n\n if (this.replay !== null) {\n // Replay queued actions using the animation renderer to apply\n // all events and properties collected while loading was in progress.\n for (const fn of this.replay) {\n fn(impl);\n }\n // Set to `null` to indicate that the queue was processed\n // and we no longer need to collect events and properties.\n this.replay = null;\n }\n }\n\n get data(): {[key: string]: any} {\n return this.delegate.data;\n }\n\n destroy(): void {\n this.replay = null;\n this.delegate.destroy();\n }\n\n createElement(name: string, namespace?: string | null) {\n return this.delegate.createElement(name, namespace);\n }\n\n createComment(value: string): void {\n return this.delegate.createComment(value);\n }\n\n createText(value: string): any {\n return this.delegate.createText(value);\n }\n\n get destroyNode(): ((node: any) => void) | null {\n return this.delegate.destroyNode;\n }\n\n appendChild(parent: any, newChild: any): void {\n this.delegate.appendChild(parent, newChild);\n }\n\n insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean | undefined): void {\n this.delegate.insertBefore(parent, newChild, refChild, isMove);\n }\n\n removeChild(parent: any, oldChild: any, isHostElement?: boolean | undefined): void {\n this.delegate.removeChild(parent, oldChild, isHostElement);\n }\n\n selectRootElement(selectorOrNode: any, preserveContent?: boolean | undefined): any {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n }\n\n parentNode(node: any): any {\n return this.delegate.parentNode(node);\n }\n\n nextSibling(node: any): any {\n return this.delegate.nextSibling(node);\n }\n\n setAttribute(el: any, name: string, value: string, namespace?: string | null | undefined): void {\n this.delegate.setAttribute(el, name, value, namespace);\n }\n\n removeAttribute(el: any, name: string, namespace?: string | null | undefined): void {\n this.delegate.removeAttribute(el, name, namespace);\n }\n\n addClass(el: any, name: string): void {\n this.delegate.addClass(el, name);\n }\n\n removeClass(el: any, name: string): void {\n this.delegate.removeClass(el, name);\n }\n\n setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2 | undefined): void {\n this.delegate.setStyle(el, style, value, flags);\n }\n\n removeStyle(el: any, style: string, flags?: RendererStyleFlags2 | undefined): void {\n this.delegate.removeStyle(el, style, flags);\n }\n\n setProperty(el: any, name: string, value: any): void {\n // We need to keep track of animation properties set on default renderer\n // So we can also set them also on the animation renderer\n if (this.shouldReplay(name)) {\n this.replay!.push((renderer: Renderer2) => renderer.setProperty(el, name, value));\n }\n this.delegate.setProperty(el, name, value);\n }\n\n setValue(node: any, value: string): void {\n this.delegate.setValue(node, value);\n }\n\n listen(\n target: any,\n eventName: string,\n callback: (event: any) => boolean | void,\n options?: ListenerOptions,\n ): () => void {\n // We need to keep track of animation events registred by the default renderer\n // So we can also register them against the animation renderer\n if (this.shouldReplay(eventName)) {\n this.replay!.push((renderer: Renderer2) =>\n renderer.listen(target, eventName, callback, options),\n );\n }\n return this.delegate.listen(target, eventName, callback, options);\n }\n\n private shouldReplay(propOrEventName: string): boolean {\n //`null` indicates that we no longer need to collect events and properties\n return this.replay !== null && propOrEventName.startsWith(ANIMATION_PREFIX);\n }\n}\n\n/**\n * Provides a custom scheduler function for the async loading of the animation package.\n *\n * Private token for investigation purposes\n */\nexport const ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN = new InjectionToken<<T>(loadFn: () => T) => T>(\n ngDevMode ? 'async_animation_loading_scheduler_fn' : '',\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 */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n ANIMATION_MODULE_TYPE,\n EnvironmentProviders,\n makeEnvironmentProviders,\n NgZone,\n RendererFactory2,\n ɵperformanceMarkFeature as performanceMarkFeature,\n} from '@angular/core';\nimport {ɵDomRendererFactory2 as DomRendererFactory2} from '@angular/platform-browser';\n\nimport {AsyncAnimationRendererFactory} from './async_animation_renderer';\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 * When you use this function instead of the eager `provideAnimations()`, animations won't be\n * rendered until the renderer is loaded.\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 * provideAnimationsAsync()\n * ]\n * });\n * ```\n *\n * @param type pass `'noop'` as argument to disable animations.\n *\n * @publicApi\n */\nexport function provideAnimationsAsync(\n type: 'animations' | 'noop' = 'animations',\n): EnvironmentProviders {\n performanceMarkFeature('NgAsyncAnimations');\n\n // Animations don't work on the server so we switch them over to no-op automatically.\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n type = 'noop';\n }\n\n return makeEnvironmentProviders([\n {\n provide: RendererFactory2,\n useFactory: (doc: Document, renderer: DomRendererFactory2, zone: NgZone) => {\n return new AsyncAnimationRendererFactory(doc, renderer, zone, type);\n },\n deps: [DOCUMENT, DomRendererFactory2, NgZone],\n },\n {\n provide: ANIMATION_MODULE_TYPE,\n useValue: type === 'noop' ? 'NoopAnimations' : 'BrowserAnimations',\n },\n ]);\n}\n"],"names":["RuntimeError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MAAM;;AAGf,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,gBAAgB;YACzB,UAAU,EAAE,CAAC,GAAa,EAAE,QAA6B,EAAE,IAAY,KAAI;gBACzE,OAAO,IAAI,6BAA6B,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC;aACpE;AACD,YAAA,IAAI,EAAE,CAAC,QAAQ,EAAEC,oBAAmB,EAAE,MAAM,CAAC;AAC9C,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,qBAAqB;YAC9B,QAAQ,EAAE,IAAI,KAAK,MAAM,GAAG,gBAAgB,GAAG,mBAAmB;AACnE,SAAA;AACF,KAAA,CAAC;AACJ;;;;"}
|
package/fesm2022/animations.mjs
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v20.0.0-next.
|
3
|
-
* (c) 2010-
|
2
|
+
* @license Angular v20.0.0-next.2
|
3
|
+
* (c) 2010-2025 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
6
6
|
|
7
7
|
import * as i0 from '@angular/core';
|
8
|
-
import {
|
8
|
+
import { ANIMATION_MODULE_TYPE, NgZone, RendererFactory2, Inject, Injectable, ɵperformanceMarkFeature as _performanceMarkFeature, NgModule } from '@angular/core';
|
9
9
|
export { ANIMATION_MODULE_TYPE } from '@angular/core';
|
10
|
-
import { ɵDomRendererFactory2, BrowserModule } from '@angular/platform-browser';
|
10
|
+
import { ɵDomRendererFactory2 as _DomRendererFactory2, BrowserModule } from '@angular/platform-browser';
|
11
11
|
import * as i1 from '@angular/animations/browser';
|
12
|
-
import {
|
12
|
+
import { NoopAnimationDriver, AnimationDriver, ɵAnimationStyleNormalizer as _AnimationStyleNormalizer, ɵAnimationEngine as _AnimationEngine, ɵWebAnimationsDriver as _WebAnimationsDriver, ɵWebAnimationsStyleNormalizer as _WebAnimationsStyleNormalizer, ɵAnimationRendererFactory as _AnimationRendererFactory } from '@angular/animations/browser';
|
13
13
|
import { DOCUMENT } from '@angular/common';
|
14
14
|
|
15
|
-
class InjectableAnimationEngine extends
|
15
|
+
class InjectableAnimationEngine extends _AnimationEngine {
|
16
16
|
// The `ApplicationRef` is injected here explicitly to force the dependency ordering.
|
17
17
|
// Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they
|
18
18
|
// both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.
|
@@ -22,28 +22,28 @@ class InjectableAnimationEngine extends ɵAnimationEngine {
|
|
22
22
|
ngOnDestroy() {
|
23
23
|
this.flush();
|
24
24
|
}
|
25
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
26
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: InjectableAnimationEngine, deps: [{ token: DOCUMENT }, { token: i1.AnimationDriver }, { token: i1.ɵAnimationStyleNormalizer }], target: i0.ɵɵFactoryTarget.Injectable });
|
26
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: InjectableAnimationEngine });
|
27
27
|
}
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: InjectableAnimationEngine, decorators: [{
|
29
29
|
type: Injectable
|
30
30
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
31
31
|
type: Inject,
|
32
32
|
args: [DOCUMENT]
|
33
33
|
}] }, { type: i1.AnimationDriver }, { type: i1.ɵAnimationStyleNormalizer }] });
|
34
34
|
function instantiateDefaultStyleNormalizer() {
|
35
|
-
return new
|
35
|
+
return new _WebAnimationsStyleNormalizer();
|
36
36
|
}
|
37
37
|
function instantiateRendererFactory(renderer, engine, zone) {
|
38
|
-
return new
|
38
|
+
return new _AnimationRendererFactory(renderer, engine, zone);
|
39
39
|
}
|
40
40
|
const SHARED_ANIMATION_PROVIDERS = [
|
41
|
-
{ provide:
|
42
|
-
{ provide:
|
41
|
+
{ provide: _AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer },
|
42
|
+
{ provide: _AnimationEngine, useClass: InjectableAnimationEngine },
|
43
43
|
{
|
44
44
|
provide: RendererFactory2,
|
45
45
|
useFactory: instantiateRendererFactory,
|
46
|
-
deps: [
|
46
|
+
deps: [_DomRendererFactory2, _AnimationEngine, NgZone],
|
47
47
|
},
|
48
48
|
];
|
49
49
|
/**
|
@@ -65,7 +65,7 @@ const BROWSER_ANIMATIONS_PROVIDERS = [
|
|
65
65
|
provide: AnimationDriver,
|
66
66
|
useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode
|
67
67
|
? new NoopAnimationDriver()
|
68
|
-
: new
|
68
|
+
: new _WebAnimationsDriver(),
|
69
69
|
},
|
70
70
|
{
|
71
71
|
provide: ANIMATION_MODULE_TYPE,
|
@@ -104,11 +104,11 @@ class BrowserAnimationsModule {
|
|
104
104
|
: BROWSER_ANIMATIONS_PROVIDERS,
|
105
105
|
};
|
106
106
|
}
|
107
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
108
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.
|
109
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.
|
107
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: BrowserAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
108
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: BrowserAnimationsModule, exports: [BrowserModule] });
|
109
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: BrowserAnimationsModule, providers: BROWSER_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });
|
110
110
|
}
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: BrowserAnimationsModule, decorators: [{
|
112
112
|
type: NgModule,
|
113
113
|
args: [{
|
114
114
|
exports: [BrowserModule],
|
@@ -138,7 +138,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.0",
|
|
138
138
|
* @publicApi
|
139
139
|
*/
|
140
140
|
function provideAnimations() {
|
141
|
-
|
141
|
+
_performanceMarkFeature('NgEagerAnimations');
|
142
142
|
// Return a copy to prevent changes to the original array in case any in-place
|
143
143
|
// alterations are performed to the `provideAnimations` call results in app code.
|
144
144
|
return [...BROWSER_ANIMATIONS_PROVIDERS];
|
@@ -148,11 +148,11 @@ function provideAnimations() {
|
|
148
148
|
* @publicApi
|
149
149
|
*/
|
150
150
|
class NoopAnimationsModule {
|
151
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
152
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.
|
153
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.
|
151
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NoopAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
152
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: NoopAnimationsModule, exports: [BrowserModule] });
|
153
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NoopAnimationsModule, providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });
|
154
154
|
}
|
155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NoopAnimationsModule, decorators: [{
|
156
156
|
type: NgModule,
|
157
157
|
args: [{
|
158
158
|
exports: [BrowserModule],
|
@@ -186,23 +186,5 @@ function provideNoopAnimations() {
|
|
186
186
|
return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];
|
187
187
|
}
|
188
188
|
|
189
|
-
/**
|
190
|
-
* @module
|
191
|
-
* @description
|
192
|
-
* Entry point for all animation APIs of the animation browser package.
|
193
|
-
*/
|
194
|
-
|
195
|
-
/**
|
196
|
-
* @module
|
197
|
-
* @description
|
198
|
-
* Entry point for all public APIs of this package.
|
199
|
-
*/
|
200
|
-
|
201
|
-
// This file is not used to build this module. It is only used during editing
|
202
|
-
|
203
|
-
/**
|
204
|
-
* Generated bundle index. Do not edit.
|
205
|
-
*/
|
206
|
-
|
207
189
|
export { BrowserAnimationsModule, NoopAnimationsModule, provideAnimations, provideNoopAnimations, InjectableAnimationEngine as ɵInjectableAnimationEngine };
|
208
190
|
//# sourceMappingURL=animations.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"animations.mjs","sources":["../../../../../../packages/platform-browser/animations/src/providers.ts","../../../../../../packages/platform-browser/animations/src/module.ts","../../../../../../packages/platform-browser/animations/src/animations.ts","../../../../../../packages/platform-browser/animations/public_api.ts","../../../../../../packages/platform-browser/animations/index.ts","../../../../../../packages/platform-browser/animations/animations.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 '@angular/platform-browser';\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 '@angular/platform-browser';\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 */\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@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 */\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@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 */\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","/**\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\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation browser package.\n */\nexport {ANIMATION_MODULE_TYPE} from '@angular/core';\nexport {\n BrowserAnimationsModule,\n BrowserAnimationsModuleConfig,\n NoopAnimationsModule,\n provideAnimations,\n provideNoopAnimations,\n} from './module';\n\nexport * from './private_export';\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 */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/animations';\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 */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["AnimationEngine","WebAnimationsStyleNormalizer","AnimationRendererFactory","AnimationStyleNormalizer","DomRendererFactory2","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,CAAA;KAChC;IAEA,WAAW,GAAA;QACT,IAAI,CAAC,KAAK,EAAE,CAAA;KACd;AAdW,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA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SACa,iBAAiB,GAAA;IAC/BC,uBAAsB,CAAC,mBAAmB,CAAC,CAAA;;;AAG3C,IAAA,OAAO,CAAC,GAAG,4BAA4B,CAAC,CAAA;AAC1C,CAAA;AAEA;;;AAGG;MAKU,oBAAoB,CAAA;kHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAHrB,aAAa,CAAA,EAAA,CAAA,CAAA;mHAGZ,oBAAoB,EAAA,SAAA,EAFpB,iCAAiC,EAAA,OAAA,EAAA,CADlC,aAAa,CAAA,EAAA,CAAA,CAAA;;sGAGZ,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,CAAA;;AAGD;;;;;;;;;;;;;;;;;;;;AAoBG;SACa,qBAAqB,GAAA;;;AAGnC,IAAA,OAAO,CAAC,GAAG,iCAAiC,CAAC,CAAA;AAC/C;;AC3HA;;;;AAIG;;ACJH;;;;AAIG;;ACJH;;ACRA;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"animations.mjs","sources":["../../../../../../packages/platform-browser/animations/src/providers.ts","../../../../../../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 '@angular/platform-browser';\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 '@angular/platform-browser';\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 */\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@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 */\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@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 */\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","Anim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