Socket
Socket
Sign inDemoInstall

@zag-js/remove-scroll

Package Overview
Dependencies
Maintainers
1
Versions
717
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/remove-scroll - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

19

dist/index.js

@@ -26,17 +26,4 @@ "use strict";

module.exports = __toCommonJS(src_exports);
// ../dom/src/platform.ts
var isDom = () => typeof window !== "undefined";
function getPlatform() {
const agent = navigator.userAgentData;
return agent?.platform ?? navigator.platform;
}
var pt = (v) => isDom() && v.test(getPlatform());
var isTouchDevice = () => isDom() && !!navigator.maxTouchPoints;
var isMac = () => pt(/^Mac/) && !isTouchDevice;
var isApple = () => pt(/mac|iphone|ipad|ipod/i);
var isIos = () => isApple() && !isMac();
// src/index.ts
var LOCK_CLASSNAME = "data-scroll-lock";
var import_dom_query = require("@zag-js/dom-query");
var LOCK_CLASSNAME = "data-zag-scroll-lock";
function assignStyle(el, style) {

@@ -103,3 +90,3 @@ if (!el)

};
const cleanups = [setScrollbarWidthProperty(), isIos() ? setIOSStyle() : setStyle()];
const cleanups = [setScrollbarWidthProperty(), (0, import_dom_query.isIos)() ? setIOSStyle() : setStyle()];
return () => {

@@ -106,0 +93,0 @@ cleanups.forEach((cleanup) => cleanup());

8

package.json
{
"name": "@zag-js/remove-scroll",
"version": "0.2.2",
"version": "0.2.3",
"description": "JavaScript utility to remove scroll on body",

@@ -21,5 +21,7 @@ "keywords": [

},
"dependencies": {
"@zag-js/dom-query": "0.1.3"
},
"devDependencies": {
"clean-package": "2.2.0",
"@zag-js/dom-utils": "0.2.4"
"clean-package": "2.2.0"
},

@@ -26,0 +28,0 @@ "bugs": {

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