diff --git a/dist/index.js b/dist/index.js index c269930..012f2b8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,17 +1,42 @@ -export { ScrollMonitorContainer } from './src/container.js'; -export { Watcher } from './src/watcher.js'; -export * from './src/types'; -import { isInBrowser } from './src/constants.js'; -import { ScrollMonitorContainer } from './src/container.js'; -// this is needed for the type, but if we're not in a browser the only -// way listenToDOM will be called is if you call scrollmonitor.createContainer -// and you can't do that until you have a DOM element. -var scrollMonitor = new ScrollMonitorContainer(isInBrowser ? document.body : undefined); -if (isInBrowser) { - scrollMonitor.updateState(); - scrollMonitor.listenToDOM(); -} -//@ts-ignore -window.scrollMonitor = scrollMonitor; -export default scrollMonitor; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./src/container.js", "./src/watcher.js", "./src/types", "./src/constants.js", "./src/container.js"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Watcher = exports.ScrollMonitorContainer = void 0; + var container_js_1 = require("./src/container.js"); + Object.defineProperty(exports, "ScrollMonitorContainer", { enumerable: true, get: function () { return container_js_1.ScrollMonitorContainer; } }); + var watcher_js_1 = require("./src/watcher.js"); + Object.defineProperty(exports, "Watcher", { enumerable: true, get: function () { return watcher_js_1.Watcher; } }); + __exportStar(require("./src/types"), exports); + var constants_js_1 = require("./src/constants.js"); + var container_js_2 = require("./src/container.js"); + // this is needed for the type, but if we're not in a browser the only + // way listenToDOM will be called is if you call scrollmonitor.createContainer + // and you can't do that until you have a DOM element. + var scrollMonitor = new container_js_2.ScrollMonitorContainer(constants_js_1.isInBrowser ? document.body : undefined); + if (constants_js_1.isInBrowser) { + scrollMonitor.updateState(); + scrollMonitor.listenToDOM(); + } + //@ts-ignore + window.scrollMonitor = scrollMonitor; + exports.default = scrollMonitor; +}); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map index 07d0050..ab0c1ae 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,sEAAsE;AACtE,8EAA8E;AAC9E,sDAAsD;AACtD,IAAM,aAAa,GAAG,IAAI,sBAAsB,CAC5C,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAE,SAAoC,CACtE,CAAC;AACF,IAAI,WAAW,EAAE;IACb,aAAa,CAAC,WAAW,EAAE,CAAC;IAC5B,aAAa,CAAC,WAAW,EAAE,CAAC;CAC/B;AACD,YAAY;AACZ,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;AAErC,eAAe,aAAa,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAAA,mDAA4D;IAAnD,sHAAA,sBAAsB,OAAA;IAC/B,+CAA2C;IAAlC,qGAAA,OAAO,OAAA;IAChB,8CAA4B;IAE5B,mDAAiD;IACjD,mDAA4D;IAE5D,sEAAsE;IACtE,8EAA8E;IAC9E,sDAAsD;IACtD,IAAM,aAAa,GAAG,IAAI,qCAAsB,CAC5C,0BAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAE,SAAoC,CACtE,CAAC;IACF,IAAI,0BAAW,EAAE;QACb,aAAa,CAAC,WAAW,EAAE,CAAC;QAC5B,aAAa,CAAC,WAAW,EAAE,CAAC;KAC/B;IACD,YAAY;IACZ,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;IAErC,kBAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/src/constants.js b/dist/src/constants.js index b8dc539..be05da9 100644 --- a/dist/src/constants.js +++ b/dist/src/constants.js @@ -1,20 +1,33 @@ -export var VISIBILITYCHANGE = 'visibilityChange'; -export var ENTERVIEWPORT = 'enterViewport'; -export var FULLYENTERVIEWPORT = 'fullyEnterViewport'; -export var EXITVIEWPORT = 'exitViewport'; -export var PARTIALLYEXITVIEWPORT = 'partiallyExitViewport'; -export var LOCATIONCHANGE = 'locationChange'; -export var STATECHANGE = 'stateChange'; -export var eventTypes = [ - VISIBILITYCHANGE, - ENTERVIEWPORT, - FULLYENTERVIEWPORT, - EXITVIEWPORT, - PARTIALLYEXITVIEWPORT, - LOCATIONCHANGE, - STATECHANGE, -]; -export var isOnServer = typeof window === 'undefined'; -export var isInBrowser = !isOnServer; -export var defaultOffsets = { top: 0, bottom: 0 }; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.defaultOffsets = exports.isInBrowser = exports.isOnServer = exports.eventTypes = exports.STATECHANGE = exports.LOCATIONCHANGE = exports.PARTIALLYEXITVIEWPORT = exports.EXITVIEWPORT = exports.FULLYENTERVIEWPORT = exports.ENTERVIEWPORT = exports.VISIBILITYCHANGE = void 0; + exports.VISIBILITYCHANGE = 'visibilityChange'; + exports.ENTERVIEWPORT = 'enterViewport'; + exports.FULLYENTERVIEWPORT = 'fullyEnterViewport'; + exports.EXITVIEWPORT = 'exitViewport'; + exports.PARTIALLYEXITVIEWPORT = 'partiallyExitViewport'; + exports.LOCATIONCHANGE = 'locationChange'; + exports.STATECHANGE = 'stateChange'; + exports.eventTypes = [ + exports.VISIBILITYCHANGE, + exports.ENTERVIEWPORT, + exports.FULLYENTERVIEWPORT, + exports.EXITVIEWPORT, + exports.PARTIALLYEXITVIEWPORT, + exports.LOCATIONCHANGE, + exports.STATECHANGE, + ]; + exports.isOnServer = typeof window === 'undefined'; + exports.isInBrowser = !exports.isOnServer; + exports.defaultOffsets = { top: 0, bottom: 0 }; +}); //# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/dist/src/constants.js.map b/dist/src/constants.js.map index a6b0851..49ba80d 100644 --- a/dist/src/constants.js.map +++ b/dist/src/constants.js.map @@ -1 +1 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,gBAAgB,GAAG,kBAAkB,CAAC;AACnD,MAAM,CAAC,IAAM,aAAa,GAAG,eAAe,CAAC;AAC7C,MAAM,CAAC,IAAM,kBAAkB,GAAG,oBAAoB,CAAC;AACvD,MAAM,CAAC,IAAM,YAAY,GAAG,cAAc,CAAC;AAC3C,MAAM,CAAC,IAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAC7D,MAAM,CAAC,IAAM,cAAc,GAAG,gBAAgB,CAAC;AAC/C,MAAM,CAAC,IAAM,WAAW,GAAG,aAAa,CAAC;AAEzC,MAAM,CAAC,IAAM,UAAU,GAAG;IACtB,gBAAgB;IAChB,aAAa;IACb,kBAAkB;IAClB,YAAY;IACZ,qBAAqB;IACrB,cAAc;IACd,WAAW;CACL,CAAC;AAEX,MAAM,CAAC,IAAM,UAAU,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;AACxD,MAAM,CAAC,IAAM,WAAW,GAAG,CAAC,UAAU,CAAC;AAEvC,MAAM,CAAC,IAAM,cAAc,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAW,CAAC"} \ No newline at end of file +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAa,QAAA,gBAAgB,GAAG,kBAAkB,CAAC;IACtC,QAAA,aAAa,GAAG,eAAe,CAAC;IAChC,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;IAC1C,QAAA,YAAY,GAAG,cAAc,CAAC;IAC9B,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;IAChD,QAAA,cAAc,GAAG,gBAAgB,CAAC;IAClC,QAAA,WAAW,GAAG,aAAa,CAAC;IAE5B,QAAA,UAAU,GAAG;QACtB,wBAAgB;QAChB,qBAAa;QACb,0BAAkB;QAClB,oBAAY;QACZ,6BAAqB;QACrB,sBAAc;QACd,mBAAW;KACL,CAAC;IAEE,QAAA,UAAU,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;IAC3C,QAAA,WAAW,GAAG,CAAC,kBAAU,CAAC;IAE1B,QAAA,cAAc,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAW,CAAC"} \ No newline at end of file diff --git a/dist/src/container.js b/dist/src/container.js index be98f44..8112313 100644 --- a/dist/src/container.js +++ b/dist/src/container.js @@ -1,200 +1,213 @@ -import { isOnServer, isInBrowser, eventTypes } from './constants.js'; -import { Watcher } from './watcher.js'; -function getViewportHeight(element) { - if (isOnServer) { - return 0; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; } - if (element === document.body) { - return window.innerHeight || document.documentElement.clientHeight; + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./constants.js", "./watcher.js"], factory); } - else { - return element.clientHeight; - } -} -function getContentHeight(element) { - if (isOnServer) { - return 0; - } - if (element === document.body) { - // jQuery approach - // whichever is greatest - return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.documentElement.clientHeight); - } - else { - return element.scrollHeight; - } -} -function scrollTop(element) { - if (isOnServer) { - return 0; - } - if (element === document.body) { - return (window.pageYOffset || - (document.documentElement && document.documentElement.scrollTop) || - document.body.scrollTop); - } - else { - return element.scrollTop; +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ScrollMonitorContainer = void 0; + var constants_js_1 = require("./constants.js"); + var watcher_js_1 = require("./watcher.js"); + function getViewportHeight(element) { + if (constants_js_1.isOnServer) { + return 0; + } + if (element === document.body) { + return window.innerHeight || document.documentElement.clientHeight; + } + else { + return element.clientHeight; + } } -} -var browserSupportsPassive = false; -if (isInBrowser) { - try { - var opts = Object.defineProperty({}, 'passive', { - get: function () { - browserSupportsPassive = true; - }, - }); - window.addEventListener('test', null, opts); + function getContentHeight(element) { + if (constants_js_1.isOnServer) { + return 0; + } + if (element === document.body) { + // jQuery approach + // whichever is greatest + return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.documentElement.clientHeight); + } + else { + return element.scrollHeight; + } } - catch (e) { } -} -var useCapture = browserSupportsPassive ? { capture: false, passive: true } : false; -var ScrollMonitorContainer = /** @class */ (function () { - function ScrollMonitorContainer(item, parentWatcher) { - this.eventTypes = eventTypes; - var self = this; - this.item = item; - this.watchers = []; - this.viewportTop = null; - this.viewportBottom = null; - this.documentHeight = getContentHeight(item); - this.viewportHeight = getViewportHeight(item); - this.DOMListener = function () { - ScrollMonitorContainer.prototype.DOMListener.apply(self, arguments); - }; - if (parentWatcher) { - this.containerWatcher = parentWatcher.create(item); + function scrollTop(element) { + if (constants_js_1.isOnServer) { + return 0; } - var previousDocumentHeight; - var calculateViewportI; - function calculateViewport() { - self.viewportTop = scrollTop(item); - self.viewportBottom = self.viewportTop + self.viewportHeight; - self.documentHeight = getContentHeight(item); - if (self.documentHeight !== previousDocumentHeight) { - calculateViewportI = self.watchers.length; - while (calculateViewportI--) { - self.watchers[calculateViewportI].recalculateLocation(); - } - previousDocumentHeight = self.documentHeight; - } + if (element === document.body) { + return (window.pageYOffset || + (document.documentElement && document.documentElement.scrollTop) || + document.body.scrollTop); } - var updateAndTriggerWatchersI; - function updateAndTriggerWatchers() { - // update all watchers then trigger the events so one can rely on another being up to date. - updateAndTriggerWatchersI = self.watchers.length; - while (updateAndTriggerWatchersI--) { - self.watchers[updateAndTriggerWatchersI].update(); - } - updateAndTriggerWatchersI = self.watchers.length; - while (updateAndTriggerWatchersI--) { - self.watchers[updateAndTriggerWatchersI].triggerCallbacks(undefined); - } + else { + return element.scrollTop; } - this.update = function () { - calculateViewport(); - updateAndTriggerWatchers(); - }; - this.recalculateLocations = function () { - this.documentHeight = 0; - this.update(); - }; } - ScrollMonitorContainer.prototype.listenToDOM = function () { - if (isInBrowser) { - if (this.item === document.body) { - window.addEventListener('scroll', this.DOMListener, useCapture); + var browserSupportsPassive = false; + if (constants_js_1.isInBrowser) { + try { + var opts = Object.defineProperty({}, 'passive', { + get: function () { + browserSupportsPassive = true; + }, + }); + window.addEventListener('test', null, opts); + } + catch (e) { } + } + var useCapture = browserSupportsPassive ? { capture: false, passive: true } : false; + var ScrollMonitorContainer = /** @class */ (function () { + function ScrollMonitorContainer(item, parentWatcher) { + this.eventTypes = constants_js_1.eventTypes; + var self = this; + this.item = item; + this.watchers = []; + this.viewportTop = null; + this.viewportBottom = null; + this.documentHeight = getContentHeight(item); + this.viewportHeight = getViewportHeight(item); + this.DOMListener = function () { + ScrollMonitorContainer.prototype.DOMListener.apply(self, arguments); + }; + if (parentWatcher) { + this.containerWatcher = parentWatcher.create(item); } - else { - this.item.addEventListener('scroll', this.DOMListener, useCapture); + var previousDocumentHeight; + var calculateViewportI; + function calculateViewport() { + self.viewportTop = scrollTop(item); + self.viewportBottom = self.viewportTop + self.viewportHeight; + self.documentHeight = getContentHeight(item); + if (self.documentHeight !== previousDocumentHeight) { + calculateViewportI = self.watchers.length; + while (calculateViewportI--) { + self.watchers[calculateViewportI].recalculateLocation(); + } + previousDocumentHeight = self.documentHeight; + } } - window.addEventListener('resize', this.DOMListener); - this.destroy = function () { - if (this.item === document.body) { - window.removeEventListener('scroll', this.DOMListener, useCapture); - this.containerWatcher.destroy(); + var updateAndTriggerWatchersI; + function updateAndTriggerWatchers() { + // update all watchers then trigger the events so one can rely on another being up to date. + updateAndTriggerWatchersI = self.watchers.length; + while (updateAndTriggerWatchersI--) { + self.watchers[updateAndTriggerWatchersI].update(); } - else { - this.item.removeEventListener('scroll', this.DOMListener, useCapture); + updateAndTriggerWatchersI = self.watchers.length; + while (updateAndTriggerWatchersI--) { + self.watchers[updateAndTriggerWatchersI].triggerCallbacks(undefined); } - window.removeEventListener('resize', this.DOMListener); + } + this.update = function () { + calculateViewport(); + updateAndTriggerWatchers(); + }; + this.recalculateLocations = function () { + this.documentHeight = 0; + this.update(); }; } - }; - ScrollMonitorContainer.prototype.destroy = function () { - // noop, override for your own purposes. - // in listenToDOM, for example. - }; - ScrollMonitorContainer.prototype.DOMListener = function (event) { - //alert('got scroll'); - this.updateState(); - this.updateAndTriggerWatchers(event); - }; - ScrollMonitorContainer.prototype.updateState = function () { - var viewportTop = scrollTop(this.item); - var viewportHeight = getViewportHeight(this.item); - var contentHeight = getContentHeight(this.item); - var needsRecalcuate = viewportHeight !== this.viewportHeight || contentHeight !== this.contentHeight; - this.viewportTop = viewportTop; - this.viewportHeight = viewportHeight; - this.viewportBottom = viewportTop + viewportHeight; - this.contentHeight = contentHeight; - if (needsRecalcuate) { + ScrollMonitorContainer.prototype.listenToDOM = function () { + if (constants_js_1.isInBrowser) { + if (this.item === document.body) { + window.addEventListener('scroll', this.DOMListener, useCapture); + } + else { + this.item.addEventListener('scroll', this.DOMListener, useCapture); + } + window.addEventListener('resize', this.DOMListener); + this.destroy = function () { + if (this.item === document.body) { + window.removeEventListener('scroll', this.DOMListener, useCapture); + this.containerWatcher.destroy(); + } + else { + this.item.removeEventListener('scroll', this.DOMListener, useCapture); + } + window.removeEventListener('resize', this.DOMListener); + }; + } + }; + ScrollMonitorContainer.prototype.destroy = function () { + // noop, override for your own purposes. + // in listenToDOM, for example. + }; + ScrollMonitorContainer.prototype.DOMListener = function (event) { + //alert('got scroll'); + this.updateState(); + this.updateAndTriggerWatchers(event); + }; + ScrollMonitorContainer.prototype.updateState = function () { + var viewportTop = scrollTop(this.item); + var viewportHeight = getViewportHeight(this.item); + var contentHeight = getContentHeight(this.item); + var needsRecalcuate = viewportHeight !== this.viewportHeight || contentHeight !== this.contentHeight; + this.viewportTop = viewportTop; + this.viewportHeight = viewportHeight; + this.viewportBottom = viewportTop + viewportHeight; + this.contentHeight = contentHeight; + if (needsRecalcuate) { + var i = this.watchers.length; + while (i--) { + this.watchers[i].recalculateLocation(); + } + } + }; + ScrollMonitorContainer.prototype.updateAndTriggerWatchers = function (event) { var i = this.watchers.length; while (i--) { - this.watchers[i].recalculateLocation(); + this.watchers[i].update(); } - } - }; - ScrollMonitorContainer.prototype.updateAndTriggerWatchers = function (event) { - var i = this.watchers.length; - while (i--) { - this.watchers[i].update(); - } - i = this.watchers.length; - while (i--) { - this.watchers[i].triggerCallbacks(event); - } - }; - ScrollMonitorContainer.prototype.createContainer = function (input) { - var item; - if (typeof input === 'string') { - item = document.querySelector(input); - } - else if (Array.isArray(input) || input instanceof NodeList) { - item = input[0]; - } - else { - item = input; - } - var container = new ScrollMonitorContainer(item, this); - this.updateState(); - container.listenToDOM(); - return container; - }; - ScrollMonitorContainer.prototype.create = function (input, offsets) { - var item; - if (typeof item === 'string') { - item = document.querySelector(item); - } - else if (Array.isArray(input) || input instanceof NodeList) { - item = input[0]; - } - else { - item = input; - } - var watcher = new Watcher(this, item, offsets); - this.watchers.push(watcher); - return watcher; - }; - /** - * @deprecated since version 1.1 - */ - ScrollMonitorContainer.prototype.beget = function (input, offsets) { - return this.create(input, offsets); - }; - return ScrollMonitorContainer; -}()); -export { ScrollMonitorContainer }; + i = this.watchers.length; + while (i--) { + this.watchers[i].triggerCallbacks(event); + } + }; + ScrollMonitorContainer.prototype.createContainer = function (input) { + var item; + if (typeof input === 'string') { + item = document.querySelector(input); + } + else if (Array.isArray(input) || input instanceof NodeList) { + item = input[0]; + } + else { + item = input; + } + var container = new ScrollMonitorContainer(item, this); + this.updateState(); + container.listenToDOM(); + return container; + }; + ScrollMonitorContainer.prototype.create = function (input, offsets) { + var item; + if (typeof item === 'string') { + item = document.querySelector(item); + } + else if (Array.isArray(input) || input instanceof NodeList) { + item = input[0]; + } + else { + item = input; + } + var watcher = new watcher_js_1.Watcher(this, item, offsets); + this.watchers.push(watcher); + return watcher; + }; + /** + * @deprecated since version 1.1 + */ + ScrollMonitorContainer.prototype.beget = function (input, offsets) { + return this.create(input, offsets); + }; + return ScrollMonitorContainer; + }()); + exports.ScrollMonitorContainer = ScrollMonitorContainer; +}); //# sourceMappingURL=container.js.map \ No newline at end of file diff --git a/dist/src/container.js.map b/dist/src/container.js.map index 6e0d5e7..5b89e3b 100644 --- a/dist/src/container.js.map +++ b/dist/src/container.js.map @@ -1 +1 @@ -{"version":3,"file":"container.js","sourceRoot":"","sources":["../../src/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,SAAS,iBAAiB,CAAC,OAAoB;IAC3C,IAAI,UAAU,EAAE;QACZ,OAAO,CAAC,CAAC;KACZ;IACD,IAAI,OAAO,KAAK,QAAQ,CAAC,IAAI,EAAE;QAC3B,OAAO,MAAM,CAAC,WAAW,IAAI,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC;KACtE;SAAM;QACH,OAAO,OAAO,CAAC,YAAY,CAAC;KAC/B;AACL,CA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IAAD,CAAC,AA9KD,IA8KC;IA9KY,wDAAsB"} \ No newline at end of file diff --git a/dist/src/types.js b/dist/src/types.js index 718fd38..b5cd0a9 100644 --- a/dist/src/types.js +++ b/dist/src/types.js @@ -1,2 +1,13 @@ -export {}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); //# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/dist/src/watcher.js b/dist/src/watcher.js index ce3c2c6..1febe9c 100644 --- a/dist/src/watcher.js +++ b/dist/src/watcher.js @@ -1,224 +1,237 @@ -import { VISIBILITYCHANGE, ENTERVIEWPORT, FULLYENTERVIEWPORT, EXITVIEWPORT, PARTIALLYEXITVIEWPORT, LOCATIONCHANGE, STATECHANGE, eventTypes, defaultOffsets, } from './constants.js'; -var Watcher = /** @class */ (function () { - function Watcher(container, watchItem, offsets) { - this.container = container; - this.watchItem = watchItem; - this.locked = false; - this.callbacks = {}; - var self = this; - if (!offsets) { - this.offsets = defaultOffsets; - } - else if (typeof offsets === 'number') { - this.offsets = { top: offsets, bottom: offsets }; - } - else { - this.offsets = { - top: 'top' in offsets ? offsets.top : defaultOffsets.top, - bottom: 'bottom' in offsets ? offsets.bottom : defaultOffsets.bottom, - }; - } - for (var i = 0, j = eventTypes.length; i < j; i++) { - self.callbacks[eventTypes[i]] = []; - } - this.locked = false; - var wasInViewport; - var wasFullyInViewport; - var wasAboveViewport; - var wasBelowViewport; - var listenerToTriggerListI; - var listener; - var needToTriggerStateChange = false; - function triggerCallbackArray(listeners, event) { - needToTriggerStateChange = true; - if (listeners.length === 0) { - return; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports", "./constants.js"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Watcher = void 0; + var constants_js_1 = require("./constants.js"); + var Watcher = /** @class */ (function () { + function Watcher(container, watchItem, offsets) { + this.container = container; + this.watchItem = watchItem; + this.locked = false; + this.callbacks = {}; + var self = this; + if (!offsets) { + this.offsets = constants_js_1.defaultOffsets; } - listenerToTriggerListI = listeners.length; - while (listenerToTriggerListI--) { - listener = listeners[listenerToTriggerListI]; - listener.callback.call(self, event, self); - if (listener.isOne) { - listeners.splice(listenerToTriggerListI, 1); - } + else if (typeof offsets === 'number') { + this.offsets = { top: offsets, bottom: offsets }; } - } - this.triggerCallbacks = function triggerCallbacks(event) { - if (this.isInViewport && !wasInViewport) { - triggerCallbackArray(this.callbacks[ENTERVIEWPORT], event); + else { + this.offsets = { + top: 'top' in offsets ? offsets.top : constants_js_1.defaultOffsets.top, + bottom: 'bottom' in offsets ? offsets.bottom : constants_js_1.defaultOffsets.bottom, + }; } - if (this.isFullyInViewport && !wasFullyInViewport) { - triggerCallbackArray(this.callbacks[FULLYENTERVIEWPORT], event); + for (var i = 0, j = constants_js_1.eventTypes.length; i < j; i++) { + self.callbacks[constants_js_1.eventTypes[i]] = []; } - if (this.isAboveViewport !== wasAboveViewport && - this.isBelowViewport !== wasBelowViewport) { - triggerCallbackArray(this.callbacks[VISIBILITYCHANGE], event); - // if you skip completely past this element - if (!wasFullyInViewport && !this.isFullyInViewport) { - triggerCallbackArray(this.callbacks[FULLYENTERVIEWPORT], event); - triggerCallbackArray(this.callbacks[PARTIALLYEXITVIEWPORT], event); + this.locked = false; + var wasInViewport; + var wasFullyInViewport; + var wasAboveViewport; + var wasBelowViewport; + var listenerToTriggerListI; + var listener; + var needToTriggerStateChange = false; + function triggerCallbackArray(listeners, event) { + needToTriggerStateChange = true; + if (listeners.length === 0) { + return; } - if (!wasInViewport && !this.isInViewport) { - triggerCallbackArray(this.callbacks[ENTERVIEWPORT], event); - triggerCallbackArray(this.callbacks[EXITVIEWPORT], event); + listenerToTriggerListI = listeners.length; + while (listenerToTriggerListI--) { + listener = listeners[listenerToTriggerListI]; + listener.callback.call(self, event, self); + if (listener.isOne) { + listeners.splice(listenerToTriggerListI, 1); + } } } - if (!this.isFullyInViewport && wasFullyInViewport) { - triggerCallbackArray(this.callbacks[PARTIALLYEXITVIEWPORT], event); - } - if (!this.isInViewport && wasInViewport) { - triggerCallbackArray(this.callbacks[EXITVIEWPORT], event); - } - if (this.isInViewport !== wasInViewport) { - triggerCallbackArray(this.callbacks[VISIBILITYCHANGE], event); - } - if (needToTriggerStateChange) { - needToTriggerStateChange = false; - triggerCallbackArray(this.callbacks[STATECHANGE], event); - } - wasInViewport = this.isInViewport; - wasFullyInViewport = this.isFullyInViewport; - wasAboveViewport = this.isAboveViewport; - wasBelowViewport = this.isBelowViewport; - }; - this.recalculateLocation = function () { - if (this.locked) { - return; - } - var previousTop = this.top; - var previousBottom = this.bottom; - if (this.watchItem.nodeName) { - // a dom element - var cachedDisplay = this.watchItem.style.display; - if (cachedDisplay === 'none') { - this.watchItem.style.display = ''; + this.triggerCallbacks = function triggerCallbacks(event) { + if (this.isInViewport && !wasInViewport) { + triggerCallbackArray(this.callbacks[constants_js_1.ENTERVIEWPORT], event); } - var containerOffset = 0; - var container = this.container; - while (container.containerWatcher) { - containerOffset += - container.containerWatcher.top - - container.containerWatcher.container.viewportTop; - container = container.containerWatcher.container; + if (this.isFullyInViewport && !wasFullyInViewport) { + triggerCallbackArray(this.callbacks[constants_js_1.FULLYENTERVIEWPORT], event); } - var boundingRect = this.watchItem.getBoundingClientRect(); - this.top = boundingRect.top + this.container.viewportTop - containerOffset; - this.bottom = boundingRect.bottom + this.container.viewportTop - containerOffset; - if (cachedDisplay === 'none') { - this.watchItem.style.display = cachedDisplay; + if (this.isAboveViewport !== wasAboveViewport && + this.isBelowViewport !== wasBelowViewport) { + triggerCallbackArray(this.callbacks[constants_js_1.VISIBILITYCHANGE], event); + // if you skip completely past this element + if (!wasFullyInViewport && !this.isFullyInViewport) { + triggerCallbackArray(this.callbacks[constants_js_1.FULLYENTERVIEWPORT], event); + triggerCallbackArray(this.callbacks[constants_js_1.PARTIALLYEXITVIEWPORT], event); + } + if (!wasInViewport && !this.isInViewport) { + triggerCallbackArray(this.callbacks[constants_js_1.ENTERVIEWPORT], event); + triggerCallbackArray(this.callbacks[constants_js_1.EXITVIEWPORT], event); + } } - } - else if (this.watchItem === +this.watchItem) { - // number - if (this.watchItem > 0) { - this.top = this.bottom = this.watchItem; + if (!this.isFullyInViewport && wasFullyInViewport) { + triggerCallbackArray(this.callbacks[constants_js_1.PARTIALLYEXITVIEWPORT], event); + } + if (!this.isInViewport && wasInViewport) { + triggerCallbackArray(this.callbacks[constants_js_1.EXITVIEWPORT], event); + } + if (this.isInViewport !== wasInViewport) { + triggerCallbackArray(this.callbacks[constants_js_1.VISIBILITYCHANGE], event); + } + if (needToTriggerStateChange) { + needToTriggerStateChange = false; + triggerCallbackArray(this.callbacks[constants_js_1.STATECHANGE], event); + } + wasInViewport = this.isInViewport; + wasFullyInViewport = this.isFullyInViewport; + wasAboveViewport = this.isAboveViewport; + wasBelowViewport = this.isBelowViewport; + }; + this.recalculateLocation = function () { + if (this.locked) { + return; + } + var previousTop = this.top; + var previousBottom = this.bottom; + if (this.watchItem.nodeName) { + // a dom element + var cachedDisplay = this.watchItem.style.display; + if (cachedDisplay === 'none') { + this.watchItem.style.display = ''; + } + var containerOffset = 0; + var container = this.container; + while (container.containerWatcher) { + containerOffset += + container.containerWatcher.top - + container.containerWatcher.container.viewportTop; + container = container.containerWatcher.container; + } + var boundingRect = this.watchItem.getBoundingClientRect(); + this.top = boundingRect.top + this.container.viewportTop - containerOffset; + this.bottom = boundingRect.bottom + this.container.viewportTop - containerOffset; + if (cachedDisplay === 'none') { + this.watchItem.style.display = cachedDisplay; + } + } + else if (this.watchItem === +this.watchItem) { + // number + if (this.watchItem > 0) { + this.top = this.bottom = this.watchItem; + } + else { + this.top = this.bottom = this.container.documentHeight - this.watchItem; + } } else { - this.top = this.bottom = this.container.documentHeight - this.watchItem; + // an object with a top and bottom property + this.top = this.watchItem.top; + this.bottom = this.watchItem.bottom; } + this.top -= this.offsets.top; + this.bottom += this.offsets.bottom; + this.height = this.bottom - this.top; + if ((previousTop !== undefined || previousBottom !== undefined) && + (this.top !== previousTop || this.bottom !== previousBottom)) { + triggerCallbackArray(this.callbacks[constants_js_1.LOCATIONCHANGE], undefined); + } + }; + this.recalculateLocation(); + this.update(); + wasInViewport = this.isInViewport; + wasFullyInViewport = this.isFullyInViewport; + wasAboveViewport = this.isAboveViewport; + wasBelowViewport = this.isBelowViewport; + } + Watcher.prototype.on = function (event, callback, isOne) { + if (isOne === void 0) { isOne = false; } + // trigger the event if it applies to the element right now. + switch (true) { + case event === constants_js_1.VISIBILITYCHANGE && !this.isInViewport && this.isAboveViewport: + case event === constants_js_1.ENTERVIEWPORT && this.isInViewport: + case event === constants_js_1.FULLYENTERVIEWPORT && this.isFullyInViewport: + case event === constants_js_1.EXITVIEWPORT && this.isAboveViewport && !this.isInViewport: + case event === constants_js_1.PARTIALLYEXITVIEWPORT && this.isInViewport && this.isAboveViewport: + callback.call(this, this); + if (isOne) { + return; + } } - else { - // an object with a top and bottom property - this.top = this.watchItem.top; - this.bottom = this.watchItem.bottom; + if (this.callbacks[event]) { + this.callbacks[event].push({ callback: callback, isOne: isOne }); } - this.top -= this.offsets.top; - this.bottom += this.offsets.bottom; - this.height = this.bottom - this.top; - if ((previousTop !== undefined || previousBottom !== undefined) && - (this.top !== previousTop || this.bottom !== previousBottom)) { - triggerCallbackArray(this.callbacks[LOCATIONCHANGE], undefined); + else { + throw new Error('Tried to add a scroll monitor listener of type ' + + event + + '. Your options are: ' + + constants_js_1.eventTypes.join(', ')); } }; - this.recalculateLocation(); - this.update(); - wasInViewport = this.isInViewport; - wasFullyInViewport = this.isFullyInViewport; - wasAboveViewport = this.isAboveViewport; - wasBelowViewport = this.isBelowViewport; - } - Watcher.prototype.on = function (event, callback, isOne) { - if (isOne === void 0) { isOne = false; } - // trigger the event if it applies to the element right now. - switch (true) { - case event === VISIBILITYCHANGE && !this.isInViewport && this.isAboveViewport: - case event === ENTERVIEWPORT && this.isInViewport: - case event === FULLYENTERVIEWPORT && this.isFullyInViewport: - case event === EXITVIEWPORT && this.isAboveViewport && !this.isInViewport: - case event === PARTIALLYEXITVIEWPORT && this.isInViewport && this.isAboveViewport: - callback.call(this, this); - if (isOne) { - return; - } - } - if (this.callbacks[event]) { - this.callbacks[event].push({ callback: callback, isOne: isOne }); - } - else { - throw new Error('Tried to add a scroll monitor listener of type ' + - event + - '. Your options are: ' + - eventTypes.join(', ')); - } - }; - Watcher.prototype.off = function (event, callback) { - if (this.callbacks[event]) { - for (var i = 0, item; (item = this.callbacks[event][i]); i++) { - if (item.callback === callback) { - this.callbacks[event].splice(i, 1); - break; + Watcher.prototype.off = function (event, callback) { + if (this.callbacks[event]) { + for (var i = 0, item; (item = this.callbacks[event][i]); i++) { + if (item.callback === callback) { + this.callbacks[event].splice(i, 1); + break; + } } } - } - else { - throw new Error('Tried to remove a scroll monitor listener of type ' + - event + - '. Your options are: ' + - eventTypes.join(', ')); - } - }; - Watcher.prototype.one = function (event, callback) { - this.on(event, callback, true); - }; - Watcher.prototype.recalculateSize = function () { - if (this.watchItem instanceof HTMLElement) { - this.height = this.watchItem.offsetHeight + this.offsets.top + this.offsets.bottom; - this.bottom = this.top + this.height; - } - }; - Watcher.prototype.update = function () { - this.isAboveViewport = this.top < this.container.viewportTop; - this.isBelowViewport = this.bottom > this.container.viewportBottom; - this.isInViewport = - this.top < this.container.viewportBottom && this.bottom > this.container.viewportTop; - this.isFullyInViewport = - (this.top >= this.container.viewportTop && - this.bottom <= this.container.viewportBottom) || - (this.isAboveViewport && this.isBelowViewport); - }; - Watcher.prototype.destroy = function () { - var index = this.container.watchers.indexOf(this), self = this; - this.container.watchers.splice(index, 1); - self.callbacks = {}; - }; - // prevent recalculating the element location - Watcher.prototype.lock = function () { - this.locked = true; - }; - Watcher.prototype.unlock = function () { - this.locked = false; - }; - return Watcher; -}()); -export { Watcher }; -var eventHandlerFactory = function (type) { - return function (callback, isOne) { - if (isOne === void 0) { isOne = false; } - this.on.call(this, type, callback, isOne); + else { + throw new Error('Tried to remove a scroll monitor listener of type ' + + event + + '. Your options are: ' + + constants_js_1.eventTypes.join(', ')); + } + }; + Watcher.prototype.one = function (event, callback) { + this.on(event, callback, true); + }; + Watcher.prototype.recalculateSize = function () { + if (this.watchItem instanceof HTMLElement) { + this.height = this.watchItem.offsetHeight + this.offsets.top + this.offsets.bottom; + this.bottom = this.top + this.height; + } + }; + Watcher.prototype.update = function () { + this.isAboveViewport = this.top < this.container.viewportTop; + this.isBelowViewport = this.bottom > this.container.viewportBottom; + this.isInViewport = + this.top < this.container.viewportBottom && this.bottom > this.container.viewportTop; + this.isFullyInViewport = + (this.top >= this.container.viewportTop && + this.bottom <= this.container.viewportBottom) || + (this.isAboveViewport && this.isBelowViewport); + }; + Watcher.prototype.destroy = function () { + var index = this.container.watchers.indexOf(this), self = this; + this.container.watchers.splice(index, 1); + self.callbacks = {}; + }; + // prevent recalculating the element location + Watcher.prototype.lock = function () { + this.locked = true; + }; + Watcher.prototype.unlock = function () { + this.locked = false; + }; + return Watcher; + }()); + exports.Watcher = Watcher; + var eventHandlerFactory = function (type) { + return function (callback, isOne) { + if (isOne === void 0) { isOne = false; } + this.on.call(this, type, callback, isOne); + }; }; -}; -for (var i = 0, j = eventTypes.length; i < j; i++) { - var type = eventTypes[i]; - Watcher.prototype[type] = eventHandlerFactory(type); -} + for (var i = 0, j = constants_js_1.eventTypes.length; i < j; i++) { + var type = constants_js_1.eventTypes[i]; + Watcher.prototype[type] = eventHandlerFactory(type); + } +}); //# sourceMappingURL=watcher.js.map \ No newline at end of file diff --git a/dist/src/watcher.js.map b/dist/src/watcher.js.map index 8a160c6..7b4e05f 100644 --- a/dist/src/watcher.js.map +++ b/dist/src/watcher.js.map @@ -1 +1 @@ -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;QACD,wBAAM,GAAN;YACI,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACxB,CAAC;QACL,cAAC;IAAD,CAAC,AA9PD,IA8PC;IA9PY,0BAAO;IAgQpB,IAAI,mBAAmB,GAAG,UAAU,IAAe;QAC/C,OAAO,UAAU,QAAkB,EAAE,KAAa;YAAb,sBAAA,EAAA,aAAa;YAC9C,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC9C,CAAC,CAAC;IACN,CAAC,CAAC;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,yBAAU,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QAC/C,IAAI,IAAI,GAAG,yBAAU,CAAC,CAAC,CAAC,CAAC;QACzB,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;KACvD"} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index df8424c..7dc1acf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "module": "es6", + "module": "umd", "noImplicitAny": true, "preserveConstEnums": true, "sourceMap": true,