Socket
Socket
Sign inDemoInstall

@vx/bounds

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vx/bounds - npm Package Compare versions

Comparing version 0.0.192 to 0.0.193-alpha.0

lib/enhancers/withBoundingRects.d.ts

30

esm/enhancers/withBoundingRects.js

@@ -7,6 +7,7 @@ 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 _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; }
/* eslint react/no-did-mount-set-state: 0, react/no-find-dom-node: 0 */
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
var emptyRect = {

@@ -20,17 +21,6 @@ top: 0,

};
var rectShape = PropTypes.shape({
top: PropTypes.number.isRequired,
right: PropTypes.number.isRequired,
bottom: PropTypes.number.isRequired,
left: PropTypes.number.isRequired,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired
});
export var withBoundingRectsProps = {
getRects: PropTypes.func,
rect: rectShape,
parentRect: rectShape
};
export default function withBoundingRects(BaseComponent) {
var WrappedComponent =
var _class, _temp;
return _temp = _class =
/*#__PURE__*/

@@ -44,2 +34,5 @@ function (_React$PureComponent) {

_this = _React$PureComponent.call(this, props) || this;
_defineProperty(_assertThisInitialized(_this), "node", void 0);
_this.state = {

@@ -83,8 +76,3 @@ rect: undefined,

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

@@ -1,1 +0,1 @@

export { default as withBoundingRects, withBoundingRectsProps } from './enhancers/withBoundingRects';
export { default as withBoundingRects } from './enhancers/withBoundingRects';

@@ -5,3 +5,2 @@ "use strict";

exports.default = withBoundingRects;
exports.withBoundingRectsProps = void 0;

@@ -12,4 +11,2 @@ var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -23,2 +20,4 @@

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; }
var emptyRect = {

@@ -33,20 +32,6 @@ top: 0,

var rectShape = _propTypes.default.shape({
top: _propTypes.default.number.isRequired,
right: _propTypes.default.number.isRequired,
bottom: _propTypes.default.number.isRequired,
left: _propTypes.default.number.isRequired,
width: _propTypes.default.number.isRequired,
height: _propTypes.default.number.isRequired
});
function withBoundingRects(BaseComponent) {
var _class, _temp;
var withBoundingRectsProps = {
getRects: _propTypes.default.func,
rect: rectShape,
parentRect: rectShape
};
exports.withBoundingRectsProps = withBoundingRectsProps;
function withBoundingRects(BaseComponent) {
var WrappedComponent =
return _temp = _class =
/*#__PURE__*/

@@ -60,2 +45,5 @@ function (_React$PureComponent) {

_this = _React$PureComponent.call(this, props) || this;
_defineProperty(_assertThisInitialized(_this), "node", void 0);
_this.state = {

@@ -99,8 +87,3 @@ rect: undefined,

return WrappedComponent;
}(_react.default.PureComponent);
WrappedComponent.propTypes = BaseComponent.propTypes;
WrappedComponent.defaultProps = BaseComponent.defaultProps;
WrappedComponent.displayName = "withBoundingRects(" + (BaseComponent.displayName || '') + ")";
return WrappedComponent;
}(_react.default.PureComponent), _defineProperty(_class, "displayName", "withBoundingRects(" + (BaseComponent.displayName || '') + ")"), _temp;
}
"use strict";
exports.__esModule = true;
exports.withBoundingRectsProps = exports.withBoundingRects = void 0;
exports.withBoundingRects = void 0;
var _withBoundingRects = _interopRequireWildcard(require("./enhancers/withBoundingRects"));
var _withBoundingRects = _interopRequireDefault(require("./enhancers/withBoundingRects"));
exports.withBoundingRects = _withBoundingRects.default;
exports.withBoundingRectsProps = _withBoundingRects.withBoundingRectsProps;
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
{
"name": "@vx/bounds",
"version": "0.0.192",
"version": "0.0.193-alpha.0",
"description": "Utilities to make your life with bounding boxes better",

@@ -8,2 +8,3 @@ "sideEffects": false,

"module": "esm/index.js",
"types": "lib/index.d.ts",
"files": [

@@ -33,2 +34,4 @@ "lib",

"dependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"prop-types": "^15.5.10"

@@ -40,3 +43,3 @@ },

},
"gitHead": "101db6e89d7e8a4966dfafba5a782297110f7844"
"gitHead": "8fb99e77e64fa9c319c0addc2a3fbf61e64885cc"
}
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