@hilux/ngx-motion 1.0.15 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +385 -30
- package/fesm2022/hilux-ngx-motion.mjs +1562 -0
- package/fesm2022/hilux-ngx-motion.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/directives/motion-if.directive.d.ts +14 -0
- package/lib/directives/motion-one.directive.d.ts +142 -0
- package/lib/services/motion-animation.service.d.ts +20 -0
- package/lib/services/motion-browser-safe.d.ts +10 -0
- package/lib/services/motion-one.service.d.ts +87 -0
- package/package.json +35 -55
- package/public-api.d.ts +6 -0
- package/main.38a76835f287cd47.js +0 -1
- package/polyfills.d01a0142b6650731.js +0 -1
- package/runtime.aacc6cb1e6befba3.js +0 -1
- package/tailwind.config.js +0 -260
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hilux-ngx-motion.mjs","sources":["../../../projects/ngx-motion/src/lib/services/motion-one.service.ts","../../../projects/ngx-motion/src/lib/services/motion-animation.service.ts","../../../projects/ngx-motion/src/lib/directives/motion-one.directive.ts","../../../projects/ngx-motion/src/lib/directives/motion-if.directive.ts","../../../projects/ngx-motion/src/public-api.ts","../../../projects/ngx-motion/src/hilux-ngx-motion.ts"],"sourcesContent":["import {\n Injectable,\n Inject,\n signal,\n PLATFORM_ID\n } from '@angular/core';\n import { DOCUMENT, isPlatformBrowser } from '@angular/common';\n import { fromEvent, Subscription, Subject, Observable, timer } from 'rxjs';\n import { throttleTime, debounceTime, take, map } from 'rxjs/operators';\n import { Router } from '@angular/router';\n \n // Define the interface for motion elements\n export interface MotionElement {\n elementId: string;\n getDuration(): number;\n runInitAnimation(): void;\n runExitAnimation(): void;\n cancel(): void;\n route?: string;\n }\n \n @Injectable({\n providedIn: 'root',\n })\n export class MotionOneService {\n private scrollSubscription: Subscription;\n private motionElements: MotionElement[] = [];\n scrollYProgress = signal(0);\n totalExitDuration: number = 0;\n \n // Subject that emits when all exit animations for a route are complete\n private exitAnimationsComplete = new Subject<string>();\n \n // Subject that emits when all enter animations for a route are complete\n private enterAnimationsComplete = new Subject<string>();\n \n // Track active exit animations by route\n private activeExitAnimations: Map<string, number> = new Map();\n \n // Track active enter animations by route\n private activeEnterAnimations: Map<string, number> = new Map();\n \n constructor(\n private router: Router,\n @Inject(DOCUMENT) private document: Document,\n @Inject(PLATFORM_ID) private platformId: Object\n ) {\n this.setupScrollListener();\n this.scrollSubscription = new Subscription();\n }\n \n ngOnDestroy() {\n if (this.scrollSubscription) {\n this.scrollSubscription.unsubscribe();\n }\n this.exitAnimationsComplete.complete();\n this.enterAnimationsComplete.complete();\n }\n \n private updateTotalExitDuration() {\n if (!isPlatformBrowser(this.platformId)) return;\n \n this.totalExitDuration = this.motionElements.reduce((total, element) => {\n return total + element.getDuration();\n }, 0);\n }\n \n private setupScrollListener() {\n if (!isPlatformBrowser(this.platformId)) return;\n \n this.scrollSubscription = fromEvent(window, 'scroll')\n .pipe(\n throttleTime(16), // Limit to about 60fps\n debounceTime(1), // Wait for scroll to settle\n )\n .subscribe(() => {\n this.updateScrollProgress();\n });\n this.updateScrollProgress();\n }\n \n private updateScrollProgress() {\n if (!isPlatformBrowser(this.platformId)) return;\n \n const doc = this.document.documentElement;\n const scrollTop = window.scrollY || doc.scrollTop;\n const scrollHeight = doc.scrollHeight - doc.clientHeight;\n const progress =\n scrollHeight > 0 ? Math.round((scrollTop / scrollHeight) * 100) : 0;\n this.scrollYProgress.set(progress);\n }\n \n registerMotionElement(element: MotionElement) {\n this.motionElements.push(element);\n this.updateTotalExitDuration();\n }\n \n unregisterMotionElement(element: MotionElement) {\n this.motionElements = this.motionElements.filter((e) => e !== element);\n this.updateTotalExitDuration();\n }\n \n getMotionElements(): MotionElement[] {\n return this.motionElements;\n }\n \n getAllElementsByRoute(route: string): MotionElement[] {\n const elements = this.motionElements.filter(element => element.route === route);\n //console.log(`[MotionOneService] Found ${elements.length} elements for route ${route} (out of ${this.motionElements.length} total)`);\n \n\n \n return elements;\n }\n \n cancelAllAnimations() {\n if (!isPlatformBrowser(this.platformId)) return;\n \n this.motionElements.forEach((motion) => {\n motion.cancel();\n });\n }\n \n runAllEnterAnimations(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n \n this.motionElements.forEach((motion) => {\n motion.runInitAnimation();\n });\n } \n \n runAllExitAnimations(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n \n this.motionElements.forEach((motion) => {\n console.log(motion)\n motion.runExitAnimation();\n });\n }\n \n /**\n * Get an observable that emits true when all exit animations for a route are complete\n * @param route The route to check for animation completion\n * @returns Observable that emits true when animations are complete\n */\n getExitAnimationsComplete(route: string): Observable<boolean> {\n if (!isPlatformBrowser(this.platformId)) {\n // If not in browser, immediately emit true\n return timer(0).pipe(\n take(1),\n map(() => true)\n );\n }\n \n // Get the exit duration for the route\n const exitDuration = this.getLongestExitDurationForRoute(route);\n // console.log(`[MotionOneService] Setting up exit animations complete for route ${route} with duration ${exitDuration}s`);\n \n // If no animations or duration is 0, immediately emit true\n if (exitDuration === 0 || this.getAllElementsByRoute(route).length === 0) {\n // console.log(`[MotionOneService] No exit animations for route ${route}, emitting complete immediately`);\n return timer(0).pipe(\n take(1),\n map(() => true)\n );\n }\n \n // Otherwise, wait for the exit duration and then emit true\n return timer(exitDuration * 1000).pipe(\n take(1),\n map(() => true)\n );\n }\n \n /**\n * Get an observable that emits true when all enter animations for a route are complete\n * @param route The route to check for animation completion\n * @returns Observable that emits true when animations are complete\n */\n getEnterAnimationsComplete(route: string): Observable<boolean> {\n if (!isPlatformBrowser(this.platformId)) {\n // If not in browser, immediately emit true\n return timer(0).pipe(\n take(1),\n map(() => true)\n );\n }\n \n // Get the enter duration for the route\n const enterDuration = this.getLongestEnterDurationForRoute(route);\n // console.log(`[MotionOneService] Setting up enter animations complete for route ${route} with duration ${enterDuration}s`);\n \n // If no animations or duration is 0, immediately emit true\n if (enterDuration === 0 || this.getAllElementsByRoute(route).length === 0) {\n // console.log(`[MotionOneService] No enter animations for route ${route}, emitting complete immediately`);\n return timer(0).pipe(\n take(1),\n map(() => true)\n );\n }\n \n // Otherwise, wait for the enter duration and then emit true\n return timer(enterDuration * 1000).pipe(\n take(1),\n map(() => true)\n );\n }\n \n /**\n * Start tracking exit animations for a route\n * @param route The route to track\n */\n startExitAnimationsForRoute(route: string): void {\n if (!isPlatformBrowser(this.platformId)) return;\n \n const elements = this.getAllElementsByRoute(route);\n this.activeExitAnimations.set(route, elements.length);\n \n //console.log(`[MotionOneService] Starting exit animations for route ${route} with ${elements.length} elements`);\n \n // If no elements, immediately mark as complete\n if (elements.length === 0) {\n this.completeExitAnimationsForRoute(route);\n return;\n }\n \n // Run exit animations for all elements in this route\n elements.forEach(element => {\n element.runExitAnimation();\n });\n \n // Get the longest duration and set a timer to mark animations as complete\n const exitDuration = this.getLongestExitDurationForRoute(route);\n setTimeout(() => {\n this.completeExitAnimationsForRoute(route);\n }, exitDuration * 1000);\n }\n \n /**\n * Start tracking enter animations for a route\n * @param route The route to track\n */\n startEnterAnimationsForRoute(route: string): void {\n if (!isPlatformBrowser(this.platformId)) return;\n \n const elements = this.getAllElementsByRoute(route);\n this.activeEnterAnimations.set(route, elements.length);\n \n // console.log(`[MotionOneService] Starting enter animations for route ${route} with ${elements.length} elements`);\n \n // If no elements, immediately mark as complete\n if (elements.length === 0) {\n this.completeEnterAnimationsForRoute(route);\n return;\n }\n \n // Run enter animations for all elements in this route\n elements.forEach(element => {\n element.runInitAnimation();\n });\n \n // Get the longest duration and set a timer to mark animations as complete\n const enterDuration = this.getLongestEnterDurationForRoute(route);\n setTimeout(() => {\n this.completeEnterAnimationsForRoute(route);\n }, enterDuration * 1000);\n }\n \n /**\n * Mark exit animations for a route as complete\n * @param route The route to mark as complete\n */\n private completeExitAnimationsForRoute(route: string): void {\n console.log(`[MotionOneService] Exit animations complete for route ${route}`);\n this.activeExitAnimations.delete(route);\n this.exitAnimationsComplete.next(route);\n }\n \n /**\n * Mark enter animations for a route as complete\n * @param route The route to mark as complete\n */\n private completeEnterAnimationsForRoute(route: string): void {\n console.log(`[MotionOneService] Enter animations complete for route ${route}`);\n this.activeEnterAnimations.delete(route);\n this.enterAnimationsComplete.next(route);\n }\n \n /**\n * Check if exit animations for a route are complete\n * @param route The route to check\n * @returns True if animations are complete or not running\n */\n areExitAnimationsComplete(route: string): boolean {\n return !this.activeExitAnimations.has(route);\n }\n \n /**\n * Check if enter animations for a route are complete\n * @param route The route to check\n * @returns True if animations are complete or not running\n */\n areEnterAnimationsComplete(route: string): boolean {\n return !this.activeEnterAnimations.has(route);\n }\n \n runAllExitAnimationsForRoute(route: string): MotionElement[] {\n if (!isPlatformBrowser(this.platformId)) return [];\n \n // Start tracking animations for this route\n this.startExitAnimationsForRoute(route);\n \n return this.getAllElementsByRoute(route);\n }\n \n runAllEnterAnimationsForRoute(route: string): MotionElement[] {\n if (!isPlatformBrowser(this.platformId)) return [];\n \n // Start tracking animations for this route\n this.startEnterAnimationsForRoute(route);\n \n return this.getAllElementsByRoute(route);\n }\n \n getLongestExitDurationForRoute(route: string): number {\n if (!isPlatformBrowser(this.platformId)) return 0;\n \n // console.log(`[MotionOneService] Getting longest exit duration for route ${route}`);\n \n if (this.motionElements.length === 0) {\n // console.log('[MotionOneService] No motion elements registered');\n return 0;\n }\n \n const elements = this.getAllElementsByRoute(route);\n if (elements.length === 0) {\n // console.log(`[MotionOneService] No elements found for route ${route}`);\n return 0;\n }\n \n const durations = elements.map((motion) => {\n const duration = motion.getDuration();\n // console.log(`[MotionOneService] Element ${motion.elementId} has exit duration: ${duration}s`);\n return duration;\n });\n \n const maxDuration = durations.length > 0 ? Math.max(...durations) : 0;\n console.log(`[MotionOneService] Longest exit duration for route ${route}: ${maxDuration}s`);\n return maxDuration;\n }\n \n getLongestEnterDurationForRoute(route: string): number {\n if (!isPlatformBrowser(this.platformId)) return 0;\n \n // console.log(`[MotionOneService] Getting longest enter duration for route ${route}`);\n \n if (this.motionElements.length === 0) {\n // console.log('[MotionOneService] No motion elements registered');\n return 0;\n }\n \n const elements = this.getAllElementsByRoute(route);\n if (elements.length === 0) {\n // console.log(`[MotionOneService] No elements found for route ${route}`);\n return 0;\n }\n \n const durations = elements.map((motion) => {\n const duration = motion.getDuration();\n // console.log(`[MotionOneService] Element ${motion.elementId} has enter duration: ${duration}s`);\n return duration;\n });\n \n const maxDuration = durations.length > 0 ? Math.max(...durations) : 0;\n console.log(`[MotionOneService] Longest enter duration for route ${route}: ${maxDuration}s`);\n return maxDuration;\n }\n \n getLongestEnterDuration(): number {\n if (!isPlatformBrowser(this.platformId)) return 0;\n \n // console.log(`[MotionOneService] Getting longest enter duration from ${this.motionElements.length} elements`);\n \n if (this.motionElements.length === 0) {\n // console.log('[MotionOneService] No motion elements registered');\n return 0;\n }\n \n const durations = this.motionElements.map((motion) => {\n const duration = motion.getDuration();\n // console.log(`[MotionOneService] Element ${motion.elementId} has duration: ${duration}s`);\n return duration;\n });\n \n const maxDuration = durations.length > 0 ? Math.max(...durations) : 0;\n console.log(`[MotionOneService] Longest enter duration: ${maxDuration}s`);\n return maxDuration;\n }\n }\n ","import { Injectable, Inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport * as motion from 'motion';\nimport type { AnimationOptions, Target, ValueAnimationOptions, SpringOptions } from 'motion';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MotionAnimationService {\n constructor(@Inject(PLATFORM_ID) private platformId: Object) {}\n\n // Mock implementations for server environment\n private mockAnimate = () => ({ stop: () => {} });\n private mockEasing = (t: number) => t;\n private mockStagger = () => 0;\n private mockSpring = () => motion.easeInOut;\n\n // Wrapper for animate function\n animate(target: any, keyframes: any, options?: any): any {\n if (!isPlatformBrowser(this.platformId)) {\n return this.mockAnimate();\n }\n \n try {\n return motion.animate(target, keyframes, options);\n } catch (e) {\n console.error('Error in animate:', e);\n return this.mockAnimate();\n }\n }\n\n // Wrapper for easing functions\n get easeIn() {\n return isPlatformBrowser(this.platformId) ? (motion as any).easeIn : this.mockEasing;\n }\n\n get easeOut() {\n return isPlatformBrowser(this.platformId) ? (motion as any).easeOut : this.mockEasing;\n }\n\n get easeInOut() {\n return isPlatformBrowser(this.platformId) ? (motion as any).easeInOut : this.mockEasing;\n }\n\n // Wrapper for stagger function\n stagger(duration: number, options?: any): any {\n if (!isPlatformBrowser(this.platformId)) {\n return this.mockStagger();\n }\n \n try {\n return motion.stagger(duration, options);\n } catch (e) {\n console.error('Error in stagger:', e);\n return this.mockStagger();\n }\n }\n\n get spring() {\n if (!isPlatformBrowser(this.platformId)) {\n return this.mockSpring;\n }\n \n return (options?: { stiffness?: number; damping?: number }) => {\n const m: any = motion as any;\n try {\n // Prefer Motion One spring factory if available\n if (typeof m.spring === 'function') {\n return m.spring({\n stiffness: options?.stiffness ?? 100,\n damping: options?.damping ?? 10\n });\n }\n // Motion 10 shim: use m.createGenerator?.spring\n if (m?.createGenerator?.spring) {\n return m.createGenerator.spring({\n stiffness: options?.stiffness ?? 100,\n damping: options?.damping ?? 10\n });\n }\n } catch {}\n // Fallback to an ease function if no spring present\n return (m?.easeInOut as any) ?? ((t: number) => t);\n };\n }\n} ","import {\n Directive,\n Input,\n ElementRef,\n OnDestroy,\n Output,\n EventEmitter,\n OnChanges,\n SimpleChanges,\n HostListener,\n OnInit,\n PLATFORM_ID,\n Inject,\n ContentChildren,\n QueryList,\n AfterContentInit\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { isPlatformBrowser } from '@angular/common';\nimport { MotionOneService } from '../services/motion-one.service';\nimport { MotionAnimationService } from '../services/motion-animation.service';\nimport type { AnimationOptions, Target } from 'motion';\nimport { animate, easeIn, easeOut, easeInOut, stagger } from '../services/motion-browser-safe';\n\n// Define interface for transition object similar to Framer Motion\nexport interface TransitionOptions {\n duration?: number;\n delay?: number;\n ease?: string | number[] | { type: 'spring'; stiffness?: number; damping?: number };\n repeat?: number | boolean;\n repeatType?: 'loop' | 'mirror' | 'reverse' | 'forwards' | 'pingPong';\n repeatDelay?: number;\n staggerChildren?: number;\n staggerDirection?: number;\n when?: 'beforeChildren' | 'afterChildren' | 'together';\n delayChildren?: number;\n times?: number[]; // keyframe times 0..1\n}\n\n// Define interface for variants that can include transition properties\nexport interface VariantWithTransition {\n [key: string]: any;\n transition?: TransitionOptions;\n at?: number; // Add 'at' property to define when variant should be triggered\n}\n\n// Optional timeline support for orchestrated per-property steps\nexport interface TimelineStep {\n prop: string;\n keyframes?: any[] | any;\n to?: any;\n duration: number;\n delay?: number;\n ease?: string | number[] | { type: 'spring'; stiffness?: number; damping?: number };\n atTime?: number; // absolute start (s) relative to element start\n times?: number[];\n repeat?: number | boolean;\n repeatType?: 'loop' | 'mirror' | 'reverse' | 'forwards' | 'pingPong';\n repeatDelay?: number;\n}\n\nlet uniqueIdCounter = 0; \n\n@Directive({\n selector: '[motionone]',\n standalone: true,\n exportAs: 'motionone'\n})\n\nexport class MotionOneDirective implements OnInit, OnDestroy, OnChanges, AfterContentInit {\n @Input() initial: VariantWithTransition | string = {};\n @Input() animate: VariantWithTransition | string = {};\n @Input() exit: VariantWithTransition | string = {};\n @Input() inView: VariantWithTransition = {};\n @Input() duration = 0.3; // Changed to number for Motion One\n @Input() delay = 0; // Changed to number for Motion One\n @Input() delayChildren = 0; // Add new input for delaying children\n @Input() repeat = false;\n @Input() exitDelay = 0; // Changed to number for Motion One\n @Input() easing: string | number[] | { type: 'spring'; stiffness?: number; damping?: number } = 'ease';\n @Input() offset = '0px';\n @Input() whileHover: VariantWithTransition = {};\n @Input() staggerChildren = 1; // Changed to number for Motion One\n @Input() staggerDirection = 1; // Changed to number for Motion One\n @Input() whileTap: VariantWithTransition = {};\n @Input() whileFocus: VariantWithTransition = {};\n @Input() whileInView: VariantWithTransition = {};\n @Input() variants: { [key: string]: VariantWithTransition } = {};\n @Input() transition: TransitionOptions | Record<string, TransitionOptions> = {}; \n @Input() timeline: TimelineStep[] | undefined;\n @Output() animationComplete = new EventEmitter<void>();\n\n // Query for child motionone directives\n @ContentChildren(MotionOneDirective, { descendants: true }) childMotionDirectives!: QueryList<MotionOneDirective>;\n \n private controls: ReturnType<typeof animate> | null = null;\n private childrenControls: ReturnType<typeof animate>[] = [];\n public elementId: string;\n private hoverTimeout: any;\n private observer?: IntersectionObserver;\n private routeDelay: number = 0;\n private inViewInstance: any;\n private isChild = false;\n private parentDirective: MotionOneDirective | null = null;\n private initialAnimationPlayed = false;\n private staggerDelay = 0;\n private childrenCount = 0;\n private childIndex = 0;\n\n get scrollProgress() {\n return this.motionService.scrollYProgress();\n }\n\n constructor(\n public el: ElementRef,\n private motionService: MotionOneService,\n private motionAnimation: MotionAnimationService,\n private router: Router,\n @Inject(PLATFORM_ID) private platformId: Object\n ) {\n this.elementId = `motion-${uniqueIdCounter++}`;\n \n // Only run browser-specific code in browser environment\n if (isPlatformBrowser(this.platformId)) {\n this.el.nativeElement.setAttribute('id', this.elementId);\n // Store a reference to this directive on the element for easier access\n (this.el.nativeElement as any)._motionDirective = this;\n this.motionService.registerMotionElement(this);\n this.applyInitialStyles();\n this.routeDelay = this.motionService.getLongestExitDurationForRoute(this.router.url);\n }\n }\n\n ngOnInit() {\n // console.log(`[${this.elementId}] Initializing motionone directive`);\n this.applyInitialStyles(); // Ensure initial styles are applied\n\n // Only run animations in browser environment\n if (isPlatformBrowser(this.platformId)) {\n // Check if this is a child of another motionone directive\n let parent = this.el.nativeElement.parentElement;\n while (parent) {\n if (parent.hasAttribute('motionone')) {\n this.isChild = true;\n // console.log(`[${this.elementId}] Detected as child of another motionone element: ${parent.id}`);\n break;\n }\n parent = parent.parentElement;\n }\n\n // console.log(`[${this.elementId}] isChild=${this.isChild}, will ${!this.isChild ? 'auto-play' : 'wait for parent'}`);\n \n // Only auto-play animation if not a child of another motionone element\n if (!this.isChild) {\n this.playAnimation(this.initial, this.animate);\n\n // setTimeout(() => {\n // },2000);\n }\n }\n }\n\n ngAfterContentInit() {\n // Register child directives if we have staggerChildren\n if (this.childMotionDirectives && this.childMotionDirectives.length > 0) {\n // console.log(`[${this.elementId}] Found ${this.childMotionDirectives.length} child directives`);\n \n // Set this directive as the parent for all children\n setTimeout(() => {\n // Filter out self from children\n const childDirectives = this.childMotionDirectives.filter(child => child !== this);\n this.childrenCount = childDirectives.length;\n \n // console.log(`[${this.elementId}] After filtering self, found ${this.childrenCount} actual children`);\n \n // Set parent and index for each child\n childDirectives.forEach((child, index) => {\n // console.log(`[${this.elementId}] Setting parent for child ${child.elementId} with index ${index}/${this.childrenCount}`);\n child.setParent(this, index, this.childrenCount);\n });\n \n // Check if we need to stagger children\n const staggerValue = this.getStaggerValue();\n // console.log(`[${this.elementId}] Stagger value: ${staggerValue}, childrenCount: ${this.childrenCount}`);\n \n if (staggerValue > 0 && this.childrenCount > 0) {\n /// console.log(`[${this.elementId}] Will apply stagger to children`);\n // Trigger staggered animations for children\n this.applyStaggerToChildren();\n } else {\n // console.log(`[${this.elementId}] No stagger needed (staggerValue=${staggerValue}, childrenCount=${this.childrenCount})`);\n }\n });\n } else {\n //= console.log(`[${this.elementId}] No child directives found`);\n }\n }\n\n setParent(parent: MotionOneDirective, index: number, totalChildren: number) {\n this.parentDirective = parent;\n this.isChild = true;\n this.childIndex = index;\n this.childrenCount = totalChildren;\n }\n\n // Method to stagger children animations\n applyStaggerToChildren() {\n // Get stagger configuration\n const staggerValue = this.getStaggerValue();\n const staggerDirection = this.getStaggerDirection();\n const delayChildren = this.delayChildren; // number\n const parentDelay = (((this.transition as TransitionOptions)?.delay) ?? 0) as number;\n \n // Get all child directives (excluding self)\n const childDirectives = this.childMotionDirectives.filter(child => child !== this);\n \n // Determine when to animate parent relative to children\n const when = this.getWhen();\n \n // Animate parent if needed\n if (when !== 'afterChildren') {\n this.runSelfAnimation();\n }\n \n // Animate each child with appropriate stagger delay\n childDirectives.forEach((childDirective, index) => {\n // Calculate the stagger delay based on index and direction\n let staggerIndex;\n if (staggerDirection >= 0) {\n staggerIndex = index;\n } else {\n staggerIndex = this.childrenCount - 1 - index;\n }\n \n // Combine parent delay, delayChildren, and stagger delay\n const totalDelay = (parentDelay as number) + delayChildren + (staggerIndex * staggerValue);\n \n this.logDebug(`Child ${childDirective.elementId} index=${index}, staggerIndex=${staggerIndex}, totalDelay=${totalDelay}`);\n \n // Force override the child's delay\n childDirective.overrideDelay(totalDelay);\n \n // Trigger the child's animation\n childDirective.runInitAnimation();\n });\n \n // Animate parent after children if specified\n if (when === 'afterChildren') {\n const totalChildrenDuration = (parentDelay as number) + delayChildren + (this.childrenCount * staggerValue);\n this.overrideDelay(totalChildrenDuration);\n this.runSelfAnimation();\n }\n }\n\n // Method to override the delay for this directive\n overrideDelay(delay: number) {\n // console.log(`[${this.elementId}] Delay overridden: ${this.staggerDelay} -> ${delay}`);\n this.staggerDelay = delay;\n }\n\n // Run animation only for this element (not children)\n runSelfAnimation() {\n // Get animation options\n const options = this.getAnimationOptions();\n \n // console.log(`[${this.elementId}] Running self animation with delay: ${options.delay}`);\n \n // Extract only style properties for animation\n const targetStyles = this.extractStyleProperties(this.getVariant(this.animate));\n \n // Apply start state immediately\n const startStyles = this.extractStyleProperties(this.getVariant(this.initial));\n Object.assign(this.el.nativeElement.style, startStyles);\n \n // Create animation\n this.controls = this.motionAnimation.animate(\n this.el.nativeElement as Target,\n targetStyles,\n options\n );\n \n this.initialAnimationPlayed = true;\n }\n\n ngOnDestroy() {\n\n \n if (this.exit && Object.keys(this.exit).length > 0) {\n this.runExitAnimation();\n }\n\n if (this.inViewInstance) {\n this.inViewInstance.stop();\n }\n\n if (this.observer) {\n this.observer.disconnect();\n }\n \n // Clean up any ongoing animations\n if (this.controls) {\n this.controls.stop();\n }\n \n // Clean up any children animations\n this.childrenControls.forEach(control => {\n if (control) control.stop();\n });\n\n\n // this.motionService.unregisterMotionElement(this);\n //console.log(`[${this.elementId}] Unregistered motionone directive`);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['animate'] && changes['animate'].previousValue !== undefined) {\n const oldState = changes['animate'].previousValue;\n let newState = changes['animate'].currentValue;\n \n if (typeof newState === 'object') {\n this.playAnimation(oldState, newState);\n } else if (typeof newState === 'string' && this.variants?.[newState]) {\n newState = this.variants[newState];\n this.playAnimation(oldState, newState);\n } \n }\n\n // Handle transition changes\n if (changes['transition'] && !changes['transition'].firstChange) {\n // Re-apply animation with new transition settings\n this.playAnimation(this.initial, this.animate);\n }\n }\n\n @HostListener('mouseenter')\n onMouseEnter() {\n if (Object.keys(this.whileHover).length > 0) {\n clearTimeout(this.hoverTimeout);\n if (Object.keys(this.animate).length > 0) {\n this.playAnimation(this.animate, this.whileHover);\n } else {\n this.playAnimation(this.initial, this.whileHover);\n }\n }\n }\n\n @HostListener('mouseleave')\n onMouseLeave() {\n if (Object.keys(this.whileHover).length > 0) {\n this.hoverTimeout = setTimeout(() => {\n if (Object.keys(this.animate).length > 0) {\n this.playAnimation(this.whileHover, this.animate);\n } else {\n this.playAnimation(this.whileHover, this.initial);\n }\n }, 100);\n }\n }\n\n @HostListener('mousedown', ['$event'])\n @HostListener('touchstart', ['$event'])\n onPress(event: Event) {\n if (Object.keys(this.whileTap).length > 0) {\n if (Object.keys(this.animate).length > 0) {\n this.playAnimation(this.animate, this.whileTap);\n } else {\n this.playAnimation(this.initial, this.whileTap);\n }\n \n // Only add event listeners in browser environment\n if (isPlatformBrowser(this.platformId)) {\n const endEvent = event.type === 'mousedown' ? 'mouseup' : 'touchend';\n const endListener = () => {\n if (Object.keys(this.animate).length > 0) {\n this.playAnimation(this.whileTap, this.animate);\n } else {\n this.playAnimation(this.whileTap, this.initial);\n }\n\n window.removeEventListener(endEvent, endListener);\n };\n\n window.addEventListener(endEvent, endListener);\n }\n }\n }\n\n @HostListener('focus')\n onFocus() {\n if (Object.keys(this.whileFocus).length > 0) {\n if (Object.keys(this.animate).length > 0) {\n this.playAnimation(this.animate, this.whileFocus);\n } else {\n this.playAnimation(this.initial, this.whileFocus);\n }\n }\n }\n\n @HostListener('blur')\n onBlur() {\n if (Object.keys(this.whileFocus).length > 0) {\n if (Object.keys(this.animate).length > 0) {\n this.playAnimation(this.whileFocus, this.animate);\n } else {\n this.playAnimation(this.whileFocus, this.initial);\n }\n }\n }\n\n applyInitialValues() {\n // Extract only style properties (exclude transition)\n const styles = this.extractStyleProperties(this.getVariant(this.initial));\n Object.assign(this.el.nativeElement.style, styles);\n }\n\n private applyInitialStyles() {\n // Extract only style properties (exclude transition)\n const styles = this.extractStyleProperties(this.getVariant(this.initial));\n \n // Apply initial styles immediately to prevent flash\n if (styles && Object.keys(styles).length > 0) {\n // Use requestAnimationFrame to ensure styles are applied before the element is visible\n // requestAnimationFrame(() => {\n Object.assign(this.el.nativeElement.style, styles);\n // });\n }\n }\n\n private applyAnimateStyles() {\n // Extract only style properties (exclude transition)\n const styles = this.extractStyleProperties(this.getVariant(this.animate));\n Object.assign(this.el.nativeElement.style, styles);\n }\n\n // Helper to extract only style properties from a variant (excluding transition)\n private extractStyleProperties(variant: VariantWithTransition): Record<string, any> {\n if (!variant) return {};\n \n const result: Record<string, any> = {};\n \n for (const key in variant) {\n // skip meta keys\n if (key === 'transition' || key === 'at') continue;\n // Allow raw transform strings or keyframe arrays to pass through untouched\n if (key === 'transform') {\n (result as any)['transform'] = (variant as any)[key];\n continue;\n }\n if (this.isTransformProperty(key)) {\n this.applyTransformProperty(result, key, variant[key]);\n } else {\n this.applyStyleProperty(result, key, variant[key]);\n }\n }\n \n this.normalizeTransformProperty(result);\n \n return result;\n }\n\n // Check if a property should be handled as a transform\n private isTransformProperty(key: string): boolean {\n return ['x', 'y', 'rotate', 'scale', 'scaleX', 'scaleY'].includes(key);\n }\n\n // Apply transform properties to the result object\n private applyTransformProperty(result: Record<string, any>, key: string, value: any): void {\n // If keyframe array is provided, let Motion One handle it directly\n if (Array.isArray(value)) {\n (result as any)[key] = value;\n return;\n }\n // Initialize transform matrix if it doesn't exist\n if (!result['transform']) {\n result['transform'] = 'matrix(1, 0, 0, 1, 0, 0)';\n }\n\n // Parse current matrix\n const currentMatrix = result['transform'].match(/matrix\\((.*)\\)/)[1].split(',').map(Number);\n \n // Create new matrix based on the transform type\n let newMatrix: number[];\n \n switch (key) {\n case 'x':\n newMatrix = [1, 0, 0, 1, value, 0];\n break;\n case 'y':\n newMatrix = [1, 0, 0, 1, 0, value];\n break;\n case 'rotate':\n const rad = (value * Math.PI) / 180;\n const cos = Math.cos(rad);\n const sin = Math.sin(rad);\n newMatrix = [cos, -sin, sin, cos, 0, 0];\n break;\n case 'scale':\n newMatrix = [value, 0, 0, value, 0, 0];\n break;\n case 'scaleX':\n newMatrix = [value, 0, 0, 1, 0, 0];\n break;\n case 'scaleY':\n newMatrix = [1, 0, 0, value, 0, 0];\n break;\n default:\n return;\n }\n\n // Multiply matrices\n const finalMatrix = this.multiplyMatrices(currentMatrix, newMatrix);\n \n // Apply the new matrix\n result['transform'] = `matrix(${finalMatrix.join(',')})`;\n }\n\n // Helper function to multiply two 2D matrices\n private multiplyMatrices(a: number[], b: number[]): number[] {\n return [\n a[0] * b[0] + a[2] * b[1], // a\n a[1] * b[0] + a[3] * b[1], // b\n a[0] * b[2] + a[2] * b[3], // c\n a[1] * b[2] + a[3] * b[3], // d\n a[0] * b[4] + a[2] * b[5] + a[4], // e\n a[1] * b[4] + a[3] * b[5] + a[5] // f\n ];\n }\n\n // Apply regular style properties to the result object\n private applyStyleProperty(result: Record<string, any>, key: string, value: any): void {\n if (this.isColorProperty(key)) {\n if (Array.isArray(value)) {\n result[key] = value.map(v => this.normalizeColor(v));\n } else {\n result[key] = this.normalizeColor(value);\n }\n } else {\n result[key] = value;\n }\n }\n\n // Check if a property is a color property\n private isColorProperty(key: string): boolean {\n return ['backgroundColor', 'color', 'borderColor'].includes(key);\n }\n\n // Normalize the transform property by trimming extra spaces\n private normalizeTransformProperty(result: Record<string, any>): void {\n if (result['transform']) {\n result['transform'] = result['transform'].trim();\n }\n }\n\n private getEasing(easingString: string | number[] | { type: 'spring'; stiffness?: number; damping?: number } | undefined) {\n if (!easingString) return this.motionAnimation.easeInOut;\n if (Array.isArray(easingString)) return easingString;\n if (typeof easingString === 'object' && 'type' in easingString && easingString.type === 'spring') {\n return this.motionAnimation.spring({\n stiffness: easingString.stiffness || 100,\n damping: easingString.damping || 10\n });\n }\n if (typeof easingString === 'string') {\n if (easingString === 'ease-in') return this.motionAnimation.easeIn;\n if (easingString === 'ease-out') return this.motionAnimation.easeOut;\n if (easingString === 'ease-in-out' || easingString === 'ease') return this.motionAnimation.easeInOut;\n if (easingString === 'spring') return this.motionAnimation.spring();\n }\n return this.motionAnimation.easeInOut;\n }\n\n private getAnimationOptions(targetState?: VariantWithTransition): AnimationOptions {\n // Priority: 1. Stagger delay, 2. State-specific transition, 3. Global transition, 4. Individual properties\n const stateTransition = (targetState?.transition as TransitionOptions) ?? (this.getVariant(this.animate)?.transition as TransitionOptions);\n const globalTransition = (this.transition as TransitionOptions);\n \n const transitionObj: TransitionOptions = stateTransition || globalTransition || {};\n \n // Always prioritize stagger delay over any other delay settings\n const delay = this.staggerDelay > 0 ? this.staggerDelay : (transitionObj.delay ?? this.delay);\n \n const easeInput = transitionObj.ease ?? this.easing;\n // Detect if target contains keyframe arrays (avoid native spring in that case)\n let targetHasKeyframeArrays = false;\n if (targetState) {\n for (const k of Object.keys(targetState)) {\n if (k === 'transition' || k === 'at') continue;\n const v: any = (targetState as any)[k];\n if (Array.isArray(v)) { targetHasKeyframeArrays = true; break; }\n }\n }\n // If spring config and no keyframe arrays, prefer native spring options (no fixed duration)\n if (easeInput && typeof easeInput === 'object' && 'type' in (easeInput as any) && (easeInput as any).type === 'spring' && !targetHasKeyframeArrays) {\n const springOptions: any = {\n type: 'spring',\n stiffness: (easeInput as any).stiffness ?? 100,\n damping: (easeInput as any).damping ?? 10,\n delay,\n repeat: this.getRepeatValue(transitionObj),\n repeatDelay: transitionObj.repeatDelay,\n onComplete: () => this.animationComplete.emit()\n };\n const direction = this.mapRepeatTypeToDirection(transitionObj.repeatType);\n if (direction) springOptions.direction = direction;\n if (transitionObj.repeatType) springOptions.repeatType = transitionObj.repeatType;\n return springOptions as AnimationOptions;\n }\n const ease = this.getEasing(easeInput as any);\n\n const options: any = {\n duration: transitionObj.duration ?? this.duration,\n delay,\n repeat: this.getRepeatValue(transitionObj),\n repeatDelay: transitionObj.repeatDelay,\n onComplete: () => this.animationComplete.emit()\n };\n const direction = this.mapRepeatTypeToDirection(transitionObj.repeatType);\n if (direction) options.direction = direction;\n if (transitionObj.repeatType) options.repeatType = transitionObj.repeatType;\n options.easing = ease; // Motion 11+\n (options as any).ease = ease; // Back-compat\n return options as AnimationOptions;\n }\n\n private getRepeatValue(transitionObj: TransitionOptions): number {\n // Handle repeat value from transition object or fallback to directive input\n if (transitionObj.repeat !== undefined) {\n if (transitionObj.repeat === true) {\n return Infinity;\n } else if (typeof transitionObj.repeat === 'number') {\n return transitionObj.repeat;\n }\n }\n \n return this.repeat ? Infinity : 0;\n }\n\n private mapRepeatTypeToDirection(\n repeatType: TransitionOptions['repeatType'] | undefined\n ): 'normal' | 'reverse' | 'alternate' | undefined {\n if (!repeatType) return undefined;\n // Aliases\n if (repeatType === 'forwards' || repeatType === 'loop') return 'normal';\n if (repeatType === 'reverse') return 'reverse';\n if (repeatType === 'pingPong' || repeatType === 'mirror') return 'alternate';\n // Default\n return 'normal';\n }\n\n private getStaggerValue(): number {\n // Priority: 1. State-specific transition, 2. Global transition, 3. Individual properties\n const stateTransition = this.getVariant(this.animate)?.transition as TransitionOptions;\n const globalTransition = this.transition as TransitionOptions;\n \n const transitionObj: TransitionOptions = stateTransition || globalTransition || {};\n \n // Get stagger value from transition object or fallback to directive input\n return transitionObj.staggerChildren ?? this.staggerChildren;\n }\n\n private getStaggerDirection(): number {\n // Priority: 1. State-specific transition, 2. Global transition, 3. Input property\n const stateTransition = this.getVariant(this.animate)?.transition as TransitionOptions;\n const globalTransition = this.transition as TransitionOptions;\n \n const transitionObj: TransitionOptions = stateTransition || globalTransition || {};\n \n return transitionObj.staggerDirection ?? this.staggerDirection;\n }\n\n private getWhen(): 'beforeChildren' | 'afterChildren' | 'together' {\n // Priority: 1. State-specific transition, 2. Global transition, 3. Default ('together')\n const stateTransition = this.getVariant(this.animate)?.transition as TransitionOptions;\n const globalTransition = this.transition as TransitionOptions;\n \n const transitionObj: TransitionOptions = stateTransition || globalTransition || {};\n \n return (transitionObj.when ?? 'together') as 'beforeChildren' | 'afterChildren' | 'together';\n }\n\n private playAnimation(startState: VariantWithTransition | string, targetState: VariantWithTransition | string) {\n if (!targetState || !isPlatformBrowser(this.platformId)) return;\n\n // Resolve variant strings to objects\n let resolvedStartState: VariantWithTransition = {};\n let resolvedTargetState: VariantWithTransition = {};\n\n if (startState === undefined) {\n resolvedStartState = this.getVariant(this.initial);\n } else if (typeof startState === 'string' && this.variants?.[startState]) {\n resolvedStartState = this.variants[startState];\n } else if (typeof startState === 'object') {\n resolvedStartState = startState;\n }\n\n if (targetState === undefined) {\n resolvedTargetState = this.getVariant(this.animate);\n } else if (typeof targetState === 'string' && this.variants?.[targetState]) {\n resolvedTargetState = this.variants[targetState];\n } else if (typeof targetState === 'object') {\n resolvedTargetState = targetState;\n }\n\n console.log('Playing animation with target state:', resolvedTargetState);\n\n // Check if target state has an 'at' property\n if (resolvedTargetState.at !== undefined) {\n console.log(`Scheduling animation to start in ${resolvedTargetState.at} seconds`);\n // Schedule the animation to start at the specified time\n setTimeout(() => {\n console.log('Executing delayed animation');\n this.continueAnimation(resolvedTargetState, false);\n }, resolvedTargetState.at * 1000); // Convert seconds to milliseconds\n return;\n }\n\n\n\n\n // // Stop any existing children animations\n // this.childrenControls.forEach(control => {\n // if (control) control.stop();\n // });\n // this.childrenControls = [];\n\n // // Check if this is the initial animation to the animate state\n // const isInitialAnimation = \n // (targetState === this.animate || \n // (typeof targetState === 'string' && this.variants?.[targetState] === this.animate));\n\n // // Apply start state immediately (excluding transition property)\n // if (resolvedStartState) {\n // const styles = this.extractStyleProperties(resolvedStartState);\n \n // // Apply initial styles immediately to prevent flash\n // if (styles && Object.keys(styles).length > 0) {\n // // Use requestAnimationFrame to ensure styles are applied before animation starts\n // requestAnimationFrame(() => {\n // Object.assign(this.el.nativeElement.style, styles);\n \n // // Use another requestAnimationFrame to ensure the next frame has the styles applied\n // requestAnimationFrame(() => {\n // // Continue with animation after styles are applied\n // this.continueAnimation(resolvedTargetState, isInitialAnimation);\n // });\n // });\n // return; // Exit early, animation will continue in the callback\n // }\n // }\n \n // // If no start state or no styles to apply, continue immediately\n // this.continueAnimation(resolvedTargetState, isInitialAnimation);\n\n // Continue with normal animation if no 'at' property\n this.continueAnimation(resolvedTargetState, false);\n }\n\n private continueAnimation(resolvedTargetState: VariantWithTransition, isInitialAnimation: boolean) {\n // Timeline takes precedence\n if (this.timeline && this.timeline.length > 0) {\n this.runTimeline(resolvedTargetState);\n return;\n }\n\n // Detect per-property transition map on the state\n const t: any = resolvedTargetState.transition;\n const isPerPropMap = t && typeof t === 'object' && t.duration === undefined && t.delay === undefined && t.ease === undefined;\n if (isPerPropMap) {\n this.runPerPropertyAnimations(resolvedTargetState);\n return;\n }\n // Check if this is the initial animation to the animate state\n if (isInitialAnimation && !this.initialAnimationPlayed) {\n const staggerValue = this.getStaggerValue();\n \n if (staggerValue > 0 && this.childMotionDirectives && this.childMotionDirectives.length > 1) {\n // Stagger will be handled by ngAfterContentInit\n // Just animate self according to 'when' property\n const when = this.getWhen();\n \n if (when !== 'afterChildren') {\n this.runSelfAnimation();\n }\n \n return;\n }\n }\n\n // For non-staggered animations or non-initial animations\n // Get animation options with priority to target state's transition\n const options = this.getAnimationOptions(resolvedTargetState);\n \n // Extract only style properties for animation (excluding transition)\n const targetStyles = this.extractStyleProperties(resolvedTargetState);\n \n // Create animation with Motion One for the element itself\n this.controls = this.motionAnimation.animate(\n this.el.nativeElement as Target,\n targetStyles,\n options\n );\n \n if (isInitialAnimation) {\n this.initialAnimationPlayed = true;\n }\n \n // Handle regular DOM children (without motionone directives) for non-initial animations\n if (!isInitialAnimation && this.el.nativeElement.children.length > 0) {\n // Get children elements\n const children = Array.from(this.el.nativeElement.children) as HTMLElement[];\n \n // Animate each child with the same animation\n children.forEach((child) => {\n // Skip children that have their own motionone directive\n if (child.hasAttribute('motionone')) {\n return;\n }\n \n // Create child animation\n const childControl = this.motionAnimation.animate(\n child,\n targetStyles,\n options\n );\n \n // Store the control for cleanup\n this.childrenControls.push(childControl);\n });\n }\n }\n\n private runPerPropertyAnimations(resolvedTargetState: VariantWithTransition) {\n const baseDelay = this.staggerDelay > 0 ? this.staggerDelay : (((resolvedTargetState.transition as TransitionOptions)?.delay) ?? this.delay);\n const transitionMap = resolvedTargetState.transition as Record<string, TransitionOptions>;\n const props = Object.keys(resolvedTargetState).filter(k => k !== 'transition' && k !== 'at');\n\n let maxEnd = 0;\n props.forEach((prop) => {\n const value = (resolvedTargetState as any)[prop];\n const conf = (transitionMap?.[prop] || {}) as TransitionOptions;\n const delay = baseDelay + (conf.delay ?? 0);\n const ease = this.getEasing(conf.ease ?? this.easing);\n const duration = conf.duration ?? this.duration;\n const options: any = { duration, delay, easing: ease, repeat: this.getRepeatValue(conf), repeatDelay: conf.repeatDelay };\n (options as any).ease = ease;\n const dir = this.mapRepeatTypeToDirection(conf.repeatType);\n if (dir) options.direction = dir;\n if (conf.repeatType) options.repeatType = conf.repeatType;\n const times = (conf as any).times as number[] | undefined;\n if (times && Array.isArray(times)) options.offset = this.normalizeTimes(times, duration);\n\n const end = delay + duration;\n if (end > maxEnd) maxEnd = end;\n\n let finalValue = value;\n if (this.isColorProperty(prop)) {\n if (Array.isArray(value)) finalValue = value.map(v => this.normalizeColor(v));\n else finalValue = this.normalizeColor(value);\n }\n const target = { [prop]: finalValue } as any;\n const control = this.motionAnimation.animate(this.el.nativeElement as Target, target, options);\n this.childrenControls.push(control);\n });\n\n setTimeout(() => this.animationComplete.emit(), maxEnd * 1000);\n }\n\n private runTimeline(resolvedTargetState: VariantWithTransition) {\n const baseDelay = this.staggerDelay > 0 ? this.staggerDelay : (((resolvedTargetState.transition as TransitionOptions)?.delay) ?? this.delay);\n let maxEnd = 0;\n // Also animate any non-timeline props from the target state (e.g., opacity)\n const timelinePropsSet = new Set((this.timeline || []).map(s => s.prop));\n const nonTimelineTarget: any = {};\n Object.keys(resolvedTargetState).forEach(k => {\n if (k === 'transition' || k === 'at') return;\n if (!timelinePropsSet.has(k)) nonTimelineTarget[k] = (resolvedTargetState as any)[k];\n });\n if (Object.keys(nonTimelineTarget).length > 0) {\n const opt = this.getAnimationOptions(resolvedTargetState) as any;\n const ctl = this.motionAnimation.animate(this.el.nativeElement as Target, nonTimelineTarget, opt);\n this.childrenControls.push(ctl);\n const nonEnd = (opt.delay ?? 0) + (opt.duration ?? this.duration);\n if (nonEnd > maxEnd) maxEnd = nonEnd;\n }\n this.timeline!.forEach(step => {\n const start = baseDelay + (step.atTime ?? 0) + (step.delay ?? 0);\n const duration = step.duration;\n const value = step.keyframes !== undefined ? step.keyframes : step.to;\n const easeInput = step.ease ?? this.easing;\n\n // Build options with repeat and direction\n // Prefer function easing always in timeline to preserve keyframe interpolation\n const ease = this.getEasing(easeInput as any);\n const options: any = { duration, delay: start, easing: ease } as any;\n (options as any).ease = ease; // Back-compat\n\n // Apply repeat controls if provided\n if (step.repeat !== undefined) {\n options.repeat = step.repeat === true ? Infinity : step.repeat;\n }\n if (step.repeatDelay !== undefined) {\n options.repeatDelay = step.repeatDelay;\n }\n const dir = this.mapRepeatTypeToDirection(step.repeatType);\n if (dir) options.direction = dir;\n if (step.repeatType) options.repeatType = step.repeatType;\n if (step.times) options.offset = this.normalizeTimes(step.times, duration);\n\n const end = start + duration;\n if (end > maxEnd) maxEnd = end;\n\n let v = value;\n if (this.isColorProperty(step.prop)) {\n if (Array.isArray(v)) v = v.map((c: any) => this.normalizeColor(c));\n else v = this.normalizeColor(v);\n }\n const target = { [step.prop]: v } as any;\n const control = this.motionAnimation.animate(this.el.nativeElement as Target, target, options);\n this.childrenControls.push(control);\n });\n\n setTimeout(() => this.animationComplete.emit(), maxEnd * 1000);\n }\n\n // private setupInViewAnimation() {\n // if (isPlatformBrowser(this.platformId)) {\n // this.inViewInstance = inView(\n // this.el.nativeElement,\n // (info) => {\n // if (info.isInView) {\n // this.runInViewAnimation();\n // if (!this.repeat) {\n // info.stop();\n // }\n // } else if (!info.isInView && this.repeat) {\n // Object.assign(this.el.nativeElement.style, this.initial);\n // }\n // },\n // {\n // margin: this.offset as `${MarginValue}`,\n // amount: 'some'\n // }\n // );\n // }\n // }\n\n runInViewAnimation() {\n if (this.inView && Object.keys(this.inView).length > 0) {\n this.playAnimation(this.initial, this.inView);\n }\n }\n\n runInitAnimation() {\n if (!isPlatformBrowser(this.platformId) || !this.initial || !this.animate) return;\n \n // For child elements with stagger, make sure we use the stagger delay\n if (this.isChild && this.staggerDelay > 0) {\n // console.log(`[${this.elementId}] Running staggered init animation with delay: ${this.staggerDelay}`);\n \n // Apply start state immediately\n const startStyles = this.extractStyleProperties(this.getVariant(this.initial));\n Object.assign(this.el.nativeElement.style, startStyles);\n \n // Get animation options with stagger delay\n const options = this.getAnimationOptions();\n // console.log(`[${this.elementId}] Animation options:`, options);\n \n // Extract only style properties for animation\n const targetStyles = this.extractStyleProperties(this.getVariant(this.animate));\n \n // Create animation with stagger delay\n this.controls = this.motionAnimation.animate(\n this.el.nativeElement as Target,\n targetStyles,\n options\n );\n \n this.initialAnimationPlayed = true;\n } else {\n // Normal animation without stagger\n console.log(`[${this.elementId}] Running normal init animation, isChild=${this.isChild}, staggerDelay=${this.staggerDelay}, routeDelay=${this.routeDelay}`);\n\n this.playAnimation(this.initial, this.animate);\n\n // setTimeout(() => {\n // this.playAnimation(this.initial, this.animate);\n // }, this.routeDelay);\n\n }\n }\n\n\n runExitAnimation(): Promise<void> {\n \n if (!isPlatformBrowser(this.platformId)) {\n return Promise.resolve();\n }\n \n // If no exit animation defined, resolve immediately\n if (!this.exit || Object.keys(this.exit).length === 0) {\n // console.log(`[${this.elementId}] No exit animation defined, resolving immediately`);\n return Promise.resolve();\n }\n \n console.log(`[${this.elementId}] Running exit animation`);\n \n // Use exit-specific transition if available, otherwise use global transition\n const exitTransition = (this.getVariant(this.exit).transition as TransitionOptions) || (this.transition as TransitionOptions) || {} as TransitionOptions;\n \n // Create a promise that resolves when the exit animation completes\n return new Promise<void>((resolve) => {\n const exitOptions: any = {\n duration: (exitTransition.duration ?? this.duration) as number,\n delay: (exitTransition.delay ?? this.exitDelay) as number,\n onComplete: () => {\n // console.log(`[${this.elementId}] Exit animation completed`);\n this.animationComplete.emit();\n resolve();\n }\n };\n const ease = this.getEasing(exitTransition.ease ?? this.easing);\n exitOptions.easing = ease;\n (exitOptions as any).ease = ease;\n \n // Stop any existing animation\n if (this.controls) {\n this.controls.stop();\n }\n \n // Stop any existing children animations\n this.childrenControls.forEach(control => {\n if (control) control.stop();\n });\n \n // Extract only style properties for animation (excluding transition)\n const exitStyles = this.extractStyleProperties(this.getVariant(this.exit));\n \n // console.log(`[${this.elementId}] Starting exit animation with styles:`, exitStyles);\n \n // Create exit animation\n // console.log('animatiing exit')\n\n this.controls = this.motionAnimation.animate(\n this.el.nativeElement as Target,\n exitStyles,\n exitOptions\n );\n \n // If no duration is set, resolve immediately\n if (!exitOptions.duration) {\n // console.log(`[${this.elementId}] No duration set, resolving immediately`);\n resolve();\n }\n });\n }\n\n cancel() {\n if (this.controls) {\n this.controls.stop();\n }\n \n // Cancel any children animations\n this.childrenControls.forEach(control => {\n if (control) control.stop();\n });\n \n this.applyAnimateStyles();\n }\n\n getDuration(): number {\n if (!isPlatformBrowser(this.platformId)) return 0;\n \n try {\n // Consider state-specific transition if available\n // Check transitions in order of priority: exit, animate, then default transition\n const animateTransition = (this.getVariant(this.exit)?.transition as TransitionOptions) || (this.transition as TransitionOptions) || {} as TransitionOptions;\n const duration = (animateTransition.duration ?? this.duration) as number;\n const delay = (animateTransition.delay ?? this.delay) as number;\n return (Number(duration) + Number(delay)) * 1000;\n } catch (error) {\n console.error('Error calculating duration:', error);\n return 0;\n }\n }\n\n getKeyByValue(object: any, key: any) {\n return Object.keys(object).find((k) => object[k] === key);\n }\n\n // Helper method for consistent logging\n private logDebug(message: string) {\n // Log to console\n //console.log(`[${this.elementId}] ${message}`);\n \n // Only add DOM elements in browser environment\n if (isPlatformBrowser(this.platformId)) {\n // Add a visible element to the DOM for debugging (if needed)\n // Uncomment this section if you need visual debugging\n /*\n const debugEl = document.createElement('div');\n debugEl.style.position = 'fixed';\n debugEl.style.top = '10px';\n debugEl.style.right = '10px';\n debugEl.style.backgroundColor = 'rgba(0,0,0,0.8)';\n debugEl.style.color = 'white';\n debugEl.style.padding = '5px';\n debugEl.style.zIndex = '9999';\n debugEl.style.maxWidth = '80%';\n debugEl.style.maxHeight = '80%';\n debugEl.style.overflow = 'auto';\n debugEl.textContent = `[${this.elementId}] ${message}`;\n document.body.appendChild(debugEl);\n \n // Remove after 5 seconds\n setTimeout(() => {\n document.body.removeChild(debugEl);\n }, 5000);\n */\n }\n }\n\n // Helper to normalize color values to a consistent format\n private normalizeColor(color: any): string {\n if (color == null) return '';\n if (typeof color !== 'string') {\n try { return String(color); } catch { return ''; }\n }\n if (color.startsWith('rgb') || color.startsWith('#')) return color;\n if (color === 'aqua') return '#00ffff';\n if (color === 'red') return '#ff0000';\n if (color === 'blue') return '#0000ff';\n if (color === 'green') return '#008000';\n if (color === 'yellow') return '#ffff00';\n if (color === 'purple') return '#800080';\n if (color === 'orange') return '#ffa500';\n if (color === 'black') return '#000000';\n if (color === 'white') return '#ffffff';\n return color;\n }\n\n private normalizeTimes(times: number[] | undefined, duration: number): number[] | undefined {\n if (!times || times.length === 0) return undefined;\n const hasValuesAboveOne = times.some(t => t > 1);\n if (!hasValuesAboveOne) return times;\n const maxT = Math.max(...times);\n const safeDuration = Math.max(duration, 0.000001);\n const divisor = maxT > safeDuration * 1.001 ? maxT : safeDuration;\n return times.map(t => {\n const v = t / divisor;\n return v < 0 ? 0 : v > 1 ? 1 : v;\n });\n }\n\n // Add a method to manually trigger exit animation from outside\n public triggerExitAnimation(): Promise<void> {\n // console.log(`[${this.elementId}] Manually triggering exit animation`);\n return this.runExitAnimation();\n }\n\n // Add a listener for the custom exit event\n @HostListener('motionExit')\n onMotionExit() {\n // console.log(`[${this.elementId}] Received motionExit event`);\n this.runExitAnimation();\n }\n\n private getVariant(variant: VariantWithTransition | string): VariantWithTransition {\n if (typeof variant === 'string') {\n return this.variants[variant] || {};\n } else if (typeof variant === 'object') {\n return variant;\n } else {\n throw new Error('Invalid variant format');\n }\n }\n}\n","import { Directive, Input, TemplateRef, ViewContainerRef, OnDestroy } from '@angular/core';\nimport { MotionOneDirective } from './motion-one.directive';\n\n@Directive({\n selector: '[motionIf]',\n standalone: true\n})\nexport class MotionIfDirective implements OnDestroy {\n private hasView = false;\n private motionElement: MotionOneDirective | null = null;\n private exitTimeout: any;\n\n constructor(\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef\n ) {}\n\n @Input() set motionIf(condition: boolean) {\n // When condition becomes true and view doesn't exist\n if (condition && !this.hasView) {\n // Create the view\n const view = this.viewContainer.createEmbeddedView(this.templateRef);\n this.hasView = true;\n \n // Find the motion directive in the created view\n setTimeout(() => {\n const element = view.rootNodes[0];\n if (element) {\n this.motionElement = (element as any)._motionDirective || null;\n }\n });\n } \n // When condition becomes false and view exists\n else if (!condition && this.hasView) {\n // If we have a motion element with exit animation\n if (this.motionElement && this.motionElement.exit && \n Object.keys(this.motionElement.exit).length > 0) {\n \n // Run exit animation\n this.motionElement.runExitAnimation();\n \n // Clear any existing timeout\n if (this.exitTimeout) {\n clearTimeout(this.exitTimeout);\n }\n \n // Get duration from the motion element\n const duration = this.motionElement.getDuration() || 1000;\n \n // Remove the view after animation completes\n this.exitTimeout = setTimeout(() => {\n if (this.hasView) {\n this.viewContainer.clear();\n this.hasView = false;\n this.motionElement = null;\n }\n }, duration);\n } else {\n // No exit animation, remove immediately\n this.viewContainer.clear();\n this.hasView = false;\n this.motionElement = null;\n }\n }\n }\n\n ngOnDestroy() {\n if (this.exitTimeout) {\n clearTimeout(this.exitTimeout);\n }\n }\n} ","/*\n * Public API Surface of ngx-motion\n */\n\n// Motion One specific exports\nexport * from './lib/directives/motion-one.directive';\nexport * from './lib/directives/motion-if.directive';\nexport * from './lib/services/motion-one.service';\nexport * from './lib/services/motion-animation.service';\n\n// Export interfaces and types\nexport type {\n TransitionOptions,\n VariantWithTransition,\n TimelineStep\n} from './lib/directives/motion-one.directive';\n\nexport type {\n MotionElement\n} from './lib/services/motion-one.service';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAwBe,gBAAgB,CAAA;AAmBjB,IAAA,MAAA;AACkB,IAAA,QAAA;AACG,IAAA,UAAA;AApBvB,IAAA,kBAAkB;IAClB,cAAc,GAAoB,EAAE;AAC5C,IAAA,eAAe,GAAG,MAAM,CAAC,CAAC,CAAC;IAC3B,iBAAiB,GAAW,CAAC;;AAGrB,IAAA,sBAAsB,GAAG,IAAI,OAAO,EAAU;;AAG9C,IAAA,uBAAuB,GAAG,IAAI,OAAO,EAAU;;AAG/C,IAAA,oBAAoB,GAAwB,IAAI,GAAG,EAAE;;AAGrD,IAAA,qBAAqB,GAAwB,IAAI,GAAG,EAAE;AAE9D,IAAA,WAAA,CACU,MAAc,EACI,QAAkB,EACf,UAAkB,EAAA;QAFvC,IAAA,CAAA,MAAM,GAAN,MAAM;QACY,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACL,IAAA,CAAA,UAAU,GAAV,UAAU;QAEvC,IAAI,CAAC,mBAAmB,EAAE;AAC1B,QAAA,IAAI,CAAC,kBAAkB,GAAG,IAAI,YAAY,EAAE;IAC9C;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE;AAC3B,YAAA,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE;QACvC;AACA,QAAA,IAAI,CAAC,sBAAsB,CAAC,QAAQ,EAAE;AACtC,QAAA,IAAI,CAAC,uBAAuB,CAAC,QAAQ,E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aAAa,GAAG,IAAI;YAC3B;QACF;IACF;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,WAAW,EAAE;AACpB,YAAA,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC;QAChC;IACF;wGA/DW,iBAAiB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,UAAU,EAAE;AACb,iBAAA;+GAWc,QAAQ,EAAA,CAAA;sBAApB;;;ACjBH;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TemplateRef, ViewContainerRef, OnDestroy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MotionIfDirective implements OnDestroy {
|
|
4
|
+
private templateRef;
|
|
5
|
+
private viewContainer;
|
|
6
|
+
private hasView;
|
|
7
|
+
private motionElement;
|
|
8
|
+
private exitTimeout;
|
|
9
|
+
constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef);
|
|
10
|
+
set motionIf(condition: boolean);
|
|
11
|
+
ngOnDestroy(): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MotionIfDirective, never>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MotionIfDirective, "[motionIf]", never, { "motionIf": { "alias": "motionIf"; "required": false; }; }, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy, EventEmitter, OnChanges, SimpleChanges, OnInit, QueryList, AfterContentInit } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { MotionOneService } from '../services/motion-one.service';
|
|
4
|
+
import { MotionAnimationService } from '../services/motion-animation.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export interface TransitionOptions {
|
|
7
|
+
duration?: number;
|
|
8
|
+
delay?: number;
|
|
9
|
+
ease?: string | number[] | {
|
|
10
|
+
type: 'spring';
|
|
11
|
+
stiffness?: number;
|
|
12
|
+
damping?: number;
|
|
13
|
+
};
|
|
14
|
+
repeat?: number | boolean;
|
|
15
|
+
repeatType?: 'loop' | 'mirror' | 'reverse' | 'forwards' | 'pingPong';
|
|
16
|
+
repeatDelay?: number;
|
|
17
|
+
staggerChildren?: number;
|
|
18
|
+
staggerDirection?: number;
|
|
19
|
+
when?: 'beforeChildren' | 'afterChildren' | 'together';
|
|
20
|
+
delayChildren?: number;
|
|
21
|
+
times?: number[];
|
|
22
|
+
}
|
|
23
|
+
export interface VariantWithTransition {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
transition?: TransitionOptions;
|
|
26
|
+
at?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface TimelineStep {
|
|
29
|
+
prop: string;
|
|
30
|
+
keyframes?: any[] | any;
|
|
31
|
+
to?: any;
|
|
32
|
+
duration: number;
|
|
33
|
+
delay?: number;
|
|
34
|
+
ease?: string | number[] | {
|
|
35
|
+
type: 'spring';
|
|
36
|
+
stiffness?: number;
|
|
37
|
+
damping?: number;
|
|
38
|
+
};
|
|
39
|
+
atTime?: number;
|
|
40
|
+
times?: number[];
|
|
41
|
+
repeat?: number | boolean;
|
|
42
|
+
repeatType?: 'loop' | 'mirror' | 'reverse' | 'forwards' | 'pingPong';
|
|
43
|
+
repeatDelay?: number;
|
|
44
|
+
}
|
|
45
|
+
export declare class MotionOneDirective implements OnInit, OnDestroy, OnChanges, AfterContentInit {
|
|
46
|
+
el: ElementRef;
|
|
47
|
+
private motionService;
|
|
48
|
+
private motionAnimation;
|
|
49
|
+
private router;
|
|
50
|
+
private platformId;
|
|
51
|
+
initial: VariantWithTransition | string;
|
|
52
|
+
animate: VariantWithTransition | string;
|
|
53
|
+
exit: VariantWithTransition | string;
|
|
54
|
+
inView: VariantWithTransition;
|
|
55
|
+
duration: number;
|
|
56
|
+
delay: number;
|
|
57
|
+
delayChildren: number;
|
|
58
|
+
repeat: boolean;
|
|
59
|
+
exitDelay: number;
|
|
60
|
+
easing: string | number[] | {
|
|
61
|
+
type: 'spring';
|
|
62
|
+
stiffness?: number;
|
|
63
|
+
damping?: number;
|
|
64
|
+
};
|
|
65
|
+
offset: string;
|
|
66
|
+
whileHover: VariantWithTransition;
|
|
67
|
+
staggerChildren: number;
|
|
68
|
+
staggerDirection: number;
|
|
69
|
+
whileTap: VariantWithTransition;
|
|
70
|
+
whileFocus: VariantWithTransition;
|
|
71
|
+
whileInView: VariantWithTransition;
|
|
72
|
+
variants: {
|
|
73
|
+
[key: string]: VariantWithTransition;
|
|
74
|
+
};
|
|
75
|
+
transition: TransitionOptions | Record<string, TransitionOptions>;
|
|
76
|
+
timeline: TimelineStep[] | undefined;
|
|
77
|
+
animationComplete: EventEmitter<void>;
|
|
78
|
+
childMotionDirectives: QueryList<MotionOneDirective>;
|
|
79
|
+
private controls;
|
|
80
|
+
private childrenControls;
|
|
81
|
+
elementId: string;
|
|
82
|
+
private hoverTimeout;
|
|
83
|
+
private observer?;
|
|
84
|
+
private routeDelay;
|
|
85
|
+
private inViewInstance;
|
|
86
|
+
private isChild;
|
|
87
|
+
private parentDirective;
|
|
88
|
+
private initialAnimationPlayed;
|
|
89
|
+
private staggerDelay;
|
|
90
|
+
private childrenCount;
|
|
91
|
+
private childIndex;
|
|
92
|
+
get scrollProgress(): number;
|
|
93
|
+
constructor(el: ElementRef, motionService: MotionOneService, motionAnimation: MotionAnimationService, router: Router, platformId: Object);
|
|
94
|
+
ngOnInit(): void;
|
|
95
|
+
ngAfterContentInit(): void;
|
|
96
|
+
setParent(parent: MotionOneDirective, index: number, totalChildren: number): void;
|
|
97
|
+
applyStaggerToChildren(): void;
|
|
98
|
+
overrideDelay(delay: number): void;
|
|
99
|
+
runSelfAnimation(): void;
|
|
100
|
+
ngOnDestroy(): void;
|
|
101
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
102
|
+
onMouseEnter(): void;
|
|
103
|
+
onMouseLeave(): void;
|
|
104
|
+
onPress(event: Event): void;
|
|
105
|
+
onFocus(): void;
|
|
106
|
+
onBlur(): void;
|
|
107
|
+
applyInitialValues(): void;
|
|
108
|
+
private applyInitialStyles;
|
|
109
|
+
private applyAnimateStyles;
|
|
110
|
+
private extractStyleProperties;
|
|
111
|
+
private isTransformProperty;
|
|
112
|
+
private applyTransformProperty;
|
|
113
|
+
private multiplyMatrices;
|
|
114
|
+
private applyStyleProperty;
|
|
115
|
+
private isColorProperty;
|
|
116
|
+
private normalizeTransformProperty;
|
|
117
|
+
private getEasing;
|
|
118
|
+
private getAnimationOptions;
|
|
119
|
+
private getRepeatValue;
|
|
120
|
+
private mapRepeatTypeToDirection;
|
|
121
|
+
private getStaggerValue;
|
|
122
|
+
private getStaggerDirection;
|
|
123
|
+
private getWhen;
|
|
124
|
+
private playAnimation;
|
|
125
|
+
private continueAnimation;
|
|
126
|
+
private runPerPropertyAnimations;
|
|
127
|
+
private runTimeline;
|
|
128
|
+
runInViewAnimation(): void;
|
|
129
|
+
runInitAnimation(): void;
|
|
130
|
+
runExitAnimation(): Promise<void>;
|
|
131
|
+
cancel(): void;
|
|
132
|
+
getDuration(): number;
|
|
133
|
+
getKeyByValue(object: any, key: any): string | undefined;
|
|
134
|
+
private logDebug;
|
|
135
|
+
private normalizeColor;
|
|
136
|
+
private normalizeTimes;
|
|
137
|
+
triggerExitAnimation(): Promise<void>;
|
|
138
|
+
onMotionExit(): void;
|
|
139
|
+
private getVariant;
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MotionOneDirective, never>;
|
|
141
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MotionOneDirective, "[motionone]", ["motionone"], { "initial": { "alias": "initial"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; "exit": { "alias": "exit"; "required": false; }; "inView": { "alias": "inView"; "required": false; }; "duration": { "alias": "duration"; "required": false; }; "delay": { "alias": "delay"; "required": false; }; "delayChildren": { "alias": "delayChildren"; "required": false; }; "repeat": { "alias": "repeat"; "required": false; }; "exitDelay": { "alias": "exitDelay"; "required": false; }; "easing": { "alias": "easing"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "whileHover": { "alias": "whileHover"; "required": false; }; "staggerChildren": { "alias": "staggerChildren"; "required": false; }; "staggerDirection": { "alias": "staggerDirection"; "required": false; }; "whileTap": { "alias": "whileTap"; "required": false; }; "whileFocus": { "alias": "whileFocus"; "required": false; }; "whileInView": { "alias": "whileInView"; "required": false; }; "variants": { "alias": "variants"; "required": false; }; "transition": { "alias": "transition"; "required": false; }; "timeline": { "alias": "timeline"; "required": false; }; }, { "animationComplete": "animationComplete"; }, ["childMotionDirectives"], never, true, never>;
|
|
142
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class MotionAnimationService {
|
|
3
|
+
private platformId;
|
|
4
|
+
constructor(platformId: Object);
|
|
5
|
+
private mockAnimate;
|
|
6
|
+
private mockEasing;
|
|
7
|
+
private mockStagger;
|
|
8
|
+
private mockSpring;
|
|
9
|
+
animate(target: any, keyframes: any, options?: any): any;
|
|
10
|
+
get easeIn(): any;
|
|
11
|
+
get easeOut(): any;
|
|
12
|
+
get easeInOut(): any;
|
|
13
|
+
stagger(duration: number, options?: any): any;
|
|
14
|
+
get spring(): (options?: {
|
|
15
|
+
stiffness?: number;
|
|
16
|
+
damping?: number;
|
|
17
|
+
}) => any;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MotionAnimationService, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MotionAnimationService>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-safe wrapper for Motion One
|
|
3
|
+
* Prevents "window is not defined" errors during SSR
|
|
4
|
+
*/
|
|
5
|
+
export declare const animate: (...args: any[]) => any;
|
|
6
|
+
export declare const easeIn: any;
|
|
7
|
+
export declare const easeOut: any;
|
|
8
|
+
export declare const easeInOut: any;
|
|
9
|
+
export declare const stagger: (...args: any[]) => any;
|
|
10
|
+
export type { AnimationOptions, Target } from 'motion';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface MotionElement {
|
|
5
|
+
elementId: string;
|
|
6
|
+
getDuration(): number;
|
|
7
|
+
runInitAnimation(): void;
|
|
8
|
+
runExitAnimation(): void;
|
|
9
|
+
cancel(): void;
|
|
10
|
+
route?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class MotionOneService {
|
|
13
|
+
private router;
|
|
14
|
+
private document;
|
|
15
|
+
private platformId;
|
|
16
|
+
private scrollSubscription;
|
|
17
|
+
private motionElements;
|
|
18
|
+
scrollYProgress: import("@angular/core").WritableSignal<number>;
|
|
19
|
+
totalExitDuration: number;
|
|
20
|
+
private exitAnimationsComplete;
|
|
21
|
+
private enterAnimationsComplete;
|
|
22
|
+
private activeExitAnimations;
|
|
23
|
+
private activeEnterAnimations;
|
|
24
|
+
constructor(router: Router, document: Document, platformId: Object);
|
|
25
|
+
ngOnDestroy(): void;
|
|
26
|
+
private updateTotalExitDuration;
|
|
27
|
+
private setupScrollListener;
|
|
28
|
+
private updateScrollProgress;
|
|
29
|
+
registerMotionElement(element: MotionElement): void;
|
|
30
|
+
unregisterMotionElement(element: MotionElement): void;
|
|
31
|
+
getMotionElements(): MotionElement[];
|
|
32
|
+
getAllElementsByRoute(route: string): MotionElement[];
|
|
33
|
+
cancelAllAnimations(): void;
|
|
34
|
+
runAllEnterAnimations(): void;
|
|
35
|
+
runAllExitAnimations(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Get an observable that emits true when all exit animations for a route are complete
|
|
38
|
+
* @param route The route to check for animation completion
|
|
39
|
+
* @returns Observable that emits true when animations are complete
|
|
40
|
+
*/
|
|
41
|
+
getExitAnimationsComplete(route: string): Observable<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Get an observable that emits true when all enter animations for a route are complete
|
|
44
|
+
* @param route The route to check for animation completion
|
|
45
|
+
* @returns Observable that emits true when animations are complete
|
|
46
|
+
*/
|
|
47
|
+
getEnterAnimationsComplete(route: string): Observable<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Start tracking exit animations for a route
|
|
50
|
+
* @param route The route to track
|
|
51
|
+
*/
|
|
52
|
+
startExitAnimationsForRoute(route: string): void;
|
|
53
|
+
/**
|
|
54
|
+
* Start tracking enter animations for a route
|
|
55
|
+
* @param route The route to track
|
|
56
|
+
*/
|
|
57
|
+
startEnterAnimationsForRoute(route: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Mark exit animations for a route as complete
|
|
60
|
+
* @param route The route to mark as complete
|
|
61
|
+
*/
|
|
62
|
+
private completeExitAnimationsForRoute;
|
|
63
|
+
/**
|
|
64
|
+
* Mark enter animations for a route as complete
|
|
65
|
+
* @param route The route to mark as complete
|
|
66
|
+
*/
|
|
67
|
+
private completeEnterAnimationsForRoute;
|
|
68
|
+
/**
|
|
69
|
+
* Check if exit animations for a route are complete
|
|
70
|
+
* @param route The route to check
|
|
71
|
+
* @returns True if animations are complete or not running
|
|
72
|
+
*/
|
|
73
|
+
areExitAnimationsComplete(route: string): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Check if enter animations for a route are complete
|
|
76
|
+
* @param route The route to check
|
|
77
|
+
* @returns True if animations are complete or not running
|
|
78
|
+
*/
|
|
79
|
+
areEnterAnimationsComplete(route: string): boolean;
|
|
80
|
+
runAllExitAnimationsForRoute(route: string): MotionElement[];
|
|
81
|
+
runAllEnterAnimationsForRoute(route: string): MotionElement[];
|
|
82
|
+
getLongestExitDurationForRoute(route: string): number;
|
|
83
|
+
getLongestEnterDurationForRoute(route: string): number;
|
|
84
|
+
getLongestEnterDuration(): number;
|
|
85
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MotionOneService, never>;
|
|
86
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MotionOneService>;
|
|
87
|
+
}
|