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

@visx/bounds

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@visx/bounds - npm Package Compare versions

Comparing version 2.10.0 to 2.16.0

9

esm/enhancers/withBoundingRects.js

@@ -35,2 +35,4 @@ 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); }

_defineProperty(_assertThisInitialized(_this), "nodeRef", void 0);
_this.state = {

@@ -40,2 +42,3 @@ rect: undefined,

};
_this.nodeRef = /*#__PURE__*/React.createRef();
_this.getRects = _this.getRects.bind(_assertThisInitialized(_this));

@@ -48,5 +51,6 @@ return _this;

_proto.componentDidMount = function componentDidMount() {
var _this2 = this;
var _this$nodeRef,
_this2 = this;
this.node = ReactDOM.findDOMNode(this);
this.node = (_this$nodeRef = this.nodeRef) != null && _this$nodeRef.current ? this.nodeRef.current : ReactDOM.findDOMNode(this);
this.setState(function () {

@@ -71,2 +75,3 @@ return _this2.getRects();

return /*#__PURE__*/React.createElement(BaseComponent, _extends({
nodeRef: this.nodeRef,
getRects: this.getRects

@@ -73,0 +78,0 @@ }, this.state, this.props));

@@ -17,2 +17,3 @@ import React from 'react';

parentRect?: rectShape;
nodeRef?: React.RefObject<HTMLElement>;
};

@@ -22,2 +23,3 @@ export default function withBoundingRects<Props extends object = {}>(BaseComponent: React.ComponentType<Props>): {

node: HTMLElement | undefined | null;
nodeRef: React.RefObject<HTMLElement>;
componentDidMount(): void;

@@ -24,0 +26,0 @@ getRects(): Readonly<{}>;

@@ -44,2 +44,4 @@ "use strict";

_defineProperty(_assertThisInitialized(_this), "nodeRef", void 0);
_this.state = {

@@ -49,2 +51,3 @@ rect: undefined,

};
_this.nodeRef = /*#__PURE__*/_react.default.createRef();
_this.getRects = _this.getRects.bind(_assertThisInitialized(_this));

@@ -57,5 +60,6 @@ return _this;

_proto.componentDidMount = function componentDidMount() {
var _this2 = this;
var _this$nodeRef,
_this2 = this;
this.node = _reactDom.default.findDOMNode(this);
this.node = (_this$nodeRef = this.nodeRef) != null && _this$nodeRef.current ? this.nodeRef.current : _reactDom.default.findDOMNode(this);
this.setState(function () {

@@ -80,2 +84,3 @@ return _this2.getRects();

return /*#__PURE__*/_react.default.createElement(BaseComponent, _extends({
nodeRef: this.nodeRef,
getRects: this.getRects

@@ -82,0 +87,0 @@ }, this.state, this.props));

{
"name": "@visx/bounds",
"version": "2.10.0",
"version": "2.16.0",
"description": "Utilities to make your life with bounding boxes better",

@@ -41,3 +41,3 @@ "sideEffects": false,

},
"gitHead": "3d655a8b100d862c91d4b5655e221259357a094d"
"gitHead": "9fef875c6a377e9b808be72bd9efeaeeb37e2151"
}

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