@angular/animations
Advanced tools
| /** | ||
| * @license Angular v21.0.0-next.6 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| /** | ||
| * @description Constants for the categories of parameters that can be defined for animations. | ||
| * | ||
| * A corresponding function defines a set of parameters for each category, and | ||
| * collects them into a corresponding `AnimationMetadata` object. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| var AnimationMetadataType; | ||
| (function (AnimationMetadataType) { | ||
| /** | ||
| * Associates a named animation state with a set of CSS styles. | ||
| * See [`state()`](api/animations/state) | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["State"] = 0] = "State"; | ||
| /** | ||
| * Data for a transition from one animation state to another. | ||
| * See `transition()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Transition"] = 1] = "Transition"; | ||
| /** | ||
| * Contains a set of animation steps. | ||
| * See `sequence()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Sequence"] = 2] = "Sequence"; | ||
| /** | ||
| * Contains a set of animation steps. | ||
| * See `group()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Group"] = 3] = "Group"; | ||
| /** | ||
| * Contains an animation step. | ||
| * See `animate()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Animate"] = 4] = "Animate"; | ||
| /** | ||
| * Contains a set of animation steps. | ||
| * See `keyframes()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Keyframes"] = 5] = "Keyframes"; | ||
| /** | ||
| * Contains a set of CSS property-value pairs into a named style. | ||
| * See `style()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Style"] = 6] = "Style"; | ||
| /** | ||
| * Associates an animation with an entry trigger that can be attached to an element. | ||
| * See `trigger()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Trigger"] = 7] = "Trigger"; | ||
| /** | ||
| * Contains a re-usable animation. | ||
| * See `animation()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Reference"] = 8] = "Reference"; | ||
| /** | ||
| * Contains data to use in executing child animations returned by a query. | ||
| * See `animateChild()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["AnimateChild"] = 9] = "AnimateChild"; | ||
| /** | ||
| * Contains animation parameters for a re-usable animation. | ||
| * See `useAnimation()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["AnimateRef"] = 10] = "AnimateRef"; | ||
| /** | ||
| * Contains child-animation query data. | ||
| * See `query()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Query"] = 11] = "Query"; | ||
| /** | ||
| * Contains data for staggering an animation sequence. | ||
| * See `stagger()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Stagger"] = 12] = "Stagger"; | ||
| })(AnimationMetadataType || (AnimationMetadataType = {})); | ||
| /** | ||
| * Specifies automatic styling. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| const AUTO_STYLE = '*'; | ||
| /** | ||
| * Creates a named animation trigger, containing a list of [`state()`](api/animations/state) | ||
| * and `transition()` entries to be evaluated when the expression | ||
| * bound to the trigger changes. | ||
| * | ||
| * @param name An identifying string. | ||
| * @param definitions An animation definition object, containing an array of | ||
| * [`state()`](api/animations/state) and `transition()` declarations. | ||
| * | ||
| * @return An object that encapsulates the trigger data. | ||
| * | ||
| * @usageNotes | ||
| * Define an animation trigger in the `animations` section of `@Component` metadata. | ||
| * In the template, reference the trigger by name and bind it to a trigger expression that | ||
| * evaluates to a defined animation state, using the following format: | ||
| * | ||
| * `[@triggerName]="expression"` | ||
| * | ||
| * Animation trigger bindings convert all values to strings, and then match the | ||
| * previous and current values against any linked transitions. | ||
| * Booleans can be specified as `1` or `true` and `0` or `false`. | ||
| * | ||
| * ### Usage Example | ||
| * | ||
| * The following example creates an animation trigger reference based on the provided | ||
| * name value. | ||
| * The provided animation value is expected to be an array consisting of state and | ||
| * transition declarations. | ||
| * | ||
| * ```ts | ||
| * @Component({ | ||
| * selector: "my-component", | ||
| * templateUrl: "my-component-tpl.html", | ||
| * animations: [ | ||
| * trigger("myAnimationTrigger", [ | ||
| * state(...), | ||
| * state(...), | ||
| * transition(...), | ||
| * transition(...) | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * myStatusExp = "something"; | ||
| * } | ||
| * ``` | ||
| * | ||
| * The template associated with this component makes use of the defined trigger | ||
| * by binding to an element within its template code. | ||
| * | ||
| * ```html | ||
| * <!-- somewhere inside of my-component-tpl.html --> | ||
| * <div [@myAnimationTrigger]="myStatusExp">...</div> | ||
| * ``` | ||
| * | ||
| * ### Using an inline function | ||
| * The `transition` animation method also supports reading an inline function which can decide | ||
| * if its associated animation should be run. | ||
| * | ||
| * ```ts | ||
| * // this method is run each time the `myAnimationTrigger` trigger value changes. | ||
| * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key: | ||
| string]: any}): boolean { | ||
| * // notice that `element` and `params` are also available here | ||
| * return toState == 'yes-please-animate'; | ||
| * } | ||
| * | ||
| * @Component({ | ||
| * selector: 'my-component', | ||
| * templateUrl: 'my-component-tpl.html', | ||
| * animations: [ | ||
| * trigger('myAnimationTrigger', [ | ||
| * transition(myInlineMatcherFn, [ | ||
| * // the animation sequence code | ||
| * ]), | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * myStatusExp = "yes-please-animate"; | ||
| * } | ||
| * ``` | ||
| * | ||
| * ### Disabling Animations | ||
| * When true, the special animation control binding `@.disabled` binding prevents | ||
| * all animations from rendering. | ||
| * Place the `@.disabled` binding on an element to disable | ||
| * animations on the element itself, as well as any inner animation triggers | ||
| * within the element. | ||
| * | ||
| * The following example shows how to use this feature: | ||
| * | ||
| * ```angular-ts | ||
| * @Component({ | ||
| * selector: 'my-component', | ||
| * template: ` | ||
| * <div [@.disabled]="isDisabled"> | ||
| * <div [@childAnimation]="exp"></div> | ||
| * </div> | ||
| * `, | ||
| * animations: [ | ||
| * trigger("childAnimation", [ | ||
| * // ... | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * isDisabled = true; | ||
| * exp = '...'; | ||
| * } | ||
| * ``` | ||
| * | ||
| * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating, | ||
| * along with any inner animations. | ||
| * | ||
| * ### Disable animations application-wide | ||
| * When an area of the template is set to have animations disabled, | ||
| * **all** inner components have their animations disabled as well. | ||
| * This means that you can disable all animations for an app | ||
| * by placing a host binding set on `@.disabled` on the topmost Angular component. | ||
| * | ||
| * ```ts | ||
| * import {Component, HostBinding} from '@angular/core'; | ||
| * | ||
| * @Component({ | ||
| * selector: 'app-component', | ||
| * templateUrl: 'app.component.html', | ||
| * }) | ||
| * class AppComponent { | ||
| * @HostBinding('@.disabled') | ||
| * public animationsDisabled = true; | ||
| * } | ||
| * ``` | ||
| * | ||
| * ### Overriding disablement of inner animations | ||
| * Despite inner animations being disabled, a parent animation can `query()` | ||
| * for inner elements located in disabled areas of the template and still animate | ||
| * them if needed. This is also the case for when a sub animation is | ||
| * queried by a parent and then later animated using `animateChild()`. | ||
| * | ||
| * ### Detecting when an animation is disabled | ||
| * If a region of the DOM (or the entire application) has its animations disabled, the animation | ||
| * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides | ||
| * an instance of an `AnimationEvent`. If animations are disabled, | ||
| * the `.disabled` flag on the event is true. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function trigger(name, definitions) { | ||
| return { type: AnimationMetadataType.Trigger, name, definitions, options: {} }; | ||
| } | ||
| /** | ||
| * Defines an animation step that combines styling information with timing information. | ||
| * | ||
| * @param timings Sets `AnimateTimings` for the parent animation. | ||
| * A string in the format "duration [delay] [easing]". | ||
| * - Duration and delay are expressed as a number and optional time unit, | ||
| * such as "1s" or "10ms" for one second and 10 milliseconds, respectively. | ||
| * The default unit is milliseconds. | ||
| * - The easing value controls how the animation accelerates and decelerates | ||
| * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`, | ||
| * `ease-in-out`, or a `cubic-bezier()` function call. | ||
| * If not supplied, no easing is applied. | ||
| * | ||
| * For example, the string "1s 100ms ease-out" specifies a duration of | ||
| * 1000 milliseconds, and delay of 100 ms, and the "ease-out" easing style, | ||
| * which decelerates near the end of the duration. | ||
| * @param styles Sets AnimationStyles for the parent animation. | ||
| * A function call to either `style()` or `keyframes()` | ||
| * that returns a collection of CSS style entries to be applied to the parent animation. | ||
| * When null, uses the styles from the destination state. | ||
| * This is useful when describing an animation step that will complete an animation; | ||
| * see "Animating to the final state" in `transitions()`. | ||
| * @returns An object that encapsulates the animation step. | ||
| * | ||
| * @usageNotes | ||
| * Call within an animation `sequence()`, {@link /api/animations/group group()}, or | ||
| * `transition()` call to specify an animation step | ||
| * that applies given style data to the parent animation for a given amount of time. | ||
| * | ||
| * ### Syntax Examples | ||
| * **Timing examples** | ||
| * | ||
| * The following examples show various `timings` specifications. | ||
| * - `animate(500)` : Duration is 500 milliseconds. | ||
| * - `animate("1s")` : Duration is 1000 milliseconds. | ||
| * - `animate("100ms 0.5s")` : Duration is 100 milliseconds, delay is 500 milliseconds. | ||
| * - `animate("5s ease-in")` : Duration is 5000 milliseconds, easing in. | ||
| * - `animate("5s 10ms cubic-bezier(.17,.67,.88,.1)")` : Duration is 5000 milliseconds, delay is 10 | ||
| * milliseconds, easing according to a bezier curve. | ||
| * | ||
| * **Style examples** | ||
| * | ||
| * The following example calls `style()` to set a single CSS style. | ||
| * ```ts | ||
| * animate(500, style({ background: "red" })) | ||
| * ``` | ||
| * The following example calls `keyframes()` to set a CSS style | ||
| * to different values for successive keyframes. | ||
| * ```ts | ||
| * animate(500, keyframes( | ||
| * [ | ||
| * style({ background: "blue" }), | ||
| * style({ background: "red" }) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function animate(timings, styles = null) { | ||
| return { type: AnimationMetadataType.Animate, styles, timings }; | ||
| } | ||
| /** | ||
| * @description Defines a list of animation steps to be run in parallel. | ||
| * | ||
| * @param steps An array of animation step objects. | ||
| * - When steps are defined by `style()` or `animate()` | ||
| * function calls, each call within the group is executed instantly. | ||
| * - To specify offset styles to be applied at a later time, define steps with | ||
| * `keyframes()`, or use `animate()` calls with a delay value. | ||
| * For example: | ||
| * | ||
| * ```ts | ||
| * group([ | ||
| * animate("1s", style({ background: "black" })), | ||
| * animate("2s", style({ color: "white" })) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @param options An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. | ||
| * | ||
| * @return An object that encapsulates the group data. | ||
| * | ||
| * @usageNotes | ||
| * Grouped animations are useful when a series of styles must be | ||
| * animated at different starting times and closed off at different ending times. | ||
| * | ||
| * When called within a `sequence()` or a | ||
| * `transition()` call, does not continue to the next | ||
| * instruction until all of the inner animation steps have completed. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function group(steps, options = null) { | ||
| return { type: AnimationMetadataType.Group, steps, options }; | ||
| } | ||
| /** | ||
| * Defines a list of animation steps to be run sequentially, one by one. | ||
| * | ||
| * @param steps An array of animation step objects. | ||
| * - Steps defined by `style()` calls apply the styling data immediately. | ||
| * - Steps defined by `animate()` calls apply the styling data over time | ||
| * as specified by the timing data. | ||
| * | ||
| * ```ts | ||
| * sequence([ | ||
| * style({ opacity: 0 }), | ||
| * animate("1s", style({ opacity: 1 })) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @param options An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. | ||
| * | ||
| * @return An object that encapsulates the sequence data. | ||
| * | ||
| * @usageNotes | ||
| * When you pass an array of steps to a | ||
| * `transition()` call, the steps run sequentially by default. | ||
| * Compare this to the {@link /api/animations/group group()} call, which runs animation steps in | ||
| *parallel. | ||
| * | ||
| * When a sequence is used within a {@link /api/animations/group group()} or a `transition()` call, | ||
| * execution continues to the next instruction only after each of the inner animation | ||
| * steps have completed. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| function sequence(steps, options = null) { | ||
| return { type: AnimationMetadataType.Sequence, steps, options }; | ||
| } | ||
| /** | ||
| * Declares a key/value object containing CSS properties/styles that | ||
| * can then be used for an animation [`state`](api/animations/state), within an animation | ||
| *`sequence`, or as styling data for calls to `animate()` and `keyframes()`. | ||
| * | ||
| * @param tokens A set of CSS styles or HTML styles associated with an animation state. | ||
| * The value can be any of the following: | ||
| * - A key-value style pair associating a CSS property with a value. | ||
| * - An array of key-value style pairs. | ||
| * - An asterisk (*), to use auto-styling, where styles are derived from the element | ||
| * being animated and applied to the animation when it starts. | ||
| * | ||
| * Auto-styling can be used to define a state that depends on layout or other | ||
| * environmental factors. | ||
| * | ||
| * @return An object that encapsulates the style data. | ||
| * | ||
| * @usageNotes | ||
| * The following examples create animation styles that collect a set of | ||
| * CSS property values: | ||
| * | ||
| * ```ts | ||
| * // string values for CSS properties | ||
| * style({ background: "red", color: "blue" }) | ||
| * | ||
| * // numerical pixel values | ||
| * style({ width: 100, height: 0 }) | ||
| * ``` | ||
| * | ||
| * The following example uses auto-styling to allow an element to animate from | ||
| * a height of 0 up to its full height: | ||
| * | ||
| * ```ts | ||
| * style({ height: 0 }), | ||
| * animate("1s", style({ height: "*" })) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| function style(tokens) { | ||
| return { type: AnimationMetadataType.Style, styles: tokens, offset: null }; | ||
| } | ||
| /** | ||
| * Declares an animation state within a trigger attached to an element. | ||
| * | ||
| * @param name One or more names for the defined state in a comma-separated string. | ||
| * The following reserved state names can be supplied to define a style for specific use | ||
| * cases: | ||
| * | ||
| * - `void` You can associate styles with this name to be used when | ||
| * the element is detached from the application. For example, when an `ngIf` evaluates | ||
| * to false, the state of the associated element is void. | ||
| * - `*` (asterisk) Indicates the default state. You can associate styles with this name | ||
| * to be used as the fallback when the state that is being animated is not declared | ||
| * within the trigger. | ||
| * | ||
| * @param styles A set of CSS styles associated with this state, created using the | ||
| * `style()` function. | ||
| * This set of styles persists on the element once the state has been reached. | ||
| * @param options Parameters that can be passed to the state when it is invoked. | ||
| * 0 or more key-value pairs. | ||
| * @return An object that encapsulates the new state data. | ||
| * | ||
| * @usageNotes | ||
| * Use the `trigger()` function to register states to an animation trigger. | ||
| * Use the `transition()` function to animate between states. | ||
| * When a state is active within a component, its associated styles persist on the element, | ||
| * even when the animation ends. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| function state(name, styles, options) { | ||
| return { type: AnimationMetadataType.State, name, styles, options }; | ||
| } | ||
| /** | ||
| * Defines a set of animation styles, associating each style with an optional `offset` value. | ||
| * | ||
| * @param steps A set of animation styles with optional offset data. | ||
| * The optional `offset` value for a style specifies a percentage of the total animation | ||
| * time at which that style is applied. | ||
| * @returns An object that encapsulates the keyframes data. | ||
| * | ||
| * @usageNotes | ||
| * Use with the `animate()` call. Instead of applying animations | ||
| * from the current state | ||
| * to the destination state, keyframes describe how each style entry is applied and at what point | ||
| * within the animation arc. | ||
| * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp). | ||
| * | ||
| * ### Usage | ||
| * | ||
| * In the following example, the offset values describe | ||
| * when each `backgroundColor` value is applied. The color is red at the start, and changes to | ||
| * blue when 20% of the total time has elapsed. | ||
| * | ||
| * ```ts | ||
| * // the provided offset values | ||
| * animate("5s", keyframes([ | ||
| * style({ backgroundColor: "red", offset: 0 }), | ||
| * style({ backgroundColor: "blue", offset: 0.2 }), | ||
| * style({ backgroundColor: "orange", offset: 0.3 }), | ||
| * style({ backgroundColor: "black", offset: 1 }) | ||
| * ])) | ||
| * ``` | ||
| * | ||
| * If there are no `offset` values specified in the style entries, the offsets | ||
| * are calculated automatically. | ||
| * | ||
| * ```ts | ||
| * animate("5s", keyframes([ | ||
| * style({ backgroundColor: "red" }) // offset = 0 | ||
| * style({ backgroundColor: "blue" }) // offset = 0.33 | ||
| * style({ backgroundColor: "orange" }) // offset = 0.66 | ||
| * style({ backgroundColor: "black" }) // offset = 1 | ||
| * ])) | ||
| *``` | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function keyframes(steps) { | ||
| return { type: AnimationMetadataType.Keyframes, steps }; | ||
| } | ||
| /** | ||
| * Declares an animation transition which is played when a certain specified condition is met. | ||
| * | ||
| * @param stateChangeExpr A string with a specific format or a function that specifies when the | ||
| * animation transition should occur (see [State Change Expression](#state-change-expression)). | ||
| * | ||
| * @param steps One or more animation objects that represent the animation's instructions. | ||
| * | ||
| * @param options An options object that can be used to specify a delay for the animation or provide | ||
| * custom parameters for it. | ||
| * | ||
| * @returns An object that encapsulates the transition data. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * ### State Change Expression | ||
| * | ||
| * The State Change Expression instructs Angular when to run the transition's animations, it can | ||
| *either be | ||
| * - a string with a specific syntax | ||
| * - or a function that compares the previous and current state (value of the expression bound to | ||
| * the element's trigger) and returns `true` if the transition should occur or `false` otherwise | ||
| * | ||
| * The string format can be: | ||
| * - `fromState => toState`, which indicates that the transition's animations should occur then the | ||
| * expression bound to the trigger's element goes from `fromState` to `toState` | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition('open => closed', animate('.5s ease-out', style({ height: 0 }) )) | ||
| * ``` | ||
| * | ||
| * - `fromState <=> toState`, which indicates that the transition's animations should occur then | ||
| * the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)')) | ||
| * ``` | ||
| * | ||
| * - `:enter`/`:leave`, which indicates that the transition's animations should occur when the | ||
| * element enters or exists the DOM | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition(':enter', [ | ||
| * style({ opacity: 0 }), | ||
| * animate('500ms', style({ opacity: 1 })) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * - `:increment`/`:decrement`, which indicates that the transition's animations should occur when | ||
| * the numerical expression bound to the trigger's element has increased in value or decreased | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition(':increment', query('@counter', animateChild())) | ||
| * ``` | ||
| * | ||
| * - a sequence of any of the above divided by commas, which indicates that transition's animations | ||
| * should occur whenever one of the state change expressions matches | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([ | ||
| * style({ transform: 'scale(1)', offset: 0}), | ||
| * style({ transform: 'scale(1.1)', offset: 0.7}), | ||
| * style({ transform: 'scale(1)', offset: 1}) | ||
| * ]))), | ||
| * ``` | ||
| * | ||
| * Also note that in such context: | ||
| * - `void` can be used to indicate the absence of the element | ||
| * - asterisks can be used as wildcards that match any state | ||
| * - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is | ||
| * equivalent to `:leave`) | ||
| * - `true` and `false` also match expression values of `1` and `0` respectively (but do not match | ||
| * _truthy_ and _falsy_ values) | ||
| * | ||
| * <div class="docs-alert docs-alert-helpful"> | ||
| * | ||
| * Be careful about entering end leaving elements as their transitions present a common | ||
| * pitfall for developers. | ||
| * | ||
| * Note that when an element with a trigger enters the DOM its `:enter` transition always | ||
| * gets executed, but its `:leave` transition will not be executed if the element is removed | ||
| * alongside its parent (as it will be removed "without warning" before its transition has | ||
| * a chance to be executed, the only way that such transition can occur is if the element | ||
| * is exiting the DOM on its own). | ||
| * | ||
| * | ||
| * </div> | ||
| * | ||
| * ### Animating to a Final State | ||
| * | ||
| * If the final step in a transition is a call to `animate()` that uses a timing value | ||
| * with no `style` data, that step is automatically considered the final animation arc, | ||
| * for the element to reach the final state, in such case Angular automatically adds or removes | ||
| * CSS styles to ensure that the element is in the correct final state. | ||
| * | ||
| * | ||
| * ### Usage Examples | ||
| * | ||
| * - Transition animations applied based on | ||
| * the trigger's expression value | ||
| * | ||
| * ```html | ||
| * <div [@myAnimationTrigger]="myStatusExp"> | ||
| * ... | ||
| * </div> | ||
| * ``` | ||
| * | ||
| * ```ts | ||
| * trigger("myAnimationTrigger", [ | ||
| * ..., // states | ||
| * transition("on => off, open => closed", animate(500)), | ||
| * transition("* <=> error", query('.indicator', animateChild())) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * - Transition animations applied based on custom logic dependent | ||
| * on the trigger's expression value and provided parameters | ||
| * | ||
| * ```html | ||
| * <div [@myAnimationTrigger]="{ | ||
| * value: stepName, | ||
| * params: { target: currentTarget } | ||
| * }"> | ||
| * ... | ||
| * </div> | ||
| * ``` | ||
| * | ||
| * ```ts | ||
| * trigger("myAnimationTrigger", [ | ||
| * ..., // states | ||
| * transition( | ||
| * (fromState, toState, _element, params) => | ||
| * ['firststep', 'laststep'].includes(fromState.toLowerCase()) | ||
| * && toState === params?.['target'], | ||
| * animate('1s') | ||
| * ) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| function transition(stateChangeExpr, steps, options = null) { | ||
| return { type: AnimationMetadataType.Transition, expr: stateChangeExpr, animation: steps, options }; | ||
| } | ||
| /** | ||
| * Produces a reusable animation that can be invoked in another animation or sequence, | ||
| * by calling the `useAnimation()` function. | ||
| * | ||
| * @param steps One or more animation objects, as returned by the `animate()` | ||
| * or `sequence()` function, that form a transformation from one state to another. | ||
| * A sequence is used by default when you pass an array. | ||
| * @param options An options object that can contain a delay value for the start of the | ||
| * animation, and additional developer-defined parameters. | ||
| * Provided values for additional parameters are used as defaults, | ||
| * and override values can be passed to the caller on invocation. | ||
| * @returns An object that encapsulates the animation data. | ||
| * | ||
| * @usageNotes | ||
| * The following example defines a reusable animation, providing some default parameter | ||
| * values. | ||
| * | ||
| * ```ts | ||
| * var fadeAnimation = animation([ | ||
| * style({ opacity: '{{ start }}' }), | ||
| * animate('{{ time }}', | ||
| * style({ opacity: '{{ end }}'})) | ||
| * ], | ||
| * { params: { time: '1000ms', start: 0, end: 1 }}); | ||
| * ``` | ||
| * | ||
| * The following invokes the defined animation with a call to `useAnimation()`, | ||
| * passing in override parameter values. | ||
| * | ||
| * ```js | ||
| * useAnimation(fadeAnimation, { | ||
| * params: { | ||
| * time: '2s', | ||
| * start: 1, | ||
| * end: 0 | ||
| * } | ||
| * }) | ||
| * ``` | ||
| * | ||
| * If any of the passed-in parameter values are missing from this call, | ||
| * the default values are used. If one or more parameter values are missing before a step is | ||
| * animated, `useAnimation()` throws an error. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function animation(steps, options = null) { | ||
| return { type: AnimationMetadataType.Reference, animation: steps, options }; | ||
| } | ||
| /** | ||
| * Executes a queried inner animation element within an animation sequence. | ||
| * | ||
| * @param options An options object that can contain a delay value for the start of the | ||
| * animation, and additional override values for developer-defined parameters. | ||
| * @return An object that encapsulates the child animation data. | ||
| * | ||
| * @usageNotes | ||
| * Each time an animation is triggered in Angular, the parent animation | ||
| * has priority and any child animations are blocked. In order | ||
| * for a child animation to run, the parent animation must query each of the elements | ||
| * containing child animations, and run them using this function. | ||
| * | ||
| * Note that this feature is designed to be used with `query()` and it will only work | ||
| * with animations that are assigned using the Angular animation library. CSS keyframes | ||
| * and transitions are not handled by this API. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function animateChild(options = null) { | ||
| return { type: AnimationMetadataType.AnimateChild, options }; | ||
| } | ||
| /** | ||
| * Starts a reusable animation that is created using the `animation()` function. | ||
| * | ||
| * @param animation The reusable animation to start. | ||
| * @param options An options object that can contain a delay value for the start of | ||
| * the animation, and additional override values for developer-defined parameters. | ||
| * @return An object that contains the animation parameters. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function useAnimation(animation, options = null) { | ||
| return { type: AnimationMetadataType.AnimateRef, animation, options }; | ||
| } | ||
| /** | ||
| * Finds one or more inner elements within the current element that is | ||
| * being animated within a sequence. Use with `animate()`. | ||
| * | ||
| * @param selector The element to query, or a set of elements that contain Angular-specific | ||
| * characteristics, specified with one or more of the following tokens. | ||
| * - `query(":enter")` or `query(":leave")` : Query for newly inserted/removed elements (not | ||
| * all elements can be queried via these tokens, see | ||
| * [Entering and Leaving Elements](#entering-and-leaving-elements)) | ||
| * - `query(":animating")` : Query all currently animating elements. | ||
| * - `query("@triggerName")` : Query elements that contain an animation trigger. | ||
| * - `query("@*")` : Query all elements that contain an animation triggers. | ||
| * - `query(":self")` : Include the current element into the animation sequence. | ||
| * | ||
| * @param animation One or more animation steps to apply to the queried element or elements. | ||
| * An array is treated as an animation sequence. | ||
| * @param options An options object. Use the 'limit' field to limit the total number of | ||
| * items to collect. | ||
| * @return An object that encapsulates the query data. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * ### Multiple Tokens | ||
| * | ||
| * Tokens can be merged into a combined query selector string. For example: | ||
| * | ||
| * ```ts | ||
| * query(':self, .record:enter, .record:leave, @subTrigger', [...]) | ||
| * ``` | ||
| * | ||
| * The `query()` function collects multiple elements and works internally by using | ||
| * `element.querySelectorAll`. Use the `limit` field of an options object to limit | ||
| * the total number of items to be collected. For example: | ||
| * | ||
| * ```js | ||
| * query('div', [ | ||
| * animate(...), | ||
| * animate(...) | ||
| * ], { limit: 1 }) | ||
| * ``` | ||
| * | ||
| * By default, throws an error when zero items are found. Set the | ||
| * `optional` flag to ignore this error. For example: | ||
| * | ||
| * ```js | ||
| * query('.some-element-that-may-not-be-there', [ | ||
| * animate(...), | ||
| * animate(...) | ||
| * ], { optional: true }) | ||
| * ``` | ||
| * | ||
| * ### Entering and Leaving Elements | ||
| * | ||
| * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones | ||
| * that can are those that Angular assumes can enter/leave based on their own logic | ||
| * (if their insertion/removal is simply a consequence of that of their parent they | ||
| * should be queried via a different token in their parent's `:enter`/`:leave` transitions). | ||
| * | ||
| * The only elements Angular assumes can enter/leave based on their own logic (thus the only | ||
| * ones that can be queried via the `:enter` and `:leave` tokens) are: | ||
| * - Those inserted dynamically (via `ViewContainerRef`) | ||
| * - Those that have a structural directive (which, under the hood, are a subset of the above ones) | ||
| * | ||
| * <div class="docs-alert docs-alert-helpful"> | ||
| * | ||
| * Note that elements will be successfully queried via `:enter`/`:leave` even if their | ||
| * insertion/removal is not done manually via `ViewContainerRef`or caused by their structural | ||
| * directive (e.g. they enter/exit alongside their parent). | ||
| * | ||
| * </div> | ||
| * | ||
| * <div class="docs-alert docs-alert-important"> | ||
| * | ||
| * There is an exception to what previously mentioned, besides elements entering/leaving based on | ||
| * their own logic, elements with an animation trigger can always be queried via `:leave` when | ||
| * their parent is also leaving. | ||
| * | ||
| * </div> | ||
| * | ||
| * ### Usage Example | ||
| * | ||
| * The following example queries for inner elements and animates them | ||
| * individually using `animate()`. | ||
| * | ||
| * ```angular-ts | ||
| * @Component({ | ||
| * selector: 'inner', | ||
| * template: ` | ||
| * <div [@queryAnimation]="exp"> | ||
| * <h1>Title</h1> | ||
| * <div class="content"> | ||
| * Blah blah blah | ||
| * </div> | ||
| * </div> | ||
| * `, | ||
| * animations: [ | ||
| * trigger('queryAnimation', [ | ||
| * transition('* => goAnimate', [ | ||
| * // hide the inner elements | ||
| * query('h1', style({ opacity: 0 })), | ||
| * query('.content', style({ opacity: 0 })), | ||
| * | ||
| * // animate the inner elements in, one by one | ||
| * query('h1', animate(1000, style({ opacity: 1 }))), | ||
| * query('.content', animate(1000, style({ opacity: 1 }))), | ||
| * ]) | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class Cmp { | ||
| * exp = ''; | ||
| * | ||
| * goAnimate() { | ||
| * this.exp = 'goAnimate'; | ||
| * } | ||
| * } | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function query(selector, animation, options = null) { | ||
| return { type: AnimationMetadataType.Query, selector, animation, options }; | ||
| } | ||
| /** | ||
| * Use within an animation `query()` call to issue a timing gap after | ||
| * each queried item is animated. | ||
| * | ||
| * @param timings A delay value. | ||
| * @param animation One ore more animation steps. | ||
| * @returns An object that encapsulates the stagger data. | ||
| * | ||
| * @usageNotes | ||
| * In the following example, a container element wraps a list of items stamped out | ||
| * by an `@for` block. The container element contains an animation trigger that will later be set | ||
| * to query for each of the inner items. | ||
| * | ||
| * Each time items are added, the opacity fade-in animation runs, | ||
| * and each removed item is faded out. | ||
| * When either of these animations occur, the stagger effect is | ||
| * applied after each item's animation is started. | ||
| * | ||
| * ```html | ||
| * <!-- list.component.html --> | ||
| * <button (click)="toggle()">Show / Hide Items</button> | ||
| * <hr /> | ||
| * <div [@listAnimation]="items.length"> | ||
| * @for(item of items; track $index) { | ||
| * <div>{{ item }}</div> | ||
| * } | ||
| * </div> | ||
| * ``` | ||
| * | ||
| * Here is the component code: | ||
| * | ||
| * ```ts | ||
| * import {trigger, transition, style, animate, query, stagger} from '@angular/animations'; | ||
| * @Component({ | ||
| * templateUrl: 'list.component.html', | ||
| * animations: [ | ||
| * trigger('listAnimation', [ | ||
| * ... | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class ListComponent { | ||
| * items = []; | ||
| * | ||
| * showItems() { | ||
| * this.items = [0,1,2,3,4]; | ||
| * } | ||
| * | ||
| * hideItems() { | ||
| * this.items = []; | ||
| * } | ||
| * | ||
| * toggle() { | ||
| * this.items.length ? this.hideItems() : this.showItems(); | ||
| * } | ||
| * } | ||
| * ``` | ||
| * | ||
| * Here is the animation trigger code: | ||
| * | ||
| * ```ts | ||
| * trigger('listAnimation', [ | ||
| * transition('* => *', [ // each time the binding value changes | ||
| * query(':leave', [ | ||
| * stagger(100, [ | ||
| * animate('0.5s', style({ opacity: 0 })) | ||
| * ]) | ||
| * ]), | ||
| * query(':enter', [ | ||
| * style({ opacity: 0 }), | ||
| * stagger(100, [ | ||
| * animate('0.5s', style({ opacity: 1 })) | ||
| * ]) | ||
| * ]) | ||
| * ]) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function stagger(timings, animation) { | ||
| return { type: AnimationMetadataType.Stagger, timings, animation }; | ||
| } | ||
| /** | ||
| * An empty programmatic controller for reusable animations. | ||
| * Used internally when animations are disabled, to avoid | ||
| * checking for the null case when an animation player is expected. | ||
| * | ||
| * @see {@link animate} | ||
| * @see {@link AnimationPlayer} | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| class NoopAnimationPlayer { | ||
| _onDoneFns = []; | ||
| _onStartFns = []; | ||
| _onDestroyFns = []; | ||
| _originalOnDoneFns = []; | ||
| _originalOnStartFns = []; | ||
| _started = false; | ||
| _destroyed = false; | ||
| _finished = false; | ||
| _position = 0; | ||
| parentPlayer = null; | ||
| totalTime; | ||
| constructor(duration = 0, delay = 0) { | ||
| this.totalTime = duration + delay; | ||
| } | ||
| _onFinish() { | ||
| if (!this._finished) { | ||
| this._finished = true; | ||
| this._onDoneFns.forEach((fn) => fn()); | ||
| this._onDoneFns = []; | ||
| } | ||
| } | ||
| onStart(fn) { | ||
| this._originalOnStartFns.push(fn); | ||
| this._onStartFns.push(fn); | ||
| } | ||
| onDone(fn) { | ||
| this._originalOnDoneFns.push(fn); | ||
| this._onDoneFns.push(fn); | ||
| } | ||
| onDestroy(fn) { | ||
| this._onDestroyFns.push(fn); | ||
| } | ||
| hasStarted() { | ||
| return this._started; | ||
| } | ||
| init() { } | ||
| play() { | ||
| if (!this.hasStarted()) { | ||
| this._onStart(); | ||
| this.triggerMicrotask(); | ||
| } | ||
| this._started = true; | ||
| } | ||
| /** @internal */ | ||
| triggerMicrotask() { | ||
| queueMicrotask(() => this._onFinish()); | ||
| } | ||
| _onStart() { | ||
| this._onStartFns.forEach((fn) => fn()); | ||
| this._onStartFns = []; | ||
| } | ||
| pause() { } | ||
| restart() { } | ||
| finish() { | ||
| this._onFinish(); | ||
| } | ||
| destroy() { | ||
| if (!this._destroyed) { | ||
| this._destroyed = true; | ||
| if (!this.hasStarted()) { | ||
| this._onStart(); | ||
| } | ||
| this.finish(); | ||
| this._onDestroyFns.forEach((fn) => fn()); | ||
| this._onDestroyFns = []; | ||
| } | ||
| } | ||
| reset() { | ||
| this._started = false; | ||
| this._finished = false; | ||
| this._onStartFns = this._originalOnStartFns; | ||
| this._onDoneFns = this._originalOnDoneFns; | ||
| } | ||
| setPosition(position) { | ||
| this._position = this.totalTime ? position * this.totalTime : 1; | ||
| } | ||
| getPosition() { | ||
| return this.totalTime ? this._position / this.totalTime : 1; | ||
| } | ||
| /** @internal */ | ||
| triggerCallback(phaseName) { | ||
| const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns; | ||
| methods.forEach((fn) => fn()); | ||
| methods.length = 0; | ||
| } | ||
| } | ||
| /** | ||
| * A programmatic controller for a group of reusable animations. | ||
| * Used internally to control animations. | ||
| * | ||
| * @see {@link AnimationPlayer} | ||
| * @see {@link animations/group group} | ||
| * | ||
| */ | ||
| class AnimationGroupPlayer { | ||
| _onDoneFns = []; | ||
| _onStartFns = []; | ||
| _finished = false; | ||
| _started = false; | ||
| _destroyed = false; | ||
| _onDestroyFns = []; | ||
| parentPlayer = null; | ||
| totalTime = 0; | ||
| players; | ||
| constructor(_players) { | ||
| this.players = _players; | ||
| let doneCount = 0; | ||
| let destroyCount = 0; | ||
| let startCount = 0; | ||
| const total = this.players.length; | ||
| if (total == 0) { | ||
| queueMicrotask(() => this._onFinish()); | ||
| } | ||
| else { | ||
| this.players.forEach((player) => { | ||
| player.onDone(() => { | ||
| if (++doneCount == total) { | ||
| this._onFinish(); | ||
| } | ||
| }); | ||
| player.onDestroy(() => { | ||
| if (++destroyCount == total) { | ||
| this._onDestroy(); | ||
| } | ||
| }); | ||
| player.onStart(() => { | ||
| if (++startCount == total) { | ||
| this._onStart(); | ||
| } | ||
| }); | ||
| }); | ||
| } | ||
| this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0); | ||
| } | ||
| _onFinish() { | ||
| if (!this._finished) { | ||
| this._finished = true; | ||
| this._onDoneFns.forEach((fn) => fn()); | ||
| this._onDoneFns = []; | ||
| } | ||
| } | ||
| init() { | ||
| this.players.forEach((player) => player.init()); | ||
| } | ||
| onStart(fn) { | ||
| this._onStartFns.push(fn); | ||
| } | ||
| _onStart() { | ||
| if (!this.hasStarted()) { | ||
| this._started = true; | ||
| this._onStartFns.forEach((fn) => fn()); | ||
| this._onStartFns = []; | ||
| } | ||
| } | ||
| onDone(fn) { | ||
| this._onDoneFns.push(fn); | ||
| } | ||
| onDestroy(fn) { | ||
| this._onDestroyFns.push(fn); | ||
| } | ||
| hasStarted() { | ||
| return this._started; | ||
| } | ||
| play() { | ||
| if (!this.parentPlayer) { | ||
| this.init(); | ||
| } | ||
| this._onStart(); | ||
| this.players.forEach((player) => player.play()); | ||
| } | ||
| pause() { | ||
| this.players.forEach((player) => player.pause()); | ||
| } | ||
| restart() { | ||
| this.players.forEach((player) => player.restart()); | ||
| } | ||
| finish() { | ||
| this._onFinish(); | ||
| this.players.forEach((player) => player.finish()); | ||
| } | ||
| destroy() { | ||
| this._onDestroy(); | ||
| } | ||
| _onDestroy() { | ||
| if (!this._destroyed) { | ||
| this._destroyed = true; | ||
| this._onFinish(); | ||
| this.players.forEach((player) => player.destroy()); | ||
| this._onDestroyFns.forEach((fn) => fn()); | ||
| this._onDestroyFns = []; | ||
| } | ||
| } | ||
| reset() { | ||
| this.players.forEach((player) => player.reset()); | ||
| this._destroyed = false; | ||
| this._finished = false; | ||
| this._started = false; | ||
| } | ||
| setPosition(p) { | ||
| const timeAtPosition = p * this.totalTime; | ||
| this.players.forEach((player) => { | ||
| const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1; | ||
| player.setPosition(position); | ||
| }); | ||
| } | ||
| getPosition() { | ||
| const longestPlayer = this.players.reduce((longestSoFar, player) => { | ||
| const newPlayerIsLongest = longestSoFar === null || player.totalTime > longestSoFar.totalTime; | ||
| return newPlayerIsLongest ? player : longestSoFar; | ||
| }, null); | ||
| return longestPlayer != null ? longestPlayer.getPosition() : 0; | ||
| } | ||
| beforeDestroy() { | ||
| this.players.forEach((player) => { | ||
| if (player.beforeDestroy) { | ||
| player.beforeDestroy(); | ||
| } | ||
| }); | ||
| } | ||
| /** @internal */ | ||
| triggerCallback(phaseName) { | ||
| const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns; | ||
| methods.forEach((fn) => fn()); | ||
| methods.length = 0; | ||
| } | ||
| } | ||
| const ɵPRE_STYLE = '!'; | ||
| export { AUTO_STYLE, AnimationGroupPlayer, AnimationMetadataType, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, ɵPRE_STYLE }; | ||
| //# sourceMappingURL=_private_export-chunk.mjs.map |
Sorry, the diff of this file is too big to display
| /** | ||
| * @license Angular v21.0.0-next.6 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| import { AnimationGroupPlayer, NoopAnimationPlayer, AUTO_STYLE, ɵPRE_STYLE as _PRE_STYLE, AnimationMetadataType, sequence } from './_private_export-chunk.mjs'; | ||
| import { ɵRuntimeError as _RuntimeError } from '@angular/core'; | ||
| const LINE_START = '\n - '; | ||
| function invalidTimingValue(exp) { | ||
| return new _RuntimeError(3000 /* RuntimeErrorCode.INVALID_TIMING_VALUE */, ngDevMode && `The provided timing value "${exp}" is invalid.`); | ||
| } | ||
| function negativeStepValue() { | ||
| return new _RuntimeError(3100 /* RuntimeErrorCode.NEGATIVE_STEP_VALUE */, ngDevMode && 'Duration values below 0 are not allowed for this animation step.'); | ||
| } | ||
| function negativeDelayValue() { | ||
| return new _RuntimeError(3101 /* RuntimeErrorCode.NEGATIVE_DELAY_VALUE */, ngDevMode && 'Delay values below 0 are not allowed for this animation step.'); | ||
| } | ||
| function invalidStyleParams(varName) { | ||
| return new _RuntimeError(3001 /* RuntimeErrorCode.INVALID_STYLE_PARAMS */, ngDevMode && | ||
| `Unable to resolve the local animation param ${varName} in the given list of values`); | ||
| } | ||
| function invalidParamValue(varName) { | ||
| return new _RuntimeError(3003 /* RuntimeErrorCode.INVALID_PARAM_VALUE */, ngDevMode && `Please provide a value for the animation param ${varName}`); | ||
| } | ||
| function invalidNodeType(nodeType) { | ||
| return new _RuntimeError(3004 /* RuntimeErrorCode.INVALID_NODE_TYPE */, ngDevMode && `Unable to resolve animation metadata node #${nodeType}`); | ||
| } | ||
| function invalidCssUnitValue(userProvidedProperty, value) { | ||
| return new _RuntimeError(3005 /* RuntimeErrorCode.INVALID_CSS_UNIT_VALUE */, ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`); | ||
| } | ||
| function invalidTrigger() { | ||
| return new _RuntimeError(3006 /* RuntimeErrorCode.INVALID_TRIGGER */, ngDevMode && | ||
| "animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"); | ||
| } | ||
| function invalidDefinition() { | ||
| return new _RuntimeError(3007 /* RuntimeErrorCode.INVALID_DEFINITION */, ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()'); | ||
| } | ||
| function invalidState(metadataName, missingSubs) { | ||
| return new _RuntimeError(3008 /* RuntimeErrorCode.INVALID_STATE */, ngDevMode && | ||
| `state("${metadataName}", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`); | ||
| } | ||
| function invalidStyleValue(value) { | ||
| return new _RuntimeError(3002 /* RuntimeErrorCode.INVALID_STYLE_VALUE */, ngDevMode && `The provided style string value ${value} is not allowed.`); | ||
| } | ||
| function invalidParallelAnimation(prop, firstStart, firstEnd, secondStart, secondEnd) { | ||
| return new _RuntimeError(3010 /* RuntimeErrorCode.INVALID_PARALLEL_ANIMATION */, ngDevMode && | ||
| `The CSS property "${prop}" that exists between the times of "${firstStart}ms" and "${firstEnd}ms" is also being animated in a parallel animation between the times of "${secondStart}ms" and "${secondEnd}ms"`); | ||
| } | ||
| function invalidKeyframes() { | ||
| return new _RuntimeError(3011 /* RuntimeErrorCode.INVALID_KEYFRAMES */, ngDevMode && `keyframes() must be placed inside of a call to animate()`); | ||
| } | ||
| function invalidOffset() { | ||
| return new _RuntimeError(3012 /* RuntimeErrorCode.INVALID_OFFSET */, ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`); | ||
| } | ||
| function keyframeOffsetsOutOfOrder() { | ||
| return new _RuntimeError(3200 /* RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER */, ngDevMode && `Please ensure that all keyframe offsets are in order`); | ||
| } | ||
| function keyframesMissingOffsets() { | ||
| return new _RuntimeError(3202 /* RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS */, ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`); | ||
| } | ||
| function invalidStagger() { | ||
| return new _RuntimeError(3013 /* RuntimeErrorCode.INVALID_STAGGER */, ngDevMode && `stagger() can only be used inside of query()`); | ||
| } | ||
| function invalidQuery(selector) { | ||
| return new _RuntimeError(3014 /* RuntimeErrorCode.INVALID_QUERY */, ngDevMode && | ||
| `\`query("${selector}")\` returned zero elements. (Use \`query("${selector}", { optional: true })\` if you wish to allow this.)`); | ||
| } | ||
| function invalidExpression(expr) { | ||
| return new _RuntimeError(3015 /* RuntimeErrorCode.INVALID_EXPRESSION */, ngDevMode && `The provided transition expression "${expr}" is not supported`); | ||
| } | ||
| function invalidTransitionAlias(alias) { | ||
| return new _RuntimeError(3016 /* RuntimeErrorCode.INVALID_TRANSITION_ALIAS */, ngDevMode && `The transition alias value "${alias}" is not supported`); | ||
| } | ||
| function validationFailed(errors) { | ||
| return new _RuntimeError(3500 /* RuntimeErrorCode.VALIDATION_FAILED */, ngDevMode && `animation validation failed:\n${errors.map((err) => err.message).join('\n')}`); | ||
| } | ||
| function buildingFailed(errors) { | ||
| return new _RuntimeError(3501 /* RuntimeErrorCode.BUILDING_FAILED */, ngDevMode && `animation building failed:\n${errors.map((err) => err.message).join('\n')}`); | ||
| } | ||
| function triggerBuildFailed(name, errors) { | ||
| return new _RuntimeError(3404 /* RuntimeErrorCode.TRIGGER_BUILD_FAILED */, ngDevMode && | ||
| `The animation trigger "${name}" has failed to build due to the following errors:\n - ${errors | ||
| .map((err) => err.message) | ||
| .join('\n - ')}`); | ||
| } | ||
| function animationFailed(errors) { | ||
| return new _RuntimeError(3502 /* RuntimeErrorCode.ANIMATION_FAILED */, ngDevMode && | ||
| `Unable to animate due to the following errors:${LINE_START}${errors | ||
| .map((err) => err.message) | ||
| .join(LINE_START)}`); | ||
| } | ||
| function registerFailed(errors) { | ||
| return new _RuntimeError(3503 /* RuntimeErrorCode.REGISTRATION_FAILED */, ngDevMode && | ||
| `Unable to build the animation due to the following errors: ${errors | ||
| .map((err) => err.message) | ||
| .join('\n')}`); | ||
| } | ||
| function missingOrDestroyedAnimation() { | ||
| return new _RuntimeError(3300 /* RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION */, ngDevMode && "The requested animation doesn't exist or has already been destroyed"); | ||
| } | ||
| function createAnimationFailed(errors) { | ||
| return new _RuntimeError(3504 /* RuntimeErrorCode.CREATE_ANIMATION_FAILED */, ngDevMode && | ||
| `Unable to create the animation due to the following errors:${errors | ||
| .map((err) => err.message) | ||
| .join('\n')}`); | ||
| } | ||
| function missingPlayer(id) { | ||
| return new _RuntimeError(3301 /* RuntimeErrorCode.MISSING_PLAYER */, ngDevMode && `Unable to find the timeline player referenced by ${id}`); | ||
| } | ||
| function missingTrigger(phase, name) { | ||
| return new _RuntimeError(3302 /* RuntimeErrorCode.MISSING_TRIGGER */, ngDevMode && | ||
| `Unable to listen on the animation trigger event "${phase}" because the animation trigger "${name}" doesn\'t exist!`); | ||
| } | ||
| function missingEvent(name) { | ||
| return new _RuntimeError(3303 /* RuntimeErrorCode.MISSING_EVENT */, ngDevMode && | ||
| `Unable to listen on the animation trigger "${name}" because the provided event is undefined!`); | ||
| } | ||
| function unsupportedTriggerEvent(phase, name) { | ||
| return new _RuntimeError(3400 /* RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT */, ngDevMode && | ||
| `The provided animation trigger event "${phase}" for the animation trigger "${name}" is not supported!`); | ||
| } | ||
| function unregisteredTrigger(name) { | ||
| return new _RuntimeError(3401 /* RuntimeErrorCode.UNREGISTERED_TRIGGER */, ngDevMode && `The provided animation trigger "${name}" has not been registered!`); | ||
| } | ||
| function triggerTransitionsFailed(errors) { | ||
| return new _RuntimeError(3402 /* RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED */, ngDevMode && | ||
| `Unable to process animations due to the following failed trigger transitions\n ${errors | ||
| .map((err) => err.message) | ||
| .join('\n')}`); | ||
| } | ||
| function transitionFailed(name, errors) { | ||
| return new _RuntimeError(3505 /* RuntimeErrorCode.TRANSITION_FAILED */, ngDevMode && `@${name} has failed due to:\n ${errors.map((err) => err.message).join('\n- ')}`); | ||
| } | ||
| /** | ||
| * Set of all animatable CSS properties | ||
| * | ||
| * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties | ||
| */ | ||
| const ANIMATABLE_PROP_SET = new Set([ | ||
| '-moz-outline-radius', | ||
| '-moz-outline-radius-bottomleft', | ||
| '-moz-outline-radius-bottomright', | ||
| '-moz-outline-radius-topleft', | ||
| '-moz-outline-radius-topright', | ||
| '-ms-grid-columns', | ||
| '-ms-grid-rows', | ||
| '-webkit-line-clamp', | ||
| '-webkit-text-fill-color', | ||
| '-webkit-text-stroke', | ||
| '-webkit-text-stroke-color', | ||
| 'accent-color', | ||
| 'all', | ||
| 'backdrop-filter', | ||
| 'background', | ||
| 'background-color', | ||
| 'background-position', | ||
| 'background-size', | ||
| 'block-size', | ||
| 'border', | ||
| 'border-block-end', | ||
| 'border-block-end-color', | ||
| 'border-block-end-width', | ||
| 'border-block-start', | ||
| 'border-block-start-color', | ||
| 'border-block-start-width', | ||
| 'border-bottom', | ||
| 'border-bottom-color', | ||
| 'border-bottom-left-radius', | ||
| 'border-bottom-right-radius', | ||
| 'border-bottom-width', | ||
| 'border-color', | ||
| 'border-end-end-radius', | ||
| 'border-end-start-radius', | ||
| 'border-image-outset', | ||
| 'border-image-slice', | ||
| 'border-image-width', | ||
| 'border-inline-end', | ||
| 'border-inline-end-color', | ||
| 'border-inline-end-width', | ||
| 'border-inline-start', | ||
| 'border-inline-start-color', | ||
| 'border-inline-start-width', | ||
| 'border-left', | ||
| 'border-left-color', | ||
| 'border-left-width', | ||
| 'border-radius', | ||
| 'border-right', | ||
| 'border-right-color', | ||
| 'border-right-width', | ||
| 'border-start-end-radius', | ||
| 'border-start-start-radius', | ||
| 'border-top', | ||
| 'border-top-color', | ||
| 'border-top-left-radius', | ||
| 'border-top-right-radius', | ||
| 'border-top-width', | ||
| 'border-width', | ||
| 'bottom', | ||
| 'box-shadow', | ||
| 'caret-color', | ||
| 'clip', | ||
| 'clip-path', | ||
| 'color', | ||
| 'column-count', | ||
| 'column-gap', | ||
| 'column-rule', | ||
| 'column-rule-color', | ||
| 'column-rule-width', | ||
| 'column-width', | ||
| 'columns', | ||
| 'filter', | ||
| 'flex', | ||
| 'flex-basis', | ||
| 'flex-grow', | ||
| 'flex-shrink', | ||
| 'font', | ||
| 'font-size', | ||
| 'font-size-adjust', | ||
| 'font-stretch', | ||
| 'font-variation-settings', | ||
| 'font-weight', | ||
| 'gap', | ||
| 'grid-column-gap', | ||
| 'grid-gap', | ||
| 'grid-row-gap', | ||
| 'grid-template-columns', | ||
| 'grid-template-rows', | ||
| 'height', | ||
| 'inline-size', | ||
| 'input-security', | ||
| 'inset', | ||
| 'inset-block', | ||
| 'inset-block-end', | ||
| 'inset-block-start', | ||
| 'inset-inline', | ||
| 'inset-inline-end', | ||
| 'inset-inline-start', | ||
| 'left', | ||
| 'letter-spacing', | ||
| 'line-clamp', | ||
| 'line-height', | ||
| 'margin', | ||
| 'margin-block-end', | ||
| 'margin-block-start', | ||
| 'margin-bottom', | ||
| 'margin-inline-end', | ||
| 'margin-inline-start', | ||
| 'margin-left', | ||
| 'margin-right', | ||
| 'margin-top', | ||
| 'mask', | ||
| 'mask-border', | ||
| 'mask-position', | ||
| 'mask-size', | ||
| 'max-block-size', | ||
| 'max-height', | ||
| 'max-inline-size', | ||
| 'max-lines', | ||
| 'max-width', | ||
| 'min-block-size', | ||
| 'min-height', | ||
| 'min-inline-size', | ||
| 'min-width', | ||
| 'object-position', | ||
| 'offset', | ||
| 'offset-anchor', | ||
| 'offset-distance', | ||
| 'offset-path', | ||
| 'offset-position', | ||
| 'offset-rotate', | ||
| 'opacity', | ||
| 'order', | ||
| 'outline', | ||
| 'outline-color', | ||
| 'outline-offset', | ||
| 'outline-width', | ||
| 'padding', | ||
| 'padding-block-end', | ||
| 'padding-block-start', | ||
| 'padding-bottom', | ||
| 'padding-inline-end', | ||
| 'padding-inline-start', | ||
| 'padding-left', | ||
| 'padding-right', | ||
| 'padding-top', | ||
| 'perspective', | ||
| 'perspective-origin', | ||
| 'right', | ||
| 'rotate', | ||
| 'row-gap', | ||
| 'scale', | ||
| 'scroll-margin', | ||
| 'scroll-margin-block', | ||
| 'scroll-margin-block-end', | ||
| 'scroll-margin-block-start', | ||
| 'scroll-margin-bottom', | ||
| 'scroll-margin-inline', | ||
| 'scroll-margin-inline-end', | ||
| 'scroll-margin-inline-start', | ||
| 'scroll-margin-left', | ||
| 'scroll-margin-right', | ||
| 'scroll-margin-top', | ||
| 'scroll-padding', | ||
| 'scroll-padding-block', | ||
| 'scroll-padding-block-end', | ||
| 'scroll-padding-block-start', | ||
| 'scroll-padding-bottom', | ||
| 'scroll-padding-inline', | ||
| 'scroll-padding-inline-end', | ||
| 'scroll-padding-inline-start', | ||
| 'scroll-padding-left', | ||
| 'scroll-padding-right', | ||
| 'scroll-padding-top', | ||
| 'scroll-snap-coordinate', | ||
| 'scroll-snap-destination', | ||
| 'scrollbar-color', | ||
| 'shape-image-threshold', | ||
| 'shape-margin', | ||
| 'shape-outside', | ||
| 'tab-size', | ||
| 'text-decoration', | ||
| 'text-decoration-color', | ||
| 'text-decoration-thickness', | ||
| 'text-emphasis', | ||
| 'text-emphasis-color', | ||
| 'text-indent', | ||
| 'text-shadow', | ||
| 'text-underline-offset', | ||
| 'top', | ||
| 'transform', | ||
| 'transform-origin', | ||
| 'translate', | ||
| 'vertical-align', | ||
| 'visibility', | ||
| 'width', | ||
| 'word-spacing', | ||
| 'z-index', | ||
| 'zoom', | ||
| ]); | ||
| function optimizeGroupPlayer(players) { | ||
| switch (players.length) { | ||
| case 0: | ||
| return new NoopAnimationPlayer(); | ||
| case 1: | ||
| return players[0]; | ||
| default: | ||
| return new AnimationGroupPlayer(players); | ||
| } | ||
| } | ||
| function normalizeKeyframes$1(normalizer, keyframes, preStyles = new Map(), postStyles = new Map()) { | ||
| const errors = []; | ||
| const normalizedKeyframes = []; | ||
| let previousOffset = -1; | ||
| let previousKeyframe = null; | ||
| keyframes.forEach((kf) => { | ||
| const offset = kf.get('offset'); | ||
| const isSameOffset = offset == previousOffset; | ||
| const normalizedKeyframe = (isSameOffset && previousKeyframe) || new Map(); | ||
| kf.forEach((val, prop) => { | ||
| let normalizedProp = prop; | ||
| let normalizedValue = val; | ||
| if (prop !== 'offset') { | ||
| normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors); | ||
| switch (normalizedValue) { | ||
| case _PRE_STYLE: | ||
| normalizedValue = preStyles.get(prop); | ||
| break; | ||
| case AUTO_STYLE: | ||
| normalizedValue = postStyles.get(prop); | ||
| break; | ||
| default: | ||
| normalizedValue = normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors); | ||
| break; | ||
| } | ||
| } | ||
| normalizedKeyframe.set(normalizedProp, normalizedValue); | ||
| }); | ||
| if (!isSameOffset) { | ||
| normalizedKeyframes.push(normalizedKeyframe); | ||
| } | ||
| previousKeyframe = normalizedKeyframe; | ||
| previousOffset = offset; | ||
| }); | ||
| if (errors.length) { | ||
| throw animationFailed(errors); | ||
| } | ||
| return normalizedKeyframes; | ||
| } | ||
| function listenOnPlayer(player, eventName, event, callback) { | ||
| switch (eventName) { | ||
| case 'start': | ||
| player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player))); | ||
| break; | ||
| case 'done': | ||
| player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player))); | ||
| break; | ||
| case 'destroy': | ||
| player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player))); | ||
| break; | ||
| } | ||
| } | ||
| function copyAnimationEvent(e, phaseName, player) { | ||
| const totalTime = player.totalTime; | ||
| const disabled = player.disabled ? true : false; | ||
| const event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime, disabled); | ||
| const data = e['_data']; | ||
| if (data != null) { | ||
| event['_data'] = data; | ||
| } | ||
| return event; | ||
| } | ||
| function makeAnimationEvent(element, triggerName, fromState, toState, phaseName = '', totalTime = 0, disabled) { | ||
| return { element, triggerName, fromState, toState, phaseName, totalTime, disabled: !!disabled }; | ||
| } | ||
| function getOrSetDefaultValue(map, key, defaultValue) { | ||
| let value = map.get(key); | ||
| if (!value) { | ||
| map.set(key, (value = defaultValue)); | ||
| } | ||
| return value; | ||
| } | ||
| function parseTimelineCommand(command) { | ||
| const separatorPos = command.indexOf(':'); | ||
| const id = command.substring(1, separatorPos); | ||
| const action = command.slice(separatorPos + 1); | ||
| return [id, action]; | ||
| } | ||
| const documentElement = /* @__PURE__ */ (() => typeof document === 'undefined' ? null : document.documentElement)(); | ||
| function getParentElement(element) { | ||
| const parent = element.parentNode || element.host || null; // consider host to support shadow DOM | ||
| if (parent === documentElement) { | ||
| return null; | ||
| } | ||
| return parent; | ||
| } | ||
| function containsVendorPrefix(prop) { | ||
| // Webkit is the only real popular vendor prefix nowadays | ||
| // cc: http://shouldiprefix.com/ | ||
| return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit | ||
| } | ||
| let _CACHED_BODY = null; | ||
| let _IS_WEBKIT = false; | ||
| function validateStyleProperty(prop) { | ||
| if (!_CACHED_BODY) { | ||
| _CACHED_BODY = getBodyNode() || {}; | ||
| _IS_WEBKIT = _CACHED_BODY.style ? 'WebkitAppearance' in _CACHED_BODY.style : false; | ||
| } | ||
| let result = true; | ||
| if (_CACHED_BODY.style && !containsVendorPrefix(prop)) { | ||
| result = prop in _CACHED_BODY.style; | ||
| if (!result && _IS_WEBKIT) { | ||
| const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1); | ||
| result = camelProp in _CACHED_BODY.style; | ||
| } | ||
| } | ||
| return result; | ||
| } | ||
| function validateWebAnimatableStyleProperty(prop) { | ||
| return ANIMATABLE_PROP_SET.has(prop); | ||
| } | ||
| function getBodyNode() { | ||
| if (typeof document != 'undefined') { | ||
| return document.body; | ||
| } | ||
| return null; | ||
| } | ||
| function containsElement(elm1, elm2) { | ||
| while (elm2) { | ||
| if (elm2 === elm1) { | ||
| return true; | ||
| } | ||
| elm2 = getParentElement(elm2); | ||
| } | ||
| return false; | ||
| } | ||
| function invokeQuery(element, selector, multi) { | ||
| if (multi) { | ||
| return Array.from(element.querySelectorAll(selector)); | ||
| } | ||
| const elem = element.querySelector(selector); | ||
| return elem ? [elem] : []; | ||
| } | ||
| const ONE_SECOND = 1000; | ||
| const SUBSTITUTION_EXPR_START = '{{'; | ||
| const SUBSTITUTION_EXPR_END = '}}'; | ||
| const ENTER_CLASSNAME = 'ng-enter'; | ||
| const LEAVE_CLASSNAME = 'ng-leave'; | ||
| const NG_TRIGGER_CLASSNAME = 'ng-trigger'; | ||
| const NG_TRIGGER_SELECTOR = '.ng-trigger'; | ||
| const NG_ANIMATING_CLASSNAME = 'ng-animating'; | ||
| const NG_ANIMATING_SELECTOR = '.ng-animating'; | ||
| function resolveTimingValue(value) { | ||
| if (typeof value == 'number') | ||
| return value; | ||
| const matches = value.match(/^(-?[\.\d]+)(m?s)/); | ||
| if (!matches || matches.length < 2) | ||
| return 0; | ||
| return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]); | ||
| } | ||
| function _convertTimeValueToMS(value, unit) { | ||
| switch (unit) { | ||
| case 's': | ||
| return value * ONE_SECOND; | ||
| default: // ms or something else | ||
| return value; | ||
| } | ||
| } | ||
| function resolveTiming(timings, errors, allowNegativeValues) { | ||
| return timings.hasOwnProperty('duration') | ||
| ? timings | ||
| : parseTimeExpression(timings, errors, allowNegativeValues); | ||
| } | ||
| const PARSE_TIME_EXPRESSION_REGEX = /^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i; | ||
| function parseTimeExpression(exp, errors, allowNegativeValues) { | ||
| let duration; | ||
| let delay = 0; | ||
| let easing = ''; | ||
| if (typeof exp === 'string') { | ||
| const matches = exp.match(PARSE_TIME_EXPRESSION_REGEX); | ||
| if (matches === null) { | ||
| errors.push(invalidTimingValue(exp)); | ||
| return { duration: 0, delay: 0, easing: '' }; | ||
| } | ||
| duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]); | ||
| const delayMatch = matches[3]; | ||
| if (delayMatch != null) { | ||
| delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]); | ||
| } | ||
| const easingVal = matches[5]; | ||
| if (easingVal) { | ||
| easing = easingVal; | ||
| } | ||
| } | ||
| else { | ||
| duration = exp; | ||
| } | ||
| if (!allowNegativeValues) { | ||
| let containsErrors = false; | ||
| let startIndex = errors.length; | ||
| if (duration < 0) { | ||
| errors.push(negativeStepValue()); | ||
| containsErrors = true; | ||
| } | ||
| if (delay < 0) { | ||
| errors.push(negativeDelayValue()); | ||
| containsErrors = true; | ||
| } | ||
| if (containsErrors) { | ||
| errors.splice(startIndex, 0, invalidTimingValue(exp)); | ||
| } | ||
| } | ||
| return { duration, delay, easing }; | ||
| } | ||
| function normalizeKeyframes(keyframes) { | ||
| if (!keyframes.length) { | ||
| return []; | ||
| } | ||
| if (keyframes[0] instanceof Map) { | ||
| return keyframes; | ||
| } | ||
| return keyframes.map((kf) => new Map(Object.entries(kf))); | ||
| } | ||
| function normalizeStyles(styles) { | ||
| return Array.isArray(styles) ? new Map(...styles) : new Map(styles); | ||
| } | ||
| function setStyles(element, styles, formerStyles) { | ||
| styles.forEach((val, prop) => { | ||
| const camelProp = dashCaseToCamelCase(prop); | ||
| if (formerStyles && !formerStyles.has(prop)) { | ||
| formerStyles.set(prop, element.style[camelProp]); | ||
| } | ||
| element.style[camelProp] = val; | ||
| }); | ||
| } | ||
| function eraseStyles(element, styles) { | ||
| styles.forEach((_, prop) => { | ||
| const camelProp = dashCaseToCamelCase(prop); | ||
| element.style[camelProp] = ''; | ||
| }); | ||
| } | ||
| function normalizeAnimationEntry(steps) { | ||
| if (Array.isArray(steps)) { | ||
| if (steps.length == 1) | ||
| return steps[0]; | ||
| return sequence(steps); | ||
| } | ||
| return steps; | ||
| } | ||
| function validateStyleParams(value, options, errors) { | ||
| const params = options.params || {}; | ||
| const matches = extractStyleParams(value); | ||
| if (matches.length) { | ||
| matches.forEach((varName) => { | ||
| if (!params.hasOwnProperty(varName)) { | ||
| errors.push(invalidStyleParams(varName)); | ||
| } | ||
| }); | ||
| } | ||
| } | ||
| const PARAM_REGEX = /* @__PURE__ */ new RegExp(`${SUBSTITUTION_EXPR_START}\\s*(.+?)\\s*${SUBSTITUTION_EXPR_END}`, 'g'); | ||
| function extractStyleParams(value) { | ||
| let params = []; | ||
| if (typeof value === 'string') { | ||
| let match; | ||
| while ((match = PARAM_REGEX.exec(value))) { | ||
| params.push(match[1]); | ||
| } | ||
| PARAM_REGEX.lastIndex = 0; | ||
| } | ||
| return params; | ||
| } | ||
| function interpolateParams(value, params, errors) { | ||
| const original = `${value}`; | ||
| const str = original.replace(PARAM_REGEX, (_, varName) => { | ||
| let localVal = params[varName]; | ||
| // this means that the value was never overridden by the data passed in by the user | ||
| if (localVal == null) { | ||
| errors.push(invalidParamValue(varName)); | ||
| localVal = ''; | ||
| } | ||
| return localVal.toString(); | ||
| }); | ||
| // we do this to assert that numeric values stay as they are | ||
| return str == original ? value : str; | ||
| } | ||
| const DASH_CASE_REGEXP = /-+([a-z0-9])/g; | ||
| function dashCaseToCamelCase(input) { | ||
| return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase()); | ||
| } | ||
| function camelCaseToDashCase(input) { | ||
| return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); | ||
| } | ||
| function allowPreviousPlayerStylesMerge(duration, delay) { | ||
| return duration === 0 || delay === 0; | ||
| } | ||
| function balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles) { | ||
| if (previousStyles.size && keyframes.length) { | ||
| let startingKeyframe = keyframes[0]; | ||
| let missingStyleProps = []; | ||
| previousStyles.forEach((val, prop) => { | ||
| if (!startingKeyframe.has(prop)) { | ||
| missingStyleProps.push(prop); | ||
| } | ||
| startingKeyframe.set(prop, val); | ||
| }); | ||
| if (missingStyleProps.length) { | ||
| for (let i = 1; i < keyframes.length; i++) { | ||
| let kf = keyframes[i]; | ||
| missingStyleProps.forEach((prop) => kf.set(prop, computeStyle(element, prop))); | ||
| } | ||
| } | ||
| } | ||
| return keyframes; | ||
| } | ||
| function visitDslNode(visitor, node, context) { | ||
| switch (node.type) { | ||
| case AnimationMetadataType.Trigger: | ||
| return visitor.visitTrigger(node, context); | ||
| case AnimationMetadataType.State: | ||
| return visitor.visitState(node, context); | ||
| case AnimationMetadataType.Transition: | ||
| return visitor.visitTransition(node, context); | ||
| case AnimationMetadataType.Sequence: | ||
| return visitor.visitSequence(node, context); | ||
| case AnimationMetadataType.Group: | ||
| return visitor.visitGroup(node, context); | ||
| case AnimationMetadataType.Animate: | ||
| return visitor.visitAnimate(node, context); | ||
| case AnimationMetadataType.Keyframes: | ||
| return visitor.visitKeyframes(node, context); | ||
| case AnimationMetadataType.Style: | ||
| return visitor.visitStyle(node, context); | ||
| case AnimationMetadataType.Reference: | ||
| return visitor.visitReference(node, context); | ||
| case AnimationMetadataType.AnimateChild: | ||
| return visitor.visitAnimateChild(node, context); | ||
| case AnimationMetadataType.AnimateRef: | ||
| return visitor.visitAnimateRef(node, context); | ||
| case AnimationMetadataType.Query: | ||
| return visitor.visitQuery(node, context); | ||
| case AnimationMetadataType.Stagger: | ||
| return visitor.visitStagger(node, context); | ||
| default: | ||
| throw invalidNodeType(node.type); | ||
| } | ||
| } | ||
| function computeStyle(element, prop) { | ||
| return window.getComputedStyle(element)[prop]; | ||
| } | ||
| export { ENTER_CLASSNAME, LEAVE_CLASSNAME, NG_ANIMATING_CLASSNAME, NG_ANIMATING_SELECTOR, NG_TRIGGER_CLASSNAME, NG_TRIGGER_SELECTOR, SUBSTITUTION_EXPR_START, allowPreviousPlayerStylesMerge, balancePreviousStylesIntoKeyframes, buildingFailed, camelCaseToDashCase, computeStyle, containsElement, createAnimationFailed, dashCaseToCamelCase, eraseStyles, extractStyleParams, getOrSetDefaultValue, getParentElement, interpolateParams, invalidCssUnitValue, invalidDefinition, invalidExpression, invalidKeyframes, invalidOffset, invalidParallelAnimation, invalidQuery, invalidStagger, invalidState, invalidStyleValue, invalidTransitionAlias, invalidTrigger, invokeQuery, keyframeOffsetsOutOfOrder, keyframesMissingOffsets, listenOnPlayer, makeAnimationEvent, missingEvent, missingOrDestroyedAnimation, missingPlayer, missingTrigger, normalizeAnimationEntry, normalizeKeyframes$1 as normalizeKeyframes, normalizeKeyframes as normalizeKeyframes$1, normalizeStyles, optimizeGroupPlayer, parseTimelineCommand, registerFailed, resolveTiming, resolveTimingValue, setStyles, transitionFailed, triggerBuildFailed, triggerTransitionsFailed, unregisteredTrigger, unsupportedTriggerEvent, validateStyleParams, validateStyleProperty, validateWebAnimatableStyleProperty, validationFailed, visitDslNode }; | ||
| //# sourceMappingURL=_util-chunk.mjs.map |
| {"version":3,"file":"_util-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/animations/browser/src/error_helpers.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/animations/browser/src/render/web_animations/animatable_props_set.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/animations/browser/src/render/shared.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/animations/browser/src/util.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 {RuntimeErrorCode} from '../../src/errors';\nimport {ɵRuntimeError as RuntimeError} from '@angular/core';\n\nconst LINE_START = '\\n - ';\n\nexport function invalidTimingValue(exp: string | number): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_TIMING_VALUE,\n ngDevMode && `The provided timing value \"${exp}\" is invalid.`,\n );\n}\n\nexport function negativeStepValue(): Error {\n return new RuntimeError(\n RuntimeErrorCode.NEGATIVE_STEP_VALUE,\n ngDevMode && 'Duration values below 0 are not allowed for this animation step.',\n );\n}\n\nexport function negativeDelayValue(): Error {\n return new RuntimeError(\n RuntimeErrorCode.NEGATIVE_DELAY_VALUE,\n ngDevMode && 'Delay values below 0 are not allowed for this animation step.',\n );\n}\n\nexport function invalidStyleParams(varName: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_STYLE_PARAMS,\n ngDevMode &&\n `Unable to resolve the local animation param ${varName} in the given list of values`,\n );\n}\n\nexport function invalidParamValue(varName: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_PARAM_VALUE,\n ngDevMode && `Please provide a value for the animation param ${varName}`,\n );\n}\n\nexport function invalidNodeType(nodeType: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_NODE_TYPE,\n ngDevMode && `Unable to resolve animation metadata node #${nodeType}`,\n );\n}\n\nexport function invalidCssUnitValue(userProvidedProperty: string, value: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_CSS_UNIT_VALUE,\n ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`,\n );\n}\n\nexport function invalidTrigger(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_TRIGGER,\n ngDevMode &&\n \"animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))\",\n );\n}\n\nexport function invalidDefinition(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_DEFINITION,\n ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()',\n );\n}\n\nexport function invalidState(metadataName: string, missingSubs: string[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_STATE,\n ngDevMode &&\n `state(\"${metadataName}\", ...) must define default values for all the following style substitutions: ${missingSubs.join(\n ', ',\n )}`,\n );\n}\n\nexport function invalidStyleValue(value: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_STYLE_VALUE,\n ngDevMode && `The provided style string value ${value} is not allowed.`,\n );\n}\n\nexport function invalidProperty(prop: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_PROPERTY,\n ngDevMode &&\n `The provided animation property \"${prop}\" is not a supported CSS property for animations`,\n );\n}\n\nexport function invalidParallelAnimation(\n prop: string,\n firstStart: number,\n firstEnd: number,\n secondStart: number,\n secondEnd: number,\n): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_PARALLEL_ANIMATION,\n ngDevMode &&\n `The CSS property \"${prop}\" that exists between the times of \"${firstStart}ms\" and \"${firstEnd}ms\" is also being animated in a parallel animation between the times of \"${secondStart}ms\" and \"${secondEnd}ms\"`,\n );\n}\n\nexport function invalidKeyframes(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_KEYFRAMES,\n ngDevMode && `keyframes() must be placed inside of a call to animate()`,\n );\n}\n\nexport function invalidOffset(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_OFFSET,\n ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`,\n );\n}\n\nexport function keyframeOffsetsOutOfOrder(): Error {\n return new RuntimeError(\n RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER,\n ngDevMode && `Please ensure that all keyframe offsets are in order`,\n );\n}\n\nexport function keyframesMissingOffsets(): Error {\n return new RuntimeError(\n RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS,\n ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`,\n );\n}\n\nexport function invalidStagger(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_STAGGER,\n ngDevMode && `stagger() can only be used inside of query()`,\n );\n}\n\nexport function invalidQuery(selector: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_QUERY,\n ngDevMode &&\n `\\`query(\"${selector}\")\\` returned zero elements. (Use \\`query(\"${selector}\", { optional: true })\\` if you wish to allow this.)`,\n );\n}\n\nexport function invalidExpression(expr: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_EXPRESSION,\n ngDevMode && `The provided transition expression \"${expr}\" is not supported`,\n );\n}\n\nexport function invalidTransitionAlias(alias: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_TRANSITION_ALIAS,\n ngDevMode && `The transition alias value \"${alias}\" is not supported`,\n );\n}\n\nexport function validationFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.VALIDATION_FAILED,\n ngDevMode && `animation validation failed:\\n${errors.map((err) => err.message).join('\\n')}`,\n );\n}\n\nexport function buildingFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.BUILDING_FAILED,\n ngDevMode && `animation building failed:\\n${errors.map((err) => err.message).join('\\n')}`,\n );\n}\n\nexport function triggerBuildFailed(name: string, errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.TRIGGER_BUILD_FAILED,\n ngDevMode &&\n `The animation trigger \"${name}\" has failed to build due to the following errors:\\n - ${errors\n .map((err) => err.message)\n .join('\\n - ')}`,\n );\n}\n\nexport function animationFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.ANIMATION_FAILED,\n ngDevMode &&\n `Unable to animate due to the following errors:${LINE_START}${errors\n .map((err) => err.message)\n .join(LINE_START)}`,\n );\n}\n\nexport function registerFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.REGISTRATION_FAILED,\n ngDevMode &&\n `Unable to build the animation due to the following errors: ${errors\n .map((err) => err.message)\n .join('\\n')}`,\n );\n}\n\nexport function missingOrDestroyedAnimation(): Error {\n return new RuntimeError(\n RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION,\n ngDevMode && \"The requested animation doesn't exist or has already been destroyed\",\n );\n}\n\nexport function createAnimationFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.CREATE_ANIMATION_FAILED,\n ngDevMode &&\n `Unable to create the animation due to the following errors:${errors\n .map((err) => err.message)\n .join('\\n')}`,\n );\n}\n\nexport function missingPlayer(id: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.MISSING_PLAYER,\n ngDevMode && `Unable to find the timeline player referenced by ${id}`,\n );\n}\n\nexport function missingTrigger(phase: string, name: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.MISSING_TRIGGER,\n ngDevMode &&\n `Unable to listen on the animation trigger event \"${phase}\" because the animation trigger \"${name}\" doesn\\'t exist!`,\n );\n}\n\nexport function missingEvent(name: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.MISSING_EVENT,\n ngDevMode &&\n `Unable to listen on the animation trigger \"${name}\" because the provided event is undefined!`,\n );\n}\n\nexport function unsupportedTriggerEvent(phase: string, name: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT,\n ngDevMode &&\n `The provided animation trigger event \"${phase}\" for the animation trigger \"${name}\" is not supported!`,\n );\n}\n\nexport function unregisteredTrigger(name: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.UNREGISTERED_TRIGGER,\n ngDevMode && `The provided animation trigger \"${name}\" has not been registered!`,\n );\n}\n\nexport function triggerTransitionsFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED,\n ngDevMode &&\n `Unable to process animations due to the following failed trigger transitions\\n ${errors\n .map((err) => err.message)\n .join('\\n')}`,\n );\n}\n\nexport function triggerParsingFailed(name: string, errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.TRIGGER_PARSING_FAILED,\n ngDevMode &&\n `Animation parsing for the ${name} trigger have failed:${LINE_START}${errors\n .map((err) => err.message)\n .join(LINE_START)}`,\n );\n}\n\nexport function transitionFailed(name: string, errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.TRANSITION_FAILED,\n ngDevMode && `@${name} has failed due to:\\n ${errors.map((err) => err.message).join('\\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 * Set of all animatable CSS properties\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties\n */\nexport const ANIMATABLE_PROP_SET = new Set([\n '-moz-outline-radius',\n '-moz-outline-radius-bottomleft',\n '-moz-outline-radius-bottomright',\n '-moz-outline-radius-topleft',\n '-moz-outline-radius-topright',\n '-ms-grid-columns',\n '-ms-grid-rows',\n '-webkit-line-clamp',\n '-webkit-text-fill-color',\n '-webkit-text-stroke',\n '-webkit-text-stroke-color',\n 'accent-color',\n 'all',\n 'backdrop-filter',\n 'background',\n 'background-color',\n 'background-position',\n 'background-size',\n 'block-size',\n 'border',\n 'border-block-end',\n 'border-block-end-color',\n 'border-block-end-width',\n 'border-block-start',\n 'border-block-start-color',\n 'border-block-start-width',\n 'border-bottom',\n 'border-bottom-color',\n 'border-bottom-left-radius',\n 'border-bottom-right-radius',\n 'border-bottom-width',\n 'border-color',\n 'border-end-end-radius',\n 'border-end-start-radius',\n 'border-image-outset',\n 'border-image-slice',\n 'border-image-width',\n 'border-inline-end',\n 'border-inline-end-color',\n 'border-inline-end-width',\n 'border-inline-start',\n 'border-inline-start-color',\n 'border-inline-start-width',\n 'border-left',\n 'border-left-color',\n 'border-left-width',\n 'border-radius',\n 'border-right',\n 'border-right-color',\n 'border-right-width',\n 'border-start-end-radius',\n 'border-start-start-radius',\n 'border-top',\n 'border-top-color',\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-top-width',\n 'border-width',\n 'bottom',\n 'box-shadow',\n 'caret-color',\n 'clip',\n 'clip-path',\n 'color',\n 'column-count',\n 'column-gap',\n 'column-rule',\n 'column-rule-color',\n 'column-rule-width',\n 'column-width',\n 'columns',\n 'filter',\n 'flex',\n 'flex-basis',\n 'flex-grow',\n 'flex-shrink',\n 'font',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-variation-settings',\n 'font-weight',\n 'gap',\n 'grid-column-gap',\n 'grid-gap',\n 'grid-row-gap',\n 'grid-template-columns',\n 'grid-template-rows',\n 'height',\n 'inline-size',\n 'input-security',\n 'inset',\n 'inset-block',\n 'inset-block-end',\n 'inset-block-start',\n 'inset-inline',\n 'inset-inline-end',\n 'inset-inline-start',\n 'left',\n 'letter-spacing',\n 'line-clamp',\n 'line-height',\n 'margin',\n 'margin-block-end',\n 'margin-block-start',\n 'margin-bottom',\n 'margin-inline-end',\n 'margin-inline-start',\n 'margin-left',\n 'margin-right',\n 'margin-top',\n 'mask',\n 'mask-border',\n 'mask-position',\n 'mask-size',\n 'max-block-size',\n 'max-height',\n 'max-inline-size',\n 'max-lines',\n 'max-width',\n 'min-block-size',\n 'min-height',\n 'min-inline-size',\n 'min-width',\n 'object-position',\n 'offset',\n 'offset-anchor',\n 'offset-distance',\n 'offset-path',\n 'offset-position',\n 'offset-rotate',\n 'opacity',\n 'order',\n 'outline',\n 'outline-color',\n 'outline-offset',\n 'outline-width',\n 'padding',\n 'padding-block-end',\n 'padding-block-start',\n 'padding-bottom',\n 'padding-inline-end',\n 'padding-inline-start',\n 'padding-left',\n 'padding-right',\n 'padding-top',\n 'perspective',\n 'perspective-origin',\n 'right',\n 'rotate',\n 'row-gap',\n 'scale',\n 'scroll-margin',\n 'scroll-margin-block',\n 'scroll-margin-block-end',\n 'scroll-margin-block-start',\n 'scroll-margin-bottom',\n 'scroll-margin-inline',\n 'scroll-margin-inline-end',\n 'scroll-margin-inline-start',\n 'scroll-margin-left',\n 'scroll-margin-right',\n 'scroll-margin-top',\n 'scroll-padding',\n 'scroll-padding-block',\n 'scroll-padding-block-end',\n 'scroll-padding-block-start',\n 'scroll-padding-bottom',\n 'scroll-padding-inline',\n 'scroll-padding-inline-end',\n 'scroll-padding-inline-start',\n 'scroll-padding-left',\n 'scroll-padding-right',\n 'scroll-padding-top',\n 'scroll-snap-coordinate',\n 'scroll-snap-destination',\n 'scrollbar-color',\n 'shape-image-threshold',\n 'shape-margin',\n 'shape-outside',\n 'tab-size',\n 'text-decoration',\n 'text-decoration-color',\n 'text-decoration-thickness',\n 'text-emphasis',\n 'text-emphasis-color',\n 'text-indent',\n 'text-shadow',\n 'text-underline-offset',\n 'top',\n 'transform',\n 'transform-origin',\n 'translate',\n 'vertical-align',\n 'visibility',\n 'width',\n 'word-spacing',\n 'z-index',\n 'zoom',\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 AnimationEvent,\n AnimationPlayer,\n AUTO_STYLE,\n NoopAnimationPlayer,\n ɵAnimationGroupPlayer,\n ɵPRE_STYLE as PRE_STYLE,\n ɵStyleDataMap,\n} from '../../../src/animations';\n\nimport {AnimationStyleNormalizer} from '../../src/dsl/style_normalization/animation_style_normalizer';\nimport {animationFailed} from '../error_helpers';\n\nimport {ANIMATABLE_PROP_SET} from './web_animations/animatable_props_set';\n\nexport function optimizeGroupPlayer(players: AnimationPlayer[]): AnimationPlayer {\n switch (players.length) {\n case 0:\n return new NoopAnimationPlayer();\n case 1:\n return players[0];\n default:\n return new ɵAnimationGroupPlayer(players);\n }\n}\n\nexport function normalizeKeyframes(\n normalizer: AnimationStyleNormalizer,\n keyframes: Array<ɵStyleDataMap>,\n preStyles: ɵStyleDataMap = new Map(),\n postStyles: ɵStyleDataMap = new Map(),\n): Array<ɵStyleDataMap> {\n const errors: Error[] = [];\n const normalizedKeyframes: Array<ɵStyleDataMap> = [];\n let previousOffset = -1;\n let previousKeyframe: ɵStyleDataMap | null = null;\n keyframes.forEach((kf) => {\n const offset = kf.get('offset') as number;\n const isSameOffset = offset == previousOffset;\n const normalizedKeyframe: ɵStyleDataMap = (isSameOffset && previousKeyframe) || new Map();\n kf.forEach((val, prop) => {\n let normalizedProp = prop;\n let normalizedValue = val;\n if (prop !== 'offset') {\n normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);\n switch (normalizedValue) {\n case PRE_STYLE:\n normalizedValue = preStyles.get(prop)!;\n break;\n\n case AUTO_STYLE:\n normalizedValue = postStyles.get(prop)!;\n break;\n\n default:\n normalizedValue = normalizer.normalizeStyleValue(\n prop,\n normalizedProp,\n normalizedValue,\n errors,\n );\n break;\n }\n }\n normalizedKeyframe.set(normalizedProp, normalizedValue);\n });\n if (!isSameOffset) {\n normalizedKeyframes.push(normalizedKeyframe);\n }\n previousKeyframe = normalizedKeyframe;\n previousOffset = offset;\n });\n if (errors.length) {\n throw animationFailed(errors);\n }\n\n return normalizedKeyframes;\n}\n\nexport function listenOnPlayer(\n player: AnimationPlayer,\n eventName: string,\n event: AnimationEvent | undefined,\n callback: (event: any) => any,\n) {\n switch (eventName) {\n case 'start':\n player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player)));\n break;\n case 'done':\n player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player)));\n break;\n case 'destroy':\n player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player)));\n break;\n }\n}\n\nexport function copyAnimationEvent(\n e: AnimationEvent,\n phaseName: string,\n player: AnimationPlayer,\n): AnimationEvent {\n const totalTime = player.totalTime;\n const disabled = (player as any).disabled ? true : false;\n const event = makeAnimationEvent(\n e.element,\n e.triggerName,\n e.fromState,\n e.toState,\n phaseName || e.phaseName,\n totalTime == undefined ? e.totalTime : totalTime,\n disabled,\n );\n const data = (e as any)['_data'];\n if (data != null) {\n (event as any)['_data'] = data;\n }\n return event;\n}\n\nexport function makeAnimationEvent(\n element: any,\n triggerName: string,\n fromState: string,\n toState: string,\n phaseName: string = '',\n totalTime: number = 0,\n disabled?: boolean,\n): AnimationEvent {\n return {element, triggerName, fromState, toState, phaseName, totalTime, disabled: !!disabled};\n}\n\nexport function getOrSetDefaultValue<T, V>(map: Map<T, V>, key: T, defaultValue: V) {\n let value = map.get(key);\n if (!value) {\n map.set(key, (value = defaultValue));\n }\n return value;\n}\n\nexport function parseTimelineCommand(command: string): [string, string] {\n const separatorPos = command.indexOf(':');\n const id = command.substring(1, separatorPos);\n const action = command.slice(separatorPos + 1);\n return [id, action];\n}\n\nconst documentElement: HTMLElement | null = /* @__PURE__ */ (() =>\n typeof document === 'undefined' ? null : document.documentElement)();\n\nexport function getParentElement(element: any): unknown | null {\n const parent = element.parentNode || element.host || null; // consider host to support shadow DOM\n if (parent === documentElement) {\n return null;\n }\n return parent;\n}\n\nfunction containsVendorPrefix(prop: string): boolean {\n // Webkit is the only real popular vendor prefix nowadays\n // cc: http://shouldiprefix.com/\n return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit\n}\n\nlet _CACHED_BODY: {style: any} | null = null;\nlet _IS_WEBKIT = false;\nexport function validateStyleProperty(prop: string): boolean {\n if (!_CACHED_BODY) {\n _CACHED_BODY = getBodyNode() || {};\n _IS_WEBKIT = _CACHED_BODY!.style ? 'WebkitAppearance' in _CACHED_BODY!.style : false;\n }\n\n let result = true;\n if (_CACHED_BODY!.style && !containsVendorPrefix(prop)) {\n result = prop in _CACHED_BODY!.style;\n if (!result && _IS_WEBKIT) {\n const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1);\n result = camelProp in _CACHED_BODY!.style;\n }\n }\n\n return result;\n}\n\nexport function validateWebAnimatableStyleProperty(prop: string): boolean {\n return ANIMATABLE_PROP_SET.has(prop);\n}\n\nexport function getBodyNode(): any | null {\n if (typeof document != 'undefined') {\n return document.body;\n }\n return null;\n}\n\nexport function containsElement(elm1: any, elm2: any): boolean {\n while (elm2) {\n if (elm2 === elm1) {\n return true;\n }\n elm2 = getParentElement(elm2);\n }\n return false;\n}\n\nexport function invokeQuery(element: any, selector: string, multi: boolean): any[] {\n if (multi) {\n return Array.from(element.querySelectorAll(selector));\n }\n const elem = element.querySelector(selector);\n return elem ? [elem] : [];\n}\n\nexport function hypenatePropsKeys(original: ɵStyleDataMap): ɵStyleDataMap {\n const newMap: ɵStyleDataMap = new Map();\n original.forEach((val, prop) => {\n const newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');\n newMap.set(newProp, val);\n });\n return newMap;\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 AnimateTimings,\n AnimationMetadata,\n AnimationMetadataType,\n AnimationOptions,\n sequence,\n ɵStyleData,\n ɵStyleDataMap,\n} from '../../src/animations';\n\nimport {Ast as AnimationAst, AstVisitor as AnimationAstVisitor} from './dsl/animation_ast';\nimport {AnimationDslVisitor} from './dsl/animation_dsl_visitor';\nimport {\n invalidNodeType,\n invalidParamValue,\n invalidStyleParams,\n invalidTimingValue,\n negativeDelayValue,\n negativeStepValue,\n} from './error_helpers';\n\nconst ONE_SECOND = 1000;\n\nexport const SUBSTITUTION_EXPR_START = '{{';\nexport const SUBSTITUTION_EXPR_END = '}}';\nexport const ENTER_CLASSNAME = 'ng-enter';\nexport const LEAVE_CLASSNAME = 'ng-leave';\nexport const NG_TRIGGER_CLASSNAME = 'ng-trigger';\nexport const NG_TRIGGER_SELECTOR = '.ng-trigger';\nexport const NG_ANIMATING_CLASSNAME = 'ng-animating';\nexport const NG_ANIMATING_SELECTOR = '.ng-animating';\n\nexport function resolveTimingValue(value: string | number) {\n if (typeof value == 'number') return value;\n\n const matches = value.match(/^(-?[\\.\\d]+)(m?s)/);\n if (!matches || matches.length < 2) return 0;\n\n return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\n\nfunction _convertTimeValueToMS(value: number, unit: string): number {\n switch (unit) {\n case 's':\n return value * ONE_SECOND;\n default: // ms or something else\n return value;\n }\n}\n\nexport function resolveTiming(\n timings: string | number | AnimateTimings,\n errors: Error[],\n allowNegativeValues?: boolean,\n) {\n return timings.hasOwnProperty('duration')\n ? <AnimateTimings>timings\n : parseTimeExpression(<string | number>timings, errors, allowNegativeValues);\n}\n\nconst PARSE_TIME_EXPRESSION_REGEX =\n /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\nfunction parseTimeExpression(\n exp: string | number,\n errors: Error[],\n allowNegativeValues?: boolean,\n): AnimateTimings {\n let duration: number;\n let delay: number = 0;\n let easing: string = '';\n if (typeof exp === 'string') {\n const matches = exp.match(PARSE_TIME_EXPRESSION_REGEX);\n if (matches === null) {\n errors.push(invalidTimingValue(exp));\n return {duration: 0, delay: 0, easing: ''};\n }\n\n duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n\n const delayMatch = matches[3];\n if (delayMatch != null) {\n delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);\n }\n\n const easingVal = matches[5];\n if (easingVal) {\n easing = easingVal;\n }\n } else {\n duration = exp;\n }\n\n if (!allowNegativeValues) {\n let containsErrors = false;\n let startIndex = errors.length;\n if (duration < 0) {\n errors.push(negativeStepValue());\n containsErrors = true;\n }\n if (delay < 0) {\n errors.push(negativeDelayValue());\n containsErrors = true;\n }\n if (containsErrors) {\n errors.splice(startIndex, 0, invalidTimingValue(exp));\n }\n }\n\n return {duration, delay, easing};\n}\n\nexport function normalizeKeyframes(\n keyframes: Array<ɵStyleData> | Array<ɵStyleDataMap>,\n): Array<ɵStyleDataMap> {\n if (!keyframes.length) {\n return [];\n }\n if (keyframes[0] instanceof Map) {\n return keyframes as Array<ɵStyleDataMap>;\n }\n return keyframes.map((kf) => new Map(Object.entries(kf)));\n}\n\nexport function normalizeStyles(styles: ɵStyleDataMap | Array<ɵStyleDataMap>): ɵStyleDataMap {\n return Array.isArray(styles) ? new Map(...styles) : new Map(styles);\n}\n\nexport function setStyles(element: any, styles: ɵStyleDataMap, formerStyles?: ɵStyleDataMap) {\n styles.forEach((val, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n if (formerStyles && !formerStyles.has(prop)) {\n formerStyles.set(prop, element.style[camelProp]);\n }\n element.style[camelProp] = val;\n });\n}\n\nexport function eraseStyles(element: any, styles: ɵStyleDataMap) {\n styles.forEach((_, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = '';\n });\n}\n\nexport function normalizeAnimationEntry(\n steps: AnimationMetadata | AnimationMetadata[],\n): AnimationMetadata {\n if (Array.isArray(steps)) {\n if (steps.length == 1) return steps[0];\n return sequence(steps);\n }\n return steps as AnimationMetadata;\n}\n\nexport function validateStyleParams(\n value: string | number | null | undefined,\n options: AnimationOptions,\n errors: Error[],\n) {\n const params = options.params || {};\n const matches = extractStyleParams(value);\n if (matches.length) {\n matches.forEach((varName) => {\n if (!params.hasOwnProperty(varName)) {\n errors.push(invalidStyleParams(varName));\n }\n });\n }\n}\n\nconst PARAM_REGEX = /* @__PURE__ */ new RegExp(\n `${SUBSTITUTION_EXPR_START}\\\\s*(.+?)\\\\s*${SUBSTITUTION_EXPR_END}`,\n 'g',\n);\nexport function extractStyleParams(value: string | number | null | undefined): string[] {\n let params: string[] = [];\n if (typeof value === 'string') {\n let match: any;\n while ((match = PARAM_REGEX.exec(value))) {\n params.push(match[1] as string);\n }\n PARAM_REGEX.lastIndex = 0;\n }\n return params;\n}\n\nexport function interpolateParams(\n value: string | number,\n params: {[name: string]: any},\n errors: Error[],\n): string | number {\n const original = `${value}`;\n const str = original.replace(PARAM_REGEX, (_, varName) => {\n let localVal = params[varName];\n // this means that the value was never overridden by the data passed in by the user\n if (localVal == null) {\n errors.push(invalidParamValue(varName));\n localVal = '';\n }\n return localVal.toString();\n });\n\n // we do this to assert that numeric values stay as they are\n return str == original ? value : str;\n}\n\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nexport function dashCaseToCamelCase(input: string): string {\n return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());\n}\n\nexport function camelCaseToDashCase(input: string): string {\n return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nexport function allowPreviousPlayerStylesMerge(duration: number, delay: number) {\n return duration === 0 || delay === 0;\n}\n\nexport function balancePreviousStylesIntoKeyframes(\n element: any,\n keyframes: Array<ɵStyleDataMap>,\n previousStyles: ɵStyleDataMap,\n) {\n if (previousStyles.size && keyframes.length) {\n let startingKeyframe = keyframes[0];\n let missingStyleProps: string[] = [];\n previousStyles.forEach((val, prop) => {\n if (!startingKeyframe.has(prop)) {\n missingStyleProps.push(prop);\n }\n startingKeyframe.set(prop, val);\n });\n\n if (missingStyleProps.length) {\n for (let i = 1; i < keyframes.length; i++) {\n let kf = keyframes[i];\n missingStyleProps.forEach((prop) => kf.set(prop, computeStyle(element, prop)));\n }\n }\n }\n return keyframes;\n}\n\nexport function visitDslNode(\n visitor: AnimationDslVisitor,\n node: AnimationMetadata,\n context: any,\n): any;\nexport function visitDslNode(\n visitor: AnimationAstVisitor,\n node: AnimationAst<AnimationMetadataType>,\n context: any,\n): any;\nexport function visitDslNode(visitor: any, node: any, context: any): any {\n switch (node.type) {\n case AnimationMetadataType.Trigger:\n return visitor.visitTrigger(node, context);\n case AnimationMetadataType.State:\n return visitor.visitState(node, context);\n case AnimationMetadataType.Transition:\n return visitor.visitTransition(node, context);\n case AnimationMetadataType.Sequence:\n return visitor.visitSequence(node, context);\n case AnimationMetadataType.Group:\n return visitor.visitGroup(node, context);\n case AnimationMetadataType.Animate:\n return visitor.visitAnimate(node, context);\n case AnimationMetadataType.Keyframes:\n return visitor.visitKeyframes(node, context);\n case AnimationMetadataType.Style:\n return visitor.visitStyle(node, context);\n case AnimationMetadataType.Reference:\n return visitor.visitReference(node, context);\n case AnimationMetadataType.AnimateChild:\n return visitor.visitAnimateChild(node, context);\n case AnimationMetadataType.AnimateRef:\n return visitor.visitAnimateRef(node, context);\n case AnimationMetadataType.Query:\n return visitor.visitQuery(node, context);\n case AnimationMetadataType.Stagger:\n return visitor.visitStagger(node, context);\n default:\n throw invalidNodeType(node.type);\n }\n}\n\nexport function computeStyle(element: any, prop: string): string {\n return (<any>window.getComputedStyle(element))[prop];\n}\n"],"names":["RuntimeError","ɵAnimationGroupPlayer","normalizeKeyframes","PRE_STYLE"],"mappings":";;;;;;;;;AAWA,MAAM,UAAU,GAAG,OAAO;AAEpB,SAAU,kBAAkB,CAAC,GAAoB,EAAA;IACrD,OAAO,IAAIA,aAAY,CAErB,IAAA,8CAAA,SAAS,IAAI,CAA8B,2BAAA,EAAA,GAAG,CAAe,aAAA,CAAA,CAC9D;AACH;SAEgB,iBA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ular.io/ | ||
| * License: MIT | ||
| */ | ||
| import { validateStyleProperty, camelCaseToDashCase, validateWebAnimatableStyleProperty, containsElement, getParentElement, invokeQuery, normalizeKeyframes$1 as normalizeKeyframes, allowPreviousPlayerStylesMerge } from './_util-chunk.mjs'; | ||
| import { NoopAnimationPlayer, AUTO_STYLE } from './_private_export-chunk.mjs'; | ||
| import '@angular/core'; | ||
| /** | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| class MockAnimationDriver { | ||
| static log = []; | ||
| validateStyleProperty(prop) { | ||
| return validateStyleProperty(prop); | ||
| } | ||
| validateAnimatableStyleProperty(prop) { | ||
| const cssProp = camelCaseToDashCase(prop); | ||
| return validateWebAnimatableStyleProperty(cssProp); | ||
| } | ||
| containsElement(elm1, elm2) { | ||
| return containsElement(elm1, elm2); | ||
| } | ||
| getParentElement(element) { | ||
| return getParentElement(element); | ||
| } | ||
| query(element, selector, multi) { | ||
| return invokeQuery(element, selector, multi); | ||
| } | ||
| computeStyle(element, prop, defaultValue) { | ||
| return defaultValue || ''; | ||
| } | ||
| animate(element, keyframes, duration, delay, easing, previousPlayers = []) { | ||
| const player = new MockAnimationPlayer(element, keyframes, duration, delay, easing, previousPlayers); | ||
| MockAnimationDriver.log.push(player); | ||
| return player; | ||
| } | ||
| } | ||
| /** | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| class MockAnimationPlayer extends NoopAnimationPlayer { | ||
| element; | ||
| keyframes; | ||
| duration; | ||
| delay; | ||
| easing; | ||
| previousPlayers; | ||
| __finished = false; | ||
| __started = false; | ||
| previousStyles = new Map(); | ||
| _onInitFns = []; | ||
| currentSnapshot = new Map(); | ||
| _keyframes = []; | ||
| constructor(element, keyframes, duration, delay, easing, previousPlayers) { | ||
| super(duration, delay); | ||
| this.element = element; | ||
| this.keyframes = keyframes; | ||
| this.duration = duration; | ||
| this.delay = delay; | ||
| this.easing = easing; | ||
| this.previousPlayers = previousPlayers; | ||
| this._keyframes = normalizeKeyframes(keyframes); | ||
| if (allowPreviousPlayerStylesMerge(duration, delay)) { | ||
| previousPlayers.forEach((player) => { | ||
| if (player instanceof MockAnimationPlayer) { | ||
| const styles = player.currentSnapshot; | ||
| styles.forEach((val, prop) => this.previousStyles.set(prop, val)); | ||
| } | ||
| }); | ||
| } | ||
| } | ||
| /** @internal */ | ||
| onInit(fn) { | ||
| this._onInitFns.push(fn); | ||
| } | ||
| /** @internal */ | ||
| init() { | ||
| super.init(); | ||
| this._onInitFns.forEach((fn) => fn()); | ||
| this._onInitFns = []; | ||
| } | ||
| reset() { | ||
| super.reset(); | ||
| this.__started = false; | ||
| } | ||
| finish() { | ||
| super.finish(); | ||
| this.__finished = true; | ||
| } | ||
| destroy() { | ||
| super.destroy(); | ||
| this.__finished = true; | ||
| } | ||
| /** @internal */ | ||
| triggerMicrotask() { } | ||
| play() { | ||
| super.play(); | ||
| this.__started = true; | ||
| } | ||
| hasStarted() { | ||
| return this.__started; | ||
| } | ||
| beforeDestroy() { | ||
| const captures = new Map(); | ||
| this.previousStyles.forEach((val, prop) => captures.set(prop, val)); | ||
| if (this.hasStarted()) { | ||
| // when assembling the captured styles, it's important that | ||
| // we build the keyframe styles in the following order: | ||
| // {other styles within keyframes, ... previousStyles } | ||
| this._keyframes.forEach((kf) => { | ||
| for (let [prop, val] of kf) { | ||
| if (prop !== 'offset') { | ||
| captures.set(prop, this.__finished ? val : AUTO_STYLE); | ||
| } | ||
| } | ||
| }); | ||
| } | ||
| this.currentSnapshot = captures; | ||
| } | ||
| } | ||
| export { MockAnimationDriver, MockAnimationPlayer }; | ||
| //# sourceMappingURL=browser-testing.mjs.map |
| {"version":3,"file":"browser-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/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 *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\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 *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\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;;;;AAIG;MACU,mBAAmB,CAAA;AAC9B,IAAA,OAAO,GAAG,GAAsB,EAAE;AAElC,IAAA,qBAAqB,CAAC,IAAY,EAAA;AAChC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,IAAI,CAAC,UAAU,GAAG,IAAI;;IAGf,OAAO,GAAA;QACd,KAAK,CAAC,OAAO,EAAE;AACf,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI;;;AAIxB,IAAA,gBAAgB;IAEP,IAAI,GAAA;QACX,KAAK,CAAC,IAAI,EAAE;AACZ,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI;;IAGd,UAAU,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS;;IAGvB,aAAa,GAAA;AACX,QAAA,MAAM,QAAQ,GAAkB,IAAI,GAAG,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;;;;"} |
| /** | ||
| * @license Angular v21.0.0-next.6 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| import * as i0 from '@angular/core'; | ||
| import { AnimationPlayer } from './_animation_player-chunk.js'; | ||
| /** | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| * | ||
| * `AnimationDriver` implentation for Noop animations | ||
| */ | ||
| declare class NoopAnimationDriver implements AnimationDriver { | ||
| /** | ||
| * @returns Whether `prop` is a valid CSS property | ||
| */ | ||
| validateStyleProperty(prop: string): boolean; | ||
| /** | ||
| * | ||
| * @returns Whether elm1 contains elm2. | ||
| */ | ||
| containsElement(elm1: any, elm2: any): boolean; | ||
| /** | ||
| * @returns Rhe parent of the given element or `null` if the element is the `document` | ||
| */ | ||
| getParentElement(element: unknown): unknown; | ||
| /** | ||
| * @returns The result of the query selector on the element. The array will contain up to 1 item | ||
| * if `multi` is `false`. | ||
| */ | ||
| query(element: any, selector: string, multi: boolean): any[]; | ||
| /** | ||
| * @returns The `defaultValue` or empty string | ||
| */ | ||
| computeStyle(element: any, prop: string, defaultValue?: string): string; | ||
| /** | ||
| * @returns An `NoopAnimationPlayer` | ||
| */ | ||
| animate(element: any, keyframes: Array<Map<string, string | number>>, duration: number, delay: number, easing: string, previousPlayers?: any[], scrubberAccessRequested?: boolean): AnimationPlayer; | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<NoopAnimationDriver, never>; | ||
| static ɵprov: i0.ɵɵInjectableDeclaration<NoopAnimationDriver>; | ||
| } | ||
| /** | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare abstract class AnimationDriver { | ||
| /** | ||
| * @deprecated Use the NoopAnimationDriver class. | ||
| */ | ||
| static NOOP: AnimationDriver; | ||
| abstract validateStyleProperty(prop: string): boolean; | ||
| abstract validateAnimatableStyleProperty?: (prop: string) => boolean; | ||
| abstract containsElement(elm1: any, elm2: any): boolean; | ||
| /** | ||
| * Obtains the parent element, if any. `null` is returned if the element does not have a parent. | ||
| */ | ||
| abstract getParentElement(element: unknown): unknown; | ||
| abstract query(element: any, selector: string, multi: boolean): any[]; | ||
| abstract computeStyle(element: any, prop: string, defaultValue?: string): string; | ||
| abstract animate(element: any, keyframes: Array<Map<string, string | number>>, duration: number, delay: number, easing?: string | null, previousPlayers?: any[], scrubberAccessRequested?: boolean): any; | ||
| } | ||
| export { AnimationDriver, NoopAnimationDriver }; |
| /** | ||
| * @license Angular v21.0.0-next.6 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| /** | ||
| * Represents a set of CSS styles for use in an animation style as a generic. | ||
| */ | ||
| interface ɵStyleData { | ||
| [key: string]: string | number; | ||
| } | ||
| /** | ||
| * Represents a set of CSS styles for use in an animation style as a Map. | ||
| */ | ||
| type ɵStyleDataMap = Map<string, string | number>; | ||
| /** | ||
| * Represents animation-step timing parameters for an animation step. | ||
| * @see {@link animate} | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare type AnimateTimings = { | ||
| /** | ||
| * The full duration of an animation step. A number and optional time unit, | ||
| * such as "1s" or "10ms" for one second and 10 milliseconds, respectively. | ||
| * The default unit is milliseconds. | ||
| */ | ||
| duration: number; | ||
| /** | ||
| * The delay in applying an animation step. A number and optional time unit. | ||
| * The default unit is milliseconds. | ||
| */ | ||
| delay: number; | ||
| /** | ||
| * An easing style that controls how an animations step accelerates | ||
| * and decelerates during its run time. An easing function such as `cubic-bezier()`, | ||
| * or one of the following constants: | ||
| * - `ease-in` | ||
| * - `ease-out` | ||
| * - `ease-in-and-out` | ||
| */ | ||
| easing: string | null; | ||
| }; | ||
| /** | ||
| * @description Options that control animation styling and timing. | ||
| * | ||
| * The following animation functions accept `AnimationOptions` data: | ||
| * | ||
| * - `transition()` | ||
| * - `sequence()` | ||
| * - `group()` | ||
| * - `query()` | ||
| * - `animation()` | ||
| * - `useAnimation()` | ||
| * - `animateChild()` | ||
| * | ||
| * Programmatic animations built using the `AnimationBuilder` service also | ||
| * make use of `AnimationOptions`. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare interface AnimationOptions { | ||
| /** | ||
| * Sets a time-delay for initiating an animation action. | ||
| * A number and optional time unit, such as "1s" or "10ms" for one second | ||
| * and 10 milliseconds, respectively.The default unit is milliseconds. | ||
| * Default value is 0, meaning no delay. | ||
| */ | ||
| delay?: number | string; | ||
| /** | ||
| * A set of developer-defined parameters that modify styling and timing | ||
| * when an animation action starts. An array of key-value pairs, where the provided value | ||
| * is used as a default. | ||
| */ | ||
| params?: { | ||
| [name: string]: any; | ||
| }; | ||
| } | ||
| /** | ||
| * Adds duration options to control animation styling and timing for a child animation. | ||
| * | ||
| * @see {@link animateChild} | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare interface AnimateChildOptions extends AnimationOptions { | ||
| duration?: number | string; | ||
| } | ||
| /** | ||
| * @description Constants for the categories of parameters that can be defined for animations. | ||
| * | ||
| * A corresponding function defines a set of parameters for each category, and | ||
| * collects them into a corresponding `AnimationMetadata` object. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare enum AnimationMetadataType { | ||
| /** | ||
| * Associates a named animation state with a set of CSS styles. | ||
| * See [`state()`](api/animations/state) | ||
| */ | ||
| State = 0, | ||
| /** | ||
| * Data for a transition from one animation state to another. | ||
| * See `transition()` | ||
| */ | ||
| Transition = 1, | ||
| /** | ||
| * Contains a set of animation steps. | ||
| * See `sequence()` | ||
| */ | ||
| Sequence = 2, | ||
| /** | ||
| * Contains a set of animation steps. | ||
| * See `group()` | ||
| */ | ||
| Group = 3, | ||
| /** | ||
| * Contains an animation step. | ||
| * See `animate()` | ||
| */ | ||
| Animate = 4, | ||
| /** | ||
| * Contains a set of animation steps. | ||
| * See `keyframes()` | ||
| */ | ||
| Keyframes = 5, | ||
| /** | ||
| * Contains a set of CSS property-value pairs into a named style. | ||
| * See `style()` | ||
| */ | ||
| Style = 6, | ||
| /** | ||
| * Associates an animation with an entry trigger that can be attached to an element. | ||
| * See `trigger()` | ||
| */ | ||
| Trigger = 7, | ||
| /** | ||
| * Contains a re-usable animation. | ||
| * See `animation()` | ||
| */ | ||
| Reference = 8, | ||
| /** | ||
| * Contains data to use in executing child animations returned by a query. | ||
| * See `animateChild()` | ||
| */ | ||
| AnimateChild = 9, | ||
| /** | ||
| * Contains animation parameters for a re-usable animation. | ||
| * See `useAnimation()` | ||
| */ | ||
| AnimateRef = 10, | ||
| /** | ||
| * Contains child-animation query data. | ||
| * See `query()` | ||
| */ | ||
| Query = 11, | ||
| /** | ||
| * Contains data for staggering an animation sequence. | ||
| * See `stagger()` | ||
| */ | ||
| Stagger = 12 | ||
| } | ||
| /** | ||
| * Specifies automatic styling. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare const AUTO_STYLE = "*"; | ||
| /** | ||
| * Base for animation data structures. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationMetadata { | ||
| type: AnimationMetadataType; | ||
| } | ||
| /** | ||
| * Contains an animation trigger. Instantiated and returned by the | ||
| * `trigger()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationTriggerMetadata extends AnimationMetadata { | ||
| /** | ||
| * The trigger name, used to associate it with an element. Unique within the component. | ||
| */ | ||
| name: string; | ||
| /** | ||
| * An animation definition object, containing an array of state and transition declarations. | ||
| */ | ||
| definitions: AnimationMetadata[]; | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: { | ||
| params?: { | ||
| [name: string]: any; | ||
| }; | ||
| } | null; | ||
| } | ||
| /** | ||
| * Encapsulates an animation state by associating a state name with a set of CSS styles. | ||
| * Instantiated and returned by the [`state()`](api/animations/state) function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationStateMetadata extends AnimationMetadata { | ||
| /** | ||
| * The state name, unique within the component. | ||
| */ | ||
| name: string; | ||
| /** | ||
| * The CSS styles associated with this state. | ||
| */ | ||
| styles: AnimationStyleMetadata; | ||
| /** | ||
| * An options object containing | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. | ||
| */ | ||
| options?: { | ||
| params: { | ||
| [name: string]: any; | ||
| }; | ||
| }; | ||
| } | ||
| /** | ||
| * Encapsulates an animation transition. Instantiated and returned by the | ||
| * `transition()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationTransitionMetadata extends AnimationMetadata { | ||
| /** | ||
| * An expression that describes a state change. | ||
| */ | ||
| expr: string | ((fromState: string, toState: string, element?: any, params?: { | ||
| [key: string]: any; | ||
| }) => boolean); | ||
| /** | ||
| * One or more animation objects to which this transition applies. | ||
| */ | ||
| animation: AnimationMetadata | AnimationMetadata[]; | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: AnimationOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates a reusable animation, which is a collection of individual animation steps. | ||
| * Instantiated and returned by the `animation()` function, and | ||
| * passed to the `useAnimation()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationReferenceMetadata extends AnimationMetadata { | ||
| /** | ||
| * One or more animation step objects. | ||
| */ | ||
| animation: AnimationMetadata | AnimationMetadata[]; | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: AnimationOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates an animation query. Instantiated and returned by | ||
| * the `query()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationQueryMetadata extends AnimationMetadata { | ||
| /** | ||
| * The CSS selector for this query. | ||
| */ | ||
| selector: string; | ||
| /** | ||
| * One or more animation step objects. | ||
| */ | ||
| animation: AnimationMetadata | AnimationMetadata[]; | ||
| /** | ||
| * A query options object. | ||
| */ | ||
| options: AnimationQueryOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates a keyframes sequence. Instantiated and returned by | ||
| * the `keyframes()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationKeyframesSequenceMetadata extends AnimationMetadata { | ||
| /** | ||
| * An array of animation styles. | ||
| */ | ||
| steps: AnimationStyleMetadata[]; | ||
| } | ||
| /** | ||
| * Encapsulates an animation style. Instantiated and returned by | ||
| * the `style()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationStyleMetadata extends AnimationMetadata { | ||
| /** | ||
| * A set of CSS style properties. | ||
| */ | ||
| styles: '*' | { | ||
| [key: string]: string | number; | ||
| } | Array<{ | ||
| [key: string]: string | number; | ||
| } | '*'>; | ||
| /** | ||
| * A percentage of the total animate time at which the style is to be applied. | ||
| */ | ||
| offset: number | null; | ||
| } | ||
| /** | ||
| * Encapsulates an animation step. Instantiated and returned by | ||
| * the `animate()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationAnimateMetadata extends AnimationMetadata { | ||
| /** | ||
| * The timing data for the step. | ||
| */ | ||
| timings: string | number | AnimateTimings; | ||
| /** | ||
| * A set of styles used in the step. | ||
| */ | ||
| styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null; | ||
| } | ||
| /** | ||
| * Encapsulates a child animation, that can be run explicitly when the parent is run. | ||
| * Instantiated and returned by the `animateChild` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationAnimateChildMetadata extends AnimationMetadata { | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: AnimationOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates a reusable animation. | ||
| * Instantiated and returned by the `useAnimation()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationAnimateRefMetadata extends AnimationMetadata { | ||
| /** | ||
| * An animation reference object. | ||
| */ | ||
| animation: AnimationReferenceMetadata; | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: AnimationOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates an animation sequence. | ||
| * Instantiated and returned by the `sequence()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationSequenceMetadata extends AnimationMetadata { | ||
| /** | ||
| * An array of animation step objects. | ||
| */ | ||
| steps: AnimationMetadata[]; | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: AnimationOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates an animation group. | ||
| * Instantiated and returned by the `group()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationGroupMetadata extends AnimationMetadata { | ||
| /** | ||
| * One or more animation or style steps that form this group. | ||
| */ | ||
| steps: AnimationMetadata[]; | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: AnimationOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates animation query options. | ||
| * Passed to the `query()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare interface AnimationQueryOptions extends AnimationOptions { | ||
| /** | ||
| * True if this query is optional, false if it is required. Default is false. | ||
| * A required query throws an error if no elements are retrieved when | ||
| * the query is executed. An optional query does not. | ||
| * | ||
| */ | ||
| optional?: boolean; | ||
| /** | ||
| * A maximum total number of results to return from the query. | ||
| * If negative, results are limited from the end of the query list towards the beginning. | ||
| * By default, results are not limited. | ||
| */ | ||
| limit?: number; | ||
| } | ||
| /** | ||
| * Encapsulates parameters for staggering the start times of a set of animation steps. | ||
| * Instantiated and returned by the `stagger()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| interface AnimationStaggerMetadata extends AnimationMetadata { | ||
| /** | ||
| * The timing data for the steps. | ||
| */ | ||
| timings: string | number; | ||
| /** | ||
| * One or more animation steps. | ||
| */ | ||
| animation: AnimationMetadata | AnimationMetadata[]; | ||
| } | ||
| /** | ||
| * Creates a named animation trigger, containing a list of [`state()`](api/animations/state) | ||
| * and `transition()` entries to be evaluated when the expression | ||
| * bound to the trigger changes. | ||
| * | ||
| * @param name An identifying string. | ||
| * @param definitions An animation definition object, containing an array of | ||
| * [`state()`](api/animations/state) and `transition()` declarations. | ||
| * | ||
| * @return An object that encapsulates the trigger data. | ||
| * | ||
| * @usageNotes | ||
| * Define an animation trigger in the `animations` section of `@Component` metadata. | ||
| * In the template, reference the trigger by name and bind it to a trigger expression that | ||
| * evaluates to a defined animation state, using the following format: | ||
| * | ||
| * `[@triggerName]="expression"` | ||
| * | ||
| * Animation trigger bindings convert all values to strings, and then match the | ||
| * previous and current values against any linked transitions. | ||
| * Booleans can be specified as `1` or `true` and `0` or `false`. | ||
| * | ||
| * ### Usage Example | ||
| * | ||
| * The following example creates an animation trigger reference based on the provided | ||
| * name value. | ||
| * The provided animation value is expected to be an array consisting of state and | ||
| * transition declarations. | ||
| * | ||
| * ```ts | ||
| * @Component({ | ||
| * selector: "my-component", | ||
| * templateUrl: "my-component-tpl.html", | ||
| * animations: [ | ||
| * trigger("myAnimationTrigger", [ | ||
| * state(...), | ||
| * state(...), | ||
| * transition(...), | ||
| * transition(...) | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * myStatusExp = "something"; | ||
| * } | ||
| * ``` | ||
| * | ||
| * The template associated with this component makes use of the defined trigger | ||
| * by binding to an element within its template code. | ||
| * | ||
| * ```html | ||
| * <!-- somewhere inside of my-component-tpl.html --> | ||
| * <div [@myAnimationTrigger]="myStatusExp">...</div> | ||
| * ``` | ||
| * | ||
| * ### Using an inline function | ||
| * The `transition` animation method also supports reading an inline function which can decide | ||
| * if its associated animation should be run. | ||
| * | ||
| * ```ts | ||
| * // this method is run each time the `myAnimationTrigger` trigger value changes. | ||
| * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key: | ||
| string]: any}): boolean { | ||
| * // notice that `element` and `params` are also available here | ||
| * return toState == 'yes-please-animate'; | ||
| * } | ||
| * | ||
| * @Component({ | ||
| * selector: 'my-component', | ||
| * templateUrl: 'my-component-tpl.html', | ||
| * animations: [ | ||
| * trigger('myAnimationTrigger', [ | ||
| * transition(myInlineMatcherFn, [ | ||
| * // the animation sequence code | ||
| * ]), | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * myStatusExp = "yes-please-animate"; | ||
| * } | ||
| * ``` | ||
| * | ||
| * ### Disabling Animations | ||
| * When true, the special animation control binding `@.disabled` binding prevents | ||
| * all animations from rendering. | ||
| * Place the `@.disabled` binding on an element to disable | ||
| * animations on the element itself, as well as any inner animation triggers | ||
| * within the element. | ||
| * | ||
| * The following example shows how to use this feature: | ||
| * | ||
| * ```angular-ts | ||
| * @Component({ | ||
| * selector: 'my-component', | ||
| * template: ` | ||
| * <div [@.disabled]="isDisabled"> | ||
| * <div [@childAnimation]="exp"></div> | ||
| * </div> | ||
| * `, | ||
| * animations: [ | ||
| * trigger("childAnimation", [ | ||
| * // ... | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * isDisabled = true; | ||
| * exp = '...'; | ||
| * } | ||
| * ``` | ||
| * | ||
| * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating, | ||
| * along with any inner animations. | ||
| * | ||
| * ### Disable animations application-wide | ||
| * When an area of the template is set to have animations disabled, | ||
| * **all** inner components have their animations disabled as well. | ||
| * This means that you can disable all animations for an app | ||
| * by placing a host binding set on `@.disabled` on the topmost Angular component. | ||
| * | ||
| * ```ts | ||
| * import {Component, HostBinding} from '@angular/core'; | ||
| * | ||
| * @Component({ | ||
| * selector: 'app-component', | ||
| * templateUrl: 'app.component.html', | ||
| * }) | ||
| * class AppComponent { | ||
| * @HostBinding('@.disabled') | ||
| * public animationsDisabled = true; | ||
| * } | ||
| * ``` | ||
| * | ||
| * ### Overriding disablement of inner animations | ||
| * Despite inner animations being disabled, a parent animation can `query()` | ||
| * for inner elements located in disabled areas of the template and still animate | ||
| * them if needed. This is also the case for when a sub animation is | ||
| * queried by a parent and then later animated using `animateChild()`. | ||
| * | ||
| * ### Detecting when an animation is disabled | ||
| * If a region of the DOM (or the entire application) has its animations disabled, the animation | ||
| * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides | ||
| * an instance of an `AnimationEvent`. If animations are disabled, | ||
| * the `.disabled` flag on the event is true. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function trigger(name: string, definitions: AnimationMetadata[]): AnimationTriggerMetadata; | ||
| /** | ||
| * Defines an animation step that combines styling information with timing information. | ||
| * | ||
| * @param timings Sets `AnimateTimings` for the parent animation. | ||
| * A string in the format "duration [delay] [easing]". | ||
| * - Duration and delay are expressed as a number and optional time unit, | ||
| * such as "1s" or "10ms" for one second and 10 milliseconds, respectively. | ||
| * The default unit is milliseconds. | ||
| * - The easing value controls how the animation accelerates and decelerates | ||
| * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`, | ||
| * `ease-in-out`, or a `cubic-bezier()` function call. | ||
| * If not supplied, no easing is applied. | ||
| * | ||
| * For example, the string "1s 100ms ease-out" specifies a duration of | ||
| * 1000 milliseconds, and delay of 100 ms, and the "ease-out" easing style, | ||
| * which decelerates near the end of the duration. | ||
| * @param styles Sets AnimationStyles for the parent animation. | ||
| * A function call to either `style()` or `keyframes()` | ||
| * that returns a collection of CSS style entries to be applied to the parent animation. | ||
| * When null, uses the styles from the destination state. | ||
| * This is useful when describing an animation step that will complete an animation; | ||
| * see "Animating to the final state" in `transitions()`. | ||
| * @returns An object that encapsulates the animation step. | ||
| * | ||
| * @usageNotes | ||
| * Call within an animation `sequence()`, {@link /api/animations/group group()}, or | ||
| * `transition()` call to specify an animation step | ||
| * that applies given style data to the parent animation for a given amount of time. | ||
| * | ||
| * ### Syntax Examples | ||
| * **Timing examples** | ||
| * | ||
| * The following examples show various `timings` specifications. | ||
| * - `animate(500)` : Duration is 500 milliseconds. | ||
| * - `animate("1s")` : Duration is 1000 milliseconds. | ||
| * - `animate("100ms 0.5s")` : Duration is 100 milliseconds, delay is 500 milliseconds. | ||
| * - `animate("5s ease-in")` : Duration is 5000 milliseconds, easing in. | ||
| * - `animate("5s 10ms cubic-bezier(.17,.67,.88,.1)")` : Duration is 5000 milliseconds, delay is 10 | ||
| * milliseconds, easing according to a bezier curve. | ||
| * | ||
| * **Style examples** | ||
| * | ||
| * The following example calls `style()` to set a single CSS style. | ||
| * ```ts | ||
| * animate(500, style({ background: "red" })) | ||
| * ``` | ||
| * The following example calls `keyframes()` to set a CSS style | ||
| * to different values for successive keyframes. | ||
| * ```ts | ||
| * animate(500, keyframes( | ||
| * [ | ||
| * style({ background: "blue" }), | ||
| * style({ background: "red" }) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function animate(timings: string | number, styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null): AnimationAnimateMetadata; | ||
| /** | ||
| * @description Defines a list of animation steps to be run in parallel. | ||
| * | ||
| * @param steps An array of animation step objects. | ||
| * - When steps are defined by `style()` or `animate()` | ||
| * function calls, each call within the group is executed instantly. | ||
| * - To specify offset styles to be applied at a later time, define steps with | ||
| * `keyframes()`, or use `animate()` calls with a delay value. | ||
| * For example: | ||
| * | ||
| * ```ts | ||
| * group([ | ||
| * animate("1s", style({ background: "black" })), | ||
| * animate("2s", style({ color: "white" })) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @param options An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. | ||
| * | ||
| * @return An object that encapsulates the group data. | ||
| * | ||
| * @usageNotes | ||
| * Grouped animations are useful when a series of styles must be | ||
| * animated at different starting times and closed off at different ending times. | ||
| * | ||
| * When called within a `sequence()` or a | ||
| * `transition()` call, does not continue to the next | ||
| * instruction until all of the inner animation steps have completed. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function group(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationGroupMetadata; | ||
| /** | ||
| * Defines a list of animation steps to be run sequentially, one by one. | ||
| * | ||
| * @param steps An array of animation step objects. | ||
| * - Steps defined by `style()` calls apply the styling data immediately. | ||
| * - Steps defined by `animate()` calls apply the styling data over time | ||
| * as specified by the timing data. | ||
| * | ||
| * ```ts | ||
| * sequence([ | ||
| * style({ opacity: 0 }), | ||
| * animate("1s", style({ opacity: 1 })) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @param options An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. | ||
| * | ||
| * @return An object that encapsulates the sequence data. | ||
| * | ||
| * @usageNotes | ||
| * When you pass an array of steps to a | ||
| * `transition()` call, the steps run sequentially by default. | ||
| * Compare this to the {@link /api/animations/group group()} call, which runs animation steps in | ||
| *parallel. | ||
| * | ||
| * When a sequence is used within a {@link /api/animations/group group()} or a `transition()` call, | ||
| * execution continues to the next instruction only after each of the inner animation | ||
| * steps have completed. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| declare function sequence(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationSequenceMetadata; | ||
| /** | ||
| * Declares a key/value object containing CSS properties/styles that | ||
| * can then be used for an animation [`state`](api/animations/state), within an animation | ||
| *`sequence`, or as styling data for calls to `animate()` and `keyframes()`. | ||
| * | ||
| * @param tokens A set of CSS styles or HTML styles associated with an animation state. | ||
| * The value can be any of the following: | ||
| * - A key-value style pair associating a CSS property with a value. | ||
| * - An array of key-value style pairs. | ||
| * - An asterisk (*), to use auto-styling, where styles are derived from the element | ||
| * being animated and applied to the animation when it starts. | ||
| * | ||
| * Auto-styling can be used to define a state that depends on layout or other | ||
| * environmental factors. | ||
| * | ||
| * @return An object that encapsulates the style data. | ||
| * | ||
| * @usageNotes | ||
| * The following examples create animation styles that collect a set of | ||
| * CSS property values: | ||
| * | ||
| * ```ts | ||
| * // string values for CSS properties | ||
| * style({ background: "red", color: "blue" }) | ||
| * | ||
| * // numerical pixel values | ||
| * style({ width: 100, height: 0 }) | ||
| * ``` | ||
| * | ||
| * The following example uses auto-styling to allow an element to animate from | ||
| * a height of 0 up to its full height: | ||
| * | ||
| * ```ts | ||
| * style({ height: 0 }), | ||
| * animate("1s", style({ height: "*" })) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| declare function style(tokens: '*' | { | ||
| [key: string]: string | number; | ||
| } | Array<'*' | { | ||
| [key: string]: string | number; | ||
| }>): AnimationStyleMetadata; | ||
| /** | ||
| * Declares an animation state within a trigger attached to an element. | ||
| * | ||
| * @param name One or more names for the defined state in a comma-separated string. | ||
| * The following reserved state names can be supplied to define a style for specific use | ||
| * cases: | ||
| * | ||
| * - `void` You can associate styles with this name to be used when | ||
| * the element is detached from the application. For example, when an `ngIf` evaluates | ||
| * to false, the state of the associated element is void. | ||
| * - `*` (asterisk) Indicates the default state. You can associate styles with this name | ||
| * to be used as the fallback when the state that is being animated is not declared | ||
| * within the trigger. | ||
| * | ||
| * @param styles A set of CSS styles associated with this state, created using the | ||
| * `style()` function. | ||
| * This set of styles persists on the element once the state has been reached. | ||
| * @param options Parameters that can be passed to the state when it is invoked. | ||
| * 0 or more key-value pairs. | ||
| * @return An object that encapsulates the new state data. | ||
| * | ||
| * @usageNotes | ||
| * Use the `trigger()` function to register states to an animation trigger. | ||
| * Use the `transition()` function to animate between states. | ||
| * When a state is active within a component, its associated styles persist on the element, | ||
| * even when the animation ends. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| declare function state(name: string, styles: AnimationStyleMetadata, options?: { | ||
| params: { | ||
| [name: string]: any; | ||
| }; | ||
| }): AnimationStateMetadata; | ||
| /** | ||
| * Defines a set of animation styles, associating each style with an optional `offset` value. | ||
| * | ||
| * @param steps A set of animation styles with optional offset data. | ||
| * The optional `offset` value for a style specifies a percentage of the total animation | ||
| * time at which that style is applied. | ||
| * @returns An object that encapsulates the keyframes data. | ||
| * | ||
| * @usageNotes | ||
| * Use with the `animate()` call. Instead of applying animations | ||
| * from the current state | ||
| * to the destination state, keyframes describe how each style entry is applied and at what point | ||
| * within the animation arc. | ||
| * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp). | ||
| * | ||
| * ### Usage | ||
| * | ||
| * In the following example, the offset values describe | ||
| * when each `backgroundColor` value is applied. The color is red at the start, and changes to | ||
| * blue when 20% of the total time has elapsed. | ||
| * | ||
| * ```ts | ||
| * // the provided offset values | ||
| * animate("5s", keyframes([ | ||
| * style({ backgroundColor: "red", offset: 0 }), | ||
| * style({ backgroundColor: "blue", offset: 0.2 }), | ||
| * style({ backgroundColor: "orange", offset: 0.3 }), | ||
| * style({ backgroundColor: "black", offset: 1 }) | ||
| * ])) | ||
| * ``` | ||
| * | ||
| * If there are no `offset` values specified in the style entries, the offsets | ||
| * are calculated automatically. | ||
| * | ||
| * ```ts | ||
| * animate("5s", keyframes([ | ||
| * style({ backgroundColor: "red" }) // offset = 0 | ||
| * style({ backgroundColor: "blue" }) // offset = 0.33 | ||
| * style({ backgroundColor: "orange" }) // offset = 0.66 | ||
| * style({ backgroundColor: "black" }) // offset = 1 | ||
| * ])) | ||
| *``` | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata; | ||
| /** | ||
| * Declares an animation transition which is played when a certain specified condition is met. | ||
| * | ||
| * @param stateChangeExpr A string with a specific format or a function that specifies when the | ||
| * animation transition should occur (see [State Change Expression](#state-change-expression)). | ||
| * | ||
| * @param steps One or more animation objects that represent the animation's instructions. | ||
| * | ||
| * @param options An options object that can be used to specify a delay for the animation or provide | ||
| * custom parameters for it. | ||
| * | ||
| * @returns An object that encapsulates the transition data. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * ### State Change Expression | ||
| * | ||
| * The State Change Expression instructs Angular when to run the transition's animations, it can | ||
| *either be | ||
| * - a string with a specific syntax | ||
| * - or a function that compares the previous and current state (value of the expression bound to | ||
| * the element's trigger) and returns `true` if the transition should occur or `false` otherwise | ||
| * | ||
| * The string format can be: | ||
| * - `fromState => toState`, which indicates that the transition's animations should occur then the | ||
| * expression bound to the trigger's element goes from `fromState` to `toState` | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition('open => closed', animate('.5s ease-out', style({ height: 0 }) )) | ||
| * ``` | ||
| * | ||
| * - `fromState <=> toState`, which indicates that the transition's animations should occur then | ||
| * the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)')) | ||
| * ``` | ||
| * | ||
| * - `:enter`/`:leave`, which indicates that the transition's animations should occur when the | ||
| * element enters or exists the DOM | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition(':enter', [ | ||
| * style({ opacity: 0 }), | ||
| * animate('500ms', style({ opacity: 1 })) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * - `:increment`/`:decrement`, which indicates that the transition's animations should occur when | ||
| * the numerical expression bound to the trigger's element has increased in value or decreased | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition(':increment', query('@counter', animateChild())) | ||
| * ``` | ||
| * | ||
| * - a sequence of any of the above divided by commas, which indicates that transition's animations | ||
| * should occur whenever one of the state change expressions matches | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([ | ||
| * style({ transform: 'scale(1)', offset: 0}), | ||
| * style({ transform: 'scale(1.1)', offset: 0.7}), | ||
| * style({ transform: 'scale(1)', offset: 1}) | ||
| * ]))), | ||
| * ``` | ||
| * | ||
| * Also note that in such context: | ||
| * - `void` can be used to indicate the absence of the element | ||
| * - asterisks can be used as wildcards that match any state | ||
| * - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is | ||
| * equivalent to `:leave`) | ||
| * - `true` and `false` also match expression values of `1` and `0` respectively (but do not match | ||
| * _truthy_ and _falsy_ values) | ||
| * | ||
| * <div class="docs-alert docs-alert-helpful"> | ||
| * | ||
| * Be careful about entering end leaving elements as their transitions present a common | ||
| * pitfall for developers. | ||
| * | ||
| * Note that when an element with a trigger enters the DOM its `:enter` transition always | ||
| * gets executed, but its `:leave` transition will not be executed if the element is removed | ||
| * alongside its parent (as it will be removed "without warning" before its transition has | ||
| * a chance to be executed, the only way that such transition can occur is if the element | ||
| * is exiting the DOM on its own). | ||
| * | ||
| * | ||
| * </div> | ||
| * | ||
| * ### Animating to a Final State | ||
| * | ||
| * If the final step in a transition is a call to `animate()` that uses a timing value | ||
| * with no `style` data, that step is automatically considered the final animation arc, | ||
| * for the element to reach the final state, in such case Angular automatically adds or removes | ||
| * CSS styles to ensure that the element is in the correct final state. | ||
| * | ||
| * | ||
| * ### Usage Examples | ||
| * | ||
| * - Transition animations applied based on | ||
| * the trigger's expression value | ||
| * | ||
| * ```html | ||
| * <div [@myAnimationTrigger]="myStatusExp"> | ||
| * ... | ||
| * </div> | ||
| * ``` | ||
| * | ||
| * ```ts | ||
| * trigger("myAnimationTrigger", [ | ||
| * ..., // states | ||
| * transition("on => off, open => closed", animate(500)), | ||
| * transition("* <=> error", query('.indicator', animateChild())) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * - Transition animations applied based on custom logic dependent | ||
| * on the trigger's expression value and provided parameters | ||
| * | ||
| * ```html | ||
| * <div [@myAnimationTrigger]="{ | ||
| * value: stepName, | ||
| * params: { target: currentTarget } | ||
| * }"> | ||
| * ... | ||
| * </div> | ||
| * ``` | ||
| * | ||
| * ```ts | ||
| * trigger("myAnimationTrigger", [ | ||
| * ..., // states | ||
| * transition( | ||
| * (fromState, toState, _element, params) => | ||
| * ['firststep', 'laststep'].includes(fromState.toLowerCase()) | ||
| * && toState === params?.['target'], | ||
| * animate('1s') | ||
| * ) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| declare function transition(stateChangeExpr: string | ((fromState: string, toState: string, element?: any, params?: { | ||
| [key: string]: any; | ||
| }) => boolean), steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationTransitionMetadata; | ||
| /** | ||
| * Produces a reusable animation that can be invoked in another animation or sequence, | ||
| * by calling the `useAnimation()` function. | ||
| * | ||
| * @param steps One or more animation objects, as returned by the `animate()` | ||
| * or `sequence()` function, that form a transformation from one state to another. | ||
| * A sequence is used by default when you pass an array. | ||
| * @param options An options object that can contain a delay value for the start of the | ||
| * animation, and additional developer-defined parameters. | ||
| * Provided values for additional parameters are used as defaults, | ||
| * and override values can be passed to the caller on invocation. | ||
| * @returns An object that encapsulates the animation data. | ||
| * | ||
| * @usageNotes | ||
| * The following example defines a reusable animation, providing some default parameter | ||
| * values. | ||
| * | ||
| * ```ts | ||
| * var fadeAnimation = animation([ | ||
| * style({ opacity: '{{ start }}' }), | ||
| * animate('{{ time }}', | ||
| * style({ opacity: '{{ end }}'})) | ||
| * ], | ||
| * { params: { time: '1000ms', start: 0, end: 1 }}); | ||
| * ``` | ||
| * | ||
| * The following invokes the defined animation with a call to `useAnimation()`, | ||
| * passing in override parameter values. | ||
| * | ||
| * ```js | ||
| * useAnimation(fadeAnimation, { | ||
| * params: { | ||
| * time: '2s', | ||
| * start: 1, | ||
| * end: 0 | ||
| * } | ||
| * }) | ||
| * ``` | ||
| * | ||
| * If any of the passed-in parameter values are missing from this call, | ||
| * the default values are used. If one or more parameter values are missing before a step is | ||
| * animated, `useAnimation()` throws an error. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function animation(steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationReferenceMetadata; | ||
| /** | ||
| * Executes a queried inner animation element within an animation sequence. | ||
| * | ||
| * @param options An options object that can contain a delay value for the start of the | ||
| * animation, and additional override values for developer-defined parameters. | ||
| * @return An object that encapsulates the child animation data. | ||
| * | ||
| * @usageNotes | ||
| * Each time an animation is triggered in Angular, the parent animation | ||
| * has priority and any child animations are blocked. In order | ||
| * for a child animation to run, the parent animation must query each of the elements | ||
| * containing child animations, and run them using this function. | ||
| * | ||
| * Note that this feature is designed to be used with `query()` and it will only work | ||
| * with animations that are assigned using the Angular animation library. CSS keyframes | ||
| * and transitions are not handled by this API. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function animateChild(options?: AnimateChildOptions | null): AnimationAnimateChildMetadata; | ||
| /** | ||
| * Starts a reusable animation that is created using the `animation()` function. | ||
| * | ||
| * @param animation The reusable animation to start. | ||
| * @param options An options object that can contain a delay value for the start of | ||
| * the animation, and additional override values for developer-defined parameters. | ||
| * @return An object that contains the animation parameters. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function useAnimation(animation: AnimationReferenceMetadata, options?: AnimationOptions | null): AnimationAnimateRefMetadata; | ||
| /** | ||
| * Finds one or more inner elements within the current element that is | ||
| * being animated within a sequence. Use with `animate()`. | ||
| * | ||
| * @param selector The element to query, or a set of elements that contain Angular-specific | ||
| * characteristics, specified with one or more of the following tokens. | ||
| * - `query(":enter")` or `query(":leave")` : Query for newly inserted/removed elements (not | ||
| * all elements can be queried via these tokens, see | ||
| * [Entering and Leaving Elements](#entering-and-leaving-elements)) | ||
| * - `query(":animating")` : Query all currently animating elements. | ||
| * - `query("@triggerName")` : Query elements that contain an animation trigger. | ||
| * - `query("@*")` : Query all elements that contain an animation triggers. | ||
| * - `query(":self")` : Include the current element into the animation sequence. | ||
| * | ||
| * @param animation One or more animation steps to apply to the queried element or elements. | ||
| * An array is treated as an animation sequence. | ||
| * @param options An options object. Use the 'limit' field to limit the total number of | ||
| * items to collect. | ||
| * @return An object that encapsulates the query data. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * ### Multiple Tokens | ||
| * | ||
| * Tokens can be merged into a combined query selector string. For example: | ||
| * | ||
| * ```ts | ||
| * query(':self, .record:enter, .record:leave, @subTrigger', [...]) | ||
| * ``` | ||
| * | ||
| * The `query()` function collects multiple elements and works internally by using | ||
| * `element.querySelectorAll`. Use the `limit` field of an options object to limit | ||
| * the total number of items to be collected. For example: | ||
| * | ||
| * ```js | ||
| * query('div', [ | ||
| * animate(...), | ||
| * animate(...) | ||
| * ], { limit: 1 }) | ||
| * ``` | ||
| * | ||
| * By default, throws an error when zero items are found. Set the | ||
| * `optional` flag to ignore this error. For example: | ||
| * | ||
| * ```js | ||
| * query('.some-element-that-may-not-be-there', [ | ||
| * animate(...), | ||
| * animate(...) | ||
| * ], { optional: true }) | ||
| * ``` | ||
| * | ||
| * ### Entering and Leaving Elements | ||
| * | ||
| * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones | ||
| * that can are those that Angular assumes can enter/leave based on their own logic | ||
| * (if their insertion/removal is simply a consequence of that of their parent they | ||
| * should be queried via a different token in their parent's `:enter`/`:leave` transitions). | ||
| * | ||
| * The only elements Angular assumes can enter/leave based on their own logic (thus the only | ||
| * ones that can be queried via the `:enter` and `:leave` tokens) are: | ||
| * - Those inserted dynamically (via `ViewContainerRef`) | ||
| * - Those that have a structural directive (which, under the hood, are a subset of the above ones) | ||
| * | ||
| * <div class="docs-alert docs-alert-helpful"> | ||
| * | ||
| * Note that elements will be successfully queried via `:enter`/`:leave` even if their | ||
| * insertion/removal is not done manually via `ViewContainerRef`or caused by their structural | ||
| * directive (e.g. they enter/exit alongside their parent). | ||
| * | ||
| * </div> | ||
| * | ||
| * <div class="docs-alert docs-alert-important"> | ||
| * | ||
| * There is an exception to what previously mentioned, besides elements entering/leaving based on | ||
| * their own logic, elements with an animation trigger can always be queried via `:leave` when | ||
| * their parent is also leaving. | ||
| * | ||
| * </div> | ||
| * | ||
| * ### Usage Example | ||
| * | ||
| * The following example queries for inner elements and animates them | ||
| * individually using `animate()`. | ||
| * | ||
| * ```angular-ts | ||
| * @Component({ | ||
| * selector: 'inner', | ||
| * template: ` | ||
| * <div [@queryAnimation]="exp"> | ||
| * <h1>Title</h1> | ||
| * <div class="content"> | ||
| * Blah blah blah | ||
| * </div> | ||
| * </div> | ||
| * `, | ||
| * animations: [ | ||
| * trigger('queryAnimation', [ | ||
| * transition('* => goAnimate', [ | ||
| * // hide the inner elements | ||
| * query('h1', style({ opacity: 0 })), | ||
| * query('.content', style({ opacity: 0 })), | ||
| * | ||
| * // animate the inner elements in, one by one | ||
| * query('h1', animate(1000, style({ opacity: 1 }))), | ||
| * query('.content', animate(1000, style({ opacity: 1 }))), | ||
| * ]) | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class Cmp { | ||
| * exp = ''; | ||
| * | ||
| * goAnimate() { | ||
| * this.exp = 'goAnimate'; | ||
| * } | ||
| * } | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function query(selector: string, animation: AnimationMetadata | AnimationMetadata[], options?: AnimationQueryOptions | null): AnimationQueryMetadata; | ||
| /** | ||
| * Use within an animation `query()` call to issue a timing gap after | ||
| * each queried item is animated. | ||
| * | ||
| * @param timings A delay value. | ||
| * @param animation One ore more animation steps. | ||
| * @returns An object that encapsulates the stagger data. | ||
| * | ||
| * @usageNotes | ||
| * In the following example, a container element wraps a list of items stamped out | ||
| * by an `@for` block. The container element contains an animation trigger that will later be set | ||
| * to query for each of the inner items. | ||
| * | ||
| * Each time items are added, the opacity fade-in animation runs, | ||
| * and each removed item is faded out. | ||
| * When either of these animations occur, the stagger effect is | ||
| * applied after each item's animation is started. | ||
| * | ||
| * ```html | ||
| * <!-- list.component.html --> | ||
| * <button (click)="toggle()">Show / Hide Items</button> | ||
| * <hr /> | ||
| * <div [@listAnimation]="items.length"> | ||
| * @for(item of items; track $index) { | ||
| * <div>{{ item }}</div> | ||
| * } | ||
| * </div> | ||
| * ``` | ||
| * | ||
| * Here is the component code: | ||
| * | ||
| * ```ts | ||
| * import {trigger, transition, style, animate, query, stagger} from '@angular/animations'; | ||
| * @Component({ | ||
| * templateUrl: 'list.component.html', | ||
| * animations: [ | ||
| * trigger('listAnimation', [ | ||
| * ... | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class ListComponent { | ||
| * items = []; | ||
| * | ||
| * showItems() { | ||
| * this.items = [0,1,2,3,4]; | ||
| * } | ||
| * | ||
| * hideItems() { | ||
| * this.items = []; | ||
| * } | ||
| * | ||
| * toggle() { | ||
| * this.items.length ? this.hideItems() : this.showItems(); | ||
| * } | ||
| * } | ||
| * ``` | ||
| * | ||
| * Here is the animation trigger code: | ||
| * | ||
| * ```ts | ||
| * trigger('listAnimation', [ | ||
| * transition('* => *', [ // each time the binding value changes | ||
| * query(':leave', [ | ||
| * stagger(100, [ | ||
| * animate('0.5s', style({ opacity: 0 })) | ||
| * ]) | ||
| * ]), | ||
| * query(':enter', [ | ||
| * style({ opacity: 0 }), | ||
| * stagger(100, [ | ||
| * animate('0.5s', style({ opacity: 1 })) | ||
| * ]) | ||
| * ]) | ||
| * ]) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function stagger(timings: string | number, animation: AnimationMetadata | AnimationMetadata[]): AnimationStaggerMetadata; | ||
| /** | ||
| * Provides programmatic control of a reusable animation sequence, | ||
| * built using the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> | ||
| * method which returns an `AnimationFactory`, whose | ||
| * <code>[create](api/animations/AnimationFactory#create)()</code> method instantiates and | ||
| * initializes this interface. | ||
| * | ||
| * @see {@link AnimationBuilder} | ||
| * @see {@link AnimationFactory} | ||
| * @see {@link animate} | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationPlayer { | ||
| /** | ||
| * Provides a callback to invoke when the animation finishes. | ||
| * @param fn The callback function. | ||
| * @see {@link #finish} | ||
| */ | ||
| onDone(fn: () => void): void; | ||
| /** | ||
| * Provides a callback to invoke when the animation starts. | ||
| * @param fn The callback function. | ||
| * @see {@link #play} | ||
| */ | ||
| onStart(fn: () => void): void; | ||
| /** | ||
| * Provides a callback to invoke after the animation is destroyed. | ||
| * @param fn The callback function. | ||
| * @see {@link #destroy} | ||
| * @see {@link #beforeDestroy} | ||
| */ | ||
| onDestroy(fn: () => void): void; | ||
| /** | ||
| * Initializes the animation. | ||
| */ | ||
| init(): void; | ||
| /** | ||
| * Reports whether the animation has started. | ||
| * @returns True if the animation has started, false otherwise. | ||
| */ | ||
| hasStarted(): boolean; | ||
| /** | ||
| * Runs the animation, invoking the `onStart()` callback. | ||
| */ | ||
| play(): void; | ||
| /** | ||
| * Pauses the animation. | ||
| */ | ||
| pause(): void; | ||
| /** | ||
| * Restarts the paused animation. | ||
| */ | ||
| restart(): void; | ||
| /** | ||
| * Ends the animation, invoking the `onDone()` callback. | ||
| */ | ||
| finish(): void; | ||
| /** | ||
| * Destroys the animation, after invoking the `beforeDestroy()` callback. | ||
| * Calls the `onDestroy()` callback when destruction is completed. | ||
| */ | ||
| destroy(): void; | ||
| /** | ||
| * Resets the animation to its initial state. | ||
| */ | ||
| reset(): void; | ||
| /** | ||
| * Sets the position of the animation. | ||
| * @param position A fractional value, representing the progress through the animation. | ||
| */ | ||
| setPosition(position: number): void; | ||
| /** | ||
| * Reports the current position of the animation. | ||
| * @returns A fractional value, representing the progress through the animation. | ||
| */ | ||
| getPosition(): number; | ||
| /** | ||
| * The parent of this player, if any. | ||
| */ | ||
| parentPlayer: AnimationPlayer | null; | ||
| /** | ||
| * The total run time of the animation, in milliseconds. | ||
| */ | ||
| readonly totalTime: number; | ||
| /** | ||
| * Provides a callback to invoke before the animation is destroyed. | ||
| */ | ||
| beforeDestroy?: () => any; | ||
| } | ||
| /** | ||
| * An empty programmatic controller for reusable animations. | ||
| * Used internally when animations are disabled, to avoid | ||
| * checking for the null case when an animation player is expected. | ||
| * | ||
| * @see {@link animate} | ||
| * @see {@link AnimationPlayer} | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare class NoopAnimationPlayer implements AnimationPlayer { | ||
| private _onDoneFns; | ||
| private _onStartFns; | ||
| private _onDestroyFns; | ||
| private _originalOnDoneFns; | ||
| private _originalOnStartFns; | ||
| private _started; | ||
| private _destroyed; | ||
| private _finished; | ||
| private _position; | ||
| parentPlayer: AnimationPlayer | null; | ||
| readonly totalTime: number; | ||
| constructor(duration?: number, delay?: number); | ||
| private _onFinish; | ||
| onStart(fn: () => void): void; | ||
| onDone(fn: () => void): void; | ||
| onDestroy(fn: () => void): void; | ||
| hasStarted(): boolean; | ||
| init(): void; | ||
| play(): void; | ||
| private _onStart; | ||
| pause(): void; | ||
| restart(): void; | ||
| finish(): void; | ||
| destroy(): void; | ||
| reset(): void; | ||
| setPosition(position: number): void; | ||
| getPosition(): number; | ||
| } | ||
| export { AUTO_STYLE, AnimationMetadataType, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation }; | ||
| export type { AnimateChildOptions, AnimateTimings, AnimationAnimateChildMetadata, AnimationAnimateMetadata, AnimationAnimateRefMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata, AnimationMetadata, AnimationOptions, AnimationPlayer, AnimationQueryMetadata, AnimationQueryOptions, AnimationReferenceMetadata, AnimationSequenceMetadata, AnimationStaggerMetadata, AnimationStateMetadata, AnimationStyleMetadata, AnimationTransitionMetadata, AnimationTriggerMetadata, ɵStyleData, ɵStyleDataMap }; |
| /** | ||
| * @license Angular v21.0.0-next.6 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| import * as i0 from '@angular/core'; | ||
| import { RendererFactory2 } from '@angular/core'; | ||
| import { AnimationMetadata, AnimationOptions, AnimationPlayer } from './_animation_player-chunk.js'; | ||
| export { AUTO_STYLE, AnimateChildOptions, AnimateTimings, AnimationAnimateChildMetadata, AnimationAnimateMetadata, AnimationAnimateRefMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata, AnimationMetadataType, AnimationQueryMetadata, AnimationQueryOptions, AnimationReferenceMetadata, AnimationSequenceMetadata, AnimationStaggerMetadata, AnimationStateMetadata, AnimationStyleMetadata, AnimationTransitionMetadata, AnimationTriggerMetadata, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, ɵStyleData, ɵStyleDataMap } from './_animation_player-chunk.js'; | ||
| /** | ||
| * An injectable service that produces an animation sequence programmatically within an | ||
| * Angular component or directive. | ||
| * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * To use this service, add it to your component or directive as a dependency. | ||
| * The service is instantiated along with your component. | ||
| * | ||
| * Apps do not typically need to create their own animation players, but if you | ||
| * do need to, follow these steps: | ||
| * | ||
| * 1. Use the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> method | ||
| * to create a programmatic animation. The method returns an `AnimationFactory` instance. | ||
| * | ||
| * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element. | ||
| * | ||
| * 3. Use the player object to control the animation programmatically. | ||
| * | ||
| * For example: | ||
| * | ||
| * ```ts | ||
| * // import the service from BrowserAnimationsModule | ||
| * import {AnimationBuilder} from '@angular/animations'; | ||
| * // require the service as a dependency | ||
| * class MyCmp { | ||
| * constructor(private _builder: AnimationBuilder) {} | ||
| * | ||
| * makeAnimation(element: any) { | ||
| * // first define a reusable animation | ||
| * const myAnimation = this._builder.build([ | ||
| * style({ width: 0 }), | ||
| * animate(1000, style({ width: '100px' })) | ||
| * ]); | ||
| * | ||
| * // use the returned factory object to create a player | ||
| * const player = myAnimation.create(element); | ||
| * | ||
| * player.play(); | ||
| * } | ||
| * } | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare abstract class AnimationBuilder { | ||
| /** | ||
| * Builds a factory for producing a defined animation. | ||
| * @param animation A reusable animation definition. | ||
| * @returns A factory object that can create a player for the defined animation. | ||
| * @see {@link animate} | ||
| */ | ||
| abstract build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory; | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<AnimationBuilder, never>; | ||
| static ɵprov: i0.ɵɵInjectableDeclaration<AnimationBuilder>; | ||
| } | ||
| /** | ||
| * A factory object returned from the | ||
| * <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> | ||
| * method. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare abstract class AnimationFactory { | ||
| /** | ||
| * Creates an `AnimationPlayer` instance for the reusable animation defined by | ||
| * the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> | ||
| * method that created this factory and attaches the new player a DOM element. | ||
| * | ||
| * @param element The DOM element to which to attach the player. | ||
| * @param options A set of options that can include a time delay and | ||
| * additional developer-defined parameters. | ||
| */ | ||
| abstract create(element: any, options?: AnimationOptions): AnimationPlayer; | ||
| } | ||
| declare class BrowserAnimationBuilder extends AnimationBuilder { | ||
| private animationModuleType; | ||
| private _nextAnimationId; | ||
| private _renderer; | ||
| constructor(rootRenderer: RendererFactory2, doc: Document); | ||
| build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory; | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<BrowserAnimationBuilder, never>; | ||
| static ɵprov: i0.ɵɵInjectableDeclaration<BrowserAnimationBuilder>; | ||
| } | ||
| /** | ||
| * An instance of this class is returned as an event parameter when an animation | ||
| * callback is captured for an animation either during the start or done phase. | ||
| * | ||
| * ```ts | ||
| * @Component({ | ||
| * host: { | ||
| * '[@myAnimationTrigger]': 'someExpression', | ||
| * '(@myAnimationTrigger.start)': 'captureStartEvent($event)', | ||
| * '(@myAnimationTrigger.done)': 'captureDoneEvent($event)', | ||
| * }, | ||
| * animations: [ | ||
| * trigger("myAnimationTrigger", [ | ||
| * // ... | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * someExpression: any = false; | ||
| * captureStartEvent(event: AnimationEvent) { | ||
| * // the toState, fromState and totalTime data is accessible from the event variable | ||
| * } | ||
| * | ||
| * captureDoneEvent(event: AnimationEvent) { | ||
| * // the toState, fromState and totalTime data is accessible from the event variable | ||
| * } | ||
| * } | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationEvent { | ||
| /** | ||
| * The name of the state from which the animation is triggered. | ||
| */ | ||
| fromState: string; | ||
| /** | ||
| * The name of the state in which the animation completes. | ||
| */ | ||
| toState: string; | ||
| /** | ||
| * The time it takes the animation to complete, in milliseconds. | ||
| */ | ||
| totalTime: number; | ||
| /** | ||
| * The animation phase in which the callback was invoked, one of | ||
| * "start" or "done". | ||
| */ | ||
| phaseName: string; | ||
| /** | ||
| * The element to which the animation is attached. | ||
| */ | ||
| element: any; | ||
| /** | ||
| * Internal. | ||
| */ | ||
| triggerName: string; | ||
| /** | ||
| * Internal. | ||
| */ | ||
| disabled: boolean; | ||
| } | ||
| /** | ||
| * The list of error codes used in runtime code of the `animations` package. | ||
| * Reserved error code range: 3000-3999. | ||
| */ | ||
| declare const enum RuntimeErrorCode { | ||
| INVALID_TIMING_VALUE = 3000, | ||
| INVALID_STYLE_PARAMS = 3001, | ||
| INVALID_STYLE_VALUE = 3002, | ||
| INVALID_PARAM_VALUE = 3003, | ||
| INVALID_NODE_TYPE = 3004, | ||
| INVALID_CSS_UNIT_VALUE = 3005, | ||
| INVALID_TRIGGER = 3006, | ||
| INVALID_DEFINITION = 3007, | ||
| INVALID_STATE = 3008, | ||
| INVALID_PROPERTY = 3009, | ||
| INVALID_PARALLEL_ANIMATION = 3010, | ||
| INVALID_KEYFRAMES = 3011, | ||
| INVALID_OFFSET = 3012, | ||
| INVALID_STAGGER = 3013, | ||
| INVALID_QUERY = 3014, | ||
| INVALID_EXPRESSION = 3015, | ||
| INVALID_TRANSITION_ALIAS = 3016, | ||
| NEGATIVE_STEP_VALUE = 3100, | ||
| NEGATIVE_DELAY_VALUE = 3101, | ||
| KEYFRAME_OFFSETS_OUT_OF_ORDER = 3200, | ||
| KEYFRAMES_MISSING_OFFSETS = 3202, | ||
| MISSING_OR_DESTROYED_ANIMATION = 3300, | ||
| MISSING_PLAYER = 3301, | ||
| MISSING_TRIGGER = 3302, | ||
| MISSING_EVENT = 3303, | ||
| UNSUPPORTED_TRIGGER_EVENT = 3400, | ||
| UNREGISTERED_TRIGGER = 3401, | ||
| TRIGGER_TRANSITIONS_FAILED = 3402, | ||
| TRIGGER_PARSING_FAILED = 3403, | ||
| TRIGGER_BUILD_FAILED = 3404, | ||
| VALIDATION_FAILED = 3500, | ||
| BUILDING_FAILED = 3501, | ||
| ANIMATION_FAILED = 3502, | ||
| REGISTRATION_FAILED = 3503, | ||
| CREATE_ANIMATION_FAILED = 3504, | ||
| TRANSITION_FAILED = 3505, | ||
| BROWSER_ANIMATION_BUILDER_INJECTED_WITHOUT_ANIMATIONS = 3600 | ||
| } | ||
| /** | ||
| * A programmatic controller for a group of reusable animations. | ||
| * Used internally to control animations. | ||
| * | ||
| * @see {@link AnimationPlayer} | ||
| * @see {@link animations/group group} | ||
| * | ||
| */ | ||
| declare class AnimationGroupPlayer implements AnimationPlayer { | ||
| private _onDoneFns; | ||
| private _onStartFns; | ||
| private _finished; | ||
| private _started; | ||
| private _destroyed; | ||
| private _onDestroyFns; | ||
| parentPlayer: AnimationPlayer | null; | ||
| totalTime: number; | ||
| readonly players: AnimationPlayer[]; | ||
| constructor(_players: AnimationPlayer[]); | ||
| private _onFinish; | ||
| init(): void; | ||
| onStart(fn: () => void): void; | ||
| private _onStart; | ||
| onDone(fn: () => void): void; | ||
| onDestroy(fn: () => void): void; | ||
| hasStarted(): boolean; | ||
| play(): void; | ||
| pause(): void; | ||
| restart(): void; | ||
| finish(): void; | ||
| destroy(): void; | ||
| private _onDestroy; | ||
| reset(): void; | ||
| setPosition(p: number): void; | ||
| getPosition(): number; | ||
| beforeDestroy(): void; | ||
| } | ||
| declare const ɵPRE_STYLE = "!"; | ||
| export { AnimationBuilder, AnimationFactory, AnimationMetadata, AnimationOptions, AnimationPlayer, AnimationGroupPlayer as ɵAnimationGroupPlayer, BrowserAnimationBuilder as ɵBrowserAnimationBuilder, ɵPRE_STYLE, RuntimeErrorCode as ɵRuntimeErrorCode }; | ||
| export type { AnimationEvent }; |
| /** | ||
| * @license Angular v21.0.0-next.6 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| import { AnimationPlayer, ɵStyleDataMap as _StyleDataMap, NoopAnimationPlayer } from './_animation_player-chunk.js'; | ||
| import { AnimationDriver } from './_animation_driver-chunk.js'; | ||
| import '@angular/core'; | ||
| /** | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare class MockAnimationDriver implements AnimationDriver { | ||
| static log: AnimationPlayer[]; | ||
| validateStyleProperty(prop: string): boolean; | ||
| validateAnimatableStyleProperty(prop: string): boolean; | ||
| containsElement(elm1: any, elm2: any): boolean; | ||
| getParentElement(element: unknown): unknown; | ||
| query(element: any, selector: string, multi: boolean): any[]; | ||
| computeStyle(element: any, prop: string, defaultValue?: string): string; | ||
| animate(element: any, keyframes: Array<_StyleDataMap>, duration: number, delay: number, easing: string, previousPlayers?: any[]): MockAnimationPlayer; | ||
| } | ||
| /** | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare class MockAnimationPlayer extends NoopAnimationPlayer { | ||
| element: any; | ||
| keyframes: Array<_StyleDataMap>; | ||
| duration: number; | ||
| delay: number; | ||
| easing: string; | ||
| previousPlayers: any[]; | ||
| private __finished; | ||
| private __started; | ||
| previousStyles: _StyleDataMap; | ||
| private _onInitFns; | ||
| currentSnapshot: _StyleDataMap; | ||
| private _keyframes; | ||
| constructor(element: any, keyframes: Array<_StyleDataMap>, duration: number, delay: number, easing: string, previousPlayers: any[]); | ||
| reset(): void; | ||
| finish(): void; | ||
| destroy(): void; | ||
| play(): void; | ||
| hasStarted(): boolean; | ||
| beforeDestroy(): void; | ||
| } | ||
| export { MockAnimationDriver, MockAnimationPlayer }; |
| /** | ||
| * @license Angular v21.0.0-next.6 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| import { AnimationDriver } from './_animation_driver-chunk.js'; | ||
| export { NoopAnimationDriver } from './_animation_driver-chunk.js'; | ||
| import { AnimationTriggerMetadata, AnimationPlayer, ɵStyleDataMap as _StyleDataMap, AnimationMetadata, AnimationOptions, ɵStyleData as _StyleData } from './_animation_player-chunk.js'; | ||
| import { Renderer2, ɵAnimationRendererType as _AnimationRendererType, RendererStyleFlags2, ListenerOptions, RendererFactory2, NgZone, RendererType2 } from '@angular/core'; | ||
| declare abstract class AnimationStyleNormalizer { | ||
| abstract normalizePropertyName(propertyName: string, errors: Error[]): string; | ||
| abstract normalizeStyleValue(userProvidedProperty: string, normalizedProperty: string, value: string | number, errors: Error[]): string; | ||
| } | ||
| declare class NoopAnimationStyleNormalizer { | ||
| normalizePropertyName(propertyName: string, errors: Error[]): string; | ||
| normalizeStyleValue(userProvidedProperty: string, normalizedProperty: string, value: string | number, errors: Error[]): string; | ||
| } | ||
| declare class AnimationEngine { | ||
| private _driver; | ||
| private _normalizer; | ||
| private _transitionEngine; | ||
| private _timelineEngine; | ||
| private _triggerCache; | ||
| onRemovalComplete: (element: any, context: any) => void; | ||
| constructor(doc: Document, _driver: AnimationDriver, _normalizer: AnimationStyleNormalizer); | ||
| registerTrigger(componentId: string, namespaceId: string, hostElement: any, name: string, metadata: AnimationTriggerMetadata): void; | ||
| register(namespaceId: string, hostElement: any): void; | ||
| destroy(namespaceId: string, context: any): void; | ||
| onInsert(namespaceId: string, element: any, parent: any, insertBefore: boolean): void; | ||
| onRemove(namespaceId: string, element: any, context: any): void; | ||
| disableAnimations(element: any, disable: boolean): void; | ||
| process(namespaceId: string, element: any, property: string, value: any): void; | ||
| listen(namespaceId: string, element: any, eventName: string, eventPhase: string, callback: (event: any) => any): () => any; | ||
| flush(microtaskId?: number): void; | ||
| get players(): AnimationPlayer[]; | ||
| whenRenderingDone(): Promise<any>; | ||
| afterFlushAnimationsDone(cb: VoidFunction): void; | ||
| } | ||
| declare function createEngine(type: 'animations' | 'noop', doc: Document): AnimationEngine; | ||
| declare const enum AnimationTransitionInstructionType { | ||
| TransitionAnimation = 0, | ||
| TimelineAnimation = 1 | ||
| } | ||
| interface AnimationEngineInstruction { | ||
| type: AnimationTransitionInstructionType; | ||
| } | ||
| interface AnimationTimelineInstruction extends AnimationEngineInstruction { | ||
| element: any; | ||
| keyframes: Array<_StyleDataMap>; | ||
| preStyleProps: string[]; | ||
| postStyleProps: string[]; | ||
| duration: number; | ||
| delay: number; | ||
| totalTime: number; | ||
| easing: string | null; | ||
| stretchStartingKeyframe?: boolean; | ||
| subTimeline: boolean; | ||
| } | ||
| declare class ElementInstructionMap { | ||
| private _map; | ||
| get(element: any): AnimationTimelineInstruction[]; | ||
| append(element: any, instructions: AnimationTimelineInstruction[]): void; | ||
| has(element: any): boolean; | ||
| clear(): void; | ||
| } | ||
| declare class Animation$1 { | ||
| private _driver; | ||
| private _animationAst; | ||
| constructor(_driver: AnimationDriver, input: AnimationMetadata | AnimationMetadata[]); | ||
| buildTimelines(element: any, startingStyles: _StyleDataMap | Array<_StyleDataMap>, destinationStyles: _StyleDataMap | Array<_StyleDataMap>, options: AnimationOptions, subInstructions?: ElementInstructionMap): AnimationTimelineInstruction[]; | ||
| } | ||
| declare class WebAnimationsStyleNormalizer extends AnimationStyleNormalizer { | ||
| normalizePropertyName(propertyName: string, errors: Error[]): string; | ||
| normalizeStyleValue(userProvidedProperty: string, normalizedProperty: string, value: string | number, errors: Error[]): string; | ||
| } | ||
| type AnimationFactoryWithListenerCallback = RendererFactory2 & { | ||
| scheduleListenerCallback: (count: number, fn: (e: any) => any, data: any) => void; | ||
| }; | ||
| declare class BaseAnimationRenderer implements Renderer2 { | ||
| protected namespaceId: string; | ||
| delegate: Renderer2; | ||
| engine: AnimationEngine; | ||
| private _onDestroy?; | ||
| readonly ɵtype: _AnimationRendererType.Regular; | ||
| constructor(namespaceId: string, delegate: Renderer2, engine: AnimationEngine, _onDestroy?: (() => void) | undefined); | ||
| get data(): { | ||
| [key: string]: any; | ||
| }; | ||
| destroyNode(node: any): void; | ||
| destroy(): void; | ||
| createElement(name: string, namespace?: string | null | undefined): any; | ||
| createComment(value: string): any; | ||
| createText(value: string): any; | ||
| appendChild(parent: any, newChild: any): void; | ||
| insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void; | ||
| removeChild(parent: any, oldChild: any, isHostElement?: boolean, requireSynchronousElementRemoval?: boolean): void; | ||
| selectRootElement(selectorOrNode: any, preserveContent?: boolean): any; | ||
| parentNode(node: any): any; | ||
| nextSibling(node: any): any; | ||
| setAttribute(el: any, name: string, value: string, namespace?: string | null | undefined): void; | ||
| removeAttribute(el: any, name: string, namespace?: string | null | undefined): void; | ||
| addClass(el: any, name: string): void; | ||
| removeClass(el: any, name: string): void; | ||
| setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2 | undefined): void; | ||
| removeStyle(el: any, style: string, flags?: RendererStyleFlags2 | undefined): void; | ||
| setProperty(el: any, name: string, value: any): void; | ||
| setValue(node: any, value: string): void; | ||
| listen(target: any, eventName: string, callback: (event: any) => boolean | void, options?: ListenerOptions): () => void; | ||
| protected disableAnimations(element: any, value: boolean): void; | ||
| } | ||
| declare class AnimationRenderer extends BaseAnimationRenderer implements Renderer2 { | ||
| factory: AnimationFactoryWithListenerCallback; | ||
| constructor(factory: AnimationFactoryWithListenerCallback, namespaceId: string, delegate: Renderer2, engine: AnimationEngine, onDestroy?: () => void); | ||
| setProperty(el: any, name: string, value: any): void; | ||
| listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => any, options?: ListenerOptions): () => void; | ||
| } | ||
| declare class AnimationRendererFactory implements RendererFactory2 { | ||
| private delegate; | ||
| private engine; | ||
| private _zone; | ||
| private _currentId; | ||
| private _microtaskId; | ||
| private _animationCallbacksBuffer; | ||
| private _rendererCache; | ||
| private _cdRecurDepth; | ||
| constructor(delegate: RendererFactory2, engine: AnimationEngine, _zone: NgZone); | ||
| createRenderer(hostElement: any, type: RendererType2): BaseAnimationRenderer; | ||
| begin(): void; | ||
| private _scheduleCountTask; | ||
| end(): void; | ||
| whenRenderingDone(): Promise<any>; | ||
| /** | ||
| * Used during HMR to clear any cached data about a component. | ||
| * @param componentId ID of the component that is being replaced. | ||
| */ | ||
| protected componentReplaced(componentId: string): void; | ||
| } | ||
| declare function getParentElement(element: any): unknown | null; | ||
| declare function validateStyleProperty(prop: string): boolean; | ||
| declare function validateWebAnimatableStyleProperty(prop: string): boolean; | ||
| declare function containsElement(elm1: any, elm2: any): boolean; | ||
| declare function invokeQuery(element: any, selector: string, multi: boolean): any[]; | ||
| declare class WebAnimationsDriver implements AnimationDriver { | ||
| validateStyleProperty(prop: string): boolean; | ||
| validateAnimatableStyleProperty(prop: string): boolean; | ||
| containsElement(elm1: any, elm2: any): boolean; | ||
| getParentElement(element: unknown): unknown; | ||
| query(element: any, selector: string, multi: boolean): any[]; | ||
| computeStyle(element: any, prop: string, defaultValue?: string): string; | ||
| animate(element: any, keyframes: Array<Map<string, string | number>>, duration: number, delay: number, easing: string, previousPlayers?: AnimationPlayer[]): AnimationPlayer; | ||
| } | ||
| /** | ||
| * Designed to be executed during a keyframe-based animation to apply any special-cased styles. | ||
| * | ||
| * When started (when the `start()` method is run) then the provided `startStyles` | ||
| * will be applied. When finished (when the `finish()` method is called) the | ||
| * `endStyles` will be applied as well any any starting styles. Finally when | ||
| * `destroy()` is called then all styles will be removed. | ||
| */ | ||
| declare class SpecialCasedStyles { | ||
| private _element; | ||
| private _startStyles; | ||
| private _endStyles; | ||
| static initialStylesByElement: WeakMap<any, _StyleDataMap>; | ||
| private _state; | ||
| private _initialStyles; | ||
| constructor(_element: any, _startStyles: _StyleDataMap | null, _endStyles: _StyleDataMap | null); | ||
| start(): void; | ||
| finish(): void; | ||
| destroy(): void; | ||
| } | ||
| declare class WebAnimationsPlayer implements AnimationPlayer { | ||
| element: any; | ||
| keyframes: Array<_StyleDataMap>; | ||
| options: { | ||
| [key: string]: string | number; | ||
| }; | ||
| private _specialStyles?; | ||
| private _onDoneFns; | ||
| private _onStartFns; | ||
| private _onDestroyFns; | ||
| private _duration; | ||
| private _delay; | ||
| private _initialized; | ||
| private _finished; | ||
| private _started; | ||
| private _destroyed; | ||
| private _finalKeyframe?; | ||
| private _originalOnDoneFns; | ||
| private _originalOnStartFns; | ||
| readonly domPlayer: Animation; | ||
| time: number; | ||
| parentPlayer: AnimationPlayer | null; | ||
| currentSnapshot: _StyleDataMap; | ||
| constructor(element: any, keyframes: Array<_StyleDataMap>, options: { | ||
| [key: string]: string | number; | ||
| }, _specialStyles?: (SpecialCasedStyles | null) | undefined); | ||
| private _onFinish; | ||
| init(): void; | ||
| private _buildPlayer; | ||
| private _preparePlayerBeforeStart; | ||
| private _convertKeyframesToObject; | ||
| onStart(fn: () => void): void; | ||
| onDone(fn: () => void): void; | ||
| onDestroy(fn: () => void): void; | ||
| play(): void; | ||
| pause(): void; | ||
| finish(): void; | ||
| reset(): void; | ||
| private _resetDomPlayerState; | ||
| restart(): void; | ||
| hasStarted(): boolean; | ||
| destroy(): void; | ||
| setPosition(p: number): void; | ||
| getPosition(): number; | ||
| get totalTime(): number; | ||
| beforeDestroy(): void; | ||
| } | ||
| declare const ENTER_CLASSNAME = "ng-enter"; | ||
| declare const LEAVE_CLASSNAME = "ng-leave"; | ||
| declare function normalizeKeyframes(keyframes: Array<_StyleData> | Array<_StyleDataMap>): Array<_StyleDataMap>; | ||
| declare function camelCaseToDashCase(input: string): string; | ||
| declare function allowPreviousPlayerStylesMerge(duration: number, delay: number): boolean; | ||
| declare class TransitionAnimationPlayer implements AnimationPlayer { | ||
| namespaceId: string; | ||
| triggerName: string; | ||
| element: any; | ||
| private _player; | ||
| private _containsRealPlayer; | ||
| private _queuedCallbacks; | ||
| readonly destroyed = false; | ||
| parentPlayer: AnimationPlayer | null; | ||
| markedForDestroy: boolean; | ||
| disabled: boolean; | ||
| readonly queued: boolean; | ||
| readonly totalTime: number; | ||
| constructor(namespaceId: string, triggerName: string, element: any); | ||
| setRealPlayer(player: AnimationPlayer): void; | ||
| getRealPlayer(): AnimationPlayer; | ||
| overrideTotalTime(totalTime: number): void; | ||
| syncPlayerEvents(player: AnimationPlayer): void; | ||
| private _queueEvent; | ||
| onDone(fn: () => void): void; | ||
| onStart(fn: () => void): void; | ||
| onDestroy(fn: () => void): void; | ||
| init(): void; | ||
| hasStarted(): boolean; | ||
| play(): void; | ||
| pause(): void; | ||
| restart(): void; | ||
| finish(): void; | ||
| destroy(): void; | ||
| reset(): void; | ||
| setPosition(p: number): void; | ||
| getPosition(): number; | ||
| } | ||
| 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 }; |
| /** | ||
| * @license Angular v21.0.0-next.5 | ||
| * @license Angular v21.0.0-next.6 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
@@ -9,4 +9,4 @@ * License: MIT | ||
| import { inject, Injectable, ANIMATION_MODULE_TYPE, ɵRuntimeError as _RuntimeError, DOCUMENT, Inject, ViewEncapsulation } from '@angular/core'; | ||
| import { sequence } from './private_export.mjs'; | ||
| export { AUTO_STYLE, AnimationMetadataType, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, stagger, state, style, transition, trigger, useAnimation, AnimationGroupPlayer as ɵAnimationGroupPlayer, ɵPRE_STYLE } from './private_export.mjs'; | ||
| import { sequence } from './_private_export-chunk.mjs'; | ||
| export { AUTO_STYLE, AnimationMetadataType, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, stagger, state, style, transition, trigger, useAnimation, AnimationGroupPlayer as ɵAnimationGroupPlayer, ɵPRE_STYLE } from './_private_export-chunk.mjs'; | ||
@@ -62,6 +62,6 @@ /** | ||
| class AnimationBuilder { | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.5", ngImport: i0, type: AnimationBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.5", ngImport: i0, type: AnimationBuilder, providedIn: 'root', useFactory: () => inject(BrowserAnimationBuilder) }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.6", ngImport: i0, type: AnimationBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.6", ngImport: i0, type: AnimationBuilder, providedIn: 'root', useFactory: () => inject(BrowserAnimationBuilder) }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.5", ngImport: i0, type: AnimationBuilder, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.6", ngImport: i0, type: AnimationBuilder, decorators: [{ | ||
| type: Injectable, | ||
@@ -108,6 +108,6 @@ args: [{ providedIn: 'root', useFactory: () => inject(BrowserAnimationBuilder) }] | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.5", ngImport: i0, type: BrowserAnimationBuilder, deps: [{ token: i0.RendererFactory2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.5", ngImport: i0, type: BrowserAnimationBuilder, providedIn: 'root' }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.6", ngImport: i0, type: BrowserAnimationBuilder, deps: [{ token: i0.RendererFactory2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.6", ngImport: i0, type: BrowserAnimationBuilder, providedIn: 'root' }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.5", ngImport: i0, type: BrowserAnimationBuilder, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.6", ngImport: i0, type: BrowserAnimationBuilder, decorators: [{ | ||
| type: Injectable, | ||
@@ -114,0 +114,0 @@ args: [{ providedIn: 'root' }] |
+7
-7
| { | ||
| "name": "@angular/animations", | ||
| "version": "21.0.0-next.5", | ||
| "version": "21.0.0-next.6", | ||
| "description": "Angular - animations integration with web-animations", | ||
@@ -14,3 +14,3 @@ "author": "angular", | ||
| "peerDependencies": { | ||
| "@angular/core": "21.0.0-next.5" | ||
| "@angular/core": "21.0.0-next.6" | ||
| }, | ||
@@ -44,3 +44,3 @@ "repository": { | ||
| "module": "./fesm2022/animations.mjs", | ||
| "typings": "./index.d.ts", | ||
| "typings": "./types/animations.d.ts", | ||
| "type": "module", | ||
@@ -52,14 +52,14 @@ "exports": { | ||
| ".": { | ||
| "types": "./index.d.ts", | ||
| "types": "./types/animations.d.ts", | ||
| "default": "./fesm2022/animations.mjs" | ||
| }, | ||
| "./browser": { | ||
| "types": "./browser/index.d.ts", | ||
| "types": "./types/browser.d.ts", | ||
| "default": "./fesm2022/browser.mjs" | ||
| }, | ||
| "./browser/testing": { | ||
| "types": "./browser/testing/index.d.ts", | ||
| "default": "./fesm2022/browser/testing.mjs" | ||
| "types": "./types/browser-testing.d.ts", | ||
| "default": "./fesm2022/browser-testing.mjs" | ||
| } | ||
| } | ||
| } |
| /** | ||
| * @license Angular v21.0.0-next.5 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| import * as i0 from '@angular/core'; | ||
| import { AnimationPlayer } from './animation_player.d.js'; | ||
| /** | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| * | ||
| * `AnimationDriver` implentation for Noop animations | ||
| */ | ||
| declare class NoopAnimationDriver implements AnimationDriver { | ||
| /** | ||
| * @returns Whether `prop` is a valid CSS property | ||
| */ | ||
| validateStyleProperty(prop: string): boolean; | ||
| /** | ||
| * | ||
| * @returns Whether elm1 contains elm2. | ||
| */ | ||
| containsElement(elm1: any, elm2: any): boolean; | ||
| /** | ||
| * @returns Rhe parent of the given element or `null` if the element is the `document` | ||
| */ | ||
| getParentElement(element: unknown): unknown; | ||
| /** | ||
| * @returns The result of the query selector on the element. The array will contain up to 1 item | ||
| * if `multi` is `false`. | ||
| */ | ||
| query(element: any, selector: string, multi: boolean): any[]; | ||
| /** | ||
| * @returns The `defaultValue` or empty string | ||
| */ | ||
| computeStyle(element: any, prop: string, defaultValue?: string): string; | ||
| /** | ||
| * @returns An `NoopAnimationPlayer` | ||
| */ | ||
| animate(element: any, keyframes: Array<Map<string, string | number>>, duration: number, delay: number, easing: string, previousPlayers?: any[], scrubberAccessRequested?: boolean): AnimationPlayer; | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<NoopAnimationDriver, never>; | ||
| static ɵprov: i0.ɵɵInjectableDeclaration<NoopAnimationDriver>; | ||
| } | ||
| /** | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare abstract class AnimationDriver { | ||
| /** | ||
| * @deprecated Use the NoopAnimationDriver class. | ||
| */ | ||
| static NOOP: AnimationDriver; | ||
| abstract validateStyleProperty(prop: string): boolean; | ||
| abstract validateAnimatableStyleProperty?: (prop: string) => boolean; | ||
| abstract containsElement(elm1: any, elm2: any): boolean; | ||
| /** | ||
| * Obtains the parent element, if any. `null` is returned if the element does not have a parent. | ||
| */ | ||
| abstract getParentElement(element: unknown): unknown; | ||
| abstract query(element: any, selector: string, multi: boolean): any[]; | ||
| abstract computeStyle(element: any, prop: string, defaultValue?: string): string; | ||
| abstract animate(element: any, keyframes: Array<Map<string, string | number>>, duration: number, delay: number, easing?: string | null, previousPlayers?: any[], scrubberAccessRequested?: boolean): any; | ||
| } | ||
| export { AnimationDriver, NoopAnimationDriver }; |
| /** | ||
| * @license Angular v21.0.0-next.5 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| /** | ||
| * Represents a set of CSS styles for use in an animation style as a generic. | ||
| */ | ||
| interface ɵStyleData { | ||
| [key: string]: string | number; | ||
| } | ||
| /** | ||
| * Represents a set of CSS styles for use in an animation style as a Map. | ||
| */ | ||
| type ɵStyleDataMap = Map<string, string | number>; | ||
| /** | ||
| * Represents animation-step timing parameters for an animation step. | ||
| * @see {@link animate} | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare type AnimateTimings = { | ||
| /** | ||
| * The full duration of an animation step. A number and optional time unit, | ||
| * such as "1s" or "10ms" for one second and 10 milliseconds, respectively. | ||
| * The default unit is milliseconds. | ||
| */ | ||
| duration: number; | ||
| /** | ||
| * The delay in applying an animation step. A number and optional time unit. | ||
| * The default unit is milliseconds. | ||
| */ | ||
| delay: number; | ||
| /** | ||
| * An easing style that controls how an animations step accelerates | ||
| * and decelerates during its run time. An easing function such as `cubic-bezier()`, | ||
| * or one of the following constants: | ||
| * - `ease-in` | ||
| * - `ease-out` | ||
| * - `ease-in-and-out` | ||
| */ | ||
| easing: string | null; | ||
| }; | ||
| /** | ||
| * @description Options that control animation styling and timing. | ||
| * | ||
| * The following animation functions accept `AnimationOptions` data: | ||
| * | ||
| * - `transition()` | ||
| * - `sequence()` | ||
| * - `group()` | ||
| * - `query()` | ||
| * - `animation()` | ||
| * - `useAnimation()` | ||
| * - `animateChild()` | ||
| * | ||
| * Programmatic animations built using the `AnimationBuilder` service also | ||
| * make use of `AnimationOptions`. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare interface AnimationOptions { | ||
| /** | ||
| * Sets a time-delay for initiating an animation action. | ||
| * A number and optional time unit, such as "1s" or "10ms" for one second | ||
| * and 10 milliseconds, respectively.The default unit is milliseconds. | ||
| * Default value is 0, meaning no delay. | ||
| */ | ||
| delay?: number | string; | ||
| /** | ||
| * A set of developer-defined parameters that modify styling and timing | ||
| * when an animation action starts. An array of key-value pairs, where the provided value | ||
| * is used as a default. | ||
| */ | ||
| params?: { | ||
| [name: string]: any; | ||
| }; | ||
| } | ||
| /** | ||
| * Adds duration options to control animation styling and timing for a child animation. | ||
| * | ||
| * @see {@link animateChild} | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare interface AnimateChildOptions extends AnimationOptions { | ||
| duration?: number | string; | ||
| } | ||
| /** | ||
| * @description Constants for the categories of parameters that can be defined for animations. | ||
| * | ||
| * A corresponding function defines a set of parameters for each category, and | ||
| * collects them into a corresponding `AnimationMetadata` object. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare enum AnimationMetadataType { | ||
| /** | ||
| * Associates a named animation state with a set of CSS styles. | ||
| * See [`state()`](api/animations/state) | ||
| */ | ||
| State = 0, | ||
| /** | ||
| * Data for a transition from one animation state to another. | ||
| * See `transition()` | ||
| */ | ||
| Transition = 1, | ||
| /** | ||
| * Contains a set of animation steps. | ||
| * See `sequence()` | ||
| */ | ||
| Sequence = 2, | ||
| /** | ||
| * Contains a set of animation steps. | ||
| * See `group()` | ||
| */ | ||
| Group = 3, | ||
| /** | ||
| * Contains an animation step. | ||
| * See `animate()` | ||
| */ | ||
| Animate = 4, | ||
| /** | ||
| * Contains a set of animation steps. | ||
| * See `keyframes()` | ||
| */ | ||
| Keyframes = 5, | ||
| /** | ||
| * Contains a set of CSS property-value pairs into a named style. | ||
| * See `style()` | ||
| */ | ||
| Style = 6, | ||
| /** | ||
| * Associates an animation with an entry trigger that can be attached to an element. | ||
| * See `trigger()` | ||
| */ | ||
| Trigger = 7, | ||
| /** | ||
| * Contains a re-usable animation. | ||
| * See `animation()` | ||
| */ | ||
| Reference = 8, | ||
| /** | ||
| * Contains data to use in executing child animations returned by a query. | ||
| * See `animateChild()` | ||
| */ | ||
| AnimateChild = 9, | ||
| /** | ||
| * Contains animation parameters for a re-usable animation. | ||
| * See `useAnimation()` | ||
| */ | ||
| AnimateRef = 10, | ||
| /** | ||
| * Contains child-animation query data. | ||
| * See `query()` | ||
| */ | ||
| Query = 11, | ||
| /** | ||
| * Contains data for staggering an animation sequence. | ||
| * See `stagger()` | ||
| */ | ||
| Stagger = 12 | ||
| } | ||
| /** | ||
| * Specifies automatic styling. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare const AUTO_STYLE = "*"; | ||
| /** | ||
| * Base for animation data structures. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationMetadata { | ||
| type: AnimationMetadataType; | ||
| } | ||
| /** | ||
| * Contains an animation trigger. Instantiated and returned by the | ||
| * `trigger()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationTriggerMetadata extends AnimationMetadata { | ||
| /** | ||
| * The trigger name, used to associate it with an element. Unique within the component. | ||
| */ | ||
| name: string; | ||
| /** | ||
| * An animation definition object, containing an array of state and transition declarations. | ||
| */ | ||
| definitions: AnimationMetadata[]; | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: { | ||
| params?: { | ||
| [name: string]: any; | ||
| }; | ||
| } | null; | ||
| } | ||
| /** | ||
| * Encapsulates an animation state by associating a state name with a set of CSS styles. | ||
| * Instantiated and returned by the [`state()`](api/animations/state) function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationStateMetadata extends AnimationMetadata { | ||
| /** | ||
| * The state name, unique within the component. | ||
| */ | ||
| name: string; | ||
| /** | ||
| * The CSS styles associated with this state. | ||
| */ | ||
| styles: AnimationStyleMetadata; | ||
| /** | ||
| * An options object containing | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. | ||
| */ | ||
| options?: { | ||
| params: { | ||
| [name: string]: any; | ||
| }; | ||
| }; | ||
| } | ||
| /** | ||
| * Encapsulates an animation transition. Instantiated and returned by the | ||
| * `transition()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationTransitionMetadata extends AnimationMetadata { | ||
| /** | ||
| * An expression that describes a state change. | ||
| */ | ||
| expr: string | ((fromState: string, toState: string, element?: any, params?: { | ||
| [key: string]: any; | ||
| }) => boolean); | ||
| /** | ||
| * One or more animation objects to which this transition applies. | ||
| */ | ||
| animation: AnimationMetadata | AnimationMetadata[]; | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: AnimationOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates a reusable animation, which is a collection of individual animation steps. | ||
| * Instantiated and returned by the `animation()` function, and | ||
| * passed to the `useAnimation()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationReferenceMetadata extends AnimationMetadata { | ||
| /** | ||
| * One or more animation step objects. | ||
| */ | ||
| animation: AnimationMetadata | AnimationMetadata[]; | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: AnimationOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates an animation query. Instantiated and returned by | ||
| * the `query()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationQueryMetadata extends AnimationMetadata { | ||
| /** | ||
| * The CSS selector for this query. | ||
| */ | ||
| selector: string; | ||
| /** | ||
| * One or more animation step objects. | ||
| */ | ||
| animation: AnimationMetadata | AnimationMetadata[]; | ||
| /** | ||
| * A query options object. | ||
| */ | ||
| options: AnimationQueryOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates a keyframes sequence. Instantiated and returned by | ||
| * the `keyframes()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationKeyframesSequenceMetadata extends AnimationMetadata { | ||
| /** | ||
| * An array of animation styles. | ||
| */ | ||
| steps: AnimationStyleMetadata[]; | ||
| } | ||
| /** | ||
| * Encapsulates an animation style. Instantiated and returned by | ||
| * the `style()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationStyleMetadata extends AnimationMetadata { | ||
| /** | ||
| * A set of CSS style properties. | ||
| */ | ||
| styles: '*' | { | ||
| [key: string]: string | number; | ||
| } | Array<{ | ||
| [key: string]: string | number; | ||
| } | '*'>; | ||
| /** | ||
| * A percentage of the total animate time at which the style is to be applied. | ||
| */ | ||
| offset: number | null; | ||
| } | ||
| /** | ||
| * Encapsulates an animation step. Instantiated and returned by | ||
| * the `animate()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationAnimateMetadata extends AnimationMetadata { | ||
| /** | ||
| * The timing data for the step. | ||
| */ | ||
| timings: string | number | AnimateTimings; | ||
| /** | ||
| * A set of styles used in the step. | ||
| */ | ||
| styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null; | ||
| } | ||
| /** | ||
| * Encapsulates a child animation, that can be run explicitly when the parent is run. | ||
| * Instantiated and returned by the `animateChild` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationAnimateChildMetadata extends AnimationMetadata { | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: AnimationOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates a reusable animation. | ||
| * Instantiated and returned by the `useAnimation()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationAnimateRefMetadata extends AnimationMetadata { | ||
| /** | ||
| * An animation reference object. | ||
| */ | ||
| animation: AnimationReferenceMetadata; | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: AnimationOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates an animation sequence. | ||
| * Instantiated and returned by the `sequence()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationSequenceMetadata extends AnimationMetadata { | ||
| /** | ||
| * An array of animation step objects. | ||
| */ | ||
| steps: AnimationMetadata[]; | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: AnimationOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates an animation group. | ||
| * Instantiated and returned by the `group()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationGroupMetadata extends AnimationMetadata { | ||
| /** | ||
| * One or more animation or style steps that form this group. | ||
| */ | ||
| steps: AnimationMetadata[]; | ||
| /** | ||
| * An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. Default delay is 0. | ||
| */ | ||
| options: AnimationOptions | null; | ||
| } | ||
| /** | ||
| * Encapsulates animation query options. | ||
| * Passed to the `query()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare interface AnimationQueryOptions extends AnimationOptions { | ||
| /** | ||
| * True if this query is optional, false if it is required. Default is false. | ||
| * A required query throws an error if no elements are retrieved when | ||
| * the query is executed. An optional query does not. | ||
| * | ||
| */ | ||
| optional?: boolean; | ||
| /** | ||
| * A maximum total number of results to return from the query. | ||
| * If negative, results are limited from the end of the query list towards the beginning. | ||
| * By default, results are not limited. | ||
| */ | ||
| limit?: number; | ||
| } | ||
| /** | ||
| * Encapsulates parameters for staggering the start times of a set of animation steps. | ||
| * Instantiated and returned by the `stagger()` function. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| interface AnimationStaggerMetadata extends AnimationMetadata { | ||
| /** | ||
| * The timing data for the steps. | ||
| */ | ||
| timings: string | number; | ||
| /** | ||
| * One or more animation steps. | ||
| */ | ||
| animation: AnimationMetadata | AnimationMetadata[]; | ||
| } | ||
| /** | ||
| * Creates a named animation trigger, containing a list of [`state()`](api/animations/state) | ||
| * and `transition()` entries to be evaluated when the expression | ||
| * bound to the trigger changes. | ||
| * | ||
| * @param name An identifying string. | ||
| * @param definitions An animation definition object, containing an array of | ||
| * [`state()`](api/animations/state) and `transition()` declarations. | ||
| * | ||
| * @return An object that encapsulates the trigger data. | ||
| * | ||
| * @usageNotes | ||
| * Define an animation trigger in the `animations` section of `@Component` metadata. | ||
| * In the template, reference the trigger by name and bind it to a trigger expression that | ||
| * evaluates to a defined animation state, using the following format: | ||
| * | ||
| * `[@triggerName]="expression"` | ||
| * | ||
| * Animation trigger bindings convert all values to strings, and then match the | ||
| * previous and current values against any linked transitions. | ||
| * Booleans can be specified as `1` or `true` and `0` or `false`. | ||
| * | ||
| * ### Usage Example | ||
| * | ||
| * The following example creates an animation trigger reference based on the provided | ||
| * name value. | ||
| * The provided animation value is expected to be an array consisting of state and | ||
| * transition declarations. | ||
| * | ||
| * ```ts | ||
| * @Component({ | ||
| * selector: "my-component", | ||
| * templateUrl: "my-component-tpl.html", | ||
| * animations: [ | ||
| * trigger("myAnimationTrigger", [ | ||
| * state(...), | ||
| * state(...), | ||
| * transition(...), | ||
| * transition(...) | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * myStatusExp = "something"; | ||
| * } | ||
| * ``` | ||
| * | ||
| * The template associated with this component makes use of the defined trigger | ||
| * by binding to an element within its template code. | ||
| * | ||
| * ```html | ||
| * <!-- somewhere inside of my-component-tpl.html --> | ||
| * <div [@myAnimationTrigger]="myStatusExp">...</div> | ||
| * ``` | ||
| * | ||
| * ### Using an inline function | ||
| * The `transition` animation method also supports reading an inline function which can decide | ||
| * if its associated animation should be run. | ||
| * | ||
| * ```ts | ||
| * // this method is run each time the `myAnimationTrigger` trigger value changes. | ||
| * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key: | ||
| string]: any}): boolean { | ||
| * // notice that `element` and `params` are also available here | ||
| * return toState == 'yes-please-animate'; | ||
| * } | ||
| * | ||
| * @Component({ | ||
| * selector: 'my-component', | ||
| * templateUrl: 'my-component-tpl.html', | ||
| * animations: [ | ||
| * trigger('myAnimationTrigger', [ | ||
| * transition(myInlineMatcherFn, [ | ||
| * // the animation sequence code | ||
| * ]), | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * myStatusExp = "yes-please-animate"; | ||
| * } | ||
| * ``` | ||
| * | ||
| * ### Disabling Animations | ||
| * When true, the special animation control binding `@.disabled` binding prevents | ||
| * all animations from rendering. | ||
| * Place the `@.disabled` binding on an element to disable | ||
| * animations on the element itself, as well as any inner animation triggers | ||
| * within the element. | ||
| * | ||
| * The following example shows how to use this feature: | ||
| * | ||
| * ```angular-ts | ||
| * @Component({ | ||
| * selector: 'my-component', | ||
| * template: ` | ||
| * <div [@.disabled]="isDisabled"> | ||
| * <div [@childAnimation]="exp"></div> | ||
| * </div> | ||
| * `, | ||
| * animations: [ | ||
| * trigger("childAnimation", [ | ||
| * // ... | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * isDisabled = true; | ||
| * exp = '...'; | ||
| * } | ||
| * ``` | ||
| * | ||
| * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating, | ||
| * along with any inner animations. | ||
| * | ||
| * ### Disable animations application-wide | ||
| * When an area of the template is set to have animations disabled, | ||
| * **all** inner components have their animations disabled as well. | ||
| * This means that you can disable all animations for an app | ||
| * by placing a host binding set on `@.disabled` on the topmost Angular component. | ||
| * | ||
| * ```ts | ||
| * import {Component, HostBinding} from '@angular/core'; | ||
| * | ||
| * @Component({ | ||
| * selector: 'app-component', | ||
| * templateUrl: 'app.component.html', | ||
| * }) | ||
| * class AppComponent { | ||
| * @HostBinding('@.disabled') | ||
| * public animationsDisabled = true; | ||
| * } | ||
| * ``` | ||
| * | ||
| * ### Overriding disablement of inner animations | ||
| * Despite inner animations being disabled, a parent animation can `query()` | ||
| * for inner elements located in disabled areas of the template and still animate | ||
| * them if needed. This is also the case for when a sub animation is | ||
| * queried by a parent and then later animated using `animateChild()`. | ||
| * | ||
| * ### Detecting when an animation is disabled | ||
| * If a region of the DOM (or the entire application) has its animations disabled, the animation | ||
| * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides | ||
| * an instance of an `AnimationEvent`. If animations are disabled, | ||
| * the `.disabled` flag on the event is true. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function trigger(name: string, definitions: AnimationMetadata[]): AnimationTriggerMetadata; | ||
| /** | ||
| * Defines an animation step that combines styling information with timing information. | ||
| * | ||
| * @param timings Sets `AnimateTimings` for the parent animation. | ||
| * A string in the format "duration [delay] [easing]". | ||
| * - Duration and delay are expressed as a number and optional time unit, | ||
| * such as "1s" or "10ms" for one second and 10 milliseconds, respectively. | ||
| * The default unit is milliseconds. | ||
| * - The easing value controls how the animation accelerates and decelerates | ||
| * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`, | ||
| * `ease-in-out`, or a `cubic-bezier()` function call. | ||
| * If not supplied, no easing is applied. | ||
| * | ||
| * For example, the string "1s 100ms ease-out" specifies a duration of | ||
| * 1000 milliseconds, and delay of 100 ms, and the "ease-out" easing style, | ||
| * which decelerates near the end of the duration. | ||
| * @param styles Sets AnimationStyles for the parent animation. | ||
| * A function call to either `style()` or `keyframes()` | ||
| * that returns a collection of CSS style entries to be applied to the parent animation. | ||
| * When null, uses the styles from the destination state. | ||
| * This is useful when describing an animation step that will complete an animation; | ||
| * see "Animating to the final state" in `transitions()`. | ||
| * @returns An object that encapsulates the animation step. | ||
| * | ||
| * @usageNotes | ||
| * Call within an animation `sequence()`, {@link /api/animations/group group()}, or | ||
| * `transition()` call to specify an animation step | ||
| * that applies given style data to the parent animation for a given amount of time. | ||
| * | ||
| * ### Syntax Examples | ||
| * **Timing examples** | ||
| * | ||
| * The following examples show various `timings` specifications. | ||
| * - `animate(500)` : Duration is 500 milliseconds. | ||
| * - `animate("1s")` : Duration is 1000 milliseconds. | ||
| * - `animate("100ms 0.5s")` : Duration is 100 milliseconds, delay is 500 milliseconds. | ||
| * - `animate("5s ease-in")` : Duration is 5000 milliseconds, easing in. | ||
| * - `animate("5s 10ms cubic-bezier(.17,.67,.88,.1)")` : Duration is 5000 milliseconds, delay is 10 | ||
| * milliseconds, easing according to a bezier curve. | ||
| * | ||
| * **Style examples** | ||
| * | ||
| * The following example calls `style()` to set a single CSS style. | ||
| * ```ts | ||
| * animate(500, style({ background: "red" })) | ||
| * ``` | ||
| * The following example calls `keyframes()` to set a CSS style | ||
| * to different values for successive keyframes. | ||
| * ```ts | ||
| * animate(500, keyframes( | ||
| * [ | ||
| * style({ background: "blue" }), | ||
| * style({ background: "red" }) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function animate(timings: string | number, styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null): AnimationAnimateMetadata; | ||
| /** | ||
| * @description Defines a list of animation steps to be run in parallel. | ||
| * | ||
| * @param steps An array of animation step objects. | ||
| * - When steps are defined by `style()` or `animate()` | ||
| * function calls, each call within the group is executed instantly. | ||
| * - To specify offset styles to be applied at a later time, define steps with | ||
| * `keyframes()`, or use `animate()` calls with a delay value. | ||
| * For example: | ||
| * | ||
| * ```ts | ||
| * group([ | ||
| * animate("1s", style({ background: "black" })), | ||
| * animate("2s", style({ color: "white" })) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @param options An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. | ||
| * | ||
| * @return An object that encapsulates the group data. | ||
| * | ||
| * @usageNotes | ||
| * Grouped animations are useful when a series of styles must be | ||
| * animated at different starting times and closed off at different ending times. | ||
| * | ||
| * When called within a `sequence()` or a | ||
| * `transition()` call, does not continue to the next | ||
| * instruction until all of the inner animation steps have completed. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function group(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationGroupMetadata; | ||
| /** | ||
| * Defines a list of animation steps to be run sequentially, one by one. | ||
| * | ||
| * @param steps An array of animation step objects. | ||
| * - Steps defined by `style()` calls apply the styling data immediately. | ||
| * - Steps defined by `animate()` calls apply the styling data over time | ||
| * as specified by the timing data. | ||
| * | ||
| * ```ts | ||
| * sequence([ | ||
| * style({ opacity: 0 }), | ||
| * animate("1s", style({ opacity: 1 })) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @param options An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. | ||
| * | ||
| * @return An object that encapsulates the sequence data. | ||
| * | ||
| * @usageNotes | ||
| * When you pass an array of steps to a | ||
| * `transition()` call, the steps run sequentially by default. | ||
| * Compare this to the {@link /api/animations/group group()} call, which runs animation steps in | ||
| *parallel. | ||
| * | ||
| * When a sequence is used within a {@link /api/animations/group group()} or a `transition()` call, | ||
| * execution continues to the next instruction only after each of the inner animation | ||
| * steps have completed. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| declare function sequence(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationSequenceMetadata; | ||
| /** | ||
| * Declares a key/value object containing CSS properties/styles that | ||
| * can then be used for an animation [`state`](api/animations/state), within an animation | ||
| *`sequence`, or as styling data for calls to `animate()` and `keyframes()`. | ||
| * | ||
| * @param tokens A set of CSS styles or HTML styles associated with an animation state. | ||
| * The value can be any of the following: | ||
| * - A key-value style pair associating a CSS property with a value. | ||
| * - An array of key-value style pairs. | ||
| * - An asterisk (*), to use auto-styling, where styles are derived from the element | ||
| * being animated and applied to the animation when it starts. | ||
| * | ||
| * Auto-styling can be used to define a state that depends on layout or other | ||
| * environmental factors. | ||
| * | ||
| * @return An object that encapsulates the style data. | ||
| * | ||
| * @usageNotes | ||
| * The following examples create animation styles that collect a set of | ||
| * CSS property values: | ||
| * | ||
| * ```ts | ||
| * // string values for CSS properties | ||
| * style({ background: "red", color: "blue" }) | ||
| * | ||
| * // numerical pixel values | ||
| * style({ width: 100, height: 0 }) | ||
| * ``` | ||
| * | ||
| * The following example uses auto-styling to allow an element to animate from | ||
| * a height of 0 up to its full height: | ||
| * | ||
| * ```ts | ||
| * style({ height: 0 }), | ||
| * animate("1s", style({ height: "*" })) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| declare function style(tokens: '*' | { | ||
| [key: string]: string | number; | ||
| } | Array<'*' | { | ||
| [key: string]: string | number; | ||
| }>): AnimationStyleMetadata; | ||
| /** | ||
| * Declares an animation state within a trigger attached to an element. | ||
| * | ||
| * @param name One or more names for the defined state in a comma-separated string. | ||
| * The following reserved state names can be supplied to define a style for specific use | ||
| * cases: | ||
| * | ||
| * - `void` You can associate styles with this name to be used when | ||
| * the element is detached from the application. For example, when an `ngIf` evaluates | ||
| * to false, the state of the associated element is void. | ||
| * - `*` (asterisk) Indicates the default state. You can associate styles with this name | ||
| * to be used as the fallback when the state that is being animated is not declared | ||
| * within the trigger. | ||
| * | ||
| * @param styles A set of CSS styles associated with this state, created using the | ||
| * `style()` function. | ||
| * This set of styles persists on the element once the state has been reached. | ||
| * @param options Parameters that can be passed to the state when it is invoked. | ||
| * 0 or more key-value pairs. | ||
| * @return An object that encapsulates the new state data. | ||
| * | ||
| * @usageNotes | ||
| * Use the `trigger()` function to register states to an animation trigger. | ||
| * Use the `transition()` function to animate between states. | ||
| * When a state is active within a component, its associated styles persist on the element, | ||
| * even when the animation ends. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| declare function state(name: string, styles: AnimationStyleMetadata, options?: { | ||
| params: { | ||
| [name: string]: any; | ||
| }; | ||
| }): AnimationStateMetadata; | ||
| /** | ||
| * Defines a set of animation styles, associating each style with an optional `offset` value. | ||
| * | ||
| * @param steps A set of animation styles with optional offset data. | ||
| * The optional `offset` value for a style specifies a percentage of the total animation | ||
| * time at which that style is applied. | ||
| * @returns An object that encapsulates the keyframes data. | ||
| * | ||
| * @usageNotes | ||
| * Use with the `animate()` call. Instead of applying animations | ||
| * from the current state | ||
| * to the destination state, keyframes describe how each style entry is applied and at what point | ||
| * within the animation arc. | ||
| * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp). | ||
| * | ||
| * ### Usage | ||
| * | ||
| * In the following example, the offset values describe | ||
| * when each `backgroundColor` value is applied. The color is red at the start, and changes to | ||
| * blue when 20% of the total time has elapsed. | ||
| * | ||
| * ```ts | ||
| * // the provided offset values | ||
| * animate("5s", keyframes([ | ||
| * style({ backgroundColor: "red", offset: 0 }), | ||
| * style({ backgroundColor: "blue", offset: 0.2 }), | ||
| * style({ backgroundColor: "orange", offset: 0.3 }), | ||
| * style({ backgroundColor: "black", offset: 1 }) | ||
| * ])) | ||
| * ``` | ||
| * | ||
| * If there are no `offset` values specified in the style entries, the offsets | ||
| * are calculated automatically. | ||
| * | ||
| * ```ts | ||
| * animate("5s", keyframes([ | ||
| * style({ backgroundColor: "red" }) // offset = 0 | ||
| * style({ backgroundColor: "blue" }) // offset = 0.33 | ||
| * style({ backgroundColor: "orange" }) // offset = 0.66 | ||
| * style({ backgroundColor: "black" }) // offset = 1 | ||
| * ])) | ||
| *``` | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata; | ||
| /** | ||
| * Declares an animation transition which is played when a certain specified condition is met. | ||
| * | ||
| * @param stateChangeExpr A string with a specific format or a function that specifies when the | ||
| * animation transition should occur (see [State Change Expression](#state-change-expression)). | ||
| * | ||
| * @param steps One or more animation objects that represent the animation's instructions. | ||
| * | ||
| * @param options An options object that can be used to specify a delay for the animation or provide | ||
| * custom parameters for it. | ||
| * | ||
| * @returns An object that encapsulates the transition data. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * ### State Change Expression | ||
| * | ||
| * The State Change Expression instructs Angular when to run the transition's animations, it can | ||
| *either be | ||
| * - a string with a specific syntax | ||
| * - or a function that compares the previous and current state (value of the expression bound to | ||
| * the element's trigger) and returns `true` if the transition should occur or `false` otherwise | ||
| * | ||
| * The string format can be: | ||
| * - `fromState => toState`, which indicates that the transition's animations should occur then the | ||
| * expression bound to the trigger's element goes from `fromState` to `toState` | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition('open => closed', animate('.5s ease-out', style({ height: 0 }) )) | ||
| * ``` | ||
| * | ||
| * - `fromState <=> toState`, which indicates that the transition's animations should occur then | ||
| * the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)')) | ||
| * ``` | ||
| * | ||
| * - `:enter`/`:leave`, which indicates that the transition's animations should occur when the | ||
| * element enters or exists the DOM | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition(':enter', [ | ||
| * style({ opacity: 0 }), | ||
| * animate('500ms', style({ opacity: 1 })) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * - `:increment`/`:decrement`, which indicates that the transition's animations should occur when | ||
| * the numerical expression bound to the trigger's element has increased in value or decreased | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition(':increment', query('@counter', animateChild())) | ||
| * ``` | ||
| * | ||
| * - a sequence of any of the above divided by commas, which indicates that transition's animations | ||
| * should occur whenever one of the state change expressions matches | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([ | ||
| * style({ transform: 'scale(1)', offset: 0}), | ||
| * style({ transform: 'scale(1.1)', offset: 0.7}), | ||
| * style({ transform: 'scale(1)', offset: 1}) | ||
| * ]))), | ||
| * ``` | ||
| * | ||
| * Also note that in such context: | ||
| * - `void` can be used to indicate the absence of the element | ||
| * - asterisks can be used as wildcards that match any state | ||
| * - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is | ||
| * equivalent to `:leave`) | ||
| * - `true` and `false` also match expression values of `1` and `0` respectively (but do not match | ||
| * _truthy_ and _falsy_ values) | ||
| * | ||
| * <div class="docs-alert docs-alert-helpful"> | ||
| * | ||
| * Be careful about entering end leaving elements as their transitions present a common | ||
| * pitfall for developers. | ||
| * | ||
| * Note that when an element with a trigger enters the DOM its `:enter` transition always | ||
| * gets executed, but its `:leave` transition will not be executed if the element is removed | ||
| * alongside its parent (as it will be removed "without warning" before its transition has | ||
| * a chance to be executed, the only way that such transition can occur is if the element | ||
| * is exiting the DOM on its own). | ||
| * | ||
| * | ||
| * </div> | ||
| * | ||
| * ### Animating to a Final State | ||
| * | ||
| * If the final step in a transition is a call to `animate()` that uses a timing value | ||
| * with no `style` data, that step is automatically considered the final animation arc, | ||
| * for the element to reach the final state, in such case Angular automatically adds or removes | ||
| * CSS styles to ensure that the element is in the correct final state. | ||
| * | ||
| * | ||
| * ### Usage Examples | ||
| * | ||
| * - Transition animations applied based on | ||
| * the trigger's expression value | ||
| * | ||
| * ```html | ||
| * <div [@myAnimationTrigger]="myStatusExp"> | ||
| * ... | ||
| * </div> | ||
| * ``` | ||
| * | ||
| * ```ts | ||
| * trigger("myAnimationTrigger", [ | ||
| * ..., // states | ||
| * transition("on => off, open => closed", animate(500)), | ||
| * transition("* <=> error", query('.indicator', animateChild())) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * - Transition animations applied based on custom logic dependent | ||
| * on the trigger's expression value and provided parameters | ||
| * | ||
| * ```html | ||
| * <div [@myAnimationTrigger]="{ | ||
| * value: stepName, | ||
| * params: { target: currentTarget } | ||
| * }"> | ||
| * ... | ||
| * </div> | ||
| * ``` | ||
| * | ||
| * ```ts | ||
| * trigger("myAnimationTrigger", [ | ||
| * ..., // states | ||
| * transition( | ||
| * (fromState, toState, _element, params) => | ||
| * ['firststep', 'laststep'].includes(fromState.toLowerCase()) | ||
| * && toState === params?.['target'], | ||
| * animate('1s') | ||
| * ) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| declare function transition(stateChangeExpr: string | ((fromState: string, toState: string, element?: any, params?: { | ||
| [key: string]: any; | ||
| }) => boolean), steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationTransitionMetadata; | ||
| /** | ||
| * Produces a reusable animation that can be invoked in another animation or sequence, | ||
| * by calling the `useAnimation()` function. | ||
| * | ||
| * @param steps One or more animation objects, as returned by the `animate()` | ||
| * or `sequence()` function, that form a transformation from one state to another. | ||
| * A sequence is used by default when you pass an array. | ||
| * @param options An options object that can contain a delay value for the start of the | ||
| * animation, and additional developer-defined parameters. | ||
| * Provided values for additional parameters are used as defaults, | ||
| * and override values can be passed to the caller on invocation. | ||
| * @returns An object that encapsulates the animation data. | ||
| * | ||
| * @usageNotes | ||
| * The following example defines a reusable animation, providing some default parameter | ||
| * values. | ||
| * | ||
| * ```ts | ||
| * var fadeAnimation = animation([ | ||
| * style({ opacity: '{{ start }}' }), | ||
| * animate('{{ time }}', | ||
| * style({ opacity: '{{ end }}'})) | ||
| * ], | ||
| * { params: { time: '1000ms', start: 0, end: 1 }}); | ||
| * ``` | ||
| * | ||
| * The following invokes the defined animation with a call to `useAnimation()`, | ||
| * passing in override parameter values. | ||
| * | ||
| * ```js | ||
| * useAnimation(fadeAnimation, { | ||
| * params: { | ||
| * time: '2s', | ||
| * start: 1, | ||
| * end: 0 | ||
| * } | ||
| * }) | ||
| * ``` | ||
| * | ||
| * If any of the passed-in parameter values are missing from this call, | ||
| * the default values are used. If one or more parameter values are missing before a step is | ||
| * animated, `useAnimation()` throws an error. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function animation(steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationReferenceMetadata; | ||
| /** | ||
| * Executes a queried inner animation element within an animation sequence. | ||
| * | ||
| * @param options An options object that can contain a delay value for the start of the | ||
| * animation, and additional override values for developer-defined parameters. | ||
| * @return An object that encapsulates the child animation data. | ||
| * | ||
| * @usageNotes | ||
| * Each time an animation is triggered in Angular, the parent animation | ||
| * has priority and any child animations are blocked. In order | ||
| * for a child animation to run, the parent animation must query each of the elements | ||
| * containing child animations, and run them using this function. | ||
| * | ||
| * Note that this feature is designed to be used with `query()` and it will only work | ||
| * with animations that are assigned using the Angular animation library. CSS keyframes | ||
| * and transitions are not handled by this API. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function animateChild(options?: AnimateChildOptions | null): AnimationAnimateChildMetadata; | ||
| /** | ||
| * Starts a reusable animation that is created using the `animation()` function. | ||
| * | ||
| * @param animation The reusable animation to start. | ||
| * @param options An options object that can contain a delay value for the start of | ||
| * the animation, and additional override values for developer-defined parameters. | ||
| * @return An object that contains the animation parameters. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function useAnimation(animation: AnimationReferenceMetadata, options?: AnimationOptions | null): AnimationAnimateRefMetadata; | ||
| /** | ||
| * Finds one or more inner elements within the current element that is | ||
| * being animated within a sequence. Use with `animate()`. | ||
| * | ||
| * @param selector The element to query, or a set of elements that contain Angular-specific | ||
| * characteristics, specified with one or more of the following tokens. | ||
| * - `query(":enter")` or `query(":leave")` : Query for newly inserted/removed elements (not | ||
| * all elements can be queried via these tokens, see | ||
| * [Entering and Leaving Elements](#entering-and-leaving-elements)) | ||
| * - `query(":animating")` : Query all currently animating elements. | ||
| * - `query("@triggerName")` : Query elements that contain an animation trigger. | ||
| * - `query("@*")` : Query all elements that contain an animation triggers. | ||
| * - `query(":self")` : Include the current element into the animation sequence. | ||
| * | ||
| * @param animation One or more animation steps to apply to the queried element or elements. | ||
| * An array is treated as an animation sequence. | ||
| * @param options An options object. Use the 'limit' field to limit the total number of | ||
| * items to collect. | ||
| * @return An object that encapsulates the query data. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * ### Multiple Tokens | ||
| * | ||
| * Tokens can be merged into a combined query selector string. For example: | ||
| * | ||
| * ```ts | ||
| * query(':self, .record:enter, .record:leave, @subTrigger', [...]) | ||
| * ``` | ||
| * | ||
| * The `query()` function collects multiple elements and works internally by using | ||
| * `element.querySelectorAll`. Use the `limit` field of an options object to limit | ||
| * the total number of items to be collected. For example: | ||
| * | ||
| * ```js | ||
| * query('div', [ | ||
| * animate(...), | ||
| * animate(...) | ||
| * ], { limit: 1 }) | ||
| * ``` | ||
| * | ||
| * By default, throws an error when zero items are found. Set the | ||
| * `optional` flag to ignore this error. For example: | ||
| * | ||
| * ```js | ||
| * query('.some-element-that-may-not-be-there', [ | ||
| * animate(...), | ||
| * animate(...) | ||
| * ], { optional: true }) | ||
| * ``` | ||
| * | ||
| * ### Entering and Leaving Elements | ||
| * | ||
| * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones | ||
| * that can are those that Angular assumes can enter/leave based on their own logic | ||
| * (if their insertion/removal is simply a consequence of that of their parent they | ||
| * should be queried via a different token in their parent's `:enter`/`:leave` transitions). | ||
| * | ||
| * The only elements Angular assumes can enter/leave based on their own logic (thus the only | ||
| * ones that can be queried via the `:enter` and `:leave` tokens) are: | ||
| * - Those inserted dynamically (via `ViewContainerRef`) | ||
| * - Those that have a structural directive (which, under the hood, are a subset of the above ones) | ||
| * | ||
| * <div class="docs-alert docs-alert-helpful"> | ||
| * | ||
| * Note that elements will be successfully queried via `:enter`/`:leave` even if their | ||
| * insertion/removal is not done manually via `ViewContainerRef`or caused by their structural | ||
| * directive (e.g. they enter/exit alongside their parent). | ||
| * | ||
| * </div> | ||
| * | ||
| * <div class="docs-alert docs-alert-important"> | ||
| * | ||
| * There is an exception to what previously mentioned, besides elements entering/leaving based on | ||
| * their own logic, elements with an animation trigger can always be queried via `:leave` when | ||
| * their parent is also leaving. | ||
| * | ||
| * </div> | ||
| * | ||
| * ### Usage Example | ||
| * | ||
| * The following example queries for inner elements and animates them | ||
| * individually using `animate()`. | ||
| * | ||
| * ```angular-ts | ||
| * @Component({ | ||
| * selector: 'inner', | ||
| * template: ` | ||
| * <div [@queryAnimation]="exp"> | ||
| * <h1>Title</h1> | ||
| * <div class="content"> | ||
| * Blah blah blah | ||
| * </div> | ||
| * </div> | ||
| * `, | ||
| * animations: [ | ||
| * trigger('queryAnimation', [ | ||
| * transition('* => goAnimate', [ | ||
| * // hide the inner elements | ||
| * query('h1', style({ opacity: 0 })), | ||
| * query('.content', style({ opacity: 0 })), | ||
| * | ||
| * // animate the inner elements in, one by one | ||
| * query('h1', animate(1000, style({ opacity: 1 }))), | ||
| * query('.content', animate(1000, style({ opacity: 1 }))), | ||
| * ]) | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class Cmp { | ||
| * exp = ''; | ||
| * | ||
| * goAnimate() { | ||
| * this.exp = 'goAnimate'; | ||
| * } | ||
| * } | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function query(selector: string, animation: AnimationMetadata | AnimationMetadata[], options?: AnimationQueryOptions | null): AnimationQueryMetadata; | ||
| /** | ||
| * Use within an animation `query()` call to issue a timing gap after | ||
| * each queried item is animated. | ||
| * | ||
| * @param timings A delay value. | ||
| * @param animation One ore more animation steps. | ||
| * @returns An object that encapsulates the stagger data. | ||
| * | ||
| * @usageNotes | ||
| * In the following example, a container element wraps a list of items stamped out | ||
| * by an `@for` block. The container element contains an animation trigger that will later be set | ||
| * to query for each of the inner items. | ||
| * | ||
| * Each time items are added, the opacity fade-in animation runs, | ||
| * and each removed item is faded out. | ||
| * When either of these animations occur, the stagger effect is | ||
| * applied after each item's animation is started. | ||
| * | ||
| * ```html | ||
| * <!-- list.component.html --> | ||
| * <button (click)="toggle()">Show / Hide Items</button> | ||
| * <hr /> | ||
| * <div [@listAnimation]="items.length"> | ||
| * @for(item of items; track $index) { | ||
| * <div>{{ item }}</div> | ||
| * } | ||
| * </div> | ||
| * ``` | ||
| * | ||
| * Here is the component code: | ||
| * | ||
| * ```ts | ||
| * import {trigger, transition, style, animate, query, stagger} from '@angular/animations'; | ||
| * @Component({ | ||
| * templateUrl: 'list.component.html', | ||
| * animations: [ | ||
| * trigger('listAnimation', [ | ||
| * ... | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class ListComponent { | ||
| * items = []; | ||
| * | ||
| * showItems() { | ||
| * this.items = [0,1,2,3,4]; | ||
| * } | ||
| * | ||
| * hideItems() { | ||
| * this.items = []; | ||
| * } | ||
| * | ||
| * toggle() { | ||
| * this.items.length ? this.hideItems() : this.showItems(); | ||
| * } | ||
| * } | ||
| * ``` | ||
| * | ||
| * Here is the animation trigger code: | ||
| * | ||
| * ```ts | ||
| * trigger('listAnimation', [ | ||
| * transition('* => *', [ // each time the binding value changes | ||
| * query(':leave', [ | ||
| * stagger(100, [ | ||
| * animate('0.5s', style({ opacity: 0 })) | ||
| * ]) | ||
| * ]), | ||
| * query(':enter', [ | ||
| * style({ opacity: 0 }), | ||
| * stagger(100, [ | ||
| * animate('0.5s', style({ opacity: 1 })) | ||
| * ]) | ||
| * ]) | ||
| * ]) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare function stagger(timings: string | number, animation: AnimationMetadata | AnimationMetadata[]): AnimationStaggerMetadata; | ||
| /** | ||
| * Provides programmatic control of a reusable animation sequence, | ||
| * built using the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> | ||
| * method which returns an `AnimationFactory`, whose | ||
| * <code>[create](api/animations/AnimationFactory#create)()</code> method instantiates and | ||
| * initializes this interface. | ||
| * | ||
| * @see {@link AnimationBuilder} | ||
| * @see {@link AnimationFactory} | ||
| * @see {@link animate} | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationPlayer { | ||
| /** | ||
| * Provides a callback to invoke when the animation finishes. | ||
| * @param fn The callback function. | ||
| * @see {@link #finish} | ||
| */ | ||
| onDone(fn: () => void): void; | ||
| /** | ||
| * Provides a callback to invoke when the animation starts. | ||
| * @param fn The callback function. | ||
| * @see {@link #play} | ||
| */ | ||
| onStart(fn: () => void): void; | ||
| /** | ||
| * Provides a callback to invoke after the animation is destroyed. | ||
| * @param fn The callback function. | ||
| * @see {@link #destroy} | ||
| * @see {@link #beforeDestroy} | ||
| */ | ||
| onDestroy(fn: () => void): void; | ||
| /** | ||
| * Initializes the animation. | ||
| */ | ||
| init(): void; | ||
| /** | ||
| * Reports whether the animation has started. | ||
| * @returns True if the animation has started, false otherwise. | ||
| */ | ||
| hasStarted(): boolean; | ||
| /** | ||
| * Runs the animation, invoking the `onStart()` callback. | ||
| */ | ||
| play(): void; | ||
| /** | ||
| * Pauses the animation. | ||
| */ | ||
| pause(): void; | ||
| /** | ||
| * Restarts the paused animation. | ||
| */ | ||
| restart(): void; | ||
| /** | ||
| * Ends the animation, invoking the `onDone()` callback. | ||
| */ | ||
| finish(): void; | ||
| /** | ||
| * Destroys the animation, after invoking the `beforeDestroy()` callback. | ||
| * Calls the `onDestroy()` callback when destruction is completed. | ||
| */ | ||
| destroy(): void; | ||
| /** | ||
| * Resets the animation to its initial state. | ||
| */ | ||
| reset(): void; | ||
| /** | ||
| * Sets the position of the animation. | ||
| * @param position A fractional value, representing the progress through the animation. | ||
| */ | ||
| setPosition(position: number): void; | ||
| /** | ||
| * Reports the current position of the animation. | ||
| * @returns A fractional value, representing the progress through the animation. | ||
| */ | ||
| getPosition(): number; | ||
| /** | ||
| * The parent of this player, if any. | ||
| */ | ||
| parentPlayer: AnimationPlayer | null; | ||
| /** | ||
| * The total run time of the animation, in milliseconds. | ||
| */ | ||
| readonly totalTime: number; | ||
| /** | ||
| * Provides a callback to invoke before the animation is destroyed. | ||
| */ | ||
| beforeDestroy?: () => any; | ||
| } | ||
| /** | ||
| * An empty programmatic controller for reusable animations. | ||
| * Used internally when animations are disabled, to avoid | ||
| * checking for the null case when an animation player is expected. | ||
| * | ||
| * @see {@link animate} | ||
| * @see {@link AnimationPlayer} | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare class NoopAnimationPlayer implements AnimationPlayer { | ||
| private _onDoneFns; | ||
| private _onStartFns; | ||
| private _onDestroyFns; | ||
| private _originalOnDoneFns; | ||
| private _originalOnStartFns; | ||
| private _started; | ||
| private _destroyed; | ||
| private _finished; | ||
| private _position; | ||
| parentPlayer: AnimationPlayer | null; | ||
| readonly totalTime: number; | ||
| constructor(duration?: number, delay?: number); | ||
| private _onFinish; | ||
| onStart(fn: () => void): void; | ||
| onDone(fn: () => void): void; | ||
| onDestroy(fn: () => void): void; | ||
| hasStarted(): boolean; | ||
| init(): void; | ||
| play(): void; | ||
| private _onStart; | ||
| pause(): void; | ||
| restart(): void; | ||
| finish(): void; | ||
| destroy(): void; | ||
| reset(): void; | ||
| setPosition(position: number): void; | ||
| getPosition(): number; | ||
| } | ||
| export { AUTO_STYLE, AnimationMetadataType, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation }; | ||
| export type { AnimateChildOptions, AnimateTimings, AnimationAnimateChildMetadata, AnimationAnimateMetadata, AnimationAnimateRefMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata, AnimationMetadata, AnimationOptions, AnimationPlayer, AnimationQueryMetadata, AnimationQueryOptions, AnimationReferenceMetadata, AnimationSequenceMetadata, AnimationStaggerMetadata, AnimationStateMetadata, AnimationStyleMetadata, AnimationTransitionMetadata, AnimationTriggerMetadata, ɵStyleData, ɵStyleDataMap }; |
| /** | ||
| * @license Angular v21.0.0-next.5 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| import { AnimationDriver } from '../animation_driver.d.js'; | ||
| export { NoopAnimationDriver } from '../animation_driver.d.js'; | ||
| import { AnimationTriggerMetadata, AnimationPlayer, ɵStyleDataMap as _StyleDataMap, AnimationMetadata, AnimationOptions, ɵStyleData as _StyleData } from '../animation_player.d.js'; | ||
| import { Renderer2, ɵAnimationRendererType as _AnimationRendererType, RendererStyleFlags2, ListenerOptions, RendererFactory2, NgZone, RendererType2 } from '@angular/core'; | ||
| declare abstract class AnimationStyleNormalizer { | ||
| abstract normalizePropertyName(propertyName: string, errors: Error[]): string; | ||
| abstract normalizeStyleValue(userProvidedProperty: string, normalizedProperty: string, value: string | number, errors: Error[]): string; | ||
| } | ||
| declare class NoopAnimationStyleNormalizer { | ||
| normalizePropertyName(propertyName: string, errors: Error[]): string; | ||
| normalizeStyleValue(userProvidedProperty: string, normalizedProperty: string, value: string | number, errors: Error[]): string; | ||
| } | ||
| declare class AnimationEngine { | ||
| private _driver; | ||
| private _normalizer; | ||
| private _transitionEngine; | ||
| private _timelineEngine; | ||
| private _triggerCache; | ||
| onRemovalComplete: (element: any, context: any) => void; | ||
| constructor(doc: Document, _driver: AnimationDriver, _normalizer: AnimationStyleNormalizer); | ||
| registerTrigger(componentId: string, namespaceId: string, hostElement: any, name: string, metadata: AnimationTriggerMetadata): void; | ||
| register(namespaceId: string, hostElement: any): void; | ||
| destroy(namespaceId: string, context: any): void; | ||
| onInsert(namespaceId: string, element: any, parent: any, insertBefore: boolean): void; | ||
| onRemove(namespaceId: string, element: any, context: any): void; | ||
| disableAnimations(element: any, disable: boolean): void; | ||
| process(namespaceId: string, element: any, property: string, value: any): void; | ||
| listen(namespaceId: string, element: any, eventName: string, eventPhase: string, callback: (event: any) => any): () => any; | ||
| flush(microtaskId?: number): void; | ||
| get players(): AnimationPlayer[]; | ||
| whenRenderingDone(): Promise<any>; | ||
| afterFlushAnimationsDone(cb: VoidFunction): void; | ||
| } | ||
| declare function createEngine(type: 'animations' | 'noop', doc: Document): AnimationEngine; | ||
| declare const enum AnimationTransitionInstructionType { | ||
| TransitionAnimation = 0, | ||
| TimelineAnimation = 1 | ||
| } | ||
| interface AnimationEngineInstruction { | ||
| type: AnimationTransitionInstructionType; | ||
| } | ||
| interface AnimationTimelineInstruction extends AnimationEngineInstruction { | ||
| element: any; | ||
| keyframes: Array<_StyleDataMap>; | ||
| preStyleProps: string[]; | ||
| postStyleProps: string[]; | ||
| duration: number; | ||
| delay: number; | ||
| totalTime: number; | ||
| easing: string | null; | ||
| stretchStartingKeyframe?: boolean; | ||
| subTimeline: boolean; | ||
| } | ||
| declare class ElementInstructionMap { | ||
| private _map; | ||
| get(element: any): AnimationTimelineInstruction[]; | ||
| append(element: any, instructions: AnimationTimelineInstruction[]): void; | ||
| has(element: any): boolean; | ||
| clear(): void; | ||
| } | ||
| declare class Animation$1 { | ||
| private _driver; | ||
| private _animationAst; | ||
| constructor(_driver: AnimationDriver, input: AnimationMetadata | AnimationMetadata[]); | ||
| buildTimelines(element: any, startingStyles: _StyleDataMap | Array<_StyleDataMap>, destinationStyles: _StyleDataMap | Array<_StyleDataMap>, options: AnimationOptions, subInstructions?: ElementInstructionMap): AnimationTimelineInstruction[]; | ||
| } | ||
| declare class WebAnimationsStyleNormalizer extends AnimationStyleNormalizer { | ||
| normalizePropertyName(propertyName: string, errors: Error[]): string; | ||
| normalizeStyleValue(userProvidedProperty: string, normalizedProperty: string, value: string | number, errors: Error[]): string; | ||
| } | ||
| type AnimationFactoryWithListenerCallback = RendererFactory2 & { | ||
| scheduleListenerCallback: (count: number, fn: (e: any) => any, data: any) => void; | ||
| }; | ||
| declare class BaseAnimationRenderer implements Renderer2 { | ||
| protected namespaceId: string; | ||
| delegate: Renderer2; | ||
| engine: AnimationEngine; | ||
| private _onDestroy?; | ||
| readonly ɵtype: _AnimationRendererType.Regular; | ||
| constructor(namespaceId: string, delegate: Renderer2, engine: AnimationEngine, _onDestroy?: (() => void) | undefined); | ||
| get data(): { | ||
| [key: string]: any; | ||
| }; | ||
| destroyNode(node: any): void; | ||
| destroy(): void; | ||
| createElement(name: string, namespace?: string | null | undefined): any; | ||
| createComment(value: string): any; | ||
| createText(value: string): any; | ||
| appendChild(parent: any, newChild: any): void; | ||
| insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void; | ||
| removeChild(parent: any, oldChild: any, isHostElement?: boolean, requireSynchronousElementRemoval?: boolean): void; | ||
| selectRootElement(selectorOrNode: any, preserveContent?: boolean): any; | ||
| parentNode(node: any): any; | ||
| nextSibling(node: any): any; | ||
| setAttribute(el: any, name: string, value: string, namespace?: string | null | undefined): void; | ||
| removeAttribute(el: any, name: string, namespace?: string | null | undefined): void; | ||
| addClass(el: any, name: string): void; | ||
| removeClass(el: any, name: string): void; | ||
| setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2 | undefined): void; | ||
| removeStyle(el: any, style: string, flags?: RendererStyleFlags2 | undefined): void; | ||
| setProperty(el: any, name: string, value: any): void; | ||
| setValue(node: any, value: string): void; | ||
| listen(target: any, eventName: string, callback: (event: any) => boolean | void, options?: ListenerOptions): () => void; | ||
| protected disableAnimations(element: any, value: boolean): void; | ||
| } | ||
| declare class AnimationRenderer extends BaseAnimationRenderer implements Renderer2 { | ||
| factory: AnimationFactoryWithListenerCallback; | ||
| constructor(factory: AnimationFactoryWithListenerCallback, namespaceId: string, delegate: Renderer2, engine: AnimationEngine, onDestroy?: () => void); | ||
| setProperty(el: any, name: string, value: any): void; | ||
| listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => any, options?: ListenerOptions): () => void; | ||
| } | ||
| declare class AnimationRendererFactory implements RendererFactory2 { | ||
| private delegate; | ||
| private engine; | ||
| private _zone; | ||
| private _currentId; | ||
| private _microtaskId; | ||
| private _animationCallbacksBuffer; | ||
| private _rendererCache; | ||
| private _cdRecurDepth; | ||
| constructor(delegate: RendererFactory2, engine: AnimationEngine, _zone: NgZone); | ||
| createRenderer(hostElement: any, type: RendererType2): BaseAnimationRenderer; | ||
| begin(): void; | ||
| private _scheduleCountTask; | ||
| end(): void; | ||
| whenRenderingDone(): Promise<any>; | ||
| /** | ||
| * Used during HMR to clear any cached data about a component. | ||
| * @param componentId ID of the component that is being replaced. | ||
| */ | ||
| protected componentReplaced(componentId: string): void; | ||
| } | ||
| declare function getParentElement(element: any): unknown | null; | ||
| declare function validateStyleProperty(prop: string): boolean; | ||
| declare function validateWebAnimatableStyleProperty(prop: string): boolean; | ||
| declare function containsElement(elm1: any, elm2: any): boolean; | ||
| declare function invokeQuery(element: any, selector: string, multi: boolean): any[]; | ||
| declare class WebAnimationsDriver implements AnimationDriver { | ||
| validateStyleProperty(prop: string): boolean; | ||
| validateAnimatableStyleProperty(prop: string): boolean; | ||
| containsElement(elm1: any, elm2: any): boolean; | ||
| getParentElement(element: unknown): unknown; | ||
| query(element: any, selector: string, multi: boolean): any[]; | ||
| computeStyle(element: any, prop: string, defaultValue?: string): string; | ||
| animate(element: any, keyframes: Array<Map<string, string | number>>, duration: number, delay: number, easing: string, previousPlayers?: AnimationPlayer[]): AnimationPlayer; | ||
| } | ||
| /** | ||
| * Designed to be executed during a keyframe-based animation to apply any special-cased styles. | ||
| * | ||
| * When started (when the `start()` method is run) then the provided `startStyles` | ||
| * will be applied. When finished (when the `finish()` method is called) the | ||
| * `endStyles` will be applied as well any any starting styles. Finally when | ||
| * `destroy()` is called then all styles will be removed. | ||
| */ | ||
| declare class SpecialCasedStyles { | ||
| private _element; | ||
| private _startStyles; | ||
| private _endStyles; | ||
| static initialStylesByElement: WeakMap<any, _StyleDataMap>; | ||
| private _state; | ||
| private _initialStyles; | ||
| constructor(_element: any, _startStyles: _StyleDataMap | null, _endStyles: _StyleDataMap | null); | ||
| start(): void; | ||
| finish(): void; | ||
| destroy(): void; | ||
| } | ||
| declare class WebAnimationsPlayer implements AnimationPlayer { | ||
| element: any; | ||
| keyframes: Array<_StyleDataMap>; | ||
| options: { | ||
| [key: string]: string | number; | ||
| }; | ||
| private _specialStyles?; | ||
| private _onDoneFns; | ||
| private _onStartFns; | ||
| private _onDestroyFns; | ||
| private _duration; | ||
| private _delay; | ||
| private _initialized; | ||
| private _finished; | ||
| private _started; | ||
| private _destroyed; | ||
| private _finalKeyframe?; | ||
| private _originalOnDoneFns; | ||
| private _originalOnStartFns; | ||
| readonly domPlayer: Animation; | ||
| time: number; | ||
| parentPlayer: AnimationPlayer | null; | ||
| currentSnapshot: _StyleDataMap; | ||
| constructor(element: any, keyframes: Array<_StyleDataMap>, options: { | ||
| [key: string]: string | number; | ||
| }, _specialStyles?: (SpecialCasedStyles | null) | undefined); | ||
| private _onFinish; | ||
| init(): void; | ||
| private _buildPlayer; | ||
| private _preparePlayerBeforeStart; | ||
| private _convertKeyframesToObject; | ||
| onStart(fn: () => void): void; | ||
| onDone(fn: () => void): void; | ||
| onDestroy(fn: () => void): void; | ||
| play(): void; | ||
| pause(): void; | ||
| finish(): void; | ||
| reset(): void; | ||
| private _resetDomPlayerState; | ||
| restart(): void; | ||
| hasStarted(): boolean; | ||
| destroy(): void; | ||
| setPosition(p: number): void; | ||
| getPosition(): number; | ||
| get totalTime(): number; | ||
| beforeDestroy(): void; | ||
| } | ||
| declare const ENTER_CLASSNAME = "ng-enter"; | ||
| declare const LEAVE_CLASSNAME = "ng-leave"; | ||
| declare function normalizeKeyframes(keyframes: Array<_StyleData> | Array<_StyleDataMap>): Array<_StyleDataMap>; | ||
| declare function camelCaseToDashCase(input: string): string; | ||
| declare function allowPreviousPlayerStylesMerge(duration: number, delay: number): boolean; | ||
| declare class TransitionAnimationPlayer implements AnimationPlayer { | ||
| namespaceId: string; | ||
| triggerName: string; | ||
| element: any; | ||
| private _player; | ||
| private _containsRealPlayer; | ||
| private _queuedCallbacks; | ||
| readonly destroyed = false; | ||
| parentPlayer: AnimationPlayer | null; | ||
| markedForDestroy: boolean; | ||
| disabled: boolean; | ||
| readonly queued: boolean; | ||
| readonly totalTime: number; | ||
| constructor(namespaceId: string, triggerName: string, element: any); | ||
| setRealPlayer(player: AnimationPlayer): void; | ||
| getRealPlayer(): AnimationPlayer; | ||
| overrideTotalTime(totalTime: number): void; | ||
| syncPlayerEvents(player: AnimationPlayer): void; | ||
| private _queueEvent; | ||
| onDone(fn: () => void): void; | ||
| onStart(fn: () => void): void; | ||
| onDestroy(fn: () => void): void; | ||
| init(): void; | ||
| hasStarted(): boolean; | ||
| play(): void; | ||
| pause(): void; | ||
| restart(): void; | ||
| finish(): void; | ||
| destroy(): void; | ||
| reset(): void; | ||
| setPosition(p: number): void; | ||
| getPosition(): number; | ||
| } | ||
| 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 }; |
| /** | ||
| * @license Angular v21.0.0-next.5 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| import { AnimationPlayer, ɵStyleDataMap as _StyleDataMap, NoopAnimationPlayer } from '../../animation_player.d.js'; | ||
| import { AnimationDriver } from '../../animation_driver.d.js'; | ||
| import '@angular/core'; | ||
| /** | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare class MockAnimationDriver implements AnimationDriver { | ||
| static log: AnimationPlayer[]; | ||
| validateStyleProperty(prop: string): boolean; | ||
| validateAnimatableStyleProperty(prop: string): boolean; | ||
| containsElement(elm1: any, elm2: any): boolean; | ||
| getParentElement(element: unknown): unknown; | ||
| query(element: any, selector: string, multi: boolean): any[]; | ||
| computeStyle(element: any, prop: string, defaultValue?: string): string; | ||
| animate(element: any, keyframes: Array<_StyleDataMap>, duration: number, delay: number, easing: string, previousPlayers?: any[]): MockAnimationPlayer; | ||
| } | ||
| /** | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare class MockAnimationPlayer extends NoopAnimationPlayer { | ||
| element: any; | ||
| keyframes: Array<_StyleDataMap>; | ||
| duration: number; | ||
| delay: number; | ||
| easing: string; | ||
| previousPlayers: any[]; | ||
| private __finished; | ||
| private __started; | ||
| previousStyles: _StyleDataMap; | ||
| private _onInitFns; | ||
| currentSnapshot: _StyleDataMap; | ||
| private _keyframes; | ||
| constructor(element: any, keyframes: Array<_StyleDataMap>, duration: number, delay: number, easing: string, previousPlayers: any[]); | ||
| reset(): void; | ||
| finish(): void; | ||
| destroy(): void; | ||
| play(): void; | ||
| hasStarted(): boolean; | ||
| beforeDestroy(): void; | ||
| } | ||
| export { MockAnimationDriver, MockAnimationPlayer }; |
| /** | ||
| * @license Angular v21.0.0-next.5 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| import { validateStyleProperty, camelCaseToDashCase, validateWebAnimatableStyleProperty, containsElement, getParentElement, invokeQuery, normalizeKeyframes$1 as normalizeKeyframes, allowPreviousPlayerStylesMerge } from '../util.mjs'; | ||
| import { NoopAnimationPlayer, AUTO_STYLE } from '../private_export.mjs'; | ||
| import '@angular/core'; | ||
| /** | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| class MockAnimationDriver { | ||
| static log = []; | ||
| validateStyleProperty(prop) { | ||
| return validateStyleProperty(prop); | ||
| } | ||
| validateAnimatableStyleProperty(prop) { | ||
| const cssProp = camelCaseToDashCase(prop); | ||
| return validateWebAnimatableStyleProperty(cssProp); | ||
| } | ||
| containsElement(elm1, elm2) { | ||
| return containsElement(elm1, elm2); | ||
| } | ||
| getParentElement(element) { | ||
| return getParentElement(element); | ||
| } | ||
| query(element, selector, multi) { | ||
| return invokeQuery(element, selector, multi); | ||
| } | ||
| computeStyle(element, prop, defaultValue) { | ||
| return defaultValue || ''; | ||
| } | ||
| animate(element, keyframes, duration, delay, easing, previousPlayers = []) { | ||
| const player = new MockAnimationPlayer(element, keyframes, duration, delay, easing, previousPlayers); | ||
| MockAnimationDriver.log.push(player); | ||
| return player; | ||
| } | ||
| } | ||
| /** | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| class MockAnimationPlayer extends NoopAnimationPlayer { | ||
| element; | ||
| keyframes; | ||
| duration; | ||
| delay; | ||
| easing; | ||
| previousPlayers; | ||
| __finished = false; | ||
| __started = false; | ||
| previousStyles = new Map(); | ||
| _onInitFns = []; | ||
| currentSnapshot = new Map(); | ||
| _keyframes = []; | ||
| constructor(element, keyframes, duration, delay, easing, previousPlayers) { | ||
| super(duration, delay); | ||
| this.element = element; | ||
| this.keyframes = keyframes; | ||
| this.duration = duration; | ||
| this.delay = delay; | ||
| this.easing = easing; | ||
| this.previousPlayers = previousPlayers; | ||
| this._keyframes = normalizeKeyframes(keyframes); | ||
| if (allowPreviousPlayerStylesMerge(duration, delay)) { | ||
| previousPlayers.forEach((player) => { | ||
| if (player instanceof MockAnimationPlayer) { | ||
| const styles = player.currentSnapshot; | ||
| styles.forEach((val, prop) => this.previousStyles.set(prop, val)); | ||
| } | ||
| }); | ||
| } | ||
| } | ||
| /** @internal */ | ||
| onInit(fn) { | ||
| this._onInitFns.push(fn); | ||
| } | ||
| /** @internal */ | ||
| init() { | ||
| super.init(); | ||
| this._onInitFns.forEach((fn) => fn()); | ||
| this._onInitFns = []; | ||
| } | ||
| reset() { | ||
| super.reset(); | ||
| this.__started = false; | ||
| } | ||
| finish() { | ||
| super.finish(); | ||
| this.__finished = true; | ||
| } | ||
| destroy() { | ||
| super.destroy(); | ||
| this.__finished = true; | ||
| } | ||
| /** @internal */ | ||
| triggerMicrotask() { } | ||
| play() { | ||
| super.play(); | ||
| this.__started = true; | ||
| } | ||
| hasStarted() { | ||
| return this.__started; | ||
| } | ||
| beforeDestroy() { | ||
| const captures = new Map(); | ||
| this.previousStyles.forEach((val, prop) => captures.set(prop, val)); | ||
| if (this.hasStarted()) { | ||
| // when assembling the captured styles, it's important that | ||
| // we build the keyframe styles in the following order: | ||
| // {other styles within keyframes, ... previousStyles } | ||
| this._keyframes.forEach((kf) => { | ||
| for (let [prop, val] of kf) { | ||
| if (prop !== 'offset') { | ||
| captures.set(prop, this.__finished ? val : AUTO_STYLE); | ||
| } | ||
| } | ||
| }); | ||
| } | ||
| this.currentSnapshot = captures; | ||
| } | ||
| } | ||
| export { MockAnimationDriver, MockAnimationPlayer }; | ||
| //# sourceMappingURL=testing.mjs.map |
| {"version":3,"file":"testing.mjs","sources":["../../../../../../k8-fastbuild-ST-199a4f3c4e20/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 *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\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 *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\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;;;;AAIG;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,OAAO,gBAAgB,CAAC,OAAO,CAAC;;AAGlC,IAAA,KAAK,CAAC,OAAY,EAAE,QAAgB,EAAE,KAAc,EAAA;QAClD,OAAO,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC;;AAG9C,IAAA,YAAY,CAAC,OAAY,EAAE,IAAY,EAAE,YAAqB,EAAA;QAC5D,OAAO,YAAY,IAAI,EAAE;;AAG3B,IAAA,OAAO,CACL,OAAY,EACZ,SAA+B,EAC/B,QAAgB,EAChB,KAAa,EACb,MAAc,EACd,eAAA,GAAyB,EAAE,EAAA;AAE3B,QAAA,MAAM,MAAM,GAAG,IAAI,mBAA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,IAAI,EAAE,IAAI,CAAC,UAAU,GAAG,GAAG,GAAG,UAAU,CAAC;;;AAG5D,aAAC,CAAC;;AAGJ,QAAA,IAAI,CAAC,eAAe,GAAG,QAAQ;;AAElC;;;;"} |
| /** | ||
| * @license Angular v21.0.0-next.5 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| /** | ||
| * @description Constants for the categories of parameters that can be defined for animations. | ||
| * | ||
| * A corresponding function defines a set of parameters for each category, and | ||
| * collects them into a corresponding `AnimationMetadata` object. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| var AnimationMetadataType; | ||
| (function (AnimationMetadataType) { | ||
| /** | ||
| * Associates a named animation state with a set of CSS styles. | ||
| * See [`state()`](api/animations/state) | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["State"] = 0] = "State"; | ||
| /** | ||
| * Data for a transition from one animation state to another. | ||
| * See `transition()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Transition"] = 1] = "Transition"; | ||
| /** | ||
| * Contains a set of animation steps. | ||
| * See `sequence()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Sequence"] = 2] = "Sequence"; | ||
| /** | ||
| * Contains a set of animation steps. | ||
| * See `group()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Group"] = 3] = "Group"; | ||
| /** | ||
| * Contains an animation step. | ||
| * See `animate()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Animate"] = 4] = "Animate"; | ||
| /** | ||
| * Contains a set of animation steps. | ||
| * See `keyframes()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Keyframes"] = 5] = "Keyframes"; | ||
| /** | ||
| * Contains a set of CSS property-value pairs into a named style. | ||
| * See `style()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Style"] = 6] = "Style"; | ||
| /** | ||
| * Associates an animation with an entry trigger that can be attached to an element. | ||
| * See `trigger()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Trigger"] = 7] = "Trigger"; | ||
| /** | ||
| * Contains a re-usable animation. | ||
| * See `animation()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Reference"] = 8] = "Reference"; | ||
| /** | ||
| * Contains data to use in executing child animations returned by a query. | ||
| * See `animateChild()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["AnimateChild"] = 9] = "AnimateChild"; | ||
| /** | ||
| * Contains animation parameters for a re-usable animation. | ||
| * See `useAnimation()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["AnimateRef"] = 10] = "AnimateRef"; | ||
| /** | ||
| * Contains child-animation query data. | ||
| * See `query()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Query"] = 11] = "Query"; | ||
| /** | ||
| * Contains data for staggering an animation sequence. | ||
| * See `stagger()` | ||
| */ | ||
| AnimationMetadataType[AnimationMetadataType["Stagger"] = 12] = "Stagger"; | ||
| })(AnimationMetadataType || (AnimationMetadataType = {})); | ||
| /** | ||
| * Specifies automatic styling. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| const AUTO_STYLE = '*'; | ||
| /** | ||
| * Creates a named animation trigger, containing a list of [`state()`](api/animations/state) | ||
| * and `transition()` entries to be evaluated when the expression | ||
| * bound to the trigger changes. | ||
| * | ||
| * @param name An identifying string. | ||
| * @param definitions An animation definition object, containing an array of | ||
| * [`state()`](api/animations/state) and `transition()` declarations. | ||
| * | ||
| * @return An object that encapsulates the trigger data. | ||
| * | ||
| * @usageNotes | ||
| * Define an animation trigger in the `animations` section of `@Component` metadata. | ||
| * In the template, reference the trigger by name and bind it to a trigger expression that | ||
| * evaluates to a defined animation state, using the following format: | ||
| * | ||
| * `[@triggerName]="expression"` | ||
| * | ||
| * Animation trigger bindings convert all values to strings, and then match the | ||
| * previous and current values against any linked transitions. | ||
| * Booleans can be specified as `1` or `true` and `0` or `false`. | ||
| * | ||
| * ### Usage Example | ||
| * | ||
| * The following example creates an animation trigger reference based on the provided | ||
| * name value. | ||
| * The provided animation value is expected to be an array consisting of state and | ||
| * transition declarations. | ||
| * | ||
| * ```ts | ||
| * @Component({ | ||
| * selector: "my-component", | ||
| * templateUrl: "my-component-tpl.html", | ||
| * animations: [ | ||
| * trigger("myAnimationTrigger", [ | ||
| * state(...), | ||
| * state(...), | ||
| * transition(...), | ||
| * transition(...) | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * myStatusExp = "something"; | ||
| * } | ||
| * ``` | ||
| * | ||
| * The template associated with this component makes use of the defined trigger | ||
| * by binding to an element within its template code. | ||
| * | ||
| * ```html | ||
| * <!-- somewhere inside of my-component-tpl.html --> | ||
| * <div [@myAnimationTrigger]="myStatusExp">...</div> | ||
| * ``` | ||
| * | ||
| * ### Using an inline function | ||
| * The `transition` animation method also supports reading an inline function which can decide | ||
| * if its associated animation should be run. | ||
| * | ||
| * ```ts | ||
| * // this method is run each time the `myAnimationTrigger` trigger value changes. | ||
| * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key: | ||
| string]: any}): boolean { | ||
| * // notice that `element` and `params` are also available here | ||
| * return toState == 'yes-please-animate'; | ||
| * } | ||
| * | ||
| * @Component({ | ||
| * selector: 'my-component', | ||
| * templateUrl: 'my-component-tpl.html', | ||
| * animations: [ | ||
| * trigger('myAnimationTrigger', [ | ||
| * transition(myInlineMatcherFn, [ | ||
| * // the animation sequence code | ||
| * ]), | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * myStatusExp = "yes-please-animate"; | ||
| * } | ||
| * ``` | ||
| * | ||
| * ### Disabling Animations | ||
| * When true, the special animation control binding `@.disabled` binding prevents | ||
| * all animations from rendering. | ||
| * Place the `@.disabled` binding on an element to disable | ||
| * animations on the element itself, as well as any inner animation triggers | ||
| * within the element. | ||
| * | ||
| * The following example shows how to use this feature: | ||
| * | ||
| * ```angular-ts | ||
| * @Component({ | ||
| * selector: 'my-component', | ||
| * template: ` | ||
| * <div [@.disabled]="isDisabled"> | ||
| * <div [@childAnimation]="exp"></div> | ||
| * </div> | ||
| * `, | ||
| * animations: [ | ||
| * trigger("childAnimation", [ | ||
| * // ... | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * isDisabled = true; | ||
| * exp = '...'; | ||
| * } | ||
| * ``` | ||
| * | ||
| * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating, | ||
| * along with any inner animations. | ||
| * | ||
| * ### Disable animations application-wide | ||
| * When an area of the template is set to have animations disabled, | ||
| * **all** inner components have their animations disabled as well. | ||
| * This means that you can disable all animations for an app | ||
| * by placing a host binding set on `@.disabled` on the topmost Angular component. | ||
| * | ||
| * ```ts | ||
| * import {Component, HostBinding} from '@angular/core'; | ||
| * | ||
| * @Component({ | ||
| * selector: 'app-component', | ||
| * templateUrl: 'app.component.html', | ||
| * }) | ||
| * class AppComponent { | ||
| * @HostBinding('@.disabled') | ||
| * public animationsDisabled = true; | ||
| * } | ||
| * ``` | ||
| * | ||
| * ### Overriding disablement of inner animations | ||
| * Despite inner animations being disabled, a parent animation can `query()` | ||
| * for inner elements located in disabled areas of the template and still animate | ||
| * them if needed. This is also the case for when a sub animation is | ||
| * queried by a parent and then later animated using `animateChild()`. | ||
| * | ||
| * ### Detecting when an animation is disabled | ||
| * If a region of the DOM (or the entire application) has its animations disabled, the animation | ||
| * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides | ||
| * an instance of an `AnimationEvent`. If animations are disabled, | ||
| * the `.disabled` flag on the event is true. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function trigger(name, definitions) { | ||
| return { type: AnimationMetadataType.Trigger, name, definitions, options: {} }; | ||
| } | ||
| /** | ||
| * Defines an animation step that combines styling information with timing information. | ||
| * | ||
| * @param timings Sets `AnimateTimings` for the parent animation. | ||
| * A string in the format "duration [delay] [easing]". | ||
| * - Duration and delay are expressed as a number and optional time unit, | ||
| * such as "1s" or "10ms" for one second and 10 milliseconds, respectively. | ||
| * The default unit is milliseconds. | ||
| * - The easing value controls how the animation accelerates and decelerates | ||
| * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`, | ||
| * `ease-in-out`, or a `cubic-bezier()` function call. | ||
| * If not supplied, no easing is applied. | ||
| * | ||
| * For example, the string "1s 100ms ease-out" specifies a duration of | ||
| * 1000 milliseconds, and delay of 100 ms, and the "ease-out" easing style, | ||
| * which decelerates near the end of the duration. | ||
| * @param styles Sets AnimationStyles for the parent animation. | ||
| * A function call to either `style()` or `keyframes()` | ||
| * that returns a collection of CSS style entries to be applied to the parent animation. | ||
| * When null, uses the styles from the destination state. | ||
| * This is useful when describing an animation step that will complete an animation; | ||
| * see "Animating to the final state" in `transitions()`. | ||
| * @returns An object that encapsulates the animation step. | ||
| * | ||
| * @usageNotes | ||
| * Call within an animation `sequence()`, {@link /api/animations/group group()}, or | ||
| * `transition()` call to specify an animation step | ||
| * that applies given style data to the parent animation for a given amount of time. | ||
| * | ||
| * ### Syntax Examples | ||
| * **Timing examples** | ||
| * | ||
| * The following examples show various `timings` specifications. | ||
| * - `animate(500)` : Duration is 500 milliseconds. | ||
| * - `animate("1s")` : Duration is 1000 milliseconds. | ||
| * - `animate("100ms 0.5s")` : Duration is 100 milliseconds, delay is 500 milliseconds. | ||
| * - `animate("5s ease-in")` : Duration is 5000 milliseconds, easing in. | ||
| * - `animate("5s 10ms cubic-bezier(.17,.67,.88,.1)")` : Duration is 5000 milliseconds, delay is 10 | ||
| * milliseconds, easing according to a bezier curve. | ||
| * | ||
| * **Style examples** | ||
| * | ||
| * The following example calls `style()` to set a single CSS style. | ||
| * ```ts | ||
| * animate(500, style({ background: "red" })) | ||
| * ``` | ||
| * The following example calls `keyframes()` to set a CSS style | ||
| * to different values for successive keyframes. | ||
| * ```ts | ||
| * animate(500, keyframes( | ||
| * [ | ||
| * style({ background: "blue" }), | ||
| * style({ background: "red" }) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function animate(timings, styles = null) { | ||
| return { type: AnimationMetadataType.Animate, styles, timings }; | ||
| } | ||
| /** | ||
| * @description Defines a list of animation steps to be run in parallel. | ||
| * | ||
| * @param steps An array of animation step objects. | ||
| * - When steps are defined by `style()` or `animate()` | ||
| * function calls, each call within the group is executed instantly. | ||
| * - To specify offset styles to be applied at a later time, define steps with | ||
| * `keyframes()`, or use `animate()` calls with a delay value. | ||
| * For example: | ||
| * | ||
| * ```ts | ||
| * group([ | ||
| * animate("1s", style({ background: "black" })), | ||
| * animate("2s", style({ color: "white" })) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @param options An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. | ||
| * | ||
| * @return An object that encapsulates the group data. | ||
| * | ||
| * @usageNotes | ||
| * Grouped animations are useful when a series of styles must be | ||
| * animated at different starting times and closed off at different ending times. | ||
| * | ||
| * When called within a `sequence()` or a | ||
| * `transition()` call, does not continue to the next | ||
| * instruction until all of the inner animation steps have completed. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function group(steps, options = null) { | ||
| return { type: AnimationMetadataType.Group, steps, options }; | ||
| } | ||
| /** | ||
| * Defines a list of animation steps to be run sequentially, one by one. | ||
| * | ||
| * @param steps An array of animation step objects. | ||
| * - Steps defined by `style()` calls apply the styling data immediately. | ||
| * - Steps defined by `animate()` calls apply the styling data over time | ||
| * as specified by the timing data. | ||
| * | ||
| * ```ts | ||
| * sequence([ | ||
| * style({ opacity: 0 }), | ||
| * animate("1s", style({ opacity: 1 })) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @param options An options object containing a delay and | ||
| * developer-defined parameters that provide styling defaults and | ||
| * can be overridden on invocation. | ||
| * | ||
| * @return An object that encapsulates the sequence data. | ||
| * | ||
| * @usageNotes | ||
| * When you pass an array of steps to a | ||
| * `transition()` call, the steps run sequentially by default. | ||
| * Compare this to the {@link /api/animations/group group()} call, which runs animation steps in | ||
| *parallel. | ||
| * | ||
| * When a sequence is used within a {@link /api/animations/group group()} or a `transition()` call, | ||
| * execution continues to the next instruction only after each of the inner animation | ||
| * steps have completed. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| function sequence(steps, options = null) { | ||
| return { type: AnimationMetadataType.Sequence, steps, options }; | ||
| } | ||
| /** | ||
| * Declares a key/value object containing CSS properties/styles that | ||
| * can then be used for an animation [`state`](api/animations/state), within an animation | ||
| *`sequence`, or as styling data for calls to `animate()` and `keyframes()`. | ||
| * | ||
| * @param tokens A set of CSS styles or HTML styles associated with an animation state. | ||
| * The value can be any of the following: | ||
| * - A key-value style pair associating a CSS property with a value. | ||
| * - An array of key-value style pairs. | ||
| * - An asterisk (*), to use auto-styling, where styles are derived from the element | ||
| * being animated and applied to the animation when it starts. | ||
| * | ||
| * Auto-styling can be used to define a state that depends on layout or other | ||
| * environmental factors. | ||
| * | ||
| * @return An object that encapsulates the style data. | ||
| * | ||
| * @usageNotes | ||
| * The following examples create animation styles that collect a set of | ||
| * CSS property values: | ||
| * | ||
| * ```ts | ||
| * // string values for CSS properties | ||
| * style({ background: "red", color: "blue" }) | ||
| * | ||
| * // numerical pixel values | ||
| * style({ width: 100, height: 0 }) | ||
| * ``` | ||
| * | ||
| * The following example uses auto-styling to allow an element to animate from | ||
| * a height of 0 up to its full height: | ||
| * | ||
| * ```ts | ||
| * style({ height: 0 }), | ||
| * animate("1s", style({ height: "*" })) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| function style(tokens) { | ||
| return { type: AnimationMetadataType.Style, styles: tokens, offset: null }; | ||
| } | ||
| /** | ||
| * Declares an animation state within a trigger attached to an element. | ||
| * | ||
| * @param name One or more names for the defined state in a comma-separated string. | ||
| * The following reserved state names can be supplied to define a style for specific use | ||
| * cases: | ||
| * | ||
| * - `void` You can associate styles with this name to be used when | ||
| * the element is detached from the application. For example, when an `ngIf` evaluates | ||
| * to false, the state of the associated element is void. | ||
| * - `*` (asterisk) Indicates the default state. You can associate styles with this name | ||
| * to be used as the fallback when the state that is being animated is not declared | ||
| * within the trigger. | ||
| * | ||
| * @param styles A set of CSS styles associated with this state, created using the | ||
| * `style()` function. | ||
| * This set of styles persists on the element once the state has been reached. | ||
| * @param options Parameters that can be passed to the state when it is invoked. | ||
| * 0 or more key-value pairs. | ||
| * @return An object that encapsulates the new state data. | ||
| * | ||
| * @usageNotes | ||
| * Use the `trigger()` function to register states to an animation trigger. | ||
| * Use the `transition()` function to animate between states. | ||
| * When a state is active within a component, its associated styles persist on the element, | ||
| * even when the animation ends. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| function state(name, styles, options) { | ||
| return { type: AnimationMetadataType.State, name, styles, options }; | ||
| } | ||
| /** | ||
| * Defines a set of animation styles, associating each style with an optional `offset` value. | ||
| * | ||
| * @param steps A set of animation styles with optional offset data. | ||
| * The optional `offset` value for a style specifies a percentage of the total animation | ||
| * time at which that style is applied. | ||
| * @returns An object that encapsulates the keyframes data. | ||
| * | ||
| * @usageNotes | ||
| * Use with the `animate()` call. Instead of applying animations | ||
| * from the current state | ||
| * to the destination state, keyframes describe how each style entry is applied and at what point | ||
| * within the animation arc. | ||
| * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp). | ||
| * | ||
| * ### Usage | ||
| * | ||
| * In the following example, the offset values describe | ||
| * when each `backgroundColor` value is applied. The color is red at the start, and changes to | ||
| * blue when 20% of the total time has elapsed. | ||
| * | ||
| * ```ts | ||
| * // the provided offset values | ||
| * animate("5s", keyframes([ | ||
| * style({ backgroundColor: "red", offset: 0 }), | ||
| * style({ backgroundColor: "blue", offset: 0.2 }), | ||
| * style({ backgroundColor: "orange", offset: 0.3 }), | ||
| * style({ backgroundColor: "black", offset: 1 }) | ||
| * ])) | ||
| * ``` | ||
| * | ||
| * If there are no `offset` values specified in the style entries, the offsets | ||
| * are calculated automatically. | ||
| * | ||
| * ```ts | ||
| * animate("5s", keyframes([ | ||
| * style({ backgroundColor: "red" }) // offset = 0 | ||
| * style({ backgroundColor: "blue" }) // offset = 0.33 | ||
| * style({ backgroundColor: "orange" }) // offset = 0.66 | ||
| * style({ backgroundColor: "black" }) // offset = 1 | ||
| * ])) | ||
| *``` | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function keyframes(steps) { | ||
| return { type: AnimationMetadataType.Keyframes, steps }; | ||
| } | ||
| /** | ||
| * Declares an animation transition which is played when a certain specified condition is met. | ||
| * | ||
| * @param stateChangeExpr A string with a specific format or a function that specifies when the | ||
| * animation transition should occur (see [State Change Expression](#state-change-expression)). | ||
| * | ||
| * @param steps One or more animation objects that represent the animation's instructions. | ||
| * | ||
| * @param options An options object that can be used to specify a delay for the animation or provide | ||
| * custom parameters for it. | ||
| * | ||
| * @returns An object that encapsulates the transition data. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * ### State Change Expression | ||
| * | ||
| * The State Change Expression instructs Angular when to run the transition's animations, it can | ||
| *either be | ||
| * - a string with a specific syntax | ||
| * - or a function that compares the previous and current state (value of the expression bound to | ||
| * the element's trigger) and returns `true` if the transition should occur or `false` otherwise | ||
| * | ||
| * The string format can be: | ||
| * - `fromState => toState`, which indicates that the transition's animations should occur then the | ||
| * expression bound to the trigger's element goes from `fromState` to `toState` | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition('open => closed', animate('.5s ease-out', style({ height: 0 }) )) | ||
| * ``` | ||
| * | ||
| * - `fromState <=> toState`, which indicates that the transition's animations should occur then | ||
| * the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)')) | ||
| * ``` | ||
| * | ||
| * - `:enter`/`:leave`, which indicates that the transition's animations should occur when the | ||
| * element enters or exists the DOM | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition(':enter', [ | ||
| * style({ opacity: 0 }), | ||
| * animate('500ms', style({ opacity: 1 })) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * - `:increment`/`:decrement`, which indicates that the transition's animations should occur when | ||
| * the numerical expression bound to the trigger's element has increased in value or decreased | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition(':increment', query('@counter', animateChild())) | ||
| * ``` | ||
| * | ||
| * - a sequence of any of the above divided by commas, which indicates that transition's animations | ||
| * should occur whenever one of the state change expressions matches | ||
| * | ||
| * _Example:_ | ||
| * ```ts | ||
| * transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([ | ||
| * style({ transform: 'scale(1)', offset: 0}), | ||
| * style({ transform: 'scale(1.1)', offset: 0.7}), | ||
| * style({ transform: 'scale(1)', offset: 1}) | ||
| * ]))), | ||
| * ``` | ||
| * | ||
| * Also note that in such context: | ||
| * - `void` can be used to indicate the absence of the element | ||
| * - asterisks can be used as wildcards that match any state | ||
| * - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is | ||
| * equivalent to `:leave`) | ||
| * - `true` and `false` also match expression values of `1` and `0` respectively (but do not match | ||
| * _truthy_ and _falsy_ values) | ||
| * | ||
| * <div class="docs-alert docs-alert-helpful"> | ||
| * | ||
| * Be careful about entering end leaving elements as their transitions present a common | ||
| * pitfall for developers. | ||
| * | ||
| * Note that when an element with a trigger enters the DOM its `:enter` transition always | ||
| * gets executed, but its `:leave` transition will not be executed if the element is removed | ||
| * alongside its parent (as it will be removed "without warning" before its transition has | ||
| * a chance to be executed, the only way that such transition can occur is if the element | ||
| * is exiting the DOM on its own). | ||
| * | ||
| * | ||
| * </div> | ||
| * | ||
| * ### Animating to a Final State | ||
| * | ||
| * If the final step in a transition is a call to `animate()` that uses a timing value | ||
| * with no `style` data, that step is automatically considered the final animation arc, | ||
| * for the element to reach the final state, in such case Angular automatically adds or removes | ||
| * CSS styles to ensure that the element is in the correct final state. | ||
| * | ||
| * | ||
| * ### Usage Examples | ||
| * | ||
| * - Transition animations applied based on | ||
| * the trigger's expression value | ||
| * | ||
| * ```html | ||
| * <div [@myAnimationTrigger]="myStatusExp"> | ||
| * ... | ||
| * </div> | ||
| * ``` | ||
| * | ||
| * ```ts | ||
| * trigger("myAnimationTrigger", [ | ||
| * ..., // states | ||
| * transition("on => off, open => closed", animate(500)), | ||
| * transition("* <=> error", query('.indicator', animateChild())) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * - Transition animations applied based on custom logic dependent | ||
| * on the trigger's expression value and provided parameters | ||
| * | ||
| * ```html | ||
| * <div [@myAnimationTrigger]="{ | ||
| * value: stepName, | ||
| * params: { target: currentTarget } | ||
| * }"> | ||
| * ... | ||
| * </div> | ||
| * ``` | ||
| * | ||
| * ```ts | ||
| * trigger("myAnimationTrigger", [ | ||
| * ..., // states | ||
| * transition( | ||
| * (fromState, toState, _element, params) => | ||
| * ['firststep', 'laststep'].includes(fromState.toLowerCase()) | ||
| * && toState === params?.['target'], | ||
| * animate('1s') | ||
| * ) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| **/ | ||
| function transition(stateChangeExpr, steps, options = null) { | ||
| return { type: AnimationMetadataType.Transition, expr: stateChangeExpr, animation: steps, options }; | ||
| } | ||
| /** | ||
| * Produces a reusable animation that can be invoked in another animation or sequence, | ||
| * by calling the `useAnimation()` function. | ||
| * | ||
| * @param steps One or more animation objects, as returned by the `animate()` | ||
| * or `sequence()` function, that form a transformation from one state to another. | ||
| * A sequence is used by default when you pass an array. | ||
| * @param options An options object that can contain a delay value for the start of the | ||
| * animation, and additional developer-defined parameters. | ||
| * Provided values for additional parameters are used as defaults, | ||
| * and override values can be passed to the caller on invocation. | ||
| * @returns An object that encapsulates the animation data. | ||
| * | ||
| * @usageNotes | ||
| * The following example defines a reusable animation, providing some default parameter | ||
| * values. | ||
| * | ||
| * ```ts | ||
| * var fadeAnimation = animation([ | ||
| * style({ opacity: '{{ start }}' }), | ||
| * animate('{{ time }}', | ||
| * style({ opacity: '{{ end }}'})) | ||
| * ], | ||
| * { params: { time: '1000ms', start: 0, end: 1 }}); | ||
| * ``` | ||
| * | ||
| * The following invokes the defined animation with a call to `useAnimation()`, | ||
| * passing in override parameter values. | ||
| * | ||
| * ```js | ||
| * useAnimation(fadeAnimation, { | ||
| * params: { | ||
| * time: '2s', | ||
| * start: 1, | ||
| * end: 0 | ||
| * } | ||
| * }) | ||
| * ``` | ||
| * | ||
| * If any of the passed-in parameter values are missing from this call, | ||
| * the default values are used. If one or more parameter values are missing before a step is | ||
| * animated, `useAnimation()` throws an error. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function animation(steps, options = null) { | ||
| return { type: AnimationMetadataType.Reference, animation: steps, options }; | ||
| } | ||
| /** | ||
| * Executes a queried inner animation element within an animation sequence. | ||
| * | ||
| * @param options An options object that can contain a delay value for the start of the | ||
| * animation, and additional override values for developer-defined parameters. | ||
| * @return An object that encapsulates the child animation data. | ||
| * | ||
| * @usageNotes | ||
| * Each time an animation is triggered in Angular, the parent animation | ||
| * has priority and any child animations are blocked. In order | ||
| * for a child animation to run, the parent animation must query each of the elements | ||
| * containing child animations, and run them using this function. | ||
| * | ||
| * Note that this feature is designed to be used with `query()` and it will only work | ||
| * with animations that are assigned using the Angular animation library. CSS keyframes | ||
| * and transitions are not handled by this API. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function animateChild(options = null) { | ||
| return { type: AnimationMetadataType.AnimateChild, options }; | ||
| } | ||
| /** | ||
| * Starts a reusable animation that is created using the `animation()` function. | ||
| * | ||
| * @param animation The reusable animation to start. | ||
| * @param options An options object that can contain a delay value for the start of | ||
| * the animation, and additional override values for developer-defined parameters. | ||
| * @return An object that contains the animation parameters. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function useAnimation(animation, options = null) { | ||
| return { type: AnimationMetadataType.AnimateRef, animation, options }; | ||
| } | ||
| /** | ||
| * Finds one or more inner elements within the current element that is | ||
| * being animated within a sequence. Use with `animate()`. | ||
| * | ||
| * @param selector The element to query, or a set of elements that contain Angular-specific | ||
| * characteristics, specified with one or more of the following tokens. | ||
| * - `query(":enter")` or `query(":leave")` : Query for newly inserted/removed elements (not | ||
| * all elements can be queried via these tokens, see | ||
| * [Entering and Leaving Elements](#entering-and-leaving-elements)) | ||
| * - `query(":animating")` : Query all currently animating elements. | ||
| * - `query("@triggerName")` : Query elements that contain an animation trigger. | ||
| * - `query("@*")` : Query all elements that contain an animation triggers. | ||
| * - `query(":self")` : Include the current element into the animation sequence. | ||
| * | ||
| * @param animation One or more animation steps to apply to the queried element or elements. | ||
| * An array is treated as an animation sequence. | ||
| * @param options An options object. Use the 'limit' field to limit the total number of | ||
| * items to collect. | ||
| * @return An object that encapsulates the query data. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * ### Multiple Tokens | ||
| * | ||
| * Tokens can be merged into a combined query selector string. For example: | ||
| * | ||
| * ```ts | ||
| * query(':self, .record:enter, .record:leave, @subTrigger', [...]) | ||
| * ``` | ||
| * | ||
| * The `query()` function collects multiple elements and works internally by using | ||
| * `element.querySelectorAll`. Use the `limit` field of an options object to limit | ||
| * the total number of items to be collected. For example: | ||
| * | ||
| * ```js | ||
| * query('div', [ | ||
| * animate(...), | ||
| * animate(...) | ||
| * ], { limit: 1 }) | ||
| * ``` | ||
| * | ||
| * By default, throws an error when zero items are found. Set the | ||
| * `optional` flag to ignore this error. For example: | ||
| * | ||
| * ```js | ||
| * query('.some-element-that-may-not-be-there', [ | ||
| * animate(...), | ||
| * animate(...) | ||
| * ], { optional: true }) | ||
| * ``` | ||
| * | ||
| * ### Entering and Leaving Elements | ||
| * | ||
| * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones | ||
| * that can are those that Angular assumes can enter/leave based on their own logic | ||
| * (if their insertion/removal is simply a consequence of that of their parent they | ||
| * should be queried via a different token in their parent's `:enter`/`:leave` transitions). | ||
| * | ||
| * The only elements Angular assumes can enter/leave based on their own logic (thus the only | ||
| * ones that can be queried via the `:enter` and `:leave` tokens) are: | ||
| * - Those inserted dynamically (via `ViewContainerRef`) | ||
| * - Those that have a structural directive (which, under the hood, are a subset of the above ones) | ||
| * | ||
| * <div class="docs-alert docs-alert-helpful"> | ||
| * | ||
| * Note that elements will be successfully queried via `:enter`/`:leave` even if their | ||
| * insertion/removal is not done manually via `ViewContainerRef`or caused by their structural | ||
| * directive (e.g. they enter/exit alongside their parent). | ||
| * | ||
| * </div> | ||
| * | ||
| * <div class="docs-alert docs-alert-important"> | ||
| * | ||
| * There is an exception to what previously mentioned, besides elements entering/leaving based on | ||
| * their own logic, elements with an animation trigger can always be queried via `:leave` when | ||
| * their parent is also leaving. | ||
| * | ||
| * </div> | ||
| * | ||
| * ### Usage Example | ||
| * | ||
| * The following example queries for inner elements and animates them | ||
| * individually using `animate()`. | ||
| * | ||
| * ```angular-ts | ||
| * @Component({ | ||
| * selector: 'inner', | ||
| * template: ` | ||
| * <div [@queryAnimation]="exp"> | ||
| * <h1>Title</h1> | ||
| * <div class="content"> | ||
| * Blah blah blah | ||
| * </div> | ||
| * </div> | ||
| * `, | ||
| * animations: [ | ||
| * trigger('queryAnimation', [ | ||
| * transition('* => goAnimate', [ | ||
| * // hide the inner elements | ||
| * query('h1', style({ opacity: 0 })), | ||
| * query('.content', style({ opacity: 0 })), | ||
| * | ||
| * // animate the inner elements in, one by one | ||
| * query('h1', animate(1000, style({ opacity: 1 }))), | ||
| * query('.content', animate(1000, style({ opacity: 1 }))), | ||
| * ]) | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class Cmp { | ||
| * exp = ''; | ||
| * | ||
| * goAnimate() { | ||
| * this.exp = 'goAnimate'; | ||
| * } | ||
| * } | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function query(selector, animation, options = null) { | ||
| return { type: AnimationMetadataType.Query, selector, animation, options }; | ||
| } | ||
| /** | ||
| * Use within an animation `query()` call to issue a timing gap after | ||
| * each queried item is animated. | ||
| * | ||
| * @param timings A delay value. | ||
| * @param animation One ore more animation steps. | ||
| * @returns An object that encapsulates the stagger data. | ||
| * | ||
| * @usageNotes | ||
| * In the following example, a container element wraps a list of items stamped out | ||
| * by an `@for` block. The container element contains an animation trigger that will later be set | ||
| * to query for each of the inner items. | ||
| * | ||
| * Each time items are added, the opacity fade-in animation runs, | ||
| * and each removed item is faded out. | ||
| * When either of these animations occur, the stagger effect is | ||
| * applied after each item's animation is started. | ||
| * | ||
| * ```html | ||
| * <!-- list.component.html --> | ||
| * <button (click)="toggle()">Show / Hide Items</button> | ||
| * <hr /> | ||
| * <div [@listAnimation]="items.length"> | ||
| * @for(item of items; track $index) { | ||
| * <div>{{ item }}</div> | ||
| * } | ||
| * </div> | ||
| * ``` | ||
| * | ||
| * Here is the component code: | ||
| * | ||
| * ```ts | ||
| * import {trigger, transition, style, animate, query, stagger} from '@angular/animations'; | ||
| * @Component({ | ||
| * templateUrl: 'list.component.html', | ||
| * animations: [ | ||
| * trigger('listAnimation', [ | ||
| * ... | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class ListComponent { | ||
| * items = []; | ||
| * | ||
| * showItems() { | ||
| * this.items = [0,1,2,3,4]; | ||
| * } | ||
| * | ||
| * hideItems() { | ||
| * this.items = []; | ||
| * } | ||
| * | ||
| * toggle() { | ||
| * this.items.length ? this.hideItems() : this.showItems(); | ||
| * } | ||
| * } | ||
| * ``` | ||
| * | ||
| * Here is the animation trigger code: | ||
| * | ||
| * ```ts | ||
| * trigger('listAnimation', [ | ||
| * transition('* => *', [ // each time the binding value changes | ||
| * query(':leave', [ | ||
| * stagger(100, [ | ||
| * animate('0.5s', style({ opacity: 0 })) | ||
| * ]) | ||
| * ]), | ||
| * query(':enter', [ | ||
| * style({ opacity: 0 }), | ||
| * stagger(100, [ | ||
| * animate('0.5s', style({ opacity: 1 })) | ||
| * ]) | ||
| * ]) | ||
| * ]) | ||
| * ]) | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function stagger(timings, animation) { | ||
| return { type: AnimationMetadataType.Stagger, timings, animation }; | ||
| } | ||
| /** | ||
| * An empty programmatic controller for reusable animations. | ||
| * Used internally when animations are disabled, to avoid | ||
| * checking for the null case when an animation player is expected. | ||
| * | ||
| * @see {@link animate} | ||
| * @see {@link AnimationPlayer} | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| class NoopAnimationPlayer { | ||
| _onDoneFns = []; | ||
| _onStartFns = []; | ||
| _onDestroyFns = []; | ||
| _originalOnDoneFns = []; | ||
| _originalOnStartFns = []; | ||
| _started = false; | ||
| _destroyed = false; | ||
| _finished = false; | ||
| _position = 0; | ||
| parentPlayer = null; | ||
| totalTime; | ||
| constructor(duration = 0, delay = 0) { | ||
| this.totalTime = duration + delay; | ||
| } | ||
| _onFinish() { | ||
| if (!this._finished) { | ||
| this._finished = true; | ||
| this._onDoneFns.forEach((fn) => fn()); | ||
| this._onDoneFns = []; | ||
| } | ||
| } | ||
| onStart(fn) { | ||
| this._originalOnStartFns.push(fn); | ||
| this._onStartFns.push(fn); | ||
| } | ||
| onDone(fn) { | ||
| this._originalOnDoneFns.push(fn); | ||
| this._onDoneFns.push(fn); | ||
| } | ||
| onDestroy(fn) { | ||
| this._onDestroyFns.push(fn); | ||
| } | ||
| hasStarted() { | ||
| return this._started; | ||
| } | ||
| init() { } | ||
| play() { | ||
| if (!this.hasStarted()) { | ||
| this._onStart(); | ||
| this.triggerMicrotask(); | ||
| } | ||
| this._started = true; | ||
| } | ||
| /** @internal */ | ||
| triggerMicrotask() { | ||
| queueMicrotask(() => this._onFinish()); | ||
| } | ||
| _onStart() { | ||
| this._onStartFns.forEach((fn) => fn()); | ||
| this._onStartFns = []; | ||
| } | ||
| pause() { } | ||
| restart() { } | ||
| finish() { | ||
| this._onFinish(); | ||
| } | ||
| destroy() { | ||
| if (!this._destroyed) { | ||
| this._destroyed = true; | ||
| if (!this.hasStarted()) { | ||
| this._onStart(); | ||
| } | ||
| this.finish(); | ||
| this._onDestroyFns.forEach((fn) => fn()); | ||
| this._onDestroyFns = []; | ||
| } | ||
| } | ||
| reset() { | ||
| this._started = false; | ||
| this._finished = false; | ||
| this._onStartFns = this._originalOnStartFns; | ||
| this._onDoneFns = this._originalOnDoneFns; | ||
| } | ||
| setPosition(position) { | ||
| this._position = this.totalTime ? position * this.totalTime : 1; | ||
| } | ||
| getPosition() { | ||
| return this.totalTime ? this._position / this.totalTime : 1; | ||
| } | ||
| /** @internal */ | ||
| triggerCallback(phaseName) { | ||
| const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns; | ||
| methods.forEach((fn) => fn()); | ||
| methods.length = 0; | ||
| } | ||
| } | ||
| /** | ||
| * A programmatic controller for a group of reusable animations. | ||
| * Used internally to control animations. | ||
| * | ||
| * @see {@link AnimationPlayer} | ||
| * @see {@link animations/group group} | ||
| * | ||
| */ | ||
| class AnimationGroupPlayer { | ||
| _onDoneFns = []; | ||
| _onStartFns = []; | ||
| _finished = false; | ||
| _started = false; | ||
| _destroyed = false; | ||
| _onDestroyFns = []; | ||
| parentPlayer = null; | ||
| totalTime = 0; | ||
| players; | ||
| constructor(_players) { | ||
| this.players = _players; | ||
| let doneCount = 0; | ||
| let destroyCount = 0; | ||
| let startCount = 0; | ||
| const total = this.players.length; | ||
| if (total == 0) { | ||
| queueMicrotask(() => this._onFinish()); | ||
| } | ||
| else { | ||
| this.players.forEach((player) => { | ||
| player.onDone(() => { | ||
| if (++doneCount == total) { | ||
| this._onFinish(); | ||
| } | ||
| }); | ||
| player.onDestroy(() => { | ||
| if (++destroyCount == total) { | ||
| this._onDestroy(); | ||
| } | ||
| }); | ||
| player.onStart(() => { | ||
| if (++startCount == total) { | ||
| this._onStart(); | ||
| } | ||
| }); | ||
| }); | ||
| } | ||
| this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0); | ||
| } | ||
| _onFinish() { | ||
| if (!this._finished) { | ||
| this._finished = true; | ||
| this._onDoneFns.forEach((fn) => fn()); | ||
| this._onDoneFns = []; | ||
| } | ||
| } | ||
| init() { | ||
| this.players.forEach((player) => player.init()); | ||
| } | ||
| onStart(fn) { | ||
| this._onStartFns.push(fn); | ||
| } | ||
| _onStart() { | ||
| if (!this.hasStarted()) { | ||
| this._started = true; | ||
| this._onStartFns.forEach((fn) => fn()); | ||
| this._onStartFns = []; | ||
| } | ||
| } | ||
| onDone(fn) { | ||
| this._onDoneFns.push(fn); | ||
| } | ||
| onDestroy(fn) { | ||
| this._onDestroyFns.push(fn); | ||
| } | ||
| hasStarted() { | ||
| return this._started; | ||
| } | ||
| play() { | ||
| if (!this.parentPlayer) { | ||
| this.init(); | ||
| } | ||
| this._onStart(); | ||
| this.players.forEach((player) => player.play()); | ||
| } | ||
| pause() { | ||
| this.players.forEach((player) => player.pause()); | ||
| } | ||
| restart() { | ||
| this.players.forEach((player) => player.restart()); | ||
| } | ||
| finish() { | ||
| this._onFinish(); | ||
| this.players.forEach((player) => player.finish()); | ||
| } | ||
| destroy() { | ||
| this._onDestroy(); | ||
| } | ||
| _onDestroy() { | ||
| if (!this._destroyed) { | ||
| this._destroyed = true; | ||
| this._onFinish(); | ||
| this.players.forEach((player) => player.destroy()); | ||
| this._onDestroyFns.forEach((fn) => fn()); | ||
| this._onDestroyFns = []; | ||
| } | ||
| } | ||
| reset() { | ||
| this.players.forEach((player) => player.reset()); | ||
| this._destroyed = false; | ||
| this._finished = false; | ||
| this._started = false; | ||
| } | ||
| setPosition(p) { | ||
| const timeAtPosition = p * this.totalTime; | ||
| this.players.forEach((player) => { | ||
| const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1; | ||
| player.setPosition(position); | ||
| }); | ||
| } | ||
| getPosition() { | ||
| const longestPlayer = this.players.reduce((longestSoFar, player) => { | ||
| const newPlayerIsLongest = longestSoFar === null || player.totalTime > longestSoFar.totalTime; | ||
| return newPlayerIsLongest ? player : longestSoFar; | ||
| }, null); | ||
| return longestPlayer != null ? longestPlayer.getPosition() : 0; | ||
| } | ||
| beforeDestroy() { | ||
| this.players.forEach((player) => { | ||
| if (player.beforeDestroy) { | ||
| player.beforeDestroy(); | ||
| } | ||
| }); | ||
| } | ||
| /** @internal */ | ||
| triggerCallback(phaseName) { | ||
| const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns; | ||
| methods.forEach((fn) => fn()); | ||
| methods.length = 0; | ||
| } | ||
| } | ||
| const ɵPRE_STYLE = '!'; | ||
| export { AUTO_STYLE, AnimationGroupPlayer, AnimationMetadataType, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, ɵPRE_STYLE }; | ||
| //# sourceMappingURL=private_export.mjs.map |
Sorry, the diff of this file is too big to display
| /** | ||
| * @license Angular v21.0.0-next.5 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| import { AnimationGroupPlayer, NoopAnimationPlayer, AUTO_STYLE, ɵPRE_STYLE as _PRE_STYLE, AnimationMetadataType, sequence } from './private_export.mjs'; | ||
| import { ɵRuntimeError as _RuntimeError } from '@angular/core'; | ||
| const LINE_START = '\n - '; | ||
| function invalidTimingValue(exp) { | ||
| return new _RuntimeError(3000 /* RuntimeErrorCode.INVALID_TIMING_VALUE */, ngDevMode && `The provided timing value "${exp}" is invalid.`); | ||
| } | ||
| function negativeStepValue() { | ||
| return new _RuntimeError(3100 /* RuntimeErrorCode.NEGATIVE_STEP_VALUE */, ngDevMode && 'Duration values below 0 are not allowed for this animation step.'); | ||
| } | ||
| function negativeDelayValue() { | ||
| return new _RuntimeError(3101 /* RuntimeErrorCode.NEGATIVE_DELAY_VALUE */, ngDevMode && 'Delay values below 0 are not allowed for this animation step.'); | ||
| } | ||
| function invalidStyleParams(varName) { | ||
| return new _RuntimeError(3001 /* RuntimeErrorCode.INVALID_STYLE_PARAMS */, ngDevMode && | ||
| `Unable to resolve the local animation param ${varName} in the given list of values`); | ||
| } | ||
| function invalidParamValue(varName) { | ||
| return new _RuntimeError(3003 /* RuntimeErrorCode.INVALID_PARAM_VALUE */, ngDevMode && `Please provide a value for the animation param ${varName}`); | ||
| } | ||
| function invalidNodeType(nodeType) { | ||
| return new _RuntimeError(3004 /* RuntimeErrorCode.INVALID_NODE_TYPE */, ngDevMode && `Unable to resolve animation metadata node #${nodeType}`); | ||
| } | ||
| function invalidCssUnitValue(userProvidedProperty, value) { | ||
| return new _RuntimeError(3005 /* RuntimeErrorCode.INVALID_CSS_UNIT_VALUE */, ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`); | ||
| } | ||
| function invalidTrigger() { | ||
| return new _RuntimeError(3006 /* RuntimeErrorCode.INVALID_TRIGGER */, ngDevMode && | ||
| "animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"); | ||
| } | ||
| function invalidDefinition() { | ||
| return new _RuntimeError(3007 /* RuntimeErrorCode.INVALID_DEFINITION */, ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()'); | ||
| } | ||
| function invalidState(metadataName, missingSubs) { | ||
| return new _RuntimeError(3008 /* RuntimeErrorCode.INVALID_STATE */, ngDevMode && | ||
| `state("${metadataName}", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`); | ||
| } | ||
| function invalidStyleValue(value) { | ||
| return new _RuntimeError(3002 /* RuntimeErrorCode.INVALID_STYLE_VALUE */, ngDevMode && `The provided style string value ${value} is not allowed.`); | ||
| } | ||
| function invalidParallelAnimation(prop, firstStart, firstEnd, secondStart, secondEnd) { | ||
| return new _RuntimeError(3010 /* RuntimeErrorCode.INVALID_PARALLEL_ANIMATION */, ngDevMode && | ||
| `The CSS property "${prop}" that exists between the times of "${firstStart}ms" and "${firstEnd}ms" is also being animated in a parallel animation between the times of "${secondStart}ms" and "${secondEnd}ms"`); | ||
| } | ||
| function invalidKeyframes() { | ||
| return new _RuntimeError(3011 /* RuntimeErrorCode.INVALID_KEYFRAMES */, ngDevMode && `keyframes() must be placed inside of a call to animate()`); | ||
| } | ||
| function invalidOffset() { | ||
| return new _RuntimeError(3012 /* RuntimeErrorCode.INVALID_OFFSET */, ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`); | ||
| } | ||
| function keyframeOffsetsOutOfOrder() { | ||
| return new _RuntimeError(3200 /* RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER */, ngDevMode && `Please ensure that all keyframe offsets are in order`); | ||
| } | ||
| function keyframesMissingOffsets() { | ||
| return new _RuntimeError(3202 /* RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS */, ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`); | ||
| } | ||
| function invalidStagger() { | ||
| return new _RuntimeError(3013 /* RuntimeErrorCode.INVALID_STAGGER */, ngDevMode && `stagger() can only be used inside of query()`); | ||
| } | ||
| function invalidQuery(selector) { | ||
| return new _RuntimeError(3014 /* RuntimeErrorCode.INVALID_QUERY */, ngDevMode && | ||
| `\`query("${selector}")\` returned zero elements. (Use \`query("${selector}", { optional: true })\` if you wish to allow this.)`); | ||
| } | ||
| function invalidExpression(expr) { | ||
| return new _RuntimeError(3015 /* RuntimeErrorCode.INVALID_EXPRESSION */, ngDevMode && `The provided transition expression "${expr}" is not supported`); | ||
| } | ||
| function invalidTransitionAlias(alias) { | ||
| return new _RuntimeError(3016 /* RuntimeErrorCode.INVALID_TRANSITION_ALIAS */, ngDevMode && `The transition alias value "${alias}" is not supported`); | ||
| } | ||
| function validationFailed(errors) { | ||
| return new _RuntimeError(3500 /* RuntimeErrorCode.VALIDATION_FAILED */, ngDevMode && `animation validation failed:\n${errors.map((err) => err.message).join('\n')}`); | ||
| } | ||
| function buildingFailed(errors) { | ||
| return new _RuntimeError(3501 /* RuntimeErrorCode.BUILDING_FAILED */, ngDevMode && `animation building failed:\n${errors.map((err) => err.message).join('\n')}`); | ||
| } | ||
| function triggerBuildFailed(name, errors) { | ||
| return new _RuntimeError(3404 /* RuntimeErrorCode.TRIGGER_BUILD_FAILED */, ngDevMode && | ||
| `The animation trigger "${name}" has failed to build due to the following errors:\n - ${errors | ||
| .map((err) => err.message) | ||
| .join('\n - ')}`); | ||
| } | ||
| function animationFailed(errors) { | ||
| return new _RuntimeError(3502 /* RuntimeErrorCode.ANIMATION_FAILED */, ngDevMode && | ||
| `Unable to animate due to the following errors:${LINE_START}${errors | ||
| .map((err) => err.message) | ||
| .join(LINE_START)}`); | ||
| } | ||
| function registerFailed(errors) { | ||
| return new _RuntimeError(3503 /* RuntimeErrorCode.REGISTRATION_FAILED */, ngDevMode && | ||
| `Unable to build the animation due to the following errors: ${errors | ||
| .map((err) => err.message) | ||
| .join('\n')}`); | ||
| } | ||
| function missingOrDestroyedAnimation() { | ||
| return new _RuntimeError(3300 /* RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION */, ngDevMode && "The requested animation doesn't exist or has already been destroyed"); | ||
| } | ||
| function createAnimationFailed(errors) { | ||
| return new _RuntimeError(3504 /* RuntimeErrorCode.CREATE_ANIMATION_FAILED */, ngDevMode && | ||
| `Unable to create the animation due to the following errors:${errors | ||
| .map((err) => err.message) | ||
| .join('\n')}`); | ||
| } | ||
| function missingPlayer(id) { | ||
| return new _RuntimeError(3301 /* RuntimeErrorCode.MISSING_PLAYER */, ngDevMode && `Unable to find the timeline player referenced by ${id}`); | ||
| } | ||
| function missingTrigger(phase, name) { | ||
| return new _RuntimeError(3302 /* RuntimeErrorCode.MISSING_TRIGGER */, ngDevMode && | ||
| `Unable to listen on the animation trigger event "${phase}" because the animation trigger "${name}" doesn\'t exist!`); | ||
| } | ||
| function missingEvent(name) { | ||
| return new _RuntimeError(3303 /* RuntimeErrorCode.MISSING_EVENT */, ngDevMode && | ||
| `Unable to listen on the animation trigger "${name}" because the provided event is undefined!`); | ||
| } | ||
| function unsupportedTriggerEvent(phase, name) { | ||
| return new _RuntimeError(3400 /* RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT */, ngDevMode && | ||
| `The provided animation trigger event "${phase}" for the animation trigger "${name}" is not supported!`); | ||
| } | ||
| function unregisteredTrigger(name) { | ||
| return new _RuntimeError(3401 /* RuntimeErrorCode.UNREGISTERED_TRIGGER */, ngDevMode && `The provided animation trigger "${name}" has not been registered!`); | ||
| } | ||
| function triggerTransitionsFailed(errors) { | ||
| return new _RuntimeError(3402 /* RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED */, ngDevMode && | ||
| `Unable to process animations due to the following failed trigger transitions\n ${errors | ||
| .map((err) => err.message) | ||
| .join('\n')}`); | ||
| } | ||
| function transitionFailed(name, errors) { | ||
| return new _RuntimeError(3505 /* RuntimeErrorCode.TRANSITION_FAILED */, ngDevMode && `@${name} has failed due to:\n ${errors.map((err) => err.message).join('\n- ')}`); | ||
| } | ||
| /** | ||
| * Set of all animatable CSS properties | ||
| * | ||
| * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties | ||
| */ | ||
| const ANIMATABLE_PROP_SET = new Set([ | ||
| '-moz-outline-radius', | ||
| '-moz-outline-radius-bottomleft', | ||
| '-moz-outline-radius-bottomright', | ||
| '-moz-outline-radius-topleft', | ||
| '-moz-outline-radius-topright', | ||
| '-ms-grid-columns', | ||
| '-ms-grid-rows', | ||
| '-webkit-line-clamp', | ||
| '-webkit-text-fill-color', | ||
| '-webkit-text-stroke', | ||
| '-webkit-text-stroke-color', | ||
| 'accent-color', | ||
| 'all', | ||
| 'backdrop-filter', | ||
| 'background', | ||
| 'background-color', | ||
| 'background-position', | ||
| 'background-size', | ||
| 'block-size', | ||
| 'border', | ||
| 'border-block-end', | ||
| 'border-block-end-color', | ||
| 'border-block-end-width', | ||
| 'border-block-start', | ||
| 'border-block-start-color', | ||
| 'border-block-start-width', | ||
| 'border-bottom', | ||
| 'border-bottom-color', | ||
| 'border-bottom-left-radius', | ||
| 'border-bottom-right-radius', | ||
| 'border-bottom-width', | ||
| 'border-color', | ||
| 'border-end-end-radius', | ||
| 'border-end-start-radius', | ||
| 'border-image-outset', | ||
| 'border-image-slice', | ||
| 'border-image-width', | ||
| 'border-inline-end', | ||
| 'border-inline-end-color', | ||
| 'border-inline-end-width', | ||
| 'border-inline-start', | ||
| 'border-inline-start-color', | ||
| 'border-inline-start-width', | ||
| 'border-left', | ||
| 'border-left-color', | ||
| 'border-left-width', | ||
| 'border-radius', | ||
| 'border-right', | ||
| 'border-right-color', | ||
| 'border-right-width', | ||
| 'border-start-end-radius', | ||
| 'border-start-start-radius', | ||
| 'border-top', | ||
| 'border-top-color', | ||
| 'border-top-left-radius', | ||
| 'border-top-right-radius', | ||
| 'border-top-width', | ||
| 'border-width', | ||
| 'bottom', | ||
| 'box-shadow', | ||
| 'caret-color', | ||
| 'clip', | ||
| 'clip-path', | ||
| 'color', | ||
| 'column-count', | ||
| 'column-gap', | ||
| 'column-rule', | ||
| 'column-rule-color', | ||
| 'column-rule-width', | ||
| 'column-width', | ||
| 'columns', | ||
| 'filter', | ||
| 'flex', | ||
| 'flex-basis', | ||
| 'flex-grow', | ||
| 'flex-shrink', | ||
| 'font', | ||
| 'font-size', | ||
| 'font-size-adjust', | ||
| 'font-stretch', | ||
| 'font-variation-settings', | ||
| 'font-weight', | ||
| 'gap', | ||
| 'grid-column-gap', | ||
| 'grid-gap', | ||
| 'grid-row-gap', | ||
| 'grid-template-columns', | ||
| 'grid-template-rows', | ||
| 'height', | ||
| 'inline-size', | ||
| 'input-security', | ||
| 'inset', | ||
| 'inset-block', | ||
| 'inset-block-end', | ||
| 'inset-block-start', | ||
| 'inset-inline', | ||
| 'inset-inline-end', | ||
| 'inset-inline-start', | ||
| 'left', | ||
| 'letter-spacing', | ||
| 'line-clamp', | ||
| 'line-height', | ||
| 'margin', | ||
| 'margin-block-end', | ||
| 'margin-block-start', | ||
| 'margin-bottom', | ||
| 'margin-inline-end', | ||
| 'margin-inline-start', | ||
| 'margin-left', | ||
| 'margin-right', | ||
| 'margin-top', | ||
| 'mask', | ||
| 'mask-border', | ||
| 'mask-position', | ||
| 'mask-size', | ||
| 'max-block-size', | ||
| 'max-height', | ||
| 'max-inline-size', | ||
| 'max-lines', | ||
| 'max-width', | ||
| 'min-block-size', | ||
| 'min-height', | ||
| 'min-inline-size', | ||
| 'min-width', | ||
| 'object-position', | ||
| 'offset', | ||
| 'offset-anchor', | ||
| 'offset-distance', | ||
| 'offset-path', | ||
| 'offset-position', | ||
| 'offset-rotate', | ||
| 'opacity', | ||
| 'order', | ||
| 'outline', | ||
| 'outline-color', | ||
| 'outline-offset', | ||
| 'outline-width', | ||
| 'padding', | ||
| 'padding-block-end', | ||
| 'padding-block-start', | ||
| 'padding-bottom', | ||
| 'padding-inline-end', | ||
| 'padding-inline-start', | ||
| 'padding-left', | ||
| 'padding-right', | ||
| 'padding-top', | ||
| 'perspective', | ||
| 'perspective-origin', | ||
| 'right', | ||
| 'rotate', | ||
| 'row-gap', | ||
| 'scale', | ||
| 'scroll-margin', | ||
| 'scroll-margin-block', | ||
| 'scroll-margin-block-end', | ||
| 'scroll-margin-block-start', | ||
| 'scroll-margin-bottom', | ||
| 'scroll-margin-inline', | ||
| 'scroll-margin-inline-end', | ||
| 'scroll-margin-inline-start', | ||
| 'scroll-margin-left', | ||
| 'scroll-margin-right', | ||
| 'scroll-margin-top', | ||
| 'scroll-padding', | ||
| 'scroll-padding-block', | ||
| 'scroll-padding-block-end', | ||
| 'scroll-padding-block-start', | ||
| 'scroll-padding-bottom', | ||
| 'scroll-padding-inline', | ||
| 'scroll-padding-inline-end', | ||
| 'scroll-padding-inline-start', | ||
| 'scroll-padding-left', | ||
| 'scroll-padding-right', | ||
| 'scroll-padding-top', | ||
| 'scroll-snap-coordinate', | ||
| 'scroll-snap-destination', | ||
| 'scrollbar-color', | ||
| 'shape-image-threshold', | ||
| 'shape-margin', | ||
| 'shape-outside', | ||
| 'tab-size', | ||
| 'text-decoration', | ||
| 'text-decoration-color', | ||
| 'text-decoration-thickness', | ||
| 'text-emphasis', | ||
| 'text-emphasis-color', | ||
| 'text-indent', | ||
| 'text-shadow', | ||
| 'text-underline-offset', | ||
| 'top', | ||
| 'transform', | ||
| 'transform-origin', | ||
| 'translate', | ||
| 'vertical-align', | ||
| 'visibility', | ||
| 'width', | ||
| 'word-spacing', | ||
| 'z-index', | ||
| 'zoom', | ||
| ]); | ||
| function optimizeGroupPlayer(players) { | ||
| switch (players.length) { | ||
| case 0: | ||
| return new NoopAnimationPlayer(); | ||
| case 1: | ||
| return players[0]; | ||
| default: | ||
| return new AnimationGroupPlayer(players); | ||
| } | ||
| } | ||
| function normalizeKeyframes$1(normalizer, keyframes, preStyles = new Map(), postStyles = new Map()) { | ||
| const errors = []; | ||
| const normalizedKeyframes = []; | ||
| let previousOffset = -1; | ||
| let previousKeyframe = null; | ||
| keyframes.forEach((kf) => { | ||
| const offset = kf.get('offset'); | ||
| const isSameOffset = offset == previousOffset; | ||
| const normalizedKeyframe = (isSameOffset && previousKeyframe) || new Map(); | ||
| kf.forEach((val, prop) => { | ||
| let normalizedProp = prop; | ||
| let normalizedValue = val; | ||
| if (prop !== 'offset') { | ||
| normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors); | ||
| switch (normalizedValue) { | ||
| case _PRE_STYLE: | ||
| normalizedValue = preStyles.get(prop); | ||
| break; | ||
| case AUTO_STYLE: | ||
| normalizedValue = postStyles.get(prop); | ||
| break; | ||
| default: | ||
| normalizedValue = normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors); | ||
| break; | ||
| } | ||
| } | ||
| normalizedKeyframe.set(normalizedProp, normalizedValue); | ||
| }); | ||
| if (!isSameOffset) { | ||
| normalizedKeyframes.push(normalizedKeyframe); | ||
| } | ||
| previousKeyframe = normalizedKeyframe; | ||
| previousOffset = offset; | ||
| }); | ||
| if (errors.length) { | ||
| throw animationFailed(errors); | ||
| } | ||
| return normalizedKeyframes; | ||
| } | ||
| function listenOnPlayer(player, eventName, event, callback) { | ||
| switch (eventName) { | ||
| case 'start': | ||
| player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player))); | ||
| break; | ||
| case 'done': | ||
| player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player))); | ||
| break; | ||
| case 'destroy': | ||
| player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player))); | ||
| break; | ||
| } | ||
| } | ||
| function copyAnimationEvent(e, phaseName, player) { | ||
| const totalTime = player.totalTime; | ||
| const disabled = player.disabled ? true : false; | ||
| const event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime, disabled); | ||
| const data = e['_data']; | ||
| if (data != null) { | ||
| event['_data'] = data; | ||
| } | ||
| return event; | ||
| } | ||
| function makeAnimationEvent(element, triggerName, fromState, toState, phaseName = '', totalTime = 0, disabled) { | ||
| return { element, triggerName, fromState, toState, phaseName, totalTime, disabled: !!disabled }; | ||
| } | ||
| function getOrSetDefaultValue(map, key, defaultValue) { | ||
| let value = map.get(key); | ||
| if (!value) { | ||
| map.set(key, (value = defaultValue)); | ||
| } | ||
| return value; | ||
| } | ||
| function parseTimelineCommand(command) { | ||
| const separatorPos = command.indexOf(':'); | ||
| const id = command.substring(1, separatorPos); | ||
| const action = command.slice(separatorPos + 1); | ||
| return [id, action]; | ||
| } | ||
| const documentElement = /* @__PURE__ */ (() => typeof document === 'undefined' ? null : document.documentElement)(); | ||
| function getParentElement(element) { | ||
| const parent = element.parentNode || element.host || null; // consider host to support shadow DOM | ||
| if (parent === documentElement) { | ||
| return null; | ||
| } | ||
| return parent; | ||
| } | ||
| function containsVendorPrefix(prop) { | ||
| // Webkit is the only real popular vendor prefix nowadays | ||
| // cc: http://shouldiprefix.com/ | ||
| return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit | ||
| } | ||
| let _CACHED_BODY = null; | ||
| let _IS_WEBKIT = false; | ||
| function validateStyleProperty(prop) { | ||
| if (!_CACHED_BODY) { | ||
| _CACHED_BODY = getBodyNode() || {}; | ||
| _IS_WEBKIT = _CACHED_BODY.style ? 'WebkitAppearance' in _CACHED_BODY.style : false; | ||
| } | ||
| let result = true; | ||
| if (_CACHED_BODY.style && !containsVendorPrefix(prop)) { | ||
| result = prop in _CACHED_BODY.style; | ||
| if (!result && _IS_WEBKIT) { | ||
| const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1); | ||
| result = camelProp in _CACHED_BODY.style; | ||
| } | ||
| } | ||
| return result; | ||
| } | ||
| function validateWebAnimatableStyleProperty(prop) { | ||
| return ANIMATABLE_PROP_SET.has(prop); | ||
| } | ||
| function getBodyNode() { | ||
| if (typeof document != 'undefined') { | ||
| return document.body; | ||
| } | ||
| return null; | ||
| } | ||
| function containsElement(elm1, elm2) { | ||
| while (elm2) { | ||
| if (elm2 === elm1) { | ||
| return true; | ||
| } | ||
| elm2 = getParentElement(elm2); | ||
| } | ||
| return false; | ||
| } | ||
| function invokeQuery(element, selector, multi) { | ||
| if (multi) { | ||
| return Array.from(element.querySelectorAll(selector)); | ||
| } | ||
| const elem = element.querySelector(selector); | ||
| return elem ? [elem] : []; | ||
| } | ||
| const ONE_SECOND = 1000; | ||
| const SUBSTITUTION_EXPR_START = '{{'; | ||
| const SUBSTITUTION_EXPR_END = '}}'; | ||
| const ENTER_CLASSNAME = 'ng-enter'; | ||
| const LEAVE_CLASSNAME = 'ng-leave'; | ||
| const NG_TRIGGER_CLASSNAME = 'ng-trigger'; | ||
| const NG_TRIGGER_SELECTOR = '.ng-trigger'; | ||
| const NG_ANIMATING_CLASSNAME = 'ng-animating'; | ||
| const NG_ANIMATING_SELECTOR = '.ng-animating'; | ||
| function resolveTimingValue(value) { | ||
| if (typeof value == 'number') | ||
| return value; | ||
| const matches = value.match(/^(-?[\.\d]+)(m?s)/); | ||
| if (!matches || matches.length < 2) | ||
| return 0; | ||
| return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]); | ||
| } | ||
| function _convertTimeValueToMS(value, unit) { | ||
| switch (unit) { | ||
| case 's': | ||
| return value * ONE_SECOND; | ||
| default: // ms or something else | ||
| return value; | ||
| } | ||
| } | ||
| function resolveTiming(timings, errors, allowNegativeValues) { | ||
| return timings.hasOwnProperty('duration') | ||
| ? timings | ||
| : parseTimeExpression(timings, errors, allowNegativeValues); | ||
| } | ||
| const PARSE_TIME_EXPRESSION_REGEX = /^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i; | ||
| function parseTimeExpression(exp, errors, allowNegativeValues) { | ||
| let duration; | ||
| let delay = 0; | ||
| let easing = ''; | ||
| if (typeof exp === 'string') { | ||
| const matches = exp.match(PARSE_TIME_EXPRESSION_REGEX); | ||
| if (matches === null) { | ||
| errors.push(invalidTimingValue(exp)); | ||
| return { duration: 0, delay: 0, easing: '' }; | ||
| } | ||
| duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]); | ||
| const delayMatch = matches[3]; | ||
| if (delayMatch != null) { | ||
| delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]); | ||
| } | ||
| const easingVal = matches[5]; | ||
| if (easingVal) { | ||
| easing = easingVal; | ||
| } | ||
| } | ||
| else { | ||
| duration = exp; | ||
| } | ||
| if (!allowNegativeValues) { | ||
| let containsErrors = false; | ||
| let startIndex = errors.length; | ||
| if (duration < 0) { | ||
| errors.push(negativeStepValue()); | ||
| containsErrors = true; | ||
| } | ||
| if (delay < 0) { | ||
| errors.push(negativeDelayValue()); | ||
| containsErrors = true; | ||
| } | ||
| if (containsErrors) { | ||
| errors.splice(startIndex, 0, invalidTimingValue(exp)); | ||
| } | ||
| } | ||
| return { duration, delay, easing }; | ||
| } | ||
| function normalizeKeyframes(keyframes) { | ||
| if (!keyframes.length) { | ||
| return []; | ||
| } | ||
| if (keyframes[0] instanceof Map) { | ||
| return keyframes; | ||
| } | ||
| return keyframes.map((kf) => new Map(Object.entries(kf))); | ||
| } | ||
| function normalizeStyles(styles) { | ||
| return Array.isArray(styles) ? new Map(...styles) : new Map(styles); | ||
| } | ||
| function setStyles(element, styles, formerStyles) { | ||
| styles.forEach((val, prop) => { | ||
| const camelProp = dashCaseToCamelCase(prop); | ||
| if (formerStyles && !formerStyles.has(prop)) { | ||
| formerStyles.set(prop, element.style[camelProp]); | ||
| } | ||
| element.style[camelProp] = val; | ||
| }); | ||
| } | ||
| function eraseStyles(element, styles) { | ||
| styles.forEach((_, prop) => { | ||
| const camelProp = dashCaseToCamelCase(prop); | ||
| element.style[camelProp] = ''; | ||
| }); | ||
| } | ||
| function normalizeAnimationEntry(steps) { | ||
| if (Array.isArray(steps)) { | ||
| if (steps.length == 1) | ||
| return steps[0]; | ||
| return sequence(steps); | ||
| } | ||
| return steps; | ||
| } | ||
| function validateStyleParams(value, options, errors) { | ||
| const params = options.params || {}; | ||
| const matches = extractStyleParams(value); | ||
| if (matches.length) { | ||
| matches.forEach((varName) => { | ||
| if (!params.hasOwnProperty(varName)) { | ||
| errors.push(invalidStyleParams(varName)); | ||
| } | ||
| }); | ||
| } | ||
| } | ||
| const PARAM_REGEX = /* @__PURE__ */ new RegExp(`${SUBSTITUTION_EXPR_START}\\s*(.+?)\\s*${SUBSTITUTION_EXPR_END}`, 'g'); | ||
| function extractStyleParams(value) { | ||
| let params = []; | ||
| if (typeof value === 'string') { | ||
| let match; | ||
| while ((match = PARAM_REGEX.exec(value))) { | ||
| params.push(match[1]); | ||
| } | ||
| PARAM_REGEX.lastIndex = 0; | ||
| } | ||
| return params; | ||
| } | ||
| function interpolateParams(value, params, errors) { | ||
| const original = `${value}`; | ||
| const str = original.replace(PARAM_REGEX, (_, varName) => { | ||
| let localVal = params[varName]; | ||
| // this means that the value was never overridden by the data passed in by the user | ||
| if (localVal == null) { | ||
| errors.push(invalidParamValue(varName)); | ||
| localVal = ''; | ||
| } | ||
| return localVal.toString(); | ||
| }); | ||
| // we do this to assert that numeric values stay as they are | ||
| return str == original ? value : str; | ||
| } | ||
| const DASH_CASE_REGEXP = /-+([a-z0-9])/g; | ||
| function dashCaseToCamelCase(input) { | ||
| return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase()); | ||
| } | ||
| function camelCaseToDashCase(input) { | ||
| return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); | ||
| } | ||
| function allowPreviousPlayerStylesMerge(duration, delay) { | ||
| return duration === 0 || delay === 0; | ||
| } | ||
| function balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles) { | ||
| if (previousStyles.size && keyframes.length) { | ||
| let startingKeyframe = keyframes[0]; | ||
| let missingStyleProps = []; | ||
| previousStyles.forEach((val, prop) => { | ||
| if (!startingKeyframe.has(prop)) { | ||
| missingStyleProps.push(prop); | ||
| } | ||
| startingKeyframe.set(prop, val); | ||
| }); | ||
| if (missingStyleProps.length) { | ||
| for (let i = 1; i < keyframes.length; i++) { | ||
| let kf = keyframes[i]; | ||
| missingStyleProps.forEach((prop) => kf.set(prop, computeStyle(element, prop))); | ||
| } | ||
| } | ||
| } | ||
| return keyframes; | ||
| } | ||
| function visitDslNode(visitor, node, context) { | ||
| switch (node.type) { | ||
| case AnimationMetadataType.Trigger: | ||
| return visitor.visitTrigger(node, context); | ||
| case AnimationMetadataType.State: | ||
| return visitor.visitState(node, context); | ||
| case AnimationMetadataType.Transition: | ||
| return visitor.visitTransition(node, context); | ||
| case AnimationMetadataType.Sequence: | ||
| return visitor.visitSequence(node, context); | ||
| case AnimationMetadataType.Group: | ||
| return visitor.visitGroup(node, context); | ||
| case AnimationMetadataType.Animate: | ||
| return visitor.visitAnimate(node, context); | ||
| case AnimationMetadataType.Keyframes: | ||
| return visitor.visitKeyframes(node, context); | ||
| case AnimationMetadataType.Style: | ||
| return visitor.visitStyle(node, context); | ||
| case AnimationMetadataType.Reference: | ||
| return visitor.visitReference(node, context); | ||
| case AnimationMetadataType.AnimateChild: | ||
| return visitor.visitAnimateChild(node, context); | ||
| case AnimationMetadataType.AnimateRef: | ||
| return visitor.visitAnimateRef(node, context); | ||
| case AnimationMetadataType.Query: | ||
| return visitor.visitQuery(node, context); | ||
| case AnimationMetadataType.Stagger: | ||
| return visitor.visitStagger(node, context); | ||
| default: | ||
| throw invalidNodeType(node.type); | ||
| } | ||
| } | ||
| function computeStyle(element, prop) { | ||
| return window.getComputedStyle(element)[prop]; | ||
| } | ||
| export { ENTER_CLASSNAME, LEAVE_CLASSNAME, NG_ANIMATING_CLASSNAME, NG_ANIMATING_SELECTOR, NG_TRIGGER_CLASSNAME, NG_TRIGGER_SELECTOR, SUBSTITUTION_EXPR_START, allowPreviousPlayerStylesMerge, balancePreviousStylesIntoKeyframes, buildingFailed, camelCaseToDashCase, computeStyle, containsElement, createAnimationFailed, dashCaseToCamelCase, eraseStyles, extractStyleParams, getOrSetDefaultValue, getParentElement, interpolateParams, invalidCssUnitValue, invalidDefinition, invalidExpression, invalidKeyframes, invalidOffset, invalidParallelAnimation, invalidQuery, invalidStagger, invalidState, invalidStyleValue, invalidTransitionAlias, invalidTrigger, invokeQuery, keyframeOffsetsOutOfOrder, keyframesMissingOffsets, listenOnPlayer, makeAnimationEvent, missingEvent, missingOrDestroyedAnimation, missingPlayer, missingTrigger, normalizeAnimationEntry, normalizeKeyframes$1 as normalizeKeyframes, normalizeKeyframes as normalizeKeyframes$1, normalizeStyles, optimizeGroupPlayer, parseTimelineCommand, registerFailed, resolveTiming, resolveTimingValue, setStyles, transitionFailed, triggerBuildFailed, triggerTransitionsFailed, unregisteredTrigger, unsupportedTriggerEvent, validateStyleParams, validateStyleProperty, validateWebAnimatableStyleProperty, validationFailed, visitDslNode }; | ||
| //# sourceMappingURL=util.mjs.map |
| {"version":3,"file":"util.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/animations/browser/src/error_helpers.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/animations/browser/src/render/web_animations/animatable_props_set.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/animations/browser/src/render/shared.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/animations/browser/src/util.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 {RuntimeErrorCode} from '../../src/errors';\nimport {ɵRuntimeError as RuntimeError} from '@angular/core';\n\nconst LINE_START = '\\n - ';\n\nexport function invalidTimingValue(exp: string | number): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_TIMING_VALUE,\n ngDevMode && `The provided timing value \"${exp}\" is invalid.`,\n );\n}\n\nexport function negativeStepValue(): Error {\n return new RuntimeError(\n RuntimeErrorCode.NEGATIVE_STEP_VALUE,\n ngDevMode && 'Duration values below 0 are not allowed for this animation step.',\n );\n}\n\nexport function negativeDelayValue(): Error {\n return new RuntimeError(\n RuntimeErrorCode.NEGATIVE_DELAY_VALUE,\n ngDevMode && 'Delay values below 0 are not allowed for this animation step.',\n );\n}\n\nexport function invalidStyleParams(varName: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_STYLE_PARAMS,\n ngDevMode &&\n `Unable to resolve the local animation param ${varName} in the given list of values`,\n );\n}\n\nexport function invalidParamValue(varName: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_PARAM_VALUE,\n ngDevMode && `Please provide a value for the animation param ${varName}`,\n );\n}\n\nexport function invalidNodeType(nodeType: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_NODE_TYPE,\n ngDevMode && `Unable to resolve animation metadata node #${nodeType}`,\n );\n}\n\nexport function invalidCssUnitValue(userProvidedProperty: string, value: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_CSS_UNIT_VALUE,\n ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`,\n );\n}\n\nexport function invalidTrigger(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_TRIGGER,\n ngDevMode &&\n \"animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))\",\n );\n}\n\nexport function invalidDefinition(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_DEFINITION,\n ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()',\n );\n}\n\nexport function invalidState(metadataName: string, missingSubs: string[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_STATE,\n ngDevMode &&\n `state(\"${metadataName}\", ...) must define default values for all the following style substitutions: ${missingSubs.join(\n ', ',\n )}`,\n );\n}\n\nexport function invalidStyleValue(value: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_STYLE_VALUE,\n ngDevMode && `The provided style string value ${value} is not allowed.`,\n );\n}\n\nexport function invalidProperty(prop: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_PROPERTY,\n ngDevMode &&\n `The provided animation property \"${prop}\" is not a supported CSS property for animations`,\n );\n}\n\nexport function invalidParallelAnimation(\n prop: string,\n firstStart: number,\n firstEnd: number,\n secondStart: number,\n secondEnd: number,\n): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_PARALLEL_ANIMATION,\n ngDevMode &&\n `The CSS property \"${prop}\" that exists between the times of \"${firstStart}ms\" and \"${firstEnd}ms\" is also being animated in a parallel animation between the times of \"${secondStart}ms\" and \"${secondEnd}ms\"`,\n );\n}\n\nexport function invalidKeyframes(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_KEYFRAMES,\n ngDevMode && `keyframes() must be placed inside of a call to animate()`,\n );\n}\n\nexport function invalidOffset(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_OFFSET,\n ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`,\n );\n}\n\nexport function keyframeOffsetsOutOfOrder(): Error {\n return new RuntimeError(\n RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER,\n ngDevMode && `Please ensure that all keyframe offsets are in order`,\n );\n}\n\nexport function keyframesMissingOffsets(): Error {\n return new RuntimeError(\n RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS,\n ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`,\n );\n}\n\nexport function invalidStagger(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_STAGGER,\n ngDevMode && `stagger() can only be used inside of query()`,\n );\n}\n\nexport function invalidQuery(selector: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_QUERY,\n ngDevMode &&\n `\\`query(\"${selector}\")\\` returned zero elements. (Use \\`query(\"${selector}\", { optional: true })\\` if you wish to allow this.)`,\n );\n}\n\nexport function invalidExpression(expr: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_EXPRESSION,\n ngDevMode && `The provided transition expression \"${expr}\" is not supported`,\n );\n}\n\nexport function invalidTransitionAlias(alias: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_TRANSITION_ALIAS,\n ngDevMode && `The transition alias value \"${alias}\" is not supported`,\n );\n}\n\nexport function validationFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.VALIDATION_FAILED,\n ngDevMode && `animation validation failed:\\n${errors.map((err) => err.message).join('\\n')}`,\n );\n}\n\nexport function buildingFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.BUILDING_FAILED,\n ngDevMode && `animation building failed:\\n${errors.map((err) => err.message).join('\\n')}`,\n );\n}\n\nexport function triggerBuildFailed(name: string, errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.TRIGGER_BUILD_FAILED,\n ngDevMode &&\n `The animation trigger \"${name}\" has failed to build due to the following errors:\\n - ${errors\n .map((err) => err.message)\n .join('\\n - ')}`,\n );\n}\n\nexport function animationFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.ANIMATION_FAILED,\n ngDevMode &&\n `Unable to animate due to the following errors:${LINE_START}${errors\n .map((err) => err.message)\n .join(LINE_START)}`,\n );\n}\n\nexport function registerFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.REGISTRATION_FAILED,\n ngDevMode &&\n `Unable to build the animation due to the following errors: ${errors\n .map((err) => err.message)\n .join('\\n')}`,\n );\n}\n\nexport function missingOrDestroyedAnimation(): Error {\n return new RuntimeError(\n RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION,\n ngDevMode && \"The requested animation doesn't exist or has already been destroyed\",\n );\n}\n\nexport function createAnimationFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.CREATE_ANIMATION_FAILED,\n ngDevMode &&\n `Unable to create the animation due to the following errors:${errors\n .map((err) => err.message)\n .join('\\n')}`,\n );\n}\n\nexport function missingPlayer(id: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.MISSING_PLAYER,\n ngDevMode && `Unable to find the timeline player referenced by ${id}`,\n );\n}\n\nexport function missingTrigger(phase: string, name: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.MISSING_TRIGGER,\n ngDevMode &&\n `Unable to listen on the animation trigger event \"${phase}\" because the animation trigger \"${name}\" doesn\\'t exist!`,\n );\n}\n\nexport function missingEvent(name: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.MISSING_EVENT,\n ngDevMode &&\n `Unable to listen on the animation trigger \"${name}\" because the provided event is undefined!`,\n );\n}\n\nexport function unsupportedTriggerEvent(phase: string, name: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT,\n ngDevMode &&\n `The provided animation trigger event \"${phase}\" for the animation trigger \"${name}\" is not supported!`,\n );\n}\n\nexport function unregisteredTrigger(name: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.UNREGISTERED_TRIGGER,\n ngDevMode && `The provided animation trigger \"${name}\" has not been registered!`,\n );\n}\n\nexport function triggerTransitionsFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED,\n ngDevMode &&\n `Unable to process animations due to the following failed trigger transitions\\n ${errors\n .map((err) => err.message)\n .join('\\n')}`,\n );\n}\n\nexport function triggerParsingFailed(name: string, errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.TRIGGER_PARSING_FAILED,\n ngDevMode &&\n `Animation parsing for the ${name} trigger have failed:${LINE_START}${errors\n .map((err) => err.message)\n .join(LINE_START)}`,\n );\n}\n\nexport function transitionFailed(name: string, errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.TRANSITION_FAILED,\n ngDevMode && `@${name} has failed due to:\\n ${errors.map((err) => err.message).join('\\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 * Set of all animatable CSS properties\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties\n */\nexport const ANIMATABLE_PROP_SET = new Set([\n '-moz-outline-radius',\n '-moz-outline-radius-bottomleft',\n '-moz-outline-radius-bottomright',\n '-moz-outline-radius-topleft',\n '-moz-outline-radius-topright',\n '-ms-grid-columns',\n '-ms-grid-rows',\n '-webkit-line-clamp',\n '-webkit-text-fill-color',\n '-webkit-text-stroke',\n '-webkit-text-stroke-color',\n 'accent-color',\n 'all',\n 'backdrop-filter',\n 'background',\n 'background-color',\n 'background-position',\n 'background-size',\n 'block-size',\n 'border',\n 'border-block-end',\n 'border-block-end-color',\n 'border-block-end-width',\n 'border-block-start',\n 'border-block-start-color',\n 'border-block-start-width',\n 'border-bottom',\n 'border-bottom-color',\n 'border-bottom-left-radius',\n 'border-bottom-right-radius',\n 'border-bottom-width',\n 'border-color',\n 'border-end-end-radius',\n 'border-end-start-radius',\n 'border-image-outset',\n 'border-image-slice',\n 'border-image-width',\n 'border-inline-end',\n 'border-inline-end-color',\n 'border-inline-end-width',\n 'border-inline-start',\n 'border-inline-start-color',\n 'border-inline-start-width',\n 'border-left',\n 'border-left-color',\n 'border-left-width',\n 'border-radius',\n 'border-right',\n 'border-right-color',\n 'border-right-width',\n 'border-start-end-radius',\n 'border-start-start-radius',\n 'border-top',\n 'border-top-color',\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-top-width',\n 'border-width',\n 'bottom',\n 'box-shadow',\n 'caret-color',\n 'clip',\n 'clip-path',\n 'color',\n 'column-count',\n 'column-gap',\n 'column-rule',\n 'column-rule-color',\n 'column-rule-width',\n 'column-width',\n 'columns',\n 'filter',\n 'flex',\n 'flex-basis',\n 'flex-grow',\n 'flex-shrink',\n 'font',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-variation-settings',\n 'font-weight',\n 'gap',\n 'grid-column-gap',\n 'grid-gap',\n 'grid-row-gap',\n 'grid-template-columns',\n 'grid-template-rows',\n 'height',\n 'inline-size',\n 'input-security',\n 'inset',\n 'inset-block',\n 'inset-block-end',\n 'inset-block-start',\n 'inset-inline',\n 'inset-inline-end',\n 'inset-inline-start',\n 'left',\n 'letter-spacing',\n 'line-clamp',\n 'line-height',\n 'margin',\n 'margin-block-end',\n 'margin-block-start',\n 'margin-bottom',\n 'margin-inline-end',\n 'margin-inline-start',\n 'margin-left',\n 'margin-right',\n 'margin-top',\n 'mask',\n 'mask-border',\n 'mask-position',\n 'mask-size',\n 'max-block-size',\n 'max-height',\n 'max-inline-size',\n 'max-lines',\n 'max-width',\n 'min-block-size',\n 'min-height',\n 'min-inline-size',\n 'min-width',\n 'object-position',\n 'offset',\n 'offset-anchor',\n 'offset-distance',\n 'offset-path',\n 'offset-position',\n 'offset-rotate',\n 'opacity',\n 'order',\n 'outline',\n 'outline-color',\n 'outline-offset',\n 'outline-width',\n 'padding',\n 'padding-block-end',\n 'padding-block-start',\n 'padding-bottom',\n 'padding-inline-end',\n 'padding-inline-start',\n 'padding-left',\n 'padding-right',\n 'padding-top',\n 'perspective',\n 'perspective-origin',\n 'right',\n 'rotate',\n 'row-gap',\n 'scale',\n 'scroll-margin',\n 'scroll-margin-block',\n 'scroll-margin-block-end',\n 'scroll-margin-block-start',\n 'scroll-margin-bottom',\n 'scroll-margin-inline',\n 'scroll-margin-inline-end',\n 'scroll-margin-inline-start',\n 'scroll-margin-left',\n 'scroll-margin-right',\n 'scroll-margin-top',\n 'scroll-padding',\n 'scroll-padding-block',\n 'scroll-padding-block-end',\n 'scroll-padding-block-start',\n 'scroll-padding-bottom',\n 'scroll-padding-inline',\n 'scroll-padding-inline-end',\n 'scroll-padding-inline-start',\n 'scroll-padding-left',\n 'scroll-padding-right',\n 'scroll-padding-top',\n 'scroll-snap-coordinate',\n 'scroll-snap-destination',\n 'scrollbar-color',\n 'shape-image-threshold',\n 'shape-margin',\n 'shape-outside',\n 'tab-size',\n 'text-decoration',\n 'text-decoration-color',\n 'text-decoration-thickness',\n 'text-emphasis',\n 'text-emphasis-color',\n 'text-indent',\n 'text-shadow',\n 'text-underline-offset',\n 'top',\n 'transform',\n 'transform-origin',\n 'translate',\n 'vertical-align',\n 'visibility',\n 'width',\n 'word-spacing',\n 'z-index',\n 'zoom',\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 AnimationEvent,\n AnimationPlayer,\n AUTO_STYLE,\n NoopAnimationPlayer,\n ɵAnimationGroupPlayer,\n ɵPRE_STYLE as PRE_STYLE,\n ɵStyleDataMap,\n} from '../../../src/animations';\n\nimport {AnimationStyleNormalizer} from '../../src/dsl/style_normalization/animation_style_normalizer';\nimport {animationFailed} from '../error_helpers';\n\nimport {ANIMATABLE_PROP_SET} from './web_animations/animatable_props_set';\n\nexport function optimizeGroupPlayer(players: AnimationPlayer[]): AnimationPlayer {\n switch (players.length) {\n case 0:\n return new NoopAnimationPlayer();\n case 1:\n return players[0];\n default:\n return new ɵAnimationGroupPlayer(players);\n }\n}\n\nexport function normalizeKeyframes(\n normalizer: AnimationStyleNormalizer,\n keyframes: Array<ɵStyleDataMap>,\n preStyles: ɵStyleDataMap = new Map(),\n postStyles: ɵStyleDataMap = new Map(),\n): Array<ɵStyleDataMap> {\n const errors: Error[] = [];\n const normalizedKeyframes: Array<ɵStyleDataMap> = [];\n let previousOffset = -1;\n let previousKeyframe: ɵStyleDataMap | null = null;\n keyframes.forEach((kf) => {\n const offset = kf.get('offset') as number;\n const isSameOffset = offset == previousOffset;\n const normalizedKeyframe: ɵStyleDataMap = (isSameOffset && previousKeyframe) || new Map();\n kf.forEach((val, prop) => {\n let normalizedProp = prop;\n let normalizedValue = val;\n if (prop !== 'offset') {\n normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);\n switch (normalizedValue) {\n case PRE_STYLE:\n normalizedValue = preStyles.get(prop)!;\n break;\n\n case AUTO_STYLE:\n normalizedValue = postStyles.get(prop)!;\n break;\n\n default:\n normalizedValue = normalizer.normalizeStyleValue(\n prop,\n normalizedProp,\n normalizedValue,\n errors,\n );\n break;\n }\n }\n normalizedKeyframe.set(normalizedProp, normalizedValue);\n });\n if (!isSameOffset) {\n normalizedKeyframes.push(normalizedKeyframe);\n }\n previousKeyframe = normalizedKeyframe;\n previousOffset = offset;\n });\n if (errors.length) {\n throw animationFailed(errors);\n }\n\n return normalizedKeyframes;\n}\n\nexport function listenOnPlayer(\n player: AnimationPlayer,\n eventName: string,\n event: AnimationEvent | undefined,\n callback: (event: any) => any,\n) {\n switch (eventName) {\n case 'start':\n player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player)));\n break;\n case 'done':\n player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player)));\n break;\n case 'destroy':\n player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player)));\n break;\n }\n}\n\nexport function copyAnimationEvent(\n e: AnimationEvent,\n phaseName: string,\n player: AnimationPlayer,\n): AnimationEvent {\n const totalTime = player.totalTime;\n const disabled = (player as any).disabled ? true : false;\n const event = makeAnimationEvent(\n e.element,\n e.triggerName,\n e.fromState,\n e.toState,\n phaseName || e.phaseName,\n totalTime == undefined ? e.totalTime : totalTime,\n disabled,\n );\n const data = (e as any)['_data'];\n if (data != null) {\n (event as any)['_data'] = data;\n }\n return event;\n}\n\nexport function makeAnimationEvent(\n element: any,\n triggerName: string,\n fromState: string,\n toState: string,\n phaseName: string = '',\n totalTime: number = 0,\n disabled?: boolean,\n): AnimationEvent {\n return {element, triggerName, fromState, toState, phaseName, totalTime, disabled: !!disabled};\n}\n\nexport function getOrSetDefaultValue<T, V>(map: Map<T, V>, key: T, defaultValue: V) {\n let value = map.get(key);\n if (!value) {\n map.set(key, (value = defaultValue));\n }\n return value;\n}\n\nexport function parseTimelineCommand(command: string): [string, string] {\n const separatorPos = command.indexOf(':');\n const id = command.substring(1, separatorPos);\n const action = command.slice(separatorPos + 1);\n return [id, action];\n}\n\nconst documentElement: HTMLElement | null = /* @__PURE__ */ (() =>\n typeof document === 'undefined' ? null : document.documentElement)();\n\nexport function getParentElement(element: any): unknown | null {\n const parent = element.parentNode || element.host || null; // consider host to support shadow DOM\n if (parent === documentElement) {\n return null;\n }\n return parent;\n}\n\nfunction containsVendorPrefix(prop: string): boolean {\n // Webkit is the only real popular vendor prefix nowadays\n // cc: http://shouldiprefix.com/\n return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit\n}\n\nlet _CACHED_BODY: {style: any} | null = null;\nlet _IS_WEBKIT = false;\nexport function validateStyleProperty(prop: string): boolean {\n if (!_CACHED_BODY) {\n _CACHED_BODY = getBodyNode() || {};\n _IS_WEBKIT = _CACHED_BODY!.style ? 'WebkitAppearance' in _CACHED_BODY!.style : false;\n }\n\n let result = true;\n if (_CACHED_BODY!.style && !containsVendorPrefix(prop)) {\n result = prop in _CACHED_BODY!.style;\n if (!result && _IS_WEBKIT) {\n const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1);\n result = camelProp in _CACHED_BODY!.style;\n }\n }\n\n return result;\n}\n\nexport function validateWebAnimatableStyleProperty(prop: string): boolean {\n return ANIMATABLE_PROP_SET.has(prop);\n}\n\nexport function getBodyNode(): any | null {\n if (typeof document != 'undefined') {\n return document.body;\n }\n return null;\n}\n\nexport function containsElement(elm1: any, elm2: any): boolean {\n while (elm2) {\n if (elm2 === elm1) {\n return true;\n }\n elm2 = getParentElement(elm2);\n }\n return false;\n}\n\nexport function invokeQuery(element: any, selector: string, multi: boolean): any[] {\n if (multi) {\n return Array.from(element.querySelectorAll(selector));\n }\n const elem = element.querySelector(selector);\n return elem ? [elem] : [];\n}\n\nexport function hypenatePropsKeys(original: ɵStyleDataMap): ɵStyleDataMap {\n const newMap: ɵStyleDataMap = new Map();\n original.forEach((val, prop) => {\n const newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');\n newMap.set(newProp, val);\n });\n return newMap;\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 AnimateTimings,\n AnimationMetadata,\n AnimationMetadataType,\n AnimationOptions,\n sequence,\n ɵStyleData,\n ɵStyleDataMap,\n} from '../../src/animations';\n\nimport {Ast as AnimationAst, AstVisitor as AnimationAstVisitor} from './dsl/animation_ast';\nimport {AnimationDslVisitor} from './dsl/animation_dsl_visitor';\nimport {\n invalidNodeType,\n invalidParamValue,\n invalidStyleParams,\n invalidTimingValue,\n negativeDelayValue,\n negativeStepValue,\n} from './error_helpers';\n\nconst ONE_SECOND = 1000;\n\nexport const SUBSTITUTION_EXPR_START = '{{';\nexport const SUBSTITUTION_EXPR_END = '}}';\nexport const ENTER_CLASSNAME = 'ng-enter';\nexport const LEAVE_CLASSNAME = 'ng-leave';\nexport const NG_TRIGGER_CLASSNAME = 'ng-trigger';\nexport const NG_TRIGGER_SELECTOR = '.ng-trigger';\nexport const NG_ANIMATING_CLASSNAME = 'ng-animating';\nexport const NG_ANIMATING_SELECTOR = '.ng-animating';\n\nexport function resolveTimingValue(value: string | number) {\n if (typeof value == 'number') return value;\n\n const matches = value.match(/^(-?[\\.\\d]+)(m?s)/);\n if (!matches || matches.length < 2) return 0;\n\n return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\n\nfunction _convertTimeValueToMS(value: number, unit: string): number {\n switch (unit) {\n case 's':\n return value * ONE_SECOND;\n default: // ms or something else\n return value;\n }\n}\n\nexport function resolveTiming(\n timings: string | number | AnimateTimings,\n errors: Error[],\n allowNegativeValues?: boolean,\n) {\n return timings.hasOwnProperty('duration')\n ? <AnimateTimings>timings\n : parseTimeExpression(<string | number>timings, errors, allowNegativeValues);\n}\n\nconst PARSE_TIME_EXPRESSION_REGEX =\n /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\nfunction parseTimeExpression(\n exp: string | number,\n errors: Error[],\n allowNegativeValues?: boolean,\n): AnimateTimings {\n let duration: number;\n let delay: number = 0;\n let easing: string = '';\n if (typeof exp === 'string') {\n const matches = exp.match(PARSE_TIME_EXPRESSION_REGEX);\n if (matches === null) {\n errors.push(invalidTimingValue(exp));\n return {duration: 0, delay: 0, easing: ''};\n }\n\n duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n\n const delayMatch = matches[3];\n if (delayMatch != null) {\n delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);\n }\n\n const easingVal = matches[5];\n if (easingVal) {\n easing = easingVal;\n }\n } else {\n duration = exp;\n }\n\n if (!allowNegativeValues) {\n let containsErrors = false;\n let startIndex = errors.length;\n if (duration < 0) {\n errors.push(negativeStepValue());\n containsErrors = true;\n }\n if (delay < 0) {\n errors.push(negativeDelayValue());\n containsErrors = true;\n }\n if (containsErrors) {\n errors.splice(startIndex, 0, invalidTimingValue(exp));\n }\n }\n\n return {duration, delay, easing};\n}\n\nexport function normalizeKeyframes(\n keyframes: Array<ɵStyleData> | Array<ɵStyleDataMap>,\n): Array<ɵStyleDataMap> {\n if (!keyframes.length) {\n return [];\n }\n if (keyframes[0] instanceof Map) {\n return keyframes as Array<ɵStyleDataMap>;\n }\n return keyframes.map((kf) => new Map(Object.entries(kf)));\n}\n\nexport function normalizeStyles(styles: ɵStyleDataMap | Array<ɵStyleDataMap>): ɵStyleDataMap {\n return Array.isArray(styles) ? new Map(...styles) : new Map(styles);\n}\n\nexport function setStyles(element: any, styles: ɵStyleDataMap, formerStyles?: ɵStyleDataMap) {\n styles.forEach((val, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n if (formerStyles && !formerStyles.has(prop)) {\n formerStyles.set(prop, element.style[camelProp]);\n }\n element.style[camelProp] = val;\n });\n}\n\nexport function eraseStyles(element: any, styles: ɵStyleDataMap) {\n styles.forEach((_, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = '';\n });\n}\n\nexport function normalizeAnimationEntry(\n steps: AnimationMetadata | AnimationMetadata[],\n): AnimationMetadata {\n if (Array.isArray(steps)) {\n if (steps.length == 1) return steps[0];\n return sequence(steps);\n }\n return steps as AnimationMetadata;\n}\n\nexport function validateStyleParams(\n value: string | number | null | undefined,\n options: AnimationOptions,\n errors: Error[],\n) {\n const params = options.params || {};\n const matches = extractStyleParams(value);\n if (matches.length) {\n matches.forEach((varName) => {\n if (!params.hasOwnProperty(varName)) {\n errors.push(invalidStyleParams(varName));\n }\n });\n }\n}\n\nconst PARAM_REGEX = /* @__PURE__ */ new RegExp(\n `${SUBSTITUTION_EXPR_START}\\\\s*(.+?)\\\\s*${SUBSTITUTION_EXPR_END}`,\n 'g',\n);\nexport function extractStyleParams(value: string | number | null | undefined): string[] {\n let params: string[] = [];\n if (typeof value === 'string') {\n let match: any;\n while ((match = PARAM_REGEX.exec(value))) {\n params.push(match[1] as string);\n }\n PARAM_REGEX.lastIndex = 0;\n }\n return params;\n}\n\nexport function interpolateParams(\n value: string | number,\n params: {[name: string]: any},\n errors: Error[],\n): string | number {\n const original = `${value}`;\n const str = original.replace(PARAM_REGEX, (_, varName) => {\n let localVal = params[varName];\n // this means that the value was never overridden by the data passed in by the user\n if (localVal == null) {\n errors.push(invalidParamValue(varName));\n localVal = '';\n }\n return localVal.toString();\n });\n\n // we do this to assert that numeric values stay as they are\n return str == original ? value : str;\n}\n\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nexport function dashCaseToCamelCase(input: string): string {\n return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());\n}\n\nexport function camelCaseToDashCase(input: string): string {\n return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nexport function allowPreviousPlayerStylesMerge(duration: number, delay: number) {\n return duration === 0 || delay === 0;\n}\n\nexport function balancePreviousStylesIntoKeyframes(\n element: any,\n keyframes: Array<ɵStyleDataMap>,\n previousStyles: ɵStyleDataMap,\n) {\n if (previousStyles.size && keyframes.length) {\n let startingKeyframe = keyframes[0];\n let missingStyleProps: string[] = [];\n previousStyles.forEach((val, prop) => {\n if (!startingKeyframe.has(prop)) {\n missingStyleProps.push(prop);\n }\n startingKeyframe.set(prop, val);\n });\n\n if (missingStyleProps.length) {\n for (let i = 1; i < keyframes.length; i++) {\n let kf = keyframes[i];\n missingStyleProps.forEach((prop) => kf.set(prop, computeStyle(element, prop)));\n }\n }\n }\n return keyframes;\n}\n\nexport function visitDslNode(\n visitor: AnimationDslVisitor,\n node: AnimationMetadata,\n context: any,\n): any;\nexport function visitDslNode(\n visitor: AnimationAstVisitor,\n node: AnimationAst<AnimationMetadataType>,\n context: any,\n): any;\nexport function visitDslNode(visitor: any, node: any, context: any): any {\n switch (node.type) {\n case AnimationMetadataType.Trigger:\n return visitor.visitTrigger(node, context);\n case AnimationMetadataType.State:\n return visitor.visitState(node, context);\n case AnimationMetadataType.Transition:\n return visitor.visitTransition(node, context);\n case AnimationMetadataType.Sequence:\n return visitor.visitSequence(node, context);\n case AnimationMetadataType.Group:\n return visitor.visitGroup(node, context);\n case AnimationMetadataType.Animate:\n return visitor.visitAnimate(node, context);\n case AnimationMetadataType.Keyframes:\n return visitor.visitKeyframes(node, context);\n case AnimationMetadataType.Style:\n return visitor.visitStyle(node, context);\n case AnimationMetadataType.Reference:\n return visitor.visitReference(node, context);\n case AnimationMetadataType.AnimateChild:\n return visitor.visitAnimateChild(node, context);\n case AnimationMetadataType.AnimateRef:\n return visitor.visitAnimateRef(node, context);\n case AnimationMetadataType.Query:\n return visitor.visitQuery(node, context);\n case AnimationMetadataType.Stagger:\n return visitor.visitStagger(node, context);\n default:\n throw invalidNodeType(node.type);\n }\n}\n\nexport function computeStyle(element: any, prop: string): string {\n return (<any>window.getComputedStyle(element))[prop];\n}\n"],"names":["RuntimeError","ɵAnimationGroupPlayer","normalizeKeyframes","PRE_STYLE"],"mappings":";;;;;;;;;AAWA,MAAM,UAAU,GAAG,OAAO;AAEpB,SAAU,kBAAkB,CAAC,GAAoB,EAAA;IACrD,OAAO,IAAIA,aAAY,CAErB,IAAA,8CAAA,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AAC;AACtD;;;;"} |
-252
| /** | ||
| * @license Angular v21.0.0-next.5 | ||
| * (c) 2010-2025 Google LLC. https://angular.io/ | ||
| * License: MIT | ||
| */ | ||
| import * as i0 from '@angular/core'; | ||
| import { RendererFactory2 } from '@angular/core'; | ||
| import { AnimationMetadata, AnimationOptions, AnimationPlayer } from './animation_player.d.js'; | ||
| export { AUTO_STYLE, AnimateChildOptions, AnimateTimings, AnimationAnimateChildMetadata, AnimationAnimateMetadata, AnimationAnimateRefMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata, AnimationMetadataType, AnimationQueryMetadata, AnimationQueryOptions, AnimationReferenceMetadata, AnimationSequenceMetadata, AnimationStaggerMetadata, AnimationStateMetadata, AnimationStyleMetadata, AnimationTransitionMetadata, AnimationTriggerMetadata, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, ɵStyleData, ɵStyleDataMap } from './animation_player.d.js'; | ||
| /** | ||
| * An injectable service that produces an animation sequence programmatically within an | ||
| * Angular component or directive. | ||
| * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * To use this service, add it to your component or directive as a dependency. | ||
| * The service is instantiated along with your component. | ||
| * | ||
| * Apps do not typically need to create their own animation players, but if you | ||
| * do need to, follow these steps: | ||
| * | ||
| * 1. Use the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> method | ||
| * to create a programmatic animation. The method returns an `AnimationFactory` instance. | ||
| * | ||
| * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element. | ||
| * | ||
| * 3. Use the player object to control the animation programmatically. | ||
| * | ||
| * For example: | ||
| * | ||
| * ```ts | ||
| * // import the service from BrowserAnimationsModule | ||
| * import {AnimationBuilder} from '@angular/animations'; | ||
| * // require the service as a dependency | ||
| * class MyCmp { | ||
| * constructor(private _builder: AnimationBuilder) {} | ||
| * | ||
| * makeAnimation(element: any) { | ||
| * // first define a reusable animation | ||
| * const myAnimation = this._builder.build([ | ||
| * style({ width: 0 }), | ||
| * animate(1000, style({ width: '100px' })) | ||
| * ]); | ||
| * | ||
| * // use the returned factory object to create a player | ||
| * const player = myAnimation.create(element); | ||
| * | ||
| * player.play(); | ||
| * } | ||
| * } | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare abstract class AnimationBuilder { | ||
| /** | ||
| * Builds a factory for producing a defined animation. | ||
| * @param animation A reusable animation definition. | ||
| * @returns A factory object that can create a player for the defined animation. | ||
| * @see {@link animate} | ||
| */ | ||
| abstract build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory; | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<AnimationBuilder, never>; | ||
| static ɵprov: i0.ɵɵInjectableDeclaration<AnimationBuilder>; | ||
| } | ||
| /** | ||
| * A factory object returned from the | ||
| * <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> | ||
| * method. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| declare abstract class AnimationFactory { | ||
| /** | ||
| * Creates an `AnimationPlayer` instance for the reusable animation defined by | ||
| * the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> | ||
| * method that created this factory and attaches the new player a DOM element. | ||
| * | ||
| * @param element The DOM element to which to attach the player. | ||
| * @param options A set of options that can include a time delay and | ||
| * additional developer-defined parameters. | ||
| */ | ||
| abstract create(element: any, options?: AnimationOptions): AnimationPlayer; | ||
| } | ||
| declare class BrowserAnimationBuilder extends AnimationBuilder { | ||
| private animationModuleType; | ||
| private _nextAnimationId; | ||
| private _renderer; | ||
| constructor(rootRenderer: RendererFactory2, doc: Document); | ||
| build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory; | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<BrowserAnimationBuilder, never>; | ||
| static ɵprov: i0.ɵɵInjectableDeclaration<BrowserAnimationBuilder>; | ||
| } | ||
| /** | ||
| * An instance of this class is returned as an event parameter when an animation | ||
| * callback is captured for an animation either during the start or done phase. | ||
| * | ||
| * ```ts | ||
| * @Component({ | ||
| * host: { | ||
| * '[@myAnimationTrigger]': 'someExpression', | ||
| * '(@myAnimationTrigger.start)': 'captureStartEvent($event)', | ||
| * '(@myAnimationTrigger.done)': 'captureDoneEvent($event)', | ||
| * }, | ||
| * animations: [ | ||
| * trigger("myAnimationTrigger", [ | ||
| * // ... | ||
| * ]) | ||
| * ] | ||
| * }) | ||
| * class MyComponent { | ||
| * someExpression: any = false; | ||
| * captureStartEvent(event: AnimationEvent) { | ||
| * // the toState, fromState and totalTime data is accessible from the event variable | ||
| * } | ||
| * | ||
| * captureDoneEvent(event: AnimationEvent) { | ||
| * // the toState, fromState and totalTime data is accessible from the event variable | ||
| * } | ||
| * } | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| interface AnimationEvent { | ||
| /** | ||
| * The name of the state from which the animation is triggered. | ||
| */ | ||
| fromState: string; | ||
| /** | ||
| * The name of the state in which the animation completes. | ||
| */ | ||
| toState: string; | ||
| /** | ||
| * The time it takes the animation to complete, in milliseconds. | ||
| */ | ||
| totalTime: number; | ||
| /** | ||
| * The animation phase in which the callback was invoked, one of | ||
| * "start" or "done". | ||
| */ | ||
| phaseName: string; | ||
| /** | ||
| * The element to which the animation is attached. | ||
| */ | ||
| element: any; | ||
| /** | ||
| * Internal. | ||
| */ | ||
| triggerName: string; | ||
| /** | ||
| * Internal. | ||
| */ | ||
| disabled: boolean; | ||
| } | ||
| /** | ||
| * The list of error codes used in runtime code of the `animations` package. | ||
| * Reserved error code range: 3000-3999. | ||
| */ | ||
| declare const enum RuntimeErrorCode { | ||
| INVALID_TIMING_VALUE = 3000, | ||
| INVALID_STYLE_PARAMS = 3001, | ||
| INVALID_STYLE_VALUE = 3002, | ||
| INVALID_PARAM_VALUE = 3003, | ||
| INVALID_NODE_TYPE = 3004, | ||
| INVALID_CSS_UNIT_VALUE = 3005, | ||
| INVALID_TRIGGER = 3006, | ||
| INVALID_DEFINITION = 3007, | ||
| INVALID_STATE = 3008, | ||
| INVALID_PROPERTY = 3009, | ||
| INVALID_PARALLEL_ANIMATION = 3010, | ||
| INVALID_KEYFRAMES = 3011, | ||
| INVALID_OFFSET = 3012, | ||
| INVALID_STAGGER = 3013, | ||
| INVALID_QUERY = 3014, | ||
| INVALID_EXPRESSION = 3015, | ||
| INVALID_TRANSITION_ALIAS = 3016, | ||
| NEGATIVE_STEP_VALUE = 3100, | ||
| NEGATIVE_DELAY_VALUE = 3101, | ||
| KEYFRAME_OFFSETS_OUT_OF_ORDER = 3200, | ||
| KEYFRAMES_MISSING_OFFSETS = 3202, | ||
| MISSING_OR_DESTROYED_ANIMATION = 3300, | ||
| MISSING_PLAYER = 3301, | ||
| MISSING_TRIGGER = 3302, | ||
| MISSING_EVENT = 3303, | ||
| UNSUPPORTED_TRIGGER_EVENT = 3400, | ||
| UNREGISTERED_TRIGGER = 3401, | ||
| TRIGGER_TRANSITIONS_FAILED = 3402, | ||
| TRIGGER_PARSING_FAILED = 3403, | ||
| TRIGGER_BUILD_FAILED = 3404, | ||
| VALIDATION_FAILED = 3500, | ||
| BUILDING_FAILED = 3501, | ||
| ANIMATION_FAILED = 3502, | ||
| REGISTRATION_FAILED = 3503, | ||
| CREATE_ANIMATION_FAILED = 3504, | ||
| TRANSITION_FAILED = 3505, | ||
| BROWSER_ANIMATION_BUILDER_INJECTED_WITHOUT_ANIMATIONS = 3600 | ||
| } | ||
| /** | ||
| * A programmatic controller for a group of reusable animations. | ||
| * Used internally to control animations. | ||
| * | ||
| * @see {@link AnimationPlayer} | ||
| * @see {@link animations/group group} | ||
| * | ||
| */ | ||
| declare class AnimationGroupPlayer implements AnimationPlayer { | ||
| private _onDoneFns; | ||
| private _onStartFns; | ||
| private _finished; | ||
| private _started; | ||
| private _destroyed; | ||
| private _onDestroyFns; | ||
| parentPlayer: AnimationPlayer | null; | ||
| totalTime: number; | ||
| readonly players: AnimationPlayer[]; | ||
| constructor(_players: AnimationPlayer[]); | ||
| private _onFinish; | ||
| init(): void; | ||
| onStart(fn: () => void): void; | ||
| private _onStart; | ||
| onDone(fn: () => void): void; | ||
| onDestroy(fn: () => void): void; | ||
| hasStarted(): boolean; | ||
| play(): void; | ||
| pause(): void; | ||
| restart(): void; | ||
| finish(): void; | ||
| destroy(): void; | ||
| private _onDestroy; | ||
| reset(): void; | ||
| setPosition(p: number): void; | ||
| getPosition(): number; | ||
| beforeDestroy(): void; | ||
| } | ||
| declare const ɵPRE_STYLE = "!"; | ||
| export { AnimationBuilder, AnimationFactory, AnimationMetadata, AnimationOptions, AnimationPlayer, AnimationGroupPlayer as ɵAnimationGroupPlayer, BrowserAnimationBuilder as ɵBrowserAnimationBuilder, ɵPRE_STYLE, RuntimeErrorCode as ɵRuntimeErrorCode }; | ||
| export type { AnimationEvent }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
795152
0.06%