Home / Function/ stringifyAnimations() — astro Function Reference

stringifyAnimations() — astro Function Reference

Architecture documentation for the stringifyAnimations() function in transition.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  3aecb01c_506c_3888_c7f9_e9e3dc14f2e3["stringifyAnimations()"]
  f4a9c12d_07bd_6de6_237f_8553c55f6fef["transition.ts"]
  3aecb01c_506c_3888_c7f9_e9e3dc14f2e3 -->|defined in| f4a9c12d_07bd_6de6_237f_8553c55f6fef
  f7291c38_0905_3597_aad0_0aff4467dbc8["stringifyAnimation()"]
  f7291c38_0905_3597_aad0_0aff4467dbc8 -->|calls| 3aecb01c_506c_3888_c7f9_e9e3dc14f2e3
  4dc8857b_844c_b95e_8237_27ba9c953524["animationBuilder()"]
  3aecb01c_506c_3888_c7f9_e9e3dc14f2e3 -->|calls| 4dc8857b_844c_b95e_8237_27ba9c953524
  998f0a2c_1b37_c059_c074_e8b2a9198c35["addAnimationProperty()"]
  3aecb01c_506c_3888_c7f9_e9e3dc14f2e3 -->|calls| 998f0a2c_1b37_c059_c074_e8b2a9198c35
  6a0dc7aa_35e4_faf3_1aac_2aa0d63c4bf7["toTimeValue()"]
  3aecb01c_506c_3888_c7f9_e9e3dc14f2e3 -->|calls| 6a0dc7aa_35e4_faf3_1aac_2aa0d63c4bf7
  2527a613_a18b_f09f_d953_5ec7867c60a5["toString()"]
  3aecb01c_506c_3888_c7f9_e9e3dc14f2e3 -->|calls| 2527a613_a18b_f09f_d953_5ec7867c60a5
  style 3aecb01c_506c_3888_c7f9_e9e3dc14f2e3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/server/transition.ts lines 238–261

function stringifyAnimations(anims: TransitionAnimation[]): string {
	const builder = animationBuilder();

	for (const anim of anims) {
		if (anim.duration) {
			addAnimationProperty(builder, 'animation-duration', toTimeValue(anim.duration));
		}
		if (anim.easing) {
			addAnimationProperty(builder, 'animation-timing-function', anim.easing);
		}
		if (anim.direction) {
			addAnimationProperty(builder, 'animation-direction', anim.direction);
		}
		if (anim.delay) {
			addAnimationProperty(builder, 'animation-delay', anim.delay);
		}
		if (anim.fillMode) {
			addAnimationProperty(builder, 'animation-fill-mode', anim.fillMode);
		}
		addAnimationProperty(builder, 'animation-name', anim.name);
	}

	return builder.toString();
}

Domain

Subdomains

Frequently Asked Questions

What does stringifyAnimations() do?
stringifyAnimations() is a function in the astro codebase, defined in packages/astro/src/runtime/server/transition.ts.
Where is stringifyAnimations() defined?
stringifyAnimations() is defined in packages/astro/src/runtime/server/transition.ts at line 238.
What does stringifyAnimations() call?
stringifyAnimations() calls 4 function(s): addAnimationProperty, animationBuilder, toString, toTimeValue.
What calls stringifyAnimations()?
stringifyAnimations() is called by 1 function(s): stringifyAnimation.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free