UNPKG

@wolsok/thanos

Version:

Wolf Soko's implementation of a cool Thanos snapping vaporizing effect for destroying dom elements

36 lines 1.64 kB
import { ElementRef, NgZone } from '@angular/core'; import { Observable } from 'rxjs'; import { AnimationState } from './animation.state'; import type { WsThanosOptions } from './ws-thanos.options'; import { WsThanosService } from './ws-thanos.service'; import * as i0 from "@angular/core"; export declare class WsThanosDirective { private readonly vaporizeDomElem; private readonly thanosService; private readonly thanosOptions; private readonly ngZone; private wsThanosCompleteSubject; private untilDestroyed; wsThanosComplete: Observable<void>; private subscriptions; constructor(vaporizeDomElem: ElementRef<HTMLElement>, thanosService: WsThanosService, thanosOptions: WsThanosOptions, ngZone: NgZone); /** * * Vaporize the dom element of this directive * @param removeElem remove the vaporized dom element or blend back in after a while * * Subscribe to the returned observable to start vaporization * */ vaporize$(removeElem?: boolean): Observable<AnimationState>; /** * Vaporize the dom element of this directive * @param removeElem remove the vaporized dom element or blend back in after a while * * @Deprecated use vaporizeAndScrollIntoView$ instead and subscribe to it */ vaporize(removeElem?: boolean): Observable<void>; static ɵfac: i0.ɵɵFactoryDeclaration<WsThanosDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<WsThanosDirective, "[wsThanos], ws-thanos", ["thanos"], {}, { "wsThanosComplete": "wsThanosComplete"; }, never, never, true, never>; } //# sourceMappingURL=ws-thanos.directive.d.ts.map