New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

seamless-scroll-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seamless-scroll-polyfill - npm Package Compare versions

Comparing version 1.0.10 to 1.1.0

1

dist/cjs/common.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.step = exports.now = void 0;
const ease = (k) => {

@@ -4,0 +5,0 @@ return 0.5 * (1 - Math.cos(Math.PI * k));

2

dist/cjs/Element.scroll.d.ts
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const elementScroll: (element: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scroll.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.polyfill = exports.elementScroll = exports.getOriginalFunc = void 0;
const common_js_1 = require("./common.js");

@@ -4,0 +5,0 @@ let $original;

import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const elementScrollBy: (elememt: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const elementScrollBy: (element: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollBy.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.polyfill = exports.elementScrollBy = void 0;
const Element_scroll_js_1 = require("./Element.scroll.js");
exports.elementScrollBy = (elememt, options) => {
const left = (options.left || 0) + elememt.scrollLeft;
const top = (options.top || 0) + elememt.scrollTop;
return Element_scroll_js_1.elementScroll(elememt, Object.assign(Object.assign({}, options), { left, top }));
exports.elementScrollBy = (element, options) => {
const left = (options.left || 0) + element.scrollLeft;
const top = (options.top || 0) + element.scrollTop;
return Element_scroll_js_1.elementScroll(element, Object.assign(Object.assign({}, options), { left, top }));
};

@@ -9,0 +10,0 @@ exports.polyfill = (options) => {

@@ -11,3 +11,3 @@ import { IAnimationOptions, IScrollIntoViewOptions } from "./common.js";

export declare const elementScrollIntoView: (element: Element, options: IScrollIntoViewOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollIntoView.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.polyfill = exports.elementScrollIntoView = void 0;
const Element_scroll_js_1 = require("./Element.scroll.js");

@@ -224,3 +225,3 @@ // tslint:disable-next-line: max-line-length

const writingMode = computedStyle.writingMode ||
computedStyle.webkitWritingMode ||
computedStyle.getPropertyValue("-webkit-writing-mode") ||
computedStyle.getPropertyValue("-ms-writing-mode") ||

@@ -227,0 +228,0 @@ "horizontal-tb";

import { IAnimationOptions } from "./common.js";
export { elementScroll as elementScrollTo } from "./Element.scroll.js";
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollTo.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.polyfill = void 0;
const Element_scroll_js_1 = require("./Element.scroll.js");
var Element_scroll_js_2 = require("./Element.scroll.js");
exports.elementScrollTo = Element_scroll_js_2.elementScroll;
Object.defineProperty(exports, "elementScrollTo", { enumerable: true, get: function () { return Element_scroll_js_2.elementScroll; } });
exports.polyfill = (options) => {

@@ -7,0 +8,0 @@ const originalFunc = Element_scroll_js_1.getOriginalFunc();

import { IAnimationOptions } from "./common.js";
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
export { elementScroll } from "./Element.scroll.js";

@@ -4,0 +4,0 @@ export { elementScrollBy } from "./Element.scrollBy.js";

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.seamless = exports.polyfill = void 0;
const Element_scroll_js_1 = require("./Element.scroll.js");

@@ -24,15 +25,15 @@ const Element_scrollBy_js_1 = require("./Element.scrollBy.js");

var Element_scroll_js_2 = require("./Element.scroll.js");
exports.elementScroll = Element_scroll_js_2.elementScroll;
Object.defineProperty(exports, "elementScroll", { enumerable: true, get: function () { return Element_scroll_js_2.elementScroll; } });
var Element_scrollBy_js_2 = require("./Element.scrollBy.js");
exports.elementScrollBy = Element_scrollBy_js_2.elementScrollBy;
Object.defineProperty(exports, "elementScrollBy", { enumerable: true, get: function () { return Element_scrollBy_js_2.elementScrollBy; } });
var Element_scrollIntoView_js_2 = require("./Element.scrollIntoView.js");
exports.elementScrollIntoView = Element_scrollIntoView_js_2.elementScrollIntoView;
Object.defineProperty(exports, "elementScrollIntoView", { enumerable: true, get: function () { return Element_scrollIntoView_js_2.elementScrollIntoView; } });
var Element_scrollTo_js_2 = require("./Element.scrollTo.js");
exports.elementScrollTo = Element_scrollTo_js_2.elementScrollTo;
Object.defineProperty(exports, "elementScrollTo", { enumerable: true, get: function () { return Element_scrollTo_js_2.elementScrollTo; } });
var Window_scroll_js_2 = require("./Window.scroll.js");
exports.windowScroll = Window_scroll_js_2.windowScroll;
Object.defineProperty(exports, "windowScroll", { enumerable: true, get: function () { return Window_scroll_js_2.windowScroll; } });
var Window_scrollBy_js_2 = require("./Window.scrollBy.js");
exports.windowScrollBy = Window_scrollBy_js_2.windowScrollBy;
Object.defineProperty(exports, "windowScrollBy", { enumerable: true, get: function () { return Window_scrollBy_js_2.windowScrollBy; } });
var Window_scrollTo_js_2 = require("./Window.scrollTo.js");
exports.windowScrollTo = Window_scrollTo_js_2.windowScrollTo;
Object.defineProperty(exports, "windowScrollTo", { enumerable: true, get: function () { return Window_scrollTo_js_2.windowScrollTo; } });
//# sourceMappingURL=index.js.map
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const windowScroll: (options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scroll.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.polyfill = exports.windowScroll = exports.getOriginalFunc = void 0;
const common_js_1 = require("./common.js");

@@ -4,0 +5,0 @@ let $original;

import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const windowScrollBy: (options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scrollBy.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.polyfill = exports.windowScrollBy = void 0;
const Window_scroll_js_1 = require("./Window.scroll.js");

@@ -4,0 +5,0 @@ exports.windowScrollBy = (options) => {

import { IAnimationOptions } from "./common.js";
export { windowScroll as windowScrollTo } from "./Window.scroll.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scrollTo.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.polyfill = exports.getOriginalFunc = void 0;
const Window_scroll_js_1 = require("./Window.scroll.js");
var Window_scroll_js_2 = require("./Window.scroll.js");
exports.windowScrollTo = Window_scroll_js_2.windowScroll;
Object.defineProperty(exports, "windowScrollTo", { enumerable: true, get: function () { return Window_scroll_js_2.windowScroll; } });
let $original;

@@ -7,0 +8,0 @@ exports.getOriginalFunc = () => {

import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const elementScroll: (element: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scroll.d.ts.map
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const elementScrollBy: (elememt: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const elementScrollBy: (element: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollBy.d.ts.map

@@ -11,3 +11,3 @@ import { IAnimationOptions, IScrollIntoViewOptions } from "./common.js";

export declare const elementScrollIntoView: (element: Element, options: IScrollIntoViewOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollIntoView.d.ts.map
import { IAnimationOptions } from "./common.js";
export { elementScroll as elementScrollTo } from "./Element.scroll.js";
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollTo.d.ts.map
import { IAnimationOptions } from "./common.js";
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
export { elementScroll } from "./Element.scroll.js";

@@ -4,0 +4,0 @@ export { elementScrollBy } from "./Element.scrollBy.js";

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

(function(a){"function"==typeof define&&define.amd?define(a):a()})(function(){'use strict';function a(a){var b="function"==typeof Symbol&&Symbol.iterator,c=b&&a[b],d=0;if(c)return c.call(a);if(a&&"number"==typeof a.length)return{next:function(){return a&&d>=a.length&&(a=void 0),{value:a&&a[d++],done:!a}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(a,b){var c="function"==typeof Symbol&&a[Symbol.iterator];if(!c)return a;var d,f,g=c.call(a),h=[];try{for(;(void 0===b||0<b--)&&!(d=g.next()).done;)h.push(d.value)}catch(a){f={error:a}}finally{try{d&&!d.done&&(c=g["return"])&&c.call(g)}finally{if(f)throw f.error}}return h}function c(a,b,c,d,e,f,g,h){return f<a&&g>b||f>a&&g<b?0:f<=a&&h<=c||g>=b&&h>=c?f-a-d:g>b&&h<c||f<a&&h>c?g-b+e:0}var d,e,f,g,h,i=function(){return i=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++)for(var e in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e]);return a},i.apply(this,arguments)},j=function(a){return .5*(1-Math.cos(Math.PI*a))},k=function(){return(performance&&performance.now?performance:Date).now()},l=function(a){var b=k(),c=(b-a.timeStamp)/(a.duration||500);if(1<c)return a.method(a.targetX,a.targetY),void a.callback();var d=(a.timingFunc||j)(c),e=a.startX+(a.targetX-a.startX)*d,f=a.startY+(a.targetY-a.startY)*d;a.method(e,f),a.rafId=requestAnimationFrame(function(){l(a)})},m=function(){return void 0===d&&(d=Element.prototype.scroll||Element.prototype.scrollTo||function(a,b){this.scrollLeft=a,this.scrollTop=b}),d},n=function(a,b){var c=m().bind(a);if(void 0!==b.left||void 0!==b.top){var d=a.scrollLeft,e=a.scrollTop,f=b.left,g=void 0===f?d:f,h=b.top,i=void 0===h?e:h;if("smooth"!==b.behavior)return c(g,i);var j=function(){window.removeEventListener("wheel",o),window.removeEventListener("touchmove",o)},n={timeStamp:k(),duration:b.duration,startX:d,startY:e,targetX:g,targetY:i,rafId:0,method:c,timingFunc:b.timingFunc,callback:j},o=function(){cancelAnimationFrame(n.rafId),j()};window.addEventListener("wheel",o,{passive:!0,once:!0}),window.addEventListener("touchmove",o,{passive:!0,once:!0}),l(n)}},o=function(a){var c=m();Element.prototype.scroll=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scroll' on 'Element': parameter 1 ('options') is not an object.");return n(this,i(i({},f),a))}},p=function(a,b){var c=(b.left||0)+a.scrollLeft,d=(b.top||0)+a.scrollTop;return n(a,i(i({},b),{left:c,top:d}))},q=function(a){Element.prototype.scrollBy=function(){var c=b(arguments,2),d=c[0],e=void 0===d?0:d,f=c[1],g=void 0===f?0:f;if("number"==typeof e&&"number"==typeof g)return p(this,{left:e,top:g});if(Object(e)!==e)throw new TypeError("Failed to execute 'scrollBy' on 'Element': parameter 1 ('options') is not an object.");return p(this,i(i({},e),a))}},r=function(a,b,c,d){var e=0===b&&c||1===b&&!c?a.inline:a.block;return"center"===e?1:"nearest"===e?0:"start"===e?0===b?d?5:4:2:"end"===e?0===b?d?4:5:3:c?0===b?0:2:0===b?4:0},s=function(a){return"visible"!==a&&"clip"!==a},t=function(a){if(a.clientHeight<a.scrollHeight||a.clientWidth<a.scrollWidth){var b=getComputedStyle(a);return s(b.overflowY)||s(b.overflowX)}return!1},u=function(a){var b=a.parentNode;return b&&(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b)},v=function(b,d){var e,f;if(b.ownerDocument.documentElement.contains(b)){for(var g=document.scrollingElement||document.documentElement,h=[],j=u(b);null!==j;j=u(j)){if(j===g){h.push(j);break}(j!==document.body||!t(j)||t(document.documentElement))&&t(j)&&h.push(j)}var k=window.visualViewport?window.visualViewport.width:innerWidth,l=window.visualViewport?window.visualViewport.height:innerHeight,m=window.scrollX||window.pageXOffset,o=window.scrollY||window.pageYOffset,p=b.getBoundingClientRect(),q=p.height,s=p.width,v=p.top,w=p.right,x=p.bottom,y=p.left,z=getComputedStyle(b),A=z.writingMode||z.webkitWritingMode||z.getPropertyValue("-ms-writing-mode")||"horizontal-tb",B=["horizontal-tb","lr","lr-tb","rl"].some(function(a){return a===A}),C=["vertical-rl","tb-rl"].some(function(a){return a===A}),D=r(d,0,B,C),E=r(d,1,B,C),F=function(){return 2===E||0===E?v:3===E?x:v+q/2}(),G=function(){return 1===D?y+s/2:5===D?w:y}(),H=[],I=function(a){var b=Math.min,e=Math.max,f=a.getBoundingClientRect(),h=f.height,j=f.width,p=f.top,r=f.right,t=f.bottom,u=f.left,v=getComputedStyle(a),w=parseInt(v.borderLeftWidth,10),x=parseInt(v.borderTopWidth,10),y=parseInt(v.borderRightWidth,10),z=parseInt(v.borderBottomWidth,10),A=0,B=0,C="offsetWidth"in a?a.offsetWidth-a.clientWidth-w-y:0,I="offsetHeight"in a?a.offsetHeight-a.clientHeight-x-z:0;if(g===a){switch(E){case 2:{A=F;break}case 3:{A=F-l;break}case 1:{A=F-l/2;break}case 0:{A=c(o,o+l,l,x,z,o+F,o+F+q,q);break}}switch(D){case 4:{B=G;break}case 5:{B=G-k;break}case 1:{B=G-k/2;break}case 0:{B=c(m,m+k,k,w,y,m+G,m+G+s,s);break}}A=e(0,A+o),B=e(0,B+m)}else{switch(E){case 2:{A=F-p-x;break}case 3:{A=F-t+z+I;break}case 1:{A=F-(p+h/2)+I/2;break}case 0:{A=c(p,t,h,x,z+I,F,F+q,q);break}}switch(D){case 4:{B=G-u-w;break}case 5:{B=G-r+y+C;break}case 1:{B=G-(u+j/2)+C/2;break}case 0:{B=c(u,r,j,w,y+C,G,G+s,s);break}}var J=a.scrollLeft,K=a.scrollTop;A=e(0,b(K+A,a.scrollHeight-h+I)),B=e(0,b(J+B,a.scrollWidth-j+C)),F+=K-A,G+=J-B}H.push(function(){return n(a,i(i({},d),{top:A,left:B}))})};try{for(var J,K=a(h),L=K.next();!L.done;L=K.next())J=L.value,I(J)}catch(a){e={error:a}}finally{try{L&&!L.done&&(f=K.return)&&f.call(K)}finally{if(e)throw e.error}}H.forEach(function(a){return a()})}},w=function(){return void 0===e&&(e=document.documentElement.scrollIntoView),e},x=function(a){var b=w();Element.prototype.scrollIntoView=function(c){if("boolean"==typeof c||c===void 0)return b.call(this,c);if(Object(c)!==c)throw new TypeError("Failed to execute 'scrollIntoView' on 'Element': parameter 1 ('options') is not an object.");return v(this,i(i({},c),a))}},y=function(a){var c=m();Element.prototype.scrollTo=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scrollTo' on 'Element': parameter 1 ('options') is not an object.");return n(this,i(i({},f),a))}},z=function(){return void 0===f&&(f=(window.scroll||window.scrollTo).bind(window)),f},A=function(a){var b=z();if(void 0!==a.left||void 0!==a.top){var c=window.scrollX||window.pageXOffset,d=window.scrollY||window.pageYOffset,e=a.left,f=void 0===e?c:e,g=a.top,h=void 0===g?d:g;if("smooth"!==a.behavior)return b(f,h);var i=function(){window.removeEventListener("wheel",m),window.removeEventListener("touchmove",m)},j={timeStamp:k(),duration:a.duration,startX:c,startY:d,targetX:f,targetY:h,rafId:0,method:b,timingFunc:a.timingFunc,callback:i},m=function(){cancelAnimationFrame(j.rafId),i()};window.addEventListener("wheel",m,{passive:!0,once:!0}),window.addEventListener("touchmove",m,{passive:!0,once:!0}),l(j)}},B=function(a){var c=z();window.scroll=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scroll' on 'Window': parameter 1 ('options') is not an object.");return A(i(i({},f),a))}},C=function(a){var b=(a.left||0)+(window.scrollX||window.pageXOffset),c=(a.top||0)+(window.scrollY||window.pageYOffset);return"smooth"===a.behavior?A(i(i({},a),{left:b,top:c})):z()(b,c)},D=function(a){var c=function(){return void 0===g&&(g=window.scrollBy.bind(window)),g}();window.scrollBy=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scrollBy' on 'Window': parameter 1 ('options') is not an object.");return C(i(i({},f),a))}},E=function(){return void 0===h&&(h=(window.scrollTo||window.scroll).bind(window)),h},F=function(a){var c=E();window.scrollTo=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scrollTo' on 'Window': parameter 1 ('options') is not an object.");return A(i(i({},f),a))}},G=function(a){"scrollBehavior"in document.documentElement.style||(B(a),F(a),D(a),o(a),y(a),q(a),x(a))};(function(a){if(a){var b=~~a.dataset.duration;b=0<b?b:void 0,G({duration:b})}})(document.currentScript||document.querySelector("script[data-seamless]"))});
(function(a){"function"==typeof define&&define.amd?define(a):a()})(function(){'use strict';function a(a){var b="function"==typeof Symbol&&Symbol.iterator,c=b&&a[b],d=0;if(c)return c.call(a);if(a&&"number"==typeof a.length)return{next:function(){return a&&d>=a.length&&(a=void 0),{value:a&&a[d++],done:!a}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(a,b){var c="function"==typeof Symbol&&a[Symbol.iterator];if(!c)return a;var d,f,g=c.call(a),h=[];try{for(;(void 0===b||0<b--)&&!(d=g.next()).done;)h.push(d.value)}catch(a){f={error:a}}finally{try{d&&!d.done&&(c=g["return"])&&c.call(g)}finally{if(f)throw f.error}}return h}function c(a,b,c,d,e,f,g,h){return f<a&&g>b||f>a&&g<b?0:f<=a&&h<=c||g>=b&&h>=c?f-a-d:g>b&&h<c||f<a&&h>c?g-b+e:0}var d,e,f,g,h,i=function(){return i=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++)for(var e in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e]);return a},i.apply(this,arguments)},j=function(a){return .5*(1-Math.cos(Math.PI*a))},k=function(){return(performance&&performance.now?performance:Date).now()},l=function(a){var b=k(),c=(b-a.timeStamp)/(a.duration||500);if(1<c)return a.method(a.targetX,a.targetY),void a.callback();var d=(a.timingFunc||j)(c),e=a.startX+(a.targetX-a.startX)*d,f=a.startY+(a.targetY-a.startY)*d;a.method(e,f),a.rafId=requestAnimationFrame(function(){l(a)})},m=function(){return void 0===d&&(d=Element.prototype.scroll||Element.prototype.scrollTo||function(a,b){this.scrollLeft=a,this.scrollTop=b}),d},n=function(a,b){var c=m().bind(a);if(void 0!==b.left||void 0!==b.top){var d=a.scrollLeft,e=a.scrollTop,f=b.left,g=void 0===f?d:f,h=b.top,i=void 0===h?e:h;if("smooth"!==b.behavior)return c(g,i);var j=function(){window.removeEventListener("wheel",o),window.removeEventListener("touchmove",o)},n={timeStamp:k(),duration:b.duration,startX:d,startY:e,targetX:g,targetY:i,rafId:0,method:c,timingFunc:b.timingFunc,callback:j},o=function(){cancelAnimationFrame(n.rafId),j()};window.addEventListener("wheel",o,{passive:!0,once:!0}),window.addEventListener("touchmove",o,{passive:!0,once:!0}),l(n)}},o=function(a){var c=m();Element.prototype.scroll=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scroll' on 'Element': parameter 1 ('options') is not an object.");return n(this,i(i({},f),a))}},p=function(a,b){var c=(b.left||0)+a.scrollLeft,d=(b.top||0)+a.scrollTop;return n(a,i(i({},b),{left:c,top:d}))},q=function(a){Element.prototype.scrollBy=function(){var c=b(arguments,2),d=c[0],e=void 0===d?0:d,f=c[1],g=void 0===f?0:f;if("number"==typeof e&&"number"==typeof g)return p(this,{left:e,top:g});if(Object(e)!==e)throw new TypeError("Failed to execute 'scrollBy' on 'Element': parameter 1 ('options') is not an object.");return p(this,i(i({},e),a))}},r=function(a,b,c,d){var e=0===b&&c||1===b&&!c?a.inline:a.block;return"center"===e?1:"nearest"===e?0:"start"===e?0===b?d?5:4:2:"end"===e?0===b?d?4:5:3:c?0===b?0:2:0===b?4:0},s=function(a){return"visible"!==a&&"clip"!==a},t=function(a){if(a.clientHeight<a.scrollHeight||a.clientWidth<a.scrollWidth){var b=getComputedStyle(a);return s(b.overflowY)||s(b.overflowX)}return!1},u=function(a){var b=a.parentNode;return b&&(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b)},v=function(b,d){var e,f;if(b.ownerDocument.documentElement.contains(b)){for(var g=document.scrollingElement||document.documentElement,h=[],j=u(b);null!==j;j=u(j)){if(j===g){h.push(j);break}(j!==document.body||!t(j)||t(document.documentElement))&&t(j)&&h.push(j)}var k=window.visualViewport?window.visualViewport.width:innerWidth,l=window.visualViewport?window.visualViewport.height:innerHeight,m=window.scrollX||window.pageXOffset,o=window.scrollY||window.pageYOffset,p=b.getBoundingClientRect(),q=p.height,s=p.width,v=p.top,w=p.right,x=p.bottom,y=p.left,z=getComputedStyle(b),A=z.writingMode||z.getPropertyValue("-webkit-writing-mode")||z.getPropertyValue("-ms-writing-mode")||"horizontal-tb",B=["horizontal-tb","lr","lr-tb","rl"].some(function(a){return a===A}),C=["vertical-rl","tb-rl"].some(function(a){return a===A}),D=r(d,0,B,C),E=r(d,1,B,C),F=function(){return 2===E||0===E?v:3===E?x:v+q/2}(),G=function(){return 1===D?y+s/2:5===D?w:y}(),H=[],I=function(a){var b=Math.min,e=Math.max,f=a.getBoundingClientRect(),h=f.height,j=f.width,p=f.top,r=f.right,t=f.bottom,u=f.left,v=getComputedStyle(a),w=parseInt(v.borderLeftWidth,10),x=parseInt(v.borderTopWidth,10),y=parseInt(v.borderRightWidth,10),z=parseInt(v.borderBottomWidth,10),A=0,B=0,C="offsetWidth"in a?a.offsetWidth-a.clientWidth-w-y:0,I="offsetHeight"in a?a.offsetHeight-a.clientHeight-x-z:0;if(g===a){switch(E){case 2:{A=F;break}case 3:{A=F-l;break}case 1:{A=F-l/2;break}case 0:{A=c(o,o+l,l,x,z,o+F,o+F+q,q);break}}switch(D){case 4:{B=G;break}case 5:{B=G-k;break}case 1:{B=G-k/2;break}case 0:{B=c(m,m+k,k,w,y,m+G,m+G+s,s);break}}A=e(0,A+o),B=e(0,B+m)}else{switch(E){case 2:{A=F-p-x;break}case 3:{A=F-t+z+I;break}case 1:{A=F-(p+h/2)+I/2;break}case 0:{A=c(p,t,h,x,z+I,F,F+q,q);break}}switch(D){case 4:{B=G-u-w;break}case 5:{B=G-r+y+C;break}case 1:{B=G-(u+j/2)+C/2;break}case 0:{B=c(u,r,j,w,y+C,G,G+s,s);break}}var J=a.scrollLeft,K=a.scrollTop;A=e(0,b(K+A,a.scrollHeight-h+I)),B=e(0,b(J+B,a.scrollWidth-j+C)),F+=K-A,G+=J-B}H.push(function(){return n(a,i(i({},d),{top:A,left:B}))})};try{for(var J,K=a(h),L=K.next();!L.done;L=K.next())J=L.value,I(J)}catch(a){e={error:a}}finally{try{L&&!L.done&&(f=K.return)&&f.call(K)}finally{if(e)throw e.error}}H.forEach(function(a){return a()})}},w=function(){return void 0===e&&(e=document.documentElement.scrollIntoView),e},x=function(a){var b=w();Element.prototype.scrollIntoView=function(c){if("boolean"==typeof c||c===void 0)return b.call(this,c);if(Object(c)!==c)throw new TypeError("Failed to execute 'scrollIntoView' on 'Element': parameter 1 ('options') is not an object.");return v(this,i(i({},c),a))}},y=function(a){var c=m();Element.prototype.scrollTo=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scrollTo' on 'Element': parameter 1 ('options') is not an object.");return n(this,i(i({},f),a))}},z=function(){return void 0===f&&(f=(window.scroll||window.scrollTo).bind(window)),f},A=function(a){var b=z();if(void 0!==a.left||void 0!==a.top){var c=window.scrollX||window.pageXOffset,d=window.scrollY||window.pageYOffset,e=a.left,f=void 0===e?c:e,g=a.top,h=void 0===g?d:g;if("smooth"!==a.behavior)return b(f,h);var i=function(){window.removeEventListener("wheel",m),window.removeEventListener("touchmove",m)},j={timeStamp:k(),duration:a.duration,startX:c,startY:d,targetX:f,targetY:h,rafId:0,method:b,timingFunc:a.timingFunc,callback:i},m=function(){cancelAnimationFrame(j.rafId),i()};window.addEventListener("wheel",m,{passive:!0,once:!0}),window.addEventListener("touchmove",m,{passive:!0,once:!0}),l(j)}},B=function(a){var c=z();window.scroll=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scroll' on 'Window': parameter 1 ('options') is not an object.");return A(i(i({},f),a))}},C=function(a){var b=(a.left||0)+(window.scrollX||window.pageXOffset),c=(a.top||0)+(window.scrollY||window.pageYOffset);return"smooth"===a.behavior?A(i(i({},a),{left:b,top:c})):z()(b,c)},D=function(a){var c=function(){return void 0===g&&(g=window.scrollBy.bind(window)),g}();window.scrollBy=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scrollBy' on 'Window': parameter 1 ('options') is not an object.");return C(i(i({},f),a))}},E=function(){return void 0===h&&(h=(window.scrollTo||window.scroll).bind(window)),h},F=function(a){var c=E();window.scrollTo=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scrollTo' on 'Window': parameter 1 ('options') is not an object.");return A(i(i({},f),a))}},G=function(a){"scrollBehavior"in document.documentElement.style||(B(a),F(a),D(a),o(a),y(a),q(a),x(a))};(function(a){if(a){var b=~~a.dataset.duration;b=0<b?b:void 0,G({duration:b})}})(document.currentScript||document.querySelector("script[data-seamless]"))});
//# sourceMappingURL=seamless.auto-polyfill.min.js.map
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.seamless = {}));
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.seamless = {}));
}(this, (function (exports) { 'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

@@ -152,6 +152,6 @@

var elementScrollBy = function (elememt, options) {
var left = (options.left || 0) + elememt.scrollLeft;
var top = (options.top || 0) + elememt.scrollTop;
return elementScroll(elememt, __assign(__assign({}, options), { left: left, top: top }));
var elementScrollBy = function (element, options) {
var left = (options.left || 0) + element.scrollLeft;
var top = (options.top || 0) + element.scrollTop;
return elementScroll(element, __assign(__assign({}, options), { left: left, top: top }));
};

@@ -392,3 +392,3 @@ var polyfill$1 = function (options) {

var writingMode = computedStyle.writingMode ||
computedStyle.webkitWritingMode ||
computedStyle.getPropertyValue("-webkit-writing-mode") ||
computedStyle.getPropertyValue("-ms-writing-mode") ||

@@ -395,0 +395,0 @@ "horizontal-tb";

import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const windowScroll: (options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scroll.d.ts.map
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const windowScrollBy: (options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scrollBy.d.ts.map
import { IAnimationOptions } from "./common.js";
export { windowScroll as windowScrollTo } from "./Window.scroll.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scrollTo.d.ts.map
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const elementScroll: (element: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scroll.d.ts.map
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const elementScrollBy: (elememt: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const elementScrollBy: (element: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollBy.d.ts.map

@@ -11,3 +11,3 @@ import { IAnimationOptions, IScrollIntoViewOptions } from "./common.js";

export declare const elementScrollIntoView: (element: Element, options: IScrollIntoViewOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollIntoView.d.ts.map
import { IAnimationOptions } from "./common.js";
export { elementScroll as elementScrollTo } from "./Element.scroll.js";
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollTo.d.ts.map
import { IAnimationOptions } from "./common.js";
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
export { elementScroll } from "./Element.scroll.js";

@@ -4,0 +4,0 @@ export { elementScrollBy } from "./Element.scrollBy.js";

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.seamless = {}));
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.seamless = {}));
}(this, (function (exports) { 'use strict';

@@ -97,6 +97,6 @@

const elementScrollBy = (elememt, options) => {
const left = (options.left || 0) + elememt.scrollLeft;
const top = (options.top || 0) + elememt.scrollTop;
return elementScroll(elememt, Object.assign(Object.assign({}, options), { left, top }));
const elementScrollBy = (element, options) => {
const left = (options.left || 0) + element.scrollLeft;
const top = (options.top || 0) + element.scrollTop;
return elementScroll(element, Object.assign(Object.assign({}, options), { left, top }));
};

@@ -336,3 +336,3 @@ const polyfill$1 = (options) => {

const writingMode = computedStyle.writingMode ||
computedStyle.webkitWritingMode ||
computedStyle.getPropertyValue("-webkit-writing-mode") ||
computedStyle.getPropertyValue("-ms-writing-mode") ||

@@ -339,0 +339,0 @@ "horizontal-tb";

import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const windowScroll: (options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scroll.d.ts.map
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const windowScrollBy: (options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scrollBy.d.ts.map
import { IAnimationOptions } from "./common.js";
export { windowScroll as windowScrollTo } from "./Window.scroll.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scrollTo.d.ts.map
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const elementScroll: (element: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scroll.d.ts.map
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const elementScrollBy: (elememt: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const elementScrollBy: (element: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollBy.d.ts.map
import { elementScroll } from "./Element.scroll.js";
export const elementScrollBy = (elememt, options) => {
const left = (options.left || 0) + elememt.scrollLeft;
const top = (options.top || 0) + elememt.scrollTop;
return elementScroll(elememt, { ...options, left, top });
export const elementScrollBy = (element, options) => {
const left = (options.left || 0) + element.scrollLeft;
const top = (options.top || 0) + element.scrollTop;
return elementScroll(element, { ...options, left, top });
};

@@ -7,0 +7,0 @@ export const polyfill = (options) => {

@@ -11,3 +11,3 @@ import { IAnimationOptions, IScrollIntoViewOptions } from "./common.js";

export declare const elementScrollIntoView: (element: Element, options: IScrollIntoViewOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollIntoView.d.ts.map

@@ -222,3 +222,3 @@ import { elementScroll } from "./Element.scroll.js";

const writingMode = computedStyle.writingMode ||
computedStyle.webkitWritingMode ||
computedStyle.getPropertyValue("-webkit-writing-mode") ||
computedStyle.getPropertyValue("-ms-writing-mode") ||

@@ -225,0 +225,0 @@ "horizontal-tb";

import { IAnimationOptions } from "./common.js";
export { elementScroll as elementScrollTo } from "./Element.scroll.js";
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollTo.d.ts.map
import { IAnimationOptions } from "./common.js";
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
export { elementScroll } from "./Element.scroll.js";

@@ -4,0 +4,0 @@ export { elementScrollBy } from "./Element.scrollBy.js";

import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const windowScroll: (options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scroll.d.ts.map
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const windowScrollBy: (options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scrollBy.d.ts.map
import { IAnimationOptions } from "./common.js";
export { windowScroll as windowScrollTo } from "./Window.scroll.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scrollTo.d.ts.map
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const elementScroll: (element: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scroll.d.ts.map
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const elementScrollBy: (elememt: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const elementScrollBy: (element: Element, options: IScrollToOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollBy.d.ts.map

@@ -11,3 +11,3 @@ import { IAnimationOptions, IScrollIntoViewOptions } from "./common.js";

export declare const elementScrollIntoView: (element: Element, options: IScrollIntoViewOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollIntoView.d.ts.map
import { IAnimationOptions } from "./common.js";
export { elementScroll as elementScrollTo } from "./Element.scroll.js";
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Element.scrollTo.d.ts.map
import { IAnimationOptions } from "./common.js";
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
export { elementScroll } from "./Element.scroll.js";

@@ -4,0 +4,0 @@ export { elementScrollBy } from "./Element.scrollBy.js";

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.seamless = {}));
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.seamless = {}));
}(this, (function (exports) { 'use strict';

@@ -97,6 +97,6 @@

const elementScrollBy = (elememt, options) => {
const left = (options.left || 0) + elememt.scrollLeft;
const top = (options.top || 0) + elememt.scrollTop;
return elementScroll(elememt, { ...options, left, top });
const elementScrollBy = (element, options) => {
const left = (options.left || 0) + element.scrollLeft;
const top = (options.top || 0) + element.scrollTop;
return elementScroll(element, { ...options, left, top });
};

@@ -336,3 +336,3 @@ const polyfill$1 = (options) => {

const writingMode = computedStyle.writingMode ||
computedStyle.webkitWritingMode ||
computedStyle.getPropertyValue("-webkit-writing-mode") ||
computedStyle.getPropertyValue("-ms-writing-mode") ||

@@ -339,0 +339,0 @@ "horizontal-tb";

import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const windowScroll: (options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scroll.d.ts.map
import { IAnimationOptions, IScrollToOptions } from "./common.js";
export declare const windowScrollBy: (options: IScrollToOptions) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scrollBy.d.ts.map
import { IAnimationOptions } from "./common.js";
export { windowScroll as windowScrollTo } from "./Window.scroll.js";
export declare const getOriginalFunc: () => (x: number, y: number) => void;
export declare const polyfill: (options: IAnimationOptions) => void;
export declare const polyfill: (options?: IAnimationOptions | undefined) => void;
//# sourceMappingURL=Window.scrollTo.d.ts.map

@@ -5,3 +5,3 @@ {

"description": "Smooth Scroll behavior polyfill",
"version": "1.0.10",
"version": "1.1.0",
"author": {

@@ -21,8 +21,8 @@ "name": "Dustan Kasten",

"prettier": "^2.0.5",
"rollup": "^2.7.3",
"rollup": "^2.23.0",
"rollup-plugin-babel-minify": "^10.0.0",
"rollup-plugin-typescript2": "^0.27.0",
"ts-node": "^8.9.1",
"rollup-plugin-typescript2": "^0.27.1",
"ts-node": "^8.10.2",
"tslint": "^6.1.2",
"typescript": "^3.8.3"
"typescript": "^3.9.7"
},

@@ -29,0 +29,0 @@ "main": "dist/es5/seamless.js",

@@ -69,3 +69,3 @@ import { IAnimationOptions, IContext, IScrollToOptions, now, step } from "./common.js";

export const polyfill = (options: IAnimationOptions) => {
export const polyfill = (options?: IAnimationOptions) => {
const originalFunc = getOriginalFunc();

@@ -72,0 +72,0 @@

import { IAnimationOptions, IScrollToOptions } from "./common.js";
import { elementScroll } from "./Element.scroll.js";
export const elementScrollBy = (elememt: Element, options: IScrollToOptions) => {
const left = (options.left || 0) + elememt.scrollLeft;
const top = (options.top || 0) + elememt.scrollTop;
export const elementScrollBy = (element: Element, options: IScrollToOptions) => {
const left = (options.left || 0) + element.scrollLeft;
const top = (options.top || 0) + element.scrollTop;
return elementScroll(elememt, { ...options, left, top });
return elementScroll(element, { ...options, left, top });
};
export const polyfill = (options: IAnimationOptions) => {
export const polyfill = (options?: IAnimationOptions) => {
Element.prototype.scrollBy = function scrollBy() {

@@ -13,0 +13,0 @@ const [arg0 = 0, arg1 = 0] = arguments;

@@ -298,3 +298,3 @@ import { IAnimationOptions, IScrollIntoViewOptions } from "./common.js";

computedStyle.writingMode ||
computedStyle.webkitWritingMode ||
computedStyle.getPropertyValue("-webkit-writing-mode") ||
computedStyle.getPropertyValue("-ms-writing-mode") ||

@@ -518,3 +518,3 @@ "horizontal-tb";

export const polyfill = (options: IAnimationOptions) => {
export const polyfill = (options?: IAnimationOptions) => {
const originalFunc = getOriginalFunc();

@@ -521,0 +521,0 @@

@@ -6,3 +6,3 @@ import { IAnimationOptions } from "./common.js";

export const polyfill = (options: IAnimationOptions) => {
export const polyfill = (options?: IAnimationOptions) => {
const originalFunc = getOriginalFunc();

@@ -9,0 +9,0 @@

@@ -10,3 +10,3 @@ import { IAnimationOptions } from "./common.js";

export const polyfill = (options: IAnimationOptions) => {
export const polyfill = (options?: IAnimationOptions) => {
if ("scrollBehavior" in document.documentElement.style) {

@@ -13,0 +13,0 @@ return;

@@ -63,3 +63,3 @@ import { IAnimationOptions, IContext, IScrollToOptions, now, step } from "./common.js";

export const polyfill = (options: IAnimationOptions) => {
export const polyfill = (options?: IAnimationOptions) => {
const originalFunc = getOriginalFunc();

@@ -66,0 +66,0 @@

@@ -17,3 +17,3 @@ import { IAnimationOptions, IScrollToOptions } from "./common.js";

export const polyfill = (options: IAnimationOptions) => {
export const polyfill = (options?: IAnimationOptions) => {
const originalFunc = (() => {

@@ -20,0 +20,0 @@ if ($original === undefined) {

@@ -15,3 +15,3 @@ import { IAnimationOptions } from "./common.js";

export const polyfill = (options: IAnimationOptions) => {
export const polyfill = (options?: IAnimationOptions) => {
const originalFunc = getOriginalFunc();

@@ -18,0 +18,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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