@react-spring/shared
Advanced tools
Comparing version 0.0.1-alpha.0 to 0.0.1-alpha.1
/// <reference types="react" /> | ||
import { SpringInterpolator, InterpolatorConfig } from './types'; | ||
interface FrameRequestCallback { | ||
(time: number): void; | ||
} | ||
declare type Props = { | ||
@@ -17,3 +14,3 @@ [key: string]: any; | ||
update: () => boolean; | ||
controllers: any[]; | ||
controllers: Map<number, any>; | ||
start(controller: any): void; | ||
@@ -31,3 +28,3 @@ stop(controller: any): void; | ||
export declare let createAnimatedRef: <T extends React.ElementType>(node: React.MutableRefObject<T>, mounted: React.MutableRefObject<boolean>, forceUpdate: () => void) => T | AnimatedRef<T>; | ||
export declare let requestAnimationFrame: ((cb: FrameRequestCallback) => number) | (() => void); | ||
export declare let requestAnimationFrame: ((cb: (time: number) => void) => number) | (() => void); | ||
export declare let cancelAnimationFrame: (id: number) => void; | ||
@@ -34,0 +31,0 @@ export interface AnimatedGlobals { |
{ | ||
"name": "@react-spring/shared", | ||
"version": "0.0.1-alpha.0", | ||
"homepage": "https://github.com/react-spring/react-spring/packages/shared#readme", | ||
"version": "0.0.1-alpha.1", | ||
"description": "Internal use only", | ||
"keywords": [ | ||
"animated", | ||
"animation", | ||
"hooks", | ||
"motion", | ||
"react", | ||
"react-native", | ||
"spring", | ||
"typescript", | ||
"velocity" | ||
], | ||
"homepage": "https://github.com/react-spring/react-spring/tree/master/packages/shared#readme", | ||
"bugs": { | ||
@@ -14,2 +26,4 @@ "url": "https://github.com/react-spring/react-spring/issues" | ||
"sideEffects": false, | ||
"main": "index.cjs.js", | ||
"module": "index.js", | ||
"dependencies": { | ||
@@ -16,0 +30,0 @@ "@babel/runtime": "^7.3.1", |
@@ -17,1 +17,11 @@ # @react-spring/shared | ||
Exports the `createStringInterpolator` function (with color support) | ||
## Main module | ||
Import `@react-spring/shared` to access these named imports: | ||
- `Globals` object (updated with its `assign` method) | ||
- `createInterpolator` function | ||
- `is` functions (for runtime type checks) | ||
- Utility hooks (like `useForceUpdate`) | ||
- Every type in `src/types` |
@@ -29,2 +29,5 @@ import { Interpolator, ExtrapolateType, InterpolatorConfig } from './interpolation'; | ||
}; | ||
export interface FrameRequestCallback { | ||
(time: number): void; | ||
} | ||
/** | ||
@@ -31,0 +34,0 @@ * This interpolates one or more `SpringValue` objects. |
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
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
36372
1
27