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

react-fit

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-fit - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

14

dist/esm/Fit.js

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

var _excluded = ["invertAxis", "invertSecondaryAxis"];
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -13,7 +15,7 @@

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

@@ -26,3 +28,3 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

@@ -108,3 +110,3 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function displayStart() {
element.style[startProperty] = 'unset';
element.style[startProperty] = 'auto';
element.style[endProperty] = secondary ? '0' : '100%';

@@ -115,3 +117,3 @@ }

element.style[startProperty] = secondary ? '0' : '100%';
element.style[endProperty] = 'unset';
element.style[endProperty] = 'auto';
}

@@ -187,3 +189,3 @@

invertSecondaryAxis = args.invertSecondaryAxis,
commonArgs = _objectWithoutProperties(args, ["invertAxis", "invertSecondaryAxis"]);
commonArgs = _objectWithoutProperties(args, _excluded);

@@ -190,0 +192,0 @@ alignMainAxis(_objectSpread(_objectSpread({}, commonArgs), {}, {

@@ -18,7 +18,9 @@ "use strict";

var _excluded = ["invertAxis", "invertSecondaryAxis"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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; }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }

@@ -37,7 +39,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

@@ -50,3 +52,3 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

@@ -127,3 +129,3 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function displayStart() {
element.style[startProperty] = 'unset';
element.style[startProperty] = 'auto';
element.style[endProperty] = secondary ? '0' : '100%';

@@ -134,3 +136,3 @@ }

element.style[startProperty] = secondary ? '0' : '100%';
element.style[endProperty] = 'unset';
element.style[endProperty] = 'auto';
}

@@ -206,3 +208,3 @@

invertSecondaryAxis = args.invertSecondaryAxis,
commonArgs = _objectWithoutProperties(args, ["invertAxis", "invertSecondaryAxis"]);
commonArgs = _objectWithoutProperties(args, _excluded);

@@ -209,0 +211,0 @@ alignMainAxis(_objectSpread(_objectSpread({}, commonArgs), {}, {

{
"name": "react-fit",
"version": "1.3.1",
"version": "1.3.2",
"description": "Fit a popover element on the screen.",

@@ -11,7 +11,7 @@ "main": "dist/umd/Fit.js",

"build-js-all": "yarn build-js-esm && yarn build-js-umd",
"build-js-esm": "cross-env BABEL_ENV=production-esm babel src -d dist/esm --ignore \"**/*.spec.js,**/*.spec.jsx\"",
"build-js-umd": "cross-env BABEL_ENV=production-umd babel src -d dist/umd --ignore \"**/*.spec.js,**/*.spec.jsx\"",
"build-js-esm": "BABEL_ENV=production-esm babel src -d dist/esm --ignore \"**/*.spec.js,**/*.spec.jsx\"",
"build-js-umd": "BABEL_ENV=production-umd babel src -d dist/umd --ignore \"**/*.spec.js,**/*.spec.jsx\"",
"clean": "rimraf dist",
"lint": "eslint src/ test/ --ext .jsx,.js",
"prepublishOnly": "yarn clean && yarn build",
"prepack": "yarn clean && yarn build",
"test": "yarn lint"

@@ -35,25 +35,21 @@ },

"devDependencies": {
"@babel/cli": "^7.8.0",
"@babel/core": "^7.9.0",
"@babel/plugin-proposal-class-properties": "^7.8.0",
"@babel/preset-env": "^7.9.0",
"@babel/preset-react": "^7.9.0",
"@babel/cli": "^7.15.0",
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@babel/preset-react": "^7.14.0",
"babel-eslint": "^10.0.0",
"cross-env": "^7.0.0",
"eslint": "~7.2.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-jsx-a11y": "^6.3.0",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.0.0",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"eslint": "~7.19.0",
"eslint-config-wojtekmaj": "^0.5.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"rimraf": "^3.0.0"
},
"peerDependencies": {
"react": ">=15.5",
"react-dom": ">=15.5"
"react": "^15.5.0 || ^16.0.0 || ^17.0.0-0",
"react-dom": "^15.5.0 || ^16.0.0 || ^17.0.0-0"
},
"resolutions": {
"semver@7.0.0": "^7.0.0"
},
"files": [
".babelrc",
"LICENSE",

@@ -69,2 +65,2 @@ "README.md",

"funding": "https://github.com/wojtekmaj/react-fit?sponsor=1"
}
}

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

[![npm](https://img.shields.io/npm/v/react-fit.svg)](https://www.npmjs.com/package/react-fit) ![downloads](https://img.shields.io/npm/dt/react-fit.svg) [![build](https://travis-ci.com/wojtekmaj/react-fit.svg?branch=master)](https://travis-ci.com/wojtekmaj/react-fit) ![dependencies](https://img.shields.io/david/wojtekmaj/react-fit.svg
[![npm](https://img.shields.io/npm/v/react-fit.svg)](https://www.npmjs.com/package/react-fit) ![downloads](https://img.shields.io/npm/dt/react-fit.svg) [![CI](https://github.com/wojtekmaj/react-fit/workflows/CI/badge.svg)](https://github.com/wojtekmaj/react-fit/actions) ![dependencies](https://img.shields.io/david/wojtekmaj/react-fit.svg
) ![dev dependencies](https://img.shields.io/david/dev/wojtekmaj/react-fit.svg

@@ -116,5 +116,5 @@ )

<a href="mailto:kontakt@wojtekmaj.pl">kontakt@wojtekmaj.pl</a><br />
<a href="http://wojtekmaj.pl">http://wojtekmaj.pl</a>
<a href="https://wojtekmaj.pl">https://wojtekmaj.pl</a>
</td>
</tr>
</table>

@@ -34,3 +34,3 @@ import React, { Component } from 'react';

const { overflow } = window.getComputedStyle(parent);
if (overflow.split(' ').every(o => o === 'auto' || o === 'scroll')) {
if (overflow.split(' ').every((o) => o === 'auto' || o === 'scroll')) {
return parent;

@@ -100,3 +100,3 @@ }

function displayStart() {
element.style[startProperty] = 'unset';
element.style[startProperty] = 'auto';
element.style[endProperty] = secondary ? '0' : '100%';

@@ -107,3 +107,3 @@ }

element.style[startProperty] = secondary ? '0' : '100%';
element.style[endProperty] = 'unset';
element.style[endProperty] = 'auto';
}

@@ -110,0 +110,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