@angular/animations 20.0.0-rc.0 → 20.0.0-rc.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/animation_driver.d-DAiEDqQt.d.ts +1 -1
- package/animation_player.d-Dv9iW4uh.d.ts +1 -1
- package/browser/index.d.ts +38 -2
- package/browser/testing/index.d.ts +1 -1
- package/fesm2022/animations.mjs +7 -7
- package/fesm2022/animations.mjs.map +1 -1
- package/fesm2022/browser/testing.mjs +1 -1
- package/fesm2022/browser/testing.mjs.map +1 -1
- package/fesm2022/browser.mjs +7 -7
- package/fesm2022/browser.mjs.map +1 -1
- package/fesm2022/private_export-faY_wCkZ.mjs +1 -1
- package/fesm2022/private_export-faY_wCkZ.mjs.map +1 -1
- package/fesm2022/util-D9FfmVnv.mjs +1 -1
- package/fesm2022/util-D9FfmVnv.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +4 -4
package/browser/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v20.0.0-rc.
|
2
|
+
* @license Angular v20.0.0-rc.2
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -232,8 +232,44 @@ declare class WebAnimationsPlayer implements AnimationPlayer {
|
|
232
232
|
beforeDestroy(): void;
|
233
233
|
}
|
234
234
|
|
235
|
+
declare const ENTER_CLASSNAME = "ng-enter";
|
236
|
+
declare const LEAVE_CLASSNAME = "ng-leave";
|
235
237
|
declare function normalizeKeyframes(keyframes: Array<_StyleData> | Array<_StyleDataMap>): Array<_StyleDataMap>;
|
236
238
|
declare function camelCaseToDashCase(input: string): string;
|
237
239
|
declare function allowPreviousPlayerStylesMerge(duration: number, delay: number): boolean;
|
238
240
|
|
239
|
-
|
241
|
+
declare class TransitionAnimationPlayer implements AnimationPlayer {
|
242
|
+
namespaceId: string;
|
243
|
+
triggerName: string;
|
244
|
+
element: any;
|
245
|
+
private _player;
|
246
|
+
private _containsRealPlayer;
|
247
|
+
private _queuedCallbacks;
|
248
|
+
readonly destroyed = false;
|
249
|
+
parentPlayer: AnimationPlayer | null;
|
250
|
+
markedForDestroy: boolean;
|
251
|
+
disabled: boolean;
|
252
|
+
readonly queued: boolean;
|
253
|
+
readonly totalTime: number;
|
254
|
+
constructor(namespaceId: string, triggerName: string, element: any);
|
255
|
+
setRealPlayer(player: AnimationPlayer): void;
|
256
|
+
getRealPlayer(): AnimationPlayer;
|
257
|
+
overrideTotalTime(totalTime: number): void;
|
258
|
+
syncPlayerEvents(player: AnimationPlayer): void;
|
259
|
+
private _queueEvent;
|
260
|
+
onDone(fn: () => void): void;
|
261
|
+
onStart(fn: () => void): void;
|
262
|
+
onDestroy(fn: () => void): void;
|
263
|
+
init(): void;
|
264
|
+
hasStarted(): boolean;
|
265
|
+
play(): void;
|
266
|
+
pause(): void;
|
267
|
+
restart(): void;
|
268
|
+
finish(): void;
|
269
|
+
destroy(): void;
|
270
|
+
reset(): void;
|
271
|
+
setPosition(p: number): void;
|
272
|
+
getPosition(): number;
|
273
|
+
}
|
274
|
+
|
275
|
+
export { AnimationDriver, Animation$1 as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationRenderer as ɵAnimationRenderer, AnimationRendererFactory as ɵAnimationRendererFactory, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, BaseAnimationRenderer as ɵBaseAnimationRenderer, ENTER_CLASSNAME as ɵENTER_CLASSNAME, LEAVE_CLASSNAME as ɵLEAVE_CLASSNAME, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, TransitionAnimationPlayer as ɵTransitionAnimationPlayer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, camelCaseToDashCase as ɵcamelCaseToDashCase, containsElement as ɵcontainsElement, createEngine as ɵcreateEngine, getParentElement as ɵgetParentElement, invokeQuery as ɵinvokeQuery, normalizeKeyframes as ɵnormalizeKeyframes, validateStyleProperty as ɵvalidateStyleProperty, validateWebAnimatableStyleProperty as ɵvalidateWebAnimatableStyleProperty };
|
package/fesm2022/animations.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v20.0.0-rc.
|
2
|
+
* @license Angular v20.0.0-rc.2
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -57,10 +57,10 @@ export { AUTO_STYLE, AnimationMetadataType, NoopAnimationPlayer, animate, animat
|
|
57
57
|
* @publicApi
|
58
58
|
*/
|
59
59
|
class AnimationBuilder {
|
60
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.
|
61
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-rc.
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: AnimationBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
61
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: AnimationBuilder, providedIn: 'root', useFactory: () => inject(BrowserAnimationBuilder) });
|
62
62
|
}
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: AnimationBuilder, decorators: [{
|
64
64
|
type: Injectable,
|
65
65
|
args: [{ providedIn: 'root', useFactory: () => inject(BrowserAnimationBuilder) }]
|
66
66
|
}] });
|
@@ -100,10 +100,10 @@ class BrowserAnimationBuilder extends AnimationBuilder {
|
|
100
100
|
issueAnimationCommand(this._renderer, null, id, 'register', [entry]);
|
101
101
|
return new BrowserAnimationFactory(id, this._renderer);
|
102
102
|
}
|
103
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.
|
104
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-rc.
|
103
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: BrowserAnimationBuilder, deps: [{ token: i0.RendererFactory2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
104
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: BrowserAnimationBuilder, providedIn: 'root' });
|
105
105
|
}
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: BrowserAnimationBuilder, decorators: [{
|
107
107
|
type: Injectable,
|
108
108
|
args: [{ providedIn: 'root' }]
|
109
109
|
}], ctorParameters: () => [{ type: i0.RendererFactory2 }, { type: Document, decorators: [{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"animations.mjs","sources":["../../../../../../packages/animations/src/animation_builder.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 */\nimport {DOCUMENT} from '@angular/common';\nimport {\n ANIMATION_MODULE_TYPE,\n Inject,\n inject,\n Injectable,\n Renderer2,\n RendererFactory2,\n RendererType2,\n ViewEncapsulation,\n ɵAnimationRendererType as AnimationRendererType,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {AnimationMetadata, AnimationOptions, sequence} from './animation_metadata';\nimport {RuntimeErrorCode} from './errors';\nimport {AnimationPlayer} from './players/animation_player';\n\n/**\n * An injectable service that produces an animation sequence programmatically within an\n * Angular component or directive.\n * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`.\n *\n * @usageNotes\n *\n * To use this service, add it to your component or directive as a dependency.\n * The service is instantiated along with your component.\n *\n * Apps do not typically need to create their own animation players, but if you\n * do need to, follow these steps:\n *\n * 1. Use the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> method\n * to create a programmatic animation. The method returns an `AnimationFactory` instance.\n *\n * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element.\n *\n * 3. Use the player object to control the animation programmatically.\n *\n * For example:\n *\n * ```ts\n * // import the service from BrowserAnimationsModule\n * import {AnimationBuilder} from '@angular/animations';\n * // require the service as a dependency\n * class MyCmp {\n * constructor(private _builder: AnimationBuilder) {}\n *\n * makeAnimation(element: any) {\n * // first define a reusable animation\n * const myAnimation = this._builder.build([\n * style({ width: 0 }),\n * animate(1000, style({ width: '100px' }))\n * ]);\n *\n * // use the returned factory object to create a player\n * const player = myAnimation.create(element);\n *\n * player.play();\n * }\n * }\n * ```\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useFactory: () => inject(BrowserAnimationBuilder)})\nexport abstract class AnimationBuilder {\n /**\n * Builds a factory for producing a defined animation.\n * @param animation A reusable animation definition.\n * @returns A factory object that can create a player for the defined animation.\n * @see {@link animate}\n */\n abstract build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory;\n}\n\n/**\n * A factory object returned from the\n * <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code>\n * method.\n *\n * @publicApi\n */\nexport abstract class AnimationFactory {\n /**\n * Creates an `AnimationPlayer` instance for the reusable animation defined by\n * the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code>\n * method that created this factory and attaches the new player a DOM element.\n *\n * @param element The DOM element to which to attach the player.\n * @param options A set of options that can include a time delay and\n * additional developer-defined parameters.\n */\n abstract create(element: any, options?: AnimationOptions): AnimationPlayer;\n}\n\n@Injectable({providedIn: 'root'})\nexport class BrowserAnimationBuilder extends AnimationBuilder {\n private animationModuleType = inject(ANIMATION_MODULE_TYPE, {optional: true});\n private _nextAnimationId = 0;\n private _renderer: Renderer2;\n\n constructor(rootRenderer: RendererFactory2, @Inject(DOCUMENT) doc: Document) {\n super();\n const typeData: RendererType2 = {\n id: '0',\n encapsulation: ViewEncapsulation.None,\n styles: [],\n data: {animation: []},\n };\n this._renderer = rootRenderer.createRenderer(doc.body, typeData);\n\n if (this.animationModuleType === null && !isAnimationRenderer(this._renderer)) {\n // We only support AnimationRenderer & DynamicDelegationRenderer for this AnimationBuilder\n\n throw new RuntimeError(\n RuntimeErrorCode.BROWSER_ANIMATION_BUILDER_INJECTED_WITHOUT_ANIMATIONS,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Angular detected that the `AnimationBuilder` was injected, but animation support was not enabled. ' +\n 'Please make sure that you enable animations in your application by calling `provideAnimations()` or `provideAnimationsAsync()` function.',\n );\n }\n }\n\n override build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory {\n const id = this._nextAnimationId;\n this._nextAnimationId++;\n const entry = Array.isArray(animation) ? sequence(animation) : animation;\n issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n return new BrowserAnimationFactory(id, this._renderer);\n }\n}\n\nclass BrowserAnimationFactory extends AnimationFactory {\n constructor(\n private _id: number,\n private _renderer: Renderer2,\n ) {\n super();\n }\n\n override create(element: any, options?: AnimationOptions): AnimationPlayer {\n return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n }\n}\n\nclass RendererAnimationPlayer implements AnimationPlayer {\n public parentPlayer: AnimationPlayer | null = null;\n private _started = false;\n\n constructor(\n public id: number,\n public element: any,\n options: AnimationOptions,\n private _renderer: Renderer2,\n ) {\n this._command('create', options);\n }\n\n private _listen(eventName: string, callback: (event: any) => any): () => void {\n return this._renderer.listen(this.element, `@@${this.id}:${eventName}`, callback);\n }\n\n private _command(command: string, ...args: any[]): void {\n issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n }\n\n onDone(fn: () => void): void {\n this._listen('done', fn);\n }\n\n onStart(fn: () => void): void {\n this._listen('start', fn);\n }\n\n onDestroy(fn: () => void): void {\n this._listen('destroy', fn);\n }\n\n init(): void {\n this._command('init');\n }\n\n hasStarted(): boolean {\n return this._started;\n }\n\n play(): void {\n this._command('play');\n this._started = true;\n }\n\n pause(): void {\n this._command('pause');\n }\n\n restart(): void {\n this._command('restart');\n }\n\n finish(): void {\n this._command('finish');\n }\n\n destroy(): void {\n this._command('destroy');\n }\n\n reset(): void {\n this._command('reset');\n this._started = false;\n }\n\n setPosition(p: number): void {\n this._command('setPosition', p);\n }\n\n getPosition(): number {\n return unwrapAnimationRenderer(this._renderer)?.engine?.players[this.id]?.getPosition() ?? 0;\n }\n\n public totalTime = 0;\n}\n\nfunction issueAnimationCommand(\n renderer: Renderer2,\n element: any,\n id: number,\n command: string,\n args: any[],\n): void {\n renderer.setProperty(element, `@@${id}:${command}`, args);\n}\n\n/**\n * The following 2 methods cannot reference their correct types (AnimationRenderer &\n * DynamicDelegationRenderer) since this would introduce a import cycle.\n */\n\nfunction unwrapAnimationRenderer(\n renderer: Renderer2,\n): {engine: {players: AnimationPlayer[]}} | null {\n const type = (renderer as unknown as {ɵtype: AnimationRendererType}).ɵtype;\n if (type === AnimationRendererType.Regular) {\n return renderer as any;\n } else if (type === AnimationRendererType.Delegated) {\n return (renderer as any).animationRenderer;\n }\n\n return null;\n}\n\nfunction isAnimationRenderer(renderer: Renderer2): boolean {\n const type = (renderer as unknown as {ɵtype: AnimationRendererType}).ɵtype;\n return type === AnimationRendererType.Regular || type === AnimationRendererType.Delegated;\n}\n"],"names":["RuntimeError"],"mappings":";;;;;;;;;;;;AAyBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CG;MAEmB,gBAAgB,CAAA;kHAAhB,gBAAgB,EAAA,IAAA,EAAA,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C,IAAA,OAAO,IAAI;AACb;AAEA,SAAS,mBAAmB,CAAC,QAAmB,EAAA;AAC9C,IAAA,MAAM,IAAI,GAAI,QAAsD,CAAC,KAAK;AAC1E,IAAA,OAAO,IAAI,KAAA,CAAA,wCAAsC,IAAI;AACvD;;;;"}
|
1
|
+
{"version":3,"file":"animations.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/animations/src/animation_builder.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 */\nimport {DOCUMENT} from '@angular/common';\nimport {\n ANIMATION_MODULE_TYPE,\n Inject,\n inject,\n Injectable,\n Renderer2,\n RendererFactory2,\n RendererType2,\n ViewEncapsulation,\n ɵAnimationRendererType as AnimationRendererType,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {AnimationMetadata, AnimationOptions, sequence} from './animation_metadata';\nimport {RuntimeErrorCode} from './errors';\nimport {AnimationPlayer} from './players/animation_player';\n\n/**\n * An injectable service that produces an animation sequence programmatically within an\n * Angular component or directive.\n * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`.\n *\n * @usageNotes\n *\n * To use this service, add it to your component or directive as a dependency.\n * The service is instantiated along with your component.\n *\n * Apps do not typically need to create their own animation players, but if you\n * do need to, follow these steps:\n *\n * 1. Use the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> method\n * to create a programmatic animation. The method returns an `AnimationFactory` instance.\n *\n * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element.\n *\n * 3. Use the player object to control the animation programmatically.\n *\n * For example:\n *\n * ```ts\n * // import the service from BrowserAnimationsModule\n * import {AnimationBuilder} from '@angular/animations';\n * // require the service as a dependency\n * class MyCmp {\n * constructor(private _builder: AnimationBuilder) {}\n *\n * makeAnimation(element: any) {\n * // first define a reusable animation\n * const myAnimation = this._builder.build([\n * style({ width: 0 }),\n * animate(1000, style({ width: '100px' }))\n * ]);\n *\n * // use the returned factory object to create a player\n * const player = myAnimation.create(element);\n *\n * player.play();\n * }\n * }\n * ```\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useFactory: () => inject(BrowserAnimationBuilder)})\nexport abstract class AnimationBuilder {\n /**\n * Builds a factory for producing a defined animation.\n * @param animation A reusable animation definition.\n * @returns A factory object that can create a player for the defined animation.\n * @see {@link animate}\n */\n abstract build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory;\n}\n\n/**\n * A factory object returned from the\n * <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code>\n * method.\n *\n * @publicApi\n */\nexport abstract class AnimationFactory {\n /**\n * Creates an `AnimationPlayer` instance for the reusable animation defined by\n * the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code>\n * method that created this factory and attaches the new player a DOM element.\n *\n * @param element The DOM element to which to attach the player.\n * @param options A set of options that can include a time delay and\n * additional developer-defined parameters.\n */\n abstract create(element: any, options?: AnimationOptions): AnimationPlayer;\n}\n\n@Injectable({providedIn: 'root'})\nexport class BrowserAnimationBuilder extends AnimationBuilder {\n private animationModuleType = inject(ANIMATION_MODULE_TYPE, {optional: true});\n private _nextAnimationId = 0;\n private _renderer: Renderer2;\n\n constructor(rootRenderer: RendererFactory2, @Inject(DOCUMENT) doc: Document) {\n super();\n const typeData: RendererType2 = {\n id: '0',\n encapsulation: ViewEncapsulation.None,\n styles: [],\n data: {animation: []},\n };\n this._renderer = rootRenderer.createRenderer(doc.body, typeData);\n\n if (this.animationModuleType === null && !isAnimationRenderer(this._renderer)) {\n // We only support AnimationRenderer & DynamicDelegationRenderer for this AnimationBuilder\n\n throw new RuntimeError(\n RuntimeErrorCode.BROWSER_ANIMATION_BUILDER_INJECTED_WITHOUT_ANIMATIONS,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Angular detected that the `AnimationBuilder` was injected, but animation support was not enabled. ' +\n 'Please make sure that you enable animations in your application by calling `provideAnimations()` or `provideAnimationsAsync()` function.',\n );\n }\n }\n\n override build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory {\n const id = this._nextAnimationId;\n this._nextAnimationId++;\n const entry = Array.isArray(animation) ? sequence(animation) : animation;\n issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n return new BrowserAnimationFactory(id, this._renderer);\n }\n}\n\nclass BrowserAnimationFactory extends AnimationFactory {\n constructor(\n private _id: number,\n private _renderer: Renderer2,\n ) {\n super();\n }\n\n override create(element: any, options?: AnimationOptions): AnimationPlayer {\n return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n }\n}\n\nclass RendererAnimationPlayer implements AnimationPlayer {\n public parentPlayer: AnimationPlayer | null = null;\n private _started = false;\n\n constructor(\n public id: number,\n public element: any,\n options: AnimationOptions,\n private _renderer: Renderer2,\n ) {\n this._command('create', options);\n }\n\n private _listen(eventName: string, callback: (event: any) => any): () => void {\n return this._renderer.listen(this.element, `@@${this.id}:${eventName}`, callback);\n }\n\n private _command(command: string, ...args: any[]): void {\n issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n }\n\n onDone(fn: () => void): void {\n this._listen('done', fn);\n }\n\n onStart(fn: () => void): void {\n this._listen('start', fn);\n }\n\n onDestroy(fn: () => void): void {\n this._listen('destroy', fn);\n }\n\n init(): void {\n this._command('init');\n }\n\n hasStarted(): boolean {\n return this._started;\n }\n\n play(): void {\n this._command('play');\n this._started = true;\n }\n\n pause(): void {\n this._command('pause');\n }\n\n restart(): void {\n this._command('restart');\n }\n\n finish(): void {\n this._command('finish');\n }\n\n destroy(): void {\n this._command('destroy');\n }\n\n reset(): void {\n this._command('reset');\n this._started = false;\n }\n\n setPosition(p: number): void {\n this._command('setPosition', p);\n }\n\n getPosition(): number {\n return unwrapAnimationRenderer(this._renderer)?.engine?.players[this.id]?.getPosition() ?? 0;\n }\n\n public totalTime = 0;\n}\n\nfunction issueAnimationCommand(\n renderer: Renderer2,\n element: any,\n id: number,\n command: string,\n args: any[],\n): void {\n renderer.setProperty(element, `@@${id}:${command}`, args);\n}\n\n/**\n * The following 2 methods cannot reference their correct types (AnimationRenderer &\n * DynamicDelegationRenderer) since this would introduce a import cycle.\n */\n\nfunction unwrapAnimationRenderer(\n renderer: Renderer2,\n): {engine: {players: AnimationPlayer[]}} | null {\n const type = (renderer as unknown as {ɵtype: AnimationRendererType}).ɵtype;\n if (type === AnimationRendererType.Regular) {\n return renderer as any;\n } else if (type === AnimationRendererType.Delegated) {\n return (renderer as any).animationRenderer;\n }\n\n return null;\n}\n\nfunction isAnimationRenderer(renderer: Renderer2): boolean {\n const type = (renderer as unknown as {ɵtype: AnimationRendererType}).ɵtype;\n return type === AnimationRendererType.Regular || type === AnimationRendererType.Delegated;\n}\n"],"names":["RuntimeError"],"mappings":";;;;;;;;;;;;AAyBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CG;MAEmB,gBAAgB,CAAA;kHAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;sHAAhB,gBAAgB,EAAA,UAAA,EADb,MAAM,EAAc,UAAA,EAAA,MAAM,MAAM,CAAC,uBAAuB,CAAC,EAAA,CAAA;;sGAC5D,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA,EAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC,uBAAuB,CAAC,EAAC;;AAWnF;;;;;;AAMG;MACmB,gBAAgB,CAAA;AAWrC;AAGK,MAAO,uBAAwB,SAAQ,gBAAgB,CAAA;IACnD,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;IACrE,gBAAgB,GAAG,CAAC;AACpB,IAAA,SAAS;IAEjB,WAAY,CAAA,YAA8B,EAAoB,GAAa,EA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ACT,OAAO,uBAAuB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC;;IAGvF,SAAS,GAAG,CAAC;AACrB;AAED,SAAS,qBAAqB,CAC5B,QAAmB,EACnB,OAAY,EACZ,EAAU,EACV,OAAe,EACf,IAAW,EAAA;AAEX,IAAA,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,CAAA,EAAA,EAAK,EAAE,CAAA,CAAA,EAAI,OAAO,CAAA,CAAE,EAAE,IAAI,CAAC;AAC3D;AAEA;;;AAGG;AAEH,SAAS,uBAAuB,CAC9B,QAAmB,EAAA;AAEnB,IAAA,MAAM,IAAI,GAAI,QAAsD,CAAC,KAAK;IAC1E,IAAI,IAAI,KAAkC,CAAA,sCAAE;AAC1C,QAAA,OAAO,QAAe;;SACjB,IAAI,IAAI,KAAoC,CAAA,wCAAE;QACnD,OAAQ,QAAgB,CAAC,iBAAiB;;AAG5C,IAAA,OAAO,IAAI;AACb;AAEA,SAAS,mBAAmB,CAAC,QAAmB,EAAA;AAC9C,IAAA,MAAM,IAAI,GAAI,QAAsD,CAAC,KAAK;AAC1E,IAAA,OAAO,IAAI,KAAA,CAAA,wCAAsC,IAAI;AACvD;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/animations/browser/testing/src/mock_animation_driver.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 */\nimport {\n AnimationPlayer,\n AUTO_STYLE,\n NoopAnimationPlayer,\n ɵStyleDataMap,\n} from '../../../src/animations';\nimport {\n AnimationDriver,\n ɵallowPreviousPlayerStylesMerge as allowPreviousPlayerStylesMerge,\n ɵcamelCaseToDashCase,\n ɵcontainsElement as containsElement,\n ɵgetParentElement as getParentElement,\n ɵinvokeQuery as invokeQuery,\n ɵnormalizeKeyframes as normalizeKeyframes,\n ɵvalidateStyleProperty as validateStyleProperty,\n ɵvalidateWebAnimatableStyleProperty,\n} from '../../../browser';\n\n/**\n * @publicApi\n */\nexport class MockAnimationDriver implements AnimationDriver {\n static log: AnimationPlayer[] = [];\n\n validateStyleProperty(prop: string): boolean {\n return validateStyleProperty(prop);\n }\n\n validateAnimatableStyleProperty(prop: string): boolean {\n const cssProp = ɵcamelCaseToDashCase(prop);\n return ɵvalidateWebAnimatableStyleProperty(cssProp);\n }\n\n containsElement(elm1: any, elm2: any): boolean {\n return containsElement(elm1, elm2);\n }\n\n getParentElement(element: unknown): unknown {\n return getParentElement(element);\n }\n\n query(element: any, selector: string, multi: boolean): any[] {\n return invokeQuery(element, selector, multi);\n }\n\n computeStyle(element: any, prop: string, defaultValue?: string): string {\n return defaultValue || '';\n }\n\n animate(\n element: any,\n keyframes: Array<ɵStyleDataMap>,\n duration: number,\n delay: number,\n easing: string,\n previousPlayers: any[] = [],\n ): MockAnimationPlayer {\n const player = new MockAnimationPlayer(\n element,\n keyframes,\n duration,\n delay,\n easing,\n previousPlayers,\n );\n MockAnimationDriver.log.push(<AnimationPlayer>player);\n return player;\n }\n}\n\n/**\n * @publicApi\n */\nexport class MockAnimationPlayer extends NoopAnimationPlayer {\n private __finished = false;\n private __started = false;\n public previousStyles: ɵStyleDataMap = new Map();\n private _onInitFns: (() => any)[] = [];\n public currentSnapshot: ɵStyleDataMap = new Map();\n private _keyframes: Array<ɵStyleDataMap> = [];\n\n constructor(\n public element: any,\n public keyframes: Array<ɵStyleDataMap>,\n public duration: number,\n public delay: number,\n public easing: string,\n public previousPlayers: any[],\n ) {\n super(duration, delay);\n\n this._keyframes = normalizeKeyframes(keyframes);\n\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousPlayers.forEach((player) => {\n if (player instanceof MockAnimationPlayer) {\n const styles = player.currentSnapshot;\n styles.forEach((val, prop) => this.previousStyles.set(prop, val));\n }\n });\n }\n }\n\n /** @internal */\n onInit(fn: () => any) {\n this._onInitFns.push(fn);\n }\n\n /** @internal */\n override init() {\n super.init();\n this._onInitFns.forEach((fn) => fn());\n this._onInitFns = [];\n }\n\n override reset() {\n super.reset();\n this.__started = false;\n }\n\n override finish(): void {\n super.finish();\n this.__finished = true;\n }\n\n override destroy(): void {\n super.destroy();\n this.__finished = true;\n }\n\n /** @internal */\n triggerMicrotask() {}\n\n override play(): void {\n super.play();\n this.__started = true;\n }\n\n override hasStarted() {\n return this.__started;\n }\n\n beforeDestroy() {\n const captures: ɵStyleDataMap = new Map();\n\n this.previousStyles.forEach((val, prop) => captures.set(prop, val));\n\n if (this.hasStarted()) {\n // when assembling the captured styles, it's important that\n // we build the keyframe styles in the following order:\n // {other styles within keyframes, ... previousStyles }\n this._keyframes.forEach((kf) => {\n for (let [prop, val] of kf) {\n if (prop !== 'offset') {\n captures.set(prop, this.__finished ? val : AUTO_STYLE);\n }\n }\n });\n }\n\n this.currentSnapshot = captures;\n }\n}\n"],"names":["ɵcamelCaseToDashCase","ɵvalidateWebAnimatableStyleProperty"],"mappings":";;;;;;;;;;AAyBA;;AAEG;MACU,mBAAmB,CAAA;AAC9B,IAAA,OAAO,GAAG,GAAsB,EAAE;AAElC,IAAA,qBAAqB,CAAC,IAAY,EAAA;AAChC,QAAA,OAAO,qBAAqB,CAAC,IAAI,CAAC;;AAGpC,IAAA,+BAA+B,CAAC,IAAY,EAAA;AAC1C,QAAA,MAAM,OAAO,GAAGA,mBAAoB,CAAC,IAAI,CAAC;AAC1C,QAAA,OAAOC,kCAAmC,CAAC,OAAO,CAAC;;IAGrD,eAAe,CAAC,IAAS,EAAE,IAAS,EAAA;AAClC,QAAA,OAAO,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;;AAGpC,IAAA,gBAAgB,CAAC,OAAgB,EAAA;AAC/B,QAAA,O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G,EAAE;QAEzC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAEnE,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;;;;YAIrB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,KAAI;gBAC7B,KAAK,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE;AAC1B,oBAAA,IAAI,IAAI,KAAK,QAAQ,EAAE;AACrB,wBAAA,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,GAAG,GAAG,GAAG,UAAU,CAAC;;;AAG5D,aAAC,CAAC;;AAGJ,QAAA,IAAI,CAAC,eAAe,GAAG,QAAQ;;AAElC;;;;"}
|
package/fesm2022/browser.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v20.0.0-rc.
|
2
|
+
* @license Angular v20.0.0-rc.2
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -53,10 +53,10 @@ class NoopAnimationDriver {
|
|
53
53
|
animate(element, keyframes, duration, delay, easing, previousPlayers = [], scrubberAccessRequested) {
|
54
54
|
return new NoopAnimationPlayer(duration, delay);
|
55
55
|
}
|
56
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.
|
57
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-rc.
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
57
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: NoopAnimationDriver });
|
58
58
|
}
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.2", ngImport: i0, type: NoopAnimationDriver, decorators: [{
|
60
60
|
type: Injectable
|
61
61
|
}] });
|
62
62
|
/**
|
@@ -1786,7 +1786,7 @@ function balanceProperties(stateMap, key1, key2) {
|
|
1786
1786
|
}
|
1787
1787
|
}
|
1788
1788
|
|
1789
|
-
const EMPTY_INSTRUCTION_MAP = new ElementInstructionMap();
|
1789
|
+
const EMPTY_INSTRUCTION_MAP = /* @__PURE__ */ new ElementInstructionMap();
|
1790
1790
|
class TimelineAnimationEngine {
|
1791
1791
|
bodyNode;
|
1792
1792
|
_driver;
|
@@ -1975,7 +1975,7 @@ class StateValue {
|
|
1975
1975
|
}
|
1976
1976
|
}
|
1977
1977
|
const VOID_VALUE = 'void';
|
1978
|
-
const DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE);
|
1978
|
+
const DEFAULT_STATE_VALUE = /* @__PURE__ */ new StateValue(VOID_VALUE);
|
1979
1979
|
class AnimationTransitionNamespace {
|
1980
1980
|
id;
|
1981
1981
|
hostElement;
|
@@ -4166,5 +4166,5 @@ class AnimationRendererFactory {
|
|
4166
4166
|
}
|
4167
4167
|
}
|
4168
4168
|
|
4169
|
-
export { AnimationDriver, NoopAnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationRenderer as ɵAnimationRenderer, AnimationRendererFactory as ɵAnimationRendererFactory, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, BaseAnimationRenderer as ɵBaseAnimationRenderer, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, camelCaseToDashCase as ɵcamelCaseToDashCase, containsElement as ɵcontainsElement, createEngine as ɵcreateEngine, getParentElement as ɵgetParentElement, invokeQuery as ɵinvokeQuery, normalizeKeyframes$1 as ɵnormalizeKeyframes, validateStyleProperty as ɵvalidateStyleProperty, validateWebAnimatableStyleProperty as ɵvalidateWebAnimatableStyleProperty };
|
4169
|
+
export { AnimationDriver, NoopAnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationRenderer as ɵAnimationRenderer, AnimationRendererFactory as ɵAnimationRendererFactory, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, BaseAnimationRenderer as ɵBaseAnimationRenderer, ENTER_CLASSNAME as ɵENTER_CLASSNAME, LEAVE_CLASSNAME as ɵLEAVE_CLASSNAME, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, TransitionAnimationPlayer as ɵTransitionAnimationPlayer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, camelCaseToDashCase as ɵcamelCaseToDashCase, containsElement as ɵcontainsElement, createEngine as ɵcreateEngine, getParentElement as ɵgetParentElement, invokeQuery as ɵinvokeQuery, normalizeKeyframes$1 as ɵnormalizeKeyframes, validateStyleProperty as ɵvalidateStyleProperty, validateWebAnimatableStyleProperty as ɵvalidateWebAnimatableStyleProperty };
|
4170
4170
|
//# sourceMappingURL=browser.mjs.map
|