baby-i-am-faded
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -39,2 +39,4 @@ import { CSSProperties, FC, ReactNode } from 'react'; | ||
export declare const Faded: FC<FadedProps>; | ||
export declare const getAnimationCss: import("micro-memoize").MicroMemoize.Memoized<(keyframes: string, delay: number, duration: number, timingFunction: string) => any>; | ||
export declare function getAnimationCss(keyframes: string, delay: number, duration: number, timingFunction: string): { | ||
animation: string; | ||
}; |
@@ -24,5 +24,2 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
@@ -36,3 +33,2 @@ if (mod && mod.__esModule) return mod; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var micro_memoize_1 = __importDefault(require("micro-memoize")); | ||
var react_1 = __importStar(require("react")); | ||
@@ -53,3 +49,3 @@ var react_intersection_observer_1 = require("react-intersection-observer"); | ||
return react_1.default.createElement('div', { | ||
style: exports.getAnimationCss(animation, delay, duration, timingFunction), | ||
style: getAnimationCss(animation, delay, duration, timingFunction), | ||
}, nodes); | ||
@@ -61,3 +57,3 @@ } | ||
return words_1.map(function (word, index) { | ||
return (react_1.default.createElement("span", { style: __assign({ display: 'inline-block', whiteSpace: 'pre' }, exports.getAnimationCss(animation, delay + | ||
return (react_1.default.createElement("span", { style: __assign({ display: 'inline-block', whiteSpace: 'pre' }, getAnimationCss(animation, delay + | ||
(cascade | ||
@@ -76,3 +72,3 @@ ? (index * duration) / (2 / damping) | ||
if (inView) { | ||
Object.assign(style, exports.getAnimationCss(animation, delay + (index * duration) / (2 / damping), duration, timingFunction)); | ||
Object.assign(style, getAnimationCss(animation, delay + (index * duration) / (2 / damping), duration, timingFunction)); | ||
} | ||
@@ -95,6 +91,7 @@ else { | ||
}); | ||
exports.getAnimationCss = micro_memoize_1.default(function getAnimationCss(keyframes, delay, duration, timingFunction) { | ||
function getAnimationCss(keyframes, delay, duration, timingFunction) { | ||
return { | ||
animation: duration + "ms " + keyframes + " " + delay + "ms normal both running " + timingFunction, | ||
}; | ||
}); | ||
} | ||
exports.getAnimationCss = getAnimationCss; |
@@ -39,2 +39,4 @@ import { CSSProperties, FC, ReactNode } from 'react'; | ||
export declare const Faded: FC<FadedProps>; | ||
export declare const getAnimationCss: import("micro-memoize").MicroMemoize.Memoized<(keyframes: string, delay: number, duration: number, timingFunction: string) => any>; | ||
export declare function getAnimationCss(keyframes: string, delay: number, duration: number, timingFunction: string): { | ||
animation: string; | ||
}; |
@@ -23,3 +23,2 @@ var __assign = (this && this.__assign) || function () { | ||
}; | ||
import memoize from 'micro-memoize'; | ||
import React, { cloneElement, forwardRef, isValidElement, } from 'react'; | ||
@@ -79,6 +78,6 @@ import { InView } from 'react-intersection-observer'; | ||
}); | ||
export var getAnimationCss = memoize(function getAnimationCss(keyframes, delay, duration, timingFunction) { | ||
export function getAnimationCss(keyframes, delay, duration, timingFunction) { | ||
return { | ||
animation: duration + "ms " + keyframes + " " + delay + "ms normal both running " + timingFunction, | ||
}; | ||
}); | ||
} |
{ | ||
"name": "baby-i-am-faded", | ||
"_": "[bump if baby-i-am-faded]", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "", | ||
@@ -58,3 +58,2 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"micro-memoize": "^4.0.9", | ||
"react-intersection-observer": "^8.31.0", | ||
@@ -61,0 +60,0 @@ "react-is": "^16.13.1" |
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
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
2
20594
504
- Removedmicro-memoize@^4.0.9
- Removedmicro-memoize@4.1.2(transitive)