vue2-smooth-scroll
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueSmoothScroll=e():t.VueSmoothScroll=e()}(this,(function(){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r;o.r(e);var i=function(t,e){return"HTML"===t.nodeName?-e:t.getBoundingClientRect().top+e},u=Symbol("smoothScrollCtx");function c(t){var e=t.scrollTo,o=t.offset,n=t.duration,u=t.container,c=t.updateHistory,f=t.hash;r||(r=window.requestAnimationFrame||function(t){window.setTimeout(t,16)}),c&&window.history.pushState&&location.hash!==f&&window.history.pushState("","",f);var a=u.scrollTop||window.pageYOffset,l=i(e,a);l+=o;var d=Date.now();!function t(){var o,i=Date.now()-d,f=l;i<n?(f=a+(l-a)*((o=i/n)<.5?4*o*o*o:(o-1)*(2*o-2)*(2*o-2)+1),r(t)):c&&location.replace("#"+e.id),u===window?u.scrollTo(0,f):u.scrollTop=f}()}var f={install:function(t,e){var o={duration:500,offset:0,container:window,updateHistory:!0};t.directive("smooth-scroll",{inserted:function(t,r,i){if("object"===("undefined"==typeof window?"undefined":n(window))&&void 0!==window.pageYOffset){var f=Object.assign({},o);e&&Object.assign(f,e);var a=r.value||{},l=a.duration,d=a.offset,s=a.container,p=a.updateHistory;l=l||f.duration,d=d||f.offset,s=s||f.container,p=void 0!==p?p:f.updateHistory,"string"==typeof s&&(s=document.querySelector(s));var y=function(t){t.preventDefault();var e=i.data.attrs.href,o=document.getElementById(e.substring(1));o&&c({scrollTo:o,offset:d,duration:l,container:s,updateHistory:p,hash:e})};t.addEventListener("click",y),t[u]={clickHandler:y}}},unbind:function(t){t.removeEventListener("click",t[u].clickHandler),t[u]=null}}),t.prototype.$smoothScroll=function(t){return c(Object.assign({},o,e,t))}}};e.default=f,"undefined"!=typeof window&&window.Vue&&window.Vue.use(f)}])})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueSmoothScroll=e():t.VueSmoothScroll=e()}(this,(function(){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r;o.r(e);var i=function(t,e){return"HTML"===t.nodeName?-e:t.getBoundingClientRect().top+e};function u(){return{duration:500,offset:0,container:window,updateHistory:!0}}var c=Symbol("smoothScrollCtx");function f(t){var e=t.scrollTo,o=t.offset,n=t.duration,u=t.container,c=t.updateHistory,f=t.hash;r||(r=window.requestAnimationFrame||function(t){window.setTimeout(t,16)}),c&&window.history.pushState&&location.hash!==f&&window.history.pushState("","",f);var a=u.scrollTop||window.pageYOffset,l=i(e,a);l+=o;var d=Date.now();!function t(){var o,i=Date.now()-d,f=l;i<n?(f=a+(l-a)*((o=i/n)<.5?4*o*o*o:(o-1)*(2*o-2)*(2*o-2)+1),r(t)):c&&location.replace("#"+e.id),u===window?u.scrollTo(0,f):u.scrollTop=f}()}var a={install:function(t,e){t.directive("smooth-scroll",{inserted:function(t,o,r){if("object"===("undefined"==typeof window?"undefined":n(window))&&void 0!==window.pageYOffset){var i=Object.assign({},u());e&&Object.assign(i,e);var a=o.value||{},l=a.duration,d=a.offset,s=a.container,p=a.updateHistory;l=l||i.duration,d=d||i.offset,s=s||i.container,p=void 0!==p?p:i.updateHistory,"string"==typeof s&&(s=document.querySelector(s));var y=function(t){t.preventDefault();var e=r.data.attrs.href,o=document.getElementById(e.substring(1));o&&f({scrollTo:o,offset:d,duration:l,container:s,updateHistory:p,hash:e})};t.addEventListener("click",y),t[c]={clickHandler:y}}},unbind:function(t){t.removeEventListener("click",t[c].clickHandler),t[c]=null}}),t.prototype.$smoothScroll=function(t){return f(Object.assign({},u(),e,t))}}};e.default=a,"undefined"!=typeof window&&window.Vue&&window.Vue.use(a)}])})); |
v1.4.2 / 2020-06-18 | ||
================== | ||
* fix(index): first cut at fixing #26 | ||
v1.4.0 / 2020-06-16 | ||
@@ -3,0 +8,0 @@ ================== |
{ | ||
"name": "vue2-smooth-scroll", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Simple vue smooth scroll", | ||
@@ -5,0 +5,0 @@ "main": "dist/vue-smooth-scroll.min.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10752