diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1f0532a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,27 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = crlf +insert_final_newline = true + +# Matches multiple files with brace expansion notation +# Set default charset +[*.{js,json,ts}] +charset = utf-8 + +# 4 space indentation +[*.{ts}] +indent_style = space +indent_size = 4 + +# 3 space indentation +[*.{js}] +indent_style = space +indent_size = 3 + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 3 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1540864 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,17 @@ +name: workflow +on: [push] +jobs: + job: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v1 + - name: Prepare + run: npm ci + - name: Lint + uses: saby/typescript@rc-21.2000 + with: + token: ${{ secrets.GITHUB_TOKEN }} + pattern: '*.ts' + - name: Build + run: npm run build diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8cd42b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +.settings +/node_modules diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..26ab259 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +registry=http://npmregistry.sbis.ru:80/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7e0969f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM node:lts-alpine +MAINTAINER Zimichev Dmitri + +RUN mkdir -p /var/task/ + +WORKDIR /var/task + +COPY package.json package-lock.json /var/task/ +RUN npm ci --production + +COPY entrypoint.sh index.js /var/task/ + +RUN chmod +x /var/task/entrypoint.sh +ENTRYPOINT ["sh", "/var/task/entrypoint.sh"] \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..2ff0c20 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,11 @@ +@Library('pipeline') _ + +def version = '24.6200' + +if (prepare_run(version)) { + node (get_label()) { + checkout_pipeline("rc-${version}") + run_branch = load '/home/sbis/jenkins_pipeline/platforma/branch/run_branch' + run_branch.execute('typescript', version) + } +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..14acc57 --- /dev/null +++ b/README.md @@ -0,0 +1,163 @@ +Ответственные: +Зайцев А.С. (Разработка) +Бегунова И.П.(Функциональное тестирование) + +# Saby's environment for TypeScript + +This environment provides basic setup for [TypeScript](https://www.typescriptlang.org/) under Saby such as recommended version, preferred configuration file and this instruction. + +## How to include in your own project + +**Firstly**. Your project must [follow npm architecture](https://docs.npmjs.com/cli/init). You need to [Node.js](https://nodejs.org/) being installed on your computer. The easiest first step to start is execute this command: +```bash +npm init +``` +You have to answer several simple questions. After that you'll have the new file `package.json` in your project. + +**Secondly**. Add dependency in your `package.json` file at `dependencies` section like this: +```json +"devDependencies": { + "saby-typescript": "git+https://git.sbis.ru:saby/TypeScript.git#rc-xx.yyyy" +} +``` +You should replace `xx.yyyy` with actual version. For example, `20.4000`. + +**Thirdly**. Also add a pair of scripts at `scripts` section like this: +```json +"scripts": { + "build": "saby-typescript --install", + "compile": "saby-typescript --compiler" + "lint": "saby-typescript --lint" +} +``` +What are these scripts doing? + +- `build` - builds your project infrastructure +- `compile` - compiles TypeScript files +- `lint` - runs static analysis + +It's almost ready now! + +**Fourthly**. Just install your package dependencies using this command: +```bash +npm install +``` + +Also build your environment: +```bash +npm run build +``` + +## Advanced usage + +You can use additional command line arguments to set this tool up more precisely. + +Arguments to use with `install`: + +- `mode=production|development` - provides the installation mode: + + * `production` (default) is common mode for build an application; + * `development` is for local development which provides more opportunities such as special types for unit testing framework; + +- `tsconfig` - provides specific target file name for *tsconfig.json* (e.g. *--tsconfig=src/tsconfig.json*); +- `tslib` - provides specific target file name for *tslib.js* (e.g. *--tslib=src/tslib.js*); +- `tslint` - provides specific target file name for *tslint.json* (e.g. *--tslint=src/tslint.json*). + +## How to use + +You've got new file `tsconfig.json` in your project as a result of previous command execute. This file is necessary to compile your `.ts` files to `.js` files. You can find out more information about `tsconfig.json` on [TypeScript site](https://www.typescriptlang.org/). + +You need this file only for check that is your code compiles successfully. We strongly recommend do not change this file because your settings shouldn't be different with Saby's resources [build tool](https://git.sbis.ru/saby/Builder) which uses the same ones. In other words, you can make changes which add more restrictions but you can't make changes which add new features, experimental features or switch to another version of `tslib.js` file. + +Also you got file `tlint.json` in your project which contains rules for static check if your files are satisfied for code writing standards. Many IDEs are support those checks. + +Let's do a simple test. Just create silly module `test.ts`, for example: +```typescript +class Foo { + _foo: string = 'Foo'; +} + +export class Bar extends Foo { + _bar: string = 'Bar'; +} +``` + +Now it's simply to compile your project manually using command line: +```bash +npm run compile +``` + +It creates a new file `test.js` next to `test.ts` which is an AMD module: +```javascript +define(["require", "exports", "tslib"], function (require, exports, tslib_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var Foo = /** @class */ (function () { + function Foo() { + this._foo = 'Foo'; + } + return Foo; + }()); + var Bar = /** @class */ (function (_super) { + tslib_1.__extends(Bar, _super); + function Bar() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this._bar = 'Bar'; + return _this; + } + return Bar; + }(Foo)); + exports.Bar = Bar; +}); +``` + +Of course you can setup an IDE you prefer to your convenience. It allows you compile `.ts` files automatically every time you change them. +For example, if you use WebStorm IDE you can read its own [developer's manual](https://www.jetbrains.com/help/webstorm/typescript-support.html). + +## Tips and tricks + +### How to use another npm package as dependency + +Please read the documentation about [module resolution](https://www.typescriptlang.org/docs/handbook/module-resolution.html) principles. +Basically you have two strategies to use code from your dependencies with non-relative imports: + +1. For 'classic strategy' you have to create a symlink to this module in the root of your project. Name of the link should be the same as the module folder in [Saby project](https://git.sbis.ru/saby). For example, to import the same dependency [saby-types](https://git.sbis.ru/saby/Types), make a symlink to `node-modules/saby-types` folder as `Types` in the root of your project and then use code like this: + + ```typescript + import Record from 'Types/entity'; + ``` + +1. For 'Node strategy' just use the name of the dependent npm package. For example, if you depend on [saby-types](https://git.sbis.ru/saby/Types): + + ```typescript + import Record from 'saby-types/entity'; + ``` + +### How to import AMD module into TypeScript module? + +Use `import` as usual: + +```typescript +import * as someAmdModule from 'NameOf/Some/Amd/Module'; +``` + +Or with directive with [require()](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#export--and-import--require): + +```typescript +import someAmdModule = require('NameOf/Some/Amd/Module'); +``` + +In common case this imported module will be like "black box" for TypeScript interpreter so you should define a type of it if you want to work well with it. + +If you plan to create inherited class from imported AMD class you will possible have a problems with static class members. The inheritance chain with only TypeScript classes is preferred. + +## Programmatic usage + +The next modules are avaliable: +- *'saby-typescript/lib/compiler'* - alias for 'typescript' +- *'saby-typescript/lib/lint'* - alias for 'tslint' + +## Any questions? + +You can ask them [in our community](https://wi.sbis.ru). Thank you! + diff --git a/Typescript/Typescript.s3mod b/Typescript/Typescript.s3mod new file mode 100644 index 0000000..cb6ad66 --- /dev/null +++ b/Typescript/Typescript.s3mod @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Typescript/tslib.js b/Typescript/tslib.js new file mode 100644 index 0000000..0b23a60 --- /dev/null +++ b/Typescript/tslib.js @@ -0,0 +1,425 @@ +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +/* eslint-disable */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + }; + + __runInitializers = function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; + }; + + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + + __setFunctionName = function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + }; + + __addDisposableResource = function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; + + __disposeResources = function (env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__esDecorate", __esDecorate); + exporter("__runInitializers", __runInitializers); + exporter("__propKey", __propKey); + exporter("__setFunctionName", __setFunctionName); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); diff --git a/Typescript/types/pixi-react/index.d.ts b/Typescript/types/pixi-react/index.d.ts new file mode 100644 index 0000000..bfcf41d --- /dev/null +++ b/Typescript/types/pixi-react/index.d.ts @@ -0,0 +1,539 @@ +// типы для библиотеки pixi-react +import * as PIXI from 'pixi'; +import * as React from 'react'; + +// Reconciler API +interface Reconciler { + updateContainerAtExpirationTime( + element: any, + container: any, + parentComponent: React.Component | null | undefined, + expirationTime: any, + callback: () => void | null | undefined + ): any; + createContainer(containerInfo: any, isConcurrent: boolean, hydrate: boolean): any; + updateContainer( + element: any, + container: any, + parentComponent: React.Component | null | undefined, + callback: () => void | null | undefined + ): any; + flushRoot(root: any, expirationTime: any): void; + requestWork(root: any, expirationTime: any): void; + computeUniqueAsyncExpiration(): any; + batchedUpdates(fn: () => A): A; + unbatchedUpdates(fn: () => A): A; + deferredUpdates(fn: () => A): A; + syncUpdates(fn: () => A): A; + interactiveUpdates(fn: () => A): A; + flushInteractiveUpdates(): void; + flushControlled(fn: () => any): void; + flushSync(fn: () => A): A; + getPublicRootInstance(container: any): React.Component | PublicInstance | null; + findHostInstance(component: object): PublicInstance | null; + findHostInstanceWithNoPortals(component: any): PublicInstance | null; + injectIntoDevTools(devToolsConfig: any): boolean; +} + +interface ReconcilerConfig { + getRootHostContext(rootContainerInstance: any): any; + getChildHostContext(): any; + getChildHostContextForEventComponent(parentHostContext: any): any; + getPublicInstance(getPublicInstance: any): any; + prepareForCommit(): void; + resetAfterCommit(): void; + createInstance(...args: any[]): any; + hideInstance(ins: any): void; + unhideInstance(ins: any, props: any): void; + appendInitialChild(...args: any[]): any; + finalizeInitialChildren(doFinalize: boolean): boolean; + prepareUpdate(...args: any): any; + shouldSetTextContent(type: any, props: any): boolean; + shouldDeprioritizeSubtree(type: any, props: any):boolean; + createTextInstance(): void; + mountEventComponent(): void; + updateEventComponent(): void; + handleEventTarget(): void; + scheduleTimeout(...args: any[]): any; + cancelTimeout(...args: any[]): any; + appendChild(...args: any[]): any; + appendChildToContainer(...args: any[]): any; + removeChild(...args: any[]): any; + removeChildFromContainer(...args: any[]): any; + insertBefore(...args: any[]): any; + insertInContainerBefore(...args: any[]): any; + commitUpdate(...args: any[]): any; + commitMount(...args: any[]): any; + commitTextUpdate(...args: any[]): any; + resetTextContent(...args: any[]): any; +} + +export type InteractionEventTypes = + | 'click' + | 'mousedown' + | 'mousemove' + | 'mouseout' + | 'mouseover' + | 'mouseup' + | 'mouseupoutside' + | 'tap' + | 'touchstart' + | 'touchmove' + | 'touchend' + | 'touchendoutside' + | 'pointercancel' + | 'pointerout' + | 'pointerover' + | 'pointertap' + | 'pointerdown' + | 'pointerup' + | 'pointerupoutside' + | 'pointermove' + | 'rightclick' + | 'rightdown' + | 'rightup' + | 'rightupoutside' + | 'touchcancel' + | 'touchendoutside' + | 'touchmove' + | 'touchstart'; + +export type InteractionEvents = { + [P in InteractionEventTypes]?: ( + event: PIXI.InteractionEvent + ) => void; +}; + +// private +declare namespace _ReactPixi { + type FunctionTypes = { + [P in keyof T]: ((...args: any) => any) extends T[P] ? P : never; + }[keyof T]; + + type IfEquals = + (() => T extends X ? 1 : 2) extends + (() => T extends Y ? 1 : 2) ? A : B; + + type ReadonlyKeys = { + [P in keyof T]-?: IfEquals<{ [Q in P]: T[P] }, { -readonly [Q in P]: T[P] }, never, P> + }[keyof T]; + + type ApplicationOptions = ConstructorParameters[0]; + type PointLike = + | PIXI.Point + | PIXI.ObservablePoint + | [number, number] + | [number] + | number + | { x: number, y: number }; + type ImageSource = string | HTMLImageElement; + type VideoSource = string | HTMLVideoElement; + type AnySource = number | ImageSource | VideoSource | HTMLCanvasElement | PIXI.Texture; + type WithPointLike = { [P in T]: PointLike }; + + interface WithSource { + /** + * Directly apply an image + * + * @example + * + * image="./image.png" + */ + image?: ImageSource; + + /** + * Directly apply a video + * + * @example + * + * video="./video.mp4" + */ + video?: VideoSource; + + /** + * Directly apply a source. + * Can be an image, video, canvas, frame id or even a texture + * + * @example + * + * source="./image.jpg" + * source="./video.mp4" + * source={document.querySelector('img')} + * source={document.querySelector('video')} + * source={document.querySelector('canvas')} + */ + source?: AnySource; + } + + type P = 'position' | 'scale' | 'pivot' | 'anchor' | 'skew'; + + type Container = Partial< + Omit | keyof U> & + WithPointLike

+ > & U & InteractionEvents & { ref?: React.Ref }; + + type IContainer = Container; + type ISprite = Container; + type IText = Container; + type IGraphics = Container { + * g.beginFill(0xff0000); + * g.drawRect(0,0,100,100); + * g.endFill(); + * }} + */ + draw?(graphics: PIXI.Graphics): void; + }>; + + type IBitmapText = Container< + PIXI.BitmapText, + { + /** + * Set the style object + * + * @example + * + * style={{ font: '50px Desyrel' }} + */ + style?: ConstructorParameters[1]; + } + >; + + type INineSlicePlane = Container; + type IParticleContainer = Container< + PIXI.ParticleContainer, + { + maxSize?: ConstructorParameters[0]; + properties?: ConstructorParameters[1]; + batchSize?: ConstructorParameters[2]; + autoResize?: ConstructorParameters[3]; + } + >; + + type ITilingSprite = Container< + PIXI.TilingSprite, + WithSource & { + tileScale?: PointLike; + tilePosition: PointLike; + } + >; + + type ISimpleRope = Container; + type ISimpleMesh = Container< + PIXI.SimpleMesh, + WithSource & { + uvs?: ConstructorParameters[2]; + indices?: ConstructorParameters[3]; + } + >; + + type IAnimatedSprite = Container< + PIXI.AnimatedSprite, + WithSource & { + isPlaying: boolean; + images?: string[]; + initialFrame?: number; + } + >; + + type IStage = React.CanvasHTMLAttributes & { + /** + * Width of the Stage and canvas + */ + width?: number; + + /** + * Height of the Stage and canvas + */ + height?: number; + + /** + * Enable the {@see PIXI.Application} ticker? [default=true]. + * Automatically renders the stage on request animation frame. + */ + raf?: boolean; + + /** + * Render the PIXI stage on React component changes. + * You'll need to set raf={false}. + */ + renderOnComponentChange?: boolean; + + /** + * The PIXI application options. + * + * @see PIXI.ApplicationOptions + * @example + * + * options={{ antialias: true, roundPixels: true }} + */ + options?: ApplicationOptions; + + /** + * Callback when the component is successfully mounted + * + * @param {PIXI.Application} app + */ + onMount?(app: PIXI.Application): void; + + /** + * Callback when the component is successfully unmounted + * + * @param {PIXI.Application} app + */ + onUnmount?(app: PIXI.Application): void; + }; + + interface ICustomComponent< + P extends { [key: string]: any }, + PixiInstance extends PIXI.DisplayObject + > { + /** + * Create the PIXI instance + * The component is created during React reconciliation. + * + * @param props passed down props + * @returns {PIXI.DisplayObject} + */ + create(props: P): PixiInstance; + + /** + * Instance mounted + * This is called during React reconciliation. + * + * @param {PIXI.DisplayObject} instance + * @param {PIXI.Container} parent + */ + didMount?(instance: PixiInstance, parent: PIXI.Container): void; + + /** + * Instance will unmount + * This is called during React reconciliation. + * + * @param {PIXI.DisplayObject} instance + * @param {PIXI.Container} parent + */ + willUnmount?(instance: PixiInstance, parent: PIXI.Container): void; + + /** + * Apply props for this custom component. + * This is called during React reconciliation. + * + * @param {PIXI.DisplayObject} instance + * @param oldProps + * @param newProps + */ + applyProps?( + instance: PixiInstance, + oldProps: Readonly

, + newProps: Readonly

+ ): void; + + /** + * Reconcile config + */ + config?: { + /** + * Destroy instance on unmount? + * @default true + */ + destroy?: boolean; + + /** + * Destroy child instances? + * @default true + */ + destroyChildren?: boolean + }; + } +} + +// components +export const Text: React.FC<_ReactPixi.IText>; +export const Sprite: React.FC<_ReactPixi.ISprite>; +export const Container: React.FC<_ReactPixi.IContainer>; +export const Graphics: React.FC<_ReactPixi.IGraphics>; +export const BitmapText: React.FC<_ReactPixi.IBitmapText>; +export const NineSlicePlane: React.FC<_ReactPixi.INineSlicePlane>; +export const ParticleContainer: React.FC<_ReactPixi.IParticleContainer>; +export const TilingSprite: React.FC<_ReactPixi.ITilingSprite>; +export const SimpleRope: React.FC<_ReactPixi.ISimpleRope>; +export const SimpleMesh: React.FC<_ReactPixi.ISimpleMesh>; +export const AnimatedSprite: React.FC<_ReactPixi.IAnimatedSprite>; + +// renderer +export const render: ( + element: React.ReactElement | React.ReactElement[] | React.Factory, + container: PIXI.Container, + callback?: (...args: any) => void +) => any; + +// unmount component +export const unmountComponentAtNode: (container: PIXI.Container) => void; + +// context +export const AppContext: React.Context; +export const AppProvider: React.ComponentType>; +export const AppConsumer: React.ComponentType>; + +// fiber +export const PixiFiber: ( + eventsMap?: { [P in keyof ReconcilerConfig]: (...args: any) => void } +) => Reconciler; + +// stage +export class Stage extends React.Component<_ReactPixi.IStage> {} + +/** + * Create a Custom PIXI Component + * + * @example + * + * type RectangleProps = { x: number, y: number, color: number }; + * + * const Rectangle = PixiComponent('Rectangle', { + * create() { + * return new PIXI.Graphics(); + * } + * applyProps(ins: PIXI.Graphics, oldProps: RectangleProps, newProps: RectangleProps) { + * ins.clear(); + * ins.beginFill(newProps.color); + * ins.drawRect(newProps.x, newProps.y, 100, 100); + * ins.endFill(); + * } + * }); + */ +export const PixiComponent: ( + componentName: string, + lifecycle: _ReactPixi.ICustomComponent +) => React.FC }>; + +/** + * Tap into the {PIXI.Application} ticker raf. + * + * @example + * + * const MyComponent = () => { + * const [x, setX] = useState(0); + * useTick(() => setX(x + 1)); + * + * return + * } + */ +export const useTick: ( + tick: (this: PIXI.Ticker, delta: number, ticker: PIXI.Ticker) => void, + enabled?: boolean +) => void; + +/** + * Get the {} {PIXI.Application} instance. + * + * @example + * + * const MyComponent = () => { + * const app = useApp(); // app = PIXI.Application + * + * return + * } + * + */ +export const useApp: () => PIXI.Application; + +/** + * Higher Order Component to attach the {PIXI.Application} to `app` prop. + * + * @example + * + * interface Props { + * app: PIXI.Application + * } + * + * export default withPixiApp( + * ({ app }) => ( + * // + * ) + * ); + */ +export const withPixiApp:

( + WrappedComponent: React.ComponentType

+) => React.ComponentClass>; + +/** + * Apply default props. Useful in Custom Components. + * + * @example + * + * const Rectangle = PixiComponent('Rectangle', { + * create() { + * return new PIXI.Graphics(); + * }, + * applyProps(instance, oldProps, newProps) { + * applyDefaultProps(instance, oldProps, newProps); + * } + * }); + */ +export const applyDefaultProps:

( + instance: PIXI.DisplayObject, + oldProps: P, + newProps: P +) => void; + +/** + * Create a filter wrapper to easily facilitate filter arguments as props + * in a declarative way. + * + * @example + * + * render() { + * return ( + * + * + * + * + * + * ) + * } + */ +export const withFilters: < + Component extends React.ComponentType< + _ReactPixi.Container + >, + Filters extends { [filterKey: string]: any } + >( + WrapperComponent: Component, + filters: Filters +) => React.ComponentType< + React.ComponentProps & + Partial< + { + [P in keyof Filters]: Partial & { construct: ConstructorParameters }> + } + > + > + +/** + * Get the component instance ref + * + * @example + * + * const App = () => { + * const containerRef = React.useRef>(null); + * + * return + * }; + */ +export type PixiRef> = Extract< + React.ComponentProps['ref'], + React.RefObject + > extends React.Ref + ? R + : never; diff --git a/Typescript/types/pixi/accessibility/global.d.ts b/Typescript/types/pixi/accessibility/global.d.ts new file mode 100644 index 0000000..22ba585 --- /dev/null +++ b/Typescript/types/pixi/accessibility/global.d.ts @@ -0,0 +1,8 @@ +declare namespace GlobalMixins +{ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface DisplayObject extends Partial + { + + } +} diff --git a/Typescript/types/pixi/accessibility/index.d.ts b/Typescript/types/pixi/accessibility/index.d.ts new file mode 100644 index 0000000..01f4ff4 --- /dev/null +++ b/Typescript/types/pixi/accessibility/index.d.ts @@ -0,0 +1,185 @@ +/// + +import type { AbstractRenderer } from 'pixi/core'; +import type { DisplayObject } from 'pixi/display'; +import type { ExtensionMetadata } from 'pixi/core'; +import type { Rectangle } from 'pixi/math'; +import type { Renderer } from 'pixi/core'; + +/** + * The Accessibility manager recreates the ability to tab and have content read by screen readers. + * This is very important as it can possibly help people with disabilities access PixiJS content. + * + * A DisplayObject can be made accessible just like it can be made interactive. This manager will map the + * events as if the mouse was being used, minimizing the effort required to implement. + * + * An instance of this class is automatically created by default, and can be found at `renderer.plugins.accessibility` + * @class + * @memberof PIXI + */ +export declare class AccessibilityManager { + /** @ignore */ + static extension: ExtensionMetadata; + /** Setting this to true will visually show the divs. */ + debug: boolean; + /** + * The renderer this accessibility manager works for. + * @type {PIXI.CanvasRenderer|PIXI.Renderer} + */ + renderer: AbstractRenderer | Renderer; + /** Internal variable, see isActive getter. */ + private _isActive; + /** Internal variable, see isMobileAccessibility getter. */ + private _isMobileAccessibility; + /** Button element for handling touch hooks. */ + private _hookDiv; + /** This is the dom element that will sit over the PixiJS element. This is where the div overlays will go. */ + private div; + /** A simple pool for storing divs. */ + private pool; + /** This is a tick used to check if an object is no longer being rendered. */ + private renderId; + /** The array of currently active accessible items. */ + private children; + /** Count to throttle div updates on android devices. */ + private androidUpdateCount; + /** The frequency to update the div elements. */ + private androidUpdateFrequency; + /** + * @param {PIXI.CanvasRenderer|PIXI.Renderer} renderer - A reference to the current renderer + */ + constructor(renderer: AbstractRenderer | Renderer); + /** + * Value of `true` if accessibility is currently active and accessibility layers are showing. + * @member {boolean} + * @readonly + */ + get isActive(): boolean; + /** + * Value of `true` if accessibility is enabled for touch devices. + * @member {boolean} + * @readonly + */ + get isMobileAccessibility(): boolean; + /** + * Creates the touch hooks. + * @private + */ + private createTouchHook; + /** + * Destroys the touch hooks. + * @private + */ + private destroyTouchHook; + /** + * Activating will cause the Accessibility layer to be shown. + * This is called when a user presses the tab key. + * @private + */ + private activate; + /** + * Deactivating will cause the Accessibility layer to be hidden. + * This is called when a user moves the mouse. + * @private + */ + private deactivate; + /** + * This recursive function will run through the scene graph and add any new accessible objects to the DOM layer. + * @private + * @param {PIXI.Container} displayObject - The DisplayObject to check. + */ + private updateAccessibleObjects; + /** + * Before each render this function will ensure that all divs are mapped correctly to their DisplayObjects. + * @private + */ + private update; + /** + * private function that will visually add the information to the + * accessability div + * @param {HTMLElement} div - + */ + updateDebugHTML(div: IAccessibleHTMLElement): void; + /** + * Adjust the hit area based on the bounds of a display object + * @param {PIXI.Rectangle} hitArea - Bounds of the child + */ + capHitArea(hitArea: Rectangle): void; + /** + * Adds a DisplayObject to the accessibility manager + * @private + * @param {PIXI.DisplayObject} displayObject - The child to make accessible. + */ + private addChild; + /** + * Maps the div button press to pixi's InteractionManager (click) + * @private + * @param {MouseEvent} e - The click event. + */ + private _onClick; + /** + * Maps the div focus events to pixi's InteractionManager (mouseover) + * @private + * @param {FocusEvent} e - The focus event. + */ + private _onFocus; + /** + * Maps the div focus events to pixi's InteractionManager (mouseout) + * @private + * @param {FocusEvent} e - The focusout event. + */ + private _onFocusOut; + /** + * Is called when a key is pressed + * @private + * @param {KeyboardEvent} e - The keydown event. + */ + private _onKeyDown; + /** + * Is called when the mouse moves across the renderer element + * @private + * @param {MouseEvent} e - The mouse event. + */ + private _onMouseMove; + /** Destroys the accessibility manager */ + destroy(): void; +} + +/** + * Default property values of accessible objects + * used by {@link PIXI.AccessibilityManager}. + * @private + * @function accessibleTarget + * @memberof PIXI + * @type {object} + * @example + * function MyObject() {} + * + * Object.assign( + * MyObject.prototype, + * PIXI.accessibleTarget + * ); + */ +export declare const accessibleTarget: IAccessibleTarget; + +export declare interface IAccessibleHTMLElement extends HTMLElement { + type?: string; + displayObject?: DisplayObject; +} + +export declare interface IAccessibleTarget { + accessible: boolean; + accessibleTitle: string; + accessibleHint: string; + tabIndex: number; + _accessibleActive: boolean; + _accessibleDiv: IAccessibleHTMLElement; + accessibleType: string; + accessiblePointerEvents: PointerEvents; + accessibleChildren: boolean; + renderId: number; +} + +export declare type PointerEvents = 'auto' | 'none' | 'visiblePainted' | 'visibleFill' | 'visibleStroke' | 'visible' | 'painted' | 'fill' | 'stroke' | 'all' | 'inherit'; + +export { } diff --git a/Typescript/types/pixi/app/global.d.ts b/Typescript/types/pixi/app/global.d.ts new file mode 100644 index 0000000..7be0741 --- /dev/null +++ b/Typescript/types/pixi/app/global.d.ts @@ -0,0 +1,15 @@ +declare namespace GlobalMixins +{ + interface Application + { + resizeTo: Window | HTMLElement; + resize(): void; + queueResize: () => void; + cancelResize: () => void; + } + + interface IApplicationOptions + { + resizeTo?: Window | HTMLElement; + } +} diff --git a/Typescript/types/pixi/app/index.d.ts b/Typescript/types/pixi/app/index.d.ts new file mode 100644 index 0000000..8c84cff --- /dev/null +++ b/Typescript/types/pixi/app/index.d.ts @@ -0,0 +1,183 @@ +/// + +import type { AbstractRenderer } from 'pixi/core'; +import { Container } from 'pixi/display'; +import type { ExtensionMetadata } from 'pixi/core'; +import type { IDestroyOptions } from 'pixi/display'; +import type { IRendererOptionsAuto } from 'pixi/core'; +import type { Rectangle } from 'pixi/math'; +import type { Renderer } from 'pixi/core'; + +export declare interface Application extends GlobalMixins.Application { +} + +/** + * Convenience class to create a new PIXI application. + * + * This class automatically creates the renderer, ticker and root container. + * @example + * // Create the application + * const app = new PIXI.Application(); + * + * // Add the view to the DOM + * document.body.appendChild(app.view); + * + * // ex, add display objects + * app.stage.addChild(PIXI.Sprite.from('something.png')); + * @class + * @memberof PIXI + */ +export declare class Application { + /** Collection of installed plugins. */ + static _plugins: IApplicationPlugin[]; + /** + * The root display container that's rendered. + * @member {PIXI.Container} + */ + stage: Container; + /** + * WebGL renderer if available, otherwise CanvasRenderer. + * @member {PIXI.Renderer|PIXI.CanvasRenderer} + */ + renderer: Renderer | AbstractRenderer; + /** + * @param {PIXI.IApplicationOptions} [options] - The optional application and renderer parameters. + * @param {boolean} [options.antialias=false] - + * **WebGL Only.** Whether to enable anti-aliasing. This may affect performance. + * @param {boolean} [options.autoDensity=false] - + * Whether the CSS dimensions of the renderer's view should be resized automatically. + * @param {boolean} [options.autoStart=true] - Automatically starts the rendering after the construction. + * **Note**: Setting this parameter to false does NOT stop the shared ticker even if you set + * `options.sharedTicker` to `true` in case that it is already started. Stop it by your own. + * @param {number} [options.backgroundAlpha=1] - + * Transparency of the background color, value from `0` (fully transparent) to `1` (fully opaque). + * @param {number} [options.backgroundColor=0x000000] - + * The background color used to clear the canvas. It accepts hex numbers (e.g. `0xff0000`). + * @param {boolean} [options.clearBeforeRender=true] - Whether to clear the canvas before new render passes. + * @param {PIXI.IRenderingContext} [options.context] - **WebGL Only.** User-provided WebGL rendering context object. + * @param {boolean} [options.forceCanvas=false] - + * Force using {@link PIXI.CanvasRenderer}, even if WebGL is available. This option only is available when + * using **pixi.js-legacy** or **@pixi/canvas-renderer** packages, otherwise it is ignored. + * @param {number} [options.height=600] - The height of the renderer's view. + * @param {string} [options.powerPreference] - + * **WebGL Only.** A hint indicating what configuration of GPU is suitable for the WebGL context, + * can be `'default'`, `'high-performance'` or `'low-power'`. + * Setting to `'high-performance'` will prioritize rendering performance over power consumption, + * while setting to `'low-power'` will prioritize power saving over rendering performance. + * @param {boolean} [options.premultipliedAlpha=true] - + * **WebGL Only.** Whether the compositor will assume the drawing buffer contains colors with premultiplied alpha. + * @param {boolean} [options.preserveDrawingBuffer=false] - + * **WebGL Only.** Whether to enable drawing buffer preservation. If enabled, the drawing buffer will preserve + * its value until cleared or overwritten. Enable this if you need to call `toDataUrl` on the WebGL context. + * @param {Window|HTMLElement} [options.resizeTo] - Element to automatically resize stage to. + * @param {number} [options.resolution=PIXI.settings.RESOLUTION] - + * The resolution / device pixel ratio of the renderer. + * @param {boolean} [options.sharedLoader=false] - `true` to use PIXI.Loader.shared, `false` to create new Loader. + * @param {boolean} [options.sharedTicker=false] - `true` to use PIXI.Ticker.shared, `false` to create new ticker. + * If set to `false`, you cannot register a handler to occur before anything that runs on the shared ticker. + * The system ticker will always run before both the shared ticker and the app ticker. + * @param {boolean} [options.transparent] - + * **Deprecated since 6.0.0, Use `backgroundAlpha` instead.** \ + * `true` sets `backgroundAlpha` to `0`, `false` sets `backgroundAlpha` to `1`. + * @param {boolean|'notMultiplied'} [options.useContextAlpha=true] - + * Pass-through value for canvas' context attribute `alpha`. This option is for cases where the + * canvas needs to be opaque, possibly for performance reasons on some older devices. + * If you want to set transparency, please use `backgroundAlpha`. \ + * **WebGL Only:** When set to `'notMultiplied'`, the canvas' context attribute `alpha` will be + * set to `true` and `premultipliedAlpha` will be to `false`. + * @param {HTMLCanvasElement} [options.view=null] - + * The canvas to use as the view. If omitted, a new canvas will be created. + * @param {number} [options.width=800] - The width of the renderer's view. + */ + constructor(options?: IApplicationOptions); + /** + * Use the {@link PIXI.extensions.add} API to register plugins. + * @deprecated since 6.5.0 + * @static + * @param {PIXI.IApplicationPlugin} plugin - Plugin being installed + */ + static registerPlugin(plugin: IApplicationPlugin): void; + /** Render the current stage. */ + render(): void; + /** + * Reference to the renderer's canvas element. + * @member {HTMLCanvasElement} + * @readonly + */ + get view(): HTMLCanvasElement; + /** + * Reference to the renderer's screen rectangle. Its safe to use as `filterArea` or `hitArea` for the whole screen. + * @member {PIXI.Rectangle} + * @readonly + */ + get screen(): Rectangle; + /** + * Destroy and don't use after this. + * @param {boolean} [removeView=false] - Automatically remove canvas from DOM. + * @param {object|boolean} [stageOptions] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [stageOptions.children=false] - if set to true, all the children will have their destroy + * method called as well. 'stageOptions' will be passed on to those calls. + * @param {boolean} [stageOptions.texture=false] - Only used for child Sprites if stageOptions.children is set + * to true. Should it destroy the texture of the child sprite + * @param {boolean} [stageOptions.baseTexture=false] - Only used for child Sprites if stageOptions.children is set + * to true. Should it destroy the base texture of the child sprite + */ + destroy(removeView?: boolean, stageOptions?: IDestroyOptions | boolean): void; +} + +/** + * Application options supplied to constructor. + * @memberof PIXI + */ +export declare interface IApplicationOptions extends IRendererOptionsAuto, GlobalMixins.IApplicationOptions { +} + +/** + * Any plugin that's usable for Application should contain these methods. + * @memberof PIXI + */ +export declare interface IApplicationPlugin { + /** + * Called when Application is constructed, scoped to Application instance. + * Passes in `options` as the only argument, which are Application constructor options. + * @param {object} options - Application options. + */ + init(options: IApplicationOptions): void; + /** Called when destroying Application, scoped to Application instance. */ + destroy(): void; +} + +declare type ResizeableRenderer = Pick; + +/** + * Middleware for for Application's resize functionality + * @private + * @class + */ +export declare class ResizePlugin { + /** @ignore */ + static extension: ExtensionMetadata; + static resizeTo: Window | HTMLElement; + static resize: () => void; + static renderer: ResizeableRenderer; + static queueResize: () => void; + private static _resizeId; + private static _resizeTo; + private static cancelResize; + /** + * Initialize the plugin with scope of application instance + * @static + * @private + * @param {object} [options] - See application options + */ + static init(options?: IApplicationOptions): void; + /** + * Clean up the ticker, scoped to application + * @static + * @private + */ + static destroy(): void; +} + +export { } diff --git a/Typescript/types/pixi/assets/index.d.ts b/Typescript/types/pixi/assets/index.d.ts new file mode 100644 index 0000000..df2e052 --- /dev/null +++ b/Typescript/types/pixi/assets/index.d.ts @@ -0,0 +1,1123 @@ +import { BitmapFont } from 'pixi/text-bitmap'; +import type { ExtensionMetadata } from 'pixi/core'; +import type { IBaseTextureOptions } from 'pixi/core'; +import { Resource } from 'pixi/core'; +import { Spritesheet } from 'pixi/spritesheet'; +import { Texture } from 'pixi/core'; + +export declare function addFormats(...format: string[]): (formats: string[]) => Promise; + +/** + * Initialization options object for Asset Class. + * @memberof PIXI + */ +export declare interface AssetInitOptions { + /** a base path for any assets loaded */ + basePath?: string; + /** + * a manifest to tell the asset loader upfront what all your assets are + * this can be the manifest object itself, or a URL to the manifest. + */ + manifest?: string | ResolverManifest; + /** + * optional preferences for which textures preferences you have when resolving assets + * for example you might set the resolution to 0.5 if the user is on a rubbish old phone + * or you might set the resolution to 2 if the user is on a retina display + */ + texturePreference?: { + /** the resolution order you prefer, can be an array (priority order - first is prefered) or a single resolutions */ + resolution?: number | number[]; + /** the formats you prefer, by default this will be: ['avif', 'webp', 'png', 'jpg', 'jpeg'] */ + format?: string | string[]; + }; + /** loader options to configure the loader with, currently only parsers! */ + loader?: { + /** custom parsers can be added here, for example something that could load a sound or a 3D model */ + parsers?: LoaderParser[]; + }; + /** resolver specific options */ + resolver?: { + /** + * a list of urlParsers, these can read the URL and pick put the various options. + * for example there is a texture URL parser that picks our resolution and file format. + * You can add custom ways to read URLs and extract information here. + */ + urlParsers?: ResolveURLParser[]; + /** + * a list of preferOrders that let the resolver know which asset to pick. + * already built-in we have a texture preferOrders that let the resolve know which asset to prefer + * if it has multiple assets to pick from (resolution/formats etc) + */ + preferOrders?: PreferOrder[]; + }; +} + +export declare const Assets: AssetsClass; + +/** + * A one stop shop for all Pixi resource management! + * Super modern and easy to use, with enough flexibility to customize and do what you need! + * @memberof PIXI + * @namespace Assets + * + * Only one Asset Class exists accessed via the Global Asset object. + * + * It has four main responsibilities: + * 1. Allows users to map URLs to keys and resolve them according to the user's browser capabilities. + * 2. Loads the resources and transforms them into assets that developers understand. + * 3. Caches the assets and provides a way to access them. + * 4. Allow developers to unload assets and clear the cache. + * + * It also has a few advanced features: + * 1. Allows developers to provide a manifest upfront of all assets and help manage them via 'bundles'. + * 2. Allows users to background load assets. Shortening (or eliminating) load times and improving UX. With this feature, + * in-game loading bars can be a thing of the past! + * + * + * ### Setup + * + * As for PixiJS v6.x, `@pixi/assets` is an opt-in package, so you need to import it first. + * + * #### NPM Install + * + * ```sh + * npm install @pixi/assets@v6.x + * ``` + * + * There is no default export. The correct way to import Assets is: + * + * ```js + * import { Assets } from 'pixi/assets'; + * ``` + * + * #### CDN Install + * + * Via jsDelivr: + * + * ```html + * + * ``` + * + * Or via unpkg: + * + * ```html + * + * ``` + * + * _Note: The version of `@pixi/assets` should be the same as the version of `pixi.js` you are using._ + * + * ### Assets Loading + * + * Do not be afraid to load things multiple times - under the hood, it will NEVER load anything more than once. + * + * For example: + * + * ``` + * promise1 = PIXI.Assets.load('bunny.png') + * promise2 = PIXI.Assets.load('bunny.png') + * + * // promise1 === promise2 + * ``` + * + * Here both promises will be the same. Once resolved... Forever resolved! It makes for really easy resource management! + * + * Out of the box it supports the following files: + * * textures (avif, webp, png, jpg, gif) + * * sprite sheets (json) + * * bitmap fonts (xml, fnt, txt) + * * web fonts (ttf, woff, woff2) + * * json files (json) + * * text files (txt) + * + * More types can be added fairly easily by creating additional loader parsers. + * + * ### Textures + * - Textures are loaded as ImageBitmap on a worker thread where possible. + * Leading to much less janky load + parse times. + * - By default, we will prefer to load AVIF and WebP image files if you specify them. + * But if the browser doesn't support AVIF or WebP we will fall back to png and jpg. + * - Textures can also be accessed via Texture.from(...) and now use this asset manager under the hood! + * - Don't worry if you set preferences for textures that don't exist (for example you prefer 2x resolutions images + * but only 1x is available for that texture, the Asset manager will pick that up as a fallback automatically) + * #### Sprite sheets + * - it's hard to know what resolution a sprite sheet is without loading it first, to address this + * there is a naming convention we have added that will let Pixi understand the image format and resolution + * of the spritesheet via its file name: + * + * `my-spritesheet{resolution}.{imageFormat}.json` + * + * for example: + * + * `my-spritesheet@2x.webp.json` // 2x resolution, WebP sprite sheet + * `my-spritesheet@0.5x.png.json` // 0.5x resolution, png sprite sheet + * + * This is optional! you can just load a sprite sheet as normal, + * This is only useful if you have a bunch of different res / formatted spritesheets + * + * ### Fonts + * * Web fonts will be loaded with all weights. + * it is possible to load only specific weights by doing the following: + * + * ``` + * // load specific weights.. + * await PIXI.Assets.load({ + * data: { + * weights: ['normal'], // only loads the weight + * }, + * src: `outfit.woff2`, + * }); + * + * // load everything... + * await PIXI.Assets.load(`outfit.woff2`); + * ``` + * ### Background Loading + * Background loading will load stuff for you passively behind the scenes. To minimize jank, + * it will only load one asset at a time. As soon as a developer calls `PIXI.Assets.load(...)` the + * background loader is paused and requested assets are loaded as a priority. + * Don't worry if something is in there that's already loaded, it will just get skipped! + * + * You still need to call `PIXI.Assets.load(...)` to get an asset that has been loaded in the background. + * It's just that this promise will resolve instantly if the asset + * has already been loaded. + * + * ### Manifest and Bundles + * - Manifest is a JSON file that contains a list of all assets and their properties. + * - Bundles are a way to group assets together. + * + * ``` + * // manifest example + * const manifest = { + * bundles:[{ + * name:'load-screen', + * assets:[ + * { + * name: 'background', + * srcs: 'sunset.png', + * }, + * { + * name: 'bar', + * srcs: 'load-bar.{png,webp}', + * } + * ] + * }, + * { + * name:'game-screen', + * assets:[ + * { + * name: 'character', + * srcs: 'robot.png', + * }, + * { + * name: 'enemy', + * srcs: 'bad-guy.png', + * } + * ] + * }] + * }} + * + * await PIXI.Asset.init({ + * manifest + * }); + * + * // load a bundle.. + * loadScreenAssets = await PIXI.Assets.loadBundle('load-screen'); + * // load another.. + * gameScreenAssets = await PIXI.Assets.loadBundle('game-screen'); + * ``` + * @example + * const bunny = await PIXI.Assets.load('bunny.png'); + */ +export declare class AssetsClass { + /** the resolver to map various urls */ + resolver: Resolver; + /** + * The loader, loads stuff! + * @type {PIXI.AssetLoader} + */ + loader: Loader; + /** + * The global cache of all assets within PixiJS + * @type {PIXI.Cache} + */ + cache: typeof Cache_2; + /** takes care of loading assets in the background */ + private readonly _backgroundLoader; + private _detections; + private _initialized; + constructor(); + /** + * Best practice is to call this function before any loading commences + * Initiating is the best time to add any customization to the way things are loaded. + * + * you do not need to call this for the Asset class to work, only if you want to set any initial properties + * @param options - options to initialize the Asset manager with + */ + init(options?: AssetInitOptions): Promise; + /** + * Allows you to specify how to resolve any assets load requests. + * There are a few ways to add things here as shown below: + * @example + * // simple + * PIXI.Assets.add('bunnyBooBoo', 'bunny.png'); + * const bunny = await PIXI.Assets.load('bunnyBooBoo'); + * + * // multiple keys: + * PIXI.Assets.add(['burger', 'chicken'], 'bunny.png'); + * + * const bunny = await PIXI.Assets.load('burger'); + * const bunny2 = await PIXI.Assets.load('chicken'); + * + * // passing options to to the object + * PIXI.Assets.add( + * 'bunnyBooBooSmooth', + * 'bunny{png,webp}', + * {scaleMode:SCALE_MODES.NEAREST} // base texture options + * ); + * + * // multiple assets, + * + * // the following all do the same thing: + * + * PIXI.Assets.add('bunnyBooBoo', 'bunny{png,webp}'); + * + * PIXI.Assets.add('bunnyBooBoo', [ + * 'bunny.png', + * 'bunny.webp' + * ]); + * + * PIXI.Assets.add('bunnyBooBoo', [ + * { + * format:'png', + * src:'bunny.png', + * }, + * { + * format:'webp', + * src:'bunny.webp', + * } + * ]); + * + * const bunny = await PIXI.Assets.load('bunnyBooBoo'); // will try to load WebP if available + * @param keysIn - the key or keys that you will reference when loading this asset + * @param assetsIn - the asset or assets that will be chosen from when loading via the specified key + * @param data - asset-specific data that will be passed to the loaders + * - Useful if you want to initiate loaded objects with specific data + */ + add(keysIn: string | string[], assetsIn: string | (ResolveAsset | string)[], data?: unknown): void; + /** + * Loads your assets! You pass in a key or URL and it will return a promise that + * resolves to the loaded asset. If multiple assets a requested, it will return a hash of assets. + * + * Don't worry about loading things multiple times, behind the scenes assets are only ever loaded + * once and the same promise reused behind the scenes so you can safely call this function multiple + * times with the same key and it will always return the same asset. + * @example + * // load a URL: + * const myImageTexture = await PIXI.Assets.load('http://some.url.com/image.png'); // => returns a texture + * + * PIXI.Assets.add('thumper', 'bunny.png'); + * PIXI.Assets.add('chicko', 'chicken.png'); + * + * // load multiple assets: + * const textures = await PIXI.Assets.load(['thumper', 'chicko']); // => {thumper: Texture, chicko: Texture} + * @param urls - the urls to load + * @param onProgress - optional function that is called when progress on asset loading is made. + * The function is passed a single parameter, `progress`, which represents the percentage + * (0.0 - 1.0) of the assets loaded. + * @returns - the assets that were loaded, either a single asset or a hash of assets + */ + load(urls: string | string[] | LoadAsset | LoadAsset[], onProgress?: ProgressCallback): Promise>; + /** + * This adds a bundle of assets in one go so that you can load them as a group. + * For example you could add a bundle for each screen in you pixi app + * @example + * PIXI.Assets.addBundle('animals', { + * bunny: 'bunny.png', + * chicken: 'chicken.png', + * thumper: 'thumper.png', + * }); + * + * const assets = await PIXI.Assets.loadBundle('animals'); + * @param bundleId - the id of the bundle to add + * @param assets - a record of the asset or assets that will be chosen from when loading via the specified key + */ + addBundle(bundleId: string, assets: ResolverBundle['assets']): void; + /** + * Bundles are a way to load multiple assets at once. + * If a manifest has been provided to the init function then you can load a bundle, or bundles. + * you can also add bundles via `addBundle` + * @example + * // manifest example + * const manifest = { + * bundles:[{ + * name:'load-screen', + * assets:[ + * { + * name: 'background', + * srcs: 'sunset.png', + * }, + * { + * name: 'bar', + * srcs: 'load-bar.{png,webp}', + * } + * ] + * }, + * { + * name:'game-screen', + * assets:[ + * { + * name: 'character', + * srcs: 'robot.png', + * }, + * { + * name: 'enemy', + * srcs: 'bad-guy.png', + * } + * ] + * }] + * }} + * + * await Asset.init({ + * manifest + * }); + * + * // load a bundle.. + * loadScreenAssets = await PIXI.Assets.loadBundle('load-screen'); + * // load another.. + * gameScreenAssets = await PIXI.Assets.loadBundle('game-screen'); + * @param bundleIds - the bundle id or ids to load + * @param onProgress - optional function that is called when progress on asset loading is made. + * The function is passed a single parameter, `progress`, which represents the percentage (0.0 - 1.0) + * of the assets loaded. + * @returns all the bundles assets or a hash of assets for each bundle specified + */ + loadBundle(bundleIds: string | string[], onProgress?: ProgressCallback): Promise; + /** + * Initiate a background load of some assets. it will passively begin to load these assets in the background. + * So when you actually come to loading them you will get a promise that resolves to the loaded assets immediately + * + * An example of this might be that you would background load game assets after your inital load. + * then when you got to actually load your game screen assets when a player goes to the game - the loading + * would already have stared or may even be complete, saving you having to show an interim load bar. + * @example + * PIXI.Assets.backgroundLoad('bunny.png'); + * + * // later on in your app... + * await PIXI.Assets.loadBundle('bunny.png'); // will resolve quicker as loading may have completed! + * @param urls - the url / urls you want to background load + */ + backgroundLoad(urls: string | string[]): Promise; + /** + * Initiate a background of a bundle, works exactly like backgroundLoad but for bundles. + * this can only be used if the loader has been initiated with a manifest + * @example + * await PIXI.Assets.init({ + * manifest: { + * bundles: [ + * { + * name:'load-screen', + * assets:[...] + * } + * ...] + * } + * }); + * + * PIXI.Assets.backgroundLoadBundle('load-screen'); + * + * // later on in your app... + * await PIXI.Assets.loadBundle('load-screen'); // will resolve quicker as loading may have completed! + * @param bundleIds - the bundleId / bundleIds you want to background load + */ + backgroundLoadBundle(bundleIds: string | string[]): Promise; + /** + * Only intended for development purposes. + * This will wipe the resolver and caches. + * You will need to reinitialize the Asset + */ + reset(): void; + /** + * Instantly gets an asset already loaded from the cache. If the asset has not yet been loaded, + * it will return undefined. So it's on you! When in doubt just use `PIXI.Assets.load` instead. + * (remember, the loader will never load things more than once!) + * @param keys - The key or keys for the assets that you want to access + * @returns - The assets or hash of assets requested + */ + get(keys: string | string[]): T | Record; + /** + * helper function to map resolved assets back to loaded assets + * @param resolveResults - the resolve results from the resolver + * @param onProgress - the progress callback + */ + private _mapLoadToResolve; + /** + * Unload an asset or assets. As the Assets class is responsible for creating the assets via the `load` function + * this will make sure to destroy any assets and release them from memory. + * Once unloaded, you will need to load the asset again. + * + * Use this to help manage assets if you find that you have a large app and you want to free up memory. + * + * * it's up to you as the developer to make sure that textures are not actively being used when you unload them, + * Pixi won't break but you will end up with missing assets. Not a good look for the user! + * @example + * // load a URL: + * const myImageTexture = await PIXI.Assets.load('http://some.url.com/image.png'); // => returns a texture + * + * await PIXI.Assets.unload('http://some.url.com/image.png') + * + * myImageTexture <-- will now be destroyed. + * + * // unload multiple assets: + * const textures = await PIXI.Assets.unload(['thumper', 'chicko']); + * @param urls - the urls to unload + */ + unload(urls: string | string[] | LoadAsset | LoadAsset[]): Promise; + /** + * Bundles are a way to manage multiple assets at once. + * this will unload all files in a bundle. + * + * once a bundle has been unloaded, you need to load it again to have access to the assets. + * @example + * PIXI.Assets.addBundle({ + * 'thumper': 'http://some.url.com/thumper.png', + * }) + * + * const assets = await PIXI.Assets.loadBundle('thumper'); + * + * // now to unload.. + * + * await await PIXI.Assets.unloadBundle('thumper'); + * + * // all assets in the assets object will now have been destroyed and purged from the cache + * @param bundleIds - the bundle id or ids to unload + */ + unloadBundle(bundleIds: string | string[]): Promise; + private _unloadFromResolved; + /** All the detection parsers currently added to the Assets class. */ + get detections(): FormatDetectionParser[]; +} + +declare const Cache_2: CacheClass; +export { Cache_2 as Cache } + +/** + * A single Cache for all assets. + * + * When assets are added to the cache via set they normally are added to the cache as key-value pairs. + * + * With this cache, you can add parsers that will take the object and convert it to a list of assets that can be cached. + * for example a cacheSprite Sheet parser will add all of the textures found within its sprite sheet directly to the cache. + * + * This gives devs the flexibility to cache any type of object however we want. + * + * It is not intended that this class is created by developers - it is part of the Asset package. + * This is the first major system of PixiJS' main Assets class. + * @memberof PIXI + * @class Cache + */ +declare class CacheClass { + private _parsers; + private readonly _cache; + private readonly _cacheMap; + /** Clear all entries. */ + reset(): void; + /** + * Check if the key exists + * @param key - The key to check + */ + has(key: string): boolean; + /** + * Fetch entry by key + * @param key - The key of the entry to get + */ + get(key: string): T; + /** + * Set a value by key or keys name + * @param key - The key or keys to set + * @param value - The value to store in the cache or from which cacheable assets will be derived. + */ + set(key: string | string[], value: unknown): void; + /** + * Remove entry by key + * + * This function will also remove any associated alias from the cache also. + * @param key - The key of the entry to remove + */ + remove(key: string): void; + /** All loader parsers registered */ + get parsers(): CacheParser[]; +} + +/** + * For every asset that is cached, it will call the parsers test function + * the flow is as follows: + * + * 1. `cacheParser.test()`: Test the asset. + * 2. `cacheParser.getCacheableAssets()`: If the test passes call the getCacheableAssets function with the asset + * + * Useful if you want to add more than just a raw asset to the cache + * (for example a spritesheet will want to make all its sub textures easily accessible in the cache) + */ +export declare interface CacheParser { + extension?: ExtensionMetadata; + /** A config to adjust the parser */ + config?: Record; + /** + * Gets called by the cache when a dev caches an asset + * @param asset - the asset to test + */ + test: (asset: T) => boolean; + /** + * If the test passes, this function is called to get the cacheable assets + * an example may be that a spritesheet object will return all the sub textures it has so they can + * be cached. + * @param keys - The keys to cache the assets under + * @param asset - The asset to get the cacheable assets from + * @returns A key-value pair of cacheable assets + */ + getCacheableAssets: (keys: string[], asset: T) => Record; +} + +export declare const cacheSpritesheet: CacheParser; + +export declare const cacheTextureArray: CacheParser; + +export declare const convertToList: (input: string | T | (string | T)[], transform?: (input: string) => T) => T[]; + +/** + * Creates a list of all possible combinations of the given strings. + * @example + * const out2 = createStringVariations('name is {chicken,wolf,sheep}'); + * console.log(out2); // [ 'name is chicken', 'name is wolf', 'name is sheep' ] + * @param string - The string to process + */ +export declare function createStringVariations(string: string): string[]; + +export declare const detectAvif: FormatDetectionParser; + +export declare const detectBasis: FormatDetectionParser; + +export declare const detectCompressedTextures: FormatDetectionParser; + +export declare const detectWebp: FormatDetectionParser; + +export declare interface FormatDetectionParser { + extension?: ExtensionMetadata; + test: () => Promise; + add: (formats: string[]) => Promise; + remove: (formats: string[]) => Promise; +} + +/** + * Return font face name from a file name + * Ex.: 'fonts/tital-one.woff' turns into 'Titan One' + * @param url - File url + */ +export declare function getFontFamilyName(url: string): string; + +/** + * Checks if the given value is an array. + * @param item - The item to test + */ +export declare const isSingleItem: (item: unknown) => boolean; + +export declare interface LoadAsset { + src: string; + data?: T; + alias?: string[]; + format?: string; +} + +/** Load BASIS textures! */ +export declare const loadBasis: LoaderParser | Texture[], IBaseTextureOptions>; + +/** simple loader plugin for loading in bitmap fonts! */ +export declare const loadBitmapFont: LoaderParser; + +/** Load our DDS textures! */ +export declare const loadDDS: LoaderParser; + +/** + * The Loader is responsible for loading all assets, such as images, spritesheets, audio files, etc. + * It does not do anything clever with URLs - it just loads stuff! + * Behind the scenes all things are cached using promises. This means it's impossible to load an asset more than once. + * Through the use of LoaderParsers, the loader can understand how to load any kind of file! + * + * It is not intended that this class is created by developers - its part of the Asset class + * This is the second major system of PixiJS' main Assets class + * @memberof PIXI + * @class AssetLoader + */ +export declare class Loader { + private _parsers; + /** Cache loading promises that ae currently active */ + promiseCache: Record; + /** function used for testing */ + reset(): void; + /** + * Used internally to generate a promise for the asset to be loaded. + * @param url - The URL to be loaded + * @param data - any custom additional information relevant to the asset being loaded + * @returns - a promise that will resolve to an Asset for example a Texture of a JSON object + */ + private _getLoadPromiseAndParser; + /** + * Loads an asset(s) using the parsers added to the Loader. + * @example + * // single asset: + * const asset = await Loader.load('cool.png'); + * console.log(asset); + * @example + * // multiple assets: + * const assets = await Loader.load(['cool.png', 'cooler.png']); + * console.log(assets); + * @param assetsToLoadIn - urls that you want to load, or a single one! + * @param onProgress - a function that gets called when the progress changes + */ + load(assetsToLoadIn: string | string[] | LoadAsset | LoadAsset[], onProgress?: (progress: number) => void): Promise<{ + [key: string]: any; + } | any>; + /** + * Unloads an asset(s). Any unloaded assets will be destroyed, freeing up memory for your app. + * The parser that created the asset, will be the one that unloads it. + * @example + * // single asset: + * const asset = await Loader.load('cool.png'); + * + * await Loader.unload('cool.png'); + * + * console.log(asset.destroyed); // true + * @param assetsToUnloadIn - urls that you want to unload, or a single one! + */ + unload(assetsToUnloadIn: string | string[] | LoadAsset | LoadAsset[]): Promise; + /** All loader parsers registered */ + get parsers(): LoaderParser[]; +} + +/** + * All functions are optional here. The flow: + * + * for every asset, + * + * 1. `parser.test()`: Test the asset url. + * 2. `parser.load()`: If test passes call the load function with the url + * 3. `parser.testParse()`: Test to see if the asset should be parsed by the plugin + * 4. `parse.parse()`: If test is parsed, then run the parse function on the asset. + * + * some plugins may only be used for parsing, + * some only for loading + * and some for both! + */ +export declare interface LoaderParser { + extension?: ExtensionMetadata; + /** A config to adjust the parser */ + config?: Record; + /** + * each URL to load will be tested here, + * if the test is passed the assets are loaded using the load function below. + * Good place to test for things like file extensions! + * @param url - The URL to test + * @param loadAsset - Any custom additional information relevant to the asset being loaded + * @param loader - The loader instance + */ + test?: (url: string, loadAsset?: LoadAsset, loader?: Loader) => boolean; + /** + * This is the promise that loads the URL provided + * resolves with a loaded asset if returned by the parser. + * @param url - The URL to load + * @param loadAsset - Any custom additional information relevant to the asset being loaded + * @param loader - The loader instance + */ + load?: (url: string, loadAsset?: LoadAsset, loader?: Loader) => Promise; + /** + * This function is used to test if the parse function should be run on the asset + * If this returns true then parse is called with the asset + * @param asset - The loaded asset data + * @param loadAsset - Any custom additional information relevant to the asset being loaded + * @param loader - The loader instance + */ + testParse?: (asset: ASSET, loadAsset?: LoadAsset, loader?: Loader) => Promise; + /** + * Gets called on the asset it testParse passes. Useful to convert a raw asset into something more useful than + * @param asset - The loaded asset data + * @param loadAsset - Any custom additional information relevant to the asset being loaded + * @param loader - The loader instance + */ + parse?: (asset: ASSET, loadAsset?: LoadAsset, loader?: Loader) => Promise; + /** + * If an asset is parsed using this parser, the unload function will be called when the user requests an asset + * to be unloaded. This is useful for things like sounds or textures that can be unloaded from memory + * @param asset - The asset to unload/destroy + * @param loadAsset - Any custom additional information relevant to the asset being loaded + * @param loader - The loader instance + */ + unload?: (asset: ASSET, loadAsset?: LoadAsset, loader?: Loader) => void; +} + +export declare type LoadFontData = { + family: string; + display: string; + featureSettings: string; + stretch: string; + style: string; + unicodeRange: string; + variant: string; + weights: string[]; +}; + +/** + * Returns a promise that resolves an ImageBitmaps. + * This function is designed to be used by a worker. + * Part of WorkerManager! + * @param url - The image to load an image bitmap for + */ +export declare function loadImageBitmap(url: string): Promise; + +/** simple loader plugin for loading json data */ +export declare const loadJson: LoaderParser; + +/** Loads KTX textures! */ +export declare const loadKTX: LoaderParser | Texture[], IBaseTextureOptions>; + +/** + * Loader plugin that parses sprite sheets! + * once the JSON has been loaded this checks to see if the JSON is spritesheet data. + * If it is, we load the spritesheets image and parse the data into PIXI.Spritesheet + * All textures in the sprite sheet are then added to the cache + */ +export declare const loadSpritesheet: LoaderParser; + +/** Loads SVG's into Textures */ +export declare const loadSVG: LoaderParser, IBaseTextureOptions>; + +/** + * Loads our textures! + * this makes use of imageBitmaps where available. + * We load the ImageBitmap on a different thread using the WorkerManager + * We can then use the ImageBitmap as a source for a Pixi Texture + */ +export declare const loadTextures: LoaderParser, IBaseTextureOptions>; + +/** Simple loader plugin for loading text data */ +export declare const loadTxt: LoaderParser; + +/** Web font loader plugin */ +export declare const loadWebFont: LoaderParser; + +/** + * A prefer order lets the resolver know which assets to prefere depending on the various parameters passed to it. + * @memberof PIXI + */ +export declare interface PreferOrder { + /** the importance order of the params */ + priority?: string[]; + params: { + [key: string]: any; + }; +} + +export declare type ProgressCallback = (progress: number) => void; + +export declare interface PromiseAndParser { + promise: Promise; + parser: LoaderParser; +} + +export declare function removeFormats(...format: string[]): (formats: string[]) => Promise; + +/** + * the object returned when a key is resolved to an asset. + * it will contain any additional information passed in the asset was added. + * @memberof PIXI + */ +export declare interface ResolveAsset extends Record { + alias?: string[]; + src: string; +} + +export declare const resolveCompressedTextureUrl: ResolveURLParser; + +/** + * A class that is responsible for resolving mapping asset URLs to keys. + * At its most basic it can be used for Aliases: + * + * ``` + * resolver.add('foo', 'bar'); + * resolver.resolveUrl('foo') // => 'bar' + * ``` + * + * It can also be used to resolve the most appropriate asset for a given URL: + * + * ``` + * resolver.prefer({ + * params:{ + * format:'webp', + * resolution: 2, + * } + * }) + * + * resolver.add('foo', ['bar@2x.webp', 'bar@2x.png', 'bar.webp', 'bar.png']); + * + * resolver.resolveUrl('foo') // => 'bar@2x.webp' + * ``` + * Other features include: + * - Ability to process a manifest file to get the correct understanding of how to resolve all assets + * - Ability to add custom parsers for specific file types + * - Ability to add custom prefer rules + * + * This class only cares about the URL, not the loading of the asset itself. + * + * It is not intended that this class is created by developers - its part of the Asset class + * This is the third major system of PixiJS' main Assets class + * @memberof PIXI + */ +export declare class Resolver { + private _assetMap; + private _preferredOrder; + private _parsers; + private _resolverHash; + private _rootPath; + private _basePath; + private _manifest; + private _bundles; + /** + * Let the resolver know which assets you prefer to use when resolving assets. + * Multiple prefer user defined rules can be added. + * @example + * resolver.prefer({ + * // first look for something with the correct format, and then then correct resolution + * priority: ['format', 'resolution'], + * params:{ + * format:'webp', // prefer webp images + * resolution: 2, // prefer a resolution of 2 + * } + * }) + * resolver.add('foo', ['bar@2x.webp', 'bar@2x.png', 'bar.webp', 'bar.png']); + * resolver.resolveUrl('foo') // => 'bar@2x.webp' + * @param preferOrders - the prefer options + */ + prefer(...preferOrders: PreferOrder[]): void; + /** + * Set the base path to prepend to all urls when resolving + * @example + * resolver.basePath = 'https://home.com/'; + * resolver.add('foo', 'bar.ong'); + * resolver.resolveUrl('foo', 'bar.png'); // => 'https://home.com/bar.png' + * @param basePath - the base path to use + */ + set basePath(basePath: string); + get basePath(): string; + /** + * Set the root path for root-relative URLs. By default the `basePath`'s root is used. If no `basePath` is set, then the + * default value for browsers is `window.location.origin` + * @example + * // Application hosted on https://home.com/some-path/index.html + * resolver.basePath = 'https://home.com/some-path/'; + * resolver.rootPath = 'https://home.com/'; + * resolver.add('foo', '/bar.png'); + * resolver.resolveUrl('foo', '/bar.png'); // => 'https://home.com/bar.png' + * @param rootPath - the root path to use + */ + set rootPath(rootPath: string); + get rootPath(): string; + /** + * All the active URL parsers that help the parser to extract information and create + * an asset object-based on parsing the URL itself. + * + * Can be added using the extensions API + * @example + * resolver.add('foo', [ + * { + * resolution:2, + * format:'png' + * src: 'image@2x.png' + * }, + * { + * resolution:1, + * format:'png' + * src: 'image.png' + * } + * ]); + * + * // with a url parser the information such as resolution and file format could extracted from the url itself: + * extensions.add({ + * extension: ExtensionType.ResolveParser, + * test: loadTextures.test, // test if url ends in an image + * parse: (value: string) => + * ({ + * resolution: parseFloat(settings.RETINA_PREFIX.exec(value)?.[1] ?? '1'), + * format: value.split('.').pop(), + * src: value, + * }), + * }); + * + * // now resolution and format can be extracted from the url + * resolver.add('foo', [ + * 'image@2x.png' + * 'image.png' + * ]); + * @ + */ + get parsers(): ResolveURLParser[]; + /** Used for testing, this resets the resolver to its initial state */ + reset(): void; + /** + * Add a manifest to the asset resolver. This is a nice way to add all the asset information in one go. + * generally a manifest would be built using a tool. + * @param manifest - the manifest to add to the resolver + */ + addManifest(manifest: ResolverManifest): void; + /** + * This adds a bundle of assets in one go so that you can resolve them as a group. + * For example you could add a bundle for each screen in you pixi app + * @example + * resolver.addBundle('animals', { + * bunny: 'bunny.png', + * chicken: 'chicken.png', + * thumper: 'thumper.png', + * }); + * + * const resolvedAssets = await resolver.resolveBundle('animals'); + * @param bundleId - The id of the bundle to add + * @param assets - A record of the asset or assets that will be chosen from when loading via the specified key + */ + addBundle(bundleId: string, assets: ResolverBundle['assets']): void; + /** + * Tells the resolver what keys are associated with witch asset. + * The most important thing the resolver does + * @example + * // single key, single asset: + * resolver.add('foo', 'bar.png'); + * resolver.resolveUrl('foo') // => 'bar.png' + * + * // multiple keys, single asset: + * resolver.add(['foo', 'boo'], 'bar.png'); + * resolver.resolveUrl('foo') // => 'bar.png' + * resolver.resolveUrl('boo') // => 'bar.png' + * + * // multiple keys, multiple assets: + * resolver.add(['foo', 'boo'], ['bar.png', 'bar.webp']); + * resolver.resolveUrl('foo') // => 'bar.png' + * + * // add custom data attached to the resolver + * Resolver.add( + * 'bunnyBooBooSmooth', + * 'bunny{png,webp}', + * {scaleMode:SCALE_MODES.NEAREST} // base texture options + * ); + * + * resolver.resolve('bunnyBooBooSmooth') // => {src: 'bunny.png', data: {scaleMode: SCALE_MODES.NEAREST}} + * @param keysIn - The keys to map, can be an array or a single key + * @param assetsIn - The assets to associate with the key(s) + * @param data - The data that will be attached to the object that resolved object. + */ + add(keysIn: string | string[], assetsIn: string | ResolveAsset | (ResolveAsset | string)[], data?: unknown): void; + /** + * If the resolver has had a manifest set via setManifest, this will return the assets urls for + * a given bundleId or bundleIds. + * @example + * // manifest example + * const manifest = { + * bundles:[{ + * name:'load-screen', + * assets:[ + * { + * name: 'background', + * srcs: 'sunset.png', + * }, + * { + * name: 'bar', + * srcs: 'load-bar.{png,webp}', + * } + * ] + * }, + * { + * name:'game-screen', + * assets:[ + * { + * name: 'character', + * srcs: 'robot.png', + * }, + * { + * name: 'enemy', + * srcs: 'bad-guy.png', + * } + * ] + * }] + * }} + * resolver.setManifest(manifest); + * const resolved = resolver.resolveBundle('load-screen'); + * @param bundleIds - The bundle ids to resolve + * @returns All the bundles assets or a hash of assets for each bundle specified + */ + resolveBundle(bundleIds: string | string[]): Record | Record>; + /** + * Does exactly what resolve does, but returns just the URL rather than the whole asset object + * @param key - The key or keys to resolve + * @returns - The URLs associated with the key(s) + */ + resolveUrl(key: string | string[]): string | Record; + /** + * Resolves each key in the list to an asset object. + * Another key function of the resolver! After adding all the various key/asset pairs. this will run the logic + * of finding which asset to return based on any preferences set using the `prefer` function + * by default the same key passed in will be returned if nothing is matched by the resolver. + * @example + * resolver.add('boo', 'bunny.png'); + * + * resolver.resolve('boo') // => {src:'bunny.png'} + * + * // will return the same string as no key was added for this value.. + * resolver.resolve('another-thing.png') // => {src:'another-thing.png'} + * @param keys - key or keys to resolve + * @returns - the resolve asset or a hash of resolve assets for each key specified + */ + resolve(keys: string | string[]): ResolveAsset | Record; + /** + * Internal function for figuring out what prefer criteria an asset should use. + * @param assets + */ + private _getPreferredOrder; +} + +export declare type ResolverAssetsArray = { + name: string | string[]; + srcs: string | ResolveAsset[]; +}[]; + +export declare type ResolverAssetsObject = Record; + +/** + * Structure of a bundle found in a manfest file + * @memberof PIXI + */ +export declare interface ResolverBundle { + name: string; + assets: ResolverAssetsArray | ResolverAssetsObject; +} + +/** + * The expected format of a manifest. This would normally be auto generated ar made by the developer + * @memberof PIXI + */ +export declare type ResolverManifest = { + bundles: ResolverBundle[]; +}; + +export declare const resolveSpriteSheetUrl: ResolveURLParser; + +export declare const resolveTextureUrl: ResolveURLParser; + +/** + * Format for url parser, will test a string and if it pass will then parse it, turning it into an ResolveAsset + * @memberof PIXI + */ +export declare interface ResolveURLParser { + extension?: ExtensionMetadata; + /** A config to adjust the parser */ + config?: Record; + /** the test to perform on the url to determin if it should be parsed */ + test: (url: string) => boolean; + /** the function that will convert the url into an object */ + parse: (value: string) => ResolveAsset; +} + +export { } diff --git a/Typescript/types/pixi/basis/index.d.ts b/Typescript/types/pixi/basis/index.d.ts new file mode 100644 index 0000000..3340d9d --- /dev/null +++ b/Typescript/types/pixi/basis/index.d.ts @@ -0,0 +1,402 @@ +import { BufferResource } from 'pixi/core'; +import { CompressedTextureResource } from 'pixi/compressed-textures'; +import type { ExtensionMetadata } from 'pixi/core'; +import { INTERNAL_FORMATS } from 'pixi/compressed-textures'; +import { LoaderResource } from 'pixi/loaders'; +import { TYPES } from 'pixi/constants'; + +/** + * Binding to basis_universal WebGL library. + * @see https://github.com/BinomialLLC/basis_universal/blob/master/webgl/transcoder/build/basis_transcoder.js + * @ignore + */ +export declare type BASIS = (opts?: { + wasmBinary: ArrayBuffer; +}) => Promise; + +/** + * Maps {@link BASIS_FORMATS} to {@link PIXI.INTERNAL_FORMATS} + * @ignore + */ +export declare const BASIS_FORMAT_TO_INTERNAL_FORMAT: { + [id: number]: INTERNAL_FORMATS; +}; + +/** + * Maps {@link BASIS_FORMATS} to {@link PIXI.TYPES}. These formats are a fallback when the basis file cannot be transcoded + * to a valid compressed texture format. + * + * NOTE: {@link BASIS_FORMATS.cTFBGR565} is not supported, while {@link BASIS_FORMATS.cTFRGBA4444} is not implemented by + * [at]pixi/basis. + * @ignore + */ +export declare const BASIS_FORMAT_TO_TYPE: { + [id: number]: TYPES; +}; + +/** + * The transcoding formats provided by basis_universal. + * + * NOTE: Not all of these formats are supported on WebGL! + * @ignore + */ +export declare enum BASIS_FORMATS { + cTFETC1 = 0, + cTFETC2 = 1, + cTFBC1 = 2, + cTFBC3 = 3, + cTFBC4 = 4, + cTFBC5 = 5, + cTFBC7 = 6, + cTFPVRTC1_4_RGB = 8, + cTFPVRTC1_4_RGBA = 9, + cTFASTC_4x4 = 10, + cTFATC_RGB = 11, + cTFATC_RGBA_INTERPOLATED_ALPHA = 12, + cTFRGBA32 = 13, + cTFRGB565 = 14, + cTFBGR565 = 15, + cTFRGBA4444 = 16 +} + +/** + * Enumerates the basis formats with alpha components + * @ignore + */ +export declare const BASIS_FORMATS_ALPHA: { + [id: number]: boolean; +}; + +/** + * API provided by basis_universal WebGL library. + * @ignore + */ +export declare type BasisBinding = { + BasisFile: typeof BasisFile; + initializeBasis(): void; +}; + +/** + * Binding to C++ {@code BasisFile} wrapper class. + * @see https://github.com/BinomialLLC/basis_universal/blob/master/webgl/transcoder/basis_wrappers.cpp + * @private + */ +export declare class BasisFile { + constructor(buffer: Uint8Array); + getNumImages(): number; + getNumLevels(imageId: number): number; + getImageWidth(imageId: number, level: number): number; + getImageHeight(imageId: number, level: number): number; + getHasAlpha(): boolean; + startTranscoding(): boolean; + getImageTranscodedSizeInBytes(imageId: number, level: number, basisFormat: number): number; + transcodeImage(dstBuff: Uint8Array, imageId: number, level: number, basisFormat: BASIS_FORMATS, pvrtcWrapAddressing: boolean, getAlphaForOpaqueFormats: boolean): number; + close(): void; + delete(): void; +} + +/** + * Loader plugin for handling BASIS supercompressed texture files. + * + * To use this loader, you must bind the basis_universal WebAssembly transcoder. There are two ways of + * doing this: + * + * 1. Adding a <script> tag to your HTML page to the transcoder bundle in this package, and serving + * the WASM binary from the same location. + * + * ```js + * // Copy ./node_modules/@pixi/basis/assets/basis_.wasm into your assets directory + * // as well, so it is served from the same folder as the JavaScript! + * <script src="./node_modules/@pixi/basis/assets/basis_transcoder.js" /> + * ``` + * + * NOTE: `basis_transcoder.js` expects the WebAssembly binary to be named `basis_transcoder.wasm`. + * NOTE-2: This method supports transcoding on the main-thread. Only use this if you have 1 or 2 *.basis + * files. + * + * 2. Loading the transcoder source from a URL. + * + * ```js + * // Use this if you to use the default CDN url for @pixi/basis + * BasisLoader.loadTranscoder(); + * + * // Use this if you want to serve the transcoder on your own + * BasisLoader.loadTranscoder('./basis_transcoder.js', './basis_transcoder.wasm'); + * ``` + * + * NOTE: This can only be used with web-workers. + * @class + * @memberof PIXI + * @implements {PIXI.ILoaderPlugin} + */ +export declare class BasisLoader { + /** @ignore */ + static extension: ExtensionMetadata; + /** + * Transcodes the *.basis data when the data is loaded. If the transcoder is not bound yet, it + * will hook transcoding to {@link BasisResource#onTranscoderInitialized}. + * @see PIXI.Loader.loaderMiddleware + * @param resource - loader resource that is checked to see if it is a basis file + * @param next - callback Function to call when done + */ + static use(resource: LoaderResource, next: (...args: any[]) => void): void; + /** + * Creates textures and adds them to the texture cache + * @private + * @param url - url of the texture to be used as its ID for the texture cache + * @param resources - the transcoded resources + * @param metadata - resource metadata + */ + private static registerTextures; + /** + * Binds the basis_universal transcoder to decompress *.basis files. You must initialize the transcoder library yourself. + * + * ```js + * import { BasisLoader } from 'pixi/basis'; + * import { Loader } from 'pixi/loaders'; + * + * // window.BASIS() returns a Promise-like object + * window.BASIS().then((basisLibrary) => + * { + * // Initialize basis-library; otherwise, transcoded results maybe corrupt! + * basisLibrary.initializeBasis(); + * + * // Bind BasisLoader to the transcoder + * BasisLoader.bindTranscoder(basisLibrary); + * }); + * ``` + * @param basisLibrary - the initialized transcoder library + * @private + */ + static bindTranscoder(basisLibrary: BasisBinding): void; + /** + * Loads the transcoder source code for use in {@link PIXI.BasisLoader.TranscoderWorker}. + * @private + * @param jsURL - URL to the javascript basis transcoder + * @param wasmURL - URL to the wasm basis transcoder + */ + static loadTranscoder(jsURL: string, wasmURL: string): Promise<[void, void]>; + /** + * Set the transcoder source code directly + * @private + * @param jsSource - source for the javascript basis transcoder + * @param wasmSource - source for the wasm basis transcoder + */ + static setTranscoder(jsSource: string, wasmSource: ArrayBuffer): void; +} + +/** + * Loader plugin for handling BASIS supercompressed texture files. + * + * To use this loader, you must bind the basis_universal WebAssembly transcoder. There are two ways of + * doing this: + * + * 1. Adding a <script> tag to your HTML page to the transcoder bundle in this package, and serving + * the WASM binary from the same location. + * + * ```js + * // Copy ./node_modules/@pixi/basis/assets/basis_.wasm into your assets directory + * // as well, so it is served from the same folder as the JavaScript! + * <script src="./node_modules/@pixi/basis/assets/basis_transcoder.js" /> + * ``` + * + * NOTE: `basis_transcoder.js` expects the WebAssembly binary to be named `basis_transcoder.wasm`. + * NOTE-2: This method supports transcoding on the main-thread. Only use this if you have 1 or 2 *.basis + * files. + * + * 2. Loading the transcoder source from a URL. + * + * ```js + * // Use this if you to use the default CDN url for @pixi/basis + * BasisParser.loadTranscoder(); + * + * // Use this if you want to serve the transcoder on your own + * BasisParser.loadTranscoder('./basis_transcoder.js', './basis_transcoder.wasm'); + * ``` + * + * NOTE: This can only be used with web-workers. + * @class + * @memberof PIXI + * @implements {PIXI.ILoaderPlugin} + */ +export declare class BasisParser { + /** @ignore */ + static extension: ExtensionMetadata; + static basisBinding: BasisBinding; + private static defaultRGBFormat; + private static defaultRGBAFormat; + private static fallbackMode; + private static workerPool; + /** + * Runs transcoding and populates {@link imageArray}. It will run the transcoding in a web worker + * if they are available. + * @private + */ + static transcode(arrayBuffer: ArrayBuffer): Promise; + /** + * Finds a suitable worker for transcoding and sends a transcoding request + * @private + * @async + */ + static transcodeAsync(arrayBuffer: ArrayBuffer): Promise; + /** + * Runs transcoding on the main thread. + * @private + */ + static transcodeSync(arrayBuffer: ArrayBuffer): TranscodedResourcesArray; + /** + * Detects the available compressed texture formats on the device. + * @param extensions - extensions provided by a WebGL context + * @ignore + */ + static autoDetectFormats(extensions?: Partial): void; + /** + * Binds the basis_universal transcoder to decompress *.basis files. You must initialize the transcoder library yourself. + * + * ```js + * import { BasisParser } from 'pixi/basis'; + * import { Loader } from 'pixi/loaders'; + * + * // window.BASIS() returns a Promise-like object + * window.BASIS().then((basisLibrary) => + * { + * // Initialize basis-library; otherwise, transcoded results maybe corrupt! + * basisLibrary.initializeBasis(); + * + * // Bind BasisParser to the transcoder + * BasisParser.bindTranscoder(basisLibrary); + * }); + * ``` + * @param basisLibrary - the initialized transcoder library + * @private + */ + static bindTranscoder(basisLibrary: BasisBinding): void; + /** + * Loads the transcoder source code for use in {@link PIXI.BasisParser.TranscoderWorker}. + * @private + * @param jsURL - URL to the javascript basis transcoder + * @param wasmURL - URL to the wasm basis transcoder + */ + static loadTranscoder(jsURL: string, wasmURL: string): Promise<[void, void]>; + /** + * Set the transcoder source code directly + * @private + * @param jsSource - source for the javascript basis transcoder + * @param wasmSource - source for the wasm basis transcoder + */ + static setTranscoder(jsSource: string, wasmSource: ArrayBuffer): void; + static TranscoderWorker: typeof TranscoderWorker; + static get TRANSCODER_WORKER_POOL_LIMIT(): number; + static set TRANSCODER_WORKER_POOL_LIMIT(limit: number); +} + +/** + * Compressed texture extensions relevant to the formats into which Basis can decompress into. + * @ignore + */ +export declare type BasisTextureExtensions = { + s3tc?: WEBGL_compressed_texture_s3tc; + s3tc_sRGB: WEBGL_compressed_texture_s3tc_srgb; + etc: any; + etc1: any; + pvrtc: any; + atc: any; + astc: WEBGL_compressed_texture_astc; +}; + +/** + * Maps {@link PIXI.INTERNAL_FORMATS} to {@link BASIS_FORMATS} + * @ignore + */ +export declare const INTERNAL_FORMAT_TO_BASIS_FORMAT: { + [id: number]: number; +}; + +/** + * Response format for {@link TranscoderWorker}. + * @ignore + */ +declare interface ITranscodeResponse { + type: 'init' | 'transcode'; + requestID?: number; + success: boolean; + basisFormat?: BASIS_FORMATS; + imageArray?: Array<{ + imageID: number; + levelArray: Array<{ + levelID: number; + levelWidth: number; + levelHeight: number; + levelBuffer: Uint8Array; + }>; + width: number; + height: number; + }>; +} + +export declare type TranscodedResourcesArray = (Array | Array) & { + basisFormat: BASIS_FORMATS; +}; + +/** + * Worker class for transcoding *.basis files in background threads. + * + * To enable asynchronous transcoding, you need to provide the URL to the basis_universal transcoding + * library. + * @memberof PIXI.BasisLoader + */ +export declare class TranscoderWorker { + /** URL for the script containing the basis_universal library. */ + static bindingURL: string; + static jsSource: string; + static wasmSource: ArrayBuffer; + private static _onTranscoderInitializedResolve; + /** a promise that when reslved means the transcoder is ready to be used */ + static onTranscoderInitialized: Promise; + isInit: boolean; + load: number; + requests: { + [id: number]: { + resolve: (data: ITranscodeResponse) => void; + reject: () => void; + }; + }; + private static _workerURL; + private static _tempID; + /** Generated URL for the transcoder worker script. */ + static get workerURL(): string; + protected worker: Worker; + protected initPromise: Promise; + protected onInit: () => void; + constructor(); + /** @returns a promise that is resolved when the web-worker is initialized */ + initAsync(): Promise; + /** + * Creates a promise that will resolve when the transcoding of a *.basis file is complete. + * @param basisData - *.basis file contents + * @param rgbaFormat - transcoding format for RGBA files + * @param rgbFormat - transcoding format for RGB files + * @returns a promise that is resolved with the transcoding response of the web-worker + */ + transcodeAsync(basisData: Uint8Array, rgbaFormat: BASIS_FORMATS, rgbFormat: BASIS_FORMATS): Promise; + /** + * Handles responses from the web-worker + * @param e - a message event containing the transcoded response + */ + protected onMessage: (e: MessageEvent) => void; + /** + * Loads the transcoder source code + * @param jsURL - URL to the javascript basis transcoder + * @param wasmURL - URL to the wasm basis transcoder + * @returns A promise that resolves when both the js and wasm transcoders have been loaded. + */ + static loadTranscoder(jsURL: string, wasmURL: string): Promise<[void, void]>; + /** + * Set the transcoder source code directly + * @param jsSource - source for the javascript basis transcoder + * @param wasmSource - source for the wasm basis transcoder + */ + static setTranscoder(jsSource: string, wasmSource: ArrayBuffer): void; +} + +export { } diff --git a/Typescript/types/pixi/canvas-display/global.d.ts b/Typescript/types/pixi/canvas-display/global.d.ts new file mode 100644 index 0000000..5132647 --- /dev/null +++ b/Typescript/types/pixi/canvas-display/global.d.ts @@ -0,0 +1,7 @@ +declare namespace GlobalMixins +{ + interface Container + { + _renderCanvas(renderer: import('pixi/canvas-renderer').CanvasRenderer): void; + } +} diff --git a/Typescript/types/pixi/canvas-display/index.d.ts b/Typescript/types/pixi/canvas-display/index.d.ts new file mode 100644 index 0000000..505f4e8 --- /dev/null +++ b/Typescript/types/pixi/canvas-display/index.d.ts @@ -0,0 +1,3 @@ +/// + +export { } diff --git a/Typescript/types/pixi/canvas-extract/index.d.ts b/Typescript/types/pixi/canvas-extract/index.d.ts new file mode 100644 index 0000000..7589ebe --- /dev/null +++ b/Typescript/types/pixi/canvas-extract/index.d.ts @@ -0,0 +1,63 @@ +import type { CanvasRenderer } from 'pixi/canvas-renderer'; +import type { DisplayObject } from 'pixi/display'; +import type { ExtensionMetadata } from 'pixi/core'; +import { Rectangle } from 'pixi/math'; +import { RenderTexture } from 'pixi/core'; + +/** + * The extract manager provides functionality to export content from the renderers. + * + * An instance of this class is automatically created by default, and can be found at `renderer.plugins.extract` + * @class + * @memberof PIXI + */ +export declare class CanvasExtract { + /** @ignore */ + static extension: ExtensionMetadata; + /** A reference to the current renderer */ + renderer: CanvasRenderer; + /** + * @param renderer - A reference to the current renderer + */ + constructor(renderer: CanvasRenderer); + /** + * Will return a HTML Image of the target + * @param target - A displayObject or renderTexture + * to convert. If left empty will use the main renderer + * @param format - Image format, e.g. "image/jpeg" or "image/webp". + * @param quality - JPEG or Webp compression from 0 to 1. Default is 0.92. + * @returns HTML Image of the target + */ + image(target?: DisplayObject | RenderTexture, format?: string, quality?: number): HTMLImageElement; + /** + * Will return a base64 encoded string of this target. It works by calling + * `CanvasExtract.getCanvas` and then running toDataURL on that. + * @param target - A displayObject or renderTexture + * to convert. If left empty will use the main renderer + * @param format - Image format, e.g. "image/jpeg" or "image/webp". + * @param quality - JPEG or Webp compression from 0 to 1. Default is 0.92. + * @returns A base64 encoded string of the texture. + */ + base64(target?: DisplayObject | RenderTexture, format?: string, quality?: number): string; + /** + * Creates a Canvas element, renders this target to it and then returns it. + * @param target - A displayObject or renderTexture + * to convert. If left empty will use the main renderer + * @param frame - The frame the extraction is restricted to. + * @returns A Canvas element with the texture rendered on. + */ + canvas(target?: DisplayObject | RenderTexture, frame?: Rectangle): HTMLCanvasElement; + /** + * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA + * order, with integer values between 0 and 255 (included). + * @param target - A displayObject or renderTexture + * to convert. If left empty will use the main renderer + * @param frame - The frame the extraction is restricted to. + * @returns One-dimensional array containing the pixel data of the entire texture + */ + pixels(target?: DisplayObject | RenderTexture, frame?: Rectangle): Uint8ClampedArray; + /** Destroys the extract */ + destroy(): void; +} + +export { } diff --git a/Typescript/types/pixi/canvas-graphics/global.d.ts b/Typescript/types/pixi/canvas-graphics/global.d.ts new file mode 100644 index 0000000..4e17b8b --- /dev/null +++ b/Typescript/types/pixi/canvas-graphics/global.d.ts @@ -0,0 +1,9 @@ +declare namespace GlobalMixins +{ + interface Graphics + { + _renderCanvas(renderer: import('pixi/canvas-renderer').CanvasRenderer): void; + generateCanvasTexture(scaleMode?: import('pixi/constants').SCALE_MODES, resolution?: number): Texture; + cachedGraphicsData: import('pixi/graphics').GraphicsData[]; + } +} diff --git a/Typescript/types/pixi/canvas-graphics/index.d.ts b/Typescript/types/pixi/canvas-graphics/index.d.ts new file mode 100644 index 0000000..b4a7d7d --- /dev/null +++ b/Typescript/types/pixi/canvas-graphics/index.d.ts @@ -0,0 +1,77 @@ +/// + +import type { CanvasRenderer } from 'pixi/canvas-renderer'; +import type { ExtensionMetadata } from 'pixi/core'; +import type { Graphics } from 'pixi/graphics'; +import { Matrix } from 'pixi/math'; + +/** + * Renderer dedicated to drawing and batching graphics objects. + * @class + * @protected + * @memberof PIXI + */ +export declare class CanvasGraphicsRenderer { + /** @ignore */ + static extension: ExtensionMetadata; + /** A reference to the current renderer */ + renderer: CanvasRenderer; + private _svgMatrix; + private _tempMatrix; + /** + * @param renderer - A reference to the current renderer. + */ + constructor(renderer: CanvasRenderer); + /** + * calculates fill/stroke style for canvas + * @private + * @param style - A graphics {@link PIXI.FILL_STYLE} where if `texture` is specified then a tinted CanvasPattern + * will be used for the fill.stroke + * @param tint - color to set the fill/stroke too. + */ + private _calcCanvasStyle; + /** + * Renders a Graphics object to a canvas. + * @param graphics - the actual graphics object to render + */ + render(graphics: Graphics): void; + /** + * Paint stroke for polygon and holes + * @private + * @param shape - Shape to be drawn + * @param lineStyle - Line style for the shape + * @param contextStrokeStyle - The strokeStyle for the canvas context + * @param holes - Holes to be added to the shape + * @param holesDirection - + * @param worldAlpha - The multiplied alpha of the displayObject + * @param context - The canvas context + */ + private paintPolygonStroke; + /** + * Paint Ellipse + * @private + * @param shape - Shape to be drawn + * @param fillStyle - Fill for the shape + * @param lineStyle - Line style for the shape + * @param contextFillStyle - The canvas context fill style + * @param worldAlpha - The multiplied alpha of the displayObject + * @param context - The canvas context + */ + private paintEllipse; + /** + * Paint Rounded Rectangle + * @private + * @param shape - Shape to be drawn + * @param fillStyle - Fill for the shape + * @param lineStyle - Line style for the shape + * @param contextFillStyle - The canvas context fill style + * @param worldAlpha - The multiplied alpha of the displayObject + * @param context - The canvas context + */ + private paintRoundedRectangle; + setPatternTransform(pattern: CanvasPattern, matrix: Matrix): void; + /** destroy graphics object */ + destroy(): void; +} + +export { } diff --git a/Typescript/types/pixi/canvas-mesh/global.d.ts b/Typescript/types/pixi/canvas-mesh/global.d.ts new file mode 100644 index 0000000..520a23c --- /dev/null +++ b/Typescript/types/pixi/canvas-mesh/global.d.ts @@ -0,0 +1,24 @@ +declare namespace GlobalMixins +{ + interface Mesh + { + _renderCanvas(renderer: import('pixi/canvas-renderer').CanvasRenderer): void; + _canvasPadding: number; + canvasPadding: number; + _cachedTint: number; + _tintedCanvas: HTMLCanvasElement; + _cachedTexture: import('pixi/core').Texture; + } + + interface MeshMaterial + { + _renderCanvas(renderer: import('pixi/canvas-renderer').CanvasRenderer, mesh: import('pixi/mesh').Mesh): void; + } + + interface NineSlicePlane + { + _cachedTint: number; + _tintedCanvas: HTMLCanvasElement; + _canvasUvs: number[]; + } +} diff --git a/Typescript/types/pixi/canvas-mesh/index.d.ts b/Typescript/types/pixi/canvas-mesh/index.d.ts new file mode 100644 index 0000000..13399aa --- /dev/null +++ b/Typescript/types/pixi/canvas-mesh/index.d.ts @@ -0,0 +1,56 @@ +/// + +import type { CanvasRenderer } from 'pixi/canvas-renderer'; +import type { ExtensionMetadata } from 'pixi/core'; +import type { Mesh } from 'pixi/mesh'; + +/** + * Renderer dedicated to meshes. + * @class + * @protected + * @memberof PIXI + */ +export declare class CanvasMeshRenderer { + /** @ignore */ + static extension: ExtensionMetadata; + /** A reference to the current renderer */ + renderer: CanvasRenderer; + /** @param renderer - A reference to the current renderer */ + constructor(renderer: CanvasRenderer); + /** + * Renders the Mesh + * @param mesh - the Mesh to render + */ + render(mesh: Mesh): void; + /** + * Draws the object in Triangle Mesh mode + * @private + * @param mesh - the Mesh to render + */ + private _renderTriangleMesh; + /** + * Draws the object in triangle mode using canvas + * @private + * @param mesh - the current mesh + */ + private _renderTriangles; + /** + * Draws one of the triangles that from the Mesh + * @private + * @param mesh - the current mesh + * @param index0 - the index of the first vertex + * @param index1 - the index of the second vertex + * @param index2 - the index of the third vertex + */ + private _renderDrawTriangle; + /** + * Renders a flat Mesh + * @private + * @param mesh - The Mesh to render + */ + renderMeshFlat(mesh: Mesh): void; + /** destroy the renderer */ + destroy(): void; +} + +export { } diff --git a/Typescript/types/pixi/canvas-particle-container/index.d.ts b/Typescript/types/pixi/canvas-particle-container/index.d.ts new file mode 100644 index 0000000..f0a766d --- /dev/null +++ b/Typescript/types/pixi/canvas-particle-container/index.d.ts @@ -0,0 +1 @@ +export { } diff --git a/Typescript/types/pixi/canvas-prepare/index.d.ts b/Typescript/types/pixi/canvas-prepare/index.d.ts new file mode 100644 index 0000000..a75ebf4 --- /dev/null +++ b/Typescript/types/pixi/canvas-prepare/index.d.ts @@ -0,0 +1,37 @@ +import { BasePrepare } from 'pixi/prepare'; +import type { CanvasRenderer } from 'pixi/canvas-renderer'; +import type { ExtensionMetadata } from 'pixi/core'; + +/** + * The prepare manager provides functionality to upload content to the GPU. + * + * This cannot be done directly for Canvas like in WebGL, but the effect can be achieved by drawing + * textures to an offline canvas. This draw call will force the texture to be moved onto the GPU. + * + * An instance of this class is automatically created by default, and can be found at `renderer.plugins.prepare` + * @class + * @extends PIXI.BasePrepare + * @memberof PIXI + */ +export declare class CanvasPrepare extends BasePrepare { + /** @ignore */ + static extension: ExtensionMetadata; + /** + * An offline canvas to render textures to + * @internal + */ + canvas: HTMLCanvasElement; + /** + * The context to the canvas + * @internal + */ + ctx: CanvasRenderingContext2D; + /** + * @param renderer - A reference to the current renderer + */ + constructor(renderer: CanvasRenderer); + /** Destroys the plugin, don't use after this */ + destroy(): void; +} + +export { } diff --git a/Typescript/types/pixi/canvas-renderer/global.d.ts b/Typescript/types/pixi/canvas-renderer/global.d.ts new file mode 100644 index 0000000..88baaa0 --- /dev/null +++ b/Typescript/types/pixi/canvas-renderer/global.d.ts @@ -0,0 +1,51 @@ +declare namespace GlobalMixins +{ + interface BaseTexture + { + getDrawableSource?(): CanvasImageSource; + } + + interface Texture + { + patternCache?: { [key: string]: CanvasPattern }; + tintCache?: { [key: string]: HTMLCanvasElement | HTMLImageElement }; + } + + interface BaseRenderTexture + { + _canvasRenderTarget: import('pixi/utils').CanvasRenderTarget; + } + + interface GlobalTintable + { + tintId?: number; + } + + interface DisplayObject + { + renderCanvas?(renderer: import('pixi/canvas-renderer').CanvasRenderer): void; + } + + interface IRendererOptions + { + forceCanvas?: boolean; + } +} + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +declare interface CanvasPattern extends GlobalMixins.GlobalTintable +{ + +} + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +declare interface HTMLCanvasElement extends GlobalMixins.GlobalTintable +{ + +} + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +declare interface HTMLImageElement extends GlobalMixins.GlobalTintable +{ + +} diff --git a/Typescript/types/pixi/canvas-renderer/index.d.ts b/Typescript/types/pixi/canvas-renderer/index.d.ts new file mode 100644 index 0000000..e732ca2 --- /dev/null +++ b/Typescript/types/pixi/canvas-renderer/index.d.ts @@ -0,0 +1,313 @@ +/// + +import { AbstractRenderer } from 'pixi/core'; +import { BaseRenderTexture } from 'pixi/core'; +import { BLEND_MODES } from 'pixi/constants'; +import type { Container } from 'pixi/display'; +import type { DisplayObject } from 'pixi/display'; +import type { Graphics } from 'pixi/graphics'; +import type { IRendererOptions } from 'pixi/core'; +import type { IRendererPlugin } from 'pixi/core'; +import type { IRendererPlugins } from 'pixi/core'; +import type { IRendererRenderOptions } from 'pixi/core'; +import type { MaskData } from 'pixi/core'; +import { Matrix } from 'pixi/math'; +import { RenderTexture } from 'pixi/core'; +import type { Texture } from 'pixi/core'; + +/** + * Checks whether the Canvas BlendModes are supported by the current browser + * @private + * @returns {boolean} whether they are supported + */ +export declare function canUseNewCanvasBlendModes(): boolean; + +/** + * A set of functions used to handle masking. + * + * Sprite masking is not supported on the CanvasRenderer. + * @class + * @memberof PIXI + */ +declare class CanvasMaskManager { + /** A reference to the current renderer */ + private renderer; + private _foundShapes; + /** @param renderer - A reference to the current renderer */ + constructor(renderer: CanvasRenderer); + /** + * This method adds it to the current stack of masks. + * @param maskData - the maskData that will be pushed + */ + pushMask(maskData: MaskData | Graphics): void; + /** + * Renders all PIXI.Graphics shapes in a subtree. + * @param container - container to scan. + * @param out - where to put found shapes + */ + recursiveFindShapes(container: Container, out: Array): void; + /** + * Renders a PIXI.Graphics shape. + * @param graphics - The object to render. + */ + renderGraphicsShape(graphics: Graphics): void; + /** + * Restores the current drawing context to the state it was before the mask was applied. + * @param renderer - The renderer context to use. + */ + popMask(renderer: CanvasRenderer): void; + /** Destroys this canvas mask manager. */ + destroy(): void; +} + +/** + * The CanvasRenderer draws the scene and all its content onto a 2d canvas. + * + * This renderer should be used for browsers that do not support WebGL. + * Don't forget to add the CanvasRenderer.view to your DOM or you will not see anything! + * @class + * @memberof PIXI + * @extends PIXI.AbstractRenderer + */ +export declare class CanvasRenderer extends AbstractRenderer { + /** + * Fired after rendering finishes. + * @event PIXI.CanvasRenderer#postrender + */ + /** + * Fired before rendering starts. + * @event PIXI.CanvasRenderer#prerender + */ + /** The root canvas 2d context that everything is drawn with. */ + readonly rootContext: CrossPlatformCanvasRenderingContext2D; + /** The currently active canvas 2d context (could change with renderTextures) */ + context: CrossPlatformCanvasRenderingContext2D; + /** Boolean flag controlling canvas refresh. */ + refresh: boolean; + /** + * Instance of a CanvasMaskManager, handles masking when using the canvas renderer. + * @member {PIXI.CanvasMaskManager} + */ + maskManager: CanvasMaskManager; + /** The canvas property used to set the canvas smoothing property. */ + smoothProperty: SmoothingEnabledProperties; + /** Tracks the blend modes useful for this renderer. */ + readonly blendModes: string[]; + renderingToScreen: boolean; + private _activeBlendMode; + /** Projection transform, passed in render() stored here */ + private _projTransform; + /** @private */ + _outerBlend: boolean; + /** + * @param {PIXI.IRendererOptions} [options] - The optional renderer parameters. + * @param {boolean} [options.autoDensity=false] - + * Whether the CSS dimensions of the renderer's view should be resized automatically. + * @param {number} [options.backgroundAlpha=1] - + * Transparency of the background color, value from `0` (fully transparent) to `1` (fully opaque). + * @param {number} [options.backgroundColor=0x000000] - + * The background color used to clear the canvas. It accepts hex numbers (e.g. `0xff0000`). + * @param {boolean} [options.clearBeforeRender=true] - Whether to clear the canvas before new render passes. + * @param {number} [options.height=600] - The height of the renderer's view. + * @param {number} [options.resolution=PIXI.settings.RESOLUTION] - + * The resolution / device pixel ratio of the renderer. + * @param {boolean} [options.transparent] - + * **Deprecated since 6.0.0, Use `backgroundAlpha` instead.** \ + * `true` sets `backgroundAlpha` to `0`, `false` sets `backgroundAlpha` to `1`. + * @param {boolean} [options.useContextAlpha=true] - + * Pass-through value for canvas' context attribute `alpha`. This option is for cases where the + * canvas needs to be opaque, possibly for performance reasons on some older devices. + * If you want to set transparency, please use `backgroundAlpha`. + * @param {HTMLCanvasElement} [options.view=null] - + * The canvas to use as the view. If omitted, a new canvas will be created. + * @param {number} [options.width=800] - The width of the renderer's view. + */ + constructor(options?: IRendererOptions); + /** Adds a new system to the renderer. It does nothing in the CanvasRenderer. */ + addSystem(): this; + /** + * Renders the object to its WebGL view. + * @param displayObject - The object to be rendered. + * @param options - Object to use for render options. + * @param {PIXI.RenderTexture} [options.renderTexture] - The render texture to render to. + * @param {boolean} [options.clear=true] - Should the canvas be cleared before the new render. + * @param {PIXI.Matrix} [options.transform] - A transform to apply to the render texture before rendering. + * @param {boolean} [options.skipUpdateTransform=false] - Should we skip the update transform pass? + */ + render(displayObject: DisplayObject, options?: IRendererRenderOptions): void; + /** + * Please use the `option` render arguments instead. + * @deprecated Since 6.0.0 + * @param displayObject - The object to be rendered. + * @param renderTexture - The render texture to render to. + * @param clear - Should the canvas be cleared before the new render. + * @param transform - A transform to apply to the render texture before rendering. + * @param skipUpdateTransform - Should we skip the update transform pass? + */ + render(displayObject: DisplayObject, renderTexture?: RenderTexture | BaseRenderTexture, clear?: boolean, transform?: Matrix, skipUpdateTransform?: boolean): void; + /** + * Sets matrix of context. + * called only from render() methods + * takes care about resolution + * @param transform - world matrix of current element + * @param roundPixels - whether to round (tx,ty) coords + * @param localResolution - If specified, used instead of `renderer.resolution` for local scaling + */ + setContextTransform(transform: Matrix, roundPixels?: boolean, localResolution?: number): void; + /** + * Clear the canvas of renderer. + * @param {string} [clearColor] - Clear the canvas with this color, except the canvas is transparent. + * @param {number} [alpha] - Alpha to apply to the background fill color. + */ + clear(clearColor?: string, alpha?: number): void; + /** + * Sets the blend mode of the renderer. + * @param {number} blendMode - See {@link PIXI.BLEND_MODES} for valid values. + * @param {boolean} [readyForOuterBlend=false] - Some blendModes are dangerous, they affect outer space of sprite. + * Pass `true` only if you are ready to use them. + */ + setBlendMode(blendMode: BLEND_MODES, readyForOuterBlend?: boolean): void; + /** + * Removes everything from the renderer and optionally removes the Canvas DOM element. + * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM. + */ + destroy(removeView?: boolean): void; + /** + * Resizes the canvas view to the specified width and height. + * @extends PIXI.AbstractRenderer#resize + * @param desiredScreenWidth - the desired width of the screen + * @param desiredScreenHeight - the desired height of the screen + */ + resize(desiredScreenWidth: number, desiredScreenHeight: number): void; + /** Checks if blend mode has changed. */ + invalidateBlendMode(): void; + static __plugins: IRendererPlugins; + /** + * Collection of installed plugins. These are included by default in PIXI, but can be excluded + * by creating a custom build. Consult the README for more information about creating custom + * builds and excluding plugins. + * @member {object} plugins + * @readonly + * @property {PIXI.AccessibilityManager} accessibility Support tabbing interactive elements. + * @property {PIXI.CanvasExtract} extract Extract image data from renderer. + * @property {PIXI.InteractionManager} interaction Handles mouse, touch and pointer events. + * @property {PIXI.CanvasPrepare} prepare Pre-render display objects. + */ + /** + * Use the {@link PIXI.extensions.add} API to register plugins. + * @deprecated since 6.5.0 + * @param pluginName - The name of the plugin. + * @param ctor - The constructor function or class for the plugin. + */ + static registerPlugin(pluginName: string, ctor: ICanvasRendererPluginConstructor): void; +} + +/** + * Utility methods for Sprite/Texture tinting. + * + * Tinting with the CanvasRenderer involves creating a new canvas to use as a texture, + * so be aware of the performance implications. + * @namespace PIXI.canvasUtils + * @memberof PIXI + */ +export declare const canvasUtils: { + canvas: HTMLCanvasElement; + /** + * Basically this method just needs a sprite and a color and tints the sprite with the given color. + * @memberof PIXI.canvasUtils + * @param {PIXI.Sprite} sprite - the sprite to tint + * @param sprite.texture + * @param {number} color - the color to use to tint the sprite with + * @returns {HTMLCanvasElement} The tinted canvas + */ + getTintedCanvas: (sprite: { + texture: Texture; + }, color: number) => HTMLCanvasElement | HTMLImageElement; + /** + * Basically this method just needs a sprite and a color and tints the sprite with the given color. + * @memberof PIXI.canvasUtils + * @param {PIXI.Texture} texture - the sprite to tint + * @param {number} color - the color to use to tint the sprite with + * @returns {HTMLCanvasElement} The tinted canvas + */ + getTintedPattern: (texture: Texture, color: number) => CanvasPattern; + /** + * Tint a texture using the 'multiply' operation. + * @memberof PIXI.canvasUtils + * @param {PIXI.Texture} texture - the texture to tint + * @param {number} color - the color to use to tint the sprite with + * @param {HTMLCanvasElement} canvas - the current canvas + */ + tintWithMultiply: (texture: Texture, color: number, canvas: HTMLCanvasElement) => void; + /** + * Tint a texture using the 'overlay' operation. + * @memberof PIXI.canvasUtils + * @param {PIXI.Texture} texture - the texture to tint + * @param {number} color - the color to use to tint the sprite with + * @param {HTMLCanvasElement} canvas - the current canvas + */ + tintWithOverlay: (texture: Texture, color: number, canvas: HTMLCanvasElement) => void; + /** + * Tint a texture pixel per pixel. + * @memberof PIXI.canvasUtils + * @param {PIXI.Texture} texture - the texture to tint + * @param {number} color - the color to use to tint the sprite with + * @param {HTMLCanvasElement} canvas - the current canvas + */ + tintWithPerPixel: (texture: Texture, color: number, canvas: HTMLCanvasElement) => void; + /** + * Rounds the specified color according to the canvasUtils.cacheStepsPerColorChannel. + * @memberof PIXI.canvasUtils + * @param {number} color - the color to round, should be a hex color + * @returns {number} The rounded color. + */ + roundColor: (color: number) => number; + /** + * Number of steps which will be used as a cap when rounding colors. + * @memberof PIXI.canvasUtils + * @type {number} + */ + cacheStepsPerColorChannel: number; + /** + * Tint cache boolean flag. + * @memberof PIXI.canvasUtils + * @type {boolean} + */ + convertTintToImage: boolean; + /** + * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. + * @memberof PIXI.canvasUtils + * @type {boolean} + */ + canUseMultiply: boolean; + /** + * The tinting method that will be used. + * @memberof PIXI.canvasUtils + * @type {Function} + */ + tintMethod: (texture: Texture, color: number, canvas: HTMLCanvasElement) => void; +}; + +/** + * Rendering context for all browsers. This includes platform-specific + * properties that are not included in the spec for CanvasRenderingContext2D + * @private + */ +export declare interface CrossPlatformCanvasRenderingContext2D extends CanvasRenderingContext2D { + webkitImageSmoothingEnabled: boolean; + mozImageSmoothingEnabled: boolean; + oImageSmoothingEnabled: boolean; + msImageSmoothingEnabled: boolean; +} + +export declare interface ICanvasRendererPluginConstructor { + new (renderer: CanvasRenderer, options?: any): IRendererPlugin; +} + +export declare interface ICanvasRendererPlugins { + [key: string]: any; +} + +declare type SmoothingEnabledProperties = 'imageSmoothingEnabled' | 'webkitImageSmoothingEnabled' | 'mozImageSmoothingEnabled' | 'oImageSmoothingEnabled' | 'msImageSmoothingEnabled'; + +export { } diff --git a/Typescript/types/pixi/canvas-sprite-tiling/global.d.ts b/Typescript/types/pixi/canvas-sprite-tiling/global.d.ts new file mode 100644 index 0000000..011547f --- /dev/null +++ b/Typescript/types/pixi/canvas-sprite-tiling/global.d.ts @@ -0,0 +1,7 @@ +declare namespace GlobalMixins +{ + interface TilingSprite + { + _canvasPattern: CanvasPattern; + } +} diff --git a/Typescript/types/pixi/canvas-sprite-tiling/index.d.ts b/Typescript/types/pixi/canvas-sprite-tiling/index.d.ts new file mode 100644 index 0000000..505f4e8 --- /dev/null +++ b/Typescript/types/pixi/canvas-sprite-tiling/index.d.ts @@ -0,0 +1,3 @@ +/// + +export { } diff --git a/Typescript/types/pixi/canvas-sprite/global.d.ts b/Typescript/types/pixi/canvas-sprite/global.d.ts new file mode 100644 index 0000000..fba337d --- /dev/null +++ b/Typescript/types/pixi/canvas-sprite/global.d.ts @@ -0,0 +1,8 @@ +declare namespace GlobalMixins +{ + interface Sprite + { + _tintedCanvas: HTMLCanvasElement | HTMLImageElement; + _renderCanvas(renderer: import('pixi/canvas-renderer').CanvasRenderer): void; + } +} diff --git a/Typescript/types/pixi/canvas-sprite/index.d.ts b/Typescript/types/pixi/canvas-sprite/index.d.ts new file mode 100644 index 0000000..f983059 --- /dev/null +++ b/Typescript/types/pixi/canvas-sprite/index.d.ts @@ -0,0 +1,34 @@ +/// + +import type { CanvasRenderer } from 'pixi/canvas-renderer'; +import type { ExtensionMetadata } from 'pixi/core'; +import type { Sprite } from 'pixi/sprite'; + +/** + * Types that can be passed to drawImage + * @typedef {HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap} ICanvasImageSource + * @memberof PIXI + */ +/** + * Renderer dedicated to drawing and batching sprites. + * @class + * @protected + * @memberof PIXI + */ +export declare class CanvasSpriteRenderer { + /** @ignore */ + static extension: ExtensionMetadata; + /** A reference to the current renderer */ + protected renderer: CanvasRenderer; + /** @param renderer - A reference to the current renderer */ + constructor(renderer: CanvasRenderer); + /** + * Renders the sprite object. + * @param sprite - the sprite to render when using this spritebatch + */ + render(sprite: Sprite): void; + /** destroy the sprite object */ + destroy(): void; +} + +export { } diff --git a/Typescript/types/pixi/canvas-text/index.d.ts b/Typescript/types/pixi/canvas-text/index.d.ts new file mode 100644 index 0000000..f0a766d --- /dev/null +++ b/Typescript/types/pixi/canvas-text/index.d.ts @@ -0,0 +1 @@ +export { } diff --git a/Typescript/types/pixi/compressed-textures/global.d.ts b/Typescript/types/pixi/compressed-textures/global.d.ts new file mode 100644 index 0000000..156f0dc --- /dev/null +++ b/Typescript/types/pixi/compressed-textures/global.d.ts @@ -0,0 +1,8 @@ +declare namespace GlobalMixins +{ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface BaseTexture + { + ktxKeyValueData: Map; + } +} diff --git a/Typescript/types/pixi/compressed-textures/index.d.ts b/Typescript/types/pixi/compressed-textures/index.d.ts new file mode 100644 index 0000000..ca06454 --- /dev/null +++ b/Typescript/types/pixi/compressed-textures/index.d.ts @@ -0,0 +1,420 @@ +/// + +import type { BaseTexture } from 'pixi/core'; +import { BufferResource } from 'pixi/core'; +import type { ExtensionMetadata } from 'pixi/core'; +import { FORMATS } from 'pixi/constants'; +import type { GLTexture } from 'pixi/core'; +import { LoaderResource } from 'pixi/loaders'; +import type { Renderer } from 'pixi/core'; +import type { Resource } from 'pixi/core'; +import { TYPES } from 'pixi/constants'; +import { ViewableBuffer } from 'pixi/core'; + +/** + * Resource that fetches texture data over the network and stores it in a buffer. + * @class + * @extends PIXI.Resource + * @memberof PIXI + */ +export declare abstract class BlobResource extends BufferResource { + protected origin: string; + protected buffer: ViewableBuffer; + protected loaded: boolean; + /** + * @param {string} source - the URL of the texture file + * @param {PIXI.IBlobOptions} options + * @param {boolean}[options.autoLoad] - whether to fetch the data immediately; + * you can fetch it later via {@link BlobResource#load} + * @param {boolean}[options.width] - the width in pixels. + * @param {boolean}[options.height] - the height in pixels. + */ + constructor(source: string | Uint8Array | Uint32Array | Float32Array, options?: IBlobOptions); + protected onBlobLoaded(_data: ArrayBuffer): void; + /** Loads the blob */ + load(): Promise; +} + +/** + * @ignore + */ +export declare type CompressedLevelBuffer = { + levelID: number; + levelWidth: number; + levelHeight: number; + levelBuffer: Uint8Array; +}; + +export declare type CompressedTextureExtensionRef = keyof CompressedTextureExtensions; + +/** Compressed texture extensions */ +export declare type CompressedTextureExtensions = { + s3tc?: WEBGL_compressed_texture_s3tc; + s3tc_sRGB: WEBGL_compressed_texture_s3tc_srgb; + etc: any; + etc1: any; + pvrtc: any; + atc: any; + astc: WEBGL_compressed_texture_astc; +}; + +/** + * Loader plugin for handling compressed textures for all platforms. + * @class + * @memberof PIXI + * @implements {PIXI.ILoaderPlugin} + */ +export declare class CompressedTextureLoader { + /** @ignore */ + static extension: ExtensionMetadata; + /** Map of available texture extensions. */ + private static _textureExtensions; + /** Map of available texture formats. */ + private static _textureFormats; + /** + * Called after a compressed-textures manifest is loaded. + * + * This will then load the correct compression format for the device. Your manifest should adhere + * to the following schema: + * + * ```js + * import { INTERNAL_FORMATS } from 'pixi/constants'; + * + * type CompressedTextureManifest = { + * textures: Array<{ src: string, format?: keyof INTERNAL_FORMATS}>, + * cacheID: string; + * }; + * ``` + * + * This is an example of a .json manifest file + * + * ```json + * { + * "cacheID":"asset", + * "textures":[ + * { "src":"asset.fallback.png" }, + * { "format":"COMPRESSED_RGBA_S3TC_DXT5_EXT", "src":"asset.s3tc.ktx" }, + * { "format":"COMPRESSED_RGBA8_ETC2_EAC", "src":"asset.etc.ktx" }, + * { "format":"RGBA_PVRTC_4BPPV1_IMG", "src":"asset.pvrtc.ktx" } + * ] + * } + * ``` + */ + static use(resource: LoaderResource, next: (...args: any[]) => void): void; + /** Map of available texture extensions. */ + static get textureExtensions(): Partial; + /** Map of available texture formats. */ + static get textureFormats(): { + [P in keyof INTERNAL_FORMATS]?: number; + }; +} + +/** + * Schema for compressed-texture manifests + * @ignore + * @see PIXI.CompressedTextureLoader + */ +export declare type CompressedTextureManifest = { + textures: Array<{ + src: string; + format?: keyof INTERNAL_FORMATS; + }>; + cacheID: string; +}; + +/** + * Resource for compressed texture formats, as follows: S3TC/DXTn (& their sRGB formats), ATC, ASTC, ETC 1/2, PVRTC. + * + * Compressed textures improve performance when rendering is texture-bound. The texture data stays compressed in + * graphics memory, increasing memory locality and speeding up texture fetches. These formats can also be used to store + * more detail in the same amount of memory. + * + * For most developers, container file formats are a better abstraction instead of directly handling raw texture + * data. PixiJS provides native support for the following texture file formats (via {@link PIXI.Loader}): + * + * **.dds** - the DirectDraw Surface file format stores DXTn (DXT-1,3,5) data. See {@link PIXI.DDSLoader} + * **.ktx** - the Khronos Texture Container file format supports storing all the supported WebGL compression formats. + * See {@link PIXI.KTXLoader}. + * **.basis** - the BASIS supercompressed file format stores texture data in an internal format that is transcoded + * to the compression format supported on the device at _runtime_. It also supports transcoding into a uncompressed + * format as a fallback; you must install the `@pixi/basis-loader`, `@pixi/basis-transcoder` packages separately to + * use these files. See {@link PIXI.BasisLoader}. + * + * The loaders for the aforementioned formats use `CompressedTextureResource` internally. It is strongly suggested that + * they be used instead. + * + * ## Working directly with CompressedTextureResource + * + * Since `CompressedTextureResource` inherits `BlobResource`, you can provide it a URL pointing to a file containing + * the raw texture data (with no file headers!): + * + * ```js + * // The resource backing the texture data for your textures. + * // NOTE: You can also provide a ArrayBufferView instead of a URL. This is used when loading data from a container file + * // format such as KTX, DDS, or BASIS. + * const compressedResource = new PIXI.CompressedTextureResource("bunny.dxt5", { + * format: PIXI.INTERNAL_FORMATS.COMPRESSED_RGBA_S3TC_DXT5_EXT, + * width: 256, + * height: 256 + * }); + * + * // You can create a base-texture to the cache, so that future `Texture`s can be created using the `Texture.from` API. + * const baseTexture = new PIXI.BaseTexture(compressedResource, { pmaMode: PIXI.ALPHA_MODES.NPM }); + * + * // Create a Texture to add to the TextureCache + * const texture = new PIXI.Texture(baseTexture); + * + * // Add baseTexture & texture to the global texture cache + * PIXI.BaseTexture.addToCache(baseTexture, "bunny.dxt5"); + * PIXI.Texture.addToCache(texture, "bunny.dxt5"); + * ``` + * @memberof PIXI + */ +export declare class CompressedTextureResource extends BlobResource { + /** The compression format */ + format: INTERNAL_FORMATS; + /** + * The number of mipmap levels stored in the resource buffer. + * @default 1 + */ + levels: number; + private _extension; + private _levelBuffers; + /** + * @param source - the buffer/URL holding the compressed texture data + * @param options + * @param {PIXI.INTERNAL_FORMATS} options.format - the compression format + * @param {number} options.width - the image width in pixels. + * @param {number} options.height - the image height in pixels. + * @param {number} [options.level=1] - the mipmap levels stored in the compressed texture, including level 0. + * @param {number} [options.levelBuffers] - the buffers for each mipmap level. `CompressedTextureResource` can allows you + * to pass `null` for `source`, for cases where each level is stored in non-contiguous memory. + */ + constructor(source: string | Uint8Array | Uint32Array, options: ICompressedTextureResourceOptions); + /** + * @override + * @param renderer - A reference to the current renderer + * @param _texture - the texture + * @param _glTexture - texture instance for this webgl context + */ + upload(renderer: Renderer, _texture: BaseTexture, _glTexture: GLTexture): boolean; + /** @protected */ + protected onBlobLoaded(): void; + /** + * Returns the key (to ContextSystem#extensions) for the WebGL extension supporting the compression format + * @private + * @param format - the compression format to get the extension for. + */ + private static _formatToExtension; + /** + * Pre-creates buffer views for each mipmap level + * @private + * @param buffer - + * @param format - compression formats + * @param levels - mipmap levels + * @param blockWidth - + * @param blockHeight - + * @param imageWidth - width of the image in pixels + * @param imageHeight - height of the image in pixels + */ + private static _createLevelBuffers; +} + +/** + * @class + * @memberof PIXI + * @implements {PIXI.ILoaderPlugin} + * @see https://docs.microsoft.com/en-us/windows/win32/direct3ddds/dx-graphics-dds-pguide + */ +export declare class DDSLoader { + /** @ignore */ + static extension: ExtensionMetadata; + /** + * Registers a DDS compressed texture + * @see PIXI.Loader.loaderMiddleware + * @param resource - loader resource that is checked to see if it is a DDS file + * @param next - callback Function to call when done + */ + static use(resource: LoaderResource, next: (...args: any[]) => void): void; +} + +/** + * Number of components in each {@link PIXI.FORMATS} + * @ignore + */ +export declare const FORMATS_TO_COMPONENTS: { + [id: number]: number; +}; + +declare interface IBlobOptions { + autoLoad?: boolean; + width: number; + height: number; +} + +/** + * @ignore + */ +export declare interface ICompressedTextureResourceOptions { + format: INTERNAL_FORMATS; + width: number; + height: number; + levels?: number; + levelBuffers?: CompressedLevelBuffer[]; +} + +/** + * Maps the compressed texture formats in {@link PIXI.INTERNAL_FORMATS} to the number of bytes taken by + * each texel. + * @memberof PIXI + * @static + * @ignore + */ +export declare const INTERNAL_FORMAT_TO_BYTES_PER_PIXEL: { + [id: number]: number; +}; + +/** + * WebGL internal formats, including compressed texture formats provided by extensions + * @memberof PIXI + * @static + * @name INTERNAL_FORMATS + * @enum {number} + * @property {number} [COMPRESSED_RGB_S3TC_DXT1_EXT=0x83F0] - + * @property {number} [COMPRESSED_RGBA_S3TC_DXT1_EXT=0x83F1] - + * @property {number} [COMPRESSED_RGBA_S3TC_DXT3_EXT=0x83F2] - + * @property {number} [COMPRESSED_RGBA_S3TC_DXT5_EXT=0x83F3] - + * @property {number} [COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917] - + * @property {number} [COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918] - + * @property {number} [COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919] - + * @property {number} [COMPRESSED_SRGB_S3TC_DXT1_EXT=35916] - + * @property {number} [COMPRESSED_R11_EAC=0x9270] - + * @property {number} [COMPRESSED_SIGNED_R11_EAC=0x9271] - + * @property {number} [COMPRESSED_RG11_EAC=0x9272] - + * @property {number} [COMPRESSED_SIGNED_RG11_EAC=0x9273] - + * @property {number} [COMPRESSED_RGB8_ETC2=0x9274] - + * @property {number} [COMPRESSED_RGBA8_ETC2_EAC=0x9278] - + * @property {number} [COMPRESSED_SRGB8_ETC2=0x9275] - + * @property {number} [COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=0x9279] - + * @property {number} [COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=0x9276] - + * @property {number} [COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=0x9277] - + * @property {number} [COMPRESSED_RGB_PVRTC_4BPPV1_IMG=0x8C00] - + * @property {number} [COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=0x8C02] - + * @property {number} [COMPRESSED_RGB_PVRTC_2BPPV1_IMG=0x8C01] - + * @property {number} [COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=0x8C03] - + * @property {number} [COMPRESSED_RGB_ETC1_WEBGL=0x8D64] - + * @property {number} [COMPRESSED_RGB_ATC_WEBGL=0x8C92] - + * @property {number} [COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=0x8C92] - + * @property {number} [COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=0x87EE] - + * @property {number} [COMPRESSED_RGBA_ASTC_4x4_KHR=0x93B0] - + */ +export declare enum INTERNAL_FORMATS { + COMPRESSED_RGB_S3TC_DXT1_EXT = 33776, + COMPRESSED_RGBA_S3TC_DXT1_EXT = 33777, + COMPRESSED_RGBA_S3TC_DXT3_EXT = 33778, + COMPRESSED_RGBA_S3TC_DXT5_EXT = 33779, + COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 35917, + COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 35918, + COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 35919, + COMPRESSED_SRGB_S3TC_DXT1_EXT = 35916, + COMPRESSED_R11_EAC = 37488, + COMPRESSED_SIGNED_R11_EAC = 37489, + COMPRESSED_RG11_EAC = 37490, + COMPRESSED_SIGNED_RG11_EAC = 37491, + COMPRESSED_RGB8_ETC2 = 37492, + COMPRESSED_RGBA8_ETC2_EAC = 37496, + COMPRESSED_SRGB8_ETC2 = 37493, + COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 37497, + COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37494, + COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37495, + COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 35840, + COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 35842, + COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 35841, + COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 35843, + COMPRESSED_RGB_ETC1_WEBGL = 36196, + COMPRESSED_RGB_ATC_WEBGL = 35986, + COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL = 35986, + COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL = 34798, + COMPRESSED_RGBA_ASTC_4x4_KHR = 37808 +} + +/** + * Loader plugin for handling KTX texture container files. + * + * This KTX loader does not currently support the following features: + * * cube textures + * * 3D textures + * * endianness conversion for big-endian machines + * * embedded *.basis files + * + * It does supports the following features: + * * multiple textures per file + * * mipmapping (only for compressed formats) + * * vendor-specific key/value data parsing (enable {@link PIXI.KTXLoader.loadKeyValueData}) + * @class + * @memberof PIXI + * @implements {PIXI.ILoaderPlugin} + */ +export declare class KTXLoader { + /** @ignore */ + static extension: ExtensionMetadata; + /** + * If set to `true`, {@link PIXI.KTXLoader} will parse key-value data in KTX textures. This feature relies + * on the [Encoding Standard]{@link https://encoding.spec.whatwg.org}. + * + * The key-value data will be available on the base-textures as {@code PIXI.BaseTexture.ktxKeyValueData}. They + * will hold a reference to the texture data buffer, so make sure to delete key-value data once you are done + * using it. + */ + static loadKeyValueData: boolean; + /** + * Called after a KTX file is loaded. + * + * This will parse the KTX file header and add a {@code BaseTexture} to the texture + * cache. + * @see PIXI.Loader.loaderMiddleware + * @param resource - loader resource that is checked to see if it is a KTX file + * @param next - callback Function to call when done + */ + static use(resource: LoaderResource, next: (...args: any[]) => void): void; +} + +/** + * @class + * @memberof PIXI + * @implements {PIXI.ILoaderPlugin} + * @see https://docs.microsoft.com/en-us/windows/win32/direct3ddds/dx-graphics-dds-pguide + */ +/** + * Parses the DDS file header, generates base-textures, and puts them into the texture cache. + * @param arrayBuffer + */ +export declare function parseDDS(arrayBuffer: ArrayBuffer): CompressedTextureResource[]; + +export declare function parseKTX(url: string, arrayBuffer: ArrayBuffer, loadKeyValueData?: boolean): { + compressed?: CompressedTextureResource[]; + uncompressed?: { + resource: BufferResource; + type: TYPES; + format: FORMATS; + }[]; + kvData: Map | null; +}; + +/** + * Maps {@link PIXI.TYPES} to the bytes taken per component, excluding those ones that are bit-fields. + * @ignore + */ +export declare const TYPES_TO_BYTES_PER_COMPONENT: { + [id: number]: number; +}; + +/** + * Number of bytes per pixel in bit-field types in {@link PIXI.TYPES} + * @ignore + */ +export declare const TYPES_TO_BYTES_PER_PIXEL: { + [id: number]: number; +}; + +export { } diff --git a/Typescript/types/pixi/constants/index.d.ts b/Typescript/types/pixi/constants/index.d.ts new file mode 100644 index 0000000..af71e20 --- /dev/null +++ b/Typescript/types/pixi/constants/index.d.ts @@ -0,0 +1,506 @@ +/** + * How to treat textures with premultiplied alpha + * @name ALPHA_MODES + * @memberof PIXI + * @static + * @enum {number} + * @property {number} NO_PREMULTIPLIED_ALPHA - Source is not premultiplied, leave it like that. + * Option for compressed and data textures that are created from typed arrays. + * @property {number} PREMULTIPLY_ON_UPLOAD - Source is not premultiplied, premultiply on upload. + * Default option, used for all loaded images. + * @property {number} PREMULTIPLIED_ALPHA - Source is already premultiplied + * Example: spine atlases with `_pma` suffix. + * @property {number} NPM - Alias for NO_PREMULTIPLIED_ALPHA. + * @property {number} UNPACK - Default option, alias for PREMULTIPLY_ON_UPLOAD. + * @property {number} PMA - Alias for PREMULTIPLIED_ALPHA. + */ +export declare enum ALPHA_MODES { + NPM = 0, + UNPACK = 1, + PMA = 2, + NO_PREMULTIPLIED_ALPHA = 0, + PREMULTIPLY_ON_UPLOAD = 1, + PREMULTIPLY_ALPHA = 2, + PREMULTIPLIED_ALPHA = 2 +} + +/** + * Various blend modes supported by PIXI. + * + * IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes. + * Anything else will silently act like NORMAL. + * @memberof PIXI + * @name BLEND_MODES + * @enum {number} + * @property {number} NORMAL - + * @property {number} ADD - + * @property {number} MULTIPLY - + * @property {number} SCREEN - + * @property {number} OVERLAY - + * @property {number} DARKEN - + * @property {number} LIGHTEN - + * @property {number} COLOR_DODGE - + * @property {number} COLOR_BURN - + * @property {number} HARD_LIGHT - + * @property {number} SOFT_LIGHT - + * @property {number} DIFFERENCE - + * @property {number} EXCLUSION - + * @property {number} HUE - + * @property {number} SATURATION - + * @property {number} COLOR - + * @property {number} LUMINOSITY - + * @property {number} NORMAL_NPM - + * @property {number} ADD_NPM - + * @property {number} SCREEN_NPM - + * @property {number} NONE - + * @property {number} SRC_IN - + * @property {number} SRC_OUT - + * @property {number} SRC_ATOP - + * @property {number} DST_OVER - + * @property {number} DST_IN - + * @property {number} DST_OUT - + * @property {number} DST_ATOP - + * @property {number} SUBTRACT - + * @property {number} SRC_OVER - + * @property {number} ERASE - + * @property {number} XOR - + */ +export declare enum BLEND_MODES { + NORMAL = 0, + ADD = 1, + MULTIPLY = 2, + SCREEN = 3, + OVERLAY = 4, + DARKEN = 5, + LIGHTEN = 6, + COLOR_DODGE = 7, + COLOR_BURN = 8, + HARD_LIGHT = 9, + SOFT_LIGHT = 10, + DIFFERENCE = 11, + EXCLUSION = 12, + HUE = 13, + SATURATION = 14, + COLOR = 15, + LUMINOSITY = 16, + NORMAL_NPM = 17, + ADD_NPM = 18, + SCREEN_NPM = 19, + NONE = 20, + SRC_OVER = 0, + SRC_IN = 21, + SRC_OUT = 22, + SRC_ATOP = 23, + DST_OVER = 24, + DST_IN = 25, + DST_OUT = 26, + DST_ATOP = 27, + ERASE = 26, + SUBTRACT = 28, + XOR = 29 +} + +/** + * Bitwise OR of masks that indicate the buffers to be cleared. + * @static + * @memberof PIXI + * @name BUFFER_BITS + * @enum {number} + * @property {number} COLOR - Indicates the buffers currently enabled for color writing. + * @property {number} DEPTH - Indicates the depth buffer. + * @property {number} STENCIL - Indicates the stencil buffer. + */ +export declare enum BUFFER_BITS { + COLOR = 16384, + DEPTH = 256, + STENCIL = 1024 +} + +/** + * Constants for various buffer types in Pixi + * @see PIXI.BUFFER_TYPE + * @name BUFFER_TYPE + * @memberof PIXI + * @static + * @enum {number} + * @property {number} ELEMENT_ARRAY_BUFFER - buffer type for using as an index buffer + * @property {number} ARRAY_BUFFER - buffer type for using attribute data + * @property {number} UNIFORM_BUFFER - the buffer type is for uniform buffer objects + */ +export declare enum BUFFER_TYPE { + ELEMENT_ARRAY_BUFFER = 34963, + ARRAY_BUFFER = 34962, + UNIFORM_BUFFER = 35345 +} + +/** + * Configure whether filter textures are cleared after binding. + * + * Filter textures need not be cleared if the filter does not use pixel blending. {@link CLEAR_MODES.BLIT} will detect + * this and skip clearing as an optimization. + * @name CLEAR_MODES + * @memberof PIXI + * @static + * @enum {number} + * @property {number} BLEND - Do not clear the filter texture. The filter's output will blend on top of the output texture. + * @property {number} CLEAR - Always clear the filter texture. + * @property {number} BLIT - Clear only if {@link FilterSystem.forceClear} is set or if the filter uses pixel blending. + * @property {number} NO - Alias for BLEND, same as `false` in earlier versions + * @property {number} YES - Alias for CLEAR, same as `true` in earlier versions + * @property {number} AUTO - Alias for BLIT + */ +export declare enum CLEAR_MODES { + NO = 0, + YES = 1, + AUTO = 2, + BLEND = 0, + CLEAR = 1, + BLIT = 2 +} + +/** + * Bitwise OR of masks that indicate the color channels that are rendered to. + * @static + * @memberof PIXI + * @name COLOR_MASK_BITS + * @enum {number} + * @property {number} RED - Red channel. + * @property {number} GREEN - Green channel + * @property {number} BLUE - Blue channel. + * @property {number} ALPHA - Alpha channel. + */ +export declare enum COLOR_MASK_BITS { + RED = 1, + GREEN = 2, + BLUE = 4, + ALPHA = 8 +} + +/** + * Various webgl draw modes. These can be used to specify which GL drawMode to use + * under certain situations and renderers. + * @memberof PIXI + * @static + * @name DRAW_MODES + * @enum {number} + * @property {number} POINTS - + * @property {number} LINES - + * @property {number} LINE_LOOP - + * @property {number} LINE_STRIP - + * @property {number} TRIANGLES - + * @property {number} TRIANGLE_STRIP - + * @property {number} TRIANGLE_FAN - + */ +export declare enum DRAW_MODES { + POINTS = 0, + LINES = 1, + LINE_LOOP = 2, + LINE_STRIP = 3, + TRIANGLES = 4, + TRIANGLE_STRIP = 5, + TRIANGLE_FAN = 6 +} + +/** + * Different types of environments for WebGL. + * @static + * @memberof PIXI + * @name ENV + * @enum {number} + * @property {number} WEBGL_LEGACY - Used for older v1 WebGL devices. PixiJS will aim to ensure compatibility + * with older / less advanced devices. If you experience unexplained flickering prefer this environment. + * @property {number} WEBGL - Version 1 of WebGL + * @property {number} WEBGL2 - Version 2 of WebGL + */ +export declare enum ENV { + WEBGL_LEGACY = 0, + WEBGL = 1, + WEBGL2 = 2 +} + +/** + * Various GL texture/resources formats. + * @memberof PIXI + * @static + * @name FORMATS + * @enum {number} + * @property {number} [RGBA=6408] - + * @property {number} [RGB=6407] - + * @property {number} [RG=33319] - + * @property {number} [RED=6403] - + * @property {number} [RGBA_INTEGER=36249] - + * @property {number} [RGB_INTEGER=36248] - + * @property {number} [RG_INTEGER=33320] - + * @property {number} [RED_INTEGER=36244] - + * @property {number} [ALPHA=6406] - + * @property {number} [LUMINANCE=6409] - + * @property {number} [LUMINANCE_ALPHA=6410] - + * @property {number} [DEPTH_COMPONENT=6402] - + * @property {number} [DEPTH_STENCIL=34041] - + */ +export declare enum FORMATS { + RGBA = 6408, + RGB = 6407, + RG = 33319, + RED = 6403, + RGBA_INTEGER = 36249, + RGB_INTEGER = 36248, + RG_INTEGER = 33320, + RED_INTEGER = 36244, + ALPHA = 6406, + LUMINANCE = 6409, + LUMINANCE_ALPHA = 6410, + DEPTH_COMPONENT = 6402, + DEPTH_STENCIL = 34041 +} + +/** + * The gc modes that are supported by pixi. + * + * The {@link PIXI.settings.GC_MODE} Garbage Collection mode for PixiJS textures is AUTO + * If set to GC_MODE, the renderer will occasionally check textures usage. If they are not + * used for a specified period of time they will be removed from the GPU. They will of course + * be uploaded again when they are required. This is a silent behind the scenes process that + * should ensure that the GPU does not get filled up. + * + * Handy for mobile devices! + * This property only affects WebGL. + * @name GC_MODES + * @enum {number} + * @static + * @memberof PIXI + * @property {number} AUTO - Garbage collection will happen periodically automatically + * @property {number} MANUAL - Garbage collection will need to be called manually + */ +export declare enum GC_MODES { + AUTO = 0, + MANUAL = 1 +} + +/** + * Constants for mask implementations. + * We use `type` suffix because it leads to very different behaviours + * @name MASK_TYPES + * @memberof PIXI + * @static + * @enum {number} + * @property {number} NONE - Mask is ignored + * @property {number} SCISSOR - Scissor mask, rectangle on screen, cheap + * @property {number} STENCIL - Stencil mask, 1-bit, medium, works only if renderer supports stencil + * @property {number} SPRITE - Mask that uses SpriteMaskFilter, uses temporary RenderTexture + * @property {number} COLOR - Color mask (RGBA) + */ +export declare enum MASK_TYPES { + NONE = 0, + SCISSOR = 1, + STENCIL = 2, + SPRITE = 3, + COLOR = 4 +} + +/** + * Mipmap filtering modes that are supported by pixi. + * + * The {@link PIXI.settings.MIPMAP_TEXTURES} affects default texture filtering. + * Mipmaps are generated for a baseTexture if its `mipmap` field is `ON`, + * or its `POW2` and texture dimensions are powers of 2. + * Due to platform restriction, `ON` option will work like `POW2` for webgl-1. + * + * This property only affects WebGL. + * @name MIPMAP_MODES + * @memberof PIXI + * @static + * @enum {number} + * @property {number} OFF - No mipmaps + * @property {number} POW2 - Generate mipmaps if texture dimensions are pow2 + * @property {number} ON - Always generate mipmaps + * @property {number} ON_MANUAL - Use mipmaps, but do not auto-generate them; this is used with a resource + * that supports buffering each level-of-detail. + */ +export declare enum MIPMAP_MODES { + OFF = 0, + POW2 = 1, + ON = 2, + ON_MANUAL = 3 +} + +/** + * Constants for multi-sampling antialiasing. + * @see PIXI.Framebuffer#multisample + * @name MSAA_QUALITY + * @memberof PIXI + * @static + * @enum {number} + * @property {number} NONE - No multisampling for this renderTexture + * @property {number} LOW - Try 2 samples + * @property {number} MEDIUM - Try 4 samples + * @property {number} HIGH - Try 8 samples + */ +export declare enum MSAA_QUALITY { + NONE = 0, + LOW = 2, + MEDIUM = 4, + HIGH = 8 +} + +/** + * Constants that specify float precision in shaders. + * @name PRECISION + * @memberof PIXI + * @constant + * @static + * @enum {string} + * @property {string} [LOW='lowp'] - + * @property {string} [MEDIUM='mediump'] - + * @property {string} [HIGH='highp'] - + */ +export declare enum PRECISION { + LOW = "lowp", + MEDIUM = "mediump", + HIGH = "highp" +} + +/** + * Constant to identify the Renderer Type. + * @static + * @memberof PIXI + * @name RENDERER_TYPE + * @enum {number} + * @property {number} UNKNOWN - Unknown render type. + * @property {number} WEBGL - WebGL render type. + * @property {number} CANVAS - Canvas render type. + */ +export declare enum RENDERER_TYPE { + UNKNOWN = 0, + WEBGL = 1, + CANVAS = 2 +} + +/** + * Various sampler types. Correspond to `sampler`, `isampler`, `usampler` GLSL types respectively. + * WebGL1 works only with FLOAT. + * @memberof PIXI + * @static + * @name SAMPLER_TYPES + * @enum {number} + * @property {number} [FLOAT=0] - + * @property {number} [INT=1] - + * @property {number} [UINT=2] - + */ +export declare enum SAMPLER_TYPES { + FLOAT = 0, + INT = 1, + UINT = 2 +} + +/** + * The scale modes that are supported by pixi. + * + * The {@link PIXI.settings.SCALE_MODE} scale mode affects the default scaling mode of future operations. + * It can be re-assigned to either LINEAR or NEAREST, depending upon suitability. + * @memberof PIXI + * @static + * @name SCALE_MODES + * @enum {number} + * @property {number} LINEAR Smooth scaling + * @property {number} NEAREST Pixelating scaling + */ +export declare enum SCALE_MODES { + NEAREST = 0, + LINEAR = 1 +} + +/** + * Various GL target types. + * @memberof PIXI + * @static + * @name TARGETS + * @enum {number} + * @property {number} [TEXTURE_2D=3553] - + * @property {number} [TEXTURE_CUBE_MAP=34067] - + * @property {number} [TEXTURE_2D_ARRAY=35866] - + * @property {number} [TEXTURE_CUBE_MAP_POSITIVE_X=34069] - + * @property {number} [TEXTURE_CUBE_MAP_NEGATIVE_X=34070] - + * @property {number} [TEXTURE_CUBE_MAP_POSITIVE_Y=34071] - + * @property {number} [TEXTURE_CUBE_MAP_NEGATIVE_Y=34072] - + * @property {number} [TEXTURE_CUBE_MAP_POSITIVE_Z=34073] - + * @property {number} [TEXTURE_CUBE_MAP_NEGATIVE_Z=34074] - + */ +export declare enum TARGETS { + TEXTURE_2D = 3553, + TEXTURE_CUBE_MAP = 34067, + TEXTURE_2D_ARRAY = 35866, + TEXTURE_CUBE_MAP_POSITIVE_X = 34069, + TEXTURE_CUBE_MAP_NEGATIVE_X = 34070, + TEXTURE_CUBE_MAP_POSITIVE_Y = 34071, + TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072, + TEXTURE_CUBE_MAP_POSITIVE_Z = 34073, + TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074 +} + +/** + * Various GL data format types. + * @memberof PIXI + * @static + * @name TYPES + * @enum {number} + * @property {number} [UNSIGNED_BYTE=5121] - + * @property {number} [UNSIGNED_SHORT=5123] - + * @property {number} [UNSIGNED_SHORT_5_6_5=33635] - + * @property {number} [UNSIGNED_SHORT_4_4_4_4=32819] - + * @property {number} [UNSIGNED_SHORT_5_5_5_1=32820] - + * @property {number} [UNSIGNED_INT=5125] - + * @property {number} [UNSIGNED_INT_10F_11F_11F_REV=35899] - + * @property {number} [UNSIGNED_INT_2_10_10_10_REV=33640] - + * @property {number} [UNSIGNED_INT_24_8=34042] - + * @property {number} [UNSIGNED_INT_5_9_9_9_REV=35902] - + * @property {number} [BYTE=5120] - + * @property {number} [SHORT=5122] - + * @property {number} [INT=5124] - + * @property {number} [FLOAT=5126] - + * @property {number} [FLOAT_32_UNSIGNED_INT_24_8_REV=36269] - + * @property {number} [HALF_FLOAT=36193] - + */ +export declare enum TYPES { + UNSIGNED_BYTE = 5121, + UNSIGNED_SHORT = 5123, + UNSIGNED_SHORT_5_6_5 = 33635, + UNSIGNED_SHORT_4_4_4_4 = 32819, + UNSIGNED_SHORT_5_5_5_1 = 32820, + UNSIGNED_INT = 5125, + UNSIGNED_INT_10F_11F_11F_REV = 35899, + UNSIGNED_INT_2_10_10_10_REV = 33640, + UNSIGNED_INT_24_8 = 34042, + UNSIGNED_INT_5_9_9_9_REV = 35902, + BYTE = 5120, + SHORT = 5122, + INT = 5124, + FLOAT = 5126, + FLOAT_32_UNSIGNED_INT_24_8_REV = 36269, + HALF_FLOAT = 36193 +} + +/** + * The wrap modes that are supported by pixi. + * + * The {@link PIXI.settings.WRAP_MODE} wrap mode affects the default wrapping mode of future operations. + * It can be re-assigned to either CLAMP or REPEAT, depending upon suitability. + * If the texture is non power of two then clamp will be used regardless as WebGL can + * only use REPEAT if the texture is po2. + * + * This property only affects WebGL. + * @name WRAP_MODES + * @memberof PIXI + * @static + * @enum {number} + * @property {number} CLAMP - The textures uvs are clamped + * @property {number} REPEAT - The texture uvs tile and repeat + * @property {number} MIRRORED_REPEAT - The texture uvs tile and repeat with mirroring + */ +export declare enum WRAP_MODES { + CLAMP = 33071, + REPEAT = 10497, + MIRRORED_REPEAT = 33648 +} + +export { } diff --git a/Typescript/types/pixi/core/global.d.ts b/Typescript/types/pixi/core/global.d.ts new file mode 100644 index 0000000..cbbebad --- /dev/null +++ b/Typescript/types/pixi/core/global.d.ts @@ -0,0 +1,26 @@ +declare namespace GlobalMixins +{ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface BaseTexture + { + + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface Texture + { + + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface BaseRenderTexture + { + + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface IRendererOptions + { + + } +} diff --git a/Typescript/types/pixi/core/index.d.ts b/Typescript/types/pixi/core/index.d.ts new file mode 100644 index 0000000..7126536 --- /dev/null +++ b/Typescript/types/pixi/core/index.d.ts @@ -0,0 +1,5467 @@ +/// + +/// + +import { ALPHA_MODES } from 'pixi/constants'; +import type { ArrayFixed } from 'pixi/utils'; +import type { BaseTexture as BaseTexture_2 } from 'pixi/core'; +import { BLEND_MODES } from 'pixi/constants'; +import { BUFFER_BITS } from 'pixi/constants'; +import { BUFFER_TYPE } from 'pixi/constants'; +import { CLEAR_MODES } from 'pixi/constants'; +import type { COLOR_MASK_BITS } from 'pixi/constants'; +import type { Dict } from 'pixi/utils'; +import { DRAW_MODES } from 'pixi/constants'; +import { EventEmitter } from 'pixi/utils'; +import { FORMATS } from 'pixi/constants'; +import { GC_MODES } from 'pixi/constants'; +import type { IPointData } from 'pixi/math'; +import type { ISize } from 'pixi/math'; +import type { ISpriteMaskFilter as ISpriteMaskFilter_2 } from 'pixi/core'; +import { MASK_TYPES } from 'pixi/constants'; +import { Matrix } from 'pixi/math'; +import type { MIPMAP_MODES } from 'pixi/constants'; +import { MSAA_QUALITY } from 'pixi/constants'; +import { Point } from 'pixi/math'; +import { Rectangle } from 'pixi/math'; +import { RENDERER_TYPE } from 'pixi/constants'; +import { Runner } from 'pixi/runner'; +import { SCALE_MODES } from 'pixi/constants'; +import { TARGETS } from 'pixi/constants'; +import { TYPES } from 'pixi/constants'; +import type { WRAP_MODES } from 'pixi/constants'; + +/** + * Renderer dedicated to drawing and batching sprites. + * + * This is the default batch renderer. It buffers objects + * with texture-based geometries and renders them in + * batches. It uploads multiple textures to the GPU to + * reduce to the number of draw calls. + * @memberof PIXI + */ +export declare class AbstractBatchRenderer extends ObjectRenderer { + /** The WebGL state in which this renderer will work. */ + readonly state: State; + /** + * The number of bufferable objects before a flush + * occurs automatically. + * @default settings.SPRITE_BATCH_SIZE * 4 + */ + size: number; + /** + * Maximum number of textures that can be uploaded to + * the GPU under the current context. It is initialized + * properly in `this.contextChange`. + * @see PIXI.AbstractBatchRenderer#contextChange + * @readonly + */ + MAX_TEXTURES: number; + /** + * This is used to generate a shader that can + * color each vertex based on a `aTextureId` + * attribute that points to an texture in `uSampler`. + * + * This enables the objects with different textures + * to be drawn in the same draw call. + * + * You can customize your shader by creating your + * custom shader generator. + */ + protected shaderGenerator: BatchShaderGenerator; + /** + * The class that represents the geometry of objects + * that are going to be batched with this. + * @member {object} + * @default PIXI.BatchGeometry + */ + protected geometryClass: typeof BatchGeometry; + /** + * Size of data being buffered per vertex in the + * attribute buffers (in floats). By default, the + * batch-renderer plugin uses 6: + * + * | aVertexPosition | 2 | + * |-----------------|---| + * | aTextureCoords | 2 | + * | aColor | 1 | + * | aTextureId | 1 | + * @readonly + */ + protected vertexSize: number; + /** Total count of all vertices used by the currently buffered objects. */ + protected _vertexCount: number; + /** Total count of all indices used by the currently buffered objects. */ + protected _indexCount: number; + /** + * Buffer of objects that are yet to be rendered. + * @member {PIXI.DisplayObject[]} + */ + protected _bufferedElements: Array; + /** + * Data for texture batch builder, helps to save a bit of CPU on a pass. + * @member {PIXI.BaseTexture[]} + */ + protected _bufferedTextures: Array; + /** Number of elements that are buffered and are waiting to be flushed. */ + protected _bufferSize: number; + /** + * This shader is generated by `this.shaderGenerator`. + * + * It is generated specifically to handle the required + * number of textures being batched together. + */ + protected _shader: Shader; + /** + * A flush may occur multiple times in a single + * frame. On iOS devices or when + * `settings.CAN_UPLOAD_SAME_BUFFER` is false, the + * batch renderer does not upload data to the same + * `WebGLBuffer` for performance reasons. + * + * This is the index into `packedGeometries` that points to + * geometry holding the most recent buffers. + */ + protected _flushId: number; + /** + * Pool of `ViewableBuffer` objects that are sorted in + * order of increasing size. The flush method uses + * the buffer with the least size above the amount + * it requires. These are used for passing attributes. + * + * The first buffer has a size of 8; each subsequent + * buffer has double capacity of its previous. + * @member {PIXI.ViewableBuffer[]} + * @see PIXI.AbstractBatchRenderer#getAttributeBuffer + */ + protected _aBuffers: Array; + /** + * Pool of `Uint16Array` objects that are sorted in + * order of increasing size. The flush method uses + * the buffer with the least size above the amount + * it requires. These are used for passing indices. + * + * The first buffer has a size of 12; each subsequent + * buffer has double capacity of its previous. + * @member {Uint16Array[]} + * @see PIXI.AbstractBatchRenderer#getIndexBuffer + */ + protected _iBuffers: Array; + protected _dcIndex: number; + protected _aIndex: number; + protected _iIndex: number; + protected _attributeBuffer: ViewableBuffer; + protected _indexBuffer: Uint16Array; + protected _tempBoundTextures: BaseTexture[]; + /** + * Pool of `this.geometryClass` geometry objects + * that store buffers. They are used to pass data + * to the shader on each draw call. + * + * These are never re-allocated again, unless a + * context change occurs; however, the pool may + * be expanded if required. + * @member {PIXI.Geometry[]} + * @see PIXI.AbstractBatchRenderer.contextChange + */ + private _packedGeometries; + /** + * Size of `this._packedGeometries`. It can be expanded + * if more than `this._packedGeometryPoolSize` flushes + * occur in a single frame. + */ + private _packedGeometryPoolSize; + /** + * This will hook onto the renderer's `contextChange` + * and `prerender` signals. + * @param {PIXI.Renderer} renderer - The renderer this works for. + */ + constructor(renderer: Renderer); + /** + * Handles the `contextChange` signal. + * + * It calculates `this.MAX_TEXTURES` and allocating the packed-geometry object pool. + */ + contextChange(): void; + /** Makes sure that static and dynamic flush pooled objects have correct dimensions. */ + initFlushBuffers(): void; + /** Handles the `prerender` signal. It ensures that flushes start from the first geometry object again. */ + onPrerender(): void; + /** + * Buffers the "batchable" object. It need not be rendered immediately. + * @param {PIXI.DisplayObject} element - the element to render when + * using this renderer + */ + render(element: IBatchableElement): void; + buildTexturesAndDrawCalls(): void; + /** + * Populating drawcalls for rendering + * @param texArray + * @param start + * @param finish + */ + buildDrawCalls(texArray: BatchTextureArray, start: number, finish: number): void; + /** + * Bind textures for current rendering + * @param texArray + */ + bindAndClearTexArray(texArray: BatchTextureArray): void; + updateGeometry(): void; + drawBatches(): void; + /** Renders the content _now_ and empties the current batch. */ + flush(): void; + /** Starts a new sprite batch. */ + start(): void; + /** Stops and flushes the current batch. */ + stop(): void; + /** Destroys this `AbstractBatchRenderer`. It cannot be used again. */ + destroy(): void; + /** + * Fetches an attribute buffer from `this._aBuffers` that can hold atleast `size` floats. + * @param size - minimum capacity required + * @returns - buffer than can hold atleast `size` floats + */ + getAttributeBuffer(size: number): ViewableBuffer; + /** + * Fetches an index buffer from `this._iBuffers` that can + * have at least `size` capacity. + * @param size - minimum required capacity + * @returns - buffer that can fit `size` indices. + */ + getIndexBuffer(size: number): Uint16Array; + /** + * Takes the four batching parameters of `element`, interleaves + * and pushes them into the batching attribute/index buffers given. + * + * It uses these properties: `vertexData` `uvs`, `textureId` and + * `indicies`. It also uses the "tint" of the base-texture, if + * present. + * @param {PIXI.DisplayObject} element - element being rendered + * @param attributeBuffer - attribute buffer. + * @param indexBuffer - index buffer + * @param aIndex - number of floats already in the attribute buffer + * @param iIndex - number of indices already in `indexBuffer` + */ + packInterleavedGeometry(element: IBatchableElement, attributeBuffer: ViewableBuffer, indexBuffer: Uint16Array, aIndex: number, iIndex: number): void; + /** + * Pool of `BatchDrawCall` objects that `flush` used + * to create "batches" of the objects being rendered. + * + * These are never re-allocated again. + * Shared between all batch renderers because it can be only one "flush" working at the moment. + * @member {PIXI.BatchDrawCall[]} + */ + static _drawCallPool: Array; + /** + * Pool of `BatchDrawCall` objects that `flush` used + * to create "batches" of the objects being rendered. + * + * These are never re-allocated again. + * Shared between all batch renderers because it can be only one "flush" working at the moment. + * @member {PIXI.BatchTextureArray[]} + */ + static _textureArrayPool: Array; +} + +/** + * System plugin to the renderer to manage specific types of masking operations. + * @memberof PIXI + */ +declare class AbstractMaskSystem implements ISystem { + /** + * The mask stack + * @member {PIXI.MaskData[]} + */ + protected maskStack: Array; + /** + * Constant for gl.enable + * @private + */ + protected glConst: number; + protected renderer: Renderer; + /** + * @param renderer - The renderer this System works for. + */ + constructor(renderer: Renderer); + /** Gets count of masks of certain type. */ + getStackLength(): number; + /** + * Changes the mask stack that is used by this System. + * @param {PIXI.MaskData[]} maskStack - The mask stack + */ + setMaskStack(maskStack: Array): void; + /** + * Setup renderer to use the current mask data. + * @private + */ + protected _useCurrent(): void; + /** Destroys the mask stack. */ + destroy(): void; +} + +/** + * Resource that can manage several resource (items) inside. + * All resources need to have the same pixel size. + * Parent class for CubeResource and ArrayResource + * @memberof PIXI + */ +export declare abstract class AbstractMultiResource extends Resource { + /** Number of elements in array. */ + readonly length: number; + /** + * Collection of partial baseTextures that correspond to resources. + * @readonly + */ + items: Array; + /** + * Dirty IDs for each part. + * @readonly + */ + itemDirtyIds: Array; + /** + * Promise when loading. + * @default null + */ + private _load; + /** Bound baseTexture, there can only be one. */ + baseTexture: BaseTexture; + /** + * @param length + * @param options - Options to for Resource constructor + * @param {number} [options.width] - Width of the resource + * @param {number} [options.height] - Height of the resource + */ + constructor(length: number, options?: ISize); + /** + * Used from ArrayResource and CubeResource constructors. + * @param resources - Can be resources, image elements, canvas, etc. , + * length should be same as constructor length + * @param options - Detect options for resources + */ + protected initFromArray(resources: Array, options?: IAutoDetectOptions): void; + /** Destroy this BaseImageResource. */ + dispose(): void; + /** + * Set a baseTexture by ID + * @param baseTexture + * @param index - Zero-based index of resource to set + * @returns - Instance for chaining + */ + abstract addBaseTextureAt(baseTexture: BaseTexture, index: number): this; + /** + * Set a resource by ID + * @param resource + * @param index - Zero-based index of resource to set + * @returns - Instance for chaining + */ + addResourceAt(resource: Resource, index: number): this; + /** + * Set the parent base texture. + * @param baseTexture + */ + bind(baseTexture: BaseTexture): void; + /** + * Unset the parent base texture. + * @param baseTexture + */ + unbind(baseTexture: BaseTexture): void; + /** + * Load all the resources simultaneously + * @returns - When load is resolved + */ + load(): Promise; +} + +/** + * The AbstractRenderer is the base for a PixiJS Renderer. It is extended by the {@link PIXI.CanvasRenderer} + * and {@link PIXI.Renderer} which can be used for rendering a PixiJS scene. + * @abstract + * @class + * @extends PIXI.utils.EventEmitter + * @memberof PIXI + */ +export declare abstract class AbstractRenderer extends EventEmitter { + resolution: number; + clearBeforeRender?: boolean; + readonly options: IRendererOptions; + readonly type: RENDERER_TYPE; + readonly screen: Rectangle; + readonly view: HTMLCanvasElement; + readonly plugins: IRendererPlugins; + readonly useContextAlpha: boolean | 'notMultiplied'; + readonly autoDensity: boolean; + readonly preserveDrawingBuffer: boolean; + protected _backgroundColor: number; + protected _backgroundColorString: string; + _backgroundColorRgba: number[]; + _lastObjectRendered: IRenderableObject; + /** + * @param type - The renderer type. + * @param {PIXI.IRendererOptions} [options] - The optional renderer parameters. + * @param {boolean} [options.antialias=false] - + * **WebGL Only.** Whether to enable anti-aliasing. This may affect performance. + * @param {boolean} [options.autoDensity=false] - + * Whether the CSS dimensions of the renderer's view should be resized automatically. + * @param {number} [options.backgroundAlpha=1] - + * Transparency of the background color, value from `0` (fully transparent) to `1` (fully opaque). + * @param {number} [options.backgroundColor=0x000000] - + * The background color used to clear the canvas. It accepts hex numbers (e.g. `0xff0000`). + * @param {boolean} [options.clearBeforeRender=true] - Whether to clear the canvas before new render passes. + * @param {PIXI.IRenderingContext} [options.context] - **WebGL Only.** User-provided WebGL rendering context object. + * @param {number} [options.height=600] - The height of the renderer's view. + * @param {string} [options.powerPreference] - + * **WebGL Only.** A hint indicating what configuration of GPU is suitable for the WebGL context, + * can be `'default'`, `'high-performance'` or `'low-power'`. + * Setting to `'high-performance'` will prioritize rendering performance over power consumption, + * while setting to `'low-power'` will prioritize power saving over rendering performance. + * @param {boolean} [options.premultipliedAlpha=true] - + * **WebGL Only.** Whether the compositor will assume the drawing buffer contains colors with premultiplied alpha. + * @param {boolean} [options.preserveDrawingBuffer=false] - + * **WebGL Only.** Whether to enable drawing buffer preservation. If enabled, the drawing buffer will preserve + * its value until cleared or overwritten. Enable this if you need to call `toDataUrl` on the WebGL context. + * @param {number} [options.resolution=PIXI.settings.RESOLUTION] - + * The resolution / device pixel ratio of the renderer. + * @param {boolean} [options.transparent] - + * **Deprecated since 6.0.0, Use `backgroundAlpha` instead.** \ + * `true` sets `backgroundAlpha` to `0`, `false` sets `backgroundAlpha` to `1`. + * @param {boolean|'notMultiplied'} [options.useContextAlpha=true] - + * Pass-through value for canvas' context attribute `alpha`. This option is for cases where the + * canvas needs to be opaque, possibly for performance reasons on some older devices. + * If you want to set transparency, please use `backgroundAlpha`. \ + * **WebGL Only:** When set to `'notMultiplied'`, the canvas' context attribute `alpha` will be + * set to `true` and `premultipliedAlpha` will be to `false`. + * @param {HTMLCanvasElement} [options.view=null] - + * The canvas to use as the view. If omitted, a new canvas will be created. + * @param {number} [options.width=800] - The width of the renderer's view. + */ + constructor(type?: RENDERER_TYPE, options?: IRendererOptions); + /** + * Initialize the plugins. + * @protected + * @param {object} staticMap - The dictionary of statically saved plugins. + */ + initPlugins(staticMap: IRendererPlugins): void; + /** + * Same as view.width, actual number of pixels in the canvas by horizontal. + * @member {number} + * @readonly + * @default 800 + */ + get width(): number; + /** + * Same as view.height, actual number of pixels in the canvas by vertical. + * @member {number} + * @readonly + * @default 600 + */ + get height(): number; + /** + * Resizes the screen and canvas as close as possible to the specified width and height. + * Canvas dimensions are multiplied by resolution and rounded to the nearest integers. + * The new canvas dimensions divided by the resolution become the new screen dimensions. + * @param desiredScreenWidth - The desired width of the screen. + * @param desiredScreenHeight - The desired height of the screen. + */ + resize(desiredScreenWidth: number, desiredScreenHeight: number): void; + /** + * Useful function that returns a texture of the display object that can then be used to create sprites + * This can be quite useful if your displayObject is complicated and needs to be reused multiple times. + * @method PIXI.AbstractRenderer#generateTexture + * @param displayObject - The displayObject the object will be generated from. + * @param {object} options - Generate texture options. + * @param {PIXI.SCALE_MODES} options.scaleMode - The scale mode of the texture. + * @param {number} options.resolution - The resolution / device pixel ratio of the texture being generated. + * @param {PIXI.Rectangle} options.region - The region of the displayObject, that shall be rendered, + * if no region is specified, defaults to the local bounds of the displayObject. + * @param {PIXI.MSAA_QUALITY} options.multisample - The number of samples of the frame buffer. + * @returns A texture of the graphics object. + */ + generateTexture(displayObject: IRenderableObject, options?: IGenerateTextureOptions): RenderTexture; + /** + * Please use the options argument instead. + * @method PIXI.AbstractRenderer#generateTexture + * @deprecated Since 6.1.0 + * @param displayObject - The displayObject the object will be generated from. + * @param scaleMode - The scale mode of the texture. + * @param resolution - The resolution / device pixel ratio of the texture being generated. + * @param region - The region of the displayObject, that shall be rendered, + * if no region is specified, defaults to the local bounds of the displayObject. + * @returns A texture of the graphics object. + */ + generateTexture(displayObject: IRenderableObject, scaleMode?: SCALE_MODES, resolution?: number, region?: Rectangle): RenderTexture; + /** + * Adds a new system to the renderer. + * @param ClassRef - Class reference + * @param name - Property name for system + * @returns Return instance of renderer + */ + abstract addSystem(ClassRef: ISystemConstructor, name: string): this; + abstract render(displayObject: IRenderableObject, options?: IRendererRenderOptions): void; + /** + * Removes everything from the renderer and optionally removes the Canvas DOM element. + * @param [removeView=false] - Removes the Canvas element from the DOM. + */ + destroy(removeView?: boolean): void; + /** + * The background color to fill if not transparent + * @member {number} + */ + get backgroundColor(): number; + set backgroundColor(value: number); + /** + * The background color alpha. Setting this to 0 will make the canvas transparent. + * @member {number} + */ + get backgroundAlpha(): number; + set backgroundAlpha(value: number); +} + +/** + * A resource that contains a number of sources. + * @memberof PIXI + */ +export declare class ArrayResource extends AbstractMultiResource { + /** + * @param source - Number of items in array or the collection + * of image URLs to use. Can also be resources, image elements, canvas, etc. + * @param options - Options to apply to {@link PIXI.autoDetectResource} + * @param {number} [options.width] - Width of the resource + * @param {number} [options.height] - Height of the resource + */ + constructor(source: number | Array, options?: ISize); + /** + * Set a baseTexture by ID, + * ArrayResource just takes resource from it, nothing more + * @param baseTexture + * @param index - Zero-based index of resource to set + * @returns - Instance for chaining + */ + addBaseTextureAt(baseTexture: BaseTexture, index: number): this; + /** + * Add binding + * @param baseTexture + */ + bind(baseTexture: BaseTexture): void; + /** + * Upload the resources to the GPU. + * @param renderer + * @param texture + * @param glTexture + * @returns - whether texture was uploaded + */ + upload(renderer: Renderer, texture: BaseTexture, glTexture: GLTexture): boolean; +} + +/** + * Holds the information for a single attribute structure required to render geometry. + * + * This does not contain the actual data, but instead has a buffer id that maps to a {@link PIXI.Buffer} + * This can include anything from positions, uvs, normals, colors etc. + * @memberof PIXI + */ +export declare class Attribute { + buffer: number; + size: number; + normalized: boolean; + type: TYPES; + stride: number; + start: number; + instance: boolean; + /** + * @param buffer - the id of the buffer that this attribute will look for + * @param size - the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2. + * @param normalized - should the data be normalized. + * @param {PIXI.TYPES} [type=PIXI.TYPES.FLOAT] - what type of number is the attribute. Check {@link PIXI.TYPES} to see the ones available + * @param [stride=0] - How far apart, in bytes, the start of each value is. (used for interleaving data) + * @param [start=0] - How far into the array to start reading values (used for interleaving data) + * @param [instance=false] - Whether the geometry is instanced. + */ + constructor(buffer: number, size?: number, normalized?: boolean, type?: TYPES, stride?: number, start?: number, instance?: boolean); + /** Destroys the Attribute. */ + destroy(): void; + /** + * Helper function that creates an Attribute based on the information provided + * @param buffer - the id of the buffer that this attribute will look for + * @param [size=0] - the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2 + * @param [normalized=false] - should the data be normalized. + * @param [type=PIXI.TYPES.FLOAT] - what type of number is the attribute. Check {@link PIXI.TYPES} to see the ones available + * @param [stride=0] - How far apart, in bytes, the start of each value is. (used for interleaving data) + * @returns - A new {@link PIXI.Attribute} based on the information provided + */ + static from(buffer: number, size?: number, normalized?: boolean, type?: TYPES, stride?: number): Attribute; +} + +/** + * This helper function will automatically detect which renderer you should be using. + * WebGL is the preferred renderer as it is a lot faster. If WebGL is not supported by + * the browser then this function will return a canvas renderer. + * @memberof PIXI + * @function autoDetectRenderer + * @param {PIXI.IRendererOptionsAuto} [options] - The optional renderer parameters. + * @param {boolean} [options.antialias=false] - + * **WebGL Only.** Whether to enable anti-aliasing. This may affect performance. + * @param {boolean} [options.autoDensity=false] - + * Whether the CSS dimensions of the renderer's view should be resized automatically. + * @param {number} [options.backgroundAlpha=1] - + * Transparency of the background color, value from `0` (fully transparent) to `1` (fully opaque). + * @param {number} [options.backgroundColor=0x000000] - + * The background color used to clear the canvas. It accepts hex numbers (e.g. `0xff0000`). + * @param {boolean} [options.clearBeforeRender=true] - Whether to clear the canvas before new render passes. + * @param {PIXI.IRenderingContext} [options.context] - **WebGL Only.** User-provided WebGL rendering context object. + * @param {boolean} [options.forceCanvas=false] - + * Force using {@link PIXI.CanvasRenderer}, even if WebGL is available. This option only is available when + * using **pixi.js-legacy** or **@pixi/canvas-renderer** packages, otherwise it is ignored. + * @param {number} [options.height=600] - The height of the renderer's view. + * @param {string} [options.powerPreference] - + * **WebGL Only.** A hint indicating what configuration of GPU is suitable for the WebGL context, + * can be `'default'`, `'high-performance'` or `'low-power'`. + * Setting to `'high-performance'` will prioritize rendering performance over power consumption, + * while setting to `'low-power'` will prioritize power saving over rendering performance. + * @param {boolean} [options.premultipliedAlpha=true] - + * **WebGL Only.** Whether the compositor will assume the drawing buffer contains colors with premultiplied alpha. + * @param {boolean} [options.preserveDrawingBuffer=false] - + * **WebGL Only.** Whether to enable drawing buffer preservation. If enabled, the drawing buffer will preserve + * its value until cleared or overwritten. Enable this if you need to call `toDataUrl` on the WebGL context. + * @param {number} [options.resolution=PIXI.settings.RESOLUTION] - + * The resolution / device pixel ratio of the renderer. + * @param {boolean} [options.transparent] - + * **Deprecated since 6.0.0, Use `backgroundAlpha` instead.** \ + * `true` sets `backgroundAlpha` to `0`, `false` sets `backgroundAlpha` to `1`. + * @param {boolean|'notMultiplied'} [options.useContextAlpha=true] - + * Pass-through value for canvas' context attribute `alpha`. This option is for cases where the + * canvas needs to be opaque, possibly for performance reasons on some older devices. + * If you want to set transparency, please use `backgroundAlpha`. \ + * **WebGL Only:** When set to `'notMultiplied'`, the canvas' context attribute `alpha` will be + * set to `true` and `premultipliedAlpha` will be to `false`. + * @param {HTMLCanvasElement} [options.view=null] - + * The canvas to use as the view. If omitted, a new canvas will be created. + * @param {number} [options.width=800] - The width of the renderer's view. + * @returns {PIXI.Renderer|PIXI.CanvasRenderer} + * Returns {@link PIXI.Renderer} if WebGL is available, otherwise {@link PIXI.CanvasRenderer}. + */ +export declare function autoDetectRenderer(options?: IRendererOptionsAuto): AbstractRenderer; + +/** + * Create a resource element from a single source element. This + * auto-detects which type of resource to create. All resources that + * are auto-detectable must have a static `test` method and a constructor + * with the arguments `(source, options?)`. Currently, the supported + * resources for auto-detection include: + * - {@link PIXI.ImageResource} + * - {@link PIXI.CanvasResource} + * - {@link PIXI.VideoResource} + * - {@link PIXI.SVGResource} + * - {@link PIXI.BufferResource} + * @static + * @memberof PIXI + * @function autoDetectResource + * @param {string|*} source - Resource source, this can be the URL to the resource, + * a typed-array (for BufferResource), HTMLVideoElement, SVG data-uri + * or any other resource that can be auto-detected. If not resource is + * detected, it's assumed to be an ImageResource. + * @param {object} [options] - Pass-through options to use for Resource + * @param {number} [options.width] - Width of BufferResource or SVG rasterization + * @param {number} [options.height] - Height of BufferResource or SVG rasterization + * @param {boolean} [options.autoLoad=true] - Image, SVG and Video flag to start loading + * @param {number} [options.scale=1] - SVG source scale. Overridden by width, height + * @param {boolean} [options.createBitmap=PIXI.settings.CREATE_IMAGE_BITMAP] - Image option to create Bitmap object + * @param {boolean} [options.crossorigin=true] - Image and Video option to set crossOrigin + * @param {boolean} [options.autoPlay=true] - Video option to start playing video immediately + * @param {number} [options.updateFPS=0] - Video option to update how many times a second the + * texture should be updated from the video. Leave at 0 to update at every render + * @returns {PIXI.Resource} The created resource. + */ +export declare function autoDetectResource(source: unknown, options?: RO): R; + +/** + * Base for all the image/canvas resources. + * @memberof PIXI + */ +export declare class BaseImageResource extends Resource { + /** + * The source element. + * @member {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement} + * @readonly + */ + source: ImageSource; + /** + * If set to `true`, will force `texImage2D` over `texSubImage2D` for uploading. + * Certain types of media (e.g. video) using `texImage2D` is more performant. + * @default false + * @private + */ + noSubImage: boolean; + /** + * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement} source + */ + constructor(source: ImageSource); + /** + * Set cross origin based detecting the url and the crossorigin + * @param element - Element to apply crossOrigin + * @param url - URL to check + * @param crossorigin - Cross origin value to use + */ + static crossOrigin(element: HTMLImageElement | HTMLVideoElement, url: string, crossorigin?: boolean | string): void; + /** + * Upload the texture to the GPU. + * @param renderer - Upload to the renderer + * @param baseTexture - Reference to parent texture + * @param glTexture + * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement} [source] - (optional) + * @returns - true is success + */ + upload(renderer: Renderer, baseTexture: BaseTexture, glTexture: GLTexture, source?: ImageSource): boolean; + /** + * Checks if source width/height was changed, resize can cause extra baseTexture update. + * Triggers one update in any case. + */ + update(): void; + /** Destroy this {@link BaseImageResource} */ + dispose(): void; +} + +export declare interface BaseRenderTexture extends GlobalMixins.BaseRenderTexture, BaseTexture { +} + +/** + * A BaseRenderTexture is a special texture that allows any PixiJS display object to be rendered to it. + * + * __Hint__: All DisplayObjects (i.e. Sprites) that render to a BaseRenderTexture should be preloaded + * otherwise black rectangles will be drawn instead. + * + * A BaseRenderTexture takes a snapshot of any Display Object given to its render method. The position + * and rotation of the given Display Objects is ignored. For example: + * + * ```js + * let renderer = PIXI.autoDetectRenderer(); + * let baseRenderTexture = new PIXI.BaseRenderTexture({ width: 800, height: 600 }); + * let renderTexture = new PIXI.RenderTexture(baseRenderTexture); + * let sprite = PIXI.Sprite.from("spinObj_01.png"); + * + * sprite.position.x = 800/2; + * sprite.position.y = 600/2; + * sprite.anchor.x = 0.5; + * sprite.anchor.y = 0.5; + * + * renderer.render(sprite, {renderTexture}); + * ``` + * + * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0 + * you can clear the transform + * + * ```js + * + * sprite.setTransform() + * + * let baseRenderTexture = new PIXI.BaseRenderTexture({ width: 100, height: 100 }); + * let renderTexture = new PIXI.RenderTexture(baseRenderTexture); + * + * renderer.render(sprite, {renderTexture}); // Renders to center of RenderTexture + * ``` + * @memberof PIXI + */ +export declare class BaseRenderTexture extends BaseTexture { + clearColor: number[]; + framebuffer: Framebuffer; + /** The data structure for the stencil masks. */ + maskStack: Array; + /** The data structure for the filters. */ + filterStack: Array; + /** + * @param options + * @param {number} [options.width=100] - The width of the base render texture. + * @param {number} [options.height=100] - The height of the base render texture. + * @param {PIXI.SCALE_MODES} [options.scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} + * for possible values. + * @param {number} [options.resolution=PIXI.settings.RESOLUTION] - The resolution / device pixel ratio + * of the texture being generated. + * @param {PIXI.MSAA_QUALITY} [options.multisample=PIXI.MSAA_QUALITY.NONE] - The number of samples of the frame buffer. + */ + constructor(options?: IBaseTextureOptions); + /** + * Resizes the BaseRenderTexture. + * @param desiredWidth - The desired width to resize to. + * @param desiredHeight - The desired height to resize to. + */ + resize(desiredWidth: number, desiredHeight: number): void; + /** + * Frees the texture and framebuffer from WebGL memory without destroying this texture object. + * This means you can still use the texture later which will upload it to GPU + * memory again. + * @fires PIXI.BaseTexture#dispose + */ + dispose(): void; + /** Destroys this texture. */ + destroy(): void; +} + +export declare interface BaseTexture extends GlobalMixins.BaseTexture, EventEmitter { +} + +/** + * A Texture stores the information that represents an image. + * All textures have a base texture, which contains information about the source. + * Therefore you can have many textures all using a single BaseTexture + * @memberof PIXI + * @typeParam R - The BaseTexture's Resource type. + * @typeParam RO - The options for constructing resource. + */ +export declare class BaseTexture extends EventEmitter { + /** + * The width of the base texture set when the image has loaded + * @readonly + */ + width: number; + /** + * The height of the base texture set when the image has loaded + * @readonly + */ + height: number; + /** + * The resolution / device pixel ratio of the texture + * @readonly + * @default PIXI.settings.RESOLUTION + */ + resolution: number; + /** + * How to treat premultiplied alpha, see {@link PIXI.ALPHA_MODES}. + * @member {PIXI.ALPHA_MODES} + * @default PIXI.ALPHA_MODES.UNPACK + */ + alphaMode?: ALPHA_MODES; + /** + * Anisotropic filtering level of texture + * @member {number} + * @default PIXI.settings.ANISOTROPIC_LEVEL + */ + anisotropicLevel?: number; + /** + * The pixel format of the texture + * @default PIXI.FORMATS.RGBA + */ + format?: FORMATS; + /** + * The type of resource data + * @default PIXI.TYPES.UNSIGNED_BYTE + */ + type?: TYPES; + /** + * The target type + * @default PIXI.TARGETS.TEXTURE_2D + */ + target?: TARGETS; + /** + * Global unique identifier for this BaseTexture + * @protected + */ + readonly uid: number; + /** + * Used by automatic texture Garbage Collection, stores last GC tick when it was bound + * @protected + */ + touched: number; + /** + * Whether or not the texture is a power of two, try to use power of two textures as much + * as you can + * @readonly + * @default false + */ + isPowerOfTwo: boolean; + /** + * The map of render context textures where this is bound + * @private + */ + _glTextures: { + [key: number]: GLTexture; + }; + /** + * Used by TextureSystem to only update texture to the GPU when needed. + * Please call `update()` to increment it. + * @readonly + */ + dirtyId: number; + /** + * Used by TextureSystem to only update texture style when needed. + * @protected + */ + dirtyStyleId: number; + /** + * Currently default cache ID. + * @member {string} + */ + cacheId: string; + /** + * Generally speaking means when resource is loaded. + * @readonly + * @member {boolean} + */ + valid: boolean; + /** + * The collection of alternative cache ids, since some BaseTextures + * can have more than one ID, short name and longer full URL + * @member {Array} + * @readonly + */ + textureCacheIds: Array; + /** + * Flag if BaseTexture has been destroyed. + * @member {boolean} + * @readonly + */ + destroyed: boolean; + /** + * The resource used by this BaseTexture, there can only + * be one resource per BaseTexture, but textures can share + * resources. + * @member {PIXI.Resource} + * @readonly + */ + resource: R; + /** + * Number of the texture batch, used by multi-texture renderers + * @member {number} + */ + _batchEnabled: number; + /** + * Location inside texture batch, used by multi-texture renderers + * @member {number} + */ + _batchLocation: number; + /** + * Whether its a part of another texture, handled by ArrayResource or CubeResource + * @member {PIXI.BaseTexture} + */ + parentTextureArray: BaseTexture; + private _mipmap?; + private _scaleMode?; + private _wrapMode?; + /** + * @param {PIXI.Resource|string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} [resource=null] - + * The current resource to use, for things that aren't Resource objects, will be converted + * into a Resource. + * @param options - Collection of options + * @param {PIXI.MIPMAP_MODES} [options.mipmap=PIXI.settings.MIPMAP_TEXTURES] - If mipmapping is enabled for texture + * @param {number} [options.anisotropicLevel=PIXI.settings.ANISOTROPIC_LEVEL] - Anisotropic filtering level of texture + * @param {PIXI.WRAP_MODES} [options.wrapMode=PIXI.settings.WRAP_MODE] - Wrap mode for textures + * @param {PIXI.SCALE_MODES} [options.scaleMode=PIXI.settings.SCALE_MODE] - Default scale mode, linear, nearest + * @param {PIXI.FORMATS} [options.format=PIXI.FORMATS.RGBA] - GL format type + * @param {PIXI.TYPES} [options.type=PIXI.TYPES.UNSIGNED_BYTE] - GL data type + * @param {PIXI.TARGETS} [options.target=PIXI.TARGETS.TEXTURE_2D] - GL texture target + * @param {PIXI.ALPHA_MODES} [options.alphaMode=PIXI.ALPHA_MODES.UNPACK] - Pre multiply the image alpha + * @param {number} [options.width=0] - Width of the texture + * @param {number} [options.height=0] - Height of the texture + * @param {number} [options.resolution=PIXI.settings.RESOLUTION] - Resolution of the base texture + * @param {object} [options.resourceOptions] - Optional resource options, + * see {@link PIXI.autoDetectResource autoDetectResource} + */ + constructor(resource?: R | ImageSource | string | any, options?: IBaseTextureOptions); + /** + * Pixel width of the source of this texture + * @readonly + */ + get realWidth(): number; + /** + * Pixel height of the source of this texture + * @readonly + */ + get realHeight(): number; + /** + * Mipmap mode of the texture, affects downscaled images + * @default PIXI.settings.MIPMAP_TEXTURES + */ + get mipmap(): MIPMAP_MODES; + set mipmap(value: MIPMAP_MODES); + /** + * The scale mode to apply when scaling this texture + * @default PIXI.settings.SCALE_MODE + */ + get scaleMode(): SCALE_MODES; + set scaleMode(value: SCALE_MODES); + /** + * How the texture wraps + * @default PIXI.settings.WRAP_MODE + */ + get wrapMode(): WRAP_MODES; + set wrapMode(value: WRAP_MODES); + /** + * Changes style options of BaseTexture + * @param scaleMode - Pixi scalemode + * @param mipmap - enable mipmaps + * @returns - this + */ + setStyle(scaleMode?: SCALE_MODES, mipmap?: MIPMAP_MODES): this; + /** + * Changes w/h/resolution. Texture becomes valid if width and height are greater than zero. + * @param desiredWidth - Desired visual width + * @param desiredHeight - Desired visual height + * @param resolution - Optionally set resolution + * @returns - this + */ + setSize(desiredWidth: number, desiredHeight: number, resolution?: number): this; + /** + * Sets real size of baseTexture, preserves current resolution. + * @param realWidth - Full rendered width + * @param realHeight - Full rendered height + * @param resolution - Optionally set resolution + * @returns - this + */ + setRealSize(realWidth: number, realHeight: number, resolution?: number): this; + /** + * Refresh check for isPowerOfTwo texture based on size + * @private + */ + protected _refreshPOT(): void; + /** + * Changes resolution + * @param resolution - res + * @returns - this + */ + setResolution(resolution: number): this; + /** + * Sets the resource if it wasn't set. Throws error if resource already present + * @param resource - that is managing this BaseTexture + * @returns - this + */ + setResource(resource: R): this; + /** Invalidates the object. Texture becomes valid if width and height are greater than zero. */ + update(): void; + /** + * Handle errors with resources. + * @private + * @param event - Error event emitted. + */ + onError(event: ErrorEvent): void; + /** + * Destroys this base texture. + * The method stops if resource doesn't want this texture to be destroyed. + * Removes texture from all caches. + */ + destroy(): void; + /** + * Frees the texture from WebGL memory without destroying this texture object. + * This means you can still use the texture later which will upload it to GPU + * memory again. + * @fires PIXI.BaseTexture#dispose + */ + dispose(): void; + /** Utility function for BaseTexture|Texture cast. */ + castToBaseTexture(): BaseTexture; + /** + * Helper function that creates a base texture based on the source you provide. + * The source can be - image url, image element, canvas element. If the + * source is an image url or an image element and not in the base texture + * cache, it will be created and loaded. + * @static + * @param {string|string[]|HTMLImageElement|HTMLCanvasElement|SVGElement|HTMLVideoElement} source - The + * source to create base texture from. + * @param options - See {@link PIXI.BaseTexture}'s constructor for options. + * @param {string} [options.pixiIdPrefix=pixiid] - If a source has no id, this is the prefix of the generated id + * @param {boolean} [strict] - Enforce strict-mode, see {@link PIXI.settings.STRICT_TEXTURE_CACHE}. + * @returns {PIXI.BaseTexture} The new base texture. + */ + static from(source: ImageSource | string | string[], options?: IBaseTextureOptions, strict?: boolean): BaseTexture; + /** + * Create a new BaseTexture with a BufferResource from a Float32Array. + * RGBA values are floats from 0 to 1. + * @param {Float32Array|Uint8Array} buffer - The optional array to use, if no data + * is provided, a new Float32Array is created. + * @param width - Width of the resource + * @param height - Height of the resource + * @param options - See {@link PIXI.BaseTexture}'s constructor for options. + * Default properties are different from the constructor's defaults. + * @param {PIXI.FORMATS} [options.format=PIXI.FORMATS.RGBA] - GL format type + * @param {PIXI.ALPHA_MODES} [options.alphaMode=PIXI.ALPHA_MODES.NPM] - Image alpha, not premultiplied by default + * @param {PIXI.SCALE_MODES} [options.scaleMode=PIXI.SCALE_MODES.NEAREST] - Scale mode, pixelating by default + * @returns - The resulting new BaseTexture + */ + static fromBuffer(buffer: Float32Array | Uint8Array, width: number, height: number, options?: IBaseTextureOptions): BaseTexture; + /** + * Adds a BaseTexture to the global BaseTextureCache. This cache is shared across the whole PIXI object. + * @param {PIXI.BaseTexture} baseTexture - The BaseTexture to add to the cache. + * @param {string} id - The id that the BaseTexture will be stored against. + */ + static addToCache(baseTexture: BaseTexture, id: string): void; + /** + * Remove a BaseTexture from the global BaseTextureCache. + * @param {string|PIXI.BaseTexture} baseTexture - id of a BaseTexture to be removed, or a BaseTexture instance itself. + * @returns {PIXI.BaseTexture|null} The BaseTexture that was removed. + */ + static removeFromCache(baseTexture: string | BaseTexture): BaseTexture | null; + /** Global number of the texture batch, used by multi-texture renderers. */ + static _globalBatch: number; +} + +/** + * Used by the batcher to draw batches. + * Each one of these contains all information required to draw a bound geometry. + * @memberof PIXI + */ +export declare class BatchDrawCall { + texArray: BatchTextureArray; + type: DRAW_MODES; + blend: BLEND_MODES; + start: number; + size: number; + /** Data for uniforms or custom webgl state. */ + data: any; + constructor(); +} + +/** + * Geometry used to batch standard PIXI content (e.g. Mesh, Sprite, Graphics objects). + * @memberof PIXI + */ +export declare class BatchGeometry extends Geometry { + /** + * Buffer used for position, color, texture IDs + * @protected + */ + _buffer: Buffer_2; + /** + * Index buffer data + * @protected + */ + _indexBuffer: Buffer_2; + /** + * @param {boolean} [_static=false] - Optimization flag, where `false` + * is updated every frame, `true` doesn't change frame-to-frame. + */ + constructor(_static?: boolean); +} + +/** @memberof PIXI */ +export declare class BatchPluginFactory { + /** + * Create a new BatchRenderer plugin for Renderer. this convenience can provide an easy way + * to extend BatchRenderer with all the necessary pieces. + * @example + * const fragment = ` + * varying vec2 vTextureCoord; + * varying vec4 vColor; + * varying float vTextureId; + * uniform sampler2D uSamplers[%count%]; + * + * void main(void){ + * vec4 color; + * %forloop% + * gl_FragColor = vColor * vec4(color.a - color.rgb, color.a); + * } + * `; + * const InvertBatchRenderer = PIXI.BatchPluginFactory.create({ fragment }); + * PIXI.extensions.add({ + * name: 'invert', + * ref: InvertBatchRenderer, + * type: PIXI.ExtensionType.RendererPlugin, + * }); + * const sprite = new PIXI.Sprite(); + * sprite.pluginName = 'invert'; + * @param {object} [options] + * @param {string} [options.vertex=PIXI.BatchPluginFactory.defaultVertexSrc] - Vertex shader source + * @param {string} [options.fragment=PIXI.BatchPluginFactory.defaultFragmentTemplate] - Fragment shader template + * @param {number} [options.vertexSize=6] - Vertex size + * @param {object} [options.geometryClass=PIXI.BatchGeometry] + * @returns {*} New batch renderer plugin + */ + static create(options?: IBatchFactoryOptions): typeof AbstractBatchRenderer; + /** + * The default vertex shader source + * @readonly + */ + static get defaultVertexSrc(): string; + /** + * The default fragment shader source + * @readonly + */ + static get defaultFragmentTemplate(): string; +} + +export declare const BatchRenderer: typeof AbstractBatchRenderer; + +/** + * Helper that generates batching multi-texture shader. Use it with your new BatchRenderer + * @memberof PIXI + */ +export declare class BatchShaderGenerator { + /** Reference to the vertex shader source. */ + vertexSrc: string; + /** Reference to the fragment shader template. Must contain "%count%" and "%forloop%". */ + fragTemplate: string; + programCache: { + [key: number]: Program; + }; + defaultGroupCache: { + [key: number]: UniformGroup; + }; + /** + * @param vertexSrc - Vertex shader + * @param fragTemplate - Fragment shader template + */ + constructor(vertexSrc: string, fragTemplate: string); + generateShader(maxTextures: number): Shader; + generateSampleSrc(maxTextures: number): string; +} + +/** + * System plugin to the renderer to manage batching. + * @memberof PIXI + */ +export declare class BatchSystem implements ISystem { + /** An empty renderer. */ + readonly emptyRenderer: ObjectRenderer; + /** The currently active ObjectRenderer. */ + currentRenderer: ObjectRenderer; + private renderer; + /** + * @param renderer - The renderer this System works for. + */ + constructor(renderer: Renderer); + /** + * Changes the current renderer to the one given in parameter + * @param objectRenderer - The object renderer to use. + */ + setObjectRenderer(objectRenderer: ObjectRenderer): void; + /** + * This should be called if you wish to do some custom rendering + * It will basically render anything that may be batched up such as sprites + */ + flush(): void; + /** Reset the system to an empty renderer */ + reset(): void; + /** + * Handy function for batch renderers: copies bound textures in first maxTextures locations to array + * sets actual _batchLocation for them + * @param arr - arr copy destination + * @param maxTextures - number of copied elements + */ + copyBoundTextures(arr: BaseTexture[], maxTextures: number): void; + /** + * Assigns batch locations to textures in array based on boundTextures state. + * All textures in texArray should have `_batchEnabled = _batchId`, + * and their count should be less than `maxTextures`. + * @param texArray - textures to bound + * @param boundTextures - current state of bound textures + * @param batchId - marker for _batchEnabled param of textures in texArray + * @param maxTextures - number of texture locations to manipulate + */ + boundArray(texArray: BatchTextureArray, boundTextures: Array, batchId: number, maxTextures: number): void; + /** + * @ignore + */ + destroy(): void; +} + +/** + * Used by the batcher to build texture batches. + * Holds list of textures and their respective locations. + * @memberof PIXI + */ +export declare class BatchTextureArray { + /** Inside textures array. */ + elements: BaseTexture_2[]; + /** Respective locations for textures. */ + ids: number[]; + /** Number of filled elements. */ + count: number; + constructor(); + clear(): void; +} + +/** + * A wrapper for data so that it can be used and uploaded by WebGL + * @memberof PIXI + */ +declare class Buffer_2 { + /** + * The data in the buffer, as a typed array + * @type {PIXI.IArrayBuffer} + */ + data: ITypedArray; + /** + * The type of buffer this is, one of: + * + ELEMENT_ARRAY_BUFFER - used as an index buffer + * + ARRAY_BUFFER - used as an attribute buffer + * + UNIFORM_BUFFER - used as a uniform buffer (if available) + */ + type: BUFFER_TYPE; + static: boolean; + id: number; + disposeRunner: Runner; + /** + * A map of renderer IDs to webgl buffer + * @private + * @type {Object} + */ + _glBuffers: { + [key: number]: GLBuffer; + }; + _updateID: number; + /** + * @param {PIXI.IArrayBuffer} data - the data to store in the buffer. + * @param _static - `true` for static buffer + * @param index - `true` for index buffer + */ + constructor(data?: IArrayBuffer, _static?: boolean, index?: boolean); + /** + * Flags this buffer as requiring an upload to the GPU. + * @param {PIXI.IArrayBuffer|number[]} [data] - the data to update in the buffer. + */ + update(data?: IArrayBuffer | Array): void; + /** Disposes WebGL resources that are connected to this geometry. */ + dispose(): void; + /** Destroys the buffer. */ + destroy(): void; + /** + * Flags whether this is an index buffer. + * + * Index buffers are of type `ELEMENT_ARRAY_BUFFER`. Note that setting this property to false will make + * the buffer of type `ARRAY_BUFFER`. + * + * For backwards compatibility. + */ + set index(value: boolean); + get index(): boolean; + /** + * Helper function that creates a buffer based on an array or TypedArray + * @param {ArrayBufferView | number[]} data - the TypedArray that the buffer will store. If this is a regular Array it will be converted to a Float32Array. + * @returns - A new Buffer based on the data provided. + */ + static from(data: IArrayBuffer | number[]): Buffer_2; +} +export { Buffer_2 as Buffer } + +/** + * @interface SharedArrayBuffer + */ +/** + * Buffer resource with data of typed array. + * @memberof PIXI + */ +export declare class BufferResource extends Resource { + /** Source array Cannot be {@code ClampedUint8Array} because it cant be uploaded to WebGL */ + data: Float32Array | Uint8Array | Uint16Array | Int32Array | Uint32Array; + /** + * @param source - Source buffer + * @param options - Options + * @param {number} options.width - Width of the texture + * @param {number} options.height - Height of the texture + */ + constructor(source: Float32Array | Uint8Array | Uint16Array | Int32Array | Uint32Array, options: ISize); + /** + * Upload the texture to the GPU. + * @param renderer - Upload to the renderer + * @param baseTexture - Reference to parent texture + * @param glTexture - glTexture + * @returns - true is success + */ + upload(renderer: Renderer, baseTexture: BaseTexture, glTexture: GLTexture): boolean; + /** Destroy and don't use after this. */ + dispose(): void; + /** + * Used to auto-detect the type of resource. + * @param {*} source - The source object + * @returns {boolean} `true` if + */ + static test(source: unknown): source is Float32Array | Uint8Array | Uint32Array; +} + +/** + * System plugin to the renderer to manage buffers. + * + * WebGL uses Buffers as a way to store objects to the GPU. + * This system makes working with them a lot easier. + * + * Buffers are used in three main places in WebGL + * - geometry information + * - Uniform information (via uniform buffer objects - a WebGL 2 only feature) + * - Transform feedback information. (WebGL 2 only feature) + * + * This system will handle the binding of buffers to the GPU as well as uploading + * them. With this system, you never need to work directly with GPU buffers, but instead work with + * the PIXI.Buffer class. + * @class + * @memberof PIXI + */ +declare class BufferSystem implements ISystem { + CONTEXT_UID: number; + gl: IRenderingContext; + /** Cache for all buffers by id, used in case renderer gets destroyed or for profiling */ + readonly managedBuffers: { + [key: number]: Buffer_2; + }; + /** Cache keeping track of the base bound buffer bases */ + readonly boundBufferBases: { + [key: number]: Buffer_2; + }; + private renderer; + /** + * @param {PIXI.Renderer} renderer - The renderer this System works for. + */ + constructor(renderer: Renderer); + /** + * @ignore + */ + destroy(): void; + /** Sets up the renderer context and necessary buffers. */ + protected contextChange(): void; + /** + * This binds specified buffer. On first run, it will create the webGL buffers for the context too + * @param buffer - the buffer to bind to the renderer + */ + bind(buffer: Buffer_2): void; + /** + * Binds an uniform buffer to at the given index. + * + * A cache is used so a buffer will not be bound again if already bound. + * @param buffer - the buffer to bind + * @param index - the base index to bind it to. + */ + bindBufferBase(buffer: Buffer_2, index: number): void; + /** + * Binds a buffer whilst also binding its range. + * This will make the buffer start from the offset supplied rather than 0 when it is read. + * @param buffer - the buffer to bind + * @param index - the base index to bind at, defaults to 0 + * @param offset - the offset to bind at (this is blocks of 256). 0 = 0, 1 = 256, 2 = 512 etc + */ + bindBufferRange(buffer: Buffer_2, index?: number, offset?: number): void; + /** + * Will ensure the data in the buffer is uploaded to the GPU. + * @param {PIXI.Buffer} buffer - the buffer to update + */ + update(buffer: Buffer_2): void; + /** + * Disposes buffer + * @param {PIXI.Buffer} buffer - buffer with data + * @param {boolean} [contextLost=false] - If context was lost, we suppress deleteVertexArray + */ + dispose(buffer: Buffer_2, contextLost?: boolean): void; + /** + * dispose all WebGL resources of all managed buffers + * @param {boolean} [contextLost=false] - If context was lost, we suppress `gl.delete` calls + */ + disposeAll(contextLost?: boolean): void; + /** + * creates and attaches a GLBuffer object tied to the current context. + * @param buffer + * @protected + */ + protected createGLBuffer(buffer: Buffer_2): GLBuffer; +} + +/** + * @interface OffscreenCanvas + */ +/** + * Resource type for HTMLCanvasElement. + * @memberof PIXI + */ +export declare class CanvasResource extends BaseImageResource { + /** + * @param source - Canvas element to use + */ + constructor(source: HTMLCanvasElement); + /** + * Used to auto-detect the type of resource. + * @param {*} source - The source object + * @returns {boolean} `true` if source is HTMLCanvasElement or OffscreenCanvas + */ + static test(source: unknown): source is OffscreenCanvas | HTMLCanvasElement; +} + +export declare function checkMaxIfStatementsInShader(maxIfs: number, gl: IRenderingContext): number; + +/** + * System plugin to the renderer to manage the context. + * @memberof PIXI + */ +export declare class ContextSystem implements ISystem { + /** + * Either 1 or 2 to reflect the WebGL version being used. + * @readonly + */ + webGLVersion: number; + /** + * Features supported by current context. + * @type {object} + * @readonly + * @property {boolean} uint32Indices - Support for 32-bit indices buffer. + */ + readonly supports: ISupportDict; + protected CONTEXT_UID: number; + protected gl: IRenderingContext; + /** + * Extensions available. + * @type {object} + * @readonly + * @property {WEBGL_draw_buffers} drawBuffers - WebGL v1 extension + * @property {WEBGL_depth_texture} depthTexture - WebGL v1 extension + * @property {OES_texture_float} floatTexture - WebGL v1 extension + * @property {WEBGL_lose_context} loseContext - WebGL v1 extension + * @property {OES_vertex_array_object} vertexArrayObject - WebGL v1 extension + * @property {EXT_texture_filter_anisotropic} anisotropicFiltering - WebGL v1 and v2 extension + */ + extensions: WebGLExtensions; + private renderer; + /** @param renderer - The renderer this System works for. */ + constructor(renderer: Renderer); + /** + * `true` if the context is lost + * @readonly + */ + get isLost(): boolean; + /** + * Handles the context change event. + * @param {WebGLRenderingContext} gl - New WebGL context. + */ + protected contextChange(gl: IRenderingContext): void; + /** + * Initializes the context. + * @protected + * @param {WebGLRenderingContext} gl - WebGL context + */ + initFromContext(gl: IRenderingContext): void; + /** + * Initialize from context options + * @protected + * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext + * @param {object} options - context attributes + */ + initFromOptions(options: WebGLContextAttributes): void; + /** + * Helper class to create a WebGL Context + * @param canvas - the canvas element that we will get the context from + * @param options - An options object that gets passed in to the canvas element containing the + * context attributes + * @see https://developer.mozilla.org/en/docs/Web/API/HTMLCanvasElement/getContext + * @returns {WebGLRenderingContext} the WebGL context + */ + createContext(canvas: HTMLCanvasElement, options: WebGLContextAttributes): IRenderingContext; + /** Auto-populate the {@link PIXI.ContextSystem.extensions extensions}. */ + protected getExtensions(): void; + /** + * Handles a lost webgl context + * @param {WebGLContextEvent} event - The context lost event. + */ + protected handleContextLost(event: WebGLContextEvent): void; + /** Handles a restored webgl context. */ + protected handleContextRestored(): void; + destroy(): void; + /** Handle the post-render runner event. */ + protected postrender(): void; + /** + * Validate context. + * @param {WebGLRenderingContext} gl - Render context. + */ + protected validateContext(gl: IRenderingContext): void; +} + +/** + * logic originally from here: https://github.com/sketchpunk/FunWithWebGL2/blob/master/lesson_022/Shaders.js + * rewrote it, but this was a great starting point to get a solid understanding of whats going on :) + * @ignore + * @param uniformData + */ +export declare function createUBOElements(uniformData: IUniformData[]): { + uboElements: UBOElement[]; + size: number; +}; + +/** + * Resource for a CubeTexture which contains six resources. + * @memberof PIXI + */ +export declare class CubeResource extends AbstractMultiResource { + items: ArrayFixed; + /** + * In case BaseTextures are supplied, whether to use same resource or bind baseTexture itself. + * @protected + */ + linkBaseTexture: boolean; + /** + * @param {Array} [source] - Collection of URLs or resources + * to use as the sides of the cube. + * @param options - ImageResource options + * @param {number} [options.width] - Width of resource + * @param {number} [options.height] - Height of resource + * @param {number} [options.autoLoad=true] - Whether to auto-load resources + * @param {number} [options.linkBaseTexture=true] - In case BaseTextures are supplied, + * whether to copy them or use + */ + constructor(source?: ArrayFixed, options?: ICubeResourceOptions); + /** + * Add binding. + * @param baseTexture - parent base texture + */ + bind(baseTexture: BaseTexture): void; + addBaseTextureAt(baseTexture: BaseTexture, index: number, linkBaseTexture?: boolean): this; + /** + * Upload the resource + * @param renderer + * @param _baseTexture + * @param glTexture + * @returns {boolean} true is success + */ + upload(renderer: Renderer, _baseTexture: BaseTexture, glTexture: GLTexture): boolean; + /** Number of texture sides to store for CubeResources. */ + static SIDES: number; + /** + * Used to auto-detect the type of resource. + * @param {*} source - The source object + * @returns {boolean} `true` if source is an array of 6 elements + */ + static test(source: unknown): source is ArrayFixed; +} + +export declare const defaultFilterVertex: string; + +/** + * Default filter vertex shader + * @memberof PIXI + * @member {string} defaultFilterVertex + */ +export declare const defaultVertex: string; + +/** + * A filter is a special shader that applies post-processing effects to an input texture and writes into an output + * render-target. + * + * {@link http://pixijs.io/examples/#/filters/blur-filter.js Example} of the + * {@link PIXI.filters.BlurFilter BlurFilter}. + * + * ### Usage + * Filters can be applied to any DisplayObject or Container. + * PixiJS' `FilterSystem` renders the container into temporary Framebuffer, + * then filter renders it to the screen. + * Multiple filters can be added to the `filters` array property and stacked on each other. + * + * ``` + * const filter = new PIXI.Filter(myShaderVert, myShaderFrag, { myUniform: 0.5 }); + * const container = new PIXI.Container(); + * container.filters = [filter]; + * ``` + * + * ### Previous Version Differences + * + * In PixiJS **v3**, a filter was always applied to _whole screen_. + * + * In PixiJS **v4**, a filter can be applied _only part of the screen_. + * Developers had to create a set of uniforms to deal with coordinates. + * + * In PixiJS **v5** combines _both approaches_. + * Developers can use normal coordinates of v3 and then allow filter to use partial Framebuffers, + * bringing those extra uniforms into account. + * + * Also be aware that we have changed default vertex shader, please consult + * {@link https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters Wiki}. + * + * ### Frames + * + * The following table summarizes the coordinate spaces used in the filtering pipeline: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Coordinate SpaceDescription
Texture Coordinates + * The texture (or UV) coordinates in the input base-texture's space. These are normalized into the (0,1) range along + * both axes. + *
World Space + * A point in the same space as the world bounds of any display-object (i.e. in the scene graph's space). + *
Physical Pixels + * This is base-texture's space with the origin on the top-left. You can calculate these by multiplying the texture + * coordinates by the dimensions of the texture. + *
+ * + * ### Built-in Uniforms + * + * PixiJS viewport uses screen (CSS) coordinates, `(0, 0, renderer.screen.width, renderer.screen.height)`, + * and `projectionMatrix` uniform maps it to the gl viewport. + * + * **uSampler** + * + * The most important uniform is the input texture that container was rendered into. + * _Important note: as with all Framebuffers in PixiJS, both input and output are + * premultiplied by alpha._ + * + * By default, input normalized coordinates are passed to fragment shader with `vTextureCoord`. + * Use it to sample the input. + * + * ``` + * const fragment = ` + * varying vec2 vTextureCoord; + * uniform sampler2D uSampler; + * void main(void) + * { + * gl_FragColor = texture2D(uSampler, vTextureCoord); + * } + * `; + * + * const myFilter = new PIXI.Filter(null, fragment); + * ``` + * + * This filter is just one uniform less than {@link PIXI.filters.AlphaFilter AlphaFilter}. + * + * **outputFrame** + * + * The `outputFrame` holds the rectangle where filter is applied in screen (CSS) coordinates. + * It's the same as `renderer.screen` for a fullscreen filter. + * Only a part of `outputFrame.zw` size of temporary Framebuffer is used, + * `(0, 0, outputFrame.width, outputFrame.height)`, + * + * Filters uses this quad to normalized (0-1) space, its passed into `aVertexPosition` attribute. + * To calculate vertex position in screen space using normalized (0-1) space: + * + * ``` + * vec4 filterVertexPosition( void ) + * { + * vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + * return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); + * } + * ``` + * + * **inputSize** + * + * Temporary framebuffer is different, it can be either the size of screen, either power-of-two. + * The `inputSize.xy` are size of temporary framebuffer that holds input. + * The `inputSize.zw` is inverted, it's a shortcut to evade division inside the shader. + * + * Set `inputSize.xy = outputFrame.zw` for a fullscreen filter. + * + * To calculate input normalized coordinate, you have to map it to filter normalized space. + * Multiply by `outputFrame.zw` to get input coordinate. + * Divide by `inputSize.xy` to get input normalized coordinate. + * + * ``` + * vec2 filterTextureCoord( void ) + * { + * return aVertexPosition * (outputFrame.zw * inputSize.zw); // same as /inputSize.xy + * } + * ``` + * **resolution** + * + * The `resolution` is the ratio of screen (CSS) pixels to real pixels. + * + * **inputPixel** + * + * `inputPixel.xy` is the size of framebuffer in real pixels, same as `inputSize.xy * resolution` + * `inputPixel.zw` is inverted `inputPixel.xy`. + * + * It's handy for filters that use neighbour pixels, like {@link PIXI.filters.FXAAFilter FXAAFilter}. + * + * **inputClamp** + * + * If you try to get info from outside of used part of Framebuffer - you'll get undefined behaviour. + * For displacements, coordinates has to be clamped. + * + * The `inputClamp.xy` is left-top pixel center, you may ignore it, because we use left-top part of Framebuffer + * `inputClamp.zw` is bottom-right pixel center. + * + * ``` + * vec4 color = texture2D(uSampler, clamp(modifiedTextureCoord, inputClamp.xy, inputClamp.zw)) + * ``` + * OR + * ``` + * vec4 color = texture2D(uSampler, min(modifigedTextureCoord, inputClamp.zw)) + * ``` + * + * ### Additional Information + * + * Complete documentation on Filter usage is located in the + * {@link https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters Wiki}. + * + * Since PixiJS only had a handful of built-in filters, additional filters can be downloaded + * {@link https://github.com/pixijs/pixi-filters here} from the PixiJS Filters repository. + * @memberof PIXI + */ +export declare class Filter extends Shader { + /** + * The padding of the filter. Some filters require extra space to breath such as a blur. + * Increasing this will add extra width and height to the bounds of the object that the + * filter is applied to. + */ + padding: number; + /** The samples of the filter. */ + multisample: MSAA_QUALITY; + /** If enabled is true the filter is applied, if false it will not. */ + enabled: boolean; + /** + * If enabled, PixiJS will fit the filter area into boundaries for better performance. + * Switch it off if it does not work for specific shader. + * @default true + */ + autoFit: boolean; + /** + * Legacy filters use position and uvs from attributes (set by filter system) + * @readonly + */ + legacy: boolean; + /** The WebGL state the filter requires to render. */ + state: State; + protected _resolution: number; + /** + * @param vertexSrc - The source of the vertex shader. + * @param fragmentSrc - The source of the fragment shader. + * @param uniforms - Custom uniforms to use to augment the built-in ones. + */ + constructor(vertexSrc?: string, fragmentSrc?: string, uniforms?: Dict); + /** + * Applies the filter + * @param {PIXI.FilterSystem} filterManager - The renderer to retrieve the filter from + * @param {PIXI.RenderTexture} input - The input render target. + * @param {PIXI.RenderTexture} output - The target to output to. + * @param {PIXI.CLEAR_MODES} [clearMode] - Should the output be cleared before rendering to it. + * @param {object} [_currentState] - It's current state of filter. + * There are some useful properties in the currentState : + * target, filters, sourceFrame, destinationFrame, renderTarget, resolution + */ + apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clearMode?: CLEAR_MODES, _currentState?: FilterState): void; + /** + * Sets the blend mode of the filter. + * @default PIXI.BLEND_MODES.NORMAL + */ + get blendMode(): BLEND_MODES; + set blendMode(value: BLEND_MODES); + /** + * The resolution of the filter. Setting this to be lower will lower the quality but + * increase the performance of the filter. + */ + get resolution(): number; + set resolution(value: number); + /** + * The default vertex shader source + * @constant + */ + static get defaultVertexSrc(): string; + /** + * The default fragment shader source + * @constant + */ + static get defaultFragmentSrc(): string; + /** Used for caching shader IDs. */ + static SOURCE_KEY_MAP: Dict; +} + +/** + * System plugin to the renderer to manage filter states. + * @ignore + */ +export declare class FilterState { + renderTexture: RenderTexture; + /** + * Target of the filters + * We store for case when custom filter wants to know the element it was applied on + * @member {PIXI.DisplayObject} + */ + target: IFilterTarget; + /** + * Compatibility with PixiJS v4 filters + * @default false + */ + legacy: boolean; + /** + * Resolution of filters + * @default 1 + */ + resolution: number; + /** + * Number of samples + * @default MSAA_QUALITY.NONE + */ + multisample: MSAA_QUALITY; + /** Source frame. */ + sourceFrame: Rectangle; + /** Destination frame. */ + destinationFrame: Rectangle; + /** Original render-target source frame. */ + bindingSourceFrame: Rectangle; + /** Original render-target destination frame. */ + bindingDestinationFrame: Rectangle; + /** Collection of filters. */ + filters: Array; + /** Projection system transform saved by link. */ + transform: Matrix; + constructor(); + /** Clears the state */ + clear(): void; +} + +/** + * System plugin to the renderer to manage filters. + * + * ## Pipeline + * + * The FilterSystem executes the filtering pipeline by rendering the display-object into a texture, applying its + * [filters]{@link PIXI.Filter} in series, and the last filter outputs into the final render-target. + * + * The filter-frame is the rectangle in world space being filtered, and those contents are mapped into + * `(0, 0, filterFrame.width, filterFrame.height)` into the filter render-texture. The filter-frame is also called + * the source-frame, as it is used to bind the filter render-textures. The last filter outputs to the `filterFrame` + * in the final render-target. + * + * ## Usage + * + * {@link PIXI.Container#renderAdvanced} is an example of how to use the filter system. It is a 3 step process: + * + * **push**: Use {@link PIXI.FilterSystem#push} to push the set of filters to be applied on a filter-target. + * **render**: Render the contents to be filtered using the renderer. The filter-system will only capture the contents + * inside the bounds of the filter-target. NOTE: Using {@link PIXI.Renderer#render} is + * illegal during an existing render cycle, and it may reset the filter system. + * **pop**: Use {@link PIXI.FilterSystem#pop} to pop & execute the filters you initially pushed. It will apply them + * serially and output to the bounds of the filter-target. + * @memberof PIXI + */ +export declare class FilterSystem implements ISystem { + /** + * List of filters for the FilterSystem + * @member {object[]} + */ + readonly defaultFilterStack: Array; + /** A pool for storing filter states, save us creating new ones each tick. */ + statePool: Array; + /** Stores a bunch of POT textures used for filtering. */ + texturePool: RenderTexturePool; + /** Whether to clear output renderTexture in AUTO/BLIT mode. See {@link PIXI.CLEAR_MODES}. */ + forceClear: boolean; + /** + * Old padding behavior is to use the max amount instead of sum padding. + * Use this flag if you need the old behavior. + * @default false + */ + useMaxPadding: boolean; + /** A very simple geometry used when drawing a filter effect to the screen. */ + protected quad: Quad; + /** Quad UVs */ + protected quadUv: QuadUv; + /** + * Active state + * @member {object} + */ + protected activeState: FilterState; + /** + * This uniform group is attached to filter uniforms when used. + * @property {PIXI.Rectangle} outputFrame - + * @property {Float32Array} inputSize - + * @property {Float32Array} inputPixel - + * @property {Float32Array} inputClamp - + * @property {number} resolution - + * @property {Float32Array} filterArea - + * @property {Float32Array} filterClamp - + */ + protected globalUniforms: UniformGroup; + /** Temporary rect for math. */ + private tempRect; + renderer: Renderer; + /** + * @param renderer - The renderer this System works for. + */ + constructor(renderer: Renderer); + /** + * Pushes a set of filters to be applied later to the system. This will redirect further rendering into an + * input render-texture for the rest of the filtering pipeline. + * @param {PIXI.DisplayObject} target - The target of the filter to render. + * @param filters - The filters to apply. + */ + push(target: IFilterTarget, filters: Array): void; + /** Pops off the filter and applies it. */ + pop(): void; + /** + * Binds a renderTexture with corresponding `filterFrame`, clears it if mode corresponds. + * @param filterTexture - renderTexture to bind, should belong to filter pool or filter stack + * @param clearMode - clearMode, by default its CLEAR/YES. See {@link PIXI.CLEAR_MODES} + */ + bindAndClear(filterTexture: RenderTexture, clearMode?: CLEAR_MODES): void; + /** + * Draws a filter using the default rendering process. + * + * This should be called only by {@link Filter#apply}. + * @param filter - The filter to draw. + * @param input - The input render target. + * @param output - The target to output to. + * @param clearMode - Should the output be cleared before rendering to it + */ + applyFilter(filter: Filter, input: RenderTexture, output: RenderTexture, clearMode?: CLEAR_MODES): void; + /** + * Multiply _input normalized coordinates_ to this matrix to get _sprite texture normalized coordinates_. + * + * Use `outputMatrix * vTextureCoord` in the shader. + * @param outputMatrix - The matrix to output to. + * @param {PIXI.Sprite} sprite - The sprite to map to. + * @returns The mapped matrix. + */ + calculateSpriteMatrix(outputMatrix: Matrix, sprite: ISpriteMaskTarget): Matrix; + /** Destroys this Filter System. */ + destroy(): void; + /** + * Gets a Power-of-Two render texture or fullScreen texture + * @param minWidth - The minimum width of the render texture in real pixels. + * @param minHeight - The minimum height of the render texture in real pixels. + * @param resolution - The resolution of the render texture. + * @param multisample - Number of samples of the render texture. + * @returns - The new render texture. + */ + protected getOptimalFilterTexture(minWidth: number, minHeight: number, resolution?: number, multisample?: MSAA_QUALITY): RenderTexture; + /** + * Gets extra render texture to use inside current filter + * To be compliant with older filters, you can use params in any order + * @param input - renderTexture from which size and resolution will be copied + * @param resolution - override resolution of the renderTexture + * @param multisample - number of samples of the renderTexture + */ + getFilterTexture(input?: RenderTexture, resolution?: number, multisample?: MSAA_QUALITY): RenderTexture; + /** + * Frees a render texture back into the pool. + * @param renderTexture - The renderTarget to free + */ + returnFilterTexture(renderTexture: RenderTexture): void; + /** Empties the texture pool. */ + emptyPool(): void; + /** Calls `texturePool.resize()`, affects fullScreen renderTextures. */ + resize(): void; + /** + * @param matrix - first param + * @param rect - second param + */ + private transformAABB; + private roundFrame; +} + +/** + * A framebuffer can be used to render contents off of the screen. {@link PIXI.BaseRenderTexture} uses + * one internally to render into itself. You can attach a depth or stencil buffer to a framebuffer. + * + * On WebGL 2 machines, shaders can output to multiple textures simultaneously with GLSL 300 ES. + * @memberof PIXI + */ +export declare class Framebuffer { + /** Width of framebuffer in pixels. */ + width: number; + /** Height of framebuffer in pixels. */ + height: number; + /** + * Desired number of samples for antialiasing. 0 means AA should not be used. + * + * Experimental WebGL2 feature, allows to use antialiasing in individual renderTextures. + * Antialiasing is the same as for main buffer with renderer `antialias:true` options. + * Seriously affects GPU memory consumption and GPU performance. + * + *```js + * renderTexture.framebuffer.multisample = PIXI.MSAA_QUALITY.HIGH; + * //... + * renderer.render(myContainer, {renderTexture}); + * renderer.framebuffer.blit(); // copies data from MSAA framebuffer to texture + * ``` + * @default PIXI.MSAA_QUALITY.NONE + */ + multisample: MSAA_QUALITY; + stencil: boolean; + depth: boolean; + dirtyId: number; + dirtyFormat: number; + dirtySize: number; + depthTexture: BaseTexture; + colorTextures: Array; + glFramebuffers: { + [key: string]: GLFramebuffer; + }; + disposeRunner: Runner; + /** + * @param width - Width of the frame buffer + * @param height - Height of the frame buffer + */ + constructor(width: number, height: number); + /** + * Reference to the colorTexture. + * @readonly + */ + get colorTexture(): BaseTexture; + /** + * Add texture to the colorTexture array. + * @param index - Index of the array to add the texture to + * @param texture - Texture to add to the array + */ + addColorTexture(index?: number, texture?: BaseTexture): this; + /** + * Add a depth texture to the frame buffer. + * @param texture - Texture to add. + */ + addDepthTexture(texture?: BaseTexture): this; + /** Enable depth on the frame buffer. */ + enableDepth(): this; + /** Enable stencil on the frame buffer. */ + enableStencil(): this; + /** + * Resize the frame buffer + * @param width - Width of the frame buffer to resize to + * @param height - Height of the frame buffer to resize to + */ + resize(width: number, height: number): void; + /** Disposes WebGL resources that are connected to this geometry. */ + dispose(): void; + /** Destroys and removes the depth texture added to this framebuffer. */ + destroyDepthTexture(): void; +} + +/** + * System plugin to the renderer to manage framebuffers. + * @memberof PIXI + */ +export declare class FramebufferSystem implements ISystem { + /** A list of managed framebuffers. */ + readonly managedFramebuffers: Array; + current: Framebuffer; + viewport: Rectangle; + hasMRT: boolean; + writeDepthTexture: boolean; + protected CONTEXT_UID: number; + protected gl: IRenderingContext; + /** Framebuffer value that shows that we don't know what is bound. */ + protected unknownFramebuffer: Framebuffer; + protected msaaSamples: Array; + renderer: Renderer; + /** + * @param renderer - The renderer this System works for. + */ + constructor(renderer: Renderer); + /** Sets up the renderer context and necessary buffers. */ + protected contextChange(): void; + /** + * Bind a framebuffer. + * @param framebuffer + * @param frame - frame, default is framebuffer size + * @param mipLevel - optional mip level to set on the framebuffer - defaults to 0 + */ + bind(framebuffer?: Framebuffer, frame?: Rectangle, mipLevel?: number): void; + /** + * Set the WebGLRenderingContext's viewport. + * @param x - X position of viewport + * @param y - Y position of viewport + * @param width - Width of viewport + * @param height - Height of viewport + */ + setViewport(x: number, y: number, width: number, height: number): void; + /** + * Get the size of the current width and height. Returns object with `width` and `height` values. + * @readonly + */ + get size(): { + x: number; + y: number; + width: number; + height: number; + }; + /** + * Clear the color of the context + * @param r - Red value from 0 to 1 + * @param g - Green value from 0 to 1 + * @param b - Blue value from 0 to 1 + * @param a - Alpha value from 0 to 1 + * @param {PIXI.BUFFER_BITS} [mask=BUFFER_BITS.COLOR | BUFFER_BITS.DEPTH] - Bitwise OR of masks + * that indicate the buffers to be cleared, by default COLOR and DEPTH buffers. + */ + clear(r: number, g: number, b: number, a: number, mask?: BUFFER_BITS): void; + /** + * Initialize framebuffer for this context + * @protected + * @param framebuffer + * @returns - created GLFramebuffer + */ + initFramebuffer(framebuffer: Framebuffer): GLFramebuffer; + /** + * Resize the framebuffer + * @param framebuffer + * @protected + */ + resizeFramebuffer(framebuffer: Framebuffer): void; + /** + * Update the framebuffer + * @param framebuffer + * @param mipLevel + * @protected + */ + updateFramebuffer(framebuffer: Framebuffer, mipLevel: number): void; + /** + * Returns true if the frame buffer can be multisampled. + * @param framebuffer + */ + protected canMultisampleFramebuffer(framebuffer: Framebuffer): boolean; + /** + * Detects number of samples that is not more than a param but as close to it as possible + * @param samples - number of samples + * @returns - recommended number of samples + */ + protected detectSamples(samples: MSAA_QUALITY): MSAA_QUALITY; + /** + * Only works with WebGL2 + * + * blits framebuffer to another of the same or bigger size + * after that target framebuffer is bound + * + * Fails with WebGL warning if blits multisample framebuffer to different size + * @param framebuffer - by default it blits "into itself", from renderBuffer to texture. + * @param sourcePixels - source rectangle in pixels + * @param destPixels - dest rectangle in pixels, assumed to be the same as sourcePixels + */ + blit(framebuffer?: Framebuffer, sourcePixels?: Rectangle, destPixels?: Rectangle): void; + /** + * Disposes framebuffer. + * @param framebuffer - framebuffer that has to be disposed of + * @param contextLost - If context was lost, we suppress all delete function calls + */ + disposeFramebuffer(framebuffer: Framebuffer, contextLost?: boolean): void; + /** + * Disposes all framebuffers, but not textures bound to them. + * @param [contextLost=false] - If context was lost, we suppress all delete function calls + */ + disposeAll(contextLost?: boolean): void; + /** + * Forcing creation of stencil buffer for current framebuffer, if it wasn't done before. + * Used by MaskSystem, when its time to use stencil mask for Graphics element. + * + * Its an alternative for public lazy `framebuffer.enableStencil`, in case we need stencil without rebind. + * @private + */ + forceStencil(): void; + /** Resets framebuffer stored state, binds screen framebuffer. Should be called before renderTexture reset(). */ + reset(): void; + destroy(): void; +} + +/** + * generates a WebGL Program object from a high level Pixi Program. + * @param gl - a rendering context on which to generate the program + * @param program - the high level Pixi Program. + */ +export declare function generateProgram(gl: IRenderingContext, program: Program): GLProgram; + +export declare function generateUniformBufferSync(group: UniformGroup, uniformData: Dict): { + size: number; + syncFunc: UniformsSyncCallback; +}; + +/** + * The Geometry represents a model. It consists of two components: + * - GeometryStyle - The structure of the model such as the attributes layout + * - GeometryData - the data of the model - this consists of buffers. + * This can include anything from positions, uvs, normals, colors etc. + * + * Geometry can be defined without passing in a style or data if required (thats how I prefer!) + * + * ```js + * let geometry = new PIXI.Geometry(); + * + * geometry.addAttribute('positions', [0, 0, 100, 0, 100, 100, 0, 100], 2); + * geometry.addAttribute('uvs', [0,0,1,0,1,1,0,1],2) + * geometry.addIndex([0,1,2,1,3,2]) + * ``` + * @memberof PIXI + */ +export declare class Geometry { + buffers: Array; + indexBuffer: Buffer_2; + attributes: { + [key: string]: Attribute; + }; + id: number; + /** Whether the geometry is instanced. */ + instanced: boolean; + /** + * Number of instances in this geometry, pass it to `GeometrySystem.draw()`. + * @default 1 + */ + instanceCount: number; + /** + * A map of renderer IDs to webgl VAOs + * @type {object} + */ + glVertexArrayObjects: { + [key: number]: { + [key: string]: WebGLVertexArrayObject; + }; + }; + disposeRunner: Runner; + /** Count of existing (not destroyed) meshes that reference this geometry. */ + refCount: number; + /** + * @param buffers - An array of buffers. optional. + * @param attributes - Of the geometry, optional structure of the attributes layout + */ + constructor(buffers?: Array, attributes?: { + [key: string]: Attribute; + }); + /** + * + * Adds an attribute to the geometry + * Note: `stride` and `start` should be `undefined` if you dont know them, not 0! + * @param id - the name of the attribute (matching up to a shader) + * @param {PIXI.Buffer|number[]} buffer - the buffer that holds the data of the attribute . You can also provide an Array and a buffer will be created from it. + * @param size - the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2 + * @param normalized - should the data be normalized. + * @param [type=PIXI.TYPES.FLOAT] - what type of number is the attribute. Check {PIXI.TYPES} to see the ones available + * @param [stride=0] - How far apart, in bytes, the start of each value is. (used for interleaving data) + * @param [start=0] - How far into the array to start reading values (used for interleaving data) + * @param instance - Instancing flag + * @returns - Returns self, useful for chaining. + */ + addAttribute(id: string, buffer: Buffer_2 | Float32Array | Uint32Array | Array, size?: number, normalized?: boolean, type?: TYPES, stride?: number, start?: number, instance?: boolean): this; + /** + * Returns the requested attribute. + * @param id - The name of the attribute required + * @returns - The attribute requested. + */ + getAttribute(id: string): Attribute; + /** + * Returns the requested buffer. + * @param id - The name of the buffer required. + * @returns - The buffer requested. + */ + getBuffer(id: string): Buffer_2; + /** + * + * Adds an index buffer to the geometry + * The index buffer contains integers, three for each triangle in the geometry, which reference the various attribute buffers (position, colour, UV coordinates, other UV coordinates, normal, …). There is only ONE index buffer. + * @param {PIXI.Buffer|number[]} [buffer] - The buffer that holds the data of the index buffer. You can also provide an Array and a buffer will be created from it. + * @returns - Returns self, useful for chaining. + */ + addIndex(buffer?: Buffer_2 | IArrayBuffer | number[]): Geometry; + /** + * Returns the index buffer + * @returns - The index buffer. + */ + getIndex(): Buffer_2; + /** + * This function modifies the structure so that all current attributes become interleaved into a single buffer + * This can be useful if your model remains static as it offers a little performance boost + * @returns - Returns self, useful for chaining. + */ + interleave(): Geometry; + /** Get the size of the geometries, in vertices. */ + getSize(): number; + /** Disposes WebGL resources that are connected to this geometry. */ + dispose(): void; + /** Destroys the geometry. */ + destroy(): void; + /** + * Returns a clone of the geometry. + * @returns - A new clone of this geometry. + */ + clone(): Geometry; + /** + * Merges an array of geometries into a new single one. + * + * Geometry attribute styles must match for this operation to work. + * @param geometries - array of geometries to merge + * @returns - Shiny new geometry! + */ + static merge(geometries: Array): Geometry; +} + +/** + * System plugin to the renderer to manage geometry. + * @memberof PIXI + */ +export declare class GeometrySystem implements ISystem { + /** + * `true` if we has `*_vertex_array_object` extension. + * @readonly + */ + hasVao: boolean; + /** + * `true` if has `ANGLE_instanced_arrays` extension. + * @readonly + */ + hasInstance: boolean; + /** + * `true` if support `gl.UNSIGNED_INT` in `gl.drawElements` or `gl.drawElementsInstanced`. + * @readonly + */ + canUseUInt32ElementIndex: boolean; + protected CONTEXT_UID: number; + protected gl: IRenderingContext; + protected _activeGeometry: Geometry; + protected _activeVao: WebGLVertexArrayObject; + protected _boundBuffer: GLBuffer; + /** Cache for all geometries by id, used in case renderer gets destroyed or for profiling. */ + readonly managedGeometries: { + [key: number]: Geometry; + }; + /** Renderer that owns this {@link GeometrySystem}. */ + private renderer; + /** @param renderer - The renderer this System works for. */ + constructor(renderer: Renderer); + /** Sets up the renderer context and necessary buffers. */ + protected contextChange(): void; + /** + * Binds geometry so that is can be drawn. Creating a Vao if required + * @param geometry - Instance of geometry to bind. + * @param shader - Instance of shader to use vao for. + */ + bind(geometry?: Geometry, shader?: Shader): void; + /** Reset and unbind any active VAO and geometry. */ + reset(): void; + /** Update buffers of the currently bound geometry. */ + updateBuffers(): void; + /** + * Check compatibility between a geometry and a program + * @param geometry - Geometry instance. + * @param program - Program instance. + */ + protected checkCompatibility(geometry: Geometry, program: Program): void; + /** + * Takes a geometry and program and generates a unique signature for them. + * @param geometry - To get signature from. + * @param program - To test geometry against. + * @returns - Unique signature of the geometry and program + */ + protected getSignature(geometry: Geometry, program: Program): string; + /** + * Creates or gets Vao with the same structure as the geometry and stores it on the geometry. + * If vao is created, it is bound automatically. We use a shader to infer what and how to set up the + * attribute locations. + * @param geometry - Instance of geometry to to generate Vao for. + * @param shader - Instance of the shader. + * @param incRefCount - Increment refCount of all geometry buffers. + */ + protected initGeometryVao(geometry: Geometry, shader: Shader, incRefCount?: boolean): WebGLVertexArrayObject; + /** + * Disposes geometry. + * @param geometry - Geometry with buffers. Only VAO will be disposed + * @param [contextLost=false] - If context was lost, we suppress deleteVertexArray + */ + disposeGeometry(geometry: Geometry, contextLost?: boolean): void; + /** + * Dispose all WebGL resources of all managed geometries. + * @param [contextLost=false] - If context was lost, we suppress `gl.delete` calls + */ + disposeAll(contextLost?: boolean): void; + /** + * Activate vertex array object. + * @param geometry - Geometry instance. + * @param program - Shader program instance. + */ + protected activateVao(geometry: Geometry, program: Program): void; + /** + * Draws the currently bound geometry. + * @param type - The type primitive to render. + * @param size - The number of elements to be rendered. If not specified, all vertices after the + * starting vertex will be drawn. + * @param start - The starting vertex in the geometry to start drawing from. If not specified, + * drawing will start from the first vertex. + * @param instanceCount - The number of instances of the set of elements to execute. If not specified, + * all instances will be drawn. + */ + draw(type: DRAW_MODES, size?: number, start?: number, instanceCount?: number): this; + /** Unbind/reset everything. */ + protected unbind(): void; + destroy(): void; +} + +/** + * returns a little WebGL context to use for program inspection. + * @static + * @private + * @returns {WebGLRenderingContext} a gl context to test with + */ +export declare function getTestContext(): WebGLRenderingContext | WebGL2RenderingContext; + +export declare function getUBOData(uniforms: Dict, uniformData: Dict): any[]; + +declare class GLBuffer { + buffer: WebGLBuffer; + updateID: number; + byteLength: number; + refCount: number; + constructor(buffer?: WebGLBuffer); +} + +/** + * Internal framebuffer for WebGL context. + * @memberof PIXI + */ +export declare class GLFramebuffer { + /** The WebGL framebuffer. */ + framebuffer: WebGLFramebuffer; + /** Stencil+depth , usually costs 32bits per pixel. */ + stencil: WebGLRenderbuffer; + /** Detected AA samples number. */ + multisample: MSAA_QUALITY; + /** In case MSAA, we use this Renderbuffer instead of colorTextures[0] when we write info. */ + msaaBuffer: WebGLRenderbuffer; + /** + * In case we use MSAA, this is actual framebuffer that has colorTextures[0] + * The contents of that framebuffer are read when we use that renderTexture in sprites + */ + blitFramebuffer: Framebuffer; + /** Latest known version of framebuffer. */ + dirtyId: number; + /** Latest known version of framebuffer format. */ + dirtyFormat: number; + /** Latest known version of framebuffer size. */ + dirtySize: number; + /** Store the current mipmap of the textures the framebuffer will write too. */ + mipLevel: number; + constructor(framebuffer: WebGLTexture); +} + +/** + * Helper class to create a WebGL Program + * @memberof PIXI + */ +export declare class GLProgram { + /** The shader program. */ + program: WebGLProgram; + /** + * Holds the uniform data which contains uniform locations + * and current uniform values used for caching and preventing unneeded GPU commands. + */ + uniformData: Dict; + /** + * UniformGroups holds the various upload functions for the shader. Each uniform group + * and program have a unique upload function generated. + */ + uniformGroups: Dict; + /** A hash that stores where UBOs are bound to on the program. */ + uniformBufferBindings: Dict; + /** A hash for lazily-generated uniform uploading functions. */ + uniformSync: Dict; + /** + * A place where dirty ticks are stored for groups + * If a tick here does not match with the Higher level Programs tick, it means + * we should re upload the data. + */ + uniformDirtyGroups: Dict; + /** + * Makes a new Pixi program. + * @param program - webgl program + * @param uniformData - uniforms + */ + constructor(program: WebGLProgram, uniformData: { + [key: string]: IGLUniformData; + }); + /** Destroys this program. */ + destroy(): void; +} + +/** + * Internal texture for WebGL context. + * @memberof PIXI + */ +export declare class GLTexture { + /** The WebGL texture. */ + texture: WebGLTexture; + /** Width of texture that was used in texImage2D. */ + width: number; + /** Height of texture that was used in texImage2D. */ + height: number; + /** Whether mip levels has to be generated. */ + mipmap: boolean; + /** WrapMode copied from baseTexture. */ + wrapMode: number; + /** Type copied from baseTexture. */ + type: number; + /** Type copied from baseTexture. */ + internalFormat: number; + /** Type of sampler corresponding to this texture. See {@link PIXI.SAMPLER_TYPES} */ + samplerType: number; + /** Texture contents dirty flag. */ + dirtyId: number; + /** Texture style dirty flag. */ + dirtyStyleId: number; + constructor(texture: WebGLTexture); +} + +/** + * Marks places in PixiJS where you can pass Float32Array, UInt32Array, any typed arrays, and ArrayBuffer + * + * Same as ArrayBuffer in typescript lib, defined here just for documentation + */ +export declare interface IArrayBuffer extends ArrayBuffer { +} + +export declare interface IAttributeData { + type: string; + size: number; + location: number; + name: string; +} + +export declare type IAutoDetectOptions = ISize | ICubeResourceOptions | IImageResourceOptions | ISVGResourceOptions | IVideoResourceOptions | IResourcePluginOptions; + +export declare interface IBaseTextureOptions { + alphaMode?: ALPHA_MODES; + mipmap?: MIPMAP_MODES; + anisotropicLevel?: number; + scaleMode?: SCALE_MODES; + width?: number; + height?: number; + wrapMode?: WRAP_MODES; + format?: FORMATS; + type?: TYPES; + target?: TARGETS; + resolution?: number; + multisample?: MSAA_QUALITY; + resourceOptions?: RO; + pixiIdPrefix?: string; +} + +/** + * Interface for elements like Sprite, Mesh etc. for batching. + * @memberof PIXI + */ +export declare interface IBatchableElement { + _texture: Texture; + vertexData: Float32Array; + indices: Uint16Array | Uint32Array | Array; + uvs: Float32Array; + worldAlpha: number; + _tintRGB: number; + blendMode: BLEND_MODES; +} + +export declare interface IBatchFactoryOptions { + vertex?: string; + fragment?: string; + geometryClass?: typeof BatchGeometry; + vertexSize?: number; +} + +/** Constructor options for CubeResource */ +export declare interface ICubeResourceOptions extends ISize { + /** Whether to auto-load resources */ + autoLoad?: boolean; + /** In case BaseTextures are supplied, whether to copy them or use. */ + linkBaseTexture?: boolean; +} + +export declare interface IFilterTarget { + filterArea: Rectangle; + getBounds(skipUpdate?: boolean): Rectangle; +} + +export declare interface IGenerateTextureOptions { + scaleMode?: SCALE_MODES; + resolution?: number; + region?: Rectangle; + multisample?: MSAA_QUALITY; +} + +/** + * @private + */ +export declare class IGLUniformData { + location: WebGLUniformLocation; + value: number | boolean | Float32Array | Int32Array | Uint32Array | boolean[]; +} + +export declare interface IImageResourceOptions { + /** Start loading process */ + autoLoad?: boolean; + /** Whether its required to create a bitmap before upload. */ + createBitmap?: boolean; + /** Load image using cross origin. */ + crossorigin?: boolean | string; + /** Premultiply image alpha in bitmap. */ + alphaMode?: ALPHA_MODES; +} + +/** + * Resource type for ImageBitmap. + * @memberof PIXI + */ +export declare class ImageBitmapResource extends BaseImageResource { + /** + * @param source - Image element to use + */ + constructor(source: ImageBitmap); + /** + * Used to auto-detect the type of resource. + * @param {*} source - The source object + * @returns {boolean} `true` if source is an ImageBitmap + */ + static test(source: unknown): source is ImageBitmap; +} + +/** + * Resource type for HTMLImageElement. + * @memberof PIXI + */ +export declare class ImageResource extends BaseImageResource { + /** URL of the image source */ + url: string; + /** + * If the image should be disposed after upload + * @default false + */ + preserveBitmap: boolean; + /** + * If capable, convert the image using createImageBitmap API. + * @default PIXI.settings.CREATE_IMAGE_BITMAP + */ + createBitmap: boolean; + /** + * Controls texture alphaMode field + * Copies from options + * Default is `null`, copies option from baseTexture + * @readonly + */ + alphaMode: ALPHA_MODES; + /** + * The ImageBitmap element created for a {@code HTMLImageElement}. + * @default null + */ + bitmap: ImageBitmap; + /** + * Promise when loading. + * @default null + */ + private _load; + /** When process is completed */ + private _process; + /** + * @param source - image source or URL + * @param options + * @param {boolean} [options.autoLoad=true] - start loading process + * @param {boolean} [options.createBitmap=PIXI.settings.CREATE_IMAGE_BITMAP] - whether its required to create + * a bitmap before upload + * @param {boolean} [options.crossorigin=true] - Load image using cross origin + * @param {PIXI.ALPHA_MODES} [options.alphaMode=PIXI.ALPHA_MODES.UNPACK] - Premultiply image alpha in bitmap + */ + constructor(source: HTMLImageElement | string, options?: IImageResourceOptions); + /** + * Returns a promise when image will be loaded and processed. + * @param createBitmap - whether process image into bitmap + */ + load(createBitmap?: boolean): Promise; + /** + * Called when we need to convert image into BitmapImage. + * Can be called multiple times, real promise is cached inside. + * @returns - Cached promise to fill that bitmap + */ + process(): Promise; + /** + * Upload the image resource to GPU. + * @param renderer - Renderer to upload to + * @param baseTexture - BaseTexture for this resource + * @param glTexture - GLTexture to use + * @returns {boolean} true is success + */ + upload(renderer: Renderer, baseTexture: BaseTexture, glTexture: GLTexture): boolean; + /** Destroys this resource. */ + dispose(): void; + /** + * Used to auto-detect the type of resource. + * @param {*} source - The source object + * @returns {boolean} `true` if source is string or HTMLImageElement + */ + static test(source: unknown): source is string | HTMLImageElement; +} + +export declare type ImageSource = HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap; + +export declare interface IMaskTarget extends IFilterTarget { + renderable: boolean; + isSprite?: boolean; + worldTransform: Matrix; + isFastRect?(): boolean; + getBounds(skipUpdate?: boolean, rect?: Rectangle): Rectangle; + render(renderer: Renderer): void; +} + +/** + * Collection of installed resource types, class must extend {@link PIXI.Resource}. + * @example + * class CustomResource extends PIXI.Resource { + * // MUST have source, options constructor signature + * // for auto-detected resources to be created. + * constructor(source, options) { + * super(); + * } + * upload(renderer, baseTexture, glTexture) { + * // upload with GL + * return true; + * } + * // used to auto-detect resource + * static test(source, extension) { + * return extension === 'xyz'|| source instanceof SomeClass; + * } + * } + * // Install the new resource type + * PIXI.INSTALLED.push(CustomResource); + * @memberof PIXI + * @type {Array} + * @static + * @readonly + */ +export declare const INSTALLED: Array>; + +/** + * Interface for Container to interface with Renderer. + * @memberof PIXI + */ +export declare interface IRenderableContainer extends IRenderableObject { + /** Get Local bounds for container */ + getLocalBounds(rect?: Rectangle, skipChildrenUpdate?: boolean): Rectangle; +} + +/** + * Interface for DisplayObject to interface with Renderer. + * The minimum APIs needed to implement a renderable object. + * @memberof PIXI + */ +export declare interface IRenderableObject { + /** Object must have a parent container */ + parent: IRenderableContainer; + /** Before method for transform updates */ + enableTempParent(): IRenderableContainer; + /** Update the transforms */ + updateTransform(): void; + /** After method for transform updates */ + disableTempParent(parent: IRenderableContainer): void; + /** Render object directly */ + render(renderer: Renderer): void; +} + +/** + * Renderer options supplied to constructor. + * @memberof PIXI + * @see PIXI.settings.RENDER_OPTIONS + */ +export declare interface IRendererOptions extends GlobalMixins.IRendererOptions { + /** The canvas to use as the view. If omitted, a new canvas will be created. */ + view?: HTMLCanvasElement; + /** + * The width of the renderer's view. + * @default 800 + */ + width?: number; + /** + * The height of the renderer's view. + * @default 600 + */ + height?: number; + /** + * The resolution / device pixel ratio of the renderer. + * @default PIXI.settings.RESOLUTION + */ + resolution?: number; + /** + * Whether the CSS dimensions of the renderer's view should be resized automatically. + * @default false + */ + autoDensity?: boolean; + /** + * The background color used to clear the canvas. It accepts hex numbers (e.g. `0xff0000`). + * @default 0x000000 + */ + backgroundColor?: number; + /** + * Transparency of the background color, value from `0` (fully transparent) to `1` (fully opaque). + * @default 1 + */ + backgroundAlpha?: number; + /** + * Pass-through value for canvas' context attribute `alpha`. This option is for cases where the + * canvas needs to be opaque, possibly for performance reasons on some older devices. + * If you want to set transparency, please use `backgroundAlpha`. + * + * **WebGL Only:** When set to `'notMultiplied'`, the canvas' context attribute `alpha` will be + * set to `true` and `premultipliedAlpha` will be to `false`. + * @default true + */ + useContextAlpha?: boolean | 'notMultiplied'; + /** + * Use `backgroundAlpha` instead. + * @deprecated since 6.0.0 + */ + transparent?: boolean; + /** + * Whether to clear the canvas before new render passes. + * @default true + */ + clearBeforeRender?: boolean; + /** **WebGL Only.** User-provided WebGL rendering context object. */ + context?: IRenderingContext; + /** + * **WebGL Only.** Whether to enable anti-aliasing. This may affect performance. + * @default false + */ + antialias?: boolean; + /** + * **WebGL Only.** A hint indicating what configuration of GPU is suitable for the WebGL context, + * can be `'default'`, `'high-performance'` or `'low-power'`. + * Setting to `'high-performance'` will prioritize rendering performance over power consumption, + * while setting to `'low-power'` will prioritize power saving over rendering performance. + */ + powerPreference?: WebGLPowerPreference; + /** + * **WebGL Only.** Whether to enable drawing buffer preservation. If enabled, the drawing buffer will preserve + * its value until cleared or overwritten. Enable this if you need to call `toDataUrl` on the WebGL context. + * @default false + */ + preserveDrawingBuffer?: boolean; +} + +/** + * Renderer options supplied to `autoDetectRenderer`. + * @memberof PIXI + */ +export declare interface IRendererOptionsAuto extends IRendererOptions { + forceCanvas?: boolean; +} + +export declare interface IRendererPlugin { + destroy(): void; +} + +export declare interface IRendererPluginConstructor { + new (renderer: Renderer, options?: any): IRendererPlugin; +} + +export declare interface IRendererPlugins { + [key: string]: any; +} + +export declare interface IRendererRenderOptions { + renderTexture?: RenderTexture; + clear?: boolean; + transform?: Matrix; + skipUpdateTransform?: boolean; +} + +/** Mixed WebGL1/WebGL2 Rendering Context. Either its WebGL2, either its WebGL1 with PixiJS polyfills on it */ +export declare interface IRenderingContext extends WebGL2RenderingContext { +} + +/** + * Shape of supported resource plugins + * @memberof PIXI + */ +export declare interface IResourcePlugin { + test(source: unknown, extension: string): boolean; + new (source: any, options?: RO): R; +} + +export declare type IResourcePluginOptions = { + [key: string]: any; +}; + +export declare interface ISpriteMaskFilter extends Filter { + maskSprite: IMaskTarget; +} + +export declare interface ISpriteMaskTarget extends IMaskTarget { + _texture: Texture; + worldAlpha: number; + anchor: Point; +} + +export declare interface ISupportDict { + uint32Indices: boolean; +} + +export declare interface ISVGResourceOptions { + source?: string; + scale?: number; + width?: number; + height?: number; + autoLoad?: boolean; + crossorigin?: boolean | string; +} + +/** + * Interface for systems used by the {@link PIXI.Renderer}. + * @memberof PIXI + */ +export declare interface ISystem { + /** Generic destroy methods to be overridden by the subclass */ + destroy(): void; +} + +/** + * Types for system and pipe classes. + * @ignore + */ +export declare interface ISystemConstructor { + new (renderer: R): ISystem; +} + +/** + * PixiJS classes use this type instead of ArrayBuffer and typed arrays + * to support expressions like `geometry.buffers[0].data[0] = position.x`. + * + * Gives access to indexing and `length` field + * * @popelyshev: If data is actually ArrayBuffer and throws Exception on indexing - its user problem :) + */ +export declare interface ITypedArray extends IArrayBuffer { + readonly length: number; + [index: number]: number; + readonly BYTES_PER_ELEMENT: number; +} + +export declare interface IUniformData { + index: number; + type: string; + size: number; + isArray: boolean; + value: any; + name: string; +} + +export declare interface IUniformParser { + test(data: unknown, uniform: any): boolean; + code(name: string, uniform: any): string; + codeUbo?(name: string, uniform: any): string; +} + +export declare interface IUnloadableTexture { + _texture: Texture | RenderTexture; + children: IUnloadableTexture[]; +} + +export declare interface IVideoResourceOptions { + autoLoad?: boolean; + autoPlay?: boolean; + updateFPS?: number; + crossorigin?: boolean | string; +} + +export declare interface IVideoResourceOptionsElement { + src: string; + mime: string; +} + +/** + * Component for masked elements. + * + * Holds mask mode and temporary data about current mask. + * @memberof PIXI + */ +export declare class MaskData { + /** Mask type */ + type: MASK_TYPES; + /** + * Whether we know the mask type beforehand + * @default true + */ + autoDetect: boolean; + /** + * Which element we use to mask + * @member {PIXI.DisplayObject} + */ + maskObject: IMaskTarget; + /** Whether it belongs to MaskSystem pool */ + pooled: boolean; + /** Indicator of the type (always true for {@link MaskData} objects) */ + isMaskData: boolean; + /** + * Resolution of the sprite mask filter. + * If set to `null` or `0`, the resolution of the current render target is used. + * @default null + */ + resolution: number; + /** + * Number of samples of the sprite mask filter. + * If set to `null`, the sample count of the current render target is used. + * @default PIXI.settings.FILTER_MULTISAMPLE + */ + multisample: MSAA_QUALITY; + /** If enabled is true the mask is applied, if false it will not. */ + enabled: boolean; + /** Color mask. */ + colorMask: COLOR_MASK_BITS; + /** + * The sprite mask filter wrapped in an array. + * @private + */ + _filters: ISpriteMaskFilter_2[]; + /** + * Stencil counter above the mask in stack + * @private + */ + _stencilCounter: number; + /** + * Scissor counter above the mask in stack + * @private + */ + _scissorCounter: number; + /** + * Scissor operation above the mask in stack. + * Null if _scissorCounter is zero, rectangle instance if positive. + * @private + */ + _scissorRect: Rectangle; + /** + * pre-computed scissor rect + * does become _scissorRect when mask is actually pushed + * @private + */ + _scissorRectLocal: Rectangle; + /** + * pre-computed color mask + * @private + */ + _colorMask: number; + /** + * Targeted element. Temporary variable set by MaskSystem + * @member {PIXI.DisplayObject} + * @private + */ + _target: IMaskTarget; + /** + * Create MaskData + * @param {PIXI.DisplayObject} [maskObject=null] - object that describes the mask + */ + constructor(maskObject?: IMaskTarget); + /** + * The sprite mask filter. + * If set to `null`, the default sprite mask filter is used. + * @default null + */ + get filter(): ISpriteMaskFilter_2; + set filter(value: ISpriteMaskFilter_2); + /** Resets the mask data after popMask(). */ + reset(): void; + /** + * Copies counters from maskData above, called from pushMask(). + * @param maskAbove + */ + copyCountersOrReset(maskAbove?: MaskData): void; +} + +/** + * System plugin to the renderer to manage masks. + * + * There are three built-in types of masking: + * **Scissor Masking**: Scissor masking discards pixels that are outside of a rectangle called the scissor box. It is + * the most performant as the scissor test is inexpensive. However, it can only be used when the mask is rectangular. + * **Stencil Masking**: Stencil masking discards pixels that don't overlap with the pixels rendered into the stencil + * buffer. It is the next fastest option as it does not require rendering into a separate framebuffer. However, it does + * cause the mask to be rendered **twice** for each masking operation; hence, minimize the rendering cost of your masks. + * **Sprite Mask Filtering**: Sprite mask filtering discards pixels based on the red channel of the sprite-mask's + * texture. (Generally, the masking texture is grayscale). Using advanced techniques, you might be able to embed this + * type of masking in a custom shader - and hence, bypassing the masking system fully for performance wins. + * + * The best type of masking is auto-detected when you `push` one. To use scissor masking, you must pass in a `Graphics` + * object with just a rectangle drawn. + * + * ## Mask Stacks + * + * In the scene graph, masks can be applied recursively, i.e. a mask can be applied during a masking operation. The mask + * stack stores the currently applied masks in order. Each {@link PIXI.BaseRenderTexture} holds its own mask stack, i.e. + * when you switch render-textures, the old masks only applied when you switch back to rendering to the old render-target. + * @memberof PIXI + */ +export declare class MaskSystem implements ISystem { + /** + * Flag to enable scissor masking. + * @default true + */ + enableScissor: boolean; + /** Pool of used sprite mask filters. */ + protected readonly alphaMaskPool: Array; + /** + * Current index of alpha mask pool. + * @default 0 + * @readonly + */ + protected alphaMaskIndex: number; + /** Pool of mask data. */ + private readonly maskDataPool; + private maskStack; + private renderer; + /** + * @param renderer - The renderer this System works for. + */ + constructor(renderer: Renderer); + /** + * Changes the mask stack that is used by this System. + * @param maskStack - The mask stack + */ + setMaskStack(maskStack: Array): void; + /** + * Enables the mask and appends it to the current mask stack. + * + * NOTE: The batch renderer should be flushed beforehand to prevent pending renders from being masked. + * @param {PIXI.DisplayObject} target - Display Object to push the mask to + * @param {PIXI.MaskData|PIXI.Sprite|PIXI.Graphics|PIXI.DisplayObject} maskDataOrTarget - The masking data. + */ + push(target: IMaskTarget, maskDataOrTarget: MaskData | IMaskTarget): void; + /** + * Removes the last mask from the mask stack and doesn't return it. + * + * NOTE: The batch renderer should be flushed beforehand to render the masked contents before the mask is removed. + * @param {PIXI.IMaskTarget} target - Display Object to pop the mask from + */ + pop(target: IMaskTarget): void; + /** + * Sets type of MaskData based on its maskObject. + * @param maskData + */ + detect(maskData: MaskData): void; + /** + * Applies the Mask and adds it to the current filter stack. + * @param maskData - Sprite to be used as the mask. + */ + pushSpriteMask(maskData: MaskData): void; + /** + * Removes the last filter from the filter stack and doesn't return it. + * @param maskData - Sprite to be used as the mask. + */ + popSpriteMask(maskData: MaskData): void; + /** + * Pushes the color mask. + * @param maskData - The mask data + */ + pushColorMask(maskData: MaskData): void; + /** + * Pops the color mask. + * @param maskData - The mask data + */ + popColorMask(maskData: MaskData): void; + destroy(): void; +} + +/** + * Base for a common object renderer that can be used as a + * system renderer plugin. + * @memberof PIXI + */ +export declare class ObjectRenderer implements ISystem { + /** The renderer this manager works for. */ + protected renderer: Renderer; + /** + * @param renderer - The renderer this manager works for. + */ + constructor(renderer: Renderer); + /** Stub method that should be used to empty the current batch by rendering objects now. */ + flush(): void; + /** Generic destruction method that frees all resources. This should be called by subclasses. */ + destroy(): void; + /** + * Stub method that initializes any state required before + * rendering starts. It is different from the `prerender` + * signal, which occurs every frame, in that it is called + * whenever an object requests _this_ renderer specifically. + */ + start(): void; + /** Stops the renderer. It should free up any state and become dormant. */ + stop(): void; + /** + * Keeps the object to render. It doesn't have to be + * rendered immediately. + * @param {PIXI.DisplayObject} _object - The object to render. + */ + render(_object: any): void; +} + +/** + * Helper class to create a shader program. + * @memberof PIXI + */ +export declare class Program { + id: number; + /** Source code for the vertex shader. */ + vertexSrc: string; + /** Source code for the fragment shader. */ + fragmentSrc: string; + nameCache: any; + glPrograms: { + [key: number]: GLProgram; + }; + syncUniforms: any; + /** Assigned when a program is first bound to the shader system. */ + attributeData: { + [key: string]: IAttributeData; + }; + /** Assigned when a program is first bound to the shader system. */ + uniformData: { + [key: string]: IUniformData; + }; + /** + * @param vertexSrc - The source of the vertex shader. + * @param fragmentSrc - The source of the fragment shader. + * @param name - Name for shader + */ + constructor(vertexSrc?: string, fragmentSrc?: string, name?: string); + /** + * The default vertex shader source. + * @constant + */ + static get defaultVertexSrc(): string; + /** + * The default fragment shader source. + * @constant + */ + static get defaultFragmentSrc(): string; + /** + * A short hand function to create a program based of a vertex and fragment shader. + * + * This method will also check to see if there is a cached program. + * @param vertexSrc - The source of the vertex shader. + * @param fragmentSrc - The source of the fragment shader. + * @param name - Name for shader + * @returns A shiny new PixiJS shader program! + */ + static from(vertexSrc?: string, fragmentSrc?: string, name?: string): Program; +} + +/** + * System plugin to the renderer to manage the projection matrix. + * + * The `projectionMatrix` is a global uniform provided to all shaders. It is used to transform points in world space to + * normalized device coordinates. + * @memberof PIXI + */ +export declare class ProjectionSystem implements ISystem { + /** + * The destination frame used to calculate the current projection matrix. + * + * The destination frame is the rectangle in the render-target into which contents are rendered. If rendering + * to the screen, the origin is on the top-left. If rendering to a framebuffer, the origin is on the + * bottom-left. This "flipping" phenomenon is because of WebGL convention for (shader) texture coordinates, where + * the bottom-left corner is (0,0). It allows display-objects to map their (0,0) position in local-space (top-left) + * to (0,0) in texture space (bottom-left). In other words, a sprite's top-left corner actually renders the + * texture's bottom-left corner. You will also notice this when using a tool like SpectorJS to view your textures + * at runtime. + * + * The destination frame's dimensions (width,height) should be equal to the source frame. This is because, + * otherwise, the contents will be scaled to fill the destination frame. Similarly, the destination frame's (x,y) + * coordinates are (0,0) unless you know what you're doing. + * @readonly + */ + destinationFrame: Rectangle; + /** + * The source frame used to calculate the current projection matrix. + * + * The source frame is the rectangle in world space containing the contents to be rendered. + * @readonly + */ + sourceFrame: Rectangle; + /** + * Default destination frame + * + * This is not used internally. It is not advised to use this feature specifically unless you know what + * you're doing. The `update` method will default to this frame if you do not pass the destination frame. + * @readonly + */ + defaultFrame: Rectangle; + /** + * Projection matrix + * + * This matrix can be used to transform points from world space to normalized device coordinates, and is calculated + * from the sourceFrame → destinationFrame mapping provided. + * + * The renderer's `globalUniforms` keeps a reference to this, and so it is available for all shaders to use as a + * uniform. + * @readonly + */ + projectionMatrix: Matrix; + /** + * A transform to be appended to the projection matrix. + * + * This can be used to transform points in world-space one last time before they are outputted by the shader. You can + * use to rotate the whole scene, for example. Remember to clear it once you've rendered everything. + * @member {PIXI.Matrix} + */ + transform: Matrix; + private renderer; + /** @param renderer - The renderer this System works for. */ + constructor(renderer: Renderer); + /** + * Updates the projection-matrix based on the sourceFrame → destinationFrame mapping provided. + * + * NOTE: It is expected you call `renderer.framebuffer.setViewport(destinationFrame)` after this. This is because + * the framebuffer viewport converts shader vertex output in normalized device coordinates to window coordinates. + * + * NOTE-2: {@link RenderTextureSystem#bind} updates the projection-matrix when you bind a render-texture. It is expected + * that you dirty the current bindings when calling this manually. + * @param destinationFrame - The rectangle in the render-target to render the contents into. If rendering to the canvas, + * the origin is on the top-left; if rendering to a render-texture, the origin is on the bottom-left. + * @param sourceFrame - The rectangle in world space that contains the contents being rendered. + * @param resolution - The resolution of the render-target, which is the ratio of + * world-space (or CSS) pixels to physical pixels. + * @param root - Whether the render-target is the screen. This is required because rendering to textures + * is y-flipped (i.e. upside down relative to the screen). + */ + update(destinationFrame: Rectangle, sourceFrame: Rectangle, resolution: number, root: boolean): void; + /** + * Calculates the `projectionMatrix` to map points inside `sourceFrame` to inside `destinationFrame`. + * @param _destinationFrame - The destination frame in the render-target. + * @param sourceFrame - The source frame in world space. + * @param _resolution - The render-target's resolution, i.e. ratio of CSS to physical pixels. + * @param root - Whether rendering into the screen. Otherwise, if rendering to a framebuffer, the projection + * is y-flipped. + */ + calculateProjection(_destinationFrame: Rectangle, sourceFrame: Rectangle, _resolution: number, root: boolean): void; + /** + * Sets the transform of the active render target to the given matrix. + * @param _matrix - The transformation matrix + */ + setTransform(_matrix: Matrix): void; + destroy(): void; +} + +/** + * Helper class to create a quad + * @memberof PIXI + */ +export declare class Quad extends Geometry { + constructor(); +} + +/** + * Helper class to create a quad with uvs like in v4 + * @memberof PIXI + */ +export declare class QuadUv extends Geometry { + vertexBuffer: Buffer_2; + uvBuffer: Buffer_2; + /** An array of vertices. */ + vertices: Float32Array; + /** The Uvs of the quad. */ + uvs: Float32Array; + constructor(); + /** + * Maps two Rectangle to the quad. + * @param targetTextureFrame - The first rectangle + * @param destinationFrame - The second rectangle + * @returns - Returns itself. + */ + map(targetTextureFrame: Rectangle, destinationFrame: Rectangle): this; + /** + * Legacy upload method, just marks buffers dirty. + * @returns - Returns itself. + */ + invalidate(): this; +} + +/** + * The Renderer draws the scene and all its content onto a WebGL enabled canvas. + * + * This renderer should be used for browsers that support WebGL. + * + * This renderer works by automatically managing WebGLBatchesm, so no need for Sprite Batches or Sprite Clouds. + * Don't forget to add the view to your DOM or you will not see anything! + * + * Renderer is composed of systems that manage specific tasks. The following systems are added by default + * whenever you create a renderer: + * + * | System | Description | + * | ------------------------------------ | ----------------------------------------------------------------------------- | + * | {@link PIXI.BatchSystem} | This manages object renderers that defer rendering until a flush. | + * | {@link PIXI.ContextSystem} | This manages the WebGL context and extensions. | + * | {@link PIXI.EventSystem} | This manages UI events. | + * | {@link PIXI.FilterSystem} | This manages the filtering pipeline for post-processing effects. | + * | {@link PIXI.FramebufferSystem} | This manages framebuffers, which are used for offscreen rendering. | + * | {@link PIXI.GeometrySystem} | This manages geometries & buffers, which are used to draw object meshes. | + * | {@link PIXI.MaskSystem} | This manages masking operations. | + * | {@link PIXI.ProjectionSystem} | This manages the `projectionMatrix`, used by shaders to get NDC coordinates. | + * | {@link PIXI.RenderTextureSystem} | This manages render-textures, which are an abstraction over framebuffers. | + * | {@link PIXI.ScissorSystem} | This handles scissor masking, and is used internally by {@link MaskSystem} | + * | {@link PIXI.ShaderSystem} | This manages shaders, programs that run on the GPU to calculate 'em pixels. | + * | {@link PIXI.StateSystem} | This manages the WebGL state variables like blend mode, depth testing, etc. | + * | {@link PIXI.StencilSystem} | This handles stencil masking, and is used internally by {@link MaskSystem} | + * | {@link PIXI.TextureSystem} | This manages textures and their resources on the GPU. | + * | {@link PIXI.TextureGCSystem} | This will automatically remove textures from the GPU if they are not used. | + * + * The breadth of the API surface provided by the renderer is contained within these systems. + * @memberof PIXI + */ +export declare class Renderer extends AbstractRenderer { + /** + * WebGL context, set by {@link PIXI.ContextSystem this.context}. + * @readonly + * @member {WebGLRenderingContext} + */ + gl: IRenderingContext; + /** Global uniforms */ + globalUniforms: UniformGroup; + /** Unique UID assigned to the renderer's WebGL context. */ + CONTEXT_UID: number; + /** + * Flag if we are rendering to the screen vs renderTexture + * @readonly + * @default true + */ + renderingToScreen: boolean; + /** + * The number of msaa samples of the canvas. + * @readonly + */ + multisample: MSAA_QUALITY; + /** + * Mask system instance + * @readonly + */ + mask: MaskSystem; + /** + * Context system instance + * @readonly + */ + context: ContextSystem; + /** + * State system instance + * @readonly + */ + state: StateSystem; + /** + * Shader system instance + * @readonly + */ + shader: ShaderSystem; + /** + * Texture system instance + * @readonly + */ + texture: TextureSystem; + /** + * Buffer system instance + * @readonly + */ + buffer: BufferSystem; + /** + * Geometry system instance + * @readonly + */ + geometry: GeometrySystem; + /** + * Framebuffer system instance + * @readonly + */ + framebuffer: FramebufferSystem; + /** + * Scissor system instance + * @readonly + */ + scissor: ScissorSystem; + /** + * Stencil system instance + * @readonly + */ + stencil: StencilSystem; + /** + * Projection system instance + * @readonly + */ + projection: ProjectionSystem; + /** + * Texture garbage collector system instance + * @readonly + */ + textureGC: TextureGCSystem; + /** + * Filter system instance + * @readonly + */ + filter: FilterSystem; + /** + * RenderTexture system instance + * @readonly + */ + renderTexture: RenderTextureSystem; + /** + * Batch system instance + * @readonly + */ + batch: BatchSystem; + /** + * Internal signal instances of **runner**, these + * are assigned to each system created. + * @see PIXI.Runner + * @name runners + * @private + * @type {object} + * @readonly + * @property {PIXI.Runner} destroy - Destroy runner + * @property {PIXI.Runner} contextChange - Context change runner + * @property {PIXI.Runner} reset - Reset runner + * @property {PIXI.Runner} update - Update runner + * @property {PIXI.Runner} postrender - Post-render runner + * @property {PIXI.Runner} prerender - Pre-render runner + * @property {PIXI.Runner} resize - Resize runner + */ + runners: { + [key: string]: Runner; + }; + /** + * Create renderer if WebGL is available. Overrideable + * by the **@pixi/canvas-renderer** package to allow fallback. + * throws error if WebGL is not available. + * @param options + * @private + */ + static create(options?: IRendererOptions): AbstractRenderer; + /** + * @param {PIXI.IRendererOptions} [options] - The optional renderer parameters. + * @param {boolean} [options.antialias=false] - + * **WebGL Only.** Whether to enable anti-aliasing. This may affect performance. + * @param {boolean} [options.autoDensity=false] - + * Whether the CSS dimensions of the renderer's view should be resized automatically. + * @param {number} [options.backgroundAlpha=1] - + * Transparency of the background color, value from `0` (fully transparent) to `1` (fully opaque). + * @param {number} [options.backgroundColor=0x000000] - + * The background color used to clear the canvas. It accepts hex numbers (e.g. `0xff0000`). + * @param {boolean} [options.clearBeforeRender=true] - Whether to clear the canvas before new render passes. + * @param {PIXI.IRenderingContext} [options.context] - **WebGL Only.** User-provided WebGL rendering context object. + * @param {number} [options.height=600] - The height of the renderer's view. + * @param {string} [options.powerPreference] - + * **WebGL Only.** A hint indicating what configuration of GPU is suitable for the WebGL context, + * can be `'default'`, `'high-performance'` or `'low-power'`. + * Setting to `'high-performance'` will prioritize rendering performance over power consumption, + * while setting to `'low-power'` will prioritize power saving over rendering performance. + * @param {boolean} [options.premultipliedAlpha=true] - + * **WebGL Only.** Whether the compositor will assume the drawing buffer contains colors with premultiplied alpha. + * @param {boolean} [options.preserveDrawingBuffer=false] - + * **WebGL Only.** Whether to enable drawing buffer preservation. If enabled, the drawing buffer will preserve + * its value until cleared or overwritten. Enable this if you need to call `toDataUrl` on the WebGL context. + * @param {number} [options.resolution=PIXI.settings.RESOLUTION] - + * The resolution / device pixel ratio of the renderer. + * @param {boolean} [options.transparent] - + * **Deprecated since 6.0.0, Use `backgroundAlpha` instead.** \ + * `true` sets `backgroundAlpha` to `0`, `false` sets `backgroundAlpha` to `1`. + * @param {boolean|'notMultiplied'} [options.useContextAlpha=true] - + * Pass-through value for canvas' context attribute `alpha`. This option is for cases where the + * canvas needs to be opaque, possibly for performance reasons on some older devices. + * If you want to set transparency, please use `backgroundAlpha`. \ + * **WebGL Only:** When set to `'notMultiplied'`, the canvas' context attribute `alpha` will be + * set to `true` and `premultipliedAlpha` will be to `false`. + * @param {HTMLCanvasElement} [options.view=null] - + * The canvas to use as the view. If omitted, a new canvas will be created. + * @param {number} [options.width=800] - The width of the renderer's view. + */ + constructor(options?: IRendererOptions); + protected contextChange(): void; + /** + * Add a new system to the renderer. + * @param ClassRef - Class reference + * @param name - Property name for system, if not specified + * will use a static `name` property on the class itself. This + * name will be assigned as s property on the Renderer so make + * sure it doesn't collide with properties on Renderer. + * @returns Return instance of renderer + */ + addSystem(ClassRef: ISystemConstructor, name: string): this; + /** + * Renders the object to its WebGL view. + * @param displayObject - The object to be rendered. + * @param {object} [options] - Object to use for render options. + * @param {PIXI.RenderTexture} [options.renderTexture] - The render texture to render to. + * @param {boolean} [options.clear=true] - Should the canvas be cleared before the new render. + * @param {PIXI.Matrix} [options.transform] - A transform to apply to the render texture before rendering. + * @param {boolean} [options.skipUpdateTransform=false] - Should we skip the update transform pass? + */ + render(displayObject: IRenderableObject, options?: IRendererRenderOptions): void; + /** + * Please use the `option` render arguments instead. + * @deprecated Since 6.0.0 + * @param displayObject + * @param renderTexture + * @param clear + * @param transform + * @param skipUpdateTransform + */ + render(displayObject: IRenderableObject, renderTexture?: RenderTexture, clear?: boolean, transform?: Matrix, skipUpdateTransform?: boolean): void; + /** + * @override + * @ignore + */ + generateTexture(displayObject: IRenderableObject, options?: IGenerateTextureOptions | SCALE_MODES, resolution?: number, region?: Rectangle): RenderTexture; + /** + * Resizes the WebGL view to the specified width and height. + * @param desiredScreenWidth - The desired width of the screen. + * @param desiredScreenHeight - The desired height of the screen. + */ + resize(desiredScreenWidth: number, desiredScreenHeight: number): void; + /** + * Resets the WebGL state so you can render things however you fancy! + * @returns Returns itself. + */ + reset(): this; + /** Clear the frame buffer. */ + clear(): void; + /** + * Removes everything from the renderer (event listeners, spritebatch, etc...) + * @param [removeView=false] - Removes the Canvas element from the DOM. + * See: https://github.com/pixijs/pixi.js/issues/2233 + */ + destroy(removeView?: boolean): void; + /** + * Please use `plugins.extract` instead. + * @member {PIXI.Extract} extract + * @deprecated since 6.0.0 + * @readonly + */ + get extract(): any; + /** + * Collection of installed plugins. These are included by default in PIXI, but can be excluded + * by creating a custom build. Consult the README for more information about creating custom + * builds and excluding plugins. + * @readonly + * @property {PIXI.AccessibilityManager} accessibility Support tabbing interactive elements. + * @property {PIXI.Extract} extract Extract image data from renderer. + * @property {PIXI.InteractionManager} interaction Handles mouse, touch and pointer events. + * @property {PIXI.ParticleRenderer} particle Renderer for ParticleContainer objects. + * @property {PIXI.Prepare} prepare Pre-render display objects. + * @property {PIXI.BatchRenderer} batch Batching of Sprite, Graphics and Mesh objects. + * @property {PIXI.TilingSpriteRenderer} tilingSprite Renderer for TilingSprite objects. + */ + static __plugins: IRendererPlugins; + /** + * Use the {@link PIXI.extensions.add} API to register plugins. + * @deprecated since 6.5.0 + * @param pluginName - The name of the plugin. + * @param ctor - The constructor function or class for the plugin. + */ + static registerPlugin(pluginName: string, ctor: IRendererPluginConstructor): void; +} + +/** + * A RenderTexture is a special texture that allows any PixiJS display object to be rendered to it. + * + * __Hint__: All DisplayObjects (i.e. Sprites) that render to a RenderTexture should be preloaded + * otherwise black rectangles will be drawn instead. + * + * __Hint-2__: The actual memory allocation will happen on first render. + * You shouldn't create renderTextures each frame just to delete them after, try to reuse them. + * + * A RenderTexture takes a snapshot of any Display Object given to its render method. For example: + * + * ```js + * let renderer = PIXI.autoDetectRenderer(); + * let renderTexture = PIXI.RenderTexture.create({ width: 800, height: 600 }); + * let sprite = PIXI.Sprite.from("spinObj_01.png"); + * + * sprite.position.x = 800/2; + * sprite.position.y = 600/2; + * sprite.anchor.x = 0.5; + * sprite.anchor.y = 0.5; + * + * renderer.render(sprite, {renderTexture}); + * ``` + * Note that you should not create a new renderer, but reuse the same one as the rest of the application. + * + * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0 + * you can clear the transform + * + * ```js + * + * sprite.setTransform() + * + * let renderTexture = new PIXI.RenderTexture.create({ width: 100, height: 100 }); + * + * renderer.render(sprite, {renderTexture}); // Renders to center of RenderTexture + * ``` + * @memberof PIXI + */ +export declare class RenderTexture extends Texture { + baseTexture: BaseRenderTexture; + /** + * Stores `sourceFrame` when this texture is inside current filter stack. + * + * You can read it inside filters. + * @readonly + */ + filterFrame: Rectangle | null; + /** + * The key for pooled texture of FilterSystem. + * @see PIXI.RenderTexturePool + */ + filterPoolKey: string | number | null; + /** + * @param baseRenderTexture - The base texture object that this texture uses. + * @param frame - The rectangle frame of the texture to show. + */ + constructor(baseRenderTexture: BaseRenderTexture, frame?: Rectangle); + /** + * Shortcut to `this.baseTexture.framebuffer`, saves baseTexture cast. + * @readonly + */ + get framebuffer(): Framebuffer; + /** + * Shortcut to `this.framebuffer.multisample`. + * @default PIXI.MSAA_QUALITY.NONE + */ + get multisample(): MSAA_QUALITY; + set multisample(value: MSAA_QUALITY); + /** + * Resizes the RenderTexture. + * @param desiredWidth - The desired width to resize to. + * @param desiredHeight - The desired height to resize to. + * @param resizeBaseTexture - Should the baseTexture.width and height values be resized as well? + */ + resize(desiredWidth: number, desiredHeight: number, resizeBaseTexture?: boolean): void; + /** + * Changes the resolution of baseTexture, but does not change framebuffer size. + * @param resolution - The new resolution to apply to RenderTexture + */ + setResolution(resolution: number): void; + /** + * Use the object-based construction instead. + * @deprecated since 6.0.0 + * @param {number} [width] + * @param {number} [height] + * @param {PIXI.SCALE_MODES} [scaleMode=PIXI.settings.SCALE_MODE] + * @param {number} [resolution=PIXI.settings.FILTER_RESOLUTION] + */ + static create(width: number, height: number, scaleMode?: SCALE_MODES, resolution?: number): RenderTexture; + /** + * A short hand way of creating a render texture. + * @param options - Options + * @param {number} [options.width=100] - The width of the render texture + * @param {number} [options.height=100] - The height of the render texture + * @param {PIXI.SCALE_MODES} [options.scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} + * for possible values + * @param {number} [options.resolution=PIXI.settings.RESOLUTION] - The resolution / device pixel ratio of the texture + * being generated + * @param {PIXI.MSAA_QUALITY} [options.multisample=PIXI.MSAA_QUALITY.NONE] - The number of samples of the frame buffer + * @returns The new render texture + */ + static create(options?: IBaseTextureOptions): RenderTexture; +} + +/** + * Texture pool, used by FilterSystem and plugins. + * + * Stores collection of temporary pow2 or screen-sized renderTextures + * + * If you use custom RenderTexturePool for your filters, you can use methods + * `getFilterTexture` and `returnFilterTexture` same as in + * @memberof PIXI + */ +export declare class RenderTexturePool { + textureOptions: IBaseTextureOptions; + /** + * Allow renderTextures of the same size as screen, not just pow2 + * + * Automatically sets to true after `setScreenSize` + * @default false + */ + enableFullScreen: boolean; + texturePool: { + [x in string | number]: RenderTexture[]; + }; + private _pixelsWidth; + private _pixelsHeight; + /** + * @param textureOptions - options that will be passed to BaseRenderTexture constructor + * @param {PIXI.SCALE_MODES} [textureOptions.scaleMode] - See {@link PIXI.SCALE_MODES} for possible values. + */ + constructor(textureOptions?: IBaseTextureOptions); + /** + * Creates texture with params that were specified in pool constructor. + * @param realWidth - Width of texture in pixels. + * @param realHeight - Height of texture in pixels. + * @param multisample - Number of samples of the framebuffer. + */ + createTexture(realWidth: number, realHeight: number, multisample?: MSAA_QUALITY): RenderTexture; + /** + * Gets a Power-of-Two render texture or fullScreen texture + * @param minWidth - The minimum width of the render texture. + * @param minHeight - The minimum height of the render texture. + * @param resolution - The resolution of the render texture. + * @param multisample - Number of samples of the render texture. + * @returns The new render texture. + */ + getOptimalTexture(minWidth: number, minHeight: number, resolution?: number, multisample?: MSAA_QUALITY): RenderTexture; + /** + * Gets extra texture of the same size as input renderTexture + * + * `getFilterTexture(input, 0.5)` or `getFilterTexture(0.5, input)` + * @param input - renderTexture from which size and resolution will be copied + * @param resolution - override resolution of the renderTexture + * It overrides, it does not multiply + * @param multisample - number of samples of the renderTexture + */ + getFilterTexture(input: RenderTexture, resolution?: number, multisample?: MSAA_QUALITY): RenderTexture; + /** + * Place a render texture back into the pool. + * @param renderTexture - The renderTexture to free + */ + returnTexture(renderTexture: RenderTexture): void; + /** + * Alias for returnTexture, to be compliant with FilterSystem interface. + * @param renderTexture - The renderTexture to free + */ + returnFilterTexture(renderTexture: RenderTexture): void; + /** + * Clears the pool. + * @param destroyTextures - Destroy all stored textures. + */ + clear(destroyTextures?: boolean): void; + /** + * If screen size was changed, drops all screen-sized textures, + * sets new screen size, sets `enableFullScreen` to true + * + * Size is measured in pixels, `renderer.view` can be passed here, not `renderer.screen` + * @param size - Initial size of screen. + */ + setScreenSize(size: ISize): void; + /** + * Key that is used to store fullscreen renderTextures in a pool + * @constant + */ + static SCREEN_KEY: number; +} + +/** + * System plugin to the renderer to manage render textures. + * + * Should be added after FramebufferSystem + * + * ### Frames + * + * The `RenderTextureSystem` holds a sourceFrame → destinationFrame projection. The following table explains the different + * coordinate spaces used: + * + * | Frame | Description | Coordinate System | + * | ---------------------- | ---------------------------------------------------------------- | ------------------------------------------------------- | + * | sourceFrame | The rectangle inside of which display-objects are being rendered | **World Space**: The origin on the top-left | + * | destinationFrame | The rectangle in the render-target (canvas or texture) into which contents should be rendered | If rendering to the canvas, this is in screen space and the origin is on the top-left. If rendering to a render-texture, this is in its base-texture's space with the origin on the bottom-left. | + * | viewportFrame | The framebuffer viewport corresponding to the destination-frame | **Window Coordinates**: The origin is always on the bottom-left. | + * @memberof PIXI + */ +export declare class RenderTextureSystem implements ISystem { + /** The clear background color as RGBA. */ + clearColor: number[]; + /** + * List of masks for the {@link PIXI.StencilSystem}. + * @readonly + */ + defaultMaskStack: Array; + /** + * Render texture currently bound. {@code null} if rendering to the canvas. + * @readonly + */ + current: RenderTexture | null; + /** + * The source frame for the render-target's projection mapping. + * + * See {@link PIXI.ProjectionSystem#sourceFrame} for more details + */ + readonly sourceFrame: Rectangle; + /** + * The destination frame for the render-target's projection mapping. + * + * See {@link PIXI.Projection#destinationFrame} for more details. + */ + readonly destinationFrame: Rectangle; + /** + * The viewport frame for the render-target's viewport binding. This is equal to the destination-frame + * for render-textures, while it is y-flipped when rendering to the screen (i.e. its origin is always on + * the bottom-left). + */ + readonly viewportFrame: Rectangle; + private renderer; + /** + * @param renderer - The renderer this System works for. + */ + constructor(renderer: Renderer); + /** + * Bind the current render texture. + * @param renderTexture - RenderTexture to bind, by default its `null` - the screen. + * @param sourceFrame - Part of world that is mapped to the renderTexture. + * @param destinationFrame - Part of renderTexture, by default it has the same size as sourceFrame. + */ + bind(renderTexture?: RenderTexture, sourceFrame?: Rectangle, destinationFrame?: Rectangle): void; + /** + * Erases the render texture and fills the drawing area with a colour. + * @param clearColor - The color as rgba, default to use the renderer backgroundColor + * @param [mask=BUFFER_BITS.COLOR | BUFFER_BITS.DEPTH] - Bitwise OR of masks + * that indicate the buffers to be cleared, by default COLOR and DEPTH buffers. + */ + clear(clearColor?: number[], mask?: BUFFER_BITS): void; + resize(): void; + /** Resets render-texture state. */ + reset(): void; + destroy(): void; +} + +/** + * Base resource class for textures that manages validation and uploading, depending on its type. + * + * Uploading of a base texture to the GPU is required. + * @memberof PIXI + */ +export declare abstract class Resource { + /** The url of the resource */ + src: string; + /** + * If resource has been destroyed. + * @readonly + * @default false + */ + destroyed: boolean; + /** + * `true` if resource is created by BaseTexture + * useful for doing cleanup with BaseTexture destroy + * and not cleaning up resources that were created + * externally. + */ + internal: boolean; + /** Internal width of the resource. */ + protected _width: number; + /** Internal height of the resource. */ + protected _height: number; + /** + * Mini-runner for handling resize events + * accepts 2 parameters: width, height + * @member {Runner} + * @private + */ + protected onResize: Runner; + /** + * Mini-runner for handling update events + * @member {Runner} + * @private + */ + protected onUpdate: Runner; + /** + * Handle internal errors, such as loading errors + * accepts 1 param: error + * @member {Runner} + * @private + */ + protected onError: Runner; + /** + * @param width - Width of the resource + * @param height - Height of the resource + */ + constructor(width?: number, height?: number); + /** + * Bind to a parent BaseTexture + * @param baseTexture - Parent texture + */ + bind(baseTexture: BaseTexture): void; + /** + * Unbind to a parent BaseTexture + * @param baseTexture - Parent texture + */ + unbind(baseTexture: BaseTexture): void; + /** + * Trigger a resize event + * @param width - X dimension + * @param height - Y dimension + */ + resize(width: number, height: number): void; + /** + * Has been validated + * @readonly + */ + get valid(): boolean; + /** Has been updated trigger event. */ + update(): void; + /** + * This can be overridden to start preloading a resource + * or do any other prepare step. + * @protected + * @returns Handle the validate event + */ + load(): Promise; + /** + * The width of the resource. + * @readonly + */ + get width(): number; + /** + * The height of the resource. + * @readonly + */ + get height(): number; + /** + * Uploads the texture or returns false if it cant for some reason. Override this. + * @param renderer - yeah, renderer! + * @param baseTexture - the texture + * @param glTexture - texture instance for this webgl context + * @returns - true is success + */ + abstract upload(renderer: Renderer, baseTexture: BaseTexture, glTexture: GLTexture): boolean; + /** + * Set the style, optional to override + * @param _renderer - yeah, renderer! + * @param _baseTexture - the texture + * @param _glTexture - texture instance for this webgl context + * @returns - `true` is success + */ + style(_renderer: Renderer, _baseTexture: BaseTexture, _glTexture: GLTexture): boolean; + /** Clean up anything, this happens when destroying is ready. */ + dispose(): void; + /** + * Call when destroying resource, unbind any BaseTexture object + * before calling this method, as reference counts are maintained + * internally. + */ + destroy(): void; + /** + * Abstract, used to auto-detect resource type. + * @param {*} _source - The source object + * @param {string} _extension - The extension of source, if set + */ + static test(_source: unknown, _extension?: string): boolean; +} + +/** + * @memberof PIXI + * @namespace resources + * @see PIXI + * @deprecated since 6.0.0 + */ +export declare const resources: {}; + +/** + * System plugin to the renderer to manage scissor masking. + * + * Scissor masking discards pixels outside of a rectangle called the scissor box. The scissor box is in the framebuffer + * viewport's space; however, the mask's rectangle is projected from world-space to viewport space automatically + * by this system. + * @memberof PIXI + */ +export declare class ScissorSystem extends AbstractMaskSystem { + /** + * @param {PIXI.Renderer} renderer - The renderer this System works for. + */ + constructor(renderer: Renderer); + getStackLength(): number; + /** + * evaluates _boundsTransformed, _scissorRect for MaskData + * @param maskData + */ + calcScissorRect(maskData: MaskData): void; + private static isMatrixRotated; + /** + * Test, whether the object can be scissor mask with current renderer projection. + * Calls "calcScissorRect()" if its true. + * @param maskData - mask data + * @returns whether Whether the object can be scissor mask + */ + testScissor(maskData: MaskData): boolean; + private roundFrameToPixels; + /** + * Applies the Mask and adds it to the current stencil stack. + * @author alvin + * @param maskData - The mask data. + */ + push(maskData: MaskData): void; + /** + * This should be called after a mask is popped off the mask stack. It will rebind the scissor box to be latest with the + * last mask in the stack. + * + * This can also be called when you directly modify the scissor box and want to restore PixiJS state. + * @param maskData - The mask data. + */ + pop(maskData?: MaskData): void; + /** + * Setup renderer to use the current scissor data. + * @private + */ + _useCurrent(): void; +} + +/** + * A helper class for shaders. + * @memberof PIXI + */ +export declare class Shader { + /** Program that the shader uses. */ + program: Program; + uniformGroup: UniformGroup; + /** + * Used internally to bind uniform buffer objects. + * @ignore + */ + uniformBindCount: number; + disposeRunner: Runner; + /** + * @param program - The program the shader will use. + * @param uniforms - Custom uniforms to use to augment the built-in ones. + */ + constructor(program: Program, uniforms?: Dict); + checkUniformExists(name: string, group: UniformGroup): boolean; + destroy(): void; + /** + * Shader uniform values, shortcut for `uniformGroup.uniforms`. + * @readonly + */ + get uniforms(): Dict; + /** + * A short hand function to create a shader based of a vertex and fragment shader. + * @param vertexSrc - The source of the vertex shader. + * @param fragmentSrc - The source of the fragment shader. + * @param uniforms - Custom uniforms to use to augment the built-in ones. + * @returns A shiny new PixiJS shader! + */ + static from(vertexSrc?: string, fragmentSrc?: string, uniforms?: Dict): Shader; +} + +/** + * System plugin to the renderer to manage shaders. + * @memberof PIXI + */ +export declare class ShaderSystem implements ISystem { + /** + * The current WebGL rendering context. + * @member {WebGLRenderingContext} + */ + protected gl: IRenderingContext; + shader: Shader; + program: Program; + id: number; + destroyed: boolean; + /** Cache to holds the generated functions. Stored against UniformObjects unique signature. */ + private cache; + private _uboCache; + private renderer; + /** @param renderer - The renderer this System works for. */ + constructor(renderer: Renderer); + /** + * Overrideable function by `@pixi/unsafe-eval` to silence + * throwing an error if platform doesn't support unsafe-evals. + * @private + */ + systemCheck(): void; + protected contextChange(gl: IRenderingContext): void; + /** + * Changes the current shader to the one given in parameter. + * @param shader - the new shader + * @param dontSync - false if the shader should automatically sync its uniforms. + * @returns the glProgram that belongs to the shader. + */ + bind(shader: Shader, dontSync?: boolean): GLProgram; + /** + * Uploads the uniforms values to the currently bound shader. + * @param uniforms - the uniforms values that be applied to the current shader + */ + setUniforms(uniforms: Dict): void; + /** + * Syncs uniforms on the group + * @param group - the uniform group to sync + * @param syncData - this is data that is passed to the sync function and any nested sync functions + */ + syncUniformGroup(group: UniformGroup, syncData?: any): void; + /** + * Overrideable by the @pixi/unsafe-eval package to use static syncUniforms instead. + * @param group + * @param glProgram + * @param syncData + */ + syncUniforms(group: UniformGroup, glProgram: GLProgram, syncData: any): void; + createSyncGroups(group: UniformGroup): UniformsSyncCallback_2; + /** + * Syncs uniform buffers + * @param group - the uniform buffer group to sync + * @param name - the name of the uniform buffer + */ + syncUniformBufferGroup(group: UniformGroup, name?: string): void; + /** + * Will create a function that uploads a uniform buffer using the STD140 standard. + * The upload function will then be cached for future calls + * If a group is manually managed, then a simple upload function is generated + * @param group - the uniform buffer group to sync + * @param glProgram - the gl program to attach the uniform bindings to + * @param name - the name of the uniform buffer (must exist on the shader) + */ + protected createSyncBufferGroup(group: UniformGroup, glProgram: GLProgram, name: string): UniformsSyncCallback_2; + /** + * Takes a uniform group and data and generates a unique signature for them. + * @param group - The uniform group to get signature of + * @param group.uniforms + * @param uniformData - Uniform information generated by the shader + * @param preFix + * @returns Unique signature of the uniform group + */ + private getSignature; + /** + * Returns the underlying GLShade rof the currently bound shader. + * + * This can be handy for when you to have a little more control over the setting of your uniforms. + * @returns The glProgram for the currently bound Shader for this context + */ + getGlProgram(): GLProgram; + /** + * Generates a glProgram version of the Shader provided. + * @param shader - The shader that the glProgram will be based on. + * @returns A shiny new glProgram! + */ + generateProgram(shader: Shader): GLProgram; + /** Resets ShaderSystem state, does not affect WebGL state. */ + reset(): void; + /** + * Disposes shader. + * If disposing one equals with current shader, set current as null. + * @param shader - Shader object + */ + disposeShader(shader: Shader): void; + /** Destroys this System and removes all its textures. */ + destroy(): void; +} + +/** + * This handles a Sprite acting as a mask, as opposed to a Graphic. + * + * WebGL only. + * @memberof PIXI + */ +export declare class SpriteMaskFilter extends Filter { + /** @private */ + _maskSprite: IMaskTarget; + /** Mask matrix */ + maskMatrix: Matrix; + /** + * @param {PIXI.Sprite} sprite - The target sprite. + */ + constructor(sprite: IMaskTarget); + /** + * @param vertexSrc - The source of the vertex shader. + * @param fragmentSrc - The source of the fragment shader. + * @param uniforms - Custom uniforms to use to augment the built-in ones. + */ + constructor(vertexSrc?: string, fragmentSrc?: string, uniforms?: Dict); + /** + * Sprite mask + * @type {PIXI.DisplayObject} + */ + get maskSprite(): IMaskTarget; + set maskSprite(value: IMaskTarget); + /** + * Applies the filter + * @param filterManager - The renderer to retrieve the filter from + * @param input - The input render target. + * @param output - The target to output to. + * @param clearMode - Should the output be cleared before rendering to it. + */ + apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clearMode: CLEAR_MODES): void; +} + +/** + * This is a WebGL state, and is is passed to {@link PIXI.StateSystem}. + * + * Each mesh rendered may require WebGL to be in a different state. + * For example you may want different blend mode or to enable polygon offsets + * @memberof PIXI + */ +export declare class State { + data: number; + _blendMode: BLEND_MODES; + _polygonOffset: number; + constructor(); + /** + * Activates blending of the computed fragment color values. + * @default true + */ + get blend(): boolean; + set blend(value: boolean); + /** + * Activates adding an offset to depth values of polygon's fragments + * @default false + */ + get offsets(): boolean; + set offsets(value: boolean); + /** + * Activates culling of polygons. + * @default false + */ + get culling(): boolean; + set culling(value: boolean); + /** + * Activates depth comparisons and updates to the depth buffer. + * @default false + */ + get depthTest(): boolean; + set depthTest(value: boolean); + /** + * Enables or disables writing to the depth buffer. + * @default true + */ + get depthMask(): boolean; + set depthMask(value: boolean); + /** + * Specifies whether or not front or back-facing polygons can be culled. + * @default false + */ + get clockwiseFrontFace(): boolean; + set clockwiseFrontFace(value: boolean); + /** + * The blend mode to be applied when this state is set. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode. + * Setting this mode to anything other than NO_BLEND will automatically switch blending on. + * @default PIXI.BLEND_MODES.NORMAL + */ + get blendMode(): BLEND_MODES; + set blendMode(value: BLEND_MODES); + /** + * The polygon offset. Setting this property to anything other than 0 will automatically enable polygon offset fill. + * @default 0 + */ + get polygonOffset(): number; + set polygonOffset(value: number); + toString(): string; + static for2d(): State; +} + +/** + * System plugin to the renderer to manage WebGL state machines. + * @memberof PIXI + */ +export declare class StateSystem implements ISystem { + /** + * State ID + * @readonly + */ + stateId: number; + /** + * Polygon offset + * @readonly + */ + polygonOffset: number; + /** + * Blend mode + * @default PIXI.BLEND_MODES.NONE + * @readonly + */ + blendMode: BLEND_MODES; + /** Whether current blend equation is different */ + protected _blendEq: boolean; + /** + * GL context + * @member {WebGLRenderingContext} + * @readonly + */ + protected gl: IRenderingContext; + protected blendModes: number[][]; + /** + * Collection of calls + * @member {Function[]} + */ + protected readonly map: Array<(value: boolean) => void>; + /** + * Collection of check calls + * @member {Function[]} + */ + protected readonly checks: Array<(system: this, state: State) => void>; + /** + * Default WebGL State + * @readonly + */ + protected defaultState: State; + constructor(); + contextChange(gl: IRenderingContext): void; + /** + * Sets the current state + * @param {*} state - The state to set. + */ + set(state: State): void; + /** + * Sets the state, when previous state is unknown. + * @param {*} state - The state to set + */ + forceState(state: State): void; + /** + * Sets whether to enable or disable blending. + * @param value - Turn on or off WebGl blending. + */ + setBlend(value: boolean): void; + /** + * Sets whether to enable or disable polygon offset fill. + * @param value - Turn on or off webgl polygon offset testing. + */ + setOffset(value: boolean): void; + /** + * Sets whether to enable or disable depth test. + * @param value - Turn on or off webgl depth testing. + */ + setDepthTest(value: boolean): void; + /** + * Sets whether to enable or disable depth mask. + * @param value - Turn on or off webgl depth mask. + */ + setDepthMask(value: boolean): void; + /** + * Sets whether to enable or disable cull face. + * @param {boolean} value - Turn on or off webgl cull face. + */ + setCullFace(value: boolean): void; + /** + * Sets the gl front face. + * @param {boolean} value - true is clockwise and false is counter-clockwise + */ + setFrontFace(value: boolean): void; + /** + * Sets the blend mode. + * @param {number} value - The blend mode to set to. + */ + setBlendMode(value: number): void; + /** + * Sets the polygon offset. + * @param {number} value - the polygon offset + * @param {number} scale - the polygon offset scale + */ + setPolygonOffset(value: number, scale: number): void; + /** Resets all the logic and disables the VAOs. */ + reset(): void; + /** + * Checks to see which updates should be checked based on which settings have been activated. + * + * For example, if blend is enabled then we should check the blend modes each time the state is changed + * or if polygon fill is activated then we need to check if the polygon offset changes. + * The idea is that we only check what we have too. + * @param func - the checking function to add or remove + * @param value - should the check function be added or removed. + */ + updateCheck(func: (system: this, state: State) => void, value: boolean): void; + /** + * A private little wrapper function that we call to check the blend mode. + * @param system - the System to perform the state check on + * @param state - the state that the blendMode will pulled from + */ + private static checkBlendMode; + /** + * A private little wrapper function that we call to check the polygon offset. + * @param system - the System to perform the state check on + * @param state - the state that the blendMode will pulled from + */ + private static checkPolygonOffset; + /** + * @ignore + */ + destroy(): void; +} + +/** + * System plugin to the renderer to manage stencils (used for masks). + * @memberof PIXI + */ +export declare class StencilSystem extends AbstractMaskSystem { + /** + * @param renderer - The renderer this System works for. + */ + constructor(renderer: Renderer); + getStackLength(): number; + /** + * Applies the Mask and adds it to the current stencil stack. + * @param maskData - The mask data + */ + push(maskData: MaskData): void; + /** + * Pops stencil mask. MaskData is already removed from stack + * @param {PIXI.DisplayObject} maskObject - object of popped mask data + */ + pop(maskObject: IMaskTarget): void; + /** + * Setup renderer to use the current stencil data. + * @private + */ + _useCurrent(): void; +} + +/** + * Resource type for SVG elements and graphics. + * @memberof PIXI + */ +export declare class SVGResource extends BaseImageResource { + /** Base64 encoded SVG element or URL for SVG file. */ + readonly svg: string; + /** The source scale to apply when rasterizing on load. */ + readonly scale: number; + /** A width override for rasterization on load. */ + readonly _overrideWidth: number; + /** A height override for rasterization on load. */ + readonly _overrideHeight: number; + /** Call when completely loaded. */ + private _resolve; + /** Promise when loading */ + private _load; + /** Cross origin value to use */ + private _crossorigin?; + /** + * @param sourceBase64 - Base64 encoded SVG element or URL for SVG file. + * @param {object} [options] - Options to use + * @param {number} [options.scale=1] - Scale to apply to SVG. Overridden by... + * @param {number} [options.width] - Rasterize SVG this wide. Aspect ratio preserved if height not specified. + * @param {number} [options.height] - Rasterize SVG this high. Aspect ratio preserved if width not specified. + * @param {boolean} [options.autoLoad=true] - Start loading right away. + */ + constructor(sourceBase64: string, options?: ISVGResourceOptions); + load(): Promise; + /** Loads an SVG image from `imageUrl` or `data URL`. */ + private _loadSvg; + /** + * Get size from an svg string using a regular expression. + * @param svgString - a serialized svg element + * @returns - image extension + */ + static getSize(svgString?: string): ISize; + /** Destroys this texture. */ + dispose(): void; + /** + * Used to auto-detect the type of resource. + * @param {*} source - The source object + * @param {string} extension - The extension of source, if set + * @returns {boolean} - If the source is a SVG source or data file + */ + static test(source: unknown, extension?: string): boolean; + /** + * Regular expression for SVG XML document. + * @example <?xml version="1.0" encoding="utf-8" ?><!-- image/svg --><svg + * @readonly + */ + static SVG_XML: RegExp; + /** + * Regular expression for SVG size. + * @example <svg width="100" height="100"></svg> + * @readonly + */ + static SVG_SIZE: RegExp; +} + +/** + * Use the ISystem interface instead. + * @deprecated since 6.1.0 + * @memberof PIXI + */ +export declare class System implements ISystem { + /** Reference to the main renderer */ + renderer: Renderer; + /** + * @param renderer - Reference to Renderer + */ + constructor(renderer: Renderer); + /** Destroy and don't use after this. */ + destroy(): void; +} + +/** + * @memberof PIXI + * @namespace systems + * @see PIXI + * @deprecated since 6.0.0 + */ +export declare const systems: {}; + +export declare interface Texture extends GlobalMixins.Texture, EventEmitter { +} + +/** + * A texture stores the information that represents an image or part of an image. + * + * It cannot be added to the display list directly; instead use it as the texture for a Sprite. + * If no frame is provided for a texture, then the whole image is used. + * + * You can directly create a texture from an image and then reuse it multiple times like this : + * + * ```js + * let texture = PIXI.Texture.from('assets/image.png'); + * let sprite1 = new PIXI.Sprite(texture); + * let sprite2 = new PIXI.Sprite(texture); + * ``` + * + * If you didnt pass the texture frame to constructor, it enables `noFrame` mode: + * it subscribes on baseTexture events, it automatically resizes at the same time as baseTexture. + * + * Textures made from SVGs, loaded or not, cannot be used before the file finishes processing. + * You can check for this by checking the sprite's _textureID property. + * ```js + * var texture = PIXI.Texture.from('assets/image.svg'); + * var sprite1 = new PIXI.Sprite(texture); + * //sprite1._textureID should not be undefined if the texture has finished processing the SVG file + * ``` + * You can use a ticker or rAF to ensure your sprites load the finished textures after processing. See issue #3068. + * @memberof PIXI + * @typeParam R - The BaseTexture's Resource type. + */ +export declare class Texture extends EventEmitter { + /** The base texture that this texture uses. */ + baseTexture: BaseTexture; + /** This is the area of original texture, before it was put in atlas. */ + orig: Rectangle; + /** + * This is the trimmed area of original texture, before it was put in atlas + * Please call `updateUvs()` after you change coordinates of `trim` manually. + */ + trim: Rectangle; + /** This will let the renderer know if the texture is valid. If it's not then it cannot be rendered. */ + valid: boolean; + /** + * Does this Texture have any frame data assigned to it? + * + * This mode is enabled automatically if no frame was passed inside constructor. + * + * In this mode texture is subscribed to baseTexture events, and fires `update` on any change. + * + * Beware, after loading or resize of baseTexture event can fired two times! + * If you want more control, subscribe on baseTexture itself. + * + * ```js + * texture.on('update', () => {}); + * ``` + * + * Any assignment of `frame` switches off `noFrame` mode. + */ + noFrame: boolean; + /** + * Anchor point that is used as default if sprite is created with this texture. + * Changing the `defaultAnchor` at a later point of time will not update Sprite's anchor point. + * @default {0,0} + */ + defaultAnchor: Point; + /** Default TextureMatrix instance for this texture. By default, that object is not created because its heavy. */ + uvMatrix: TextureMatrix; + protected _rotate: number; + /** + * Update ID is observed by sprites and TextureMatrix instances. + * Call updateUvs() to increment it. + * @protected + */ + _updateID: number; + /** + * This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering, + * irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases) + */ + _frame: Rectangle; + /** + * The WebGL UV data cache. Can be used as quad UV. + * @protected + */ + _uvs: TextureUvs; + /** + * The ids under which this Texture has been added to the texture cache. This is + * automatically set as long as Texture.addToCache is used, but may not be set if a + * Texture is added directly to the TextureCache array. + */ + textureCacheIds: Array; + /** + * @param baseTexture - The base texture source to create the texture from + * @param frame - The rectangle frame of the texture to show + * @param orig - The area of original texture + * @param trim - Trimmed rectangle of original texture + * @param rotate - indicates how the texture was rotated by texture packer. See {@link PIXI.groupD8} + * @param anchor - Default anchor point used for sprite placement / rotation + */ + constructor(baseTexture: BaseTexture, frame?: Rectangle, orig?: Rectangle, trim?: Rectangle, rotate?: number, anchor?: IPointData); + /** + * Updates this texture on the gpu. + * + * Calls the TextureResource update. + * + * If you adjusted `frame` manually, please call `updateUvs()` instead. + */ + update(): void; + /** + * Called when the base texture is updated + * @protected + * @param baseTexture - The base texture. + */ + onBaseTextureUpdated(baseTexture: BaseTexture): void; + /** + * Destroys this texture + * @param [destroyBase=false] - Whether to destroy the base texture as well + */ + destroy(destroyBase?: boolean): void; + /** + * Creates a new texture object that acts the same as this one. + * @returns - The new texture + */ + clone(): Texture; + /** + * Updates the internal WebGL UV cache. Use it after you change `frame` or `trim` of the texture. + * Call it after changing the frame + */ + updateUvs(): void; + /** + * Helper function that creates a new Texture based on the source you provide. + * The source can be - frame id, image url, video url, canvas element, video element, base texture + * @param {string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|PIXI.BaseTexture} source - + * Source or array of sources to create texture from + * @param options - See {@link PIXI.BaseTexture}'s constructor for options. + * @param {string} [options.pixiIdPrefix=pixiid] - If a source has no id, this is the prefix of the generated id + * @param {boolean} [strict] - Enforce strict-mode, see {@link PIXI.settings.STRICT_TEXTURE_CACHE}. + * @returns {PIXI.Texture} The newly created texture + */ + static from(source: TextureSource | TextureSource[], options?: IBaseTextureOptions, strict?: boolean): Texture; + /** + * Useful for loading textures via URLs. Use instead of `Texture.from` because + * it does a better job of handling failed URLs more effectively. This also ignores + * `PIXI.settings.STRICT_TEXTURE_CACHE`. Works for Videos, SVGs, Images. + * @param url - The remote URL or array of URLs to load. + * @param options - Optional options to include + * @returns - A Promise that resolves to a Texture. + */ + static fromURL(url: string | string[], options?: IBaseTextureOptions): Promise>; + /** + * Create a new Texture with a BufferResource from a Float32Array. + * RGBA values are floats from 0 to 1. + * @param {Float32Array|Uint8Array} buffer - The optional array to use, if no data + * is provided, a new Float32Array is created. + * @param width - Width of the resource + * @param height - Height of the resource + * @param options - See {@link PIXI.BaseTexture}'s constructor for options. + * @returns - The resulting new BaseTexture + */ + static fromBuffer(buffer: Float32Array | Uint8Array, width: number, height: number, options?: IBaseTextureOptions): Texture; + /** + * Create a texture from a source and add to the cache. + * @param {HTMLImageElement|HTMLCanvasElement|string} source - The input source. + * @param imageUrl - File name of texture, for cache and resolving resolution. + * @param name - Human readable name for the texture cache. If no name is + * specified, only `imageUrl` will be used as the cache ID. + * @param options + * @returns - Output texture + */ + static fromLoader(source: HTMLImageElement | HTMLCanvasElement | string, imageUrl: string, name?: string, options?: IBaseTextureOptions): Promise>; + /** + * Adds a Texture to the global TextureCache. This cache is shared across the whole PIXI object. + * @param texture - The Texture to add to the cache. + * @param id - The id that the Texture will be stored against. + */ + static addToCache(texture: Texture, id: string): void; + /** + * Remove a Texture from the global TextureCache. + * @param texture - id of a Texture to be removed, or a Texture instance itself + * @returns - The Texture that was removed + */ + static removeFromCache(texture: string | Texture): Texture | null; + /** + * Returns resolution of baseTexture + * @readonly + */ + get resolution(): number; + /** + * The frame specifies the region of the base texture that this texture uses. + * Please call `updateUvs()` after you change coordinates of `frame` manually. + */ + get frame(): Rectangle; + set frame(frame: Rectangle); + /** + * Indicates whether the texture is rotated inside the atlas + * set to 2 to compensate for texture packer rotation + * set to 6 to compensate for spine packer rotation + * can be used to rotate or mirror sprites + * See {@link PIXI.groupD8} for explanation + */ + get rotate(): number; + set rotate(rotate: number); + /** The width of the Texture in pixels. */ + get width(): number; + /** The height of the Texture in pixels. */ + get height(): number; + /** Utility function for BaseTexture|Texture cast. */ + castToBaseTexture(): BaseTexture; + private static _EMPTY; + private static _WHITE; + /** An empty texture, used often to not have to create multiple empty textures. Can not be destroyed. */ + static get EMPTY(): Texture; + /** A white texture of 16x16 size, used for graphics and other things Can not be destroyed. */ + static get WHITE(): Texture; +} + +/** + * System plugin to the renderer to manage texture garbage collection on the GPU, + * ensuring that it does not get clogged up with textures that are no longer being used. + * @memberof PIXI + */ +export declare class TextureGCSystem implements ISystem { + /** + * Count + * @readonly + */ + count: number; + /** + * Check count + * @readonly + */ + checkCount: number; + /** + * Maximum idle time, in seconds + * @see PIXI.settings.GC_MAX_IDLE + */ + maxIdle: number; + /** + * Maximum number of item to check + * @see PIXI.settings.GC_MAX_CHECK_COUNT + */ + checkCountMax: number; + /** + * Current garbage collection mode + * @see PIXI.settings.GC_MODE + */ + mode: GC_MODES; + private renderer; + /** @param renderer - The renderer this System works for. */ + constructor(renderer: Renderer); + /** + * Checks to see when the last time a texture was used + * if the texture has not been used for a specified amount of time it will be removed from the GPU + */ + protected postrender(): void; + /** + * Checks to see when the last time a texture was used + * if the texture has not been used for a specified amount of time it will be removed from the GPU + */ + run(): void; + /** + * Removes all the textures within the specified displayObject and its children from the GPU + * @param {PIXI.DisplayObject} displayObject - the displayObject to remove the textures from. + */ + unload(displayObject: IUnloadableTexture): void; + destroy(): void; +} + +/** + * Class controls uv mapping from Texture normal space to BaseTexture normal space. + * + * Takes `trim` and `rotate` into account. May contain clamp settings for Meshes and TilingSprite. + * + * Can be used in Texture `uvMatrix` field, or separately, you can use different clamp settings on the same texture. + * If you want to add support for texture region of certain feature or filter, that's what you're looking for. + * + * Takes track of Texture changes through `_lastTextureID` private field. + * Use `update()` method call to track it from outside. + * @see PIXI.Texture + * @see PIXI.Mesh + * @see PIXI.TilingSprite + * @memberof PIXI + */ +export declare class TextureMatrix { + /** + * Matrix operation that converts texture region coords to texture coords + * @readonly + */ + mapCoord: Matrix; + /** + * Changes frame clamping + * Works with TilingSprite and Mesh + * Change to 1.5 if you texture has repeated right and bottom lines, that leads to smoother borders + * @default 0 + */ + clampOffset: number; + /** + * Changes frame clamping + * Works with TilingSprite and Mesh + * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas + * @default 0.5 + */ + clampMargin: number; + /** + * Clamp region for normalized coords, left-top pixel center in xy , bottom-right in zw. + * Calculated based on clampOffset. + */ + readonly uClampFrame: Float32Array; + /** Normalized clamp offset. Calculated based on clampOffset. */ + readonly uClampOffset: Float32Array; + /** + * Tracks Texture frame changes. + * @protected + */ + _textureID: number; + /** + * Tracks Texture frame changes. + * @protected + */ + _updateID: number; + _texture: Texture; + /** + * If texture size is the same as baseTexture. + * @default false + * @readonly + */ + isSimple: boolean; + /** + * @param texture - observed texture + * @param clampMargin - Changes frame clamping, 0.5 by default. Use -0.5 for extra border. + */ + constructor(texture: Texture, clampMargin?: number); + /** Texture property. */ + get texture(): Texture; + set texture(value: Texture); + /** + * Multiplies uvs array to transform + * @param uvs - mesh uvs + * @param [out=uvs] - output + * @returns - output + */ + multiplyUvs(uvs: Float32Array, out?: Float32Array): Float32Array; + /** + * Updates matrices if texture was changed. + * @param [forceUpdate=false] - if true, matrices will be updated any case + * @returns - Whether or not it was updated + */ + update(forceUpdate?: boolean): boolean; +} + +export declare type TextureSource = string | BaseTexture | ImageSource; + +/** + * System plugin to the renderer to manage textures. + * @memberof PIXI + */ +export declare class TextureSystem implements ISystem { + /** + * Bound textures. + * @readonly + */ + boundTextures: BaseTexture[]; + /** + * List of managed textures. + * @readonly + */ + managedTextures: Array; + /** Whether glTexture with int/uint sampler type was uploaded. */ + protected hasIntegerTextures: boolean; + protected CONTEXT_UID: number; + protected gl: IRenderingContext; + protected internalFormats: { + [type: number]: { + [format: number]: number; + }; + }; + protected webGLVersion: number; + /** + * BaseTexture value that shows that we don't know what is bound. + * @readonly + */ + protected unknownTexture: BaseTexture; + /** + * Did someone temper with textures state? We'll overwrite them when we need to unbind something. + * @private + */ + protected _unknownBoundTextures: boolean; + /** + * Current location. + * @readonly + */ + currentLocation: number; + emptyTextures: { + [key: number]: GLTexture; + }; + private renderer; + /** + * @param renderer - The renderer this system works for. + */ + constructor(renderer: Renderer); + /** Sets up the renderer context and necessary buffers. */ + contextChange(): void; + /** + * Bind a texture to a specific location + * + * If you want to unbind something, please use `unbind(texture)` instead of `bind(null, textureLocation)` + * @param texture - Texture to bind + * @param [location=0] - Location to bind at + */ + bind(texture: Texture | BaseTexture, location?: number): void; + /** Resets texture location and bound textures Actual `bind(null, i)` calls will be performed at next `unbind()` call */ + reset(): void; + /** + * Unbind a texture. + * @param texture - Texture to bind + */ + unbind(texture?: BaseTexture): void; + /** + * Ensures that current boundTextures all have FLOAT sampler type, + * see {@link PIXI.SAMPLER_TYPES} for explanation. + * @param maxTextures - number of locations to check + */ + ensureSamplerType(maxTextures: number): void; + /** + * Initialize a texture + * @private + * @param texture - Texture to initialize + */ + initTexture(texture: BaseTexture): GLTexture; + initTextureType(texture: BaseTexture, glTexture: GLTexture): void; + /** + * Update a texture + * @private + * @param {PIXI.BaseTexture} texture - Texture to initialize + */ + updateTexture(texture: BaseTexture): void; + /** + * Deletes the texture from WebGL + * @private + * @param texture - the texture to destroy + * @param [skipRemove=false] - Whether to skip removing the texture from the TextureManager. + */ + destroyTexture(texture: BaseTexture | Texture, skipRemove?: boolean): void; + /** + * Update texture style such as mipmap flag + * @private + * @param {PIXI.BaseTexture} texture - Texture to update + */ + updateTextureStyle(texture: BaseTexture): void; + /** + * Set style for texture + * @private + * @param texture - Texture to update + * @param glTexture + */ + setStyle(texture: BaseTexture, glTexture: GLTexture): void; + destroy(): void; +} + +/** + * Stores a texture's frame in UV coordinates, in + * which everything lies in the rectangle `[(0,0), (1,0), + * (1,1), (0,1)]`. + * + * | Corner | Coordinates | + * |--------------|-------------| + * | Top-Left | `(x0,y0)` | + * | Top-Right | `(x1,y1)` | + * | Bottom-Right | `(x2,y2)` | + * | Bottom-Left | `(x3,y3)` | + * @protected + * @memberof PIXI + */ +export declare class TextureUvs { + /** X-component of top-left corner `(x0,y0)`. */ + x0: number; + /** Y-component of top-left corner `(x0,y0)`. */ + y0: number; + /** X-component of top-right corner `(x1,y1)`. */ + x1: number; + /** Y-component of top-right corner `(x1,y1)`. */ + y1: number; + /** X-component of bottom-right corner `(x2,y2)`. */ + x2: number; + /** Y-component of bottom-right corner `(x2,y2)`. */ + y2: number; + /** X-component of bottom-left corner `(x3,y3)`. */ + x3: number; + /** Y-component of bottom-right corner `(x3,y3)`. */ + y3: number; + uvsFloat32: Float32Array; + constructor(); + /** + * Sets the texture Uvs based on the given frame information. + * @protected + * @param frame - The frame of the texture + * @param baseFrame - The base frame of the texture + * @param rotate - Rotation of frame, see {@link PIXI.groupD8} + */ + set(frame: Rectangle, baseFrame: ISize, rotate: number): void; + toString(): string; +} + +declare interface UBOElement { + data: IUniformData; + offset: number; + dataLen: number; + dirty: number; +} + +/** + * Uniform group holds uniform map and some ID's for work + * + * `UniformGroup` has two modes: + * + * 1: Normal mode + * Normal mode will upload the uniforms with individual function calls as required + * + * 2: Uniform buffer mode + * This mode will treat the uniforms as a uniform buffer. You can pass in either a buffer that you manually handle, or + * or a generic object that PixiJS will automatically map to a buffer for you. + * For maximum benefits, make Ubo UniformGroups static, and only update them each frame. + * + * Rules of UBOs: + * - UBOs only work with WebGL2, so make sure you have a fallback! + * - Only floats are supported (including vec[2,3,4], mat[2,3,4]) + * - Samplers cannot be used in ubo's (a GPU limitation) + * - You must ensure that the object you pass in exactly matches in the shader ubo structure. + * Otherwise, weirdness will ensue! + * - The name of the ubo object added to the group must match exactly the name of the ubo in the shader. + * + * ``` + * // ubo in shader: + * uniform myCoolData { // declaring a ubo.. + * mat4 uCoolMatrix; + * float uFloatyMcFloatFace + * + * + * // a new uniform buffer object.. + * const myCoolData = new UniformBufferGroup({ + * uCoolMatrix: new Matrix(), + * uFloatyMcFloatFace: 23, + * }} + * + * // build a shader... + * const shader = Shader.from(srcVert, srcFrag, { + * myCoolData // name matches the ubo name in the shader. will be processed accordingly. + * }) + * + * ``` + * @memberof PIXI + */ +export declare class UniformGroup> { + /** + * Uniform values + * @member {object} + */ + readonly uniforms: LAYOUT; + /** + * Its a group and not a single uniforms. + * @default true + */ + readonly group: boolean; + /** + * unique id + * @protected + */ + id: number; + syncUniforms: Dict; + /** + * Dirty version + * @protected + */ + dirtyId: number; + /** Flag for if uniforms wont be changed after creation. */ + static: boolean; + /** Flags whether this group is treated like a uniform buffer object. */ + ubo: boolean; + buffer?: Buffer_2; + autoManage: boolean; + /** + * @param {object | Buffer} [uniforms] - Custom uniforms to use to augment the built-in ones. Or a pixi buffer. + * @param isStatic - Uniforms wont be changed after creation. + * @param isUbo - If true, will treat this uniform group as a uniform buffer object. + */ + constructor(uniforms: LAYOUT | Buffer_2, isStatic?: boolean, isUbo?: boolean); + update(): void; + add(name: string, uniforms: Dict, _static?: boolean): void; + static from(uniforms: Dict | Buffer_2, _static?: boolean, _ubo?: boolean): UniformGroup; + /** + * A short hand function for creating a static UBO UniformGroup. + * @param uniforms - the ubo item + * @param _static - should this be updated each time it is used? defaults to true here! + */ + static uboFrom(uniforms: Dict | Buffer_2, _static?: boolean): UniformGroup; +} + +export declare const uniformParsers: IUniformParser[]; + +export declare type UniformsSyncCallback = (...args: any[]) => void; + +declare type UniformsSyncCallback_2 = (...args: any[]) => void; + +/** + * String of the current PIXI version. + * @memberof PIXI + */ +export declare const VERSION = "$_VERSION"; + +/** + * Resource type for {@code HTMLVideoElement}. + * @memberof PIXI + */ +export declare class VideoResource extends BaseImageResource { + /** Override the source to be the video element. */ + source: HTMLVideoElement; + /** + * `true` to use PIXI.Ticker.shared to auto update the base texture. + * @default true + */ + protected _autoUpdate: boolean; + /** + * `true` if the instance is currently connected to PIXI.Ticker.shared to auto update the base texture. + * @default false + */ + protected _isConnectedToTicker: boolean; + protected _updateFPS: number; + protected _msToNextUpdate: number; + /** + * When set to true will automatically play videos used by this texture once + * they are loaded. If false, it will not modify the playing state. + * @default true + */ + protected autoPlay: boolean; + /** + * Promise when loading. + * @default null + */ + private _load; + /** Callback when completed with load. */ + private _resolve; + /** + * @param {HTMLVideoElement|object|string|Array} source - Video element to use. + * @param {object} [options] - Options to use + * @param {boolean} [options.autoLoad=true] - Start loading the video immediately + * @param {boolean} [options.autoPlay=true] - Start playing video immediately + * @param {number} [options.updateFPS=0] - How many times a second to update the texture from the video. + * Leave at 0 to update at every render. + * @param {boolean} [options.crossorigin=true] - Load image using cross origin + */ + constructor(source?: HTMLVideoElement | Array | string, options?: IVideoResourceOptions); + /** + * Trigger updating of the texture. + * @param _deltaTime - time delta since last tick + */ + update(_deltaTime?: number): void; + /** + * Start preloading the video resource. + * @returns {Promise} Handle the validate event + */ + load(): Promise; + /** + * Handle video error events. + * @param event + */ + private _onError; + /** + * Returns true if the underlying source is playing. + * @returns - True if playing. + */ + private _isSourcePlaying; + /** + * Returns true if the underlying source is ready for playing. + * @returns - True if ready. + */ + private _isSourceReady; + /** Runs the update loop when the video is ready to play. */ + private _onPlayStart; + /** Fired when a pause event is triggered, stops the update loop. */ + private _onPlayStop; + /** Fired when the video is loaded and ready to play. */ + private _onCanPlay; + /** Destroys this texture. */ + dispose(): void; + /** Should the base texture automatically update itself, set to true by default. */ + get autoUpdate(): boolean; + set autoUpdate(value: boolean); + /** + * How many times a second to update the texture from the video. Leave at 0 to update at every render. + * A lower fps can help performance, as updating the texture at 60fps on a 30ps video may not be efficient. + */ + get updateFPS(): number; + set updateFPS(value: number); + /** + * Used to auto-detect the type of resource. + * @param {*} source - The source object + * @param {string} extension - The extension of source, if set + * @returns {boolean} `true` if video source + */ + static test(source: unknown, extension?: string): source is HTMLVideoElement; + /** + * List of common video file extensions supported by VideoResource. + * @readonly + */ + static TYPES: Array; + /** + * Map of video MIME types that can't be directly derived from file extensions. + * @readonly + */ + static MIME_TYPES: Dict; +} + +/** + * Flexible wrapper around `ArrayBuffer` that also provides typed array views on demand. + * @memberof PIXI + */ +export declare class ViewableBuffer { + size: number; + /** Underlying `ArrayBuffer` that holds all the data and is of capacity `this.size`. */ + rawBinaryData: ArrayBuffer; + /** View on the raw binary data as a `Uint32Array`. */ + uint32View: Uint32Array; + /** View on the raw binary data as a `Float32Array`. */ + float32View: Float32Array; + private _int8View; + private _uint8View; + private _int16View; + private _uint16View; + private _int32View; + /** + * @param length - The size of the buffer in bytes. + */ + constructor(length: number); + /** + * @param arrayBuffer - The source array buffer. + */ + constructor(arrayBuffer: ArrayBuffer); + /** View on the raw binary data as a `Int8Array`. */ + get int8View(): Int8Array; + /** View on the raw binary data as a `Uint8Array`. */ + get uint8View(): Uint8Array; + /** View on the raw binary data as a `Int16Array`. */ + get int16View(): Int16Array; + /** View on the raw binary data as a `Uint16Array`. */ + get uint16View(): Uint16Array; + /** View on the raw binary data as a `Int32Array`. */ + get int32View(): Int32Array; + /** + * Returns the view of the given type. + * @param type - One of `int8`, `uint8`, `int16`, + * `uint16`, `int32`, `uint32`, and `float32`. + * @returns - typed array of given type + */ + view(type: string): ITypedArray; + /** Destroys all buffer references. Do not use after calling this. */ + destroy(): void; + static sizeOf(type: string): number; +} + +declare interface WEBGL_compressed_texture_atc { + COMPRESSED_RGB_ATC_WEBGL: number; + COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL: number; + COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL: number; +} + +declare interface WEBGL_compressed_texture_etc1_2 { + COMPRESSED_RGB_ETC1_WEBGL: number; +} + +declare interface WEBGL_compressed_texture_etc_2 { + COMPRESSED_R11_EAC: number; + COMPRESSED_SIGNED_R11_EAC: number; + COMPRESSED_RG11_EAC: number; + COMPRESSED_SIGNED_RG11_EAC: number; + COMPRESSED_RGB8_ETC2: number; + COMPRESSED_RGBA8_ETC2_EAC: number; + COMPRESSED_SRGB8_ETC2: number; + COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: number; + COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: number; + COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: number; +} + +declare interface WEBGL_compressed_texture_pvrtc_2 { + COMPRESSED_RGB_PVRTC_4BPPV1_IMG: number; + COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: number; + COMPRESSED_RGB_PVRTC_2BPPV1_IMG: number; + COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: number; +} + +declare interface WebGLExtensions { + drawBuffers?: WEBGL_draw_buffers; + depthTexture?: OES_texture_float; + loseContext?: WEBGL_lose_context; + vertexArrayObject?: OES_vertex_array_object; + anisotropicFiltering?: EXT_texture_filter_anisotropic; + uint32ElementIndex?: OES_element_index_uint; + floatTexture?: OES_texture_float; + floatTextureLinear?: OES_texture_float_linear; + textureHalfFloat?: OES_texture_half_float; + textureHalfFloatLinear?: OES_texture_half_float_linear; + colorBufferFloat?: WEBGL_color_buffer_float; + s3tc?: WEBGL_compressed_texture_s3tc; + s3tc_sRGB?: WEBGL_compressed_texture_s3tc_srgb; + etc?: WEBGL_compressed_texture_etc_2; + etc1?: WEBGL_compressed_texture_etc1_2; + pvrtc?: WEBGL_compressed_texture_pvrtc_2; + atc?: WEBGL_compressed_texture_atc; + astc?: WEBGL_compressed_texture_astc; +} + + +export * from "pixi/extensions"; + +export { } diff --git a/Typescript/types/pixi/display/global.d.ts b/Typescript/types/pixi/display/global.d.ts new file mode 100644 index 0000000..864261a --- /dev/null +++ b/Typescript/types/pixi/display/global.d.ts @@ -0,0 +1,14 @@ +declare namespace GlobalMixins +{ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface DisplayObject + { + + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface Container + { + + } +} diff --git a/Typescript/types/pixi/display/index.d.ts b/Typescript/types/pixi/display/index.d.ts new file mode 100644 index 0000000..a6f6319 --- /dev/null +++ b/Typescript/types/pixi/display/index.d.ts @@ -0,0 +1,922 @@ +/// + +import type { Dict } from 'pixi/utils'; +import { EventEmitter } from 'pixi/utils'; +import type { Filter } from 'pixi/core'; +import type { IPointData } from 'pixi/math'; +import type { MaskData } from 'pixi/core'; +import type { Matrix } from 'pixi/math'; +import type { ObservablePoint } from 'pixi/math'; +import type { Point } from 'pixi/math'; +import { Rectangle } from 'pixi/math'; +import type { Renderer } from 'pixi/core'; +import { Transform } from 'pixi/math'; + +/** + * 'Builder' pattern for bounds rectangles. + * + * This could be called an Axis-Aligned Bounding Box. + * It is not an actual shape. It is a mutable thing; no 'EMPTY' or those kind of problems. + * @memberof PIXI + */ +export declare class Bounds { + /** @default Infinity */ + minX: number; + /** @default Infinity */ + minY: number; + /** @default -Infinity */ + maxX: number; + /** @default -Infinity */ + maxY: number; + rect: Rectangle; + /** + * It is updated to _boundsID of corresponding object to keep bounds in sync with content. + * Updated from outside, thus public modifier. + */ + updateID: number; + constructor(); + /** + * Checks if bounds are empty. + * @returns - True if empty. + */ + isEmpty(): boolean; + /** Clears the bounds and resets. */ + clear(): void; + /** + * Can return Rectangle.EMPTY constant, either construct new rectangle, either use your rectangle + * It is not guaranteed that it will return tempRect + * @param rect - Temporary object will be used if AABB is not empty + * @returns - A rectangle of the bounds + */ + getRectangle(rect?: Rectangle): Rectangle; + /** + * This function should be inlined when its possible. + * @param point - The point to add. + */ + addPoint(point: IPointData): void; + /** + * Adds a point, after transformed. This should be inlined when its possible. + * @param matrix + * @param point + */ + addPointMatrix(matrix: Matrix, point: IPointData): void; + /** + * Adds a quad, not transformed + * @param vertices - The verts to add. + */ + addQuad(vertices: Float32Array): void; + /** + * Adds sprite frame, transformed. + * @param transform - transform to apply + * @param x0 - left X of frame + * @param y0 - top Y of frame + * @param x1 - right X of frame + * @param y1 - bottom Y of frame + */ + addFrame(transform: Transform, x0: number, y0: number, x1: number, y1: number): void; + /** + * Adds sprite frame, multiplied by matrix + * @param matrix - matrix to apply + * @param x0 - left X of frame + * @param y0 - top Y of frame + * @param x1 - right X of frame + * @param y1 - bottom Y of frame + */ + addFrameMatrix(matrix: Matrix, x0: number, y0: number, x1: number, y1: number): void; + /** + * Adds screen vertices from array + * @param vertexData - calculated vertices + * @param beginOffset - begin offset + * @param endOffset - end offset, excluded + */ + addVertexData(vertexData: Float32Array, beginOffset: number, endOffset: number): void; + /** + * Add an array of mesh vertices + * @param transform - mesh transform + * @param vertices - mesh coordinates in array + * @param beginOffset - begin offset + * @param endOffset - end offset, excluded + */ + addVertices(transform: Transform, vertices: Float32Array, beginOffset: number, endOffset: number): void; + /** + * Add an array of mesh vertices. + * @param matrix - mesh matrix + * @param vertices - mesh coordinates in array + * @param beginOffset - begin offset + * @param endOffset - end offset, excluded + * @param padX - x padding + * @param padY - y padding + */ + addVerticesMatrix(matrix: Matrix, vertices: Float32Array, beginOffset: number, endOffset: number, padX?: number, padY?: number): void; + /** + * Adds other {@link Bounds}. + * @param bounds - The Bounds to be added + */ + addBounds(bounds: Bounds): void; + /** + * Adds other Bounds, masked with Bounds. + * @param bounds - The Bounds to be added. + * @param mask - TODO + */ + addBoundsMask(bounds: Bounds, mask: Bounds): void; + /** + * Adds other Bounds, multiplied by matrix. Bounds shouldn't be empty. + * @param bounds - other bounds + * @param matrix - multiplicator + */ + addBoundsMatrix(bounds: Bounds, matrix: Matrix): void; + /** + * Adds other Bounds, masked with Rectangle. + * @param bounds - TODO + * @param area - TODO + */ + addBoundsArea(bounds: Bounds, area: Rectangle): void; + /** + * Pads bounds object, making it grow in all directions. + * If paddingY is omitted, both paddingX and paddingY will be set to paddingX. + * @param paddingX - The horizontal padding amount. + * @param paddingY - The vertical padding amount. + */ + pad(paddingX?: number, paddingY?: number): void; + /** + * Adds padded frame. (x0, y0) should be strictly less than (x1, y1) + * @param x0 - left X of frame + * @param y0 - top Y of frame + * @param x1 - right X of frame + * @param y1 - bottom Y of frame + * @param padX - padding X + * @param padY - padding Y + */ + addFramePad(x0: number, y0: number, x1: number, y1: number, padX: number, padY: number): void; +} + +export declare interface Container extends GlobalMixins.Container, DisplayObject { +} + +/** + * Container is a general-purpose display object that holds children. It also adds built-in support for advanced + * rendering features like masking and filtering. + * + * It is the base class of all display objects that act as a container for other objects, including Graphics + * and Sprite. + * + * ```js + * import { BlurFilter } from 'pixi/filter-blur'; + * import { Container } from 'pixi/display'; + * import { Graphics } from 'pixi/graphics'; + * import { Sprite } from 'pixi/sprite'; + * + * let container = new Container(); + * let sprite = Sprite.from("https://s3-us-west-2.amazonaws.com/s.cdpn.io/693612/IaUrttj.png"); + * + * sprite.width = 512; + * sprite.height = 512; + * + * // Adds a sprite as a child to this container. As a result, the sprite will be rendered whenever the container + * // is rendered. + * container.addChild(sprite); + * + * // Blurs whatever is rendered by the container + * container.filters = [new BlurFilter()]; + * + * // Only the contents within a circle at the center should be rendered onto the screen. + * container.mask = new Graphics() + * .beginFill(0xffffff) + * .drawCircle(sprite.width / 2, sprite.height / 2, Math.min(sprite.width, sprite.height) / 2) + * .endFill(); + * ``` + * @memberof PIXI + */ +export declare class Container extends DisplayObject { + /** + * The array of children of this container. + * @readonly + */ + readonly children: T[]; + /** + * If set to true, the container will sort its children by zIndex value + * when updateTransform() is called, or manually if sortChildren() is called. + * + * This actually changes the order of elements in the array, so should be treated + * as a basic solution that is not performant compared to other solutions, + * such as @link https://github.com/pixijs/pixi-display + * + * Also be aware of that this may not work nicely with the addChildAt() function, + * as the zIndex sorting may cause the child to automatically sorted to another position. + * @see PIXI.settings.SORTABLE_CHILDREN + */ + sortableChildren: boolean; + /** + * Should children be sorted by zIndex at the next updateTransform call. + * + * Will get automatically set to true if a new child is added, or if a child's zIndex changes. + */ + sortDirty: boolean; + parent: Container; + containerUpdateTransform: () => void; + protected _width: number; + protected _height: number; + constructor(); + /** + * Overridable method that can be used by Container subclasses whenever the children array is modified. + * @param _length + */ + protected onChildrenChange(_length?: number): void; + /** + * Adds one or more children to the container. + * + * Multiple items can be added like so: `myContainer.addChild(thingOne, thingTwo, thingThree)` + * @param {...PIXI.DisplayObject} children - The DisplayObject(s) to add to the container + * @returns {PIXI.DisplayObject} - The first child that was added. + */ + addChild(...children: U): U[0]; + /** + * Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown + * @param {PIXI.DisplayObject} child - The child to add + * @param {number} index - The index to place the child in + * @returns {PIXI.DisplayObject} The child that was added. + */ + addChildAt(child: U, index: number): U; + /** + * Swaps the position of 2 Display Objects within this container. + * @param child - First display object to swap + * @param child2 - Second display object to swap + */ + swapChildren(child: T, child2: T): void; + /** + * Returns the index position of a child DisplayObject instance + * @param child - The DisplayObject instance to identify + * @returns - The index position of the child display object to identify + */ + getChildIndex(child: T): number; + /** + * Changes the position of an existing child in the display object container + * @param child - The child DisplayObject instance for which you want to change the index number + * @param index - The resulting index number for the child display object + */ + setChildIndex(child: T, index: number): void; + /** + * Returns the child at the specified index + * @param index - The index to get the child at + * @returns - The child at the given index, if any. + */ + getChildAt(index: number): T; + /** + * Removes one or more children from the container. + * @param {...PIXI.DisplayObject} children - The DisplayObject(s) to remove + * @returns {PIXI.DisplayObject} The first child that was removed. + */ + removeChild(...children: U): U[0]; + /** + * Removes a child from the specified index position. + * @param index - The index to get the child from + * @returns The child that was removed. + */ + removeChildAt(index: number): T; + /** + * Removes all children from this container that are within the begin and end indexes. + * @param beginIndex - The beginning position. + * @param endIndex - The ending position. Default value is size of the container. + * @returns - List of removed children + */ + removeChildren(beginIndex?: number, endIndex?: number): T[]; + /** Sorts children by zIndex. Previous order is maintained for 2 children with the same zIndex. */ + sortChildren(): void; + /** Updates the transform on all children of this container for rendering. */ + updateTransform(): void; + /** + * Recalculates the bounds of the container. + * + * This implementation will automatically fit the children's bounds into the calculation. Each child's bounds + * is limited to its mask's bounds or filterArea, if any is applied. + */ + calculateBounds(): void; + /** + * Retrieves the local bounds of the displayObject as a rectangle object. + * + * Calling `getLocalBounds` may invalidate the `_bounds` of the whole subtree below. If using it inside a render() + * call, it is advised to call `getBounds()` immediately after to recalculate the world bounds of the subtree. + * @param rect - Optional rectangle to store the result of the bounds calculation. + * @param skipChildrenUpdate - Setting to `true` will stop re-calculation of children transforms, + * it was default behaviour of pixi 4.0-5.2 and caused many problems to users. + * @returns - The rectangular bounding area. + */ + getLocalBounds(rect?: Rectangle, skipChildrenUpdate?: boolean): Rectangle; + /** + * Recalculates the content bounds of this object. This should be overriden to + * calculate the bounds of this specific object (not including children). + * @protected + */ + protected _calculateBounds(): void; + /** + * Renders this object and its children with culling. + * @protected + * @param {PIXI.Renderer} renderer - The renderer + */ + protected _renderWithCulling(renderer: Renderer): void; + /** + * Renders the object using the WebGL renderer. + * + * The [_render]{@link PIXI.Container#_render} method is be overriden for rendering the contents of the + * container itself. This `render` method will invoke it, and also invoke the `render` methods of all + * children afterward. + * + * If `renderable` or `visible` is false or if `worldAlpha` is not positive or if `cullable` is true and + * the bounds of this object are out of frame, this implementation will entirely skip rendering. + * See {@link PIXI.DisplayObject} for choosing between `renderable` or `visible`. Generally, + * setting alpha to zero is not recommended for purely skipping rendering. + * + * When your scene becomes large (especially when it is larger than can be viewed in a single screen), it is + * advised to employ **culling** to automatically skip rendering objects outside of the current screen. + * See [cullable]{@link PIXI.DisplayObject#cullable} and [cullArea]{@link PIXI.DisplayObject#cullArea}. + * Other culling methods might be better suited for a large number static objects; see + * [@pixi-essentials/cull]{@link https://www.npmjs.com/package/@pixi-essentials/cull} and + * [pixi-cull]{@link https://www.npmjs.com/package/pixi-cull}. + * + * The [renderAdvanced]{@link PIXI.Container#renderAdvanced} method is internally used when when masking or + * filtering is applied on a container. This does, however, break batching and can affect performance when + * masking and filtering is applied extensively throughout the scene graph. + * @param renderer - The renderer + */ + render(renderer: Renderer): void; + /** + * Render the object using the WebGL renderer and advanced features. + * @param renderer - The renderer + */ + protected renderAdvanced(renderer: Renderer): void; + /** + * To be overridden by the subclasses. + * @param _renderer - The renderer + */ + protected _render(_renderer: Renderer): void; + /** + * Removes all internal references and listeners as well as removes children from the display list. + * Do not use a Container after calling `destroy`. + * @param options - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the texture of the child sprite + * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the base texture of the child sprite + */ + destroy(options?: IDestroyOptions | boolean): void; + /** The width of the Container, setting this will actually modify the scale to achieve the value set. */ + get width(): number; + set width(value: number); + /** The height of the Container, setting this will actually modify the scale to achieve the value set. */ + get height(): number; + set height(value: number); +} + +export declare interface DisplayObject extends Omit, EventEmitter { +} + +/** + * The base class for all objects that are rendered on the screen. + * + * This is an abstract class and can not be used on its own; rather it should be extended. + * + * ## Display objects implemented in PixiJS + * + * | Display Object | Description | + * | ------------------------------- | --------------------------------------------------------------------- | + * | {@link PIXI.Container} | Adds support for `children` to DisplayObject | + * | {@link PIXI.Graphics} | Shape-drawing display object similar to the Canvas API | + * | {@link PIXI.Sprite} | Draws textures (i.e. images) | + * | {@link PIXI.Text} | Draws text using the Canvas API internally | + * | {@link PIXI.BitmapText} | More scaleable solution for text rendering, reusing glyph textures | + * | {@link PIXI.TilingSprite} | Draws textures/images in a tiled fashion | + * | {@link PIXI.AnimatedSprite} | Draws an animation of multiple images | + * | {@link PIXI.Mesh} | Provides a lower-level API for drawing meshes with custom data | + * | {@link PIXI.NineSlicePlane} | Mesh-related | + * | {@link PIXI.SimpleMesh} | v4-compatible mesh | + * | {@link PIXI.SimplePlane} | Mesh-related | + * | {@link PIXI.SimpleRope} | Mesh-related | + * + * ## Transforms + * + * The [transform]{@link DisplayObject#transform} of a display object describes the projection from its + * local coordinate space to its parent's local coordinate space. The following properties are derived + * from the transform: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyDescription
[pivot]{@link PIXI.DisplayObject#pivot} + * Invariant under rotation, scaling, and skewing. The projection of into the parent's space of the pivot + * is equal to position, regardless of the other three transformations. In other words, It is the center of + * rotation, scaling, and skewing. + *
[position]{@link PIXI.DisplayObject#position} + * Translation. This is the position of the [pivot]{@link PIXI.DisplayObject#pivot} in the parent's local + * space. The default value of the pivot is the origin (0,0). If the top-left corner of your display object + * is (0,0) in its local space, then the position will be its top-left corner in the parent's local space. + *
[scale]{@link PIXI.DisplayObject#scale} + * Scaling. This will stretch (or compress) the display object's projection. The scale factors are along the + * local coordinate axes. In other words, the display object is scaled before rotated or skewed. The center + * of scaling is the [pivot]{@link PIXI.DisplayObject#pivot}. + *
[rotation]{@link PIXI.DisplayObject#rotation} + * Rotation. This will rotate the display object's projection by this angle (in radians). + *
[skew]{@link PIXI.DisplayObject#skew} + *

Skewing. This can be used to deform a rectangular display object into a parallelogram.

+ *

+ * In PixiJS, skew has a slightly different behaviour than the conventional meaning. It can be + * thought of the net rotation applied to the coordinate axes (separately). For example, if "skew.x" is + * ⍺ and "skew.y" is β, then the line x = 0 will be rotated by ⍺ (y = -x*cot⍺) and the line y = 0 will be + * rotated by β (y = x*tanβ). A line y = x*tanϴ (i.e. a line at angle ϴ to the x-axis in local-space) will + * be rotated by an angle between ⍺ and β. + *

+ *

+ * It can be observed that if skew is applied equally to both axes, then it will be equivalent to applying + * a rotation. Indeed, if "skew.x" = -ϴ and "skew.y" = ϴ, it will produce an equivalent of "rotation" = ϴ. + *

+ *

+ * Another quite interesting observation is that "skew.x", "skew.y", rotation are communtative operations. Indeed, + * because rotation is essentially a careful combination of the two. + *

+ *
angleRotation. This is an alias for [rotation]{@link PIXI.DisplayObject#rotation}, but in degrees.
xTranslation. This is an alias for position.x!
yTranslation. This is an alias for position.y!
width + * Implemented in [Container]{@link PIXI.Container}. Scaling. The width property calculates scale.x by dividing + * the "requested" width by the local bounding box width. It is indirectly an abstraction over scale.x, and there + * is no concept of user-defined width. + *
height + * Implemented in [Container]{@link PIXI.Container}. Scaling. The height property calculates scale.y by dividing + * the "requested" height by the local bounding box height. It is indirectly an abstraction over scale.y, and there + * is no concept of user-defined height. + *
+ * + * ## Bounds + * + * The bounds of a display object is defined by the minimum axis-aligned rectangle in world space that can fit + * around it. The abstract `calculateBounds` method is responsible for providing it (and it should use the + * `worldTransform` to calculate in world space). + * + * There are a few additional types of bounding boxes: + * + * | Bounds | Description | + * | --------------------- | ---------------------------------------------------------------------------------------- | + * | World Bounds | This is synonymous is the regular bounds described above. See `getBounds()`. | + * | Local Bounds | This the axis-aligned bounding box in the parent's local space. See `getLocalBounds()`. | + * | Render Bounds | The bounds, but including extra rendering effects like filter padding. | + * | Projected Bounds | The bounds of the projected display object onto the screen. Usually equals world bounds. | + * | Relative Bounds | The bounds of a display object when projected onto a ancestor's (or parent's) space. | + * | Natural Bounds | The bounds of an object in its own local space (not parent's space, like in local bounds)| + * | Content Bounds | The natural bounds when excluding all children of a `Container`. | + * + * ### calculateBounds + * + * [Container]{@link Container} already implements `calculateBounds` in a manner that includes children. + * + * But for a non-Container display object, the `calculateBounds` method must be overridden in order for `getBounds` and + * `getLocalBounds` to work. This method must write the bounds into `this._bounds`. + * + * Generally, the following technique works for most simple cases: take the list of points + * forming the "hull" of the object (i.e. outline of the object's shape), and then add them + * using {@link PIXI.Bounds#addPointMatrix}. + * + * ```js + * calculateBounds(): void + * { + * const points = [...]; + * + * for (let i = 0, j = points.length; i < j; i++) + * { + * this._bounds.addPointMatrix(this.worldTransform, points[i]); + * } + * } + * ``` + * + * You can optimize this for a large number of points by using {@link PIXI.Bounds#addVerticesMatrix} to pass them + * in one array together. + * + * ## Alpha + * + * This alpha sets a display object's **relative opacity** w.r.t its parent. For example, if the alpha of a display + * object is 0.5 and its parent's alpha is 0.5, then it will be rendered with 25% opacity (assuming alpha is not + * applied on any ancestor further up the chain). + * + * The alpha with which the display object will be rendered is called the [worldAlpha]{@link PIXI.DisplayObject#worldAlpha}. + * + * ## Renderable vs Visible + * + * The `renderable` and `visible` properties can be used to prevent a display object from being rendered to the + * screen. However, there is a subtle difference between the two. When using `renderable`, the transforms of the display + * object (and its children subtree) will continue to be calculated. When using `visible`, the transforms will not + * be calculated. + * + * It is recommended that applications use the `renderable` property for culling. See + * [@pixi-essentials/cull]{@link https://www.npmjs.com/package/@pixi-essentials/cull} or + * [pixi-cull]{@link https://www.npmjs.com/package/pixi-cull} for more details. + * + * Otherwise, to prevent an object from rendering in the general-purpose sense - `visible` is the property to use. This + * one is also better in terms of performance. + * @memberof PIXI + */ +export declare abstract class DisplayObject extends EventEmitter { + abstract sortDirty: boolean; + /** The display object container that contains this display object. */ + parent: Container; + /** + * The multiplied alpha of the displayObject. + * @readonly + */ + worldAlpha: number; + /** + * World transform and local transform of this object. + * This will become read-only later, please do not assign anything there unless you know what are you doing. + */ + transform: Transform; + /** The opacity of the object. */ + alpha: number; + /** + * The visibility of the object. If false the object will not be drawn, and + * the updateTransform function will not be called. + * + * Only affects recursive calls from parent. You can ask for bounds or call updateTransform manually. + */ + visible: boolean; + /** + * Can this object be rendered, if false the object will not be drawn but the updateTransform + * methods will still be called. + * + * Only affects recursive calls from parent. You can ask for bounds manually. + */ + renderable: boolean; + /** + * Should this object be rendered if the bounds of this object are out of frame? + * + * Culling has no effect on whether updateTransform is called. + */ + cullable: boolean; + /** + * If set, this shape is used for culling instead of the bounds of this object. + * It can improve the culling performance of objects with many children. + * The culling area is defined in local space. + */ + cullArea: Rectangle; + /** + * The area the filter is applied to. This is used as more of an optimization + * rather than figuring out the dimensions of the displayObject each frame you can set this rectangle. + * + * Also works as an interaction mask. + */ + filterArea: Rectangle; + /** + * Sets the filters for the displayObject. + * IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer. + * To remove filters simply set this property to `'null'`. + */ + filters: Filter[] | null; + /** Used to fast check if a sprite is.. a sprite! */ + isSprite: boolean; + /** Does any other displayObject use this object as a mask? */ + isMask: boolean; + /** + * Which index in the children array the display component was before the previous zIndex sort. + * Used by containers to help sort objects with the same zIndex, by using previous array index as the decider. + * @protected + */ + _lastSortedIndex: number; + /** + * The original, cached mask of the object. + * @protected + */ + _mask: Container | MaskData; + /** The bounds object, this is used to calculate and store the bounds of the displayObject. */ + _bounds: Bounds; + /** Local bounds object, swapped with `_bounds` when using `getLocalBounds()`. */ + _localBounds: Bounds; + /** + * The zIndex of the displayObject. + * A higher value will mean it will be rendered on top of other displayObjects within the same container. + * @protected + */ + protected _zIndex: number; + /** + * Currently enabled filters. + * @protected + */ + protected _enabledFilters: Filter[]; + /** Flags the cached bounds as dirty. */ + protected _boundsID: number; + /** Cache of this display-object's bounds-rectangle. */ + protected _boundsRect: Rectangle; + /** Cache of this display-object's local-bounds rectangle. */ + protected _localBoundsRect: Rectangle; + /** If the object has been destroyed via destroy(). If true, it should not be used. */ + protected _destroyed: boolean; + /** The number of times this object is used as a mask by another object. */ + private _maskRefCount; + private tempDisplayObjectParent; + displayObjectUpdateTransform: () => void; + /** + * Mixes all enumerable properties and methods from a source object to DisplayObject. + * @param source - The source of properties and methods to mix in. + */ + static mixin(source: Dict): void; + constructor(); + /** + * Fired when this DisplayObject is added to a Container. + * @instance + * @event added + * @param {PIXI.Container} container - The container added to. + */ + /** + * Fired when this DisplayObject is removed from a Container. + * @instance + * @event removed + * @param {PIXI.Container} container - The container removed from. + */ + /** + * Fired when this DisplayObject is destroyed. This event is emitted once + * destroy is finished. + * @instance + * @event destroyed + */ + /** Readonly flag for destroyed display objects. */ + get destroyed(): boolean; + /** Recalculates the bounds of the display object. */ + abstract calculateBounds(): void; + abstract removeChild(child: DisplayObject): void; + /** + * Renders the object using the WebGL renderer. + * @param renderer - The renderer. + */ + abstract render(renderer: Renderer): void; + /** Recursively updates transform of all objects from the root to this one internal function for toLocal() */ + protected _recursivePostUpdateTransform(): void; + /** Updates the object transform for rendering. TODO - Optimization pass! */ + updateTransform(): void; + /** + * Calculates and returns the (world) bounds of the display object as a [Rectangle]{@link PIXI.Rectangle}. + * + * This method is expensive on containers with a large subtree (like the stage). This is because the bounds + * of a container depend on its children's bounds, which recursively causes all bounds in the subtree to + * be recalculated. The upside, however, is that calling `getBounds` once on a container will indeed update + * the bounds of all children (the whole subtree, in fact). This side effect should be exploited by using + * `displayObject._bounds.getRectangle()` when traversing through all the bounds in a scene graph. Otherwise, + * calling `getBounds` on each object in a subtree will cause the total cost to increase quadratically as + * its height increases. + * + * The transforms of all objects in a container's **subtree** and of all **ancestors** are updated. + * The world bounds of all display objects in a container's **subtree** will also be recalculated. + * + * The `_bounds` object stores the last calculation of the bounds. You can use to entirely skip bounds + * calculation if needed. + * + * ```js + * const lastCalculatedBounds = displayObject._bounds.getRectangle(optionalRect); + * ``` + * + * Do know that usage of `getLocalBounds` can corrupt the `_bounds` of children (the whole subtree, actually). This + * is a known issue that has not been solved. See [getLocalBounds]{@link PIXI.DisplayObject#getLocalBounds} for more + * details. + * + * `getBounds` should be called with `skipUpdate` equal to `true` in a render() call. This is because the transforms + * are guaranteed to be update-to-date. In fact, recalculating inside a render() call may cause corruption in certain + * cases. + * @param skipUpdate - Setting to `true` will stop the transforms of the scene graph from + * being updated. This means the calculation returned MAY be out of date BUT will give you a + * nice performance boost. + * @param rect - Optional rectangle to store the result of the bounds calculation. + * @returns - The minimum axis-aligned rectangle in world space that fits around this object. + */ + getBounds(skipUpdate?: boolean, rect?: Rectangle): Rectangle; + /** + * Retrieves the local bounds of the displayObject as a rectangle object. + * @param rect - Optional rectangle to store the result of the bounds calculation. + * @returns - The rectangular bounding area. + */ + getLocalBounds(rect?: Rectangle): Rectangle; + /** + * Calculates the global position of the display object. + * @param position - The world origin to calculate from. + * @param point - A Point object in which to store the value, optional + * (otherwise will create a new Point). + * @param skipUpdate - Should we skip the update transform. + * @returns - A point object representing the position of this object. + */ + toGlobal

(position: IPointData, point?: P, skipUpdate?: boolean): P; + /** + * Calculates the local position of the display object relative to another point. + * @param position - The world origin to calculate from. + * @param from - The DisplayObject to calculate the global position from. + * @param point - A Point object in which to store the value, optional + * (otherwise will create a new Point). + * @param skipUpdate - Should we skip the update transform + * @returns - A point object representing the position of this object + */ + toLocal

(position: IPointData, from?: DisplayObject, point?: P, skipUpdate?: boolean): P; + /** + * Set the parent Container of this DisplayObject. + * @param container - The Container to add this DisplayObject to. + * @returns - The Container that this DisplayObject was added to. + */ + setParent(container: Container): Container; + /** + * Convenience function to set the position, scale, skew and pivot at once. + * @param x - The X position + * @param y - The Y position + * @param scaleX - The X scale value + * @param scaleY - The Y scale value + * @param rotation - The rotation + * @param skewX - The X skew value + * @param skewY - The Y skew value + * @param pivotX - The X pivot value + * @param pivotY - The Y pivot value + * @returns - The DisplayObject instance + */ + setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, pivotX?: number, pivotY?: number): this; + /** + * Base destroy method for generic display objects. This will automatically + * remove the display object from its parent Container as well as remove + * all current event listeners and internal references. Do not use a DisplayObject + * after calling `destroy()`. + * @param _options + */ + destroy(_options?: IDestroyOptions | boolean): void; + /** + * @protected + * @member {PIXI.Container} + */ + get _tempDisplayObjectParent(): TemporaryDisplayObject; + /** + * Used in Renderer, cacheAsBitmap and other places where you call an `updateTransform` on root + * + * ``` + * const cacheParent = elem.enableTempParent(); + * elem.updateTransform(); + * elem.disableTempParent(cacheParent); + * ``` + * @returns - current parent + */ + enableTempParent(): Container; + /** + * Pair method for `enableTempParent` + * @param cacheParent - Actual parent of element + */ + disableTempParent(cacheParent: Container): void; + /** + * The position of the displayObject on the x axis relative to the local coordinates of the parent. + * An alias to position.x + */ + get x(): number; + set x(value: number); + /** + * The position of the displayObject on the y axis relative to the local coordinates of the parent. + * An alias to position.y + */ + get y(): number; + set y(value: number); + /** + * Current transform of the object based on world (parent) factors. + * @readonly + */ + get worldTransform(): Matrix; + /** + * Current transform of the object based on local factors: position, scale, other stuff. + * @readonly + */ + get localTransform(): Matrix; + /** + * The coordinate of the object relative to the local coordinates of the parent. + * @since 4.0.0 + */ + get position(): ObservablePoint; + set position(value: IPointData); + /** + * The scale factors of this object along the local coordinate axes. + * + * The default scale is (1, 1). + * @since 4.0.0 + */ + get scale(): ObservablePoint; + set scale(value: IPointData); + /** + * The center of rotation, scaling, and skewing for this display object in its local space. The `position` + * is the projection of `pivot` in the parent's local space. + * + * By default, the pivot is the origin (0, 0). + * @since 4.0.0 + */ + get pivot(): ObservablePoint; + set pivot(value: IPointData); + /** + * The skew factor for the object in radians. + * @since 4.0.0 + */ + get skew(): ObservablePoint; + set skew(value: IPointData); + /** + * The rotation of the object in radians. + * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees. + */ + get rotation(): number; + set rotation(value: number); + /** + * The angle of the object in degrees. + * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees. + */ + get angle(): number; + set angle(value: number); + /** + * The zIndex of the displayObject. + * + * If a container has the sortableChildren property set to true, children will be automatically + * sorted by zIndex value; a higher value will mean it will be moved towards the end of the array, + * and thus rendered on top of other display objects within the same container. + * @see PIXI.Container#sortableChildren + */ + get zIndex(): number; + set zIndex(value: number); + /** + * Indicates if the object is globally visible. + * @readonly + */ + get worldVisible(): boolean; + /** + * Sets a mask for the displayObject. A mask is an object that limits the visibility of an + * object to the shape of the mask applied to it. In PixiJS a regular mask must be a + * {@link PIXI.Graphics} or a {@link PIXI.Sprite} object. This allows for much faster masking in canvas as it + * utilities shape clipping. Furthermore, a mask of an object must be in the subtree of its parent. + * Otherwise, `getLocalBounds` may calculate incorrect bounds, which makes the container's width and height wrong. + * To remove a mask, set this property to `null`. + * + * For sprite mask both alpha and red channel are used. Black mask is the same as transparent mask. + * @example + * const graphics = new PIXI.Graphics(); + * graphics.beginFill(0xFF3300); + * graphics.drawRect(50, 250, 100, 100); + * graphics.endFill(); + * + * const sprite = new PIXI.Sprite(texture); + * sprite.mask = graphics; + * @todo At the moment, PIXI.CanvasRenderer doesn't support PIXI.Sprite as mask. + */ + get mask(): Container | MaskData | null; + set mask(value: Container | MaskData | null); +} + +export declare interface IDestroyOptions { + children?: boolean; + texture?: boolean; + baseTexture?: boolean; +} + +/** + * @private + */ +export declare class TemporaryDisplayObject extends DisplayObject { + calculateBounds: () => null; + removeChild: (child: DisplayObject) => null; + render: (renderer: Renderer) => null; + sortDirty: boolean; +} + +export { } diff --git a/Typescript/types/pixi/events/global.d.ts b/Typescript/types/pixi/events/global.d.ts new file mode 100644 index 0000000..0a9d3f4 --- /dev/null +++ b/Typescript/types/pixi/events/global.d.ts @@ -0,0 +1,9 @@ +declare namespace GlobalMixins +{ + type FederatedEventTarget = import('pixi/events').FederatedEventTarget; + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface DisplayObject extends FederatedEventTarget + { + + } +} diff --git a/Typescript/types/pixi/events/index.d.ts b/Typescript/types/pixi/events/index.d.ts new file mode 100644 index 0000000..e05cf6d --- /dev/null +++ b/Typescript/types/pixi/events/index.d.ts @@ -0,0 +1,967 @@ +/// + +import type { DisplayObject } from 'pixi/display'; +import { EventEmitter } from 'pixi/utils'; +import type { IPointData } from 'pixi/math'; +import type { IRenderableObject } from 'pixi/core'; +import { Point } from 'pixi/math'; + +export declare type Cursor = 'auto' | 'default' | 'none' | 'context-menu' | 'help' | 'pointer' | 'progress' | 'wait' | 'cell' | 'crosshair' | 'text' | 'vertical-text' | 'alias' | 'copy' | 'move' | 'no-drop' | 'not-allowed' | 'e-resize' | 'n-resize' | 'ne-resize' | 'nw-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'w-resize' | 'ns-resize' | 'ew-resize' | 'nesw-resize' | 'col-resize' | 'nwse-resize' | 'row-resize' | 'all-scroll' | 'zoom-in' | 'zoom-out' | 'grab' | 'grabbing'; + +/** + * Event boundaries are "barriers" where events coming from an upstream scene are modified before downstream propagation. + * + * ## Root event boundary + * + * The {@link PIXI.EventSystem#rootBoundary rootBoundary} handles events coming from the <canvas />. + * {@link PIXI.EventSystem} handles the normalization from native {@link https://dom.spec.whatwg.org/#event Events} + * into {@link PIXI.FederatedEvent FederatedEvents}. The rootBoundary then does the hit-testing and event dispatch + * for the upstream normalized event. + * + * ## Additional event boundaries + * + * An additional event boundary may be desired within an application's scene graph. For example, if a portion of the scene is + * is flat with many children at one level - a spatial hash maybe needed to accelerate hit testing. In this scenario, the + * container can be detached from the scene and glued using a custom event boundary. + * + * ```ts + * import { Container } from 'pixi/display'; + * import { EventBoundary } from 'pixi/events'; + * import { SpatialHash } from 'pixi-spatial-hash'; + * + * class HashedHitTestingEventBoundary + * { + * private spatialHash: SpatialHash; + * + * constructor(scene: Container, spatialHash: SpatialHash) + * { + * super(scene); + * this.spatialHash = spatialHash; + * } + * + * hitTestRecursive(...) + * { + * // TODO: If target === this.rootTarget, then use spatial hash to get a + * // list of possible children that match the given (x,y) coordinates. + * } + * } + * + * class VastScene extends DisplayObject + * { + * protected eventBoundary: EventBoundary; + * protected scene: Container; + * protected spatialHash: SpatialHash; + * + * constructor() + * { + * this.scene = new Container(); + * this.spatialHash = new SpatialHash(); + * this.eventBoundary = new HashedHitTestingEventBoundary(this.scene, this.spatialHash); + * + * // Populate this.scene with a ton of children, while updating this.spatialHash + * } + * } + * ``` + * @memberof PIXI + */ +export declare class EventBoundary { + /** + * The root event-target residing below the event boundary. + * + * All events are dispatched trickling down and bubbling up to this `rootTarget`. + */ + rootTarget: DisplayObject; + /** + * Emits events after they were dispatched into the scene graph. + * + * This can be used for global events listening, regardless of the scene graph being used. It should + * not be used by interactive libraries for normal use. + * + * Special events that do not bubble all the way to the root target are not emitted from here, + * e.g. pointerenter, pointerleave, click. + */ + dispatch: EventEmitter; + /** The cursor preferred by the event targets underneath this boundary. */ + cursor: Cursor | string; + /** + * This flag would emit `pointermove`, `touchmove`, and `mousemove` events on all DisplayObjects. + * + * The `moveOnAll` semantics mirror those of earlier versions of PixiJS. This was disabled in favor of + * the Pointer Event API's approach. + */ + moveOnAll: boolean; + /** + * Maps event types to forwarding handles for them. + * + * {@link PIXI.EventBoundary EventBoundary} provides mapping for "pointerdown", "pointermove", + * "pointerout", "pointerleave", "pointerover", "pointerup", and "pointerupoutside" by default. + * @see PIXI.EventBoundary#addEventMapping + */ + protected mappingTable: Record void; + priority: number; + }>>; + /** + * State object for mapping methods. + * @see PIXI.EventBoundary#trackingData + */ + protected mappingState: Record; + /** + * The event pool maps event constructors to an free pool of instances of those specific events. + * @see PIXI.EventBoundary#allocateEvent + * @see PIXI.EventBoundary#freeEvent + */ + protected eventPool: Map; + /** + * @param rootTarget - The holder of the event boundary. + */ + constructor(rootTarget?: DisplayObject); + /** + * Adds an event mapping for the event `type` handled by `fn`. + * + * Event mappings can be used to implement additional or custom events. They take an event + * coming from the upstream scene (or directly from the {@link PIXI.EventSystem}) and dispatch new downstream events + * generally trickling down and bubbling up to {@link PIXI.EventBoundary.rootTarget this.rootTarget}. + * + * To modify the semantics of existing events, the built-in mapping methods of EventBoundary should be overridden + * instead. + * @param type - The type of upstream event to map. + * @param fn - The mapping method. The context of this function must be bound manually, if desired. + */ + addEventMapping(type: string, fn: (e: FederatedEvent) => void): void; + /** + * Dispatches the given event + * @param e + * @param type + */ + dispatchEvent(e: FederatedEvent, type?: string): void; + /** + * Maps the given upstream event through the event boundary and propagates it downstream. + * @param e + */ + mapEvent(e: FederatedEvent): void; + /** + * Finds the DisplayObject that is the target of a event at the given coordinates. + * + * The passed (x,y) coordinates are in the world space above this event boundary. + * @param x + * @param y + */ + hitTest(x: number, y: number): DisplayObject; + /** + * Propagate the passed event from from {@link EventBoundary.rootTarget this.rootTarget} to its + * target {@code e.target}. + * @param e - The event to propagate. + * @param type + */ + propagate(e: FederatedEvent, type?: string): void; + /** + * Emits the event {@link e} to all display objects. The event is propagated in the bubbling phase always. + * + * This is used in the `pointermove` legacy mode. + * @param e - The emitted event. + * @param type - The listeners to notify. + * @param target + */ + all(e: FederatedEvent, type?: string, target?: FederatedEventTarget): void; + /** + * Finds the propagation path from {@link PIXI.EventBoundary.rootTarget rootTarget} to the passed + * {@code target}. The last element in the path is {@code target}. + * @param target + */ + propagationPath(target: FederatedEventTarget): FederatedEventTarget[]; + /** + * Recursive implementation for {@link EventBoundary.hitTest hitTest}. + * @param currentTarget - The DisplayObject that is to be hit tested. + * @param interactive - Flags whether `currentTarget` or one of its parents are interactive. + * @param location - The location that is being tested for overlap. + * @param testFn - Callback that determines whether the target passes hit testing. This callback + * can assume that `pruneFn` failed to prune the display object. + * @param pruneFn - Callback that determiness whether the target and all of its children + * cannot pass the hit test. It is used as a preliminary optimization to prune entire subtrees + * of the scene graph. + * @returns An array holding the hit testing target and all its ancestors in order. The first element + * is the target itself and the last is {@link EventBoundary.rootTarget rootTarget}. This is the opposite + * order w.r.t. the propagation path. If no hit testing target is found, null is returned. + */ + protected hitTestRecursive(currentTarget: DisplayObject, interactive: boolean, location: Point, testFn: (object: DisplayObject, pt: Point) => boolean, pruneFn?: (object: DisplayObject, pt: Point) => boolean): DisplayObject[]; + /** + * Checks whether the display object or any of its children cannot pass the hit test at all. + * + * {@link EventBoundary}'s implementation uses the {@link PIXI.DisplayObject.hitArea hitArea} + * and {@link PIXI.DisplayObject._mask} for pruning. + * @param displayObject + * @param location + */ + protected hitPruneFn(displayObject: DisplayObject, location: Point): boolean; + /** + * Checks whether the display object passes hit testing for the given location. + * @param displayObject + * @param location + * @returns - Whether `displayObject` passes hit testing for `location`. + */ + protected hitTestFn(displayObject: DisplayObject, location: Point): boolean; + /** + * Notify all the listeners to the event's `currentTarget`. + * @param e - The event passed to the target. + * @param type + */ + protected notifyTarget(e: FederatedEvent, type?: string): void; + /** + * Maps the upstream `pointerdown` events to a downstream `pointerdown` event. + * + * `touchstart`, `rightdown`, `mousedown` events are also dispatched for specific pointer types. + * @param from + */ + protected mapPointerDown(from: FederatedEvent): void; + /** + * Maps the upstream `pointermove` to downstream `pointerout`, `pointerover`, and `pointermove` events, in that order. + * + * The tracking data for the specific pointer has an updated `overTarget`. `mouseout`, `mouseover`, + * `mousemove`, and `touchmove` events are fired as well for specific pointer types. + * @param from - The upstream `pointermove` event. + */ + protected mapPointerMove(from: FederatedEvent): void; + /** + * Maps the upstream `pointerover` to downstream `pointerover` and `pointerenter` events, in that order. + * + * The tracking data for the specific pointer gets a new `overTarget`. + * @param from - The upstream `pointerover` event. + */ + protected mapPointerOver(from: FederatedEvent): void; + /** + * Maps the upstream `pointerout` to downstream `pointerout`, `pointerleave` events, in that order. + * + * The tracking data for the specific pointer is cleared of a `overTarget`. + * @param from - The upstream `pointerout` event. + */ + protected mapPointerOut(from: FederatedEvent): void; + /** + * Maps the upstream `pointerup` event to downstream `pointerup`, `pointerupoutside`, and `click`/`pointertap` events, + * in that order. + * + * The `pointerupoutside` event bubbles from the original `pointerdown` target to the most specific + * ancestor of the `pointerdown` and `pointerup` targets, which is also the `click` event's target. `touchend`, + * `rightup`, `mouseup`, `touchendoutside`, `rightupoutside`, `mouseupoutside`, and `tap` are fired as well for + * specific pointer types. + * @param from - The upstream `pointerup` event. + */ + protected mapPointerUp(from: FederatedEvent): void; + /** + * Maps the upstream `pointerupoutside` event to a downstream `pointerupoutside` event, bubbling from the original + * `pointerdown` target to `rootTarget`. + * + * (The most specific ancestor of the `pointerdown` event and the `pointerup` event must the {@code EventBoundary}'s + * root because the `pointerup` event occurred outside of the boundary.) + * + * `touchendoutside`, `mouseupoutside`, and `rightupoutside` events are fired as well for specific pointer + * types. The tracking data for the specific pointer is cleared of a `pressTarget`. + * @param from - The upstream `pointerupoutside` event. + */ + protected mapPointerUpOutside(from: FederatedEvent): void; + /** + * Maps the upstream `wheel` event to a downstream `wheel` event. + * @param from - The upstream `wheel` event. + */ + protected mapWheel(from: FederatedEvent): void; + /** + * Finds the most specific event-target in the given propagation path that is still mounted in the scene graph. + * + * This is used to find the correct `pointerup` and `pointerout` target in the case that the original `pointerdown` + * or `pointerover` target was unmounted from the scene graph. + * @param propagationPath - The propagation path was valid in the past. + * @returns - The most specific event-target still mounted at the same location in the scene graph. + */ + protected findMountedTarget(propagationPath: FederatedEventTarget[]): FederatedEventTarget; + /** + * Creates an event whose {@code originalEvent} is {@code from}, with an optional `type` and `target` override. + * + * The event is allocated using {@link PIXI.EventBoundary#allocateEvent this.allocateEvent}. + * @param from - The {@code originalEvent} for the returned event. + * @param [type=from.type] - The type of the returned event. + * @param target - The target of the returned event. + */ + protected createPointerEvent(from: FederatedPointerEvent, type?: string, target?: FederatedEventTarget): FederatedPointerEvent; + /** + * Creates a wheel event whose {@code originalEvent} is {@code from}. + * + * The event is allocated using {@link PIXI.EventBoundary#allocateEvent this.allocateEvent}. + * @param from - The upstream wheel event. + */ + protected createWheelEvent(from: FederatedWheelEvent): FederatedWheelEvent; + /** + * Clones the event {@code from}, with an optional {@code type} override. + * + * The event is allocated using {@link PIXI.EventBoundary#allocateEvent this.allocateEvent}. + * @param from - The event to clone. + * @param [type=from.type] - The type of the returned event. + */ + protected clonePointerEvent(from: FederatedPointerEvent, type?: string): FederatedPointerEvent; + /** + * Copies wheel {@link PIXI.FederatedWheelEvent} data from {@code from} into {@code to}. + * + * The following properties are copied: + * + deltaMode + * + deltaX + * + deltaY + * + deltaZ + * @param from + * @param to + */ + protected copyWheelData(from: FederatedWheelEvent, to: FederatedWheelEvent): void; + /** + * Copies pointer {@link PIXI.FederatedPointerEvent} data from {@code from} into {@code to}. + * + * The following properties are copied: + * + pointerId + * + width + * + height + * + isPrimary + * + pointerType + * + pressure + * + tangentialPressure + * + tiltX + * + tiltY + * @param from + * @param to + */ + protected copyPointerData(from: FederatedEvent, to: FederatedEvent): void; + /** + * Copies mouse {@link PIXI.FederatedMouseEvent} data from {@code from} to {@code to}. + * + * The following properties are copied: + * + altKey + * + button + * + buttons + * + clientX + * + clientY + * + metaKey + * + movementX + * + movementY + * + pageX + * + pageY + * + x + * + y + * + screen + * + global + * @param from + * @param to + */ + protected copyMouseData(from: FederatedEvent, to: FederatedEvent): void; + /** + * Copies base {@link PIXI.FederatedEvent} data from {@code from} into {@code to}. + * + * The following properties are copied: + * + isTrusted + * + srcElement + * + timeStamp + * + type + * @param from - The event to copy data from. + * @param to - The event to copy data into. + */ + protected copyData(from: FederatedEvent, to: FederatedEvent): void; + /** + * @param id - The pointer ID. + * @returns The tracking data stored for the given pointer. If no data exists, a blank + * state will be created. + */ + protected trackingData(id: number): TrackingData; + /** + * Allocate a specific type of event from {@link PIXI.EventBoundary#eventPool this.eventPool}. + * + * This allocation is constructor-agnostic, as long as it only takes one argument - this event + * boundary. + * @param constructor - The event's constructor. + */ + protected allocateEvent(constructor: { + new (boundary: EventBoundary): T; + }): T; + /** + * Frees the event and puts it back into the event pool. + * + * It is illegal to reuse the event until it is allocated again, using `this.allocateEvent`. + * + * It is also advised that events not allocated from {@link PIXI.EventBoundary#allocateEvent this.allocateEvent} + * not be freed. This is because of the possibility that the same event is freed twice, which can cause + * it to be allocated twice & result in overwriting. + * @param event - The event to be freed. + * @throws Error if the event is managed by another event boundary. + */ + protected freeEvent(event: T): void; + /** + * Similar to {@link EventEmitter.emit}, except it stops if the `propagationImmediatelyStopped` flag + * is set on the event. + * @param e - The event to call each listener with. + * @param type - The event key. + */ + private notifyListeners; +} + +/** + * The system for handling UI events. + * + * ### Setup + * + * As for PixiJS v6.x, `@pixi/events` is an opt-in package, so you need to import it first. + * + * #### NPM Install + * + * ```sh + * npm install @pixi/events@v6.x + * ``` + * + * There is no default export. The correct way to import EventSystem is: + * + * ```js + * import { Application, Renderer } from 'pixi.js'; + * import { EventSystem } from 'pixi/events'; + * + * // Disable interaction plugin (for PixiJS v6.x) + * delete Renderer.__plugins.interaction; + * + * const app = new Application(); + * app.renderer.addSystem(EventSystem, 'events'); + * ``` + * + * #### CDN Install + * + * Via jsDelivr: + * + * ```html + * + * ``` + * + * Or via unpkg: + * + * ```html + * + * ``` + * + * Then install the EventSystem: + * + * ```js + * // Disable interaction plugin (for PixiJS v6.x) + * delete PIXI.Renderer.__plugins.interaction; + * + * const app = new PIXI.Application(); + * app.renderer.addSystem(PIXI.EventSystem, 'events'); + * ``` + * + * _Note: The version of `@pixi/events` should be the same as the version of `pixi.js` you are using._ + * @memberof PIXI + */ +export declare class EventSystem { + /** + * The {@link PIXI.EventBoundary} for the stage. + * + * The {@link PIXI.EventBoundary#rootTarget rootTarget} of this root boundary is automatically set to + * the last rendered object before any event processing is initiated. This means the main scene + * needs to be rendered atleast once before UI events will start propagating. + * + * The root boundary should only be changed during initialization. Otherwise, any state held by the + * event boundary may be lost (like hovered & pressed DisplayObjects). + */ + readonly rootBoundary: EventBoundary; + /** Does the device support touch events https://www.w3.org/TR/touch-events/ */ + readonly supportsTouchEvents: boolean; + /** Does the device support pointer events https://www.w3.org/Submission/pointer-events/ */ + readonly supportsPointerEvents: boolean; + /** + * Should default browser actions automatically be prevented. + * Does not apply to pointer events for backwards compatibility + * preventDefault on pointer events stops mouse events from firing + * Thus, for every pointer event, there will always be either a mouse of touch event alongside it. + * @default true + */ + autoPreventDefault: boolean; + /** + * Dictionary of how different cursor modes are handled. Strings are handled as CSS cursor + * values, objects are handled as dictionaries of CSS values for {@code domElement}, + * and functions are called instead of changing the CSS. + * Default CSS cursor values are provided for 'default' and 'pointer' modes. + * @member {Object void) | CSSStyleDeclaration>} + */ + cursorStyles: Record void) | CSSStyleDeclaration>; + /** + * The DOM element to which the root event listeners are bound. This is automatically set to + * the renderer's {@link PIXI.Renderer#view view}. + */ + domElement: HTMLElement; + /** The resolution used to convert between the DOM client space into world space. */ + resolution: number; + /** The renderer managing this {@link EventSystem}. */ + renderer: Renderer; + private currentCursor; + private rootPointerEvent; + private rootWheelEvent; + private eventsAdded; + /** + * @param {PIXI.Renderer} renderer + */ + constructor(renderer: Renderer); + /** Destroys all event listeners and detaches the renderer. */ + destroy(): void; + /** + * Sets the current cursor mode, handling any callbacks or CSS style changes. + * @param mode - cursor mode, a key from the cursorStyles dictionary + */ + setCursor(mode: string): void; + /** + * Event handler for pointer down events on {@link PIXI.EventSystem#domElement this.domElement}. + * @param nativeEvent - The native mouse/pointer/touch event. + */ + private onPointerDown; + /** + * Event handler for pointer move events on on {@link PIXI.EventSystem#domElement this.domElement}. + * @param nativeEvent - The native mouse/pointer/touch events. + */ + private onPointerMove; + /** + * Event handler for pointer up events on {@link PIXI.EventSystem#domElement this.domElement}. + * @param nativeEvent - The native mouse/pointer/touch event. + */ + private onPointerUp; + /** + * Event handler for pointer over & out events on {@link PIXI.EventSystem#domElement this.domElement}. + * @param nativeEvent - The native mouse/pointer/touch event. + */ + private onPointerOverOut; + /** + * Passive handler for `wheel` events on {@link EventSystem.domElement this.domElement}. + * @param nativeEvent - The native wheel event. + */ + protected onWheel(nativeEvent: WheelEvent): void; + /** + * Sets the {@link PIXI.EventSystem#domElement domElement} and binds event listeners. + * + * To deregister the current DOM element without setting a new one, pass {@code null}. + * @param element - The new DOM element. + */ + setTargetElement(element: HTMLElement): void; + /** Register event listeners on {@link PIXI.Renderer#domElement this.domElement}. */ + private addEvents; + /** Unregister event listeners on {@link PIXI.EventSystem#domElement this.domElement}. */ + private removeEvents; + /** + * Maps x and y coords from a DOM object and maps them correctly to the PixiJS view. The + * resulting value is stored in the point. This takes into account the fact that the DOM + * element could be scaled and positioned anywhere on the screen. + * @param {PIXI.IPointData} point - the point that the result will be stored in + * @param {number} x - the x coord of the position to map + * @param {number} y - the y coord of the position to map + */ + mapPositionToPoint(point: IPointData, x: number, y: number): void; + /** + * Ensures that the original event object contains all data that a regular pointer event would have + * @param event - The original event data from a touch or mouse event + * @returns An array containing a single normalized pointer event, in the case of a pointer + * or mouse event, or a multiple normalized pointer events if there are multiple changed touches + */ + private normalizeToPointerData; + /** + * Normalizes the native {@link https://w3c.github.io/uievents/#interface-wheelevent WheelEvent}. + * + * The returned {@link PIXI.FederatedWheelEvent} is a shared instance. It will not persist across + * multiple native wheel events. + * @param nativeEvent - The native wheel event that occurred on the canvas. + * @returns A federated wheel event. + */ + protected normalizeWheelEvent(nativeEvent: WheelEvent): FederatedWheelEvent; + /** + * Normalizes the {@code nativeEvent} into a federateed {@code FederatedPointerEvent}. + * @param event + * @param nativeEvent + */ + private bootstrapEvent; + /** + * Transfers base & mouse event data from the {@code nativeEvent} to the federated event. + * @param event + * @param nativeEvent + */ + private transferMouseData; +} + +export declare const FederatedDisplayObject: Omit; + +/** + * An DOM-compatible synthetic event implementation that is "forwarded" on behalf of an original + * FederatedEvent or native {@link https://dom.spec.whatwg.org/#event Event}. + * @memberof PIXI + * @typeParam N - The type of native event held. + */ +export declare class FederatedEvent implements UIEvent { + /** Flags whether this event bubbles. This will take effect only if it is set before propagation. */ + bubbles: boolean; + /** @deprecated */ + cancelBubble: boolean; + /** + * Flags whether this event can be canceled using {@link FederatedEvent.preventDefault}. This is always + * false (for now). + */ + readonly cancelable = false; + /** + * Flag added for compatibility with DOM {@code Event}. It is not used in the Federated Events + * API. + * @see https://dom.spec.whatwg.org/#dom-event-composed + */ + readonly composed = false; + /** The listeners of the event target that are being notified. */ + currentTarget: FederatedEventTarget; + /** Flags whether the default response of the user agent was prevent through this event. */ + defaultPrevented: boolean; + /** + * The propagation phase. + * @default {@link FederatedEvent.NONE} + */ + eventPhase: number; + /** Flags whether this is a user-trusted event */ + isTrusted: boolean; + /** @deprecated */ + returnValue: boolean; + /** @deprecated */ + srcElement: EventTarget; + /** The event target that this will be dispatched to. */ + target: FederatedEventTarget; + /** The timestamp of when the event was created. */ + timeStamp: number; + /** The type of event, e.g. {@code "mouseup"}. */ + type: string; + /** The native event that caused the foremost original event. */ + nativeEvent: N; + /** The original event that caused this event, if any. */ + originalEvent: FederatedEvent; + /** Flags whether propagation was stopped. */ + propagationStopped: boolean; + /** Flags whether propagation was immediately stopped. */ + propagationImmediatelyStopped: boolean; + /** The composed path of the event's propagation. The {@code target} is at the end. */ + path: FederatedEventTarget[]; + /** The {@link EventBoundary} that manages this event. Null for root events. */ + readonly manager: EventBoundary; + /** Event-specific detail */ + detail: number; + /** The global Window object. */ + view: WindowProxy; + /** + * Not supported. + * @deprecated + */ + which: number; + /** The coordinates of the evnet relative to the nearest DOM layer. This is a non-standard property. */ + layer: Point; + /** @readonly */ + get layerX(): number; + /** @readonly */ + get layerY(): number; + /** The coordinates of the event relative to the DOM document. This is a non-standard property. */ + page: Point; + /** @readonly */ + get pageX(): number; + /** @readonly */ + get pageY(): number; + /** + * @param manager - The event boundary which manages this event. Propagation can only occur + * within the boundary's jurisdiction. + */ + constructor(manager: EventBoundary); + /** + * Fallback for the deprecated {@link PIXI.InteractionEvent.data}. + * @deprecated + */ + get data(): this; + /** The propagation path for this event. Alias for {@link EventBoundary.propagationPath}. */ + composedPath(): FederatedEventTarget[]; + /** + * Unimplemented method included for implementing the DOM interface {@code Event}. It will throw an {@code Error}. + * @deprecated + * @param _type + * @param _bubbles + * @param _cancelable + */ + initEvent(_type: string, _bubbles?: boolean, _cancelable?: boolean): void; + /** + * Unimplemented method included for implementing the DOM interface {@code UIEvent}. It will throw an {@code Error}. + * @deprecated + * @param _typeArg + * @param _bubblesArg + * @param _cancelableArg + * @param _viewArg + * @param _detailArg + */ + initUIEvent(_typeArg: string, _bubblesArg?: boolean, _cancelableArg?: boolean, _viewArg?: Window | null, _detailArg?: number): void; + /** Prevent default behavior of PixiJS and the user agent. */ + preventDefault(): void; + /** + * Stop this event from propagating to any addition listeners, including on the + * {@link FederatedEventTarget.currentTarget currentTarget} and also the following + * event targets on the propagation path. + */ + stopImmediatePropagation(): void; + /** + * Stop this event from propagating to the next {@link FederatedEventTarget}. The rest of the listeners + * on the {@link FederatedEventTarget.currentTarget currentTarget} will still be notified. + */ + stopPropagation(): void; + AT_TARGET: number; + BUBBLING_PHASE: number; + CAPTURING_PHASE: number; + NONE: number; +} + +/** + * Describes the shape for a {@link FederatedEvent}'s' `eventTarget`. + * @memberof PIXI + */ +export declare interface FederatedEventTarget extends EventEmitter, EventTarget { + /** The cursor preferred when the mouse pointer is hovering over. */ + cursor: Cursor | string; + /** The parent of this event target. */ + readonly parent?: FederatedEventTarget; + /** The children of this event target. */ + readonly children?: ReadonlyArray; + /** Whether this event target should fire UI events. */ + interactive: boolean; + /** Whether this event target has any children that need UI events. This can be used optimize event propagation. */ + interactiveChildren: boolean; + /** The hit-area specifies the area for which pointer events should be captured by this event target. */ + hitArea: IHitArea | null; +} + +/** + * A {@link PIXI.FederatedEvent} for mouse events. + * @memberof PIXI + */ +export declare class FederatedMouseEvent extends FederatedEvent implements MouseEvent { + /** Whether the "alt" key was pressed when this mouse event occurred. */ + altKey: boolean; + /** The specific button that was pressed in this mouse event. */ + button: number; + /** The button depressed when this event occurred. */ + buttons: number; + /** Whether the "control" key was pressed when this mouse event occurred. */ + ctrlKey: boolean; + /** Whether the "meta" key was pressed when this mouse event occurred. */ + metaKey: boolean; + /** This is currently not implemented in the Federated Events API. */ + relatedTarget: EventTarget; + /** Whether the "shift" key was pressed when this mouse event occurred. */ + shiftKey: boolean; + /** The coordinates of the mouse event relative to the canvas. */ + client: Point; + /** @readonly */ + get clientX(): number; + /** @readonly */ + get clientY(): number; + /** + * Alias for {@link FederatedMouseEvent.clientX this.clientX}. + * @readonly + */ + get x(): number; + /** + * Alias for {@link FederatedMouseEvent.clientY this.clientY}. + * @readonly + */ + get y(): number; + /** This is the number of clicks that occurs in 200ms/click of each other. */ + detail: number; + /** The movement in this pointer relative to the last `mousemove` event. */ + movement: Point; + /** @readonly */ + get movementX(): number; + /** @readonly */ + get movementY(): number; + /** + * The offset of the pointer coordinates w.r.t. target DisplayObject in world space. This is + * not supported at the moment. + */ + offset: Point; + /** @readonly */ + get offsetX(): number; + /** @readonly */ + get offsetY(): number; + /** The pointer coordinates in world space. */ + global: Point; + /** @readonly */ + get globalX(): number; + /** @readonly */ + get globalY(): number; + /** + * The pointer coordinates in the renderer's {@link PIXI.Renderer.screen screen}. This has slightly + * different semantics than native PointerEvent screenX/screenY. + */ + screen: Point; + /** + * The pointer coordinates in the renderer's screen. Alias for {@code screen.x}. + * @readonly + */ + get screenX(): number; + /** + * The pointer coordinates in the renderer's screen. Alias for {@code screen.y}. + * @readonly + */ + get screenY(): number; + /** + * Whether the modifier key was pressed when this event natively occurred. + * @param key - The modifier key. + */ + getModifierState(key: string): boolean; + /** + * Not supported. + * @param _typeArg + * @param _canBubbleArg + * @param _cancelableArg + * @param _viewArg + * @param _detailArg + * @param _screenXArg + * @param _screenYArg + * @param _clientXArg + * @param _clientYArg + * @param _ctrlKeyArg + * @param _altKeyArg + * @param _shiftKeyArg + * @param _metaKeyArg + * @param _buttonArg + * @param _relatedTargetArg + * @deprecated + */ + initMouseEvent(_typeArg: string, _canBubbleArg: boolean, _cancelableArg: boolean, _viewArg: Window, _detailArg: number, _screenXArg: number, _screenYArg: number, _clientXArg: number, _clientYArg: number, _ctrlKeyArg: boolean, _altKeyArg: boolean, _shiftKeyArg: boolean, _metaKeyArg: boolean, _buttonArg: number, _relatedTargetArg: EventTarget): void; +} + +/** + * A {@link PIXI.FederatedEvent} for pointer events. + * @memberof PIXI + */ +export declare class FederatedPointerEvent extends FederatedMouseEvent implements PointerEvent { + /** + * The unique identifier of the pointer. + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId} + */ + pointerId: number; + /** + * The width of the pointer's contact along the x-axis, measured in CSS pixels. + * radiusX of TouchEvents will be represented by this value. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width + */ + width: number; + /** + * The height of the pointer's contact along the y-axis, measured in CSS pixels. + * radiusY of TouchEvents will be represented by this value. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height + */ + height: number; + /** + * Indicates whether or not the pointer device that created the event is the primary pointer. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary + */ + isPrimary: boolean; + /** + * The type of pointer that triggered the event. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType + */ + pointerType: string; + /** + * Pressure applied by the pointing device during the event. + *s + * A Touch's force property will be represented by this value. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure + */ + pressure: number; + /** + * Barrel pressure on a stylus pointer. + * @see https://w3c.github.io/pointerevents/#pointerevent-interface + */ + tangentialPressure: number; + /** + * The angle, in degrees, between the pointer device and the screen. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX + */ + tiltX: number; + /** + * The angle, in degrees, between the pointer device and the screen. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY + */ + tiltY: number; + /** + * Twist of a stylus pointer. + * @see https://w3c.github.io/pointerevents/#pointerevent-interface + */ + twist: number; + /** This is the number of clicks that occurs in 200ms/click of each other. */ + detail: number; + getCoalescedEvents(): PointerEvent[]; + getPredictedEvents(): PointerEvent[]; +} + +/** + * A {@link PIXI.FederatedEvent} for wheel events. + * @memberof PIXI + */ +export declare class FederatedWheelEvent extends FederatedMouseEvent implements WheelEvent { + /** + * The units of `deltaX`, `deltaY`, and `deltaZ`. This is one of `DOM_DELTA_LINE`, + * `DOM_DELTA_PAGE`, `DOM_DELTA_PIXEL`. + */ + deltaMode: number; + /** Horizontal scroll amount */ + deltaX: number; + /** Vertical scroll amount */ + deltaY: number; + /** z-axis scroll amount. */ + deltaZ: number; + /** Units specified in lines. */ + DOM_DELTA_LINE: number; + /** Units specified in pages. */ + DOM_DELTA_PAGE: number; + /** Units specified in pixels. */ + DOM_DELTA_PIXEL: number; +} + +export declare interface IHitArea { + contains(x: number, y: number): boolean; +} + +declare interface Renderer { + _lastObjectRendered: IRenderableObject; + view: HTMLCanvasElement; + resolution: number; + plugins: Record; +} + +/** + * The tracking data for each pointer held in the state of an {@link PIXI.EventBoundary}. + * + * ```ts + * pressTargetsByButton: { + * [id: number]: FederatedEventTarget[]; + * }; + * clicksByButton: { + * [id: number]: { + * clickCount: number; + * target: FederatedEventTarget; + * timeStamp: number; + * } + * }; + * overTargets: FederatedEventTarget[]; + * ``` + * @typedef {object} TrackingData@typedef {object} TrackingData + * @property {Record.} pressTargetsByButton - The pressed display objects' + * propagation paths by each button of the pointer. + * @property {Record.} clicksByButton - Holds clicking data for each button of the pointer. + * @property {PIXI.DisplayObject[]} overTargets - The DisplayObject propagation path over which the pointer is hovering. + * @memberof PIXI + */ +declare type TrackingData = { + pressTargetsByButton: { + [id: number]: FederatedEventTarget[]; + }; + clicksByButton: { + [id: number]: { + clickCount: number; + target: FederatedEventTarget; + timeStamp: number; + }; + }; + overTargets: FederatedEventTarget[]; +}; + +export { } diff --git a/Typescript/types/pixi/extensions/index.d.ts b/Typescript/types/pixi/extensions/index.d.ts new file mode 100644 index 0000000..468f9ea --- /dev/null +++ b/Typescript/types/pixi/extensions/index.d.ts @@ -0,0 +1,104 @@ +/** + * Strict extension format that is used internally for registrations. + * @memberof PIXI + */ +export declare interface ExtensionFormat extends ExtensionFormatLoose { + /** The extension type, always expressed as multiple, even if a single */ + type: ExtensionType[]; +} + +/** + * Format when registering an extension. Generally, the extension + * should have these values as `extension` static property, + * but you can override name or type by providing an object. + * @memberof PIXI + */ +export declare interface ExtensionFormatLoose { + /** The extension type, can be multiple types */ + type: ExtensionType | ExtensionType[]; + /** Optional. Some plugins provide an API name/property, such as Renderer plugins */ + name?: string; + /** Reference to the plugin object/class */ + ref: any; +} + +export declare type ExtensionHandler = (extension: ExtensionFormat) => void; + +export declare type ExtensionMetadata = ExtensionType | ExtensionMetadataDetails; + +declare interface ExtensionMetadataDetails { + type: ExtensionType | ExtensionType[]; + name?: string; +} + +/** + * Global registration of all PixiJS extensions. One-stop-shop for extensibility. + * @memberof PIXI + * @namespace extensions + */ +export declare const extensions: { + /** @ignore */ + _addHandlers: Record; + /** @ignore */ + _removeHandlers: Record; + /** @ignore */ + _queue: Record; + /** + * Remove extensions from PixiJS. + * @param extensions - Extensions to be removed. + * @returns {PIXI.extensions} For chaining. + */ + remove(...extensions: Array): any; + /** + * Register new extensions with PixiJS. + * @param extensions - The spread of extensions to add to PixiJS. + * @returns {PIXI.extensions} For chaining. + */ + add(...extensions: Array): any; + /** + * Internal method to handle extensions by name. + * @param type - The extension type. + * @param onAdd - Function for handling when extensions are added/registered passes {@link PIXI.ExtensionFormat}. + * @param onRemove - Function for handling when extensions are removed/unregistered passes {@link PIXI.ExtensionFormat}. + * @returns {PIXI.extensions} For chaining. + */ + handle(type: ExtensionType, onAdd: ExtensionHandler, onRemove: ExtensionHandler): any; + /** + * Handle a type, but using a map by `name` property. + * @param type - Type of extension to handle. + * @param map - The object map of named extensions. + * @returns {PIXI.extensions} For chaining. + */ + handleByMap(type: ExtensionType, map: Record): any; + /** + * Handle a type, but using a list of extensions. + * @param type - Type of extension to handle. + * @param list - The list of extensions. + * @returns {PIXI.extensions} For chaining. + */ + handleByList(type: ExtensionType, list: any[]): any; +}; + +/** + * Collection of valid extension types. + * @memberof PIXI + * @property {string} Application - Application plugins + * @property {string} RendererPlugin - Plugins for Renderer + * @property {string} CanvasRendererPlugin - Plugins for CanvasRenderer + * @property {string} Loader - Plugins to use with Loader + * @property {string} LoadParser - Parsers for Assets loader. + * @property {string} ResolveParser - Parsers for Assets resolvers. + * @property {string} CacheParser - Parsers for Assets cache. + */ +export declare enum ExtensionType { + Application = "application", + RendererPlugin = "renderer-webgl-plugin", + CanvasRendererPlugin = "renderer-canvas-plugin", + Loader = "loader", + LoadParser = "load-parser", + ResolveParser = "resolve-parser", + CacheParser = "cache-parser", + DetectionParser = "detection-parser" +} + +export { } diff --git a/Typescript/types/pixi/extract/index.d.ts b/Typescript/types/pixi/extract/index.d.ts new file mode 100644 index 0000000..5c27479 --- /dev/null +++ b/Typescript/types/pixi/extract/index.d.ts @@ -0,0 +1,100 @@ +import type { DisplayObject } from 'pixi/display'; +import type { ExtensionMetadata } from 'pixi/core'; +import type { IRendererPlugin } from 'pixi/core'; +import { Rectangle } from 'pixi/math'; +import type { Renderer } from 'pixi/core'; +import { RenderTexture } from 'pixi/core'; + +/** + * This class provides renderer-specific plugins for exporting content from a renderer. + * For instance, these plugins can be used for saving an Image, Canvas element or for exporting the raw image data (pixels). + * + * Do not instantiate these plugins directly. It is available from the `renderer.plugins` property. + * See {@link PIXI.CanvasRenderer#plugins} or {@link PIXI.Renderer#plugins}. + * @example + * // Create a new app (will auto-add extract plugin to renderer) + * const app = new PIXI.Application(); + * + * // Draw a red circle + * const graphics = new PIXI.Graphics() + * .beginFill(0xFF0000) + * .drawCircle(0, 0, 50); + * + * // Render the graphics as an HTMLImageElement + * const image = app.renderer.plugins.extract.image(graphics); + * document.body.appendChild(image); + * @memberof PIXI + */ +declare class Extract_2 implements IRendererPlugin { + /** @ignore */ + static extension: ExtensionMetadata; + private renderer; + /** + * @param renderer - A reference to the current renderer + */ + constructor(renderer: Renderer); + /** + * Will return a HTML Image of the target + * @param target - A displayObject or renderTexture + * to convert. If left empty will use the main renderer + * @param format - Image format, e.g. "image/jpeg" or "image/webp". + * @param quality - JPEG or Webp compression from 0 to 1. Default is 0.92. + * @returns - HTML Image of the target + */ + image(target: DisplayObject | RenderTexture, format?: string, quality?: number): HTMLImageElement; + /** + * Will return a base64 encoded string of this target. It works by calling + * `Extract.getCanvas` and then running toDataURL on that. + * @param target - A displayObject or renderTexture + * to convert. If left empty will use the main renderer + * @param format - Image format, e.g. "image/jpeg" or "image/webp". + * @param quality - JPEG or Webp compression from 0 to 1. Default is 0.92. + * @returns - A base64 encoded string of the texture. + */ + base64(target: DisplayObject | RenderTexture, format?: string, quality?: number): string; + /** + * Creates a Canvas element, renders this target to it and then returns it. + * @param target - A displayObject or renderTexture + * to convert. If left empty will use the main renderer + * @param frame - The frame the extraction is restricted to. + * @returns - A Canvas element with the texture rendered on. + */ + canvas(target?: DisplayObject | RenderTexture, frame?: Rectangle): HTMLCanvasElement; + /** + * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA + * order, with integer values between 0 and 255 (included). + * @param target - A displayObject or renderTexture + * to convert. If left empty will use the main renderer + * @param frame - The frame the extraction is restricted to. + * @returns - One-dimensional array containing the pixel data of the entire texture + */ + pixels(target?: DisplayObject | RenderTexture, frame?: Rectangle | PixelExtractOptions): Uint8Array; + private _rawPixels; + /** Destroys the extract. */ + destroy(): void; + /** + * Takes premultiplied pixel data and produces regular pixel data + * @private + * @param pixels - array of pixel data + * @param out - output array + */ + static arrayPostDivide(pixels: number[] | Uint8Array | Uint8ClampedArray, out: number[] | Uint8Array | Uint8ClampedArray): void; +} +export { Extract_2 as Extract } + +/** + * this interface is used to extract only a single pixel of Render Texture or Display Object + * if you use this Interface all fields is required + * @deprecated + * @example + * test: PixelExtractOptions = { x: 15, y: 20, resolution: 4, width: 10, height: 10 } + */ +export declare interface PixelExtractOptions { + x: number; + y: number; + height: number; + resolution: number; + width: number; +} + +export { } diff --git a/Typescript/types/pixi/filter-alpha/index.d.ts b/Typescript/types/pixi/filter-alpha/index.d.ts new file mode 100644 index 0000000..008d29f --- /dev/null +++ b/Typescript/types/pixi/filter-alpha/index.d.ts @@ -0,0 +1,30 @@ +import { Filter } from 'pixi/core'; + +/** + * Simplest filter - applies alpha. + * + * Use this instead of Container's alpha property to avoid visual layering of individual elements. + * AlphaFilter applies alpha evenly across the entire display object and any opaque elements it contains. + * If elements are not opaque, they will blend with each other anyway. + * + * Very handy if you want to use common features of all filters: + * + * 1. Assign a blendMode to this filter, blend all elements inside display object with background. + * + * 2. To use clipping in display coordinates, assign a filterArea to the same container that has this filter. + * @memberof PIXI.filters + */ +export declare class AlphaFilter extends Filter { + /** + * @param alpha - Amount of alpha from 0 to 1, where 0 is transparent + */ + constructor(alpha?: number); + /** + * Coefficient for alpha multiplication + * @default 1 + */ + get alpha(): number; + set alpha(value: number); +} + +export { } diff --git a/Typescript/types/pixi/filter-blur/index.d.ts b/Typescript/types/pixi/filter-blur/index.d.ts new file mode 100644 index 0000000..69bbcd8 --- /dev/null +++ b/Typescript/types/pixi/filter-blur/index.d.ts @@ -0,0 +1,111 @@ +import type { BLEND_MODES } from 'pixi/constants'; +import { CLEAR_MODES } from 'pixi/constants'; +import { Filter } from 'pixi/core'; +import type { FilterSystem } from 'pixi/core'; +import type { RenderTexture } from 'pixi/core'; + +/** + * The BlurFilter applies a Gaussian blur to an object. + * + * The strength of the blur can be set for the x-axis and y-axis separately. + * @memberof PIXI.filters + */ +export declare class BlurFilter extends Filter { + blurXFilter: BlurFilterPass; + blurYFilter: BlurFilterPass; + private _repeatEdgePixels; + /** + * @param strength - The strength of the blur filter. + * @param quality - The quality of the blur filter. + * @param [resolution=PIXI.settings.FILTER_RESOLUTION] - The resolution of the blur filter. + * @param kernelSize - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15. + */ + constructor(strength?: number, quality?: number, resolution?: number, kernelSize?: number); + /** + * Applies the filter. + * @param filterManager - The manager. + * @param input - The input target. + * @param output - The output target. + * @param clearMode - How to clear + */ + apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clearMode: CLEAR_MODES): void; + protected updatePadding(): void; + /** + * Sets the strength of both the blurX and blurY properties simultaneously + * @default 2 + */ + get blur(): number; + set blur(value: number); + /** + * Sets the number of passes for blur. More passes means higher quality bluring. + * @default 1 + */ + get quality(): number; + set quality(value: number); + /** + * Sets the strength of the blurX property + * @default 2 + */ + get blurX(): number; + set blurX(value: number); + /** + * Sets the strength of the blurY property + * @default 2 + */ + get blurY(): number; + set blurY(value: number); + /** + * Sets the blendmode of the filter + * @default PIXI.BLEND_MODES.NORMAL + */ + get blendMode(): BLEND_MODES; + set blendMode(value: BLEND_MODES); + /** + * If set to true the edge of the target will be clamped + * @default false + */ + get repeatEdgePixels(): boolean; + set repeatEdgePixels(value: boolean); +} + +/** + * The BlurFilterPass applies a horizontal or vertical Gaussian blur to an object. + * @memberof PIXI.filters + */ +export declare class BlurFilterPass extends Filter { + horizontal: boolean; + strength: number; + passes: number; + private _quality; + /** + * @param horizontal - Do pass along the x-axis (`true`) or y-axis (`false`). + * @param strength - The strength of the blur filter. + * @param quality - The quality of the blur filter. + * @param resolution - The resolution of the blur filter. + * @param kernelSize - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15. + */ + constructor(horizontal: boolean, strength?: number, quality?: number, resolution?: number, kernelSize?: number); + /** + * Applies the filter. + * @param filterManager - The manager. + * @param input - The input target. + * @param output - The output target. + * @param clearMode - How to clear + */ + apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clearMode: CLEAR_MODES): void; + /** + * Sets the strength of both the blur. + * @default 16 + */ + get blur(): number; + set blur(value: number); + /** + * Sets the quality of the blur by modifying the number of passes. More passes means higher + * quality bluring but the lower the performance. + * @default 4 + */ + get quality(): number; + set quality(value: number); +} + +export { } diff --git a/Typescript/types/pixi/filter-color-matrix/index.d.ts b/Typescript/types/pixi/filter-color-matrix/index.d.ts new file mode 100644 index 0000000..31811d2 --- /dev/null +++ b/Typescript/types/pixi/filter-color-matrix/index.d.ts @@ -0,0 +1,202 @@ +import type { ArrayFixed } from 'pixi/utils'; +import { Filter } from 'pixi/core'; + +export declare type ColorMatrix = ArrayFixed; + +/** + * The ColorMatrixFilter class lets you apply a 5x4 matrix transformation on the RGBA + * color and alpha values of every pixel on your displayObject to produce a result + * with a new set of RGBA color and alpha values. It's pretty powerful! + * + * ```js + * let colorMatrix = new PIXI.filters.ColorMatrixFilter(); + * container.filters = [colorMatrix]; + * colorMatrix.contrast(2); + * ``` + * @author Clément Chenebault + * @memberof PIXI.filters + */ +export declare class ColorMatrixFilter extends Filter { + grayscale: (scale: number, multiply: boolean) => void; + constructor(); + /** + * Transforms current matrix and set the new one + * @param {number[]} matrix - 5x4 matrix + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + private _loadMatrix; + /** + * Multiplies two mat5's + * @private + * @param out - 5x4 matrix the receiving matrix + * @param a - 5x4 matrix the first operand + * @param b - 5x4 matrix the second operand + * @returns {number[]} 5x4 matrix + */ + private _multiply; + /** + * Create a Float32 Array and normalize the offset component to 0-1 + * @param {number[]} matrix - 5x4 matrix + * @returns {number[]} 5x4 matrix with all values between 0-1 + */ + private _colorMatrix; + /** + * Adjusts brightness + * @param b - value of the brigthness (0-1, where 0 is black) + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + brightness(b: number, multiply: boolean): void; + /** + * Sets each channel on the diagonal of the color matrix. + * This can be used to achieve a tinting effect on Containers similar to the tint field of some + * display objects like Sprite, Text, Graphics, and Mesh. + * @param color - Color of the tint. This is a hex value. + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + tint(color: number, multiply?: boolean): void; + /** + * Set the matrices in grey scales + * @param scale - value of the grey (0-1, where 0 is black) + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + greyscale(scale: number, multiply: boolean): void; + /** + * Set the black and white matrice. + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + blackAndWhite(multiply: boolean): void; + /** + * Set the hue property of the color + * @param rotation - in degrees + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + hue(rotation: number, multiply: boolean): void; + /** + * Set the contrast matrix, increase the separation between dark and bright + * Increase contrast : shadows darker and highlights brighter + * Decrease contrast : bring the shadows up and the highlights down + * @param amount - value of the contrast (0-1) + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + contrast(amount: number, multiply: boolean): void; + /** + * Set the saturation matrix, increase the separation between colors + * Increase saturation : increase contrast, brightness, and sharpness + * @param amount - The saturation amount (0-1) + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + saturate(amount?: number, multiply?: boolean): void; + /** Desaturate image (remove color) Call the saturate function */ + desaturate(): void; + /** + * Negative image (inverse of classic rgb matrix) + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + negative(multiply: boolean): void; + /** + * Sepia image + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + sepia(multiply: boolean): void; + /** + * Color motion picture process invented in 1916 (thanks Dominic Szablewski) + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + technicolor(multiply: boolean): void; + /** + * Polaroid filter + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + polaroid(multiply: boolean): void; + /** + * Filter who transforms : Red -> Blue and Blue -> Red + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + toBGR(multiply: boolean): void; + /** + * Color reversal film introduced by Eastman Kodak in 1935. (thanks Dominic Szablewski) + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + kodachrome(multiply: boolean): void; + /** + * Brown delicious browni filter (thanks Dominic Szablewski) + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + browni(multiply: boolean): void; + /** + * Vintage filter (thanks Dominic Szablewski) + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + vintage(multiply: boolean): void; + /** + * We don't know exactly what it does, kind of gradient map, but funny to play with! + * @param desaturation - Tone values. + * @param toned - Tone values. + * @param lightColor - Tone values, example: `0xFFE580` + * @param darkColor - Tone values, example: `0xFFE580` + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + colorTone(desaturation: number, toned: number, lightColor: number, darkColor: number, multiply: boolean): void; + /** + * Night effect + * @param intensity - The intensity of the night effect. + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + night(intensity: number, multiply: boolean): void; + /** + * Predator effect + * + * Erase the current matrix by setting a new indepent one + * @param amount - how much the predator feels his future victim + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + predator(amount: number, multiply: boolean): void; + /** + * LSD effect + * + * Multiply the current matrix + * @param multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + lsd(multiply: boolean): void; + /** Erase the current matrix by setting the default one. */ + reset(): void; + /** + * The matrix of the color matrix filter + * @member {number[]} + * @default [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0] + */ + get matrix(): ColorMatrix; + set matrix(value: ColorMatrix); + /** + * The opacity value to use when mixing the original and resultant colors. + * + * When the value is 0, the original color is used without modification. + * When the value is 1, the result color is used. + * When in the range (0, 1) the color is interpolated between the original and result by this amount. + * @default 1 + */ + get alpha(): number; + set alpha(value: number); +} + +export { } diff --git a/Typescript/types/pixi/filter-displacement/index.d.ts b/Typescript/types/pixi/filter-displacement/index.d.ts new file mode 100644 index 0000000..4742839 --- /dev/null +++ b/Typescript/types/pixi/filter-displacement/index.d.ts @@ -0,0 +1,47 @@ +import type { CLEAR_MODES } from 'pixi/constants'; +import { Filter } from 'pixi/core'; +import type { FilterSystem } from 'pixi/core'; +import type { ISpriteMaskTarget } from 'pixi/core'; +import { Matrix } from 'pixi/math'; +import { Point } from 'pixi/math'; +import type { RenderTexture } from 'pixi/core'; +import type { Texture } from 'pixi/core'; + +/** + * The DisplacementFilter class uses the pixel values from the specified texture + * (called the displacement map) to perform a displacement of an object. + * + * You can use this filter to apply all manor of crazy warping effects. + * Currently the `r` property of the texture is used to offset the `x` + * and the `g` property of the texture is used to offset the `y`. + * + * The way it works is it uses the values of the displacement map to look up the + * correct pixels to output. This means it's not technically moving the original. + * Instead, it's starting at the output and asking "which pixel from the original goes here". + * For example, if a displacement map pixel has `red = 1` and the filter scale is `20`, + * this filter will output the pixel approximately 20 pixels to the right of the original. + * @memberof PIXI.filters + */ +export declare class DisplacementFilter extends Filter { + maskSprite: ISpriteMaskTarget; + maskMatrix: Matrix; + scale: Point; + /** + * @param {PIXI.Sprite} sprite - The sprite used for the displacement map. (make sure its added to the scene!) + * @param scale - The scale of the displacement + */ + constructor(sprite: ISpriteMaskTarget, scale?: number); + /** + * Applies the filter. + * @param filterManager - The manager. + * @param input - The input target. + * @param output - The output target. + * @param clearMode - clearMode. + */ + apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clearMode: CLEAR_MODES): void; + /** The texture used for the displacement map. Must be power of 2 sized texture. */ + get map(): Texture; + set map(value: Texture); +} + +export { } diff --git a/Typescript/types/pixi/filter-fxaa/index.d.ts b/Typescript/types/pixi/filter-fxaa/index.d.ts new file mode 100644 index 0000000..b1e19eb --- /dev/null +++ b/Typescript/types/pixi/filter-fxaa/index.d.ts @@ -0,0 +1,13 @@ +import { Filter } from 'pixi/core'; + +/** + * Basic FXAA (Fast Approximate Anti-Aliasing) implementation based on the code on geeks3d.com + * with the modification that the texture2DLod stuff was removed since it is unsupported by WebGL. + * @see https://github.com/mitsuhiko/webgl-meincraft + * @memberof PIXI.filters + */ +export declare class FXAAFilter extends Filter { + constructor(); +} + +export { } diff --git a/Typescript/types/pixi/filter-noise/index.d.ts b/Typescript/types/pixi/filter-noise/index.d.ts new file mode 100644 index 0000000..87c3e39 --- /dev/null +++ b/Typescript/types/pixi/filter-noise/index.d.ts @@ -0,0 +1,27 @@ +import { Filter } from 'pixi/core'; + +/** + * A Noise effect filter. + * + * original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js + * @memberof PIXI.filters + * @author Vico @vicocotea + */ +export declare class NoiseFilter extends Filter { + /** + * @param {number} [noise=0.5] - The noise intensity, should be a normalized value in the range [0, 1]. + * @param {number} [seed] - A random seed for the noise generation. Default is `Math.random()`. + */ + constructor(noise?: number, seed?: number); + /** + * The amount of noise to apply, this value should be in the range (0, 1]. + * @default 0.5 + */ + get noise(): number; + set noise(value: number); + /** A seed value to apply to the random noise generation. `Math.random()` is a good value to use. */ + get seed(): number; + set seed(value: number); +} + +export { } diff --git a/Typescript/types/pixi/graphics-extras/global.d.ts b/Typescript/types/pixi/graphics-extras/global.d.ts new file mode 100644 index 0000000..65ef750 --- /dev/null +++ b/Typescript/types/pixi/graphics-extras/global.d.ts @@ -0,0 +1,8 @@ +declare namespace GlobalMixins +{ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface Graphics extends Partial + { + + } +} diff --git a/Typescript/types/pixi/graphics-extras/index.d.ts b/Typescript/types/pixi/graphics-extras/index.d.ts new file mode 100644 index 0000000..0c33f65 --- /dev/null +++ b/Typescript/types/pixi/graphics-extras/index.d.ts @@ -0,0 +1,108 @@ +/// + +import type { Graphics } from 'pixi/graphics'; + +/** + * Draw Rectangle with chamfer corners. These are angled corners. + * + * _Note: Only available with **@pixi/graphics-extras**._ + * @method PIXI.Graphics#drawChamferRect + * @param this + * @param {number} x - Upper left corner of rect + * @param {number} y - Upper right corner of rect + * @param {number} width - Width of rect + * @param {number} height - Height of rect + * @param {number} chamfer - non-zero real number, size of corner cutout + * @returns {PIXI.Graphics} Returns self. + */ +declare function drawChamferRect(this: Graphics, x: number, y: number, width: number, height: number, chamfer: number): Graphics; + +/** + * Draw Rectangle with fillet corners. This is much like rounded rectangle + * however it support negative numbers as well for the corner radius. + * + * _Note: Only available with **@pixi/graphics-extras**._ + * @method PIXI.Graphics#drawFilletRect + * @param this + * @param {number} x - Upper left corner of rect + * @param {number} y - Upper right corner of rect + * @param {number} width - Width of rect + * @param {number} height - Height of rect + * @param {number} fillet - accept negative or positive values + * @returns {PIXI.Graphics} Returns self. + */ +declare function drawFilletRect(this: Graphics, x: number, y: number, width: number, height: number, fillet: number): Graphics; + +/** + * Draw a regular polygon where all sides are the same length. + * + * _Note: Only available with **@pixi/graphics-extras**._ + * @method PIXI.Graphics#drawRegularPolygon + * @param this + * @param {number} x - X position + * @param {number} y - Y position + * @param {number} radius - Polygon radius + * @param {number} sides - Minimum value is 3 + * @param {number} rotation - Starting rotation values in radians.. + * @returns {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ +declare function drawRegularPolygon(this: Graphics, x: number, y: number, radius: number, sides: number, rotation?: number): Graphics; + +/** + * Draw a regular polygon with rounded corners. + * + * _Note: Only available with **@pixi/graphics-extras**._ + * @method PIXI.Graphics#drawRoundedPolygon + * @param this + * @param {number} x - X position + * @param {number} y - Y position + * @param {number} radius - Polygon radius + * @param {number} sides - Minimum value is 3 + * @param {number} corner - Corner size in pixels. + * @param {number} rotation - Starting rotation values in radians.. + * @returns {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ +declare function drawRoundedPolygon(this: Graphics, x: number, y: number, radius: number, sides: number, corner: number, rotation?: number): Graphics; + +/** + * Draw a star shape with an arbitrary number of points. + * + * _Note: Only available with **@pixi/graphics-extras**._ + * @method PIXI.Graphics#drawStar + * @param this + * @param x - Center X position of the star + * @param y - Center Y position of the star + * @param points - The number of points of the star, must be > 1 + * @param radius - The outer radius of the star + * @param innerRadius - The inner radius between points, default half `radius` + * @param rotation - The rotation of the star in radians, where 0 is vertical + * @returns - This Graphics object. Good for chaining method calls + */ +declare function drawStar(this: Graphics, x: number, y: number, points: number, radius: number, innerRadius: number, rotation?: number): Graphics; + +/** + * Draw a torus shape, like a donut. Can be used for something like a circle loader. + * + * _Note: Only available with **@pixi/graphics-extras**._ + * @method PIXI.Graphics#drawTorus + * @param this + * @param {number} x - X position + * @param {number} y - Y position + * @param {number} innerRadius - Inner circle radius + * @param {number} outerRadius - Outer circle radius + * @param {number} [startArc=0] - Where to begin sweep, in radians, 0.0 = to the right + * @param {number} [endArc=Math.PI*2] - Where to end sweep, in radians + * @returns {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ +declare function drawTorus(this: Graphics, x: number, y: number, innerRadius: number, outerRadius: number, startArc?: number, endArc?: number): Graphics; + +export declare interface IGraphicsExtras { + drawTorus: typeof drawTorus; + drawChamferRect: typeof drawChamferRect; + drawFilletRect: typeof drawFilletRect; + drawRegularPolygon: typeof drawRegularPolygon; + drawRoundedPolygon: typeof drawRoundedPolygon; + drawStar: typeof drawStar; +} + +export { } diff --git a/Typescript/types/pixi/graphics/global.d.ts b/Typescript/types/pixi/graphics/global.d.ts new file mode 100644 index 0000000..e534441 --- /dev/null +++ b/Typescript/types/pixi/graphics/global.d.ts @@ -0,0 +1,8 @@ +declare namespace GlobalMixins +{ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface Graphics + { + + } +} diff --git a/Typescript/types/pixi/graphics/index.d.ts b/Typescript/types/pixi/graphics/index.d.ts new file mode 100644 index 0000000..680f279 --- /dev/null +++ b/Typescript/types/pixi/graphics/index.d.ts @@ -0,0 +1,968 @@ +/// + +import { BatchDrawCall } from 'pixi/core'; +import type { BatchDrawCall as BatchDrawCall_2 } from 'pixi/core/'; +import { BatchGeometry } from 'pixi/core'; +import { BLEND_MODES } from 'pixi/constants'; +import { Bounds } from 'pixi/display'; +import type { Circle } from 'pixi/math'; +import { Container } from 'pixi/display'; +import type { Ellipse } from 'pixi/math'; +import type { IDestroyOptions } from 'pixi/display'; +import type { IPointData } from 'pixi/math'; +import type { IShape } from 'pixi/math'; +import { Matrix } from 'pixi/math'; +import { Point } from 'pixi/math'; +import { Polygon } from 'pixi/math'; +import type { Rectangle } from 'pixi/math'; +import type { Renderer } from 'pixi/core'; +import type { RoundedRectangle } from 'pixi/math'; +import { Shader } from 'pixi/core'; +import type { SHAPES } from 'pixi/math'; +import { Texture } from 'pixi/core'; + +/** + * Utilities for arc curves. + * @private + */ +declare class ArcUtils { + /** + * The arcTo() method creates an arc/curve between two tangents on the canvas. + * + * "borrowed" from https://code.google.com/p/fxcanvas/ - thanks google! + * @private + * @param x1 - The x-coordinate of the beginning of the arc + * @param y1 - The y-coordinate of the beginning of the arc + * @param x2 - The x-coordinate of the end of the arc + * @param y2 - The y-coordinate of the end of the arc + * @param radius - The radius of the arc + * @param points - + * @returns - If the arc length is valid, return center of circle, radius and other info otherwise `null`. + */ + static curveTo(x1: number, y1: number, x2: number, y2: number, radius: number, points: Array): IArcLikeShape; + /** + * The arc method creates an arc/curve (used to create circles, or parts of circles). + * @private + * @param _startX - Start x location of arc + * @param _startY - Start y location of arc + * @param cx - The x-coordinate of the center of the circle + * @param cy - The y-coordinate of the center of the circle + * @param radius - The radius of the circle + * @param startAngle - The starting angle, in radians (0 is at the 3 o'clock position + * of the arc's circle) + * @param endAngle - The ending angle, in radians + * @param _anticlockwise - Specifies whether the drawing should be + * counter-clockwise or clockwise. False is default, and indicates clockwise, while true + * indicates counter-clockwise. + * @param points - Collection of points to add to + */ + static arc(_startX: number, _startY: number, cx: number, cy: number, radius: number, startAngle: number, endAngle: number, _anticlockwise: boolean, points: Array): void; +} + +/** + * A structure to hold interim batch objects for Graphics. + * @memberof PIXI.graphicsUtils + */ +declare class BatchPart { + style: LineStyle | FillStyle; + start: number; + size: number; + attribStart: number; + attribSize: number; + constructor(); + /** + * Begin batch part. + * @param style + * @param startIndex + * @param attribStart + */ + begin(style: LineStyle | FillStyle, startIndex: number, attribStart: number): void; + /** + * End batch part. + * @param endIndex + * @param endAttrib + */ + end(endIndex: number, endAttrib: number): void; + reset(): void; +} + +/** + * Utilities for bezier curves + * @private + */ +declare class BezierUtils { + /** + * Calculate length of bezier curve. + * Analytical solution is impossible, since it involves an integral that does not integrate in general. + * Therefore numerical solution is used. + * @private + * @param fromX - Starting point x + * @param fromY - Starting point y + * @param cpX - Control point x + * @param cpY - Control point y + * @param cpX2 - Second Control point x + * @param cpY2 - Second Control point y + * @param toX - Destination point x + * @param toY - Destination point y + * @returns - Length of bezier curve + */ + static curveLength(fromX: number, fromY: number, cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number): number; + /** + * Calculate the points for a bezier curve and then draws it. + * + * Ignored from docs since it is not directly exposed. + * @ignore + * @param cpX - Control point x + * @param cpY - Control point y + * @param cpX2 - Second Control point x + * @param cpY2 - Second Control point y + * @param toX - Destination point x + * @param toY - Destination point y + * @param points - Path array to push points into + */ + static curveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number, points: Array): void; +} + +/** + * Builds a line to draw + * + * Ignored from docs since it is not directly exposed. + * @ignore + * @private + * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output + */ +declare function buildLine(graphicsData: GraphicsData, graphicsGeometry: GraphicsGeometry): void; + +/** + * Fill style object for Graphics. + * @memberof PIXI + */ +export declare class FillStyle { + /** + * The hex color value used when coloring the Graphics object. + * @default 0xFFFFFF + */ + color: number; + /** The alpha value used when filling the Graphics object. */ + alpha: number; + /** + * The texture to be used for the fill. + * @default 0 + */ + texture: Texture; + /** + * The transform applied to the texture. + * @default null + */ + matrix: Matrix; + /** If the current fill is visible. */ + visible: boolean; + constructor(); + /** Clones the object */ + clone(): FillStyle; + /** Reset */ + reset(): void; + /** Destroy and don't use after this. */ + destroy(): void; +} + +export declare interface Graphics extends GlobalMixins.Graphics, Container { +} + +/** + * The Graphics class is primarily used to render primitive shapes such as lines, circles and + * rectangles to the display, and to color and fill them. However, you can also use a Graphics + * object to build a list of primitives to use as a mask, or as a complex hitArea. + * + * Please note that due to legacy naming conventions, the behavior of some functions in this class + * can be confusing. Each call to `drawRect()`, `drawPolygon()`, etc. actually stores that primitive + * in the Geometry class's GraphicsGeometry object for later use in rendering or hit testing - the + * functions do not directly draw anything to the screen. Similarly, the `clear()` function doesn't + * change the screen, it simply resets the list of primitives, which can be useful if you want to + * rebuild the contents of an existing Graphics object. + * + * Once a GraphicsGeometry list is built, you can re-use it in other Geometry objects as + * an optimization, by passing it into a new Geometry object's constructor. Because of this + * ability, it's important to call `destroy()` on Geometry objects once you are done with them, to + * properly dereference each GraphicsGeometry and prevent memory leaks. + * @memberof PIXI + */ +export declare class Graphics extends Container { + /** + * New rendering behavior for rounded rectangles: circular arcs instead of quadratic bezier curves. + * In the next major release, we'll enable this by default. + */ + static nextRoundedRectBehavior: boolean; + /** + * Temporary point to use for containsPoint. + * @private + */ + static _TEMP_POINT: Point; + /** + * Represents the vertex and fragment shaders that processes the geometry and runs on the GPU. + * Can be shared between multiple Graphics objects. + */ + shader: Shader; + /** Renderer plugin for batching */ + pluginName: string; + /** + * Current path + * @readonly + */ + currentPath: Polygon; + /** A collections of batches! These can be drawn by the renderer batch system. */ + protected batches: Array; + /** Update dirty for limiting calculating tints for batches. */ + protected batchTint: number; + /** Update dirty for limiting calculating batches.*/ + protected batchDirty: number; + /** Copy of the object vertex data. */ + protected vertexData: Float32Array; + /** Current fill style. */ + protected _fillStyle: FillStyle; + /** Current line style. */ + protected _lineStyle: LineStyle; + /** Current shape transform matrix. */ + protected _matrix: Matrix; + /** Current hole mode is enabled. */ + protected _holeMode: boolean; + protected _transformID: number; + protected _tint: number; + /** + * Represents the WebGL state the Graphics required to render, excludes shader and geometry. E.g., + * blend mode, culling, depth testing, direction of rendering triangles, backface, etc. + */ + private state; + private _geometry; + /** + * Includes vertex positions, face indices, normals, colors, UVs, and + * custom attributes within buffers, reducing the cost of passing all + * this data to the GPU. Can be shared between multiple Mesh or Graphics objects. + * @readonly + */ + get geometry(): GraphicsGeometry; + /** + * @param geometry - Geometry to use, if omitted will create a new GraphicsGeometry instance. + */ + constructor(geometry?: GraphicsGeometry); + /** + * Creates a new Graphics object with the same values as this one. + * Note that only the geometry of the object is cloned, not its transform (position,scale,etc) + * @returns - A clone of the graphics object + */ + clone(): Graphics; + /** + * The blend mode to be applied to the graphic shape. Apply a value of + * `PIXI.BLEND_MODES.NORMAL` to reset the blend mode. Note that, since each + * primitive in the GraphicsGeometry list is rendered sequentially, modes + * such as `PIXI.BLEND_MODES.ADD` and `PIXI.BLEND_MODES.MULTIPLY` will + * be applied per-primitive. + * @default PIXI.BLEND_MODES.NORMAL + */ + set blendMode(value: BLEND_MODES); + get blendMode(): BLEND_MODES; + /** + * The tint applied to each graphic shape. This is a hex value. A value of + * 0xFFFFFF will remove any tint effect. + * @default 0xFFFFFF + */ + get tint(): number; + set tint(value: number); + /** + * The current fill style. + * @readonly + */ + get fill(): FillStyle; + /** + * The current line style. + * @readonly + */ + get line(): LineStyle; + /** + * Specifies the line style used for subsequent calls to Graphics methods such as the lineTo() + * method or the drawCircle() method. + * @param [width=0] - width of the line to draw, will update the objects stored style + * @param [color=0x0] - color of the line to draw, will update the objects stored style + * @param [alpha=1] - alpha of the line to draw, will update the objects stored style + * @param [alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outer). + * WebGL only. + * @param [native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP + * @returns - This Graphics object. Good for chaining method calls + */ + lineStyle(width: number, color?: number, alpha?: number, alignment?: number, native?: boolean): this; + /** + * Specifies the line style used for subsequent calls to Graphics methods such as the lineTo() + * method or the drawCircle() method. + * @param options - Line style options + * @param {number} [options.width=0] - width of the line to draw, will update the objects stored style + * @param {number} [options.color=0x0] - color of the line to draw, will update the objects stored style + * @param {number} [options.alpha=1] - alpha of the line to draw, will update the objects stored style + * @param {number} [options.alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outer). + * WebGL only. + * @param {boolean} [options.native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP + * @param {PIXI.LINE_CAP}[options.cap=PIXI.LINE_CAP.BUTT] - line cap style + * @param {PIXI.LINE_JOIN}[options.join=PIXI.LINE_JOIN.MITER] - line join style + * @param {number}[options.miterLimit=10] - miter limit ratio + * @returns {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + lineStyle(options?: ILineStyleOptions): this; + /** + * Like line style but support texture for line fill. + * @param [options] - Collection of options for setting line style. + * @param {number} [options.width=0] - width of the line to draw, will update the objects stored style + * @param {PIXI.Texture} [options.texture=PIXI.Texture.WHITE] - Texture to use + * @param {number} [options.color=0x0] - color of the line to draw, will update the objects stored style. + * Default 0xFFFFFF if texture present. + * @param {number} [options.alpha=1] - alpha of the line to draw, will update the objects stored style + * @param {PIXI.Matrix} [options.matrix=null] - Texture matrix to transform texture + * @param {number} [options.alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outer). + * WebGL only. + * @param {boolean} [options.native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP + * @param {PIXI.LINE_CAP}[options.cap=PIXI.LINE_CAP.BUTT] - line cap style + * @param {PIXI.LINE_JOIN}[options.join=PIXI.LINE_JOIN.MITER] - line join style + * @param {number}[options.miterLimit=10] - miter limit ratio + * @returns {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + lineTextureStyle(options?: ILineStyleOptions): this; + /** + * Start a polygon object internally. + * @protected + */ + protected startPoly(): void; + /** + * Finish the polygon object. + * @protected + */ + finishPoly(): void; + /** + * Moves the current drawing position to x, y. + * @param x - the X coordinate to move to + * @param y - the Y coordinate to move to + * @returns - This Graphics object. Good for chaining method calls + */ + moveTo(x: number, y: number): this; + /** + * Draws a line using the current line style from the current drawing position to (x, y); + * The current drawing position is then set to (x, y). + * @param x - the X coordinate to draw to + * @param y - the Y coordinate to draw to + * @returns - This Graphics object. Good for chaining method calls + */ + lineTo(x: number, y: number): this; + /** + * Initialize the curve + * @param x + * @param y + */ + protected _initCurve(x?: number, y?: number): void; + /** + * Calculate the points for a quadratic bezier curve and then draws it. + * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c + * @param cpX - Control point x + * @param cpY - Control point y + * @param toX - Destination point x + * @param toY - Destination point y + * @returns - This Graphics object. Good for chaining method calls + */ + quadraticCurveTo(cpX: number, cpY: number, toX: number, toY: number): this; + /** + * Calculate the points for a bezier curve and then draws it. + * @param cpX - Control point x + * @param cpY - Control point y + * @param cpX2 - Second Control point x + * @param cpY2 - Second Control point y + * @param toX - Destination point x + * @param toY - Destination point y + * @returns This Graphics object. Good for chaining method calls + */ + bezierCurveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number): this; + /** + * The arcTo() method creates an arc/curve between two tangents on the canvas. + * + * "borrowed" from https://code.google.com/p/fxcanvas/ - thanks google! + * @param x1 - The x-coordinate of the first tangent point of the arc + * @param y1 - The y-coordinate of the first tangent point of the arc + * @param x2 - The x-coordinate of the end of the arc + * @param y2 - The y-coordinate of the end of the arc + * @param radius - The radius of the arc + * @returns - This Graphics object. Good for chaining method calls + */ + arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this; + /** + * The arc method creates an arc/curve (used to create circles, or parts of circles). + * @param cx - The x-coordinate of the center of the circle + * @param cy - The y-coordinate of the center of the circle + * @param radius - The radius of the circle + * @param startAngle - The starting angle, in radians (0 is at the 3 o'clock position + * of the arc's circle) + * @param endAngle - The ending angle, in radians + * @param anticlockwise - Specifies whether the drawing should be + * counter-clockwise or clockwise. False is default, and indicates clockwise, while true + * indicates counter-clockwise. + * @returns - This Graphics object. Good for chaining method calls + */ + arc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): this; + /** + * Specifies a simple one-color fill that subsequent calls to other Graphics methods + * (such as lineTo() or drawCircle()) use when drawing. + * @param color - the color of the fill + * @param alpha - the alpha of the fill + * @returns - This Graphics object. Good for chaining method calls + */ + beginFill(color?: number, alpha?: number): this; + /** + * Begin the texture fill + * @param options - Object object. + * @param {PIXI.Texture} [options.texture=PIXI.Texture.WHITE] - Texture to fill + * @param {number} [options.color=0xffffff] - Background to fill behind texture + * @param {number} [options.alpha=1] - Alpha of fill + * @param {PIXI.Matrix} [options.matrix=null] - Transform matrix + * @returns {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + beginTextureFill(options?: IFillStyleOptions): this; + /** + * Applies a fill to the lines and shapes that were added since the last call to the beginFill() method. + * @returns - This Graphics object. Good for chaining method calls + */ + endFill(): this; + /** + * Draws a rectangle shape. + * @param x - The X coord of the top-left of the rectangle + * @param y - The Y coord of the top-left of the rectangle + * @param width - The width of the rectangle + * @param height - The height of the rectangle + * @returns - This Graphics object. Good for chaining method calls + */ + drawRect(x: number, y: number, width: number, height: number): this; + /** + * Draw a rectangle shape with rounded/beveled corners. + * @param x - The X coord of the top-left of the rectangle + * @param y - The Y coord of the top-left of the rectangle + * @param width - The width of the rectangle + * @param height - The height of the rectangle + * @param radius - Radius of the rectangle corners + * @returns - This Graphics object. Good for chaining method calls + */ + drawRoundedRect(x: number, y: number, width: number, height: number, radius: number): this; + /** + * Draws a circle. + * @param x - The X coordinate of the center of the circle + * @param y - The Y coordinate of the center of the circle + * @param radius - The radius of the circle + * @returns - This Graphics object. Good for chaining method calls + */ + drawCircle(x: number, y: number, radius: number): this; + /** + * Draws an ellipse. + * @param x - The X coordinate of the center of the ellipse + * @param y - The Y coordinate of the center of the ellipse + * @param width - The half width of the ellipse + * @param height - The half height of the ellipse + * @returns - This Graphics object. Good for chaining method calls + */ + drawEllipse(x: number, y: number, width: number, height: number): this; + drawPolygon(...path: Array | Array): this; + drawPolygon(path: Array | Array | Polygon): this; + /** + * Draw any shape. + * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - Shape to draw + * @returns - This Graphics object. Good for chaining method calls + */ + drawShape(shape: IShape): this; + /** + * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings. + * @returns - This Graphics object. Good for chaining method calls + */ + clear(): this; + /** + * True if graphics consists of one rectangle, and thus, can be drawn like a Sprite and + * masked with gl.scissor. + * @returns - True if only 1 rect. + */ + isFastRect(): boolean; + /** + * Renders the object using the WebGL renderer + * @param renderer - The renderer + */ + protected _render(renderer: Renderer): void; + /** Populating batches for rendering. */ + protected _populateBatches(): void; + /** + * Renders the batches using the BathedRenderer plugin + * @param renderer - The renderer + */ + protected _renderBatched(renderer: Renderer): void; + /** + * Renders the graphics direct + * @param renderer - The renderer + */ + protected _renderDirect(renderer: Renderer): void; + /** + * Renders specific DrawCall + * @param renderer + * @param drawCall + */ + protected _renderDrawCallDirect(renderer: Renderer, drawCall: BatchDrawCall): void; + /** + * Resolves shader for direct rendering + * @param renderer - The renderer + */ + protected _resolveDirectShader(renderer: Renderer): Shader; + /** Retrieves the bounds of the graphic shape as a rectangle object. */ + protected _calculateBounds(): void; + /** + * Tests if a point is inside this graphics object + * @param point - the point to test + * @returns - the result of the test + */ + containsPoint(point: IPointData): boolean; + /** Recalculate the tint by applying tint to batches using Graphics tint. */ + protected calculateTints(): void; + /** If there's a transform update or a change to the shape of the geometry, recalculate the vertices. */ + protected calculateVertices(): void; + /** + * Closes the current path. + * @returns - Returns itself. + */ + closePath(): this; + /** + * Apply a matrix to the positional data. + * @param matrix - Matrix to use for transform current shape. + * @returns - Returns itself. + */ + setMatrix(matrix: Matrix): this; + /** + * Begin adding holes to the last draw shape + * IMPORTANT: holes must be fully inside a shape to work + * Also weirdness ensues if holes overlap! + * Ellipses, Circles, Rectangles and Rounded Rectangles cannot be holes or host for holes in CanvasRenderer, + * please use `moveTo` `lineTo`, `quadraticCurveTo` if you rely on pixi-legacy bundle. + * @returns - Returns itself. + */ + beginHole(): this; + /** + * End adding holes to the last draw shape. + * @returns - Returns itself. + */ + endHole(): this; + /** + * Destroys the Graphics object. + * @param options - Options parameter. A boolean will act as if all + * options have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have + * their destroy method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the texture of the child sprite + * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the base texture of the child sprite + */ + destroy(options?: IDestroyOptions | boolean): void; +} + +/** + * Graphics curves resolution settings. If `adaptive` flag is set to `true`, + * the resolution is calculated based on the curve's length to ensure better visual quality. + * Adaptive draw works with `bezierCurveTo` and `quadraticCurveTo`. + * @static + * @constant + * @memberof PIXI + * @name GRAPHICS_CURVES + * @type {object} + * @property {boolean} [adaptive=true] - flag indicating if the resolution should be adaptive + * @property {number} [maxLength=10] - maximal length of a single segment of the curve (if adaptive = false, ignored) + * @property {number} [minSegments=8] - minimal number of segments in the curve (if adaptive = false, ignored) + * @property {number} [maxSegments=2048] - maximal number of segments in the curve (if adaptive = false, ignored) + */ +export declare const GRAPHICS_CURVES: IGraphicsCurvesSettings; + +/** + * A class to contain data useful for Graphics objects + * @memberof PIXI + */ +export declare class GraphicsData { + /** + * The shape object to draw. + * @member {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} + */ + shape: IShape; + /** The style of the line. */ + lineStyle: LineStyle; + /** The style of the fill. */ + fillStyle: FillStyle; + /** The transform matrix. */ + matrix: Matrix; + /** The type of the shape, see the Const.Shapes file for all the existing types, */ + type: SHAPES; + /** The collection of points. */ + points: number[]; + /** The collection of holes. */ + holes: Array; + /** + * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw. + * @param fillStyle - the width of the line to draw + * @param lineStyle - the color of the line to draw + * @param matrix - Transform matrix + */ + constructor(shape: IShape, fillStyle?: FillStyle, lineStyle?: LineStyle, matrix?: Matrix); + /** + * Creates a new GraphicsData object with the same values as this one. + * @returns - Cloned GraphicsData object + */ + clone(): GraphicsData; + /** Destroys the Graphics data. */ + destroy(): void; +} + +/** + * The Graphics class contains methods used to draw primitive shapes such as lines, circles and + * rectangles to the display, and to color and fill them. + * + * GraphicsGeometry is designed to not be continually updating the geometry since it's expensive + * to re-tesselate using **earcut**. Consider using {@link PIXI.Mesh} for this use-case, it's much faster. + * @memberof PIXI + */ +export declare class GraphicsGeometry extends BatchGeometry { + /** + * The maximum number of points to consider an object "batchable", + * able to be batched by the renderer's batch system. + \ + */ + static BATCHABLE_SIZE: number; + /** Minimal distance between points that are considered different. Affects line tesselation. */ + closePointEps: number; + /** Padding to add to the bounds. */ + boundsPadding: number; + uvsFloat32: Float32Array; + indicesUint16: Uint16Array | Uint32Array; + batchable: boolean; + /** An array of points to draw, 2 numbers per point */ + points: number[]; + /** The collection of colors */ + colors: number[]; + /** The UVs collection */ + uvs: number[]; + /** The indices of the vertices */ + indices: number[]; + /** Reference to the texture IDs. */ + textureIds: number[]; + /** + * The collection of drawn shapes. + * @member {PIXI.GraphicsData[]} + */ + graphicsData: Array; + /** + * List of current draw calls drived from the batches. + * @member {PIXI.BatchDrawCall[]} + */ + drawCalls: Array; + /** Batches need to regenerated if the geometry is updated. */ + batchDirty: number; + /** + * Intermediate abstract format sent to batch system. + * Can be converted to drawCalls or to batchable objects. + * @member {PIXI.graphicsUtils.BatchPart[]} + */ + batches: Array; + /** Used to detect if the graphics object has changed. */ + protected dirty: number; + /** Used to check if the cache is dirty. */ + protected cacheDirty: number; + /** Used to detect if we cleared the graphicsData. */ + protected clearDirty: number; + /** Index of the last batched shape in the stack of calls. */ + protected shapeIndex: number; + /** Cached bounds. */ + protected _bounds: Bounds; + /** The bounds dirty flag. */ + protected boundsDirty: number; + constructor(); + /** + * Get the current bounds of the graphic geometry. + * @readonly + */ + get bounds(): Bounds; + /** Call if you changed graphicsData manually. Empties all batch buffers. */ + protected invalidate(): void; + /** + * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings. + * @returns - This GraphicsGeometry object. Good for chaining method calls + */ + clear(): GraphicsGeometry; + /** + * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. + * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw. + * @param fillStyle - Defines style of the fill. + * @param lineStyle - Defines style of the lines. + * @param matrix - Transform applied to the points of the shape. + * @returns - Returns geometry for chaining. + */ + drawShape(shape: IShape_2, fillStyle?: FillStyle, lineStyle?: LineStyle, matrix?: Matrix): GraphicsGeometry; + /** + * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. + * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw. + * @param matrix - Transform applied to the points of the shape. + * @returns - Returns geometry for chaining. + */ + drawHole(shape: IShape_2, matrix?: Matrix): GraphicsGeometry; + /** Destroys the GraphicsGeometry object. */ + destroy(): void; + /** + * Check to see if a point is contained within this geometry. + * @param point - Point to check if it's contained. + * @returns {boolean} `true` if the point is contained within geometry. + */ + containsPoint(point: IPointData): boolean; + /** + * Generates intermediate batch data. Either gets converted to drawCalls + * or used to convert to batch objects directly by the Graphics object. + */ + updateBatches(): void; + /** + * Affinity check + * @param styleA + * @param styleB + */ + protected _compareStyles(styleA: FillStyle | LineStyle, styleB: FillStyle | LineStyle): boolean; + /** Test geometry for batching process. */ + protected validateBatching(): boolean; + /** Offset the indices so that it works with the batcher. */ + protected packBatches(): void; + /** + * Checks to see if this graphics geometry can be batched. + * Currently it needs to be small enough and not contain any native lines. + */ + protected isBatchable(): boolean; + /** Converts intermediate batches data to drawCalls. */ + protected buildDrawCalls(): void; + /** Packs attributes to single buffer. */ + protected packAttributes(): void; + /** + * Process fill part of Graphics. + * @param data + */ + protected processFill(data: GraphicsData): void; + /** + * Process line part of Graphics. + * @param data + */ + protected processLine(data: GraphicsData): void; + /** + * Process the holes data. + * @param holes + */ + protected processHoles(holes: Array): void; + /** Update the local bounds of the object. Expensive to use performance-wise. */ + protected calculateBounds(): void; + /** + * Transform points using matrix. + * @param points - Points to transform + * @param matrix - Transform matrix + */ + protected transformPoints(points: Array, matrix: Matrix): void; + /** + * Add colors. + * @param colors - List of colors to add to + * @param color - Color to add + * @param alpha - Alpha to use + * @param size - Number of colors to add + * @param offset + */ + protected addColors(colors: Array, color: number, alpha: number, size: number, offset?: number): void; + /** + * Add texture id that the shader/fragment wants to use. + * @param textureIds + * @param id + * @param size + * @param offset + */ + protected addTextureIds(textureIds: Array, id: number, size: number, offset?: number): void; + /** + * Generates the UVs for a shape. + * @param verts - Vertices + * @param uvs - UVs + * @param texture - Reference to Texture + * @param start - Index buffer start index. + * @param size - The size/length for index buffer. + * @param matrix - Optional transform for all points. + */ + protected addUvs(verts: Array, uvs: Array, texture: Texture, start: number, size: number, matrix?: Matrix): void; + /** + * Modify uvs array according to position of texture region + * Does not work with rotated or trimmed textures + * @param uvs - array + * @param texture - region + * @param start - starting index for uvs + * @param size - how many points to adjust + */ + protected adjustUvs(uvs: Array, texture: Texture, start: number, size: number): void; +} + +export declare const graphicsUtils: { + buildPoly: IShapeBuildCommand; + buildCircle: IShapeBuildCommand; + buildRectangle: IShapeBuildCommand; + buildRoundedRectangle: IShapeBuildCommand; + buildLine: typeof buildLine; + ArcUtils: typeof ArcUtils; + BezierUtils: typeof BezierUtils; + QuadraticUtils: typeof QuadraticUtils; + BatchPart: typeof BatchPart; + FILL_COMMANDS: Record; + BATCH_POOL: BatchPart[]; + DRAW_CALL_POOL: BatchDrawCall_2[]; +}; + +declare interface IArcLikeShape { + cx: number; + cy: number; + radius: number; + startAngle: number; + endAngle: number; + anticlockwise: boolean; +} + +export declare interface IFillStyleOptions { + color?: number; + alpha?: number; + texture?: Texture; + matrix?: Matrix; +} + +/** Batch element computed from Graphics geometry */ +export declare interface IGraphicsBatchElement { + vertexData: Float32Array; + blendMode: BLEND_MODES; + indices: Uint16Array | Uint32Array; + uvs: Float32Array; + alpha: number; + worldAlpha: number; + _batchRGB: number[]; + _tintRGB: number; + _texture: Texture; +} + +export declare interface IGraphicsCurvesSettings { + adaptive: boolean; + maxLength: number; + minSegments: number; + maxSegments: number; + epsilon: number; + _segmentsCount(length: number, defaultSegments?: number): number; +} + +export declare interface ILineStyleOptions extends IFillStyleOptions { + width?: number; + alignment?: number; + native?: boolean; + cap?: LINE_CAP; + join?: LINE_JOIN; + miterLimit?: number; +} + +declare type IShape_2 = Circle | Ellipse | Polygon | Rectangle | RoundedRectangle; + +declare interface IShapeBuildCommand { + build(graphicsData: GraphicsData): void; + triangulate(graphicsData: GraphicsData, target: GraphicsGeometry): void; +} + +/** + * Support line caps in `PIXI.LineStyle` for graphics. + * @see PIXI.Graphics#lineStyle + * @name LINE_CAP + * @memberof PIXI + * @static + * @enum {string} + * @property {string} BUTT - 'butt': don't add any cap at line ends (leaves orthogonal edges) + * @property {string} ROUND - 'round': add semicircle at ends + * @property {string} SQUARE - 'square': add square at end (like `BUTT` except more length at end) + */ +export declare enum LINE_CAP { + BUTT = "butt", + ROUND = "round", + SQUARE = "square" +} + +/** + * Supported line joints in `PIXI.LineStyle` for graphics. + * @see PIXI.Graphics#lineStyle + * @see https://graphicdesign.stackexchange.com/questions/59018/what-is-a-bevel-join-of-two-lines-exactly-illustrator + * @name LINE_JOIN + * @memberof PIXI + * @static + * @enum {string} + * @property {string} MITER - 'miter': make a sharp corner where outer part of lines meet + * @property {string} BEVEL - 'bevel': add a square butt at each end of line segment and fill the triangle at turn + * @property {string} ROUND - 'round': add an arc at the joint + */ +export declare enum LINE_JOIN { + MITER = "miter", + BEVEL = "bevel", + ROUND = "round" +} + +/** + * Represents the line style for Graphics. + * @memberof PIXI + */ +export declare class LineStyle extends FillStyle { + /** The width (thickness) of any lines drawn. */ + width: number; + /** The alignment of any lines drawn (0.5 = middle, 1 = outer, 0 = inner). WebGL only. */ + alignment: number; + /** If true the lines will be draw using LINES instead of TRIANGLE_STRIP. */ + native: boolean; + /** + * Line cap style. + * @member {PIXI.LINE_CAP} + * @default PIXI.LINE_CAP.BUTT + */ + cap: LINE_CAP; + /** + * Line join style. + * @member {PIXI.LINE_JOIN} + * @default PIXI.LINE_JOIN.MITER + */ + join: LINE_JOIN; + /** Miter limit. */ + miterLimit: number; + /** Clones the object. */ + clone(): LineStyle; + /** Reset the line style to default. */ + reset(): void; +} + +/** + * Utilities for quadratic curves. + * @private + */ +declare class QuadraticUtils { + /** + * Calculate length of quadratic curve + * @see {@link http://www.malczak.linuxpl.com/blog/quadratic-bezier-curve-length/} + * for the detailed explanation of math behind this. + * @private + * @param fromX - x-coordinate of curve start point + * @param fromY - y-coordinate of curve start point + * @param cpX - x-coordinate of curve control point + * @param cpY - y-coordinate of curve control point + * @param toX - x-coordinate of curve end point + * @param toY - y-coordinate of curve end point + * @returns - Length of quadratic curve + */ + static curveLength(fromX: number, fromY: number, cpX: number, cpY: number, toX: number, toY: number): number; + /** + * Calculate the points for a quadratic bezier curve and then draws it. + * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c + * @private + * @param cpX - Control point x + * @param cpY - Control point y + * @param toX - Destination point x + * @param toY - Destination point y + * @param points - Points to add segments to. + */ + static curveTo(cpX: number, cpY: number, toX: number, toY: number, points: Array): void; +} + +export { } diff --git a/Typescript/types/pixi/index.d.ts b/Typescript/types/pixi/index.d.ts new file mode 100644 index 0000000..748cd6f --- /dev/null +++ b/Typescript/types/pixi/index.d.ts @@ -0,0 +1,46 @@ +// global types for pixi.js. Version: 6.5.10 + /// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// + +import * as utils from 'pixi/utils'; + +export { utils } + + +export * from "pixi/app"; +export * from "pixi/canvas-extract"; +export * from "pixi/canvas-graphics"; +export * from "pixi/canvas-mesh"; +export * from "pixi/canvas-prepare"; +export * from "pixi/canvas-renderer"; +export * from "pixi/canvas-sprite"; +export * from "pixi/constants"; +export * from "pixi/core"; +export * from "pixi/display"; +export * from "pixi/events"; +export * from "pixi/graphics"; +export * from "pixi/math"; +export * from "pixi/runner"; +export * from "pixi/settings"; +export * from "pixi/sprite"; +export * from "pixi/text"; +export * from "pixi/ticker"; + +export { } diff --git a/Typescript/types/pixi/interaction/global.d.ts b/Typescript/types/pixi/interaction/global.d.ts new file mode 100644 index 0000000..29f10eb --- /dev/null +++ b/Typescript/types/pixi/interaction/global.d.ts @@ -0,0 +1,9 @@ +declare namespace GlobalMixins +{ + type InteractiveTarget = import('pixi/interaction').InteractiveTarget; + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface DisplayObject extends InteractiveTarget + { + + } +} diff --git a/Typescript/types/pixi/interaction/index.d.ts b/Typescript/types/pixi/interaction/index.d.ts new file mode 100644 index 0000000..a75d2c2 --- /dev/null +++ b/Typescript/types/pixi/interaction/index.d.ts @@ -0,0 +1,634 @@ +/// + +import type { AbstractRenderer } from 'pixi/core'; +import type { Dict } from 'pixi/utils'; +import { DisplayObject } from 'pixi/display'; +import { EventEmitter } from 'pixi/utils'; +import type { ExtensionMetadata } from 'pixi/core'; +import type { IPointData } from 'pixi/math'; +import { Point } from 'pixi/math'; + +declare type Cursor = 'auto' | 'default' | 'none' | 'context-menu' | 'help' | 'pointer' | 'progress' | 'wait' | 'cell' | 'crosshair' | 'text' | 'vertical-text' | 'alias' | 'copy' | 'move' | 'no-drop' | 'not-allowed' | 'e-resize' | 'n-resize' | 'ne-resize' | 'nw-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'w-resize' | 'ns-resize' | 'ew-resize' | 'nesw-resize' | 'col-resize' | 'nwse-resize' | 'row-resize' | 'all-scroll' | 'zoom-in' | 'zoom-out' | 'grab' | 'grabbing'; + +export declare interface DelayedEvent { + displayObject: DisplayObject; + eventString: string; + eventData: InteractionEvent; +} + +export declare interface IHitArea { + contains(x: number, y: number): boolean; +} + +export declare type InteractionCallback = (interactionEvent: InteractionEvent, displayObject: DisplayObject, hit?: boolean) => void; + +/** + * Holds all information related to an Interaction event + * @memberof PIXI + */ +export declare class InteractionData { + /** This point stores the global coords of where the touch/mouse event happened. */ + global: Point; + /** The target Sprite that was interacted with. */ + target: DisplayObject; + /** + * When passed to an event handler, this will be the original DOM Event that was captured + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent + * @see https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent + * @member {MouseEvent|TouchEvent|PointerEvent} + */ + originalEvent: InteractivePointerEvent; + /** Unique identifier for this interaction. */ + identifier: number; + /** + * Indicates whether or not the pointer device that created the event is the primary pointer. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary + */ + isPrimary: boolean; + /** + * Indicates which button was pressed on the mouse or pointer device to trigger the event. + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button + */ + button: number; + /** + * Indicates which buttons are pressed on the mouse or pointer device when the event is triggered. + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons + */ + buttons: number; + /** + * The width of the pointer's contact along the x-axis, measured in CSS pixels. + * radiusX of TouchEvents will be represented by this value. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width + */ + width: number; + /** + * The height of the pointer's contact along the y-axis, measured in CSS pixels. + * radiusY of TouchEvents will be represented by this value. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height + */ + height: number; + /** + * The angle, in degrees, between the pointer device and the screen. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX + */ + tiltX: number; + /** + * The angle, in degrees, between the pointer device and the screen. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY + */ + tiltY: number; + /** + * The type of pointer that triggered the event. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType + */ + pointerType: string; + /** + * Pressure applied by the pointing device during the event. A Touch's force property + * will be represented by this value. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure + */ + pressure: number; + /** + * From TouchEvents (not PointerEvents triggered by touches), the rotationAngle of the Touch. + * @see https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle + */ + rotationAngle: number; + /** + * Twist of a stylus pointer. + * @see https://w3c.github.io/pointerevents/#pointerevent-interface + */ + twist: number; + /** + * Barrel pressure on a stylus pointer. + * @see https://w3c.github.io/pointerevents/#pointerevent-interface + */ + tangentialPressure: number; + constructor(); + /** + * The unique identifier of the pointer. It will be the same as `identifier`. + * @readonly + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId + */ + get pointerId(): number; + /** + * This will return the local coordinates of the specified displayObject for this InteractionData + * @param displayObject - The DisplayObject that you would like the local + * coords off + * @param point - A Point object in which to store the value, optional (otherwise + * will create a new point) + * @param globalPos - A Point object containing your custom global coords, optional + * (otherwise will use the current global coords) + * @returns - A point containing the coordinates of the InteractionData position relative + * to the DisplayObject + */ + getLocalPosition

(displayObject: DisplayObject, point?: P, globalPos?: IPointData): P; + /** + * Copies properties from normalized event data. + * @param {Touch|MouseEvent|PointerEvent} event - The normalized event data + */ + copyEvent(event: Touch | InteractivePointerEvent): void; + /** Resets the data for pooling. */ + reset(): void; +} + +/** + * Event class that mimics native DOM events. + * @memberof PIXI + */ +export declare class InteractionEvent { + /** + * Whether this event will continue propagating in the tree. + * + * Remaining events for the {@link stopsPropagatingAt} object + * will still be dispatched. + */ + stopped: boolean; + /** + * At which object this event stops propagating. + * @private + */ + stopsPropagatingAt: DisplayObject; + /** + * Whether we already reached the element we want to + * stop propagating at. This is important for delayed events, + * where we start over deeper in the tree again. + * @private + */ + stopPropagationHint: boolean; + /** + * The object which caused this event to be dispatched. + * For listener callback see {@link PIXI.InteractionEvent.currentTarget}. + */ + target: DisplayObject; + /** The object whose event listener’s callback is currently being invoked. */ + currentTarget: DisplayObject; + /** Type of the event. */ + type: string; + /** {@link InteractionData} related to this event */ + data: InteractionData; + constructor(); + /** Prevents event from reaching any objects other than the current object. */ + stopPropagation(): void; + /** Resets the event. */ + reset(): void; +} + +/** + * The interaction manager deals with mouse, touch and pointer events. + * + * Any DisplayObject can be interactive if its `interactive` property is set to true. + * + * This manager also supports multitouch. + * + * An instance of this class is automatically created by default, and can be found at `renderer.plugins.interaction` + * @memberof PIXI + */ +export declare class InteractionManager extends EventEmitter { + /** @ignore */ + static extension: ExtensionMetadata; + /** + * Actively tracked InteractionData + * @private + * @member {Object} + */ + readonly activeInteractionData: { + [key: number]: InteractionData; + }; + /** Does the device support touch events https://www.w3.org/TR/touch-events/ */ + readonly supportsTouchEvents: boolean; + /** Does the device support pointer events https://www.w3.org/Submission/pointer-events/ */ + readonly supportsPointerEvents: boolean; + /** + * Pool of unused InteractionData + * @private + */ + interactionDataPool: InteractionData[]; + /** + * Internal cached let. + * @private + */ + cursor: string; + /** + * Delayed pointer events. Used to guarantee correct ordering of over/out events. + * @private + */ + delayedEvents: DelayedEvent[]; + /** + * TreeSearch component that is used to hitTest stage tree. + * @private + */ + search: TreeSearch; + /** The renderer this interaction manager works for. */ + renderer: AbstractRenderer; + /** + * Should default browser actions automatically be prevented. + * Does not apply to pointer events for backwards compatibility as + * preventDefault on pointer events stops mouse events from firing. + * Thus, for every pointer event, there will always be either a mouse of touch event alongside it. + * @default true + */ + autoPreventDefault: boolean; + /** + * Maximum frequency in milliseconds at which pointer over/out states will be checked by {@link tickerUpdate}. + * @default 10 + */ + interactionFrequency: number; + /** The mouse data. */ + mouse: InteractionData; + /** An event data object to handle all the event tracking/dispatching. */ + eventData: InteractionEvent; + /** + * This property determines if mousemove and touchmove events are fired only when the cursor + * is over the object. + * Setting to true will make things work more in line with how the DOM version works. + * Setting to false can make things easier for things like dragging + * It is currently set to false as this is how PixiJS used to work. This will be set to true in + * future versions of pixi. + * @default false + */ + moveWhenInside: boolean; + /** + * Dictionary of how different cursor modes are handled. Strings are handled as CSS cursor + * values, objects are handled as dictionaries of CSS values for interactionDOMElement, + * and functions are called instead of changing the CSS. + * Default CSS cursor values are provided for 'default' and 'pointer' modes. + * @member {Object} + */ + cursorStyles: Dict void) | CSSStyleDeclaration>; + /** The mode of the cursor that is being used. The value of this is a key from the cursorStyles dictionary. */ + currentCursorMode: string; + /** + * The current resolution / device pixel ratio. + * @default 1 + */ + resolution: number; + /** The DOM element to bind to. */ + protected interactionDOMElement: HTMLElement; + /** Have events been attached to the dom element? */ + protected eventsAdded: boolean; + /** Has the system ticker been added? */ + protected tickerAdded: boolean; + /** Is the mouse hovering over the renderer? If working in worker mouse considered to be over renderer by default. */ + protected mouseOverRenderer: boolean; + private _useSystemTicker; + private _deltaTime; + private _didMove; + /** Used as a last rendered object in case renderer doesnt have _lastObjectRendered. */ + private _tempDisplayObject; + /** + * An options object specifies characteristics about the event listener. + * @member {Object} + */ + private readonly _eventListenerOptions; + /** + * @param {PIXI.CanvasRenderer|PIXI.Renderer} renderer - A reference to the current renderer + * @param options - The options for the manager. + * @param {boolean} [options.autoPreventDefault=true] - Should the manager automatically prevent default browser actions. + * @param {number} [options.interactionFrequency=10] - Maximum frequency (ms) at pointer over/out states will be checked. + * @param {number} [options.useSystemTicker=true] - Whether to add {@link tickerUpdate} to {@link PIXI.Ticker.system}. + */ + constructor(renderer: AbstractRenderer, options?: InteractionManagerOptions); + /** + * Should the InteractionManager automatically add {@link tickerUpdate} to {@link PIXI.Ticker.system}. + * @default true + */ + get useSystemTicker(): boolean; + set useSystemTicker(useSystemTicker: boolean); + /** + * Last rendered object or temp object. + * @readonly + * @protected + */ + get lastObjectRendered(): DisplayObject; + /** + * Hit tests a point against the display tree, returning the first interactive object that is hit. + * @param globalPoint - A point to hit test with, in global space. + * @param root - The root display object to start from. If omitted, defaults + * to the last rendered root of the associated renderer. + * @returns - The hit display object, if any. + */ + hitTest(globalPoint: Point, root?: DisplayObject): DisplayObject; + /** + * Sets the DOM element which will receive mouse/touch events. This is useful for when you have + * other DOM elements on top of the renderers Canvas element. With this you'll be bale to delegate + * another DOM element to receive those events. + * @param element - the DOM element which will receive mouse and touch events. + * @param resolution - The resolution / device pixel ratio of the new element (relative to the canvas). + */ + setTargetElement(element: HTMLElement, resolution?: number): void; + /** Adds the ticker listener. */ + private addTickerListener; + /** Removes the ticker listener. */ + private removeTickerListener; + /** Registers all the DOM events. */ + private addEvents; + /** Removes all the DOM events that were previously registered. */ + private removeEvents; + /** + * Updates the state of interactive objects if at least {@link interactionFrequency} + * milliseconds have passed since the last invocation. + * + * Invoked by a throttled ticker update from {@link PIXI.Ticker.system}. + * @param deltaTime - time delta since the last call + */ + tickerUpdate(deltaTime: number): void; + /** Updates the state of interactive objects. */ + update(): void; + /** + * Sets the current cursor mode, handling any callbacks or CSS style changes. + * @param mode - cursor mode, a key from the cursorStyles dictionary + */ + setCursorMode(mode: string): void; + /** + * Dispatches an event on the display object that was interacted with. + * @param displayObject - the display object in question + * @param eventString - the name of the event (e.g, mousedown) + * @param eventData - the event data object + */ + private dispatchEvent; + /** + * Puts a event on a queue to be dispatched later. This is used to guarantee correct + * ordering of over/out events. + * @param displayObject - the display object in question + * @param eventString - the name of the event (e.g, mousedown) + * @param eventData - the event data object + */ + private delayDispatchEvent; + /** + * Maps x and y coords from a DOM object and maps them correctly to the PixiJS view. The + * resulting value is stored in the point. This takes into account the fact that the DOM + * element could be scaled and positioned anywhere on the screen. + * @param point - the point that the result will be stored in + * @param x - the x coord of the position to map + * @param y - the y coord of the position to map + */ + mapPositionToPoint(point: IPointData, x: number, y: number): void; + /** + * This function is provides a neat way of crawling through the scene graph and running a + * specified function on all interactive objects it finds. It will also take care of hit + * testing the interactive objects and passes the hit across in the function. + * @protected + * @param interactionEvent - event containing the point that + * is tested for collision + * @param displayObject - the displayObject + * that will be hit test (recursively crawls its children) + * @param func - the function that will be called on each interactive object. The + * interactionEvent, displayObject and hit will be passed to the function + * @param hitTest - indicates whether we want to calculate hits + * or just iterate through all interactive objects + */ + processInteractive(interactionEvent: InteractionEvent, displayObject: DisplayObject, func?: InteractionCallback, hitTest?: boolean): void; + /** + * Is called when the pointer button is pressed down on the renderer element + * @param originalEvent - The DOM event of a pointer button being pressed down + */ + private onPointerDown; + /** + * Processes the result of the pointer down check and dispatches the event if need be + * @param interactionEvent - The interaction event wrapping the DOM event + * @param displayObject - The display object that was tested + * @param hit - the result of the hit test on the display object + */ + private processPointerDown; + /** + * Is called when the pointer button is released on the renderer element + * @param originalEvent - The DOM event of a pointer button being released + * @param cancelled - true if the pointer is cancelled + * @param func - Function passed to {@link processInteractive} + */ + private onPointerComplete; + /** + * Is called when the pointer button is cancelled + * @param event - The DOM event of a pointer button being released + */ + private onPointerCancel; + /** + * Processes the result of the pointer cancel check and dispatches the event if need be + * @param interactionEvent - The interaction event wrapping the DOM event + * @param displayObject - The display object that was tested + */ + private processPointerCancel; + /** + * Is called when the pointer button is released on the renderer element + * @param event - The DOM event of a pointer button being released + */ + private onPointerUp; + /** + * Processes the result of the pointer up check and dispatches the event if need be + * @param interactionEvent - The interaction event wrapping the DOM event + * @param displayObject - The display object that was tested + * @param hit - the result of the hit test on the display object + */ + private processPointerUp; + /** + * Is called when the pointer moves across the renderer element + * @param originalEvent - The DOM event of a pointer moving + */ + private onPointerMove; + /** + * Processes the result of the pointer move check and dispatches the event if need be + * @param interactionEvent - The interaction event wrapping the DOM event + * @param displayObject - The display object that was tested + * @param hit - the result of the hit test on the display object + */ + private processPointerMove; + /** + * Is called when the pointer is moved out of the renderer element + * @private + * @param {PointerEvent} originalEvent - The DOM event of a pointer being moved out + */ + private onPointerOut; + /** + * Processes the result of the pointer over/out check and dispatches the event if need be. + * @param interactionEvent - The interaction event wrapping the DOM event + * @param displayObject - The display object that was tested + * @param hit - the result of the hit test on the display object + */ + private processPointerOverOut; + /** + * Is called when the pointer is moved into the renderer element. + * @param originalEvent - The DOM event of a pointer button being moved into the renderer view. + */ + private onPointerOver; + /** + * Get InteractionData for a given pointerId. Store that data as well. + * @param event - Normalized pointer event, output from normalizeToPointerData. + * @returns - Interaction data for the given pointer identifier. + */ + private getInteractionDataForPointerId; + /** + * Return unused InteractionData to the pool, for a given pointerId + * @param pointerId - Identifier from a pointer event + */ + private releaseInteractionDataForPointerId; + /** + * Configure an InteractionEvent to wrap a DOM PointerEvent and InteractionData + * @param interactionEvent - The event to be configured + * @param pointerEvent - The DOM event that will be paired with the InteractionEvent + * @param interactionData - The InteractionData that will be paired + * with the InteractionEvent + * @returns - the interaction event that was passed in + */ + private configureInteractionEventForDOMEvent; + /** + * Ensures that the original event object contains all data that a regular pointer event would have + * @param {TouchEvent|MouseEvent|PointerEvent} event - The original event data from a touch or mouse event + * @returns - An array containing a single normalized pointer event, in the case of a pointer + * or mouse event, or a multiple normalized pointer events if there are multiple changed touches + */ + private normalizeToPointerData; + /** Destroys the interaction manager. */ + destroy(): void; +} + +export declare interface InteractionManagerOptions { + autoPreventDefault?: boolean; + interactionFrequency?: number; + useSystemTicker?: boolean; +} + +/** + * DisplayObjects with the {@link PIXI.interactiveTarget} mixin use this class to track interactions + * @class + * @private + * @memberof PIXI + */ +export declare class InteractionTrackingData { + static FLAGS: Readonly; + private readonly _pointerId; + private _flags; + /** + * @param {number} pointerId - Unique pointer id of the event + * @private + */ + constructor(pointerId: number); + /** + * + * @private + * @param {number} flag - The interaction flag to set + * @param {boolean} yn - Should the flag be set or unset + */ + private _doSet; + /** + * Unique pointer id of the event + * @readonly + * @private + * @member {number} + */ + get pointerId(): number; + /** + * State of the tracking data, expressed as bit flags + * @private + * @member {number} + */ + get flags(): number; + set flags(flags: number); + /** + * Is the tracked event inactive (not over or down)? + * @private + * @member {number} + */ + get none(): boolean; + /** + * Is the tracked event over the DisplayObject? + * @private + * @member {boolean} + */ + get over(): boolean; + set over(yn: boolean); + /** + * Did the right mouse button come down in the DisplayObject? + * @private + * @member {boolean} + */ + get rightDown(): boolean; + set rightDown(yn: boolean); + /** + * Did the left mouse button come down in the DisplayObject? + * @private + * @member {boolean} + */ + get leftDown(): boolean; + set leftDown(yn: boolean); +} + +export declare interface InteractionTrackingFlags { + OVER: number; + LEFT_DOWN: number; + RIGHT_DOWN: number; + NONE: number; +} + +export declare type InteractivePointerEvent = PointerEvent | TouchEvent | MouseEvent; + +export declare interface InteractiveTarget { + interactive: boolean; + interactiveChildren: boolean; + hitArea: IHitArea | null; + cursor: Cursor | string; + buttonMode: boolean; + trackedPointers: { + [x: number]: InteractionTrackingData; + }; + _trackedPointers: { + [x: number]: InteractionTrackingData; + }; +} + +/** + * Default property values of interactive objects + * Used by {@link PIXI.InteractionManager} to automatically give all DisplayObjects these properties + * @private + * @name interactiveTarget + * @type {object} + * @memberof PIXI + * @example + * function MyObject() {} + * + * Object.assign( + * DisplayObject.prototype, + * PIXI.interactiveTarget + * ); + */ +export declare const interactiveTarget: InteractiveTarget; + +/** + * Strategy how to search through stage tree for interactive objects + * @memberof PIXI + */ +declare class TreeSearch { + private readonly _tempPoint; + constructor(); + /** + * Recursive implementation for findHit + * @private + * @param interactionEvent - event containing the point that + * is tested for collision + * @param displayObject - the displayObject + * that will be hit test (recursively crawls its children) + * @param func - the function that will be called on each interactive object. The + * interactionEvent, displayObject and hit will be passed to the function + * @param hitTest - this indicates if the objects inside should be hit test against the point + * @param interactive - Whether the displayObject is interactive + * @returns - Returns true if the displayObject hit the point + */ + recursiveFindHit(interactionEvent: InteractionEvent, displayObject: DisplayObject, func?: InteractionCallback, hitTest?: boolean, interactive?: boolean): boolean; + /** + * This function is provides a neat way of crawling through the scene graph and running a + * specified function on all interactive objects it finds. It will also take care of hit + * testing the interactive objects and passes the hit across in the function. + * @private + * @param interactionEvent - event containing the point that + * is tested for collision + * @param displayObject - the displayObject + * that will be hit test (recursively crawls its children) + * @param func - the function that will be called on each interactive object. The + * interactionEvent, displayObject and hit will be passed to the function + * @param hitTest - this indicates if the objects inside should be hit test against the point + * @returns - Returns true if the displayObject hit the point + */ + findHit(interactionEvent: InteractionEvent, displayObject: DisplayObject, func?: InteractionCallback, hitTest?: boolean): void; +} + +export { } diff --git a/Typescript/types/pixi/loaders/global.d.ts b/Typescript/types/pixi/loaders/global.d.ts new file mode 100644 index 0000000..fa644c0 --- /dev/null +++ b/Typescript/types/pixi/loaders/global.d.ts @@ -0,0 +1,31 @@ +declare namespace GlobalMixins +{ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface LoaderResource + { + /** Texture reference for loading images and other textures. */ + texture?: Texture; + } + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface IResourceMetadata + { + + } + + /** @deprecated Use LoaderResource instead */ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface ILoaderResource + { + + } + + interface Application + { + loader: import('pixi/loaders').Loader; + } + + interface IApplicationOptions + { + sharedLoader?: boolean; + } +} diff --git a/Typescript/types/pixi/loaders/index.d.ts b/Typescript/types/pixi/loaders/index.d.ts new file mode 100644 index 0000000..d3767ef --- /dev/null +++ b/Typescript/types/pixi/loaders/index.d.ts @@ -0,0 +1,984 @@ +/// + +import type { Dict } from 'pixi/utils'; +import type { ExtensionMetadata } from 'pixi/core'; +import type { IBaseTextureOptions } from 'pixi/core'; +import type { Texture } from 'pixi/core'; + +/** + * Application plugin for supporting loader option. Installing the LoaderPlugin + * is not necessary if using **pixi.js** or **pixi.js-legacy**. + * @example + * import {AppLoaderPlugin} from 'pixi/loaders'; + * import {extensions} from 'pixi/core'; + * extensions.add(AppLoaderPlugin); + * @memberof PIXI + */ +export declare class AppLoaderPlugin { + /** @ignore */ + static extension: ExtensionMetadata; + /** + * Loader instance to help with asset loading. + * @memberof PIXI.Application# + * @readonly + */ + static loader: Loader; + /** + * Called on application constructor + * @param options + * @private + */ + static init(options?: GlobalMixins.IApplicationOptions): void; + /** + * Called when application destroyed + * @private + */ + static destroy(): void; +} + +/** + * Options for a call to `.add()`. + * @see Loader#add + * @property {string} name - The name of the resource to load, if not passed the url is used. + * @property {string} key - Alias for `name`. + * @property {string} url - The url for this resource, relative to the baseUrl of this loader. + * @property {string|boolean} crossOrigin - Is this request cross-origin? Default is to determine automatically. + * @property {number} [timeout=0] - A timeout in milliseconds for the load. If the load takes longer + * than this time it is cancelled and the load is considered a failure. If this value is + * set to `0` then there is no explicit timeout. + * @property {LoaderResource.LOAD_TYPE} [loadType=LoaderResource.LOAD_TYPE.XHR] - How should this resource be loaded? + * @property {LoaderResource.XHR_RESPONSE_TYPE} [xhrType=LoaderResource.XHR_RESPONSE_TYPE.DEFAULT] - How should the data + * being loaded be interpreted when using XHR? + * @property {LoaderResource.OnCompleteSignal} onComplete - Callback to add an an onComplete signal istener. + * @property {LoaderResource.OnCompleteSignal} callback - Alias for `onComplete`. + * @property {IResourceMetadata} metadata - Extra configuration for middleware and the Resource object. + */ +export declare interface IAddOptions { + name?: string; + key?: string; + url?: string; + crossOrigin?: string | boolean; + timeout?: number; + parentResource?: LoaderResource; + loadType?: LoaderResource.LOAD_TYPE; + xhrType?: LoaderResource.XHR_RESPONSE_TYPE; + onComplete?: LoaderResource.OnCompleteSignal; + callback?: LoaderResource.OnCompleteSignal; + metadata?: IResourceMetadata; +} + +export declare interface ILoaderAdd { + (this: Loader, name: string, url: string, callback?: LoaderResource.OnCompleteSignal): Loader; + (this: Loader, name: string, url: string, options?: IAddOptions, callback?: LoaderResource.OnCompleteSignal): Loader; + (this: Loader, url: string, callback?: LoaderResource.OnCompleteSignal): Loader; + (this: Loader, url: string, options?: IAddOptions, callback?: LoaderResource.OnCompleteSignal): Loader; + (this: Loader, options: IAddOptions, callback?: LoaderResource.OnCompleteSignal): Loader; + (this: Loader, resources: (IAddOptions | string)[], callback?: LoaderResource.OnCompleteSignal): Loader; +} + +export declare type ILoaderMiddleware = (resource: LoaderResource, next: (...args: any[]) => void) => void; + +/** + * Plugin to be installed for handling specific Loader resources. + * @property {Function} add - Function to call immediate after registering plugin. + * @property {Function} pre - Middleware function to run before load, the + * arguments for this are `(resource, next)` + * @property {Function} use - Middleware function to run after load, the + * arguments for this are `(resource, next)` + */ +export declare interface ILoaderPlugin { + /** Function to call immediate after registering plugin. */ + add?(): void; + /** + * Middleware function to run before load + * @param {LoaderResource} resource - resource + * @param {LoaderResource} next - next middleware + */ + pre?(resource: LoaderResource, next: (...args: any[]) => void): void; + /** + * Middleware function to run after load + * @param {LoaderResource} resource - resource + * @param {LoaderResource} next - next middleware + */ + use?(resource: LoaderResource, next: (...args: any[]) => void): void; +} + +/** @deprecated - Use LoaderResource instead */ +export declare type ILoaderResource = LoaderResource; + +/** + * Metadata for loader resource. It is very messy way to pass options for loader middlewares + * + * Can be extended in `GlobalMixins.IResourceMetadata` + * @memberof PIXI + */ +export declare interface IResourceMetadata extends GlobalMixins.IResourceMetadata, IBaseTextureOptions { + /** The element to use for loading, instead of creating one. */ + loadElement?: HTMLImageElement | HTMLAudioElement | HTMLVideoElement; + /** + * Skips adding source(s) to the load element. This + * is useful if you want to pass in a `loadElement` that you already added load sources to. + */ + skipSource?: boolean; + /** + * The mime type to use for the source element + * of a video/audio elment. If the urls are an array, you can pass this as an array as well + * where each index is the mime type to use for the corresponding url index. + */ + mimeType?: string | string[]; + /** + * Used by BitmapFonts, Spritesheet and CompressedTextures as the options to used for + * metadata when loading the child image. + */ + imageMetadata?: IResourceMetadata; +} + +/** + * The new loader, forked from Resource Loader by Chad Engler: https://github.com/englercj/resource-loader + * + * ```js + * const loader = PIXI.Loader.shared; // PixiJS exposes a premade instance for you to use. + * // or + * const loader = new PIXI.Loader(); // You can also create your own if you want + * + * const sprites = {}; + * + * // Chainable `add` to enqueue a resource + * loader.add('bunny', 'data/bunny.png') + * .add('spaceship', 'assets/spritesheet.json'); + * loader.add('scoreFont', 'assets/score.fnt'); + * + * // Chainable `pre` to add a middleware that runs for each resource, *before* loading that resource. + * // This is useful to implement custom caching modules (using filesystem, indexeddb, memory, etc). + * loader.pre(cachingMiddleware); + * + * // Chainable `use` to add a middleware that runs for each resource, *after* loading that resource. + * // This is useful to implement custom parsing modules (like spritesheet parsers, spine parser, etc). + * loader.use(parsingMiddleware); + * + * // The `load` method loads the queue of resources, and calls the passed in callback called once all + * // resources have loaded. + * loader.load((loader, resources) => { + * // resources is an object where the key is the name of the resource loaded and the value is the resource object. + * // They have a couple default properties: + * // - `url`: The URL that the resource was loaded from + * // - `error`: The error that happened when trying to load (if any) + * // - `data`: The raw data that was loaded + * // also may contain other properties based on the middleware that runs. + * sprites.bunny = new PIXI.TilingSprite(resources.bunny.texture); + * sprites.spaceship = new PIXI.TilingSprite(resources.spaceship.texture); + * sprites.scoreFont = new PIXI.TilingSprite(resources.scoreFont.texture); + * }); + * + * // throughout the process multiple signals can be dispatched. + * loader.onProgress.add(() => {}); // called once per loaded/errored file + * loader.onError.add(() => {}); // called once per errored file + * loader.onLoad.add(() => {}); // called once per loaded file + * loader.onComplete.add(() => {}); // called once when the queued resources all load. + * ``` + * @memberof PIXI + */ +export declare class Loader { + /** The base url for all resources loaded by this loader. */ + baseUrl: string; + /** The progress percent of the loader going through the queue. */ + progress: number; + /** Loading state of the loader, true if it is currently loading resources. */ + loading: boolean; + /** + * A querystring to append to every URL added to the loader. + * + * This should be a valid query string *without* the question-mark (`?`). The loader will + * also *not* escape values for you. Make sure to escape your parameters with + * [`encodeURIComponent`](https://mdn.io/encodeURIComponent) before assigning this property. + * @example + * const loader = new Loader(); + * + * loader.defaultQueryString = 'user=me&password=secret'; + * + * // This will request 'image.png?user=me&password=secret' + * loader.add('image.png').load(); + * + * loader.reset(); + * + * // This will request 'image.png?v=1&user=me&password=secret' + * loader.add('iamge.png?v=1').load(); + */ + defaultQueryString: string; + /** The middleware to run before loading each resource. */ + private _beforeMiddleware; + /** The middleware to run after loading each resource. */ + private _afterMiddleware; + /** The tracks the resources we are currently completing parsing for. */ + private _resourcesParsing; + /** + * The `_loadResource` function bound with this object context. + * @param r - The resource to load + * @param d - The dequeue function + */ + private _boundLoadResource; + /** The resources waiting to be loaded. */ + private _queue; + /** All the resources for this loader keyed by name. */ + resources: Dict; + /** Dispatched once per loaded or errored resource. */ + onProgress: Signal; + /** Dispatched once per errored resource. */ + onError: Signal; + /** Dispatched once per loaded resource. */ + onLoad: Signal; + /** Dispatched when the loader begins to process the queue. */ + onStart: Signal; + /** Dispatched when the queued resources all load. */ + onComplete: Signal; + /** + * @param baseUrl - The base url for all resources loaded by this loader. + * @param concurrency - The number of resources to load concurrently. + */ + constructor(baseUrl?: string, concurrency?: number); + /** + * Adds a resource (or multiple resources) to the loader queue. + * + * This function can take a wide variety of different parameters. The only thing that is always + * required the url to load. All the following will work: + * + * ```js + * loader + * // normal param syntax + * .add('key', 'http://...', function () {}) + * .add('http://...', function () {}) + * .add('http://...') + * + * // object syntax + * .add({ + * name: 'key2', + * url: 'http://...' + * }, function () {}) + * .add({ + * url: 'http://...' + * }, function () {}) + * .add({ + * name: 'key3', + * url: 'http://...' + * onComplete: function () {} + * }) + * .add({ + * url: 'https://...', + * onComplete: function () {}, + * crossOrigin: true + * }) + * + * // you can also pass an array of objects or urls or both + * .add([ + * { name: 'key4', url: 'http://...', onComplete: function () {} }, + * { url: 'http://...', onComplete: function () {} }, + * 'http://...' + * ]) + * + * // and you can use both params and options + * .add('key', 'http://...', { crossOrigin: true }, function () {}) + * .add('http://...', { crossOrigin: true }, function () {}); + * ``` + */ + add: ILoaderAdd; + /** + * Same as add, params have strict order + * @private + * @param name - The name of the resource to load. + * @param url - The url for this resource, relative to the baseUrl of this loader. + * @param options - The options for the load. + * @param callback - Function to call when this specific resource completes loading. + * @returns The loader itself. + */ + protected _add(name: string, url: string, options: IAddOptions, callback?: LoaderResource.OnCompleteSignal): this; + /** + * Sets up a middleware function that will run *before* the + * resource is loaded. + * @param fn - The middleware function to register. + * @returns The loader itself. + */ + pre(fn: ILoaderMiddleware): this; + /** + * Sets up a middleware function that will run *after* the + * resource is loaded. + * @param fn - The middleware function to register. + * @returns The loader itself. + */ + use(fn: ILoaderMiddleware): this; + /** + * Resets the queue of the loader to prepare for a new load. + * @returns The loader itself. + */ + reset(): this; + /** + * Starts loading the queued resources. + * @param cb - Optional callback that will be bound to the `complete` event. + * @returns The loader itself. + */ + load(cb?: Loader.OnCompleteSignal): this; + /** + * The number of resources to load concurrently. + * @default 10 + */ + get concurrency(): number; + set concurrency(concurrency: number); + /** + * Prepares a url for usage based on the configuration of this object + * @param url - The url to prepare. + * @returns The prepared url. + */ + private _prepareUrl; + /** + * Loads a single resource. + * @param resource - The resource to load. + * @param dequeue - The function to call when we need to dequeue this item. + */ + private _loadResource; + /** Called once loading has started. */ + private _onStart; + /** Called once each resource has loaded. */ + private _onComplete; + /** + * Called each time a resources is loaded. + * @param resource - The resource that was loaded + */ + private _onLoad; + static _plugins: Array; + private static _shared; + /** + * If this loader cannot be destroyed. + * @default false + */ + private _protected; + /** Destroy the loader, removes references. */ + destroy(): void; + /** A premade instance of the loader that can be used to load resources. */ + static get shared(): Loader; + /** + * Use the {@link PIXI.extensions.add} API to register plugins. + * @deprecated since 6.5.0 + * @param plugin - The plugin to add + * @returns Reference to PIXI.Loader for chaining + */ + static registerPlugin(plugin: ILoaderPlugin): typeof Loader; +} + +export declare namespace Loader { + /** + * When the resource starts to load. + * @param resource - The resource that the event happened on. + */ + export type OnStartSignal = (loader: Loader) => void; + /** + * When the progress changes the loader and resource are dispatched. + * @param loader - The loader the progress is advancing on. + * @param resource - The resource that has completed or failed to cause the progress to advance. + */ + export type OnProgressSignal = (loader: Loader, resource: LoaderResource) => void; + /** + * When a load completes without error the loader and resource are dispatched. + * @param loader - The loader that has started loading resources. + * @param resource - The resource that has completed. + */ + export type OnLoadSignal = (loader: Loader, resource: LoaderResource) => void; + /** + * When the loader starts loading resources it dispatches this callback. + * @param loader - The loader that has started loading resources. + */ + export type OnCompleteSignal = (loader: Loader, resources: Dict) => void; + /** + * When an error occurs the loader and resource are dispatched. + * @param loader - The loader the error happened in. + * @param resource - The resource that caused the error. + */ + export type OnErrorSignal = (error: Error, loader: Loader, resource: LoaderResource) => void; +} + +export declare interface LoaderResource extends GlobalMixins.LoaderResource, GlobalMixins.ILoaderResource { +} + +/** + * Manages the state and loading of a resource and all child resources. + * + * Can be extended in `GlobalMixins.LoaderResource`. + * @memberof PIXI + */ +export declare class LoaderResource { + /** + * Texture reference for loading images and other textures. + * @type {PIXI.Texture} + */ + texture?: Texture; + /** used by parsing middleware */ + blob?: Blob; + /** + * The name of this resource. + * @readonly + * @type {string} + */ + readonly name: string; + /** + * The url used to load this resource. + * @readonly + * @type {string} + */ + readonly url: string; + /** + * The extension used to load this resource. + * @readonly + * @type {string} + */ + readonly extension: string; + /** The data that was loaded by the resource. */ + data: any; + /** Is this request cross-origin? If unset, determined automatically. */ + crossOrigin: string | boolean; + /** + * A timeout in milliseconds for the load. If the load takes longer than this time + * it is cancelled and the load is considered a failure. If this value is set to `0` + * then there is no explicit timeout. + * @type {number} + */ + timeout: number; + /** + * The method of loading to use for this resource. + * @type {PIXI.LoaderResource.LOAD_TYPE} + */ + loadType: LoaderResource.LOAD_TYPE; + /** + * The type used to load the resource via XHR. If unset, determined automatically. + * @member {string} + */ + xhrType: string; + /** + * Extra info for middleware, and controlling specifics about how the resource loads. + * + * Note that if you pass in a `loadElement`, the Resource class takes ownership of it. + * Meaning it will modify it as it sees fit. + * @type {PIXI.IResourceMetadata} + */ + metadata: IResourceMetadata; + /** + * The error that occurred while loading (if any). + * @readonly + * @member {Error} + */ + error: Error; + /** + * The XHR object that was used to load this resource. This is only set + * when `loadType` is `LoaderResource.LOAD_TYPE.XHR`. + * @readonly + */ + xhr: XMLHttpRequest; + private xdr; + /** + * The child resources this resource owns. + * @type {PIXI.LoaderResource[]} + */ + readonly children: LoaderResource[]; + /** + * The resource type. + * @readonly + * @type {PIXI.LoaderResource.TYPE} + */ + type: LoaderResource.TYPE; + /** + * The progress chunk owned by this resource. + * @readonly + * @member {number} + */ + progressChunk: number; + /** + * Dispatched when the resource beings to load. + * + * The callback looks like {@link LoaderResource.OnStartSignal}. + * @type {PIXI.Signal} + */ + onStart: Signal; + /** + * Dispatched each time progress of this resource load updates. + * Not all resources types and loader systems can support this event + * so sometimes it may not be available. If the resource + * is being loaded on a modern browser, using XHR, and the remote server + * properly sets Content-Length headers, then this will be available. + * + * The callback looks like {@link LoaderResource.OnProgressSignal}. + * @type {PIXI.Signal} + */ + onProgress: Signal; + /** + * Dispatched once this resource has loaded, if there was an error it will + * be in the `error` property. + * + * The callback looks like {@link LoaderResource.OnCompleteSignal}. + * @type {PIXI.Signal} + */ + onComplete: Signal; + /** + * Dispatched after this resource has had all the *after* middleware run on it. + * + * The callback looks like {@link LoaderResource.OnCompleteSignal}. + * @type {PIXI.Signal} + */ + onAfterMiddleware: Signal; + /** + * The state flags of this resource. + * @private + * @member {number} + */ + private _flags; + /** + * The `dequeue` method that will be used a storage place for the async queue dequeue method + * used privately by the loader. + * @private + * @member {Function} + */ + _dequeue: any; + /** + * Used a storage place for the on load binding used privately by the loader. + * @private + * @member {Function} + */ + _onLoadBinding: any; + /** + * The timer for element loads to check if they timeout. + * @private + */ + private _elementTimer; + /** + * The `complete` function bound to this resource's context. + * @private + * @type {Function} + */ + private _boundComplete; + /** + * The `_onError` function bound to this resource's context. + * @private + * @type {Function} + */ + private _boundOnError; + /** + * The `_onProgress` function bound to this resource's context. + * @private + * @type {Function} + */ + private _boundOnProgress; + /** + * The `_onTimeout` function bound to this resource's context. + * @private + * @type {Function} + */ + private _boundOnTimeout; + private _boundXhrOnError; + private _boundXhrOnTimeout; + private _boundXhrOnAbort; + private _boundXhrOnLoad; + /** + * Sets the load type to be used for a specific extension. + * @static + * @param {string} extname - The extension to set the type for, e.g. "png" or "fnt" + * @param {PIXI.LoaderResource.LOAD_TYPE} loadType - The load type to set it to. + */ + static setExtensionLoadType(extname: string, loadType: LoaderResource.LOAD_TYPE): void; + /** + * Sets the load type to be used for a specific extension. + * @static + * @param {string} extname - The extension to set the type for, e.g. "png" or "fnt" + * @param {PIXI.LoaderResource.XHR_RESPONSE_TYPE} xhrType - The xhr type to set it to. + */ + static setExtensionXhrType(extname: string, xhrType: LoaderResource.XHR_RESPONSE_TYPE): void; + /** + * @param {string} name - The name of the resource to load. + * @param {string|string[]} url - The url for this resource, for audio/video loads you can pass + * an array of sources. + * @param {object} [options] - The options for the load. + * @param {string|boolean} [options.crossOrigin] - Is this request cross-origin? Default is to + * determine automatically. + * @param {number} [options.timeout=0] - A timeout in milliseconds for the load. If the load takes + * longer than this time it is cancelled and the load is considered a failure. If this value is + * set to `0` then there is no explicit timeout. + * @param {PIXI.LoaderResource.LOAD_TYPE} [options.loadType=LOAD_TYPE.XHR] - How should this resource + * be loaded? + * @param {PIXI.LoaderResource.XHR_RESPONSE_TYPE} [options.xhrType=XHR_RESPONSE_TYPE.DEFAULT] - How + * should the data being loaded be interpreted when using XHR? + * @param {PIXI.LoaderResource.IMetadata} [options.metadata] - Extra configuration for middleware + * and the Resource object. + */ + constructor(name: string, url: string | string[], options?: { + crossOrigin?: string | boolean; + timeout?: number; + loadType?: LoaderResource.LOAD_TYPE; + xhrType?: LoaderResource.XHR_RESPONSE_TYPE; + metadata?: IResourceMetadata; + }); + /** + * When the resource starts to load. + * @memberof PIXI.LoaderResource + * @callback OnStartSignal@callback OnStartSignal + * @param {PIXI.Resource} resource - The resource that the event happened on. + */ + /** + * When the resource reports loading progress. + * @memberof PIXI.LoaderResource + * @callback OnProgressSignal@callback OnProgressSignal + * @param {PIXI.Resource} resource - The resource that the event happened on. + * @param {number} percentage - The progress of the load in the range [0, 1]. + */ + /** + * When the resource finishes loading. + * @memberof PIXI.LoaderResource + * @callback OnCompleteSignal@callback OnCompleteSignal + * @param {PIXI.Resource} resource - The resource that the event happened on. + */ + /** + * @memberof PIXI.LoaderResource + * @typedef {object} IMetadata@typedef {object} IMetadata + * @property {HTMLImageElement|HTMLAudioElement|HTMLVideoElement} [loadElement=null] - The + * element to use for loading, instead of creating one. + * @property {boolean} [skipSource=false] - Skips adding source(s) to the load element. This + * is useful if you want to pass in a `loadElement` that you already added load sources to. + * @property {string|string[]} [mimeType] - The mime type to use for the source element + * of a video/audio elment. If the urls are an array, you can pass this as an array as well + * where each index is the mime type to use for the corresponding url index. + */ + /** + * Stores whether or not this url is a data url. + * @readonly + * @member {boolean} + */ + get isDataUrl(): boolean; + /** + * Describes if this resource has finished loading. Is true when the resource has completely + * loaded. + * @readonly + * @member {boolean} + */ + get isComplete(): boolean; + /** + * Describes if this resource is currently loading. Is true when the resource starts loading, + * and is false again when complete. + * @readonly + * @member {boolean} + */ + get isLoading(): boolean; + /** Marks the resource as complete. */ + complete(): void; + /** + * Aborts the loading of this resource, with an optional message. + * @param {string} message - The message to use for the error + */ + abort(message: string): void; + /** + * Kicks off loading of this resource. This method is asynchronous. + * @param {PIXI.LoaderResource.OnCompleteSignal} [cb] - Optional callback to call once the resource is loaded. + */ + load(cb?: LoaderResource.OnCompleteSignal): void; + /** + * Checks if the flag is set. + * @param flag - The flag to check. + * @returns True if the flag is set. + */ + private _hasFlag; + /** + * (Un)Sets the flag. + * @param flag - The flag to (un)set. + * @param value - Whether to set or (un)set the flag. + */ + private _setFlag; + /** Clears all the events from the underlying loading source. */ + private _clearEvents; + /** Finalizes the load. */ + private _finish; + /** + * Loads this resources using an element that has a single source, + * like an HTMLImageElement. + * @private + * @param type - The type of element to use. + */ + _loadElement(type: string): void; + /** + * Loads this resources using an element that has multiple sources, + * like an HTMLAudioElement or HTMLVideoElement. + * @param type - The type of element to use. + */ + private _loadSourceElement; + /** Loads this resources using an XMLHttpRequest. */ + private _loadXhr; + /** Loads this resources using an XDomainRequest. This is here because we need to support IE9 (gross). */ + private _loadXdr; + /** + * Creates a source used in loading via an element. + * @param type - The element type (video or audio). + * @param url - The source URL to load from. + * @param [mime] - The mime type of the video + * @returns The source element. + */ + private _createSource; + /** + * Called if a load errors out. + * @param event - The error event from the element that emits it. + */ + private _onError; + /** + * Called if a load progress event fires for an element or xhr/xdr. + * @param event - Progress event. + */ + private _onProgress; + /** Called if a timeout event fires for an element. */ + private _onTimeout; + /** Called if an error event fires for xhr/xdr. */ + private _xhrOnError; + /** Called if an error event fires for xhr/xdr. */ + private _xhrOnTimeout; + /** Called if an abort event fires for xhr/xdr. */ + private _xhrOnAbort; + /** Called when data successfully loads from an xhr/xdr request. */ + private _xhrOnLoad; + /** + * Sets the `crossOrigin` property for this resource based on if the url + * for this resource is cross-origin. If crossOrigin was manually set, this + * function does nothing. + * @private + * @param url - The url to test. + * @param [loc=globalThis.location] - The location object to test against. + * @returns The crossOrigin value to use (or empty string for none). + */ + _determineCrossOrigin(url: string, loc?: any): string; + /** + * Determines the responseType of an XHR request based on the extension of the + * resource being loaded. + * @private + * @returns {PIXI.LoaderResource.XHR_RESPONSE_TYPE} The responseType to use. + */ + private _determineXhrType; + /** + * Determines the loadType of a resource based on the extension of the + * resource being loaded. + * @private + * @returns {PIXI.LoaderResource.LOAD_TYPE} The loadType to use. + */ + private _determineLoadType; + /** + * Extracts the extension (sans '.') of the file being loaded by the resource. + * @param [url] - url to parse, `this.url` by default. + * @returns The extension. + */ + private _getExtension; + /** + * Determines the mime type of an XHR request based on the responseType of + * resource being loaded. + * @param type - The type to get a mime type for. + * @private + * @returns The mime type to use. + */ + _getMimeFromXhrType(type: LoaderResource.XHR_RESPONSE_TYPE): string; +} + +export declare namespace LoaderResource { + /** + * When the resource starts to load. + * @memberof PIXI.LoaderResource + * @callback OnStartSignal@callback OnStartSignal + * @param {PIXI.Resource} resource - The resource that the event happened on. + */ + export type OnStartSignal = (resource: LoaderResource) => void; + /** + * When the resource reports loading progress. + * @memberof PIXI.LoaderResource + * @callback OnProgressSignal@callback OnProgressSignal + * @param {PIXI.Resource} resource - The resource that the event happened on. + * @param {number} percentage - The progress of the load in the range [0, 1]. + */ + export type OnProgressSignal = (resource: LoaderResource, percentage: number) => void; + /** + * When the resource finishes loading. + * @memberof PIXI.LoaderResource + * @callback OnCompleteSignal@callback OnCompleteSignal + * @param {PIXI.Resource} resource - The resource that the event happened on. + */ + export type OnCompleteSignal = (resource: LoaderResource) => void; + /** + * The types of resources a resource could represent. + * @static + * @readonly + * @enum {number} + * @memberof PIXI.LoaderResource + */ + export enum STATUS_FLAGS { + /** None */ + NONE = 0, + /** Data URL */ + DATA_URL = 1, + /** Complete */ + COMPLETE = 2, + /** Loading */ + LOADING = 4 + } + /** + * The types of resources a resource could represent. + * @static + * @readonly + * @enum {number} + * @memberof PIXI.LoaderResource + */ + export enum TYPE { + /** Unknown */ + UNKNOWN = 0, + /** JSON */ + JSON = 1, + /** XML */ + XML = 2, + /** Image */ + IMAGE = 3, + /** Audio */ + AUDIO = 4, + /** Video */ + VIDEO = 5, + /** Plain text */ + TEXT = 6 + } + /** + * The types of loading a resource can use. + * @static + * @readonly + * @enum {number} + * @memberof PIXI.LoaderResource + */ + export enum LOAD_TYPE { + /** Uses XMLHttpRequest to load the resource. */ + XHR = 1, + /** Uses an `Image` object to load the resource. */ + IMAGE = 2, + /** Uses an `Audio` object to load the resource. */ + AUDIO = 3, + /** Uses a `Video` object to load the resource. */ + VIDEO = 4 + } + /** + * The XHR ready states, used internally. + * @static + * @readonly + * @enum {string} + * @memberof PIXI.LoaderResource + */ + export enum XHR_RESPONSE_TYPE { + /** string */ + DEFAULT = "text", + /** ArrayBuffer */ + BUFFER = "arraybuffer", + /** Blob */ + BLOB = "blob", + /** Document */ + DOCUMENT = "document", + /** Object */ + JSON = "json", + /** String */ + TEXT = "text" + } + const _loadTypeMap: Dict; + const _xhrTypeMap: Dict; + const EMPTY_GIF = "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="; +} + +/** + * @memberof PIXI + */ +declare class Signal void> { + _head: SignalBinding; + _tail: SignalBinding; + /** + * MiniSignal constructor. + * @example + * let mySignal = new Signal(); + * let binding = mySignal.add(onSignal); + * mySignal.dispatch('foo', 'bar'); + * mySignal.detach(binding); + */ + constructor(); + /** + * Return an array of attached SignalBinding. + * @param {boolean} [exists=false] - We only need to know if there are handlers. + * @returns {PIXI.SignalBinding[] | boolean} Array of attached SignalBinding or Boolean if called with exists = true + * @api public + */ + handlers(exists?: boolean): Array> | boolean; + /** + * Return true if node is a SignalBinding attached to this MiniSignal + * @param {PIXI.SignalBinding} node - Node to check. + * @returns {boolean} True if node is attache to mini-signal + */ + has(node: SignalBinding): boolean; + /** + * Dispaches a signal to all registered listeners. + * @param {...any} args + * @returns {boolean} Indication if we've emitted an event. + */ + dispatch(...args: any[]): boolean; + /** + * Register a new listener. + * @param {Function} fn - Callback function. + * @param {object} [thisArg] - The context of the callback function. + * @returns {PIXI.SignalBinding} The SignalBinding node that was added. + */ + add(fn: CbType, thisArg?: any): SignalBinding; + /** + * Register a new listener that will be executed only once. + * @param {Function} fn - Callback function. + * @param {object} [thisArg] - The context of the callback function. + * @returns {PIXI.SignalBinding} The SignalBinding node that was added. + */ + once(fn: CbType, thisArg?: any): SignalBinding; + /** + * Remove binding object. + * @param {PIXI.SignalBinding} node - The binding node that will be removed. + * @returns {Signal} The instance on which this method was called. + @api public */ + detach(node: SignalBinding): this; + /** + * Detach all listeners. + * @returns {Signal} The instance on which this method was called. + */ + detachAll(): this; +} + +/** + * @memberof PIXI + */ +declare class SignalBinding { + _fn: any; + _once: boolean; + _next: SignalBinding; + _prev: SignalBinding; + _owner: Signal; + _thisArg: any; + /** + * SignalBinding constructor. + * @constructs SignalBinding + * @param {Function} fn - Event handler to be called. + * @param {boolean} [once=false] - Should this listener be removed after dispatch + * @param {object} [thisArg] - The context of the callback function. + * @api private + */ + constructor(fn: CbType, once: boolean, thisArg: any); + detach(): boolean; +} + +/** + * Loader plugin for handling Texture resources. + * @memberof PIXI + */ +export declare class TextureLoader { + /** @ignore */ + static extension: ExtensionMetadata; + /** Handle SVG elements a text, render with SVGResource. */ + static add(): void; + /** + * Called after a resource is loaded. + * @see PIXI.Loader.loaderMiddleware + * @param resource + * @param {Function} next + */ + static use(resource: LoaderResource, next: (...args: any[]) => void): void; +} + +export { } diff --git a/Typescript/types/pixi/math-extras/global.d.ts b/Typescript/types/pixi/math-extras/global.d.ts new file mode 100644 index 0000000..cb3e23e --- /dev/null +++ b/Typescript/types/pixi/math-extras/global.d.ts @@ -0,0 +1,60 @@ +declare namespace GlobalMixins +{ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface Point extends Vector2Math + { + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface ObservablePoint extends Vector2Math + { + } + + interface Rectangle + { + containsRect(other: import('pixi/math').Rectangle): boolean; + + equals(other: import('pixi/math').Rectangle): boolean; + + intersection(other: import('pixi/math').Rectangle): import('pixi/math').Rectangle; + intersection(other: import('pixi/math').Rectangle, outRect: T): T; + + union(other: import('pixi/math').Rectangle): import('pixi/math').Rectangle; + union(other: import('pixi/math').Rectangle, outRect: T): T; + } +} + +interface Vector2Math +{ + add(other: import('pixi/math').IPointData): import('pixi/math').Point; + add(other: import('pixi/math').IPointData, outPoint: T): T; + + subtract(other: import('pixi/math').IPointData): import('pixi/math').Point; + subtract(other: import('pixi/math').IPointData, outPoint: T): T; + + multiply(other: import('pixi/math').IPointData): import('pixi/math').Point; + multiply(other: import('pixi/math').IPointData, outPoint: T): T; + + // divide(other: import('pixi/math').IPointData): import('pixi/math').Point; + // divide(other: import('pixi/math').IPointData, outPoint: T): T; + + multiplyScalar(scalar: number): import('pixi/math').Point; + multiplyScalar(scalar: number, outPoint: T): T; + + dot(other: import('pixi/math').IPointData): number; + + cross(other: import('pixi/math').IPointData): number; + + normalize(): import('pixi/math').Point; + normalize(outPoint: T): T; + + magnitude(): number; + + magnitudeSquared(): number; + + project(onto: import('pixi/math').IPointData): import('pixi/math').Point; + project(onto: import('pixi/math').IPointData, outPoint: T): T; + + reflect(normal: import('pixi/math').IPointData): import('pixi/math').Point; + reflect(normal: import('pixi/math').IPointData, outPoint: T): T; +} diff --git a/Typescript/types/pixi/math-extras/index.d.ts b/Typescript/types/pixi/math-extras/index.d.ts new file mode 100644 index 0000000..4c7591a --- /dev/null +++ b/Typescript/types/pixi/math-extras/index.d.ts @@ -0,0 +1,95 @@ +/// + +import type { IPointData } from 'pixi/math'; +import { Point } from 'pixi/math'; + +/** + * The idea of a relative epsilon comparison is to find the difference between the two numbers, + * and see if it is less than `Math.EPSILON`. + * + * _Note: Only available with **@pixi/math-extras**._ + * @param {number} a - First floating number to compare. + * @param {number} b - Second floating number to compare. + * @returns {boolean} Returns `true` if the difference between the values is less than `Math.EPSILON`; otherwise `false`. + */ +export declare function floatEqual(a: number, b: number): boolean; + +/** + * The idea of a relative epsilon comparison is to find the difference between the two numbers, + * and see if it is less than a given epsilon. + * A good epsilon would be the N% of the largest of the two values or `Math.EPSILON`. + * + * _Note: Only available with **@pixi/math-extras**._ + * @memberof PIXI + * @param {number} a - First floating number to compare. + * @param {number} b - Second floating number to compare. + * @param {number} epsilon - The epsilon to compare to. + * The larger the epsilon, the easier for the numbers to be considered equals. + * @returns {boolean} Returns `true` if the difference between the values is less than the given epsilon; + * otherwise `false`. + */ +export declare function floatEqual(a: number, b: number, epsilon: number): boolean; + +/** + * Computes the point where non-coincident and non-parallel Lines intersect. + * Coincident or parallel lines return a `NaN` point `{x: NaN, y: NaN}`. + * The intersection point may land outside the extents of the lines. + * + * _Note: Only available with **@pixi/math-extras**._ + * @param aStart - First point of the first line. + * @param aEnd - Second point of the first line. + * @param bStart - First point of the second line. + * @param bEnd - Second point of the second line. + * @returns {IPointData} The point where the lines intersect. + */ +export declare function lineIntersection(aStart: IPointData, aEnd: IPointData, bStart: IPointData, bEnd: IPointData): Point; + +/** + * Computes the point where non-coincident and non-parallel Lines intersect. + * Coincident or parallel lines return a `NaN` point `{x: NaN, y: NaN}`. + * The intersection point may land outside the extents of the lines. + * + * _Note: Only available with **@pixi/math-extras**._ + * @memberof PIXI + * @param aStart - First point of the first line. + * @param aEnd - Second point of the first line. + * @param bStart - First point of the second line. + * @param bEnd - Second point of the second line. + * @param {IPointData} outPoint - A Point-like object in which to store the value, + * optional (otherwise will create a new Point). + * @returns {IPointData} The point where the lines intersect or a `NaN` Point. + */ +export declare function lineIntersection(aStart: IPointData, aEnd: IPointData, bStart: IPointData, bEnd: IPointData, outPoint: T): T; + +/** + * Computes the point where non-coincident and non-parallel segments intersect. + * Coincident, parallel or non-intersecting segments return a `NaN` point `{x: NaN, y: NaN}`. + * The intersection point must land inside the extents of the segments or return a `NaN` Point. + * + * _Note: Only available with **@pixi/math-extras**._ + * @param aStart - Starting point of the first segment. + * @param aEnd - Ending point of the first segment. + * @param bStart - Starting point of the second segment. + * @param bEnd - Ending point of the second segment. + * @returns {IPointData} The point where the segments intersect. + */ +export declare function segmentIntersection(aStart: IPointData, aEnd: IPointData, bStart: IPointData, bEnd: IPointData): Point; + +/** + * Computes the point where non-coincident and non-parallel segments intersect. + * Coincident, parallel or non-intersecting segments return a `NaN` point `{x: NaN, y: NaN}`. + * The intersection point must land inside the extents of the segments or return a `NaN` Point. + * + * _Note: Only available with **@pixi/math-extras**._ + * @memberof PIXI + * @param aStart - Starting point of the first segment. + * @param aEnd - Ending point of the first segment. + * @param bStart - Starting point of the second segment. + * @param bEnd - Ending point of the second segment. + * @param {IPointData} outPoint - A Point-like object in which to store the value, + * optional (otherwise will create a new Point). + * @returns {IPointData} The point where the segments intersect or a `NaN` Point. + */ +export declare function segmentIntersection(aStart: IPointData, aEnd: IPointData, bStart: IPointData, bEnd: IPointData, outPoint: T): T; + +export { } diff --git a/Typescript/types/pixi/math/global.d.ts b/Typescript/types/pixi/math/global.d.ts new file mode 100644 index 0000000..87946a9 --- /dev/null +++ b/Typescript/types/pixi/math/global.d.ts @@ -0,0 +1,28 @@ +declare namespace GlobalMixins +{ + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface IPointData + { + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface Point + { + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface ObservablePoint + { + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface Rectangle + { + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface Transform + { + } +} diff --git a/Typescript/types/pixi/math/index.d.ts b/Typescript/types/pixi/math/index.d.ts new file mode 100644 index 0000000..6019525 --- /dev/null +++ b/Typescript/types/pixi/math/index.d.ts @@ -0,0 +1,935 @@ +/// + +/** + * The Circle object is used to help draw graphics and can also be used to specify a hit area for displayObjects. + * @memberof PIXI + */ +export declare class Circle { + /** @default 0 */ + x: number; + /** @default 0 */ + y: number; + /** @default 0 */ + radius: number; + /** + * The type of the object, mainly used to avoid `instanceof` checks + * @default PIXI.SHAPES.CIRC + * @see PIXI.SHAPES + */ + readonly type: SHAPES.CIRC; + /** + * @param x - The X coordinate of the center of this circle + * @param y - The Y coordinate of the center of this circle + * @param radius - The radius of the circle + */ + constructor(x?: number, y?: number, radius?: number); + /** + * Creates a clone of this Circle instance + * @returns A copy of the Circle + */ + clone(): Circle; + /** + * Checks whether the x and y coordinates given are contained within this circle + * @param x - The X coordinate of the point to test + * @param y - The Y coordinate of the point to test + * @returns Whether the x/y coordinates are within this Circle + */ + contains(x: number, y: number): boolean; + /** + * Returns the framing rectangle of the circle as a Rectangle object + * @returns The framing rectangle + */ + getBounds(): Rectangle; + toString(): string; +} + +/** + * Conversion factor for converting degrees to radians. + * @static + * @member {number} + * @memberof PIXI + */ +export declare const DEG_TO_RAD: number; + +/** + * The Ellipse object is used to help draw graphics and can also be used to specify a hit area for displayObjects. + * @memberof PIXI + */ +export declare class Ellipse { + /** @default 0 */ + x: number; + /** @default 0 */ + y: number; + /** @default 0 */ + width: number; + /** @default 0 */ + height: number; + /** + * The type of the object, mainly used to avoid `instanceof` checks + * @default PIXI.SHAPES.ELIP + * @see PIXI.SHAPES + */ + readonly type: SHAPES.ELIP; + /** + * @param x - The X coordinate of the center of this ellipse + * @param y - The Y coordinate of the center of this ellipse + * @param halfWidth - The half width of this ellipse + * @param halfHeight - The half height of this ellipse + */ + constructor(x?: number, y?: number, halfWidth?: number, halfHeight?: number); + /** + * Creates a clone of this Ellipse instance + * @returns {PIXI.Ellipse} A copy of the ellipse + */ + clone(): Ellipse; + /** + * Checks whether the x and y coordinates given are contained within this ellipse + * @param x - The X coordinate of the point to test + * @param y - The Y coordinate of the point to test + * @returns Whether the x/y coords are within this ellipse + */ + contains(x: number, y: number): boolean; + /** + * Returns the framing rectangle of the ellipse as a Rectangle object + * @returns The framing rectangle + */ + getBounds(): Rectangle; + toString(): string; +} + +declare type GD8Symmetry = number; + +/** + * Implements the dihedral group D8, which is similar to + * [group D4]{@link http://mathworld.wolfram.com/DihedralGroupD4.html}; + * D8 is the same but with diagonals, and it is used for texture + * rotations. + * + * The directions the U- and V- axes after rotation + * of an angle of `a: GD8Constant` are the vectors `(uX(a), uY(a))` + * and `(vX(a), vY(a))`. These aren't necessarily unit vectors. + * + * **Origin:**
+ * This is the small part of gameofbombs.com portal system. It works. + * @see PIXI.groupD8.E + * @see PIXI.groupD8.SE + * @see PIXI.groupD8.S + * @see PIXI.groupD8.SW + * @see PIXI.groupD8.W + * @see PIXI.groupD8.NW + * @see PIXI.groupD8.N + * @see PIXI.groupD8.NE + * @author Ivan @ivanpopelyshev + * @namespace PIXI.groupD8 + * @memberof PIXI + */ +export declare const groupD8: { + /** + * | Rotation | Direction | + * |----------|-----------| + * | 0° | East | + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + E: number; + /** + * | Rotation | Direction | + * |----------|-----------| + * | 45°↻ | Southeast | + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + SE: number; + /** + * | Rotation | Direction | + * |----------|-----------| + * | 90°↻ | South | + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + S: number; + /** + * | Rotation | Direction | + * |----------|-----------| + * | 135°↻ | Southwest | + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + SW: number; + /** + * | Rotation | Direction | + * |----------|-----------| + * | 180° | West | + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + W: number; + /** + * | Rotation | Direction | + * |-------------|--------------| + * | -135°/225°↻ | Northwest | + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + NW: number; + /** + * | Rotation | Direction | + * |-------------|--------------| + * | -90°/270°↻ | North | + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + N: number; + /** + * | Rotation | Direction | + * |-------------|--------------| + * | -45°/315°↻ | Northeast | + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + NE: number; + /** + * Reflection about Y-axis. + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + MIRROR_VERTICAL: number; + /** + * Reflection about the main diagonal. + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + MAIN_DIAGONAL: number; + /** + * Reflection about X-axis. + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + MIRROR_HORIZONTAL: number; + /** + * Reflection about reverse diagonal. + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + REVERSE_DIAGONAL: number; + /** + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} ind - sprite rotation angle. + * @returns {PIXI.GD8Symmetry} The X-component of the U-axis + * after rotating the axes. + */ + uX: (ind: GD8Symmetry) => GD8Symmetry; + /** + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} ind - sprite rotation angle. + * @returns {PIXI.GD8Symmetry} The Y-component of the U-axis + * after rotating the axes. + */ + uY: (ind: GD8Symmetry) => GD8Symmetry; + /** + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} ind - sprite rotation angle. + * @returns {PIXI.GD8Symmetry} The X-component of the V-axis + * after rotating the axes. + */ + vX: (ind: GD8Symmetry) => GD8Symmetry; + /** + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} ind - sprite rotation angle. + * @returns {PIXI.GD8Symmetry} The Y-component of the V-axis + * after rotating the axes. + */ + vY: (ind: GD8Symmetry) => GD8Symmetry; + /** + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} rotation - symmetry whose opposite + * is needed. Only rotations have opposite symmetries while + * reflections don't. + * @returns {PIXI.GD8Symmetry} The opposite symmetry of `rotation` + */ + inv: (rotation: GD8Symmetry) => GD8Symmetry; + /** + * Composes the two D8 operations. + * + * Taking `^` as reflection: + * + * | | E=0 | S=2 | W=4 | N=6 | E^=8 | S^=10 | W^=12 | N^=14 | + * |-------|-----|-----|-----|-----|------|-------|-------|-------| + * | E=0 | E | S | W | N | E^ | S^ | W^ | N^ | + * | S=2 | S | W | N | E | S^ | W^ | N^ | E^ | + * | W=4 | W | N | E | S | W^ | N^ | E^ | S^ | + * | N=6 | N | E | S | W | N^ | E^ | S^ | W^ | + * | E^=8 | E^ | N^ | W^ | S^ | E | N | W | S | + * | S^=10 | S^ | E^ | N^ | W^ | S | E | N | W | + * | W^=12 | W^ | S^ | E^ | N^ | W | S | E | N | + * | N^=14 | N^ | W^ | S^ | E^ | N | W | S | E | + * + * [This is a Cayley table]{@link https://en.wikipedia.org/wiki/Cayley_table} + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} rotationSecond - Second operation, which + * is the row in the above cayley table. + * @param {PIXI.GD8Symmetry} rotationFirst - First operation, which + * is the column in the above cayley table. + * @returns {PIXI.GD8Symmetry} Composed operation + */ + add: (rotationSecond: GD8Symmetry, rotationFirst: GD8Symmetry) => GD8Symmetry; + /** + * Reverse of `add`. + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} rotationSecond - Second operation + * @param {PIXI.GD8Symmetry} rotationFirst - First operation + * @returns {PIXI.GD8Symmetry} Result + */ + sub: (rotationSecond: GD8Symmetry, rotationFirst: GD8Symmetry) => GD8Symmetry; + /** + * Adds 180 degrees to rotation, which is a commutative + * operation. + * @memberof PIXI.groupD8 + * @param {number} rotation - The number to rotate. + * @returns {number} Rotated number + */ + rotate180: (rotation: number) => number; + /** + * Checks if the rotation angle is vertical, i.e. south + * or north. It doesn't work for reflections. + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} rotation - The number to check. + * @returns {boolean} Whether or not the direction is vertical + */ + isVertical: (rotation: GD8Symmetry) => boolean; + /** + * Approximates the vector `V(dx,dy)` into one of the + * eight directions provided by `groupD8`. + * @memberof PIXI.groupD8 + * @param {number} dx - X-component of the vector + * @param {number} dy - Y-component of the vector + * @returns {PIXI.GD8Symmetry} Approximation of the vector into + * one of the eight symmetries. + */ + byDirection: (dx: number, dy: number) => GD8Symmetry; + /** + * Helps sprite to compensate texture packer rotation. + * @memberof PIXI.groupD8 + * @param {PIXI.Matrix} matrix - sprite world matrix + * @param {PIXI.GD8Symmetry} rotation - The rotation factor to use. + * @param {number} tx - sprite anchoring + * @param {number} ty - sprite anchoring + */ + matrixAppendRotationInv: (matrix: Matrix, rotation: GD8Symmetry, tx?: number, ty?: number) => void; +}; + +export declare interface IPoint extends IPointData { + copyFrom(p: IPointData): this; + copyTo(p: T): T; + equals(p: IPointData): boolean; + set(x?: number, y?: number): void; +} + +export declare interface IPointData extends GlobalMixins.IPointData { + x: number; + y: number; +} + +export declare type IShape = Circle | Ellipse | Polygon | Rectangle | RoundedRectangle; + +export declare interface ISize { + width: number; + height: number; +} + +/** + * The PixiJS Matrix as a class makes it a lot faster. + * + * Here is a representation of it: + * ```js + * | a | c | tx| + * | b | d | ty| + * | 0 | 0 | 1 | + * ``` + * @memberof PIXI + */ +export declare class Matrix { + /** @default 1 */ + a: number; + /** @default 0 */ + b: number; + /** @default 0 */ + c: number; + /** @default 1 */ + d: number; + /** @default 0 */ + tx: number; + /** @default 0 */ + ty: number; + array: Float32Array | null; + /** + * @param a - x scale + * @param b - y skew + * @param c - x skew + * @param d - y scale + * @param tx - x translation + * @param ty - y translation + */ + constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number); + /** + * Creates a Matrix object based on the given array. The Element to Matrix mapping order is as follows: + * + * a = array[0] + * b = array[1] + * c = array[3] + * d = array[4] + * tx = array[2] + * ty = array[5] + * @param array - The array that the matrix will be populated from. + */ + fromArray(array: number[]): void; + /** + * Sets the matrix properties. + * @param a - Matrix component + * @param b - Matrix component + * @param c - Matrix component + * @param d - Matrix component + * @param tx - Matrix component + * @param ty - Matrix component + * @returns This matrix. Good for chaining method calls. + */ + set(a: number, b: number, c: number, d: number, tx: number, ty: number): this; + /** + * Creates an array from the current Matrix object. + * @param transpose - Whether we need to transpose the matrix or not + * @param [out=new Float32Array(9)] - If provided the array will be assigned to out + * @returns The newly created array which contains the matrix + */ + toArray(transpose: boolean, out?: Float32Array): Float32Array; + /** + * Get a new position with the current transformation applied. + * Can be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering) + * @param pos - The origin + * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input) + * @returns {PIXI.Point} The new point, transformed through this matrix + */ + apply

(pos: IPointData, newPos?: P): P; + /** + * Get a new position with the inverse of the current transformation applied. + * Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input) + * @param pos - The origin + * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input) + * @returns {PIXI.Point} The new point, inverse-transformed through this matrix + */ + applyInverse

(pos: IPointData, newPos?: P): P; + /** + * Translates the matrix on the x and y. + * @param x - How much to translate x by + * @param y - How much to translate y by + * @returns This matrix. Good for chaining method calls. + */ + translate(x: number, y: number): this; + /** + * Applies a scale transformation to the matrix. + * @param x - The amount to scale horizontally + * @param y - The amount to scale vertically + * @returns This matrix. Good for chaining method calls. + */ + scale(x: number, y: number): this; + /** + * Applies a rotation transformation to the matrix. + * @param angle - The angle in radians. + * @returns This matrix. Good for chaining method calls. + */ + rotate(angle: number): this; + /** + * Appends the given Matrix to this Matrix. + * @param matrix - The matrix to append. + * @returns This matrix. Good for chaining method calls. + */ + append(matrix: Matrix): this; + /** + * Sets the matrix based on all the available properties + * @param x - Position on the x axis + * @param y - Position on the y axis + * @param pivotX - Pivot on the x axis + * @param pivotY - Pivot on the y axis + * @param scaleX - Scale on the x axis + * @param scaleY - Scale on the y axis + * @param rotation - Rotation in radians + * @param skewX - Skew on the x axis + * @param skewY - Skew on the y axis + * @returns This matrix. Good for chaining method calls. + */ + setTransform(x: number, y: number, pivotX: number, pivotY: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number): this; + /** + * Prepends the given Matrix to this Matrix. + * @param matrix - The matrix to prepend + * @returns This matrix. Good for chaining method calls. + */ + prepend(matrix: Matrix): this; + /** + * Decomposes the matrix (x, y, scaleX, scaleY, and rotation) and sets the properties on to a transform. + * @param transform - The transform to apply the properties to. + * @returns The transform with the newly applied properties + */ + decompose(transform: Transform): Transform; + /** + * Inverts this matrix + * @returns This matrix. Good for chaining method calls. + */ + invert(): this; + /** + * Resets this Matrix to an identity (default) matrix. + * @returns This matrix. Good for chaining method calls. + */ + identity(): this; + /** + * Creates a new Matrix object with the same values as this one. + * @returns A copy of this matrix. Good for chaining method calls. + */ + clone(): Matrix; + /** + * Changes the values of the given matrix to be the same as the ones in this matrix + * @param matrix - The matrix to copy to. + * @returns The matrix given in parameter with its values updated. + */ + copyTo(matrix: Matrix): Matrix; + /** + * Changes the values of the matrix to be the same as the ones in given matrix + * @param {PIXI.Matrix} matrix - The matrix to copy from. + * @returns {PIXI.Matrix} this + */ + copyFrom(matrix: Matrix): this; + toString(): string; + /** + * A default (identity) matrix + * @readonly + */ + static get IDENTITY(): Matrix; + /** + * A temp matrix + * @readonly + */ + static get TEMP_MATRIX(): Matrix; +} + +export declare interface ObservablePoint extends GlobalMixins.Point, IPoint { +} + +/** + * The ObservablePoint object represents a location in a two-dimensional coordinate system, where `x` represents + * the position on the horizontal axis and `y` represents the position on the vertical axis. + * + * An `ObservablePoint` is a point that triggers a callback when the point's position is changed. + * @memberof PIXI + */ +export declare class ObservablePoint implements IPoint { + /** The callback function triggered when `x` and/or `y` are changed */ + cb: (this: T) => any; + /** The owner of the callback */ + scope: any; + _x: number; + _y: number; + /** + * Creates a new `ObservablePoint` + * @param cb - callback function triggered when `x` and/or `y` are changed + * @param scope - owner of callback + * @param {number} [x=0] - position of the point on the x axis + * @param {number} [y=0] - position of the point on the y axis + */ + constructor(cb: (this: T) => any, scope: T, x?: number, y?: number); + /** + * Creates a clone of this point. + * The callback and scope params can be overridden otherwise they will default + * to the clone object's values. + * @override + * @param cb - The callback function triggered when `x` and/or `y` are changed + * @param scope - The owner of the callback + * @returns a copy of this observable point + */ + clone(cb?: (this: T) => any, scope?: any): ObservablePoint; + /** + * Sets the point to a new `x` and `y` position. + * If `y` is omitted, both `x` and `y` will be set to `x`. + * @param {number} [x=0] - position of the point on the x axis + * @param {number} [y=x] - position of the point on the y axis + * @returns The observable point instance itself + */ + set(x?: number, y?: number): this; + /** + * Copies x and y from the given point (`p`) + * @param p - The point to copy from. Can be any of type that is or extends `IPointData` + * @returns The observable point instance itself + */ + copyFrom(p: IPointData): this; + /** + * Copies this point's x and y into that of the given point (`p`) + * @param p - The point to copy to. Can be any of type that is or extends `IPointData` + * @returns The point (`p`) with values updated + */ + copyTo(p: T): T; + /** + * Accepts another point (`p`) and returns `true` if the given point is equal to this point + * @param p - The point to check + * @returns Returns `true` if both `x` and `y` are equal + */ + equals(p: IPointData): boolean; + toString(): string; + /** Position of the observable point on the x axis. */ + get x(): number; + set x(value: number); + /** Position of the observable point on the y axis. */ + get y(): number; + set y(value: number); +} + +/** + * Two Pi. + * @static + * @member {number} + * @memberof PIXI + */ +export declare const PI_2: number; + +export declare interface Point extends GlobalMixins.Point, IPoint { +} + +/** + * The Point object represents a location in a two-dimensional coordinate system, where `x` represents + * the position on the horizontal axis and `y` represents the position on the vertical axis + * @class + * @memberof PIXI + * @implements {IPoint} + */ +export declare class Point implements IPoint { + /** Position of the point on the x axis */ + x: number; + /** Position of the point on the y axis */ + y: number; + /** + * Creates a new `Point` + * @param {number} [x=0] - position of the point on the x axis + * @param {number} [y=0] - position of the point on the y axis + */ + constructor(x?: number, y?: number); + /** + * Creates a clone of this point + * @returns A clone of this point + */ + clone(): Point; + /** + * Copies `x` and `y` from the given point into this point + * @param p - The point to copy from + * @returns The point instance itself + */ + copyFrom(p: IPointData): this; + /** + * Copies this point's x and y into the given point (`p`). + * @param p - The point to copy to. Can be any of type that is or extends `IPointData` + * @returns The point (`p`) with values updated + */ + copyTo(p: T): T; + /** + * Accepts another point (`p`) and returns `true` if the given point is equal to this point + * @param p - The point to check + * @returns Returns `true` if both `x` and `y` are equal + */ + equals(p: IPointData): boolean; + /** + * Sets the point to a new `x` and `y` position. + * If `y` is omitted, both `x` and `y` will be set to `x`. + * @param {number} [x=0] - position of the point on the `x` axis + * @param {number} [y=x] - position of the point on the `y` axis + * @returns The point instance itself + */ + set(x?: number, y?: number): this; + toString(): string; +} + +/** + * A class to define a shape via user defined coordinates. + * @memberof PIXI + */ +export declare class Polygon { + /** An array of the points of this polygon. */ + points: number[]; + /** `false` after moveTo, `true` after `closePath`. In all other cases it is `true`. */ + closeStroke: boolean; + /** + * The type of the object, mainly used to avoid `instanceof` checks + * @default PIXI.SHAPES.POLY + * @see PIXI.SHAPES + */ + readonly type: SHAPES.POLY; + constructor(points: IPointData[] | number[]); + constructor(...points: IPointData[] | number[]); + /** + * Creates a clone of this polygon. + * @returns - A copy of the polygon. + */ + clone(): Polygon; + /** + * Checks whether the x and y coordinates passed to this function are contained within this polygon. + * @param x - The X coordinate of the point to test. + * @param y - The Y coordinate of the point to test. + * @returns - Whether the x/y coordinates are within this polygon. + */ + contains(x: number, y: number): boolean; + toString(): string; +} + +/** + * Conversion factor for converting radians to degrees. + * @static + * @member {number} RAD_TO_DEG + * @memberof PIXI + */ +export declare const RAD_TO_DEG: number; + +export declare interface Rectangle extends GlobalMixins.Rectangle { +} + +/** + * Size object, contains width and height + * @memberof PIXI + * @typedef {object} ISize@typedef {object} ISize + * @property {number} width - Width component + * @property {number} height - Height component + */ +/** + * Rectangle object is an area defined by its position, as indicated by its top-left corner + * point (x, y) and by its width and its height. + * @memberof PIXI + */ +export declare class Rectangle { + /** @default 0 */ + x: number; + /** @default 0 */ + y: number; + /** @default 0 */ + width: number; + /** @default 0 */ + height: number; + /** + * The type of the object, mainly used to avoid `instanceof` checks + * @default PIXI.SHAPES.RECT + * @see PIXI.SHAPES + */ + readonly type: SHAPES.RECT; + /** + * @param x - The X coordinate of the upper-left corner of the rectangle + * @param y - The Y coordinate of the upper-left corner of the rectangle + * @param width - The overall width of the rectangle + * @param height - The overall height of the rectangle + */ + constructor(x?: string | number, y?: string | number, width?: string | number, height?: string | number); + /** Returns the left edge of the rectangle. */ + get left(): number; + /** Returns the right edge of the rectangle. */ + get right(): number; + /** Returns the top edge of the rectangle. */ + get top(): number; + /** Returns the bottom edge of the rectangle. */ + get bottom(): number; + /** A constant empty rectangle. */ + static get EMPTY(): Rectangle; + /** + * Creates a clone of this Rectangle + * @returns a copy of the rectangle + */ + clone(): Rectangle; + /** + * Copies another rectangle to this one. + * @param rectangle - The rectangle to copy from. + * @returns Returns itself. + */ + copyFrom(rectangle: Rectangle): Rectangle; + /** + * Copies this rectangle to another one. + * @param rectangle - The rectangle to copy to. + * @returns Returns given parameter. + */ + copyTo(rectangle: Rectangle): Rectangle; + /** + * Checks whether the x and y coordinates given are contained within this Rectangle + * @param x - The X coordinate of the point to test + * @param y - The Y coordinate of the point to test + * @returns Whether the x/y coordinates are within this Rectangle + */ + contains(x: number, y: number): boolean; + /** + * Determines whether the `other` Rectangle transformed by `transform` intersects with `this` Rectangle object. + * Returns true only if the area of the intersection is >0, this means that Rectangles + * sharing a side are not overlapping. Another side effect is that an arealess rectangle + * (width or height equal to zero) can't intersect any other rectangle. + * @param {Rectangle} other - The Rectangle to intersect with `this`. + * @param {Matrix} transform - The transformation matrix of `other`. + * @returns {boolean} A value of `true` if the transformed `other` Rectangle intersects with `this`; otherwise `false`. + */ + intersects(other: Rectangle, transform?: Matrix): boolean; + /** + * Pads the rectangle making it grow in all directions. + * If paddingY is omitted, both paddingX and paddingY will be set to paddingX. + * @param paddingX - The horizontal padding amount. + * @param paddingY - The vertical padding amount. + * @returns Returns itself. + */ + pad(paddingX?: number, paddingY?: number): this; + /** + * Fits this rectangle around the passed one. + * @param rectangle - The rectangle to fit. + * @returns Returns itself. + */ + fit(rectangle: Rectangle): this; + /** + * Enlarges rectangle that way its corners lie on grid + * @param resolution - resolution + * @param eps - precision + * @returns Returns itself. + */ + ceil(resolution?: number, eps?: number): this; + /** + * Enlarges this rectangle to include the passed rectangle. + * @param rectangle - The rectangle to include. + * @returns Returns itself. + */ + enlarge(rectangle: Rectangle): this; + toString(): string; +} + +/** + * The Rounded Rectangle object is an area that has nice rounded corners, as indicated by its + * top-left corner point (x, y) and by its width and its height and its radius. + * @memberof PIXI + */ +export declare class RoundedRectangle { + /** @default 0 */ + x: number; + /** @default 0 */ + y: number; + /** @default 0 */ + width: number; + /** @default 0 */ + height: number; + /** @default 20 */ + radius: number; + /** + * The type of the object, mainly used to avoid `instanceof` checks + * @default PIXI.SHAPES.RREC + * @see PIXI.SHAPES + */ + readonly type: SHAPES.RREC; + /** + * @param x - The X coordinate of the upper-left corner of the rounded rectangle + * @param y - The Y coordinate of the upper-left corner of the rounded rectangle + * @param width - The overall width of this rounded rectangle + * @param height - The overall height of this rounded rectangle + * @param radius - Controls the radius of the rounded corners + */ + constructor(x?: number, y?: number, width?: number, height?: number, radius?: number); + /** + * Creates a clone of this Rounded Rectangle. + * @returns - A copy of the rounded rectangle. + */ + clone(): RoundedRectangle; + /** + * Checks whether the x and y coordinates given are contained within this Rounded Rectangle + * @param x - The X coordinate of the point to test. + * @param y - The Y coordinate of the point to test. + * @returns - Whether the x/y coordinates are within this Rounded Rectangle. + */ + contains(x: number, y: number): boolean; + toString(): string; +} + +/** + * Constants that identify shapes, mainly to prevent `instanceof` calls. + * @static + * @memberof PIXI + * @enum {number} + * @property {number} POLY Polygon + * @property {number} RECT Rectangle + * @property {number} CIRC Circle + * @property {number} ELIP Ellipse + * @property {number} RREC Rounded Rectangle + */ +export declare enum SHAPES { + POLY = 0, + RECT = 1, + CIRC = 2, + ELIP = 3, + RREC = 4 +} + +export declare interface Transform extends GlobalMixins.Transform { +} + +/** + * Transform that takes care about its versions. + * @memberof PIXI + */ +export declare class Transform { + /** A default (identity) transform. */ + static readonly IDENTITY: Transform; + /** The world transformation matrix. */ + worldTransform: Matrix; + /** The local transformation matrix. */ + localTransform: Matrix; + /** The coordinate of the object relative to the local coordinates of the parent. */ + position: ObservablePoint; + /** The scale factor of the object. */ + scale: ObservablePoint; + /** The pivot point of the displayObject that it rotates around. */ + pivot: ObservablePoint; + /** The skew amount, on the x and y axis. */ + skew: ObservablePoint; + /** The locally unique ID of the parent's world transform used to calculate the current world transformation matrix. */ + _parentID: number; + /** The locally unique ID of the world transform. */ + _worldID: number; + /** The rotation amount. */ + protected _rotation: number; + /** + * The X-coordinate value of the normalized local X axis, + * the first column of the local transformation matrix without a scale. + */ + protected _cx: number; + /** + * The Y-coordinate value of the normalized local X axis, + * the first column of the local transformation matrix without a scale. + */ + protected _sx: number; + /** + * The X-coordinate value of the normalized local Y axis, + * the second column of the local transformation matrix without a scale. + */ + protected _cy: number; + /** + * The Y-coordinate value of the normalized local Y axis, + * the second column of the local transformation matrix without a scale. + */ + protected _sy: number; + /** The locally unique ID of the local transform. */ + protected _localID: number; + /** The locally unique ID of the local transform used to calculate the current local transformation matrix. */ + protected _currentLocalID: number; + constructor(); + /** Called when a value changes. */ + protected onChange(): void; + /** Called when the skew or the rotation changes. */ + protected updateSkew(): void; + toString(): string; + /** Updates the local transformation matrix. */ + updateLocalTransform(): void; + /** + * Updates the local and the world transformation matrices. + * @param parentTransform - The parent transform + */ + updateTransform(parentTransform: Transform): void; + /** + * Decomposes a matrix and sets the transforms properties based on it. + * @param matrix - The matrix to decompose + */ + setFromMatrix(matrix: Matrix): void; + /** The rotation of the object in radians. */ + get rotation(): number; + set rotation(value: number); +} + +export { } diff --git a/Typescript/types/pixi/mesh-extras/global.d.ts b/Typescript/types/pixi/mesh-extras/global.d.ts new file mode 100644 index 0000000..9c54bca --- /dev/null +++ b/Typescript/types/pixi/mesh-extras/global.d.ts @@ -0,0 +1,8 @@ +declare namespace GlobalMixins +{ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface NineSlicePlane + { + + } +} diff --git a/Typescript/types/pixi/mesh-extras/index.d.ts b/Typescript/types/pixi/mesh-extras/index.d.ts new file mode 100644 index 0000000..6a96452 --- /dev/null +++ b/Typescript/types/pixi/mesh-extras/index.d.ts @@ -0,0 +1,255 @@ +/// + +import type { DRAW_MODES } from 'pixi/constants'; +import type { IArrayBuffer } from 'pixi/core'; +import type { IDestroyOptions } from 'pixi/display'; +import type { IPoint } from 'pixi/math'; +import type { ITypedArray } from 'pixi/core'; +import { Mesh } from 'pixi/mesh'; +import { MeshGeometry } from 'pixi/mesh'; +import type { Renderer } from 'pixi/core'; +import { Texture } from 'pixi/core'; + +export declare interface NineSlicePlane extends GlobalMixins.NineSlicePlane { +} + +/** + * The NineSlicePlane allows you to stretch a texture using 9-slice scaling. The corners will remain unscaled (useful + * for buttons with rounded corners for example) and the other areas will be scaled horizontally and or vertically + * + *```js + * let Plane9 = new PIXI.NineSlicePlane(PIXI.Texture.from('BoxWithRoundedCorners.png'), 15, 15, 15, 15); + * ``` + *

+ *      A                          B
+ *    +---+----------------------+---+
+ *  C | 1 |          2           | 3 |
+ *    +---+----------------------+---+
+ *    |   |                      |   |
+ *    | 4 |          5           | 6 |
+ *    |   |                      |   |
+ *    +---+----------------------+---+
+ *  D | 7 |          8           | 9 |
+ *    +---+----------------------+---+
+ *  When changing this objects width and/or height:
+ *     areas 1 3 7 and 9 will remain unscaled.
+ *     areas 2 and 8 will be stretched horizontally
+ *     areas 4 and 6 will be stretched vertically
+ *     area 5 will be stretched both horizontally and vertically
+ * 
+ * @memberof PIXI + */ +export declare class NineSlicePlane extends SimplePlane { + private _origWidth; + private _origHeight; + /** + * The width of the left column (a). + * @private + */ + _leftWidth: number; + /** + * The width of the right column (b) + * @private + */ + _rightWidth: number; + /** + * The height of the top row (c) + * @private + */ + _topHeight: number; + /** + * The height of the bottom row (d) + * @private + */ + _bottomHeight: number; + /** + * @param texture - The texture to use on the NineSlicePlane. + * @param {number} [leftWidth=10] - size of the left vertical bar (A) + * @param {number} [topHeight=10] - size of the top horizontal bar (C) + * @param {number} [rightWidth=10] - size of the right vertical bar (B) + * @param {number} [bottomHeight=10] - size of the bottom horizontal bar (D) + */ + constructor(texture: Texture, leftWidth?: number, topHeight?: number, rightWidth?: number, bottomHeight?: number); + textureUpdated(): void; + get vertices(): ITypedArray; + set vertices(value: ITypedArray); + /** Updates the horizontal vertices. */ + updateHorizontalVertices(): void; + /** Updates the vertical vertices. */ + updateVerticalVertices(): void; + /** + * Returns the smaller of a set of vertical and horizontal scale of nine slice corners. + * @returns Smaller number of vertical and horizontal scale. + */ + private _getMinScale; + /** The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane. */ + get width(): number; + set width(value: number); + /** The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane. */ + get height(): number; + set height(value: number); + /** The width of the left column. */ + get leftWidth(): number; + set leftWidth(value: number); + /** The width of the right column. */ + get rightWidth(): number; + set rightWidth(value: number); + /** The height of the top row. */ + get topHeight(): number; + set topHeight(value: number); + /** The height of the bottom row. */ + get bottomHeight(): number; + set bottomHeight(value: number); + /** Refreshes NineSlicePlane coords. All of them. */ + private _refresh; +} + +/** + * @memberof PIXI + */ +export declare class PlaneGeometry extends MeshGeometry { + segWidth: number; + segHeight: number; + width: number; + height: number; + /** + * @param width - The width of the plane. + * @param height - The height of the plane. + * @param segWidth - Number of horizontal segments. + * @param segHeight - Number of vertical segments. + */ + constructor(width?: number, height?: number, segWidth?: number, segHeight?: number); + /** + * Refreshes plane coordinates + * @private + */ + build(): void; +} + +/** + * RopeGeometry allows you to draw a geometry across several points and then manipulate these points. + * + * ```js + * for (let i = 0; i < 20; i++) { + * points.push(new PIXI.Point(i * 50, 0)); + * }; + * const rope = new PIXI.RopeGeometry(100, points); + * ``` + * @memberof PIXI + */ +export declare class RopeGeometry extends MeshGeometry { + /** An array of points that determine the rope. */ + points: IPoint[]; + /** Rope texture scale, if zero then the rope texture is stretched. */ + readonly textureScale: number; + /** + * The width (i.e., thickness) of the rope. + * @readonly + */ + _width: number; + /** + * @param width - The width (i.e., thickness) of the rope. + * @param points - An array of {@link PIXI.Point} objects to construct this rope. + * @param textureScale - By default the rope texture will be stretched to match + * rope length. If textureScale is positive this value will be treated as a scaling + * factor and the texture will preserve its aspect ratio instead. To create a tiling rope + * set baseTexture.wrapMode to {@link PIXI.WRAP_MODES.REPEAT} and use a power of two texture, + * then set textureScale=1 to keep the original texture pixel size. + * In order to reduce alpha channel artifacts provide a larger texture and downsample - + * i.e. set textureScale=0.5 to scale it down twice. + */ + constructor(width: number, points: IPoint[], textureScale?: number); + /** + * The width (i.e., thickness) of the rope. + * @readonly + */ + get width(): number; + /** Refreshes Rope indices and uvs */ + private build; + /** refreshes vertices of Rope mesh */ + updateVertices(): void; + update(): void; +} + +/** + * The Simple Mesh class mimics Mesh in PixiJS v4, providing easy-to-use constructor arguments. + * For more robust customization, use {@link PIXI.Mesh}. + * @memberof PIXI + */ +export declare class SimpleMesh extends Mesh { + /** Upload vertices buffer each frame. */ + autoUpdate: boolean; + /** + * @param texture - The texture to use + * @param {Float32Array} [vertices] - if you want to specify the vertices + * @param {Float32Array} [uvs] - if you want to specify the uvs + * @param {Uint16Array} [indices] - if you want to specify the indices + * @param drawMode - the drawMode, can be any of the Mesh.DRAW_MODES consts + */ + constructor(texture?: Texture, vertices?: IArrayBuffer, uvs?: IArrayBuffer, indices?: IArrayBuffer, drawMode?: DRAW_MODES); + /** + * Collection of vertices data. + * @type {Float32Array} + */ + get vertices(): ITypedArray; + set vertices(value: ITypedArray); + _render(renderer: Renderer): void; +} + +/** + * The SimplePlane allows you to draw a texture across several points and then manipulate these points + * + *```js + * for (let i = 0; i < 20; i++) { + * points.push(new PIXI.Point(i * 50, 0)); + * }; + * let SimplePlane = new PIXI.SimplePlane(PIXI.Texture.from("snake.png"), points); + * ``` + * @memberof PIXI + */ +export declare class SimplePlane extends Mesh { + /** The geometry is automatically updated when the texture size changes. */ + autoResize: boolean; + protected _textureID: number; + /** + * @param texture - The texture to use on the SimplePlane. + * @param verticesX - The number of vertices in the x-axis + * @param verticesY - The number of vertices in the y-axis + */ + constructor(texture: Texture, verticesX?: number, verticesY?: number); + /** + * Method used for overrides, to do something in case texture frame was changed. + * Meshes based on plane can override it and change more details based on texture. + */ + textureUpdated(): void; + set texture(value: Texture); + get texture(): Texture; + _render(renderer: Renderer): void; + destroy(options?: IDestroyOptions | boolean): void; +} + +/** + * The rope allows you to draw a texture across several points and then manipulate these points + * + *```js + * for (let i = 0; i < 20; i++) { + * points.push(new PIXI.Point(i * 50, 0)); + * }; + * let rope = new PIXI.SimpleRope(PIXI.Texture.from("snake.png"), points); + * ``` + * @memberof PIXI + */ +export declare class SimpleRope extends Mesh { + autoUpdate: boolean; + /** + * @param texture - The texture to use on the rope. + * @param points - An array of {@link PIXI.Point} objects to construct this rope. + * @param {number} textureScale - Optional. Positive values scale rope texture + * keeping its aspect ratio. You can reduce alpha channel artifacts by providing a larger texture + * and downsampling here. If set to zero, texture will be stretched instead. + */ + constructor(texture: Texture, points: IPoint[], textureScale?: number); + _render(renderer: Renderer): void; +} + +export { } diff --git a/Typescript/types/pixi/mesh/global.d.ts b/Typescript/types/pixi/mesh/global.d.ts new file mode 100644 index 0000000..5277138 --- /dev/null +++ b/Typescript/types/pixi/mesh/global.d.ts @@ -0,0 +1,14 @@ +declare namespace GlobalMixins +{ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface Mesh + { + + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface MeshMaterial + { + + } +} diff --git a/Typescript/types/pixi/mesh/index.d.ts b/Typescript/types/pixi/mesh/index.d.ts new file mode 100644 index 0000000..92e06d2 --- /dev/null +++ b/Typescript/types/pixi/mesh/index.d.ts @@ -0,0 +1,308 @@ +/// + +import type { BLEND_MODES } from 'pixi/constants'; +import type { Buffer as Buffer_2 } from 'pixi/core'; +import { Container } from 'pixi/display'; +import type { Dict } from 'pixi/utils'; +import { DRAW_MODES } from 'pixi/constants'; +import { Geometry } from 'pixi/core'; +import type { IArrayBuffer } from 'pixi/core'; +import type { IDestroyOptions } from 'pixi/display'; +import type { IPointData } from 'pixi/math'; +import { Program } from 'pixi/core'; +import type { Renderer } from 'pixi/core'; +import { Shader } from 'pixi/core'; +import { State } from 'pixi/core'; +import type { Texture } from 'pixi/core'; +import { TextureMatrix } from 'pixi/core'; + +export declare interface IMeshMaterialOptions { + alpha?: number; + tint?: number; + pluginName?: string; + program?: Program; + uniforms?: Dict; +} + +export declare interface Mesh extends GlobalMixins.Mesh { +} + +/** + * Base mesh class. + * + * This class empowers you to have maximum flexibility to render any kind of WebGL visuals you can think of. + * This class assumes a certain level of WebGL knowledge. + * If you know a bit this should abstract enough away to make your life easier! + * + * Pretty much ALL WebGL can be broken down into the following: + * - Geometry - The structure and data for the mesh. This can include anything from positions, uvs, normals, colors etc.. + * - Shader - This is the shader that PixiJS will render the geometry with (attributes in the shader must match the geometry) + * - State - This is the state of WebGL required to render the mesh. + * + * Through a combination of the above elements you can render anything you want, 2D or 3D! + * @memberof PIXI + */ +export declare class Mesh extends Container { + /** + * Represents the vertex and fragment shaders that processes the geometry and runs on the GPU. + * Can be shared between multiple Mesh objects. + * @type {PIXI.Shader|PIXI.MeshMaterial} + */ + shader: T; + /** + * Represents the WebGL state the Mesh required to render, excludes shader and geometry. E.g., + * blend mode, culling, depth testing, direction of rendering triangles, backface, etc. + */ + state: State; + /** The way the Mesh should be drawn, can be any of the {@link PIXI.DRAW_MODES} constants. */ + drawMode: DRAW_MODES; + /** + * Typically the index of the IndexBuffer where to start drawing. + * @default 0 + */ + start: number; + /** + * How much of the geometry to draw, by default `0` renders everything. + * @default 0 + */ + size: number; + private _geometry; + /** This is the caching layer used by the batcher. */ + private vertexData; + /** If geometry is changed used to decide to re-transform the vertexData. */ + private vertexDirty; + private _transformID; + /** Internal roundPixels field. */ + private _roundPixels; + /** Batched UV's are cached for atlas textures. */ + private batchUvs; + /** + * These are used as easy access for batching. + * @private + */ + uvs: Float32Array; + /** + * These are used as easy access for batching. + * @private + */ + indices: Uint16Array; + _tintRGB: number; + _texture: Texture; + /** + * @param geometry - The geometry the mesh will use. + * @param {PIXI.MeshMaterial} shader - The shader the mesh will use. + * @param state - The state that the WebGL context is required to be in to render the mesh + * if no state is provided, uses {@link PIXI.State.for2d} to create a 2D state for PixiJS. + * @param drawMode - The drawMode, can be any of the {@link PIXI.DRAW_MODES} constants. + */ + constructor(geometry: Geometry, shader: T, state?: State, drawMode?: DRAW_MODES); + /** + * Includes vertex positions, face indices, normals, colors, UVs, and + * custom attributes within buffers, reducing the cost of passing all + * this data to the GPU. Can be shared between multiple Mesh objects. + */ + get geometry(): Geometry; + set geometry(value: Geometry); + /** + * To change mesh uv's, change its uvBuffer data and increment its _updateID. + * @readonly + */ + get uvBuffer(): Buffer_2; + /** + * To change mesh vertices, change its uvBuffer data and increment its _updateID. + * Incrementing _updateID is optional because most of Mesh objects do it anyway. + * @readonly + */ + get verticesBuffer(): Buffer_2; + /** Alias for {@link PIXI.Mesh#shader}. */ + set material(value: T); + get material(): T; + /** + * The blend mode to be applied to the Mesh. Apply a value of + * `PIXI.BLEND_MODES.NORMAL` to reset the blend mode. + * @default PIXI.BLEND_MODES.NORMAL; + */ + set blendMode(value: BLEND_MODES); + get blendMode(): BLEND_MODES; + /** + * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation. + * Advantages can include sharper image quality (like text) and faster rendering on canvas. + * The main disadvantage is movement of objects may appear less smooth. + * To set the global default, change {@link PIXI.settings.ROUND_PIXELS} + * @default false + */ + set roundPixels(value: boolean); + get roundPixels(): boolean; + /** + * The multiply tint applied to the Mesh. This is a hex value. A value of + * `0xFFFFFF` will remove any tint effect. + * + * Null for non-MeshMaterial shaders + * @default 0xFFFFFF + */ + get tint(): number; + set tint(value: number); + /** The texture that the Mesh uses. Null for non-MeshMaterial shaders */ + get texture(): Texture; + set texture(value: Texture); + /** + * Standard renderer draw. + * @param renderer - Instance to renderer. + */ + protected _render(renderer: Renderer): void; + /** + * Standard non-batching way of rendering. + * @param renderer - Instance to renderer. + */ + protected _renderDefault(renderer: Renderer): void; + /** + * Rendering by using the Batch system. + * @param renderer - Instance to renderer. + */ + protected _renderToBatch(renderer: Renderer): void; + /** Updates vertexData field based on transform and vertices. */ + calculateVertices(): void; + /** Updates uv field based on from geometry uv's or batchUvs. */ + calculateUvs(): void; + /** + * Updates the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account. + * there must be a aVertexPosition attribute present in the geometry for bounds to be calculated correctly. + */ + protected _calculateBounds(): void; + /** + * Tests if a point is inside this mesh. Works only for PIXI.DRAW_MODES.TRIANGLES. + * @param point - The point to test. + * @returns - The result of the test. + */ + containsPoint(point: IPointData): boolean; + destroy(options?: IDestroyOptions | boolean): void; + /** The maximum number of vertices to consider batchable. Generally, the complexity of the geometry. */ + static BATCHABLE_SIZE: number; +} + +/** + * Class controls cache for UV mapping from Texture normal space to BaseTexture normal space. + * @memberof PIXI + */ +export declare class MeshBatchUvs { + /** UV Buffer data. */ + readonly data: Float32Array; + /** Buffer with normalized UV's. */ + uvBuffer: Buffer_2; + /** Material UV matrix. */ + uvMatrix: TextureMatrix; + private _bufferUpdateId; + private _textureUpdateId; + _updateID: number; + /** + * @param uvBuffer - Buffer with normalized uv's + * @param uvMatrix - Material UV matrix + */ + constructor(uvBuffer: Buffer_2, uvMatrix: TextureMatrix); + /** + * Updates + * @param forceUpdate - force the update + */ + update(forceUpdate?: boolean): void; +} + +/** + * Standard 2D geometry used in PixiJS. + * + * Geometry can be defined without passing in a style or data if required. + * + * ```js + * const geometry = new PIXI.Geometry(); + * + * geometry.addAttribute('positions', [0, 0, 100, 0, 100, 100, 0, 100], 2); + * geometry.addAttribute('uvs', [0,0,1,0,1,1,0,1], 2); + * geometry.addIndex([0,1,2,1,3,2]); + * + * ``` + * @memberof PIXI + */ +export declare class MeshGeometry extends Geometry { + /** + * Dirty flag to limit update calls on Mesh. For example, + * limiting updates on a single Mesh instance with a shared Geometry + * within the render loop. + * @private + * @default -1 + */ + _updateId: number; + /** + * @param {Float32Array|number[]} [vertices] - Positional data on geometry. + * @param {Float32Array|number[]} [uvs] - Texture UVs. + * @param {Uint16Array|number[]} [index] - IndexBuffer + */ + constructor(vertices?: IArrayBuffer, uvs?: IArrayBuffer, index?: IArrayBuffer); + /** + * If the vertex position is updated. + * @readonly + * @private + */ + get vertexDirtyId(): number; +} + +export declare interface MeshMaterial extends GlobalMixins.MeshMaterial { +} + +/** + * Slightly opinionated default shader for PixiJS 2D objects. + * @memberof PIXI + */ +export declare class MeshMaterial extends Shader { + /** + * TextureMatrix instance for this Mesh, used to track Texture changes. + * @readonly + */ + readonly uvMatrix: TextureMatrix; + /** + * `true` if shader can be batch with the renderer's batch system. + * @default true + */ + batchable: boolean; + /** + * Renderer plugin for batching. + * @default 'batch' + */ + pluginName: string; + _tintRGB: number; + /** + * Only do update if tint or alpha changes. + * @private + * @default false + */ + private _colorDirty; + private _alpha; + private _tint; + /** + * @param uSampler - Texture that material uses to render. + * @param options - Additional options + * @param {number} [options.alpha=1] - Default alpha. + * @param {number} [options.tint=0xFFFFFF] - Default tint. + * @param {string} [options.pluginName='batch'] - Renderer plugin for batching. + * @param {PIXI.Program} [options.program=0xFFFFFF] - Custom program. + * @param {object} [options.uniforms] - Custom uniforms. + */ + constructor(uSampler: Texture, options?: IMeshMaterialOptions); + /** Reference to the texture being rendered. */ + get texture(): Texture; + set texture(value: Texture); + /** + * This gets automatically set by the object using this. + * @default 1 + */ + set alpha(value: number); + get alpha(): number; + /** + * Multiply tint for the material. + * @default 0xFFFFFF + */ + set tint(value: number); + get tint(): number; + /** Gets called automatically by the Mesh. Intended to be overridden for custom {@link MeshMaterial} objects. */ + update(): void; +} + +export { } diff --git a/Typescript/types/pixi/mixin-cache-as-bitmap/global.d.ts b/Typescript/types/pixi/mixin-cache-as-bitmap/global.d.ts new file mode 100644 index 0000000..1a9e3a1 --- /dev/null +++ b/Typescript/types/pixi/mixin-cache-as-bitmap/global.d.ts @@ -0,0 +1,21 @@ +declare namespace GlobalMixins +{ + interface DisplayObject + { + cacheAsBitmap: boolean; + cacheAsBitmapResolution: number; + cacheAsBitmapMultisample: import('pixi/constants').MSAA_QUALITY; + _cacheAsBitmapResolution: number; + _cacheAsBitmapMultisample: import('pixi/constants').MSAA_QUALITY; + _cacheAsBitmap: boolean; + _cacheData: import('pixi/mixin-cache-as-bitmap').CacheData; + _renderCached(renderer: import('pixi/core').Renderer): void; + _initCachedDisplayObject(renderer: import('pixi/core').Renderer): void; + _calculateCachedBounds(): void; + _getCachedLocalBounds(): import('pixi/math').Rectangle; + _renderCachedCanvas(renderer: import('pixi/core').AbstractRenderer): void; + _initCachedDisplayObjectCanvas(renderer: import('pixi/core').AbstractRenderer): void; + _destroyCachedDisplayObject(): void; + _cacheAsBitmapDestroy(options?: import('pixi/display').IDestroyOptions | boolean): void; + } +} diff --git a/Typescript/types/pixi/mixin-cache-as-bitmap/index.d.ts b/Typescript/types/pixi/mixin-cache-as-bitmap/index.d.ts new file mode 100644 index 0000000..327a624 --- /dev/null +++ b/Typescript/types/pixi/mixin-cache-as-bitmap/index.d.ts @@ -0,0 +1,32 @@ +/// + +import type { AbstractRenderer } from 'pixi/core'; +import type { Container } from 'pixi/display'; +import type { IDestroyOptions } from 'pixi/display'; +import type { IPointData } from 'pixi/math'; +import type { MaskData } from 'pixi/core'; +import type { Rectangle } from 'pixi/math'; +import type { Renderer } from 'pixi/core'; +import { Sprite } from 'pixi/sprite'; + +/** + * @class + * @ignore + * @private + */ +export declare class CacheData { + textureCacheId: string; + originalRender: (renderer: Renderer) => void; + originalRenderCanvas: (renderer: AbstractRenderer) => void; + originalCalculateBounds: () => void; + originalGetLocalBounds: (rect?: Rectangle) => Rectangle; + originalUpdateTransform: () => void; + originalDestroy: (options?: IDestroyOptions | boolean) => void; + originalMask: Container | MaskData; + originalFilterArea: Rectangle; + originalContainsPoint: (point: IPointData) => boolean; + sprite: Sprite; + constructor(); +} + +export { } diff --git a/Typescript/types/pixi/mixin-get-child-by-name/global.d.ts b/Typescript/types/pixi/mixin-get-child-by-name/global.d.ts new file mode 100644 index 0000000..db1bdb8 --- /dev/null +++ b/Typescript/types/pixi/mixin-get-child-by-name/global.d.ts @@ -0,0 +1,15 @@ +declare namespace GlobalMixins +{ + interface DisplayObject + { + name: string; + } + + interface Container + { + getChildByName( + name: string, + deep?: boolean, + ): T; + } +} diff --git a/Typescript/types/pixi/mixin-get-child-by-name/index.d.ts b/Typescript/types/pixi/mixin-get-child-by-name/index.d.ts new file mode 100644 index 0000000..505f4e8 --- /dev/null +++ b/Typescript/types/pixi/mixin-get-child-by-name/index.d.ts @@ -0,0 +1,3 @@ +/// + +export { } diff --git a/Typescript/types/pixi/mixin-get-global-position/global.d.ts b/Typescript/types/pixi/mixin-get-global-position/global.d.ts new file mode 100644 index 0000000..786dd1d --- /dev/null +++ b/Typescript/types/pixi/mixin-get-global-position/global.d.ts @@ -0,0 +1,7 @@ +declare namespace GlobalMixins +{ + interface DisplayObject + { + getGlobalPosition(point?: import('pixi/math').Point, skipUpdate?: boolean): import('pixi/math').Point; + } +} diff --git a/Typescript/types/pixi/mixin-get-global-position/index.d.ts b/Typescript/types/pixi/mixin-get-global-position/index.d.ts new file mode 100644 index 0000000..505f4e8 --- /dev/null +++ b/Typescript/types/pixi/mixin-get-global-position/index.d.ts @@ -0,0 +1,3 @@ +/// + +export { } diff --git a/Typescript/types/pixi/particle-container/index.d.ts b/Typescript/types/pixi/particle-container/index.d.ts new file mode 100644 index 0000000..17cb20e --- /dev/null +++ b/Typescript/types/pixi/particle-container/index.d.ts @@ -0,0 +1,303 @@ +import type { BaseTexture } from 'pixi/core'; +import { BLEND_MODES } from 'pixi/constants'; +import { Buffer as Buffer_2 } from 'pixi/core'; +import { Container } from 'pixi/display'; +import type { ExtensionMetadata } from 'pixi/core'; +import { Geometry } from 'pixi/core'; +import type { IDestroyOptions } from 'pixi/display'; +import { Matrix } from 'pixi/math'; +import { ObjectRenderer } from 'pixi/core'; +import type { Renderer } from 'pixi/core'; +import { Shader } from 'pixi/core'; +import type { Sprite } from 'pixi/sprite'; +import { State } from 'pixi/core'; +import { TYPES } from 'pixi/constants'; + +export declare interface IParticleProperties { + vertices?: boolean; + position?: boolean; + rotation?: boolean; + uvs?: boolean; + tint?: boolean; + alpha?: boolean; + scale?: boolean; +} + +export declare interface IParticleRendererProperty { + attributeName: string; + size: number; + type?: TYPES; + uploadFunction: (...params: any[]) => any; + offset: number; +} + +/** + * The particle buffer manages the static and dynamic buffers for a particle container. + * @private + * @memberof PIXI + */ +declare class ParticleBuffer { + geometry: Geometry; + staticStride: number; + staticBuffer: Buffer_2; + staticData: Float32Array; + staticDataUint32: Uint32Array; + dynamicStride: number; + dynamicBuffer: Buffer_2; + dynamicData: Float32Array; + dynamicDataUint32: Uint32Array; + _updateID: number; + /** Holds the indices of the geometry (quads) to draw. */ + indexBuffer: Buffer_2; + /** The number of particles the buffer can hold. */ + private size; + /** A list of the properties that are dynamic. */ + private dynamicProperties; + /** A list of the properties that are static. */ + private staticProperties; + /** + * @param {object} properties - The properties to upload. + * @param {boolean[]} dynamicPropertyFlags - Flags for which properties are dynamic. + * @param {number} size - The size of the batch. + */ + constructor(properties: IParticleRendererProperty[], dynamicPropertyFlags: boolean[], size: number); + /** Sets up the renderer context and necessary buffers. */ + private initBuffers; + /** + * Uploads the dynamic properties. + * @param children - The children to upload. + * @param startIndex - The index to start at. + * @param amount - The number to upload. + */ + uploadDynamic(children: Sprite[], startIndex: number, amount: number): void; + /** + * Uploads the static properties. + * @param children - The children to upload. + * @param startIndex - The index to start at. + * @param amount - The number to upload. + */ + uploadStatic(children: Sprite[], startIndex: number, amount: number): void; + /** Destroys the ParticleBuffer. */ + destroy(): void; +} + +/** + * The ParticleContainer class is a really fast version of the Container built solely for speed, + * so use when you need a lot of sprites or particles. + * + * The tradeoff of the ParticleContainer is that most advanced functionality will not work. + * ParticleContainer implements the basic object transform (position, scale, rotation) + * and some advanced functionality like tint (as of v4.5.6). + * + * Other more advanced functionality like masking, children, filters, etc will not work on sprites in this batch. + * + * It's extremely easy to use: + * ```js + * let container = new ParticleContainer(); + * + * for (let i = 0; i < 100; ++i) + * { + * let sprite = PIXI.Sprite.from("myImage.png"); + * container.addChild(sprite); + * } + * ``` + * + * And here you have a hundred sprites that will be rendered at the speed of light. + * @memberof PIXI + */ +export declare class ParticleContainer extends Container { + /** + * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL` + * to reset the blend mode. + * @default PIXI.BLEND_MODES.NORMAL + */ + blendMode: BLEND_MODES; + /** + * If true, container allocates more batches in case there are more than `maxSize` particles. + * @default false + */ + autoResize: boolean; + /** + * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation. + * Advantages can include sharper image quality (like text) and faster rendering on canvas. + * The main disadvantage is movement of objects may appear less smooth. + * Default to true here as performance is usually the priority for particles. + * @default true + */ + roundPixels: boolean; + /** + * The texture used to render the children. + * @readonly + */ + baseTexture: BaseTexture; + tintRgb: Float32Array; + /** @private */ + _maxSize: number; + /** @private */ + _buffers: ParticleBuffer[]; + /** @private */ + _batchSize: number; + /** + * Set properties to be dynamic (true) / static (false). + * @private + */ + _properties: boolean[]; + /** + * For every batch, stores _updateID corresponding to the last change in that batch. + * @private + */ + _bufferUpdateIDs: number[]; + /** + * When child inserted, removed or changes position this number goes up. + * @private + */ + _updateID: number; + /** + * The tint applied to the container. + * This is a hex value. A value of 0xFFFFFF will remove any tint effect. + * @default 0xFFFFFF + */ + private _tint; + /** + * @param maxSize - The maximum number of particles that can be rendered by the container. + * Affects size of allocated buffers. + * @param properties - The properties of children that should be uploaded to the gpu and applied. + * @param {boolean} [properties.vertices=false] - When true, vertices be uploaded and applied. + * if sprite's ` scale/anchor/trim/frame/orig` is dynamic, please set `true`. + * @param {boolean} [properties.position=true] - When true, position be uploaded and applied. + * @param {boolean} [properties.rotation=false] - When true, rotation be uploaded and applied. + * @param {boolean} [properties.uvs=false] - When true, uvs be uploaded and applied. + * @param {boolean} [properties.tint=false] - When true, alpha and tint be uploaded and applied. + * @param {number} [batchSize=16384] - Number of particles per batch. If less than maxSize, it uses maxSize instead. + * @param {boolean} [autoResize=false] - If true, container allocates more batches in case + * there are more than `maxSize` particles. + */ + constructor(maxSize?: number, properties?: IParticleProperties, batchSize?: number, autoResize?: boolean); + /** + * Sets the private properties array to dynamic / static based on the passed properties object + * @param properties - The properties to be uploaded + */ + setProperties(properties: IParticleProperties): void; + updateTransform(): void; + /** + * The tint applied to the container. This is a hex value. + * A value of 0xFFFFFF will remove any tint effect. + * IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer. + * @default 0xFFFFFF + */ + get tint(): number; + set tint(value: number); + /** + * Renders the container using the WebGL renderer. + * @param renderer - The WebGL renderer. + */ + render(renderer: Renderer): void; + /** + * Set the flag that static data should be updated to true + * @param smallestChildIndex - The smallest child index. + */ + protected onChildrenChange(smallestChildIndex: number): void; + dispose(): void; + /** + * Destroys the container + * @param options - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their + * destroy method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the texture of the child sprite + * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the base texture of the child sprite + */ + destroy(options?: IDestroyOptions | boolean): void; +} + +/** + * Renderer for Particles that is designer for speed over feature set. + * @memberof PIXI + */ +export declare class ParticleRenderer extends ObjectRenderer { + /** @ignore */ + static extension: ExtensionMetadata; + /** The WebGL state in which this renderer will work. */ + readonly state: State; + /** The default shader that is used if a sprite doesn't have a more specific one. */ + shader: Shader; + tempMatrix: Matrix; + properties: IParticleRendererProperty[]; + /** + * @param renderer - The renderer this sprite batch works for. + */ + constructor(renderer: Renderer); + /** + * Renders the particle container object. + * @param container - The container to render using this ParticleRenderer. + */ + render(container: ParticleContainer): void; + /** + * Creates one particle buffer for each child in the container we want to render and updates internal properties. + * @param container - The container to render using this ParticleRenderer + * @returns - The buffers + */ + private generateBuffers; + /** + * Creates one more particle buffer, because container has autoResize feature. + * @param container - The container to render using this ParticleRenderer + * @returns - The generated buffer + */ + private _generateOneMoreBuffer; + /** + * Uploads the vertices. + * @param children - the array of sprites to render + * @param startIndex - the index to start from in the children array + * @param amount - the amount of children that will have their vertices uploaded + * @param array - The vertices to upload. + * @param stride - Stride to use for iteration. + * @param offset - Offset to start at. + */ + uploadVertices(children: Sprite[], startIndex: number, amount: number, array: number[], stride: number, offset: number): void; + /** + * Uploads the position. + * @param children - the array of sprites to render + * @param startIndex - the index to start from in the children array + * @param amount - the amount of children that will have their positions uploaded + * @param array - The vertices to upload. + * @param stride - Stride to use for iteration. + * @param offset - Offset to start at. + */ + uploadPosition(children: Sprite[], startIndex: number, amount: number, array: number[], stride: number, offset: number): void; + /** + * Uploads the rotation. + * @param children - the array of sprites to render + * @param startIndex - the index to start from in the children array + * @param amount - the amount of children that will have their rotation uploaded + * @param array - The vertices to upload. + * @param stride - Stride to use for iteration. + * @param offset - Offset to start at. + */ + uploadRotation(children: Sprite[], startIndex: number, amount: number, array: number[], stride: number, offset: number): void; + /** + * Uploads the UVs. + * @param children - the array of sprites to render + * @param startIndex - the index to start from in the children array + * @param amount - the amount of children that will have their rotation uploaded + * @param array - The vertices to upload. + * @param stride - Stride to use for iteration. + * @param offset - Offset to start at. + */ + uploadUvs(children: Sprite[], startIndex: number, amount: number, array: number[], stride: number, offset: number): void; + /** + * Uploads the tint. + * @param children - the array of sprites to render + * @param startIndex - the index to start from in the children array + * @param amount - the amount of children that will have their rotation uploaded + * @param array - The vertices to upload. + * @param stride - Stride to use for iteration. + * @param offset - Offset to start at. + */ + uploadTint(children: Sprite[], startIndex: number, amount: number, array: number[], stride: number, offset: number): void; + /** Destroys the ParticleRenderer. */ + destroy(): void; +} + +export { } diff --git a/Typescript/types/pixi/polyfill/index.d.ts b/Typescript/types/pixi/polyfill/index.d.ts new file mode 100644 index 0000000..f0a766d --- /dev/null +++ b/Typescript/types/pixi/polyfill/index.d.ts @@ -0,0 +1 @@ +export { } diff --git a/Typescript/types/pixi/prepare/index.d.ts b/Typescript/types/pixi/prepare/index.d.ts new file mode 100644 index 0000000..10342b7 --- /dev/null +++ b/Typescript/types/pixi/prepare/index.d.ts @@ -0,0 +1,232 @@ +import type { AbstractRenderer } from 'pixi/core'; +import { BaseTexture } from 'pixi/core'; +import { Container } from 'pixi/display'; +import type { DisplayObject } from 'pixi/display'; +import type { ExtensionMetadata } from 'pixi/core'; +import type { Renderer } from 'pixi/core'; +import { TextStyle } from 'pixi/text'; +import { Texture } from 'pixi/core'; + +/** + * The prepare manager provides functionality to upload content to the GPU. + * + * BasePrepare handles basic queuing functionality and is extended by + * {@link PIXI.Prepare} and {@link PIXI.CanvasPrepare} + * to provide preparation capabilities specific to their respective renderers. + * @example + * // Create a sprite + * const sprite = PIXI.Sprite.from('something.png'); + * + * // Load object into GPU + * app.renderer.plugins.prepare.upload(sprite, () => { + * + * //Texture(s) has been uploaded to GPU + * app.stage.addChild(sprite); + * + * }) + * @abstract + * @memberof PIXI + */ +export declare class BasePrepare { + /** + * The limiter to be used to control how quickly items are prepared. + * @type {PIXI.CountLimiter|PIXI.TimeLimiter} + */ + private limiter; + /** Reference to the renderer. */ + protected renderer: AbstractRenderer; + /** + * The only real difference between CanvasPrepare and Prepare is what they pass + * to upload hooks. That different parameter is stored here. + */ + protected uploadHookHelper: any; + /** Collection of items to uploads at once. */ + protected queue: Array; + /** + * Collection of additional hooks for finding assets. + * @type {Array} + */ + addHooks: Array; + /** + * Collection of additional hooks for processing assets. + * @type {Array} + */ + uploadHooks: Array; + /** + * Callback to call after completed. + * @type {Array} + */ + completes: Array; + /** + * If prepare is ticking (running). + * @type {boolean} + */ + ticking: boolean; + /** + * 'bound' call for prepareItems(). + * @type {Function} + */ + private delayedTick; + /** + * @param {PIXI.AbstractRenderer} renderer - A reference to the current renderer + */ + constructor(renderer: AbstractRenderer); + /** + * Upload all the textures and graphics to the GPU. + * @method PIXI.BasePrepare#upload + * @param {PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text} [item] - + * Container or display object to search for items to upload or the items to upload themselves, + * or optionally ommitted, if items have been added using {@link PIXI.BasePrepare#add `prepare.add`}. + */ + upload(item?: IDisplayObjectExtended | Container | BaseTexture | Texture): Promise; + /** + * Use the Promise-based API instead. + * @method PIXI.BasePrepare#upload + * @deprecated since version 6.5.0 + * @param {PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text} item - + * Item to upload. + * @param {Function} [done] - Callback when completed. + */ + upload(item?: IDisplayObjectExtended | Container | BaseTexture | Texture, done?: () => void): void; + /** + * Use the Promise-based API instead. + * @method PIXI.BasePrepare#upload + * @deprecated since version 6.5.0 + * @param {Function} [done] - Callback when completed. + */ + upload(done?: () => void): void; + /** + * Handle tick update + * @private + */ + tick(): void; + /** + * Actually prepare items. This is handled outside of the tick because it will take a while + * and we do NOT want to block the current animation frame from rendering. + * @private + */ + prepareItems(): void; + /** + * Adds hooks for finding items. + * @param {Function} addHook - Function call that takes two parameters: `item:*, queue:Array` + * function must return `true` if it was able to add item to the queue. + * @returns Instance of plugin for chaining. + */ + registerFindHook(addHook: IFindHook): this; + /** + * Adds hooks for uploading items. + * @param {Function} uploadHook - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and + * function must return `true` if it was able to handle upload of item. + * @returns Instance of plugin for chaining. + */ + registerUploadHook(uploadHook: IUploadHook): this; + /** + * Manually add an item to the uploading queue. + * @param {PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text|*} item - Object to + * add to the queue + * @returns Instance of plugin for chaining. + */ + add(item: IDisplayObjectExtended | Container | BaseTexture | Texture): this; + /** Destroys the plugin, don't use after this. */ + destroy(): void; +} + +/** + * CountLimiter limits the number of items handled by a {@link PIXI.BasePrepare} to a specified + * number of items per frame. + * @memberof PIXI + */ +export declare class CountLimiter { + /** The maximum number of items that can be prepared each frame. */ + maxItemsPerFrame: number; + /** The number of items that can be prepared in the current frame. */ + itemsLeft: number; + /** + * @param maxItemsPerFrame - The maximum number of items that can be prepared each frame. + */ + constructor(maxItemsPerFrame: number); + /** Resets any counting properties to start fresh on a new frame. */ + beginFrame(): void; + /** + * Checks to see if another item can be uploaded. This should only be called once per item. + * @returns If the item is allowed to be uploaded. + */ + allowedToUpload(): boolean; +} + +export declare interface IDisplayObjectExtended extends DisplayObject { + _textures?: Array; + _texture?: Texture; + style?: TextStyle | Partial; +} + +declare interface IFindHook { + (item: any, queue: Array): boolean; +} + +declare interface IUploadHook { + (helper: AbstractRenderer | BasePrepare, item: IDisplayObjectExtended): boolean; +} + +/** + * The prepare plugin provides renderer-specific plugins for pre-rendering DisplayObjects. These plugins are useful for + * asynchronously preparing and uploading to the GPU assets, textures, graphics waiting to be displayed. + * + * Do not instantiate this plugin directly. It is available from the `renderer.plugins` property. + * See {@link PIXI.CanvasRenderer#plugins} or {@link PIXI.Renderer#plugins}. + * @example + * // Create a new application + * const app = new PIXI.Application(); + * document.body.appendChild(app.view); + * + * // Don't start rendering right away + * app.stop(); + * + * // create a display object + * const rect = new PIXI.Graphics() + * .beginFill(0x00ff00) + * .drawRect(40, 40, 200, 200); + * + * // Add to the stage + * app.stage.addChild(rect); + * + * // Don't start rendering until the graphic is uploaded to the GPU + * app.renderer.plugins.prepare.upload(app.stage, () => { + * app.start(); + * }); + * @memberof PIXI + */ +export declare class Prepare extends BasePrepare { + /** @ignore */ + static extension: ExtensionMetadata; + /** + * @param {PIXI.Renderer} renderer - A reference to the current renderer + */ + constructor(renderer: Renderer); +} + +/** + * TimeLimiter limits the number of items handled by a {@link PIXI.BasePrepare} to a specified + * number of milliseconds per frame. + * @memberof PIXI + */ +export declare class TimeLimiter { + /** The maximum milliseconds that can be spent preparing items each frame. */ + maxMilliseconds: number; + /** + * The start time of the current frame. + * @readonly + */ + frameStart: number; + /** @param maxMilliseconds - The maximum milliseconds that can be spent preparing items each frame. */ + constructor(maxMilliseconds: number); + /** Resets any counting properties to start fresh on a new frame. */ + beginFrame(): void; + /** + * Checks to see if another item can be uploaded. This should only be called once per item. + * @returns - If the item is allowed to be uploaded. + */ + allowedToUpload(): boolean; +} + +export { } diff --git a/Typescript/types/pixi/runner/index.d.ts b/Typescript/types/pixi/runner/index.d.ts new file mode 100644 index 0000000..974e8d1 --- /dev/null +++ b/Typescript/types/pixi/runner/index.d.ts @@ -0,0 +1,104 @@ +/** + * A Runner is a highly performant and simple alternative to signals. Best used in situations + * where events are dispatched to many objects at high frequency (say every frame!) + * + * + * like a signal.. + * ``` + * import { Runner } from 'pixi/runner'; + * + * const myObject = { + * loaded: new Runner('loaded') + * } + * + * const listener = { + * loaded: function(){ + * // thin + * } + * } + * + * myObject.loaded.add(listener); + * + * myObject.loaded.emit(); + * ``` + * + * Or for handling calling the same function on many items + * ``` + * import { Runner } from 'pixi/runner'; + * + * const myGame = { + * update: new Runner('update') + * } + * + * const gameObject = { + * update: function(time){ + * // update my gamey state + * } + * } + * + * myGame.update.add(gameObject); + * + * myGame.update.emit(time); + * ``` + * @memberof PIXI + */ +export declare class Runner { + items: any[]; + private _name; + private _aliasCount; + /** + * @param name - The function name that will be executed on the listeners added to this Runner. + */ + constructor(name: string); + /** + * Dispatch/Broadcast Runner to all listeners added to the queue. + * @param {...any} params - (optional) parameters to pass to each listener + */ + emit(a0?: unknown, a1?: unknown, a2?: unknown, a3?: unknown, a4?: unknown, a5?: unknown, a6?: unknown, a7?: unknown): this; + private ensureNonAliasedItems; + /** + * 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. + * + * Eg A listener passed to this Runner will require a 'complete' function. + * + * ``` + * 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: unknown): this; + /** + * Remove a single listener from the dispatch queue. + * @param {any} item - The listener that you would like to remove. + */ + remove(item: unknown): 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: unknown): boolean; + /** Remove all listeners from the Runner */ + removeAll(): this; + /** Remove all references, don't use after this. */ + destroy(): void; + /** + * `true` if there are no this Runner contains no listeners + * @readonly + */ + get empty(): boolean; + /** + * The name of the runner. + * @readonly + */ + get name(): string; +} + +export { } diff --git a/Typescript/types/pixi/settings/index.d.ts b/Typescript/types/pixi/settings/index.d.ts new file mode 100644 index 0000000..07532d2 --- /dev/null +++ b/Typescript/types/pixi/settings/index.d.ts @@ -0,0 +1,127 @@ +import type { ENV } from 'pixi/constants'; +import { GC_MODES } from 'pixi/constants'; +import { MIPMAP_MODES } from 'pixi/constants'; +import { MSAA_QUALITY } from 'pixi/constants'; +import { PRECISION } from 'pixi/constants'; +import { SCALE_MODES } from 'pixi/constants'; +import { WRAP_MODES } from 'pixi/constants'; + +export declare const BrowserAdapter: IAdapter; + +export declare type ContextIds = '2d' | 'webgl' | 'experimental-webgl' | 'webgl2'; + +/** + * This interface describes all the DOM dependent calls that Pixi makes throughout its codebase + * Implementations of this interface can be used to make sure Pixi will work in any environment + * such as browser, web workers, and node + */ +export declare interface IAdapter { + /** Returns a canvas object that can be used to create a webgl context. */ + createCanvas: (width?: number, height?: number) => HTMLCanvasElement; + /** Returns a webgl rendering context. */ + getWebGLRenderingContext: () => typeof WebGLRenderingContext; + /** Returns a partial implementation of the browsers window.navigator */ + getNavigator: () => { + userAgent: string; + }; + /** Returns the current base URL For browser environments this is either the document.baseURI or window.location.href */ + getBaseUrl: () => string; + fetch: (url: RequestInfo, options?: RequestInit) => Promise; +} + +export declare interface IRenderOptions { + view: HTMLCanvasElement; + width: number; + height: number; + autoDensity: boolean; + backgroundColor: number; + backgroundAlpha: number; + useContextAlpha: boolean | 'notMultiplied'; + clearBeforeRender: boolean; + antialias: boolean; + preserveDrawingBuffer: boolean; +} + +export declare interface ISettings { + ADAPTER: IAdapter; + MIPMAP_TEXTURES: MIPMAP_MODES; + ANISOTROPIC_LEVEL: number; + RESOLUTION: number; + FILTER_RESOLUTION: number; + FILTER_MULTISAMPLE: MSAA_QUALITY; + SPRITE_MAX_TEXTURES: number; + SPRITE_BATCH_SIZE: number; + RENDER_OPTIONS: IRenderOptions; + GC_MODE: GC_MODES; + GC_MAX_IDLE: number; + GC_MAX_CHECK_COUNT: number; + WRAP_MODE: WRAP_MODES; + SCALE_MODE: SCALE_MODES; + PRECISION_VERTEX: PRECISION; + PRECISION_FRAGMENT: PRECISION; + CAN_UPLOAD_SAME_BUFFER: boolean; + CREATE_IMAGE_BITMAP: boolean; + ROUND_PIXELS: boolean; + RETINA_PREFIX?: RegExp; + FAIL_IF_MAJOR_PERFORMANCE_CAVEAT?: boolean; + UPLOADS_PER_FRAME?: number; + SORTABLE_CHILDREN?: boolean; + PREFER_ENV?: ENV; + STRICT_TEXTURE_CACHE?: boolean; + MESH_CANVAS_PADDING?: number; + TARGET_FPMS?: number; +} + +export declare const isMobile: isMobileResult; + +declare type isMobileResult = { + apple: { + phone: boolean; + ipod: boolean; + tablet: boolean; + universal: boolean; + device: boolean; + }; + amazon: { + phone: boolean; + tablet: boolean; + device: boolean; + }; + android: { + phone: boolean; + tablet: boolean; + device: boolean; + }; + windows: { + phone: boolean; + tablet: boolean; + device: boolean; + }; + other: { + blackberry: boolean; + blackberry10: boolean; + opera: boolean; + firefox: boolean; + chrome: boolean; + device: boolean; + }; + phone: boolean; + tablet: boolean; + any: boolean; +}; + +/** + * User's customizable globals for overriding the default PIXI settings, such + * as a renderer's default resolution, framerate, float precision, etc. + * @example + * // Use the native window resolution as the default resolution + * // will support high-density displays when rendering + * PIXI.settings.RESOLUTION = window.devicePixelRatio; + * + * // Disable interpolation when scaling, will make texture be pixelated + * PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST; + * @namespace PIXI.settings + */ +export declare const settings: ISettings; + +export { } diff --git a/Typescript/types/pixi/sprite-animated/index.d.ts b/Typescript/types/pixi/sprite-animated/index.d.ts new file mode 100644 index 0000000..ad9baf1 --- /dev/null +++ b/Typescript/types/pixi/sprite-animated/index.d.ts @@ -0,0 +1,181 @@ +import type { IDestroyOptions } from 'pixi/display'; +import { Sprite } from 'pixi/sprite'; +import { Texture } from 'pixi/core'; + +/** + * An AnimatedSprite is a simple way to display an animation depicted by a list of textures. + * + * ```js + * let alienImages = ["image_sequence_01.png","image_sequence_02.png","image_sequence_03.png","image_sequence_04.png"]; + * let textureArray = []; + * + * for (let i=0; i < 4; i++) + * { + * let texture = PIXI.Texture.from(alienImages[i]); + * textureArray.push(texture); + * }; + * + * let animatedSprite = new PIXI.AnimatedSprite(textureArray); + * ``` + * + * The more efficient and simpler way to create an animated sprite is using a {@link PIXI.Spritesheet} + * containing the animation definitions: + * + * ```js + * PIXI.Loader.shared.add("assets/spritesheet.json").load(setup); + * + * function setup() { + * let sheet = PIXI.Loader.shared.resources["assets/spritesheet.json"].spritesheet; + * animatedSprite = new PIXI.AnimatedSprite(sheet.animations["image_sequence"]); + * ... + * } + * ``` + * @memberof PIXI + */ +export declare class AnimatedSprite extends Sprite { + /** + * The speed that the AnimatedSprite will play at. Higher is faster, lower is slower. + * @default 1 + */ + animationSpeed: number; + /** + * Whether or not the animate sprite repeats after playing. + * @default true + */ + loop: boolean; + /** + * Update anchor to [Texture's defaultAnchor]{@link PIXI.Texture#defaultAnchor} when frame changes. + * + * Useful with [sprite sheet animations]{@link PIXI.Spritesheet#animations} created with tools. + * Changing anchor for each frame allows to pin sprite origin to certain moving feature + * of the frame (e.g. left foot). + * + * Note: Enabling this will override any previously set `anchor` on each frame change. + * @default false + */ + updateAnchor: boolean; + /** + * User-assigned function to call when an AnimatedSprite finishes playing. + * @example + * animation.onComplete = function () { + * // finished! + * }; + */ + onComplete?: () => void; + /** + * User-assigned function to call when an AnimatedSprite changes which texture is being rendered. + * @example + * animation.onFrameChange = function () { + * // updated! + * }; + */ + onFrameChange?: (currentFrame: number) => void; + /** + * User-assigned function to call when `loop` is true, and an AnimatedSprite is played and + * loops around to start again. + * @example + * animation.onLoop = function () { + * // looped! + * }; + */ + onLoop?: () => void; + private _playing; + private _textures; + private _durations; + /** + * `true` uses PIXI.Ticker.shared to auto update animation time. + * @default true + */ + private _autoUpdate; + /** + * `true` if the instance is currently connected to PIXI.Ticker.shared to auto update animation time. + * @default false + */ + private _isConnectedToTicker; + /** Elapsed time since animation has been started, used internally to display current texture. */ + private _currentTime; + /** The texture index that was displayed last time. */ + private _previousFrame; + /** + * @param textures - An array of {@link PIXI.Texture} or frame + * objects that make up the animation. + * @param {boolean} [autoUpdate=true] - Whether to use PIXI.Ticker.shared to auto update animation time. + */ + constructor(textures: Texture[] | FrameObject[], autoUpdate?: boolean); + /** Stops the AnimatedSprite. */ + stop(): void; + /** Plays the AnimatedSprite. */ + play(): void; + /** + * Stops the AnimatedSprite and goes to a specific frame. + * @param frameNumber - Frame index to stop at. + */ + gotoAndStop(frameNumber: number): void; + /** + * Goes to a specific frame and begins playing the AnimatedSprite. + * @param frameNumber - Frame index to start at. + */ + gotoAndPlay(frameNumber: number): void; + /** + * Updates the object transform for rendering. + * @param deltaTime - Time since last tick. + */ + update(deltaTime: number): void; + /** Updates the displayed texture to match the current frame index. */ + private updateTexture; + /** + * Stops the AnimatedSprite and destroys it. + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value. + * @param {boolean} [options.children=false] - If set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well. + * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well. + */ + destroy(options?: IDestroyOptions | boolean): void; + /** + * A short hand way of creating an AnimatedSprite from an array of frame ids. + * @param frames - The array of frames ids the AnimatedSprite will use as its texture frames. + * @returns - The new animated sprite with the specified frames. + */ + static fromFrames(frames: string[]): AnimatedSprite; + /** + * A short hand way of creating an AnimatedSprite from an array of image ids. + * @param images - The array of image urls the AnimatedSprite will use as its texture frames. + * @returns The new animate sprite with the specified images as frames. + */ + static fromImages(images: string[]): AnimatedSprite; + /** + * The total number of frames in the AnimatedSprite. This is the same as number of textures + * assigned to the AnimatedSprite. + * @readonly + * @default 0 + */ + get totalFrames(): number; + /** The array of textures used for this AnimatedSprite. */ + get textures(): Texture[] | FrameObject[]; + set textures(value: Texture[] | FrameObject[]); + /** + * The AnimatedSprites current frame index. + * @readonly + */ + get currentFrame(): number; + /** + * Indicates if the AnimatedSprite is currently playing. + * @readonly + */ + get playing(): boolean; + /** Whether to use PIXI.Ticker.shared to auto update animation time. */ + get autoUpdate(): boolean; + set autoUpdate(value: boolean); +} + +/** @memberof PIXI.AnimatedSprite */ +export declare interface FrameObject { + /** The {@link PIXI.Texture} of the frame. */ + texture: Texture; + /** The duration of the frame, in milliseconds. */ + time: number; +} + +export { } diff --git a/Typescript/types/pixi/sprite-tiling/global.d.ts b/Typescript/types/pixi/sprite-tiling/global.d.ts new file mode 100644 index 0000000..ba49ede --- /dev/null +++ b/Typescript/types/pixi/sprite-tiling/global.d.ts @@ -0,0 +1,8 @@ +declare namespace GlobalMixins +{ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface TilingSprite + { + + } +} diff --git a/Typescript/types/pixi/sprite-tiling/index.d.ts b/Typescript/types/pixi/sprite-tiling/index.d.ts new file mode 100644 index 0000000..6ae977f --- /dev/null +++ b/Typescript/types/pixi/sprite-tiling/index.d.ts @@ -0,0 +1,143 @@ +/// + +import type { ExtensionMetadata } from 'pixi/core'; +import type { IBaseTextureOptions } from 'pixi/core'; +import type { IDestroyOptions } from 'pixi/display'; +import type { IPointData } from 'pixi/math'; +import type { ISize } from 'pixi/math'; +import { ObjectRenderer } from 'pixi/core'; +import type { ObservablePoint } from 'pixi/math'; +import { QuadUv } from 'pixi/core'; +import { Rectangle } from 'pixi/math'; +import type { Renderer } from 'pixi/core'; +import { Shader } from 'pixi/core'; +import { Sprite } from 'pixi/sprite'; +import { State } from 'pixi/core'; +import { Texture } from 'pixi/core'; +import { TextureMatrix } from 'pixi/core'; +import type { TextureSource } from 'pixi/core'; +import { Transform } from 'pixi/math'; + +export declare interface TilingSprite extends GlobalMixins.TilingSprite { +} + +/** + * A tiling sprite is a fast way of rendering a tiling image. + * @memberof PIXI + */ +export declare class TilingSprite extends Sprite { + /** Tile transform */ + tileTransform: Transform; + /** Matrix that is applied to UV to get the coords in Texture normalized space to coords in BaseTexture space. */ + uvMatrix: TextureMatrix; + /** + * Flags whether the tiling pattern should originate from the origin instead of the top-left corner in + * local space. + * + * This will make the texture coordinates assigned to each vertex dependent on the value of the anchor. Without + * this, the top-left corner always gets the (0, 0) texture coordinate. + * @default false + */ + uvRespectAnchor: boolean; + /** + * @param texture - The texture of the tiling sprite. + * @param width - The width of the tiling sprite. + * @param height - The height of the tiling sprite. + */ + constructor(texture: Texture, width?: number, height?: number); + /** + * Changes frame clamping in corresponding textureTransform, shortcut + * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas + * @default 0.5 + * @member {number} + */ + get clampMargin(): number; + set clampMargin(value: number); + /** The scaling of the image that is being tiled. */ + get tileScale(): ObservablePoint; + set tileScale(value: IPointData); + /** The offset of the image that is being tiled. */ + get tilePosition(): ObservablePoint; + set tilePosition(value: ObservablePoint); + /** + * @protected + */ + protected _onTextureUpdate(): void; + /** + * Renders the object using the WebGL renderer + * @param renderer - The renderer + */ + protected _render(renderer: Renderer): void; + /** Updates the bounds of the tiling sprite. */ + protected _calculateBounds(): void; + /** + * Gets the local bounds of the sprite object. + * @param rect - Optional output rectangle. + * @returns The bounds. + */ + getLocalBounds(rect?: Rectangle): Rectangle; + /** + * Checks if a point is inside this tiling sprite. + * @param point - The point to check. + * @returns Whether or not the sprite contains the point. + */ + containsPoint(point: IPointData): boolean; + /** + * Destroys this sprite and optionally its texture and children + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well + * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well + */ + destroy(options?: IDestroyOptions | boolean): void; + /** + * Helper function that creates a new tiling sprite based on the source you provide. + * The source can be - frame id, image url, video url, canvas element, video element, base texture + * @static + * @param {string|PIXI.Texture|HTMLCanvasElement|HTMLVideoElement} source - Source to create texture from + * @param {object} options - See {@link PIXI.BaseTexture}'s constructor for options. + * @param {number} options.width - required width of the tiling sprite + * @param {number} options.height - required height of the tiling sprite + * - See {@link PIXI.BaseTexture}'s constructor for options. + * @param {number} options.width - required width of the tiling sprite + * @param {number} options.height - required height of the tiling sprite + * @returns {PIXI.TilingSprite} The newly created texture + */ + static from(source: TextureSource | Texture, options: ISize & IBaseTextureOptions): TilingSprite; + /** The width of the sprite, setting this will actually modify the scale to achieve the value set. */ + get width(): number; + set width(value: number); + /** The height of the TilingSprite, setting this will actually modify the scale to achieve the value set. */ + get height(): number; + set height(value: number); +} + +/** + * WebGL renderer plugin for tiling sprites + * @class + * @memberof PIXI + * @extends PIXI.ObjectRenderer + */ +export declare class TilingSpriteRenderer extends ObjectRenderer { + /** @ignore */ + static extension: ExtensionMetadata; + shader: Shader; + simpleShader: Shader; + quad: QuadUv; + readonly state: State; + /** + * constructor for renderer + * @param {PIXI.Renderer} renderer - The renderer this tiling awesomeness works for. + */ + constructor(renderer: Renderer); + /** Creates shaders when context is initialized. */ + contextChange(): void; + /** + * @param {PIXI.TilingSprite} ts - tilingSprite to be rendered + */ + render(ts: TilingSprite): void; +} + +export { } diff --git a/Typescript/types/pixi/sprite/global.d.ts b/Typescript/types/pixi/sprite/global.d.ts new file mode 100644 index 0000000..016e101 --- /dev/null +++ b/Typescript/types/pixi/sprite/global.d.ts @@ -0,0 +1,8 @@ +declare namespace GlobalMixins +{ + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface Sprite + { + + } +} diff --git a/Typescript/types/pixi/sprite/index.d.ts b/Typescript/types/pixi/sprite/index.d.ts new file mode 100644 index 0000000..11e45a7 --- /dev/null +++ b/Typescript/types/pixi/sprite/index.d.ts @@ -0,0 +1,228 @@ +/// + +import { BLEND_MODES } from 'pixi/constants'; +import { Container } from 'pixi/display'; +import type { IBaseTextureOptions } from 'pixi/core'; +import type { IDestroyOptions } from 'pixi/display'; +import type { IPointData } from 'pixi/math'; +import { ObservablePoint } from 'pixi/math'; +import { Rectangle } from 'pixi/math'; +import type { Renderer } from 'pixi/core'; +import { Texture } from 'pixi/core'; +import type { TextureSource } from 'pixi/core'; + +export declare interface Sprite extends GlobalMixins.Sprite, Container { +} + +/** + * The Sprite object is the base for all textured objects that are rendered to the screen + * + * A sprite can be created directly from an image like this: + * + * ```js + * let sprite = PIXI.Sprite.from('assets/image.png'); + * ``` + * + * The more efficient way to create sprites is using a {@link PIXI.Spritesheet}, + * as swapping base textures when rendering to the screen is inefficient. + * + * ```js + * PIXI.Loader.shared.add("assets/spritesheet.json").load(setup); + * + * function setup() { + * let sheet = PIXI.Loader.shared.resources["assets/spritesheet.json"].spritesheet; + * let sprite = new PIXI.Sprite(sheet.textures["image.png"]); + * ... + * } + * ``` + * @memberof PIXI + */ +export declare class Sprite extends Container { + /** + * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode. + * @default PIXI.BLEND_MODES.NORMAL + */ + blendMode: BLEND_MODES; + indices: Uint16Array; + /** + * Plugin that is responsible for rendering this element. + * Allows to customize the rendering process without overriding '_render' & '_renderCanvas' methods. + * @default 'batch' + */ + pluginName: string; + /** + * The width of the sprite (this is initially set by the texture). + * @protected + */ + _width: number; + /** + * The height of the sprite (this is initially set by the texture) + * @protected + */ + _height: number; + /** + * The texture that the sprite is using. + * @private + */ + _texture: Texture; + _textureID: number; + /** + * Cached tint value so we can tell when the tint is changed. + * Value is used for 2d CanvasRenderer. + * @protected + * @default 0xFFFFFF + */ + _cachedTint: number; + protected _textureTrimmedID: number; + /** + * This is used to store the uvs data of the sprite, assigned at the same time + * as the vertexData in calculateVertices(). + * @member {Float32Array} + */ + protected uvs: Float32Array; + /** + * The anchor point defines the normalized coordinates + * in the texture that map to the position of this + * sprite. + * + * By default, this is `(0,0)` (or `texture.defaultAnchor` + * if you have modified that), which means the position + * `(x,y)` of this `Sprite` will be the top-left corner. + * + * Note: Updating `texture.defaultAnchor` after + * constructing a `Sprite` does _not_ update its anchor. + * + * {@link https://docs.cocos2d-x.org/cocos2d-x/en/sprites/manipulation.html} + * @default `this.texture.defaultAnchor` + */ + protected _anchor: ObservablePoint; + /** + * This is used to store the vertex data of the sprite (basically a quad). + * @member {Float32Array} + */ + protected vertexData: Float32Array; + /** + * This is used to calculate the bounds of the object IF it is a trimmed sprite. + * @member {Float32Array} + */ + private vertexTrimmedData; + /** + * Internal roundPixels field + * @private + */ + private _roundPixels; + private _transformID; + private _transformTrimmedID; + /** + * The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect. + * @default 0xFFFFFF + */ + private _tint; + /** + * The tint applied to the sprite. This is a RGB value. A value of 0xFFFFFF will remove any tint effect. + * @private + * @default 16777215 + */ + _tintRGB: number; + /** @param texture - The texture for this sprite. */ + constructor(texture?: Texture); + /** When the texture is updated, this event will fire to update the scale and frame. */ + protected _onTextureUpdate(): void; + /** Called when the anchor position updates. */ + private _onAnchorUpdate; + /** Calculates worldTransform * vertices, store it in vertexData. */ + calculateVertices(): void; + /** + * Calculates worldTransform * vertices for a non texture with a trim. store it in vertexTrimmedData. + * + * This is used to ensure that the true width and height of a trimmed texture is respected. + */ + calculateTrimmedVertices(): void; + /** + * + * Renders the object using the WebGL renderer + * @param renderer - The webgl renderer to use. + */ + protected _render(renderer: Renderer): void; + /** Updates the bounds of the sprite. */ + protected _calculateBounds(): void; + /** + * Gets the local bounds of the sprite object. + * @param rect - Optional output rectangle. + * @returns The bounds. + */ + getLocalBounds(rect?: Rectangle): Rectangle; + /** + * Tests if a point is inside this sprite + * @param point - the point to test + * @returns The result of the test + */ + containsPoint(point: IPointData): boolean; + /** + * Destroys this sprite and optionally its texture and children. + * @param options - Options parameter. A boolean will act as if all options + * have been set to that value + * @param [options.children=false] - if set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param [options.texture=false] - Should it destroy the current texture of the sprite as well + * @param [options.baseTexture=false] - Should it destroy the base texture of the sprite as well + */ + destroy(options?: IDestroyOptions | boolean): void; + /** + * Helper function that creates a new sprite based on the source you provide. + * The source can be - frame id, image url, video url, canvas element, video element, base texture + * @param {string|PIXI.Texture|HTMLCanvasElement|HTMLVideoElement} source - Source to create texture from + * @param {object} [options] - See {@link PIXI.BaseTexture}'s constructor for options. + * @returns The newly created sprite + */ + static from(source: SpriteSource, options?: IBaseTextureOptions): Sprite; + /** + * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation. + * + * Advantages can include sharper image quality (like text) and faster rendering on canvas. + * The main disadvantage is movement of objects may appear less smooth. + * + * To set the global default, change {@link PIXI.settings.ROUND_PIXELS}. + * @default false + */ + set roundPixels(value: boolean); + get roundPixels(): boolean; + /** The width of the sprite, setting this will actually modify the scale to achieve the value set. */ + get width(): number; + set width(value: number); + /** The height of the sprite, setting this will actually modify the scale to achieve the value set. */ + get height(): number; + set height(value: number); + /** + * The anchor sets the origin point of the sprite. The default value is taken from the {@link PIXI.Texture|Texture} + * and passed to the constructor. + * + * The default is `(0,0)`, this means the sprite's origin is the top left. + * + * Setting the anchor to `(0.5,0.5)` means the sprite's origin is centered. + * + * Setting the anchor to `(1,1)` would mean the sprite's origin point will be the bottom right corner. + * + * If you pass only single parameter, it will set both x and y to the same value as shown in the example below. + * @example + * const sprite = new PIXI.Sprite(texture); + * sprite.anchor.set(0.5); // This will set the origin to center. (0.5) is same as (0.5, 0.5). + */ + get anchor(): ObservablePoint; + set anchor(value: ObservablePoint); + /** + * The tint applied to the sprite. This is a hex value. + * + * A value of 0xFFFFFF will remove any tint effect. + * @default 0xFFFFFF + */ + get tint(): number; + set tint(value: number); + /** The texture that the sprite is using. */ + get texture(): Texture; + set texture(value: Texture); +} + +export declare type SpriteSource = TextureSource | Texture; + +export { } diff --git a/Typescript/types/pixi/spritesheet/global.d.ts b/Typescript/types/pixi/spritesheet/global.d.ts new file mode 100644 index 0000000..75a5423 --- /dev/null +++ b/Typescript/types/pixi/spritesheet/global.d.ts @@ -0,0 +1,11 @@ +declare namespace GlobalMixins +{ + interface LoaderResource + { + /** Reference to Spritesheet object created. */ + spritesheet?: import('pixi/spritesheet').Spritesheet; + + /** Dictionary of textures from Spritesheet. */ + textures?: {[name: string]: import('pixi/core').Texture}; + } +} diff --git a/Typescript/types/pixi/spritesheet/index.d.ts b/Typescript/types/pixi/spritesheet/index.d.ts new file mode 100644 index 0000000..392df42 --- /dev/null +++ b/Typescript/types/pixi/spritesheet/index.d.ts @@ -0,0 +1,206 @@ +/// + +import { BaseTexture } from 'pixi/core'; +import type { Dict } from 'pixi/utils'; +import type { ExtensionMetadata } from 'pixi/core'; +import type { IPointData } from 'pixi/math'; +import { LoaderResource } from 'pixi/loaders'; +import { Texture } from 'pixi/core'; + +/** Atlas format. */ +export declare interface ISpritesheetData { + frames: Dict; + animations?: Dict; + meta: { + scale: string; + related_multi_packs?: string[]; + }; +} + +/** Represents the JSON data for a spritesheet atlas. */ +export declare interface ISpritesheetFrameData { + frame: { + x: number; + y: number; + w: number; + h: number; + }; + trimmed?: boolean; + rotated?: boolean; + sourceSize?: { + w: number; + h: number; + }; + spriteSourceSize?: { + x: number; + y: number; + }; + anchor?: IPointData; +} + +/** + * Utility class for maintaining reference to a collection + * of Textures on a single Spritesheet. + * + * To access a sprite sheet from your code you may pass its JSON data file to Pixi's loader: + * + * ```js + * PIXI.Loader.shared.add("images/spritesheet.json").load(setup); + * + * function setup() { + * let sheet = PIXI.Loader.shared.resources["images/spritesheet.json"].spritesheet; + * ... + * } + * ``` + * + * Alternately, you may circumvent the loader by instantiating the Spritesheet directly: + * ```js + * const sheet = new PIXI.Spritesheet(texture, spritesheetData); + * await sheet.parse(); + * console.log('Spritesheet ready to use!'); + * ``` + * + * With the `sheet.textures` you can create Sprite objects,`sheet.animations` can be used to create an AnimatedSprite. + * + * Sprite sheets can be packed using tools like {@link https://codeandweb.com/texturepacker|TexturePacker}, + * {@link https://renderhjs.net/shoebox/|Shoebox} or {@link https://github.com/krzysztof-o/spritesheet.js|Spritesheet.js}. + * Default anchor points (see {@link PIXI.Texture#defaultAnchor}) and grouping of animation sprites are currently only + * supported by TexturePacker. + * @memberof PIXI + */ +export declare class Spritesheet { + /** The maximum number of Textures to build per process. */ + static readonly BATCH_SIZE = 1000; + /** For multi-packed spritesheets, this contains a reference to all the other spritesheets it depends on. */ + linkedSheets: Spritesheet[]; + /** Reference to ths source texture. */ + baseTexture: BaseTexture; + /** + * A map containing all textures of the sprite sheet. + * Can be used to create a {@link PIXI.Sprite|Sprite}: + * ```js + * new PIXI.Sprite(sheet.textures["image.png"]); + * ``` + */ + textures: Dict; + /** + * A map containing the textures for each animation. + * Can be used to create an {@link PIXI.AnimatedSprite|AnimatedSprite}: + * ```js + * new PIXI.AnimatedSprite(sheet.animations["anim_name"]) + * ``` + */ + animations: Dict; + /** + * Reference to the original JSON data. + * @type {object} + */ + data: ISpritesheetData; + /** The resolution of the spritesheet. */ + resolution: number; + /** + * Reference to original source image from the Loader. This reference is retained so we + * can destroy the Texture later on. It is never used internally. + */ + private _texture; + /** + * Map of spritesheet frames. + * @type {object} + */ + private _frames; + /** Collection of frame names. */ + private _frameKeys; + /** Current batch index being processed. */ + private _batchIndex; + /** + * Callback when parse is completed. + * @type {Function} + */ + private _callback; + /** + * @param texture - Reference to the source BaseTexture object. + * @param {object} data - Spritesheet image data. + * @param resolutionFilename - The filename to consider when determining + * the resolution of the spritesheet. If not provided, the imageUrl will + * be used on the BaseTexture. + */ + constructor(texture: BaseTexture | Texture, data: ISpritesheetData, resolutionFilename?: string); + /** + * Generate the resolution from the filename or fallback + * to the meta.scale field of the JSON data. + * @param resolutionFilename - The filename to use for resolving + * the default resolution. + * @returns Resolution to use for spritesheet. + */ + private _updateResolution; + /** + * Parser spritesheet from loaded data. This is done asynchronously + * to prevent creating too many Texture within a single process. + * @method PIXI.Spritesheet#parse + */ + parse(): Promise>; + /** + * Please use the Promise-based version of this function. + * @method PIXI.Spritesheet#parse + * @deprecated since version 6.5.0 + * @param {Function} callback - Callback when complete returns + * a map of the Textures for this spritesheet. + */ + parse(callback?: (textures?: Dict) => void): void; + /** + * Process a batch of frames + * @param initialFrameIndex - The index of frame to start. + */ + private _processFrames; + /** Parse animations config. */ + private _processAnimations; + /** The parse has completed. */ + private _parseComplete; + /** Begin the next batch of textures. */ + private _nextBatch; + /** + * Destroy Spritesheet and don't use after this. + * @param {boolean} [destroyBase=false] - Whether to destroy the base texture as well + */ + destroy(destroyBase?: boolean): void; +} + +/** + * {@link PIXI.Loader} middleware for loading texture atlases that have been created with + * TexturePacker or similar JSON-based spritesheet. + * + * This middleware automatically generates Texture resources. + * + * If you're using Webpack or other bundlers and plan on bundling the atlas' JSON, + * use the {@link PIXI.Spritesheet} class to directly parse the JSON. + * + * The Loader's image Resource name is automatically appended with `"_image"`. + * If a Resource with this name is already loaded, the Loader will skip parsing the + * Spritesheet. The code below will generate an internal Loader Resource called `"myatlas_image"`. + * @example + * loader.add('myatlas', 'path/to/myatlas.json'); + * loader.load(() => { + * loader.resources.myatlas; // atlas JSON resource + * loader.resources.myatlas_image; // atlas Image resource + * }); + * @memberof PIXI + */ +export declare class SpritesheetLoader { + /** @ignore */ + static extension: ExtensionMetadata; + /** + * Called after a resource is loaded. + * @see PIXI.Loader.loaderMiddleware + * @param resource + * @param next + */ + static use(resource: LoaderResource, next: (...args: unknown[]) => void): void; + /** + * Get the spritesheets root path + * @param resource - Resource to check path + * @param baseUrl - Base root url + */ + static getResourcePath(resource: LoaderResource, baseUrl: string): string; +} + +export { } diff --git a/Typescript/types/pixi/text-bitmap/global.d.ts b/Typescript/types/pixi/text-bitmap/global.d.ts new file mode 100644 index 0000000..d77de63 --- /dev/null +++ b/Typescript/types/pixi/text-bitmap/global.d.ts @@ -0,0 +1,24 @@ +declare namespace GlobalMixins +{ + interface IBitmapFontResource + { + bitmapFont: import('pixi/text-bitmap').BitmapFont; + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface LoaderResource extends Partial + { + + } + + interface IBitmapFontResourceMetadata + { + pageFile: string; + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface IResourceMetadata extends Partial + { + + } +} diff --git a/Typescript/types/pixi/text-bitmap/index.d.ts b/Typescript/types/pixi/text-bitmap/index.d.ts new file mode 100644 index 0000000..9712c47 --- /dev/null +++ b/Typescript/types/pixi/text-bitmap/index.d.ts @@ -0,0 +1,667 @@ +/// + +import { Container } from 'pixi/display'; +import type { Dict } from 'pixi/utils'; +import type { ExtensionMetadata } from 'pixi/core'; +import type { IDestroyOptions } from 'pixi/display'; +import type { ITextStyle } from 'pixi/text'; +import type { Loader } from 'pixi/loaders'; +import { LoaderResource } from 'pixi/loaders'; +import { Mesh } from 'pixi/mesh'; +import { ObservablePoint } from 'pixi/math'; +import type { Rectangle } from 'pixi/math'; +import type { Renderer } from 'pixi/core'; +import { TextStyle } from 'pixi/text'; +import type { TextStyleAlign } from 'pixi/text'; +import { Texture } from 'pixi/core'; + +/** + * Auto-detect BitmapFont parsing format based on data. + * @private + * @param {any} data - Data to detect format + * @returns {any} Format or null + */ +export declare function autoDetectFormat(data: unknown): typeof formats[number] | null; + +/** + * BitmapFont represents a typeface available for use with the BitmapText class. Use the `install` + * method for adding a font to be used. + * @memberof PIXI + */ +export declare class BitmapFont { + /** + * This character set includes all the letters in the alphabet (both lower- and upper- case). + * @type {string[][]} + * @example + * BitmapFont.from("ExampleFont", style, { chars: BitmapFont.ALPHA }) + */ + static readonly ALPHA: (string | string[])[]; + /** + * This character set includes all decimal digits (from 0 to 9). + * @type {string[][]} + * @example + * BitmapFont.from("ExampleFont", style, { chars: BitmapFont.NUMERIC }) + */ + static readonly NUMERIC: string[][]; + /** + * This character set is the union of `BitmapFont.ALPHA` and `BitmapFont.NUMERIC`. + * @type {string[][]} + */ + static readonly ALPHANUMERIC: (string | string[])[]; + /** + * This character set consists of all the ASCII table. + * @member {string[][]} + * @see http://www.asciitable.com/ + */ + static readonly ASCII: string[][]; + /** + * Collection of default options when using `BitmapFont.from`. + * @property {number} [resolution=1] - + * @property {number} [textureWidth=512] - + * @property {number} [textureHeight=512] - + * @property {number} [padding=4] - + * @property {string|string[]|string[][]} chars = PIXI.BitmapFont.ALPHANUMERIC + */ + static readonly defaultOptions: IBitmapFontOptions; + /** Collection of available/installed fonts. */ + static readonly available: Dict; + /** The name of the font face. */ + readonly font: string; + /** The size of the font face in pixels. */ + readonly size: number; + /** The line-height of the font face in pixels. */ + readonly lineHeight: number; + /** The map of characters by character code. */ + readonly chars: Dict; + /** The map of base page textures (i.e., sheets of glyphs). */ + readonly pageTextures: Dict; + /** The range of the distance field in pixels. */ + readonly distanceFieldRange: number; + /** The kind of distance field for this font or "none". */ + readonly distanceFieldType: string; + private _ownsTextures; + /** + * @param data + * @param textures + * @param ownsTextures - Setting to `true` will destroy page textures + * when the font is uninstalled. + */ + constructor(data: BitmapFontData, textures: Texture[] | Dict, ownsTextures?: boolean); + /** Remove references to created glyph textures. */ + destroy(): void; + /** + * Register a new bitmap font. + * @param data - The + * characters map that could be provided as xml or raw string. + * @param textures - List of textures for each page. + * @param ownsTextures - Set to `true` to destroy page textures + * when the font is uninstalled. By default fonts created with + * `BitmapFont.from` or from the `BitmapFontLoader` are `true`. + * @returns {PIXI.BitmapFont} Result font object with font, size, lineHeight + * and char fields. + */ + static install(data: string | XMLDocument | BitmapFontData, textures: Texture | Texture[] | Dict, ownsTextures?: boolean): BitmapFont; + /** + * Remove bitmap font by name. + * @param name - Name of the font to uninstall. + */ + static uninstall(name: string): void; + /** + * Generates a bitmap-font for the given style and character set. This does not support + * kernings yet. With `style` properties, only the following non-layout properties are used: + * + * - {@link PIXI.TextStyle#dropShadow|dropShadow} + * - {@link PIXI.TextStyle#dropShadowDistance|dropShadowDistance} + * - {@link PIXI.TextStyle#dropShadowColor|dropShadowColor} + * - {@link PIXI.TextStyle#dropShadowBlur|dropShadowBlur} + * - {@link PIXI.TextStyle#dropShadowAngle|dropShadowAngle} + * - {@link PIXI.TextStyle#fill|fill} + * - {@link PIXI.TextStyle#fillGradientStops|fillGradientStops} + * - {@link PIXI.TextStyle#fillGradientType|fillGradientType} + * - {@link PIXI.TextStyle#fontFamily|fontFamily} + * - {@link PIXI.TextStyle#fontSize|fontSize} + * - {@link PIXI.TextStyle#fontVariant|fontVariant} + * - {@link PIXI.TextStyle#fontWeight|fontWeight} + * - {@link PIXI.TextStyle#lineJoin|lineJoin} + * - {@link PIXI.TextStyle#miterLimit|miterLimit} + * - {@link PIXI.TextStyle#stroke|stroke} + * - {@link PIXI.TextStyle#strokeThickness|strokeThickness} + * - {@link PIXI.TextStyle#textBaseline|textBaseline} + * @param name - The name of the custom font to use with BitmapText. + * @param textStyle - Style options to render with BitmapFont. + * @param options - Setup options for font or name of the font. + * @param {string|string[]|string[][]} [options.chars=PIXI.BitmapFont.ALPHANUMERIC] - characters included + * in the font set. You can also use ranges. For example, `[['a', 'z'], ['A', 'Z'], "!@#$%^&*()~{}[] "]`. + * Don't forget to include spaces ' ' in your character set! + * @param {number} [options.resolution=1] - Render resolution for glyphs. + * @param {number} [options.textureWidth=512] - Optional width of atlas, smaller values to reduce memory. + * @param {number} [options.textureHeight=512] - Optional height of atlas, smaller values to reduce memory. + * @param {number} [options.padding=4] - Padding between glyphs on texture atlas. + * @returns Font generated by style options. + * @example + * PIXI.BitmapFont.from("TitleFont", { + * fontFamily: "Arial", + * fontSize: 12, + * strokeThickness: 2, + * fill: "purple" + * }); + * + * const title = new PIXI.BitmapText("This is the title", { fontName: "TitleFont" }); + */ + static from(name: string, textStyle?: TextStyle | Partial, options?: IBitmapFontOptions): BitmapFont; +} + +/** + * Normalized parsed data from .fnt files. + * @memberof PIXI + */ +export declare class BitmapFontData { + /** @readonly */ + info: IBitmapFontDataInfo[]; + /** @readonly */ + common: IBitmapFontDataCommon[]; + /** @readonly */ + page: IBitmapFontDataPage[]; + /** @readonly */ + char: IBitmapFontDataChar[]; + /** @readonly */ + kerning: IBitmapFontDataKerning[]; + /** @readonly */ + distanceField: IBitmapFontDataDistanceField[]; + constructor(); +} + +/** + * {@link PIXI.Loader Loader} middleware for loading + * bitmap-based fonts suitable for using with {@link PIXI.BitmapText}. + * @memberof PIXI + */ +export declare class BitmapFontLoader { + /** @ignore */ + static extension: ExtensionMetadata; + /** + * Called when the plugin is installed. + * @see PIXI.extensions.add + */ + static add(): void; + /** + * Called after a resource is loaded. + * @see PIXI.Loader.loaderMiddleware + * @param this + * @param {PIXI.LoaderResource} resource + * @param {Function} next + */ + static use(this: Loader, resource: LoaderResource, next: (...args: any[]) => void): void; + /** + * Get folder path from a resource. + * @param loader + * @param resource + */ + private static getBaseUrl; + /** + * Replacement for NodeJS's path.dirname + * @param {string} url - Path to get directory for + */ + private static dirname; +} + +/** + * A BitmapText object will create a line or multiple lines of text using bitmap font. + * + * The primary advantage of this class over Text is that all of your textures are pre-generated and loading, + * meaning that rendering is fast, and changing text has no performance implications. + * + * Supporting character sets other than latin, such as CJK languages, may be impractical due to the number of characters. + * + * To split a line you can use '\n', '\r' or '\r\n' in your string. + * + * PixiJS can auto-generate fonts on-the-fly using BitmapFont or use fnt files provided by: + * http://www.angelcode.com/products/bmfont/ for Windows or + * http://www.bmglyph.com/ for Mac. + * + * You can also use SDF, MSDF and MTSDF BitmapFonts for vector-like scaling appearance provided by: + * https://github.com/soimy/msdf-bmfont-xml for SDF and MSDF fnt files or + * https://github.com/Chlumsky/msdf-atlas-gen for SDF, MSDF and MTSDF json files + * + * A BitmapText can only be created when the font is loaded. + * + * ```js + * // in this case the font is in a file called 'desyrel.fnt' + * let bitmapText = new PIXI.BitmapText("text using a fancy font!", { + * fontName: "Desyrel", + * fontSize: 35, + * align: "right" + * }); + * ``` + * @memberof PIXI + */ +export declare class BitmapText extends Container { + static styleDefaults: Partial; + /** Set to `true` if the BitmapText needs to be redrawn. */ + dirty: boolean; + /** + * The resolution / device pixel ratio of the canvas. + * + * This is set to automatically match the renderer resolution by default, but can be overridden by setting manually. + * @default PIXI.settings.RESOLUTION + */ + _resolution: number; + _autoResolution: boolean; + /** + * Private tracker for the width of the overall text. + * @private + */ + protected _textWidth: number; + /** + * Private tracker for the height of the overall text. + * @private + */ + protected _textHeight: number; + /** + * Private tracker for the current text. + * @private + */ + protected _text: string; + /** + * The max width of this bitmap text in pixels. If the text provided is longer than the + * value provided, line breaks will be automatically inserted in the last whitespace. + * Disable by setting value to 0 + * @private + */ + protected _maxWidth: number; + /** + * The max line height. This is useful when trying to use the total height of the Text, + * ie: when trying to vertically align. (Internally used) + * @private + */ + protected _maxLineHeight: number; + /** + * Letter spacing. This is useful for setting the space between characters. + * @private + */ + protected _letterSpacing: number; + /** + * Text anchor. + * @readonly + * @private + */ + protected _anchor: ObservablePoint; + /** + * Private tracker for the current font. + * @private + */ + protected _font?: BitmapFont; + /** + * Private tracker for the current font name. + * @private + */ + protected _fontName: string; + /** + * Private tracker for the current font size. + * @private + */ + protected _fontSize?: number; + /** + * Private tracker for the current text align. + * @type {string} + * @private + */ + protected _align: TextStyleAlign; + /** Collection of page mesh data. */ + protected _activePagesMeshData: PageMeshData[]; + /** + * Private tracker for the current tint. + * @private + */ + protected _tint: number; + /** + * If true PixiJS will Math.floor() x/y values when rendering. + * @default PIXI.settings.ROUND_PIXELS + */ + protected _roundPixels: boolean; + /** Cached char texture is destroyed when BitmapText is destroyed. */ + private _textureCache; + /** + * @param text - A string that you would like the text to display. + * @param style - The style parameters. + * @param {string} style.fontName - The installed BitmapFont name. + * @param {number} [style.fontSize] - The size of the font in pixels, e.g. 24. If undefined, + *. this will default to the BitmapFont size. + * @param {string} [style.align='left'] - Alignment for multiline text ('left', 'center', 'right' or 'justify'), + * does not affect single line text. + * @param {number} [style.tint=0xFFFFFF] - The tint color. + * @param {number} [style.letterSpacing=0] - The amount of spacing between letters. + * @param {number} [style.maxWidth=0] - The max width of the text before line wrapping. + */ + constructor(text: string, style?: Partial); + /** Renders text and updates it when needed. This should only be called if the BitmapFont is regenerated. */ + updateText(): void; + updateTransform(): void; + _render(renderer: Renderer): void; + /** + * Validates text before calling parent's getLocalBounds + * @returns - The rectangular bounding area + */ + getLocalBounds(): Rectangle; + /** + * Updates text when needed + * @private + */ + protected validate(): void; + /** + * The tint of the BitmapText object. + * @default 0xffffff + */ + get tint(): number; + set tint(value: number); + /** + * The alignment of the BitmapText object. + * @member {string} + * @default 'left' + */ + get align(): TextStyleAlign; + set align(value: TextStyleAlign); + /** The name of the BitmapFont. */ + get fontName(): string; + set fontName(value: string); + /** The size of the font to display. */ + get fontSize(): number; + set fontSize(value: number | undefined); + /** + * The anchor sets the origin point of the text. + * + * The default is `(0,0)`, this means the text's origin is the top left. + * + * Setting the anchor to `(0.5,0.5)` means the text's origin is centered. + * + * Setting the anchor to `(1,1)` would mean the text's origin point will be the bottom right corner. + */ + get anchor(): ObservablePoint; + set anchor(value: ObservablePoint); + /** The text of the BitmapText object. */ + get text(): string; + set text(text: string); + /** + * The max width of this bitmap text in pixels. If the text provided is longer than the + * value provided, line breaks will be automatically inserted in the last whitespace. + * Disable by setting the value to 0. + */ + get maxWidth(): number; + set maxWidth(value: number); + /** + * The max line height. This is useful when trying to use the total height of the Text, + * i.e. when trying to vertically align. + * @readonly + */ + get maxLineHeight(): number; + /** + * The width of the overall text, different from fontSize, + * which is defined in the style object. + * @readonly + */ + get textWidth(): number; + /** Additional space between characters. */ + get letterSpacing(): number; + set letterSpacing(value: number); + /** + * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation. + * Advantages can include sharper image quality (like text) and faster rendering on canvas. + * The main disadvantage is movement of objects may appear less smooth. + * To set the global default, change {@link PIXI.settings.ROUND_PIXELS} + * @default PIXI.settings.ROUND_PIXELS + */ + get roundPixels(): boolean; + set roundPixels(value: boolean); + /** + * The height of the overall text, different from fontSize, + * which is defined in the style object. + * @readonly + */ + get textHeight(): number; + /** + * The resolution / device pixel ratio of the canvas. + * + * This is set to automatically match the renderer resolution by default, but can be overridden by setting manually. + * @default 1 + */ + get resolution(): number; + set resolution(value: number); + destroy(options?: boolean | IDestroyOptions): void; +} + +declare const formats: readonly [typeof TextFormat, typeof XMLFormat, typeof XMLStringFormat]; + +export declare interface IBitmapFontCharacter { + xOffset: number; + yOffset: number; + xAdvance: number; + texture: Texture; + page: number; + kerning: Dict; +} + +/** @memberof PIXI */ +export declare interface IBitmapFontDataChar { + /** Unique id of character */ + id: number; + /** {@link PIXI.IBitmapFontDataPage} id */ + page: number; + /** x-position of character in page. */ + x: number; + /** y-position of character in page. */ + y: number; + /** Width of character in page. */ + width: number; + /** Height of character in page. */ + height: number; + /** x-offset to apply when rendering character */ + xoffset: number; + /** y-offset to apply when rendering character. */ + yoffset: number; + /** Advancement to apply to next character. */ + xadvance: number; +} + +/** @memberof PIXI */ +export declare interface IBitmapFontDataCommon { + /** Line height, in pixels. */ + lineHeight: number; +} + +/** @memberof PIXI */ +export declare interface IBitmapFontDataDistanceField { + /** Type of distance field */ + fieldType: string; + /** Range of distance */ + distanceRange: number; +} + +/** @memberof PIXI */ +export declare interface IBitmapFontDataInfo { + /** Font face */ + face: string; + /** Font size */ + size: number; +} + +/** @memberof PIXI */ +export declare interface IBitmapFontDataKerning { + /** First character of pair */ + first: number; + /** Second character of pair */ + second: number; + /** x-offset to apply between first & second characters when they are next to each other. */ + amount: number; +} + +/** @memberof PIXI */ +export declare interface IBitmapFontDataPage { + /** Unique id for bitmap texture */ + id: number; + /** File name */ + file: string; +} + +/** @memberof PIXI */ +export declare interface IBitmapFontOptions { + /** + * The character set to generate. + * @default PIXI.BitmapFont.ALPHANUMERIC + */ + chars?: string | (string | string[])[]; + /** + * The resolution for rendering. + * @default 1 + */ + resolution?: number; + /** + * The padding between glyphs in the atlas. + * @default 4 + */ + padding?: number; + /** + * The width of the texture atlas. + * @default 512 + */ + textureWidth?: number; + /** + * The height of the texture atlas. + * @default 512 + */ + textureHeight?: number; + /** + * Skip generation of kerning information for the BitmapFont. + * If true, this could potentially increase the performance, but may impact the rendered text appearance. + * @default false + */ + skipKerning?: boolean; +} + +/** + * Internal data format used to convert to BitmapFontData. + * @private + */ +export declare interface IBitmapFontRawData { + info: { + face: string; + size: string; + }[]; + common: { + lineHeight: string; + }[]; + page: { + id: string; + file: string; + }[]; + chars: { + count: number; + }[]; + char: { + id: string; + page: string; + x: string; + y: string; + width: string; + height: string; + xoffset: string; + yoffset: string; + xadvance: string; + }[]; + kernings?: { + count: number; + }[]; + kerning?: { + first: string; + second: string; + amount: string; + }[]; + distanceField?: { + fieldType: string; + distanceRange: string; + }[]; +} + +export declare interface IBitmapTextFontDescriptor { + name: string; + size: number; +} + +export declare interface IBitmapTextStyle { + fontName: string; + fontSize: number; + tint: number; + align: TextStyleAlign; + letterSpacing: number; + maxWidth: number; +} + +declare interface PageMeshData { + index: number; + indexCount: number; + vertexCount: number; + uvsCount: number; + total: number; + mesh: Mesh; + vertices?: Float32Array; + uvs?: Float32Array; + indices?: Uint16Array; +} + +/** + * BitmapFont format that's Text-based. + * @private + */ +export declare class TextFormat { + /** + * Check if resource refers to txt font data. + * @param data + * @returns - True if resource could be treated as font data, false otherwise. + */ + static test(data: unknown): boolean; + /** + * Convert text font data to a javascript object. + * @param txt - Raw string data to be converted + * @returns - Parsed font data + */ + static parse(txt: string): BitmapFontData; +} + +/** + * BitmapFont format that's XML-based. + * @private + */ +export declare class XMLFormat { + /** + * Check if resource refers to xml font data. + * @param data + * @returns - True if resource could be treated as font data, false otherwise. + */ + static test(data: unknown): boolean; + /** + * Convert the XML into BitmapFontData that we can use. + * @param xml + * @returns - Data to use for BitmapFont + */ + static parse(xml: XMLDocument): BitmapFontData; +} + +/** + * BitmapFont format that's XML-based. + * @private + */ +export declare class XMLStringFormat { + /** + * Check if resource refers to text xml font data. + * @param data + * @returns - True if resource could be treated as font data, false otherwise. + */ + static test(data: unknown): boolean; + /** + * Convert the text XML into BitmapFontData that we can use. + * @param xmlTxt + * @returns - Data to use for BitmapFont + */ + static parse(xmlTxt: string): BitmapFontData; +} + +export { } diff --git a/Typescript/types/pixi/text/index.d.ts b/Typescript/types/pixi/text/index.d.ts new file mode 100644 index 0000000..36ef956 --- /dev/null +++ b/Typescript/types/pixi/text/index.d.ts @@ -0,0 +1,705 @@ +/// + +import type { IDestroyOptions } from 'pixi/display'; +import { Rectangle } from 'pixi/math'; +import type { Renderer } from 'pixi/core'; +import { Sprite } from 'pixi/sprite'; + +declare interface IFontMetrics { + ascent: number; + descent: number; + fontSize: number; +} + +export declare interface ITextStyle { + align: TextStyleAlign; + breakWords: boolean; + dropShadow: boolean; + dropShadowAlpha: number; + dropShadowAngle: number; + dropShadowBlur: number; + dropShadowColor: string | number; + dropShadowDistance: number; + fill: TextStyleFill; + fillGradientType: TEXT_GRADIENT; + fillGradientStops: number[]; + fontFamily: string | string[]; + fontSize: number | string; + fontStyle: TextStyleFontStyle; + fontVariant: TextStyleFontVariant; + fontWeight: TextStyleFontWeight; + letterSpacing: number; + lineHeight: number; + lineJoin: TextStyleLineJoin; + miterLimit: number; + padding: number; + stroke: string | number; + strokeThickness: number; + textBaseline: TextStyleTextBaseline; + trim: boolean; + whiteSpace: TextStyleWhiteSpace; + wordWrap: boolean; + wordWrapWidth: number; + leading: number; +} + +declare interface ModernContext2D extends CanvasRenderingContext2D { + textLetterSpacing?: number; + letterSpacing?: number; +} + +/** + * A Text Object will create a line or multiple lines of text. + * + * The text is created using the [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API). + * + * The primary advantage of this class over BitmapText is that you have great control over the style of the text, + * which you can change at runtime. + * + * The primary disadvantages is that each piece of text has it's own texture, which can use more memory. + * When text changes, this texture has to be re-generated and re-uploaded to the GPU, taking up time. + * + * To split a line you can use '\n' in your text string, or, on the `style` object, + * change its `wordWrap` property to true and and give the `wordWrapWidth` property a value. + * + * A Text can be created directly from a string and a style object, + * which can be generated [here](https://pixijs.io/pixi-text-style). + * + * ```js + * let text = new PIXI.Text('This is a PixiJS text',{fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'}); + * ``` + * @memberof PIXI + */ +declare class Text_2 extends Sprite { + /** + * New behavior for `lineHeight` that's meant to mimic HTML text. A value of `true` will + * make sure the first baseline is offset by the `lineHeight` value if it is greater than `fontSize`. + * A value of `false` will use the legacy behavior and not change the baseline of the first line. + * In the next major release, we'll enable this by default. + */ + static nextLineHeightBehavior: boolean; + /** + * New rendering behavior for letter-spacing which uses Chrome's new native API. This will + * lead to more accurate letter-spacing results because it does not try to manually draw + * each character. However, this Chrome API is experimental and may not serve all cases yet. + */ + static experimentalLetterSpacing: boolean; + /** The canvas element that everything is drawn to. */ + canvas: HTMLCanvasElement; + /** The canvas 2d context that everything is drawn with. */ + context: ModernContext2D; + localStyleID: number; + dirty: boolean; + /** + * The resolution / device pixel ratio of the canvas. + * + * This is set to automatically match the renderer resolution by default, but can be overridden by setting manually. + * @default PIXI.settings.RESOLUTION + */ + _resolution: number; + _autoResolution: boolean; + /** + * Private tracker for the current text. + * @private + */ + protected _text: string; + /** + * Private tracker for the current font. + * @private + */ + protected _font: string; + /** + * Private tracker for the current style. + * @private + */ + protected _style: TextStyle; + /** + * Private listener to track style changes. + * @private + */ + protected _styleListener: () => void; + /** + * Keep track if this Text object created it's own canvas + * element (`true`) or uses the constructor argument (`false`). + * Used to workaround a GC issues with Safari < 13 when + * destroying Text. See `destroy` for more info. + */ + private _ownCanvas; + /** + * @param text - The string that you would like the text to display + * @param {object|PIXI.TextStyle} [style] - The style parameters + * @param canvas - The canvas element for drawing text + */ + constructor(text?: string | number, style?: Partial | TextStyle, canvas?: HTMLCanvasElement); + /** + * Renders text to its canvas, and updates its texture. + * + * By default this is used internally to ensure the texture is correct before rendering, + * but it can be used called externally, for example from this class to 'pre-generate' the texture from a piece of text, + * and then shared across multiple Sprites. + * @param respectDirty - Whether to abort updating the text if the Text isn't dirty and the function is called. + */ + updateText(respectDirty: boolean): void; + /** + * Render the text with letter-spacing. + * @param text - The text to draw + * @param x - Horizontal position to draw the text + * @param y - Vertical position to draw the text + * @param isStroke - Is this drawing for the outside stroke of the + * text? If not, it's for the inside fill + */ + private drawLetterSpacing; + /** Updates texture size based on canvas size. */ + private updateTexture; + /** + * Renders the object using the WebGL renderer + * @param renderer - The renderer + */ + protected _render(renderer: Renderer): void; + /** Updates the transform on all children of this container for rendering. */ + updateTransform(): void; + getBounds(skipUpdate?: boolean, rect?: Rectangle): Rectangle; + /** + * Gets the local bounds of the text object. + * @param rect - The output rectangle. + * @returns The bounds. + */ + getLocalBounds(rect?: Rectangle): Rectangle; + /** Calculates the bounds of the Text as a rectangle. The bounds calculation takes the worldTransform into account. */ + protected _calculateBounds(): void; + /** + * Generates the fill style. Can automatically generate a gradient based on the fill style being an array + * @param style - The style. + * @param lines - The lines of text. + * @param metrics + * @returns The fill style + */ + private _generateFillStyle; + /** + * Destroys this text object. + * + * Note* Unlike a Sprite, a Text object will automatically destroy its baseTexture and texture as + * the majority of the time the texture will not be shared with any other Sprites. + * @param options - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their + * destroy method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=true] - Should it destroy the current texture of the sprite as well + * @param {boolean} [options.baseTexture=true] - Should it destroy the base texture of the sprite as well + */ + destroy(options?: IDestroyOptions | boolean): void; + /** The width of the Text, setting this will actually modify the scale to achieve the value set. */ + get width(): number; + set width(value: number); + /** The height of the Text, setting this will actually modify the scale to achieve the value set. */ + get height(): number; + set height(value: number); + /** + * Set the style of the text. + * + * Set up an event listener to listen for changes on the style object and mark the text as dirty. + */ + get style(): TextStyle | Partial; + set style(style: TextStyle | Partial); + /** Set the copy for the text object. To split a line you can use '\n'. */ + get text(): string; + set text(text: string | number); + /** + * The resolution / device pixel ratio of the canvas. + * + * This is set to automatically match the renderer resolution by default, but can be overridden by setting manually. + * @default 1 + */ + get resolution(): number; + set resolution(value: number); +} +export { Text_2 as Text } + +/** + * Constants that define the type of gradient on text. + * @static + * @constant + * @name TEXT_GRADIENT + * @memberof PIXI + * @type {object} + * @property {number} LINEAR_VERTICAL Vertical gradient + * @property {number} LINEAR_HORIZONTAL Linear gradient + */ +export declare enum TEXT_GRADIENT { + LINEAR_VERTICAL = 0, + LINEAR_HORIZONTAL = 1 +} + +/** + * The TextMetrics object represents the measurement of a block of text with a specified style. + * + * ```js + * let style = new PIXI.TextStyle({fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'}) + * let textMetrics = PIXI.TextMetrics.measureText('Your text', style) + * ``` + * @memberof PIXI + */ +declare class TextMetrics_2 { + /** The text that was measured. */ + text: string; + /** The style that was measured. */ + style: TextStyle; + /** The measured width of the text. */ + width: number; + /** The measured height of the text. */ + height: number; + /** An array of lines of the text broken by new lines and wrapping is specified in style. */ + lines: string[]; + /** An array of the line widths for each line matched to `lines`. */ + lineWidths: number[]; + /** The measured line height for this style. */ + lineHeight: number; + /** The maximum line width for all measured lines. */ + maxLineWidth: number; + /** + * The font properties object from TextMetrics.measureFont. + * @type {PIXI.IFontMetrics} + */ + fontProperties: IFontMetrics; + static METRICS_STRING: string; + static BASELINE_SYMBOL: string; + static BASELINE_MULTIPLIER: number; + static HEIGHT_MULTIPLIER: number; + private static __canvas; + private static __context; + static _fonts: { + [font: string]: IFontMetrics; + }; + static _newlines: number[]; + static _breakingSpaces: number[]; + /** + * @param text - the text that was measured + * @param style - the style that was measured + * @param width - the measured width of the text + * @param height - the measured height of the text + * @param lines - an array of the lines of text broken by new lines and wrapping if specified in style + * @param lineWidths - an array of the line widths for each line matched to `lines` + * @param lineHeight - the measured line height for this style + * @param maxLineWidth - the maximum line width for all measured lines + * @param {PIXI.IFontMetrics} fontProperties - the font properties object from TextMetrics.measureFont + */ + constructor(text: string, style: TextStyle, width: number, height: number, lines: string[], lineWidths: number[], lineHeight: number, maxLineWidth: number, fontProperties: IFontMetrics); + /** + * Measures the supplied string of text and returns a Rectangle. + * @param text - The text to measure. + * @param style - The text style to use for measuring + * @param wordWrap - Override for if word-wrap should be applied to the text. + * @param canvas - optional specification of the canvas to use for measuring. + * @returns Measured width and height of the text. + */ + static measureText(text: string, style: TextStyle, wordWrap?: boolean, canvas?: HTMLCanvasElement | OffscreenCanvas): TextMetrics_2; + /** + * Applies newlines to a string to have it optimally fit into the horizontal + * bounds set by the Text object's wordWrapWidth property. + * @param text - String to apply word wrapping to + * @param style - the style to use when wrapping + * @param canvas - optional specification of the canvas to use for measuring. + * @returns New string with new lines applied where required + */ + private static wordWrap; + /** + * Convienience function for logging each line added during the wordWrap method. + * @param line - The line of text to add + * @param newLine - Add new line character to end + * @returns A formatted line + */ + private static addLine; + /** + * Gets & sets the widths of calculated characters in a cache object + * @param key - The key + * @param letterSpacing - The letter spacing + * @param cache - The cache + * @param context - The canvas context + * @returns The from cache. + */ + private static getFromCache; + /** + * Determines whether we should collapse breaking spaces. + * @param whiteSpace - The TextStyle property whiteSpace + * @returns Should collapse + */ + private static collapseSpaces; + /** + * Determines whether we should collapse newLine chars. + * @param whiteSpace - The white space + * @returns should collapse + */ + private static collapseNewlines; + /** + * Trims breaking whitespaces from string. + * @param text - The text + * @returns Trimmed string + */ + private static trimRight; + /** + * Determines if char is a newline. + * @param char - The character + * @returns True if newline, False otherwise. + */ + private static isNewline; + /** + * Determines if char is a breaking whitespace. + * + * It allows one to determine whether char should be a breaking whitespace + * For example certain characters in CJK langs or numbers. + * It must return a boolean. + * @param char - The character + * @param [_nextChar] - The next character + * @returns True if whitespace, False otherwise. + */ + static isBreakingSpace(char: string, _nextChar?: string): boolean; + /** + * Splits a string into words, breaking-spaces and newLine characters + * @param text - The text + * @returns A tokenized array + */ + private static tokenize; + /** + * Overridable helper method used internally by TextMetrics, exposed to allow customizing the class's behavior. + * + * It allows one to customise which words should break + * Examples are if the token is CJK or numbers. + * It must return a boolean. + * @param _token - The token + * @param breakWords - The style attr break words + * @returns Whether to break word or not + */ + static canBreakWords(_token: string, breakWords: boolean): boolean; + /** + * Overridable helper method used internally by TextMetrics, exposed to allow customizing the class's behavior. + * + * It allows one to determine whether a pair of characters + * should be broken by newlines + * For example certain characters in CJK langs or numbers. + * It must return a boolean. + * @param _char - The character + * @param _nextChar - The next character + * @param _token - The token/word the characters are from + * @param _index - The index in the token of the char + * @param _breakWords - The style attr break words + * @returns whether to break word or not + */ + static canBreakChars(_char: string, _nextChar: string, _token: string, _index: number, _breakWords: boolean): boolean; + /** + * Overridable helper method used internally by TextMetrics, exposed to allow customizing the class's behavior. + * + * It is called when a token (usually a word) has to be split into separate pieces + * in order to determine the point to break a word. + * It must return an array of characters. + * @example + * // Correctly splits emojis, eg "🤪🤪" will result in two element array, each with one emoji. + * TextMetrics.wordWrapSplit = (token) => [...token]; + * @param token - The token to split + * @returns The characters of the token + */ + static wordWrapSplit(token: string): string[]; + /** + * Calculates the ascent, descent and fontSize of a given font-style + * @param font - String representing the style of the font + * @returns Font properties object + */ + static measureFont(font: string): IFontMetrics; + /** + * Clear font metrics in metrics cache. + * @param {string} [font] - font name. If font name not set then clear cache for all fonts. + */ + static clearMetrics(font?: string): void; + /** + * Cached canvas element for measuring text + * TODO: this should be private, but isn't because of backward compat, will fix later. + * @ignore + */ + static get _canvas(): HTMLCanvasElement | OffscreenCanvas; + /** + * TODO: this should be private, but isn't because of backward compat, will fix later. + * @ignore + */ + static get _context(): CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D; +} +export { TextMetrics_2 as TextMetrics } + +/** + * A TextStyle Object contains information to decorate a Text objects. + * + * An instance can be shared between multiple Text objects; then changing the style will update all text objects using it. + * + * A tool can be used to generate a text style [here](https://pixijs.io/pixi-text-style). + * + * @memberof PIXI + */ +export declare class TextStyle implements ITextStyle { + styleID: number; + protected _align: TextStyleAlign; + protected _breakWords: boolean; + protected _dropShadow: boolean; + protected _dropShadowAlpha: number; + protected _dropShadowAngle: number; + protected _dropShadowBlur: number; + protected _dropShadowColor: string | number; + protected _dropShadowDistance: number; + protected _fill: TextStyleFill; + protected _fillGradientType: TEXT_GRADIENT; + protected _fillGradientStops: number[]; + protected _fontFamily: string | string[]; + protected _fontSize: number | string; + protected _fontStyle: TextStyleFontStyle; + protected _fontVariant: TextStyleFontVariant; + protected _fontWeight: TextStyleFontWeight; + protected _letterSpacing: number; + protected _lineHeight: number; + protected _lineJoin: TextStyleLineJoin; + protected _miterLimit: number; + protected _padding: number; + protected _stroke: string | number; + protected _strokeThickness: number; + protected _textBaseline: TextStyleTextBaseline; + protected _trim: boolean; + protected _whiteSpace: TextStyleWhiteSpace; + protected _wordWrap: boolean; + protected _wordWrapWidth: number; + protected _leading: number; + /** + * @param {object} [style] - The style parameters + * @param {string} [style.align='left'] - Alignment for multiline text ('left', 'center' or 'right'), + * does not affect single line text + * @param {boolean} [style.breakWords=false] - Indicates if lines can be wrapped within words, it + * needs wordWrap to be set to true + * @param {boolean} [style.dropShadow=false] - Set a drop shadow for the text + * @param {number} [style.dropShadowAlpha=1] - Set alpha for the drop shadow + * @param {number} [style.dropShadowAngle=Math.PI/6] - Set a angle of the drop shadow + * @param {number} [style.dropShadowBlur=0] - Set a shadow blur radius + * @param {string|number} [style.dropShadowColor='black'] - A fill style to be used on the dropshadow e.g 'red', '#00FF00' + * @param {number} [style.dropShadowDistance=5] - Set a distance of the drop shadow + * @param {string|string[]|number|number[]|CanvasGradient|CanvasPattern} [style.fill='black'] - A canvas + * fillstyle that will be used on the text e.g 'red', '#00FF00'. Can be an array to create a gradient + * eg ['#000000','#FFFFFF'] + * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN} + * @param {number} [style.fillGradientType=PIXI.TEXT_GRADIENT.LINEAR_VERTICAL] - If fill is an array of colours + * to create a gradient, this can change the type/direction of the gradient. See {@link PIXI.TEXT_GRADIENT} + * @param {number[]} [style.fillGradientStops] - If fill is an array of colours to create a gradient, this array can set + * the stop points (numbers between 0 and 1) for the color, overriding the default behaviour of evenly spacing them. + * @param {string|string[]} [style.fontFamily='Arial'] - The font family + * @param {number|string} [style.fontSize=26] - The font size (as a number it converts to px, but as a string, + * equivalents are '26px','20pt','160%' or '1.6em') + * @param {string} [style.fontStyle='normal'] - The font style ('normal', 'italic' or 'oblique') + * @param {string} [style.fontVariant='normal'] - The font variant ('normal' or 'small-caps') + * @param {string} [style.fontWeight='normal'] - The font weight ('normal', 'bold', 'bolder', 'lighter' and '100', + * '200', '300', '400', '500', '600', '700', '800' or '900') + * @param {number} [style.leading=0] - The space between lines + * @param {number} [style.letterSpacing=0] - The amount of spacing between letters, default is 0 + * @param {number} [style.lineHeight] - The line height, a number that represents the vertical space that a letter uses + * @param {string} [style.lineJoin='miter'] - The lineJoin property sets the type of corner created, it can resolve + * spiked text issues. Possible values "miter" (creates a sharp corner), "round" (creates a round corner) or "bevel" + * (creates a squared corner). + * @param {number} [style.miterLimit=10] - The miter limit to use when using the 'miter' lineJoin mode. This can reduce + * or increase the spikiness of rendered text. + * @param {number} [style.padding=0] - Occasionally some fonts are cropped. Adding some padding will prevent this from + * happening by adding padding to all sides of the text. + * @param {string|number} [style.stroke='black'] - A canvas fillstyle that will be used on the text stroke + * e.g 'blue', '#FCFF00' + * @param {number} [style.strokeThickness=0] - A number that represents the thickness of the stroke. + * Default is 0 (no stroke) + * @param {boolean} [style.trim=false] - Trim transparent borders + * @param {string} [style.textBaseline='alphabetic'] - The baseline of the text that is rendered. + * @param {string} [style.whiteSpace='pre'] - Determines whether newlines & spaces are collapsed or preserved "normal" + * (collapse, collapse), "pre" (preserve, preserve) | "pre-line" (preserve, collapse). It needs wordWrap to be set to true + * @param {boolean} [style.wordWrap=false] - Indicates if word wrap should be used + * @param {number} [style.wordWrapWidth=100] - The width at which text will wrap, it needs wordWrap to be set to true + */ + constructor(style?: Partial); + /** + * Creates a new TextStyle object with the same values as this one. + * Note that the only the properties of the object are cloned. + * + * @return New cloned TextStyle object + */ + clone(): TextStyle; + /** Resets all properties to the defaults specified in TextStyle.prototype._default */ + reset(): void; + /** + * Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text + * + * @member {string} + */ + get align(): TextStyleAlign; + set align(align: TextStyleAlign); + /** Indicates if lines can be wrapped within words, it needs wordWrap to be set to true. */ + get breakWords(): boolean; + set breakWords(breakWords: boolean); + /** Set a drop shadow for the text. */ + get dropShadow(): boolean; + set dropShadow(dropShadow: boolean); + /** Set alpha for the drop shadow. */ + get dropShadowAlpha(): number; + set dropShadowAlpha(dropShadowAlpha: number); + /** Set a angle of the drop shadow. */ + get dropShadowAngle(): number; + set dropShadowAngle(dropShadowAngle: number); + /** Set a shadow blur radius. */ + get dropShadowBlur(): number; + set dropShadowBlur(dropShadowBlur: number); + /** A fill style to be used on the dropshadow e.g 'red', '#00FF00'. */ + get dropShadowColor(): number | string; + set dropShadowColor(dropShadowColor: number | string); + /** Set a distance of the drop shadow. */ + get dropShadowDistance(): number; + set dropShadowDistance(dropShadowDistance: number); + /** + * A canvas fillstyle that will be used on the text e.g 'red', '#00FF00'. + * + * Can be an array to create a gradient eg ['#000000','#FFFFFF'] + * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN} + * + * @member {string|string[]|number|number[]|CanvasGradient|CanvasPattern} + */ + get fill(): TextStyleFill; + set fill(fill: TextStyleFill); + /** + * If fill is an array of colours to create a gradient, this can change the type/direction of the gradient. + * + * @see PIXI.TEXT_GRADIENT + */ + get fillGradientType(): TEXT_GRADIENT; + set fillGradientType(fillGradientType: TEXT_GRADIENT); + /** + * If fill is an array of colours to create a gradient, this array can set the stop points + * (numbers between 0 and 1) for the color, overriding the default behaviour of evenly spacing them. + */ + get fillGradientStops(): number[]; + set fillGradientStops(fillGradientStops: number[]); + /** The font family. */ + get fontFamily(): string | string[]; + set fontFamily(fontFamily: string | string[]); + /** + * The font size + * (as a number it converts to px, but as a string, equivalents are '26px','20pt','160%' or '1.6em') + */ + get fontSize(): number | string; + set fontSize(fontSize: number | string); + /** + * The font style + * ('normal', 'italic' or 'oblique') + * + * @member {string} + */ + get fontStyle(): TextStyleFontStyle; + set fontStyle(fontStyle: TextStyleFontStyle); + /** + * The font variant + * ('normal' or 'small-caps') + * + * @member {string} + */ + get fontVariant(): TextStyleFontVariant; + set fontVariant(fontVariant: TextStyleFontVariant); + /** + * The font weight + * ('normal', 'bold', 'bolder', 'lighter' and '100', '200', '300', '400', '500', '600', '700', 800' or '900') + * + * @member {string} + */ + get fontWeight(): TextStyleFontWeight; + set fontWeight(fontWeight: TextStyleFontWeight); + /** The amount of spacing between letters, default is 0. */ + get letterSpacing(): number; + set letterSpacing(letterSpacing: number); + /** The line height, a number that represents the vertical space that a letter uses. */ + get lineHeight(): number; + set lineHeight(lineHeight: number); + /** The space between lines. */ + get leading(): number; + set leading(leading: number); + /** + * The lineJoin property sets the type of corner created, it can resolve spiked text issues. + * Default is 'miter' (creates a sharp corner). + * + * @member {string} + */ + get lineJoin(): TextStyleLineJoin; + set lineJoin(lineJoin: TextStyleLineJoin); + /** + * The miter limit to use when using the 'miter' lineJoin mode. + * + * This can reduce or increase the spikiness of rendered text. + */ + get miterLimit(): number; + set miterLimit(miterLimit: number); + /** + * Occasionally some fonts are cropped. Adding some padding will prevent this from happening + * by adding padding to all sides of the text. + */ + get padding(): number; + set padding(padding: number); + /** + * A canvas fillstyle that will be used on the text stroke + * e.g 'blue', '#FCFF00' + */ + get stroke(): string | number; + set stroke(stroke: string | number); + /** + * A number that represents the thickness of the stroke. + * + * @default 0 + */ + get strokeThickness(): number; + set strokeThickness(strokeThickness: number); + /** + * The baseline of the text that is rendered. + * + * @member {string} + */ + get textBaseline(): TextStyleTextBaseline; + set textBaseline(textBaseline: TextStyleTextBaseline); + /** Trim transparent borders. */ + get trim(): boolean; + set trim(trim: boolean); + /** + * How newlines and spaces should be handled. + * Default is 'pre' (preserve, preserve). + * + * value | New lines | Spaces + * --- | --- | --- + * 'normal' | Collapse | Collapse + * 'pre' | Preserve | Preserve + * 'pre-line' | Preserve | Collapse + * + * @member {string} + */ + get whiteSpace(): TextStyleWhiteSpace; + set whiteSpace(whiteSpace: TextStyleWhiteSpace); + /** Indicates if word wrap should be used. */ + get wordWrap(): boolean; + set wordWrap(wordWrap: boolean); + /** The width at which text will wrap, it needs wordWrap to be set to true. */ + get wordWrapWidth(): number; + set wordWrapWidth(wordWrapWidth: number); + /** + * Generates a font style string to use for `TextMetrics.measureFont()`. + * + * @return Font style string, for passing to `TextMetrics.measureFont()` + */ + toFontString(): string; +} + +export declare type TextStyleAlign = 'left' | 'center' | 'right' | 'justify'; + +export declare type TextStyleFill = string | string[] | number | number[] | CanvasGradient | CanvasPattern; + +export declare type TextStyleFontStyle = 'normal' | 'italic' | 'oblique'; + +export declare type TextStyleFontVariant = 'normal' | 'small-caps'; + +export declare type TextStyleFontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; + +export declare type TextStyleLineJoin = 'miter' | 'round' | 'bevel'; + +export declare type TextStyleTextBaseline = 'alphabetic' | 'top' | 'hanging' | 'middle' | 'ideographic' | 'bottom'; + +export declare type TextStyleWhiteSpace = 'normal' | 'pre' | 'pre-line'; + +export { } diff --git a/Typescript/types/pixi/ticker/global.d.ts b/Typescript/types/pixi/ticker/global.d.ts new file mode 100644 index 0000000..33ddfed --- /dev/null +++ b/Typescript/types/pixi/ticker/global.d.ts @@ -0,0 +1,15 @@ +declare namespace GlobalMixins +{ + interface Application + { + ticker: import('pixi/ticker').Ticker; + stop(): void; + start(): void; + } + + interface IApplicationOptions + { + autoStart?: boolean; + sharedTicker?: boolean; + } +} diff --git a/Typescript/types/pixi/ticker/index.d.ts b/Typescript/types/pixi/ticker/index.d.ts new file mode 100644 index 0000000..7789973 --- /dev/null +++ b/Typescript/types/pixi/ticker/index.d.ts @@ -0,0 +1,329 @@ +/// + +import type { ExtensionMetadata } from 'pixi/extensions'; + +/** + * A Ticker class that runs an update loop that other objects listen to. + * + * This class is composed around listeners meant for execution on the next requested animation frame. + * Animation frames are requested only when necessary, e.g. When the ticker is started and the emitter has listeners. + * @class + * @memberof PIXI + */ +export declare class Ticker { + /** The private shared ticker instance */ + private static _shared; + /** The private system ticker instance */ + private static _system; + /** + * Whether or not this ticker should invoke the method + * {@link PIXI.Ticker#start} automatically + * when a listener is added. + */ + autoStart: boolean; + /** + * Scalar time value from last frame to this frame. + * This value is capped by setting {@link PIXI.Ticker#minFPS} + * and is scaled with {@link PIXI.Ticker#speed}. + * **Note:** The cap may be exceeded by scaling. + */ + deltaTime: number; + /** + * Scaler time elapsed in milliseconds from last frame to this frame. + * This value is capped by setting {@link PIXI.Ticker#minFPS} + * and is scaled with {@link PIXI.Ticker#speed}. + * **Note:** The cap may be exceeded by scaling. + * If the platform supports DOMHighResTimeStamp, + * this value will have a precision of 1 µs. + * Defaults to target frame time + * @default 16.66 + */ + deltaMS: number; + /** + * Time elapsed in milliseconds from last frame to this frame. + * Opposed to what the scalar {@link PIXI.Ticker#deltaTime} + * is based, this value is neither capped nor scaled. + * If the platform supports DOMHighResTimeStamp, + * this value will have a precision of 1 µs. + * Defaults to target frame time + * @default 16.66 + */ + elapsedMS: number; + /** + * The last time {@link PIXI.Ticker#update} was invoked. + * This value is also reset internally outside of invoking + * update, but only when a new animation frame is requested. + * If the platform supports DOMHighResTimeStamp, + * this value will have a precision of 1 µs. + */ + lastTime: number; + /** + * Factor of current {@link PIXI.Ticker#deltaTime}. + * @example + * // Scales ticker.deltaTime to what would be + * // the equivalent of approximately 120 FPS + * ticker.speed = 2; + */ + speed: number; + /** + * Whether or not this ticker has been started. + * `true` if {@link PIXI.Ticker#start} has been called. + * `false` if {@link PIXI.Ticker#stop} has been called. + * While `false`, this value may change to `true` in the + * event of {@link PIXI.Ticker#autoStart} being `true` + * and a listener is added. + */ + started: boolean; + /** The first listener. All new listeners added are chained on this. */ + private _head; + /** Internal current frame request ID */ + private _requestId; + /** + * Internal value managed by minFPS property setter and getter. + * This is the maximum allowed milliseconds between updates. + */ + private _maxElapsedMS; + /** + * Internal value managed by minFPS property setter and getter. + * This is the minimum allowed milliseconds between updates. + */ + private _minElapsedMS; + /** If enabled, deleting is disabled.*/ + private _protected; + /** The last time keyframe was executed. Maintains a relatively fixed interval with the previous value. */ + private _lastFrame; + /** + * Internal tick method bound to ticker instance. + * This is because in early 2015, Function.bind + * is still 60% slower in high performance scenarios. + * Also separating frame requests from update method + * so listeners may be called at any time and with + * any animation API, just invoke ticker.update(time). + * @param time - Time since last tick. + */ + private _tick; + constructor(); + /** + * Conditionally requests a new animation frame. + * If a frame has not already been requested, and if the internal + * emitter has listeners, a new frame is requested. + * @private + */ + private _requestIfNeeded; + /** + * Conditionally cancels a pending animation frame. + * @private + */ + private _cancelIfNeeded; + /** + * Conditionally requests a new animation frame. + * If the ticker has been started it checks if a frame has not already + * been requested, and if the internal emitter has listeners. If these + * conditions are met, a new frame is requested. If the ticker has not + * been started, but autoStart is `true`, then the ticker starts now, + * and continues with the previous conditions to request a new frame. + * @private + */ + private _startIfPossible; + /** + * Register a handler for tick events. Calls continuously unless + * it is removed or the ticker is stopped. + * @param fn - The listener function to be added for updates + * @param context - The listener context + * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting + * @returns This instance of a ticker + */ + add(fn: TickerCallback, context?: T, priority?: UPDATE_PRIORITY): this; + /** + * Add a handler for the tick event which is only execute once. + * @param fn - The listener function to be added for one update + * @param context - The listener context + * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting + * @returns This instance of a ticker + */ + addOnce(fn: TickerCallback, context?: T, priority?: UPDATE_PRIORITY): this; + /** + * Internally adds the event handler so that it can be sorted by priority. + * Priority allows certain handler (user, AnimatedSprite, Interaction) to be run + * before the rendering. + * @private + * @param listener - Current listener being added. + * @returns This instance of a ticker + */ + private _addListener; + /** + * Removes any handlers matching the function and context parameters. + * If no handlers are left after removing, then it cancels the animation frame. + * @param fn - The listener function to be removed + * @param context - The listener context to be removed + * @returns This instance of a ticker + */ + remove(fn: TickerCallback, context?: T): this; + /** + * The number of listeners on this ticker, calculated by walking through linked list + * @readonly + * @member {number} + */ + get count(): number; + /** Starts the ticker. If the ticker has listeners a new animation frame is requested at this point. */ + start(): void; + /** Stops the ticker. If the ticker has requested an animation frame it is canceled at this point. */ + stop(): void; + /** Destroy the ticker and don't use after this. Calling this method removes all references to internal events. */ + destroy(): void; + /** + * Triggers an update. An update entails setting the + * current {@link PIXI.Ticker#elapsedMS}, + * the current {@link PIXI.Ticker#deltaTime}, + * invoking all listeners with current deltaTime, + * and then finally setting {@link PIXI.Ticker#lastTime} + * with the value of currentTime that was provided. + * This method will be called automatically by animation + * frame callbacks if the ticker instance has been started + * and listeners are added. + * @param {number} [currentTime=performance.now()] - the current time of execution + */ + update(currentTime?: number): void; + /** + * The frames per second at which this ticker is running. + * The default is approximately 60 in most modern browsers. + * **Note:** This does not factor in the value of + * {@link PIXI.Ticker#speed}, which is specific + * to scaling {@link PIXI.Ticker#deltaTime}. + * @member {number} + * @readonly + */ + get FPS(): number; + /** + * Manages the maximum amount of milliseconds allowed to + * elapse between invoking {@link PIXI.Ticker#update}. + * This value is used to cap {@link PIXI.Ticker#deltaTime}, + * but does not effect the measured value of {@link PIXI.Ticker#FPS}. + * When setting this property it is clamped to a value between + * `0` and `PIXI.settings.TARGET_FPMS * 1000`. + * @member {number} + * @default 10 + */ + get minFPS(): number; + set minFPS(fps: number); + /** + * Manages the minimum amount of milliseconds required to + * elapse between invoking {@link PIXI.Ticker#update}. + * This will effect the measured value of {@link PIXI.Ticker#FPS}. + * If it is set to `0`, then there is no limit; PixiJS will render as many frames as it can. + * Otherwise it will be at least `minFPS` + * @member {number} + * @default 0 + */ + get maxFPS(): number; + set maxFPS(fps: number); + /** + * The shared ticker instance used by {@link PIXI.AnimatedSprite} and by + * {@link PIXI.VideoResource} to update animation frames / video textures. + * + * It may also be used by {@link PIXI.Application} if created with the `sharedTicker` option property set to true. + * + * The property {@link PIXI.Ticker#autoStart} is set to `true` for this instance. + * Please follow the examples for usage, including how to opt-out of auto-starting the shared ticker. + * @example + * let ticker = PIXI.Ticker.shared; + * // Set this to prevent starting this ticker when listeners are added. + * // By default this is true only for the PIXI.Ticker.shared instance. + * ticker.autoStart = false; + * // FYI, call this to ensure the ticker is stopped. It should be stopped + * // if you have not attempted to render anything yet. + * ticker.stop(); + * // Call this when you are ready for a running shared ticker. + * ticker.start(); + * @example + * // You may use the shared ticker to render... + * let renderer = PIXI.autoDetectRenderer(); + * let stage = new PIXI.Container(); + * document.body.appendChild(renderer.view); + * ticker.add(function (time) { + * renderer.render(stage); + * }); + * @example + * // Or you can just update it manually. + * ticker.autoStart = false; + * ticker.stop(); + * function animate(time) { + * ticker.update(time); + * renderer.render(stage); + * requestAnimationFrame(animate); + * } + * animate(performance.now()); + * @member {PIXI.Ticker} + * @static + */ + static get shared(): Ticker; + /** + * The system ticker instance used by {@link PIXI.InteractionManager} and by + * {@link PIXI.BasePrepare} for core timing functionality that shouldn't usually need to be paused, + * unlike the `shared` ticker which drives visual animations and rendering which may want to be paused. + * + * The property {@link PIXI.Ticker#autoStart} is set to `true` for this instance. + * @member {PIXI.Ticker} + * @static + */ + static get system(): Ticker; +} + +export declare type TickerCallback = (this: T, dt: number) => any; + +/** + * Middleware for for Application Ticker. + * @example + * import {TickerPlugin} from 'pixi/ticker'; + * import {Application} from 'pixi/app'; + * import {extensions} from 'pixi/extensions'; + * extensions.add(TickerPlugin); + * @class + * @memberof PIXI + */ +export declare class TickerPlugin { + /** @ignore */ + static extension: ExtensionMetadata; + static start: () => void; + static stop: () => void; + static _ticker: Ticker; + static ticker: Ticker; + /** + * Initialize the plugin with scope of application instance + * @static + * @private + * @param {object} [options] - See application options + */ + static init(options?: GlobalMixins.IApplicationOptions): void; + /** + * Clean up the ticker, scoped to application. + * @static + * @private + */ + static destroy(): void; +} + +/** + * Represents the update priorities used by internal PIXI classes when registered with + * the {@link PIXI.Ticker} object. Higher priority items are updated first and lower + * priority items, such as render, should go later. + * @static + * @constant + * @name UPDATE_PRIORITY + * @memberof PIXI + * @enum {number} + * @property {number} [INTERACTION=50] Highest priority, used for {@link PIXI.InteractionManager} + * @property {number} [HIGH=25] High priority updating, {@link PIXI.VideoBaseTexture} and {@link PIXI.AnimatedSprite} + * @property {number} [NORMAL=0] Default priority for ticker events, see {@link PIXI.Ticker#add}. + * @property {number} [LOW=-25] Low priority used for {@link PIXI.Application} rendering. + * @property {number} [UTILITY=-50] Lowest priority used for {@link PIXI.BasePrepare} utility. + */ +export declare enum UPDATE_PRIORITY { + INTERACTION = 50, + HIGH = 25, + NORMAL = 0, + LOW = -25, + UTILITY = -50 +} + +export { } diff --git a/Typescript/types/pixi/unsafe-eval/index.d.ts b/Typescript/types/pixi/unsafe-eval/index.d.ts new file mode 100644 index 0000000..ac8b471 --- /dev/null +++ b/Typescript/types/pixi/unsafe-eval/index.d.ts @@ -0,0 +1,9 @@ +import type { ShaderSystem } from 'pixi/core'; + +export declare function install({ ShaderSystem }: PIXICore): void; + +declare interface PIXICore { + ShaderSystem: typeof ShaderSystem; +} + +export { } diff --git a/Typescript/types/pixi/utils/index.d.ts b/Typescript/types/pixi/utils/index.d.ts new file mode 100644 index 0000000..b565279 --- /dev/null +++ b/Typescript/types/pixi/utils/index.d.ts @@ -0,0 +1,522 @@ +import type { BaseTexture } from 'pixi/core'; +import { default as earcut_2 } from 'earcut'; +import EventEmitter from 'eventemitter3'; +import { isMobile } from 'pixi/settings'; +import type { ITypedArray } from 'pixi/core'; +import type { Program } from 'pixi/core'; +import type { Texture } from 'pixi/core'; + +export declare type ArrayFixed = [T, ...Array] & { + length: L; +}; + +/** + * @todo Describe property usage + * @static + * @name BaseTextureCache + * @memberof PIXI.utils + * @type {object} + */ +export declare const BaseTextureCache: { + [key: string]: BaseTexture; +}; + +/** + * Creates a Canvas element of the given size to be used as a target for rendering to. + * @class + * @memberof PIXI.utils + */ +export declare class CanvasRenderTarget { + /** The Canvas object that belongs to this CanvasRenderTarget. */ + canvas: HTMLCanvasElement; + /** A CanvasRenderingContext2D object representing a two-dimensional rendering context. */ + context: CanvasRenderingContext2D; + /** + * The resolution / device pixel ratio of the canvas + * @default 1 + */ + resolution: number; + /** + * @param width - the width for the newly created canvas + * @param height - the height for the newly created canvas + * @param {number} [resolution=PIXI.settings.RESOLUTION] - The resolution / device pixel ratio of the canvas + */ + constructor(width: number, height: number, resolution?: number); + /** + * Clears the canvas that was created by the CanvasRenderTarget class. + * @private + */ + clear(): void; + /** + * Resizes the canvas to the specified width and height. + * @param desiredWidth - the desired width of the canvas + * @param desiredHeight - the desired height of the canvas + */ + resize(desiredWidth: number, desiredHeight: number): void; + /** Destroys this canvas. */ + destroy(): void; + /** + * The width of the canvas buffer in pixels. + * @member {number} + */ + get width(): number; + set width(val: number); + /** + * The height of the canvas buffer in pixels. + * @member {number} + */ + get height(): number; + set height(val: number); +} + +/** + * Removes all textures from cache, but does not destroy them + * @memberof PIXI.utils + * @function clearTextureCache + */ +export declare function clearTextureCache(): void; + +/** + * changes blendMode according to texture format + * @memberof PIXI.utils + * @function correctBlendMode + * @param {number} blendMode - supposed blend mode + * @param {boolean} premultiplied - whether source is premultiplied + * @returns {number} true blend mode for this texture + */ +export declare function correctBlendMode(blendMode: number, premultiplied: boolean): number; + +/** + * Generic Mask Stack data structure + * @memberof PIXI.utils + * @function createIndicesForQuads + * @param {number} size - Number of quads + * @param {Uint16Array|Uint32Array} [outBuffer] - Buffer for output, length has to be `6 * size` + * @returns {Uint16Array|Uint32Array} - Resulting index buffer + */ +export declare function createIndicesForQuads(size: number, outBuffer?: Uint16Array | Uint32Array): Uint16Array | Uint32Array; + +/** + * Regexp for data URI. + * Based on: {@link https://github.com/ragingwind/data-uri-regex} + * @static + * @constant {RegExp|string} DATA_URI + * @memberof PIXI + * @example data:image/png;base64 + */ +export declare const DATA_URI: RegExp; + +/** + * @memberof PIXI.utils + * @interface DecomposedDataUri + */ +/** + * type, eg. `image` + * @memberof PIXI.utils.DecomposedDataUri# + * @member {string} mediaType + */ +/** + * Sub type, eg. `png` + * @memberof PIXI.utils.DecomposedDataUri# + * @member {string} subType + */ +/** + * @memberof PIXI.utils.DecomposedDataUri# + * @member {string} charset + */ +/** + * Data encoding, eg. `base64` + * @memberof PIXI.utils.DecomposedDataUri# + * @member {string} encoding + */ +/** + * The actual data + * @memberof PIXI.utils.DecomposedDataUri# + * @member {string} data + */ +/** + * Split a data URI into components. Returns undefined if + * parameter `dataUri` is not a valid data URI. + * @memberof PIXI.utils + * @function decomposeDataUri + * @param {string} dataUri - the data URI to check + * @returns {PIXI.utils.DecomposedDataUri|undefined} The decomposed data uri or undefined + */ +export declare function decomposeDataUri(dataUri: string): DecomposedDataUri; + +export declare interface DecomposedDataUri { + mediaType: string; + subType: string; + charset: string; + encoding: string; + data: string; +} + +/** + * Helper for warning developers about deprecated features & settings. + * A stack track for warnings is given; useful for tracking-down where + * deprecated methods/properties/classes are being used within the code. + * @memberof PIXI.utils + * @function deprecation + * @param {string} version - The version where the feature became deprecated + * @param {string} message - Message should include what is deprecated, where, and the new solution + * @param {number} [ignoreDepth=3] - The number of steps to ignore at the top of the error stack + * this is mostly to ignore internal deprecation calls. + */ +export declare function deprecation(version: string, message: string, ignoreDepth?: number): void; + +/** + * Destroys all texture in the cache + * @memberof PIXI.utils + * @function destroyTextureCache + */ +export declare function destroyTextureCache(): void; + +/** + * Sets the `crossOrigin` property for this resource based on if the url + * for this resource is cross-origin. If crossOrigin was manually set, this + * function does nothing. + * Nipped from the resource loader! + * @ignore + * @param {string} url - The url to test. + * @param {object} [loc=window.location] - The location object to test against. + * @returns {string} The crossOrigin value to use (or empty string for none). + */ +export declare function determineCrossOrigin(url: string, loc?: Location): string; + +export declare type Dict = { + [key: string]: T; +}; + +export { earcut_2 as earcut } + +export { EventEmitter } + +declare type FormatFunction = { + (URL: URL, options?: URLFormatOptions): string; + (urlObject: UrlObject | string): string; +}; + +export declare function getBufferType(array: ITypedArray): 'Float32Array' | 'Uint32Array' | 'Int32Array' | 'Uint16Array' | 'Uint8Array' | null; + +/** + * get the resolution / device pixel ratio of an asset by looking for the prefix + * used by spritesheets and image urls + * @memberof PIXI.utils + * @function getResolutionOfUrl + * @param {string} url - the image path + * @param {number} [defaultValue=1] - the defaultValue if no filename prefix is set. + * @returns {number} resolution / device pixel ratio of an asset + */ +export declare function getResolutionOfUrl(url: string, defaultValue?: number): number; + +/** + * Converts a hexadecimal color number to an [R, G, B] array of normalized floats (numbers from 0.0 to 1.0). + * @example + * PIXI.utils.hex2rgb(0xffffff); // returns [1, 1, 1] + * @memberof PIXI.utils + * @function hex2rgb + * @param {number} hex - The hexadecimal number to convert + * @param {number[]} [out=[]] - If supplied, this array will be used rather than returning a new one + * @returns {number[]} An array representing the [R, G, B] of the color where all values are floats. + */ +export declare function hex2rgb(hex: number, out?: Array | Float32Array): Array | Float32Array; + +/** + * Converts a hexadecimal color number to a string. + * @example + * PIXI.utils.hex2string(0xffffff); // returns "#ffffff" + * @memberof PIXI.utils + * @function hex2string + * @param {number} hex - Number in hex (e.g., `0xffffff`) + * @returns {string} The string color (e.g., `"#ffffff"`). + */ +export declare function hex2string(hex: number): string; + +export declare function interleaveTypedArrays(arrays: PackedArray[], sizes: number[]): Float32Array; + +export { isMobile } + +/** + * Checks if a number is a power of two. + * @function isPow2 + * @memberof PIXI.utils + * @param {number} v - input value + * @returns {boolean} `true` if value is power of two + */ +export declare function isPow2(v: number): boolean; + +/** + * Helper for checking for WebGL support. + * @memberof PIXI.utils + * @function isWebGLSupported + * @returns {boolean} Is WebGL supported. + */ +export declare function isWebGLSupported(): boolean; + +/** + * Computes ceil of log base 2 + * @function log2 + * @memberof PIXI.utils + * @param {number} v - input value + * @returns {number} logarithm base 2 + */ +export declare function log2(v: number): number; + +/** + * Rounds to next power of two. + * @function nextPow2 + * @memberof PIXI.utils + * @param {number} v - input value + * @returns {number} - next rounded power of two + */ +export declare function nextPow2(v: number): number; + +declare type PackedArray = Float32Array | Uint32Array | Int32Array | Uint8Array; + +/** + * This file contains redeclared types for Node `url` and `querystring` modules. These modules + * don't provide their own typings but instead are a part of the full Node typings. The purpose of + * this file is to redeclare the required types to avoid having the whole Node types as a + * dependency. + */ +declare interface ParsedUrlQuery { + [key: string]: string | string[]; +} + +declare interface ParsedUrlQueryInput { + [key: string]: unknown; +} + +declare type ParseFunction = { + (urlStr: string): UrlWithStringQuery; + (urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery; + (urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + (urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; +}; + +export declare interface Path { + toPosix: (path: string) => string; + toAbsolute: (url: string, baseUrl?: string, rootUrl?: string) => string; + isUrl: (path: string) => boolean; + isDataUrl: (path: string) => boolean; + hasProtocol: (path: string) => boolean; + getProtocol: (path: string) => string; + normalize: (path: string) => string; + join: (...paths: string[]) => string; + isAbsolute: (path: string) => boolean; + dirname: (path: string) => string; + rootname: (path: string) => string; + basename: (path: string, ext?: string) => string; + extname: (path: string) => string; + parse: (path: string) => { + root?: string; + dir?: string; + base?: string; + ext?: string; + name?: string; + }; + sep: string; + delimiter: string; +} + +export declare const path: Path; + +/** + * maps premultiply flag and blendMode to adjusted blendMode + * @memberof PIXI.utils + * @constant premultiplyBlendMode + * @type {Array} + */ +export declare const premultiplyBlendMode: number[][]; + +/** + * combines rgb and alpha to out array + * @memberof PIXI.utils + * @function premultiplyRgba + * @param {Float32Array|number[]} rgb - input rgb + * @param {number} alpha - alpha param + * @param {Float32Array} [out] - output + * @param {boolean} [premultiply=true] - do premultiply it + * @returns {Float32Array} vec4 rgba + */ +export declare function premultiplyRgba(rgb: Float32Array | number[], alpha: number, out?: Float32Array, premultiply?: boolean): Float32Array; + +/** + * premultiplies tint + * @memberof PIXI.utils + * @function premultiplyTint + * @param {number} tint - integer RGB + * @param {number} alpha - floating point alpha (0.0-1.0) + * @returns {number} tint multiplied by alpha + */ +export declare function premultiplyTint(tint: number, alpha: number): number; + +/** + * converts integer tint and float alpha to vec4 form, premultiplies by default + * @memberof PIXI.utils + * @function premultiplyTintToRgba + * @param {number} tint - input tint + * @param {number} alpha - alpha param + * @param {Float32Array} [out] - output + * @param {boolean} [premultiply=true] - do premultiply it + * @returns {Float32Array} vec4 rgba + */ +export declare function premultiplyTintToRgba(tint: number, alpha: number, out: Float32Array, premultiply?: boolean): Float32Array; + +/** + * @todo Describe property usage + * @static + * @name ProgramCache + * @memberof PIXI.utils + * @type {object} + */ +export declare const ProgramCache: { + [key: string]: Program; +}; + +/** + * Remove items from a javascript array without generating garbage + * @function removeItems + * @memberof PIXI.utils + * @param {Array} arr - Array to remove elements from + * @param {number} startIdx - starting index + * @param {number} removeCount - how many to remove + */ +export declare function removeItems(arr: any[], startIdx: number, removeCount: number): void; + +declare type ResolveFunction = { + (from: string, to: string): string; +}; + +/** + * Converts a color as an [R, G, B] array of normalized floats to a hexadecimal number. + * @example + * PIXI.utils.rgb2hex([1, 1, 1]); // returns 0xffffff, which is 16777215 as an integer + * @memberof PIXI.utils + * @function rgb2hex + * @param {number[]} rgb - Array of numbers where all values are normalized floats from 0.0 to 1.0. + * @returns {number} Number in hexadecimal. + */ +export declare function rgb2hex(rgb: number[] | Float32Array): number; + +/** + * Logs out the version and renderer information for this running instance of PIXI. + * If you don't want to see this message you can run `PIXI.utils.skipHello()` before + * creating your renderer. Keep in mind that doing that will forever make you a jerk face. + * @static + * @function sayHello + * @memberof PIXI.utils + * @param {string} type - The string renderer type to log. + */ +export declare function sayHello(type: string): void; + +/** + * Returns sign of number + * @memberof PIXI.utils + * @function sign + * @param {number} n - the number to check the sign of + * @returns {number} 0 if `n` is 0, -1 if `n` is negative, 1 if `n` is positive + */ +export declare function sign(n: number): -1 | 0 | 1; + +/** + * Skips the hello message of renderers that are created after this is run. + * @function skipHello + * @memberof PIXI.utils + */ +export declare function skipHello(): void; + +/** + * Converts a string to a hexadecimal color number. + * It can handle: + * hex strings starting with #: "#ffffff" + * hex strings starting with 0x: "0xffffff" + * hex strings without prefix: "ffffff" + * css colors: "black" + * @example + * PIXI.utils.string2hex("#ffffff"); // returns 0xffffff, which is 16777215 as an integer + * @memberof PIXI.utils + * @function string2hex + * @param {string} string - The string color (e.g., `"#ffffff"`) + * @returns {number} Number in hexadecimal. + */ +export declare function string2hex(string: string): number; + +/** + * @todo Describe property usage + * @static + * @name TextureCache + * @memberof PIXI.utils + * @type {object} + */ +export declare const TextureCache: { + [key: string]: Texture; +}; + +/** + * Trim transparent borders from a canvas + * @memberof PIXI.utils + * @function trimCanvas + * @param {HTMLCanvasElement} canvas - the canvas to trim + * @returns {object} Trim data + */ +export declare function trimCanvas(canvas: HTMLCanvasElement): { + width: number; + height: number; + data?: ImageData; +}; + +/** + * Gets the next unique identifier + * @memberof PIXI.utils + * @function uid + * @returns {number} The next unique identifier to use. + */ +export declare function uid(): number; + +declare interface Url extends UrlObjectCommon { + port?: string; + query?: string | null | ParsedUrlQuery; +} + +export declare const url: { + parse: ParseFunction; + format: FormatFunction; + resolve: ResolveFunction; +}; + +declare interface URLFormatOptions { + auth?: boolean; + fragment?: boolean; + search?: boolean; + unicode?: boolean; +} + +declare interface UrlObject extends UrlObjectCommon { + port?: string | number; + query?: string | null | ParsedUrlQueryInput; +} + +declare interface UrlObjectCommon { + auth?: string; + hash?: string; + host?: string; + hostname?: string; + href?: string; + path?: string; + pathname?: string; + protocol?: string; + search?: string; + slashes?: boolean; +} + +declare interface UrlWithParsedQuery extends Url { + query: ParsedUrlQuery; +} + +declare interface UrlWithStringQuery extends Url { + query: string | null; +} + +export { } diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..f867f95 --- /dev/null +++ b/action.yml @@ -0,0 +1,20 @@ +name: 'TSLint checks' +description: 'GitHub action that lints your code with TSLint (with Annotation support)' +author: 'Zimichev Dmitri' +inputs: + token: + description: 'Github Token' + required: true + project: + description: 'Path of TypeScript Project file' + config: + description: 'Path of TSLint configuration' + default: 'tslint.json' + pattern: + description: 'Glob pattern to match' +runs: + using: 'docker' + image: 'Dockerfile' +branding: + icon: 'code' + color: 'blue' \ No newline at end of file diff --git a/cli.js b/cli.js new file mode 100644 index 0000000..5e3951c --- /dev/null +++ b/cli.js @@ -0,0 +1,46 @@ +#!/usr/bin/env node +const path = require('path'); +const spawn = require('child_process').spawn; + +const argv = process.argv.slice(2); +let command = ''; +let commands = ['install', 'compiler', 'lint']; +let args = []; +argv.forEach((arg, index) => { + const [preName, value] = arg.split('=', 2); + if (String(preName).substr(0, 2) === '--') { + const name = preName.substr(2); + if (commands.indexOf(name) > -1) { + command = `cli/${name}.js`; + args = argv.slice(1 + index); + } + } +}); + +if (!command) { + throw new Error('Unknown command'); +} + +const proc = spawn( + process.execPath, + [path.join(__dirname, command), ...args], + {stdio: 'inherit'} +); + +// Wait for exit +proc.on('exit', (code, signal) => { + process.on('exit', () => { + if (signal) { + process.kill(process.pid, signal); + } else { + process.exit(code); + } + }); +}); + +// Terminate child on exit +process.on('SIGINT', () => { + proc.kill('SIGINT'); + proc.kill('SIGTERM'); + process.kill(process.pid, 'SIGINT'); +}); diff --git a/cli/compiler.js b/cli/compiler.js new file mode 100644 index 0000000..0891cff --- /dev/null +++ b/cli/compiler.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('typescript/lib/tsc'); diff --git a/cli/install.js b/cli/install.js new file mode 100644 index 0000000..e3c7efb --- /dev/null +++ b/cli/install.js @@ -0,0 +1,138 @@ +#!/usr/bin/env node +const fs = require('fs'); +const path = require('path'); +const logger = console; + +function unixify(str) { + return String(str).replace(/\\/g, '/'); +} + +function replaceTemplate(template, data) { + return String(template).replace(/\${([^}]+)}/, (match, name) => { + return name in data ? data[name] : ''; + }); +} + +async function copyWithPostProcessing(source, target, config, data) { + try { + return await new Promise((resolve, reject) => { + if (config.link) { + if (fs.existsSync(target)) { + fs.unlinkSync(target); + } + + fs.symlink(source, target, (err) => { + if (err) { + reject(err); + } + resolve(); + }); + } else { + fs.readFile(source, (err, buffer) => { + if (err) { + reject(err); + } + fs.writeFile( + target, + config.template ? replaceTemplate(buffer, data) : buffer, + (err) => { + if (err) { + reject(err); + } + resolve(); + } + ); + }); + } + }); + } catch (error) { + throw error; + } +} + +function getArgs() { + const args = {}; + process.argv.slice(2).forEach(arg => { + const [param, value] = arg.split('=', 2); + if (param.startsWith('--')) { + const name = param.substr(2); + args[name] = value; + } + }); + return args; +} + +const config = getArgs(); +const isDevelopmentMode = config.mode === 'development'; + +// Processing CLI arguments into options +const options = { + tsconfig: { + source: isDevelopmentMode ? 'configs/es5.dev.json' : 'configs/es5.json', + target: 'tsconfig.json', + link: true, + default: true + }, + tslib: { + source: 'tslib.js', + target: 'tslib.js', + link: true + }, + globalTypings: { + source: 'wasabyGlobalTypings.d.ts', + target: 'wasabyGlobalTypings.d.ts', + link: true, + default: true + }, + tslint: { + source: 'tslint/export.json', + target: 'tslint.json', + link: true, + default: true + } +}; + +Object.keys(config).forEach(name => { + if (name in options) { + const value = config[name]; + options[name].target = value; + options[name].default = value !== 'skip'; + + // Prevent copy for WS postinstall script + if (value.startsWith('WS.Core/')) { + options[name].link = false; + } + } +}); + +const source = path.resolve(__dirname, '..'); +const target = process.cwd(); + +let relativeSource = unixify(path.relative(target, source)); +if (!relativeSource.startsWith('.')) { + relativeSource = './' + relativeSource; +} + +// Copy files with replace +const data = { + nodePath: relativeSource +}; + +Object.keys(options).forEach((param) => { + const option = options[param]; + if (!option.default) { + return; + } + const sourceFile = option.source; + const targetFile = option.target; + const sourcePath = path.join(source, sourceFile); + const targetPath = path.isAbsolute(targetFile) ? targetFile : path.join(target, targetFile); + let message = `copying '${sourcePath}' to '${targetPath}'`; + + copyWithPostProcessing(sourcePath, targetPath, option, data).then(() => { + logger.log(`${message}: success.`); + }).catch((err) => { + logger.error(`${message}: fail.`); + logger.error(err.message); + }); +}); diff --git a/cli/lint.js b/cli/lint.js new file mode 100644 index 0000000..559e29a --- /dev/null +++ b/cli/lint.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node +// TODO: тут прогон еслинта должен быть в итоге +require('tslint/lib/tslintCli'); diff --git a/configs/es5-strict.json b/configs/es5-strict.json new file mode 100644 index 0000000..32750fb --- /dev/null +++ b/configs/es5-strict.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "alwaysStrict": true, + "baseUrl": ".", + "importHelpers": true, + "lib": ["dom", "es2020", "scripthost"], + "module": "amd", + "moduleResolution": "node", + "noUnusedLocals": true, + "downlevelIteration": true, + "paths": { + "Core/*": ["WS.Core/core/*"], + "Lib/*": ["WS.Core/lib/*"], + "Transport/*": ["WS.Core/transport/*"] + }, + "target": "es5", + "types" : ["requirejs"], + "jsx": "react-jsx", + "strict": true, + "strictPropertyInitialization": false, + "allowUnusedLabels": false, + "allowUnreachableCode": false, + "noUnusedParameters": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/configs/es5.dev.json b/configs/es5.dev.json new file mode 100644 index 0000000..3735a16 --- /dev/null +++ b/configs/es5.dev.json @@ -0,0 +1,8 @@ +{ + "extends": "./es5.json", + "compilerOptions": { + "baseUrl": ".", + "types": ["mocha", "requirejs", "jest"], + "moduleResolution": "node" + } +} diff --git a/configs/es5.json b/configs/es5.json new file mode 100644 index 0000000..46e1874 --- /dev/null +++ b/configs/es5.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "alwaysStrict": true, + "baseUrl": ".", + "importHelpers": true, + "lib": ["dom", "es2020", "scripthost"], + "module": "amd", + "moduleResolution": "node", + "downlevelIteration": true, + "paths": { + "Core/*": ["WS.Core/core/*"], + "Lib/*": ["WS.Core/lib/*"], + "Transport/*": ["WS.Core/transport/*"] + }, + "target": "es5", + "types" : ["requirejs"], + "jsx": "react-jsx" + } +} diff --git a/configs/es5.test.json b/configs/es5.test.json new file mode 100644 index 0000000..b081f2d --- /dev/null +++ b/configs/es5.test.json @@ -0,0 +1,7 @@ +{ + "extends": "./es5.json", + "compilerOptions": { + "baseUrl": ".", + "types": ["mocha", "requirejs", "jest"] + } +} diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..b0495a8 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh -l + +set -e + +NODE_PATH=/var/task/node_modules node /var/task/index.js \ No newline at end of file diff --git a/eslint/README.md b/eslint/README.md new file mode 100644 index 0000000..86e339e --- /dev/null +++ b/eslint/README.md @@ -0,0 +1,23 @@ +Here are different configurations for ESLint (.eslintrc): + +* "base" - configuration that is suitable for any js code (ES3, ES5, ES6+, node.js, unit tests). +* "es6" - configuration that forces you to use ES6+ (for example, const и let instead of var). +Inherited from "base". +* "node" - configuration for node.js projects. +Inherited from "es6". + +## Usage + +Install package and append the following lines to ".eslintrc": + + { + "extends": "./node_modules/saby-typescript/eslint/base" + } + +or + + { + "extends": "./node_modules/saby-typescript/eslint/node" + } + +Also you can override some settings in configuration (https://eslint.org/docs/user-guide/getting-started). diff --git a/eslint/base.js b/eslint/base.js new file mode 100644 index 0000000..c3bb5e5 --- /dev/null +++ b/eslint/base.js @@ -0,0 +1,123 @@ +'use strict'; + +const es6Rules = require('./rules/es6'); +const tsRules = require('./rules/ts'); +const tsxRules = require('./rules/tsx'); +const testTsxRules = require('./rules/test-tsx'); +const baseJSRules = require('./rules/basejs'); +const sbisRules = require('./rules/sbisRules'); + +// Configuration for any JS code: es5, es6+, node.js +module.exports = { + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 13, + sourceType: 'script' + }, + plugins: [ + '@typescript-eslint', + ], + env: { + browser: true, + node: true, + es6: true, + amd: true, + mocha: true, + jest: true, + jquery: true + }, + globals: { + rk: true + }, + rules: { + + // ВСЕ правила, что находятся здесь, совпадают и для js, и для ts. + // Если что-то не совпадает - в отдельный конфиг + + ...sbisRules, + + // Possible Errors + 'no-debugger': 'error', + 'no-empty': 'error', + 'no-unsafe-finally': 'error', + 'use-isnan': 'error', + + // Best Practices + 'dot-notation': ['error', { allowKeywords: true }], + eqeqeq: ['error', 'always', { null: 'ignore' }], + 'guard-for-in': 'error', + 'no-caller': 'error', + 'no-eval': 'error', + 'no-new-wrappers': 'error', + 'no-return-await': 'error', + 'no-sequences': 'error', + radix: 'error', + + // Variables + 'no-undef-init': 'error', + + // ECMAScript 6 + //--------------------- + // Settings that encourage us to write code incompatible with ES5 are in ./es6.js + 'constructor-super': 'error' + }, + overrides: [ + { + files: ['**/*.js', '**/*.es'], + rules: baseJSRules + }, + { + + // этот override должен быть ниже обычного js, чтобы перекрыть его + files: ['**/*.test.js', '**/*.case.js'], + rules: { + 'max-nested-callbacks': 'off' + } + }, + { + files: ['**/*.es'], + parserOptions: { + ecmaVersion: 9, + sourceType: 'module' + }, + rules: es6Rules + }, + { + files: ['**/*.ts', '**/*.tsx'], + rules: tsRules + }, + { + files: ['**/*.tsx'], + rules: tsxRules, + ecmaFeatures: { + jsx: true + }, + plugins: [ + 'react', + 'react-hooks' + ], + settings: { + react: { + pragma: 'React', + version: '17.0', + } + } + }, + { + files: ['**/*.test.tsx'], + rules: testTsxRules, + ecmaFeatures: { + jsx: true + }, + plugins: [ + 'testing-library' + ], + settings: { + react: { + pragma: 'React', + version: '17.0', + } + } + }, + ] +}; diff --git a/eslint/es6.js b/eslint/es6.js new file mode 100644 index 0000000..1d296aa --- /dev/null +++ b/eslint/es6.js @@ -0,0 +1,13 @@ +'use strict'; + +const es6Rules = require('./rules/es6'); + +// Configuration that forces us to use ES6+ +module.exports = { + extends: './base.js', + parserOptions: { + ecmaVersion: 9, + sourceType: 'module' + }, + rules: es6Rules +}; diff --git a/eslint/index.json b/eslint/index.json new file mode 100644 index 0000000..02bb9be --- /dev/null +++ b/eslint/index.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/saby-typescript/eslint/base.js" +} diff --git a/eslint/node.js b/eslint/node.js new file mode 100644 index 0000000..26fd92c --- /dev/null +++ b/eslint/node.js @@ -0,0 +1,40 @@ +'use strict'; + +// конфигурация для node.js проектов +module.exports = { + extends: './es6.js', + parserOptions: { + ecmaVersion: 9, + sourceType: 'script' + }, + env: { + browser: false, + node: true, + es6: true, + amd: false, + mocha: true, + jquery: false + }, + rules: { + strict: ['error', 'global'], + 'global-require': 'warn', + 'handle-callback-err': 'error', + 'no-buffer-constructor': 'warn', + 'no-new-require': 'warn', + 'no-path-concat': 'error', + 'no-sync': [ + 'warn', + { + 'allowAtRootLevel': true + } + ], + 'no-restricted-modules': [ + 'warn', + { + 'name': 'fs', + 'message': 'Please use fs-extra instead.' + } + ], + 'no-console': 'off' + } +}; diff --git a/eslint/rules/basejs.js b/eslint/rules/basejs.js new file mode 100644 index 0000000..38b152f --- /dev/null +++ b/eslint/rules/basejs.js @@ -0,0 +1,219 @@ +/** + * Базовые правила eslint для js + */ +const restrictedGlobals = require('confusing-browser-globals'); + +module.exports = { + + // Possible errors + 'no-redeclare': 'error', + 'no-unmodified-loop-condition': 'warn', + 'no-unused-expressions': [ + 'error', + { + allowShortCircuit: false, + allowTernary: false, + allowTaggedTemplates: false + } + ], + 'no-cond-assign': ['error', 'always'], + 'no-constant-condition': 'error', + 'no-unreachable': 'error', + 'no-void': 'error', + 'valid-typeof': ['error', { requireStringLiterals: true }], + 'for-direction': 'error', + 'getter-return': ['error', { allowImplicit: true }], + 'no-await-in-loop': 'error', + 'no-compare-neg-zero': 'error', + 'no-console': 'warn', + 'no-control-regex': 'error', + 'no-dupe-args': 'error', + 'no-dupe-keys': 'error', + 'no-duplicate-case': 'error', + 'no-empty-character-class': 'error', + 'no-ex-assign': 'error', + 'no-extra-boolean-cast': 'error', + 'no-func-assign': 'error', + 'no-inner-declarations': 'error', + 'no-invalid-regexp': 'error', + 'no-irregular-whitespace': 'error', + 'no-obj-calls': 'error', + 'no-prototype-builtins': 'off', + 'no-regex-spaces': 'error', + 'no-sparse-arrays': 'error', + 'no-template-curly-in-string': 'error', + 'no-unexpected-multiline': 'error', + 'no-unsafe-negation': 'error', + + // Best practices + 'no-undef': 'error', + 'no-labels': ['error', { allowLoop: false, allowSwitch: false }], + 'no-extra-label': 'error', + 'no-unused-labels': 'error', + 'no-invalid-this': 'warn', + 'no-throw-literal': 'error', + 'no-fallthrough': 'error', + curly: 'warn', + 'no-use-before-define': ['error', { functions: false, classes: true, variables: true }], + 'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat(restrictedGlobals), + 'accessor-pairs': 'off', + 'array-callback-return': ['error', { allowImplicit: true }], + 'block-scoped-var': 'error', + 'default-case': 'error', + 'max-classes-per-file': 'warn', + 'no-alert': 'warn', + 'no-case-declarations': 'error', + 'no-div-regex': 'off', + 'no-else-return': ['error', { allowElseIf: false }], + 'no-empty-function': 'error', + 'no-empty-pattern': 'error', + 'no-eq-null': 'off', + 'no-extend-native': 'error', + 'no-extra-bind': 'error', + 'no-global-assign': ['error', { exceptions: [] }], + 'no-implicit-coercion': 'off', + 'no-implicit-globals': 'off', + 'no-implied-eval': 'error', + 'no-iterator': 'error', + 'no-lone-blocks': 'error', + 'no-loop-func': 'error', + 'no-magic-numbers': 'off', + 'no-multi-str': 'error', + 'no-new': 'error', + 'no-new-func': 'error', + 'no-octal': 'error', + 'no-octal-escape': 'error', + 'no-param-reassign': 'error', + 'no-proto': 'error', + 'no-restricted-properties': [ + 'error', + { + property: '__defineGetter__', + message: 'Please use Object.defineProperty instead.' + }, + { + property: '__defineSetter__', + message: 'Please use Object.defineProperty instead.' + } + ], + 'no-return-assign': ['error', 'always'], + 'no-script-url': 'error', + 'no-self-assign': 'error', + 'no-self-compare': 'error', + 'no-useless-call': 'error', + 'no-useless-concat': 'error', + 'no-useless-escape': 'error', + 'no-useless-return': 'error', + 'no-warning-comments': 'off', + 'no-with': 'error', + 'prefer-promise-reject-errors': ['error', { allowEmptyReject: true }], + 'vars-on-top': 'off', + yoda: 'off', + 'init-declarations': 'off', + 'no-delete-var': 'error', + 'no-label-var': 'error', + 'no-shadow': 'error', + strict: 'off', + 'no-shadow-restricted-names': 'error', + 'no-undefined': 'off', + 'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }], + + // Node.js and CommonJS + // Settings are in ./node.js + 'callback-return': 'off', + 'global-require': 'off', + 'handle-callback-err': 'off', + 'no-buffer-constructor': 'off', + 'no-mixed-requires': 'off', + 'no-new-require': 'off', + 'no-path-concat': 'off', + 'no-process-env': 'off', + 'no-process-exit': 'off', + 'no-restricted-modules': 'off', + 'no-sync': 'off', + + // Stylistic issues + 'line-comment-position': [ + 'warn', + { + position: 'above' + } + ], + 'consistent-this': ['warn', 'self'], + 'id-match': [ + 'warn', + '^(_?\\$?[A-Za-z][a-zA-Z0-9]{0,31}|[A-Z][A-Z0-9_]{2,31}|\\$)$', + { + properties: true + } + ], + 'prefer-object-spread': 'off', + 'require-await': 'warn', + camelcase: 'off', + 'capitalized-comments': 'off', + 'func-name-matching': 'off', + 'func-names': 'off', + 'func-style': 'off', + 'id-blacklist': 'off', + 'id-length': 'off', + 'max-depth': 'off', + 'max-lines': 'off', + 'max-lines-per-function': 'off', + 'max-nested-callbacks': ['warn', 4], + 'max-params': 'off', + 'max-statements': 'off', + 'multiline-comment-style': 'off', + 'new-cap': 'warn', + 'no-array-constructor': 'warn', + 'no-bitwise': 'warn', + 'no-continue': 'off', + 'no-inline-comments': 'off', + 'no-lonely-if': 'warn', + 'no-multi-assign': 'warn', + 'no-negated-condition': 'off', + 'no-nested-ternary': 'off', + 'no-new-object': 'warn', + 'no-plusplus': 'off', + 'no-restricted-syntax': 'off', + 'no-ternary': 'off', + 'no-underscore-dangle': 'off', + 'no-unneeded-ternary': ['warn', { defaultAssignment: false }], + 'one-var': 'off', + 'operator-assignment': 'off', + 'require-jsdoc': 'off', + 'sort-vars': 'off', + 'unicode-bom': ['error', 'never'], + + // ECMAScript 6 + //--------------------- + // Settings that encourage us to write code incompatible with ES5 are in ./es6.js + 'no-useless-constructor': 'warn', + 'no-var': 'off', + 'object-shorthand': 'off', + 'no-class-assign': 'error', + 'no-const-assign': 'error', + 'no-dupe-class-members': 'error', + 'no-duplicate-imports': 'off', + 'no-new-symbol': 'error', + 'no-restricted-imports': 'off', + 'no-this-before-super': 'error', + 'no-useless-computed-key': 'warn', + 'no-useless-rename': [ + 'warn', + { + ignoreDestructuring: false, + ignoreImport: false, + ignoreExport: false + } + ], + 'prefer-arrow-callback': 'off', + 'prefer-const': 'off', + 'prefer-destructuring': 'off', + 'prefer-numeric-literals': 'off', + 'prefer-rest-params': 'off', + 'prefer-spread': 'off', + 'prefer-template': 'off', + 'require-yield': 'error', + 'sort-imports': 'off', + 'symbol-description': 'warn' +}; diff --git a/eslint/rules/es6.js b/eslint/rules/es6.js new file mode 100644 index 0000000..9ddb59f --- /dev/null +++ b/eslint/rules/es6.js @@ -0,0 +1,94 @@ +'use strict'; + +// Rules for ES6 code +module.exports = { + 'no-restricted-properties': ['warn', + { + object: 'arguments', + property: 'callee', + message: 'arguments.callee is deprecated', + }, + { + object: 'global', + property: 'isFinite', + message: 'Please use Number.isFinite instead', + }, + { + object: 'self', + property: 'isFinite', + message: 'Please use Number.isFinite instead', + }, + { + object: 'window', + property: 'isFinite', + message: 'Please use Number.isFinite instead', + }, + { + object: 'global', + property: 'isNaN', + message: 'Please use Number.isNaN instead', + }, + { + object: 'self', + property: 'isNaN', + message: 'Please use Number.isNaN instead', + }, + { + object: 'window', + property: 'isNaN', + message: 'Please use Number.isNaN instead', + }, + { + property: '__defineGetter__', + message: 'Please use Object.defineProperty instead.', + }, + { + property: '__defineSetter__', + message: 'Please use Object.defineProperty instead.', + }, + { + object: 'Math', + property: 'pow', + message: 'Use the exponentiation operator (**) instead.', + }], + 'no-var': 'warn', + 'object-shorthand': ['warn', 'always', { + ignoreConstructors: false, + avoidQuotes: true, + }], + 'prefer-arrow-callback': ['warn', { + allowNamedFunctions: true, + allowUnboundThis: true, + }], + 'prefer-const': ['warn', { + destructuring: 'any', + ignoreReadBeforeAssign: true, + }], + 'prefer-destructuring': ['warn', { + VariableDeclarator: { + array: false, + object: true, + }, + AssignmentExpression: { + array: true, + object: true, + }, + }, { + enforceForRenamedProperties: false, + }], + 'prefer-numeric-literals': 'warn', + 'prefer-rest-params': 'warn', + 'prefer-spread': 'warn', + 'prefer-template': 'warn', + 'prefer-object-spread': 'warn', + 'comma-dangle': [ + 'warn', + { + arrays: 'only-multiline', + objects: 'only-multiline', + imports: 'only-multiline', + exports: 'only-multiline', + functions: 'only-multiline' + } + ] +}; diff --git a/eslint/rules/sbisRules.js b/eslint/rules/sbisRules.js new file mode 100644 index 0000000..5596449 --- /dev/null +++ b/eslint/rules/sbisRules.js @@ -0,0 +1,18 @@ +'use strict'; + +// Правила, которые есть только в СТАНе. +module.exports = { + 'deprecated-anywhere': 'off', + 'disable-linter-comment': 'off', + 'too-many-lines': 'off', + 'doclet-integrity': 'off', + 'no-duplicate-key': 'off', + 'fed-ts-repeated-calls': 'off', + 'fed-ts-children-private': 'off', + 'fed-ts-unconditional': 'off', + 'fed-ts-context-access': 'off', + 'fed-ts-beforemount-async': 'off', + 'fed-ts-forbid-platform-store': 'off', + 'library-dependency': 'off', + 'forbidden-types': 'off', +}; diff --git a/eslint/rules/test-tsx.js b/eslint/rules/test-tsx.js new file mode 100644 index 0000000..60f05c8 --- /dev/null +++ b/eslint/rules/test-tsx.js @@ -0,0 +1,21 @@ +'use strict'; + +// Rules for React test code +module.exports = { + 'testing-library/await-async-queries': 'warn', + 'testing-library/await-async-utils': 'warn', + 'testing-library/no-await-sync-queries': 'warn', + 'testing-library/no-debugging-utils': 'warn', + 'testing-library/no-dom-import': ['warn', 'react'], + 'testing-library/no-global-regexp-flag-in-query': 'warn', + 'testing-library/no-manual-cleanup': 'warn', + 'testing-library/no-promise-in-fire-event': 'warn', + 'testing-library/no-unnecessary-act': 'warn', + 'testing-library/no-wait-for-multiple-assertions': 'warn', + 'testing-library/no-wait-for-side-effects': 'warn', + 'testing-library/no-wait-for-snapshot': 'warn', + 'testing-library/prefer-find-by': 'warn', + 'testing-library/prefer-presence-queries': 'warn', + 'testing-library/prefer-query-by-disappearance': 'warn', + 'testing-library/prefer-screen-queries': 'warn', +}; diff --git a/eslint/rules/ts.js b/eslint/rules/ts.js new file mode 100644 index 0000000..d8b5f03 --- /dev/null +++ b/eslint/rules/ts.js @@ -0,0 +1,161 @@ +'use strict'; + +// Rules for TypeScript code +module.exports = { + '@typescript-eslint/adjacent-overload-signatures': 'error', + '@typescript-eslint/array-type': [ + 'error', + { + 'default': 'array', + } + ], + '@typescript-eslint/ban-types': [ + 'error', + { + 'types': { + 'Deferred': { + 'message': 'Use Promise instead.' + } + }, + extendDefaults: false + } + ], + '@typescript-eslint/prefer-function-type': 'error', + '@typescript-eslint/naming-convention': ['error', { + 'selector': ['class', 'interface'], + 'format': ['PascalCase'] + }, { + 'selector': 'variable', + 'format': ['camelCase', 'PascalCase', 'UPPER_CASE'], + 'leadingUnderscore': 'allow', + 'trailingUnderscore': 'allow' + }], + 'spaced-comment': [ + 'warn', + 'always', + { + block: { + balanced: false + }, + markers: ['#', '/'] + } + ], + 'no-labels': ['error', { + allowLoop: true, + allowSwitch: true + }], + 'max-classes-per-file': ['error', 7], + 'new-parens': 'error', + '@typescript-eslint/consistent-type-assertions': ['warn', { + assertionStyle: 'as', + objectLiteralTypeAssertions: 'allow' + }], + '@typescript-eslint/no-explicit-any': 'warn', + 'no-bitwise': 'error', + 'no-cond-assign': ['warn', 'always'], + 'no-console': 'error', + '@typescript-eslint/no-empty-interface': [ + 'error', + { + allowSingleExtends: true + } + ], + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/triple-slash-reference': [ + 'error', + { + 'path': 'never', + 'types': 'never', + 'lib': 'never' + } + ], + '@typescript-eslint/no-shadow': [ + 'warn', + { + 'hoist': 'all' + } + ], + '@typescript-eslint/no-throw-literal': ['error'], + 'no-trailing-spaces': [ + 'error', + { + skipBlankLines: false, + ignoreComments: false + } + ], + '@typescript-eslint/no-unused-expressions': 'error', + 'no-var': 'error', + '@typescript-eslint/no-var-requires': 'error', + 'object-shorthand': 'error', + 'prefer-const': 'error', + '@typescript-eslint/unified-signatures': 'error', + 'max-len': [ + 'error', + { + code: 120, + ignoreUrls: true, + ignoreComments: true, + ignoreRegExpLiterals: true, + ignoreStrings: true, + ignoreTemplateLiterals: true, + + /* + Эта штука должна разрешать многострочные комменты неограниченной длины. + Вообще, флаг ignoreComments должен давать тот же эффект, но это оставлено для обратной совместимости. + */ + ignorePattern: '^ +\\* ' + } + ], + '@typescript-eslint/explicit-member-accessibility': [ + 'error', + { + 'accessibility': 'no-public' + } + ], + '@typescript-eslint/member-ordering': [ + 'warn', + { + 'default': [ + 'instance-field', + 'constructor', + 'instance-method', + 'static-field', + 'static-method' + ] + } + ], + '@typescript-eslint/no-magic-numbers': [ + 'warn', + { + ignore: [-1, 0, 1, 2], + ignoreEnums: true, + ignoreNumericLiteralTypes: true, + ignoreReadonlyClassProperties: true + } + ], + '@typescript-eslint/no-non-null-assertion': 'error', + 'no-param-reassign': 'warn', + '@typescript-eslint/no-this-alias': 'warn', + 'quote-props': ['error', 'as-needed'], + 'prefer-object-spread': 'error', + quotes: ['error', 'single', { + avoidEscape: true + }], + '@typescript-eslint/semi': [ + 'error', + 'always' + ], + '@typescript-eslint/type-annotation-spacing': 'error', + '@typescript-eslint/ban-ts-comment': 'warn', + 'one-var': ['error', 'never'], + '@typescript-eslint/typedef': ['warn', { + parameter: true, + propertyDeclaration: true, + memberVariableDeclaration: true, + + // eslint-disable-next-line id-match + variableDeclarationIgnoreFunction: true + }], + '@typescript-eslint/ban-tslint-comment': 'error' +}; diff --git a/eslint/rules/tsx.js b/eslint/rules/tsx.js new file mode 100644 index 0000000..cc49b65 --- /dev/null +++ b/eslint/rules/tsx.js @@ -0,0 +1,42 @@ +'use strict'; + +// Rules for React code +module.exports = { + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'warn', + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md + 'react/function-component-definition': ['error', { + namedComponents: ['function-declaration', 'function-expression'], + unnamedComponents: 'function-expression', + }], + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md + 'react/jsx-max-props-per-line': ['error', { maximum: 1, when: 'multiline' }], + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md + 'react/jsx-no-duplicate-props': ['error', { ignoreCase: true }], + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md + 'react/no-danger-with-children': 'error', + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md + 'react/no-array-index-key': 'error', + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md + 'react/jsx-fragments': ['error', 'syntax'], + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md + 'react/jsx-no-useless-fragment': 'error', + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-constructed-context-values.md + 'react/jsx-no-constructed-context-values': 'error', + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md + 'react/no-unstable-nested-components': ['error', { + allowAsProps: true + }], + + // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md + 'react/hook-use-state': 'error', +}; diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..73af093 --- /dev/null +++ b/index.ts @@ -0,0 +1,128 @@ +import * as core from "@actions/core"; // tslint:disable-line +// Currently @actions/github cannot be loaded via import statement due to typing error +const github = require("@actions/github"); // tslint:disable-line +import { Context } from "@actions/github/lib/context"; +import * as Octokit from "@octokit/rest"; +import { stripIndent as markdown } from "common-tags"; +import * as fs from "fs"; +import * as glob from "glob"; +import * as path from "path"; +import { Configuration, Linter, RuleSeverity } from "tslint"; + +const CHECK_NAME = "TSLint Checks"; + +const SeverityAnnotationLevelMap = new Map([ + ["warning", "warning"], + ["error", "failure"], +]); + +(async () => { + const ctx = github.context as Context; + + const configFileName = core.getInput("config") || "tslint.json"; + const projectFileName = core.getInput("project"); + const pattern = core.getInput("pattern"); + const ghToken = core.getInput("token"); + + if (!projectFileName && !pattern) { + core.setFailed("tslint-actions: Please set project or pattern input"); + return; + } + + if (!ghToken) { + core.setFailed("tslint-actions: Please set token"); + return; + } + + const octokit = new github.GitHub(ghToken) as Octokit; + + // Create check + const check = await octokit.checks.create({ + owner: ctx.repo.owner, + repo: ctx.repo.repo, + name: CHECK_NAME, + head_sha: ctx.sha, + status: "in_progress", + }); + + const options = { + fix: false, + formatter: "json", + }; + + // Create a new Linter instance + const result = (() => { + if (projectFileName && !pattern) { + const projectDir = path.dirname(path.resolve(projectFileName)); + const program = Linter.createProgram(projectFileName, projectDir); + const linter = new Linter(options, program); + + const files = Linter.getFileNames(program); + for (const file of files) { + const sourceFile = program.getSourceFile(file); + if (sourceFile) { + const fileContents = sourceFile.getFullText(); + const configuration = Configuration.findConfiguration(configFileName, file).results; + linter.lint(file, fileContents, configuration); + } + } + + return linter.getResult(); + } else { + const linter = new Linter(options); + + const files = glob.sync(pattern!); + for (const file of files) { + const fileContents = fs.readFileSync(file, { encoding: "utf8" }); + const configuration = Configuration.findConfiguration(configFileName, file).results; + linter.lint(file, fileContents, configuration); + } + + return linter.getResult(); + } + })(); + + const annotations: Octokit.ChecksCreateParamsOutputAnnotations[] = result.failures.map((failure) => ({ + path: failure.getFileName(), + start_line: failure.getStartPosition().getLineAndCharacter().line, + end_line: failure.getEndPosition().getLineAndCharacter().line, + annotation_level: SeverityAnnotationLevelMap.get(failure.getRuleSeverity()) || "notice", + message: `[${failure.getRuleName()}] ${failure.getFailure()}`, + })); + + // Update check + await octokit.checks.update({ + owner: ctx.repo.owner, + repo: ctx.repo.repo, + check_run_id: check.data.id, + name: CHECK_NAME, + status: "completed", + conclusion: result.errorCount > 0 ? "failure" : "success", + output: { + title: CHECK_NAME, + summary: `${result.errorCount} error(s), ${result.warningCount} warning(s) found`, + text: markdown` + ## Configuration + + #### Actions Input + + | Name | Value | + | ---- | ----- | + | config | \`${configFileName}\` | + | project | \`${projectFileName || "(not provided)"}\` | + | pattern | \`${pattern || "(not provided)"}\` | + + #### TSLint Configuration + + \`\`\`json + __CONFIG_CONTENT__ + \`\`\` + + `.replace("__CONFIG_CONTENT__", JSON.stringify(Configuration.readConfigurationFile(configFileName), null, 2)), + annotations, + }, + }); +})().catch((e) => { + console.error(e.stack); // tslint:disable-line + core.setFailed(e.message); +}); \ No newline at end of file diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..0b3fac4 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,17 @@ +/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ +module.exports = { + testEnvironment: 'node', + transform: { + '\\.tsx?$': ['ts-jest', { + // немножко ускоряем сборку тестов, потому что тайпчек не нужен + diagnostics: false + }] + }, + snapshotFormat: { + escapeString: true, + printBasicPrototype: true + }, + moduleNameMapper: { + 'eslint/use-at-your-own-risk': '/node_modules/eslint/lib/unsupported-api.js' + } +}; diff --git a/lib/compiler.js b/lib/compiler.js new file mode 100644 index 0000000..db8fbe0 --- /dev/null +++ b/lib/compiler.js @@ -0,0 +1,2 @@ +// TypeScript re-export +module.exports = require('typescript'); diff --git a/lib/lint.js b/lib/lint.js new file mode 100644 index 0000000..451bca4 --- /dev/null +++ b/lib/lint.js @@ -0,0 +1,2 @@ +// TSlint re-export +module.exports = require('tslint'); diff --git a/logsVisualiser/index.html b/logsVisualiser/index.html new file mode 100644 index 0000000..bdc8fed --- /dev/null +++ b/logsVisualiser/index.html @@ -0,0 +1,147 @@ + + + + + TypeScript Errors + + + + +
+ + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..0c5e510 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,12882 @@ +{ + "name": "saby-typescript", + "version": "24.4000.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "saby-typescript", + "version": "24.4000.0", + "license": "MIT", + "dependencies": { + "@types/node": "14.14.6", + "@types/react": "17.0.0", + "@types/react-dom": "17.0.0", + "@types/requirejs": "2.1.32", + "@typescript-eslint/eslint-plugin": "6.21.0", + "@typescript-eslint/parser": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "confusing-browser-globals": "1.0.10", + "eslint": "8.57.0", + "eslint-plugin-jest-dom": "5.4.0", + "eslint-plugin-react": "7.34.3", + "eslint-plugin-react-hooks": "4.6.2", + "eslint-plugin-testing-library": "6.2.2", + "postcss-less": "6.0.0", + "prettier": "3.0.3", + "stylelint": "15.11.0", + "tslib": "2.6.3", + "tslint": "6.1.3", + "typescript": "5.3.3" + }, + "bin": { + "saby-typescript": "cli.js" + }, + "devDependencies": { + "@types/eslint": "8.56.10", + "@types/jest": "29.5.12", + "jest": "29.7.0", + "ts-jest": "29.1.5" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", + "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", + "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helpers": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", + "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "dev": true, + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", + "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", + "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", + "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", + "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", + "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", + "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.7.0.tgz", + "integrity": "sha512-qvBMcOU/uWFCH/VO0MYe0AMs0BGMWAt6FTryMbFIKYtZtVnqTZtT8ktv5o718llkaGZWomJezJZjq3vJDHeJNQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^2.3.2" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.3.2.tgz", + "integrity": "sha512-0xYOf4pQpAaE6Sm2Q0x3p25oRukzWQ/O8hWVvhIt9Iv98/uu053u2CGm/g3kJ+P0vOYTAYzoU8Evq2pg9ZPXtw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": "^14 || ^16 || >=18" + } + }, + "node_modules/@csstools/media-query-list-parser": { + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.12.tgz", + "integrity": "sha512-t1/CdyVJzOQUiGUcIBXRzTAkWTFPxiPnoKwowKW2z9Uj78c2bBWI/X94BeVfUwVq1xtCjD7dnO8kS6WONgp8Jw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^2.7.0", + "@csstools/css-tokenizer": "^2.3.2" + } + }, + "node_modules/@csstools/selector-specificity": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz", + "integrity": "sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^6.0.13" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead" + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/eslint": { + "version": "8.56.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", + "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", + "dev": true, + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" + }, + "node_modules/@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==" + }, + "node_modules/@types/node": { + "version": "14.14.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.6.tgz", + "integrity": "sha512-6QlRuqsQ/Ox/aJEQWBEJG7A9+u7oSYl3mem/K8IzxXG/kAGbV1YPD9Bg9Zw3vyxC/YP+zONKwy8hGkSt1jxFMw==" + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==" + }, + "node_modules/@types/prop-types": { + "version": "15.7.12", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", + "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==" + }, + "node_modules/@types/react": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.0.tgz", + "integrity": "sha512-aj/L7RIMsRlWML3YB6KZiXB3fV2t41+5RBGYF8z+tAKU43Px8C3cYUZsDvf1/+Bm4FK21QWBrDutu8ZJ/70qOw==", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.0.tgz", + "integrity": "sha512-lUqY7OlkF/RbNtD5nIq7ot8NquXrdFrjSOR6+w9a9RFQevGi1oZO1dcJbXMeONAPKtZ2UrZOEJ5UOCVsxbLk/g==", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/requirejs": { + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.32.tgz", + "integrity": "sha512-TM8LeNLJkEKDcx2414tsU+aKX+Pcfx8siRgZJWsb16KT77TT2FxINO48dLLkx8a5fEuJYb+rcfgPcvq6vt96NQ==" + }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==" + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, + "node_modules/@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" + }, + "node_modules/acorn": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", + "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.findlast": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.toreversed": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz", + "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + } + }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", + "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.16" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-keys": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", + "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", + "dependencies": { + "camelcase": "^6.3.0", + "map-obj": "^4.1.0", + "quick-lru": "^5.1.1", + "type-fest": "^1.2.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-keys/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-keys/node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001638", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001638.tgz", + "integrity": "sha512-5SuJUJ7cZnhPpeLHaH0c/HPAnAHZvS6ElWyHK9GSIbVOQABLzowiI2pjmpvZ1WEbkyz46iFd4UXlOHR5SqgfMQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", + "dev": true + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/colord": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==" + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/confusing-browser-globals": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", + "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dependencies": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-functions-list": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.2.tgz", + "integrity": "sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==", + "engines": { + "node": ">=12 || >=16" + } + }, + "node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dependencies": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", + "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decamelize-keys/node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.815", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.815.tgz", + "integrity": "sha512-OvpTT2ItpOXJL7IGcYakRjHCt8L5GrrN/wHCQsRB4PQa1X9fe+X9oen245mIId7s14xvArCGSTIq644yPUKKLg==", + "dev": true + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-iterator-helpers": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", + "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "iterator.prototype": "^1.1.2", + "safe-array-concat": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dependencies": { + "hasown": "^2.0.0" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-jest-dom": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest-dom/-/eslint-plugin-jest-dom-5.4.0.tgz", + "integrity": "sha512-yBqvFsnpS5Sybjoq61cJiUsenRkC9K32hYQBFS9doBR7nbQZZ5FyO+X7MlmfM1C48Ejx/qTuOCgukDUNyzKZ7A==", + "dependencies": { + "@babel/runtime": "^7.16.3", + "requireindex": "^1.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0", + "npm": ">=6", + "yarn": ">=1" + }, + "peerDependencies": { + "@testing-library/dom": "^8.0.0 || ^9.0.0 || ^10.0.0", + "eslint": "^6.8.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "@testing-library/dom": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-react": { + "version": "7.34.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.3.tgz", + "integrity": "sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==", + "dependencies": { + "array-includes": "^3.1.8", + "array.prototype.findlast": "^1.2.5", + "array.prototype.flatmap": "^1.3.2", + "array.prototype.toreversed": "^1.1.2", + "array.prototype.tosorted": "^1.1.4", + "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.0.19", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.8", + "object.fromentries": "^2.0.8", + "object.hasown": "^1.1.4", + "object.values": "^1.2.0", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.5", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.11" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/eslint-plugin-react/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-react/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-react/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint-plugin-react/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-testing-library": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.2.2.tgz", + "integrity": "sha512-1E94YOTUDnOjSLyvOwmbVDzQi/WkKm3WVrMXu6SmBr6DN95xTGZmI6HJ/eOkSXh/DlheRsxaPsJvZByDBhWLVQ==", + "dependencies": { + "@typescript-eslint/utils": "^5.58.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0", + "npm": ">=6" + }, + "peerDependencies": { + "eslint": "^7.5.0 || ^8.0.0" + } + }, + "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-testing-library/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-plugin-testing-library/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint-plugin-testing-library/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/eslint-plugin-testing-library/node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dependencies": { + "global-prefix": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globjoin": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", + "integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==" + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" + }, + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/hosted-git-info/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/html-tags": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, + "node_modules/is-async-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", + "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", + "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-finalizationregistry": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", + "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/iterator.prototype": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", + "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", + "dependencies": { + "define-properties": "^1.2.1", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "reflect.getprototypeof": "^1.0.4", + "set-function-name": "^2.0.1" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve/node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsx-ast-utils": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/known-css-properties": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.29.0.tgz", + "integrity": "sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==" + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mathml-tag-names": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz", + "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" + }, + "node_modules/meow": { + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz", + "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==", + "dependencies": { + "@types/minimist": "^1.2.2", + "camelcase-keys": "^7.0.0", + "decamelize": "^5.0.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.2", + "read-pkg-up": "^8.0.0", + "redent": "^4.0.0", + "trim-newlines": "^4.0.2", + "type-fest": "^1.2.2", + "yargs-parser": "^20.2.9" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "dependencies": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", + "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.hasown": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.4.tgz", + "integrity": "sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==", + "dependencies": { + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postcss": { + "version": "8.4.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-less": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-6.0.0.tgz", + "integrity": "sha512-FPX16mQLyEjLzEuuJtxA8X3ejDLNGGEG503d2YGZR5Ask1SpDN8KmZUMpzCvyalWRywAn1n1VOA5dcqfCLo5rg==", + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "postcss": "^8.3.5" + } + }, + "node_modules/postcss-resolve-nested-selector": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", + "integrity": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==" + }, + "node_modules/postcss-safe-parser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", + "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.3.3" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz", + "integrity": "sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "node_modules/read-pkg": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", + "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^3.0.2", + "parse-json": "^5.2.0", + "type-fest": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz", + "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==", + "dependencies": { + "find-up": "^5.0.0", + "read-pkg": "^6.0.0", + "type-fest": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/redent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", + "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==", + "dependencies": { + "indent-string": "^5.0.0", + "strip-indent": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", + "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.1", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "engines": { + "node": ">=0.10.5" + } + }, + "node_modules/resolve": { + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==" + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.matchall": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz", + "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "regexp.prototype.flags": "^1.5.2", + "set-function-name": "^2.0.2", + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", + "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", + "dependencies": { + "min-indent": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/style-search": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", + "integrity": "sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==" + }, + "node_modules/stylelint": { + "version": "15.11.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.11.0.tgz", + "integrity": "sha512-78O4c6IswZ9TzpcIiQJIN49K3qNoXTM8zEJzhaTE/xRTCZswaovSEVIa/uwbOltZrk16X4jAxjaOhzz/hTm1Kw==", + "dependencies": { + "@csstools/css-parser-algorithms": "^2.3.1", + "@csstools/css-tokenizer": "^2.2.0", + "@csstools/media-query-list-parser": "^2.1.4", + "@csstools/selector-specificity": "^3.0.0", + "balanced-match": "^2.0.0", + "colord": "^2.9.3", + "cosmiconfig": "^8.2.0", + "css-functions-list": "^3.2.1", + "css-tree": "^2.3.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.1", + "fastest-levenshtein": "^1.0.16", + "file-entry-cache": "^7.0.0", + "global-modules": "^2.0.0", + "globby": "^11.1.0", + "globjoin": "^0.1.4", + "html-tags": "^3.3.1", + "ignore": "^5.2.4", + "import-lazy": "^4.0.0", + "imurmurhash": "^0.1.4", + "is-plain-object": "^5.0.0", + "known-css-properties": "^0.29.0", + "mathml-tag-names": "^2.1.3", + "meow": "^10.1.5", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.28", + "postcss-resolve-nested-selector": "^0.1.1", + "postcss-safe-parser": "^6.0.0", + "postcss-selector-parser": "^6.0.13", + "postcss-value-parser": "^4.2.0", + "resolve-from": "^5.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "style-search": "^0.1.0", + "supports-hyperlinks": "^3.0.0", + "svg-tags": "^1.0.0", + "table": "^6.8.1", + "write-file-atomic": "^5.0.1" + }, + "bin": { + "stylelint": "bin/stylelint.mjs" + }, + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + } + }, + "node_modules/stylelint/node_modules/balanced-match": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", + "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==" + }, + "node_modules/stylelint/node_modules/file-entry-cache": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-7.0.2.tgz", + "integrity": "sha512-TfW7/1iI4Cy7Y8L6iqNdZQVvdXn0f8B4QcIXmkIbtTIe/Okm/nSlHb4IwGzRVOd3WfSieCgvf5cMzEfySAIl0g==", + "dependencies": { + "flat-cache": "^3.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/stylelint/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/stylelint/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/stylelint/node_modules/write-file-atomic": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz", + "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==" + }, + "node_modules/table": { + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", + "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/trim-newlines": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.1.1.tgz", + "integrity": "sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/ts-jest": { + "version": "29.1.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.5.tgz", + "integrity": "sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg==", + "dev": true, + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + }, + "node_modules/tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + }, + "bin": { + "tslint": "bin/tslint" + }, + "engines": { + "node": ">=4.8.0" + }, + "peerDependencies": { + "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + } + }, + "node_modules/tslint/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/tslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/tslint/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/tslint/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/tslint/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/tslint/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/tslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tslint/node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tslint/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/tslint/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dependencies": { + "tslib": "^1.8.1" + }, + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", + "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "dependencies": { + "function.prototype.name": "^1.1.5", + "has-tostringtag": "^1.0.0", + "is-async-function": "^2.0.0", + "is-date-object": "^1.0.5", + "is-finalizationregistry": "^1.0.2", + "is-generator-function": "^1.0.10", + "is-regex": "^1.1.4", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "requires": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + } + }, + "@babel/compat-data": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", + "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", + "dev": true + }, + "@babel/core": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", + "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helpers": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "dependencies": { + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dev": true, + "requires": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", + "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "dependencies": { + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } + } + }, + "@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dev": true, + "requires": { + "@babel/types": "^7.24.7" + } + }, + "@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "dev": true, + "requires": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "dev": true, + "requires": { + "@babel/types": "^7.24.7" + } + }, + "@babel/helper-module-imports": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "dev": true, + "requires": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + } + }, + "@babel/helper-module-transforms": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", + "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", + "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", + "dev": true + }, + "@babel/helper-simple-access": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", + "dev": true, + "requires": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "dev": true, + "requires": { + "@babel/types": "^7.24.7" + } + }, + "@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==" + }, + "@babel/helper-validator-option": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", + "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", + "dev": true + }, + "@babel/helpers": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", + "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", + "dev": true, + "requires": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + } + }, + "@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "requires": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "dev": true + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-jsx": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.24.7" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", + "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.24.7" + } + }, + "@babel/runtime": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", + "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, + "@babel/template": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" + } + }, + "@babel/traverse": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + } + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@csstools/css-parser-algorithms": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.7.0.tgz", + "integrity": "sha512-qvBMcOU/uWFCH/VO0MYe0AMs0BGMWAt6FTryMbFIKYtZtVnqTZtT8ktv5o718llkaGZWomJezJZjq3vJDHeJNQ==", + "requires": {} + }, + "@csstools/css-tokenizer": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.3.2.tgz", + "integrity": "sha512-0xYOf4pQpAaE6Sm2Q0x3p25oRukzWQ/O8hWVvhIt9Iv98/uu053u2CGm/g3kJ+P0vOYTAYzoU8Evq2pg9ZPXtw==" + }, + "@csstools/media-query-list-parser": { + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.12.tgz", + "integrity": "sha512-t1/CdyVJzOQUiGUcIBXRzTAkWTFPxiPnoKwowKW2z9Uj78c2bBWI/X94BeVfUwVq1xtCjD7dnO8kS6WONgp8Jw==", + "requires": {} + }, + "@csstools/selector-specificity": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz", + "integrity": "sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==", + "requires": {} + }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==" + }, + "@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==" + }, + "@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "requires": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==" + }, + "@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==" + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + } + }, + "@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "requires": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "requires": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + } + }, + "@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "requires": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + } + }, + "@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "requires": { + "jest-get-type": "^29.6.3" + } + }, + "@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + } + }, + "@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + } + }, + "@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + } + }, + "@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.27.8" + } + }, + "@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + } + }, + "@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "requires": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "requires": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + } + }, + "@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + } + }, + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^3.0.0" + } + }, + "@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "requires": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "requires": { + "@babel/types": "^7.20.7" + } + }, + "@types/eslint": { + "version": "8.56.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", + "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/jest": { + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", + "dev": true, + "requires": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" + }, + "@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==" + }, + "@types/node": { + "version": "14.14.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.6.tgz", + "integrity": "sha512-6QlRuqsQ/Ox/aJEQWBEJG7A9+u7oSYl3mem/K8IzxXG/kAGbV1YPD9Bg9Zw3vyxC/YP+zONKwy8hGkSt1jxFMw==" + }, + "@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==" + }, + "@types/prop-types": { + "version": "15.7.12", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", + "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==" + }, + "@types/react": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.0.tgz", + "integrity": "sha512-aj/L7RIMsRlWML3YB6KZiXB3fV2t41+5RBGYF8z+tAKU43Px8C3cYUZsDvf1/+Bm4FK21QWBrDutu8ZJ/70qOw==", + "requires": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, + "@types/react-dom": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.0.tgz", + "integrity": "sha512-lUqY7OlkF/RbNtD5nIq7ot8NquXrdFrjSOR6+w9a9RFQevGi1oZO1dcJbXMeONAPKtZ2UrZOEJ5UOCVsxbLk/g==", + "requires": { + "@types/react": "*" + } + }, + "@types/requirejs": { + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.32.tgz", + "integrity": "sha512-TM8LeNLJkEKDcx2414tsU+aKX+Pcfx8siRgZJWsb16KT77TT2FxINO48dLLkx8a5fEuJYb+rcfgPcvq6vt96NQ==" + }, + "@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==" + }, + "@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true + }, + "@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "requires": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + } + }, + "@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "requires": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "requires": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "requires": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + } + }, + "@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==" + }, + "@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "requires": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + } + }, + "@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "requires": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "requires": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + } + }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" + }, + "acorn": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", + "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==" + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + }, + "dependencies": { + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "requires": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + } + }, + "array-includes": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "is-string": "^1.0.7" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "array.prototype.findlast": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + } + }, + "array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + } + }, + "array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + } + }, + "array.prototype.toreversed": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz", + "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + } + }, + "array.prototype.tosorted": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" + } + }, + "arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "requires": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + } + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==" + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" + }, + "available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "requires": { + "possible-typed-array-names": "^1.0.0" + } + }, + "babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "requires": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + } + }, + "babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "dependencies": { + "istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } + } + }, + "babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, + "babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "requires": { + "fill-range": "^7.1.1" + } + }, + "browserslist": { + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", + "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.16" + } + }, + "bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "requires": { + "fast-json-stable-stringify": "2.x" + } + }, + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==" + }, + "call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "camelcase-keys": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", + "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", + "requires": { + "camelcase": "^6.3.0", + "map-obj": "^4.1.0", + "quick-lru": "^5.1.1", + "type-fest": "^1.2.1" + }, + "dependencies": { + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==" + }, + "type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==" + } + } + }, + "caniuse-lite": { + "version": "1.0.30001638", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001638.tgz", + "integrity": "sha512-5SuJUJ7cZnhPpeLHaH0c/HPAnAHZvS6ElWyHK9GSIbVOQABLzowiI2pjmpvZ1WEbkyz46iFd4UXlOHR5SqgfMQ==", + "dev": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true + }, + "ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true + }, + "cjs-module-lexer": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", + "dev": true + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true + }, + "collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "colord": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==" + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "confusing-browser-globals": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", + "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==" + }, + "convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "requires": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + } + }, + "create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "css-functions-list": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.2.tgz", + "integrity": "sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==" + }, + "css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "requires": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + } + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==" + }, + "csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, + "data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "requires": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + } + }, + "data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "requires": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + } + }, + "data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "requires": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + } + }, + "debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", + "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==" + }, + "decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==" + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==" + } + } + }, + "dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "requires": {} + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + }, + "deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true + }, + "define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + } + }, + "define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "requires": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + }, + "diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "requires": { + "esutils": "^2.0.2" + } + }, + "electron-to-chromium": { + "version": "1.4.815", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.815.tgz", + "integrity": "sha512-OvpTT2ItpOXJL7IGcYakRjHCt8L5GrrN/wHCQsRB4PQa1X9fe+X9oen245mIId7s14xvArCGSTIq644yPUKKLg==", + "dev": true + }, + "emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "requires": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + } + }, + "es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "requires": { + "get-intrinsic": "^1.2.4" + } + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, + "es-iterator-helpers": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", + "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "iterator.prototype": "^1.1.2", + "safe-array-concat": "^1.1.2" + } + }, + "es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "requires": { + "es-errors": "^1.3.0" + } + }, + "es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "requires": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + } + }, + "es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "requires": { + "hasown": "^2.0.0" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, + "eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "eslint-plugin-jest-dom": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest-dom/-/eslint-plugin-jest-dom-5.4.0.tgz", + "integrity": "sha512-yBqvFsnpS5Sybjoq61cJiUsenRkC9K32hYQBFS9doBR7nbQZZ5FyO+X7MlmfM1C48Ejx/qTuOCgukDUNyzKZ7A==", + "requires": { + "@babel/runtime": "^7.16.3", + "requireindex": "^1.2.0" + } + }, + "eslint-plugin-react": { + "version": "7.34.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.3.tgz", + "integrity": "sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==", + "requires": { + "array-includes": "^3.1.8", + "array.prototype.findlast": "^1.2.5", + "array.prototype.flatmap": "^1.3.2", + "array.prototype.toreversed": "^1.1.2", + "array.prototype.tosorted": "^1.1.4", + "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.0.19", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.8", + "object.fromentries": "^2.0.8", + "object.hasown": "^1.1.4", + "object.values": "^1.2.0", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.5", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.11" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "requires": { + "esutils": "^2.0.2" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" + } + } + }, + "eslint-plugin-react-hooks": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", + "requires": {} + }, + "eslint-plugin-testing-library": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.2.2.tgz", + "integrity": "sha512-1E94YOTUDnOjSLyvOwmbVDzQi/WkKm3WVrMXu6SmBr6DN95xTGZmI6HJ/eOkSXh/DlheRsxaPsJvZByDBhWLVQ==", + "requires": { + "@typescript-eslint/utils": "^5.58.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + } + }, + "@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==" + }, + "@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + }, + "espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "requires": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true + }, + "expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "requires": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" + }, + "fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==" + }, + "fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "requires": { + "reusify": "^1.0.4" + } + }, + "fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "requires": { + "bser": "2.1.1" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "requires": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" + }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + }, + "function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + } + }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "requires": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + } + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "requires": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "requires": { + "is-glob": "^4.0.3" + } + }, + "global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "requires": { + "global-prefix": "^3.0.0" + } + }, + "global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "requires": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "dependencies": { + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "requires": { + "type-fest": "^0.20.2" + } + }, + "globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "requires": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + } + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "globjoin": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", + "integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==" + }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "requires": { + "get-intrinsic": "^1.1.3" + } + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" + }, + "hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==" + }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "requires": { + "es-define-property": "^1.0.0" + } + }, + "has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==" + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "requires": { + "has-symbols": "^1.0.3" + } + }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "requires": { + "function-bind": "^1.1.2" + } + }, + "hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "html-tags": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==" + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==" + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==" + }, + "import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==" + }, + "indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "requires": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + } + }, + "is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, + "is-async-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", + "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" + }, + "is-core-module": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", + "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", + "requires": { + "hasown": "^2.0.2" + } + }, + "is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "requires": { + "is-typed-array": "^1.1.13" + } + }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" + }, + "is-finalizationregistry": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", + "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true + }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==" + }, + "is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==" + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==" + }, + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==" + }, + "is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "requires": { + "call-bind": "^1.0.7" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "requires": { + "which-typed-array": "^1.1.14" + } + }, + "is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==" + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-weakset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "requires": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + } + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", + "dev": true, + "requires": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + } + }, + "istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "iterator.prototype": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", + "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", + "requires": { + "define-properties": "^1.2.1", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "reflect.getprototypeof": "^1.0.4", + "set-function-name": "^2.0.1" + } + }, + "jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "requires": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + } + }, + "jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "requires": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + } + }, + "jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "requires": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + } + }, + "jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + } + }, + "jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + } + }, + "jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + } + }, + "jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + } + }, + "jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true + }, + "jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + } + }, + "jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "requires": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + } + }, + "jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + } + }, + "jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + } + }, + "jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "requires": {} + }, + "jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true + }, + "jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "dependencies": { + "resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "requires": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + } + } + }, + "jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "requires": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + } + }, + "jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "requires": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + } + }, + "jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + } + }, + "jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + } + }, + "jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "dependencies": { + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + } + } + }, + "jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "requires": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + } + }, + "jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "requires": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" + }, + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true + }, + "jsx-ast-utils": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", + "requires": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + } + }, + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "requires": { + "json-buffer": "3.0.1" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true + }, + "known-css-properties": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.29.0.tgz", + "integrity": "sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==" + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "requires": { + "p-locate": "^5.0.0" + } + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==" + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "requires": { + "semver": "^7.5.3" + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "requires": { + "tmpl": "1.0.5" + } + }, + "map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==" + }, + "mathml-tag-names": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz", + "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==" + }, + "mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" + }, + "meow": { + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz", + "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==", + "requires": { + "@types/minimist": "^1.2.2", + "camelcase-keys": "^7.0.0", + "decamelize": "^5.0.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.2", + "read-pkg-up": "^8.0.0", + "redent": "^4.0.0", + "trim-newlines": "^4.0.2", + "type-fest": "^1.2.2", + "yargs-parser": "^20.2.9" + }, + "dependencies": { + "type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==" + } + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" + }, + "micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "requires": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==" + }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" + }, + "minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + } + }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "requires": { + "minimist": "^1.2.6" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==" + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, + "normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "requires": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" + }, + "object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "requires": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } + }, + "object.entries": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", + "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + } + }, + "object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + } + }, + "object.hasown": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.4.tgz", + "integrity": "sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==", + "requires": { + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + } + }, + "object.values": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "requires": { + "p-limit": "^3.0.2" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + }, + "picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, + "pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + } + } + }, + "possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==" + }, + "postcss": { + "version": "8.4.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", + "requires": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" + } + }, + "postcss-less": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-6.0.0.tgz", + "integrity": "sha512-FPX16mQLyEjLzEuuJtxA8X3ejDLNGGEG503d2YGZR5Ask1SpDN8KmZUMpzCvyalWRywAn1n1VOA5dcqfCLo5rg==", + "requires": {} + }, + "postcss-resolve-nested-selector": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", + "integrity": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==" + }, + "postcss-safe-parser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", + "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", + "requires": {} + }, + "postcss-selector-parser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz", + "integrity": "sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==", + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" + }, + "prettier": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==" + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, + "prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + } + } + }, + "punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" + }, + "pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" + }, + "quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" + }, + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "read-pkg": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", + "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^3.0.2", + "parse-json": "^5.2.0", + "type-fest": "^1.0.1" + }, + "dependencies": { + "type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==" + } + } + }, + "read-pkg-up": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz", + "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==", + "requires": { + "find-up": "^5.0.0", + "read-pkg": "^6.0.0", + "type-fest": "^1.0.1" + }, + "dependencies": { + "type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==" + } + } + }, + "redent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", + "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==", + "requires": { + "indent-string": "^5.0.0", + "strip-indent": "^4.0.0" + } + }, + "reflect.getprototypeof": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", + "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.1", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + } + }, + "regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, + "regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "requires": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==" + }, + "resolve": { + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", + "requires": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + }, + "resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "requires": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + } + }, + "safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "requires": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + } + }, + "semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==" + }, + "set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + } + }, + "set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "requires": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + } + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==" + }, + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==" + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==" + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + }, + "stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "requires": { + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } + } + }, + "string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "string.prototype.matchall": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz", + "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "regexp.prototype.flags": "^1.5.2", + "set-function-name": "^2.0.2", + "side-channel": "^1.0.6" + } + }, + "string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", + "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", + "requires": { + "min-indent": "^1.0.1" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + }, + "style-search": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", + "integrity": "sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==" + }, + "stylelint": { + "version": "15.11.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.11.0.tgz", + "integrity": "sha512-78O4c6IswZ9TzpcIiQJIN49K3qNoXTM8zEJzhaTE/xRTCZswaovSEVIa/uwbOltZrk16X4jAxjaOhzz/hTm1Kw==", + "requires": { + "@csstools/css-parser-algorithms": "^2.3.1", + "@csstools/css-tokenizer": "^2.2.0", + "@csstools/media-query-list-parser": "^2.1.4", + "@csstools/selector-specificity": "^3.0.0", + "balanced-match": "^2.0.0", + "colord": "^2.9.3", + "cosmiconfig": "^8.2.0", + "css-functions-list": "^3.2.1", + "css-tree": "^2.3.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.1", + "fastest-levenshtein": "^1.0.16", + "file-entry-cache": "^7.0.0", + "global-modules": "^2.0.0", + "globby": "^11.1.0", + "globjoin": "^0.1.4", + "html-tags": "^3.3.1", + "ignore": "^5.2.4", + "import-lazy": "^4.0.0", + "imurmurhash": "^0.1.4", + "is-plain-object": "^5.0.0", + "known-css-properties": "^0.29.0", + "mathml-tag-names": "^2.1.3", + "meow": "^10.1.5", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.28", + "postcss-resolve-nested-selector": "^0.1.1", + "postcss-safe-parser": "^6.0.0", + "postcss-selector-parser": "^6.0.13", + "postcss-value-parser": "^4.2.0", + "resolve-from": "^5.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "style-search": "^0.1.0", + "supports-hyperlinks": "^3.0.0", + "svg-tags": "^1.0.0", + "table": "^6.8.1", + "write-file-atomic": "^5.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", + "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==" + }, + "file-entry-cache": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-7.0.2.tgz", + "integrity": "sha512-TfW7/1iI4Cy7Y8L6iqNdZQVvdXn0f8B4QcIXmkIbtTIe/Okm/nSlHb4IwGzRVOd3WfSieCgvf5cMzEfySAIl0g==", + "requires": { + "flat-cache": "^3.2.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" + }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==" + }, + "write-file-atomic": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" + } + } + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-hyperlinks": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz", + "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==", + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==" + }, + "table": { + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", + "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", + "requires": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "ajv": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", + "requires": { + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + } + } + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" + }, + "tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "trim-newlines": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.1.1.tgz", + "integrity": "sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==" + }, + "ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "requires": {} + }, + "ts-jest": { + "version": "29.1.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.5.tgz", + "integrity": "sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg==", + "dev": true, + "requires": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" + }, + "dependencies": { + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } + } + }, + "tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + }, + "tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "requires": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "requires": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + }, + "typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "requires": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + } + }, + "typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "requires": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + } + }, + "typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "requires": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + } + }, + "typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "requires": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + } + }, + "typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==" + }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + }, + "update-browserslist-db": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "dev": true, + "requires": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "requires": { + "makeerror": "1.0.12" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-builtin-type": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", + "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "requires": { + "function.prototype.name": "^1.1.5", + "has-tostringtag": "^1.0.0", + "is-async-function": "^2.0.0", + "is-date-object": "^1.0.5", + "is-finalizationregistry": "^1.0.2", + "is-generator-function": "^1.0.10", + "is-regex": "^1.1.4", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + } + }, + "which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "requires": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + } + }, + "which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "requires": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + } + }, + "word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "dependencies": { + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } + } + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..356456c --- /dev/null +++ b/package.json @@ -0,0 +1,48 @@ +{ + "name": "saby-typescript", + "version": "24.6200.0", + "description": "Saby's environment for TypeScript", + "bin": { + "saby-typescript": "./cli.js" + }, + "repository": { + "type": "git", + "url": "git@git.sbis.ru:saby/TypeScript.git" + }, + "keywords": [ + "saby", + "wasaby", + "typescript" + ], + "author": "Aleksey Maltsev", + "license": "MIT", + "scripts": { + "test": "jest ./tests" + }, + "dependencies": { + "eslint": "8.57.0", + "eslint-plugin-react": "7.34.3", + "eslint-plugin-react-hooks": "4.6.2", + "eslint-plugin-testing-library": "6.2.2", + "@typescript-eslint/eslint-plugin": "6.21.0", + "@typescript-eslint/parser": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@types/node": "14.14.6", + "@types/requirejs": "2.1.32", + "@types/react": "17.0.0", + "@types/react-dom": "17.0.0", + "tslint": "6.1.3", + "tslib": "2.6.3", + "typescript": "5.3.3", + "confusing-browser-globals": "1.0.10", + "stylelint": "15.11.0", + "postcss-less": "6.0.0", + "prettier": "3.0.3" + }, + "devDependencies": { + "@types/eslint": "8.56.10", + "@types/jest": "29.5.12", + "jest": "29.7.0", + "ts-jest": "29.1.5" + } +} \ No newline at end of file diff --git a/prepare.js b/prepare.js new file mode 100644 index 0000000..dc971e0 --- /dev/null +++ b/prepare.js @@ -0,0 +1,85 @@ +const spawn = require('child_process').spawn; +const fs = require('fs'); +const path = require('path'); +const logger = console; + +/** + * Executes a shell command + * @param {String} command Command + * @param {String} arguments Arguments + */ +async function exec(command, ...arguments) { + return new Promise((resolve, reject) => { + try { + logger.log(`Executing: ${command} ${arguments.join(' ')}`); + let proc = spawn(command, arguments, { + stdio: 'inherit', + cwd: __dirname + }); + + proc.on('exit', (code, signal) => { + if (code) { + reject(new Error(`Command fails with code ${code}`)); + } else { + resolve(code, signal); + } + }); + + process.on('SIGINT', () => { + proc.kill('SIGINT'); + proc.kill('SIGTERM'); + }); + } catch (err) { + reject(err); + } + }); +} + +/** + * Creates tslib.js by read node_modules/tslib/tslib.js and wrap its contents into a self-call function + */ +async function wrapTslib() { + return new Promise((resolve, reject) => { + const source = require.resolve('tslib/tslib.js'); + const target = path.resolve('tslib.js'); + + logger.log(`Writing: ${target} taken from ${source}`); + try { + const config = require(path.join(path.dirname(source), 'package.json')); + + fs.readFile(source, (readErr, contents) => { + if (readErr) { + reject(readErr); + } + const result = `/** + * ${config.description} + * Version: ${config.version} + * URL: ${config.repository.url} + */ +(function() { +${String(contents)} +})();`; + fs.writeFile(target, result, (writeErr) => { + if (writeErr) { + reject(writeErr); + } + resolve(); + }); + }); + } catch (err) { + reject(err); + } + }); +} + +async function postinstall() { + //await wrapTslib(); + await exec('node', 'cli/compiler', '-p', 'tslint/custom-rules').catch((err) => { + logger.warn(err.message); + }); +} + +postinstall().catch((err) => { + logger.error('postinstall script failed:', err.message); + process.exit(1); +}); diff --git a/prettier/prettier-config.json b/prettier/prettier-config.json new file mode 100644 index 0000000..d76f98d --- /dev/null +++ b/prettier/prettier-config.json @@ -0,0 +1,29 @@ +{ + "printWidth": 100, + "tabWidth": 4, + "useTabs": false, + "semi": true, + "singleQuote": true, + "quoteProps": "as-needed", + "jsxSingleQuote": false, + "trailingComma": "es5", + "bracketSpacing": true, + "bracketSameLine": false, + "arrowParens": "always", + "endOfLine": "auto", + "overrides": [ + { + "files": "*.js", + "options": { + "tabWidth": 3, + "trailingComma": "none" + } + }, + { + "files": ["*.less", "*.css"], + "options": { + "tabWidth": 3 + } + } + ] +} diff --git a/sdk-info.json b/sdk-info.json new file mode 100644 index 0000000..03d57ea --- /dev/null +++ b/sdk-info.json @@ -0,0 +1,6 @@ +{ + "ui-modules": + [ + "Typescript" + ] +} diff --git a/stylelint/stylelint-config.json b/stylelint/stylelint-config.json new file mode 100644 index 0000000..9dd5546 --- /dev/null +++ b/stylelint/stylelint-config.json @@ -0,0 +1,116 @@ +{ + "customSyntax": "postcss-less", + "rules": { + "at-rule-no-unknown": true, + "block-no-empty": true, + "color-no-invalid-hex": true, + "comment-no-empty": true, + "declaration-block-no-duplicate-properties": [ + true, + { + "ignore": [ + "consecutive-duplicates-with-different-values" + ] + } + ], + "declaration-block-no-shorthand-property-overrides": true, + "font-family-no-duplicate-names": true, + "function-linear-gradient-no-nonstandard-direction": true, + "keyframe-declaration-no-important": true, + "no-descending-specificity": true, + "no-duplicate-at-import-rules": true, + "no-duplicate-selectors": true, + "no-empty-source": true, + "no-invalid-double-slash-comments": true, + "property-no-unknown": [ + true, + { + "ignoreProperties": [ + "container-name", + "container-type" + ] + } + ], + "selector-pseudo-class-no-unknown": true, + "selector-pseudo-element-no-unknown": true, + "selector-type-no-unknown": true, + "string-no-newline": true, + "at-rule-empty-line-before": [ + "always", + { + "except": [ + "blockless-after-same-name-blockless", + "first-nested" + ], + "ignore": [ + "after-comment" + ] + } + ], + "comment-empty-line-before": [ + "always", + { + "except": [ + "first-nested" + ], + "ignore": [ + "stylelint-commands" + ] + } + ], + "comment-whitespace-inside": "always", + "custom-property-empty-line-before": [ + "always", + { + "except": [ + "after-custom-property", + "first-nested" + ], + "ignore": [ + "after-comment", + "inside-single-line-block" + ] + } + ], + "function-name-case": "lower", + "length-zero-no-unit": [true, { + "ignore": ["custom-properties"] + }], + "rule-empty-line-before": [ + "always-multi-line", + { + "except": [ + "first-nested" + ], + "ignore": [ + "after-comment" + ] + } + ], + "selector-pseudo-element-colon-notation": "double", + "value-keyword-case": [ + "lower", + { + "ignoreFunctions": ["extend"] + } + ], + "font-family-no-missing-generic-family-keyword": [ + true, + { + "ignoreFontFamilies": "/^cbuc-icons\\d*$/" + } + ], + "color-named": "never", + "color-hex-length": "short", + "shorthand-property-no-redundant-values": true, + "declaration-block-single-line-max-declarations": 0, + "selector-max-id": 0, + "selector-max-type": 0, + "selector-type-case": "lower", + "selector-max-universal": 0, + "no-unknown-animations": true, + "declaration-no-important": true, + "unit-no-unknown": true, + "declaration-empty-line-before": "never" + } +} diff --git a/tests/lint/__snapshots__/adjacent-overload-signatures.test.ts.snap b/tests/lint/__snapshots__/adjacent-overload-signatures.test.ts.snap new file mode 100644 index 0000000..8a798e0 --- /dev/null +++ b/tests/lint/__snapshots__/adjacent-overload-signatures.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`adjacent-overload-signatures ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 34, + "endLine": 3, + "line": 3, + "message": "All test signatures should be adjacent.", + "messageId": "adjacentSignature", + "nodeType": "TSDeclareFunction", + "ruleId": "@typescript-eslint/adjacent-overload-signatures", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/array-type.test.ts.snap b/tests/lint/__snapshots__/array-type.test.ts.snap new file mode 100644 index 0000000..d138b1c --- /dev/null +++ b/tests/lint/__snapshots__/array-type.test.ts.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`array-type не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`array-type не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`array-type ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 12, + "endColumn": 25, + "endLine": 1, + "line": 1, + "message": "Array type using 'Array' is forbidden. Use 'number[]' instead.", + "messageId": "errorStringArray", + "nodeType": "TSTypeReference", + "ruleId": "@typescript-eslint/array-type", + "severity": 2, + }, +] +`; + +exports[`array-type ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 13, + "endColumn": 34, + "endLine": 1, + "line": 1, + "message": "Array type using 'ReadonlyArray' is forbidden. Use 'readonly number[]' instead.", + "messageId": "errorStringArray", + "nodeType": "TSTypeReference", + "ruleId": "@typescript-eslint/array-type", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/ban-comma-operator.test.ts.snap b/tests/lint/__snapshots__/ban-comma-operator.test.ts.snap new file mode 100644 index 0000000..776f0a7 --- /dev/null +++ b/tests/lint/__snapshots__/ban-comma-operator.test.ts.snap @@ -0,0 +1,107 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ban-comma-operator не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`ban-comma-operator не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`ban-comma-operator не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`ban-comma-operator не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`ban-comma-operator не ошибки индекс теста: 4 1`] = `Array []`; + +exports[`ban-comma-operator ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 2, + "endColumn": 3, + "endLine": 7, + "line": 7, + "message": "Unexpected use of comma operator.", + "messageId": "unexpectedCommaExpression", + "nodeType": "SequenceExpression", + "ruleId": "no-sequences", + "severity": 2, + }, +] +`; + +exports[`ban-comma-operator ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 23, + "endColumn": 24, + "endLine": 8, + "line": 8, + "message": "Unexpected use of comma operator.", + "messageId": "unexpectedCommaExpression", + "nodeType": "SequenceExpression", + "ruleId": "no-sequences", + "severity": 2, + }, +] +`; + +exports[`ban-comma-operator ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 21, + "endColumn": 22, + "endLine": 6, + "line": 6, + "message": "Unexpected use of comma operator.", + "messageId": "unexpectedCommaExpression", + "nodeType": "SequenceExpression", + "ruleId": "no-sequences", + "severity": 2, + }, +] +`; + +exports[`ban-comma-operator ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 18, + "endColumn": 19, + "endLine": 6, + "line": 6, + "message": "Unexpected use of comma operator.", + "messageId": "unexpectedCommaExpression", + "nodeType": "SequenceExpression", + "ruleId": "no-sequences", + "severity": 2, + }, +] +`; + +exports[`ban-comma-operator ошибки индекс теста: 4 1`] = ` +Array [ + Object { + "column": 28, + "endColumn": 29, + "endLine": 6, + "line": 6, + "message": "Unexpected use of comma operator.", + "messageId": "unexpectedCommaExpression", + "nodeType": "SequenceExpression", + "ruleId": "no-sequences", + "severity": 2, + }, +] +`; + +exports[`ban-comma-operator ошибки индекс теста: 5 1`] = ` +Array [ + Object { + "column": 27, + "endColumn": 28, + "endLine": 6, + "line": 6, + "message": "Unexpected use of comma operator.", + "messageId": "unexpectedCommaExpression", + "nodeType": "SequenceExpression", + "ruleId": "no-sequences", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/ban-ts-ignore.test.ts.snap b/tests/lint/__snapshots__/ban-ts-ignore.test.ts.snap new file mode 100644 index 0000000..f9267e8 --- /dev/null +++ b/tests/lint/__snapshots__/ban-ts-ignore.test.ts.snap @@ -0,0 +1,53 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ban-ts-ignore не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`ban-ts-ignore не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`ban-ts-ignore ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 14, + "endLine": 1, + "line": 1, + "message": "Use \\"@ts-expect-error\\" instead of \\"@ts-ignore\\", as \\"@ts-ignore\\" will do nothing if the following line is error-free.", + "messageId": "tsIgnoreInsteadOfExpectError", + "nodeType": "Line", + "ruleId": "@typescript-eslint/ban-ts-comment", + "severity": 1, + }, +] +`; + +exports[`ban-ts-ignore ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 20, + "endLine": 1, + "line": 1, + "message": "Include a description after the \\"@ts-expect-error\\" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer.", + "messageId": "tsDirectiveCommentRequiresDescription", + "nodeType": "Line", + "ruleId": "@typescript-eslint/ban-ts-comment", + "severity": 1, + }, +] +`; + +exports[`ban-ts-ignore ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 15, + "endLine": 1, + "line": 1, + "message": "Do not use \\"@ts-nocheck\\" because it alters compilation errors.", + "messageId": "tsDirectiveComment", + "nodeType": "Line", + "ruleId": "@typescript-eslint/ban-ts-comment", + "severity": 1, + }, +] +`; diff --git a/tests/lint/__snapshots__/ban-tslint-comment.test.ts.snap b/tests/lint/__snapshots__/ban-tslint-comment.test.ts.snap new file mode 100644 index 0000000..a7e0081 --- /dev/null +++ b/tests/lint/__snapshots__/ban-tslint-comment.test.ts.snap @@ -0,0 +1,113 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ban-tslint-comment ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 21, + "endLine": 1, + "line": 1, + "message": "tslint comment detected: \\"/* tslint:disable */\\"", + "messageId": "commentDetected", + "nodeType": "Block", + "ruleId": "@typescript-eslint/ban-tslint-comment", + "severity": 2, + }, +] +`; + +exports[`ban-tslint-comment ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 20, + "endLine": 1, + "line": 1, + "message": "tslint comment detected: \\"/* tslint:enable */\\"", + "messageId": "commentDetected", + "nodeType": "Block", + "ruleId": "@typescript-eslint/ban-tslint-comment", + "severity": 2, + }, +] +`; + +exports[`ban-tslint-comment ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 42, + "endLine": 1, + "line": 1, + "message": "tslint comment detected: \\"/* tslint:disable:rule1 rule2 rule3... */\\"", + "messageId": "commentDetected", + "nodeType": "Block", + "ruleId": "@typescript-eslint/ban-tslint-comment", + "severity": 2, + }, +] +`; + +exports[`ban-tslint-comment ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 41, + "endLine": 1, + "line": 1, + "message": "tslint comment detected: \\"/* tslint:enable:rule1 rule2 rule3... */\\"", + "messageId": "commentDetected", + "nodeType": "Block", + "ruleId": "@typescript-eslint/ban-tslint-comment", + "severity": 2, + }, +] +`; + +exports[`ban-tslint-comment ошибки индекс теста: 4 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 28, + "endLine": 1, + "line": 1, + "message": "tslint comment detected: \\"// tslint:disable-next-line\\"", + "messageId": "commentDetected", + "nodeType": "Line", + "ruleId": "@typescript-eslint/ban-tslint-comment", + "severity": 2, + }, +] +`; + +exports[`ban-tslint-comment ошибки индекс теста: 5 1`] = ` +Array [ + Object { + "column": 13, + "endColumn": 35, + "endLine": 1, + "line": 1, + "message": "tslint comment detected: \\"// tslint:disable-line\\"", + "messageId": "commentDetected", + "nodeType": "Line", + "ruleId": "@typescript-eslint/ban-tslint-comment", + "severity": 2, + }, +] +`; + +exports[`ban-tslint-comment ошибки индекс теста: 6 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 49, + "endLine": 1, + "line": 1, + "message": "tslint comment detected: \\"// tslint:disable-next-line:rule1 rule2 rule3...\\"", + "messageId": "commentDetected", + "nodeType": "Line", + "ruleId": "@typescript-eslint/ban-tslint-comment", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/ban-types.test.ts.snap b/tests/lint/__snapshots__/ban-types.test.ts.snap new file mode 100644 index 0000000..2da9457 --- /dev/null +++ b/tests/lint/__snapshots__/ban-types.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ban-types ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 8, + "endColumn": 16, + "endLine": 1, + "line": 1, + "message": "Don't use \`Deferred\` as a type. Use Promise instead.", + "messageId": "bannedTypeMessage", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/ban-types", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/callable-types.test.ts.snap b/tests/lint/__snapshots__/callable-types.test.ts.snap new file mode 100644 index 0000000..f0bcd9d --- /dev/null +++ b/tests/lint/__snapshots__/callable-types.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`callable-types не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`callable-types ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 14, + "endLine": 2, + "line": 2, + "message": "Interface only has a call signature, you should use a function type instead.", + "messageId": "functionTypeOverCallableType", + "nodeType": "TSCallSignatureDeclaration", + "ruleId": "@typescript-eslint/prefer-function-type", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/class-name.test.ts.snap b/tests/lint/__snapshots__/class-name.test.ts.snap new file mode 100644 index 0000000..95cf545 --- /dev/null +++ b/tests/lint/__snapshots__/class-name.test.ts.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`class-name не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`class-name не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`class-name ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 14, + "endLine": 1, + "line": 1, + "message": "Class name \`myClass\` must match one of the following formats: PascalCase", + "messageId": "doesNotMatchFormat", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/naming-convention", + "severity": 2, + }, +] +`; + +exports[`class-name ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 11, + "endColumn": 22, + "endLine": 1, + "line": 1, + "message": "Interface name \`myInterface\` must match one of the following formats: PascalCase", + "messageId": "doesNotMatchFormat", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/naming-convention", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/comment-format.test.ts.snap b/tests/lint/__snapshots__/comment-format.test.ts.snap new file mode 100644 index 0000000..0fc9404 --- /dev/null +++ b/tests/lint/__snapshots__/comment-format.test.ts.snap @@ -0,0 +1,57 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment-format не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`comment-format не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`comment-format не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`comment-format не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`comment-format ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 12, + "endLine": 1, + "line": 1, + "message": "Expected space or tab after '//' in comment.", + "messageId": "expectedSpaceAfter", + "nodeType": "Line", + "ruleId": "spaced-comment", + "severity": 1, + }, +] +`; + +exports[`comment-format ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 4, + "endLine": 3, + "line": 1, + "message": "Expected space or tab after '/*' in comment.", + "messageId": "expectedSpaceAfter", + "nodeType": "Block", + "ruleId": "spaced-comment", + "severity": 1, + }, +] +`; + +exports[`comment-format ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 4, + "endLine": 3, + "line": 1, + "message": "Expected space or tab after '/**' in comment.", + "messageId": "expectedSpaceAfter", + "nodeType": "Block", + "ruleId": "spaced-comment", + "severity": 1, + }, +] +`; diff --git a/tests/lint/__snapshots__/exhaustive-deps.test.tsx.snap b/tests/lint/__snapshots__/exhaustive-deps.test.tsx.snap new file mode 100644 index 0000000..7bcedf9 --- /dev/null +++ b/tests/lint/__snapshots__/exhaustive-deps.test.tsx.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react-hooks/exhaustive-deps не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`react-hooks/exhaustive-deps не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`react-hooks/exhaustive-deps не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`react-hooks/exhaustive-deps ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 6, + "endColumn": 8, + "endLine": 4, + "line": 4, + "message": "React Hook useCallback has a missing dependency: 'props.foo'. Either include it or remove the dependency array.", + "nodeType": "ArrayExpression", + "ruleId": "react-hooks/exhaustive-deps", + "severity": 1, + }, +] +`; + +exports[`react-hooks/exhaustive-deps ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 6, + "endColumn": 8, + "endLine": 5, + "line": 5, + "message": "React Hook useEffect has a missing dependency: 'local'. Either include it or remove the dependency array.", + "nodeType": "ArrayExpression", + "ruleId": "react-hooks/exhaustive-deps", + "severity": 1, + }, +] +`; diff --git a/tests/lint/__snapshots__/forin.test.ts.snap b/tests/lint/__snapshots__/forin.test.ts.snap new file mode 100644 index 0000000..a732d52 --- /dev/null +++ b/tests/lint/__snapshots__/forin.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`forin не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`forin ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 2, + "endLine": 5, + "line": 3, + "message": "The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype.", + "messageId": "wrap", + "nodeType": "ForInStatement", + "ruleId": "guard-for-in", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/function-component-definition.test.tsx.snap b/tests/lint/__snapshots__/function-component-definition.test.tsx.snap new file mode 100644 index 0000000..d46118e --- /dev/null +++ b/tests/lint/__snapshots__/function-component-definition.test.tsx.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react/function-component-definition не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`react/function-component-definition не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`react/function-component-definition не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`react/function-component-definition ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 19, + "endColumn": 2, + "endLine": 3, + "line": 1, + "message": "Function component is not a function declaration", + "messageId": "function-declaration", + "nodeType": "ArrowFunctionExpression", + "ruleId": "react/function-component-definition", + "severity": 2, + }, +] +`; + +exports[`react/function-component-definition ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 10, + "endColumn": 4, + "endLine": 4, + "line": 2, + "message": "Function component is not a function expression", + "messageId": "function-expression", + "nodeType": "ArrowFunctionExpression", + "ruleId": "react/function-component-definition", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/hook-use-state.test.tsx.snap b/tests/lint/__snapshots__/hook-use-state.test.tsx.snap new file mode 100644 index 0000000..720067b --- /dev/null +++ b/tests/lint/__snapshots__/hook-use-state.test.tsx.snap @@ -0,0 +1,73 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react/hook-use-state не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`react/hook-use-state не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`react/hook-use-state не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`react/hook-use-state не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`react/hook-use-state ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 26, + "endColumn": 42, + "endLine": 3, + "line": 3, + "message": "useState call is not destructured into value + setter pair", + "messageId": "useStateErrorMessage", + "nodeType": "CallExpression", + "ruleId": "react/hook-use-state", + "severity": 2, + }, +] +`; + +exports[`react/hook-use-state ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 9, + "endColumn": 29, + "endLine": 3, + "line": 3, + "message": "useState call is not destructured into value + setter pair", + "messageId": "useStateErrorMessage", + "nodeType": "ArrayPattern", + "ruleId": "react/hook-use-state", + "severity": 2, + }, +] +`; + +exports[`react/hook-use-state ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 26, + "endColumn": 36, + "endLine": 3, + "line": 3, + "message": "useState call is not destructured into value + setter pair", + "messageId": "useStateErrorMessage", + "nodeType": "CallExpression", + "ruleId": "react/hook-use-state", + "severity": 2, + }, +] +`; + +exports[`react/hook-use-state ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 9, + "endColumn": 29, + "endLine": 3, + "line": 3, + "message": "useState call is not destructured into value + setter pair", + "messageId": "useStateErrorMessage", + "nodeType": "ArrayPattern", + "ruleId": "react/hook-use-state", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/jsx-fragments.test.tsx.snap b/tests/lint/__snapshots__/jsx-fragments.test.tsx.snap new file mode 100644 index 0000000..d0a5b83 --- /dev/null +++ b/tests/lint/__snapshots__/jsx-fragments.test.tsx.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react/jsx-fragments не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`react/jsx-fragments не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`react/jsx-fragments ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 10, + "endColumn": 18, + "endLine": 5, + "line": 2, + "message": "Prefer fragment shorthand over React.Fragment", + "messageId": "preferFragment", + "nodeType": "JSXElement", + "ruleId": "react/jsx-fragments", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/jsx-max-props-per-line.test.tsx.snap b/tests/lint/__snapshots__/jsx-max-props-per-line.test.tsx.snap new file mode 100644 index 0000000..3a7e834 --- /dev/null +++ b/tests/lint/__snapshots__/jsx-max-props-per-line.test.tsx.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react/jsx-max-props-per-line не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`react/jsx-max-props-per-line не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`react/jsx-max-props-per-line ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 7, + "endLine": 4, + "line": 4, + "message": "Prop \`baz\` must be placed on a new line", + "messageId": "newLine", + "nodeType": "JSXAttribute", + "ruleId": "react/jsx-max-props-per-line", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/jsx-no-constructed-context-values.test.tsx.snap b/tests/lint/__snapshots__/jsx-no-constructed-context-values.test.tsx.snap new file mode 100644 index 0000000..ed14c88 --- /dev/null +++ b/tests/lint/__snapshots__/jsx-no-constructed-context-values.test.tsx.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react/jsx-no-constructed-context-values не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`react/jsx-no-constructed-context-values ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 39, + "endColumn": 51, + "endLine": 2, + "line": 2, + "message": "The object passed as the value prop to the Context provider (at line 2) changes every render. To fix this consider wrapping it in a useMemo hook.", + "messageId": "defaultMsg", + "nodeType": "ObjectExpression", + "ruleId": "react/jsx-no-constructed-context-values", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/jsx-no-duplicate-props.test.tsx.snap b/tests/lint/__snapshots__/jsx-no-duplicate-props.test.tsx.snap new file mode 100644 index 0000000..1cb8611 --- /dev/null +++ b/tests/lint/__snapshots__/jsx-no-duplicate-props.test.tsx.snap @@ -0,0 +1,33 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react/jsx-no-duplicate-props ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 29, + "endColumn": 40, + "endLine": 2, + "line": 2, + "message": "No duplicate props allowed", + "messageId": "noDuplicateProps", + "nodeType": "JSXAttribute", + "ruleId": "react/jsx-no-duplicate-props", + "severity": 2, + }, +] +`; + +exports[`react/jsx-no-duplicate-props ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 29, + "endColumn": 40, + "endLine": 2, + "line": 2, + "message": "No duplicate props allowed", + "messageId": "noDuplicateProps", + "nodeType": "JSXAttribute", + "ruleId": "react/jsx-no-duplicate-props", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/jsx-no-useless-fragment.test.tsx.snap b/tests/lint/__snapshots__/jsx-no-useless-fragment.test.tsx.snap new file mode 100644 index 0000000..2b54761 --- /dev/null +++ b/tests/lint/__snapshots__/jsx-no-useless-fragment.test.tsx.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react/jsx-no-useless-fragment не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`react/jsx-no-useless-fragment ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 10, + "endColumn": 4, + "endLine": 4, + "line": 2, + "message": "Fragments should contain more than one child - otherwise, there’s no need for a Fragment at all.", + "messageId": "NeedsMoreChildren", + "nodeType": "JSXFragment", + "ruleId": "react/jsx-no-useless-fragment", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/label-position.test.ts.snap b/tests/lint/__snapshots__/label-position.test.ts.snap new file mode 100644 index 0000000..4500ee4 --- /dev/null +++ b/tests/lint/__snapshots__/label-position.test.ts.snap @@ -0,0 +1,65 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`label-position не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`label-position не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`label-position не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`label-position не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`label-position не ошибки индекс теста: 4 1`] = `Array []`; + +exports[`label-position ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 2, + "endLine": 3, + "line": 1, + "message": "Unexpected labeled statement.", + "messageId": "unexpectedLabel", + "nodeType": "LabeledStatement", + "ruleId": "no-labels", + "severity": 2, + }, + Object { + "column": 5, + "endColumn": 17, + "endLine": 2, + "line": 2, + "message": "Unexpected label in break statement.", + "messageId": "unexpectedLabelInBreak", + "nodeType": "BreakStatement", + "ruleId": "no-labels", + "severity": 2, + }, +] +`; + +exports[`label-position ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 6, + "endLine": 4, + "line": 1, + "message": "Unexpected labeled statement.", + "messageId": "unexpectedLabel", + "nodeType": "LabeledStatement", + "ruleId": "no-labels", + "severity": 2, + }, + Object { + "column": 9, + "endColumn": 21, + "endLine": 3, + "line": 3, + "message": "Unexpected label in break statement.", + "messageId": "unexpectedLabelInBreak", + "nodeType": "BreakStatement", + "ruleId": "no-labels", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/max-classes-per-file.test.ts.snap b/tests/lint/__snapshots__/max-classes-per-file.test.ts.snap new file mode 100644 index 0000000..4a836fe --- /dev/null +++ b/tests/lint/__snapshots__/max-classes-per-file.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`max-classes-per-file не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`max-classes-per-file ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 1, + "endLine": 16, + "line": 1, + "message": "File has too many classes (8). Maximum allowed is 7.", + "messageId": "maximumExceeded", + "nodeType": "Program", + "ruleId": "max-classes-per-file", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/max-line-length.test.ts.snap b/tests/lint/__snapshots__/max-line-length.test.ts.snap new file mode 100644 index 0000000..acd7d84 --- /dev/null +++ b/tests/lint/__snapshots__/max-line-length.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`max-line-length не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`max-line-length не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`max-line-length ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 122, + "endLine": 1, + "line": 1, + "message": "This line has a length of 121. Maximum allowed is 120.", + "messageId": "max", + "nodeType": "Program", + "ruleId": "max-len", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/member-access.test.ts.snap b/tests/lint/__snapshots__/member-access.test.ts.snap new file mode 100644 index 0000000..7bce252 --- /dev/null +++ b/tests/lint/__snapshots__/member-access.test.ts.snap @@ -0,0 +1,63 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`member-access не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`member-access ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 31, + "endLine": 2, + "line": 2, + "message": "Public accessibility modifier on class property animalName.", + "messageId": "unwantedPublicAccessibility", + "nodeType": "PropertyDefinition", + "ruleId": "@typescript-eslint/explicit-member-accessibility", + "severity": 2, + }, + Object { + "column": 5, + "endColumn": 6, + "endLine": 5, + "line": 3, + "message": "Public accessibility modifier on method definition constructor.", + "messageId": "unwantedPublicAccessibility", + "nodeType": "MethodDefinition", + "ruleId": "@typescript-eslint/explicit-member-accessibility", + "severity": 2, + }, + Object { + "column": 5, + "endColumn": 6, + "endLine": 8, + "line": 6, + "message": "Public accessibility modifier on get property accessor name.", + "messageId": "unwantedPublicAccessibility", + "nodeType": "MethodDefinition", + "ruleId": "@typescript-eslint/explicit-member-accessibility", + "severity": 2, + }, + Object { + "column": 5, + "endColumn": 6, + "endLine": 11, + "line": 9, + "message": "Public accessibility modifier on set property accessor name.", + "messageId": "unwantedPublicAccessibility", + "nodeType": "MethodDefinition", + "ruleId": "@typescript-eslint/explicit-member-accessibility", + "severity": 2, + }, + Object { + "column": 5, + "endColumn": 6, + "endLine": 14, + "line": 12, + "message": "Public accessibility modifier on method definition walk.", + "messageId": "unwantedPublicAccessibility", + "nodeType": "MethodDefinition", + "ruleId": "@typescript-eslint/explicit-member-accessibility", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/member-ordering.test.ts.snap b/tests/lint/__snapshots__/member-ordering.test.ts.snap new file mode 100644 index 0000000..e002c53 --- /dev/null +++ b/tests/lint/__snapshots__/member-ordering.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`member-ordering не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`member-ordering ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 6, + "endLine": 9, + "line": 7, + "message": "Member method should be declared before all static field definitions.", + "messageId": "incorrectGroupOrder", + "nodeType": "MethodDefinition", + "ruleId": "@typescript-eslint/member-ordering", + "severity": 1, + }, +] +`; diff --git a/tests/lint/__snapshots__/new-parens.test.ts.snap b/tests/lint/__snapshots__/new-parens.test.ts.snap new file mode 100644 index 0000000..575b4ca --- /dev/null +++ b/tests/lint/__snapshots__/new-parens.test.ts.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`new-parens не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`new-parens не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`new-parens ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 16, + "endColumn": 26, + "endLine": 2, + "line": 2, + "message": "Missing '()' invoking a constructor.", + "messageId": "missing", + "nodeType": "NewExpression", + "ruleId": "new-parens", + "severity": 2, + }, +] +`; + +exports[`new-parens ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 17, + "endColumn": 29, + "endLine": 2, + "line": 2, + "message": "Missing '()' invoking a constructor.", + "messageId": "missing", + "nodeType": "NewExpression", + "ruleId": "new-parens", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-angle-bracket-type-assertion.test.ts.snap b/tests/lint/__snapshots__/no-angle-bracket-type-assertion.test.ts.snap new file mode 100644 index 0000000..6a4e155 --- /dev/null +++ b/tests/lint/__snapshots__/no-angle-bracket-type-assertion.test.ts.snap @@ -0,0 +1,45 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-angle-bracket-type-assertion не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-angle-bracket-type-assertion не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`no-angle-bracket-type-assertion не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`no-angle-bracket-type-assertion не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`no-angle-bracket-type-assertion не ошибки индекс теста: 4 1`] = `Array []`; + +exports[`no-angle-bracket-type-assertion не ошибки индекс теста: 5 1`] = `Array []`; + +exports[`no-angle-bracket-type-assertion ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 15, + "endColumn": 28, + "endLine": 10, + "line": 10, + "message": "Use 'as ITest' instead of ''.", + "messageId": "as", + "nodeType": "TSTypeAssertion", + "ruleId": "@typescript-eslint/consistent-type-assertions", + "severity": 1, + }, +] +`; + +exports[`no-angle-bracket-type-assertion ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 12, + "endColumn": 6, + "endLine": 14, + "line": 11, + "message": "Use 'as ITest' instead of ''.", + "messageId": "as", + "nodeType": "TSTypeAssertion", + "ruleId": "@typescript-eslint/consistent-type-assertions", + "severity": 1, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-any.test.ts.snap b/tests/lint/__snapshots__/no-any.test.ts.snap new file mode 100644 index 0000000..3db949d --- /dev/null +++ b/tests/lint/__snapshots__/no-any.test.ts.snap @@ -0,0 +1,65 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-any ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 12, + "endColumn": 15, + "endLine": 1, + "line": 1, + "message": "Unexpected any. Specify a different type.", + "messageId": "unexpectedAny", + "nodeType": "TSAnyKeyword", + "ruleId": "@typescript-eslint/no-explicit-any", + "severity": 1, + }, +] +`; + +exports[`no-any ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 13, + "endColumn": 16, + "endLine": 1, + "line": 1, + "message": "Unexpected any. Specify a different type.", + "messageId": "unexpectedAny", + "nodeType": "TSAnyKeyword", + "ruleId": "@typescript-eslint/no-explicit-any", + "severity": 1, + }, +] +`; + +exports[`no-any ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 19, + "endColumn": 22, + "endLine": 1, + "line": 1, + "message": "Unexpected any. Specify a different type.", + "messageId": "unexpectedAny", + "nodeType": "TSAnyKeyword", + "ruleId": "@typescript-eslint/no-explicit-any", + "severity": 1, + }, +] +`; + +exports[`no-any ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 24, + "endColumn": 27, + "endLine": 1, + "line": 1, + "message": "Unexpected any. Specify a different type.", + "messageId": "unexpectedAny", + "nodeType": "TSAnyKeyword", + "ruleId": "@typescript-eslint/no-explicit-any", + "severity": 1, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-arg.test.ts.snap b/tests/lint/__snapshots__/no-arg.test.ts.snap new file mode 100644 index 0000000..17f4360 --- /dev/null +++ b/tests/lint/__snapshots__/no-arg.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-arg ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 20, + "endColumn": 36, + "endLine": 2, + "line": 2, + "message": "Avoid arguments.callee.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-caller", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-array-index-key.test.tsx.snap b/tests/lint/__snapshots__/no-array-index-key.test.tsx.snap new file mode 100644 index 0000000..3da33cb --- /dev/null +++ b/tests/lint/__snapshots__/no-array-index-key.test.tsx.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react/no-array-index-key не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`react/no-array-index-key ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 24, + "endColumn": 29, + "endLine": 10, + "line": 10, + "message": "Do not use Array index in keys", + "messageId": "noArrayIndex", + "nodeType": "Identifier", + "ruleId": "react/no-array-index-key", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-bitwise.test.ts.snap b/tests/lint/__snapshots__/no-bitwise.test.ts.snap new file mode 100644 index 0000000..d10324b --- /dev/null +++ b/tests/lint/__snapshots__/no-bitwise.test.ts.snap @@ -0,0 +1,184 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-bitwise ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 14, + "endColumn": 19, + "endLine": 1, + "line": 1, + "message": "Unexpected use of '|'.", + "messageId": "unexpected", + "nodeType": "BinaryExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, +] +`; + +exports[`no-bitwise ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 14, + "endColumn": 19, + "endLine": 1, + "line": 1, + "message": "Unexpected use of '&'.", + "messageId": "unexpected", + "nodeType": "BinaryExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, +] +`; + +exports[`no-bitwise ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 14, + "endColumn": 19, + "endLine": 1, + "line": 1, + "message": "Unexpected use of '^'.", + "messageId": "unexpected", + "nodeType": "BinaryExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, +] +`; + +exports[`no-bitwise ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 14, + "endColumn": 17, + "endLine": 1, + "line": 1, + "message": "Unexpected use of '~'.", + "messageId": "unexpected", + "nodeType": "UnaryExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, +] +`; + +exports[`no-bitwise ошибки индекс теста: 4 1`] = ` +Array [ + Object { + "column": 14, + "endColumn": 20, + "endLine": 1, + "line": 1, + "message": "Unexpected use of '<<'.", + "messageId": "unexpected", + "nodeType": "BinaryExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, +] +`; + +exports[`no-bitwise ошибки индекс теста: 5 1`] = ` +Array [ + Object { + "column": 14, + "endColumn": 20, + "endLine": 1, + "line": 1, + "message": "Unexpected use of '>>'.", + "messageId": "unexpected", + "nodeType": "BinaryExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, +] +`; + +exports[`no-bitwise ошибки индекс теста: 6 1`] = ` +Array [ + Object { + "column": 14, + "endColumn": 21, + "endLine": 1, + "line": 1, + "message": "Unexpected use of '>>>'.", + "messageId": "unexpected", + "nodeType": "BinaryExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, +] +`; + +exports[`no-bitwise ошибки индекс теста: 7 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 10, + "endLine": 3, + "line": 3, + "message": "Unexpected use of '|='.", + "messageId": "unexpected", + "nodeType": "AssignmentExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, + Object { + "column": 1, + "endColumn": 10, + "endLine": 5, + "line": 5, + "message": "Unexpected use of '&='.", + "messageId": "unexpected", + "nodeType": "AssignmentExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, + Object { + "column": 1, + "endColumn": 10, + "endLine": 7, + "line": 7, + "message": "Unexpected use of '^='.", + "messageId": "unexpected", + "nodeType": "AssignmentExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, + Object { + "column": 1, + "endColumn": 11, + "endLine": 9, + "line": 9, + "message": "Unexpected use of '<<='.", + "messageId": "unexpected", + "nodeType": "AssignmentExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, + Object { + "column": 1, + "endColumn": 11, + "endLine": 11, + "line": 11, + "message": "Unexpected use of '>>='.", + "messageId": "unexpected", + "nodeType": "AssignmentExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, + Object { + "column": 1, + "endColumn": 12, + "endLine": 13, + "line": 13, + "message": "Unexpected use of '>>>='.", + "messageId": "unexpected", + "nodeType": "AssignmentExpression", + "ruleId": "no-bitwise", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-conditional-assignment.test.ts.snap b/tests/lint/__snapshots__/no-conditional-assignment.test.ts.snap new file mode 100644 index 0000000..ebeaab8 --- /dev/null +++ b/tests/lint/__snapshots__/no-conditional-assignment.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-conditional-assignment не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-conditional-assignment ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 11, + "endLine": 2, + "line": 2, + "message": "Unexpected assignment within an 'if' statement.", + "messageId": "unexpected", + "nodeType": "AssignmentExpression", + "ruleId": "no-cond-assign", + "severity": 1, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-console.test.ts.snap b/tests/lint/__snapshots__/no-console.test.ts.snap new file mode 100644 index 0000000..a4a5100 --- /dev/null +++ b/tests/lint/__snapshots__/no-console.test.ts.snap @@ -0,0 +1,289 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-console ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 12, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 14, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 13, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 12, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 4 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 15, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 5 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 14, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 6 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 15, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 7 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 14, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 8 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 19, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 9 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 14, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 10 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 14, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 11 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 23, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 12 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 17, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 13 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 13, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 14 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 13, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 15 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 16, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 16 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 16, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; + +exports[`no-console ошибки индекс теста: 17 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 14, + "endLine": 1, + "line": 1, + "message": "Unexpected console statement.", + "messageId": "unexpected", + "nodeType": "MemberExpression", + "ruleId": "no-console", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-construct.test.ts.snap b/tests/lint/__snapshots__/no-construct.test.ts.snap new file mode 100644 index 0000000..1ac81f1 --- /dev/null +++ b/tests/lint/__snapshots__/no-construct.test.ts.snap @@ -0,0 +1,49 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-construct ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 22, + "endColumn": 47, + "endLine": 1, + "line": 1, + "message": "Do not use String as a constructor.", + "messageId": "noConstructor", + "nodeType": "NewExpression", + "ruleId": "no-new-wrappers", + "severity": 2, + }, +] +`; + +exports[`no-construct ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 22, + "endColumn": 35, + "endLine": 1, + "line": 1, + "message": "Do not use Number as a constructor.", + "messageId": "noConstructor", + "nodeType": "NewExpression", + "ruleId": "no-new-wrappers", + "severity": 2, + }, +] +`; + +exports[`no-construct ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 23, + "endColumn": 41, + "endLine": 1, + "line": 1, + "message": "Do not use Boolean as a constructor.", + "messageId": "noConstructor", + "nodeType": "NewExpression", + "ruleId": "no-new-wrappers", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-danger-with-children.test.tsx.snap b/tests/lint/__snapshots__/no-danger-with-children.test.tsx.snap new file mode 100644 index 0000000..fc718a8 --- /dev/null +++ b/tests/lint/__snapshots__/no-danger-with-children.test.tsx.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react/no-danger-with-children не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`react/no-danger-with-children не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`react/no-danger-with-children ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 10, + "endColumn": 7, + "endLine": 4, + "line": 2, + "message": "Only set one of \`children\` or \`props.dangerouslySetInnerHTML\`", + "messageId": "dangerWithChildren", + "nodeType": "JSXElement", + "ruleId": "react/no-danger-with-children", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-debugger.test.ts.snap b/tests/lint/__snapshots__/no-debugger.test.ts.snap new file mode 100644 index 0000000..864bbda --- /dev/null +++ b/tests/lint/__snapshots__/no-debugger.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-debugger ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 10, + "endLine": 1, + "line": 1, + "message": "Unexpected 'debugger' statement.", + "messageId": "unexpected", + "nodeType": "DebuggerStatement", + "ruleId": "no-debugger", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-duplicate-super.test.ts.snap b/tests/lint/__snapshots__/no-duplicate-super.test.ts.snap new file mode 100644 index 0000000..82b301d --- /dev/null +++ b/tests/lint/__snapshots__/no-duplicate-super.test.ts.snap @@ -0,0 +1,81 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-duplicate-super ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 9, + "endColumn": 16, + "endLine": 3, + "line": 3, + "message": "Unexpected 'super()'.", + "messageId": "unexpected", + "nodeType": "CallExpression", + "ruleId": "constructor-super", + "severity": 2, + }, +] +`; + +exports[`no-duplicate-super ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 6, + "endLine": 6, + "line": 4, + "message": "Expected to call 'super()'.", + "messageId": "missingAll", + "nodeType": "MethodDefinition", + "ruleId": "constructor-super", + "severity": 2, + }, +] +`; + +exports[`no-duplicate-super ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 9, + "endColumn": 16, + "endLine": 4, + "line": 4, + "message": "Unexpected 'super()' because 'super' is not a constructor.", + "messageId": "badSuper", + "nodeType": "CallExpression", + "ruleId": "constructor-super", + "severity": 2, + }, +] +`; + +exports[`no-duplicate-super ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 6, + "endLine": 4, + "line": 2, + "message": "Expected to call 'super()'.", + "messageId": "missingAll", + "nodeType": "MethodDefinition", + "ruleId": "constructor-super", + "severity": 2, + }, +] +`; + +exports[`no-duplicate-super ошибки индекс теста: 4 1`] = ` +Array [ + Object { + "column": 9, + "endColumn": 16, + "endLine": 4, + "line": 4, + "message": "Unexpected duplicate 'super()'.", + "messageId": "duplicate", + "nodeType": "CallExpression", + "ruleId": "constructor-super", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-empty-interface.test.ts.snap b/tests/lint/__snapshots__/no-empty-interface.test.ts.snap new file mode 100644 index 0000000..979dc30 --- /dev/null +++ b/tests/lint/__snapshots__/no-empty-interface.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-empty-interface не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-empty-interface ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 11, + "endColumn": 14, + "endLine": 1, + "line": 1, + "message": "An empty interface is equivalent to \`{}\`.", + "messageId": "noEmpty", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/no-empty-interface", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-empty.test.ts.snap b/tests/lint/__snapshots__/no-empty.test.ts.snap new file mode 100644 index 0000000..3f8ed90 --- /dev/null +++ b/tests/lint/__snapshots__/no-empty.test.ts.snap @@ -0,0 +1,84 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-empty не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-empty не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`no-empty не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`no-empty не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`no-empty ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 10, + "endColumn": 2, + "endLine": 6, + "line": 5, + "message": "Empty block statement.", + "messageId": "unexpected", + "nodeType": "BlockStatement", + "ruleId": "no-empty", + "severity": 2, + }, +] +`; + +exports[`no-empty ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 13, + "endColumn": 2, + "endLine": 6, + "line": 5, + "message": "Empty block statement.", + "messageId": "unexpected", + "nodeType": "BlockStatement", + "ruleId": "no-empty", + "severity": 2, + }, +] +`; + +exports[`no-empty ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 2, + "endLine": 6, + "line": 5, + "message": "Empty switch statement.", + "messageId": "unexpected", + "nodeType": "SwitchStatement", + "ruleId": "no-empty", + "severity": 2, + }, +] +`; + +exports[`no-empty ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 13, + "endColumn": 2, + "endLine": 9, + "line": 7, + "message": "Empty block statement.", + "messageId": "unexpected", + "nodeType": "BlockStatement", + "ruleId": "no-empty", + "severity": 2, + }, + Object { + "column": 11, + "endColumn": 2, + "endLine": 11, + "line": 9, + "message": "Empty block statement.", + "messageId": "unexpected", + "nodeType": "BlockStatement", + "ruleId": "no-empty", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-eval.test.ts.snap b/tests/lint/__snapshots__/no-eval.test.ts.snap new file mode 100644 index 0000000..a87d774 --- /dev/null +++ b/tests/lint/__snapshots__/no-eval.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-eval ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 5, + "endLine": 1, + "line": 1, + "message": "eval can be harmful.", + "messageId": "unexpected", + "nodeType": "CallExpression", + "ruleId": "no-eval", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-invalid-this.test.ts.snap b/tests/lint/__snapshots__/no-invalid-this.test.ts.snap new file mode 100644 index 0000000..1791fa3 --- /dev/null +++ b/tests/lint/__snapshots__/no-invalid-this.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-invalid-this не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-invalid-this не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`no-invalid-this не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`no-invalid-this не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`no-invalid-this не ошибки индекс теста: 4 1`] = `Array []`; + +exports[`no-invalid-this не ошибки индекс теста: 5 1`] = `Array []`; + +exports[`no-invalid-this не ошибки индекс теста: 6 1`] = `Array []`; + +exports[`no-invalid-this не ошибки индекс теста: 7 1`] = `Array []`; diff --git a/tests/lint/__snapshots__/no-magic-numbers.test.ts.snap b/tests/lint/__snapshots__/no-magic-numbers.test.ts.snap new file mode 100644 index 0000000..051b8fc --- /dev/null +++ b/tests/lint/__snapshots__/no-magic-numbers.test.ts.snap @@ -0,0 +1,47 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-magic-numbers не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-magic-numbers не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`no-magic-numbers не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`no-magic-numbers не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`no-magic-numbers не ошибки индекс теста: 4 1`] = `Array []`; + +exports[`no-magic-numbers не ошибки индекс теста: 5 1`] = `Array []`; + +exports[`no-magic-numbers не ошибки индекс теста: 6 1`] = `Array []`; + +exports[`no-magic-numbers ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 12, + "endColumn": 16, + "endLine": 2, + "line": 2, + "message": "No magic number: 1000.", + "messageId": "noMagic", + "nodeType": "Literal", + "ruleId": "@typescript-eslint/no-magic-numbers", + "severity": 1, + }, +] +`; + +exports[`no-magic-numbers ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 21, + "endColumn": 24, + "endLine": 2, + "line": 2, + "message": "No magic number: 100.", + "messageId": "noMagic", + "nodeType": "Literal", + "ruleId": "@typescript-eslint/no-magic-numbers", + "severity": 1, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-misused-new.test.ts.snap b/tests/lint/__snapshots__/no-misused-new.test.ts.snap new file mode 100644 index 0000000..6e2251f --- /dev/null +++ b/tests/lint/__snapshots__/no-misused-new.test.ts.snap @@ -0,0 +1,48 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-misused-new не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-misused-new не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`no-misused-new ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 14, + "endLine": 2, + "line": 2, + "message": "Class cannot have method named \`new\`.", + "messageId": "errorMessageClass", + "nodeType": "MethodDefinition", + "ruleId": "@typescript-eslint/no-misused-new", + "severity": 2, + }, +] +`; + +exports[`no-misused-new ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 15, + "endLine": 2, + "line": 2, + "message": "Interfaces cannot be constructed, only classes.", + "messageId": "errorMessageInterface", + "nodeType": "TSConstructSignatureDeclaration", + "ruleId": "@typescript-eslint/no-misused-new", + "severity": 2, + }, + Object { + "column": 5, + "endColumn": 25, + "endLine": 3, + "line": 3, + "message": "Interfaces cannot be constructed, only classes.", + "messageId": "errorMessageInterface", + "nodeType": "TSMethodSignature", + "ruleId": "@typescript-eslint/no-misused-new", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-namespace.test.ts.snap b/tests/lint/__snapshots__/no-namespace.test.ts.snap new file mode 100644 index 0000000..66a9d3d --- /dev/null +++ b/tests/lint/__snapshots__/no-namespace.test.ts.snap @@ -0,0 +1,65 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-namespace ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 14, + "endLine": 1, + "line": 1, + "message": "ES2015 module syntax is preferred over namespaces.", + "messageId": "moduleSyntaxIsPreferred", + "nodeType": "TSModuleDeclaration", + "ruleId": "@typescript-eslint/no-namespace", + "severity": 2, + }, +] +`; + +exports[`no-namespace ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 17, + "endLine": 1, + "line": 1, + "message": "ES2015 module syntax is preferred over namespaces.", + "messageId": "moduleSyntaxIsPreferred", + "nodeType": "TSModuleDeclaration", + "ruleId": "@typescript-eslint/no-namespace", + "severity": 2, + }, +] +`; + +exports[`no-namespace ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 22, + "endLine": 1, + "line": 1, + "message": "ES2015 module syntax is preferred over namespaces.", + "messageId": "moduleSyntaxIsPreferred", + "nodeType": "TSModuleDeclaration", + "ruleId": "@typescript-eslint/no-namespace", + "severity": 2, + }, +] +`; + +exports[`no-namespace ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 25, + "endLine": 1, + "line": 1, + "message": "ES2015 module syntax is preferred over namespaces.", + "messageId": "moduleSyntaxIsPreferred", + "nodeType": "TSModuleDeclaration", + "ruleId": "@typescript-eslint/no-namespace", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-non-null-assertion.test.ts.snap b/tests/lint/__snapshots__/no-non-null-assertion.test.ts.snap new file mode 100644 index 0000000..631d60a --- /dev/null +++ b/tests/lint/__snapshots__/no-non-null-assertion.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-non-null-assertion ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 30, + "endColumn": 38, + "endLine": 1, + "line": 1, + "message": "Forbidden non-null assertion.", + "messageId": "noNonNull", + "nodeType": "TSNonNullExpression", + "ruleId": "@typescript-eslint/no-non-null-assertion", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-parameter-reassignment.test.ts.snap b/tests/lint/__snapshots__/no-parameter-reassignment.test.ts.snap new file mode 100644 index 0000000..dc88e27 --- /dev/null +++ b/tests/lint/__snapshots__/no-parameter-reassignment.test.ts.snap @@ -0,0 +1,35 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-parameter-reassignment не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-parameter-reassignment ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 8, + "endLine": 2, + "line": 2, + "message": "Assignment to function parameter 'bar'.", + "messageId": "assignmentToFunctionParam", + "nodeType": "Identifier", + "ruleId": "no-param-reassign", + "severity": 1, + }, +] +`; + +exports[`no-parameter-reassignment ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 8, + "endLine": 2, + "line": 2, + "message": "Assignment to function parameter 'bar'.", + "messageId": "assignmentToFunctionParam", + "nodeType": "Identifier", + "ruleId": "no-param-reassign", + "severity": 1, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-parameters-properties.test.ts.snap b/tests/lint/__snapshots__/no-parameters-properties.test.ts.snap new file mode 100644 index 0000000..1073d14 --- /dev/null +++ b/tests/lint/__snapshots__/no-parameters-properties.test.ts.snap @@ -0,0 +1,15 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-parameter-properties не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-parameter-properties не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`no-parameter-properties не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`no-parameter-properties не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`no-parameter-properties не ошибки индекс теста: 4 1`] = `Array []`; + +exports[`no-parameter-properties не ошибки индекс теста: 5 1`] = `Array []`; + +exports[`no-parameter-properties не ошибки индекс теста: 6 1`] = `Array []`; diff --git a/tests/lint/__snapshots__/no-reference.test.ts.snap b/tests/lint/__snapshots__/no-reference.test.ts.snap new file mode 100644 index 0000000..2542743 --- /dev/null +++ b/tests/lint/__snapshots__/no-reference.test.ts.snap @@ -0,0 +1,49 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-reference ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 29, + "endLine": 1, + "line": 1, + "message": "Do not use a triple slash reference for foo, use \`import\` style instead.", + "messageId": "tripleSlashReference", + "nodeType": "Line", + "ruleId": "@typescript-eslint/triple-slash-reference", + "severity": 2, + }, +] +`; + +exports[`no-reference ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 30, + "endLine": 1, + "line": 1, + "message": "Do not use a triple slash reference for bar, use \`import\` style instead.", + "messageId": "tripleSlashReference", + "nodeType": "Line", + "ruleId": "@typescript-eslint/triple-slash-reference", + "severity": 2, + }, +] +`; + +exports[`no-reference ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 28, + "endLine": 1, + "line": 1, + "message": "Do not use a triple slash reference for baz, use \`import\` style instead.", + "messageId": "tripleSlashReference", + "nodeType": "Line", + "ruleId": "@typescript-eslint/triple-slash-reference", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-return-await.test.ts.snap b/tests/lint/__snapshots__/no-return-await.test.ts.snap new file mode 100644 index 0000000..a6b164c --- /dev/null +++ b/tests/lint/__snapshots__/no-return-await.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-return-await не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-return-await ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 12, + "endColumn": 23, + "endLine": 5, + "line": 5, + "message": "Redundant use of \`await\` on a return value.", + "messageId": "redundantUseOfAwait", + "nodeType": "Identifier", + "ruleId": "no-return-await", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-shadow.test.ts.snap b/tests/lint/__snapshots__/no-shadow.test.ts.snap new file mode 100644 index 0000000..95bce55 --- /dev/null +++ b/tests/lint/__snapshots__/no-shadow.test.ts.snap @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-shadow ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 11, + "endColumn": 12, + "endLine": 2, + "line": 2, + "message": "'a' is already declared in the upper scope on line 6 column 7.", + "messageId": "noShadow", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/no-shadow", + "severity": 1, + }, + Object { + "column": 11, + "endColumn": 12, + "endLine": 3, + "line": 3, + "message": "'b' is already declared in the upper scope on line 7 column 10.", + "messageId": "noShadow", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/no-shadow", + "severity": 1, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-string-literal.test.ts.snap b/tests/lint/__snapshots__/no-string-literal.test.ts.snap new file mode 100644 index 0000000..b70cbeb --- /dev/null +++ b/tests/lint/__snapshots__/no-string-literal.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-string-literal не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-string-literal не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`no-string-literal ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 15, + "endColumn": 22, + "endLine": 2, + "line": 2, + "message": "[\\"class\\"] is better written in dot notation.", + "messageId": "useDot", + "nodeType": "Literal", + "ruleId": "dot-notation", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-string-throw.test.ts.snap b/tests/lint/__snapshots__/no-string-throw.test.ts.snap new file mode 100644 index 0000000..f133ed6 --- /dev/null +++ b/tests/lint/__snapshots__/no-string-throw.test.ts.snap @@ -0,0 +1,129 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-string-throw не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-string-throw не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`no-string-throw не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`no-string-throw не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`no-string-throw не ошибки индекс теста: 4 1`] = `Array []`; + +exports[`no-string-throw не ошибки индекс теста: 5 1`] = `Array []`; + +exports[`no-string-throw не ошибки индекс теста: 6 1`] = `Array []`; + +exports[`no-string-throw не ошибки индекс теста: 7 1`] = `Array []`; + +exports[`no-string-throw ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 14, + "endLine": 1, + "line": 1, + "message": "Expected an error object to be thrown.", + "messageId": "object", + "nodeType": "Literal", + "ruleId": "@typescript-eslint/no-throw-literal", + "severity": 2, + }, +] +`; + +exports[`no-string-throw ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 8, + "endLine": 1, + "line": 1, + "message": "Expected an error object to be thrown.", + "messageId": "object", + "nodeType": "Literal", + "ruleId": "@typescript-eslint/no-throw-literal", + "severity": 2, + }, +] +`; + +exports[`no-string-throw ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 16, + "endLine": 1, + "line": 1, + "message": "Do not throw undefined.", + "messageId": "undef", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/no-throw-literal", + "severity": 2, + }, +] +`; + +exports[`no-string-throw ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 11, + "endLine": 1, + "line": 1, + "message": "Expected an error object to be thrown.", + "messageId": "object", + "nodeType": "Literal", + "ruleId": "@typescript-eslint/no-throw-literal", + "severity": 2, + }, +] +`; + +exports[`no-string-throw ошибки индекс теста: 4 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 18, + "endLine": 2, + "line": 2, + "message": "Expected an error object to be thrown.", + "messageId": "object", + "nodeType": "BinaryExpression", + "ruleId": "@typescript-eslint/no-throw-literal", + "severity": 2, + }, +] +`; + +exports[`no-string-throw ошибки индекс теста: 5 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 15, + "endLine": 2, + "line": 2, + "message": "Expected an error object to be thrown.", + "messageId": "object", + "nodeType": "TemplateLiteral", + "ruleId": "@typescript-eslint/no-throw-literal", + "severity": 2, + }, +] +`; + +exports[`no-string-throw ошибки индекс теста: 6 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 14, + "endLine": 4, + "line": 4, + "message": "Expected an error object to be thrown.", + "messageId": "object", + "nodeType": "MemberExpression", + "ruleId": "@typescript-eslint/no-throw-literal", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-switch-case-fall-through.test.ts.snap b/tests/lint/__snapshots__/no-switch-case-fall-through.test.ts.snap new file mode 100644 index 0000000..f1fdb29 --- /dev/null +++ b/tests/lint/__snapshots__/no-switch-case-fall-through.test.ts.snap @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-switch-case-fall-through не ошибки индекс теста: 0 1`] = `Array []`; diff --git a/tests/lint/__snapshots__/no-this-assignment.test.ts.snap b/tests/lint/__snapshots__/no-this-assignment.test.ts.snap new file mode 100644 index 0000000..790c1f0 --- /dev/null +++ b/tests/lint/__snapshots__/no-this-assignment.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-this-assignment не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-this-assignment ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 12, + "endLine": 1, + "line": 1, + "message": "Unexpected aliasing of 'this' to local variable.", + "messageId": "thisAssignment", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/no-this-alias", + "severity": 1, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-trailing-whitespace.test.ts.snap b/tests/lint/__snapshots__/no-trailing-whitespace.test.ts.snap new file mode 100644 index 0000000..e3c40dc --- /dev/null +++ b/tests/lint/__snapshots__/no-trailing-whitespace.test.ts.snap @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-trailing-whitespace ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 18, + "endColumn": 19, + "endLine": 1, + "line": 1, + "message": "Trailing spaces not allowed.", + "messageId": "trailingSpace", + "nodeType": "Program", + "ruleId": "no-trailing-spaces", + "severity": 2, + }, + Object { + "column": 3, + "endColumn": 4, + "endLine": 2, + "line": 2, + "message": "Trailing spaces not allowed.", + "messageId": "trailingSpace", + "nodeType": "Program", + "ruleId": "no-trailing-spaces", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-unnecessary-initializer.test.ts.snap b/tests/lint/__snapshots__/no-unnecessary-initializer.test.ts.snap new file mode 100644 index 0000000..c7343a2 --- /dev/null +++ b/tests/lint/__snapshots__/no-unnecessary-initializer.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-unnecessary-initializer не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-unnecessary-initializer не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`no-unnecessary-initializer ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 20, + "endLine": 1, + "line": 1, + "message": "It's not necessary to initialize 'bar' to undefined.", + "messageId": "unnecessaryUndefinedInit", + "nodeType": "VariableDeclarator", + "ruleId": "no-undef-init", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-unsafe-finally.test.ts.snap b/tests/lint/__snapshots__/no-unsafe-finally.test.ts.snap new file mode 100644 index 0000000..1518c68 --- /dev/null +++ b/tests/lint/__snapshots__/no-unsafe-finally.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-unsafe-finally не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-unsafe-finally ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 9, + "endColumn": 19, + "endLine": 7, + "line": 7, + "message": "Unsafe usage of ReturnStatement.", + "messageId": "unsafeUsage", + "nodeType": "ReturnStatement", + "ruleId": "no-unsafe-finally", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-unstable-nested-components.test.tsx.snap b/tests/lint/__snapshots__/no-unstable-nested-components.test.tsx.snap new file mode 100644 index 0000000..d080242 --- /dev/null +++ b/tests/lint/__snapshots__/no-unstable-nested-components.test.tsx.snap @@ -0,0 +1,34 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react/no-unstable-nested-components не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`react/no-unstable-nested-components не ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 24, + "endColumn": 29, + "endLine": 1, + "line": 1, + "message": "Expected props to have a type annotation.", + "messageId": "expectedTypedefNamed", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/typedef", + "severity": 1, + }, +] +`; + +exports[`react/no-unstable-nested-components ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 3, + "endColumn": 4, + "endLine": 4, + "line": 2, + "message": "Do not define components during render. React will see a new component type on every render and destroy the entire subtree’s DOM nodes and state (https://reactjs.org/docs/reconciliation.html#elements-of-different-types). Instead, move this component definition out of the parent component “Component” and pass data as props.", + "nodeType": "FunctionDeclaration", + "ruleId": "react/no-unstable-nested-components", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-unused-expression.test.ts.snap b/tests/lint/__snapshots__/no-unused-expression.test.ts.snap new file mode 100644 index 0000000..337afc3 --- /dev/null +++ b/tests/lint/__snapshots__/no-unused-expression.test.ts.snap @@ -0,0 +1,109 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-unused-expression не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-unused-expression не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`no-unused-expression не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`no-unused-expression не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`no-unused-expression не ошибки индекс теста: 4 1`] = `Array []`; + +exports[`no-unused-expression не ошибки индекс теста: 5 1`] = `Array []`; + +exports[`no-unused-expression ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 3, + "endLine": 1, + "line": 1, + "message": "Expected an assignment or function call and instead saw an expression.", + "messageId": "unusedExpression", + "nodeType": "ExpressionStatement", + "ruleId": "@typescript-eslint/no-unused-expressions", + "severity": 2, + }, +] +`; + +exports[`no-unused-expression ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 9, + "endLine": 1, + "line": 1, + "message": "Expected an assignment or function call and instead saw an expression.", + "messageId": "unusedExpression", + "nodeType": "ExpressionStatement", + "ruleId": "@typescript-eslint/no-unused-expressions", + "severity": 2, + }, +] +`; + +exports[`no-unused-expression ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 10, + "endLine": 13, + "line": 13, + "message": "Expected an assignment or function call and instead saw an expression.", + "messageId": "unusedExpression", + "nodeType": "ExpressionStatement", + "ruleId": "@typescript-eslint/no-unused-expressions", + "severity": 2, + }, +] +`; + +exports[`no-unused-expression ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 3, + "endLine": 15, + "line": 13, + "message": "Expected an assignment or function call and instead saw an expression.", + "messageId": "unusedExpression", + "nodeType": "ExpressionStatement", + "ruleId": "@typescript-eslint/no-unused-expressions", + "severity": 2, + }, +] +`; + +exports[`no-unused-expression ошибки индекс теста: 4 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 40, + "endLine": 1, + "line": 1, + "message": "Expected an assignment or function call and instead saw an expression.", + "messageId": "unusedExpression", + "nodeType": "ExpressionStatement", + "ruleId": "@typescript-eslint/no-unused-expressions", + "severity": 2, + }, +] +`; + +exports[`no-unused-expression ошибки индекс теста: 5 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 35, + "endLine": 13, + "line": 13, + "message": "Expected an assignment or function call and instead saw an expression.", + "messageId": "unusedExpression", + "nodeType": "ExpressionStatement", + "ruleId": "@typescript-eslint/no-unused-expressions", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-use-before-declare.test.ts.snap b/tests/lint/__snapshots__/no-use-before-declare.test.ts.snap new file mode 100644 index 0000000..33fe88a --- /dev/null +++ b/tests/lint/__snapshots__/no-use-before-declare.test.ts.snap @@ -0,0 +1,5 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-use-before-declare не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-use-before-declare не ошибки индекс теста: 1 1`] = `Array []`; diff --git a/tests/lint/__snapshots__/no-var-keyword.test.ts.snap b/tests/lint/__snapshots__/no-var-keyword.test.ts.snap new file mode 100644 index 0000000..9c76b25 --- /dev/null +++ b/tests/lint/__snapshots__/no-var-keyword.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-var-keyword ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 13, + "endLine": 1, + "line": 1, + "message": "Unexpected var, use let or const instead.", + "messageId": "unexpectedVar", + "nodeType": "VariableDeclaration", + "ruleId": "no-var", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/no-var-requires.test.ts.snap b/tests/lint/__snapshots__/no-var-requires.test.ts.snap new file mode 100644 index 0000000..00869da --- /dev/null +++ b/tests/lint/__snapshots__/no-var-requires.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-var-requires не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-var-requires не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`no-var-requires ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 13, + "endColumn": 27, + "endLine": 1, + "line": 1, + "message": "Require statement not part of import statement.", + "messageId": "noVarReqs", + "nodeType": "CallExpression", + "ruleId": "@typescript-eslint/no-var-requires", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/object-literal-key-quotes.test.ts.snap b/tests/lint/__snapshots__/object-literal-key-quotes.test.ts.snap new file mode 100644 index 0000000..5c88946 --- /dev/null +++ b/tests/lint/__snapshots__/object-literal-key-quotes.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`object-literal-key-quotes не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`object-literal-key-quotes не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`object-literal-key-quotes ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 13, + "endLine": 2, + "line": 2, + "message": "Unnecessarily quoted property 'qwe' found.", + "messageId": "unnecessarilyQuotedProperty", + "nodeType": "Property", + "ruleId": "quote-props", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/object-literal-shorthand.test.ts.snap b/tests/lint/__snapshots__/object-literal-shorthand.test.ts.snap new file mode 100644 index 0000000..b30d301 --- /dev/null +++ b/tests/lint/__snapshots__/object-literal-shorthand.test.ts.snap @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`object-literal-shorthand не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`object-literal-shorthand ошибки const y = 1; +const z = 1; +индекс теста: 0 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 6, + "endLine": 6, + "line": 4, + "message": "Expected method shorthand.", + "messageId": "expectedMethodShorthand", + "nodeType": "Property", + "ruleId": "object-shorthand", + "severity": 2, + }, + Object { + "column": 5, + "endColumn": 6, + "endLine": 9, + "line": 7, + "message": "Expected method shorthand.", + "messageId": "expectedMethodShorthand", + "nodeType": "Property", + "ruleId": "object-shorthand", + "severity": 2, + }, + Object { + "column": 5, + "endColumn": 9, + "endLine": 10, + "line": 10, + "message": "Expected property shorthand.", + "messageId": "expectedPropertyShorthand", + "nodeType": "Property", + "ruleId": "object-shorthand", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/object-literal-sort-keys.test.ts.snap b/tests/lint/__snapshots__/object-literal-sort-keys.test.ts.snap new file mode 100644 index 0000000..dd749ca --- /dev/null +++ b/tests/lint/__snapshots__/object-literal-sort-keys.test.ts.snap @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`object-literal-sort-keys не ошибки индекс теста: 0 1`] = `Array []`; diff --git a/tests/lint/__snapshots__/one-variable-per-declaration.test.ts.snap b/tests/lint/__snapshots__/one-variable-per-declaration.test.ts.snap new file mode 100644 index 0000000..61a234f --- /dev/null +++ b/tests/lint/__snapshots__/one-variable-per-declaration.test.ts.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ban-types не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`ban-types не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`ban-types не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`ban-types ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 18, + "endLine": 1, + "line": 1, + "message": "Split 'let' declarations into multiple statements.", + "messageId": "split", + "nodeType": "VariableDeclaration", + "ruleId": "one-var", + "severity": 2, + }, +] +`; + +exports[`ban-types ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 20, + "endLine": 1, + "line": 1, + "message": "Split 'const' declarations into multiple statements.", + "messageId": "split", + "nodeType": "VariableDeclaration", + "ruleId": "one-var", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/only-arrow-functions.test.ts.snap b/tests/lint/__snapshots__/only-arrow-functions.test.ts.snap new file mode 100644 index 0000000..7c73146 --- /dev/null +++ b/tests/lint/__snapshots__/only-arrow-functions.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`only-arrow-functions не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`only-arrow-functions не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`only-arrow-functions не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`only-arrow-functions не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`only-arrow-functions не ошибки индекс теста: 4 1`] = `Array []`; + +exports[`only-arrow-functions не ошибки индекс теста: 5 1`] = `Array []`; + +exports[`only-arrow-functions не ошибки индекс теста: 6 1`] = `Array []`; + +exports[`only-arrow-functions не ошибки индекс теста: 7 1`] = `Array []`; + +exports[`only-arrow-functions не ошибки индекс теста: 8 1`] = `Array []`; + +exports[`only-arrow-functions не ошибки индекс теста: 9 1`] = `Array []`; diff --git a/tests/lint/__snapshots__/ordered-imports.test.ts.snap b/tests/lint/__snapshots__/ordered-imports.test.ts.snap new file mode 100644 index 0000000..8c032cb --- /dev/null +++ b/tests/lint/__snapshots__/ordered-imports.test.ts.snap @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ordered-imports не ошибки индекс теста: 0 1`] = `Array []`; diff --git a/tests/lint/__snapshots__/prefer-const.test.ts.snap b/tests/lint/__snapshots__/prefer-const.test.ts.snap new file mode 100644 index 0000000..ef450db --- /dev/null +++ b/tests/lint/__snapshots__/prefer-const.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`prefer-const не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`prefer-const ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 6, + "endLine": 1, + "line": 1, + "message": "'a' is never reassigned. Use 'const' instead.", + "messageId": "useConst", + "nodeType": "Identifier", + "ruleId": "prefer-const", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/prefer-for-of.test.ts.snap b/tests/lint/__snapshots__/prefer-for-of.test.ts.snap new file mode 100644 index 0000000..d71b604 --- /dev/null +++ b/tests/lint/__snapshots__/prefer-for-of.test.ts.snap @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`prefer-for-of не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`prefer-for-of не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`prefer-for-of не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`prefer-for-of не ошибки индекс теста: 3 1`] = `Array []`; diff --git a/tests/lint/__snapshots__/prefer-object-spread.test.ts.snap b/tests/lint/__snapshots__/prefer-object-spread.test.ts.snap new file mode 100644 index 0000000..3f388c1 --- /dev/null +++ b/tests/lint/__snapshots__/prefer-object-spread.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`prefer-object-spread не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`prefer-object-spread ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 11, + "endColumn": 33, + "endLine": 5, + "line": 5, + "message": "Use an object spread instead of \`Object.assign\` eg: \`{ ...foo }\`.", + "messageId": "useSpreadMessage", + "nodeType": "CallExpression", + "ruleId": "prefer-object-spread", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/quotemark.test.ts.snap b/tests/lint/__snapshots__/quotemark.test.ts.snap new file mode 100644 index 0000000..da1d6ca --- /dev/null +++ b/tests/lint/__snapshots__/quotemark.test.ts.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`quotemark не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`quotemark не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`quotemark не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`quotemark ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 11, + "endColumn": 16, + "endLine": 1, + "line": 1, + "message": "Strings must use singlequote.", + "messageId": "wrongQuotes", + "nodeType": "Literal", + "ruleId": "quotes", + "severity": 2, + }, +] +`; + +exports[`quotemark ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 11, + "endColumn": 34, + "endLine": 1, + "line": 1, + "message": "Strings must use singlequote.", + "messageId": "wrongQuotes", + "nodeType": "TemplateLiteral", + "ruleId": "quotes", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/radix.test.ts.snap b/tests/lint/__snapshots__/radix.test.ts.snap new file mode 100644 index 0000000..8958568 --- /dev/null +++ b/tests/lint/__snapshots__/radix.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`radix не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`radix ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 13, + "endColumn": 28, + "endLine": 1, + "line": 1, + "message": "Missing radix parameter.", + "messageId": "missingRadix", + "nodeType": "CallExpression", + "ruleId": "radix", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/rules-of-hooks.test.tsx.snap b/tests/lint/__snapshots__/rules-of-hooks.test.tsx.snap new file mode 100644 index 0000000..c332432 --- /dev/null +++ b/tests/lint/__snapshots__/rules-of-hooks.test.tsx.snap @@ -0,0 +1,18 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`react-hooks/rules-of-hooks не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`react-hooks/rules-of-hooks ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 23, + "endLine": 3, + "line": 3, + "message": "React Hook \\"useConditionalHook\\" is called conditionally. React Hooks must be called in the exact same order in every component render.", + "nodeType": "Identifier", + "ruleId": "react-hooks/rules-of-hooks", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/semicolon.test.ts.snap b/tests/lint/__snapshots__/semicolon.test.ts.snap new file mode 100644 index 0000000..be567a0 --- /dev/null +++ b/tests/lint/__snapshots__/semicolon.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`semicolon не ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 6, + "endColumn": 1, + "endLine": 5, + "line": 4, + "message": "Missing semicolon.", + "messageId": "missingSemi", + "nodeType": "PropertyDefinition", + "ruleId": "@typescript-eslint/semi", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/trailing-comma.test.ts.snap b/tests/lint/__snapshots__/trailing-comma.test.ts.snap new file mode 100644 index 0000000..54a639c --- /dev/null +++ b/tests/lint/__snapshots__/trailing-comma.test.ts.snap @@ -0,0 +1,11 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`trailing-comma не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`trailing-comma не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`trailing-comma не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`trailing-comma не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`trailing-comma не ошибки индекс теста: 4 1`] = `Array []`; diff --git a/tests/lint/__snapshots__/triple-equals.test.ts.snap b/tests/lint/__snapshots__/triple-equals.test.ts.snap new file mode 100644 index 0000000..e54e2e1 --- /dev/null +++ b/tests/lint/__snapshots__/triple-equals.test.ts.snap @@ -0,0 +1,57 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`triple-equals не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`triple-equals не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`triple-equals не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`triple-equals не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`triple-equals ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 9, + "endLine": 3, + "line": 3, + "message": "Expected '===' and instead saw '=='.", + "messageId": "unexpected", + "nodeType": "BinaryExpression", + "ruleId": "eqeqeq", + "severity": 2, + }, +] +`; + +exports[`triple-equals ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 8, + "endColumn": 10, + "endLine": 3, + "line": 3, + "message": "Expected '===' and instead saw '=='.", + "messageId": "unexpected", + "nodeType": "BinaryExpression", + "ruleId": "eqeqeq", + "severity": 2, + }, +] +`; + +exports[`triple-equals ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 10, + "endColumn": 12, + "endLine": 3, + "line": 3, + "message": "Expected '===' and instead saw '=='.", + "messageId": "unexpected", + "nodeType": "BinaryExpression", + "ruleId": "eqeqeq", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/typedef-whitespace.test.ts.snap b/tests/lint/__snapshots__/typedef-whitespace.test.ts.snap new file mode 100644 index 0000000..afe3cb8 --- /dev/null +++ b/tests/lint/__snapshots__/typedef-whitespace.test.ts.snap @@ -0,0 +1,245 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typedef-whitespace не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`typedef-whitespace не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`typedef-whitespace не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`typedef-whitespace не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`typedef-whitespace ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 10, + "endColumn": 11, + "endLine": 1, + "line": 1, + "message": "Expected a space after the ':'.", + "messageId": "expectedSpaceAfter", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, +] +`; + +exports[`typedef-whitespace ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 11, + "endColumn": 12, + "endLine": 1, + "line": 1, + "message": "Expected a space after the ':'.", + "messageId": "expectedSpaceAfter", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, + Object { + "column": 11, + "endColumn": 12, + "endLine": 1, + "line": 1, + "message": "Unexpected space before the ':'.", + "messageId": "unexpectedSpaceBefore", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, +] +`; + +exports[`typedef-whitespace ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 11, + "endColumn": 12, + "endLine": 1, + "line": 1, + "message": "Unexpected space before the ':'.", + "messageId": "unexpectedSpaceBefore", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, +] +`; + +exports[`typedef-whitespace ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 15, + "endColumn": 16, + "endLine": 1, + "line": 1, + "message": "Expected a space after the ':'.", + "messageId": "expectedSpaceAfter", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, +] +`; + +exports[`typedef-whitespace ошибки индекс теста: 4 1`] = ` +Array [ + Object { + "column": 16, + "endColumn": 17, + "endLine": 1, + "line": 1, + "message": "Expected a space after the ':'.", + "messageId": "expectedSpaceAfter", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, + Object { + "column": 16, + "endColumn": 17, + "endLine": 1, + "line": 1, + "message": "Unexpected space before the ':'.", + "messageId": "unexpectedSpaceBefore", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, +] +`; + +exports[`typedef-whitespace ошибки индекс теста: 5 1`] = ` +Array [ + Object { + "column": 16, + "endColumn": 17, + "endLine": 1, + "line": 1, + "message": "Unexpected space before the ':'.", + "messageId": "unexpectedSpaceBefore", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, +] +`; + +exports[`typedef-whitespace ошибки индекс теста: 6 1`] = ` +Array [ + Object { + "column": 9, + "endColumn": 10, + "endLine": 2, + "line": 2, + "message": "Expected a space after the ':'.", + "messageId": "expectedSpaceAfter", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, +] +`; + +exports[`typedef-whitespace ошибки индекс теста: 7 1`] = ` +Array [ + Object { + "column": 10, + "endColumn": 11, + "endLine": 2, + "line": 2, + "message": "Expected a space after the ':'.", + "messageId": "expectedSpaceAfter", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, + Object { + "column": 10, + "endColumn": 11, + "endLine": 2, + "line": 2, + "message": "Unexpected space before the ':'.", + "messageId": "unexpectedSpaceBefore", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, +] +`; + +exports[`typedef-whitespace ошибки индекс теста: 8 1`] = ` +Array [ + Object { + "column": 10, + "endColumn": 11, + "endLine": 2, + "line": 2, + "message": "Unexpected space before the ':'.", + "messageId": "unexpectedSpaceBefore", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, +] +`; + +exports[`typedef-whitespace ошибки индекс теста: 9 1`] = ` +Array [ + Object { + "column": 14, + "endColumn": 16, + "endLine": 1, + "line": 1, + "message": "Expected a space after the '=>'.", + "messageId": "expectedSpaceAfter", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, + Object { + "column": 14, + "endColumn": 16, + "endLine": 1, + "line": 1, + "message": "Expected a space before the '=>'.", + "messageId": "expectedSpaceBefore", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, +] +`; + +exports[`typedef-whitespace ошибки индекс теста: 10 1`] = ` +Array [ + Object { + "column": 15, + "endColumn": 17, + "endLine": 1, + "line": 1, + "message": "Expected a space after the '=>'.", + "messageId": "expectedSpaceAfter", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, +] +`; + +exports[`typedef-whitespace ошибки индекс теста: 11 1`] = ` +Array [ + Object { + "column": 14, + "endColumn": 16, + "endLine": 1, + "line": 1, + "message": "Expected a space before the '=>'.", + "messageId": "expectedSpaceBefore", + "nodeType": "Punctuator", + "ruleId": "@typescript-eslint/type-annotation-spacing", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/typeof-compare.test.ts.snap b/tests/lint/__snapshots__/typeof-compare.test.ts.snap new file mode 100644 index 0000000..895b3fd --- /dev/null +++ b/tests/lint/__snapshots__/typeof-compare.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typeof-compare не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`typeof-compare не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`typeof-compare не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`typeof-compare не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`typeof-compare не ошибки индекс теста: 4 1`] = `Array []`; + +exports[`typeof-compare не ошибки индекс теста: 5 1`] = `Array []`; + +exports[`typeof-compare не ошибки индекс теста: 6 1`] = `Array []`; + +exports[`typeof-compare не ошибки индекс теста: 7 1`] = `Array []`; diff --git a/tests/lint/__snapshots__/unified-signatures.test.ts.snap b/tests/lint/__snapshots__/unified-signatures.test.ts.snap new file mode 100644 index 0000000..a57f305 --- /dev/null +++ b/tests/lint/__snapshots__/unified-signatures.test.ts.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`unified-signatures не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`unified-signatures ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 12, + "endColumn": 21, + "endLine": 2, + "line": 2, + "message": "These overloads can be combined into one signature taking \`number | string\`.", + "messageId": "singleParameterDifference", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/unified-signatures", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/use-isnan.test.ts.snap b/tests/lint/__snapshots__/use-isnan.test.ts.snap new file mode 100644 index 0000000..0ced438 --- /dev/null +++ b/tests/lint/__snapshots__/use-isnan.test.ts.snap @@ -0,0 +1,69 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`use-isnan не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`use-isnan не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`use-isnan ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 16, + "endLine": 1, + "line": 1, + "message": "Use the isNaN function to compare with NaN.", + "messageId": "comparisonWithNaN", + "nodeType": "BinaryExpression", + "ruleId": "use-isnan", + "severity": 2, + }, +] +`; + +exports[`use-isnan ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 16, + "endLine": 1, + "line": 1, + "message": "Use the isNaN function to compare with NaN.", + "messageId": "comparisonWithNaN", + "nodeType": "BinaryExpression", + "ruleId": "use-isnan", + "severity": 2, + }, +] +`; + +exports[`use-isnan ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 23, + "endLine": 1, + "line": 1, + "message": "Use the isNaN function to compare with NaN.", + "messageId": "comparisonWithNaN", + "nodeType": "BinaryExpression", + "ruleId": "use-isnan", + "severity": 2, + }, +] +`; + +exports[`use-isnan ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 23, + "endLine": 1, + "line": 1, + "message": "Use the isNaN function to compare with NaN.", + "messageId": "comparisonWithNaN", + "nodeType": "BinaryExpression", + "ruleId": "use-isnan", + "severity": 2, + }, +] +`; diff --git a/tests/lint/__snapshots__/variable-name.test.ts.snap b/tests/lint/__snapshots__/variable-name.test.ts.snap new file mode 100644 index 0000000..b9366e3 --- /dev/null +++ b/tests/lint/__snapshots__/variable-name.test.ts.snap @@ -0,0 +1,117 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`variable-name не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`variable-name не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`variable-name не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`variable-name не ошибки индекс теста: 3 1`] = `Array []`; + +exports[`variable-name не ошибки индекс теста: 4 1`] = `Array []`; + +exports[`variable-name не ошибки индекс теста: 5 1`] = `Array []`; + +exports[`variable-name не ошибки индекс теста: 6 1`] = `Array []`; + +exports[`variable-name не ошибки индекс теста: 7 1`] = `Array []`; + +exports[`variable-name не ошибки индекс теста: 8 1`] = `Array []`; + +exports[`variable-name не ошибки индекс теста: 9 1`] = `Array []`; + +exports[`variable-name ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 33, + "endLine": 1, + "line": 1, + "message": "Variable name \`___tripleLeadingUnderscore\` trimmed as \`__tripleLeadingUnderscore\` must match one of the following formats: camelCase, PascalCase, UPPER_CASE", + "messageId": "doesNotMatchFormatTrimmed", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/naming-convention", + "severity": 2, + }, +] +`; + +exports[`variable-name ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 32, + "endLine": 1, + "line": 1, + "message": "Variable name \`__doubleLeadingUnderscore\` trimmed as \`_doubleLeadingUnderscore\` must match one of the following formats: camelCase, PascalCase, UPPER_CASE", + "messageId": "doesNotMatchFormatTrimmed", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/naming-convention", + "severity": 2, + }, +] +`; + +exports[`variable-name ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 33, + "endLine": 1, + "line": 1, + "message": "Variable name \`doubleTrailingUnderscore__\` trimmed as \`doubleTrailingUnderscore_\` must match one of the following formats: camelCase, PascalCase, UPPER_CASE", + "messageId": "doesNotMatchFormatTrimmed", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/naming-convention", + "severity": 2, + }, +] +`; + +exports[`variable-name ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 32, + "endLine": 1, + "line": 1, + "message": "Variable name \`___tripleLeadingUnderscore1\` trimmed as \`__tripleLeadingUnderscore1\` must match one of the following formats: camelCase, PascalCase, UPPER_CASE", + "messageId": "doesNotMatchFormatTrimmed", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/naming-convention", + "severity": 2, + }, +] +`; + +exports[`variable-name ошибки индекс теста: 4 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 31, + "endLine": 1, + "line": 1, + "message": "Variable name \`__doubleLeadingUnderscore1\` trimmed as \`_doubleLeadingUnderscore1\` must match one of the following formats: camelCase, PascalCase, UPPER_CASE", + "messageId": "doesNotMatchFormatTrimmed", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/naming-convention", + "severity": 2, + }, +] +`; + +exports[`variable-name ошибки индекс теста: 5 1`] = ` +Array [ + Object { + "column": 5, + "endColumn": 32, + "endLine": 1, + "line": 1, + "message": "Variable name \`doubleTrailingUnderscore1__\` trimmed as \`doubleTrailingUnderscore1_\` must match one of the following formats: camelCase, PascalCase, UPPER_CASE", + "messageId": "doesNotMatchFormatTrimmed", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/naming-convention", + "severity": 2, + }, +] +`; diff --git a/tests/lint/adjacent-overload-signatures.test.ts b/tests/lint/adjacent-overload-signatures.test.ts new file mode 100644 index 0000000..91da0e2 --- /dev/null +++ b/tests/lint/adjacent-overload-signatures.test.ts @@ -0,0 +1,30 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('adjacent-overload-signatures', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `function test(): string; +const b = 1; // просто разбиваю текст +function test(a: number): number; +function test(...args: unknown[]): string | number { + return '123'; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/array-type.test.ts b/tests/lint/array-type.test.ts new file mode 100644 index 0000000..69376a3 --- /dev/null +++ b/tests/lint/array-type.test.ts @@ -0,0 +1,41 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('array-type', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + 'const arr: Array = [];', + 'const arr1: ReadonlyArray = [];' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + 'const arr2: number[] = [];', + 'const arr3: readonly number[] = [];' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/ban-comma-operator.test.ts b/tests/lint/ban-comma-operator.test.ts new file mode 100644 index 0000000..15e6dda --- /dev/null +++ b/tests/lint/ban-comma-operator.test.ts @@ -0,0 +1,79 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('ban-comma-operator', () => { + let linter: ESLint; + const header = `function doSomething(): number { + return 1; +} + +let val: number; +`; + + + beforeAll(() => { + linter = new ESLint(getConfig({ + // эти правила здесь срабатывают, но не интересуют + '@typescript-eslint/no-unused-expressions': 'off', + 'no-eval': 'off', + 'no-empty': 'off', + 'no-cond-assign': 'off' + })); + }); + + describe('ошибки', () => { + const cases = [ + `${header} +0, eval('doSomething();');`, + `${header}do { + // not empty +} while (doSomething(), !!test);`, + `${header}for (; doSomething(), !!test; ) { + // not empty +}`, + `${header}if (doSomething(), !!test) { + // not empty +}`, + `${header}switch (val = doSomething(), val) { + // not empty +}`, + `${header}while (val = doSomething(), val < 1) { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `${header}const foo = (doSomething(), val);`, + `${header} +(0, eval)('doSomething();');`, + `${header}do { + // not empty +} while ((doSomething(), !!test));`, + `${header}for (let i = 0, j = 10; i < j; i++, j--) { + // not empty +}`, + `${header}if ((doSomething(), !!test)) { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/ban-ts-ignore.test.ts b/tests/lint/ban-ts-ignore.test.ts new file mode 100644 index 0000000..20590d7 --- /dev/null +++ b/tests/lint/ban-ts-ignore.test.ts @@ -0,0 +1,45 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('ban-ts-ignore', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `// @ts-ignore +const a: number = '1';`, + `// @ts-expect-error +const b: number = '1';`, + '// @ts-nocheck' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `// @ts-expect-error: ради теста +const c: number = '1';`, + '// @ts-check' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/ban-tslint-comment.test.ts b/tests/lint/ban-tslint-comment.test.ts new file mode 100644 index 0000000..7345e2e --- /dev/null +++ b/tests/lint/ban-tslint-comment.test.ts @@ -0,0 +1,31 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('ban-tslint-comment', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + '/* tslint:disable */', + '/* tslint:enable */', + '/* tslint:disable:rule1 rule2 rule3... */', + '/* tslint:enable:rule1 rule2 rule3... */', + '// tslint:disable-next-line', + 'someCode(); // tslint:disable-line', + '// tslint:disable-next-line:rule1 rule2 rule3...' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/ban-types.test.ts b/tests/lint/ban-types.test.ts new file mode 100644 index 0000000..0799228 --- /dev/null +++ b/tests/lint/ban-types.test.ts @@ -0,0 +1,23 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('ban-types', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = ['let a: Deferred;']; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/callable-types.test.ts b/tests/lint/callable-types.test.ts new file mode 100644 index 0000000..661106b --- /dev/null +++ b/tests/lint/callable-types.test.ts @@ -0,0 +1,44 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('callable-types', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `interface I0 { + (): void; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `interface Foo { + (): void; + bar: number; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/class-name.test.ts b/tests/lint/class-name.test.ts new file mode 100644 index 0000000..52b4649 --- /dev/null +++ b/tests/lint/class-name.test.ts @@ -0,0 +1,45 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('class-name', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + 'class myClass { }', + `interface myInterface { + noop(): number; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + 'class MyClass { }', + `interface MyInterface { + noop(): number; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/comment-format.test.ts b/tests/lint/comment-format.test.ts new file mode 100644 index 0000000..6d4244b --- /dev/null +++ b/tests/lint/comment-format.test.ts @@ -0,0 +1,52 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('comment-format', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + '//невалидно', + `/*невалидно +текст + */`, + `/**невалидно + * текст + */` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + '// валидно', + `/* валидно +текст + */`, + `/** валидно + * текст + */`, + '/// ' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/exhaustive-deps.test.tsx b/tests/lint/exhaustive-deps.test.tsx new file mode 100644 index 0000000..c50de82 --- /dev/null +++ b/tests/lint/exhaustive-deps.test.tsx @@ -0,0 +1,62 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('react-hooks/exhaustive-deps', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig({ + 'no-console': 'off', + '@typescript-eslint/typedef': 'off' + })); + }); + + describe('ошибки', () => { + const cases = [`function MyComponent(props) { + useCallback(() => { + console.log(props.foo); + }, []); +}`, `function MyComponent() { + const local = someFunc(); + useEffect(() => { + console.log(local); + }, []); +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`function MyComponent() { + const local = {}; + useEffect(() => { + console.log(local); + }); +}`, `function MyComponent() { + useEffect(() => { + const local = {}; + console.log(local); + }, []); +}`, `function MyComponent() { + const local = someFunc(); + useEffect(() => { + console.log(local); + }, [local]); +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/forin.test.ts b/tests/lint/forin.test.ts new file mode 100644 index 0000000..9a879bd --- /dev/null +++ b/tests/lint/forin.test.ts @@ -0,0 +1,50 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('forin', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `const foo = {}; + +for (const key in foo) { + foo[key] = key + 1; +} +` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `const bar = {}; + +for (const key in bar) { + if (bar.hasOwnProperty(key)) { + bar[key] = key + 1; + } +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/function-component-definition.test.tsx b/tests/lint/function-component-definition.test.tsx new file mode 100644 index 0000000..69b7af3 --- /dev/null +++ b/tests/lint/function-component-definition.test.tsx @@ -0,0 +1,51 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('react/function-component-definition', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig({ + '@typescript-eslint/typedef': 'off' + })); + }); + + describe('ошибки', () => { + const cases = [`const Component = (props) => { + return
{props.content}
; +};`, `function getComponent() { + return (props) => { + return
{props.content}
; + }; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`function Component(props) { + return
; +}`, `const Component = function (props) { + return
; +};`, `function getComponent() { + return function (props) { + return
; + }; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/hook-use-state.test.tsx b/tests/lint/hook-use-state.test.tsx new file mode 100644 index 0000000..dc35549 --- /dev/null +++ b/tests/lint/hook-use-state.test.tsx @@ -0,0 +1,65 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('react/hook-use-state', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [`import React from 'react'; +function useColor() { + const useStateResult = React.useState(); + return useStateResult; +}`, `import React from 'react'; +function useColor() { + const [color, updateColor] = React.useState(); + return useStateResult; +}`, `import { useState } from 'react'; +function useColor() { + const useStateResult = useState(); + return useStateResult; +}`, `import { useState } from 'react'; +function useColor() { + const [color, updateColor] = useState(); + return useStateResult; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`import React from 'react'; +function useColor() { + const [color, setColor] = React.useState(); + return useStateResult; +}`, `import React from 'react'; +function useColor() { + return React.useState(); +}`, `import { useState } from 'react'; +function useColor() { + const [color, setColor] = useState(); + return useStateResult; +}`, `import { useState } from 'react'; +function useColor() { + return useState(); +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/jsx-fragments.test.tsx b/tests/lint/jsx-fragments.test.tsx new file mode 100644 index 0000000..ea20461 --- /dev/null +++ b/tests/lint/jsx-fragments.test.tsx @@ -0,0 +1,50 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('react/jsx-fragments', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [`function Component() { + return + + +; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`function Component() { + return <> + + +; +}`, `function Component() { + return + + +; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/jsx-max-props-per-line.test.tsx b/tests/lint/jsx-max-props-per-line.test.tsx new file mode 100644 index 0000000..c4248f0 --- /dev/null +++ b/tests/lint/jsx-max-props-per-line.test.tsx @@ -0,0 +1,46 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('react/jsx-max-props-per-line', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [`function Component() { + return ; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`function Component() { + return ; +}`, `function Component() { + return ; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/jsx-no-constructed-context-values.test.tsx b/tests/lint/jsx-no-constructed-context-values.test.tsx new file mode 100644 index 0000000..6b99418 --- /dev/null +++ b/tests/lint/jsx-no-constructed-context-values.test.tsx @@ -0,0 +1,48 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('react/jsx-no-constructed-context-values', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [`function Component() { + return + +; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`function Component() { + const foo = useMemo(() => { + return { + foo: 'bar' + }; + }, []); + return + +; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/jsx-no-duplicate-props.test.tsx b/tests/lint/jsx-no-duplicate-props.test.tsx new file mode 100644 index 0000000..19c0f9e --- /dev/null +++ b/tests/lint/jsx-no-duplicate-props.test.tsx @@ -0,0 +1,27 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('react/jsx-no-duplicate-props', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [`function Component() { + return ;; +}`, `function Component() { + return ;; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/jsx-no-useless-fragment.test.tsx b/tests/lint/jsx-no-useless-fragment.test.tsx new file mode 100644 index 0000000..bd4902c --- /dev/null +++ b/tests/lint/jsx-no-useless-fragment.test.tsx @@ -0,0 +1,44 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('react/jsx-no-useless-fragment', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [`function Component() { + return <> + +; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`function Component() { + return <> + + +; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/label-position.test.ts b/tests/lint/label-position.test.ts new file mode 100644 index 0000000..f0a52bb --- /dev/null +++ b/tests/lint/label-position.test.ts @@ -0,0 +1,65 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('label-position', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `label: { + break label; +}`, + `label: + if (a) { + break label; + }` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `label: + while(true) { + // ... + }`, + `label: + while(true) { + break label; + }`, + `label: + while(true) { + break label; + }`, + `label: + while(true) { + continue label; + }`, + `label: + switch (a) { + case 0: + break label; + }` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/max-classes-per-file.test.ts b/tests/lint/max-classes-per-file.test.ts new file mode 100644 index 0000000..20433e7 --- /dev/null +++ b/tests/lint/max-classes-per-file.test.ts @@ -0,0 +1,63 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('max-classes-per-file', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [`class A {} + +class B {} + +class C {} + +class D {} + +class E {} + +class F {} + +class G {} + +class H {} +`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`class A {} + +class B {} + +class C {} + +class D {} + +class E {} + +class F {} + +class G {} +`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/max-line-length.test.ts b/tests/lint/max-line-length.test.ts new file mode 100644 index 0000000..9095677 --- /dev/null +++ b/tests/lint/max-line-length.test.ts @@ -0,0 +1,44 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +/** + * Тут нереальное количество кейсов, покрывать тяжело и относительно бесполезно. + * Так что ограничимся "приёмочными" тестами. + */ +describe('max-line-length', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [`const a = window.aVeryLongPropertyWhichIsForSureLongerMaxThanValueAllowedByESLintAndItTriggersTheErrorBecauseThisIsCode1;`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `const a = window.aVeryLongPropertyWhichGivesUsAStrirngOfExactly120CharactersThereforeMakingItValidCodeForTheESLintRule1;`, + `/** + * A very long comment which is for sure longer than value allowed by ESLint. But it doesn't trigger an error because it ignores comments. + */` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/member-access.test.ts b/tests/lint/member-access.test.ts new file mode 100644 index 0000000..5dbf4d0 --- /dev/null +++ b/tests/lint/member-access.test.ts @@ -0,0 +1,75 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('member-access', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `class Test { + public animalName: string; + public constructor(name: string) { + this.animalName = name; + } + public get name(): string { + return this.animalName; + } + public set name(value: string) { + this.animalName = value; + } + public walk(): void { + // not empty + } +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `class Animal { + animalName: string; + protected weight: string; + protected height: string; + constructor(name: string) { + this.animalName = name; + } + get name(): string { + return this.animalName; + } + set name(value: string) { + this.animalName = value; + } + walk(): void { + this._walk(); + } + protected _walk(): void { + // not empty + } + private __walk(): void { + // not empty + } +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/member-ordering.test.ts b/tests/lint/member-ordering.test.ts new file mode 100644 index 0000000..7ca268d --- /dev/null +++ b/tests/lint/member-ordering.test.ts @@ -0,0 +1,61 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('member-ordering', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + // просто "приёмочный" тест, который проверяет что правило включено + const cases = [`class Test { + field: string = ''; + constructor() { + // not empty + } + static staticField: number = 1; + method(): void { + // not empty + } + static staticMethod(): void { + // not empty + } +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + // Если тест упадёт, значит поменяли порядок + const cases = [`class Test { + field: string = ''; + constructor() { + // not empty + } + method(): void { + // not empty + } + static staticField: number = 1; + static staticMethod(): void { + // not empty + } +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/new-parens.test.ts b/tests/lint/new-parens.test.ts new file mode 100644 index 0000000..6d58032 --- /dev/null +++ b/tests/lint/new-parens.test.ts @@ -0,0 +1,43 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('new-parens', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + const header = 'class Person {}\n'; + + describe('ошибки', () => { + const cases = [ + `${header}const person = new Person;`, + `${header}const person1 = new (Person);` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `${header}const person2 = new Person();`, + `${header}const person3 = new (Person)();` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-angle-bracket-type-assertion.test.ts b/tests/lint/no-angle-bracket-type-assertion.test.ts new file mode 100644 index 0000000..b297929 --- /dev/null +++ b/tests/lint/no-angle-bracket-type-assertion.test.ts @@ -0,0 +1,68 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-angle-bracket-type-assertion', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig({ + '@typescript-eslint/no-explicit-any': 'off' + })); + }); + + const header = `interface ITest { + value: number; + anotherValue: string; +} + +const a = { + value: 1, + anotherValue: '2' +}; +`; + + describe('ошибки', () => { + const cases = [ + `${header}const test2 = {...a};`, + `${header}function bar(): ITest { + return { + value: 1, + anotherValue: '2' + }; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `${header}const test1: ITest = {...a};`, + `${header}const test1 = {...a} as ITest;`, + `${header}function foo(): ITest { + return { + value: 1, + anotherValue: '2' + } as ITest; +}`, + 'const y = { a: 1 } as any;', + 'const z = { a: 1 } as unknown;', + `${header}window.foo({ a: 1 } as ITest);` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-any.test.ts b/tests/lint/no-any.test.ts new file mode 100644 index 0000000..4ffed6e --- /dev/null +++ b/tests/lint/no-any.test.ts @@ -0,0 +1,32 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-any', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + "const age: any = 'seventeen';", + "const ages: any[] = ['seventeen'];", + `function greet(): any { + // not empty +}`, + `function greet1(param: any[]): void { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-arg.test.ts b/tests/lint/no-arg.test.ts new file mode 100644 index 0000000..ca168be --- /dev/null +++ b/tests/lint/no-arg.test.ts @@ -0,0 +1,27 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-arg', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `function foo(): void { + const callee = arguments.callee; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-array-index-key.test.tsx b/tests/lint/no-array-index-key.test.tsx new file mode 100644 index 0000000..b888a05 --- /dev/null +++ b/tests/lint/no-array-index-key.test.tsx @@ -0,0 +1,57 @@ +import {ESLint} from 'eslint'; +import {lint} from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('react/no-array-index-key', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [`function Component() { + const things = [{ + id: 1 + }, { + id: 2 + }, { + id: 3 + }]; + return things.map((thing, index) => { + return ; + }); +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`function Component() { + const things = [{ + id: 1 + }, { + id: 2 + }, { + id: 3 + }]; + return things.map((thing, index) => { + return ; + }); +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-bitwise.test.ts b/tests/lint/no-bitwise.test.ts new file mode 100644 index 0000000..0f68ade --- /dev/null +++ b/tests/lint/no-bitwise.test.ts @@ -0,0 +1,45 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-bitwise', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + 'const test = 1 | 0;', + 'const test = 1 & 0;', + 'const test = 1 ^ 0;', + 'const test = ~ 0;', + 'const test = 1 << 0;', + 'const test = 1 >> 0;', + 'const test = 1 >>> 0;', + `let test = 0; + +test |= 1; + +test &= 1; + +test ^= 1; + +test <<= 1; + +test >>= 1; + +test >>>= 1; +` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-conditional-assignment.test.ts b/tests/lint/no-conditional-assignment.test.ts new file mode 100644 index 0000000..c417e1f --- /dev/null +++ b/tests/lint/no-conditional-assignment.test.ts @@ -0,0 +1,48 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-conditional-assignment', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig({ + 'prefer-const': 'off' + })); + }); + + describe('ошибки', () => { + const cases = [ + `let x2: number; +if (x2 = 0) { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `let x1: number; +x1 = 2; +if (x1 === 0) { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-console.test.ts b/tests/lint/no-console.test.ts new file mode 100644 index 0000000..036e982 --- /dev/null +++ b/tests/lint/no-console.test.ts @@ -0,0 +1,42 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-console', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + 'console.log(1);', + 'console.error(1);', + 'console.warn(1);', + 'console.dir({});', + 'console.dirxml({});', + 'console.table(1);', + 'console.assert(1);', + "console.count('1');", + "console.countReset('1');", + 'console.debug(1);', + 'console.group(1);', + 'console.groupCollapsed(1);', + 'console.groupEnd(1);', + 'console.info(1);', + "console.time('1');", + "console.timeEnd('1');", + "console.timeLog('1', 1);", + 'console.trace(1);' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-construct.test.ts b/tests/lint/no-construct.test.ts new file mode 100644 index 0000000..248f088 --- /dev/null +++ b/tests/lint/no-construct.test.ts @@ -0,0 +1,27 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-construct', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + "const stringObject = new String('Hello world');", + 'const numberObject = new Number(1);', + 'const booleanObject = new Boolean(false);' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-danger-with-children.test.tsx b/tests/lint/no-danger-with-children.test.tsx new file mode 100644 index 0000000..908b2c3 --- /dev/null +++ b/tests/lint/no-danger-with-children.test.tsx @@ -0,0 +1,43 @@ +import {ESLint} from 'eslint'; +import {lint} from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('react/no-danger-with-children', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [`function Component() { + return
+ Children +
; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`function Component() { + return
; +}`, `function Component() { + return ; +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-debugger.test.ts b/tests/lint/no-debugger.test.ts new file mode 100644 index 0000000..03b51fc --- /dev/null +++ b/tests/lint/no-debugger.test.ts @@ -0,0 +1,23 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-debugger', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = ['debugger;']; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-duplicate-super.test.ts b/tests/lint/no-duplicate-super.test.ts new file mode 100644 index 0000000..f550d86 --- /dev/null +++ b/tests/lint/no-duplicate-super.test.ts @@ -0,0 +1,53 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-duplicate-super', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `class A { + constructor() { + super(); // This is a SyntaxError. + } +}`, + `class B {} + +class C extends B { + constructor() { + // not empty + } // Would throw a ReferenceError. +}`, + `// Classes which inherits from a non constructor are always problems. +class D extends null { + constructor() { + super(); // Would throw a TypeError. + } +}`, + `class F extends null { + constructor() { + // not empty + } // Would throw a ReferenceError. +}`, + `class G extends B { + constructor() { + super(); + super(); + } // Would throw a ReferenceError. +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-empty-interface.test.ts b/tests/lint/no-empty-interface.test.ts new file mode 100644 index 0000000..3470a21 --- /dev/null +++ b/tests/lint/no-empty-interface.test.ts @@ -0,0 +1,51 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-empty-interface', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + 'interface Foo {}' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `interface Foo1 { + name: string; +} + +interface Bar1 { + age: number; +} + +interface Baz1 extends Foo1, Bar1 {} + +interface Baz2 extends Omit {} + +interface Baz3 extends Foo1 {}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-empty.test.ts b/tests/lint/no-empty.test.ts new file mode 100644 index 0000000..d48dbcd --- /dev/null +++ b/tests/lint/no-empty.test.ts @@ -0,0 +1,72 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-empty', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + const header = `const foo = 1; +function doSomething(): void { + // not empty +} +`; + + describe('ошибки', () => { + const cases = [ + `${header}if (foo) { +}`, + `${header}while (foo) { +}`, + `${header}switch(foo) { +}`, + `${header}try { + doSomething(); +} catch(ex) { + +} finally { + +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `${header}if (foo) { + // empty +}`, + `${header}while (foo) { + /* empty */ +}`, + `${header}try { + doSomething(); +} catch (ex) { + // continue regardless of error +}`, + `${header}try { + doSomething(); +} finally { + /* continue regardless of error */ +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-eval.test.ts b/tests/lint/no-eval.test.ts new file mode 100644 index 0000000..6f80321 --- /dev/null +++ b/tests/lint/no-eval.test.ts @@ -0,0 +1,23 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-eval', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = ["eval('1');"]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-invalid-this.test.ts b/tests/lint/no-invalid-this.test.ts new file mode 100644 index 0000000..fa1c06b --- /dev/null +++ b/tests/lint/no-invalid-this.test.ts @@ -0,0 +1,80 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-invalid-this', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + const header = `function baz(callback: Function): void { + // not empty +} +`; + + // правило отключено, тут только проверяем, что оно из конфига js не затянулось + describe('не ошибки', () => { + const cases = [ + `${header}this.a = 0; +baz(() => { + return this; +});`, + `${header}(function(): void { + this.a = 0; + baz(() => { + return this; +}); +})();`, + `${header}function foo(param: Function): void { + this.a = 0; + baz(() => { + return this; +}); +}`, + `${header}const foo1 = function(): void { + this.a = 0; + baz(() => { + return this; +}); +}; +`, + `${header}foo(function(): void { + this.a = 0; + baz(() => { + return this; +}); +});`, + `${header}obj.foo = () => { + // \`this\` of arrow functions is the outer scope's. + this.a = 0; +};`, + `${header}const obj = { + aaa(): Function { + return function foo2(): void { + // There is in a method \`aaa\`, but \`foo\` is not a method. + this.a = 0; + baz(() => { + return this; + }); + }; + } +};`, + `${header}[1, 2].forEach(function(): void { + this.a = 0; + baz(() => { + return this; + }); +});` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-magic-numbers.test.ts b/tests/lint/no-magic-numbers.test.ts new file mode 100644 index 0000000..af9d895 --- /dev/null +++ b/tests/lint/no-magic-numbers.test.ts @@ -0,0 +1,55 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-magic-numbers', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `function a(): number { + return 1000; +}`, + `class InvalidClass { + field: number = 100; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + 'const a = -1;', + 'const a = 0;', + 'const a = 1;', + 'const a = -1;', + `enum ValidEnum { + FIRST = 10000 +} +`, + 'type ValidType = 42 | 5 | 10;', + `class ValidClass { + readonly field: number = 100; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-misused-new.test.ts b/tests/lint/no-misused-new.test.ts new file mode 100644 index 0000000..535981f --- /dev/null +++ b/tests/lint/no-misused-new.test.ts @@ -0,0 +1,55 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-misused-new', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `class C { + new(): C; +}`, + `interface I { + new (): I; + constructor(): void; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `class C1 { + constructor() { + // not empty + } +}`, + ` +class C {} +interface I1 { + extraField: number; + new (): C; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-namespace.test.ts b/tests/lint/no-namespace.test.ts new file mode 100644 index 0000000..8dd265a --- /dev/null +++ b/tests/lint/no-namespace.test.ts @@ -0,0 +1,28 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-namespace', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + 'module foo {}', + 'namespace foo {}', + 'declare module foo {}', + 'declare namespace foo {}' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-non-null-assertion.test.ts b/tests/lint/no-non-null-assertion.test.ts new file mode 100644 index 0000000..b95d5ea --- /dev/null +++ b/tests/lint/no-non-null-assertion.test.ts @@ -0,0 +1,29 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-non-null-assertion', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = ['const includesBaz: boolean = foo.bar!.includes(\'baz\');']; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); + + + + + + diff --git a/tests/lint/no-parameter-reassignment.test.ts b/tests/lint/no-parameter-reassignment.test.ts new file mode 100644 index 0000000..e1da0e8 --- /dev/null +++ b/tests/lint/no-parameter-reassignment.test.ts @@ -0,0 +1,46 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-parameter-reassignment', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `function foo(bar: number): void { + bar = 1; +}`, + `function foo1(bar: number): void { + bar++; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `function foo2(bar: number): void { + const baz = bar; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-parameters-properties.test.ts b/tests/lint/no-parameters-properties.test.ts new file mode 100644 index 0000000..cdc6369 --- /dev/null +++ b/tests/lint/no-parameters-properties.test.ts @@ -0,0 +1,49 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-parameter-properties', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + // правило отключено + describe('не ошибки', () => { + const cases = [ + `class Foo { + constructor(readonly name: string) {} +} +`, + `class Foo { + constructor(private name: string) {} +}`, + `class Foo { + constructor(protected name: string) {} +}`, + `class Foo { + constructor(public name: string) {} +}`, + `class Foo { + constructor(private readonly name: string) {} +}`, + `class Foo { + constructor(protected readonly name: string) {} +}`, + `class Foo { + constructor(name: string) { + // not empty + } +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-reference.test.ts b/tests/lint/no-reference.test.ts new file mode 100644 index 0000000..c4ac0ec --- /dev/null +++ b/tests/lint/no-reference.test.ts @@ -0,0 +1,29 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-reference', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig({ + 'spaced-comment': 'off' + })); + }); + + describe('ошибки', () => { + const cases = [ + '/// ', + '/// ', + '/// ' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-return-await.test.ts b/tests/lint/no-return-await.test.ts new file mode 100644 index 0000000..1451c55 --- /dev/null +++ b/tests/lint/no-return-await.test.ts @@ -0,0 +1,48 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-return-await', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + const header = `function bar(): Promise { + return Promise.resolve(1); +} +`; + + describe('ошибки', () => { + const cases = [ + `${header}async function foo(): Promise { + return await bar(); +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `${header}async function foo1(): Promise { + return bar(); +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-shadow.test.ts b/tests/lint/no-shadow.test.ts new file mode 100644 index 0000000..faf716b --- /dev/null +++ b/tests/lint/no-shadow.test.ts @@ -0,0 +1,33 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-shadow', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `if (1) { + const a = 3; + const b = 6; +} + +const a = 5; +function b(): void { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-string-literal.test.ts b/tests/lint/no-string-literal.test.ts new file mode 100644 index 0000000..8b9d456 --- /dev/null +++ b/tests/lint/no-string-literal.test.ts @@ -0,0 +1,41 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-string-literal', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + const header = `const foo = { class: 'CS 101', 'prop-with-dash': 1 }; +`; + + describe('ошибки', () => { + const cases = [`${header}const x = foo[\'class\'];`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `${header}const x = foo.class;`, + `${header}const x = foo['prop-with-dash'];` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-string-throw.test.ts b/tests/lint/no-string-throw.test.ts new file mode 100644 index 0000000..90731bd --- /dev/null +++ b/tests/lint/no-string-throw.test.ts @@ -0,0 +1,73 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-string-throw', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + "throw 'error';", + 'throw 0;', + 'throw undefined;', + 'throw null;', + `const err = new Error(); +throw 'an ' + err;`, + `const err = new Error(); +throw \`\${err}\`;`, + `const foo = { + bar: '' +}; +throw foo.bar;` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + 'throw new Error();', + "throw new Error('error');", + `const err = new Error('error'); +throw err;`, + `try { + throw new Error('error'); +} catch (e) { + throw e; +}`, + `const err = new Error(); +throw err;`, + `function err(): Error { + return new Error(); +} +throw err();`, + `const foo = { + bar: new Error() +}; +throw foo.bar;`, + ` +class CustomError extends Error { + // ... +} +throw new CustomError();` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-switch-case-fall-through.test.ts b/tests/lint/no-switch-case-fall-through.test.ts new file mode 100644 index 0000000..375555f --- /dev/null +++ b/tests/lint/no-switch-case-fall-through.test.ts @@ -0,0 +1,38 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-switch-case-fall-through', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + const header = `const foo: number = 1; +function doSomething(): void { + // not empty +} +`; + + // правило отключено, просто проверяем, что не втянулось из js + describe('не ошибки', () => { + const cases = [ + `${header}switch(foo) { + case 0: + doSomething(); + + case 1: + doSomething(); +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-this-assignment.test.ts b/tests/lint/no-this-assignment.test.ts new file mode 100644 index 0000000..4d0557b --- /dev/null +++ b/tests/lint/no-this-assignment.test.ts @@ -0,0 +1,35 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-this-assignment', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = ['const scope = this;']; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = ['const { baz } = this;']; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-trailing-whitespace.test.ts b/tests/lint/no-trailing-whitespace.test.ts new file mode 100644 index 0000000..7a153bc --- /dev/null +++ b/tests/lint/no-trailing-whitespace.test.ts @@ -0,0 +1,25 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-trailing-whitespace', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [`const foo = 0; // +// +`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-unnecessary-initializer.test.ts b/tests/lint/no-unnecessary-initializer.test.ts new file mode 100644 index 0000000..f94a77f --- /dev/null +++ b/tests/lint/no-unnecessary-initializer.test.ts @@ -0,0 +1,37 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-unnecessary-initializer', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig({ + 'prefer-const': 'off' + })); + }); + + describe('ошибки', () => { + const cases = ['let bar = undefined;']; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = ['let foo;', 'const bar = undefined;']; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-unsafe-finally.test.ts b/tests/lint/no-unsafe-finally.test.ts new file mode 100644 index 0000000..d9bee82 --- /dev/null +++ b/tests/lint/no-unsafe-finally.test.ts @@ -0,0 +1,57 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-unsafe-finally', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `(() => { + try { + return 1; // 1 is returned but suspended until finally block ends + } catch(err) { + return 2; + } finally { + return -1; // -1 is returned before 1, which we did not expect + } +})();` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `const foo = (): number => { + try { + return 1; + } catch(err) { + return 2; + } finally { + const a = (): string => { + return 'hola!'; + }; + } +};` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-unstable-nested-components.test.tsx b/tests/lint/no-unstable-nested-components.test.tsx new file mode 100644 index 0000000..0b5c94c --- /dev/null +++ b/tests/lint/no-unstable-nested-components.test.tsx @@ -0,0 +1,68 @@ +import {ESLint} from 'eslint'; +import {lint} from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('react/no-unstable-nested-components', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [`function Component() { + function UnstableNestedComponent() { + return
; + } + + return ( +
+ +
+ ); +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`function OutsideDefinedComponent() { + return
; +} + +function Component() { + return ( +
+ +
+ ); +}`, + `function SomeComponent(props) { + return
{props.footer()}
; +} + +function Component() { + return ( +
+ { + return
; + }} /> +
+ ); +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-unused-expression.test.ts b/tests/lint/no-unused-expression.test.ts new file mode 100644 index 0000000..52d0edc --- /dev/null +++ b/tests/lint/no-unused-expression.test.ts @@ -0,0 +1,74 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-unused-expression', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + const header = `function a(): boolean { + return true; +} +function b(): void { + // not empty +} +function f(): void { + // not empty +} +function injectGlobal(templateString: string): void { + // not empty +} +`; + + describe('ошибки', () => { + const cases = [ + '0;', + 'if(0) 0;', + `${header}a && b();`, + `${header}a() && function namedFunctionInExpressionContext(): void { + f(); +};`, + '(function anIncompleteIIFE(): void {});', + `${header}injectGlobal\`body{ color: red; }\`;` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `function namedFunctionDeclaration(): void { + // not empty +}`, + `(function aGenuineIIFE(): void { + // not empty +}());`, + 'f();', + 'const c = 0;', + `const obj: { + b?: number +} = { + b: 1 +}; +delete obj.b;`, + `${header}void a();` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-use-before-declare.test.ts b/tests/lint/no-use-before-declare.test.ts new file mode 100644 index 0000000..07252b1 --- /dev/null +++ b/tests/lint/no-use-before-declare.test.ts @@ -0,0 +1,38 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-use-before-declare', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + // правило отключено, тесты нужны, чтобы его никто и никогда не включил. + // Оно медленное и бесполезное, т.к. var у нас запрещён в тс, а с let и const оно не нужно + describe('не ошибки', () => { + const cases = [ + `const x = Foo.FOO; + +enum Foo { + FOO +}`, + `function bar(): number { + return Bar.FOO; +} + +enum Bar { + FOO +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-var-keyword.test.ts b/tests/lint/no-var-keyword.test.ts new file mode 100644 index 0000000..2419228 --- /dev/null +++ b/tests/lint/no-var-keyword.test.ts @@ -0,0 +1,23 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-var-keyword', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = ["var x = 'y';"]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/no-var-requires.test.ts b/tests/lint/no-var-requires.test.ts new file mode 100644 index 0000000..0cfd2de --- /dev/null +++ b/tests/lint/no-var-requires.test.ts @@ -0,0 +1,38 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('no-var-requires', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = ["const foo = require('foo');"]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + "import foo1 = require('foo');", + "import foo2 from 'foo';" + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/object-literal-key-quotes.test.ts b/tests/lint/object-literal-key-quotes.test.ts new file mode 100644 index 0000000..3b3f845 --- /dev/null +++ b/tests/lint/object-literal-key-quotes.test.ts @@ -0,0 +1,47 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('object-literal-key-quotes', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `const obj = { + 'qwe': 1 +}; +` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `const obj1 = { + 'Field.With.Dots': 1 +};`, + `const obj2 = { + 'field-with-dashes': 1 +};` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/object-literal-shorthand.test.ts b/tests/lint/object-literal-shorthand.test.ts new file mode 100644 index 0000000..a8f3db2 --- /dev/null +++ b/tests/lint/object-literal-shorthand.test.ts @@ -0,0 +1,62 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('object-literal-shorthand', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + const header = `const y = 1; +const z = 1; +`; + + describe('ошибки', () => { + const cases = [ + `${header}const foo = { + a: function(): void { + // not empty + }, + [y]: function(): void { + // not empty + }, + z: z +};` + ]; + + cases.forEach((text, index) => { + it(`${header}индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `${header}const foo1 = { + a(): void { + // not empty + }, + b: () => { + // not empty + }, + [y](): void { + // not empty + }, + z +};` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/object-literal-sort-keys.test.ts b/tests/lint/object-literal-sort-keys.test.ts new file mode 100644 index 0000000..d636261 --- /dev/null +++ b/tests/lint/object-literal-sort-keys.test.ts @@ -0,0 +1,30 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('object-literal-sort-keys', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + // правило выключено + describe('не ошибки', () => { + const cases = [ + `const obj = { + a: 1, + c: 3, + b: 2 +};` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/one-variable-per-declaration.test.ts b/tests/lint/one-variable-per-declaration.test.ts new file mode 100644 index 0000000..176dd80 --- /dev/null +++ b/tests/lint/one-variable-per-declaration.test.ts @@ -0,0 +1,45 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('ban-types', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig({ + 'prefer-const': 'off', + '@typescript-eslint/no-magic-numbers': 'off', + 'no-empty': 'off' + })); + }); + + describe('ошибки', () => { + const cases = ['let a = 1, b = 2;', 'const a = 1, b = 2;']; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `let a = 1; +let b = 2;`, + `const a = 1; +const b = 2;`, + 'for (let i = 0, j = 0; i < 10; i++, j++) {}' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/only-arrow-functions.test.ts b/tests/lint/only-arrow-functions.test.ts new file mode 100644 index 0000000..c32e879 --- /dev/null +++ b/tests/lint/only-arrow-functions.test.ts @@ -0,0 +1,69 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('only-arrow-functions', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig({ + 'object-shorthand': 'off' + })); + }); + + // правило выключено, потому что слишком сильно отличается от тслинта. + // тслинт игнорировал все методы объектов (в сокращённом формате) + // prefer-arrow/prefer-arrow-functions игнорирует только если метод использует this. + describe('не ошибки', () => { + const cases = [ + `const myFunc1 = function(): void { + // do something ... +};`, + `const myFunc4 = function(): string { + return 'bar'; +};`, + `const obj = { + method: function(): void { + // not empty + } +};`, + `function foo(): Function { + return function(): void { + // not empty + }; +}`, + `function myFunc(): void { + // not empty +}`, + `const obj1 = { + method: function test(): void { + // not empty + } +};`, + `const myFunc2 = (): void => { + // do something ... +};`, + `const myFunc3 = function(): void { + this.doSomething(); +};`, + `function foo1(): Function { + return function(): object { + return this; + }; +}`, + `class A { + method: () => { + // not empty + }; +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/ordered-imports.test.ts b/tests/lint/ordered-imports.test.ts new file mode 100644 index 0000000..d0deecf --- /dev/null +++ b/tests/lint/ordered-imports.test.ts @@ -0,0 +1,27 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('ordered-imports', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + // правило выключено + describe('не ошибки', () => { + const cases = [ + `import _ from 'lodash'; +import path from 'path'; // 'path' import should occur before import of 'lodash'` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/prefer-const.test.ts b/tests/lint/prefer-const.test.ts new file mode 100644 index 0000000..075d5db --- /dev/null +++ b/tests/lint/prefer-const.test.ts @@ -0,0 +1,38 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('prefer-const', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = ['let a = 1;']; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `let b = 1; +b = 2;` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/prefer-for-of.test.ts b/tests/lint/prefer-for-of.test.ts new file mode 100644 index 0000000..6be38e8 --- /dev/null +++ b/tests/lint/prefer-for-of.test.ts @@ -0,0 +1,44 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('prefer-for-of', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig({ + 'no-console': 'off' + })); + }); + + const header = `const arr = [1, 2]; +`; + + // правило выключено + describe('не ошибки', () => { + const cases = [ + `${header}for (let i = 0; i < arr.length; i++) { + arr[i] += 1; +}`, + `${header}for (let x of arr) { + x += 1; +}`, + `${header}for (let i = 0; i < arr.length; i++) { + // i is used to write to arr, so for-of could not be used. + arr[i] = 0; +}`, + `${header}for (let i = 0; i < arr.length; i++) { + // i is used independent of arr, so for-of could not be used. + console.log(i, arr[i]); +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/prefer-object-spread.test.ts b/tests/lint/prefer-object-spread.test.ts new file mode 100644 index 0000000..fec13df --- /dev/null +++ b/tests/lint/prefer-object-spread.test.ts @@ -0,0 +1,41 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('prefer-object-spread', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + const header = ` + const foo = { + a: 1 +}; +`; + + describe('ошибки', () => { + const cases = [`${header}const a = Object.assign({}, foo);`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`${header}const b = {...foo};`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/quotemark.test.ts b/tests/lint/quotemark.test.ts new file mode 100644 index 0000000..14a442a --- /dev/null +++ b/tests/lint/quotemark.test.ts @@ -0,0 +1,42 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('quotemark', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + 'const a = "123";', + 'const e = `string with backticks`;' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + "const c = '123';", + 'const d = "\'123";', + 'const e = `string with backticks${window.a}`;' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/radix.test.ts b/tests/lint/radix.test.ts new file mode 100644 index 0000000..16f18d3 --- /dev/null +++ b/tests/lint/radix.test.ts @@ -0,0 +1,35 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('radix', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = ["const num = parseInt('071');"]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = ["const num1 = parseInt('071', 10);"]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/rules-of-hooks.test.tsx b/tests/lint/rules-of-hooks.test.tsx new file mode 100644 index 0000000..ff494e0 --- /dev/null +++ b/tests/lint/rules-of-hooks.test.tsx @@ -0,0 +1,42 @@ +import {ESLint} from 'eslint'; +import {lint} from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('react-hooks/rules-of-hooks', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `function ComponentWithConditionalHook() { + if (cond) { + useConditionalHook(); + } +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [`function ComponentWithHook() { +useHook(); +}`]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text, 'tsx'); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/semicolon.test.ts b/tests/lint/semicolon.test.ts new file mode 100644 index 0000000..9f7c60a --- /dev/null +++ b/tests/lint/semicolon.test.ts @@ -0,0 +1,31 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('semicolon', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + // под это правило почти нет тестов, потому что всё учесть безумно тяжело + describe('не ошибки', () => { + // в eslint нет опции ignore-bound-class-methods, но это проверяет тест + const cases = [ + `class SemicolonTest { + boundMethod = (): void => { + // not empty + } +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/trailing-comma.test.ts b/tests/lint/trailing-comma.test.ts new file mode 100644 index 0000000..2fb1af0 --- /dev/null +++ b/tests/lint/trailing-comma.test.ts @@ -0,0 +1,41 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('trailing-comma', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('не ошибки', () => { + const cases = [ + `import { + lib, +} from 'lib';`, + `const obj = { + bar: 'baz', + qux: 'quux', +};`, + 'const arr = [1, 2, ];', + `function foo( + a: number, + b: number, +): void { + // not empty +}`, + `export { + foo, +};` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/triple-equals.test.ts b/tests/lint/triple-equals.test.ts new file mode 100644 index 0000000..f6ed1ff --- /dev/null +++ b/tests/lint/triple-equals.test.ts @@ -0,0 +1,62 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('triple-equals', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + const header = `const x = 0; +const text = 'qwe'; +`; + + describe('ошибки', () => { + const cases = [ + `${header}if (x == 1) { + // not empty +}`, + `${header}if ('' == text) { + // not empty +}`, + `${header}if (text == undefined) { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `${header}if (x === 1) { + // not empty +}`, + `${header}if ('' === text) { + // not empty +}`, + `${header}if (text == null) { + // not empty +}`, + `${header}if (text === undefined) { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/tsconfig.json b/tests/lint/tsconfig.json new file mode 100644 index 0000000..cd67733 --- /dev/null +++ b/tests/lint/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "alwaysStrict": true, + "importHelpers": true, + "lib": ["dom", "es5", "es2016", "es2017.object", "es2017.string", "es2018.promise", "scripthost"], + "module": "amd", + "moduleResolution": "classic", + "noUnusedLocals": true, + "target": "es5" + } +} diff --git a/tests/lint/typedef-whitespace.test.ts b/tests/lint/typedef-whitespace.test.ts new file mode 100644 index 0000000..204c055 --- /dev/null +++ b/tests/lint/typedef-whitespace.test.ts @@ -0,0 +1,69 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('typedef-whitespace', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + "const foo:string = 'bar';", + "const foo :string = 'bar';", + "const foo : string = 'bar';", + `function foo():void { + // not empty +}`, + `function foo() :void { + // not empty +}`, + `function foo() : void { + // not empty +}`, + `class Foo { + name:string; +}`, + `class Foo { + name :string; +}`, + `class Foo { + name : string; +}`, + 'type Foo = ()=>{};', + 'type Foo = () =>{};', + 'type Foo = ()=> {};' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + "const foo: string = 'bar';", + `function foo(): void { + // not empty +}`, + `class Foo { + name: string; +}`, + 'type Foo = () => {};' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/typeof-compare.test.ts b/tests/lint/typeof-compare.test.ts new file mode 100644 index 0000000..241a8ba --- /dev/null +++ b/tests/lint/typeof-compare.test.ts @@ -0,0 +1,49 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('typeof-compare', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + // правило отключено + describe('не ошибки', () => { + const cases = [ + `if (typeof foo === 'strnig') { + // not empty +}`, + `if (typeof foo === 'undefimed') { + // not empty +}`, + `if (typeof bar !== 'nunber') { + // not empty +}`, + `if (typeof bar !== 'fucntion') { + // not empty +}`, + `if (typeof foo === 'string') { + // not empty +}`, + `if (typeof bar === 'undefined') { + // not empty +}`, + `if (typeof foo === baz) { + // not empty +}`, + `if (typeof bar === typeof qux) { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/unified-signatures.test.ts b/tests/lint/unified-signatures.test.ts new file mode 100644 index 0000000..43e07cc --- /dev/null +++ b/tests/lint/unified-signatures.test.ts @@ -0,0 +1,46 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('unified-signatures', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `function f(x: number): void; +function f(x: string): void; +function f(...args: unknown[]): void { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `function y(x: number | string): void; +function y(...args: unknown[]): void { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/use-isnan.test.ts b/tests/lint/use-isnan.test.ts new file mode 100644 index 0000000..e3fce48 --- /dev/null +++ b/tests/lint/use-isnan.test.ts @@ -0,0 +1,55 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('use-isnan', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig()); + }); + + describe('ошибки', () => { + const cases = [ + `if (foo === NaN) { + // not empty +}`, + `if (foo !== NaN) { + // not empty +}`, + `if (foo === Number.NaN) { + // not empty +}`, + `if (foo !== Number.NaN) { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `if (isNaN(foo)) { + // not empty +}`, + `if (!isNaN(foo)) { + // not empty +}` + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/lint/utils/getConfig.ts b/tests/lint/utils/getConfig.ts new file mode 100644 index 0000000..1af4bdc --- /dev/null +++ b/tests/lint/utils/getConfig.ts @@ -0,0 +1,28 @@ +import { ESLint } from 'eslint'; +const config = require('../../../eslint/base'); + +/** + * Генерирует конфиг для ESLint + * @author Зайцев А.С. + */ +export function getConfig(rules?: ESLint.Options['overrideConfig']['rules']): ESLint.Options { + return { + useEslintrc: false, + baseConfig: config, + overrideConfig: { + parserOptions: { + ...config.parserOptions, + /** + * Без этих двух опций линтер будет ругаться на две вещи: + * 1) Нет tsconfig + * 2) Если указать tsconfig, то файл не включен в проект. + * + * Возможно отказаться от второй опции, если разобраться как правильно указать путь. + */ + project: './tests/lint/tsconfig.json', + DEPRECATED__createDefaultProgram: true + }, + rules + } + }; +} diff --git a/tests/lint/utils/lint.ts b/tests/lint/utils/lint.ts new file mode 100644 index 0000000..bfd3d26 --- /dev/null +++ b/tests/lint/utils/lint.ts @@ -0,0 +1,31 @@ +import { ESLint } from 'eslint'; + +/** + * Хелпер для запуска линтера + * @author Зайцев А.С. + * @param linter + * @param text + * @param extension + */ +export async function lint( + linter: ESLint, + text: string, + extension: string = 'ts' +): Promise { + return linter + .lintText(text, { + filePath: `test.${extension}` + }) + .then((results) => { + results[0].messages.forEach((msg) => { + // В тестах это неинтересно, не будем раздувать снапшоты + if (msg.suggestions) { + delete msg.suggestions; + } + if (msg.fix) { + delete msg.fix; + } + }); + return results[0]; + }); +} diff --git a/tests/lint/variable-name.test.ts b/tests/lint/variable-name.test.ts new file mode 100644 index 0000000..fc27e30 --- /dev/null +++ b/tests/lint/variable-name.test.ts @@ -0,0 +1,56 @@ +import { ESLint } from 'eslint'; +import { lint } from './utils/lint'; +import { getConfig } from './utils/getConfig'; + +describe('variable-name', () => { + let linter: ESLint; + + beforeAll(() => { + linter = new ESLint(getConfig({ + '@typescript-eslint/typedef': 'off', + 'prefer-const': 'off' + })); + }); + + describe('ошибки', () => { + const cases = [ + 'const ___tripleLeadingUnderscore = 1;', + 'const __doubleLeadingUnderscore = 1;', + 'const doubleTrailingUnderscore__ = 1;', + 'let ___tripleLeadingUnderscore1 = 1;', + 'let __doubleLeadingUnderscore1 = 1;', + 'let doubleTrailingUnderscore1__ = 1;' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + 'const camelCase = 1;', + 'const PascalCase = 1;', + 'const UPPER_CASE = 1;', + 'const _singleLeadingUnderscore = 1;', + 'const singleTrailingUnderscore_ = 1;', + 'let camelCase1 = 1;', + 'let PascalCase1 = 1;', + 'let UPPER_CASE1 = 1;', + 'let _singleLeadingUnderscore1 = 1;', + 'let singleTrailingUnderscore_ = 1;' + ]; + + cases.forEach((text, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint(linter, text); + + expect(result.messages).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/tests/stylelint/__snapshots__/at-rule-empty-line-before.test.ts.snap b/tests/stylelint/__snapshots__/at-rule-empty-line-before.test.ts.snap new file mode 100644 index 0000000..f281b8f --- /dev/null +++ b/tests/stylelint/__snapshots__/at-rule-empty-line-before.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`at-rule-empty-line-before ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 20, + "endLine": 2, + "line": 2, + "rule": "at-rule-empty-line-before", + "severity": "error", + "text": "Expected empty line before at-rule (at-rule-empty-line-before)", + }, +] +`; + +exports[`at-rule-empty-line-before ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/at-rule-no-unknown.test.ts.snap b/tests/stylelint/__snapshots__/at-rule-no-unknown.test.ts.snap new file mode 100644 index 0000000..ad9241b --- /dev/null +++ b/tests/stylelint/__snapshots__/at-rule-no-unknown.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`at-rule-no-unknown не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`at-rule-no-unknown не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`at-rule-no-unknown ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 9, + "endLine": 1, + "line": 1, + "rule": "at-rule-no-unknown", + "severity": "error", + "text": "Unexpected unknown at-rule \\"@unknown\\" (at-rule-no-unknown)", + }, +] +`; + +exports[`at-rule-no-unknown ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/block-no-empty.test.ts.snap b/tests/stylelint/__snapshots__/block-no-empty.test.ts.snap new file mode 100644 index 0000000..31f5f41 --- /dev/null +++ b/tests/stylelint/__snapshots__/block-no-empty.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`block-no-empty не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`block-no-empty не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`block-no-empty ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 8, + "endColumn": 2, + "endLine": 2, + "line": 1, + "rule": "block-no-empty", + "severity": "error", + "text": "Unexpected empty block (block-no-empty)", + }, +] +`; + +exports[`block-no-empty ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/color-hex-length.test.ts.snap b/tests/stylelint/__snapshots__/color-hex-length.test.ts.snap new file mode 100644 index 0000000..37fd42c --- /dev/null +++ b/tests/stylelint/__snapshots__/color-hex-length.test.ts.snap @@ -0,0 +1,45 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`color-hex-length не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`color-hex-length не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`color-hex-length не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`color-hex-length не ошибки индекс теста: 1 2`] = `Array []`; + +exports[`color-hex-length не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`color-hex-length не ошибки индекс теста: 2 2`] = `Array []`; + +exports[`color-hex-length ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 11, + "endColumn": 18, + "endLine": 2, + "line": 2, + "rule": "color-hex-length", + "severity": "error", + "text": "Expected \\"#cccccc\\" to be \\"#ccc\\" (color-hex-length)", + }, +] +`; + +exports[`color-hex-length ошибки индекс теста: 0 2`] = `Array []`; + +exports[`color-hex-length ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 11, + "endColumn": 20, + "endLine": 2, + "line": 2, + "rule": "color-hex-length", + "severity": "error", + "text": "Expected \\"#ccccccaa\\" to be \\"#ccca\\" (color-hex-length)", + }, +] +`; + +exports[`color-hex-length ошибки индекс теста: 1 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/color-named.test.ts.snap b/tests/stylelint/__snapshots__/color-named.test.ts.snap new file mode 100644 index 0000000..4ec2d19 --- /dev/null +++ b/tests/stylelint/__snapshots__/color-named.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`color-names ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 11, + "endColumn": 14, + "endLine": 2, + "line": 2, + "rule": "color-named", + "severity": "error", + "text": "Unexpected named color \\"red\\" (color-named)", + }, +] +`; + +exports[`color-names ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/color-no-invalid-hex.test.ts.snap b/tests/stylelint/__snapshots__/color-no-invalid-hex.test.ts.snap new file mode 100644 index 0000000..644fe48 --- /dev/null +++ b/tests/stylelint/__snapshots__/color-no-invalid-hex.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`color-no-invalid-hex не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`color-no-invalid-hex не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`color-no-invalid-hex ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 11, + "endColumn": 14, + "endLine": 2, + "line": 2, + "rule": "color-no-invalid-hex", + "severity": "error", + "text": "Unexpected invalid hex color \\"#y3\\" (color-no-invalid-hex)", + }, +] +`; + +exports[`color-no-invalid-hex ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/comment-empty-line-before.test.ts.snap b/tests/stylelint/__snapshots__/comment-empty-line-before.test.ts.snap new file mode 100644 index 0000000..ff16159 --- /dev/null +++ b/tests/stylelint/__snapshots__/comment-empty-line-before.test.ts.snap @@ -0,0 +1,45 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment-empty-line-before не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`comment-empty-line-before не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`comment-empty-line-before не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`comment-empty-line-before не ошибки индекс теста: 1 2`] = `Array []`; + +exports[`comment-empty-line-before не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`comment-empty-line-before не ошибки индекс теста: 2 2`] = `Array []`; + +exports[`comment-empty-line-before ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 14, + "endLine": 4, + "line": 4, + "rule": "comment-empty-line-before", + "severity": "error", + "text": "Expected empty line before comment (comment-empty-line-before)", + }, +] +`; + +exports[`comment-empty-line-before ошибки индекс теста: 0 2`] = `Array []`; + +exports[`comment-empty-line-before ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 17, + "endLine": 3, + "line": 3, + "rule": "comment-empty-line-before", + "severity": "error", + "text": "Expected empty line before comment (comment-empty-line-before)", + }, +] +`; + +exports[`comment-empty-line-before ошибки индекс теста: 1 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/comment-no-empty.test.ts.snap b/tests/stylelint/__snapshots__/comment-no-empty.test.ts.snap new file mode 100644 index 0000000..24e6aaa --- /dev/null +++ b/tests/stylelint/__snapshots__/comment-no-empty.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment-no-empty не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`comment-no-empty не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`comment-no-empty ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 6, + "endLine": 1, + "line": 1, + "rule": "comment-no-empty", + "severity": "error", + "text": "Unexpected empty comment (comment-no-empty)", + }, +] +`; + +exports[`comment-no-empty ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/comment-whitespace-inside.test.ts.snap b/tests/stylelint/__snapshots__/comment-whitespace-inside.test.ts.snap new file mode 100644 index 0000000..56b2ecf --- /dev/null +++ b/tests/stylelint/__snapshots__/comment-whitespace-inside.test.ts.snap @@ -0,0 +1,62 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment-whitespace-inside не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`comment-whitespace-inside не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`comment-whitespace-inside ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 3, + "endColumn": 4, + "endLine": 1, + "line": 1, + "rule": "comment-whitespace-inside", + "severity": "error", + "text": "Expected whitespace after \\"/*\\" (comment-whitespace-inside)", + }, + Object { + "column": 9, + "endColumn": 10, + "endLine": 1, + "line": 1, + "rule": "comment-whitespace-inside", + "severity": "error", + "text": "Expected whitespace before \\"*/\\" (comment-whitespace-inside)", + }, +] +`; + +exports[`comment-whitespace-inside ошибки индекс теста: 0 2`] = `Array []`; + +exports[`comment-whitespace-inside ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 10, + "endColumn": 11, + "endLine": 1, + "line": 1, + "rule": "comment-whitespace-inside", + "severity": "error", + "text": "Expected whitespace before \\"*/\\" (comment-whitespace-inside)", + }, +] +`; + +exports[`comment-whitespace-inside ошибки индекс теста: 1 2`] = `Array []`; + +exports[`comment-whitespace-inside ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 3, + "endColumn": 4, + "endLine": 1, + "line": 1, + "rule": "comment-whitespace-inside", + "severity": "error", + "text": "Expected whitespace after \\"/*\\" (comment-whitespace-inside)", + }, +] +`; + +exports[`comment-whitespace-inside ошибки индекс теста: 2 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/custom-property-empty-line-before.test.ts.snap b/tests/stylelint/__snapshots__/custom-property-empty-line-before.test.ts.snap new file mode 100644 index 0000000..1087819 --- /dev/null +++ b/tests/stylelint/__snapshots__/custom-property-empty-line-before.test.ts.snap @@ -0,0 +1,33 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`custom-property-empty-line-before не ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 16, + "endLine": 6, + "line": 6, + "rule": "custom-property-empty-line-before", + "severity": "error", + "text": "Unexpected empty line before custom property (custom-property-empty-line-before)", + }, +] +`; + +exports[`custom-property-empty-line-before не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`custom-property-empty-line-before ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 16, + "endLine": 3, + "line": 3, + "rule": "custom-property-empty-line-before", + "severity": "error", + "text": "Expected empty line before custom property (custom-property-empty-line-before)", + }, +] +`; + +exports[`custom-property-empty-line-before ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/declaration-block-no-duplicate-properties.test.ts.snap b/tests/stylelint/__snapshots__/declaration-block-no-duplicate-properties.test.ts.snap new file mode 100644 index 0000000..318dec3 --- /dev/null +++ b/tests/stylelint/__snapshots__/declaration-block-no-duplicate-properties.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`declaration-block-no-duplicate-properties не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`declaration-block-no-duplicate-properties не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`declaration-block-no-duplicate-properties ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 13, + "endLine": 3, + "line": 3, + "rule": "declaration-block-no-duplicate-properties", + "severity": "error", + "text": "Unexpected duplicate \\"font-size\\" (declaration-block-no-duplicate-properties)", + }, +] +`; + +exports[`declaration-block-no-duplicate-properties ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/declaration-block-no-shorthand-property-overrides.test.ts.snap b/tests/stylelint/__snapshots__/declaration-block-no-shorthand-property-overrides.test.ts.snap new file mode 100644 index 0000000..0272444 --- /dev/null +++ b/tests/stylelint/__snapshots__/declaration-block-no-shorthand-property-overrides.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`declaration-block-no-shorthand-property-overrides не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`declaration-block-no-shorthand-property-overrides не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`declaration-block-no-shorthand-property-overrides ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 14, + "endLine": 3, + "line": 3, + "rule": "declaration-block-no-shorthand-property-overrides", + "severity": "error", + "text": "Unexpected shorthand \\"background\\" after \\"background-repeat\\" (declaration-block-no-shorthand-property-overrides)", + }, +] +`; + +exports[`declaration-block-no-shorthand-property-overrides ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/declaration-block-single-line-max-declarations.test.ts.snap b/tests/stylelint/__snapshots__/declaration-block-single-line-max-declarations.test.ts.snap new file mode 100644 index 0000000..3c57d97 --- /dev/null +++ b/tests/stylelint/__snapshots__/declaration-block-single-line-max-declarations.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`declaration-block-single-line-max-declarations ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 8, + "endColumn": 32, + "endLine": 1, + "line": 1, + "rule": "declaration-block-single-line-max-declarations", + "severity": "error", + "text": "Expected no more than 0 declarations (declaration-block-single-line-max-declarations)", + }, +] +`; + +exports[`declaration-block-single-line-max-declarations ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/declaration-empty-line-before.test.ts.snap b/tests/stylelint/__snapshots__/declaration-empty-line-before.test.ts.snap new file mode 100644 index 0000000..6a54c6d --- /dev/null +++ b/tests/stylelint/__snapshots__/declaration-empty-line-before.test.ts.snap @@ -0,0 +1,61 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`declaration-empty-line-before не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`declaration-empty-line-before не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`declaration-empty-line-before не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`declaration-empty-line-before не ошибки индекс теста: 1 2`] = `Array []`; + +exports[`declaration-empty-line-before не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`declaration-empty-line-before не ошибки индекс теста: 2 2`] = `Array []`; + +exports[`declaration-empty-line-before не ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 8, + "endColumn": 24, + "endLine": 1, + "line": 1, + "rule": "declaration-block-single-line-max-declarations", + "severity": "error", + "text": "Expected no more than 0 declarations (declaration-block-single-line-max-declarations)", + }, +] +`; + +exports[`declaration-empty-line-before не ошибки индекс теста: 3 2`] = `Array []`; + +exports[`declaration-empty-line-before ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 16, + "endLine": 4, + "line": 4, + "rule": "declaration-empty-line-before", + "severity": "error", + "text": "Unexpected empty line before declaration (declaration-empty-line-before)", + }, +] +`; + +exports[`declaration-empty-line-before ошибки индекс теста: 0 2`] = `Array []`; + +exports[`declaration-empty-line-before ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 16, + "endLine": 3, + "line": 3, + "rule": "declaration-empty-line-before", + "severity": "error", + "text": "Unexpected empty line before declaration (declaration-empty-line-before)", + }, +] +`; + +exports[`declaration-empty-line-before ошибки индекс теста: 1 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/declaration-no-important.test.ts.snap b/tests/stylelint/__snapshots__/declaration-no-important.test.ts.snap new file mode 100644 index 0000000..eca10c3 --- /dev/null +++ b/tests/stylelint/__snapshots__/declaration-no-important.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`declaration-no-important ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 16, + "endColumn": 26, + "endLine": 2, + "line": 2, + "rule": "declaration-no-important", + "severity": "error", + "text": "Unexpected !important (declaration-no-important)", + }, +] +`; + +exports[`declaration-no-important ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/font-family-no-duplicate-names.test.ts.snap b/tests/stylelint/__snapshots__/font-family-no-duplicate-names.test.ts.snap new file mode 100644 index 0000000..4047733 --- /dev/null +++ b/tests/stylelint/__snapshots__/font-family-no-duplicate-names.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`font-family-no-duplicate-names не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`font-family-no-duplicate-names не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`font-family-no-duplicate-names ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 24, + "endColumn": 29, + "endLine": 2, + "line": 2, + "rule": "font-family-no-duplicate-names", + "severity": "error", + "text": "Unexpected duplicate name Times (font-family-no-duplicate-names)", + }, +] +`; + +exports[`font-family-no-duplicate-names ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/font-family-no-missing-generic-family-keyword.test.ts.snap b/tests/stylelint/__snapshots__/font-family-no-missing-generic-family-keyword.test.ts.snap new file mode 100644 index 0000000..4359a60 --- /dev/null +++ b/tests/stylelint/__snapshots__/font-family-no-missing-generic-family-keyword.test.ts.snap @@ -0,0 +1,29 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`font-family-no-missing-generic-family-keyword не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`font-family-no-missing-generic-family-keyword не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`font-family-no-missing-generic-family-keyword не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`font-family-no-missing-generic-family-keyword не ошибки индекс теста: 1 2`] = `Array []`; + +exports[`font-family-no-missing-generic-family-keyword не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`font-family-no-missing-generic-family-keyword не ошибки индекс теста: 2 2`] = `Array []`; + +exports[`font-family-no-missing-generic-family-keyword ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 17, + "endColumn": 22, + "endLine": 2, + "line": 2, + "rule": "font-family-no-missing-generic-family-keyword", + "severity": "error", + "text": "Unexpected missing generic font family (font-family-no-missing-generic-family-keyword)", + }, +] +`; + +exports[`font-family-no-missing-generic-family-keyword ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/function-linear-gradient-no-nonstandard-direction.test.ts.snap b/tests/stylelint/__snapshots__/function-linear-gradient-no-nonstandard-direction.test.ts.snap new file mode 100644 index 0000000..99a77d0 --- /dev/null +++ b/tests/stylelint/__snapshots__/function-linear-gradient-no-nonstandard-direction.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`function-linear-gradient-no-nonstandard-direction не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`function-linear-gradient-no-nonstandard-direction не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`function-linear-gradient-no-nonstandard-direction ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 32, + "endColumn": 35, + "endLine": 2, + "line": 2, + "rule": "function-linear-gradient-no-nonstandard-direction", + "severity": "error", + "text": "Unexpected nonstandard direction (function-linear-gradient-no-nonstandard-direction)", + }, +] +`; + +exports[`function-linear-gradient-no-nonstandard-direction ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/function-name-case.test.ts.snap b/tests/stylelint/__snapshots__/function-name-case.test.ts.snap new file mode 100644 index 0000000..0154944 --- /dev/null +++ b/tests/stylelint/__snapshots__/function-name-case.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`function-name-case ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 15, + "endColumn": 16, + "endLine": 2, + "line": 2, + "rule": "function-name-case", + "severity": "error", + "text": "Expected \\"Translate\\" to be \\"translate\\" (function-name-case)", + }, +] +`; + +exports[`function-name-case ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/keyframe-declaration-no-important.test.ts.snap b/tests/stylelint/__snapshots__/keyframe-declaration-no-important.test.ts.snap new file mode 100644 index 0000000..bfc47e2 --- /dev/null +++ b/tests/stylelint/__snapshots__/keyframe-declaration-no-important.test.ts.snap @@ -0,0 +1,26 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`keyframe-declaration-no-important ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 18, + "endColumn": 28, + "endLine": 7, + "line": 7, + "rule": "declaration-no-important", + "severity": "error", + "text": "Unexpected !important (declaration-no-important)", + }, + Object { + "column": 18, + "endColumn": 28, + "endLine": 7, + "line": 7, + "rule": "keyframe-declaration-no-important", + "severity": "error", + "text": "Unexpected !important (keyframe-declaration-no-important)", + }, +] +`; + +exports[`keyframe-declaration-no-important ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/length-zero-no-unit.test.ts.snap b/tests/stylelint/__snapshots__/length-zero-no-unit.test.ts.snap new file mode 100644 index 0000000..2f46289 --- /dev/null +++ b/tests/stylelint/__snapshots__/length-zero-no-unit.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`length-zero-no-unit не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`length-zero-no-unit не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`length-zero-no-unit ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 13, + "endColumn": 15, + "endLine": 2, + "line": 2, + "rule": "length-zero-no-unit", + "severity": "error", + "text": "Unexpected unit (length-zero-no-unit)", + }, +] +`; + +exports[`length-zero-no-unit ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/no-descending-specificity.test.ts.snap b/tests/stylelint/__snapshots__/no-descending-specificity.test.ts.snap new file mode 100644 index 0000000..de3001d --- /dev/null +++ b/tests/stylelint/__snapshots__/no-descending-specificity.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-descending-specificity не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-descending-specificity не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`no-descending-specificity ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 7, + "endLine": 5, + "line": 5, + "rule": "no-descending-specificity", + "severity": "error", + "text": "Expected selector \\".child\\" to come before selector \\".parent .child\\" (no-descending-specificity)", + }, +] +`; + +exports[`no-descending-specificity ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/no-duplicate-at-import-rules.test.ts.snap b/tests/stylelint/__snapshots__/no-duplicate-at-import-rules.test.ts.snap new file mode 100644 index 0000000..42e0d28 --- /dev/null +++ b/tests/stylelint/__snapshots__/no-duplicate-at-import-rules.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-duplicate-at-import-rules ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 16, + "endLine": 2, + "line": 2, + "rule": "no-duplicate-at-import-rules", + "severity": "error", + "text": "Unexpected duplicate @import rule a.css (no-duplicate-at-import-rules)", + }, +] +`; + +exports[`no-duplicate-at-import-rules ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/no-duplicate-selectors.test.ts.snap b/tests/stylelint/__snapshots__/no-duplicate-selectors.test.ts.snap new file mode 100644 index 0000000..6fdc1cc --- /dev/null +++ b/tests/stylelint/__snapshots__/no-duplicate-selectors.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-duplicate-selectors не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-duplicate-selectors не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`no-duplicate-selectors ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 5, + "endLine": 3, + "line": 3, + "rule": "no-duplicate-selectors", + "severity": "error", + "text": "Unexpected duplicate selector \\".foo\\", first used at line 1 (no-duplicate-selectors)", + }, +] +`; + +exports[`no-duplicate-selectors ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/no-empty-source.test.ts.snap b/tests/stylelint/__snapshots__/no-empty-source.test.ts.snap new file mode 100644 index 0000000..1558e07 --- /dev/null +++ b/tests/stylelint/__snapshots__/no-empty-source.test.ts.snap @@ -0,0 +1,65 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-empty-source ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 2, + "endLine": 1, + "line": 1, + "rule": "no-empty-source", + "severity": "error", + "text": "Unexpected empty source (no-empty-source)", + }, +] +`; + +exports[`no-empty-source ошибки индекс теста: 0 2`] = `Array []`; + +exports[`no-empty-source ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 3, + "endLine": 1, + "line": 1, + "rule": "no-empty-source", + "severity": "error", + "text": "Unexpected empty source (no-empty-source)", + }, +] +`; + +exports[`no-empty-source ошибки индекс теста: 1 2`] = `Array []`; + +exports[`no-empty-source ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 4, + "endLine": 1, + "line": 1, + "rule": "no-empty-source", + "severity": "error", + "text": "Unexpected empty source (no-empty-source)", + }, +] +`; + +exports[`no-empty-source ошибки индекс теста: 2 2`] = `Array []`; + +exports[`no-empty-source ошибки индекс теста: 3 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 2, + "endLine": 2, + "line": 1, + "rule": "no-empty-source", + "severity": "error", + "text": "Unexpected empty source (no-empty-source)", + }, +] +`; + +exports[`no-empty-source ошибки индекс теста: 3 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/no-unknown-animations.test.ts.snap b/tests/stylelint/__snapshots__/no-unknown-animations.test.ts.snap new file mode 100644 index 0000000..3af2d88 --- /dev/null +++ b/tests/stylelint/__snapshots__/no-unknown-animations.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-unknown-animations не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`no-unknown-animations не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`no-unknown-animations ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 20, + "endColumn": 31, + "endLine": 2, + "line": 2, + "rule": "no-unknown-animations", + "severity": "error", + "text": "Unexpected unknown animation name \\"fancy-slide\\" (no-unknown-animations)", + }, +] +`; + +exports[`no-unknown-animations ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/property-no-unknown.test.ts.snap b/tests/stylelint/__snapshots__/property-no-unknown.test.ts.snap new file mode 100644 index 0000000..03c7319 --- /dev/null +++ b/tests/stylelint/__snapshots__/property-no-unknown.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`property-no-unknown не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`property-no-unknown не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`property-no-unknown ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 10, + "endLine": 2, + "line": 2, + "rule": "property-no-unknown", + "severity": "error", + "text": "Unexpected unknown property \\"heigth\\" (property-no-unknown)", + }, +] +`; + +exports[`property-no-unknown ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/rule-empty-line-before.test.ts.snap b/tests/stylelint/__snapshots__/rule-empty-line-before.test.ts.snap new file mode 100644 index 0000000..e18ff7b --- /dev/null +++ b/tests/stylelint/__snapshots__/rule-empty-line-before.test.ts.snap @@ -0,0 +1,45 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`rule-empty-line-before не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`rule-empty-line-before не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`rule-empty-line-before не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`rule-empty-line-before не ошибки индекс теста: 1 2`] = `Array []`; + +exports[`rule-empty-line-before не ошибки индекс теста: 2 1`] = `Array []`; + +exports[`rule-empty-line-before не ошибки индекс теста: 2 2`] = `Array []`; + +exports[`rule-empty-line-before ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 2, + "endLine": 6, + "line": 4, + "rule": "rule-empty-line-before", + "severity": "error", + "text": "Expected empty line before rule (rule-empty-line-before)", + }, +] +`; + +exports[`rule-empty-line-before ошибки индекс теста: 0 2`] = `Array []`; + +exports[`rule-empty-line-before ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 5, + "endLine": 5, + "line": 3, + "rule": "rule-empty-line-before", + "severity": "error", + "text": "Expected empty line before rule (rule-empty-line-before)", + }, +] +`; + +exports[`rule-empty-line-before ошибки индекс теста: 1 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/selector-max-id.test.ts.snap b/tests/stylelint/__snapshots__/selector-max-id.test.ts.snap new file mode 100644 index 0000000..2c57ca0 --- /dev/null +++ b/tests/stylelint/__snapshots__/selector-max-id.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`selector-max-id ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 4, + "endLine": 1, + "line": 1, + "rule": "selector-max-id", + "severity": "error", + "text": "Expected \\"#id\\" to have no more than 0 ID selectors (selector-max-id)", + }, +] +`; + +exports[`selector-max-id ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/selector-max-type.test.ts.snap b/tests/stylelint/__snapshots__/selector-max-type.test.ts.snap new file mode 100644 index 0000000..ec24a82 --- /dev/null +++ b/tests/stylelint/__snapshots__/selector-max-type.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`selector-max-type ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 2, + "endLine": 1, + "line": 1, + "rule": "selector-max-type", + "severity": "error", + "text": "Expected \\"a\\" to have no more than 0 type selectors (selector-max-type)", + }, +] +`; + +exports[`selector-max-type ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/selector-max-universal.test.ts.snap b/tests/stylelint/__snapshots__/selector-max-universal.test.ts.snap new file mode 100644 index 0000000..3192fc8 --- /dev/null +++ b/tests/stylelint/__snapshots__/selector-max-universal.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`selector-max-universal ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 2, + "endLine": 1, + "line": 1, + "rule": "selector-max-universal", + "severity": "error", + "text": "Expected \\"*\\" to have no more than 0 universal selectors (selector-max-universal)", + }, +] +`; + +exports[`selector-max-universal ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/selector-pseudo-class-no-unknown.test.ts.snap b/tests/stylelint/__snapshots__/selector-pseudo-class-no-unknown.test.ts.snap new file mode 100644 index 0000000..4b70727 --- /dev/null +++ b/tests/stylelint/__snapshots__/selector-pseudo-class-no-unknown.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`selector-pseudo-class-no-unknown не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`selector-pseudo-class-no-unknown не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`selector-pseudo-class-no-unknown ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 13, + "endLine": 1, + "line": 1, + "rule": "selector-pseudo-class-no-unknown", + "severity": "error", + "text": "Unexpected unknown pseudo-class selector \\":hoevr\\" (selector-pseudo-class-no-unknown)", + }, +] +`; + +exports[`selector-pseudo-class-no-unknown ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/selector-pseudo-element-colon-notation.test.ts.snap b/tests/stylelint/__snapshots__/selector-pseudo-element-colon-notation.test.ts.snap new file mode 100644 index 0000000..c5809d8 --- /dev/null +++ b/tests/stylelint/__snapshots__/selector-pseudo-element-colon-notation.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`selector-pseudo-element-colon-notation не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`selector-pseudo-element-colon-notation не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`selector-pseudo-element-colon-notation ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 8, + "endLine": 1, + "line": 1, + "rule": "selector-pseudo-element-colon-notation", + "severity": "error", + "text": "Expected double colon pseudo-element notation (selector-pseudo-element-colon-notation)", + }, +] +`; + +exports[`selector-pseudo-element-colon-notation ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/selector-pseudo-element-no-unknown.test.ts.snap b/tests/stylelint/__snapshots__/selector-pseudo-element-no-unknown.test.ts.snap new file mode 100644 index 0000000..a5ed348 --- /dev/null +++ b/tests/stylelint/__snapshots__/selector-pseudo-element-no-unknown.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`selector-pseudo-element-no-unknown не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`selector-pseudo-element-no-unknown не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`selector-pseudo-element-no-unknown ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 15, + "endLine": 1, + "line": 1, + "rule": "selector-pseudo-element-no-unknown", + "severity": "error", + "text": "Unexpected unknown pseudo-element selector \\"::befroe\\" (selector-pseudo-element-no-unknown)", + }, +] +`; + +exports[`selector-pseudo-element-no-unknown ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/selector-type-case.test.ts.snap b/tests/stylelint/__snapshots__/selector-type-case.test.ts.snap new file mode 100644 index 0000000..a79382d --- /dev/null +++ b/tests/stylelint/__snapshots__/selector-type-case.test.ts.snap @@ -0,0 +1,42 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`selector-type-case не ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 2, + "endLine": 1, + "line": 1, + "rule": "selector-max-type", + "severity": "error", + "text": "Expected \\"a\\" to have no more than 0 type selectors (selector-max-type)", + }, +] +`; + +exports[`selector-type-case не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`selector-type-case ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 2, + "endLine": 1, + "line": 1, + "rule": "selector-max-type", + "severity": "error", + "text": "Expected \\"A\\" to have no more than 0 type selectors (selector-max-type)", + }, + Object { + "column": 1, + "endColumn": 2, + "endLine": 3, + "line": 1, + "rule": "selector-type-case", + "severity": "error", + "text": "Expected \\"A\\" to be \\"a\\" (selector-type-case)", + }, +] +`; + +exports[`selector-type-case ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/selector-type-no-unknown.test.ts.snap b/tests/stylelint/__snapshots__/selector-type-no-unknown.test.ts.snap new file mode 100644 index 0000000..caa0750 --- /dev/null +++ b/tests/stylelint/__snapshots__/selector-type-no-unknown.test.ts.snap @@ -0,0 +1,26 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`selector-type-no-unknown ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 1, + "endColumn": 8, + "endLine": 1, + "line": 1, + "rule": "selector-max-type", + "severity": "error", + "text": "Expected \\"unknown\\" to have no more than 0 type selectors (selector-max-type)", + }, + Object { + "column": 1, + "endColumn": 8, + "endLine": 1, + "line": 1, + "rule": "selector-type-no-unknown", + "severity": "error", + "text": "Unexpected unknown type selector \\"unknown\\" (selector-type-no-unknown)", + }, +] +`; + +exports[`selector-type-no-unknown ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/shorthand-property-no-redundant-values.test.ts.snap b/tests/stylelint/__snapshots__/shorthand-property-no-redundant-values.test.ts.snap new file mode 100644 index 0000000..3711147 --- /dev/null +++ b/tests/stylelint/__snapshots__/shorthand-property-no-redundant-values.test.ts.snap @@ -0,0 +1,57 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`shorthand-property-no-redundant-values не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`shorthand-property-no-redundant-values не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`shorthand-property-no-redundant-values не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`shorthand-property-no-redundant-values не ошибки индекс теста: 1 2`] = `Array []`; + +exports[`shorthand-property-no-redundant-values ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 29, + "endLine": 2, + "line": 2, + "rule": "shorthand-property-no-redundant-values", + "severity": "error", + "text": "Expected \\"1px 1px 1px 1px\\" to be \\"1px\\" (shorthand-property-no-redundant-values)", + }, +] +`; + +exports[`shorthand-property-no-redundant-values ошибки индекс теста: 0 2`] = `Array []`; + +exports[`shorthand-property-no-redundant-values ошибки индекс теста: 1 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 29, + "endLine": 2, + "line": 2, + "rule": "shorthand-property-no-redundant-values", + "severity": "error", + "text": "Expected \\"1px 2px 1px 2px\\" to be \\"1px 2px\\" (shorthand-property-no-redundant-values)", + }, +] +`; + +exports[`shorthand-property-no-redundant-values ошибки индекс теста: 1 2`] = `Array []`; + +exports[`shorthand-property-no-redundant-values ошибки индекс теста: 2 1`] = ` +Array [ + Object { + "column": 4, + "endColumn": 25, + "endLine": 2, + "line": 2, + "rule": "shorthand-property-no-redundant-values", + "severity": "error", + "text": "Expected \\"1px 2px 1px\\" to be \\"1px 2px\\" (shorthand-property-no-redundant-values)", + }, +] +`; + +exports[`shorthand-property-no-redundant-values ошибки индекс теста: 2 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/string-no-newline.test.ts.snap b/tests/stylelint/__snapshots__/string-no-newline.test.ts.snap new file mode 100644 index 0000000..f1eca79 --- /dev/null +++ b/tests/stylelint/__snapshots__/string-no-newline.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`string-no-newline не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`string-no-newline не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`string-no-newline ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 7, + "endColumn": 9, + "endLine": 4, + "line": 3, + "rule": "string-no-newline", + "severity": "error", + "text": "Unexpected newline in string (string-no-newline)", + }, +] +`; + +exports[`string-no-newline ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/unit-no-unknown.test.ts.snap b/tests/stylelint/__snapshots__/unit-no-unknown.test.ts.snap new file mode 100644 index 0000000..212218d --- /dev/null +++ b/tests/stylelint/__snapshots__/unit-no-unknown.test.ts.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`unit-no-unknown ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 13, + "endColumn": 15, + "endLine": 2, + "line": 2, + "rule": "unit-no-unknown", + "severity": "error", + "text": "Unexpected unknown unit \\"ps\\" (unit-no-unknown)", + }, +] +`; + +exports[`unit-no-unknown ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/__snapshots__/value-keyword-case.test.ts.snap b/tests/stylelint/__snapshots__/value-keyword-case.test.ts.snap new file mode 100644 index 0000000..25109d2 --- /dev/null +++ b/tests/stylelint/__snapshots__/value-keyword-case.test.ts.snap @@ -0,0 +1,25 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`value-keyword-case не ошибки индекс теста: 0 1`] = `Array []`; + +exports[`value-keyword-case не ошибки индекс теста: 0 2`] = `Array []`; + +exports[`value-keyword-case не ошибки индекс теста: 1 1`] = `Array []`; + +exports[`value-keyword-case не ошибки индекс теста: 1 2`] = `Array []`; + +exports[`value-keyword-case ошибки индекс теста: 0 1`] = ` +Array [ + Object { + "column": 13, + "endColumn": 14, + "endLine": 2, + "line": 2, + "rule": "value-keyword-case", + "severity": "error", + "text": "Expected \\"Flex\\" to be \\"flex\\" (value-keyword-case)", + }, +] +`; + +exports[`value-keyword-case ошибки индекс теста: 0 2`] = `Array []`; diff --git a/tests/stylelint/at-rule-empty-line-before.test.ts b/tests/stylelint/at-rule-empty-line-before.test.ts new file mode 100644 index 0000000..4330fc3 --- /dev/null +++ b/tests/stylelint/at-rule-empty-line-before.test.ts @@ -0,0 +1,24 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('at-rule-empty-line-before', () => { + describe('ошибки', () => { + const cases = [ + `@charset "UTF-8"; +@import url(x.css); +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/at-rule-no-unknown.test.ts b/tests/stylelint/at-rule-no-unknown.test.ts new file mode 100644 index 0000000..4cc6e9e --- /dev/null +++ b/tests/stylelint/at-rule-no-unknown.test.ts @@ -0,0 +1,51 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('at-rule-no-unknown', () => { + describe('ошибки', () => { + const cases = [ + `@unknown { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `@charset "UTF-8"; + +@container { + color: #ccc; +} + +@media (hover: hover) { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/block-no-empty.test.ts b/tests/stylelint/block-no-empty.test.ts new file mode 100644 index 0000000..5d33cf2 --- /dev/null +++ b/tests/stylelint/block-no-empty.test.ts @@ -0,0 +1,44 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('block-no-empty', () => { + describe('ошибки', () => { + const cases = [ + `.class { +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/checker.ts b/tests/stylelint/checker.ts new file mode 100644 index 0000000..4a687ec --- /dev/null +++ b/tests/stylelint/checker.ts @@ -0,0 +1,8 @@ +import { LinterResult } from 'stylelint'; + +export function checker(result: LinterResult): void { + result.results.forEach((res) => { + expect(res.warnings).toMatchSnapshot(); + expect(res.deprecations).toMatchSnapshot(); + }); +} diff --git a/tests/stylelint/color-hex-length.test.ts b/tests/stylelint/color-hex-length.test.ts new file mode 100644 index 0000000..cd33d88 --- /dev/null +++ b/tests/stylelint/color-hex-length.test.ts @@ -0,0 +1,57 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('color-hex-length', () => { + describe('ошибки', () => { + const cases = [ + `.class { + color: #cccccc; +} +`, + `.class { + color: #ccccccaa; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + color: #ccc; +} +`, + `.class { + color: #ccca; +} +`, + `.class { + color: #a4a4a4; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/color-named.test.ts b/tests/stylelint/color-named.test.ts new file mode 100644 index 0000000..ff24f60 --- /dev/null +++ b/tests/stylelint/color-named.test.ts @@ -0,0 +1,25 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('color-names', () => { + describe('ошибки', () => { + const cases = [ + `.class { + color: red; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/color-no-invalid-hex.test.ts b/tests/stylelint/color-no-invalid-hex.test.ts new file mode 100644 index 0000000..361a3f3 --- /dev/null +++ b/tests/stylelint/color-no-invalid-hex.test.ts @@ -0,0 +1,45 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('color-no-invalid-hex', () => { + describe('ошибки', () => { + const cases = [ + `.class { + color: #y3; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/comment-empty-line-before.test.ts b/tests/stylelint/comment-empty-line-before.test.ts new file mode 100644 index 0000000..34b7bac --- /dev/null +++ b/tests/stylelint/comment-empty-line-before.test.ts @@ -0,0 +1,64 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('comment-empty-line-before', () => { + describe('ошибки', () => { + const cases = [ + `.class { + color: #ccc; +} +/* comment */ +`, + `.class { + color: #ccc; + /* comment */ +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + /* comment */ + color: #ccc; +} +`, + `/* comment */ +.class { + color: #ccc; +} +`, + ` +.class { + color: #ccc; +} + +/* comment */ +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/comment-no-empty.test.ts b/tests/stylelint/comment-no-empty.test.ts new file mode 100644 index 0000000..ca2be95 --- /dev/null +++ b/tests/stylelint/comment-no-empty.test.ts @@ -0,0 +1,41 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('comment-no-empty', () => { + describe('ошибки', () => { + const cases = [ + `/* */ +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `/* comment */ +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/comment-whitespace-inside.test.ts b/tests/stylelint/comment-whitespace-inside.test.ts new file mode 100644 index 0000000..0dc3b01 --- /dev/null +++ b/tests/stylelint/comment-whitespace-inside.test.ts @@ -0,0 +1,45 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('comment-whitespace-inside', () => { + describe('ошибки', () => { + const cases = [ + `/*comment*/ +`, + `/* comment*/ +`, + `/*comment */ +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `/* comment */ +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/custom-property-empty-line-before.test.ts b/tests/stylelint/custom-property-empty-line-before.test.ts new file mode 100644 index 0000000..fec72c8 --- /dev/null +++ b/tests/stylelint/custom-property-empty-line-before.test.ts @@ -0,0 +1,51 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('custom-property-empty-line-before', () => { + describe('ошибки', () => { + const cases = [ + `.class { + top: 10px; + --foo: #ccc; + --bar: #fff; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + top: 10px; + + --foo: #ccc; + + --bar: #fff; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/declaration-block-no-duplicate-properties.test.ts b/tests/stylelint/declaration-block-no-duplicate-properties.test.ts new file mode 100644 index 0000000..2ff8dda --- /dev/null +++ b/tests/stylelint/declaration-block-no-duplicate-properties.test.ts @@ -0,0 +1,52 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('declaration-block-no-duplicate-properties', () => { + describe('ошибки', () => { + const cases = [ + `.class { + font-size: 16px; + font-size: 16px; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + font-size: 16px; + font-size: 1rem; +} + +.class2 { + font-size: 16px; + font-size: 18px; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/declaration-block-no-shorthand-property-overrides.test.ts b/tests/stylelint/declaration-block-no-shorthand-property-overrides.test.ts new file mode 100644 index 0000000..c3d5d33 --- /dev/null +++ b/tests/stylelint/declaration-block-no-shorthand-property-overrides.test.ts @@ -0,0 +1,47 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('declaration-block-no-shorthand-property-overrides', () => { + describe('ошибки', () => { + const cases = [ + `.class { + background-repeat: repeat; + background: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + background: #ccc; + background-repeat: repeat; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/declaration-block-single-line-max-declarations.test.ts b/tests/stylelint/declaration-block-single-line-max-declarations.test.ts new file mode 100644 index 0000000..7966be9 --- /dev/null +++ b/tests/stylelint/declaration-block-single-line-max-declarations.test.ts @@ -0,0 +1,23 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('declaration-block-single-line-max-declarations', () => { + describe('ошибки', () => { + const cases = [ + `.class { color: #ccc; top: 0; } +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/declaration-empty-line-before.test.ts b/tests/stylelint/declaration-empty-line-before.test.ts new file mode 100644 index 0000000..0001215 --- /dev/null +++ b/tests/stylelint/declaration-empty-line-before.test.ts @@ -0,0 +1,67 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('declaration-empty-line-before', () => { + describe('ошибки', () => { + const cases = [ + `.class { + height: 1px; + + color: #ccc; +} +`, + `.class { + + height: 1px; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + height: 1px; + color: #ccc; +} +`, + `.class { + /* comment */ + height: 1px; + color: #ccc; +} +`, `.class { + height: 1px; + + /* comment */ + color: #ccc; +} +`, + `.class { height: 1px; } +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/declaration-no-important.test.ts b/tests/stylelint/declaration-no-important.test.ts new file mode 100644 index 0000000..9eedbf5 --- /dev/null +++ b/tests/stylelint/declaration-no-important.test.ts @@ -0,0 +1,25 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('declaration-no-important', () => { + describe('ошибки', () => { + const cases = [ + `.class { + color: #ccc !important; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/font-family-no-duplicate-names.test.ts b/tests/stylelint/font-family-no-duplicate-names.test.ts new file mode 100644 index 0000000..1654255 --- /dev/null +++ b/tests/stylelint/font-family-no-duplicate-names.test.ts @@ -0,0 +1,45 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('font-family-no-duplicate-names', () => { + describe('ошибки', () => { + const cases = [ + `.class { + font-family: Times, Times, serif; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + font-family: Times, serif; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/font-family-no-missing-generic-family-keyword.test.ts b/tests/stylelint/font-family-no-missing-generic-family-keyword.test.ts new file mode 100644 index 0000000..215cb9a --- /dev/null +++ b/tests/stylelint/font-family-no-missing-generic-family-keyword.test.ts @@ -0,0 +1,53 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('font-family-no-missing-generic-family-keyword', () => { + describe('ошибки', () => { + const cases = [ + `.class { + font-family: Arial; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + font-family: Arial, sans-serif; +} +`, + `.class { + font-family: cbuc-icons; +} +`, + `.class { + font-family: cbuc-icons24; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/function-linear-gradient-no-nonstandard-direction.test.ts b/tests/stylelint/function-linear-gradient-no-nonstandard-direction.test.ts new file mode 100644 index 0000000..c93bd53 --- /dev/null +++ b/tests/stylelint/function-linear-gradient-no-nonstandard-direction.test.ts @@ -0,0 +1,45 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('function-linear-gradient-no-nonstandard-direction', () => { + describe('ошибки', () => { + const cases = [ + `.class { + background: linear-gradient(top, #fff, #000); +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + background: linear-gradient(to top, #fff, #000); +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/function-name-case.test.ts b/tests/stylelint/function-name-case.test.ts new file mode 100644 index 0000000..d256d25 --- /dev/null +++ b/tests/stylelint/function-name-case.test.ts @@ -0,0 +1,25 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('function-name-case', () => { + describe('ошибки', () => { + const cases = [ + `.class { + transform: Translate(1, 1); +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/keyframe-declaration-no-important.test.ts b/tests/stylelint/keyframe-declaration-no-important.test.ts new file mode 100644 index 0000000..3e80a35 --- /dev/null +++ b/tests/stylelint/keyframe-declaration-no-important.test.ts @@ -0,0 +1,31 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('keyframe-declaration-no-important', () => { + describe('ошибки', () => { + const cases = [ + `@keyframes foo { + from { + opacity: 0; + } + + to { + opacity: 1 !important; + } +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/length-zero-no-unit.test.ts b/tests/stylelint/length-zero-no-unit.test.ts new file mode 100644 index 0000000..551a89d --- /dev/null +++ b/tests/stylelint/length-zero-no-unit.test.ts @@ -0,0 +1,45 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('length-zero-no-unit', () => { + describe('ошибки', () => { + const cases = [ + `.class { + height: 0px; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + height: 0; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/no-descending-specificity.test.ts b/tests/stylelint/no-descending-specificity.test.ts new file mode 100644 index 0000000..a3ffa06 --- /dev/null +++ b/tests/stylelint/no-descending-specificity.test.ts @@ -0,0 +1,53 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('no-descending-specificity', () => { + describe('ошибки', () => { + const cases = [ + `.parent .child { + color: #ccc; +} + +.child { + background: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.child { + background: #ccc; +} + +.parent .child { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/no-duplicate-at-import-rules.test.ts b/tests/stylelint/no-duplicate-at-import-rules.test.ts new file mode 100644 index 0000000..afbe899 --- /dev/null +++ b/tests/stylelint/no-duplicate-at-import-rules.test.ts @@ -0,0 +1,24 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('no-duplicate-at-import-rules', () => { + describe('ошибки', () => { + const cases = [ + `@import "a.css"; +@import "a.css"; +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/no-duplicate-selectors.test.ts b/tests/stylelint/no-duplicate-selectors.test.ts new file mode 100644 index 0000000..945eaa5 --- /dev/null +++ b/tests/stylelint/no-duplicate-selectors.test.ts @@ -0,0 +1,49 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('no-duplicate-selectors', () => { + delete config.rules['block-no-empty']; + + describe('ошибки', () => { + const cases = [ + `.foo {} +.bar {} +.foo {} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.foo {} + +@media (min-width: 10px) { + .foo {} +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/no-empty-source.test.ts b/tests/stylelint/no-empty-source.test.ts new file mode 100644 index 0000000..8fdf423 --- /dev/null +++ b/tests/stylelint/no-empty-source.test.ts @@ -0,0 +1,25 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('no-empty-source', () => { + describe('ошибки', () => { + const cases = [ + '', + ' ', + '\t\t', + '\n' + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/no-unknown-animations.test.ts b/tests/stylelint/no-unknown-animations.test.ts new file mode 100644 index 0000000..220fbcc --- /dev/null +++ b/tests/stylelint/no-unknown-animations.test.ts @@ -0,0 +1,49 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('no-unknown-animations', () => { + describe('ошибки', () => { + const cases = [ + `.class { + animation-name: fancy-slide; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + animation-name: fancy-slide; +} + +@keyframes fancy-slide { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/property-no-unknown.test.ts b/tests/stylelint/property-no-unknown.test.ts new file mode 100644 index 0000000..0f2b4d8 --- /dev/null +++ b/tests/stylelint/property-no-unknown.test.ts @@ -0,0 +1,46 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('property-no-unknown', () => { + describe('ошибки', () => { + const cases = [ + `.class { + heigth: 100px; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + container-type: inline-size; + container-name: sidebar; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/rule-empty-line-before.test.ts b/tests/stylelint/rule-empty-line-before.test.ts new file mode 100644 index 0000000..7b50bac --- /dev/null +++ b/tests/stylelint/rule-empty-line-before.test.ts @@ -0,0 +1,75 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('rule-empty-line-before', () => { + describe('ошибки', () => { + const cases = [ + `.class { + color: #ccc; +} +.class1 { + color: #ccc; +} +`, + `.class { + color: #fff; + .class { + color: #ccc; + } +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + color: #ccc; +} + +.class1 { + color: #ccc; +} +`, + `.class { + color: #ccc; +} + +/* comment */ +.class1 { + color: #ccc; +} +`, + `.class { + .class { + color: #ccc; + } + color: #fff; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/selector-max-id.test.ts b/tests/stylelint/selector-max-id.test.ts new file mode 100644 index 0000000..4a29a13 --- /dev/null +++ b/tests/stylelint/selector-max-id.test.ts @@ -0,0 +1,25 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('selector-max-id', () => { + describe('ошибки', () => { + const cases = [ + `#id { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/selector-max-type.test.ts b/tests/stylelint/selector-max-type.test.ts new file mode 100644 index 0000000..a88b85a --- /dev/null +++ b/tests/stylelint/selector-max-type.test.ts @@ -0,0 +1,25 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('selector-max-type', () => { + describe('ошибки', () => { + const cases = [ + `a { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/selector-max-universal.test.ts b/tests/stylelint/selector-max-universal.test.ts new file mode 100644 index 0000000..4c98329 --- /dev/null +++ b/tests/stylelint/selector-max-universal.test.ts @@ -0,0 +1,25 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('selector-max-universal', () => { + describe('ошибки', () => { + const cases = [ + `* { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/selector-pseudo-class-no-unknown.test.ts b/tests/stylelint/selector-pseudo-class-no-unknown.test.ts new file mode 100644 index 0000000..20c62be --- /dev/null +++ b/tests/stylelint/selector-pseudo-class-no-unknown.test.ts @@ -0,0 +1,45 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('selector-pseudo-class-no-unknown', () => { + describe('ошибки', () => { + const cases = [ + `.class:hoevr { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class:hover { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/selector-pseudo-element-colon-notation.test.ts b/tests/stylelint/selector-pseudo-element-colon-notation.test.ts new file mode 100644 index 0000000..78184c2 --- /dev/null +++ b/tests/stylelint/selector-pseudo-element-colon-notation.test.ts @@ -0,0 +1,45 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('selector-pseudo-element-colon-notation', () => { + describe('ошибки', () => { + const cases = [ + `.class:before { + content: '1'; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class::before { + content: '1'; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/selector-pseudo-element-no-unknown.test.ts b/tests/stylelint/selector-pseudo-element-no-unknown.test.ts new file mode 100644 index 0000000..6547d30 --- /dev/null +++ b/tests/stylelint/selector-pseudo-element-no-unknown.test.ts @@ -0,0 +1,45 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('selector-pseudo-element-no-unknown', () => { + describe('ошибки', () => { + const cases = [ + `.class::befroe { + content: '1'; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class::before { + content: '1'; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/selector-type-case.test.ts b/tests/stylelint/selector-type-case.test.ts new file mode 100644 index 0000000..9de63f3 --- /dev/null +++ b/tests/stylelint/selector-type-case.test.ts @@ -0,0 +1,45 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('selector-type-case', () => { + describe('ошибки', () => { + const cases = [ + `A { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `a { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/selector-type-no-unknown.test.ts b/tests/stylelint/selector-type-no-unknown.test.ts new file mode 100644 index 0000000..e74cae9 --- /dev/null +++ b/tests/stylelint/selector-type-no-unknown.test.ts @@ -0,0 +1,25 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('selector-type-no-unknown', () => { + describe('ошибки', () => { + const cases = [ + `unknown { + color: #ccc; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/shorthand-property-no-redundant-values.test.ts b/tests/stylelint/shorthand-property-no-redundant-values.test.ts new file mode 100644 index 0000000..d74263b --- /dev/null +++ b/tests/stylelint/shorthand-property-no-redundant-values.test.ts @@ -0,0 +1,57 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('shorthand-property-no-redundant-values', () => { + describe('ошибки', () => { + const cases = [ + `.class { + padding: 1px 1px 1px 1px; +} +`, + `.class { + padding: 1px 2px 1px 2px; +} +`, + `.class { + padding: 1px 2px 1px; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + padding: 1px; +} +`, + `.class { + padding: 1px 1px 1px 2px; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/string-no-newline.test.ts b/tests/stylelint/string-no-newline.test.ts new file mode 100644 index 0000000..0d86836 --- /dev/null +++ b/tests/stylelint/string-no-newline.test.ts @@ -0,0 +1,47 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('string-no-newline', () => { + describe('ошибки', () => { + const cases = [ + `.class::before { + content: + "first + second"; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class::before { + content: "first \\nsecond"; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/unit-no-unknown.test.ts b/tests/stylelint/unit-no-unknown.test.ts new file mode 100644 index 0000000..f66d934 --- /dev/null +++ b/tests/stylelint/unit-no-unknown.test.ts @@ -0,0 +1,25 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('unit-no-unknown', () => { + describe('ошибки', () => { + const cases = [ + `.class { + height: 1ps; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tests/stylelint/value-keyword-case.test.ts b/tests/stylelint/value-keyword-case.test.ts new file mode 100644 index 0000000..adcbb75 --- /dev/null +++ b/tests/stylelint/value-keyword-case.test.ts @@ -0,0 +1,55 @@ +import { lint } from 'stylelint'; +import {checker} from './checker'; +const config = require('../../stylelint/stylelint-config.json'); + +describe('value-keyword-case', () => { + describe('ошибки', () => { + const cases = [ + `.class { + display: Flex; +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); + + describe('не ошибки', () => { + const cases = [ + `.class { + display: flex; +} +`, + `.customClass { + display: flex; + + .class2 { + &:extend(.customClass) { + color: #ccc; + } + } +} +` + ]; + + cases.forEach((code, index) => { + it(`индекс теста: ${index}`, async () => { + const result = await lint({ + code, + config + }); + + checker(result); + }); + }); + }); +}); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..b30313a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es2017", + "noImplicitAny": true, + "declaration": false, + "sourceMap": false, + "strictNullChecks": true + }, + "include": [ + "index.ts" + ] +} diff --git a/tslib.d.ts b/tslib.d.ts new file mode 100644 index 0000000..e28256a --- /dev/null +++ b/tslib.d.ts @@ -0,0 +1,398 @@ +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ + +/** + * Used to shim class extends. + * + * @param d The derived class. + * @param b The base class. + */ +export declare function __extends(d: Function, b: Function): void; + +/** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * + * @param t The target object to copy to. + * @param sources One or more source objects from which to copy properties + */ +export declare function __assign(t: any, ...sources: any[]): any; + +/** + * Performs a rest spread on an object. + * + * @param t The source value. + * @param propertyNames The property names excluded from the rest spread. + */ +export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; + +/** + * Applies decorators to a target object + * + * @param decorators The set of decorators to apply. + * @param target The target object. + * @param key If specified, the own property to apply the decorators to. + * @param desc The property descriptor, defaults to fetching the descriptor from the target object. + * @experimental + */ +export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; + +/** + * Creates an observing function decorator from a parameter decorator. + * + * @param paramIndex The parameter index to apply the decorator to. + * @param decorator The parameter decorator to apply. Note that the return value is ignored. + * @experimental + */ +export declare function __param(paramIndex: number, decorator: Function): Function; + +/** + * Creates a decorator that sets metadata. + * + * @param metadataKey The metadata key + * @param metadataValue The metadata value + * @experimental + */ +export declare function __metadata(metadataKey: any, metadataValue: any): Function; + +/** + * Converts a generator function into a pseudo-async function, by treating each `yield` as an `await`. + * + * @param thisArg The reference to use as the `this` value in the generator function + * @param _arguments The optional arguments array + * @param P The optional promise constructor argument, defaults to the `Promise` property of the global object. + * @param generator The generator function + */ +export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; + +/** + * Creates an Iterator object using the body as the implementation. + * + * @param thisArg The reference to use as the `this` value in the function + * @param body The generator state-machine based implementation. + * + * @see [./docs/generator.md] + */ +export declare function __generator(thisArg: any, body: Function): any; + +/** + * Creates bindings for all enumerable properties of `m` on `exports` + * + * @param m The source object + * @param exports The `exports` object. + */ +export declare function __exportStar(m: any, o: any): void; + +/** + * Creates a value iterator from an `Iterable` or `ArrayLike` object. + * + * @param o The object. + * @throws {TypeError} If `o` is neither `Iterable`, nor an `ArrayLike`. + */ +export declare function __values(o: any): any; + +/** + * Reads values from an `Iterable` or `ArrayLike` object and returns the resulting array. + * + * @param o The object to read from. + * @param n The maximum number of arguments to read, defaults to `Infinity`. + */ +export declare function __read(o: any, n?: number): any[]; + +/** + * Creates an array from iterable spread. + * + * @param args The Iterable objects to spread. + * @deprecated since TypeScript 4.2 - Use `__spreadArray` + */ +export declare function __spread(...args: any[][]): any[]; + +/** + * Creates an array from array spread. + * + * @param args The ArrayLikes to spread into the resulting array. + * @deprecated since TypeScript 4.2 - Use `__spreadArray` + */ +export declare function __spreadArrays(...args: any[][]): any[]; + +/** + * Spreads the `from` array into the `to` array. + * + * @param pack Replace empty elements with `undefined`. + */ +export declare function __spreadArray(to: any[], from: any[], pack?: boolean): any[]; + +/** + * Creates an object that signals to `__asyncGenerator` that it shouldn't be yielded, + * and instead should be awaited and the resulting value passed back to the generator. + * + * @param v The value to await. + */ +export declare function __await(v: any): any; + +/** + * Converts a generator function into an async generator function, by using `yield __await` + * in place of normal `await`. + * + * @param thisArg The reference to use as the `this` value in the generator function + * @param _arguments The optional arguments array + * @param generator The generator function + */ +export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; + +/** + * Used to wrap a potentially async iterator in such a way so that it wraps the result + * of calling iterator methods of `o` in `__await` instances, and then yields the awaited values. + * + * @param o The potentially async iterator. + * @returns A synchronous iterator yielding `__await` instances on every odd invocation + * and returning the awaited `IteratorResult` passed to `next` every even invocation. + */ +export declare function __asyncDelegator(o: any): any; + +/** + * Creates a value async iterator from an `AsyncIterable`, `Iterable` or `ArrayLike` object. + * + * @param o The object. + * @throws {TypeError} If `o` is neither `AsyncIterable`, `Iterable`, nor an `ArrayLike`. + */ +export declare function __asyncValues(o: any): any; + +/** + * Creates a `TemplateStringsArray` frozen object from the `cooked` and `raw` arrays. + * + * @param cooked The cooked possibly-sparse array. + * @param raw The raw string content. + */ +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; + +/** + * Used to shim default and named imports in ECMAScript Modules transpiled to CommonJS. + * + * ```js + * import Default, { Named, Other } from "mod"; + * // or + * import { default as Default, Named, Other } from "mod"; + * ``` + * + * @param mod The CommonJS module exports object. + */ +export declare function __importStar(mod: T): T; + +/** + * Used to shim default imports in ECMAScript Modules transpiled to CommonJS. + * + * ```js + * import Default from "mod"; + * ``` + * + * @param mod The CommonJS module exports object. + */ +export declare function __importDefault(mod: T): T | { default: T }; + +/** + * Emulates reading a private instance field. + * + * @param receiver The instance from which to read the private field. + * @param state A WeakMap containing the private field value for an instance. + * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. + * + * @throws {TypeError} If `state` doesn't have an entry for `receiver`. + */ +export declare function __classPrivateFieldGet( + receiver: T, + state: { has(o: T): boolean, get(o: T): V | undefined }, + kind?: "f" +): V; + +/** + * Emulates reading a private static field. + * + * @param receiver The object from which to read the private static field. + * @param state The class constructor containing the definition of the static field. + * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. + * @param f The descriptor that holds the static field value. + * + * @throws {TypeError} If `receiver` is not `state`. + */ +export declare function __classPrivateFieldGet unknown, V>( + receiver: T, + state: T, + kind: "f", + f: { value: V } +): V; + +/** + * Emulates evaluating a private instance "get" accessor. + * + * @param receiver The instance on which to evaluate the private "get" accessor. + * @param state A WeakSet used to verify an instance supports the private "get" accessor. + * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. + * @param f The "get" accessor function to evaluate. + * + * @throws {TypeError} If `state` doesn't have an entry for `receiver`. + */ +export declare function __classPrivateFieldGet( + receiver: T, + state: { has(o: T): boolean }, + kind: "a", + f: () => V +): V; + +/** + * Emulates evaluating a private static "get" accessor. + * + * @param receiver The object on which to evaluate the private static "get" accessor. + * @param state The class constructor containing the definition of the static "get" accessor. + * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. + * @param f The "get" accessor function to evaluate. + * + * @throws {TypeError} If `receiver` is not `state`. + */ +export declare function __classPrivateFieldGet unknown, V>( + receiver: T, + state: T, + kind: "a", + f: () => V +): V; + +/** + * Emulates reading a private instance method. + * + * @param receiver The instance from which to read a private method. + * @param state A WeakSet used to verify an instance supports the private method. + * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. + * @param f The function to return as the private instance method. + * + * @throws {TypeError} If `state` doesn't have an entry for `receiver`. + */ +export declare function __classPrivateFieldGet unknown>( + receiver: T, + state: { has(o: T): boolean }, + kind: "m", + f: V +): V; + +/** + * Emulates reading a private static method. + * + * @param receiver The object from which to read the private static method. + * @param state The class constructor containing the definition of the static method. + * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. + * @param f The function to return as the private static method. + * + * @throws {TypeError} If `receiver` is not `state`. + */ +export declare function __classPrivateFieldGet unknown, V extends (...args: any[]) => unknown>( + receiver: T, + state: T, + kind: "m", + f: V +): V; + +/** + * Emulates writing to a private instance field. + * + * @param receiver The instance on which to set a private field value. + * @param state A WeakMap used to store the private field value for an instance. + * @param value The value to store in the private field. + * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. + * + * @throws {TypeError} If `state` doesn't have an entry for `receiver`. + */ +export declare function __classPrivateFieldSet( + receiver: T, + state: { has(o: T): boolean, set(o: T, value: V): unknown }, + value: V, + kind?: "f" +): V; + +/** + * Emulates writing to a private static field. + * + * @param receiver The object on which to set the private static field. + * @param state The class constructor containing the definition of the private static field. + * @param value The value to store in the private field. + * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. + * @param f The descriptor that holds the static field value. + * + * @throws {TypeError} If `receiver` is not `state`. + */ +export declare function __classPrivateFieldSet unknown, V>( + receiver: T, + state: T, + value: V, + kind: "f", + f: { value: V } +): V; + +/** + * Emulates writing to a private instance "set" accessor. + * + * @param receiver The instance on which to evaluate the private instance "set" accessor. + * @param state A WeakSet used to verify an instance supports the private "set" accessor. + * @param value The value to store in the private accessor. + * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. + * @param f The "set" accessor function to evaluate. + * + * @throws {TypeError} If `state` doesn't have an entry for `receiver`. + */ +export declare function __classPrivateFieldSet( + receiver: T, + state: { has(o: T): boolean }, + value: V, + kind: "a", + f: (v: V) => void +): V; + +/** + * Emulates writing to a private static "set" accessor. + * + * @param receiver The object on which to evaluate the private static "set" accessor. + * @param state The class constructor containing the definition of the static "set" accessor. + * @param value The value to store in the private field. + * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. + * @param f The "set" accessor function to evaluate. + * + * @throws {TypeError} If `receiver` is not `state`. + */ +export declare function __classPrivateFieldSet unknown, V>( + receiver: T, + state: T, + value: V, + kind: "a", + f: (v: V) => void +): V; + +/** + * Checks for the existence of a private field/method/accessor. + * + * @param state The class constructor containing the static member, or the WeakMap or WeakSet associated with a private instance member. + * @param receiver The object for which to test the presence of the private member. + */ +export declare function __classPrivateFieldIn( + state: (new (...args: any[]) => unknown) | { has(o: any): boolean }, + receiver: unknown, +): boolean; + +/** + * Creates a re-export binding on `object` with key `objectKey` that references `target[key]`. + * + * @param object The local `exports` object. + * @param target The object to re-export from. + * @param key The property key of `target` to re-export. + * @param objectKey The property key to re-export as. Defaults to `key`. + */ +export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; diff --git a/tslib.js b/tslib.js new file mode 100644 index 0000000..c3340c8 --- /dev/null +++ b/tslib.js @@ -0,0 +1,424 @@ +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + }; + + __runInitializers = function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; + }; + + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + + __setFunctionName = function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + }; + + __addDisposableResource = function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; + + __disposeResources = function (env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__esDecorate", __esDecorate); + exporter("__runInitializers", __runInitializers); + exporter("__propKey", __propKey); + exporter("__setFunctionName", __setFunctionName); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..5c7fcdd --- /dev/null +++ b/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "./tslint/index.json" +} diff --git a/tslint/custom-rules/docLibraryIncludesRule.js b/tslint/custom-rules/docLibraryIncludesRule.js new file mode 100644 index 0000000..3b9a234 --- /dev/null +++ b/tslint/custom-rules/docLibraryIncludesRule.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Rule = void 0; +const Lint = require("tslint"); +const ts = require("typescript"); +class Rule extends Lint.Rules.AbstractRule { + apply(sourceFile) { + return this.applyWithWalker(new DocLibraryIncludesWalker(sourceFile, this.getOptions())); + } +} +exports.Rule = Rule; +// The walker takes care of all the work. +class DocLibraryIncludesWalker extends Lint.RuleWalker { + walk(node) { + ts.forEachChild(node, (child) => { + if (child.jsDoc) { + const tags = child.jsDoc[0].tags; + let isLibary = false; + const includes = new Set(); + if (tags) { + tags.forEach((tag) => { + if (tag.tagName.escapedText === 'library') { + isLibary = true; + } + if (tag.tagName.escapedText === 'include') { + this.addFailure(this.createFailure(tag.getStart(), tag.getWidth(), 'Tag @include is not supported. Do you mean tag @includes?')); + } + if (tag.tagName.escapedText === 'includes') { + const parts = (tag.comment || '').split(' '); + if (parts.length !== 2) { + this.addFailure(this.createFailure(tag.getStart(), tag.getWidth(), 'Tag @includes has incorrect format. Usage: @includes Alias ClassName')); + } + const includeName = parts[0]; + if (isLibary && includes.has(includeName)) { + this.addFailure(this.createFailure(tag.getStart(), tag.getWidth(), `Tag @includes '${tag.comment}' is not unique in this library. Check all includes`)); + } + includes.add(includeName); + } + }); + } + } + }); + } +} diff --git a/tslint/custom-rules/docLibraryIncludesRule.ts b/tslint/custom-rules/docLibraryIncludesRule.ts new file mode 100644 index 0000000..6a904b6 --- /dev/null +++ b/tslint/custom-rules/docLibraryIncludesRule.ts @@ -0,0 +1,54 @@ +import * as Lint from 'tslint'; +import * as ts from 'typescript'; + +interface IJsDocNode extends ts.Node { + jsDoc: ts.NodeArray; +} + +interface ITagsNode extends ts.Node { + tags: ts.NodeArray; +} + +export class Rule extends Lint.Rules.AbstractRule { + apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + return this.applyWithWalker(new DocLibraryIncludesWalker(sourceFile, this.getOptions())); + } +} + +// The walker takes care of all the work. +class DocLibraryIncludesWalker extends Lint.RuleWalker { + walk(node: ts.Node): void { + ts.forEachChild(node, (child: IJsDocNode) => { + if (child.jsDoc) { + const tags = child.jsDoc[0].tags; + + let isLibary = false; + const includes = new Set(); + if (tags) { + tags.forEach((tag) => { + if (tag.tagName.escapedText === 'library') { + isLibary = true; + } + + if (tag.tagName.escapedText === 'include') { + this.addFailure(this.createFailure(tag.getStart(), tag.getWidth(), 'Tag @include is not supported. Do you mean tag @includes?')); + } + + if (tag.tagName.escapedText === 'includes') { + const parts = (tag.comment || '').split(' '); + if (parts.length !== 2) { + this.addFailure(this.createFailure(tag.getStart(), tag.getWidth(), 'Tag @includes has incorrect format. Usage: @includes Alias ClassName')); + } + + const includeName = parts[0]; + if (isLibary && includes.has(includeName)) { + this.addFailure(this.createFailure(tag.getStart(), tag.getWidth(), `Tag @includes '${tag.comment}' is not unique in this library. Check all includes`)); + } + includes.add(includeName); + } + }); + } + } + }); + } +} diff --git a/tslint/custom-rules/index.js b/tslint/custom-rules/index.js new file mode 100644 index 0000000..69a5d0e --- /dev/null +++ b/tslint/custom-rules/index.js @@ -0,0 +1 @@ +// For use node module resolution semantics diff --git a/tslint/custom-rules/index.ts b/tslint/custom-rules/index.ts new file mode 100644 index 0000000..69a5d0e --- /dev/null +++ b/tslint/custom-rules/index.ts @@ -0,0 +1 @@ +// For use node module resolution semantics diff --git a/tslint/custom-rules/tsconfig.json b/tslint/custom-rules/tsconfig.json new file mode 100644 index 0000000..b572c08 --- /dev/null +++ b/tslint/custom-rules/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "module": "CommonJS", + "target": "es6", + "types" : ["node"] + } +} \ No newline at end of file diff --git a/tslint/export.json b/tslint/export.json new file mode 100644 index 0000000..097bf1e --- /dev/null +++ b/tslint/export.json @@ -0,0 +1,3 @@ +{ + "extends": "saby-typescript/tslint.json" +} diff --git a/tslint/index.json b/tslint/index.json new file mode 100644 index 0000000..b71b0af --- /dev/null +++ b/tslint/index.json @@ -0,0 +1,111 @@ +{ + "extends": "tslint:recommended", + "rulesDirectory": "./custom-rules/", + "jsRules": true, + "rules": { + "doc-library-includes": true, + "ban-comma-operator": true, + "ban-ts-ignore": { + "severity": "warning" + }, + "ban-types": [true, + ["Deferred", "Use Promise instead."] + ], + "comment-format": { + "options": "check-space", + "severity": "warning" + }, + "indent": [true, "spaces", 4], + "max-classes-per-file": [true, 7, "exclude-class-expressions"], + "max-line-length": [ + true, { + "limit": 120, + "ignore-pattern": "^ +\\* " + } + ], + "member-access": [ + true, + "no-public" + ], + "member-ordering": { + "options": { + "order": [ + "instance-field", + "constructor", + "instance-method", + "static-field", + "static-method" + ] + }, + "severity": "warning" + + }, + "no-angle-bracket-type-assertion": { + "severity": "warning" + }, + "no-any": { + "severity": "warning" + }, + "no-conditional-assignment": { + "severity": "warning" + }, + "no-empty-interface": true, + "no-magic-numbers": { + "options": { + "allowed-numbers": [-1, 0, 1, 2] + }, + "severity": "warning" + }, + "no-namespace": true, + "no-non-null-assertion": true, + "no-parameter-reassignment": { + "severity": "warning" + }, + "no-reference": true, + "no-return-await": true, + "no-shadowed-variable": { + "severity": "warning" + }, + "no-this-assignment": { + "severity": "warning" + }, + "no-var-requires": true, + "object-literal-key-quotes": [true, "as-needed"], + "object-literal-sort-keys": false, + "only-arrow-functions": [true, "allow-declarations", "allow-named-functions"], + "ordered-imports": false, + "prefer-for-of": false, + "prefer-object-spread": true, + "quotemark": [true, "single", "avoid-escape", "avoid-template", "jsx-double"], + "semicolon": [true, "always", "ignore-bound-class-methods"], + "trailing-comma": [true, {"multiline": "never", "singleline": "never"}], + "typedef": [ + true, + "call-signature", + "parameter", + "property-declaration", + "member-variable-declaration" + ], + "typedef-whitespace": [true, { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + }, { + "call-signature": "onespace", + "index-signature": "onespace", + "parameter": "onespace", + "property-declaration": "onespace", + "variable-declaration": "onespace" + }], + "unified-signatures": true, + "variable-name": [ + true, + "ban-keywords", + "check-format", + "allow-pascal-case", + "allow-leading-underscore" + ] + } +} diff --git a/wasabyGlobalTypings.d.ts b/wasabyGlobalTypings.d.ts new file mode 100644 index 0000000..48f3d44 --- /dev/null +++ b/wasabyGlobalTypings.d.ts @@ -0,0 +1,47 @@ +declare module 'i18n!*' { + function rk(key: string, ctx?: string | number, num?: number, isTemplate?: boolean): string; + const module: typeof rk; + export = module; +} + +declare module 'wml!*' { + const module: any; + export = module; +} + +declare module 'tmpl!*' { + const module: any; + export = module; +} + +declare module 'html!*' { + const module: any; + export = module; +} + +declare module 'text!*' { + const module: any; + export = module; +} + +declare module 'css!*' { + const value: string; + export = value; +} + +declare module 'json!*' { + const value: any; + export = value; +} + +declare module 'optional!*' { + const module: any; + export = module; +} + +declare module 'browser!*' { + const value: any; + export = value; +} + +declare function setTestID(id: number): void;