@motify/core
Advanced tools
Comparing version
@@ -6,2 +6,15 @@ # Change Log | ||
# [0.13.0-alpha.0](https://github.com/nandorojo/moti/compare/v0.11.0...v0.13.0-alpha.0) (2021-08-29) | ||
### Features | ||
* add animated TS types to moti types ([7845c44](https://github.com/nandorojo/moti/commit/7845c4462d54da6d3ebb9651cb32f8bc351f6a65)) | ||
* init pressable ([7b9e897](https://github.com/nandorojo/moti/commit/7b9e8977837239a6592a624745c8291c37ef82c9)) | ||
* web-only dropdown menu ([2b8c944](https://github.com/nandorojo/moti/commit/2b8c94407b15b3169dbe46541370a47af692f413)) | ||
# [0.11.0](https://github.com/nandorojo/moti/compare/v0.10.1...v0.11.0) (2021-05-17) | ||
@@ -8,0 +21,0 @@ |
@@ -22,9 +22,6 @@ "use strict"; | ||
// https://www.framer.com/blog/posts/magic-motion/ | ||
function motify(ComponentWithoutAnimation) { | ||
const Component = _reactNativeReanimated.default.createAnimatedComponent(ComponentWithoutAnimation); | ||
const withAnimations = () => // we might use these later | ||
// outerProps?: ExtraProps | ||
{ | ||
const withAnimations = () => { | ||
const Motified = /*#__PURE__*/(0, _react.forwardRef)(function Moti({ | ||
@@ -63,2 +60,3 @@ animate, | ||
}); | ||
Motified.displayName = "Moti.".concat(Component.displayName || Component.name || 'NoName'); | ||
return Motified; | ||
@@ -65,0 +63,0 @@ }; |
@@ -5,10 +5,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import useMapAnimateToStyle from './use-map-animate-to-style'; | ||
import Animated from 'react-native-reanimated'; // https://www.framer.com/blog/posts/magic-motion/ | ||
import Animated from 'react-native-reanimated'; | ||
export default function motify(ComponentWithoutAnimation) { | ||
const Component = Animated.createAnimatedComponent(ComponentWithoutAnimation); | ||
const withAnimations = () => // we might use these later | ||
// outerProps?: ExtraProps | ||
{ | ||
const withAnimations = () => { | ||
const Motified = /*#__PURE__*/forwardRef(function Moti({ | ||
@@ -47,2 +44,3 @@ animate, | ||
}); | ||
Motified.displayName = "Moti.".concat(Component.displayName || Component.name || 'NoName'); | ||
return Motified; | ||
@@ -49,0 +47,0 @@ }; |
@@ -6,4 +6,6 @@ import React, { ComponentType } from 'react'; | ||
style?: Style; | ||
}, Ref, ExtraProps, Animate = ViewStyle | ImageStyle | TextStyle>(ComponentWithoutAnimation: ComponentType<Props>): () => React.ForwardRefExoticComponent<React.PropsWithoutRef<Props & MotiProps<Animate, import("./types").StyleValueWithReplacedTransforms<Animate>, import("./types").StyleValueWithSequenceArrays<import("./types").StyleValueWithReplacedTransforms<Animate>>> & ExtraProps & { | ||
}, Ref, ExtraProps, Animate = ViewStyle | ImageStyle | TextStyle>(ComponentWithoutAnimation: ComponentType<Props>): () => React.ForwardRefExoticComponent<React.PropsWithoutRef<{ | ||
animatedProps?: any; | ||
} & Props & MotiProps<Animate, import("./types").StyleValueWithReplacedTransforms<Animate>, import("./types").StyleValueWithSequenceArrays<import("./types").StyleValueWithReplacedTransforms<Animate>>> & ExtraProps & { | ||
children?: React.ReactNode; | ||
}> & React.RefAttributes<Ref>>; |
@@ -244,3 +244,3 @@ import type Animated from 'react-native-reanimated'; | ||
*/ | ||
__state: Animated.SharedValue<any>; | ||
__state: Animated.SharedValue<any> | Animated.DerivedValue<any>; | ||
/** | ||
@@ -247,0 +247,0 @@ * Transition to another state, as defined by this hook. |
{ | ||
"name": "@motify/core", | ||
"version": "0.11.0", | ||
"version": "0.13.0-alpha.0+809bb2e", | ||
"private": false, | ||
@@ -35,3 +35,3 @@ "license": "MIT", | ||
"sideEffects": false, | ||
"gitHead": "3a5616d738147a847c878e0c782d40f83f2d10ca", | ||
"gitHead": "809bb2e6e86b2f9194dd9343f0f3e52b2d32522c", | ||
"scripts": { | ||
@@ -67,6 +67,6 @@ "prepare": "bob build", | ||
"react-native-gesture-handler": "~1.8.0", | ||
"react-native-reanimated": "~2.1.0", | ||
"react-native-web": "~0.14.9", | ||
"react-native-reanimated": "~2.2.0", | ||
"react-native-web": "0.15.3", | ||
"typescript": "^4.0.3" | ||
} | ||
} |
@@ -325,3 +325,3 @@ // import type { UseAnimationState } from './use-animator/types' | ||
*/ | ||
__state: Animated.SharedValue<any> | ||
__state: Animated.SharedValue<any> | Animated.DerivedValue<any> | ||
/** | ||
@@ -328,0 +328,0 @@ * Transition to another state, as defined by this hook. |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
222267
0.36%1
Infinity%