react-scrollbar-size
Advanced tools
Comparing version 3.0.0-rc.0 to 3.0.0
## HEAD | ||
## 3.0.0-rc | ||
## 3.0.0 | ||
###### _2020-07-18_ | ||
@@ -9,2 +9,8 @@ **BREAKING CHANGE** | ||
## 3.0.0-rc.0 | ||
###### _2020-07-18_ | ||
**BREAKING CHANGE** | ||
- Library has been completely rewritten in TypeScript, complies with React >=16.8, and all tooling has been updated (#11) @shawnmcknight | ||
- The API has been changed significantly; there are no longer separate `onLoad` and `onChange` props in favor of a single `onChange` prop. The callback for `onChange` returns `height` and `width` instead of `scrollbarHeight` and `scrollbarWidth`. | ||
## 2.1.0 | ||
@@ -11,0 +17,0 @@ ###### _2020-01-31_ |
import ScrollbarSize from './ScrollbarSize'; | ||
export { ScrollbarSizeChangeHandlerParams, ScrollbarSizeProps } from './ScrollbarSize'; | ||
export type { ScrollbarSizeChangeHandlerParams, ScrollbarSizeProps } from './ScrollbarSize'; | ||
export default ScrollbarSize; |
20
index.js
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, "ScrollbarSizeChangeHandlerParams", { | ||
enumerable: true, | ||
get: function get() { | ||
return _ScrollbarSize.ScrollbarSizeChangeHandlerParams; | ||
} | ||
}); | ||
Object.defineProperty(exports, "ScrollbarSizeProps", { | ||
enumerable: true, | ||
get: function get() { | ||
return _ScrollbarSize.ScrollbarSizeProps; | ||
} | ||
}); | ||
exports.default = void 0; | ||
var _ScrollbarSize = _interopRequireWildcard(require("./ScrollbarSize")); | ||
var _ScrollbarSize = _interopRequireDefault(require("./ScrollbarSize")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
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; } | ||
var _default = _ScrollbarSize.default; | ||
exports.default = _default; |
{ | ||
"name": "react-scrollbar-size", | ||
"version": "3.0.0-rc.0", | ||
"version": "3.0.0", | ||
"description": "React component to calculate the size of browser scrollbars", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# React-Scrollbar-Size | ||
[![STORIS](https://circleci.com/gh/STORIS/react-scrollbar-size.svg?style=svg)](https://app.circleci.com/pipelines/github/STORIS/react-scrollbar-size?branch=master) | ||
[![Downloads](https://img.shields.io/npm/dm/react-scrollbar-size)](https://www.npmjs.com/package/react-scrollbar-size) | ||
<div align="center"> | ||
React-Scrollbar-Size is a React component designed to calculate the size of the user agent's horizontal and vertical scrollbars. | ||
It will also detect when the size of the scrollbars changes, such as when the user agent's zoom factor changes. | ||
React-Scrollbar-Size is a [React](https://reactjs.org/) component designed to calculate the size of the user agent's horizontal and vertical scrollbars. | ||
It will also detect when the size of the scrollbars change, such as when the user agent's zoom factor changes. | ||
[![npm package](https://img.shields.io/npm/v/react-scrollbar-size/latest.svg)](https://www.npmjs.com/package/react-scrollbar-size) | ||
[![npm downloads](https://img.shields.io/npm/dm/react-scrollbar-size)](https://www.npmjs.com/package/react-scrollbar-size) | ||
[![CircleCI](https://circleci.com/gh/STORIS/react-scrollbar-size.svg?style=shield)](https://circleci.com/gh/STORIS/react-scrollbar-size/tree/master) | ||
[![Code Climate](https://img.shields.io/codeclimate/maintainability/STORIS/react-scrollbar-size)](https://codeclimate.com/github/STORIS/react-scrollbar-size) | ||
[![Code Style](https://badgen.net/badge/eslint/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript) | ||
[![Code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io/) | ||
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=storis/react-scrollbar-size)](https://dependabot.com) | ||
[![Dependencies](https://david-dm.org/STORIS/react-scrollbar-size/master/status.svg)](https://david-dm.org/STORIS/react-scrollbar-size/master) | ||
[![PeerDependencies](https://david-dm.org/STORIS/react-scrollbar-size/master/peer-status.svg)](https://david-dm.org/STORIS/react-scrollbar-size/master?type=peer) | ||
[![DevDependencies](https://david-dm.org/STORIS/react-scrollbar-size/dev-status.svg)](https://david-dm.org/STORIS/react-scrollbar-size/master?type=dev) | ||
[![Percentage of issues still open](https://isitmaintained.com/badge/open/storis/react-scrollbar-size.svg)](https://isitmaintained.com/project/storis/react-scrollbar-size) | ||
![License](https://img.shields.io/npm/l/react-scrollbar-size) | ||
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md) | ||
[![Star on Github](https://img.shields.io/github/stars/storis/react-scrollbar-size?style=social)](https://github.com/STORIS/react-scrollbar-size) | ||
</div> | ||
## Installation | ||
@@ -12,3 +28,3 @@ React-Scrollbar-Size is available as an [npm package](https://www.npmjs.com/package/react-scrollbar-size): | ||
```sh | ||
$ npm install --save react-scrollbar-size | ||
$ npm install react-scrollbar-size | ||
``` | ||
@@ -31,3 +47,3 @@ | ||
## Examples | ||
To see a live example, follow these [instructions](https://github.com/STORIS/react-scrollbar-size/blob/master/example/README.md). | ||
To see a live example, follow these [instructions](/example/README.md). | ||
@@ -114,2 +130,2 @@ ### TypeScript | ||
This project is licensed under the terms of the | ||
[MIT license](https://github.com/STORIS/react-scrollbar-size/blob/master/LICENSE). | ||
[MIT license](/LICENSE). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
14410
0
129
0
104