Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

baby-i-am-faded

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baby-i-am-faded - npm Package Compare versions

Comparing version 1.0.3 to 2.0.1

4

dist/index.d.ts

@@ -40,4 +40,4 @@ import { Keyframes } from '@emotion/serialize';

timingFunction?: string;
keyframes?: Keyframes;
keyframes?: any;
iterationCount?: number;
}): import("@emotion/utils").SerializedStyles;
}): import("@emotion/react").SerializedStyles;

@@ -37,8 +37,8 @@ "use strict";

/** @jsx jsx */
var core_1 = require("@emotion/core");
var react_1 = __importStar(require("react"));
var react_1 = require("@emotion/react");
var react_2 = __importStar(require("react"));
var react_intersection_observer_1 = require("react-intersection-observer");
var react_is_1 = require("react-is");
var support_1 = require("./support");
exports.Faded = react_1.forwardRef(function (_a, ref1) {
exports.Faded = react_2.forwardRef(function (_a, ref1) {
var _b = _a.cascade, cascade = _b === void 0 ? false : _b, _c = _a.damping, damping = _c === void 0 ? 0.3 : _c, _d = _a.duration, duration = _d === void 0 ? 400 : _d, _e = _a.threshold, threshold = _e === void 0 ? 0.15 : _e, _f = _a.triggerOnce, triggerOnce = _f === void 0 ? false : _f, _g = _a.animation, animation = _g === void 0 ? support_1.fadeInUp : _g, _h = _a.whenInView, whenInView = _h === void 0 ? false : _h, _j = _a.delay, delay = _j === void 0 ? 0 : _j, children = _a.children, rest = __rest(_a, ["cascade", "damping", "duration", "threshold", "triggerOnce", "animation", "whenInView", "delay", "children"]);

@@ -51,3 +51,3 @@ function makeAnimated(_a) {

if (react_is_1.isFragment(nodes)) {
return core_1.jsx('div', {
return react_1.jsx('div', {
css: getAnimationCss({ keyframes: animation, delay: delay }),

@@ -60,3 +60,3 @@ }, nodes);

return words_1.map(function (word, index) {
return (core_1.jsx("span", { style: {
return (react_1.jsx("span", { style: {
display: 'inline-block',

@@ -72,5 +72,5 @@ whiteSpace: 'pre',

}
return react_1.default.Children.map(nodes, function (node, index) {
return react_2.default.Children.map(nodes, function (node, index) {
var _a, _b;
if (!react_1.isValidElement(node)) {
if (!react_2.isValidElement(node)) {
return node;

@@ -99,14 +99,14 @@ }

if (whenInView) {
return (core_1.jsx(react_intersection_observer_1.InView, __assign({ threshold: threshold, triggerOnce: triggerOnce }, rest), function (_a) {
return (react_1.jsx(react_intersection_observer_1.InView, __assign({ threshold: threshold, triggerOnce: triggerOnce }, rest), function (_a) {
var inView = _a.inView, ref = _a.ref, entry = _a.entry;
return (core_1.jsx("div", { ref: ref }, makeAnimated({ inView: inView, nodes: children })));
return (react_1.jsx("div", { ref: ref }, makeAnimated({ inView: inView, nodes: children })));
}));
}
return (core_1.jsx("div", __assign({ ref: ref1 }, rest), makeAnimated({ inView: true, nodes: children })));
return (react_1.jsx("div", __assign({ ref: ref1 }, rest), makeAnimated({ inView: true, nodes: children })));
});
function getAnimationCss(_a) {
var _b = _a.duration, duration = _b === void 0 ? 1000 : _b, _c = _a.delay, delay = _c === void 0 ? 0 : _c, _d = _a.timingFunction, timingFunction = _d === void 0 ? 'ease' : _d, _e = _a.keyframes, keyframes = _e === void 0 ? support_1.fadeInUp : _e, _f = _a.iterationCount, iterationCount = _f === void 0 ? 1 : _f;
return core_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n animation-duration: ", "ms;\n animation-timing-function: ", ";\n animation-delay: ", "ms;\n animation-name: ", ";\n animation-direction: normal;\n animation-fill-mode: both;\n animation-iteration-count: ", ";\n "], ["\n animation-duration: ", "ms;\n animation-timing-function: ", ";\n animation-delay: ", "ms;\n animation-name: ", ";\n animation-direction: normal;\n animation-fill-mode: both;\n animation-iteration-count: ", ";\n "])), duration, timingFunction, delay, keyframes, iterationCount);
return react_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n animation-duration: ", "ms;\n animation-timing-function: ", ";\n animation-delay: ", "ms;\n animation-name: ", ";\n animation-direction: normal;\n animation-fill-mode: both;\n animation-iteration-count: ", ";\n "], ["\n animation-duration: ", "ms;\n animation-timing-function: ", ";\n animation-delay: ", "ms;\n animation-name: ", ";\n animation-direction: normal;\n animation-fill-mode: both;\n animation-iteration-count: ", ";\n "])), duration, timingFunction, delay, keyframes, iterationCount);
}
exports.getAnimationCss = getAnimationCss;
var templateObject_1;

@@ -22,6 +22,6 @@ "use strict";

/** @jsx jsx */
var core_1 = require("@emotion/core");
var react_1 = __importDefault(require("react"));
var react_1 = require("@emotion/react");
var react_2 = __importDefault(require("react"));
exports.cloneElement = function (element, props) {
return core_1.jsx(element.type, __assign(__assign({ key: element.key, ref: element.ref }, element.props), props));
return react_1.jsx(element.type, __assign(__assign({ key: element.key, ref: element.ref }, element.props), props));
};

@@ -33,4 +33,4 @@ function useCombinedRefs() {

}
var targetRef = react_1.default.useRef();
react_1.default.useEffect(function () {
var targetRef = react_2.default.useRef();
react_2.default.useEffect(function () {
refs.forEach(function (ref) {

@@ -50,3 +50,3 @@ if (!ref)

exports.useCombinedRefs = useCombinedRefs;
exports.fadeInUp = core_1.keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from {\n opacity: 0;\n transform: translate3d(0px, -20px, 0px);\n }\n to {\n opacity: 1;\n transform: 'none';\n }\n"], ["\n from {\n opacity: 0;\n transform: translate3d(0px, -20px, 0px);\n }\n to {\n opacity: 1;\n transform: 'none';\n }\n"])));
exports.fadeInUp = react_1.keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from {\n opacity: 0;\n transform: translate3d(0px, -20px, 0px);\n }\n to {\n opacity: 1;\n transform: 'none';\n }\n"], ["\n from {\n opacity: 0;\n transform: translate3d(0px, -20px, 0px);\n }\n to {\n opacity: 1;\n transform: 'none';\n }\n"])));
var templateObject_1;

@@ -40,4 +40,4 @@ import { Keyframes } from '@emotion/serialize';

timingFunction?: string;
keyframes?: Keyframes;
keyframes?: any;
iterationCount?: number;
}): import("@emotion/utils").SerializedStyles;
}): import("@emotion/react").SerializedStyles;

@@ -28,3 +28,3 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {

/** @jsx jsx */
import { css, jsx } from '@emotion/core';
import { css, jsx } from '@emotion/react';
import React, { forwardRef, isValidElement } from 'react';

@@ -31,0 +31,0 @@ import { InView } from 'react-intersection-observer';

@@ -17,3 +17,3 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {

/** @jsx jsx */
import { jsx, keyframes } from '@emotion/core';
import { jsx, keyframes } from '@emotion/react';
import React from 'react';

@@ -20,0 +20,0 @@ export var cloneElement = function (element, props) {

{
"name": "baby-i-am-faded",
"_": "[bump if baby-i-am-faded]",
"version": "1.0.3",
"version": "2.0.1",
"description": "",

@@ -35,4 +35,4 @@ "main": "dist/index.js",

"@babel/core": "^7.9.0",
"@chakra-ui/core": "^0.7.0",
"@emotion/core": "^10.0.28",
"@chakra-ui/react": "latest",
"@emotion/react": "^11",
"@storybook/addon-actions": "^5.3.17",

@@ -49,7 +49,6 @@ "@storybook/addon-links": "^5.3.17",

"dotenv": "^8.2.0",
"emotion-theming": "^10.0.27",
"mocha": "^6.1.4",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-emotion-animations": "*",
"react-emotion-animations": "2.x.x",
"sucrase": "^3.12.1",

@@ -60,10 +59,10 @@ "ts-loader": "^6.2.2",

"peerDependencies": {
"@emotion/core": "*"
"@emotion/react": "*"
},
"dependencies": {
"@emotion/serialize": "^0.11.16",
"@emotion/styled": "^10.0.27",
"react-intersection-observer": "^8.26.1",
"@emotion/serialize": "^1.0.0",
"@emotion/styled": "^11",
"react-intersection-observer": "^8.31.0",
"react-is": "^16.13.1"
}
}
/** @jsx jsx */
import { jsx, keyframes } from '@emotion/core'
import { jsx, keyframes } from '@emotion/react'
import React from 'react'

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

Sorry, the diff of this file is not supported yet

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