🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@motify/core

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@motify/core - npm Package Compare versions

Comparing version

to
0.17.1

11

CHANGELOG.md

@@ -6,6 +6,8 @@ # Change Log

## [0.17.1](https://github.com/nandorojo/moti/compare/v0.17.0...v0.17.1) (2021-12-15)
**Note:** Version bump only for package @motify/core
### Features
* add support for layout, entering & exiting props from reanimated ([1d09705](https://github.com/nandorojo/moti/commit/1d097052fc1c3c22c749ed53885b6c34fadcd714))

@@ -16,9 +18,2 @@

**Note:** Version bump only for package @motify/core
# [0.17.0](https://github.com/nandorojo/moti/compare/v0.16.1...v0.17.0) (2021-12-15)

@@ -25,0 +20,0 @@

@@ -5,3 +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';
import Animated from 'react-native-reanimated'; // copied from reanimated
// if we use Animated.AnimateProps
// then we get this TypeScript error:
// Exported variable 'View' has or is using name 'AnimatedNode' from external module "react-native-reanimated" but cannot be named.
export default function motify(ComponentWithoutAnimation) {

@@ -8,0 +12,0 @@ const Component = Animated.createAnimatedComponent(ComponentWithoutAnimation);

import React, { ComponentType } from 'react';
import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';
import type { MotiProps } from './types';
import { BaseAnimationBuilder, EntryExitAnimationFunction, LayoutAnimationFunction } from 'react-native-reanimated';
declare type AnimatedProps<Props> = {
animatedProps?: Partial<Props>;
layout?: BaseAnimationBuilder | LayoutAnimationFunction | typeof BaseAnimationBuilder;
entering?: BaseAnimationBuilder | typeof BaseAnimationBuilder | EntryExitAnimationFunction | Keyframe;
exiting?: BaseAnimationBuilder | typeof BaseAnimationBuilder | EntryExitAnimationFunction | Keyframe;
};
export default function motify<Style, Props extends {
style?: Style;
}, Ref, ExtraProps, Animate = ViewStyle | ImageStyle | TextStyle>(ComponentWithoutAnimation: ComponentType<Props>): () => React.ForwardRefExoticComponent<React.PropsWithoutRef<{
animatedProps?: any;
} & Props & MotiProps<Animate, import("./types").StyleValueWithReplacedTransforms<Animate>, Partial<import("./types").StyleValueWithSequenceArraysWithoutTransform<import("./types").StyleValueWithReplacedTransforms<Animate>, "transform" | "scaleX" | "scaleY" | "translateX" | "translateY" | "perspective" | "rotate" | "rotateX" | "rotateY" | "rotateZ" | "scale" | "skewX" | "skewY" | Exclude<keyof Animate, "scaleX" | "scaleY" | "translateX" | "translateY" | "perspective" | "rotate" | "rotateX" | "rotateY" | "rotateZ" | "scale" | "skewX" | "skewY">, "scaleX" | "scaleY" | "translateX" | "translateY" | "perspective" | "rotate" | "rotateX" | "rotateY" | "rotateZ" | "scale" | "skewX" | "skewY" | Exclude<Exclude<keyof Animate, "scaleX" | "scaleY" | "translateX" | "translateY" | "perspective" | "rotate" | "rotateX" | "rotateY" | "rotateZ" | "scale" | "skewX" | "skewY">, "transform">> & import("./types").StyleValueWithSequenceArraysWithTransform>> & ExtraProps & {
}, Ref, ExtraProps, Animate = ViewStyle | ImageStyle | TextStyle>(ComponentWithoutAnimation: ComponentType<Props>): () => React.ForwardRefExoticComponent<React.PropsWithoutRef<Props & AnimatedProps<Props> & MotiProps<Animate, import("./types").StyleValueWithReplacedTransforms<Animate>, Partial<import("./types").StyleValueWithSequenceArraysWithoutTransform<import("./types").StyleValueWithReplacedTransforms<Animate>, "transform" | "scaleX" | "scaleY" | "translateX" | "translateY" | "perspective" | "rotate" | "rotateX" | "rotateY" | "rotateZ" | "scale" | "skewX" | "skewY" | Exclude<keyof Animate, "scaleX" | "scaleY" | "translateX" | "translateY" | "perspective" | "rotate" | "rotateX" | "rotateY" | "rotateZ" | "scale" | "skewX" | "skewY">, "scaleX" | "scaleY" | "translateX" | "translateY" | "perspective" | "rotate" | "rotateX" | "rotateY" | "rotateZ" | "scale" | "skewX" | "skewY" | Exclude<Exclude<keyof Animate, "scaleX" | "scaleY" | "translateX" | "translateY" | "perspective" | "rotate" | "rotateX" | "rotateY" | "rotateZ" | "scale" | "skewX" | "skewY">, "transform">> & import("./types").StyleValueWithSequenceArraysWithTransform>> & ExtraProps & {
children?: React.ReactNode;
}> & React.RefAttributes<Ref>>;
export {};
{
"name": "@motify/core",
"version": "0.17.0",
"version": "0.17.1",
"private": false,

@@ -35,3 +35,3 @@ "license": "MIT",

"sideEffects": false,
"gitHead": "f4e65f6765fb8279b3d7d3b843db468fdf034b87",
"gitHead": "c557c53b926acd4a7101e7daf8396d334076812f",
"scripts": {

@@ -66,3 +66,3 @@ "prepare": "bob build",

"react-native-gesture-handler": "~2.1.0",
"react-native-reanimated": "~2.3.0",
"react-native-reanimated": "~2.3.1",
"react-native-web": "0.15.3",

@@ -69,0 +69,0 @@ "typescript": "^4.0.3"

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