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

get-scroll-info

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-scroll-info - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

97

build/cjs/src/index.js
"use strict";
var _interopRequireDefault = require("reshow-runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.getScrollNode = exports["default"] = void 0;
exports.getScrollNode = exports["default"] = exports.ScrollInfoType = void 0;
var _createClass2 = _interopRequireDefault(require("reshow-runtime/helpers/createClass"));
var _classCallCheck2 = _interopRequireDefault(require("reshow-runtime/helpers/classCallCheck"));
var _defineProperty2 = _interopRequireDefault(require("reshow-runtime/helpers/defineProperty"));
var _winDoc = require("win-doc");

@@ -52,28 +56,75 @@ var _reshowConstant = require("reshow-constant");

};
exports.getScrollNode = getScrollNode;
var ScrollInfoType = /*#__PURE__*/(0, _createClass2["default"])(function ScrollInfoType() {
(0, _classCallCheck2["default"])(this, ScrollInfoType);
/**
* @type number
*/
(0, _defineProperty2["default"])(this, "top", void 0);
/**
* @type number
*/
(0, _defineProperty2["default"])(this, "right", void 0);
/**
* @type number
*/
(0, _defineProperty2["default"])(this, "bottom", void 0);
/**
* @type number
*/
(0, _defineProperty2["default"])(this, "left", void 0);
/**
* @type number
*/
(0, _defineProperty2["default"])(this, "scrollWidth", void 0);
/**
* @type number
*/
(0, _defineProperty2["default"])(this, "scrollHeight", void 0);
/**
* @type number
*/
(0, _defineProperty2["default"])(this, "scrollNodeWidth", void 0);
/**
* @type number
*/
(0, _defineProperty2["default"])(this, "scrollNodeHeight", void 0);
/**
* @type boolean
*/
(0, _defineProperty2["default"])(this, "atTop", void 0);
/**
* @type boolean
*/
(0, _defineProperty2["default"])(this, "atRight", void 0);
/**
* @type boolean
*/
(0, _defineProperty2["default"])(this, "atBottom", void 0);
/**
* @type boolean
*/
(0, _defineProperty2["default"])(this, "atLeft", void 0);
/**
* @type boolean
*/
(0, _defineProperty2["default"])(this, "isScrollUp", void 0);
/**
* @type boolean
*/
(0, _defineProperty2["default"])(this, "isScrollRight", void 0);
/**
* @type boolean
*/
(0, _defineProperty2["default"])(this, "isScrollDown", void 0);
/**
* @type boolean
*/
(0, _defineProperty2["default"])(this, "isScrollLeft", void 0);
});
/**
* @typedef {object} ScrollInfoType
* @property {number} top
* @property {number} left
* @property {boolean} [atTop]
* @property {boolean} [atRight]
* @property {boolean} [atBottom]
* @property {boolean} [atLeft]
* @property {boolean} [isScrollUp]
* @property {boolean} [isScrollRight]
* @property {boolean} [isScrollDown]
* @property {boolean} [isScrollLeft]
* @property {number} [scrollWidth]
* @property {number} [scrollHeight]
* @property {number} [scrollNodeWidth]
* @property {number} [scrollNodeHeight]
* @property {number} [right]
* @property {number} [bottom]
*/
/**
* @param {HTMLElement} [el]
* @returns {ScrollInfoType}
*/
exports.getScrollNode = getScrollNode;
exports.ScrollInfoType = ScrollInfoType;
var getScrollInfo = function getScrollInfo(el, margin) {

@@ -80,0 +131,0 @@ if (margin === void 0) {

{
"version": "0.4.2",
"version": "0.4.3",
"name": "get-scroll-info",

@@ -4,0 +4,0 @@ "repository": {

@@ -0,41 +1,70 @@

export class ScrollInfoType {
/**
* @type number
*/
top: number;
/**
* @type number
*/
right: number;
/**
* @type number
*/
bottom: number;
/**
* @type number
*/
left: number;
/**
* @type number
*/
scrollWidth: number;
/**
* @type number
*/
scrollHeight: number;
/**
* @type number
*/
scrollNodeWidth: number;
/**
* @type number
*/
scrollNodeHeight: number;
/**
* @type boolean
*/
atTop: boolean;
/**
* @type boolean
*/
atRight: boolean;
/**
* @type boolean
*/
atBottom: boolean;
/**
* @type boolean
*/
atLeft: boolean;
/**
* @type boolean
*/
isScrollUp: boolean;
/**
* @type boolean
*/
isScrollRight: boolean;
/**
* @type boolean
*/
isScrollDown: boolean;
/**
* @type boolean
*/
isScrollLeft: boolean;
}
export default getScrollInfo;
export type ThisDocument = object & Document;
export type ScrollInfoType = {
top: number;
left: number;
atTop?: boolean;
atRight?: boolean;
atBottom?: boolean;
atLeft?: boolean;
isScrollUp?: boolean;
isScrollRight?: boolean;
isScrollDown?: boolean;
isScrollLeft?: boolean;
scrollWidth?: number;
scrollHeight?: number;
scrollNodeWidth?: number;
scrollNodeHeight?: number;
right?: number;
bottom?: number;
};
/**
* @typedef {object} ScrollInfoType
* @property {number} top
* @property {number} left
* @property {boolean} [atTop]
* @property {boolean} [atRight]
* @property {boolean} [atBottom]
* @property {boolean} [atLeft]
* @property {boolean} [isScrollUp]
* @property {boolean} [isScrollRight]
* @property {boolean} [isScrollDown]
* @property {boolean} [isScrollLeft]
* @property {number} [scrollWidth]
* @property {number} [scrollHeight]
* @property {number} [scrollNodeWidth]
* @property {number} [scrollNodeHeight]
* @property {number} [right]
* @property {number} [bottom]
*/
/**
* @param {HTMLElement} [el]

@@ -42,0 +71,0 @@ * @returns {ScrollInfoType}

Sorry, the diff of this file is not supported yet

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