@endorphinjs/template-runtime
Advanced tools
Comparing version 0.9.5 to 0.9.6-alpha.0
@@ -0,1 +1,2 @@ | ||
import { animatingKey } from './utils'; | ||
export declare type EasingFunction = (t: number, b: number, c: number, d: number) => number; | ||
@@ -6,2 +7,12 @@ export declare type AnimationCallback = (elem: HTMLElement, options: TweenOptions) => void; | ||
declare type Callback = (cancel?: boolean) => void; | ||
interface AnimationState { | ||
start: number; | ||
animation: string | TweenFactory; | ||
onComplete: Callback; | ||
timeout?: number; | ||
callback?: () => void; | ||
} | ||
interface HTMLElementAnim extends HTMLElement { | ||
[animatingKey]?: AnimationState; | ||
} | ||
export interface TweenOptions { | ||
@@ -24,11 +35,11 @@ /** Animation duration, ms */ | ||
*/ | ||
export declare function animate(elem: HTMLElement, animation: string | TweenFactory, callback?: Callback): void; | ||
export declare function animate(elem: HTMLElementAnim, animation: string | TweenFactory, callback?: Callback): void; | ||
/** | ||
* Starts CSS animation on given element | ||
*/ | ||
export declare function cssAnimate(elem: HTMLElement, animation: string, callback?: Callback): void; | ||
export declare function cssAnimate(elem: HTMLElementAnim, animation: string, callback?: Callback): void; | ||
/** | ||
* Starts JS animation on given element | ||
*/ | ||
export declare function tweenAnimate(elem: HTMLElement, animation: TweenFactory, callback?: () => void): void; | ||
export declare function tweenAnimate(elem: HTMLElementAnim, animation: TweenFactory, callback?: () => void): void; | ||
/** | ||
@@ -43,3 +54,3 @@ * Creates animation CSS value with scoped animation name | ||
export declare function composeTween(tween1?: TweenOptions, tween2?: TweenOptions): TweenOptions; | ||
export declare function stopAnimation(elem: HTMLElement, cancel?: boolean): void; | ||
export declare function stopAnimation(elem: HTMLElementAnim, cancel?: boolean): void; | ||
export {}; |
{ | ||
"name": "@endorphinjs/template-runtime", | ||
"version": "0.9.5", | ||
"version": "0.9.6-alpha.0", | ||
"description": "EndorphinJS template runtime, embedded with template bundles", | ||
@@ -53,3 +53,3 @@ "main": "./dist/runtime.cjs.js", | ||
}, | ||
"gitHead": "a969375b3aa55b65e97f7e5bda6e4eb7730d48a8" | ||
"gitHead": "4a5a6b1aefbd9c6fab83a495e884f9f943d7584b" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
318868
5839