@react-spring/animated
Advanced tools
Comparing version 9.0.0-beta.31 to 9.0.0-beta.32
@@ -145,7 +145,2 @@ 'use strict'; | ||
var interpolate = function interpolate() { | ||
deprecations.deprecateInterpolate(); | ||
return G.createAnimatedInterpolation.apply(void 0, arguments); | ||
}; | ||
var AnimatedInterpolation = | ||
@@ -179,3 +174,3 @@ /*#__PURE__*/ | ||
return G.createAnimatedInterpolation.apply(void 0, [this].concat(args)); | ||
return new AnimatedInterpolation(this, args); | ||
}; | ||
@@ -230,2 +225,7 @@ | ||
var interpolate = function interpolate() { | ||
deprecations.deprecateInterpolate(); | ||
return G.createAnimatedInterpolation.apply(void 0, arguments); | ||
}; | ||
/** An animated number or a native attribute value */ | ||
@@ -428,3 +428,4 @@ | ||
var nextProps = new AnimatedProps(rawProps, function () { | ||
var didUpdate = !!node.current && G.applyAnimatedValues(node.current, nextProps.getValue(true)); // Re-render the component when native updates fail. | ||
if (!node.current) return; | ||
var didUpdate = G.applyAnimatedValues(node.current, nextProps.getValue(true)); // Re-render the component when native updates fail. | ||
@@ -431,0 +432,0 @@ if (didUpdate === false) { |
@@ -100,5 +100,3 @@ import { SpringValue, Animatable, InterpolatorArgs, Indexable, Interpolatable, OneOrMore, Interpolator, ElementType, SpringInterpolator } from '@react-spring/shared'; | ||
declare type AnimatableComponent = string | (Extract<ElementType, object> & { | ||
[cacheKey]?: any; | ||
}); | ||
declare type AnimatableComponent = string | Exclude<ElementType, string>; | ||
declare type WithAnimated = { | ||
@@ -105,0 +103,0 @@ (Component: AnimatableComponent): any; |
15
index.js
@@ -113,7 +113,2 @@ import { each, createInterpolator, is, toArray, Globals, useForceUpdate, useOnce } from '@react-spring/shared'; | ||
const interpolate = function interpolate() { | ||
deprecateInterpolate(); | ||
return createAnimatedInterpolation(...arguments); | ||
}; | ||
class AnimatedInterpolation extends Animated { | ||
@@ -136,3 +131,3 @@ constructor(source, args) { | ||
return createAnimatedInterpolation(this, ...args); | ||
return new AnimatedInterpolation(this, args); | ||
} | ||
@@ -184,2 +179,7 @@ | ||
const interpolate = function interpolate() { | ||
deprecateInterpolate(); | ||
return createAnimatedInterpolation(...arguments); | ||
}; | ||
/** An animated number or a native attribute value */ | ||
@@ -343,3 +343,4 @@ | ||
const nextProps = new AnimatedProps(rawProps, () => { | ||
const didUpdate = !!node.current && applyAnimatedValues(node.current, nextProps.getValue(true)); // Re-render the component when native updates fail. | ||
if (!node.current) return; | ||
const didUpdate = applyAnimatedValues(node.current, nextProps.getValue(true)); // Re-render the component when native updates fail. | ||
@@ -346,0 +347,0 @@ if (didUpdate === false) { |
{ | ||
"name": "@react-spring/animated", | ||
"version": "9.0.0-beta.31", | ||
"version": "9.0.0-beta.32", | ||
"description": "Animated component props for React", | ||
@@ -31,3 +31,4 @@ "keywords": [ | ||
"@babel/runtime": "^7.3.1", | ||
"@react-spring/shared": "^9.0.0-beta.31" | ||
"@react-spring/shared": "^9.0.0-beta.32", | ||
"tiny-invariant": "^1.0.4" | ||
}, | ||
@@ -34,0 +35,0 @@ "devDependencies": { |
@@ -15,3 +15,2 @@ import { | ||
import { Animated } from './Animated' | ||
import { to } from './interpolate' | ||
import { toPayload, addChild, removeChild } from './AnimatedObject' | ||
@@ -40,3 +39,3 @@ | ||
to<T extends Animatable>(...args: InterpolatorArgs<Out, T>): SpringValue<T> { | ||
return (to as any)(this, ...args) | ||
return new AnimatedInterpolation(this, args as any) | ||
} | ||
@@ -43,0 +42,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
283609
233
5460
3
1
+ Addedtiny-invariant@^1.0.4
+ Addedtiny-invariant@1.3.3(transitive)