docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s

This commit is contained in:
TanTan committed 2026-11-13 09:25:58 +08:00
1 parent f954252a34
commit e311ca3275
35554 files changed
+6229626 -4

No files matched your search

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=updateClassMetadataWithTypescriptParameterTypes.spec.d.ts.map
@@ -0,0 +1,82 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.1.1](https://github.com/inspect-js/which-boxed-primitive/compare/v1.1.0...v1.1.1) - 2024-12-15
### Commits
- [Deps] update `is-boolean-object`, `is-number-object`, `is-string`, `is-symbol` [`5266e0c`](https://github.com/inspect-js/which-boxed-primitive/commit/5266e0cb87a814e42b4e8de9574430d27e562070)
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `@types/tape` [`a660339`](https://github.com/inspect-js/which-boxed-primitive/commit/a66033981b3f2b4ba4261cf477fd5a6dc40b38d6)
## [v1.1.0](https://github.com/inspect-js/which-boxed-primitive/compare/v1.0.2...v1.1.0) - 2024-12-02
### Commits
- [actions] reuse common workflows [`893df44`](https://github.com/inspect-js/which-boxed-primitive/commit/893df44f4d4ad653878aa0b470fc3437f25ad240)
- [meta] use `npmignore` to autogenerate an npmignore file [`bab1ff8`](https://github.com/inspect-js/which-boxed-primitive/commit/bab1ff84d391d94a419bb22a0be3d589b16732a4)
- [Tests] use `es-value-fixtures` and `for-each` [`ecacfa0`](https://github.com/inspect-js/which-boxed-primitive/commit/ecacfa01438228830b77fc006e3d366c8227c2b3)
- [New] add types [`ab38e78`](https://github.com/inspect-js/which-boxed-primitive/commit/ab38e78885752258f1e90487f2793173a3e81e5e)
- [actions] split out node 10-20, and 20+ [`7ee9c3c`](https://github.com/inspect-js/which-boxed-primitive/commit/7ee9c3c27b31289db6970cb2024621cdef4dc5ae)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`142215a`](https://github.com/inspect-js/which-boxed-primitive/commit/142215aeb898604e356e46708a7fad0d1113d764)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `has-symbols`, `object-inspect`, `tape` [`3559371`](https://github.com/inspect-js/which-boxed-primitive/commit/3559371556c26688418e6ea06e52dfd51cce29e7)
- [actions] update rebase action to use reusable workflow [`928901a`](https://github.com/inspect-js/which-boxed-primitive/commit/928901a781ddcb75cec158f3d0a273100d8f3f80)
- [Deps] update `is-bigint`, `is-boolean-object`, `is-number-object`, `is-string`, `is-symbol` [`f7b14be`](https://github.com/inspect-js/which-boxed-primitive/commit/f7b14bed64b6f784221dfe229b583c512d2bcb2c)
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `npmignore`, `object-inspect`, `tape` [`5296738`](https://github.com/inspect-js/which-boxed-primitive/commit/5296738a192d9d006a5874dcc262080df108da62)
- [Deps] update `is-bigint`, `is-boolean-object`, `is-number-object`, `is-string`, `is-symbol` [`caa6d1c`](https://github.com/inspect-js/which-boxed-primitive/commit/caa6d1cb8e44c6b8100431dd643e9817f361921c)
- [meta] add missing `engines.node` [`ca40880`](https://github.com/inspect-js/which-boxed-primitive/commit/ca40880bb94282871229a7f1d678609b71f4d120)
- [Tests] replace `aud` with `npm audit` [`b0f4069`](https://github.com/inspect-js/which-boxed-primitive/commit/b0f40690697c2a963dd7100eec500f138a79f4ae)
- [Dev Deps] update `aud` [`8d0e336`](https://github.com/inspect-js/which-boxed-primitive/commit/8d0e336ee7385ed6a94d6362e62e25c54d155a2d)
- [Deps] update `is-number-object` [`eafcabf`](https://github.com/inspect-js/which-boxed-primitive/commit/eafcabf3f00c7d716bffdfc0ceeca62387349c7d)
- [Dev Deps] add missing peer dep [`ec4dd52`](https://github.com/inspect-js/which-boxed-primitive/commit/ec4dd520dbe77e33341d94479aec3b42817b4cbf)
## [v1.0.2](https://github.com/inspect-js/which-boxed-primitive/compare/v1.0.1...v1.0.2) - 2020-12-14
### Commits
- [Tests] use shared travis-ci configs [`8674582`](https://github.com/inspect-js/which-boxed-primitive/commit/86745829b6a92cff2cfb0d3c0414ec9afdc2a087)
- [Tests] migrate tests to Github Actions [`dff6643`](https://github.com/inspect-js/which-boxed-primitive/commit/dff6643405ba4d6dc6694a25904c8f72f273ece8)
- [meta] do not publish github action workflow files [`b26112a`](https://github.com/inspect-js/which-boxed-primitive/commit/b26112a4e4ac6beec8f54c734135dbf9e9ba16f9)
- [meta] make `auto-changelog` config consistent [`8d10175`](https://github.com/inspect-js/which-boxed-primitive/commit/8d10175171154cd6c8f8a016aa7fb71b5044acf6)
- [readme] fix repo URLs, remove defunct badges [`ab8db24`](https://github.com/inspect-js/which-boxed-primitive/commit/ab8db247573723dbcda68469118d08c7c2692c67)
- [Tests] run `nyc` on all tests; use `tape` runner [`7d084df`](https://github.com/inspect-js/which-boxed-primitive/commit/7d084dfc5251230e9399a81782c0b9d7ae5d1901)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`576f6f3`](https://github.com/inspect-js/which-boxed-primitive/commit/576f6f308aed35ef1d3392bb9472def59482ed13)
- [actions] add automatic rebasing / merge commit blocking [`97efa53`](https://github.com/inspect-js/which-boxed-primitive/commit/97efa53a307678323e63f576c07db9ff84846fd3)
- [actions] add "Allow Edits" workflow [`fb1b4f7`](https://github.com/inspect-js/which-boxed-primitive/commit/fb1b4f7cd753fcced74ac054b20c8b2bfafe7953)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `has-symbols`, `object-inspect`, `safe-publish-latest` [`1e03c61`](https://github.com/inspect-js/which-boxed-primitive/commit/1e03c6153693d385833acc15178f675e6ce5ddd0)
- [Deps] update `is-boolean-object`, `is-number-object`, `is-string`, `is-symbol` [`13673df`](https://github.com/inspect-js/which-boxed-primitive/commit/13673dff6e43f0a915377c3e5740ec24e86d6bb7)
- [Dev Deps] update `auto-changelog`, `in-publish`, `tape` [`65a0e15`](https://github.com/inspect-js/which-boxed-primitive/commit/65a0e155fc46a9237692233a51ec9573621135d2)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`f8a0afe`](https://github.com/inspect-js/which-boxed-primitive/commit/f8a0afea82938d64f3d2d240268afbd346d0c4da)
- [Deps] update `is-bigint`, `is-boolean-object` [`e7a1ce2`](https://github.com/inspect-js/which-boxed-primitive/commit/e7a1ce25371c00ee726f1c0cc5b6acf10d51ec50)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`e46f193`](https://github.com/inspect-js/which-boxed-primitive/commit/e46f193298b158db5c8aba889803513e4ee38957)
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`df3da14`](https://github.com/inspect-js/which-boxed-primitive/commit/df3da1424552a5d22e203a0abf1710106bfd4ae2)
- [Dev Deps] update `auto-changelog`; add `aud` [`e2e8a12`](https://github.com/inspect-js/which-boxed-primitive/commit/e2e8a12c6fbf8c48e760ea1d1ccd5e8d2d6fbf24)
- [meta] add `funding` field [`7df404b`](https://github.com/inspect-js/which-boxed-primitive/commit/7df404b20cd50b2b87e6645b130fefa8ee98810e)
- [Dev Deps] update `auto-changelog` [`0d6b76d`](https://github.com/inspect-js/which-boxed-primitive/commit/0d6b76dbbe760581fa86a0c3f254988fe5d27770)
- [Tests] only audit prod deps [`246151c`](https://github.com/inspect-js/which-boxed-primitive/commit/246151cc1407b3b1ef42014db993f62670bd82ff)
- [meta] fix changelog [`c2d1685`](https://github.com/inspect-js/which-boxed-primitive/commit/c2d16856deffbf86e0b5029e69b65d8aa758ec3d)
- [readme] Fix spelling error [`25fb2b5`](https://github.com/inspect-js/which-boxed-primitive/commit/25fb2b56e1f708c6364923e4bae384f818ecf57f)
## [v1.0.1](https://github.com/inspect-js/which-boxed-primitive/compare/v1.0.0...v1.0.1) - 2019-08-10
### Commits
- [meta] avoid running `safe-publish-latest` when not publishing [`df44b27`](https://github.com/inspect-js/which-boxed-primitive/commit/df44b27875a8f5c3c596663ecb4a063f9fc7bde3)
## v1.0.0 - 2019-08-10
### Commits
- [Tests] add `.travis.yml` [`764b0cf`](https://github.com/inspect-js/which-boxed-primitive/commit/764b0cf75f8d2b3a0ad2056de5f4ad85d5d1b765)
- Initial commit [`da7d068`](https://github.com/inspect-js/which-boxed-primitive/commit/da7d068913d591294bf155db5d438f7804d71b9a)
- readme [`1395bb2`](https://github.com/inspect-js/which-boxed-primitive/commit/1395bb27b72137ac01e48ee398a0f54e93fd87f5)
- [Tests] add tests [`0ff580f`](https://github.com/inspect-js/which-boxed-primitive/commit/0ff580f99579cd4424af7b814bd76fcb69a2b04e)
- implementation [`8811c32`](https://github.com/inspect-js/which-boxed-primitive/commit/8811c3262a57963634cdc83ceb5bb2c5e9ae4e7e)
- npm init [`cffdea9`](https://github.com/inspect-js/which-boxed-primitive/commit/cffdea9755eabfa2f9ec62a6fcbce0c28f04495b)
- [Tests] add `npm run lint` [`a8be993`](https://github.com/inspect-js/which-boxed-primitive/commit/a8be9933fec1b21267acd847df77f6438e07e3b9)
- [meta] add FUNDING.yml [`941258c`](https://github.com/inspect-js/which-boxed-primitive/commit/941258c70c9a397466e05b614126cb8c7be77b99)
- Only apps should have lockfiles [`6857316`](https://github.com/inspect-js/which-boxed-primitive/commit/68573165d8ce842cdf15d94af82f8cccb961b8cf)
- [Tests] use `npx aud` in `posttest` [`ee48a91`](https://github.com/inspect-js/which-boxed-primitive/commit/ee48a9144bea23bde5cc47788a54d5aa7969d489)
@@ -0,0 +1,9 @@
"use client";
import {
ButtonGroupProvider,
useButtonGroupContext
} from "./chunk-3SAWKTTV.mjs";
export {
ButtonGroupProvider,
useButtonGroupContext
};
@@ -0,0 +1,184 @@
var _typeof = require("./typeof.js")["default"];
function applyDecs2203Factory() {
function createAddInitializerMethod(e, t) {
return function (r) {
!function (e) {
if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
}(t), assertCallable(r, "An initializer"), e.push(r);
};
}
function memberDec(e, t, r, a, n, i, s, o) {
var c;
switch (n) {
case 1:
c = "accessor";
break;
case 2:
c = "method";
break;
case 3:
c = "getter";
break;
case 4:
c = "setter";
break;
default:
c = "field";
}
var l,
u,
f = {
kind: c,
name: s ? "#" + t : t,
"static": i,
"private": s
},
p = {
v: !1
};
0 !== n && (f.addInitializer = createAddInitializerMethod(a, p)), 0 === n ? s ? (l = r.get, u = r.set) : (l = function l() {
return this[t];
}, u = function u(e) {
this[t] = e;
}) : 2 === n ? l = function l() {
return r.value;
} : (1 !== n && 3 !== n || (l = function l() {
return r.get.call(this);
}), 1 !== n && 4 !== n || (u = function u(e) {
r.set.call(this, e);
})), f.access = l && u ? {
get: l,
set: u
} : l ? {
get: l
} : {
set: u
};
try {
return e(o, f);
} finally {
p.v = !0;
}
}
function assertCallable(e, t) {
if ("function" != typeof e) throw new TypeError(t + " must be a function");
}
function assertValidReturnValue(e, t) {
var r = _typeof(t);
if (1 === e) {
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init");
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0");
}
function applyMemberDec(e, t, r, a, n, i, s, o) {
var c,
l,
u,
f,
p,
d,
h = r[0];
if (s ? c = 0 === n || 1 === n ? {
get: r[3],
set: r[4]
} : 3 === n ? {
get: r[3]
} : 4 === n ? {
set: r[3]
} : {
value: r[3]
} : 0 !== n && (c = Object.getOwnPropertyDescriptor(t, a)), 1 === n ? u = {
get: c.get,
set: c.set
} : 2 === n ? u = c.value : 3 === n ? u = c.get : 4 === n && (u = c.set), "function" == typeof h) void 0 !== (f = memberDec(h, a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? l = f : 1 === n ? (l = f.init, p = f.get || u.get, d = f.set || u.set, u = {
get: p,
set: d
}) : u = f);else for (var v = h.length - 1; v >= 0; v--) {
var g;
void 0 !== (f = memberDec(h[v], a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? g = f : 1 === n ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = {
get: p,
set: d
}) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g)));
}
if (0 === n || 1 === n) {
if (void 0 === l) l = function l(e, t) {
return t;
};else if ("function" != typeof l) {
var y = l;
l = function l(e, t) {
for (var r = t, a = 0; a < y.length; a++) r = y[a].call(e, r);
return r;
};
} else {
var m = l;
l = function l(e, t) {
return m.call(e, t);
};
}
e.push(l);
}
0 !== n && (1 === n ? (c.get = u.get, c.set = u.set) : 2 === n ? c.value = u : 3 === n ? c.get = u : 4 === n && (c.set = u), s ? 1 === n ? (e.push(function (e, t) {
return u.get.call(e, t);
}), e.push(function (e, t) {
return u.set.call(e, t);
})) : 2 === n ? e.push(u) : e.push(function (e, t) {
return u.call(e, t);
}) : Object.defineProperty(t, a, c));
}
function pushInitializers(e, t) {
t && e.push(function (e) {
for (var r = 0; r < t.length; r++) t[r].call(e);
return e;
});
}
return function (e, t, r) {
var a = [];
return function (e, t, r) {
for (var a, n, i = new Map(), s = new Map(), o = 0; o < r.length; o++) {
var c = r[o];
if (Array.isArray(c)) {
var l,
u,
f = c[1],
p = c[2],
d = c.length > 3,
h = f >= 5;
if (h ? (l = t, 0 != (f -= 5) && (u = n = n || [])) : (l = t.prototype, 0 !== f && (u = a = a || [])), 0 !== f && !d) {
var v = h ? s : i,
g = v.get(p) || 0;
if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p);
!g && f > 2 ? v.set(p, f) : v.set(p, !0);
}
applyMemberDec(e, l, c, p, f, h, d, u);
}
}
pushInitializers(e, a), pushInitializers(e, n);
}(a, e, t), function (e, t, r) {
if (r.length > 0) {
for (var a = [], n = t, i = t.name, s = r.length - 1; s >= 0; s--) {
var o = {
v: !1
};
try {
var c = r[s](n, {
kind: "class",
name: i,
addInitializer: createAddInitializerMethod(a, o)
});
} finally {
o.v = !0;
}
void 0 !== c && (assertValidReturnValue(10, c), n = c);
}
e.push(n, function () {
for (var e = 0; e < a.length; e++) a[e].call(n);
});
}
}(a, e, r), a;
};
}
var applyDecs2203Impl;
function applyDecs2203(e, t, r) {
return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(e, t, r);
}
module.exports = applyDecs2203, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,30 @@
'use strict';
var $TypeError = require('es-errors/type');
var getIteratorMethod = require('../helpers/getIteratorMethod');
var AdvanceStringIndex = require('./AdvanceStringIndex');
var Call = require('./Call');
var GetMethod = require('./GetMethod');
var isObject = require('es-object-atoms/isObject');
var ES = {
AdvanceStringIndex: AdvanceStringIndex,
GetMethod: GetMethod
};
// https://262.ecma-international.org/6.0/#sec-getiterator
module.exports = function GetIterator(obj, method) {
var actualMethod = method;
if (arguments.length < 2) {
actualMethod = getIteratorMethod(ES, obj);
}
var iterator = Call(actualMethod, obj);
if (!isObject(iterator)) {
throw new $TypeError('iterator must return an object');
}
return iterator;
};
@@ -0,0 +1 @@
{"name":"@eslint/config-array","version":"0.21.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532092659,"integrity":"sha512-3Gto0TuM+VlkS5NfEZKwLHGqelz2U71DtEgPqJ7sjU0/FqInjsjDtAqx/bIzsxc6eP2DWQ1vc54Mno/1bCglVw==","mode":420,"size":11357},"dist/cjs/index.cjs":{"checkedAt":1794532092659,"integrity":"sha512-8itt2qJyJlDUeVBYuyH9SXrzoAaGkKloHT3HbgEhQMLECdgzvO567nV6hQ9xjenWhJ/9pPQ5aDsKE+SGqWs9Ww==","mode":420,"size":43643},"dist/cjs/std__path/posix.cjs":{"checkedAt":1794532092659,"integrity":"sha512-apgJc/Rv1tDlPAyKHjQcx/NMD+x4mlRp76907yCdVsT0g44OG3rMye9Wwr6g/cX1c8ws7IaKpnRVaJ7o62Orcg==","mode":420,"size":42927},"dist/cjs/std__path/windows.cjs":{"checkedAt":1794532092660,"integrity":"sha512-t2CDbaiLU86429ogrtaHEF4vcDr71uIXzYzVdHxIxwTg5YU0IEP9dplvKlFofU94HJCmmMsfLcCz0hc6DELjAw==","mode":420,"size":54475},"dist/cjs/index.d.cts":{"checkedAt":1794532092660,"integrity":"sha512-IjkzgP38rDmXZgcgEiiP5cETSVUiEYlyQoGPLyYSlt6XbJeqb+zWa7t4IwS6AQSPKdL0F2zjkiqCGlP/u6zGyw==","mode":420,"size":6749},"dist/cjs/types.cts":{"checkedAt":1794532092660,"integrity":"sha512-KBxAwAphUAAtZtnY24g93UpJKse5xdvjTv10G1SSCa0tcMshcHoq8NH7n4bNfMEr/MqjAznM0JBLYgfM1Uoxzw==","mode":420,"size":447},"dist/esm/index.js":{"checkedAt":1794532092660,"integrity":"sha512-7ddvyi6ocPN0JdUMV94fnEffVi0zcHdvDU0hnSTJnzyqeQzmUdCG8x8DibcTjbf5u19/o6lryB7KQXmAteKDxQ==","mode":420,"size":42967},"dist/esm/std__path/posix.js":{"checkedAt":1794532092661,"integrity":"sha512-O7PofVVdWTqPBQb/U3PraZPOakm+eTkL/MHn9NAXoOAxejLzud/9kQA3neLgrqFAYnm5PlfVsBpc0EATf7MTCg==","mode":420,"size":42504},"dist/esm/std__path/windows.js":{"checkedAt":1794532092661,"integrity":"sha512-VmnWb+kwumQfY2/0Fz2H6Ma1yf48gRjofDGmWehMt6BOStgnt8kduBMwQSzCLfeztUb2nF9Knn3MRv/fAytVPQ==","mode":420,"size":54052},"package.json":{"checkedAt":1794532092661,"integrity":"sha512-OOeiRRabMpavtXPivHkedhT3Rwk0RwV1xL+aij91GjRR7/6RTsQdNZB3Rq7rSaB8lZGPt3gjnjmPnAfMgYVvjA==","mode":420,"size":1919},"README.md":{"checkedAt":1794532092661,"integrity":"sha512-Cha4/uWi8NvkbKIbLOpMoCZcLigdGDjmG9Av478dgxLlqJ9ZJlkT8jBky/TOL5FpcS/iBaQ8EnK+amYmOVwD1A==","mode":420,"size":17362},"dist/esm/index.d.ts":{"checkedAt":1794532092661,"integrity":"sha512-Xy5eZG9DlEtNFraoizz1SfN0S1BniHWy3aaU3V1ifPbV9RCi5MwEH75ZMeNFg2vPWjOBORlLBKiXPMzBwRja3w==","mode":420,"size":6748},"dist/esm/types.d.ts":{"checkedAt":1794532092661,"integrity":"sha512-Nmd2o9BGAaDsuBe8Ov9mKeTZ6cy0G5o1ifOZ7ys28XGtHL6CMNCMDaedBLJ77vxrdw5NTOzWI0ssISkjYhZIew==","mode":420,"size":444},"dist/esm/types.ts":{"checkedAt":1794532092660,"integrity":"sha512-KBxAwAphUAAtZtnY24g93UpJKse5xdvjTv10G1SSCa0tcMshcHoq8NH7n4bNfMEr/MqjAznM0JBLYgfM1Uoxzw==","mode":420,"size":447}}}
@@ -0,0 +1,5 @@
import { createRequire } from 'node:module';
export const CWD = process.cwd();
export const cjsRequire = typeof require === 'undefined' ? createRequire(import.meta.url) : require;
export const EXTENSIONS = ['.ts', '.tsx', ...Object.keys(cjsRequire.extensions)];
//# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
{"name":"@react-types/overlays","version":"3.8.11","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532106869,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"package.json":{"checkedAt":1794532106869,"integrity":"sha512-2P7hKbc9e2BiDLuf9lmJcUGC7UsIdKQGS56Xh7hSd7J5kLbgKSBWw5E1OkWIhl22zW9YPSWDNOAao6nQ4m0HWA==","mode":420,"size":527},"README.md":{"checkedAt":1794532106870,"integrity":"sha512-j7JOylbFKDGc3Q3jWoxuL67gEo57GLudjCCqTBWaryGEMzWYaoPQkWdsc5xpdMwINW+SYXx9ftc3F+VDdYxVOA==","mode":420,"size":139},"src/index.d.ts":{"checkedAt":1794532106870,"integrity":"sha512-LX6bTmH5yk6fGItgzmod+VOw+2XBm1X53XTWXZtEEwJW/L5+JymB12t8wMFiDNUtfRcMR6P/kG6dCV3cina/oA==","mode":420,"size":3820}}}
@@ -0,0 +1,202 @@
/**
* @import {Event} from 'micromark-util-types'
*/
// Port of `edit_map.rs` from `markdown-rs`.
// This should move to `markdown-js` later.
// Deal with several changes in events, batching them together.
//
// Preferably, changes should be kept to a minimum.
// Sometimes, it’s needed to change the list of events, because parsing can be
// messy, and it helps to expose a cleaner interface of events to the compiler
// and other users.
// It can also help to merge many adjacent similar events.
// And, in other cases, it’s needed to parse subcontent: pass some events
// through another tokenizer and inject the result.
/**
* @typedef {[number, number, Array<Event>]} Change
* @typedef {[number, number, number]} Jump
*/
/**
* Tracks a bunch of edits.
*/
export class EditMap {
/**
* Create a new edit map.
*/
constructor() {
/**
* Record of changes.
*
* @type {Array<Change>}
*/
this.map = [];
}
/**
* Create an edit: a remove and/or add at a certain place.
*
* @param {number} index
* @param {number} remove
* @param {Array<Event>} add
* @returns {undefined}
*/
add(index, remove, add) {
addImplementation(this, index, remove, add);
}
// To do: add this when moving to `micromark`.
// /**
// * Create an edit: but insert `add` before existing additions.
// *
// * @param {number} index
// * @param {number} remove
// * @param {Array<Event>} add
// * @returns {undefined}
// */
// addBefore(index, remove, add) {
// addImplementation(this, index, remove, add, true)
// }
/**
* Done, change the events.
*
* @param {Array<Event>} events
* @returns {undefined}
*/
consume(events) {
this.map.sort(function (a, b) {
return a[0] - b[0];
});
/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
if (this.map.length === 0) {
return;
}
// To do: if links are added in events, like they are in `markdown-rs`,
// this is needed.
// // Calculate jumps: where items in the current list move to.
// /** @type {Array<Jump>} */
// const jumps = []
// let index = 0
// let addAcc = 0
// let removeAcc = 0
// while (index < this.map.length) {
// const [at, remove, add] = this.map[index]
// removeAcc += remove
// addAcc += add.length
// jumps.push([at, removeAcc, addAcc])
// index += 1
// }
//
// . shiftLinks(events, jumps)
let index = this.map.length;
/** @type {Array<Array<Event>>} */
const vecs = [];
while (index > 0) {
index -= 1;
vecs.push(events.slice(this.map[index][0] + this.map[index][1]), this.map[index][2]);
// Truncate rest.
events.length = this.map[index][0];
}
vecs.push(events.slice());
events.length = 0;
let slice = vecs.pop();
while (slice) {
for (const element of slice) {
events.push(element);
}
slice = vecs.pop();
}
// Truncate everything.
this.map.length = 0;
}
}
/**
* Create an edit.
*
* @param {EditMap} editMap
* @param {number} at
* @param {number} remove
* @param {Array<Event>} add
* @returns {undefined}
*/
function addImplementation(editMap, at, remove, add) {
let index = 0;
/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
if (remove === 0 && add.length === 0) {
return;
}
while (index < editMap.map.length) {
if (editMap.map[index][0] === at) {
editMap.map[index][1] += remove;
// To do: before not used by tables, use when moving to micromark.
// if (before) {
// add.push(...editMap.map[index][2])
// editMap.map[index][2] = add
// } else {
editMap.map[index][2].push(...add);
// }
return;
}
index += 1;
}
editMap.map.push([at, remove, add]);
}
// /**
// * Shift `previous` and `next` links according to `jumps`.
// *
// * This fixes links in case there are events removed or added between them.
// *
// * @param {Array<Event>} events
// * @param {Array<Jump>} jumps
// */
// function shiftLinks(events, jumps) {
// let jumpIndex = 0
// let index = 0
// let add = 0
// let rm = 0
// while (index < events.length) {
// const rmCurr = rm
// while (jumpIndex < jumps.length && jumps[jumpIndex][0] <= index) {
// add = jumps[jumpIndex][2]
// rm = jumps[jumpIndex][1]
// jumpIndex += 1
// }
// // Ignore items that will be removed.
// if (rm > rmCurr) {
// index += rm - rmCurr
// } else {
// // ?
// // if let Some(link) = &events[index].link {
// // if let Some(next) = link.next {
// // events[next].link.as_mut().unwrap().previous = Some(index + add - rm);
// // while jumpIndex < jumps.len() && jumps[jumpIndex].0 <= next {
// // add = jumps[jumpIndex].2;
// // rm = jumps[jumpIndex].1;
// // jumpIndex += 1;
// // }
// // events[index].link.as_mut().unwrap().next = Some(next + add - rm);
// // index = next;
// // continue;
// // }
// // }
// index += 1
// }
// }
// }
@@ -0,0 +1,16 @@
export { createNode } from './doc/createNode';
export type { CreateNodeContext } from './doc/createNode';
export { debug, warn } from './log';
export type { LogLevelId } from './log';
export { createPair } from './nodes/Pair';
export { toJS } from './nodes/toJS';
export type { ToJSContext } from './nodes/toJS';
export { findPair } from './nodes/YAMLMap';
export { map as mapTag } from './schema/common/map';
export { seq as seqTag } from './schema/common/seq';
export { string as stringTag } from './schema/common/string';
export { foldFlowLines } from './stringify/foldFlowLines';
export type { FoldOptions } from './stringify/foldFlowLines';
export type { StringifyContext } from './stringify/stringify';
export { stringifyNumber } from './stringify/stringifyNumber';
export { stringifyString } from './stringify/stringifyString';
@@ -0,0 +1 @@
export { _ as default } from "../esm/_initializer_define_property.js";
@@ -0,0 +1 @@
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_preParsePostFormat=e()}(this,(function(){"use strict";return function(t,e){var o=e.prototype.parse;e.prototype.parse=function(t){if("string"==typeof t.date){var e=this.$locale();t.date=e&&e.preparse?e.preparse(t.date):t.date}return o.bind(this)(t)};var r=e.prototype.format;e.prototype.format=function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];var a=r.call.apply(r,[this].concat(e)),p=this.$locale();return p&&p.postformat?p.postformat(a):a};var a=e.prototype.fromToBase;a&&(e.prototype.fromToBase=function(t,e,o,r){var p=this.$locale()||o.$locale();return a.call(this,t,e,o,r,p&&p.postformat)})}}));
@@ -0,0 +1 @@
{"version":3,"file":"isScopedBinding.js","sourceRoot":"","sources":["../../../../src/binding/calculations/isScopedBinding.ts"],"names":[],"mappings":";;AAOA,0CAOC;AAPD,SAAgB,eAAe,CAC7B,OAAmB;IAEnB,OAAO,CACJ,OAAgE,CAAC,KAAK;QACvE,SAAS,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,154 @@
'use strict'
const fs = require('../fs')
const path = require('path')
const util = require('util')
function getStats (src, dest, opts) {
const statFunc = opts.dereference
? (file) => fs.stat(file, { bigint: true })
: (file) => fs.lstat(file, { bigint: true })
return Promise.all([
statFunc(src),
statFunc(dest).catch(err => {
if (err.code === 'ENOENT') return null
throw err
})
]).then(([srcStat, destStat]) => ({ srcStat, destStat }))
}
function getStatsSync (src, dest, opts) {
let destStat
const statFunc = opts.dereference
? (file) => fs.statSync(file, { bigint: true })
: (file) => fs.lstatSync(file, { bigint: true })
const srcStat = statFunc(src)
try {
destStat = statFunc(dest)
} catch (err) {
if (err.code === 'ENOENT') return { srcStat, destStat: null }
throw err
}
return { srcStat, destStat }
}
function checkPaths (src, dest, funcName, opts, cb) {
util.callbackify(getStats)(src, dest, opts, (err, stats) => {
if (err) return cb(err)
const { srcStat, destStat } = stats
if (destStat) {
if (areIdentical(srcStat, destStat)) {
const srcBaseName = path.basename(src)
const destBaseName = path.basename(dest)
if (funcName === 'move' &&
srcBaseName !== destBaseName &&
srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
return cb(null, { srcStat, destStat, isChangingCase: true })
}
return cb(new Error('Source and destination must not be the same.'))
}
if (srcStat.isDirectory() && !destStat.isDirectory()) {
return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
}
if (!srcStat.isDirectory() && destStat.isDirectory()) {
return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`))
}
}
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
return cb(new Error(errMsg(src, dest, funcName)))
}
return cb(null, { srcStat, destStat })
})
}
function checkPathsSync (src, dest, funcName, opts) {
const { srcStat, destStat } = getStatsSync(src, dest, opts)
if (destStat) {
if (areIdentical(srcStat, destStat)) {
const srcBaseName = path.basename(src)
const destBaseName = path.basename(dest)
if (funcName === 'move' &&
srcBaseName !== destBaseName &&
srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
return { srcStat, destStat, isChangingCase: true }
}
throw new Error('Source and destination must not be the same.')
}
if (srcStat.isDirectory() && !destStat.isDirectory()) {
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
}
if (!srcStat.isDirectory() && destStat.isDirectory()) {
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)
}
}
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
throw new Error(errMsg(src, dest, funcName))
}
return { srcStat, destStat }
}
// recursively check if dest parent is a subdirectory of src.
// It works for all file types including symlinks since it
// checks the src and dest inodes. It starts from the deepest
// parent and stops once it reaches the src parent or the root path.
function checkParentPaths (src, srcStat, dest, funcName, cb) {
const srcParent = path.resolve(path.dirname(src))
const destParent = path.resolve(path.dirname(dest))
if (destParent === srcParent || destParent === path.parse(destParent).root) return cb()
fs.stat(destParent, { bigint: true }, (err, destStat) => {
if (err) {
if (err.code === 'ENOENT') return cb()
return cb(err)
}
if (areIdentical(srcStat, destStat)) {
return cb(new Error(errMsg(src, dest, funcName)))
}
return checkParentPaths(src, srcStat, destParent, funcName, cb)
})
}
function checkParentPathsSync (src, srcStat, dest, funcName) {
const srcParent = path.resolve(path.dirname(src))
const destParent = path.resolve(path.dirname(dest))
if (destParent === srcParent || destParent === path.parse(destParent).root) return
let destStat
try {
destStat = fs.statSync(destParent, { bigint: true })
} catch (err) {
if (err.code === 'ENOENT') return
throw err
}
if (areIdentical(srcStat, destStat)) {
throw new Error(errMsg(src, dest, funcName))
}
return checkParentPathsSync(src, srcStat, destParent, funcName)
}
function areIdentical (srcStat, destStat) {
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev
}
// return true if dest is a subdir of src, otherwise false.
// It only checks the path strings.
function isSrcSubdir (src, dest) {
const srcArr = path.resolve(src).split(path.sep).filter(i => i)
const destArr = path.resolve(dest).split(path.sep).filter(i => i)
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true)
}
function errMsg (src, dest, funcName) {
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`
}
module.exports = {
checkPaths,
checkPathsSync,
checkParentPaths,
checkParentPathsSync,
isSrcSubdir,
areIdentical
}
@@ -0,0 +1,46 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/text.ts
var text_exports = {};
__export(text_exports, {
safeAriaLabel: () => safeAriaLabel,
safeText: () => safeText
});
module.exports = __toCommonJS(text_exports);
var safeText = (text) => {
if ((text == null ? void 0 : text.length) <= 4)
return text;
return text == null ? void 0 : text.slice(0, 3);
};
var safeAriaLabel = (...texts) => {
let ariaLabel = " ";
for (const text of texts) {
if (typeof text === "string" && text.length > 0) {
ariaLabel = text;
break;
}
}
return ariaLabel;
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
safeAriaLabel,
safeText
});
@@ -0,0 +1,7 @@
import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
/**
* A version of `stylistic` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked-only}
*/
declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
export default _default;
@@ -0,0 +1,28 @@
/**
* Generate a list of every possible transform key.
*/
const transformPropOrder = [
"transformPerspective",
"x",
"y",
"z",
"translateX",
"translateY",
"translateZ",
"scale",
"scaleX",
"scaleY",
"rotate",
"rotateX",
"rotateY",
"rotateZ",
"skew",
"skewX",
"skewY",
];
/**
* A quick lookup for transform props.
*/
const transformProps = /*@__PURE__*/ (() => new Set(transformPropOrder))();
export { transformPropOrder, transformProps };
@@ -0,0 +1 @@
{"name":"tsyringe","version":"4.10.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532103164,"integrity":"sha512-fXmq5Mm+uFgRo+EiorEqrSMfUZ3RKkYaxJ1ShkpzWmsFomPUM8Ee3hQG0uSbbcYt04SH63vYwHnXGYogz4X8TQ==","mode":420,"size":1162},"dist/cjs/decorators/auto-injectable.js":{"checkedAt":1794532103164,"integrity":"sha512-yr0ri0u0OBLvDty7IDSdRvKqRnjD97uJQoBks48fDk4MOzn59wieOWDMpm847c3TNm5Idarx6dbeCEoyyUPBYQ==","mode":420,"size":2489},"dist/esm2015/decorators/auto-injectable.js":{"checkedAt":1794532103164,"integrity":"sha512-PhWu9ArA6L3zc32Q33px/a2LGYhOmuGpbfAyH4gWQVjn2Fb9Voo3BasoLyEGvwRfhM0DA1S4eWNU9a67wyuwXw==","mode":420,"size":2190},"dist/esm5/decorators/auto-injectable.js":{"checkedAt":1794532103164,"integrity":"sha512-3jr+EoAFRx20OL+uGqdMe+33KaF70KN3Bynq8VgarwEEEIjIxADTKx6S3mGilEJmn/zSOLhDPNiOq5K1iErwIw==","mode":420,"size":2471},"dist/cjs/providers/class-provider.js":{"checkedAt":1794532103165,"integrity":"sha512-j5+CrkSgKWna9wouu/oh7X4M42wcJuDFLu2l2p8FeNQN1uDn1l6gj732OlV9ykhfF+Bqg9iKkP9L2YCjMGcJTA==","mode":420,"size":225},"dist/esm2015/providers/class-provider.js":{"checkedAt":1794532103165,"integrity":"sha512-21ICT/edrTsCoRWV7DCoAdrVO41r8rjPIyHtLGwJAODJi8EeQMUMVRyzpXMrOr6xCXJjsClmrOyYVoLFH98mBw==","mode":420,"size":78},"dist/esm5/providers/class-provider.js":{"checkedAt":1794532103165,"integrity":"sha512-21ICT/edrTsCoRWV7DCoAdrVO41r8rjPIyHtLGwJAODJi8EeQMUMVRyzpXMrOr6xCXJjsClmrOyYVoLFH98mBw==","mode":420,"size":78},"dist/cjs/types/constructor.js":{"checkedAt":1794532103165,"integrity":"sha512-f2XGQDoj2T+xSOglmwEtZVKrO/8Xj0p9ap2c7A9gQp/BiZ45tLyozAivx12afHv9sT/DcspjyF6yKwNV601gAA==","mode":420,"size":77},"dist/esm2015/types/constructor.js":{"checkedAt":1794532103165,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"dist/esm5/types/constructor.js":{"checkedAt":1794532103165,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"dist/cjs/dependency-container.js":{"checkedAt":1794532103165,"integrity":"sha512-E2B/Ig5ABWZVkPDT7nP21NUE3grwMYVbm8HOGIyuuAxDSZBXwGphuT+kUSradTJx953Jhi/2HDWkZ77C8IhR/A==","mode":420,"size":14520},"dist/cjs/types/dependency-container.js":{"checkedAt":1794532103165,"integrity":"sha512-f2XGQDoj2T+xSOglmwEtZVKrO/8Xj0p9ap2c7A9gQp/BiZ45tLyozAivx12afHv9sT/DcspjyF6yKwNV601gAA==","mode":420,"size":77},"dist/esm2015/dependency-container.js":{"checkedAt":1794532103166,"integrity":"sha512-H1zozb4ZnGRwjXlfcBceIN1yLFIoScBbauzl+iPbqCzHDoasT0vUy+9o1znkpKqUYiVvxGkAJsdgQXUbXVqlmA==","mode":420,"size":13954},"dist/esm2015/types/dependency-container.js":{"checkedAt":1794532103166,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"dist/esm5/dependency-container.js":{"checkedAt":1794532103166,"integrity":"sha512-ZQV8tnxn2AjUFnww755/jVfGA/hSxtF6O0TQ5YxdlaaIauG/idnhXsU+n3kx625+FD3/ijOEDI2R71lDRQ8jxw==","mode":420,"size":18084},"dist/esm5/types/dependency-container.js":{"checkedAt":1794532103166,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"dist/cjs/types/dictionary.js":{"checkedAt":1794532103166,"integrity":"sha512-f2XGQDoj2T+xSOglmwEtZVKrO/8Xj0p9ap2c7A9gQp/BiZ45tLyozAivx12afHv9sT/DcspjyF6yKwNV601gAA==","mode":420,"size":77},"dist/esm2015/types/dictionary.js":{"checkedAt":1794532103166,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"dist/esm5/types/dictionary.js":{"checkedAt":1794532103166,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"dist/cjs/types/disposable.js":{"checkedAt":1794532103166,"integrity":"sha512-MZKsf1bfZ3PR9aycNPtR4lsJH3aAVTr+bkWUZUCSpmeD3a3MruLLbMD21eKaMXdrfPve81kKZVm5tr1mUxLj1g==","mode":420,"size":361},"dist/esm2015/types/disposable.js":{"checkedAt":1794532103166,"integrity":"sha512-1IFpz0yb7aE0pxw+PnMrHVAN+6/uEXwut3SMh9V+TDFrXF6ZKX3w3GftdWhJ0NZ9ZTyCW5x/BrcoXS9Z/vJxHQ==","mode":420,"size":223},"dist/esm5/types/disposable.js":{"checkedAt":1794532103166,"integrity":"sha512-fZcdlBlGIJYRca8bCXECR8AJSNbknoTRFo1gwfwSSM+hf08cxUUZqQnzhKu0mxYMTd4pYI7t//QgIFsQcqqfig==","mode":420,"size":221},"dist/cjs/error-helpers.js":{"checkedAt":1794532103167,"integrity":"sha512-O2Q0b1iCBMBRelJzWn5HJ6MAh9jamIJq50dw1fZG3ODen0Unuo0ugeXdREnt0TAKoiqGC6FAy7W3DYanNVRBUA==","mode":420,"size":808},"dist/esm2015/error-helpers.js":{"checkedAt":1794532103167,"integrity":"sha512-YSP1TclUFYIYQWYVnTKAsffv3hnlZ/jN37DMlrEVQbJ+NjF4G97oUQtDup82G4Tn+l6PV4hug2tTPLAmrx11QQ==","mode":420,"size":661},"dist/esm5/error-helpers.js":{"checkedAt":1794532103167,"integrity":"sha512-z9b39bMjV+auJPUsFWEvfhC82kNZ43vPmKdVIi22A6atBlKSFZcHu0HuUFY2NaKePNvR6DlLfnzW6Oj2Na3fhQ==","mode":420,"size":826},"dist/cjs/factories/factory-function.js":{"checkedAt"Line truncated
@@ -0,0 +1 @@
module.exports={C:{"47":0.00266,"48":0.00266,"57":0.00266,"72":0.00266,"81":0.00266,"115":0.05045,"127":0.00531,"128":0.00266,"132":0.00266,"134":0.00266,"139":0.00266,"140":0.00531,"141":0.00531,"142":0.01062,"143":0.14868,"144":0.1593,"145":0.00266,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 49 50 51 52 53 54 55 56 58 59 60 61 62 63 64 65 66 67 68 69 70 71 73 74 75 76 77 78 79 80 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 129 130 131 133 135 136 137 138 146 147 3.5 3.6"},D:{"37":0.12213,"43":0.03717,"48":0.00266,"50":0.00266,"58":0.00266,"61":0.00266,"64":0.00266,"68":0.01062,"70":0.02921,"71":0.00797,"76":0.00266,"78":0.0239,"79":0.01328,"80":0.00266,"83":0.00266,"84":0.00266,"85":0.00266,"86":0.00266,"87":0.00266,"88":0.00531,"89":0.00531,"91":0.01328,"92":0.00266,"94":0.00266,"95":0.00266,"96":0.00266,"97":0.00266,"101":0.00266,"102":0.00266,"103":0.00531,"104":0.01859,"105":0.00531,"106":0.00266,"108":0.00266,"109":0.09293,"110":0.00266,"111":0.02655,"112":0.00266,"114":0.01328,"116":0.00531,"117":0.00266,"118":0.00797,"119":0.00531,"120":0.00266,"121":0.00531,"122":0.00531,"123":0.00797,"124":0.00266,"125":0.03717,"126":0.02655,"127":0.01062,"129":0.00531,"130":0.00797,"131":0.03983,"132":0.01062,"133":0.00797,"134":0.04779,"135":0.00797,"136":0.0239,"137":0.0239,"138":0.11151,"139":0.06107,"140":0.48321,"141":0.75137,"142":0.01328,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 39 40 41 42 44 45 46 47 49 51 52 53 54 55 56 57 59 60 62 63 65 66 67 69 72 73 74 75 77 81 90 93 98 99 100 107 113 115 128 143 144 145"},F:{"49":0.00266,"79":0.00266,"83":0.00531,"86":0.00797,"87":0.00266,"88":0.00266,"89":0.03983,"90":0.0531,"91":0.3425,"92":0.44339,"93":0.00531,"95":0.00531,"119":0.00266,"120":0.01593,"121":0.00266,"122":0.11948,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 84 85 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"12":0.00266,"13":0.00266,"18":0.01062,"84":0.00531,"89":0.00531,"90":0.00531,"92":0.03186,"100":0.00531,"109":0.00266,"114":0.00266,"122":0.01062,"124":0.00266,"130":0.00266,"131":0.00266,"133":0.00266,"134":0.00266,"136":0.00266,"137":0.00266,"138":0.00797,"139":0.01859,"140":0.1062,"141":0.33453,"142":0.00266,_:"14 15 16 17 79 80 81 83 85 86 87 88 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 121 123 125 126 127 128 129 132 135"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 12.1 14.1 15.1 15.2-15.3 15.4 15.5 15.6 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.1 17.2 17.3 17.4 17.5 18.0 18.1 18.2 18.3 18.4 18.5-18.6 26.1 26.2","5.1":0.03452,"13.1":0.00266,"16.6":0.00266,"17.6":0.00266,"26.0":0.02124},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00013,"5.0-5.1":0,"6.0-6.1":0.0005,"7.0-7.1":0.00038,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00113,"10.0-10.2":0.00013,"10.3":0.00214,"11.0-11.2":0.03165,"11.3-11.4":0.00075,"12.0-12.1":0.00025,"12.2-12.5":0.00615,"13.0-13.1":0,"13.2":0.00063,"13.3":0.00025,"13.4-13.7":0.001,"14.0-14.4":0.00214,"14.5-14.8":0.00226,"15.0-15.1":0.00214,"15.2-15.3":0.00163,"15.4":0.00188,"15.5":0.00214,"15.6-15.8":0.02788,"16.0":0.00377,"16.1":0.00703,"16.2":0.00364,"16.3":0.00653,"16.4":0.00163,"16.5":0.00289,"16.6-16.7":0.0373,"17.0":0.00264,"17.1":0.00402,"17.2":0.00289,"17.3":0.00427,"17.4":0.00754,"17.5":0.01294,"17.6-17.7":0.03266,"18.0":0.00741,"18.1":0.01532,"18.2":0.00829,"18.3":0.02663,"18.4":0.01369,"18.5-18.6":0.69808,"26.0":0.08629,"26.1":0.00314},P:{"4":0.09061,"20":0.01007,"21":0.02013,"22":0.07047,"23":0.0604,"24":0.12081,"25":0.15101,"26":0.31209,"27":0.33223,"28":1.09735,"29":0.0604,_:"5.0-5.4 8.2 9.2 10.1 12.0 15.0","6.2-6.4":0.02013,"7.2-7.4":0.12081,"11.1-11.2":0.01007,"13.0":0.01007,"14.0":0.02013,"16.0":0.0302,"17.0":0.01007,"18.0":0.01007,"19.0":0.05034},I:{"0":0.25672,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00005,"4.4":0,"4.4.3-4.4.4":0.00013},K:{"0":5.54662,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.00531,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.17628},Q:{_:"14.9"},O:{"0":0.48477},H:{"0":0.3},L:{"0":84.51104}};
@@ -0,0 +1,48 @@
export enum PullMomentType {
REINSTALL = 0,
RESTART_FIRST_AIO = 1,
LOGIN_APP = 2,
SINGEL_PULL_NOTIFY = 3,
TRIGGER_SPECIFIC_EMOJI_RANDOM_RESULT = 4
}
export interface PullSysEmojisReq {
fetchAdvaceSource: boolean;
fetchBaseSource: boolean;
pullMoment: PullMomentType;
pullType: number;
refresh: boolean;
thresholdValue: number;
}
export enum BaseEmojiType {
NORMAL_EMOJI = 0,
SUPER_EMOJI = 1,
RANDOM_SUPER_EMOJI = 2,
CHAIN_SUPER_EMOJI = 3,
EMOJI_EMOJI = 4
}
export interface GetBaseEmojiPathReq {
emojiId: string;
type: BaseEmojiType;
}
export enum EmojiPanelCategory {
OTHER_PANEL = 0,
NORMAL_PANEL = 1,
SUPER_PANEL = 2,
RED_HEART_PANEL = 3
}
export interface DownloadBaseEmojiInfo {
baseResDownloadUrl: string;
advancedResDownloadUrl: string;
}
export interface DownloadBaseEmojiByUrlReq {
emojiId: string;
groupName: string;
panelCategory: EmojiPanelCategory;
downloadInfo: DownloadBaseEmojiInfo;
}
export interface DownloadBaseEmojiByIdReq {
emojiId: string;
groupName: string;
panelCategory: EmojiPanelCategory;
qzoneCode: string;
}
@@ -0,0 +1,15 @@
import { memoSupports } from './memo.mjs';
const supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {
try {
document
.createElement("div")
.animate({ opacity: 0 }, { easing: "linear(0, 1)" });
}
catch (e) {
return false;
}
return true;
}, "linearEasing");
export { supportsLinearEasing };
@@ -0,0 +1 @@
{"name":"parse-json","version":"5.2.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532093291,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1794532119878,"integrity":"sha512-m4apFJObCO7vNnjCJwgR28AcNX5CEvQj2mj7HgCk5D8gAMxkZEcwg/vlQtnqVxgC2k7iCvEYPUXUHAy1PklDBA==","mode":420,"size":1330},"package.json":{"checkedAt":1794532119878,"integrity":"sha512-FM1WEcJx/OUyJ0EolLlwl/jaBzAbqaNAGYAAQ6bYERtjB+dXD/blFSDAWy9UllXFOZgHNBQ/VKiR1HZ3YVMcmw==","mode":420,"size":825},"readme.md":{"checkedAt":1794532119878,"integrity":"sha512-bOhYOa+qQJC09Yzu8g5RVpvpvFC0gFpLnjlegxDyYfjHwKVQWBvjWEbVdMOD/HAP8BoBc0pTl/3SgnipWNqcaA==","mode":420,"size":2137}}}
@@ -0,0 +1,100 @@
{
"name": "globals",
"version": "15.15.0",
"description": "Global identifiers from different JavaScript environments",
"license": "MIT",
"repository": "sindresorhus/globals",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"sideEffects": false,
"engines": {
"node": ">=18"
},
"scripts": {
"test": "npm run build && xo && ava && tsd",
"prepare": "npm run build",
"update": "node scripts/update.mjs",
"update:browser": "node scripts/update.mjs --environment=browser",
"update:builtin": "node scripts/update.mjs --environment=builtin",
"update:nodeBuiltin": "node scripts/update.mjs --environment=nodeBuiltin",
"update:worker": "node scripts/update.mjs --environment=worker",
"update:shelljs": "node scripts/update.mjs --environment=shelljs",
"update:jest": "node scripts/update.mjs --environment=jest",
"update:vitest": "node scripts/update.mjs --environment=vitest",
"build": "run-s build:data build:types",
"build:data": "node scripts/generate-data.mjs",
"build:types": "node scripts/generate-types.mjs"
},
"files": [
"index.js",
"index.d.ts",
"globals.json"
],
"keywords": [
"globals",
"global",
"identifiers",
"variables",
"vars",
"jshint",
"eslint",
"environments"
],
"devDependencies": {
"@vitest/eslint-plugin": "^1.1.30",
"ava": "^6.1.3",
"cheerio": "^1.0.0-rc.12",
"eslint-plugin-jest": "^28.8.3",
"execa": "^9.4.0",
"get-port": "^7.1.0",
"npm-run-all2": "^6.2.3",
"outdent": "^0.8.0",
"puppeteer": "^23.4.1",
"shelljs": "^0.8.5",
"tsd": "^0.31.2",
"type-fest": "^4.26.1",
"xo": "^0.59.3"
},
"xo": {
"rules": {
"unicorn/prefer-module": "off"
},
"overrides": [
{
"files": [
"data/*.mjs"
],
"rules": {
"import/no-anonymous-default-export": "off",
"camelcase": "off",
"unicorn/filename-case": [
"error",
{
"cases": {
"camelCase": true,
"kebabCase": true
}
}
]
}
},
{
"files": [
"scripts/*.mjs"
],
"rules": {
"n/no-unsupported-features/node-builtins": "off"
}
}
]
},
"tsd": {
"compilerOptions": {
"resolveJsonModule": true
}
}
}
@@ -0,0 +1 @@
{"name":"@eslint-community/eslint-utils","version":"4.9.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532092579,"integrity":"sha512-mU2zG37iToppUpJAeVzAygm/RjK7uiIHsBwn5ymHYdwCyKfYX1/ZNQTRdjEbLPtQXuiXKulo9U8sJqWe6Y7Iug==","mode":420,"size":1071},"index.js":{"checkedAt":1794532092579,"integrity":"sha512-5mV0Fqj17dl27EaVtOU5X++4xKBX1njIh200hMg2fC+vgcInQqWJtv2oyqgVe2BFjzXswTUJPRTBA62gU3drOg==","mode":420,"size":88194},"package.json":{"checkedAt":1794532092579,"integrity":"sha512-c80prSyTcoxoNp+n4PR3BEeFrBpLkv5sBuLeZsJBR0DoCFEW9D75WohoZIzhVJpEBkWl9k49XJVHH+/fIySvEw==","mode":420,"size":3064},"index.js.map":{"checkedAt":1794532092580,"integrity":"sha512-GNLx3aUyXd7IBUO0PH1/mNV+G28JmtU86QLACarTQk1j/E2gRhkXU4+nsoDzdEB+w4rUMDkOErpzUKHMdHhXhQ==","mode":420,"size":152084},"index.mjs.map":{"checkedAt":1794532092580,"integrity":"sha512-3jQUGigw4ECejgc5L3YDV/uDNxXOT/kYEm2hP/EPTI7Ar51Z/bDo5P0NVcyVl89fpsb5ffdr5+mnNtrMPqfSIg==","mode":420,"size":152024},"README.md":{"checkedAt":1794532092580,"integrity":"sha512-uk7PMVenw+e72tuY7SKWCOFJcjZdmC5UbMiJUhEhUq5favRwqBG8ym2PP9WRdPCf5B4TXomdso7TtfT941/VWA==","mode":420,"size":1684},"index.mjs":{"checkedAt":1794532092581,"integrity":"sha512-3dTYafqFVO5R0w/isNC0s8oeGgIRizSbK53Muy2ODxp9zFp7H2om4iIsE4JPsSf4Lh19gE4nu+3obEjbl97XRA==","mode":420,"size":87069},"index.d.mts":{"checkedAt":1794532092581,"integrity":"sha512-HZeZRi2OiHRvkm4a+CqOl0CbinVuNdqGJBdYkJ8RceNgjEkldt9QOnL+Po3Zcs/fp1QdzmDGuz31V2D8DOR3SQ==","mode":420,"size":9832},"index.d.ts":{"checkedAt":1794532092581,"integrity":"sha512-HZeZRi2OiHRvkm4a+CqOl0CbinVuNdqGJBdYkJ8RceNgjEkldt9QOnL+Po3Zcs/fp1QdzmDGuz31V2D8DOR3SQ==","mode":420,"size":9832}}}
@@ -0,0 +1,29 @@
/**
* @author Yosuke Ota <https://github.com/ota-meshi>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
docs: {
description: "disallow `import.meta` meta property.",
category: "ES2020",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-import-meta.html",
},
fixable: null,
messages: {
forbidden: "ES2020 'import.meta' meta property is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"MetaProperty[meta.name='import'][property.name='meta']"(node) {
context.report({ node, messageId: "forbidden" })
},
}
},
}
@@ -0,0 +1,14 @@
import { InstanceContext, NapCatCore } from '../index';
export declare class NTQQSystemApi {
context: InstanceContext;
core: NapCatCore;
constructor(context: InstanceContext, core: NapCatCore);
hasOtherRunningQQProcess(): Promise<boolean>;
ocrImage(filePath: string): Promise<import("../index").GeneralCallResult>;
translateEnWordToZn(words: string[]): Promise<import("../index").GeneralCallResult & {
words: string[];
}>;
getOnlineDev(): Promise<void>;
getArkJsonCollection(): Promise<unknown>;
bootMiniApp(appFile: string, params: string): Promise<unknown>;
}
@@ -0,0 +1,4 @@
function _write_only_error(name) {
throw new TypeError("\"" + name + "\" is write-only");
}
export { _write_only_error as _ };
@@ -0,0 +1 @@
{"version":3,"file":"ScopedBinding.d.ts","sourceRoot":"","sources":["../../../../src/binding/models/ScopedBinding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,aAAa,CAC5B,KAAK,SAAS,WAAW,EACzB,MAAM,SAAS,YAAY,EAC3B,UAAU,CACV,SAAQ,WAAW,CAAC,KAAK,EAAE,UAAU,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,YAAY,EAAE,iBAAiB,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;IACjE,QAAQ,CAAC,cAAc,EAAE,mBAAmB,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;IACrE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,18 @@
"use strict";
var __createBinding = (this && this.__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];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./patterns"), exports);
@@ -0,0 +1,66 @@
export { default as chunk } from './chunk.js';
export { default as compact } from './compact.js';
export { default as concat } from './concat.js';
export { default as difference } from './difference.js';
export { default as differenceBy } from './differenceBy.js';
export { default as differenceWith } from './differenceWith.js';
export { default as drop } from './drop.js';
export { default as dropRight } from './dropRight.js';
export { default as dropRightWhile } from './dropRightWhile.js';
export { default as dropWhile } from './dropWhile.js';
export { default as fill } from './fill.js';
export { default as findIndex } from './findIndex.js';
export { default as findLastIndex } from './findLastIndex.js';
export { default as first } from './first.js';
export { default as flatten } from './flatten.js';
export { default as flattenDeep } from './flattenDeep.js';
export { default as flattenDepth } from './flattenDepth.js';
export { default as fromPairs } from './fromPairs.js';
export { default as head } from './head.js';
export { default as indexOf } from './indexOf.js';
export { default as initial } from './initial.js';
export { default as intersection } from './intersection.js';
export { default as intersectionBy } from './intersectionBy.js';
export { default as intersectionWith } from './intersectionWith.js';
export { default as join } from './join.js';
export { default as last } from './last.js';
export { default as lastIndexOf } from './lastIndexOf.js';
export { default as nth } from './nth.js';
export { default as pull } from './pull.js';
export { default as pullAll } from './pullAll.js';
export { default as pullAllBy } from './pullAllBy.js';
export { default as pullAllWith } from './pullAllWith.js';
export { default as pullAt } from './pullAt.js';
export { default as remove } from './remove.js';
export { default as reverse } from './reverse.js';
export { default as slice } from './slice.js';
export { default as sortedIndex } from './sortedIndex.js';
export { default as sortedIndexBy } from './sortedIndexBy.js';
export { default as sortedIndexOf } from './sortedIndexOf.js';
export { default as sortedLastIndex } from './sortedLastIndex.js';
export { default as sortedLastIndexBy } from './sortedLastIndexBy.js';
export { default as sortedLastIndexOf } from './sortedLastIndexOf.js';
export { default as sortedUniq } from './sortedUniq.js';
export { default as sortedUniqBy } from './sortedUniqBy.js';
export { default as tail } from './tail.js';
export { default as take } from './take.js';
export { default as takeRight } from './takeRight.js';
export { default as takeRightWhile } from './takeRightWhile.js';
export { default as takeWhile } from './takeWhile.js';
export { default as union } from './union.js';
export { default as unionBy } from './unionBy.js';
export { default as unionWith } from './unionWith.js';
export { default as uniq } from './uniq.js';
export { default as uniqBy } from './uniqBy.js';
export { default as uniqWith } from './uniqWith.js';
export { default as unzip } from './unzip.js';
export { default as unzipWith } from './unzipWith.js';
export { default as without } from './without.js';
export { default as xor } from './xor.js';
export { default as xorBy } from './xorBy.js';
export { default as xorWith } from './xorWith.js';
export { default as zip } from './zip.js';
export { default as zipObject } from './zipObject.js';
export { default as zipObjectDeep } from './zipObjectDeep.js';
export { default as zipWith } from './zipWith.js';
export { default } from './array.default.js';
@@ -0,0 +1,6 @@
import type { AttestationFormatVerifierOpts } from '../verifyRegistrationResponse.js';
/**
* Verify an attestation response with fmt 'fido-u2f'
*/
export declare function verifyAttestationFIDOU2F(options: AttestationFormatVerifierOpts): Promise<boolean>;
//# sourceMappingURL=verifyAttestationFIDOU2F.d.ts.map
@@ -0,0 +1,88 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
// Portions of the code in this file are based on code from ICU.
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
import {AnyCalendarDate} from '../types';
import {CalendarDate} from '../CalendarDate';
import {fromExtendedYear, getExtendedYear, GregorianCalendar} from './GregorianCalendar';
import {Mutable} from '../utils';
const TAIWAN_ERA_START = 1911;
function gregorianYear(date: AnyCalendarDate) {
return date.era === 'minguo'
? date.year + TAIWAN_ERA_START
: 1 - date.year + TAIWAN_ERA_START;
}
function gregorianToTaiwan(year: number): [string, number] {
let y = year - TAIWAN_ERA_START;
if (y > 0) {
return ['minguo', y];
} else {
return ['before_minguo', 1 - y];
}
}
/**
* The Taiwanese calendar is the same as the Gregorian calendar, but years
* are numbered starting from 1912 (Gregorian). Two eras are supported:
* 'before_minguo' and 'minguo'.
*/
export class TaiwanCalendar extends GregorianCalendar {
identifier = 'roc'; // Republic of China
fromJulianDay(jd: number): CalendarDate {
let date = super.fromJulianDay(jd);
let extendedYear = getExtendedYear(date.era, date.year);
let [era, year] = gregorianToTaiwan(extendedYear);
return new CalendarDate(this, era, year, date.month, date.day);
}
toJulianDay(date: AnyCalendarDate) {
return super.toJulianDay(toGregorian(date));
}
getEras() {
return ['before_minguo', 'minguo'];
}
balanceDate(date: Mutable<AnyCalendarDate>) {
let [era, year] = gregorianToTaiwan(gregorianYear(date));
date.era = era;
date.year = year;
}
isInverseEra(date: AnyCalendarDate): boolean {
return date.era === 'before_minguo';
}
getDaysInMonth(date: AnyCalendarDate): number {
return super.getDaysInMonth(toGregorian(date));
}
getYearsInEra(date: AnyCalendarDate): number {
return date.era === 'before_minguo' ? 9999 : 9999 - TAIWAN_ERA_START;
}
}
function toGregorian(date: AnyCalendarDate) {
let [era, year] = fromExtendedYear(gregorianYear(date));
return new CalendarDate(
era,
year,
date.month,
date.day
);
}
@@ -0,0 +1,77 @@
/* eslint-disable node/no-deprecated-api */
'use strict'
var buffer = require('buffer')
var Buffer = buffer.Buffer
var safer = {}
var key
for (key in buffer) {
if (!buffer.hasOwnProperty(key)) continue
if (key === 'SlowBuffer' || key === 'Buffer') continue
safer[key] = buffer[key]
}
var Safer = safer.Buffer = {}
for (key in Buffer) {
if (!Buffer.hasOwnProperty(key)) continue
if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue
Safer[key] = Buffer[key]
}
safer.Buffer.prototype = Buffer.prototype
if (!Safer.from || Safer.from === Uint8Array.from) {
Safer.from = function (value, encodingOrOffset, length) {
if (typeof value === 'number') {
throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value)
}
if (value && typeof value.length === 'undefined') {
throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)
}
return Buffer(value, encodingOrOffset, length)
}
}
if (!Safer.alloc) {
Safer.alloc = function (size, fill, encoding) {
if (typeof size !== 'number') {
throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size)
}
if (size < 0 || size >= 2 * (1 << 30)) {
throw new RangeError('The value "' + size + '" is invalid for option "size"')
}
var buf = Buffer(size)
if (!fill || fill.length === 0) {
buf.fill(0)
} else if (typeof encoding === 'string') {
buf.fill(fill, encoding)
} else {
buf.fill(fill)
}
return buf
}
}
if (!safer.kStringMaxLength) {
try {
safer.kStringMaxLength = process.binding('buffer').kStringMaxLength
} catch (e) {
// we can't determine kStringMaxLength in environments where process.binding
// is unsupported, so let's not set it
}
}
if (!safer.constants) {
safer.constants = {
MAX_LENGTH: safer.kMaxLength
}
if (safer.kStringMaxLength) {
safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength
}
}
module.exports = safer
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K wC","2340":"D E F A B"},B:{"2":"C L M G N O P","1025":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC 0C","513":"8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b","545":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 1C"},D:{"2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB","1025":"0 1 2 3 4 5 mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"A B C L M G aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB 2C ZC 3C","164":"K","4644":"D E F 4C 5C 6C"},F:{"2":"6 7 8 9 F B G N O P aB AB BB CB DB FD GD HD ID NC uC","545":"C JD OC","1025":"0 1 2 3 4 5 EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{"1":"RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC","4260":"LD MD","4644":"E ND OD PD QD"},H:{"2":"hD"},I:{"2":"TC J iD jD kD lD vC mD nD","1025":"I"},J:{"2":"D","4260":"A"},K:{"2":"A B NC uC","545":"C OC","1025":"H"},L:{"1025":"I"},M:{"1":"MC"},N:{"2340":"A B"},O:{"1025":"PC"},P:{"1025":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1025":"zD"},R:{"1025":"0D"},S:{"1":"2D","4097":"1D"}},B:4,C:"Crisp edges/pixelated images",D:true};
@@ -0,0 +1,422 @@
flf2a$ 4 3 10 -1 13 1
mshebrew210.flf by Michael 'msh210' Hamm 2-5 Nov 2000 for FIGWin.
Copyright (c) 2000 Michael Hamm. Note: uses Gedaliah Friedenberg's
Jerusalem font's keyboard map. www.crosswinds.net/~msh210/ has
msh210 contact info. Okay to modify this font iff modifier's name
is on a comment line. msh210's first font: have heart, suggestions
Keyboard map (see note above):
alef = t | vav = u | chaf = f | nun = b | fe = p | kuf = e
ves = c | zayin = z | `final = l | `final = i | `final = ; | resh = r
gimel = d | ches = j | lamed = k | samach = x | tzadi = m | shin = a
daled = s | tes = y | mem = n | ayin = g | `final = . | saf = ,
he = v | yud = h | `final = o | period = /
$@
$@
$@
$@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
|""|@
_| |@
@@
@
@
@
@@
@
\ |@
\/ @
$\ @@
@
@
o@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
["|@
|@
|@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
|/ |@
|_/ @
@@
@
$|@
_|@
@@
@
""| @
__|_@
@@
@
\ @
/\@
@@
@
""|@
| '@
|$ @@
@
""|@
__|@
@@
@
\ |@
\/ @
-'$ @@
@
|@
$@
@@
@
|@
|@
|@@
@
|""|@
| |@
@@
|$ @
""|@
/ @
@@
@
""|@
|@
|@@
@
\/@
_\@
@@
@
Y"\ @
| _|@
@@
@
|""|@
|__|@
@@
@
["|@
__|@
@@
@
@
@
@@
@
""|@
|@
$@@
@
""|'@
| @
$ @@
@
\>@
L\@
@@
@
|@
|@
$@@
@
""|@
| |@
$@@
@
@
@
@@
@
|""|@
\/ @
@@
@
| /|@
|__|@
@@
@
`(`@
)@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 sapphi-red
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1 @@
{"version":3,"file":"ajv.min.js","sources":["0"],"names":["f","exports","module","define","amd","window","global","self","this","Ajv","r","e","n","t","o","i","c","require","u","a","Error","code","p","call","length","1","Cache","_cache","prototype","put","key","value","get","del","clear","2","MissingRefError","MissingRef","compileAsync","schema","meta","callback","_opts","loadSchema","undefined","loadMetaSchemaOf","then","schemaObj","_addSchema","validate","_compileAsync","_compile","loadMissingSchema","ref","missingSchema","added","missingRef","schemaPromise","_loadingSchemas","removePromise","sch","addSchema","_refs","_schemas","v","$schema","getSchema","$ref","Promise","resolve","./error_classes","3","baseId","message","url","normalizeId","fullPath","errorSubclass","Subclass","Object","create","constructor","Validation","errors","ajv","validation","./resolve","4","util","DATE","DAYS","TIME","HOSTNAME","URI","URITEMPLATE","URL","UUID","JSON_POINTER","JSON_POINTER_URI_FRAGMENT","RELATIVE_JSON_POINTER","formats","mode","copy","date","str","matches","match","year","month","day","time","full","hour","minute","second","fast","date-time","uri","uri-reference","uri-template","email","hostname","ipv4","ipv6","regex","uuid","json-pointer","json-pointer-uri-fragment","relative-json-pointer","dateTime","split","DATE_TIME_SEPARATOR","NOT_URI_FRAGMENT","test","Z_ANCHOR","RegExp","./util","5","errorClasses","stableStringify","validateGenerator","ucs2length","equal","ValidationError","compile","root","localRefs","opts","refVal","refs","patterns","patternsHash","defaults","defaultsHash","customRules","index","compIndex","compiling","_compilations","compilation","callValidate","_formats","RULES","localCompile","cv","$async","sourceCode","source","splice","result","apply","arguments","_schema","_root","isRoot","isTop","schemaPath","errSchemaPath","errorPath","resolveRef","usePattern","useDefault","useCustomRule","logger","vars","refValCode","patternCode","defaultCode","customRuleCode","processCode","Function","makeValidate","error","_refVal","refCode","refIndex","resolvedRef","rootRefId","addLocalRef","localSchema","inlineRef","inlineRefs","refId","inline","regexStr","toQuotedString","valueStr","rule","parentSchema","it","validateSchema","deps","definition","dependencies","every","keyword","hasOwnProperty","join","errorsText","macro","arr","statement","../dotjs/validate","fast-deep-equal","fast-json-stable-stringify","6","SchemaObject","traverse","res","resolveSchema","parse","refPath","_getFullPath","getFullPath","_getId","keys","id","parsedRef","resolveUrl","getJsonPointer","ids","schemaId","baseIds","","fullPaths","allKeys","jsonPtr","rootSchema","parentJsonPtr","parentKeyword","keyIndex","escapeFragment","PREVENT_SCOPE_CHANGE","toHash","fragment","slice","parts","part","unescapeFragment","SIMPLE_INLINED","limit","checkNoRef","item","Array","isArray","countKeys","count","Infinity","normalize","serialize","TRAILING_SLASH_HASH","replace","./schema_obj","json-schema-traverse","uri-js","7","ruleModules","type","rules","maximum","minimum","properties","ALL","all","types","forEach","group","map","implKeywords","k","push","implements","$comment","keywords","concat","custom","../dotjs","8","obj","9","len","pos","charCodeAt","10","checkDataType","dataType","data","strictNumbers","negate","EQUAL","AND","OK","NOT","to","checkDataTypes","dataTypes","array","object","null","number","integer","coerceToTypes","optionCoerceTypes","COERCE_TO_TYPES","getProperty","escapeQuotes","varOccurences","dataVar","varReplace","expr","schemaHasRules","schemaHasRulesExcept","exceptKeyword","schemaUnknownRules","getPathExpr","currentPath","jsonPointers","isNumber","joinPaths","getPath","prop","path","escapeJsonPointer","getData","$data","lvl","paths","up","jsonPointer","segments","segment","unescapeJsonPointer","decodeURIComponent","encodeURIComponent","hash","IDENTIFIER","SINGLE_QUOTE","b","./ucs2length","11","KEYWORDS","metaSchema","keywordsJsonPointers","JSON","stringify","j","anyOf","12","$id","definitions","simpleTypes","statements","valid","not","required","items","modifying","async","const","./refs/json-schema-draft-07.json","13","$keyword","$schemaValueExcl","$exclusive","$exclType","$exclIsNumber","$opStr","$opExpr","$$outStack","out","$lvl","level","$dataLvl","dataLevel","$schemaPath","$errSchemaPath","$breakOnError","allErrors","$isData","$schemaValue","dataPathArr","$isMax","$exclusiveKeyword","$schemaExcl","$isDataExcl","$op","$notOp","$errorKeyword","createErrors","messages","verbose","__err","pop","compositeRule","Math","14","15","unicode","16","17","$it","$closingBraces","$nextValid","$currentBaseId","$allSchemasEmpty","arr1","$sch","$i","l1","strictKeywords","18","$valid","$errs","$wasComposite","19","20","21","$passData","$code","$idx","$dataNxt","$nextData","$nonEmptySchema","22","$compile","$inline","$macro","$ruleValidate","$validateCode","$rule","$definition","$rDef","$validateSchema","$parentData","$parentDataProperty","def_calLine truncated
@@ -0,0 +1,48 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/chevron-up.tsx
var chevron_up_exports = {};
__export(chevron_up_exports, {
ChevronUpIcon: () => ChevronUpIcon
});
module.exports = __toCommonJS(chevron_up_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var ChevronUpIcon = ({ strokeWidth = 1.5, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth,
viewBox: "0 0 24 24",
width: "1em",
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m18 15-6-6-6 6" })
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ChevronUpIcon
});
@@ -0,0 +1,96 @@
/**
* @license React
* use-sync-external-store-with-selector.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function is(x, y) {
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
var React = require("react"),
objectIs = "function" === typeof Object.is ? Object.is : is,
useSyncExternalStore = React.useSyncExternalStore,
useRef = React.useRef,
useEffect = React.useEffect,
useMemo = React.useMemo,
useDebugValue = React.useDebugValue;
exports.useSyncExternalStoreWithSelector = function (
subscribe,
getSnapshot,
getServerSnapshot,
selector,
isEqual
) {
var instRef = useRef(null);
if (null === instRef.current) {
var inst = { hasValue: !1, value: null };
instRef.current = inst;
} else inst = instRef.current;
instRef = useMemo(
function () {
function memoizedSelector(nextSnapshot) {
if (!hasMemo) {
hasMemo = !0;
memoizedSnapshot = nextSnapshot;
nextSnapshot = selector(nextSnapshot);
if (void 0 !== isEqual && inst.hasValue) {
var currentSelection = inst.value;
if (isEqual(currentSelection, nextSnapshot))
return (memoizedSelection = currentSelection);
}
return (memoizedSelection = nextSnapshot);
}
currentSelection = memoizedSelection;
if (objectIs(memoizedSnapshot, nextSnapshot))
return currentSelection;
var nextSelection = selector(nextSnapshot);
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
return (memoizedSnapshot = nextSnapshot), currentSelection;
memoizedSnapshot = nextSnapshot;
return (memoizedSelection = nextSelection);
}
var hasMemo = !1,
memoizedSnapshot,
memoizedSelection,
maybeGetServerSnapshot =
void 0 === getServerSnapshot ? null : getServerSnapshot;
return [
function () {
return memoizedSelector(getSnapshot());
},
null === maybeGetServerSnapshot
? void 0
: function () {
return memoizedSelector(maybeGetServerSnapshot());
}
];
},
[getSnapshot, getServerSnapshot, selector, isEqual]
);
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
useEffect(
function () {
inst.hasValue = !0;
inst.value = value;
},
[value]
);
useDebugValue(value);
return value;
};
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();
@@ -0,0 +1,91 @@
// @ts-ignore
import { File as WebFile } from "@web-std/file";
import { afterEach, beforeEach, expect, test } from "vitest";
import * as z from "zod/v4";
const minCheck = z.file().min(5);
const maxCheck = z.file().max(8);
const mimeCheck = z.file().mime(["text/plain", "application/json"]);
const originalFile = global.File;
beforeEach(async () => {
if (!globalThis.File) globalThis.File = WebFile;
});
afterEach(() => {
if (globalThis.File !== originalFile) {
globalThis.File = originalFile;
}
});
test("passing validations", () => {
minCheck.safeParse(new File(["12345"], "test.txt"));
maxCheck.safeParse(new File(["12345678"], "test.txt"));
mimeCheck.safeParse(new File([""], "test.csv", { type: "text/plain" }));
expect(() => mimeCheck.parse(new File([""], "test.txt"))).toThrow();
expect(() => mimeCheck.parse(new File([""], "test.txt", { type: "text/csv" }))).toThrow();
});
test("failing validations", () => {
expect(minCheck.safeParse(new File(["1234"], "test.txt"))).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"origin": "file",
"code": "too_small",
"minimum": 5,
"path": [],
"message": "Too small: expected file to have >5 bytes"
}
]],
"success": false,
}
`);
expect(maxCheck.safeParse(new File(["123456789"], "test.txt"))).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"origin": "file",
"code": "too_big",
"maximum": 8,
"path": [],
"message": "Too big: expected file to have <8 bytes"
}
]],
"success": false,
}
`);
expect(mimeCheck.safeParse(new File([""], "test.csv"))).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "invalid_value",
"values": [
"text/plain",
"application/json"
],
"path": [],
"message": "Invalid option: expected one of \\"text/plain\\"|\\"application/json\\""
}
]],
"success": false,
}
`);
expect(mimeCheck.safeParse(new File([""], "test.csv", { type: "text/csv" }))).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "invalid_value",
"values": [
"text/plain",
"application/json"
],
"path": [],
"message": "Invalid option: expected one of \\"text/plain\\"|\\"application/json\\""
}
]],
"success": false,
}
`);
});
@@ -0,0 +1,224 @@
<div markdown="1">
<sup>Using <a href="https://wangchujiang.com/#/app" target="_blank">my app</a> is also a way to <a href="https://wangchujiang.com/#/sponsor" target="_blank">support</a> me:</sup>
<br>
<a target="_blank" href="https://apps.apple.com/app/Deskmark/6755948110" title="Deskmark for macOS"><img alt="Deskmark" height="52" width="52" src="https://wangchujiang.com/appicon/deskmark.png"></a>
<a target="_blank" href="https://apps.apple.com/app/Keyzer/6500434773" title="Keyzer for macOS"><img alt="Keyzer" height="52" width="52" src="https://wangchujiang.com/appicon/keyzer.png"></a>
<a target="_blank" href="https://github.com/jaywcjlove/vidwall-hub" title="Vidwall Hub for macOS"><img alt="Vidwall Hub" height="52" width="52" src="https://wangchujiang.com/appicon/vidwall-hub.png"></a>
<a target="_blank" href="https://apps.apple.com/app/VidCrop/6752624705" title="VidCrop for macOS"><img alt="VidCrop" height="52" width="52" src="https://wangchujiang.com/appicon/vidcrop.png"></a>
<a target="_blank" href="https://apps.apple.com/app/Vidwall/6747587746" title="Vidwall for macOS"><img alt="Vidwall" height="52" width="52" src="https://wangchujiang.com/appicon/vidwall.png"></a>
<a target="_blank" href="https://wangchujiang.com/mousio-hint/" title="Mousio Hint for macOS"><img alt="Mousio Hint" height="52" width="52" src="https://wangchujiang.com/appicon/mousio-hint.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6746747327" title="Mousio for macOS"><img alt="Mousio" height="52" width="52" src="https://wangchujiang.com/appicon/mousio.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6745227444" title="Musicer for macOS"><img alt="Musicer" height="52" width="52" src="https://wangchujiang.com/appicon/musicer.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6743841447" title="Audioer for macOS"><img alt="Audioer" height="52" width="52" src="https://wangchujiang.com/appicon/audioer.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6744690194" title="FileSentinel for macOS"><img alt="FileSentinel" height="52" width="52" src="https://wangchujiang.com/appicon/file-sentinel.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6743495172" title="FocusCursor for macOS"><img alt="FocusCursor" height="52" width="52" src="https://wangchujiang.com/appicon/focus-cursor.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6742680573" title="Videoer for macOS"><img alt="Videoer" height="52" width="52" src="https://wangchujiang.com/appicon/videoer.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6740425504" title="KeyClicker for macOS"><img alt="KeyClicker" height="52" width="52" src="https://wangchujiang.com/appicon/key-clicker.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6739052447" title="DayBar for macOS"><img alt="DayBar" height="52" width="52" src="https://wangchujiang.com/appicon/daybar.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6739444407" title="Iconed for macOS"><img alt="Iconed" height="52" width="52" src="https://wangchujiang.com/appicon/iconed.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6737160756" title="Mousio for macOS"><img alt="Mousio" height="52" width="52" src="https://wangchujiang.com/appicon/rightmenu-master.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6723903021" title="Paste Quick for macOS"><img alt="Quick RSS" height="52" width="52" src="https://wangchujiang.com/appicon/paste-quick.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6670696072" title="Quick RSS for macOS/iOS"><img alt="Quick RSS" height="52" width="52" src="https://wangchujiang.com/appicon/quick-rss.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6670167443" title="Web Serve for macOS"><img alt="Web Serve" height="52" width="52" src="https://wangchujiang.com/appicon/web-serve.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6503953628" title="Copybook Generator for macOS/iOS"><img alt="Copybook Generator" height="52" width="52" src="https://wangchujiang.com/appicon/copybook-generator.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6471227008" title="DevTutor for macOS/iOS"><img alt="DevTutor for SwiftUI" height="52" width="52" src="https://wangchujiang.com/appicon/devtutor.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6479819388" title="RegexMate for macOS/iOS"><img alt="RegexMate" height="52" width="52" src="https://wangchujiang.com/appicon/regex-mate.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6479194014" title="Time Passage for macOS/iOS"><img alt="Time Passage" height="52" width="52" src="https://wangchujiang.com/appicon/time-passage.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6478772538" title="IconizeFolder for macOS"><img alt="Iconize Folder" height="52" width="52" src="https://wangchujiang.com/appicon/iconize-folder.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6478511402" title="Textsound Saver for macOS/iOS"><img alt="Textsound Saver" height="52" width="52" src="https://wangchujiang.com/appicon/textsound-saver.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6476924627" title="Create Custom Symbols for macOS"><img alt="Create Custom Symbols" height="52" width="52" src="https://wangchujiang.com/appicon/create-custom-symbols.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6476452351" title="DevHub for macOS"><img alt="DevHub" height="52" width="52" src="https://wangchujiang.com/appicon/devhub.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6476400184" title="Resume Revise for macOS"><img alt="Resume Revise" height="52" width="52" src="https://wangchujiang.com/appicon/resume-revise.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6472593276" title="Palette Genius for macOS"><img alt="Palette Genius" height="52" width="52" src="https://wangchujiang.com/appicon/palette-genius.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6470879005" title="Symbol Scribe for macOS"><img alt="Symbol Scribe" height="52" width="52" src="https://wangchujiang.com/appicon/symbol-scribe.png"></a>
<br><br>
</div>
<hr>
<!--rehype:ignore:start-->
# Basic Setup Extensions
<!--rehype:ignore:end-->
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)
[![npm version](https://img.shields.io/npm/v/@uiw/codemirror-extensions-basic-setup.svg)](https://www.npmjs.com/package/@uiw/codemirror-extensions-basic-setup)
Basic configuration for the CodeMirror6 code editor. This is the official [basic-setup](https://github.com/codemirror/basic-setup) package fork, making configuration optional.
## Install
```bash
npm install @uiw/codemirror-extensions-basic-setup --save
```
## Usage
⚠️ Integrated into [**@uiw/react-codemirror**](https://npmjs.com/@uiw/react-codemirror) package
```jsx
import CodeMirror from '@uiw/react-codemirror';
function App() {
return (
<CodeMirror
value="console.log('hello world!');"
height="200px"
basicSetup={{
foldGutter: false,
dropCursor: false,
allowMultipleSelections: false,
indentOnInput: false,
}}
/>
);
}
export default App;
```
```js
import { EditorView } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
import { basicSetup, minimalSetup } from '@uiw/codemirror-extensions-basic-setup';
const state = EditorState.create({
doc: 'my source code',
extensions: [
basicSetup({
foldGutter: false,
dropCursor: false,
allowMultipleSelections: false,
indentOnInput: false,
}),
],
});
const view = new EditorView({
parent: document.querySelector('#editor'),
state,
});
```
```diff
import { EditorView } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
- import { basicSetup, minimalSetup } from 'codemirror';
+ import { basicSetup, minimalSetup } from '@uiw/codemirror-extensions-basic-setup';
const state = EditorState.create({
doc: 'my source code',
extensions: [
- basicSetup
+ basicSetup({
+ foldGutter: false,
+ dropCursor: false,
+ })
],
});
const view = new EditorView({
parent: document.querySelector('#editor'),
state,
});
```
## API
```ts
import { Extension } from '@codemirror/state';
export interface BasicSetupOptions extends MinimalSetupOptions {
lineNumbers?: boolean;
highlightActiveLineGutter?: boolean;
foldGutter?: boolean;
dropCursor?: boolean;
allowMultipleSelections?: boolean;
indentOnInput?: boolean;
bracketMatching?: boolean;
closeBrackets?: boolean;
autocompletion?: boolean;
rectangularSelection?: boolean;
crosshairCursor?: boolean;
highlightActiveLine?: boolean;
highlightSelectionMatches?: boolean;
closeBracketsKeymap?: boolean;
searchKeymap?: boolean;
foldKeymap?: boolean;
completionKeymap?: boolean;
lintKeymap?: boolean;
/**
* Facet for overriding the unit by which indentation happens. Should be a string consisting either entirely of spaces or entirely of tabs. When not set, this defaults to 2 spaces
* https://codemirror.net/docs/ref/#language.indentUnit
* @default 2
*/
tabSize?: number;
}
/**
This is an extension value that just pulls together a number of
extensions that you might want in a basic editor. It is meant as a
convenient helper to quickly set up CodeMirror without installing
and importing a lot of separate packages.
Specifically, it includes...
- [the default command bindings](https://codemirror.net/6/docs/ref/#commands.defaultKeymap)
- [line numbers](https://codemirror.net/6/docs/ref/#view.lineNumbers)
- [special character highlighting](https://codemirror.net/6/docs/ref/#view.highlightSpecialChars)
- [the undo history](https://codemirror.net/6/docs/ref/#commands.history)
- [a fold gutter](https://codemirror.net/6/docs/ref/#language.foldGutter)
- [custom selection drawing](https://codemirror.net/6/docs/ref/#view.drawSelection)
- [drop cursor](https://codemirror.net/6/docs/ref/#view.dropCursor)
- [multiple selections](https://codemirror.net/6/docs/ref/#state.EditorState^allowMultipleSelections)
- [reindentation on input](https://codemirror.net/6/docs/ref/#language.indentOnInput)
- [the default highlight style](https://codemirror.net/6/docs/ref/#language.defaultHighlightStyle) (as fallback)
- [bracket matching](https://codemirror.net/6/docs/ref/#language.bracketMatching)
- [bracket closing](https://codemirror.net/6/docs/ref/#autocomplete.closeBrackets)
- [autocompletion](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion)
- [rectangular selection](https://codemirror.net/6/docs/ref/#view.rectangularSelection) and [crosshair cursor](https://codemirror.net/6/docs/ref/#view.crosshairCursor)
- [active line highlighting](https://codemirror.net/6/docs/ref/#view.highlightActiveLine)
- [active line gutter highlighting](https://codemirror.net/6/docs/ref/#view.highlightActiveLineGutter)
- [selection match highlighting](https://codemirror.net/6/docs/ref/#search.highlightSelectionMatches)
- [search](https://codemirror.net/6/docs/ref/#search.searchKeymap)
- [linting](https://codemirror.net/6/docs/ref/#lint.lintKeymap)
(You'll probably want to add some language package to your setup
too.)
This extension does not allow customization. The idea is that,
once you decide you want to configure your editor more precisely,
you take this package's source (which is just a bunch of imports
and an array literal), copy it into your own code, and adjust it
as desired.
*/
export declare const basicSetup: (options?: BasicSetupOptions) => Extension[];
export interface MinimalSetupOptions {
highlightSpecialChars?: boolean;
history?: boolean;
drawSelection?: boolean;
syntaxHighlighting?: boolean;
defaultKeymap?: boolean;
historyKeymap?: boolean;
}
/**
A minimal set of extensions to create a functional editor. Only
includes [the default keymap](https://codemirror.net/6/docs/ref/#commands.defaultKeymap), [undo
history](https://codemirror.net/6/docs/ref/#commands.history), [special character
highlighting](https://codemirror.net/6/docs/ref/#view.highlightSpecialChars), [custom selection
drawing](https://codemirror.net/6/docs/ref/#view.drawSelection), and [default highlight
style](https://codemirror.net/6/docs/ref/#language.defaultHighlightStyle).
*/
export declare const minimalSetup: (options?: MinimalSetupOptions) => Extension[];
```
## Contributors
As always, thanks to our amazing contributors!
<a href="https://github.com/uiwjs/react-codemirror/graphs/contributors">
<img src="https://uiwjs.github.io/react-codemirror/CONTRIBUTORS.svg" />
</a>
Made with [github-action-contributors](https://github.com/jaywcjlove/github-action-contributors).
## License
Licensed under the MIT License.
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sveltePreprocessor = sveltePreprocessor;
var preprocessor_1 = require("./preprocessor");
var booleanGuard = function (value) { return Boolean(value); };
var sortImports = function (code, options) {
var parse = require('svelte/compiler').parse;
var _a = parse(code), instance = _a.instance, module = _a.module;
var sources = [instance, module].filter(booleanGuard);
if (!sources.length)
return code;
return sources.reduce(function (code, source) {
var snippet = code.slice(source.content.start, source.content.end);
var preprocessed = (0, preprocessor_1.preprocessor)(snippet, options);
var result = code.replace(snippet, "\n".concat(preprocessed, "\n"));
return result;
}, code);
};
function sveltePreprocessor(code, options) {
var sorted = sortImports(code, options);
var prettierPluginSvelte = require('prettier-plugin-svelte');
return prettierPluginSvelte.parsers.svelte.preprocess(sorted, options);
}
@@ -0,0 +1,128 @@
declare namespace QuickLRU {
interface Options<KeyType, ValueType> {
/**
The maximum number of milliseconds an item should remain in the cache.
@default Infinity
By default, `maxAge` will be `Infinity`, which means that items will never expire.
Lazy expiration upon the next write or read call.
Individual expiration of an item can be specified by the `set(key, value, maxAge)` method.
*/
readonly maxAge?: number;
/**
The maximum number of items before evicting the least recently used items.
*/
readonly maxSize: number;
/**
Called right before an item is evicted from the cache.
Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
*/
onEviction?: (key: KeyType, value: ValueType) => void;
}
}
declare class QuickLRU<KeyType, ValueType>
implements Iterable<[KeyType, ValueType]> {
/**
The stored item count.
*/
readonly size: number;
/**
Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29).
The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
@example
```
import QuickLRU = require('quick-lru');
const lru = new QuickLRU({maxSize: 1000});
lru.set('🦄', '🌈');
lru.has('🦄');
//=> true
lru.get('🦄');
//=> '🌈'
```
*/
constructor(options: QuickLRU.Options<KeyType, ValueType>);
[Symbol.iterator](): IterableIterator<[KeyType, ValueType]>;
/**
Set an item. Returns the instance.
Individual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified in the constructor, otherwise the item will never expire.
@returns The list instance.
*/
set(key: KeyType, value: ValueType, options?: {maxAge?: number}): this;
/**
Get an item.
@returns The stored item or `undefined`.
*/
get(key: KeyType): ValueType | undefined;
/**
Check if an item exists.
*/
has(key: KeyType): boolean;
/**
Get an item without marking it as recently used.
@returns The stored item or `undefined`.
*/
peek(key: KeyType): ValueType | undefined;
/**
Delete an item.
@returns `true` if the item is removed or `false` if the item doesn't exist.
*/
delete(key: KeyType): boolean;
/**
Delete all items.
*/
clear(): void;
/**
Update the `maxSize` in-place, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee.
Useful for on-the-fly tuning of cache sizes in live systems.
*/
resize(maxSize: number): void;
/**
Iterable for all the keys.
*/
keys(): IterableIterator<KeyType>;
/**
Iterable for all the values.
*/
values(): IterableIterator<ValueType>;
/**
Iterable for all entries, starting with the oldest (ascending in recency).
*/
entriesAscending(): IterableIterator<[KeyType, ValueType]>;
/**
Iterable for all entries, starting with the newest (descending in recency).
*/
entriesDescending(): IterableIterator<[KeyType, ValueType]>;
}
export = QuickLRU;
@@ -0,0 +1 @@
{"name":"@react-stately/selection","version":"3.20.6","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532107085,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/main.js":{"checkedAt":1794532107085,"integrity":"sha512-f5mxRj8P6xHbBX3gyF5H9YFYyDAmNJe0PhLGj5CoaSTZvyGDf9NTpdu6y9Be7FX+QTgEBxIo3vQQQcoF58SLkw==","mode":420,"size":1160},"dist/module.js":{"checkedAt":1794532107085,"integrity":"sha512-QNC2Mg5TUI8enJx2Ug9u3wscAlr02//copOkiA0Dh27gj3uIL5REe4h1zik2e9nFVy5SD3AX+5F5iV9x7/qGiA==","mode":420,"size":1038},"dist/Selection.main.js":{"checkedAt":1794532107085,"integrity":"sha512-VXOoXPkiwXouGrANRo110cai2cLSPQRsvVjf8n1A20rYDiCBPOPHFhg9rXicioSi8S1/TreMQC4KwbUakBguCQ==","mode":420,"size":1522},"dist/Selection.module.js":{"checkedAt":1794532107085,"integrity":"sha512-BycZFtYlyxROrwMQGCIb6sA/nNeL1tf8Zkt7ATylf5pxqSo4OpS+xY9ZurG1nARX87ZWHXXNkyrARiMKMKD3HQ==","mode":420,"size":1366},"dist/SelectionManager.main.js":{"checkedAt":1794532107085,"integrity":"sha512-9IeyaG/4flMn+UGxF/JgZKb7xYQURiLw3MeVf78orDHdUbvFYEX9B09bVYohY8ahsjHMZtDhFuiq5vbh85M/+g==","mode":420,"size":15031},"dist/SelectionManager.module.js":{"checkedAt":1794532107085,"integrity":"sha512-b5+4WLkn43LnHRC1pontHaLvW+g0NNmuL6ZCQNg/atJNaScuwoHtGQ4C8BPH4O1Z0q0ZBRy5UCzm3vf0KQ9TPQ==","mode":420,"size":14915},"dist/useMultipleSelectionState.main.js":{"checkedAt":1794532107085,"integrity":"sha512-cINU8P5EAEjQZw/xe2VN/FCMOHO23h55fjc+GSXPF6IhQbwSdX1jPV0GSgkftXPT2j/fvfhgy+3DgHjO/46Z8g==","mode":420,"size":5023},"dist/useMultipleSelectionState.module.js":{"checkedAt":1794532107086,"integrity":"sha512-9Hoe27/nmTZfqe8njWveRa0pltZQgEOEuXP0TqQQFUzf85mAI4VLTaoyVnEvOTjtxiS6mxJ84waoGU9aE713uw==","mode":420,"size":4944},"package.json":{"checkedAt":1794532107086,"integrity":"sha512-fyO65sYH9L380EJN/3NMFelF6UK9tGOVJlb7s/k60pupCb9FgwcGPVGByLu2aUR7C9dyBHMhxzEdOh8Ym2TE/Q==","mode":420,"size":984},"dist/main.js.map":{"checkedAt":1794532107086,"integrity":"sha512-XjY6AeZsVy47mRyJ+GgeigLsp2Tviic5QGLABJm55gbTUy+KMxi7n4eqBgc7aslE1YcPhQaczt7IPkW8NUSCSQ==","mode":420,"size":1126},"dist/module.js.map":{"checkedAt":1794532107086,"integrity":"sha512-dd3lIJn0s9pRvykBsQ2mutMbtNRGwbSbG7bHC/z1noSluRb7llvlfJoMdyv2Tt7B2pbtonel2OIWEoVRozEqcw==","mode":420,"size":1121},"dist/Selection.main.js.map":{"checkedAt":1794532107086,"integrity":"sha512-aPmvruDDKelbl7RvAKERvR0wGSeENGEkpF08uMhzi5Z99T21vF82LJciHBn5tQF4lReR785BvehEFuVsgIxZeA==","mode":420,"size":1803},"dist/Selection.module.js.map":{"checkedAt":1794532107086,"integrity":"sha512-cwOguqzXEJyqaB5fq2O3LdNjJADJ2mF1903R4li9x02x8j1YvfSHIzwI+Sqgr0VXB+kNp4VaFCVkzCJoN/zXZg==","mode":420,"size":1799},"dist/SelectionManager.main.js.map":{"checkedAt":1794532107086,"integrity":"sha512-VCwVaTD6FafV/axMQMr1G7fcpfwroXR/4e7Mht5Mi4qVSFaN7rWNW2CvGAyW6sD/suQ3rqb9JesePm37BulD/w==","mode":420,"size":22676},"dist/SelectionManager.module.js.map":{"checkedAt":1794532107086,"integrity":"sha512-iGtPN/1IMzRwIZP1IaLA7uWD182PfcA8z1DrcnT9tVLPrLUVgnvY3UToSzPyI95dBUCExfFKfnQsqKUXSjfO2Q==","mode":420,"size":22672},"dist/types.d.ts.map":{"checkedAt":1794532107087,"integrity":"sha512-ygj673zxmD9kQGoqCgt61zAGrwDs09Jl9OTu26mVLZ0szavAj9puq1IrAsuj3gFtxdrkwlNUURlePUv7vDi1Rg==","mode":420,"size":6231},"dist/useMultipleSelectionState.main.js.map":{"checkedAt":1794532107087,"integrity":"sha512-EBRy3MHyqVd4W33+WOCNyd4EmfwRpT+cllF9OULIecpqLZgXRlxeJNFNVGtN14Q0Js1oqG5TNh2QBGMu1SKReg==","mode":420,"size":7002},"dist/useMultipleSelectionState.module.js.map":{"checkedAt":1794532107087,"integrity":"sha512-/WsOz/14vD79EY4n+jTyH01RxF9szOGKceii2hbGAD2buwI0KUBHq2SnP5JkTrQFSIzA+yEznZBjrOjN7HiChA==","mode":420,"size":6988},"README.md":{"checkedAt":1794532107087,"integrity":"sha512-fK5N0Jza3W9uLJYEcZKysZAWuZbYvzBezSsqJfyY5tmER3xQmj/Y+ExKlSuXMAPO0MQo9rA059OdErgXL51TKA==","mode":420,"size":142},"dist/import.mjs":{"checkedAt":1794532107087,"integrity":"sha512-nfCGHKTJs5s9J9YxVvLauYKYTVrAKrqpr7kQ734OhlC+PBR/zbCpDQrcXi+INmrlMPX8qef5Cf+E+S+RcPLr8g==","mode":420,"size":1026},"dist/Selection.mjs":{"checkedAt":1794532107085,"integrity":"sha512-BycZFtYlyxROrwMQGCIb6sA/nNeL1tf8Zkt7ATylf5pxqSo4OpS+xY9ZurG1nARX87ZWHXXNkyrARiMKMKD3HQ==","mode":420,"size":1366},"dist/SelectionManager.mjs":{"checkedAt":1794532107087,"integrity":"sha512-ZvmmYcG46keYIvXvMQt0fBFB3Hj89KCz0YlucoK+XsNtLkqHuDEuNJWuO7CNWrKXKECqAtzhf/Z2eOopfvU9ng==","mode":420,"size":14909},"dist/useMultipleSelectionState.mjs":{"checkedAt":1794532107087,"integrity":"sha512-ve66hm6VRXftWcct1spwTnFQ7XpfDw+FOucLBP8mgPbrgClbMtOtbN0c1YUrTtBxQTg0UrbuoMVVSCGlLcHjsQ==","mode":420,"size":4938},"src/index.ts":{"checkedAt":1794532107088,"integrity":"sha512-eNGdK1VP5NHCBCrxQ/inh3LC3CUcGginRruXpLvGgh21Mwz5oVYCobNN+znc8X7CzQDjbEQpx8xxKnecict8kg==","mode":420,"size":936},"src/Selection.ts":{"checkedAt":1794532107088,"integrity":"sha512-o/A56762OSzxjHW4OhlruH50xTAOWEygF0fQHfTw1vC2W141pCID16hwlonPTj2/F7Nnj1b8oGBFBgZZr2h0qg==","mode":420,"size":1268},"src/SelectionManager.ts":{"Line truncated
@@ -0,0 +1,19 @@
"use client";
import { useState, useEffect } from 'react';
function usePageInView() {
const [isInView, setIsInView] = useState(true);
useEffect(() => {
const handleVisibilityChange = () => setIsInView(!document.hidden);
if (document.hidden) {
handleVisibilityChange();
}
document.addEventListener("visibilitychange", handleVisibilityChange);
return () => {
document.removeEventListener("visibilitychange", handleVisibilityChange);
};
}, []);
return isInView;
}
export { usePageInView };
@@ -0,0 +1,18 @@
import { MappedResult } from '../mapped/index.mjs';
import { Exclude } from './exclude.mjs';
// prettier-ignore
function FromProperties(P, U) {
const Acc = {};
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
Acc[K2] = Exclude(P[K2], U);
return Acc;
}
// prettier-ignore
function FromMappedResult(R, T) {
return FromProperties(R.properties, T);
}
// prettier-ignore
export function ExcludeFromMappedResult(R, T) {
const P = FromMappedResult(R, T);
return MappedResult(P);
}
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=GetPlanOptions.js.map
@@ -0,0 +1,10 @@
declare function useLabelPlacement(props: {
labelPlacement?: "inside" | "outside" | "outside-left";
label?: React.ReactNode;
}): "inside" | "outside" | "outside-left";
declare function useInputLabelPlacement(props: {
labelPlacement?: "inside" | "outside" | "outside-left" | "outside-top";
label?: React.ReactNode;
}): "inside" | "outside" | "outside-left" | "outside-top";
export { useInputLabelPlacement, useLabelPlacement };
@@ -0,0 +1,42 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {DOMAttributes, RefObject} from '@react-types/shared';
import {GridRowProps} from '@react-aria/grid';
import {tableNestedRows} from '@react-stately/flags';
import {TableState} from '@react-stately/table';
export interface TableHeaderRowAria {
/** Props for the grid row element. */
rowProps: DOMAttributes
}
/**
* Provides the behavior and accessibility implementation for a header row in a table.
* @param props - Props for the row.
* @param state - State of the table, as returned by `useTableState`.
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function useTableHeaderRow<T>(props: GridRowProps<T>, state: TableState<T>, ref: RefObject<Element | null>): TableHeaderRowAria {
let {node, isVirtualized} = props;
let rowProps = {
role: 'row'
};
if (isVirtualized && !(tableNestedRows() && 'expandedKeys' in state)) {
rowProps['aria-rowindex'] = node.index + 1; // aria-rowindex is 1 based
}
return {
rowProps
};
}
@@ -0,0 +1,178 @@
// Generated by LiveScript 1.6.0
var Func, List, Obj, Str, Num, id, isType, replicate, prelude, toString$ = {}.toString;
Func = require('./Func.js');
List = require('./List.js');
Obj = require('./Obj.js');
Str = require('./Str.js');
Num = require('./Num.js');
id = function(x){
return x;
};
isType = curry$(function(type, x){
return toString$.call(x).slice(8, -1) === type;
});
replicate = curry$(function(n, x){
var i$, results$ = [];
for (i$ = 0; i$ < n; ++i$) {
results$.push(x);
}
return results$;
});
Str.empty = List.empty;
Str.slice = List.slice;
Str.take = List.take;
Str.drop = List.drop;
Str.splitAt = List.splitAt;
Str.takeWhile = List.takeWhile;
Str.dropWhile = List.dropWhile;
Str.span = List.span;
Str.breakStr = List.breakList;
prelude = {
Func: Func,
List: List,
Obj: Obj,
Str: Str,
Num: Num,
id: id,
isType: isType,
replicate: replicate
};
prelude.each = List.each;
prelude.map = List.map;
prelude.filter = List.filter;
prelude.compact = List.compact;
prelude.reject = List.reject;
prelude.partition = List.partition;
prelude.find = List.find;
prelude.head = List.head;
prelude.first = List.first;
prelude.tail = List.tail;
prelude.last = List.last;
prelude.initial = List.initial;
prelude.empty = List.empty;
prelude.reverse = List.reverse;
prelude.difference = List.difference;
prelude.intersection = List.intersection;
prelude.union = List.union;
prelude.countBy = List.countBy;
prelude.groupBy = List.groupBy;
prelude.fold = List.fold;
prelude.foldl = List.foldl;
prelude.fold1 = List.fold1;
prelude.foldl1 = List.foldl1;
prelude.foldr = List.foldr;
prelude.foldr1 = List.foldr1;
prelude.unfoldr = List.unfoldr;
prelude.andList = List.andList;
prelude.orList = List.orList;
prelude.any = List.any;
prelude.all = List.all;
prelude.unique = List.unique;
prelude.uniqueBy = List.uniqueBy;
prelude.sort = List.sort;
prelude.sortWith = List.sortWith;
prelude.sortBy = List.sortBy;
prelude.sum = List.sum;
prelude.product = List.product;
prelude.mean = List.mean;
prelude.average = List.average;
prelude.concat = List.concat;
prelude.concatMap = List.concatMap;
prelude.flatten = List.flatten;
prelude.maximum = List.maximum;
prelude.minimum = List.minimum;
prelude.maximumBy = List.maximumBy;
prelude.minimumBy = List.minimumBy;
prelude.scan = List.scan;
prelude.scanl = List.scanl;
prelude.scan1 = List.scan1;
prelude.scanl1 = List.scanl1;
prelude.scanr = List.scanr;
prelude.scanr1 = List.scanr1;
prelude.slice = List.slice;
prelude.take = List.take;
prelude.drop = List.drop;
prelude.splitAt = List.splitAt;
prelude.takeWhile = List.takeWhile;
prelude.dropWhile = List.dropWhile;
prelude.span = List.span;
prelude.breakList = List.breakList;
prelude.zip = List.zip;
prelude.zipWith = List.zipWith;
prelude.zipAll = List.zipAll;
prelude.zipAllWith = List.zipAllWith;
prelude.at = List.at;
prelude.elemIndex = List.elemIndex;
prelude.elemIndices = List.elemIndices;
prelude.findIndex = List.findIndex;
prelude.findIndices = List.findIndices;
prelude.apply = Func.apply;
prelude.curry = Func.curry;
prelude.flip = Func.flip;
prelude.fix = Func.fix;
prelude.over = Func.over;
prelude.split = Str.split;
prelude.join = Str.join;
prelude.lines = Str.lines;
prelude.unlines = Str.unlines;
prelude.words = Str.words;
prelude.unwords = Str.unwords;
prelude.chars = Str.chars;
prelude.unchars = Str.unchars;
prelude.repeat = Str.repeat;
prelude.capitalize = Str.capitalize;
prelude.camelize = Str.camelize;
prelude.dasherize = Str.dasherize;
prelude.values = Obj.values;
prelude.keys = Obj.keys;
prelude.pairsToObj = Obj.pairsToObj;
prelude.objToPairs = Obj.objToPairs;
prelude.listsToObj = Obj.listsToObj;
prelude.objToLists = Obj.objToLists;
prelude.max = Num.max;
prelude.min = Num.min;
prelude.negate = Num.negate;
prelude.abs = Num.abs;
prelude.signum = Num.signum;
prelude.quot = Num.quot;
prelude.rem = Num.rem;
prelude.div = Num.div;
prelude.mod = Num.mod;
prelude.recip = Num.recip;
prelude.pi = Num.pi;
prelude.tau = Num.tau;
prelude.exp = Num.exp;
prelude.sqrt = Num.sqrt;
prelude.ln = Num.ln;
prelude.pow = Num.pow;
prelude.sin = Num.sin;
prelude.tan = Num.tan;
prelude.cos = Num.cos;
prelude.acos = Num.acos;
prelude.asin = Num.asin;
prelude.atan = Num.atan;
prelude.atan2 = Num.atan2;
prelude.truncate = Num.truncate;
prelude.round = Num.round;
prelude.ceiling = Num.ceiling;
prelude.floor = Num.floor;
prelude.isItNaN = Num.isItNaN;
prelude.even = Num.even;
prelude.odd = Num.odd;
prelude.gcd = Num.gcd;
prelude.lcm = Num.lcm;
prelude.VERSION = '1.2.1';
module.exports = prelude;
function curry$(f, bound){
var context,
_curry = function(args) {
return f.length > 1 ? function(){
var params = args ? args.concat() : [];
context = bound ? context || this : this;
return params.push.apply(params, arguments) <
f.length && arguments.length ?
_curry.call(context, params) : f.apply(context, params);
} : f;
};
return _curry();
}
@@ -0,0 +1,60 @@
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('es-abstract/2024/Call');
var GetIteratorDirect = require('../aos/GetIteratorDirect');
var IsCallable = require('es-abstract/2024/IsCallable');
var IteratorClose = require('es-abstract/2024/IteratorClose');
var IteratorStepValue = require('es-abstract/2024/IteratorStepValue');
var ThrowCompletion = require('es-abstract/2024/ThrowCompletion');
var Type = require('es-abstract/2024/Type');
module.exports = function reduce(reducer) {
if (this instanceof reduce) {
throw new $TypeError('`reduce` is not a constructor');
}
var O = this; // step 1
if (Type(O) !== 'Object') {
throw new $TypeError('`this` value must be an Object'); // step 2
}
if (!IsCallable(reducer)) {
throw new $TypeError('`reducer` must be a function'); // step 3
}
var iterated = GetIteratorDirect(O); // step 4
var accumulator;
var counter;
if (arguments.length < 2) { // step 6
accumulator = IteratorStepValue(iterated); // step 6.a
if (iterated['[[Done]]']) {
throw new $TypeError('Reduce of empty iterator with no initial value');
}
counter = 1;
} else { // step 7
accumulator = arguments[1]; // step 7.a
counter = 0;
}
// eslint-disable-next-line no-constant-condition
while (true) { // step 8
var value = IteratorStepValue(iterated); // step 8.a
if (iterated['[[Done]]']) {
return accumulator; // step 8.b
}
try {
var result = Call(reducer, void undefined, [accumulator, value, counter]); // step 8.d
accumulator = result; // step 8.f
} catch (e) {
// close iterator // step 8.e
IteratorClose(
iterated,
ThrowCompletion(e)
);
}
counter += 1; // step 8.g
}
};
@@ -0,0 +1,20 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = extractValueFromTaggedTemplateExpression;
var _TemplateLiteral = require('./TemplateLiteral');
var _TemplateLiteral2 = _interopRequireDefault(_TemplateLiteral);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Returns the string value of a tagged template literal object.
* Redirects the bulk of the work to `TemplateLiteral`.
*/
function extractValueFromTaggedTemplateExpression(value) {
return (0, _TemplateLiteral2.default)(value.quasi);
}
@@ -0,0 +1,53 @@
"use strict"
const path = require("path")
/**
* @param {string} filePath
* @param {string} binField
* @returns {boolean}
*/
function simulateNodeResolutionAlgorithm(filePath, binField) {
const possibilities = [filePath]
let newFilePath = filePath.replace(/\.js$/u, "")
possibilities.push(newFilePath)
newFilePath = newFilePath.replace(/[/\\]index$/u, "")
possibilities.push(newFilePath)
return possibilities.includes(binField)
}
/**
* Checks whether or not a given path is a `bin` file.
*
* @param {string} filePath - A file path to check.
* @param {unknown} binField - A value of the `bin` field of `package.json`.
* @param {string} basedir - A directory path that `package.json` exists.
* @returns {boolean} `true` if the file is a `bin` file.
*/
function isBinFile(filePath, binField, basedir) {
if (!binField) {
return false
}
if (typeof binField === "string") {
return simulateNodeResolutionAlgorithm(
filePath,
path.resolve(basedir, binField)
)
}
if (binField instanceof Object === false) {
return false
}
for (const value of Object.values(binField)) {
const resolvedPath = path.resolve(basedir, value)
if (simulateNodeResolutionAlgorithm(filePath, resolvedPath)) {
return true
}
}
return false
}
module.exports = { isBinFile }
@@ -0,0 +1,53 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description: "disallow ES2015 typed arrays.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-typed-arrays.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
sourceCode.getScope(program),
)
for (const { node, path } of tracker.iterateGlobalReferences({
Int8Array: { [READ]: true },
Uint8Array: { [READ]: true },
Uint8ClampedArray: { [READ]: true },
Int16Array: { [READ]: true },
Uint16Array: { [READ]: true },
Int32Array: { [READ]: true },
Uint32Array: { [READ]: true },
Float32Array: { [READ]: true },
Float64Array: { [READ]: true },
DataView: { [READ]: true },
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = appendToMemberExpression;
var _index = require("../builders/generated/index.js");
function appendToMemberExpression(member, append, computed = false) {
member.object = (0, _index.memberExpression)(member.object, member.property, member.computed);
member.property = append;
member.computed = !!computed;
return member;
}
//# sourceMappingURL=appendToMemberExpression.js.map
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,oBAAoB,CAAC,qHAAoF,CAAC;AAC9H","sources":["packages/@react-aria/menu/intl/pl-PL.json"],"sourcesContent":["{\n \"longPressMessage\": \"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu\"\n}\n"],"names":[],"version":3,"file":"pl-PL.main.js.map"}
@@ -0,0 +1,10 @@
import isNativeReflectConstruct from "./isNativeReflectConstruct.js";
import setPrototypeOf from "./setPrototypeOf.js";
function _construct(t, e, r) {
if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
var o = [null];
o.push.apply(o, e);
var p = new (t.bind.apply(t, o))();
return r && setPrototypeOf(p, r.prototype), p;
}
export { _construct as default };
@@ -0,0 +1,828 @@
/**
* @fileoverview A class of the code path analyzer.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const assert = require("../../shared/assert"),
{ breakableTypePattern } = require("../../shared/ast-utils"),
CodePath = require("./code-path"),
CodePathSegment = require("./code-path-segment"),
IdGenerator = require("./id-generator"),
debug = require("./debug-helpers");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether or not a given node is a `case` node (not `default` node).
* @param {ASTNode} node A `SwitchCase` node to check.
* @returns {boolean} `true` if the node is a `case` node (not `default` node).
*/
function isCaseNode(node) {
return Boolean(node.test);
}
/**
* Checks if a given node appears as the value of a PropertyDefinition node.
* @param {ASTNode} node THe node to check.
* @returns {boolean} `true` if the node is a PropertyDefinition value,
* false if not.
*/
function isPropertyDefinitionValue(node) {
const parent = node.parent;
return (
parent && parent.type === "PropertyDefinition" && parent.value === node
);
}
/**
* Checks whether the given logical operator is taken into account for the code
* path analysis.
* @param {string} operator The operator found in the LogicalExpression node
* @returns {boolean} `true` if the operator is "&&" or "||" or "??"
*/
function isHandledLogicalOperator(operator) {
return operator === "&&" || operator === "||" || operator === "??";
}
/**
* Checks whether the given assignment operator is a logical assignment operator.
* Logical assignments are taken into account for the code path analysis
* because of their short-circuiting semantics.
* @param {string} operator The operator found in the AssignmentExpression node
* @returns {boolean} `true` if the operator is "&&=" or "||=" or "??="
*/
function isLogicalAssignmentOperator(operator) {
return operator === "&&=" || operator === "||=" || operator === "??=";
}
/**
* Gets the label if the parent node of a given node is a LabeledStatement.
* @param {ASTNode} node A node to get.
* @returns {string|null} The label or `null`.
*/
function getLabel(node) {
if (node.parent.type === "LabeledStatement") {
return node.parent.label.name;
}
return null;
}
/**
* Checks whether or not a given logical expression node goes different path
* between the `true` case and the `false` case.
* @param {ASTNode} node A node to check.
* @returns {boolean} `true` if the node is a test of a choice statement.
*/
function isForkingByTrueOrFalse(node) {
const parent = node.parent;
switch (parent.type) {
case "ConditionalExpression":
case "IfStatement":
case "WhileStatement":
case "DoWhileStatement":
case "ForStatement":
return parent.test === node;
case "LogicalExpression":
return isHandledLogicalOperator(parent.operator);
case "AssignmentExpression":
return isLogicalAssignmentOperator(parent.operator);
default:
return false;
}
}
/**
* Gets the boolean value of a given literal node.
*
* This is used to detect infinity loops (e.g. `while (true) {}`).
* Statements preceded by an infinity loop are unreachable if the loop didn't
* have any `break` statement.
* @param {ASTNode} node A node to get.
* @returns {boolean|undefined} a boolean value if the node is a Literal node,
* otherwise `undefined`.
*/
function getBooleanValueIfSimpleConstant(node) {
if (node.type === "Literal") {
return Boolean(node.value);
}
return void 0;
}
/**
* Checks that a given identifier node is a reference or not.
*
* This is used to detect the first throwable node in a `try` block.
* @param {ASTNode} node An Identifier node to check.
* @returns {boolean} `true` if the node is a reference.
*/
function isIdentifierReference(node) {
const parent = node.parent;
switch (parent.type) {
case "LabeledStatement":
case "BreakStatement":
case "ContinueStatement":
case "ArrayPattern":
case "RestElement":
case "ImportSpecifier":
case "ImportDefaultSpecifier":
case "ImportNamespaceSpecifier":
case "CatchClause":
return false;
case "FunctionDeclaration":
case "FunctionExpression":
case "ArrowFunctionExpression":
case "ClassDeclaration":
case "ClassExpression":
case "VariableDeclarator":
return parent.id !== node;
case "Property":
case "PropertyDefinition":
case "MethodDefinition":
return parent.key !== node || parent.computed || parent.shorthand;
case "AssignmentPattern":
return parent.key !== node;
default:
return true;
}
}
/**
* Updates the current segment with the head segment.
* This is similar to local branches and tracking branches of git.
*
* To separate the current and the head is in order to not make useless segments.
*
* In this process, both "onCodePathSegmentStart" and "onCodePathSegmentEnd"
* events are fired.
* @param {CodePathAnalyzer} analyzer The instance.
* @param {ASTNode} node The current AST node.
* @returns {void}
*/
function forwardCurrentToHead(analyzer, node) {
const codePath = analyzer.codePath;
const state = CodePath.getState(codePath);
const currentSegments = state.currentSegments;
const headSegments = state.headSegments;
const end = Math.max(currentSegments.length, headSegments.length);
let i, currentSegment, headSegment;
// Fires leaving events.
for (i = 0; i < end; ++i) {
currentSegment = currentSegments[i];
headSegment = headSegments[i];
if (currentSegment !== headSegment && currentSegment) {
const eventName = currentSegment.reachable
? "onCodePathSegmentEnd"
: "onUnreachableCodePathSegmentEnd";
debug.dump(`${eventName} ${currentSegment.id}`);
analyzer.emit(eventName, [currentSegment, node]);
}
}
// Update state.
state.currentSegments = headSegments;
// Fires entering events.
for (i = 0; i < end; ++i) {
currentSegment = currentSegments[i];
headSegment = headSegments[i];
if (currentSegment !== headSegment && headSegment) {
const eventName = headSegment.reachable
? "onCodePathSegmentStart"
: "onUnreachableCodePathSegmentStart";
debug.dump(`${eventName} ${headSegment.id}`);
CodePathSegment.markUsed(headSegment);
analyzer.emit(eventName, [headSegment, node]);
}
}
}
/**
* Updates the current segment with empty.
* This is called at the last of functions or the program.
* @param {CodePathAnalyzer} analyzer The instance.
* @param {ASTNode} node The current AST node.
* @returns {void}
*/
function leaveFromCurrentSegment(analyzer, node) {
const state = CodePath.getState(analyzer.codePath);
const currentSegments = state.currentSegments;
for (let i = 0; i < currentSegments.length; ++i) {
const currentSegment = currentSegments[i];
const eventName = currentSegment.reachable
? "onCodePathSegmentEnd"
: "onUnreachableCodePathSegmentEnd";
debug.dump(`${eventName} ${currentSegment.id}`);
analyzer.emit(eventName, [currentSegment, node]);
}
state.currentSegments = [];
}
/**
* Updates the code path due to the position of a given node in the parent node
* thereof.
*
* For example, if the node is `parent.consequent`, this creates a fork from the
* current path.
* @param {CodePathAnalyzer} analyzer The instance.
* @param {ASTNode} node The current AST node.
* @returns {void}
*/
function preprocess(analyzer, node) {
const codePath = analyzer.codePath;
const state = CodePath.getState(codePath);
const parent = node.parent;
switch (parent.type) {
// The `arguments.length == 0` case is in `postprocess` function.
case "CallExpression":
if (
parent.optional === true &&
parent.arguments.length >= 1 &&
parent.arguments[0] === node
) {
state.makeOptionalRight();
}
break;
case "MemberExpression":
if (parent.optional === true && parent.property === node) {
state.makeOptionalRight();
}
break;
case "LogicalExpression":
if (
parent.right === node &&
isHandledLogicalOperator(parent.operator)
) {
state.makeLogicalRight();
}
break;
case "AssignmentExpression":
if (
parent.right === node &&
isLogicalAssignmentOperator(parent.operator)
) {
state.makeLogicalRight();
}
break;
case "ConditionalExpression":
case "IfStatement":
/*
* Fork if this node is at `consequent`/`alternate`.
* `popForkContext()` exists at `IfStatement:exit` and
* `ConditionalExpression:exit`.
*/
if (parent.consequent === node) {
state.makeIfConsequent();
} else if (parent.alternate === node) {
state.makeIfAlternate();
}
break;
case "SwitchCase":
if (parent.consequent[0] === node) {
state.makeSwitchCaseBody(false, !parent.test);
}
break;
case "TryStatement":
if (parent.handler === node) {
state.makeCatchBlock();
} else if (parent.finalizer === node) {
state.makeFinallyBlock();
}
break;
case "WhileStatement":
if (parent.test === node) {
state.makeWhileTest(getBooleanValueIfSimpleConstant(node));
} else {
assert(parent.body === node);
state.makeWhileBody();
}
break;
case "DoWhileStatement":
if (parent.body === node) {
state.makeDoWhileBody();
} else {
assert(parent.test === node);
state.makeDoWhileTest(getBooleanValueIfSimpleConstant(node));
}
break;
case "ForStatement":
if (parent.test === node) {
state.makeForTest(getBooleanValueIfSimpleConstant(node));
} else if (parent.update === node) {
state.makeForUpdate();
} else if (parent.body === node) {
state.makeForBody();
}
break;
case "ForInStatement":
case "ForOfStatement":
if (parent.left === node) {
state.makeForInOfLeft();
} else if (parent.right === node) {
state.makeForInOfRight();
} else {
assert(parent.body === node);
state.makeForInOfBody();
}
break;
case "AssignmentPattern":
/*
* Fork if this node is at `right`.
* `left` is executed always, so it uses the current path.
* `popForkContext()` exists at `AssignmentPattern:exit`.
*/
if (parent.right === node) {
state.pushForkContext();
state.forkBypassPath();
state.forkPath();
}
break;
default:
break;
}
}
/**
* Updates the code path due to the type of a given node in entering.
* @param {CodePathAnalyzer} analyzer The instance.
* @param {ASTNode} node The current AST node.
* @returns {void}
*/
function processCodePathToEnter(analyzer, node) {
let codePath = analyzer.codePath;
let state = codePath && CodePath.getState(codePath);
const parent = node.parent;
/**
* Creates a new code path and trigger the onCodePathStart event
* based on the currently selected node.
* @param {string} origin The reason the code path was started.
* @returns {void}
*/
function startCodePath(origin) {
if (codePath) {
// Emits onCodePathSegmentStart events if updated.
forwardCurrentToHead(analyzer, node);
debug.dumpState(node, state, false);
}
// Create the code path of this scope.
codePath = analyzer.codePath = new CodePath({
id: analyzer.idGenerator.next(),
origin,
upper: codePath,
onLooped: analyzer.onLooped,
});
state = CodePath.getState(codePath);
// Emits onCodePathStart events.
debug.dump(`onCodePathStart ${codePath.id}`);
analyzer.emit("onCodePathStart", [codePath, node]);
}
/*
* Special case: The right side of class field initializer is considered
* to be its own function, so we need to start a new code path in this
* case.
*/
if (isPropertyDefinitionValue(node)) {
startCodePath("class-field-initializer");
/*
* Intentional fall through because `node` needs to also be
* processed by the code below. For example, if we have:
*
* class Foo {
* a = () => {}
* }
*
* In this case, we also need start a second code path.
*/
}
switch (node.type) {
case "Program":
startCodePath("program");
break;
case "FunctionDeclaration":
case "FunctionExpression":
case "ArrowFunctionExpression":
startCodePath("function");
break;
case "StaticBlock":
startCodePath("class-static-block");
break;
case "ChainExpression":
state.pushChainContext();
break;
case "CallExpression":
if (node.optional === true) {
state.makeOptionalNode();
}
break;
case "MemberExpression":
if (node.optional === true) {
state.makeOptionalNode();
}
break;
case "LogicalExpression":
if (isHandledLogicalOperator(node.operator)) {
state.pushChoiceContext(
node.operator,
isForkingByTrueOrFalse(node),
);
}
break;
case "AssignmentExpression":
if (isLogicalAssignmentOperator(node.operator)) {
state.pushChoiceContext(
node.operator.slice(0, -1), // removes `=` from the end
isForkingByTrueOrFalse(node),
);
}
break;
case "ConditionalExpression":
case "IfStatement":
state.pushChoiceContext("test", false);
break;
case "SwitchStatement":
state.pushSwitchContext(
node.cases.some(isCaseNode),
getLabel(node),
);
break;
case "TryStatement":
state.pushTryContext(Boolean(node.finalizer));
break;
case "SwitchCase":
/*
* Fork if this node is after the 2st node in `cases`.
* It's similar to `else` blocks.
* The next `test` node is processed in this path.
*/
if (parent.discriminant !== node && parent.cases[0] !== node) {
state.forkPath();
}
break;
case "WhileStatement":
case "DoWhileStatement":
case "ForStatement":
case "ForInStatement":
case "ForOfStatement":
state.pushLoopContext(node.type, getLabel(node));
break;
case "LabeledStatement":
if (!breakableTypePattern.test(node.body.type)) {
state.pushBreakContext(false, node.label.name);
}
break;
default:
break;
}
// Emits onCodePathSegmentStart events if updated.
forwardCurrentToHead(analyzer, node);
debug.dumpState(node, state, false);
}
/**
* Updates the code path due to the type of a given node in leaving.
* @param {CodePathAnalyzer} analyzer The instance.
* @param {ASTNode} node The current AST node.
* @returns {void}
*/
function processCodePathToExit(analyzer, node) {
const codePath = analyzer.codePath;
const state = CodePath.getState(codePath);
let dontForward = false;
switch (node.type) {
case "ChainExpression":
state.popChainContext();
break;
case "IfStatement":
case "ConditionalExpression":
state.popChoiceContext();
break;
case "LogicalExpression":
if (isHandledLogicalOperator(node.operator)) {
state.popChoiceContext();
}
break;
case "AssignmentExpression":
if (isLogicalAssignmentOperator(node.operator)) {
state.popChoiceContext();
}
break;
case "SwitchStatement":
state.popSwitchContext();
break;
case "SwitchCase":
/*
* This is the same as the process at the 1st `consequent` node in
* `preprocess` function.
* Must do if this `consequent` is empty.
*/
if (node.consequent.length === 0) {
state.makeSwitchCaseBody(true, !node.test);
}
if (state.forkContext.reachable) {
dontForward = true;
}
break;
case "TryStatement":
state.popTryContext();
break;
case "BreakStatement":
forwardCurrentToHead(analyzer, node);
state.makeBreak(node.label && node.label.name);
dontForward = true;
break;
case "ContinueStatement":
forwardCurrentToHead(analyzer, node);
state.makeContinue(node.label && node.label.name);
dontForward = true;
break;
case "ReturnStatement":
forwardCurrentToHead(analyzer, node);
state.makeReturn();
dontForward = true;
break;
case "ThrowStatement":
forwardCurrentToHead(analyzer, node);
state.makeThrow();
dontForward = true;
break;
case "Identifier":
if (isIdentifierReference(node)) {
state.makeFirstThrowablePathInTryBlock();
dontForward = true;
}
break;
case "CallExpression":
case "ImportExpression":
case "MemberExpression":
case "NewExpression":
case "YieldExpression":
state.makeFirstThrowablePathInTryBlock();
break;
case "WhileStatement":
case "DoWhileStatement":
case "ForStatement":
case "ForInStatement":
case "ForOfStatement":
state.popLoopContext();
break;
case "AssignmentPattern":
state.popForkContext();
break;
case "LabeledStatement":
if (!breakableTypePattern.test(node.body.type)) {
state.popBreakContext();
}
break;
default:
break;
}
// Emits onCodePathSegmentStart events if updated.
if (!dontForward) {
forwardCurrentToHead(analyzer, node);
}
debug.dumpState(node, state, true);
}
/**
* Updates the code path to finalize the current code path.
* @param {CodePathAnalyzer} analyzer The instance.
* @param {ASTNode} node The current AST node.
* @returns {void}
*/
function postprocess(analyzer, node) {
/**
* Ends the code path for the current node.
* @returns {void}
*/
function endCodePath() {
let codePath = analyzer.codePath;
// Mark the current path as the final node.
CodePath.getState(codePath).makeFinal();
// Emits onCodePathSegmentEnd event of the current segments.
leaveFromCurrentSegment(analyzer, node);
// Emits onCodePathEnd event of this code path.
debug.dump(`onCodePathEnd ${codePath.id}`);
analyzer.emit("onCodePathEnd", [codePath, node]);
debug.dumpDot(codePath);
codePath = analyzer.codePath = analyzer.codePath.upper;
if (codePath) {
debug.dumpState(node, CodePath.getState(codePath), true);
}
}
switch (node.type) {
case "Program":
case "FunctionDeclaration":
case "FunctionExpression":
case "ArrowFunctionExpression":
case "StaticBlock": {
endCodePath();
break;
}
// The `arguments.length >= 1` case is in `preprocess` function.
case "CallExpression":
if (node.optional === true && node.arguments.length === 0) {
CodePath.getState(analyzer.codePath).makeOptionalRight();
}
break;
default:
break;
}
/*
* Special case: The right side of class field initializer is considered
* to be its own function, so we need to end a code path in this
* case.
*
* We need to check after the other checks in order to close the
* code paths in the correct order for code like this:
*
*
* class Foo {
* a = () => {}
* }
*
* In this case, The ArrowFunctionExpression code path is closed first
* and then we need to close the code path for the PropertyDefinition
* value.
*/
if (isPropertyDefinitionValue(node)) {
endCodePath();
}
}
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
/**
* The class to analyze code paths.
* This class implements the EventGenerator interface.
*/
class CodePathAnalyzer {
/**
* @param {EventGenerator} eventGenerator An event generator to wrap.
*/
constructor(eventGenerator) {
this.original = eventGenerator;
this.emit = eventGenerator.emit;
this.codePath = null;
this.idGenerator = new IdGenerator("s");
this.currentNode = null;
this.onLooped = this.onLooped.bind(this);
}
/**
* Does the process to enter a given AST node.
* This updates state of analysis and calls `enterNode` of the wrapped.
* @param {ASTNode} node A node which is entering.
* @returns {void}
*/
enterNode(node) {
this.currentNode = node;
// Updates the code path due to node's position in its parent node.
if (node.parent) {
preprocess(this, node);
}
/*
* Updates the code path.
* And emits onCodePathStart/onCodePathSegmentStart events.
*/
processCodePathToEnter(this, node);
// Emits node events.
this.original.enterNode(node);
this.currentNode = null;
}
/**
* Does the process to leave a given AST node.
* This updates state of analysis and calls `leaveNode` of the wrapped.
* @param {ASTNode} node A node which is leaving.
* @returns {void}
*/
leaveNode(node) {
this.currentNode = node;
/*
* Updates the code path.
* And emits onCodePathStart/onCodePathSegmentStart events.
*/
processCodePathToExit(this, node);
// Emits node events.
this.original.leaveNode(node);
// Emits the last onCodePathStart/onCodePathSegmentStart events.
postprocess(this, node);
this.currentNode = null;
}
/**
* This is called on a code path looped.
* Then this raises a looped event.
* @param {CodePathSegment} fromSegment A segment of prev.
* @param {CodePathSegment} toSegment A segment of next.
* @returns {void}
*/
onLooped(fromSegment, toSegment) {
if (fromSegment.reachable && toSegment.reachable) {
debug.dump(
`onCodePathSegmentLoop ${fromSegment.id} -> ${toSegment.id}`,
);
this.emit("onCodePathSegmentLoop", [
fromSegment,
toSegment,
this.currentNode,
]);
}
}
}
module.exports = CodePathAnalyzer;
@@ -0,0 +1,88 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _isSemanticRoleElement = _interopRequireDefault(require("../util/isSemanticRoleElement"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce that elements with ARIA roles must
* have all required attributes for that role.
* @author Ethan Cohen
*/
// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
var errorMessage = function errorMessage(role, requiredProps) {
return "Elements with the ARIA role \"".concat(role, "\" must have the following attributes defined: ").concat(String(requiredProps).toLowerCase());
};
var schema = (0, _schemas.generateObjSchema)();
var roleKeys = _ariaQuery.roles.keys();
var _default = exports["default"] = {
meta: {
docs: {
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md',
description: 'Enforce that elements with ARIA roles must have all required attributes for that role.'
},
schema: [schema]
},
create: function create(context) {
var elementType = (0, _getElementType["default"])(context);
return {
JSXAttribute: function JSXAttribute(attribute) {
var name = (0, _jsxAstUtils.propName)(attribute).toLowerCase();
if (name !== 'role') {
return;
}
var type = elementType(attribute.parent);
if (!_ariaQuery.dom.get(type)) {
return;
}
var roleAttrValue = (0, _jsxAstUtils.getLiteralPropValue)(attribute);
var attributes = attribute.parent.attributes;
// If value is undefined, then the role attribute will be dropped in the DOM.
// If value is null, then getLiteralAttributeValue is telling us
// that the value isn't in the form of a literal.
if (roleAttrValue === undefined || roleAttrValue === null) {
return;
}
var normalizedValues = String(roleAttrValue).toLowerCase().split(' ');
var validRoles = normalizedValues.filter(function (val) {
return roleKeys.indexOf(val) > -1;
});
// Check semantic DOM elements
// For example, <input type="checkbox" role="switch" />
if ((0, _isSemanticRoleElement["default"])(type, attributes)) {
return;
}
// Check arbitrary DOM elements
validRoles.forEach(function (role) {
var _roles$get = _ariaQuery.roles.get(role),
requiredPropKeyValues = _roles$get.requiredProps;
var requiredProps = Object.keys(requiredPropKeyValues);
if (requiredProps.length > 0) {
var hasRequiredProps = requiredProps.every(function (prop) {
return (0, _jsxAstUtils.getProp)(attributes, prop);
});
if (hasRequiredProps === false) {
context.report({
node: attribute,
message: errorMessage(role.toLowerCase(), requiredProps)
});
}
}
});
}
};
}
};
module.exports = exports.default;
@@ -0,0 +1,32 @@
'use strict'
const tape = require('tape')
const { BufferList, BufferListStream } = require('../')
const { Buffer } = require('buffer')
tape('isBufferList positives', (t) => {
t.ok(BufferList.isBufferList(new BufferList()))
t.ok(BufferList.isBufferList(new BufferListStream()))
t.end()
})
tape('isBufferList negatives', (t) => {
const types = [
null,
undefined,
NaN,
true,
false,
{},
[],
Buffer.alloc(0),
[Buffer.alloc(0)]
]
for (const obj of types) {
t.notOk(BufferList.isBufferList(obj))
}
t.end()
})
@@ -0,0 +1,239 @@
{
"name": "axios",
"version": "1.13.2",
"description": "Promise based HTTP client for the browser and node.js",
"main": "index.js",
"exports": {
".": {
"types": {
"require": "./index.d.cts",
"default": "./index.d.ts"
},
"react-native": {
"require": "./dist/browser/axios.cjs",
"default": "./dist/esm/axios.js"
},
"browser": {
"require": "./dist/browser/axios.cjs",
"default": "./index.js"
},
"default": {
"require": "./dist/node/axios.cjs",
"default": "./index.js"
}
},
"./lib/adapters/http.js": "./lib/adapters/http.js",
"./lib/adapters/xhr.js": "./lib/adapters/xhr.js",
"./unsafe/*": "./lib/*",
"./unsafe/core/settle.js": "./lib/core/settle.js",
"./unsafe/core/buildFullPath.js": "./lib/core/buildFullPath.js",
"./unsafe/helpers/isAbsoluteURL.js": "./lib/helpers/isAbsoluteURL.js",
"./unsafe/helpers/buildURL.js": "./lib/helpers/buildURL.js",
"./unsafe/helpers/combineURLs.js": "./lib/helpers/combineURLs.js",
"./unsafe/adapters/http.js": "./lib/adapters/http.js",
"./unsafe/adapters/xhr.js": "./lib/adapters/xhr.js",
"./unsafe/utils.js": "./lib/utils.js",
"./package.json": "./package.json",
"./dist/browser/axios.cjs": "./dist/browser/axios.cjs",
"./dist/node/axios.cjs": "./dist/node/axios.cjs"
},
"type": "module",
"types": "index.d.ts",
"scripts": {
"test": "npm run test:node && npm run test:browser && npm run test:package",
"test:node": "npm run test:mocha",
"test:browser": "npm run test:karma",
"test:package": "npm run test:eslint && npm run test:dtslint && npm run test:exports",
"test:eslint": "node bin/ssl_hotfix.js eslint lib/**/*.js",
"test:dtslint": "dtslint --localTs node_modules/typescript/lib",
"test:mocha": "node bin/ssl_hotfix.js mocha test/unit/**/*.js --timeout 30000 --exit",
"test:exports": "node bin/ssl_hotfix.js mocha test/module/test.js --timeout 30000 --exit",
"test:karma": "node ./bin/run-karma-tests.js",
"test:karma:firefox": "node bin/ssl_hotfix.js cross-env LISTEN_ADDR=:: Browsers=Firefox karma start karma.conf.cjs --single-run",
"test:karma:server": "node bin/ssl_hotfix.js cross-env karma start karma.conf.cjs",
"test:build:version": "node ./bin/check-build-version.js",
"start": "node ./sandbox/server.js",
"preversion": "gulp version",
"version": "npm run build && git add package.json",
"prepublishOnly": "npm run test:build:version",
"postpublish": "git push && git push --tags",
"build": "gulp clear && cross-env NODE_ENV=production rollup -c -m",
"examples": "node ./examples/server.js",
"coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"fix": "eslint --fix lib/**/*.js",
"prepare": "husky install && npm run prepare:hooks",
"prepare:hooks": "npx husky set .husky/commit-msg \"npx commitlint --edit $1\"",
"release:dry": "release-it --dry-run --no-npm",
"release:info": "release-it --release-version",
"release:beta:no-npm": "release-it --preRelease=beta --no-npm",
"release:beta": "release-it --preRelease=beta",
"release:no-npm": "release-it --no-npm",
"release:changelog:fix": "node ./bin/injectContributorsList.js && git add CHANGELOG.md",
"release": "release-it"
},
"repository": {
"type": "git",
"url": "https://github.com/axios/axios.git"
},
"keywords": [
"xhr",
"http",
"ajax",
"promise",
"node",
"browser",
"fetch",
"rest",
"api",
"client"
],
"author": "Matt Zabriskie",
"license": "MIT",
"bugs": {
"url": "https://github.com/axios/axios/issues"
},
"homepage": "https://axios-http.com",
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@release-it/conventional-changelog": "^5.1.1",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"abortcontroller-polyfill": "^1.7.5",
"auto-changelog": "^2.4.0",
"body-parser": "^1.20.2",
"chalk": "^5.3.0",
"coveralls": "^3.1.1",
"cross-env": "^7.0.3",
"dev-null": "^0.1.1",
"dtslint": "^4.2.1",
"es6-promise": "^4.2.8",
"eslint": "^8.56.0",
"express": "^4.18.2",
"formdata-node": "^5.0.1",
"formidable": "^2.1.2",
"fs-extra": "^10.1.0",
"get-stream": "^3.0.0",
"gulp": "^4.0.2",
"handlebars": "^4.7.8",
"husky": "^8.0.3",
"istanbul-instrumenter-loader": "^3.0.1",
"jasmine-core": "^2.99.1",
"karma": "^6.3.17",
"karma-chrome-launcher": "^3.2.0",
"karma-firefox-launcher": "^2.1.2",
"karma-jasmine": "^1.1.2",
"karma-jasmine-ajax": "^0.1.13",
"karma-rollup-preprocessor": "^7.0.8",
"karma-safari-launcher": "^1.0.0",
"karma-sauce-launcher": "^4.3.6",
"karma-sinon": "^1.0.5",
"karma-sourcemap-loader": "^0.3.8",
"memoizee": "^0.4.15",
"minimist": "^1.2.8",
"mocha": "^10.3.0",
"multer": "^1.4.4",
"pacote": "^20.0.0",
"pretty-bytes": "^6.1.1",
"release-it": "^15.11.0",
"rollup": "^2.79.1",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-terser": "^7.0.2",
"selfsigned": "^3.0.1",
"sinon": "^4.5.0",
"stream-throttle": "^0.1.3",
"string-replace-async": "^3.0.2",
"tar-stream": "^3.1.7",
"typescript": "^4.9.5"
},
"browser": {
"./lib/adapters/http.js": "./lib/helpers/null.js",
"./lib/platform/node/index.js": "./lib/platform/browser/index.js",
"./lib/platform/node/classes/FormData.js": "./lib/helpers/null.js"
},
"react-native": {
"./lib/adapters/http.js": "./lib/helpers/null.js",
"./lib/platform/node/index.js": "./lib/platform/browser/index.js",
"./lib/platform/node/classes/FormData.js": "./lib/helpers/null.js"
},
"jsdelivr": "dist/axios.min.js",
"unpkg": "dist/axios.min.js",
"typings": "./index.d.ts",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.4",
"proxy-from-env": "^1.1.0"
},
"bundlesize": [
{
"path": "./dist/axios.min.js",
"threshold": "5kB"
}
],
"contributors": [
"Matt Zabriskie (https://github.com/mzabriskie)",
"Dmitriy Mozgovoy (https://github.com/DigitalBrainJS)",
"Nick Uraltsev (https://github.com/nickuraltsev)",
"Jay (https://github.com/jasonsaayman)",
"Emily Morehouse (https://github.com/emilyemorehouse)",
"Rubén Norte (https://github.com/rubennorte)",
"Justin Beckwith (https://github.com/JustinBeckwith)",
"Martti Laine (https://github.com/codeclown)",
"Xianming Zhong (https://github.com/chinesedfan)",
"Remco Haszing (https://github.com/remcohaszing)",
"Rikki Gibson (https://github.com/RikkiGibson)",
"Willian Agostini (https://github.com/WillianAgostini)",
"Ben Carp (https://github.com/carpben)"
],
"sideEffects": false,
"release-it": {
"git": {
"commitMessage": "chore(release): v${version}",
"push": true,
"commit": true,
"tag": true,
"requireCommits": false,
"requireCleanWorkingDir": false
},
"github": {
"release": true,
"draft": true
},
"npm": {
"publish": false,
"ignoreVersion": false
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular",
"infile": "CHANGELOG.md",
"header": "# Changelog"
}
},
"hooks": {
"before:init": "npm test",
"after:bump": "gulp version --bump ${version} && npm run build && npm run test:build:version",
"before:release": "npm run release:changelog:fix && git add ./package-lock.json",
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
}
},
"commitlint": {
"rules": {
"header-max-length": [
2,
"always",
130
]
},
"extends": [
"@commitlint/config-conventional"
]
}
}
@@ -0,0 +1,397 @@
type CSSDeclarationList = Record<string, string>
export type DefaultTheme = {
animation: Record<'none' | 'spin' | 'ping' | 'pulse' | 'bounce', string>
aria: Record<
| 'busy'
| 'checked'
| 'disabled'
| 'expanded'
| 'hidden'
| 'pressed'
| 'readonly'
| 'required'
| 'selected',
string
>
aspectRatio: Record<'auto' | 'square' | 'video', string>
backgroundImage: Record<
| 'none'
| 'gradient-to-t'
| 'gradient-to-tr'
| 'gradient-to-r'
| 'gradient-to-br'
| 'gradient-to-b'
| 'gradient-to-bl'
| 'gradient-to-l'
| 'gradient-to-tl',
string
>
backgroundPosition: Record<
| 'bottom'
| 'center'
| 'left'
| 'left-bottom'
| 'left-top'
| 'right'
| 'right-bottom'
| 'right-top'
| 'top',
string
>
backgroundSize: Record<'auto' | 'cover' | 'contain', string>
blur: Record<'0' | 'none' | 'sm' | 'DEFAULT' | 'md' | 'lg' | 'xl' | '2xl' | '3xl', string>
borderRadius: Record<
'none' | 'sm' | 'DEFAULT' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full',
string
>
borderWidth: Record<'0' | '2' | '4' | '8' | 'DEFAULT', string>
boxShadow: Record<'sm' | 'DEFAULT' | 'md' | 'lg' | 'xl' | '2xl' | 'inner' | 'none', string>
brightness: Record<
'0' | '50' | '75' | '90' | '95' | '100' | '105' | '110' | '125' | '150' | '200',
string
>
columns: Record<
| '1'
| '2'
| '3'
| '4'
| '5'
| '6'
| '7'
| '8'
| '9'
| '10'
| '11'
| '12'
| 'auto'
| '3xs'
| '2xs'
| 'xs'
| 'sm'
| 'md'
| 'lg'
| 'xl'
| '2xl'
| '3xl'
| '4xl'
| '5xl'
| '6xl'
| '7xl',
string
>
content: Record<'none', string>
contrast: Record<'0' | '50' | '75' | '100' | '125' | '150' | '200', string>
cursor: Record<
| 'auto'
| 'default'
| 'pointer'
| 'wait'
| 'text'
| 'move'
| 'help'
| 'not-allowed'
| 'none'
| 'context-menu'
| 'progress'
| 'cell'
| 'crosshair'
| 'vertical-text'
| 'alias'
| 'copy'
| 'no-drop'
| 'grab'
| 'grabbing'
| 'all-scroll'
| 'col-resize'
| 'row-resize'
| 'n-resize'
| 'e-resize'
| 's-resize'
| 'w-resize'
| 'ne-resize'
| 'nw-resize'
| 'se-resize'
| 'sw-resize'
| 'ew-resize'
| 'ns-resize'
| 'nesw-resize'
| 'nwse-resize'
| 'zoom-in'
| 'zoom-out',
string
>
dropShadow: Record<'sm' | 'DEFAULT' | 'md' | 'lg' | 'xl' | '2xl' | 'none', string | string[]>
flex: Record<'1' | 'auto' | 'initial' | 'none', string>
flexGrow: Record<'0' | 'DEFAULT', string>
flexShrink: Record<'0' | 'DEFAULT', string>
fontFamily: Record<'sans' | 'serif' | 'mono', string[]>
fontSize: Record<
| 'xs'
| 'sm'
| 'base'
| 'lg'
| 'xl'
| '2xl'
| '3xl'
| '4xl'
| '5xl'
| '6xl'
| '7xl'
| '8xl'
| '9xl',
[string, { lineHeight: string }]
>
fontWeight: Record<
| 'thin'
| 'extralight'
| 'light'
| 'normal'
| 'medium'
| 'semibold'
| 'bold'
| 'extrabold'
| 'black',
string
>
gradientColorStopPositions: Record<
| '0%'
| '5%'
| '10%'
| '15%'
| '20%'
| '25%'
| '30%'
| '35%'
| '40%'
| '45%'
| '50%'
| '55%'
| '60%'
| '65%'
| '70%'
| '75%'
| '80%'
| '85%'
| '90%'
| '95%'
| '100%',
string
>
grayscale: Record<'0' | 'DEFAULT', string>
gridAutoColumns: Record<'auto' | 'min' | 'max' | 'fr', string>
gridAutoRows: Record<'auto' | 'min' | 'max' | 'fr', string>
gridColumn: Record<
| 'auto'
| 'span-1'
| 'span-2'
| 'span-3'
| 'span-4'
| 'span-5'
| 'span-6'
| 'span-7'
| 'span-8'
| 'span-9'
| 'span-10'
| 'span-11'
| 'span-12'
| 'span-full',
string
>
gridColumnEnd: Record<
'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | 'auto',
string
>
gridColumnStart: Record<
'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | 'auto',
string
>
gridRow: Record<
| 'auto'
| 'span-1'
| 'span-2'
| 'span-3'
| 'span-4'
| 'span-5'
| 'span-6'
| 'span-7'
| 'span-8'
| 'span-9'
| 'span-10'
| 'span-11'
| 'span-12'
| 'span-full',
string
>
gridRowEnd: Record<
'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | 'auto',
string
>
gridRowStart: Record<
'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | 'auto',
string
>
gridTemplateColumns: Record<
'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | 'none' | 'subgrid',
string
>
gridTemplateRows: Record<
'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | 'none' | 'subgrid',
string
>
hueRotate: Record<'0' | '15' | '30' | '60' | '90' | '180', string>
invert: Record<'0' | 'DEFAULT', string>
keyframes: Record<'spin' | 'ping' | 'pulse' | 'bounce', Record<string, CSSDeclarationList>>
letterSpacing: Record<'tighter' | 'tight' | 'normal' | 'wide' | 'wider' | 'widest', string>
lineHeight: Record<
| '3'
| '4'
| '5'
| '6'
| '7'
| '8'
| '9'
| '10'
| 'none'
| 'tight'
| 'snug'
| 'normal'
| 'relaxed'
| 'loose',
string
>
listStyleType: Record<'none' | 'disc' | 'decimal', string>
listStyleImage: Record<'none', string>
lineClamp: Record<'1' | '2' | '3' | '4' | '5' | '6', string>
objectPosition: Record<
| 'bottom'
| 'center'
| 'left'
| 'left-bottom'
| 'left-top'
| 'right'
| 'right-bottom'
| 'right-top'
| 'top',
string
>
opacity: Record<
| '0'
| '5'
| '10'
| '15'
| '20'
| '25'
| '30'
| '35'
| '40'
| '45'
| '50'
| '55'
| '60'
| '65'
| '70'
| '75'
| '80'
| '85'
| '90'
| '95'
| '100',
string
>
order: Record<
| '1'
| '2'
| '3'
| '4'
| '5'
| '6'
| '7'
| '8'
| '9'
| '10'
| '11'
| '12'
| 'first'
| 'last'
| 'none',
string
>
outlineOffset: Record<'0' | '1' | '2' | '4' | '8', string>
outlineWidth: Record<'0' | '1' | '2' | '4' | '8', string>
ringOffsetWidth: Record<'0' | '1' | '2' | '4' | '8', string>
ringWidth: Record<'0' | '1' | '2' | '4' | '8' | 'DEFAULT', string>
rotate: Record<'0' | '1' | '2' | '3' | '6' | '12' | '45' | '90' | '180', string>
saturate: Record<'0' | '50' | '100' | '150' | '200', string>
scale: Record<'0' | '50' | '75' | '90' | '95' | '100' | '105' | '110' | '125' | '150', string>
screens: Record<'sm' | 'md' | 'lg' | 'xl' | '2xl', string>
sepia: Record<'0' | 'DEFAULT', string>
skew: Record<'0' | '1' | '2' | '3' | '6' | '12', string>
spacing: Record<
| '0'
| '1'
| '2'
| '3'
| '4'
| '5'
| '6'
| '7'
| '8'
| '9'
| '10'
| '11'
| '12'
| '14'
| '16'
| '20'
| '24'
| '28'
| '32'
| '36'
| '40'
| '44'
| '48'
| '52'
| '56'
| '60'
| '64'
| '72'
| '80'
| '96'
| 'px'
| '0.5'
| '1.5'
| '2.5'
| '3.5',
string
>
strokeWidth: Record<'0' | '1' | '2', string>
textDecorationThickness: Record<'0' | '1' | '2' | '4' | '8' | 'auto' | 'from-font', string>
textUnderlineOffset: Record<'0' | '1' | '2' | '4' | '8' | 'auto', string>
transformOrigin: Record<
| 'center'
| 'top'
| 'top-right'
| 'right'
| 'bottom-right'
| 'bottom'
| 'bottom-left'
| 'left'
| 'top-left',
string
>
transitionDelay: Record<
'0' | '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000',
string
>
transitionDuration: Record<
'0' | '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000' | 'DEFAULT',
string
>
transitionProperty: Record<
'none' | 'all' | 'DEFAULT' | 'colors' | 'opacity' | 'shadow' | 'transform',
string
>
transitionTimingFunction: Record<'DEFAULT' | 'linear' | 'in' | 'out' | 'in-out', string>
willChange: Record<'auto' | 'scroll' | 'contents' | 'transform', string>
zIndex: Record<'0' | '10' | '20' | '30' | '40' | '50' | 'auto', string>
}
@@ -0,0 +1,53 @@
{
"name": "append-buffer",
"description": "Append a buffer to another buffer ensuring to preserve line ending characters.",
"version": "1.0.2",
"homepage": "https://github.com/doowb/append-buffer",
"author": "Brian Woodward (https://doowb.com)",
"repository": "doowb/append-buffer",
"bugs": {
"url": "https://github.com/doowb/append-buffer/issues"
},
"license": "MIT",
"files": [
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"keywords": [
"append",
"append-buffer",
"concat",
"concat-buffer",
"eol",
"join",
"join-buffer",
"normalize",
"buffer"
],
"devDependencies": {
"gulp-format-md": "^1.0.0",
"mocha": "^3.5.0"
},
"dependencies": {
"buffer-equal": "^1.0.0"
},
"verb": {
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"lint": {
"reflinks": true
}
}
}
@@ -0,0 +1 @@
{"version":3,"file":"resolveBindingDeactivations.spec.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveBindingDeactivations.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
"use client";
import {
Form
} from "./chunk-ICU6NNET.mjs";
// src/form.tsx
import { useProviderContext } from "@heroui/system";
import { forwardRef } from "react";
import { jsx } from "react/jsx-runtime";
var Form2 = forwardRef(function Form3(props, ref) {
var _a, _b;
const globalContext = useProviderContext();
const validationBehavior = (_b = (_a = props.validationBehavior) != null ? _a : globalContext == null ? void 0 : globalContext.validationBehavior) != null ? _b : "native";
return /* @__PURE__ */ jsx(Form, { ...props, ref, validationBehavior });
});
export {
Form2 as Form
};
@@ -0,0 +1,107 @@
const ampEntity = { regex: /&(amp|#38|#x26);/g, val : "&"};
const htmlEntities = {
"space": { regex: /&(nbsp|#160);/g, val: " " },
// "lt" : { regex: /&(lt|#60);/g, val: "<" },
// "gt" : { regex: /&(gt|#62);/g, val: ">" },
// "amp" : { regex: /&(amp|#38);/g, val: "&" },
// "quot" : { regex: /&(quot|#34);/g, val: "\"" },
// "apos" : { regex: /&(apos|#39);/g, val: "'" },
"cent" : { regex: /&(cent|#162);/g, val: "¢" },
"pound" : { regex: /&(pound|#163);/g, val: "£" },
"yen" : { regex: /&(yen|#165);/g, val: "¥" },
"euro" : { regex: /&(euro|#8364);/g, val: "€" },
"copyright" : { regex: /&(copy|#169);/g, val: "©" },
"reg" : { regex: /&(reg|#174);/g, val: "®" },
"inr" : { regex: /&(inr|#8377);/g, val: "₹" },
"num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },
"num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 16)) },
};
class EntitiesParser{
constructor(replaceHtmlEntities) {
this.replaceHtmlEntities = replaceHtmlEntities;
this.docTypeEntities = {};
this.lastEntities = {
"apos" : { regex: /&(apos|#39|#x27);/g, val : "'"},
"gt" : { regex: /&(gt|#62|#x3E);/g, val : ">"},
"lt" : { regex: /&(lt|#60|#x3C);/g, val : "<"},
"quot" : { regex: /&(quot|#34|#x22);/g, val : "\""},
};
}
addExternalEntities(externalEntities){
const entKeys = Object.keys(externalEntities);
for (let i = 0; i < entKeys.length; i++) {
const ent = entKeys[i];
this.addExternalEntity(ent,externalEntities[ent])
}
}
addExternalEntity(key,val){
validateEntityName(key);
if(val.indexOf("&") !== -1) {
reportWarning(`Entity ${key} is not added as '&' is found in value;`)
return;
}else{
this.lastEntities[ent] = {
regex: new RegExp("&"+key+";","g"),
val : val
}
}
}
addDocTypeEntities(entities){
const entKeys = Object.keys(entities);
for (let i = 0; i < entKeys.length; i++) {
const ent = entKeys[i];
this.docTypeEntities[ent] = {
regex: new RegExp("&"+ent+";","g"),
val : entities[ent]
}
}
}
parse(val){
return this.replaceEntitiesValue(val)
}
/**
* 1. Replace DOCTYPE entities
* 2. Replace external entities
* 3. Replace HTML entities if asked
* @param {string} val
*/
replaceEntitiesValue(val){
if(typeof val === "string" && val.length > 0){
for(let entityName in this.docTypeEntities){
const entity = this.docTypeEntities[entityName];
val = val.replace( entity.regx, entity.val);
}
for(let entityName in this.lastEntities){
const entity = this.lastEntities[entityName];
val = val.replace( entity.regex, entity.val);
}
if(this.replaceHtmlEntities){
for(let entityName in htmlEntities){
const entity = htmlEntities[entityName];
val = val.replace( entity.regex, entity.val);
}
}
val = val.replace( ampEntity.regex, ampEntity.val);
}
return val;
}
};
//an entity name should not contains special characters that may be used in regex
//Eg !?\\\/[]$%{}^&*()<>
const specialChar = "!?\\\/[]$%{}^&*()<>|+";
function validateEntityName(name){
for (let i = 0; i < specialChar.length; i++) {
const ch = specialChar[i];
if(name.indexOf(ch) !== -1) throw new Error(`Invalid character ${ch} in entity name`);
}
return name;
}
module.exports = EntitiesParser;
@@ -0,0 +1,17 @@
var $1949c3ad17295fd4$exports = {};
$1949c3ad17295fd4$exports = {
"deselectedItem": (args)=>`${args.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C9C0} \u{C54A}\u{C558}\u{C2B5}\u{B2C8}\u{B2E4}.`,
"longPressToSelect": `\u{C120}\u{D0DD} \u{BAA8}\u{B4DC}\u{B85C} \u{B4E4}\u{C5B4}\u{AC00}\u{B824}\u{BA74} \u{AE38}\u{AC8C} \u{B204}\u{B974}\u{C2ED}\u{C2DC}\u{C624}.`,
"select": `\u{C120}\u{D0DD}`,
"selectedAll": `\u{BAA8}\u{B4E0} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}.`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `\u{C120}\u{D0DD}\u{B41C} \u{D56D}\u{BAA9}\u{C774} \u{C5C6}\u{C2B5}\u{B2C8}\u{B2E4}`,
one: ()=>`${formatter.number(args.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`,
other: ()=>`${formatter.number(args.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`
})}.`,
"selectedItem": (args)=>`${args.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}.`
};
export {$1949c3ad17295fd4$exports as default};
//# sourceMappingURL=ko-KR.module.js.map
@@ -0,0 +1 @@
{"version":3,"file":"sortable.cjs.production.min.js","sources":["../src/utilities/arrayMove.ts","../src/utilities/getSortedRects.ts","../src/utilities/isValidIndex.ts","../src/strategies/horizontalListSorting.ts","../src/strategies/rectSorting.ts","../src/strategies/verticalListSorting.ts","../src/components/SortableContext.tsx","../src/hooks/defaults.ts","../src/types/type-guard.ts","../src/sensors/keyboard/sortableKeyboardCoordinates.ts","../src/utilities/itemsEqual.ts","../src/utilities/normalizeDisabled.ts","../src/utilities/arraySwap.ts","../src/strategies/rectSwapping.ts","../src/hooks/useSortable.ts","../src/hooks/utilities/useDerivedTransform.ts"],"sourcesContent":["/**\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\n */\nexport function arrayMove<T>(array: T[], from: number, to: number): T[] {\n const newArray = array.slice();\n newArray.splice(\n to < 0 ? newArray.length + to : to,\n 0,\n newArray.splice(from, 1)[0]\n );\n\n return newArray;\n}\n","import type {\n ClientRect,\n UniqueIdentifier,\n UseDndContextReturnValue,\n} from '@dnd-kit/core';\n\nexport function getSortedRects(\n items: UniqueIdentifier[],\n rects: UseDndContextReturnValue['droppableRects']\n) {\n return items.reduce<ClientRect[]>((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n","export function isValidIndex(index: number | null): index is number {\n return index !== null && index >= 0;\n}\n","import type {ClientRect} from '@dnd-kit/core';\nimport type {SortingStrategy} from '../types';\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1,\n};\n\nexport const horizontalListSortingStrategy: SortingStrategy = ({\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index,\n}) => {\n const activeNodeRect = rects[activeIndex] ?? fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x:\n activeIndex < overIndex\n ? newIndexRect.left +\n newIndexRect.width -\n (activeNodeRect.left + activeNodeRect.width)\n : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale,\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale,\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale,\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale,\n };\n};\n\nfunction getItemGap(rects: ClientRect[], index: number, activeIndex: number) {\n const currentRect: ClientRect | undefined = rects[index];\n const previousRect: ClientRect | undefined = rects[index - 1];\n const nextRect: ClientRect | undefined = rects[index + 1];\n\n if (!currentRect || (!previousRect && !nextRect)) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect\n ? currentRect.left - (previousRect.left + previousRect.width)\n : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect\n ? nextRect.left - (currentRect.left + currentRect.width)\n : currentRect.left - (previousRect.left + previousRect.width);\n}\n","import {arrayMove} from '../utilities';\nimport type {SortingStrategy} from '../types';\n\nexport const rectSortingStrategy: SortingStrategy = ({\n rects,\n activeIndex,\n overIndex,\n index,\n}) => {\n const newRects = arrayMove(rects, overIndex, activeIndex);\n\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height,\n };\n};\n","import type {ClientRect} from '@dnd-kit/core';\nimport type {SortingStrategy} from '../types';\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1,\n};\n\nexport const verticalListSortingStrategy: SortingStrategy = ({\n activeIndex,\n activeNodeRect: fallbackActiveRect,\n index,\n rects,\n overIndex,\n}) => {\n const activeNodeRect = rects[activeIndex] ?? fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n if (index === activeIndex) {\n const overIndexRect = rects[overIndex];\n\n if (!overIndexRect) {\n return null;\n }\n\n return {\n x: 0,\n y:\n activeIndex < overIndex\n ? overIndexRect.top +\nLine truncated
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=no-danger-with-children.d.ts.map
@@ -0,0 +1,61 @@
import apply from './_apply.js';
import arrayMap from './_arrayMap.js';
import baseFlatten from './_baseFlatten.js';
import baseIteratee from './_baseIteratee.js';
import baseRest from './_baseRest.js';
import baseUnary from './_baseUnary.js';
import castRest from './_castRest.js';
import isArray from './isArray.js';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMin = Math.min;
/**
* Creates a function that invokes `func` with its arguments transformed.
*
* @static
* @since 4.0.0
* @memberOf _
* @category Function
* @param {Function} func The function to wrap.
* @param {...(Function|Function[])} [transforms=[_.identity]]
* The argument transforms.
* @returns {Function} Returns the new function.
* @example
*
* function doubled(n) {
* return n * 2;
* }
*
* function square(n) {
* return n * n;
* }
*
* var func = _.overArgs(function(x, y) {
* return [x, y];
* }, [square, doubled]);
*
* func(9, 3);
* // => [81, 6]
*
* func(10, 5);
* // => [100, 10]
*/
var overArgs = castRest(function(func, transforms) {
transforms = (transforms.length == 1 && isArray(transforms[0]))
? arrayMap(transforms[0], baseUnary(baseIteratee))
: arrayMap(baseFlatten(transforms, 1), baseUnary(baseIteratee));
var funcsLength = transforms.length;
return baseRest(function(args) {
var index = -1,
length = nativeMin(args.length, funcsLength);
while (++index < length) {
args[index] = transforms[index].call(this, args[index]);
}
return apply(func, this, args);
});
});
export default overArgs;
@@ -0,0 +1,27 @@
{
"name": "scheduler",
"version": "0.27.0",
"description": "Cooperative scheduler for the browser environment.",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/scheduler"
},
"license": "MIT",
"keywords": [
"react"
],
"bugs": {
"url": "https://github.com/facebook/react/issues"
},
"homepage": "https://react.dev/",
"files": [
"LICENSE",
"README.md",
"index.js",
"index.native.js",
"unstable_mock.js",
"unstable_post_task.js",
"cjs/"
]
}
@@ -0,0 +1,85 @@
var tape = require('tape')
var writer = require('./')
tape('is a write stream', function (t) {
var expected = ['hello', 'world', 'verden']
var ws = writer.obj(write)
ws.write('hello')
ws.write('world')
ws.write('verden')
ws.end(function () {
t.same(expected.length, 0)
t.end()
})
function write (data, enc, cb) {
t.same(data, expected.shift())
cb()
}
})
tape('is flushable', function (t) {
var expected = ['hello', 'world', 'verden']
var flushed = false
var ws = writer.obj(write, flush)
ws.write('hello')
ws.write('world')
ws.write('verden')
ws.end(function () {
t.same(expected.length, 0)
t.ok(flushed, 'was flushed')
t.end()
})
function write (data, enc, cb) {
t.same(data, expected.shift())
cb()
}
function flush (cb) {
flushed = true
process.nextTick(cb)
}
})
tape('can pass options', function (t) {
var expected = ['hello', 'world', 'verden']
var flushed = false
var ws = writer({objectMode: true}, write, flush)
ws.write('hello')
ws.write('world')
ws.write('verden')
ws.end(function () {
t.same(expected.length, 0)
t.ok(flushed, 'was flushed')
t.end()
})
function write (data, enc, cb) {
t.same(data, expected.shift())
cb()
}
function flush (cb) {
flushed = true
process.nextTick(cb)
}
})
tape('emits error on destroy', function (t) {
var expected = new Error()
var ws = writer({objectMode: true}, function () {})
ws.on('error', function (err) {
t.equal(err, expected)
})
ws.on('close', t.end)
ws.destroy(expected)
})
@@ -0,0 +1,624 @@
flf2a$ 6 5 12 -1 11 0 7999 0
Author : LG Beard
Date : 2006/7/3 23:58:25
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
$ #
$ #
$ #
$ #
$ #
$ ##
_ #
| | #
| | #
| | #
(_) #
##
"#
#
#
#
#
##
_ _ #
\ \\ \ _ #
[\ \\ \_] #
[_\ \\ \] #
\_\\_\ #
##
_ #
_.-./ \ #
[/ _ \ |] #
|_\`._/ #
#
##
_ #
_ / / #
(_)/ /_ #
/ /(_) #
/_/ #
##
&#
#
#
#
#
##
_ #
|_| #
#
#
#
##
__ #
/ _| #
/ / #
\ \_ #
\__| #
##
__ #
|_ \ #
\ \ #
_/ / #
|__/ #
##
*#
#
#
#
#
##
_ #
_| |_ #
|_ _| #
|_| #
#
##
#
#
#
_ #
)_/ #
##
#
____ #
[____] #
#
#
##
#
#
_ #
(_) #
#
##
_ #
/ / #
/ / #
/ / #
/_/ #
##
_____ #
.' ___ '. #
| (___) | #
'._____.' #
#
##
_ _ #
| /___\ | #
\______ | #
/_| #
#
##
_ __ #
| /_.`_ | #
\ .'| | #
`-` |_| #
#
##
_ _ #
/ \ \ \ #
| //\_| | #
\_______/ #
#
##
__ #
/_ | #
//_||__ #
/__ __| #
|_| #
##
__ _ #
| `._\ | #
| |`. / #
|_| '-' #
#
##
_______ #
|__ ___ \ #
| \_/ | #
`,___,` #
#
##
_ #
/ \ #
| /_____ #
\ ______/ #
#
##
__ __ #
.' '' '.#
| () () |#
'.__..__.'#
#
##
__ #
.` _`. #
| /_\|__ #
\_______| #
#
##
_ #
(_) #
#
_ #
(_) #
##
_ #
(_) #
#
_ #
)_/ #
##
<#
#
#
#
#
##
____ #
[____] #
____ #
[____] #
#
##
>#
#
#
#
#
##
__ #
.`__/ #
/_'-. #
|_| #
(_) #
##
@#
#
#
#
#
##
______ #
.` _ ._| #
\ \_||_ #
`._____| #
#
##
_______ #
| | #
| o v o | #
'._.'._.' #
#
##
_______ #
/ _____ \ #
| \ / | #
\_/ \_/ #
#
##
_______ #
| ___ | #
| '._.' | #
'._____.' #
#
##
_______ #
| ._ _. | #
| \ v / | #
|_/ \_| #
#
##
_______ #
| _ ___| #
| ||_\ #
|_/ #
#
##
_______ #
/ .---. \ #
| \ .-`_/ #
\_/ |.` #
#
##
_______ #
\__ __\ #
__| |__ #
\_______\ #
#
##
_ _ #
| |___| | #
| ___ | #
|_| |_| #
#
##
_ __ #
| /___\ \ #
| ______/ #
|_\ #
#
##
_______ #
|_ _| #
.` _ `. #
|_.` `._| #
#
##
_______ #
/______ \ #
/ | #
\_| #
#
##
_______ #
`._ __| #
_< <__ #
/_______| #
#
##
_______ #
`._ __| #
_`. `._ #
|_______| #
#
##
_______ #
/ ____ \ #
| /___/ | #
\_______/ #
#
##
_______ #
/ ___ __| #
| \_/ | #
`.___.` #
#
##
_______ #
/ ____ \#
| \___\ |#
\_____\_(#
#
##
_______ #
/ ___ _| #
| \_/ \ #
`.__.`\_| #
#
##
__ #
.-. \ \ #
/ _ \_\ | #
|_\`.___/ #
#
##
_ #
| /_____ #
| ______/ #
|_\ #
#
##
______ #
/_____ `. #
_____\ | #
\______.` #
#
##
_____ #
`-.___ \ #
____.` | #
/______/ #
#
##
_______ #
`._ __| #
_> >__ #
.`______| #
#
##
_ _ #
\_'._.'_/ #
_> _ <_ #
/_.' '._\ #
#
##
_ #
|_`.____ #
.` .___| #
|_.` #
#
##
_ _ #
| | .` | #
| |.`_. | #
|__.` |_| #
#
##
___ #
| _| #
| | #
| |_ #
|___| #
##
_ #
\ \ #
\ \ #
\ \ #
\_\ #
##
___ #
|_ | #
| | #
_| | #
|___| #
##
__ #
/ \ #
/_/\_\ #
#
#
##
#
#
#
#
________ #
[________]##
__ #
\_\ #
#
#
#
##
______ #
.` _ ._| #
\ \_||_ #
`._____| #
#
##
_______ #
| | #
| o v o | #
'._.'._.' #
#
##
_______ #
/ _____ \ #
| \ / | #
\_/ \_/ #
#
##
_______ #
| ___ | #
| '._.' | #
'._____.' #
#
##
_______ #
| ._ _. | #
| \ v / | #
|_/ \_| #
#
##
_______ #
| _ ___| #
| ||_\ #
|_/ #
#
##
_______ #
/ .---. \ #
| \ .-`_/ #
\_/ |.` #
#
##
_______ #
\__ __\ #
__| |__ #
\_______\ #
#
##
_ _ #
| |___| | #
| ___ | #
|_| |_| #
#
##
_ __ #
| /___\ \ #
| ______/ #
|_\ #
#
##
_______ #
|_ _| #
.` _ `. #
|_.` `._| #
#
##
_______ #
/______ \ #
/ | #
\_| #
#
##
_______ #
`._ __| #
_< <__ #
/_______| #
#
##
_______ #
`._ __| #
_`. `._ #
|_______| #
#
##
_______ #
/ ____ \ #
| /___/ | #
\_______/ #
#
##
_______ #
/ ___ __| #
| \_/ | #
`.___.` #
#
##
_______ #
/ ____ \#
| \___\ |#
\_____\_(#
#
##
_______ #
/ ___ _| #
| \_/ \ #
`.__.`\_| #
#
##
__ #
.-. \ \ #
/ _ \_\ | #
|_\`.___/ #
#
##
_ #
| /_____ #
| ______/ #
|_\ #
#
##
______ #
/_____ `. #
_____\ | #
\______.` #
#
##
_____ #
`-.___ \ #
____.` | #
/______/ #
#
##
_______ #
`._ __| #
_> >__ #
.`______| #
#
##
_ _ #
\_'._.'_/ #
_> _ <_ #
/_.' '._\ #
#
##
_ #
|_`.____ #
.` .___| #
|_.` #
#
##
_ _ #
| | .` | #
| |.`_. | #
|__.` |_| #
#
##
___ #
| _| #
/ | #
\ |_ #
|___| #
##
_ #
| | #
| | #
| | #
|_| #
##
___ #
|_ | #
| \ #
_| / #
|___| #
##
~#
#
#
#
#
##
______ #
.` _ ._| #
\ \_||_ #
`._____| #
#
##
_______ #
/ ____ \ #
| /___/ | #
\_______/ #
#
##
______ #
/_____ `. #
_____\ | #
\______.` #
#
##
______ #
.` _ ._| #
\ \_||_ #
`._____| #
#
##
_______ #
/ ____ \ #
| /___/ | #
\_______/ #
#
##
______ #
/_____ `. #
_____\ | #
\______.` #
#
##
ß#
#
#
#
#
##
@@ -0,0 +1,3 @@
import type { TSESTree } from '@typescript-eslint/utils';
import type { SourceCode } from '@typescript-eslint/utils/ts-eslint';
export declare function getTextWithParentheses(sourceCode: Readonly<SourceCode>, node: TSESTree.Node): string;
@@ -0,0 +1,3 @@
declare const _default: (value: unknown) => value is RegExp;
export default _default;
//# sourceMappingURL=isRegex.d.ts.map
@@ -0,0 +1,51 @@
{
"name": "debug",
"version": "3.2.7",
"repository": {
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
},
"description": "small debugging utility",
"keywords": [
"debug",
"log",
"debugger"
],
"files": [
"src",
"node.js",
"dist/debug.js",
"LICENSE",
"README.md"
],
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
"Andrew Rhyne <rhyneandrew@gmail.com>"
],
"license": "MIT",
"dependencies": {
"ms": "^2.1.1"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"browserify": "14.4.0",
"chai": "^3.5.0",
"concurrently": "^3.1.0",
"coveralls": "^3.0.2",
"istanbul": "^0.4.5",
"karma": "^3.0.0",
"karma-chai": "^0.1.0",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
"mocha": "^5.2.0",
"mocha-lcov-reporter": "^1.2.0",
"rimraf": "^2.5.4",
"xo": "^0.23.0"
},
"main": "./src/index.js",
"browser": "./src/browser.js",
"unpkg": "./dist/debug.js"
}
@@ -0,0 +1,12 @@
import type { SchemaOptions } from '../schema/index';
import type { Ensure, Evaluate } from '../helpers/index';
import type { TProperties } from '../object/index';
import { type TMappedResult } from '../mapped/index';
import { type TKeyOfFromType } from './keyof';
type TFromProperties<Properties extends TProperties> = ({
[K2 in keyof Properties]: TKeyOfFromType<Properties[K2]>;
});
type TFromMappedResult<MappedResult extends TMappedResult> = (Evaluate<TFromProperties<MappedResult['properties']>>);
export type TKeyOfFromMappedResult<MappedResult extends TMappedResult, Properties extends TProperties = TFromMappedResult<MappedResult>> = (Ensure<TMappedResult<Properties>>);
export declare function KeyOfFromMappedResult<MappedResult extends TMappedResult, Properties extends TProperties = TFromMappedResult<MappedResult>>(mappedResult: MappedResult, options?: SchemaOptions): TMappedResult<Properties>;
export {};
@@ -0,0 +1,28 @@
import { Transform } from './index.js';
import { Block, Line } from '../primitives.js';
import { rewireSource } from '../util.js';
const pull = (offset: number) => (str) => str.slice(offset);
const push = (offset: number) => {
const space = ''.padStart(offset, ' ');
return (str) => str + space;
};
export default function indent(pos: number): Transform {
let shift: (string: string) => string;
const pad = (start: string) => {
if (shift === undefined) {
const offset = pos - start.length;
shift = offset > 0 ? push(offset) : pull(-offset);
}
return shift(start);
};
const update = (line: Line): Line => ({
...line,
tokens: { ...line.tokens, start: pad(line.tokens.start) },
});
return ({ source, ...fields }: Block): Block =>
rewireSource({ ...fields, source: source.map(update) });
}
@@ -0,0 +1,208 @@
import { configureStore } from '../configureStore'
import { createSlice } from '../createSlice'
import type { AutoBatchOptions } from '../autoBatchEnhancer'
import { autoBatchEnhancer, prepareAutoBatched } from '../autoBatchEnhancer'
import { delay } from '../utils'
import { debounce } from 'lodash'
interface CounterState {
value: number
}
const counterSlice = createSlice({
name: 'counter',
initialState: { value: 0 } as CounterState,
reducers: {
incrementBatched: {
// Batched, low-priority
reducer(state) {
state.value += 1
},
prepare: prepareAutoBatched<void>(),
},
// Not batched, normal priority
decrementUnbatched(state) {
state.value -= 1
},
},
})
const { incrementBatched, decrementUnbatched } = counterSlice.actions
const makeStore = (autoBatchOptions?: AutoBatchOptions) => {
return configureStore({
reducer: counterSlice.reducer,
enhancers: (getDefaultEnhancers) =>
getDefaultEnhancers({
autoBatch: autoBatchOptions,
}),
})
}
let store: ReturnType<typeof makeStore>
let subscriptionNotifications = 0
const cases: AutoBatchOptions[] = [
{ type: 'tick' },
{ type: 'raf' },
{ type: 'timer', timeout: 0 },
{ type: 'timer', timeout: 10 },
{ type: 'timer', timeout: 20 },
{
type: 'callback',
queueNotification: debounce((notify: () => void) => {
notify()
}, 5),
},
]
describe.each(cases)('autoBatchEnhancer: %j', (autoBatchOptions) => {
beforeEach(() => {
subscriptionNotifications = 0
store = makeStore(autoBatchOptions)
store.subscribe(() => {
subscriptionNotifications++
})
})
test('Does not alter normal subscription notification behavior', async () => {
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(1)
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(2)
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(3)
store.dispatch(decrementUnbatched())
await delay(25)
expect(subscriptionNotifications).toBe(4)
})
test('Only notifies once if several batched actions are dispatched in a row', async () => {
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(incrementBatched())
await delay(25)
expect(subscriptionNotifications).toBe(1)
})
test('Notifies immediately if a non-batched action is dispatched', async () => {
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(1)
store.dispatch(incrementBatched())
await delay(25)
expect(subscriptionNotifications).toBe(2)
})
test('Does not notify at end of tick if last action was normal priority', async () => {
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(1)
store.dispatch(incrementBatched())
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(2)
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(3)
await delay(25)
expect(subscriptionNotifications).toBe(3)
})
})
describe.each(cases)(
'autoBatchEnhancer with fake timers: %j',
(autoBatchOptions) => {
beforeAll(() => {
vitest.useFakeTimers({
toFake: ['setTimeout', 'queueMicrotask', 'requestAnimationFrame'],
})
})
afterAll(() => {
vitest.useRealTimers()
})
beforeEach(() => {
subscriptionNotifications = 0
store = makeStore(autoBatchOptions)
store.subscribe(() => {
subscriptionNotifications++
})
})
test('Does not alter normal subscription notification behavior', () => {
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(1)
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(2)
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(3)
store.dispatch(decrementUnbatched())
vitest.runAllTimers()
expect(subscriptionNotifications).toBe(4)
})
test('Only notifies once if several batched actions are dispatched in a row', () => {
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(incrementBatched())
vitest.runAllTimers()
expect(subscriptionNotifications).toBe(1)
})
test('Notifies immediately if a non-batched action is dispatched', () => {
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(1)
store.dispatch(incrementBatched())
vitest.runAllTimers()
expect(subscriptionNotifications).toBe(2)
})
test('Does not notify at end of tick if last action was normal priority', () => {
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(incrementBatched())
expect(subscriptionNotifications).toBe(0)
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(1)
store.dispatch(incrementBatched())
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(2)
store.dispatch(decrementUnbatched())
expect(subscriptionNotifications).toBe(3)
vitest.runAllTimers()
expect(subscriptionNotifications).toBe(3)
})
},
)
@@ -0,0 +1 @@
{"version":3,"names":["_removed","require","_optionAssertions","_configError","ROOT_VALIDATORS","cwd","assertString","root","rootMode","assertRootMode","configFile","assertConfigFileSearch","caller","assertCallerMetadata","filename","filenameRelative","code","assertBoolean","ast","cloneInputAst","envName","BABELRC_VALIDATORS","babelrc","babelrcRoots","assertBabelrcSearch","NONPRESET_VALIDATORS","extends","ignore","assertIgnoreList","only","targets","assertTargets","browserslistConfigFile","browserslistEnv","COMMON_VALIDATORS","inputSourceMap","assertInputSourceMap","presets","assertPluginList","plugins","passPerPreset","assumptions","assertAssumptions","env","assertEnvSet","overrides","assertOverridesList","test","assertConfigApplicableTest","include","exclude","retainLines","comments","shouldPrintComment","assertFunction","compact","assertCompact","minified","auxiliaryCommentBefore","auxiliaryCommentAfter","sourceType","assertSourceType","wrapPluginVisitorMethod","highlightCode","sourceMaps","assertSourceMaps","sourceMap","sourceFileName","sourceRoot","parserOpts","assertObject","generatorOpts","Object","assign","getModuleId","moduleRoot","moduleIds","moduleId","knownAssumptions","assumptionsNames","exports","Set","getSource","loc","type","source","parent","validate","opts","validateNested","error","configError","ConfigError","message","assertNoDuplicateSourcemap","keys","forEach","key","optLoc","name","Error","msg","validator","throwUnknownError","removed","version","unknownOptErr","hasOwnProperty","call","value","obj","access","envLoc","arr","assertArray","index","item","entries","objLoc","overridesLoc","checkNoUnwrappedItemOptionPairs","items","e","lastItem","thisItem","file","options","undefined","request","JSON","stringify"],"sources":["../../../src/config/validation/options.ts"],"sourcesContent":["import type { InputTargets, Targets } from \"@babel/helper-compilation-targets\";\n\nimport type { ConfigItem } from \"../item.ts\";\n\nimport removed from \"./removed.ts\";\nimport {\n msg,\n access,\n assertString,\n assertBoolean,\n assertObject,\n assertArray,\n assertCallerMetadata,\n assertInputSourceMap,\n assertIgnoreList,\n assertPluginList,\n assertConfigApplicableTest,\n assertConfigFileSearch,\n assertBabelrcSearch,\n assertFunction,\n assertRootMode,\n assertSourceMaps,\n assertCompact,\n assertSourceType,\n assertTargets,\n assertAssumptions,\n} from \"./option-assertions.ts\";\nimport type {\n ValidatorSet,\n Validator,\n OptionPath,\n} from \"./option-assertions.ts\";\nimport type { UnloadedDescriptor } from \"../config-descriptors.ts\";\nimport type { PluginAPI } from \"../helpers/config-api.ts\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { GeneratorOptions } from \"@babel/generator\";\nimport type { VisitWrapper } from \"@babel/traverse\";\nimport ConfigError from \"../../errors/config-error.ts\";\nimport type { PluginObject } from \"./plugins.ts\";\nimport type Plugin from \"../plugin.ts\";\nimport type { PresetAPI } from \"../index.ts\";\nimport type { PresetObject } from \"../../index.ts\";\n\nconst ROOT_VALIDATORS: ValidatorSet = {\n cwd: assertString as Validator<InputOptions[\"cwd\"]>,\n root: assertString as Validator<InputOptions[\"root\"]>,\n rootMode: assertRootMode as Validator<InputOptions[\"rootMode\"]>,\n configFile: assertConfigFileSearch as Validator<InputOptions[\"configFile\"]>,\n\n caller: assertCallerMetadata as Validator<InputOptions[\"caller\"]>,\n filename: assertString as Validator<InputOptions[\"filename\"]>,\n filenameRelative: assertString as Validator<InputOptions[\"filenameRelative\"]>,\n code: assertBoolean as Validator<InputOptions[\"code\"]>,\n ast: assertBoolean as Validator<InputOptions[\"ast\"]>,\n\n cloneInputAst: assertBoolean as Validator<InputOptions[\"cloneInputAst\"]>,\n\n envName: assertString as Validator<InputOptions[\"envName\"]>,\n};\n\nconst BABELRC_VALIDATORS: ValidatorSet = {\n babelrc: assertBoolean as Validator<InputOptions[\"babelrc\"]>,\n babelrcRoots: assertBabelrcSearch as Validator<InputOptions[\"babelrcRoots\"]>,\n};\n\nconst NONPRESET_VALIDATORS: ValidatorSet = {\n extends: assertString as Validator<InputOptions[\"extends\"]>,\n ignore: assertIgnoreList as Validator<InputOptions[\"ignore\"]>,\n only: assertIgnoreList as Validator<InputOptions[\"only\"]>,\n\n targets: assertTargets as Validator<InputOptions[\"targets\"]>,\n browserslistConfigFile: assertConfigFileSearch as Validator<\n InputOptions[\"browserslistConfigFile\"]\n >,\n browserslistEnv: assertString as Validator<InputOptions[\"browserslistEnv\"]>,\n};\n\nconst COMMON_VALIDATORS: ValidatorSet = {\n // TODO: Should 'inputSourceMap' be moved to be a root-only option?\n // We may want a boolean-only version to be a common option, with the\n // object only allowed as a root config argument.\n inputSourceMap: assertInputSourceMap as Validator<\n InputOptions[\"inputSourceMap\"]\n >,\n presets: asLine truncated
@@ -0,0 +1 @@
{"name":"yallist","version":"3.1.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532089714,"integrity":"sha512-P6dI5Z+zrwxSk1MIRPqpYG2ScYNkidLIATQXd50QzBgBh/XmcEd/nsd9NB4O9k6rfc+4dsY5DwJ7xvhpoS0PRg==","mode":420,"size":765},"iterator.js":{"checkedAt":1794532127285,"integrity":"sha512-gdEBfYpX2q8L4tHZwoKV39GhQ2qnmpbwvu+K+8y8fp7lVGhdXPpacQtlGn2Xo/kooGqITRLY69eA22wu6NeDWw==","mode":420,"size":207},"yallist.js":{"checkedAt":1794532127285,"integrity":"sha512-yCNFOkjizk0xJGPuXl/Rs3PkLF5Kn8nosHo1fJnHfLzmn2J7UogOjcEDizwMGwiLcnhGaZCzU/PE/SShUU1Z+Q==","mode":420,"size":8425},"package.json":{"checkedAt":1794532127285,"integrity":"sha512-vXRpaz4UmNESN1+irTYi4xa4GG1TvuVGukHlwuqzDeSAroXltRBx3W3SVgGruKJIhcAGVC9vEtUusp1SQ0I9Lw==","mode":420,"size":652},"README.md":{"checkedAt":1794532127286,"integrity":"sha512-r+xy8CtSKInl7bODQ7P3Q0gPrK/lM9eEXzgUF7UxghBQbrH1Xb8k6PKpUunSSAa7dTSZ+JtRaQx39sLXF5Klpw==","mode":420,"size":4717}}}
@@ -0,0 +1,28 @@
Copyright (c) 2009-2011, Mozilla Foundation and contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the names of the Mozilla Foundation nor the names of project
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,7 @@
/*!
* screenfull
* v5.2.0 - 2021-11-03
* (c) Sindre Sorhus; MIT License
*/
/*! js-cookie v3.0.5 | MIT */
@@ -0,0 +1,198 @@
# object-hash
Generate hashes from objects and values in node and the browser. Uses node.js
crypto module for hashing. Supports SHA1 and many others (depending on the platform)
as well as custom streams (e.g. CRC32).
[![NPM](https://nodei.co/npm/object-hash.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/object-hash)
[![Travis CI](https://secure.travis-ci.org/puleos/object-hash.png?branch=master)](https://secure.travis-ci.org/puleos/object-hash?branch=master)
[![Coverage Status](https://coveralls.io/repos/puleos/object-hash/badge.svg?branch=master&service=github)](https://coveralls.io/github/puleos/object-hash?branch=master)
* Hash values of any type.
* Supports a keys only option for grouping similar objects with different values.
```js
var hash = require('object-hash');
hash({foo: 'bar'}) // => '67b69634f9880a282c14a0f0cb7ba20cf5d677e9'
hash([1, 2, 2.718, 3.14159]) // => '136b9b88375971dff9f1af09d7356e3e04281951'
```
## Versioning Disclaimer
Starting with version `1.1.8` (released April 2017), new versions will consider
the exact returned hash part of the API contract, i.e. changes that will affect
hash values will be considered `semver-major`. Previous versions may violate
that expectation.
For more information, see [this discussion](https://github.com/puleos/object-hash/issues/30).
## hash(value, options)
Generate a hash from any object or type. Defaults to sha1 with hex encoding.
* `algorithm` hash algo to be used: 'sha1', 'md5', 'passthrough'. default: sha1
* This supports the algorithms returned by `crypto.getHashes()`. Note that the default of SHA-1 is not considered secure, and a stronger algorithm should be used if a cryptographical hash is desired.
* This also supports the `passthrough` algorith, which will return the information that would otherwise have been hashed.
* `excludeValues` {true|false} hash object keys, values ignored. default: false
* `encoding` hash encoding, supports 'buffer', 'hex', 'binary', 'base64'. default: hex
* `ignoreUnknown` {true|*false} ignore unknown object types. default: false
* `replacer` optional function that replaces values before hashing. default: accept all values
* `respectFunctionProperties` {true|false} Whether properties on functions are considered when hashing. default: true
* `respectFunctionNames` {true|false} consider `name` property of functions for hashing. default: true
* `respectType` {true|false} Whether special type attributes (`.prototype`, `.__proto__`, `.constructor`)
are hashed. default: true
* `unorderedArrays` {true|false} Sort all arrays before hashing. Note that this affects *all* collections,
i.e. including typed arrays, Sets, Maps, etc. default: false
* `unorderedSets` {true|false} Sort `Set` and `Map` instances before hashing, i.e. make
`hash(new Set([1, 2])) == hash(new Set([2, 1]))` return `true`. default: true
* `unorderedObjects` {true|false} Sort objects before hashing, i.e. make `hash({ x: 1, y: 2 }) === hash({ y: 2, x: 1 })`. default: true
* `excludeKeys` optional function for excluding specific key(s) from hashing, if true is returned then exclude from hash. default: include all keys
## hash.sha1(value)
Hash using the sha1 algorithm.
Note that SHA-1 is not considered secure, and a stronger algorithm should be used if a cryptographical hash is desired.
*Sugar method, equivalent to* `hash(value, {algorithm: 'sha1'})`
## hash.keys(value)
Hash object keys using the sha1 algorithm, values ignored.
*Sugar method, equivalent to* `hash(value, {excludeValues: true})`
## hash.MD5(value)
Hash using the md5 algorithm.
Note that the MD5 algorithm is not considered secure, and a stronger algorithm should be used if a cryptographical hash is desired.
*Sugar method, equivalent to* `hash(value, {algorithm: 'md5'})`
## hash.keysMD5(value)
Hash object keys using the md5 algorithm, values ignored.
Note that the MD5 algorithm is not considered secure, and a stronger algorithm should be used if a cryptographical hash is desired.
*Sugar method, equivalent to* `hash(value, {algorithm: 'md5', excludeValues: true})`
## hash.writeToStream(value, [options,] stream)
Write the information that would otherwise have been hashed to a stream, e.g.:
```js
hash.writeToStream({foo: 'bar', a: 42}, {respectType: false}, process.stdout)
// => e.g. 'object:a:number:42foo:string:bar'
```
## Installation
node:
```js
npm install object-hash
```
browser: */dist/object_hash.js*
```html
<script src="object_hash.js" type="text/javascript"></script>
<script>
var hash = objectHash.sha1({foo:'bar'});
console.log(hash); // e003c89cdf35cdf46d8239b4692436364b7259f9
</script>
```
## Example usage
```js
var hash = require('object-hash');
var peter = { name: 'Peter', stapler: false, friends: ['Joanna', 'Michael', 'Samir'] };
var michael = { name: 'Michael', stapler: false, friends: ['Peter', 'Samir'] };
var bob = { name: 'Bob', stapler: true, friends: [] };
/***
* sha1 hex encoding (default)
*/
hash(peter);
// 14fa461bf4b98155e82adc86532938553b4d33a9
hash(michael);
// 4b2b30e27699979ce46714253bc2213010db039c
hash(bob);
// 38d96106bc8ef3d8bd369b99bb6972702c9826d5
/***
* hash object keys, values ignored
*/
hash(peter, { excludeValues: true });
// 48f370a772c7496f6c9d2e6d92e920c87dd00a5c
hash(michael, { excludeValues: true });
// 48f370a772c7496f6c9d2e6d92e920c87dd00a5c
hash.keys(bob);
// 48f370a772c7496f6c9d2e6d92e920c87dd00a5c
/***
* hash object, ignore specific key(s)
*/
hash(peter, { excludeKeys: function(key) {
if ( key === 'friends') {
return true;
}
return false;
}
});
// 66b7d7e64871aa9fda1bdc8e88a28df797648d80
/***
* md5 base64 encoding
*/
hash(peter, { algorithm: 'md5', encoding: 'base64' });
// 6rkWaaDiG3NynWw4svGH7g==
hash(michael, { algorithm: 'md5', encoding: 'base64' });
// djXaWpuWVJeOF8Sb6SFFNg==
hash(bob, { algorithm: 'md5', encoding: 'base64' });
// lFzkw/IJ8/12jZI0rQeS3w==
```
## Legacy Browser Support
IE <= 8 and Opera <= 11 support dropped in version 0.3.0. If you require
legacy browser support you must either use an ES5 shim or use version 0.2.5
of this module.
## Development
```sh-session
git clone https://github.com/puleos/object-hash
```
## Node Docker Wrapper
If you want to stand this up in a docker container, you should take at look
at the [![node-object-hash](https://github.com/bean5/node-object-hash)](https://github.com/bean5/node-object-hash) project.
### gulp tasks
* `gulp watch` (default) watch files, test and lint on change/add
* `gulp test` unit tests
* `gulp karma` browser unit tests
* `gulp lint` jshint
* `gulp dist` create browser version in /dist
## License
MIT
## Changelog
### v2.0.0
Only Node.js versions `>= 6.0.0` are being tested in CI now.
No other breaking changes were introduced.
@@ -0,0 +1,34 @@
# triple-beam
Definitions of levels for logging purposes & shareable Symbol constants.
## Usage
``` js
const { LEVEL } = require('triple-beam');
const colors = require('colors/safe');
const info = {
[LEVEL]: 'error',
level: 'error',
message: 'hey a logging message!'
};
// Colorize your log level!
info.level = colors.green(info.level);
// And still have an unmutated copy of your level!
console.log(info.level === 'error'); // false
console.log(info[LEVEL] === 'error'); // true
```
## Tests
Tests are written with `mocha`, `assume`, and `nyc`. They can be run with `npm`:
```
npm test
```
##### LICENSE: MIT
##### AUTHOR: [Charlie Robbins](https://github.com/indexzero)
@@ -0,0 +1,3 @@
import CryptoJS = require("./index");
export = CryptoJS.AES;
@@ -0,0 +1,68 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'default-param-last',
meta: {
type: 'suggestion',
docs: {
description: 'Enforce default parameters to be last',
extendsBaseRule: true,
frozen: true,
},
messages: {
shouldBeLast: 'Default parameters should be last.',
},
schema: [],
},
defaultOptions: [],
create(context) {
/**
* checks if node is optional parameter
* @param node the node to be evaluated
* @private
*/
function isOptionalParam(node) {
return ((node.type === utils_1.AST_NODE_TYPES.ArrayPattern ||
node.type === utils_1.AST_NODE_TYPES.AssignmentPattern ||
node.type === utils_1.AST_NODE_TYPES.Identifier ||
node.type === utils_1.AST_NODE_TYPES.ObjectPattern ||
node.type === utils_1.AST_NODE_TYPES.RestElement) &&
node.optional);
}
/**
* checks if node is plain parameter
* @param node the node to be evaluated
* @private
*/
function isPlainParam(node) {
return !(node.type === utils_1.AST_NODE_TYPES.AssignmentPattern ||
node.type === utils_1.AST_NODE_TYPES.RestElement ||
isOptionalParam(node));
}
function checkDefaultParamLast(node) {
let hasSeenPlainParam = false;
for (let i = node.params.length - 1; i >= 0; i--) {
const current = node.params[i];
const param = current.type === utils_1.AST_NODE_TYPES.TSParameterProperty
? current.parameter
: current;
if (isPlainParam(param)) {
hasSeenPlainParam = true;
continue;
}
if (hasSeenPlainParam &&
(isOptionalParam(param) ||
param.type === utils_1.AST_NODE_TYPES.AssignmentPattern)) {
context.report({ node: current, messageId: 'shouldBeLast' });
}
}
}
return {
ArrowFunctionExpression: checkDefaultParamLast,
FunctionDeclaration: checkDefaultParamLast,
FunctionExpression: checkDefaultParamLast,
};
},
});
@@ -0,0 +1,12 @@
import type { TSESLint } from '@typescript-eslint/utils';
export type Options = [
{
caseSensitive?: boolean;
checkIntersections?: boolean;
checkUnions?: boolean;
groupOrder?: string[];
}
];
export type MessageIds = 'notSorted' | 'notSortedNamed' | 'suggestFix';
declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1,3 @@
export * from './estree-to-ts-node-types';
export * from './ts-nodes';
export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/types';
@@ -0,0 +1,39 @@
'use strict';
var orig = Array.prototype.includes;
require('../auto');
var test = require('tape');
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
var runTests = require('./tests');
test('shimmed', function (t) {
t.comment('shimmed: ' + (orig === Array.prototype.includes ? 'no' : 'yes'));
t.equal(Array.prototype.includes.length, 1, 'Array#includes has a length of 1');
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Array.prototype.includes.name, 'includes', 'Array#includes has name "includes"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Array.prototype, 'includes'), 'Array#includes is not enumerable');
et.end();
});
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad array/this value', { skip: !supportsStrictMode }, function (st) {
st['throws'](function () { return Array.prototype.includes.call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Array.prototype.includes.call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(Array.prototype.includes), t);
t.end();
});
@@ -0,0 +1,63 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = cargo;
var _queue = require('./internal/queue.js');
var _queue2 = _interopRequireDefault(_queue);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Creates a `cargo` object with the specified payload. Tasks added to the
* cargo will be processed altogether (up to the `payload` limit). If the
* `worker` is in progress, the task is queued until it becomes available. Once
* the `worker` has completed some tasks, each callback of those tasks is
* called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
* for how `cargo` and `queue` work.
*
* While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
* at a time, cargo passes an array of tasks to a single worker, repeating
* when the worker is finished.
*
* @name cargo
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.queue]{@link module:ControlFlow.queue}
* @category Control Flow
* @param {AsyncFunction} worker - An asynchronous function for processing an array
* of queued tasks. Invoked with `(tasks, callback)`.
* @param {number} [payload=Infinity] - An optional `integer` for determining
* how many tasks should be processed per round; if omitted, the default is
* unlimited.
* @returns {module:ControlFlow.QueueObject} A cargo object to manage the tasks. Callbacks can
* attached as certain properties to listen for specific events during the
* lifecycle of the cargo and inner queue.
* @example
*
* // create a cargo object with payload 2
* var cargo = async.cargo(function(tasks, callback) {
* for (var i=0; i<tasks.length; i++) {
* console.log('hello ' + tasks[i].name);
* }
* callback();
* }, 2);
*
* // add some items
* cargo.push({name: 'foo'}, function(err) {
* console.log('finished processing foo');
* });
* cargo.push({name: 'bar'}, function(err) {
* console.log('finished processing bar');
* });
* await cargo.push({name: 'baz'});
* console.log('finished processing baz');
*/
function cargo(worker, payload) {
return (0, _queue2.default)(worker, 1, payload);
}
module.exports = exports.default;
@@ -0,0 +1,108 @@
var $9f815b0e65822168$exports = require("./ar-AE.main.js");
var $340712f3db10d7a4$exports = require("./bg-BG.main.js");
var $e48681b1dc80258f$exports = require("./cs-CZ.main.js");
var $526eff8a033de63f$exports = require("./da-DK.main.js");
var $7f7267bb8a1d1662$exports = require("./de-DE.main.js");
var $0b3e72b767c9c5b3$exports = require("./el-GR.main.js");
var $8013ecad7b80bc6e$exports = require("./en-US.main.js");
var $8193bd3309f169ce$exports = require("./es-ES.main.js");
var $7f47590ede0d21d1$exports = require("./et-EE.main.js");
var $fedbf3ad45bbd615$exports = require("./fi-FI.main.js");
var $6383f908645d7728$exports = require("./fr-FR.main.js");
var $299c10c6ab4bac38$exports = require("./he-IL.main.js");
var $592de6075df6565f$exports = require("./hr-HR.main.js");
var $3254f62b1e6ffcdf$exports = require("./hu-HU.main.js");
var $af79bd6e06d0bafc$exports = require("./it-IT.main.js");
var $ed35043e56c9ef04$exports = require("./ja-JP.main.js");
var $f58ec35afca1f567$exports = require("./ko-KR.main.js");
var $3307b3bb9c99bd7d$exports = require("./lt-LT.main.js");
var $9d434ee576a846f1$exports = require("./lv-LV.main.js");
var $443fe4201b655279$exports = require("./nb-NO.main.js");
var $c71565b8a4b2e14c$exports = require("./nl-NL.main.js");
var $fd06abc31ca2d9f9$exports = require("./pl-PL.main.js");
var $edac5269f16efde1$exports = require("./pt-BR.main.js");
var $3e3bf6af9d6c8c74$exports = require("./pt-PT.main.js");
var $9d34b5bd98d02fb7$exports = require("./ro-RO.main.js");
var $e7e947d72b4d0249$exports = require("./ru-RU.main.js");
var $d609946db34cbe1a$exports = require("./sk-SK.main.js");
var $c1ca8f5a39bf35b7$exports = require("./sl-SI.main.js");
var $67542feabb08cdf6$exports = require("./sr-SP.main.js");
var $aa3bbc636c202880$exports = require("./sv-SE.main.js");
var $c1fa2374ad960a0b$exports = require("./tr-TR.main.js");
var $b6a913e54307774b$exports = require("./uk-UA.main.js");
var $d246de3cea90219f$exports = require("./zh-CN.main.js");
var $de04860896c81313$exports = require("./zh-TW.main.js");
module.exports = {
"ar-AE": $9f815b0e65822168$exports,
"bg-BG": $340712f3db10d7a4$exports,
"cs-CZ": $e48681b1dc80258f$exports,
"da-DK": $526eff8a033de63f$exports,
"de-DE": $7f7267bb8a1d1662$exports,
"el-GR": $0b3e72b767c9c5b3$exports,
"en-US": $8013ecad7b80bc6e$exports,
"es-ES": $8193bd3309f169ce$exports,
"et-EE": $7f47590ede0d21d1$exports,
"fi-FI": $fedbf3ad45bbd615$exports,
"fr-FR": $6383f908645d7728$exports,
"he-IL": $299c10c6ab4bac38$exports,
"hr-HR": $592de6075df6565f$exports,
"hu-HU": $3254f62b1e6ffcdf$exports,
"it-IT": $af79bd6e06d0bafc$exports,
"ja-JP": $ed35043e56c9ef04$exports,
"ko-KR": $f58ec35afca1f567$exports,
"lt-LT": $3307b3bb9c99bd7d$exports,
"lv-LV": $9d434ee576a846f1$exports,
"nb-NO": $443fe4201b655279$exports,
"nl-NL": $c71565b8a4b2e14c$exports,
"pl-PL": $fd06abc31ca2d9f9$exports,
"pt-BR": $edac5269f16efde1$exports,
"pt-PT": $3e3bf6af9d6c8c74$exports,
"ro-RO": $9d34b5bd98d02fb7$exports,
"ru-RU": $e7e947d72b4d0249$exports,
"sk-SK": $d609946db34cbe1a$exports,
"sl-SI": $c1ca8f5a39bf35b7$exports,
"sr-SP": $67542feabb08cdf6$exports,
"sv-SE": $aa3bbc636c202880$exports,
"tr-TR": $c1fa2374ad960a0b$exports,
"uk-UA": $b6a913e54307774b$exports,
"zh-CN": $d246de3cea90219f$exports,
"zh-TW": $de04860896c81313$exports
};
//# sourceMappingURL=intlStrings.main.js.map
@@ -0,0 +1,6 @@
export interface Options {
patterns?: readonly string[];
}
export type MessageId = 'preferNamespaceImport';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferNamespaceImport", [(Options | undefined)?], import("../utils/create-rule.ts").ImportXPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,6 @@
import temporalUndefined from "./temporalUndefined.js";
import tdz from "./tdz.js";
function _temporalRef(r, e) {
return r === temporalUndefined ? tdz(e) : r;
}
export { _temporalRef as default };
@@ -0,0 +1,37 @@
import baseSlice from './_baseSlice.js';
import isIterateeCall from './_isIterateeCall.js';
import toInteger from './toInteger.js';
/**
* Creates a slice of `array` from `start` up to, but not including, `end`.
*
* **Note:** This method is used instead of
* [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
* returned.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to slice.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the slice of `array`.
*/
function slice(array, start, end) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
start = 0;
end = length;
}
else {
start = start == null ? 0 : toInteger(start);
end = end === undefined ? length : toInteger(end);
}
return baseSlice(array, start, end);
}
export default slice;
@@ -0,0 +1,555 @@
/**
* Copyright (c) 2018 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { IDeleteEvent, IInsertEvent } from 'common/CircularList';
import { IEvent, IEventEmitter } from 'common/EventEmitter';
import { Attributes, UnderlineStyle } from 'common/buffer/Constants'; // eslint-disable-line no-unused-vars
import { IBufferSet } from 'common/buffer/Types';
import { IParams } from 'common/parser/Types';
import { ICoreMouseService, ICoreService, IOptionsService, IUnicodeService } from 'common/services/Services';
import { IFunctionIdentifier, ITerminalOptions as IPublicTerminalOptions } from '@xterm/xterm';
export interface ICoreTerminal {
coreMouseService: ICoreMouseService;
coreService: ICoreService;
optionsService: IOptionsService;
unicodeService: IUnicodeService;
buffers: IBufferSet;
options: Required<ITerminalOptions>;
registerCsiHandler(id: IFunctionIdentifier, callback: (params: IParams) => boolean | Promise<boolean>): IDisposable;
registerDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: IParams) => boolean | Promise<boolean>): IDisposable;
registerEscHandler(id: IFunctionIdentifier, callback: () => boolean | Promise<boolean>): IDisposable;
registerOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable;
}
export interface IDisposable {
dispose(): void;
}
// TODO: The options that are not in the public API should be reviewed
export interface ITerminalOptions extends IPublicTerminalOptions {
[key: string]: any;
cancelEvents?: boolean;
convertEol?: boolean;
termName?: string;
}
export type CursorStyle = 'block' | 'underline' | 'bar';
export type CursorInactiveStyle = 'outline' | 'block' | 'bar' | 'underline' | 'none';
export type XtermListener = (...args: any[]) => void;
/**
* A keyboard event interface which does not depend on the DOM, KeyboardEvent implicitly extends
* this event.
*/
export interface IKeyboardEvent {
altKey: boolean;
ctrlKey: boolean;
shiftKey: boolean;
metaKey: boolean;
/** @deprecated See KeyboardEvent.keyCode */
keyCode: number;
key: string;
type: string;
code: string;
}
export interface IScrollEvent {
position: number;
source: ScrollSource;
}
export const enum ScrollSource {
TERMINAL,
VIEWPORT,
}
export interface ICircularList<T> {
length: number;
maxLength: number;
isFull: boolean;
onDeleteEmitter: IEventEmitter<IDeleteEvent>;
onDelete: IEvent<IDeleteEvent>;
onInsertEmitter: IEventEmitter<IInsertEvent>;
onInsert: IEvent<IInsertEvent>;
onTrimEmitter: IEventEmitter<number>;
onTrim: IEvent<number>;
get(index: number): T | undefined;
set(index: number, value: T): void;
push(value: T): void;
recycle(): T;
pop(): T | undefined;
splice(start: number, deleteCount: number, ...items: T[]): void;
trimStart(count: number): void;
shiftElements(start: number, count: number, offset: number): void;
}
export const enum KeyboardResultType {
SEND_KEY,
SELECT_ALL,
PAGE_UP,
PAGE_DOWN
}
export interface IKeyboardResult {
type: KeyboardResultType;
cancel: boolean;
key: string | undefined;
}
export interface ICharset {
[key: string]: string | undefined;
}
export type CharData = [number, string, number, number];
export interface IColor {
readonly css: string;
readonly rgba: number; // 32-bit int with rgba in each byte
}
export type IColorRGB = [number, number, number];
export interface IExtendedAttrs {
ext: number;
underlineStyle: UnderlineStyle;
underlineColor: number;
underlineVariantOffset: number;
urlId: number;
clone(): IExtendedAttrs;
isEmpty(): boolean;
}
/**
* Tracks the current hyperlink. Since these are treated as extended attirbutes, these get passed on
* to the linkifier when anything is printed. Doing it this way ensures that even when the cursor
* moves around unexpectedly the link is tracked, as opposed to using a start position and
* finalizing it at the end.
*/
export interface IOscLinkData {
id?: string;
uri: string;
}
/**
* An object that represents all attributes of a cell.
*/
export interface IAttributeData {
/**
* "fg" is a 32-bit unsigned integer that stores the foreground color of the cell in the 24 least
* significant bits and additional flags in the remaining 8 bits.
*/
fg: number;
/**
* "bg" is a 32-bit unsigned integer that stores the background color of the cell in the 24 least
* significant bits and additional flags in the remaining 8 bits.
*/
bg: number;
/**
* "extended", aka "ext", stores extended attributes beyond those available in fg and bg. This
* data is optional on a cell and encodes less common data.
*/
extended: IExtendedAttrs;
clone(): IAttributeData;
// flags
isInverse(): number;
isBold(): number;
isUnderline(): number;
isBlink(): number;
isInvisible(): number;
isItalic(): number;
isDim(): number;
isStrikethrough(): number;
isProtected(): number;
isOverline(): number;
/**
* The color mode of the foreground color which determines how to decode {@link getFgColor},
* possible values include {@link Attributes.CM_DEFAULT}, {@link Attributes.CM_P16},
* {@link Attributes.CM_P256} and {@link Attributes.CM_RGB}.
*/
getFgColorMode(): number;
/**
* The color mode of the background color which determines how to decode {@link getBgColor},
* possible values include {@link Attributes.CM_DEFAULT}, {@link Attributes.CM_P16},
* {@link Attributes.CM_P256} and {@link Attributes.CM_RGB}.
*/
getBgColorMode(): number;
isFgRGB(): boolean;
isBgRGB(): boolean;
isFgPalette(): boolean;
isBgPalette(): boolean;
isFgDefault(): boolean;
isBgDefault(): boolean;
isAttributeDefault(): boolean;
/**
* Gets an integer representation of the foreground color, how to decode the color depends on the
* color mode {@link getFgColorMode}.
*/
getFgColor(): number;
/**
* Gets an integer representation of the background color, how to decode the color depends on the
* color mode {@link getBgColorMode}.
*/
getBgColor(): number;
// extended attrs
hasExtendedAttrs(): number;
updateExtended(): void;
getUnderlineColor(): number;
getUnderlineColorMode(): number;
isUnderlineColorRGB(): boolean;
isUnderlineColorPalette(): boolean;
isUnderlineColorDefault(): boolean;
getUnderlineStyle(): number;
getUnderlineVariantOffset(): number;
}
/** Cell data */
export interface ICellData extends IAttributeData {
content: number;
combinedData: string;
isCombined(): number;
getWidth(): number;
getChars(): string;
getCode(): number;
setFromCharData(value: CharData): void;
getAsCharData(): CharData;
}
/**
* Interface for a line in the terminal buffer.
*/
export interface IBufferLine {
length: number;
isWrapped: boolean;
get(index: number): CharData;
set(index: number, value: CharData): void;
loadCell(index: number, cell: ICellData): ICellData;
setCell(index: number, cell: ICellData): void;
setCellFromCodepoint(index: number, codePoint: number, width: number, attrs: IAttributeData): void;
addCodepointToCell(index: number, codePoint: number, width: number): void;
insertCells(pos: number, n: number, ch: ICellData): void;
deleteCells(pos: number, n: number, fill: ICellData): void;
replaceCells(start: number, end: number, fill: ICellData, respectProtect?: boolean): void;
resize(cols: number, fill: ICellData): boolean;
cleanupMemory(): number;
fill(fillCellData: ICellData, respectProtect?: boolean): void;
copyFrom(line: IBufferLine): void;
clone(): IBufferLine;
getTrimmedLength(): number;
getNoBgTrimmedLength(): number;
translateToString(trimRight?: boolean, startCol?: number, endCol?: number, outColumns?: number[]): string;
/* direct access to cell attrs */
getWidth(index: number): number;
hasWidth(index: number): number;
getFg(index: number): number;
getBg(index: number): number;
hasContent(index: number): number;
getCodePoint(index: number): number;
isCombined(index: number): number;
getString(index: number): string;
}
export interface IMarker extends IDisposable {
readonly id: number;
readonly isDisposed: boolean;
readonly line: number;
onDispose: IEvent<void>;
}
export interface IModes {
insertMode: boolean;
}
export interface IDecPrivateModes {
applicationCursorKeys: boolean;
applicationKeypad: boolean;
bracketedPasteMode: boolean;
origin: boolean;
reverseWraparound: boolean;
sendFocus: boolean;
wraparound: boolean; // defaults: xterm - true, vt100 - false
}
export interface IRowRange {
start: number;
end: number;
}
/**
* Interface for mouse events in the core.
*/
export const enum CoreMouseButton {
LEFT = 0,
MIDDLE = 1,
RIGHT = 2,
NONE = 3,
WHEEL = 4,
// additional buttons 1..8
// untested!
AUX1 = 8,
AUX2 = 9,
AUX3 = 10,
AUX4 = 11,
AUX5 = 12,
AUX6 = 13,
AUX7 = 14,
AUX8 = 15
}
export const enum CoreMouseAction {
UP = 0, // buttons, wheel
DOWN = 1, // buttons, wheel
LEFT = 2, // wheel only
RIGHT = 3, // wheel only
MOVE = 32 // buttons only
}
export interface ICoreMouseEvent {
/** column (zero based). */
col: number;
/** row (zero based). */
row: number;
/** xy pixel positions. */
x: number;
y: number;
/**
* Button the action occured. Due to restrictions of the tracking protocols
* it is not possible to report multiple buttons at once.
* Wheel is treated as a button.
* There are invalid combinations of buttons and actions possible
* (like move + wheel), those are silently ignored by the CoreMouseService.
*/
button: CoreMouseButton;
action: CoreMouseAction;
/**
* Modifier states.
* Protocols will add/ignore those based on specific restrictions.
*/
ctrl?: boolean;
alt?: boolean;
shift?: boolean;
}
/**
* CoreMouseEventType
* To be reported to the browser component which events a mouse
* protocol wants to be catched and forwarded as an ICoreMouseEvent
* to CoreMouseService.
*/
export const enum CoreMouseEventType {
NONE = 0,
/** any mousedown event */
DOWN = 1,
/** any mouseup event */
UP = 2,
/** any mousemove event while a button is held */
DRAG = 4,
/** any mousemove event without a button */
MOVE = 8,
/** any wheel event */
WHEEL = 16
}
/**
* Mouse protocol interface.
* A mouse protocol can be registered and activated at the CoreMouseService.
* `events` should contain a list of needed events as a hint for the browser component
* to install/remove the appropriate event handlers.
* `restrict` applies further protocol specific restrictions like not allowed
* modifiers or filtering invalid event types.
*/
export interface ICoreMouseProtocol {
events: CoreMouseEventType;
restrict: (e: ICoreMouseEvent) => boolean;
}
/**
* CoreMouseEncoding
* The tracking encoding can be registered and activated at the CoreMouseService.
* If a ICoreMouseEvent passes all procotol restrictions it will be encoded
* with the active encoding and sent out.
* Note: Returning an empty string will supress sending a mouse report,
* which can be used to skip creating falsey reports in limited encodings
* (DEFAULT only supports up to 223 1-based as coord value).
*/
export type CoreMouseEncoding = (event: ICoreMouseEvent) => string;
/**
* windowOptions
*/
export interface IWindowOptions {
restoreWin?: boolean;
minimizeWin?: boolean;
setWinPosition?: boolean;
setWinSizePixels?: boolean;
raiseWin?: boolean;
lowerWin?: boolean;
refreshWin?: boolean;
setWinSizeChars?: boolean;
maximizeWin?: boolean;
fullscreenWin?: boolean;
getWinState?: boolean;
getWinPosition?: boolean;
getWinSizePixels?: boolean;
getScreenSizePixels?: boolean;
getCellSizePixels?: boolean;
getWinSizeChars?: boolean;
getScreenSizeChars?: boolean;
getIconTitle?: boolean;
getWinTitle?: boolean;
pushTitle?: boolean;
popTitle?: boolean;
setWinLines?: boolean;
}
// color events from common, used for OSC 4/10/11/12 and 104/110/111/112
export const enum ColorRequestType {
REPORT = 0,
SET = 1,
RESTORE = 2
}
// IntRange from https://stackoverflow.com/a/39495173
type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N
? Acc[number]
: Enumerate<N, [...Acc, Acc['length']]>;
type IntRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
type ColorIndex = IntRange<0, 256>; // number from 0 to 255
type AllColorIndex = ColorIndex | SpecialColorIndex;
export const enum SpecialColorIndex {
FOREGROUND = 256,
BACKGROUND = 257,
CURSOR = 258
}
export interface IColorReportRequest {
type: ColorRequestType.REPORT;
index: AllColorIndex;
}
export interface IColorSetRequest {
type: ColorRequestType.SET;
index: AllColorIndex;
color: IColorRGB;
}
export interface IColorRestoreRequest {
type: ColorRequestType.RESTORE;
index?: AllColorIndex;
}
export type IColorEvent = (IColorReportRequest | IColorSetRequest | IColorRestoreRequest)[];
/**
* Calls the parser and handles actions generated by the parser.
*/
export interface IInputHandler {
onTitleChange: IEvent<string>;
parse(data: string | Uint8Array, promiseResult?: boolean): void | Promise<boolean>;
print(data: Uint32Array, start: number, end: number): void;
registerCsiHandler(id: IFunctionIdentifier, callback: (params: IParams) => boolean | Promise<boolean>): IDisposable;
registerDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: IParams) => boolean | Promise<boolean>): IDisposable;
registerEscHandler(id: IFunctionIdentifier, callback: () => boolean | Promise<boolean>): IDisposable;
registerOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable;
/** C0 BEL */ bell(): boolean;
/** C0 LF */ lineFeed(): boolean;
/** C0 CR */ carriageReturn(): boolean;
/** C0 BS */ backspace(): boolean;
/** C0 HT */ tab(): boolean;
/** C0 SO */ shiftOut(): boolean;
/** C0 SI */ shiftIn(): boolean;
/** CSI @ */ insertChars(params: IParams): boolean;
/** CSI SP @ */ scrollLeft(params: IParams): boolean;
/** CSI A */ cursorUp(params: IParams): boolean;
/** CSI SP A */ scrollRight(params: IParams): boolean;
/** CSI B */ cursorDown(params: IParams): boolean;
/** CSI C */ cursorForward(params: IParams): boolean;
/** CSI D */ cursorBackward(params: IParams): boolean;
/** CSI E */ cursorNextLine(params: IParams): boolean;
/** CSI F */ cursorPrecedingLine(params: IParams): boolean;
/** CSI G */ cursorCharAbsolute(params: IParams): boolean;
/** CSI H */ cursorPosition(params: IParams): boolean;
/** CSI I */ cursorForwardTab(params: IParams): boolean;
/** CSI J */ eraseInDisplay(params: IParams): boolean;
/** CSI K */ eraseInLine(params: IParams): boolean;
/** CSI L */ insertLines(params: IParams): boolean;
/** CSI M */ deleteLines(params: IParams): boolean;
/** CSI P */ deleteChars(params: IParams): boolean;
/** CSI S */ scrollUp(params: IParams): boolean;
/** CSI T */ scrollDown(params: IParams, collect?: string): boolean;
/** CSI X */ eraseChars(params: IParams): boolean;
/** CSI Z */ cursorBackwardTab(params: IParams): boolean;
/** CSI ` */ charPosAbsolute(params: IParams): boolean;
/** CSI a */ hPositionRelative(params: IParams): boolean;
/** CSI b */ repeatPrecedingCharacter(params: IParams): boolean;
/** CSI c */ sendDeviceAttributesPrimary(params: IParams): boolean;
/** CSI > c */ sendDeviceAttributesSecondary(params: IParams): boolean;
/** CSI d */ linePosAbsolute(params: IParams): boolean;
/** CSI e */ vPositionRelative(params: IParams): boolean;
/** CSI f */ hVPosition(params: IParams): boolean;
/** CSI g */ tabClear(params: IParams): boolean;
/** CSI h */ setMode(params: IParams, collect?: string): boolean;
/** CSI l */ resetMode(params: IParams, collect?: string): boolean;
/** CSI m */ charAttributes(params: IParams): boolean;
/** CSI n */ deviceStatus(params: IParams, collect?: string): boolean;
/** CSI p */ softReset(params: IParams, collect?: string): boolean;
/** CSI q */ setCursorStyle(params: IParams, collect?: string): boolean;
/** CSI r */ setScrollRegion(params: IParams, collect?: string): boolean;
/** CSI s */ saveCursor(params: IParams): boolean;
/** CSI u */ restoreCursor(params: IParams): boolean;
/** CSI ' } */ insertColumns(params: IParams): boolean;
/** CSI ' ~ */ deleteColumns(params: IParams): boolean;
/** OSC 0
OSC 2 */ setTitle(data: string): boolean;
/** OSC 4 */ setOrReportIndexedColor(data: string): boolean;
/** OSC 10 */ setOrReportFgColor(data: string): boolean;
/** OSC 11 */ setOrReportBgColor(data: string): boolean;
/** OSC 12 */ setOrReportCursorColor(data: string): boolean;
/** OSC 104 */ restoreIndexedColor(data: string): boolean;
/** OSC 110 */ restoreFgColor(data: string): boolean;
/** OSC 111 */ restoreBgColor(data: string): boolean;
/** OSC 112 */ restoreCursorColor(data: string): boolean;
/** ESC E */ nextLine(): boolean;
/** ESC = */ keypadApplicationMode(): boolean;
/** ESC > */ keypadNumericMode(): boolean;
/** ESC % G
ESC % @ */ selectDefaultCharset(): boolean;
/** ESC ( C
ESC ) C
ESC * C
ESC + C
ESC - C
ESC . C
ESC / C */ selectCharset(collectAndFlag: string): boolean;
/** ESC D */ index(): boolean;
/** ESC H */ tabSet(): boolean;
/** ESC M */ reverseIndex(): boolean;
/** ESC c */ fullReset(): boolean;
/** ESC n
ESC o
ESC |
ESC }
ESC ~ */ setgLevel(level: number): boolean;
/** ESC # 8 */ screenAlignmentPattern(): boolean;
}
export interface IParseStack {
paused: boolean;
cursorStartX: number;
cursorStartY: number;
decodedLength: number;
position: number;
}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more