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

@any-scroll/bar

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@any-scroll/bar - npm Package Compare versions

Comparing version 0.1.3-alpha.0 to 0.1.4-alpha.0

dist/index.es.js.map

1

dist/index.es.js

@@ -67,1 +67,2 @@ import { __read } from 'tslib';

export default index;
//# sourceMappingURL=index.es.js.map
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),n=require("@any-scroll/shared"),a=require("insert-css");function t(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var e,l=t(require("lodash/clamp"));!function(r){r.X="x",r.Y="y"}(e||(e={}));var o=["width","height"];exports.default=function(t){a.insertCss("\n.any-scroll {\n display: block;\n position: relative;\n}\n\n.any-scroll > .scroll-bar-track{\n position:absolute;\n right:0;\n bottom:0;\n background: rgba(177,177,177,0.6);\n}\n\n.any-scroll >.scroll-bar-track > .scroll-bar-thumb{\n width: 8px;\n height: 8px;\n background: rgba(55,55,55,0.6);\n border-radius:4px;\n}\n\n.any-scroll > .scroll-bar-track-x{\n left:0;\n height:8px;\n}\n\n.any-scroll > .scroll-bar-track-y{\n top:0;\n width:8px;\n}\n");var s=[e.X,e.Y].map((function(r){return function(r,a){void 0===a&&(a=e.X);var t=n.createDOMDiv(),l=n.createDOMDiv();return t.className="scroll-bar-track scroll-bar-track-"+a,l.className="scroll-bar-thumb scroll-bar-thumb-"+a,t.appendChild(l),r.appendChild(t),[t,l]}(t,r)}));function c(r,n,a){var t=1,e=Math.abs(n/(a-n)*n);return 0<r?t=1-r/n:a>r&&(t=1-(a-r)/n),[e*=t,l.default(r/a*(n-e),0,n-e)]}return function(a,t,e,l){for(var i,u=0;u<2;u++)if(l[u]>t[u]){var b=r.__read(c(a[u],t[u],e[u]),2),d=b[0],p=b[1],h=s[u][1],f=[p,0];n.setStyle(h,((i={})[o[u]]=d+"px",i)),n.setTranslate(h,f[u],f[1^u])}else n.hideDOM(s[u][0])}};
//# sourceMappingURL=index.js.map

7

package.json
{
"name": "@any-scroll/bar",
"version": "0.1.3-alpha.0",
"version": "0.1.4-alpha.0",
"description": "虚拟滚动",

@@ -25,3 +25,4 @@ "unpkg": "dist/any-scroll.js",

"insert-css": "^2.0.0",
"lodash": "^4.17.15"
"lodash": "^4.17.15",
"tslib": "^2.3.0"
},

@@ -39,3 +40,3 @@ "devDependencies": {

"sideEffects": false,
"gitHead": "34115ccdb1af2db11eadf14b29e640e50ac7e46a"
"gitHead": "305c39d659fe98a7624aa5fcc86c894a34bfa868"
}
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