🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@nivo/tooltip

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nivo/tooltip - npm Package Compare versions

Comparing version

to
0.64.0

13

dist/nivo-tooltip.cjs.js

@@ -117,3 +117,7 @@ 'use strict';

};
var translate = function translate(x, y) {
return "translate(".concat(x, "px, ").concat(y, "px)");
};
var TooltipWrapper = function TooltipWrapper(_ref) {
var _animatedProps$transf;
var position = _ref.position,

@@ -134,5 +138,5 @@ anchor = _ref.anchor,

var hasDimension = bounds.width > 0 && bounds.height > 0;
var x = Math.round(position[0]);
var y = Math.round(position[1]);
if (hasDimension) {
var x = Math.round(position[0]);
var y = Math.round(position[1]);
if (anchor === 'top') {

@@ -155,3 +159,3 @@ x -= bounds.width / 2;

to = {
transform: "translate(".concat(x, "px, ").concat(y, "px)")
transform: translate(x, y)
};

@@ -169,4 +173,3 @@ if (!previousPosition.current) {

var style = _objectSpread2(_objectSpread2(_objectSpread2({}, tooltipStyle), theme.tooltip), {}, {
transform: animatedProps.transform,
opacity: animatedProps.transform ? 1 : 0
transform: (_animatedProps$transf = animatedProps.transform) !== null && _animatedProps$transf !== void 0 ? _animatedProps$transf : translate(x, y)
});

@@ -173,0 +176,0 @@ return React__default.createElement(reactSpring.animated.div, {

@@ -110,3 +110,7 @@ import React, { memo, useRef, useMemo, createContext, useState, useCallback, useContext } from 'react';

};
var translate = function translate(x, y) {
return "translate(".concat(x, "px, ").concat(y, "px)");
};
var TooltipWrapper = function TooltipWrapper(_ref) {
var _animatedProps$transf;
var position = _ref.position,

@@ -127,5 +131,5 @@ anchor = _ref.anchor,

var hasDimension = bounds.width > 0 && bounds.height > 0;
var x = Math.round(position[0]);
var y = Math.round(position[1]);
if (hasDimension) {
var x = Math.round(position[0]);
var y = Math.round(position[1]);
if (anchor === 'top') {

@@ -148,3 +152,3 @@ x -= bounds.width / 2;

to = {
transform: "translate(".concat(x, "px, ").concat(y, "px)")
transform: translate(x, y)
};

@@ -162,4 +166,3 @@ if (!previousPosition.current) {

var style = _objectSpread2(_objectSpread2(_objectSpread2({}, tooltipStyle), theme.tooltip), {}, {
transform: animatedProps.transform,
opacity: animatedProps.transform ? 1 : 0
transform: (_animatedProps$transf = animatedProps.transform) !== null && _animatedProps$transf !== void 0 ? _animatedProps$transf : translate(x, y)
});

@@ -166,0 +169,0 @@ return React.createElement(animated.div, {

@@ -114,3 +114,7 @@ (function (global, factory) {

};
var translate = function translate(x, y) {
return "translate(".concat(x, "px, ").concat(y, "px)");
};
var TooltipWrapper = function TooltipWrapper(_ref) {
var _animatedProps$transf;
var position = _ref.position,

@@ -131,5 +135,5 @@ anchor = _ref.anchor,

var hasDimension = bounds.width > 0 && bounds.height > 0;
var x = Math.round(position[0]);
var y = Math.round(position[1]);
if (hasDimension) {
var x = Math.round(position[0]);
var y = Math.round(position[1]);
if (anchor === 'top') {

@@ -152,3 +156,3 @@ x -= bounds.width / 2;

to = {
transform: "translate(".concat(x, "px, ").concat(y, "px)")
transform: translate(x, y)
};

@@ -166,4 +170,3 @@ if (!previousPosition.current) {

var style = _objectSpread2(_objectSpread2(_objectSpread2({}, tooltipStyle), theme.tooltip), {}, {
transform: animatedProps.transform,
opacity: animatedProps.transform ? 1 : 0
transform: (_animatedProps$transf = animatedProps.transform) !== null && _animatedProps$transf !== void 0 ? _animatedProps$transf : translate(x, y)
});

@@ -170,0 +173,0 @@ return React__default.createElement(reactSpring.animated.div, {

{
"name": "@nivo/tooltip",
"version": "0.63.0",
"version": "0.64.0",
"license": "MIT",

@@ -21,3 +21,3 @@ "author": {

"peerDependencies": {
"@nivo/core": "0.62.0",
"@nivo/core": "0.63.1",
"prop-types": ">= 15.5.10 < 16.0.0"

@@ -28,3 +28,3 @@ },

},
"gitHead": "defc453433d8e6767ba3d612cce0d05c119ec5ed"
"gitHead": "fd731453ed88a31074a8199365e837ad61c90e4c"
}

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