New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@animini/core-react

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@animini/core-react - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

8

CHANGELOG.md
# @animini/core-react
## 0.2.1
### Patch Changes
- bf2fd1b: Internal refactoring
- Updated dependencies [bf2fd1b]
- @animini/core@0.2.1
## 0.2.0

@@ -4,0 +12,0 @@

5

dist/animini-core-react.cjs.dev.js

@@ -10,6 +10,7 @@ 'use strict';

const animate = core.buildAnimate(target);
return function useAnimini(currentValues, masterConfig) {
return function useAnimini(masterConfig) {
const el = react.useRef(null);
const api = react.useMemo(() => animate(el, currentValues, masterConfig), [currentValues, target]);
const [api] = react.useState(() => animate(el, masterConfig));
react.useEffect(() => {
api.setCachedValues();
return () => api.clean();

@@ -16,0 +17,0 @@ }, [api]);

@@ -10,6 +10,7 @@ 'use strict';

const animate = core.buildAnimate(target);
return function useAnimini(currentValues, masterConfig) {
return function useAnimini(masterConfig) {
const el = react.useRef(null);
const api = react.useMemo(() => animate(el, currentValues, masterConfig), [currentValues, target]);
const [api] = react.useState(() => animate(el, masterConfig));
react.useEffect(() => {
api.setCachedValues();
return () => api.clean();

@@ -16,0 +17,0 @@ }, [api]);

7

dist/animini-core-react.esm.js

@@ -1,2 +0,2 @@

import { useRef, useMemo, useEffect } from 'react';
import { useRef, useState, useEffect } from 'react';
import { buildAnimate } from '@animini/core';

@@ -6,6 +6,7 @@

const animate = buildAnimate(target);
return function useAnimini(currentValues, masterConfig) {
return function useAnimini(masterConfig) {
const el = useRef(null);
const api = useMemo(() => animate(el, currentValues, masterConfig), [currentValues, target]);
const [api] = useState(() => animate(el, masterConfig));
useEffect(() => {
api.setCachedValues();
return () => api.clean();

@@ -12,0 +13,0 @@ }, [api]);

/// <reference types="react" />
import { Config, Payload, Target } from '@animini/core';
export declare function buildReactHook<ElementType, ValueType extends Payload>(target: Target<ElementType, ValueType>): <ElementType_1>(currentValues: any, masterConfig?: Config) => [import("react").RefObject<ElementType_1>, {
export declare function buildReactHook<ElementType, ValueType extends Payload>(target: Target<ElementType, ValueType>): <ElementType_1>(masterConfig?: Config) => [import("react").RefObject<ElementType_1>, {
get: (key: keyof ValueType) => any;

@@ -8,2 +8,3 @@ start: (to: Partial<ValueType>, config?: Config | undefined) => Promise<unknown>;

clean: () => void;
setCachedValues: () => void;
}];
{
"name": "@animini/core-react",
"version": "0.2.0",
"version": "0.2.1",
"description": "React core for animini",

@@ -19,4 +19,4 @@ "keywords": [],

"dependencies": {
"@animini/core": "0.2.0"
"@animini/core": "0.2.1"
}
}

@@ -1,2 +0,2 @@

import { useRef, useEffect, useMemo } from 'react'
import { useRef, useEffect, useState } from 'react'
import { buildAnimate, Config, Payload, Target } from '@animini/core'

@@ -7,9 +7,8 @@

return function useAnimini<ElementType>(currentValues: any, masterConfig?: Config) {
return function useAnimini<ElementType>(masterConfig?: Config) {
const el = useRef<ElementType>(null)
// @ts-ignore
// eslint-disable-next-line react-hooks/exhaustive-deps
const api = useMemo(() => animate(el, currentValues, masterConfig), [currentValues, target])
const [api] = useState(() => animate(el as any, masterConfig))
useEffect(() => {
api.setCachedValues()
return () => api.clean()

@@ -16,0 +15,0 @@ }, [api])

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc