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

scroll-into-view-if-needed

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scroll-into-view-if-needed - npm Package Compare versions

Comparing version 3.0.7 to 3.0.8

dist/index.mjs

2

dist/index.js

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

import{compute as e}from"compute-scroll-into-view";let o=e=>"object"==typeof e&&"function"==typeof e.behavior,t=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};const n=e=>{for(var o=e;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1};function r(r,i){if(!r.isConnected||!n(r))return;if(o(i))return i.behavior(e(r,i));let l="boolean"==typeof i||null==i?void 0:i.behavior;for(let{el:o,top:n,left:a}of e(r,t(i)))o.scroll({top:n,left:a,behavior:l})}export{r as default};//# sourceMappingURL=index.js.map
"use strict";var e=require("compute-scroll-into-view");let t=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};module.exports=function(o,r){if(!o.isConnected||!(e=>{for(var t=e;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(o))return;if((e=>"object"==typeof e&&"function"==typeof e.behavior)(r))return r.behavior(e.compute(o,r));let n="boolean"==typeof r||null==r?void 0:r.behavior;for(let{el:i,top:l,left:a}of e.compute(o,t(r)))i.scroll({top:l,left:a,behavior:n})};//# sourceMappingURL=index.js.map
{
"name": "scroll-into-view-if-needed",
"version": "3.0.7",
"version": "3.0.8",
"description": "Ponyfill for upcoming Element.scrollIntoView() APIs like scrollMode: if-needed, behavior: smooth and block: center",

@@ -27,3 +27,3 @@ "keywords": [

"sideEffects": false,
"type": "module",
"type": "commonjs",
"exports": {

@@ -33,4 +33,4 @@ ".": {

"source": "./src/index.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"default": "./dist/index.js"

@@ -40,4 +40,5 @@ },

},
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"source": "./src/index.ts",
"typings": "./dist/index.d.ts",

@@ -64,3 +65,3 @@ "files": [

"dependencies": {
"compute-scroll-into-view": "^3.0.0"
"compute-scroll-into-view": "^3.0.1"
},

@@ -74,3 +75,3 @@ "devDependencies": {

"rimraf": "^4.1.2",
"typescript": "^4.9.5"
"typescript": "^5.0.0"
},

@@ -77,0 +78,0 @@ "bundlesize": [

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