Socket
Socket
Sign inDemoInstall

@visx/bounds

Package Overview
Dependencies
Maintainers
4
Versions
15
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.16.0 to 2.17.0-alpha.0

32

esm/enhancers/withBoundingRects.js

@@ -1,11 +0,5 @@

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); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
/* eslint react/no-did-mount-set-state: 0, react/no-find-dom-node: 0 */

@@ -23,16 +17,8 @@ import React from 'react';

export default function withBoundingRects(BaseComponent) {
var _class, _temp;
return _temp = _class = /*#__PURE__*/function (_React$PureComponent) {
var _class;
return _class = /*#__PURE__*/function (_React$PureComponent) {
_inheritsLoose(WrappedComponent, _React$PureComponent);
function WrappedComponent(props) {
var _this;
_this = _React$PureComponent.call(this, props) || this;
_defineProperty(_assertThisInitialized(_this), "node", void 0);
_defineProperty(_assertThisInitialized(_this), "nodeRef", void 0);
_this.state = {

@@ -46,9 +32,6 @@ rect: undefined,

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

@@ -59,3 +42,2 @@ this.setState(function () {

};
_proto.getRects = function getRects() {

@@ -72,3 +54,2 @@ if (!this.node) return this.state;

};
_proto.render = function render() {

@@ -80,5 +61,4 @@ return /*#__PURE__*/React.createElement(BaseComponent, _extends({

};
return WrappedComponent;
}(React.PureComponent), _defineProperty(_class, "displayName", "withBoundingRects(" + (BaseComponent.displayName || '') + ")"), _temp;
}(React.PureComponent), _class.displayName = "withBoundingRects(" + (BaseComponent.displayName || '') + ")", _class;
}

@@ -5,19 +5,9 @@ "use strict";

exports.default = withBoundingRects;
var _react = _interopRequireDefault(require("react"));
var _reactDom = _interopRequireDefault(require("react-dom"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var emptyRect = {

@@ -31,18 +21,9 @@ top: 0,

};
function withBoundingRects(BaseComponent) {
var _class, _temp;
return _temp = _class = /*#__PURE__*/function (_React$PureComponent) {
var _class;
return _class = /*#__PURE__*/function (_React$PureComponent) {
_inheritsLoose(WrappedComponent, _React$PureComponent);
function WrappedComponent(props) {
var _this;
_this = _React$PureComponent.call(this, props) || this;
_defineProperty(_assertThisInitialized(_this), "node", void 0);
_defineProperty(_assertThisInitialized(_this), "nodeRef", void 0);
_this.state = {

@@ -56,9 +37,6 @@ rect: undefined,

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

@@ -69,3 +47,2 @@ this.setState(function () {

};
_proto.getRects = function getRects() {

@@ -82,3 +59,2 @@ if (!this.node) return this.state;

};
_proto.render = function render() {

@@ -90,5 +66,4 @@ return /*#__PURE__*/_react.default.createElement(BaseComponent, _extends({

};
return WrappedComponent;
}(_react.default.PureComponent), _defineProperty(_class, "displayName", "withBoundingRects(" + (BaseComponent.displayName || '') + ")"), _temp;
}(_react.default.PureComponent), _class.displayName = "withBoundingRects(" + (BaseComponent.displayName || '') + ")", _class;
}

@@ -5,7 +5,4 @@ "use strict";

exports.withBoundingRects = void 0;
var _withBoundingRects = _interopRequireDefault(require("./enhancers/withBoundingRects"));
exports.withBoundingRects = _withBoundingRects.default;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

4

package.json
{
"name": "@visx/bounds",
"version": "2.16.0",
"version": "2.17.0-alpha.0",
"description": "Utilities to make your life with bounding boxes better",

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

},
"gitHead": "9fef875c6a377e9b808be72bd9efeaeeb37e2151"
"gitHead": "77292e262dfe082b554b64839eb3ee141439a95f"
}
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