Skip to content

Commit

Permalink
fix (package.json): packages version
Browse files Browse the repository at this point in the history
  • Loading branch information
n-langle committed Apr 25, 2024
1 parent 52ef82f commit 8ad90f3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 35 deletions.
58 changes: 29 additions & 29 deletions build/OneLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
}
}
}
Expand Down Expand Up @@ -716,7 +716,7 @@ function getMinOrMax(v) {
const
instances$1 = [];
let autoRefreshTimer = null,
resize$1 = null,
resize = null,
scroll = null;

class ScrollObserver extends MainLoopEntry {
Expand All @@ -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);
Expand All @@ -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);
}
}
Expand Down Expand Up @@ -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) {
Expand All @@ -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
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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();
}
};

Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 8ad90f3

Please sign in to comment.