From 8ad90f3133a8d9b0284c781dd74bf68861c3c8f4 Mon Sep 17 00:00:00 2001 From: Nicolas Langle Date: Thu, 25 Apr 2024 12:00:22 +0200 Subject: [PATCH] fix (package.json): packages version --- build/OneLoop.js | 58 ++++++++++++++++++++++++------------------------ package.json | 11 +++++---- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/build/OneLoop.js b/build/OneLoop.js index 65a62fd..6684504 100644 --- a/build/OneLoop.js +++ b/build/OneLoop.js @@ -380,7 +380,7 @@ var getElements = (element, context) => typeof element === 'string' ? : element.length >= 0 ? element : [element]; -const instances$2 = []; +const instances = []; class ThrottledEvent extends MainLoopEntry { constructor(target, eventType, name) { @@ -417,10 +417,10 @@ class ThrottledEvent extends MainLoopEntry { } destroy() { - const index = instances$2.indexOf(this); + const index = instances.indexOf(this); if (index > -1) { - instances$2.splice(index, 1); + instances.splice(index, 1); } this._target.removeEventListener(this._eventType, this._onEvent); @@ -476,25 +476,25 @@ class ThrottledEvent extends MainLoopEntry { name = name || ''; - for (let i = 0; i < instances$2.length; i++) { - let instance = instances$2[i]; + for (let i = 0; i < instances.length; i++) { + let instance = instances[i]; if (instance._eventType === eventType && instance._target === target && instance._name === name) { - found = instances$2[i]; + found = instances[i]; break } } if (!found) { found = new ThrottledEvent(target, eventType, name); - instances$2.push(found); + instances.push(found); } return found } static destroy() { - while (instances$2[0]) { - instances$2[0].destroy(); + while (instances[0]) { + instances[0].destroy(); } } } @@ -716,7 +716,7 @@ function getMinOrMax(v) { const instances$1 = []; let autoRefreshTimer = null, - resize$1 = null, + resize = null, scroll = null; class ScrollObserver extends MainLoopEntry { @@ -731,10 +731,10 @@ class ScrollObserver extends MainLoopEntry { this._needsUpdate = true; this._lastSize = getDocumentScrollSize(); - resize$1 = resize$1 || new ThrottledEvent(window, 'resize'); + resize = resize || new ThrottledEvent(window, 'resize'); scroll = scroll || new ThrottledEvent(window, 'scroll'); - resize$1.add('resize', this._onResize); + resize.add('resize', this._onResize); scroll.add('scrollstart', this._onScroll); instances$1.push(this); @@ -751,11 +751,11 @@ class ScrollObserver extends MainLoopEntry { if (instances$1.length === 0) { ScrollObserver.stopAutoRefresh(); - resize$1.destroy(); + resize.destroy(); scroll.destroy(); - resize$1 = scroll = null; + resize = scroll = null; } else { - resize$1.remove('resize', this._onResize); + resize.remove('resize', this._onResize); scroll.remove('scrollstart', this._onScroll); } } @@ -895,10 +895,10 @@ class ScrollObserver extends MainLoopEntry { /* eslint-disable no-empty-character-class */ const - instances = [], + instances$2 = [], specialCharRegExp = /(((?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c[\ude32-\ude3a]|[\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])((\u200D(\u2640|\u2642)\uFE0F)|[]))|&([a-zA-Z]{2,6}|#[0-9]{2,5});|<|>)/g, whiteCharRegExp = /(\s)/; -let resize = null; +let resize$1 = null; class SplittedText { constructor(element, options) { @@ -908,35 +908,35 @@ class SplittedText { this._element = element; this._onResize = this.split.bind(this); - if (!resize) { - resize = new ThrottledEvent(window, 'resize'); + if (!resize$1) { + resize$1 = new ThrottledEvent(window, 'resize'); } if (this.autoSplit) { this.split(); } - instances.push(this); + instances$2.push(this); } destroy() { - const index = instances.indexOf(this); + const index = instances$2.indexOf(this); if (index > -1) { this.restore(); - instances.splice(index, 1); + instances$2.splice(index, 1); - if (!instances.length) { - resize.destroy(); - resize = null; + if (!instances$2.length) { + resize$1.destroy(); + resize$1 = null; } } } restore() { this._element.innerHTML = this._originalInnerHTML; - resize.remove('resize', this._onResize); + resize$1.remove('resize', this._onResize); return this } @@ -964,7 +964,7 @@ class SplittedText { html = '', lastOffsetTop = children[0].offsetTop; - resize.add('resize', this._onResize); + resize$1.add('resize', this._onResize); for (let i = 0; i < children.length; i++) { const @@ -1108,8 +1108,8 @@ function wrapByWord(element, wrapper) { // static // ---- SplittedText.destroy = function() { - while (instances[0]) { - instances[0].destroy(); + while (instances$2[0]) { + instances$2[0].destroy(); } }; diff --git a/package.json b/package.json index 06aff90..3182c26 100644 --- a/package.json +++ b/package.json @@ -35,12 +35,11 @@ "splitted-text", "throttled-event" ], - "dependencies": {}, "devDependencies": { - "concurrently": "^5.3.0", - "eslint": "^8.36.0", - "http-server": "^0.12.3", - "rollup": "^2.23.1", - "rollup-plugin-uglify": "^6.0.4" + "concurrently": "5.3.0", + "eslint": "8.36.0", + "http-server": "0.12.3", + "rollup": "2.23.1", + "rollup-plugin-uglify": "6.0.4" } }