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

vue3-smooth-scroll

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-smooth-scroll - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

2

dist/vue-smooth-scroll.min.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueSmoothScroll=t():e.VueSmoothScroll=t()}(this,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.r(t);var i=window.requestAnimationFrame||function(e){return window.setTimeout(e,16)},u=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},c=function(){return{duration:500,offset:0,container:window,updateHistory:!0,easingFunction:null}},l=Symbol("smoothScrollCtx"),f=function(e){var t=e.scrollTo,n=e.offset,o=e.duration,r=e.container,c=e.updateHistory,l=e.hash,f=e.easingFunction;c&&window.history.pushState&&location.hash!==l&&window.history.pushState("","",l);var a,s,d="number"==typeof t,p=r.scrollTop||window.pageYOffset,y=(d?t:(s=p,"HTML"===(a=t).nodeName?-s:a.getBoundingClientRect().top+s))+n,b="function"==typeof f?f:u,m=Date.now();!function e(){var n=Date.now()-m,u=n<o,l=u?p+(y-p)*b(n/o):y;u?i(e):c&&!d&&location.replace("#"+t.id),r===window?r.scrollTo(0,l):r.scrollTop=l}()},a={install:function(e,t){var n,i=!e.version.startsWith("3"),u=t?Object.assign(c(),t):c();e.directive("smooth-scroll",(o(n={},i?"inserted":"mounted",(function(e,t,n){if("object"===("undefined"==typeof window?"undefined":r(window))&&void 0!==window.pageYOffset){var o=Object.assign({},u,t.value);"string"==typeof o.container&&(o.container=document.querySelector(o.container));var c=function(e){e.preventDefault();var t=i?n.data.attrs.href:n.props.href,r=document.getElementById(t.substring(1));r&&f(Object.assign(o,{scrollTo:r,hash:t}))};e.addEventListener("click",c),e[l]={clickHandler:c}}})),o(n,i?"unbind":"unmounted",(function(e){e.removeEventListener("click",e[l].clickHandler),e[l]=null})),n)),(i?e.prototype:e.config.globalProperties).$smoothScroll=function(e){var t=Object.assign({},u,e);return f(t)}}};t.default=a}])}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueSmoothScroll=t():e.VueSmoothScroll=t()}(this,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.r(t);var i=window.requestAnimationFrame||function(e){return window.setTimeout(e,16)},u=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},c=function(){return{duration:500,offset:0,container:window,updateHistory:!0,easingFunction:null}},l=Symbol("smoothScrollCtx"),f=function(e){var t=e.scrollTo,n=e.offset,o=e.duration,r=e.container,c=e.updateHistory,l=e.hash,f=e.easingFunction;c&&window.history.pushState&&location.hash!==l&&window.history.pushState("","",l);var a,s,d="number"==typeof t,p=r.scrollTop||window.pageYOffset,y=(d?t:(s=p,"HTML"===(a=t).nodeName?-s:a.getBoundingClientRect().top+s))+n,b="function"==typeof f?f:u,m=Date.now();!function e(){var n=Date.now()-m,u=n<o,l=u?p+(y-p)*b(n/o):y;u?i(e):c&&!d&&location.replace("#"+t.id),r===window?r.scrollTo(0,l):r.scrollTop=l}()},a={install:function(e,t){var n,i=!e.version.startsWith("3"),u=t?Object.assign(c(),t):c();e.directive("smooth-scroll",(o(n={},i?"inserted":"mounted",(function(e,t,n){if("object"===("undefined"==typeof window?"undefined":r(window))&&void 0!==window.pageYOffset){var o=Object.assign({},u,t.value);"string"==typeof o.container&&(o.container=document.querySelector(o.container));var c=function(e){e.preventDefault();var t=i?n.data.attrs.href:n.props.href,r=document.getElementById(t.substring(1));r&&f(Object.assign(o,{scrollTo:r,hash:t}))};e.addEventListener("click",c),e[l]={clickHandler:c}}})),o(n,i?"unbind":"unmounted",(function(e){e.removeEventListener("click",e[l].clickHandler),e[l]=null})),n)),(i?e.prototype:e.config.globalProperties).$smoothScroll=function(e){var t=Object.assign({},u,e);return f(t)}}};t.default=a}]).default}));
{
"name": "vue3-smooth-scroll",
"version": "0.7.0",
"version": "0.7.1",
"description": "Simple vue smooth scroll",

@@ -5,0 +5,0 @@ "main": "dist/vue-smooth-scroll.min.js",

@@ -45,3 +45,3 @@ # Vue3 Smooth Scroll

const app = Vue.createApp(...)
app.use(VueSmoothScroll.default)
app.use(VueSmoothScroll)
</script>

@@ -48,0 +48,0 @@ </body>

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