Initial
This commit is contained in:
21
resources/app/node_modules/@pixi/runner/LICENSE
generated
vendored
Normal file
21
resources/app/node_modules/@pixi/runner/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2013-2023 Mathew Groves, Chad Engler
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
103
resources/app/node_modules/@pixi/runner/lib/Runner.js
generated
vendored
Normal file
103
resources/app/node_modules/@pixi/runner/lib/Runner.js
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
"use strict";
|
||||
class Runner {
|
||||
/**
|
||||
* @param {string} name - The function name that will be executed on the listeners added to this Runner.
|
||||
*/
|
||||
constructor(name) {
|
||||
this.items = [], this._name = name, this._aliasCount = 0;
|
||||
}
|
||||
/* eslint-disable jsdoc/require-param, jsdoc/check-param-names */
|
||||
/**
|
||||
* Dispatch/Broadcast Runner to all listeners added to the queue.
|
||||
* @param {...any} params - (optional) parameters to pass to each listener
|
||||
*/
|
||||
/* eslint-enable jsdoc/require-param, jsdoc/check-param-names */
|
||||
emit(a0, a1, a2, a3, a4, a5, a6, a7) {
|
||||
if (arguments.length > 8)
|
||||
throw new Error("max arguments reached");
|
||||
const { name, items } = this;
|
||||
this._aliasCount++;
|
||||
for (let i = 0, len = items.length; i < len; i++)
|
||||
items[i][name](a0, a1, a2, a3, a4, a5, a6, a7);
|
||||
return items === this.items && this._aliasCount--, this;
|
||||
}
|
||||
ensureNonAliasedItems() {
|
||||
this._aliasCount > 0 && this.items.length > 1 && (this._aliasCount = 0, this.items = this.items.slice(0));
|
||||
}
|
||||
/**
|
||||
* Add a listener to the Runner
|
||||
*
|
||||
* Runners do not need to have scope or functions passed to them.
|
||||
* All that is required is to pass the listening object and ensure that it has contains a function that has the same name
|
||||
* as the name provided to the Runner when it was created.
|
||||
*
|
||||
* E.g. A listener passed to this Runner will require a 'complete' function.
|
||||
*
|
||||
* ```js
|
||||
* import { Runner } from '@pixi/runner';
|
||||
*
|
||||
* const complete = new Runner('complete');
|
||||
* ```
|
||||
*
|
||||
* The scope used will be the object itself.
|
||||
* @param {any} item - The object that will be listening.
|
||||
*/
|
||||
add(item) {
|
||||
return item[this._name] && (this.ensureNonAliasedItems(), this.remove(item), this.items.push(item)), this;
|
||||
}
|
||||
/**
|
||||
* Remove a single listener from the dispatch queue.
|
||||
* @param {any} item - The listener that you would like to remove.
|
||||
*/
|
||||
remove(item) {
|
||||
const index = this.items.indexOf(item);
|
||||
return index !== -1 && (this.ensureNonAliasedItems(), this.items.splice(index, 1)), this;
|
||||
}
|
||||
/**
|
||||
* Check to see if the listener is already in the Runner
|
||||
* @param {any} item - The listener that you would like to check.
|
||||
*/
|
||||
contains(item) {
|
||||
return this.items.includes(item);
|
||||
}
|
||||
/** Remove all listeners from the Runner */
|
||||
removeAll() {
|
||||
return this.ensureNonAliasedItems(), this.items.length = 0, this;
|
||||
}
|
||||
/** Remove all references, don't use after this. */
|
||||
destroy() {
|
||||
this.removeAll(), this.items.length = 0, this._name = "";
|
||||
}
|
||||
/**
|
||||
* `true` if there are no this Runner contains no listeners
|
||||
* @readonly
|
||||
*/
|
||||
get empty() {
|
||||
return this.items.length === 0;
|
||||
}
|
||||
/**
|
||||
* The name of the runner.
|
||||
* @type {string}
|
||||
*/
|
||||
get name() {
|
||||
return this._name;
|
||||
}
|
||||
}
|
||||
Object.defineProperties(Runner.prototype, {
|
||||
/**
|
||||
* Alias for `emit`
|
||||
* @memberof PIXI.Runner#
|
||||
* @method dispatch
|
||||
* @see PIXI.Runner#emit
|
||||
*/
|
||||
dispatch: { value: Runner.prototype.emit },
|
||||
/**
|
||||
* Alias for `emit`
|
||||
* @memberof PIXI.Runner#
|
||||
* @method run
|
||||
* @see PIXI.Runner#emit
|
||||
*/
|
||||
run: { value: Runner.prototype.emit }
|
||||
});
|
||||
exports.Runner = Runner;
|
||||
//# sourceMappingURL=Runner.js.map
|
||||
1
resources/app/node_modules/@pixi/runner/lib/Runner.js.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/runner/lib/Runner.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
104
resources/app/node_modules/@pixi/runner/lib/Runner.mjs
generated
vendored
Normal file
104
resources/app/node_modules/@pixi/runner/lib/Runner.mjs
generated
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
class Runner {
|
||||
/**
|
||||
* @param {string} name - The function name that will be executed on the listeners added to this Runner.
|
||||
*/
|
||||
constructor(name) {
|
||||
this.items = [], this._name = name, this._aliasCount = 0;
|
||||
}
|
||||
/* eslint-disable jsdoc/require-param, jsdoc/check-param-names */
|
||||
/**
|
||||
* Dispatch/Broadcast Runner to all listeners added to the queue.
|
||||
* @param {...any} params - (optional) parameters to pass to each listener
|
||||
*/
|
||||
/* eslint-enable jsdoc/require-param, jsdoc/check-param-names */
|
||||
emit(a0, a1, a2, a3, a4, a5, a6, a7) {
|
||||
if (arguments.length > 8)
|
||||
throw new Error("max arguments reached");
|
||||
const { name, items } = this;
|
||||
this._aliasCount++;
|
||||
for (let i = 0, len = items.length; i < len; i++)
|
||||
items[i][name](a0, a1, a2, a3, a4, a5, a6, a7);
|
||||
return items === this.items && this._aliasCount--, this;
|
||||
}
|
||||
ensureNonAliasedItems() {
|
||||
this._aliasCount > 0 && this.items.length > 1 && (this._aliasCount = 0, this.items = this.items.slice(0));
|
||||
}
|
||||
/**
|
||||
* Add a listener to the Runner
|
||||
*
|
||||
* Runners do not need to have scope or functions passed to them.
|
||||
* All that is required is to pass the listening object and ensure that it has contains a function that has the same name
|
||||
* as the name provided to the Runner when it was created.
|
||||
*
|
||||
* E.g. A listener passed to this Runner will require a 'complete' function.
|
||||
*
|
||||
* ```js
|
||||
* import { Runner } from '@pixi/runner';
|
||||
*
|
||||
* const complete = new Runner('complete');
|
||||
* ```
|
||||
*
|
||||
* The scope used will be the object itself.
|
||||
* @param {any} item - The object that will be listening.
|
||||
*/
|
||||
add(item) {
|
||||
return item[this._name] && (this.ensureNonAliasedItems(), this.remove(item), this.items.push(item)), this;
|
||||
}
|
||||
/**
|
||||
* Remove a single listener from the dispatch queue.
|
||||
* @param {any} item - The listener that you would like to remove.
|
||||
*/
|
||||
remove(item) {
|
||||
const index = this.items.indexOf(item);
|
||||
return index !== -1 && (this.ensureNonAliasedItems(), this.items.splice(index, 1)), this;
|
||||
}
|
||||
/**
|
||||
* Check to see if the listener is already in the Runner
|
||||
* @param {any} item - The listener that you would like to check.
|
||||
*/
|
||||
contains(item) {
|
||||
return this.items.includes(item);
|
||||
}
|
||||
/** Remove all listeners from the Runner */
|
||||
removeAll() {
|
||||
return this.ensureNonAliasedItems(), this.items.length = 0, this;
|
||||
}
|
||||
/** Remove all references, don't use after this. */
|
||||
destroy() {
|
||||
this.removeAll(), this.items.length = 0, this._name = "";
|
||||
}
|
||||
/**
|
||||
* `true` if there are no this Runner contains no listeners
|
||||
* @readonly
|
||||
*/
|
||||
get empty() {
|
||||
return this.items.length === 0;
|
||||
}
|
||||
/**
|
||||
* The name of the runner.
|
||||
* @type {string}
|
||||
*/
|
||||
get name() {
|
||||
return this._name;
|
||||
}
|
||||
}
|
||||
Object.defineProperties(Runner.prototype, {
|
||||
/**
|
||||
* Alias for `emit`
|
||||
* @memberof PIXI.Runner#
|
||||
* @method dispatch
|
||||
* @see PIXI.Runner#emit
|
||||
*/
|
||||
dispatch: { value: Runner.prototype.emit },
|
||||
/**
|
||||
* Alias for `emit`
|
||||
* @memberof PIXI.Runner#
|
||||
* @method run
|
||||
* @see PIXI.Runner#emit
|
||||
*/
|
||||
run: { value: Runner.prototype.emit }
|
||||
});
|
||||
export {
|
||||
Runner
|
||||
};
|
||||
//# sourceMappingURL=Runner.mjs.map
|
||||
1
resources/app/node_modules/@pixi/runner/lib/Runner.mjs.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/runner/lib/Runner.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
resources/app/node_modules/@pixi/runner/lib/index.js
generated
vendored
Normal file
4
resources/app/node_modules/@pixi/runner/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
var Runner = require("./Runner.js");
|
||||
exports.Runner = Runner.Runner;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
resources/app/node_modules/@pixi/runner/lib/index.js.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/runner/lib/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
||||
5
resources/app/node_modules/@pixi/runner/lib/index.mjs
generated
vendored
Normal file
5
resources/app/node_modules/@pixi/runner/lib/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Runner } from "./Runner.mjs";
|
||||
export {
|
||||
Runner
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
resources/app/node_modules/@pixi/runner/lib/index.mjs.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/runner/lib/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
||||
34
resources/app/node_modules/@pixi/runner/package.json
generated
vendored
Normal file
34
resources/app/node_modules/@pixi/runner/package.json
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "@pixi/runner",
|
||||
"version": "7.4.2",
|
||||
"main": "lib/index.js",
|
||||
"module": "lib/index.mjs",
|
||||
"types": "lib/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./lib/index.d.ts",
|
||||
"default": "./lib/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./lib/index.d.ts",
|
||||
"default": "./lib/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "A simple alternative to events and signals with an emphasis on performance.",
|
||||
"author": "Mat Groves",
|
||||
"homepage": "http://pixijs.com/",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pixijs/pixijs.git"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"*.d.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user