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

@reach/rect

Package Overview
Dependencies
Maintainers
3
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/rect - npm Package Compare versions

Comparing version 0.5.0 to 0.6.1

8

es/index.js
import React, { useRef, useState, useLayoutEffect } from "react";
import observeRect from "@reach/observe-rect";
import { func, bool } from "prop-types";
import PropTypes from "prop-types";

@@ -23,5 +23,5 @@ var Rect = function Rect(_ref) {

Rect.propTypes = {
children: func,
observe: bool,
onChange: func
children: PropTypes.func,
observe: PropTypes.bool,
onChange: PropTypes.func
};

@@ -28,0 +28,0 @@ }

@@ -11,3 +11,3 @@ "use strict";

var _propTypes = require("prop-types");
var _propTypes = _interopRequireDefault(require("prop-types"));

@@ -18,3 +18,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

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 _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; 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; }

@@ -41,5 +41,5 @@ var Rect = function Rect(_ref) {

Rect.propTypes = {
children: _propTypes.func,
observe: _propTypes.bool,
onChange: _propTypes.func
children: _propTypes["default"].func,
observe: _propTypes["default"].bool,
onChange: _propTypes["default"].func
};

@@ -46,0 +46,0 @@ }

{
"name": "@reach/rect",
"version": "0.5.0",
"version": "0.6.1",
"description": "Measure React elements position in the DOM",

@@ -28,3 +28,3 @@ "main": "index.js",

],
"gitHead": "7e33672d882cd6df77ac8cdb76b6b4a21dbf28c2"
"gitHead": "c1e249448a3672ccc65698218f0f38ef9814ab90"
}
import React, { useRef, useState, useLayoutEffect } from "react";
import observeRect from "@reach/observe-rect";
import { func, bool } from "prop-types";
import PropTypes from "prop-types";

@@ -17,5 +17,5 @@ let Rect = ({ onChange, observe, children }) => {

Rect.propTypes = {
children: func,
observe: bool,
onChange: func
children: PropTypes.func,
observe: PropTypes.bool,
onChange: PropTypes.func
};

@@ -22,0 +22,0 @@ }

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