@motionone/types
Advanced tools
Comparing version
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var MotionValue = require('./MotionValue.cjs.js'); | ||
exports.MotionValue = MotionValue.MotionValue; |
@@ -1,1 +0,1 @@ | ||
export { MotionValue } from './MotionValue.es.js'; |
@@ -1,1 +0,1 @@ | ||
class i{setAnimation(i){this.animation=i,null==i||i.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}export{i as MotionValue}; |
@@ -1,2 +0,2 @@ | ||
export {}; | ||
export { MotionValue } from "./MotionValue"; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@motionone/types", | ||
"version": "10.6.0", | ||
"version": "10.6.1", | ||
"description": "Shared types for the Motion One packages.", | ||
@@ -15,3 +15,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "e55a5ac6a04376cb412549a20cc652ee9efd6984" | ||
"gitHead": "2d0605d1e1903b47ad20c6338588362371a3b6e5" | ||
} |
@@ -0,1 +1,3 @@ | ||
import { MotionValue } from "./MotionValue"; | ||
export { MotionValue } from "./MotionValue"; | ||
export interface AnimationGeneratorState { | ||
@@ -14,32 +16,20 @@ done: boolean; | ||
export interface BasicAnimationControls { | ||
pause: () => void; | ||
play: () => void; | ||
commitStyles: () => void; | ||
cancel: () => void; | ||
play: VoidFunction; | ||
pause: VoidFunction; | ||
commitStyles: VoidFunction; | ||
cancel: VoidFunction; | ||
stop?: VoidFunction; | ||
playState: PlayState; | ||
finished: Promise<any>; | ||
startTime: number | null; | ||
currentTime: number | null; | ||
} | ||
export interface AnimationControls { | ||
play: VoidFunction; | ||
pause: VoidFunction; | ||
export interface AnimationControls extends BasicAnimationControls { | ||
stop: VoidFunction; | ||
finish: VoidFunction; | ||
reverse: VoidFunction; | ||
cancel: VoidFunction; | ||
finished: Promise<any>; | ||
currentTime: number | null; | ||
duration: number; | ||
playbackRate: number; | ||
} | ||
export interface AnimationData { | ||
transforms: string[]; | ||
animations: { | ||
[key: string]: BasicAnimationControls | undefined; | ||
}; | ||
generators: { | ||
[key: string]: AnimationGenerator | undefined; | ||
}; | ||
prevGeneratorState: { | ||
[key: string]: AnimationGeneratorState | undefined; | ||
}; | ||
} | ||
export declare type CustomAnimationSettings = { | ||
@@ -54,3 +44,3 @@ easing: Easing; | ||
export declare type EasingGenerator = { | ||
createAnimation: (keyframes: UnresolvedValueKeyframe[], getOrigin: () => string, isTransform: boolean, name?: string, data?: AnimationData) => CustomAnimationSettings; | ||
createAnimation: (keyframes: UnresolvedValueKeyframe[], getOrigin: () => string, isNumber: boolean, name?: string, value?: MotionValue) => CustomAnimationSettings; | ||
}; | ||
@@ -57,0 +47,0 @@ export declare type KeyframeOptions = { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
9870
50.76%16
60%128
82.86%1
Infinity%