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

@nrk/core-scroll

Package Overview
Dependencies
Maintainers
92
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nrk/core-scroll - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

12

core-scroll.cjs.js
'use strict';
var name = "@nrk/core-scroll";
var version = "1.2.0";
var version = "1.2.1";

@@ -116,2 +116,3 @@ var IS_BROWSER = typeof window !== 'undefined';

var SIGNIFICANT_DRAG_THRESHOLD = 10;
var FALLBACK_SCROLLBAR_SIZE = 18;
var FRICTION = 0.8;

@@ -136,5 +137,8 @@ var VELOCITY = 20;

// Must be after setting overflow scroll
var scrollbarWidth = target.offsetWidth - target.clientWidth + 1; // Plus one fixes safari pixelbug
var scrollbarHeight = target.offsetHeight - target.clientHeight + 1; // Plus one fixes safari pixelbug
// Calculate scrollBareSizes for hiding
// Must be after setting overflow:scroll
// Default to 18px (max reports scrollbar size 0 when "auto hiding")
// Plus one fixes safari pixelbug
var scrollbarWidth = (target.offsetWidth - target.clientWidth || FALLBACK_SCROLLBAR_SIZE) + 1;
var scrollbarHeight = (target.offsetHeight - target.clientHeight || FALLBACK_SCROLLBAR_SIZE) + 1;

@@ -141,0 +145,0 @@ target.style.maxHeight = "calc(100% + " + scrollbarHeight + "px)"; // Consistent height

@@ -9,2 +9,3 @@ import {name, version} from './package.json'

const SIGNIFICANT_DRAG_THRESHOLD = 10
const FALLBACK_SCROLLBAR_SIZE = 18
const FRICTION = 0.8

@@ -27,5 +28,8 @@ const VELOCITY = 20

// Must be after setting overflow scroll
const scrollbarWidth = target.offsetWidth - target.clientWidth + 1 // Plus one fixes safari pixelbug
const scrollbarHeight = target.offsetHeight - target.clientHeight + 1 // Plus one fixes safari pixelbug
// Calculate scrollBareSizes for hiding
// Must be after setting overflow:scroll
// Default to 18px (max reports scrollbar size 0 when "auto hiding")
// Plus one fixes safari pixelbug
const scrollbarWidth = (target.offsetWidth - target.clientWidth || FALLBACK_SCROLLBAR_SIZE) + 1
const scrollbarHeight = (target.offsetHeight - target.clientHeight || FALLBACK_SCROLLBAR_SIZE) + 1

@@ -32,0 +36,0 @@ target.style.maxHeight = `calc(100% + ${scrollbarHeight}px)` // Consistent height

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

/*! @nrk/core-scroll v1.2.0 - Copyright (c) 2017-2018 NRK */
/*! @nrk/core-scroll v1.2.1 - Copyright (c) 2017-2018 NRK */
(function (global, factory) {

@@ -12,3 +12,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('prop-types')) :

var name = "@nrk/core-scroll";
var version = "1.2.0";
var version = "1.2.1";

@@ -140,2 +140,3 @@ var IS_BROWSER = typeof window !== 'undefined';

var SIGNIFICANT_DRAG_THRESHOLD = 10;
var FALLBACK_SCROLLBAR_SIZE = 18;
var FRICTION = 0.8;

@@ -160,5 +161,8 @@ var VELOCITY = 20;

// Must be after setting overflow scroll
var scrollbarWidth = target.offsetWidth - target.clientWidth + 1; // Plus one fixes safari pixelbug
var scrollbarHeight = target.offsetHeight - target.clientHeight + 1; // Plus one fixes safari pixelbug
// Calculate scrollBareSizes for hiding
// Must be after setting overflow:scroll
// Default to 18px (max reports scrollbar size 0 when "auto hiding")
// Plus one fixes safari pixelbug
var scrollbarWidth = (target.offsetWidth - target.clientWidth || FALLBACK_SCROLLBAR_SIZE) + 1;
var scrollbarHeight = (target.offsetHeight - target.clientHeight || FALLBACK_SCROLLBAR_SIZE) + 1;

@@ -165,0 +169,0 @@ target.style.maxHeight = "calc(100% + " + scrollbarHeight + "px)"; // Consistent height

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

/*! @nrk/core-scroll v1.2.0 - Copyright (c) 2017-2018 NRK */
/*! @nrk/core-scroll v1.2.1 - Copyright (c) 2017-2018 NRK */
(function (global, factory) {

@@ -9,3 +9,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :

var name = "@nrk/core-scroll";
var version = "1.2.0";
var version = "1.2.1";

@@ -122,2 +122,3 @@ var IS_BROWSER = typeof window !== 'undefined';

var SIGNIFICANT_DRAG_THRESHOLD = 10;
var FALLBACK_SCROLLBAR_SIZE = 18;
var FRICTION = 0.8;

@@ -142,5 +143,8 @@ var VELOCITY = 20;

// Must be after setting overflow scroll
var scrollbarWidth = target.offsetWidth - target.clientWidth + 1; // Plus one fixes safari pixelbug
var scrollbarHeight = target.offsetHeight - target.clientHeight + 1; // Plus one fixes safari pixelbug
// Calculate scrollBareSizes for hiding
// Must be after setting overflow:scroll
// Default to 18px (max reports scrollbar size 0 when "auto hiding")
// Plus one fixes safari pixelbug
var scrollbarWidth = (target.offsetWidth - target.clientWidth || FALLBACK_SCROLLBAR_SIZE) + 1;
var scrollbarHeight = (target.offsetHeight - target.clientHeight || FALLBACK_SCROLLBAR_SIZE) + 1;

@@ -147,0 +151,0 @@ target.style.maxHeight = "calc(100% + " + scrollbarHeight + "px)"; // Consistent height

@@ -9,3 +9,3 @@ 'use strict';

var name = "@nrk/core-scroll";
var version = "1.2.0";
var version = "1.2.1";

@@ -137,2 +137,3 @@ var IS_BROWSER = typeof window !== 'undefined';

var SIGNIFICANT_DRAG_THRESHOLD = 10;
var FALLBACK_SCROLLBAR_SIZE = 18;
var FRICTION = 0.8;

@@ -157,5 +158,8 @@ var VELOCITY = 20;

// Must be after setting overflow scroll
var scrollbarWidth = target.offsetWidth - target.clientWidth + 1; // Plus one fixes safari pixelbug
var scrollbarHeight = target.offsetHeight - target.clientHeight + 1; // Plus one fixes safari pixelbug
// Calculate scrollBareSizes for hiding
// Must be after setting overflow:scroll
// Default to 18px (max reports scrollbar size 0 when "auto hiding")
// Plus one fixes safari pixelbug
var scrollbarWidth = (target.offsetWidth - target.clientWidth || FALLBACK_SCROLLBAR_SIZE) + 1;
var scrollbarHeight = (target.offsetHeight - target.clientHeight || FALLBACK_SCROLLBAR_SIZE) + 1;

@@ -162,0 +166,0 @@ target.style.maxHeight = "calc(100% + " + scrollbarHeight + "px)"; // Consistent height

@@ -5,3 +5,3 @@ {

"author": "NRK <opensource@nrk.no> (https://www.nrk.no/)",
"version": "1.2.1",
"version": "1.2.2",
"license": "MIT",

@@ -8,0 +8,0 @@ "main": "core-scroll.cjs.js",

Sorry, the diff of this file is not supported yet

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