@angular/animations 13.1.0-next.1 → 13.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/animations.d.ts +153 -154
  2. package/browser/browser.d.ts +9 -8
  3. package/browser/testing/testing.d.ts +2 -2
  4. package/esm2020/browser/src/dsl/animation_ast_builder.mjs +3 -2
  5. package/esm2020/browser/src/dsl/animation_timeline_builder.mjs +8 -8
  6. package/esm2020/browser/src/dsl/element_instruction_map.mjs +3 -10
  7. package/esm2020/browser/src/private_export.mjs +2 -2
  8. package/esm2020/browser/src/render/animation_driver.mjs +8 -7
  9. package/esm2020/browser/src/render/css_keyframes/css_keyframes_driver.mjs +5 -4
  10. package/esm2020/browser/src/render/shared.mjs +1 -19
  11. package/esm2020/browser/src/render/transition_animation_engine.mjs +36 -55
  12. package/esm2020/browser/src/render/web_animations/web_animations_driver.mjs +5 -4
  13. package/esm2020/browser/src/render/web_animations/web_animations_player.mjs +7 -4
  14. package/esm2020/browser/src/util.mjs +1 -3
  15. package/esm2020/browser/testing/src/mock_animation_driver.mjs +4 -4
  16. package/esm2020/src/animation_metadata.mjs +153 -154
  17. package/esm2020/src/version.mjs +3 -16
  18. package/fesm2015/animations.mjs +153 -154
  19. package/fesm2015/animations.mjs.map +1 -1
  20. package/fesm2015/browser/testing.mjs +4 -4
  21. package/fesm2015/browser/testing.mjs.map +1 -1
  22. package/fesm2015/browser.mjs +69 -105
  23. package/fesm2015/browser.mjs.map +1 -1
  24. package/fesm2020/animations.mjs +153 -154
  25. package/fesm2020/animations.mjs.map +1 -1
  26. package/fesm2020/browser/testing.mjs +4 -4
  27. package/fesm2020/browser/testing.mjs.map +1 -1
  28. package/fesm2020/browser.mjs +66 -105
  29. package/fesm2020/browser.mjs.map +1 -1
  30. package/package.json +2 -2
@@ -10,19 +10,6 @@
10
10
  * @description
11
11
  * Entry point for all public APIs of the animation package.
12
12
  */
13
- /**
14
- * @description
15
- *
16
- * Represents the version of angular/animations
17
- */
18
- export class Version {
19
- constructor(full) {
20
- this.full = full;
21
- const splits = full.split('.');
22
- this.major = splits[0];
23
- this.minor = splits[1];
24
- this.patch = splits.slice(2).join('.');
25
- }
26
- }
27
- export const VERSION = new Version('13.1.0-next.1');
28
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvc3JjL3ZlcnNpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUg7Ozs7R0FJRztBQUVIOzs7O0dBSUc7QUFDSCxNQUFNLE9BQU8sT0FBTztJQUtsQixZQUFtQixJQUFZO1FBQVosU0FBSSxHQUFKLElBQUksQ0FBUTtRQUM3QixNQUFNLE1BQU0sR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQy9CLElBQUksQ0FBQyxLQUFLLEdBQUcsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxLQUFLLEdBQUcsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxLQUFLLEdBQUcsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDekMsQ0FBQztDQUNGO0FBRUQsTUFBTSxDQUFDLE1BQU0sT0FBTyxHQUFHLElBQUksT0FBTyxDQUFDLG1CQUFtQixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgR29vZ2xlIExMQyBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5pby9saWNlbnNlXG4gKi9cblxuLyoqXG4gKiBAbW9kdWxlXG4gKiBAZGVzY3JpcHRpb25cbiAqIEVudHJ5IHBvaW50IGZvciBhbGwgcHVibGljIEFQSXMgb2YgdGhlIGFuaW1hdGlvbiBwYWNrYWdlLlxuICovXG5cbi8qKlxuICogQGRlc2NyaXB0aW9uXG4gKlxuICogUmVwcmVzZW50cyB0aGUgdmVyc2lvbiBvZiBhbmd1bGFyL2FuaW1hdGlvbnNcbiAqL1xuZXhwb3J0IGNsYXNzIFZlcnNpb24ge1xuICBwdWJsaWMgcmVhZG9ubHkgbWFqb3I6IHN0cmluZztcbiAgcHVibGljIHJlYWRvbmx5IG1pbm9yOiBzdHJpbmc7XG4gIHB1YmxpYyByZWFkb25seSBwYXRjaDogc3RyaW5nO1xuXG4gIGNvbnN0cnVjdG9yKHB1YmxpYyBmdWxsOiBzdHJpbmcpIHtcbiAgICBjb25zdCBzcGxpdHMgPSBmdWxsLnNwbGl0KCcuJyk7XG4gICAgdGhpcy5tYWpvciA9IHNwbGl0c1swXTtcbiAgICB0aGlzLm1pbm9yID0gc3BsaXRzWzFdO1xuICAgIHRoaXMucGF0Y2ggPSBzcGxpdHMuc2xpY2UoMikuam9pbignLicpO1xuICB9XG59XG5cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gbmV3IFZlcnNpb24oJzAuMC4wLVBMQUNFSE9MREVSJyk7XG4iXX0=
13
+ import { Version } from '@angular/core';
14
+ export const VERSION = new Version('13.1.1');
15
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvc3JjL3ZlcnNpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUg7Ozs7R0FJRztBQUNILE9BQU8sRUFBQyxPQUFPLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFFdEMsTUFBTSxDQUFDLE1BQU0sT0FBTyxHQUFHLElBQUksT0FBTyxDQUFDLG1CQUFtQixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgR29vZ2xlIExMQyBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5pby9saWNlbnNlXG4gKi9cblxuLyoqXG4gKiBAbW9kdWxlXG4gKiBAZGVzY3JpcHRpb25cbiAqIEVudHJ5IHBvaW50IGZvciBhbGwgcHVibGljIEFQSXMgb2YgdGhlIGFuaW1hdGlvbiBwYWNrYWdlLlxuICovXG5pbXBvcnQge1ZlcnNpb259IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5leHBvcnQgY29uc3QgVkVSU0lPTiA9IG5ldyBWZXJzaW9uKCcwLjAuMC1QTEFDRUhPTERFUicpO1xuIl19
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v13.1.0-next.1
2
+ * @license Angular v13.1.1
3
3
  * (c) 2010-2021 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -386,8 +386,8 @@ function sequence(steps, options = null) {
386
386
  * style({ width: 100, height: 0 })
387
387
  * ```
388
388
  *
389
- * The following example uses auto-styling to allow a component to animate from
390
- * a height of 0 up to the height of the parent element:
389
+ * The following example uses auto-styling to allow an element to animate from
390
+ * a height of 0 up to its full height:
391
391
  *
392
392
  * ```
393
393
  * style({ height: 0 }),
@@ -480,170 +480,148 @@ function keyframes(steps) {
480
480
  return { type: 5 /* Keyframes */, steps };
481
481
  }
482
482
  /**
483
- * Declares an animation transition as a sequence of animation steps to run when a given
484
- * condition is satisfied. The condition is a Boolean expression or function that compares
485
- * the previous and current animation states, and returns true if this transition should occur.
486
- * When the state criteria of a defined transition are met, the associated animation is
487
- * triggered.
488
- *
489
- * @param stateChangeExpr A Boolean expression or function that compares the previous and current
490
- * animation states, and returns true if this transition should occur. Note that "true" and "false"
491
- * match 1 and 0, respectively. An expression is evaluated each time a state change occurs in the
492
- * animation trigger element.
493
- * The animation steps run when the expression evaluates to true.
494
- *
495
- * - A state-change string takes the form "state1 => state2", where each side is a defined animation
496
- * state, or an asterix (*) to refer to a dynamic start or end state.
497
- * - The expression string can contain multiple comma-separated statements;
498
- * for example "state1 => state2, state3 => state4".
499
- * - Special values `:enter` and `:leave` initiate a transition on the entry and exit states,
500
- * equivalent to "void => *" and "* => void".
501
- * - Special values `:increment` and `:decrement` initiate a transition when a numeric value has
502
- * increased or decreased in value.
503
- * - A function is executed each time a state change occurs in the animation trigger element.
504
- * The animation steps run when the function returns true.
505
- *
506
- * @param steps One or more animation objects, as returned by the `animate()` or
507
- * `sequence()` function, that form a transformation from one state to another.
508
- * A sequence is used by default when you pass an array.
509
- * @param options An options object that can contain a delay value for the start of the animation,
510
- * and additional developer-defined parameters. Provided values for additional parameters are used
511
- * as defaults, and override values can be passed to the caller on invocation.
512
- * @returns An object that encapsulates the transition data.
483
+ * Declares an animation transition which is played when a certain specified condition is met.
513
484
  *
514
- * @usageNotes
515
- * The template associated with a component binds an animation trigger to an element.
485
+ * @param stateChangeExpr A string with a specific format or a function that specifies when the
486
+ * animation transition should occur (see [State Change Expression](#state-change-expression)).
516
487
  *
517
- * ```HTML
518
- * <!-- somewhere inside of my-component-tpl.html -->
519
- * <div [@myAnimationTrigger]="myStatusExp">...</div>
520
- * ```
488
+ * @param steps One or more animation objects that represent the animation's instructions.
521
489
  *
522
- * All transitions are defined within an animation trigger,
523
- * along with named states that the transitions change to and from.
490
+ * @param options An options object that can be used to specify a delay for the animation or provide
491
+ * custom parameters for it.
524
492
  *
525
- * ```typescript
526
- * trigger("myAnimationTrigger", [
527
- * // define states
528
- * state("on", style({ background: "green" })),
529
- * state("off", style({ background: "grey" })),
530
- * ...]
531
- * ```
493
+ * @returns An object that encapsulates the transition data.
532
494
  *
533
- * Note that when you call the `sequence()` function within a `{@link animations/group group()}`
534
- * or a `transition()` call, execution does not continue to the next instruction
535
- * until each of the inner animation steps have completed.
495
+ * @usageNotes
536
496
  *
537
- * ### Syntax examples
497
+ * ### State Change Expression
498
+ *
499
+ * The State Change Expression instructs Angular when to run the transition's animations, it can
500
+ *either be
501
+ * - a string with a specific syntax
502
+ * - or a function that compares the previous and current state (value of the expression bound to
503
+ * the element's trigger) and returns `true` if the transition should occur or `false` otherwise
504
+ *
505
+ * The string format can be:
506
+ * - `fromState => toState`, which indicates that the transition's animations should occur then the
507
+ * expression bound to the trigger's element goes from `fromState` to `toState`
508
+ *
509
+ * _Example:_
510
+ * ```typescript
511
+ * transition('open => closed', animate('.5s ease-out', style({ height: 0 }) ))
512
+ * ```
513
+ *
514
+ * - `fromState <=> toState`, which indicates that the transition's animations should occur then
515
+ * the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa
516
+ *
517
+ * _Example:_
518
+ * ```typescript
519
+ * transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)'))
520
+ * ```
521
+ *
522
+ * - `:enter`/`:leave`, which indicates that the transition's animations should occur when the
523
+ * element enters or exists the DOM
524
+ *
525
+ * _Example:_
526
+ * ```typescript
527
+ * transition(':enter', [
528
+ * style({ opacity: 0 }),
529
+ * animate('500ms', style({ opacity: 1 }))
530
+ * ])
531
+ * ```
532
+ *
533
+ * - `:increment`/`:decrement`, which indicates that the transition's animations should occur when
534
+ * the numerical expression bound to the trigger's element has increased in value or decreased
535
+ *
536
+ * _Example:_
537
+ * ```typescript
538
+ * transition(':increment', query('@counter', animateChild()))
539
+ * ```
540
+ *
541
+ * - a sequence of any of the above divided by commas, which indicates that transition's animations
542
+ * should occur whenever one of the state change expressions matches
543
+ *
544
+ * _Example:_
545
+ * ```typescript
546
+ * transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([
547
+ * style({ transform: 'scale(1)', offset: 0}),
548
+ * style({ transform: 'scale(1.1)', offset: 0.7}),
549
+ * style({ transform: 'scale(1)', offset: 1})
550
+ * ]))),
551
+ * ```
552
+ *
553
+ * Also note that in such context:
554
+ * - `void` can be used to indicate the absence of the element
555
+ * - asterisks can be used as wildcards that match any state
556
+ * - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is
557
+ * equivalent to `:leave`)
558
+ * - `true` and `false` also match expression values of `1` and `0` respectively (but do not match
559
+ * _truthy_ and _falsy_ values)
560
+ *
561
+ * <div class="alert is-helpful">
562
+ *
563
+ * Be careful about entering end leaving elements as their transitions present a common
564
+ * pitfall for developers.
565
+ *
566
+ * Note that when an element with a trigger enters the DOM its `:enter` transition always
567
+ * gets executed, but its `:leave` transition will not be executed if the element is removed
568
+ * alongside its parent (as it will be removed "without warning" before its transition has
569
+ * a chance to be executed, the only way that such transition can occur is if the element
570
+ * is exiting the DOM on its own).
538
571
  *
539
- * The following examples define transitions between the two defined states (and default states),
540
- * using various options:
541
572
  *
542
- * ```typescript
543
- * // Transition occurs when the state value
544
- * // bound to "myAnimationTrigger" changes from "on" to "off"
545
- * transition("on => off", animate(500))
546
- * // Run the same animation for both directions
547
- * transition("on <=> off", animate(500))
548
- * // Define multiple state-change pairs separated by commas
549
- * transition("on => off, off => void", animate(500))
550
- * ```
573
+ * </div>
551
574
  *
552
- * ### Special values for state-change expressions
575
+ * ### Animating to a Final State
553
576
  *
554
- * - Catch-all state change for when an element is inserted into the page and the
555
- * destination state is unknown:
577
+ * If the final step in a transition is a call to `animate()` that uses a timing value
578
+ * with no `style` data, that step is automatically considered the final animation arc,
579
+ * for the element to reach the final state, in such case Angular automatically adds or removes
580
+ * CSS styles to ensure that the element is in the correct final state.
556
581
  *
557
- * ```typescript
558
- * transition("void => *", [
559
- * style({ opacity: 0 }),
560
- * animate(500)
561
- * ])
562
- * ```
563
582
  *
564
- * - Capture a state change between any states:
583
+ * ### Usage Examples
565
584
  *
566
- * `transition("* => *", animate("1s 0s"))`
585
+ * - Transition animations applied based on
586
+ * the trigger's expression value
567
587
  *
568
- * - Entry and exit transitions:
588
+ * ```HTML
589
+ * <div [@myAnimationTrigger]="myStatusExp">
590
+ * ...
591
+ * </div>
592
+ * ```
569
593
  *
570
- * ```typescript
571
- * transition(":enter", [
572
- * style({ opacity: 0 }),
573
- * animate(500, style({ opacity: 1 }))
574
- * ]),
575
- * transition(":leave", [
576
- * animate(500, style({ opacity: 0 }))
594
+ * ```typescript
595
+ * trigger("myAnimationTrigger", [
596
+ * ..., // states
597
+ * transition("on => off, open => closed", animate(500)),
598
+ * transition("* <=> error", query('.indicator', animateChild()))
577
599
  * ])
578
- * ```
579
- *
580
- * - Use `:increment` and `:decrement` to initiate transitions:
581
- *
582
- * ```typescript
583
- * transition(":increment", group([
584
- * query(':enter', [
585
- * style({ left: '100%' }),
586
- * animate('0.5s ease-out', style('*'))
587
- * ]),
588
- * query(':leave', [
589
- * animate('0.5s ease-out', style({ left: '-100%' }))
590
- * ])
591
- * ]))
592
- *
593
- * transition(":decrement", group([
594
- * query(':enter', [
595
- * style({ left: '100%' }),
596
- * animate('0.5s ease-out', style('*'))
597
- * ]),
598
- * query(':leave', [
599
- * animate('0.5s ease-out', style({ left: '-100%' }))
600
- * ])
601
- * ]))
602
- * ```
603
- *
604
- * ### State-change functions
605
- *
606
- * Here is an example of a `fromState` specified as a state-change function that invokes an
607
- * animation when true:
608
- *
609
- * ```typescript
610
- * transition((fromState, toState) =>
611
- * {
612
- * return fromState == "off" && toState == "on";
613
- * },
614
- * animate("1s 0s"))
615
- * ```
600
+ * ```
616
601
  *
617
- * ### Animating to the final state
618
- *
619
- * If the final step in a transition is a call to `animate()` that uses a timing value
620
- * with no style data, that step is automatically considered the final animation arc,
621
- * for the element to reach the final state. Angular automatically adds or removes
622
- * CSS styles to ensure that the element is in the correct final state.
623
- *
624
- * The following example defines a transition that starts by hiding the element,
625
- * then makes sure that it animates properly to whatever state is currently active for trigger:
626
- *
627
- * ```typescript
628
- * transition("void => *", [
629
- * style({ opacity: 0 }),
630
- * animate(500)
631
- * ])
632
- * ```
633
- * ### Boolean value matching
634
- * If a trigger binding value is a Boolean, it can be matched using a transition expression
635
- * that compares true and false or 1 and 0. For example:
602
+ * - Transition animations applied based on custom logic dependent
603
+ * on the trigger's expression value and provided parameters
636
604
  *
637
- * ```
638
- * // in the template
639
- * <div [@openClose]="open ? true : false">...</div>
640
- * // in the component metadata
641
- * trigger('openClose', [
642
- * state('true', style({ height: '*' })),
643
- * state('false', style({ height: '0px' })),
644
- * transition('false <=> true', animate(500))
645
- * ])
646
- * ```
605
+ * ```HTML
606
+ * <div [@myAnimationTrigger]="{
607
+ * value: stepName,
608
+ * params: { target: currentTarget }
609
+ * }">
610
+ * ...
611
+ * </div>
612
+ * ```
613
+ *
614
+ * ```typescript
615
+ * trigger("myAnimationTrigger", [
616
+ * ..., // states
617
+ * transition(
618
+ * (fromState, toState, _element, params) =>
619
+ * ['firststep', 'laststep'].includes(fromState.toLowerCase())
620
+ * && toState === params?.['target'],
621
+ * animate('1s')
622
+ * )
623
+ * ])
624
+ * ```
647
625
  *
648
626
  * @publicApi
649
627
  **/
@@ -715,10 +693,6 @@ function animation(steps, options = null) {
715
693
  * with animations that are assigned using the Angular animation library. CSS keyframes
716
694
  * and transitions are not handled by this API.
717
695
  *
718
- * `animateChild()` does not currently work with route transition animations. Please see
719
- * GitHub Issue {@link https://github.com/angular/angular/issues/30477 #30477} for more
720
- * information.
721
- *
722
696
  * @publicApi
723
697
  */
724
698
  function animateChild(options = null) {
@@ -743,7 +717,9 @@ function useAnimation(animation, options = null) {
743
717
  *
744
718
  * @param selector The element to query, or a set of elements that contain Angular-specific
745
719
  * characteristics, specified with one or more of the following tokens.
746
- * - `query(":enter")` or `query(":leave")` : Query for newly inserted/removed elements.
720
+ * - `query(":enter")` or `query(":leave")` : Query for newly inserted/removed elements (not
721
+ * all elements can be queried via these tokens, see
722
+ * [Entering and Leaving Elements](#entering-and-leaving-elements))
747
723
  * - `query(":animating")` : Query all currently animating elements.
748
724
  * - `query("@triggerName")` : Query elements that contain an animation trigger.
749
725
  * - `query("@*")` : Query all elements that contain an animation triggers.
@@ -756,6 +732,9 @@ function useAnimation(animation, options = null) {
756
732
  * @return An object that encapsulates the query data.
757
733
  *
758
734
  * @usageNotes
735
+ *
736
+ * ### Multiple Tokens
737
+ *
759
738
  * Tokens can be merged into a combined query selector string. For example:
760
739
  *
761
740
  * ```typescript
@@ -783,6 +762,26 @@ function useAnimation(animation, options = null) {
783
762
  * ], { optional: true })
784
763
  * ```
785
764
  *
765
+ * ### Entering and Leaving Elements
766
+ *
767
+ * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones
768
+ * that can are those that Angular assumes can enter/leave based on their own logic
769
+ * (if their insertion/removal is simply a consequence of that of their parent they
770
+ * should be queried via a different token in their parent's `:enter`/`:leave` transitions).
771
+ *
772
+ * The only elements Angular assumes can enter/leave on their own logic (thus the only
773
+ * ones that can be queried via the `:enter` and `:leave` tokens) are:
774
+ * - Those inserted dynamically (via `ViewContainerRef`)
775
+ * - Those that have a structural directive (which, under the hood, are a subset of the above ones)
776
+ *
777
+ * <div class="alert is-helpful">
778
+ *
779
+ * Note that elements will be successfully queried via `:enter`/`:leave` even if their
780
+ * insertion/removal is not done manually via `ViewContainerRef`or caused by their structural
781
+ * directive (e.g. they enter/exit alongside their parent).
782
+ *
783
+ * </div>
784
+ *
786
785
  * ### Usage Example
787
786
  *
788
787
  * The following example queries for inner elements and animates them