docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped

This commit is contained in:
TanTan committed 2026-11-13 09:27:07 +08:00
1 parent fa9c73363d
commit 2a69b23b47
18210 files changed
+5101211 -16

No files matched your search

@@ -0,0 +1,93 @@
{
"name": "tailwind-merge",
"version": "3.5.0",
"description": "Merge Tailwind CSS classes without style conflicts",
"keywords": [
"tailwindcss",
"tailwind",
"css",
"classes",
"className",
"classList",
"merge",
"conflict",
"override"
],
"homepage": "https://github.com/dcastil/tailwind-merge",
"bugs": {
"url": "https://github.com/dcastil/tailwind-merge/issues"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/dcastil"
},
"license": "MIT",
"author": "Dany Castillo",
"files": [
"dist",
"src"
],
"source": "src/index.ts",
"exports": {
".": {
"types": "./dist/types.d.ts",
"require": "./dist/bundle-cjs.js",
"import": "./dist/bundle-mjs.mjs",
"default": "./dist/bundle-mjs.mjs"
},
"./es5": {
"types": "./dist/types.d.ts",
"require": "./dist/es5/bundle-cjs.js",
"import": "./dist/es5/bundle-mjs.mjs",
"default": "./dist/es5/bundle-mjs.mjs"
}
},
"main": "./dist/bundle-cjs.js",
"types": "./dist/types.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/dcastil/tailwind-merge.git"
},
"sideEffects": false,
"scripts": {
"build": "rollup --config scripts/rollup.config.mjs",
"bench": "vitest bench --config scripts/vitest.config.mts --no-watch",
"test": "vitest --config scripts/vitest.config.mts --no-watch --coverage",
"test:watch": "vitest --config scripts/vitest.config.mts",
"test:exports": "node scripts/test-built-package-exports.cjs && node scripts/test-built-package-exports.mjs",
"lint": "eslint --max-warnings 0 '**'",
"preversion": "if [ -n \"$DANYS_MACHINE\" ]; then git checkout main && git pull; fi",
"version": "zx scripts/update-readme.mjs",
"postversion": "if [ -n \"$DANYS_MACHINE\" ]; then git push --follow-tags && open https://github.com/dcastil/tailwind-merge/releases; fi"
},
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.29.0",
"@babel/preset-env": "^7.29.0",
"@codspeed/vitest-plugin": "^5.1.0",
"@rollup/plugin-babel": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.3",
"@rollup/plugin-typescript": "^12.3.0",
"@types/node": "^24.10.9",
"@vitest/coverage-v8": "^4.0.18",
"@vitest/eslint-plugin": "^1.6.6",
"babel-plugin-annotate-pure-calls": "^0.5.0",
"babel-plugin-polyfill-regenerator": "^0.6.6",
"eslint": "^9.39.2",
"eslint-plugin-import": "^2.32.0",
"globby": "^16.1.0",
"prettier": "^3.8.1",
"rollup": "^4.57.1",
"rollup-plugin-delete": "^3.0.2",
"rollup-plugin-dts": "^6.3.0",
"tslib": "^2.8.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.54.0",
"vitest": "^4.0.18",
"zx": "^8.8.5"
},
"publishConfig": {
"provenance": true
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
@@ -0,0 +1 @@
{"version":3,"file":"flip-horizontal.js","sources":["../../../src/icons/flip-horizontal.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FlipHorizontal\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCAzSDVhMiAyIDAgMCAwLTIgMnYxNGMwIDEuMS45IDIgMiAyaDMiIC8+CiAgPHBhdGggZD0iTTE2IDNoM2EyIDIgMCAwIDEgMiAydjE0YTIgMiAwIDAgMS0yIDJoLTMiIC8+CiAgPHBhdGggZD0iTTEyIDIwdjIiIC8+CiAgPHBhdGggZD0iTTEyIDE0djIiIC8+CiAgPHBhdGggZD0iTTEyIDh2MiIgLz4KICA8cGF0aCBkPSJNMTIgMnYyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/flip-horizontal\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FlipHorizontal = createLucideIcon('FlipHorizontal', [\n ['path', { d: 'M8 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h3', key: '1i73f7' }],\n ['path', { d: 'M16 3h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-3', key: 'saxlbk' }],\n ['path', { d: 'M12 20v2', key: '1lh1kg' }],\n ['path', { d: 'M12 14v2', key: '8jcxud' }],\n ['path', { d: 'M12 8v2', key: '1woqiv' }],\n ['path', { d: 'M12 2v2', key: 'tus03m' }],\n]);\n\nexport default FlipHorizontal;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,136 @@
const unusable = (name, prop = 'algorithm.name') => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);
const isAlgorithm = (algorithm, name) => algorithm.name === name;
function getHashLength(hash) {
return parseInt(hash.name.slice(4), 10);
}
function checkHashLength(algorithm, expected) {
const actual = getHashLength(algorithm.hash);
if (actual !== expected)
throw unusable(`SHA-${expected}`, 'algorithm.hash');
}
function getNamedCurve(alg) {
switch (alg) {
case 'ES256':
return 'P-256';
case 'ES384':
return 'P-384';
case 'ES512':
return 'P-521';
default:
throw new Error('unreachable');
}
}
function checkUsage(key, usage) {
if (usage && !key.usages.includes(usage)) {
throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`);
}
}
export function checkSigCryptoKey(key, alg, usage) {
switch (alg) {
case 'HS256':
case 'HS384':
case 'HS512': {
if (!isAlgorithm(key.algorithm, 'HMAC'))
throw unusable('HMAC');
checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));
break;
}
case 'RS256':
case 'RS384':
case 'RS512': {
if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5'))
throw unusable('RSASSA-PKCS1-v1_5');
checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));
break;
}
case 'PS256':
case 'PS384':
case 'PS512': {
if (!isAlgorithm(key.algorithm, 'RSA-PSS'))
throw unusable('RSA-PSS');
checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));
break;
}
case 'Ed25519':
case 'EdDSA': {
if (!isAlgorithm(key.algorithm, 'Ed25519'))
throw unusable('Ed25519');
break;
}
case 'ML-DSA-44':
case 'ML-DSA-65':
case 'ML-DSA-87': {
if (!isAlgorithm(key.algorithm, alg))
throw unusable(alg);
break;
}
case 'ES256':
case 'ES384':
case 'ES512': {
if (!isAlgorithm(key.algorithm, 'ECDSA'))
throw unusable('ECDSA');
const expected = getNamedCurve(alg);
const actual = key.algorithm.namedCurve;
if (actual !== expected)
throw unusable(expected, 'algorithm.namedCurve');
break;
}
default:
throw new TypeError('CryptoKey does not support this operation');
}
checkUsage(key, usage);
}
export function checkEncCryptoKey(key, alg, usage) {
switch (alg) {
case 'A128GCM':
case 'A192GCM':
case 'A256GCM': {
if (!isAlgorithm(key.algorithm, 'AES-GCM'))
throw unusable('AES-GCM');
const expected = parseInt(alg.slice(1, 4), 10);
const actual = key.algorithm.length;
if (actual !== expected)
throw unusable(expected, 'algorithm.length');
break;
}
case 'A128KW':
case 'A192KW':
case 'A256KW': {
if (!isAlgorithm(key.algorithm, 'AES-KW'))
throw unusable('AES-KW');
const expected = parseInt(alg.slice(1, 4), 10);
const actual = key.algorithm.length;
if (actual !== expected)
throw unusable(expected, 'algorithm.length');
break;
}
case 'ECDH': {
switch (key.algorithm.name) {
case 'ECDH':
case 'X25519':
break;
default:
throw unusable('ECDH or X25519');
}
break;
}
case 'PBES2-HS256+A128KW':
case 'PBES2-HS384+A192KW':
case 'PBES2-HS512+A256KW':
if (!isAlgorithm(key.algorithm, 'PBKDF2'))
throw unusable('PBKDF2');
break;
case 'RSA-OAEP':
case 'RSA-OAEP-256':
case 'RSA-OAEP-384':
case 'RSA-OAEP-512': {
if (!isAlgorithm(key.algorithm, 'RSA-OAEP'))
throw unusable('RSA-OAEP');
checkHashLength(key.algorithm, parseInt(alg.slice(9), 10) || 1);
break;
}
default:
throw new TypeError('CryptoKey does not support this operation');
}
checkUsage(key, usage);
}
@@ -0,0 +1,20 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const EarthLock = createLucideIcon("EarthLock", [
["path", { d: "M7 3.34V5a3 3 0 0 0 3 3", key: "w732o8" }],
["path", { d: "M11 21.95V18a2 2 0 0 0-2-2 2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05", key: "f02343" }],
["path", { d: "M21.54 15H17a2 2 0 0 0-2 2v4.54", key: "1djwo0" }],
["path", { d: "M12 2a10 10 0 1 0 9.54 13", key: "zjsr6q" }],
["path", { d: "M20 6V4a2 2 0 1 0-4 0v2", key: "1of5e8" }],
["rect", { width: "8", height: "5", x: "14", y: "6", rx: "1", key: "1fmf51" }]
]);
export { EarthLock as default };
//# sourceMappingURL=earth-lock.js.map
@@ -0,0 +1,28 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Ampersands = createLucideIcon("Ampersands", [
[
"path",
{
d: "M10 17c-5-3-7-7-7-9a2 2 0 0 1 4 0c0 2.5-5 2.5-5 6 0 1.7 1.3 3 3 3 2.8 0 5-2.2 5-5",
key: "12lh1k"
}
],
[
"path",
{
d: "M22 17c-5-3-7-7-7-9a2 2 0 0 1 4 0c0 2.5-5 2.5-5 6 0 1.7 1.3 3 3 3 2.8 0 5-2.2 5-5",
key: "173c68"
}
]
]);
export { Ampersands as default };
//# sourceMappingURL=ampersands.js.map
@@ -0,0 +1,149 @@
{
"name": "@stylistic/eslint-plugin",
"type": "module",
"version": "5.10.0",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
"homepage": "https://github.com/eslint-stylistic/eslint-stylistic#readme",
"repository": {
"directory": "packages/eslint-plugin",
"type": "git",
"url": "git+https://github.com/eslint-stylistic/eslint-stylistic.git"
},
"bugs": {
"url": "https://github.com/eslint-stylistic/eslint-stylistic/issues"
},
"exports": {
".": {
"types": "./dist/dts/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
},
"./define-config-support": {
"types": "./dist/dts/define-config-support.d.ts"
},
"./rule-options": {
"types": "./dist/dts/rule-options.d.ts"
},
"./rules/array-bracket-newline": "./dist/rules/array-bracket-newline.js",
"./rules/array-bracket-spacing": "./dist/rules/array-bracket-spacing.js",
"./rules/array-element-newline": "./dist/rules/array-element-newline.js",
"./rules/arrow-parens": "./dist/rules/arrow-parens.js",
"./rules/arrow-spacing": "./dist/rules/arrow-spacing.js",
"./rules/block-spacing": "./dist/rules/block-spacing.js",
"./rules/brace-style": "./dist/rules/brace-style.js",
"./rules/comma-dangle": "./dist/rules/comma-dangle.js",
"./rules/comma-spacing": "./dist/rules/comma-spacing.js",
"./rules/comma-style": "./dist/rules/comma-style.js",
"./rules/computed-property-spacing": "./dist/rules/computed-property-spacing.js",
"./rules/curly-newline": "./dist/rules/curly-newline.js",
"./rules/dot-location": "./dist/rules/dot-location.js",
"./rules/eol-last": "./dist/rules/eol-last.js",
"./rules/function-call-argument-newline": "./dist/rules/function-call-argument-newline.js",
"./rules/function-call-spacing": "./dist/rules/function-call-spacing.js",
"./rules/function-paren-newline": "./dist/rules/function-paren-newline.js",
"./rules/generator-star-spacing": "./dist/rules/generator-star-spacing.js",
"./rules/implicit-arrow-linebreak": "./dist/rules/implicit-arrow-linebreak.js",
"./rules/indent": "./dist/rules/indent.js",
"./rules/indent-binary-ops": "./dist/rules/indent-binary-ops.js",
"./rules/jsx-child-element-spacing": "./dist/rules/jsx-child-element-spacing.js",
"./rules/jsx-closing-bracket-location": "./dist/rules/jsx-closing-bracket-location.js",
"./rules/jsx-closing-tag-location": "./dist/rules/jsx-closing-tag-location.js",
"./rules/jsx-curly-brace-presence": "./dist/rules/jsx-curly-brace-presence.js",
"./rules/jsx-curly-newline": "./dist/rules/jsx-curly-newline.js",
"./rules/jsx-curly-spacing": "./dist/rules/jsx-curly-spacing.js",
"./rules/jsx-equals-spacing": "./dist/rules/jsx-equals-spacing.js",
"./rules/jsx-first-prop-new-line": "./dist/rules/jsx-first-prop-new-line.js",
"./rules/jsx-function-call-newline": "./dist/rules/jsx-function-call-newline.js",
"./rules/jsx-indent": "./dist/rules/jsx-indent.js",
"./rules/jsx-indent-props": "./dist/rules/jsx-indent-props.js",
"./rules/jsx-max-props-per-line": "./dist/rules/jsx-max-props-per-line.js",
"./rules/jsx-newline": "./dist/rules/jsx-newline.js",
"./rules/jsx-one-expression-per-line": "./dist/rules/jsx-one-expression-per-line.js",
"./rules/jsx-pascal-case": "./dist/rules/jsx-pascal-case.js",
"./rules/jsx-props-no-multi-spaces": "./dist/rules/jsx-props-no-multi-spaces.js",
"./rules/jsx-props-style": "./dist/rules/jsx-props-style.js",
"./rules/jsx-quotes": "./dist/rules/jsx-quotes.js",
"./rules/jsx-self-closing-comp": "./dist/rules/jsx-self-closing-comp.js",
"./rules/jsx-sort-props": "./dist/rules/jsx-sort-props.js",
"./rules/jsx-tag-spacing": "./dist/rules/jsx-tag-spacing.js",
"./rules/jsx-wrap-multilines": "./dist/rules/jsx-wrap-multilines.js",
"./rules/key-spacing": "./dist/rules/key-spacing.js",
"./rules/keyword-spacing": "./dist/rules/keyword-spacing.js",
"./rules/line-comment-position": "./dist/rules/line-comment-position.js",
"./rules/linebreak-style": "./dist/rules/linebreak-style.js",
"./rules/lines-around-comment": "./dist/rules/lines-around-comment.js",
"./rules/lines-between-class-members": "./dist/rules/lines-between-class-members.js",
"./rules/list-style": "./dist/rules/list-style.js",
"./rules/max-len": "./dist/rules/max-len.js",
"./rules/max-statements-per-line": "./dist/rules/max-statements-per-line.js",
"./rules/member-delimiter-style": "./dist/rules/member-delimiter-style.js",
"./rules/multiline-comment-style": "./dist/rules/multiline-comment-style.js",
"./rules/multiline-ternary": "./dist/rules/multiline-ternary.js",
"./rules/new-parens": "./dist/rules/new-parens.js",
"./rules/newline-per-chained-call": "./dist/rules/newline-per-chained-call.js",
"./rules/no-confusing-arrow": "./dist/rules/no-confusing-arrow.js",
"./rules/no-extra-parens": "./dist/rules/no-extra-parens.js",
"./rules/no-extra-semi": "./dist/rules/no-extra-semi.js",
"./rules/no-floating-decimal": "./dist/rules/no-floating-decimal.js",
"./rules/no-mixed-operators": "./dist/rules/no-mixed-operators.js",
"./rules/no-mixed-spaces-and-tabs": "./dist/rules/no-mixed-spaces-and-tabs.js",
"./rules/no-multi-spaces": "./dist/rules/no-multi-spaces.js",
"./rules/no-multiple-empty-lines": "./dist/rules/no-multiple-empty-lines.js",
"./rules/no-tabs": "./dist/rules/no-tabs.js",
"./rules/no-trailing-spaces": "./dist/rules/no-trailing-spaces.js",
"./rules/no-whitespace-before-property": "./dist/rules/no-whitespace-before-property.js",
"./rules/nonblock-statement-body-position": "./dist/rules/nonblock-statement-body-position.js",
"./rules/object-curly-newline": "./dist/rules/object-curly-newline.js",
"./rules/object-curly-spacing": "./dist/rules/object-curly-spacing.js",
"./rules/object-property-newline": "./dist/rules/object-property-newline.js",
"./rules/one-var-declaration-per-line": "./dist/rules/one-var-declaration-per-line.js",
"./rules/operator-linebreak": "./dist/rules/operator-linebreak.js",
"./rules/padded-blocks": "./dist/rules/padded-blocks.js",
"./rules/padding-line-between-statements": "./dist/rules/padding-line-between-statements.js",
"./rules/quote-props": "./dist/rules/quote-props.js",
"./rules/quotes": "./dist/rules/quotes.js",
"./rules/rest-spread-spacing": "./dist/rules/rest-spread-spacing.js",
"./rules/semi": "./dist/rules/semi.js",
"./rules/semi-spacing": "./dist/rules/semi-spacing.js",
"./rules/semi-style": "./dist/rules/semi-style.js",
"./rules/space-before-blocks": "./dist/rules/space-before-blocks.js",
"./rules/space-before-function-paren": "./dist/rules/space-before-function-paren.js",
"./rules/space-in-parens": "./dist/rules/space-in-parens.js",
"./rules/space-infix-ops": "./dist/rules/space-infix-ops.js",
"./rules/space-unary-ops": "./dist/rules/space-unary-ops.js",
"./rules/spaced-comment": "./dist/rules/spaced-comment.js",
"./rules/switch-colon-spacing": "./dist/rules/switch-colon-spacing.js",
"./rules/template-curly-spacing": "./dist/rules/template-curly-spacing.js",
"./rules/template-tag-spacing": "./dist/rules/template-tag-spacing.js",
"./rules/type-annotation-spacing": "./dist/rules/type-annotation-spacing.js",
"./rules/type-generic-spacing": "./dist/rules/type-generic-spacing.js",
"./rules/type-named-tuple-spacing": "./dist/rules/type-named-tuple-spacing.js",
"./rules/wrap-iife": "./dist/rules/wrap-iife.js",
"./rules/wrap-regex": "./dist/rules/wrap-regex.js",
"./rules/yield-star-spacing": "./dist/rules/yield-star-spacing.js"
},
"main": "./dist/index.js",
"types": "./dist/dts/index.d.ts",
"files": [
"dist"
],
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"peerDependencies": {
"eslint": "^9.0.0 || ^10.0.0"
},
"dependencies": {
"@eslint-community/eslint-utils": "^4.9.1",
"@typescript-eslint/types": "^8.56.0",
"eslint-visitor-keys": "^4.2.1",
"espree": "^10.4.0",
"estraverse": "^5.3.0",
"picomatch": "^4.0.3"
},
"scripts": {
"build": "tsdown",
"dev": "tsdown --watch"
}
}
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Meh = createLucideIcon("Meh", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["line", { x1: "8", x2: "16", y1: "15", y2: "15", key: "1xb1d9" }],
["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
]);
export { Meh as default };
//# sourceMappingURL=meh.js.map
@@ -0,0 +1,5 @@
'use strict'
const compare = require('./compare')
const gt = (a, b, loose) => compare(a, b, loose) > 0
module.exports = gt
@@ -0,0 +1,47 @@
{
"name": "etag",
"description": "Create simple HTTP ETags",
"version": "1.8.1",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"David Björklund <david.bjorklund@gmail.com>"
],
"license": "MIT",
"keywords": [
"etag",
"http",
"res"
],
"repository": "jshttp/etag",
"devDependencies": {
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.4",
"eslint": "3.19.0",
"eslint-config-standard": "10.2.1",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-markdown": "1.0.0-beta.6",
"eslint-plugin-node": "5.1.1",
"eslint-plugin-promise": "3.5.0",
"eslint-plugin-standard": "3.0.1",
"istanbul": "0.4.5",
"mocha": "1.21.5",
"safe-buffer": "5.1.1",
"seedrandom": "2.4.3"
},
"files": [
"LICENSE",
"HISTORY.md",
"README.md",
"index.js"
],
"engines": {
"node": ">= 0.6"
},
"scripts": {
"bench": "node benchmark/index.js",
"lint": "eslint --plugin markdown --ext js,md .",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
}
}
@@ -0,0 +1,160 @@
# fast-uri
[![NPM version](https://img.shields.io/npm/v/fast-uri.svg?style=flat)](https://www.npmjs.com/package/fast-uri)
[![CI](https://github.com/fastify/fast-uri/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/fast-uri/actions/workflows/ci.yml)
[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)
Dependency-free RFC 3986 URI toolbox.
## Usage
## Options
All of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties:
Malformed authorities and out-of-range ports are reported through the parsed component's `error` field. `normalize()` leaves malformed string inputs unchanged, and `equal()` returns `false` when either string input is malformed.
Schemes are never percent-decoded. RFC 3986 does not allow percent-encoding in a scheme, so an input such as `%6Aavascript:alert(1)` is reported as malformed (`error: 'URI scheme is malformed.'`) instead of being parsed as `javascript:`. `normalize()` leaves it unchanged, `equal()` returns `false`, and `resolve()` and `serialize()` throw.
For schemes with domain hosts (`http`, `https`, `ws`, `wss`, or any scheme with the `domainHost` option), a host containing an ASCII character that RFC 3986 does not allow in a reg-name (for example `@`, TAB, LF, CR, space, `"`, `<`, `>`, `^`, `` ` ``, `{`, `|`, `}`) is reported as malformed (`error: 'URI host is malformed.'`). It is never passed through a WHATWG URL parser that could treat `@` as a delimiter or strip whitespace. `normalize()` leaves such input unchanged, `equal()` returns `false`, and `resolve()` throws.
* `scheme` (string)
Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior.
* `reference` (string)
If set to `"suffix"`, it indicates that the URI is in the suffix format and the parser will use the option's `scheme` property to determine the URI's scheme.
A suffix reference is written without its scheme and without the `//` authority marker (RFC 3986 section 4.5). Such a reference is inherently ambiguous: an authority component cannot always be distinguished from a path. When the input carries an authority of the form `host:port` (for example `//javascript:80/x`) or a userinfo containing a colon, the serialized suffix output can begin with text that reparses as a URI scheme (for example `javascript:80/x`). Do not treat suffix output as a trusted absolute URL, and do not render it or use it in a scheme allowlist without first validating it with `parse()`. If you need an unambiguous result, use the default (non-suffix) serialization.
* `tolerant` (boolean, false)
If set to `true`, the parser will relax URI resolving rules.
* `absolutePath` (boolean, false)
If set to `true`, the serializer will not resolve a relative `path` component.
* `unicodeSupport` (boolean, false)
If set to `true`, the parser will unescape non-ASCII characters in the parsed output as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).
* `domainHost` (boolean, false)
If set to `true`, the library will treat the `host` component as a domain name, and convert IDNs (International Domain Names) as per [RFC 5891](http://www.ietf.org/rfc/rfc5891.txt).
### Parse
```js
const uri = require('fast-uri')
uri.parse('uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body')
// Output
{
scheme: "uri",
userinfo: "user:pass",
host: "example.com",
port: 123,
path: "/one/two.three",
query: "q1=a1&q2=a2",
fragment: "body"
}
```
### Serialize
```js
const uri = require('fast-uri')
uri.serialize({scheme: "http", host: "example.com", fragment: "footer"})
// Output
"http://example.com/#footer"
```
### Resolve
```js
const uri = require('fast-uri')
uri.resolve("uri://a/b/c/d?q", "../../g")
// Output
"uri://a/g"
```
### Normalize
```js
const uri = require('fast-uri')
uri.normalize('http://example.com/a%2Fb')
// Output
"http://example.com/a%2Fb"
```
Reserved path escapes such as `%2F` and `%2E` are preserved as path data during normalization and comparison.
Dot segments in relative references are removed without changing what the reference resolves to: leading `..` segments that cannot be collapsed are kept, a relative path is never turned into a root-relative one, and a first-segment colon exposed by the removal is kept behind a leading `./` so the reference is not reparsed as a scheme (`a/../b` → `b`, `../x` → `../x`, `x/..` → `./`, `a/../a:b` → `./a:b`).
### Equal
```js
const uri = require('fast-uri')
uri.equal("example://a/b/c/%7Bfoo%7D", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d")
// Output
true
```
## Scheme supports
fast-uri supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_scheme)-dependent processing rules. Currently, fast-uri has built-in support for the following schemes:
* http \[[RFC 2616](http://www.ietf.org/rfc/rfc2616.txt)\]
* https \[[RFC 2818](http://www.ietf.org/rfc/rfc2818.txt)\]
* ws \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\]
* wss \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\]
* urn \[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\]
* urn:uuid \[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\]
## Benchmarks
```
fast-uri benchmark
┌─────────┬──────────────────────────────────────────┬──────────────────┬──────────────────┬────────────────────────┬────────────────────────┬─────────┐
│ (index) │ Task name │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
├─────────┼──────────────────────────────────────────┼──────────────────┼──────────────────┼────────────────────────┼────────────────────────┼─────────┤
│ 0 │ 'fast-uri: parse domain' │ '951.31 ± 0.75%' │ '875.00 ± 11.00' │ '1122538 ± 0.01%' │ '1142857 ± 14550' │ 1051187 │
│ 1 │ 'fast-uri: parse IPv4' │ '443.44 ± 0.22%' │ '406.00 ± 3.00' │ '2422762 ± 0.01%' │ '2463054 ± 18335' │ 2255105 │
│ 2 │ 'fast-uri: parse IPv6' │ '1241.6 ± 1.74%' │ '1131.0 ± 30.00' │ '875177 ± 0.02%' │ '884173 ± 24092' │ 805399 │
│ 3 │ 'fast-uri: parse URN' │ '689.19 ± 4.29%' │ '618.00 ± 9.00' │ '1598373 ± 0.01%' │ '1618123 ± 23913' │ 1450972 │
│ 4 │ 'fast-uri: parse URN uuid' │ '1025.4 ± 2.02%' │ '921.00 ± 19.00' │ '1072419 ± 0.02%' │ '1085776 ± 22871' │ 975236 │
│ 5 │ 'fast-uri: serialize uri' │ '1028.5 ± 0.53%' │ '933.00 ± 43.00' │ '1063310 ± 0.02%' │ '1071811 ± 50523' │ 972249 │
│ 6 │ 'fast-uri: serialize long uri with dots' │ '1805.1 ± 0.52%' │ '1627.0 ± 17.00' │ '602620 ± 0.02%' │ '614628 ± 6490' │ 553997 │
│ 7 │ 'fast-uri: serialize IPv6' │ '2569.4 ± 2.69%' │ '2302.0 ± 21.00' │ '426080 ± 0.03%' │ '434405 ± 3999' │ 389194 │
│ 8 │ 'fast-uri: serialize ws' │ '979.39 ± 0.43%' │ '882.00 ± 8.00' │ '1111665 ± 0.02%' │ '1133787 ± 10378' │ 1021045 │
│ 9 │ 'fast-uri: resolve' │ '2208.2 ± 1.08%' │ '1980.0 ± 24.00' │ '495001 ± 0.03%' │ '505051 ± 6049' │ 452848 │
└─────────┴──────────────────────────────────────────┴──────────────────┴──────────────────┴────────────────────────┴────────────────────────┴─────────┘
uri-js benchmark
┌─────────┬───────────────────────────────────────┬──────────────────┬──────────────────┬────────────────────────┬────────────────────────┬─────────┐
│ (index) │ Task name │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
├─────────┼───────────────────────────────────────┼──────────────────┼──────────────────┼────────────────────────┼────────────────────────┼─────────┤
│ 0 │ 'urijs: parse domain' │ '3618.3 ± 0.43%' │ '3314.0 ± 33.00' │ '294875 ± 0.04%' │ '301750 ± 2975' │ 276375 │
│ 1 │ 'urijs: parse IPv4' │ '4024.1 ± 0.41%' │ '3751.0 ± 25.00' │ '261981 ± 0.04%' │ '266596 ± 1789' │ 248506 │
│ 2 │ 'urijs: parse IPv6' │ '5417.2 ± 0.46%' │ '4968.0 ± 43.00' │ '196023 ± 0.05%' │ '201288 ± 1727' │ 184598 │
│ 3 │ 'urijs: parse URN' │ '1324.2 ± 0.23%' │ '1229.0 ± 17.00' │ '801535 ± 0.02%' │ '813670 ± 11413' │ 755185 │
│ 4 │ 'urijs: parse URN uuid' │ '1822.0 ± 3.08%' │ '1655.0 ± 15.00' │ '594433 ± 0.02%' │ '604230 ± 5427' │ 548843 │
│ 5 │ 'urijs: serialize uri' │ '4196.8 ± 0.36%' │ '3908.0 ± 27.00' │ '251146 ± 0.04%' │ '255885 ± 1756' │ 238276 │
│ 6 │ 'urijs: serialize long uri with dots' │ '8331.0 ± 1.30%' │ '7658.0 ± 72.00' │ '126440 ± 0.07%' │ '130582 ± 1239' │ 120034 │
│ 7 │ 'urijs: serialize IPv6' │ '5685.5 ± 0.30%' │ '5366.0 ± 33.00' │ '182632 ± 0.05%' │ '186359 ± 1153' │ 175886 │
│ 8 │ 'urijs: serialize ws' │ '4159.3 ± 0.20%' │ '3899.0 ± 28.00' │ '250459 ± 0.04%' │ '256476 ± 1855' │ 240423 │
│ 9 │ 'urijs: resolve' │ '6729.9 ± 0.39%' │ '6261.0 ± 37.00' │ '156361 ± 0.06%' │ '159719 ± 949' │ 148591 │
└─────────┴───────────────────────────────────────┴──────────────────┴──────────────────┴────────────────────────┴────────────────────────┴─────────┘
WHATWG URL benchmark
┌─────────┬────────────────────────────┬──────────────────┬──────────────────┬────────────────────────┬────────────────────────┬─────────┐
│ (index) │ Task name │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
├─────────┼────────────────────────────┼──────────────────┼──────────────────┼────────────────────────┼────────────────────────┼─────────┤
│ 0 │ 'WHATWG URL: parse domain' │ '475.22 ± 0.20%' │ '444.00 ± 5.00' │ '2217599 ± 0.01%' │ '2252252 ± 25652' │ 2104289 │
│ 1 │ 'WHATWG URL: parse URN' │ '384.78 ± 0.85%' │ '350.00 ± 5.00' │ '2809071 ± 0.01%' │ '2857143 ± 41408' │ 2598885 │
└─────────┴────────────────────────────┴──────────────────┴──────────────────┴────────────────────────┴────────────────────────┴─────────┘
```
## TODO
- [ ] Support MailTo
- [ ] Be 100% iso compatible with uri-js
## License
Licensed under [BSD-3-Clause](./LICENSE).
@@ -0,0 +1,424 @@
# 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.13.4](https://github.com/inspect-js/object-inspect/compare/v1.13.3...v1.13.4) - 2025-02-04
### Commits
- [Fix] avoid being fooled by a `Symbol.toStringTag` [`fa5870d`](https://github.com/inspect-js/object-inspect/commit/fa5870da468a525d2f20193700f70752f506cbf7)
- [Tests] fix tests in node v6.0 - v6.4 [`2abfe1b`](https://github.com/inspect-js/object-inspect/commit/2abfe1bc3c69f9293c07c5cd65a9d7d87a628b84)
- [Dev Deps] update `es-value-fixtures`, `for-each`, `has-symbols` [`3edfb01`](https://github.com/inspect-js/object-inspect/commit/3edfb01cc8cce220fba0dfdfe2dc8bc955758cdd)
## [v1.13.3](https://github.com/inspect-js/object-inspect/compare/v1.13.2...v1.13.3) - 2024-11-09
### Commits
- [actions] split out node 10-20, and 20+ [`44395a8`](https://github.com/inspect-js/object-inspect/commit/44395a8fc1deda6718a5e125e86b9ffcaa1c7580)
- [Fix] `quoteStyle`: properly escape only the containing quotes [`5137f8f`](https://github.com/inspect-js/object-inspect/commit/5137f8f7bea69a7fc671bb683fd35f244f38fc52)
- [Refactor] clean up `quoteStyle` code [`450680c`](https://github.com/inspect-js/object-inspect/commit/450680cd50de4e689ee3b8e1d6db3a1bcf3fc18c)
- [Tests] add `quoteStyle` escaping tests [`e997c59`](https://github.com/inspect-js/object-inspect/commit/e997c595aeaea84fd98ca35d7e1c3b5ab3ae26e0)
- [Dev Deps] update `auto-changelog`, `es-value-fixtures`, `tape` [`d5a469c`](https://github.com/inspect-js/object-inspect/commit/d5a469c99ec07ccaeafc36ac4b36a93285086d48)
- [Tests] replace `aud` with `npm audit` [`fb7815f`](https://github.com/inspect-js/object-inspect/commit/fb7815f9b72cae277a04f65bbb0543f85b88be62)
- [Dev Deps] update `mock-property` [`11c817b`](https://github.com/inspect-js/object-inspect/commit/11c817bf10392aa017755962ba6bc89d731359ee)
## [v1.13.2](https://github.com/inspect-js/object-inspect/compare/v1.13.1...v1.13.2) - 2024-06-21
### Commits
- [readme] update badges [`8a51e6b`](https://github.com/inspect-js/object-inspect/commit/8a51e6bedaf389ec40cc4659e9df53e8543d176e)
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`ef05f58`](https://github.com/inspect-js/object-inspect/commit/ef05f58c9761a41416ab907299bf0fa79517014b)
- [Dev Deps] update `error-cause`, `has-tostringtag`, `tape` [`c0c6c26`](https://github.com/inspect-js/object-inspect/commit/c0c6c26c44cee6671f7c5d43d2b91d27c5c00d90)
- [Fix] Don't throw when `global` is not defined [`d4d0965`](https://github.com/inspect-js/object-inspect/commit/d4d096570f7dbd0e03266a96de11d05eb7b63e0f)
- [meta] add missing `engines.node` [`17a352a`](https://github.com/inspect-js/object-inspect/commit/17a352af6fe1ba6b70a19081674231eb1a50c940)
- [Dev Deps] update `globalthis` [`9c08884`](https://github.com/inspect-js/object-inspect/commit/9c08884aa662a149e2f11403f413927736b97da7)
- [Dev Deps] update `error-cause` [`6af352d`](https://github.com/inspect-js/object-inspect/commit/6af352d7c3929a4cc4c55768c27bf547a5e900f4)
- [Dev Deps] update `npmignore` [`94e617d`](https://github.com/inspect-js/object-inspect/commit/94e617d38831722562fa73dff4c895746861d267)
- [Dev Deps] update `mock-property` [`2ac24d7`](https://github.com/inspect-js/object-inspect/commit/2ac24d7e58cd388ad093c33249e413e05bbfd6c3)
- [Dev Deps] update `tape` [`46125e5`](https://github.com/inspect-js/object-inspect/commit/46125e58f1d1dcfb170ed3d1ea69da550ea8d77b)
## [v1.13.1](https://github.com/inspect-js/object-inspect/compare/v1.13.0...v1.13.1) - 2023-10-19
### Commits
- [Fix] in IE 8, global can !== window despite them being prototypes of each other [`30d0859`](https://github.com/inspect-js/object-inspect/commit/30d0859dc4606cf75c2410edcd5d5c6355f8d372)
## [v1.13.0](https://github.com/inspect-js/object-inspect/compare/v1.12.3...v1.13.0) - 2023-10-14
### Commits
- [New] add special handling for the global object [`431bab2`](https://github.com/inspect-js/object-inspect/commit/431bab21a490ee51d35395966a504501e8c685da)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`fd4f619`](https://github.com/inspect-js/object-inspect/commit/fd4f6193562b4b0e95dcf5c0201b4e8cbbc4f58d)
- [Dev Deps] update `mock-property`, `tape` [`b453f6c`](https://github.com/inspect-js/object-inspect/commit/b453f6ceeebf8a1b738a1029754092e0367a4134)
- [Dev Deps] update `error-cause` [`e8ffc57`](https://github.com/inspect-js/object-inspect/commit/e8ffc577d73b92bb6a4b00c44f14e3319e374888)
- [Dev Deps] update `tape` [`054b8b9`](https://github.com/inspect-js/object-inspect/commit/054b8b9b98633284cf989e582450ebfbbe53503c)
- [Dev Deps] temporarily remove `aud` due to breaking change in transitive deps [`2476845`](https://github.com/inspect-js/object-inspect/commit/2476845e0678dd290c541c81cd3dec8420782c52)
- [Dev Deps] pin `glob`, since v10.3.8+ requires a broken `jackspeak` [`383fa5e`](https://github.com/inspect-js/object-inspect/commit/383fa5eebc0afd705cc778a4b49d8e26452e49a8)
- [Dev Deps] pin `jackspeak` since 2.1.2+ depends on npm aliases, which kill the install process in npm &lt; 6 [`68c244c`](https://github.com/inspect-js/object-inspect/commit/68c244c5174cdd877e5dcb8ee90aa3f44b2f25be)
## [v1.12.3](https://github.com/inspect-js/object-inspect/compare/v1.12.2...v1.12.3) - 2023-01-12
### Commits
- [Fix] in eg FF 24, collections lack forEach [`75fc226`](https://github.com/inspect-js/object-inspect/commit/75fc22673c82d45f28322b1946bb0eb41b672b7f)
- [actions] update rebase action to use reusable workflow [`250a277`](https://github.com/inspect-js/object-inspect/commit/250a277a095e9dacc029ab8454dcfc15de549dcd)
- [Dev Deps] update `aud`, `es-value-fixtures`, `tape` [`66a19b3`](https://github.com/inspect-js/object-inspect/commit/66a19b3209ccc3c5ef4b34c3cb0160e65d1ce9d5)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `error-cause` [`c43d332`](https://github.com/inspect-js/object-inspect/commit/c43d3324b48384a16fd3dc444e5fc589d785bef3)
- [Tests] add `@pkgjs/support` to `postlint` [`e2618d2`](https://github.com/inspect-js/object-inspect/commit/e2618d22a7a3fa361b6629b53c1752fddc9c4d80)
## [v1.12.2](https://github.com/inspect-js/object-inspect/compare/v1.12.1...v1.12.2) - 2022-05-26
### Commits
- [Fix] use `util.inspect` for a custom inspection symbol method [`e243bf2`](https://github.com/inspect-js/object-inspect/commit/e243bf2eda6c4403ac6f1146fddb14d12e9646c1)
- [meta] add support info [`ca20ba3`](https://github.com/inspect-js/object-inspect/commit/ca20ba35713c17068ca912a86c542f5e8acb656c)
- [Fix] ignore `cause` in node v16.9 and v16.10 where it has a bug [`86aa553`](https://github.com/inspect-js/object-inspect/commit/86aa553a4a455562c2c56f1540f0bf857b9d314b)
## [v1.12.1](https://github.com/inspect-js/object-inspect/compare/v1.12.0...v1.12.1) - 2022-05-21
### Commits
- [Tests] use `mock-property` [`4ec8893`](https://github.com/inspect-js/object-inspect/commit/4ec8893ea9bfd28065ca3638cf6762424bf44352)
- [meta] use `npmignore` to autogenerate an npmignore file [`07f868c`](https://github.com/inspect-js/object-inspect/commit/07f868c10bd25a9d18686528339bb749c211fc9a)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`b05244b`](https://github.com/inspect-js/object-inspect/commit/b05244b4f331e00c43b3151bc498041be77ccc91)
- [Dev Deps] update `@ljharb/eslint-config`, `error-cause`, `es-value-fixtures`, `functions-have-names`, `tape` [`d037398`](https://github.com/inspect-js/object-inspect/commit/d037398dcc5d531532e4c19c4a711ed677f579c1)
- [Fix] properly handle callable regexes in older engines [`848fe48`](https://github.com/inspect-js/object-inspect/commit/848fe48bd6dd0064ba781ee6f3c5e54a94144c37)
## [v1.12.0](https://github.com/inspect-js/object-inspect/compare/v1.11.1...v1.12.0) - 2021-12-18
### Commits
- [New] add `numericSeparator` boolean option [`2d2d537`](https://github.com/inspect-js/object-inspect/commit/2d2d537f5359a4300ce1c10241369f8024f89e11)
- [Robustness] cache more prototype methods [`191533d`](https://github.com/inspect-js/object-inspect/commit/191533da8aec98a05eadd73a5a6e979c9c8653e8)
- [New] ensure an Error’s `cause` is displayed [`53bc2ce`](https://github.com/inspect-js/object-inspect/commit/53bc2cee4e5a9cc4986f3cafa22c0685f340715e)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`bc164b6`](https://github.com/inspect-js/object-inspect/commit/bc164b6e2e7d36b263970f16f54de63048b84a36)
- [Robustness] cache `RegExp.prototype.test` [`a314ab8`](https://github.com/inspect-js/object-inspect/commit/a314ab8271b905cbabc594c82914d2485a8daf12)
- [meta] fix auto-changelog settings [`5ed0983`](https://github.com/inspect-js/object-inspect/commit/5ed0983be72f73e32e2559997517a95525c7e20d)
## [v1.11.1](https://github.com/inspect-js/object-inspect/compare/v1.11.0...v1.11.1) - 2021-12-05
### Commits
- [meta] add `auto-changelog` [`7dbdd22`](https://github.com/inspect-js/object-inspect/commit/7dbdd228401d6025d8b7391476d88aee9ea9bbdf)
- [actions] reuse common workflows [`c8823bc`](https://github.com/inspect-js/object-inspect/commit/c8823bc0a8790729680709d45fb6e652432e91aa)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`7532b12`](https://github.com/inspect-js/object-inspect/commit/7532b120598307497b712890f75af8056f6d37a6)
- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`94abb5d`](https://github.com/inspect-js/object-inspect/commit/94abb5d4e745bf33253942dea86b3e538d2ff6c6)
- [actions] update codecov uploader [`5ed5102`](https://github.com/inspect-js/object-inspect/commit/5ed51025267a00e53b1341357315490ac4eb0874)
- [Dev Deps] update `eslint`, `tape` [`37b2ad2`](https://github.com/inspect-js/object-inspect/commit/37b2ad26c08d94bfd01d5d07069a0b28ef4e2ad7)
- [meta] add `sideEffects` flag [`d341f90`](https://github.com/inspect-js/object-inspect/commit/d341f905ef8bffa6a694cda6ddc5ba343532cd4f)
## [v1.11.0](https://github.com/inspect-js/object-inspect/compare/v1.10.3...v1.11.0) - 2021-07-12
### Commits
- [New] `customInspect`: add `symbol` option, to mimic modern util.inspect behavior [`e973a6e`](https://github.com/inspect-js/object-inspect/commit/e973a6e21f8140c5837cf25e9d89bdde88dc3120)
- [Dev Deps] update `eslint` [`05f1cb3`](https://github.com/inspect-js/object-inspect/commit/05f1cb3cbcfe1f238e8b51cf9bc294305b7ed793)
## [v1.10.3](https://github.com/inspect-js/object-inspect/compare/v1.10.2...v1.10.3) - 2021-05-07
### Commits
- [Fix] handle core-js Symbol shams [`4acfc2c`](https://github.com/inspect-js/object-inspect/commit/4acfc2c4b503498759120eb517abad6d51c9c5d6)
- [readme] update badges [`95c323a`](https://github.com/inspect-js/object-inspect/commit/95c323ad909d6cbabb95dd6015c190ba6db9c1f2)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`cb38f48`](https://github.com/inspect-js/object-inspect/commit/cb38f485de6ec7a95109b5a9bbd0a1deba2f6611)
## [v1.10.2](https://github.com/inspect-js/object-inspect/compare/v1.10.1...v1.10.2) - 2021-04-17
### Commits
- [Fix] use a robust check for a boxed Symbol [`87f12d6`](https://github.com/inspect-js/object-inspect/commit/87f12d6e69ce530be04659c81a4cd502943acac5)
## [v1.10.1](https://github.com/inspect-js/object-inspect/compare/v1.10.0...v1.10.1) - 2021-04-17
### Commits
- [Fix] use a robust check for a boxed bigint [`d5ca829`](https://github.com/inspect-js/object-inspect/commit/d5ca8298b6d2e5c7b9334a5b21b96ed95d225c91)
## [v1.10.0](https://github.com/inspect-js/object-inspect/compare/v1.9.0...v1.10.0) - 2021-04-17
### Commits
- [Tests] increase coverage [`d8abb8a`](https://github.com/inspect-js/object-inspect/commit/d8abb8a62c2f084919df994a433b346e0d87a227)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`4bfec2e`](https://github.com/inspect-js/object-inspect/commit/4bfec2e30aaef6ddef6cbb1448306f9f8b9520b7)
- [New] respect `Symbol.toStringTag` on objects [`799b58f`](https://github.com/inspect-js/object-inspect/commit/799b58f536a45e4484633a8e9daeb0330835f175)
- [Fix] do not allow Symbol.toStringTag to masquerade as builtins [`d6c5b37`](https://github.com/inspect-js/object-inspect/commit/d6c5b37d7e94427796b82432fb0c8964f033a6ab)
- [New] add `WeakRef` support [`b6d898e`](https://github.com/inspect-js/object-inspect/commit/b6d898ee21868c780a7ee66b28532b5b34ed7f09)
- [meta] do not publish github action workflow files [`918cdfc`](https://github.com/inspect-js/object-inspect/commit/918cdfc4b6fe83f559ff6ef04fe66201e3ff5cbd)
- [meta] create `FUNDING.yml` [`0bb5fc5`](https://github.com/inspect-js/object-inspect/commit/0bb5fc516dbcd2cd728bd89cee0b580acc5ce301)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`22c8dc0`](https://github.com/inspect-js/object-inspect/commit/22c8dc0cac113d70f4781e49a950070923a671be)
- [meta] use `prepublishOnly` script for npm 7+ [`e52ee09`](https://github.com/inspect-js/object-inspect/commit/e52ee09e8050b8dbac94ef57f786675567728223)
- [Dev Deps] update `eslint` [`7c4e6fd`](https://github.com/inspect-js/object-inspect/commit/7c4e6fdedcd27cc980e13c9ad834d05a96f3d40c)
## [v1.9.0](https://github.com/inspect-js/object-inspect/compare/v1.8.0...v1.9.0) - 2020-11-30
### Commits
- [Tests] migrate tests to Github Actions [`d262251`](https://github.com/inspect-js/object-inspect/commit/d262251e13e16d3490b5473672f6b6d6ff86675d)
- [New] add enumerable own Symbols to plain object output [`ee60c03`](https://github.com/inspect-js/object-inspect/commit/ee60c033088cff9d33baa71e59a362a541b48284)
- [Tests] add passing tests [`01ac3e4`](https://github.com/inspect-js/object-inspect/commit/01ac3e4b5a30f97875a63dc9b1416b3bd626afc9)
- [actions] add "Require Allow Edits" action [`c2d7746`](https://github.com/inspect-js/object-inspect/commit/c2d774680cde4ca4af332d84d4121b26f798ba9e)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js` [`70058de`](https://github.com/inspect-js/object-inspect/commit/70058de1579fc54d1d15ed6c2dbe246637ce70ff)
- [Fix] hex characters in strings should be uppercased, to match node `assert` [`6ab8faa`](https://github.com/inspect-js/object-inspect/commit/6ab8faaa0abc08fe7a8e2afd8b39c6f1f0e00113)
- [Tests] run `nyc` on all tests [`4c47372`](https://github.com/inspect-js/object-inspect/commit/4c473727879ddc8e28b599202551ddaaf07b6210)
- [Tests] node 0.8 has an unpredictable property order; fix `groups` test by removing property [`f192069`](https://github.com/inspect-js/object-inspect/commit/f192069a978a3b60e6f0e0d45ac7df260ab9a778)
- [New] add enumerable properties to Function inspect result, per node’s `assert` [`fd38e1b`](https://github.com/inspect-js/object-inspect/commit/fd38e1bc3e2a1dc82091ce3e021917462eee64fc)
- [Tests] fix tests for node &lt; 10, due to regex match `groups` [`2ac6462`](https://github.com/inspect-js/object-inspect/commit/2ac6462cc4f72eaa0b63a8cfee9aabe3008b2330)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`44b59e2`](https://github.com/inspect-js/object-inspect/commit/44b59e2676a7f825ef530dfd19dafb599e3b9456)
- [Robustness] cache `Symbol.prototype.toString` [`f3c2074`](https://github.com/inspect-js/object-inspect/commit/f3c2074d8f32faf8292587c07c9678ea931703dd)
- [Dev Deps] update `eslint` [`9411294`](https://github.com/inspect-js/object-inspect/commit/94112944b9245e3302e25453277876402d207e7f)
- [meta] `require-allow-edits` no longer requires an explicit github token [`36c0220`](https://github.com/inspect-js/object-inspect/commit/36c02205de3c2b0e84d53777c5c9fd54a36c48ab)
- [actions] update rebase checkout action to v2 [`55a39a6`](https://github.com/inspect-js/object-inspect/commit/55a39a64e944f19c6a7d8efddf3df27700f20d14)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`f59fd3c`](https://github.com/inspect-js/object-inspect/commit/f59fd3cf406c3a7c7ece140904a80bbc6bacfcca)
- [Dev Deps] update `eslint` [`a492bec`](https://github.com/inspect-js/object-inspect/commit/a492becec644b0155c9c4bc1caf6f9fac11fb2c7)
## [v1.8.0](https://github.com/inspect-js/object-inspect/compare/v1.7.0...v1.8.0) - 2020-06-18
### Fixed
- [New] add `indent` option [`#27`](https://github.com/inspect-js/object-inspect/issues/27)
### Commits
- [Tests] add codecov [`4324cbb`](https://github.com/inspect-js/object-inspect/commit/4324cbb1a2bd7710822a4151ff373570db22453e)
- [New] add `maxStringLength` option [`b3995cb`](https://github.com/inspect-js/object-inspect/commit/b3995cb71e15b5ee127a3094c43994df9d973502)
- [New] add `customInspect` option, to disable custom inspect methods [`28b9179`](https://github.com/inspect-js/object-inspect/commit/28b9179ee802bb3b90810100c11637db90c2fb6d)
- [Tests] add Date and RegExp tests [`3b28eca`](https://github.com/inspect-js/object-inspect/commit/3b28eca57b0367aeadffac604ea09e8bdae7d97b)
- [actions] add automatic rebasing / merge commit blocking [`0d9c6c0`](https://github.com/inspect-js/object-inspect/commit/0d9c6c044e83475ff0bfffb9d35b149834c83a2e)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape`; add `aud` [`7c204f2`](https://github.com/inspect-js/object-inspect/commit/7c204f22b9e41bc97147f4d32d4cb045b17769a6)
- [readme] fix repo URLs, remove testling [`34ca9a0`](https://github.com/inspect-js/object-inspect/commit/34ca9a0dabfe75bd311f806a326fadad029909a3)
- [Fix] when truncating a deep array, note it as `[Array]` instead of just `[Object]` [`f74c82d`](https://github.com/inspect-js/object-inspect/commit/f74c82dd0b35386445510deb250f34c41be3ec0e)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`1a8a5ea`](https://github.com/inspect-js/object-inspect/commit/1a8a5ea069ea2bee89d77caedad83ffa23d35711)
- [Fix] do not be fooled by a function’s own `toString` method [`7cb5c65`](https://github.com/inspect-js/object-inspect/commit/7cb5c657a976f94715c19c10556a30f15bb7d5d7)
- [patch] indicate explicitly that anon functions are anonymous, to match node [`81ebdd4`](https://github.com/inspect-js/object-inspect/commit/81ebdd4215005144074bbdff3f6bafa01407910a)
- [Dev Deps] loosen the `core-js` dep [`e7472e8`](https://github.com/inspect-js/object-inspect/commit/e7472e8e242117670560bd995830c2a4d12080f5)
- [Dev Deps] update `tape` [`699827e`](https://github.com/inspect-js/object-inspect/commit/699827e6b37258b5203c33c78c009bf4b0e6a66d)
- [meta] add `safe-publish-latest` [`c5d2868`](https://github.com/inspect-js/object-inspect/commit/c5d2868d6eb33c472f37a20f89ceef2787046088)
- [Dev Deps] update `@ljharb/eslint-config` [`9199501`](https://github.com/inspect-js/object-inspect/commit/919950195d486114ccebacbdf9d74d7f382693b0)
## [v1.7.0](https://github.com/inspect-js/object-inspect/compare/v1.6.0...v1.7.0) - 2019-11-10
### Commits
- [Tests] use shared travis-ci configs [`19899ed`](https://github.com/inspect-js/object-inspect/commit/19899edbf31f4f8809acf745ce34ad1ce1bfa63b)
- [Tests] add linting [`a00f057`](https://github.com/inspect-js/object-inspect/commit/a00f057d917f66ea26dd37769c6b810ec4af97e8)
- [Tests] lint last file [`2698047`](https://github.com/inspect-js/object-inspect/commit/2698047b58af1e2e88061598ef37a75f228dddf6)
- [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`589e87a`](https://github.com/inspect-js/object-inspect/commit/589e87a99cadcff4b600e6a303418e9d922836e8)
- [New] add support for `WeakMap` and `WeakSet` [`3ddb3e4`](https://github.com/inspect-js/object-inspect/commit/3ddb3e4e0c8287130c61a12e0ed9c104b1549306)
- [meta] clean up license so github can detect it properly [`27527bb`](https://github.com/inspect-js/object-inspect/commit/27527bb801520c9610c68cc3b55d6f20a2bee56d)
- [Tests] cover `util.inspect.custom` [`36d47b9`](https://github.com/inspect-js/object-inspect/commit/36d47b9c59056a57ef2f1491602c726359561800)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape` [`b614eaa`](https://github.com/inspect-js/object-inspect/commit/b614eaac901da0e5c69151f534671f990a94cace)
- [Tests] fix coverage thresholds [`7b7b176`](https://github.com/inspect-js/object-inspect/commit/7b7b176e15f8bd6e8b2f261ff5a493c2fe78d9c2)
- [Tests] bigint tests now can run on unflagged node [`063af31`](https://github.com/inspect-js/object-inspect/commit/063af31ce9cd13c202e3b67c07ba06dc9b7c0f81)
- [Refactor] add early bailout to `isMap` and `isSet` checks [`fc51047`](https://github.com/inspect-js/object-inspect/commit/fc5104714a3671d37e225813db79470d6335683b)
- [meta] add `funding` field [`7f9953a`](https://github.com/inspect-js/object-inspect/commit/7f9953a113eec7b064a6393cf9f90ba15f1d131b)
- [Tests] Fix invalid strict-mode syntax with hexadecimal [`a8b5425`](https://github.com/inspect-js/object-inspect/commit/a8b542503b4af1599a275209a1a99f5fdedb1ead)
- [Dev Deps] update `@ljharb/eslint-config` [`98df157`](https://github.com/inspect-js/object-inspect/commit/98df1577314d9188a3fc3f17fdcf2fba697ae1bd)
- add copyright to LICENSE [`bb69fd0`](https://github.com/inspect-js/object-inspect/commit/bb69fd017a062d299e44da1f9b2c7dcd67f621e6)
- [Tests] use `npx aud` in `posttest` [`4838353`](https://github.com/inspect-js/object-inspect/commit/4838353593974cf7f905b9ef04c03c094f0cdbe2)
- [Tests] move `0.6` to allowed failures, because it won‘t build on travis [`1bff32a`](https://github.com/inspect-js/object-inspect/commit/1bff32aa52e8aea687f0856b28ba754b3e43ebf7)
## [v1.6.0](https://github.com/inspect-js/object-inspect/compare/v1.5.0...v1.6.0) - 2018-05-02
### Commits
- [New] add support for boxed BigInt primitives [`356c66a`](https://github.com/inspect-js/object-inspect/commit/356c66a410e7aece7162c8319880a5ef647beaa9)
- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`c77b65b`](https://github.com/inspect-js/object-inspect/commit/c77b65bba593811b906b9ec57561c5cba92e2db3)
- [New] Add support for upcoming `BigInt` [`1ac548e`](https://github.com/inspect-js/object-inspect/commit/1ac548e4b27e26466c28c9a5e63e5d4e0591c31f)
- [Tests] run bigint tests in CI with --harmony-bigint flag [`d31b738`](https://github.com/inspect-js/object-inspect/commit/d31b73831880254b5c6cf5691cda9a149fbc5f04)
- [Dev Deps] update `core-js`, `tape` [`ff9eff6`](https://github.com/inspect-js/object-inspect/commit/ff9eff67113341ee1aaf80c1c22d683f43bfbccf)
- [Docs] fix example to use `safer-buffer` [`48cae12`](https://github.com/inspect-js/object-inspect/commit/48cae12a73ec6cacc955175bc56bbe6aee6a211f)
## [v1.5.0](https://github.com/inspect-js/object-inspect/compare/v1.4.1...v1.5.0) - 2017-12-25
### Commits
- [New] add `quoteStyle` option [`f5a72d2`](https://github.com/inspect-js/object-inspect/commit/f5a72d26edb3959b048f74c056ca7100a6b091e4)
- [Tests] add more test coverage [`30ebe4e`](https://github.com/inspect-js/object-inspect/commit/30ebe4e1fa943b99ecbb85be7614256d536e2759)
- [Tests] require 0.6 to pass [`99a008c`](https://github.com/inspect-js/object-inspect/commit/99a008ccace189a60fd7da18bf00e32c9572b980)
## [v1.4.1](https://github.com/inspect-js/object-inspect/compare/v1.4.0...v1.4.1) - 2017-12-19
### Commits
- [Tests] up to `node` `v9.3`, `v8.9`, `v6.12` [`6674476`](https://github.com/inspect-js/object-inspect/commit/6674476cc56acaac1bde96c84fed5ef631911906)
- [Fix] `inspect(Object(-0))` should be “Object(-0)”, not “Object(0)” [`d0a031f`](https://github.com/inspect-js/object-inspect/commit/d0a031f1cbb3024ee9982bfe364dd18a7e4d1bd3)
## [v1.4.0](https://github.com/inspect-js/object-inspect/compare/v1.3.0...v1.4.0) - 2017-10-24
### Commits
- [Tests] add `npm run coverage` [`3b48fb2`](https://github.com/inspect-js/object-inspect/commit/3b48fb25db037235eeb808f0b2830aad7aa36f70)
- [Tests] remove commented-out osx builds [`71e24db`](https://github.com/inspect-js/object-inspect/commit/71e24db8ad6ee3b9b381c5300b0475f2ba595a73)
- [New] add support for `util.inspect.custom`, in node only. [`20cca77`](https://github.com/inspect-js/object-inspect/commit/20cca7762d7e17f15b21a90793dff84acce155df)
- [Tests] up to `node` `v8.6`; use `nvm install-latest-npm` to ensure new npm doesn’t break old node [`252952d`](https://github.com/inspect-js/object-inspect/commit/252952d230d8065851dd3d4d5fe8398aae068529)
- [Tests] up to `node` `v8.8` [`4aa868d`](https://github.com/inspect-js/object-inspect/commit/4aa868d3a62914091d489dd6ec6eed194ee67cd3)
- [Dev Deps] update `core-js`, `tape` [`59483d1`](https://github.com/inspect-js/object-inspect/commit/59483d1df418f852f51fa0db7b24aa6b0209a27a)
## [v1.3.0](https://github.com/inspect-js/object-inspect/compare/v1.2.2...v1.3.0) - 2017-07-31
### Fixed
- [Fix] Map/Set: work around core-js bug &lt; v2.5.0 [`#9`](https://github.com/inspect-js/object-inspect/issues/9)
### Commits
- [New] add support for arrays with additional object keys [`0d19937`](https://github.com/inspect-js/object-inspect/commit/0d199374ee37959e51539616666f420ccb29acb9)
- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`; fix new npm breaking on older nodes [`e24784a`](https://github.com/inspect-js/object-inspect/commit/e24784a90c49117787157a12a63897c49cf89bbb)
- Only apps should have lockfiles [`c6faebc`](https://github.com/inspect-js/object-inspect/commit/c6faebcb2ee486a889a4a1c4d78c0776c7576185)
- [Dev Deps] update `tape` [`7345a0a`](https://github.com/inspect-js/object-inspect/commit/7345a0aeba7e91b888a079c10004d17696a7f586)
## [v1.2.2](https://github.com/inspect-js/object-inspect/compare/v1.2.1...v1.2.2) - 2017-03-24
### Commits
- [Tests] up to `node` `v7.7`, `v6.10`, `v4.8`; improve test matrix [`a2ddc15`](https://github.com/inspect-js/object-inspect/commit/a2ddc15a1f2c65af18076eea1c0eb9cbceb478a0)
- [Tests] up to `node` `v7.0`, `v6.9`, `v5.12`, `v4.6`, `io.js` `v3.3`; improve test matrix [`a48949f`](https://github.com/inspect-js/object-inspect/commit/a48949f6b574b2d4d2298109d8e8d0eb3e7a83e7)
- [Performance] check for primitive types as early as possible. [`3b8092a`](https://github.com/inspect-js/object-inspect/commit/3b8092a2a4deffd0575f94334f00194e2d48dad3)
- [Refactor] remove unneeded `else`s. [`7255034`](https://github.com/inspect-js/object-inspect/commit/725503402e08de4f96f6bf2d8edef44ac36f26b6)
- [Refactor] avoid recreating `lowbyte` function every time. [`81edd34`](https://github.com/inspect-js/object-inspect/commit/81edd3475bd15bdd18e84de7472033dcf5004aaa)
- [Fix] differentiate -0 from 0 [`521d345`](https://github.com/inspect-js/object-inspect/commit/521d3456b009da7bf1c5785c8a9df5a9f8718264)
- [Refactor] move object key gathering into separate function [`aca6265`](https://github.com/inspect-js/object-inspect/commit/aca626536eaeef697196c6e9db3e90e7e0355b6a)
- [Refactor] consolidate wrapping logic for boxed primitives into a function. [`4e440cd`](https://github.com/inspect-js/object-inspect/commit/4e440cd9065df04802a2a1dead03f48c353ca301)
- [Robustness] use `typeof` instead of comparing to literal `undefined` [`5ca6f60`](https://github.com/inspect-js/object-inspect/commit/5ca6f601937506daff8ed2fcf686363b55807b69)
- [Refactor] consolidate Map/Set notations. [`4e576e5`](https://github.com/inspect-js/object-inspect/commit/4e576e5d7ed2f9ec3fb7f37a0d16732eb10758a9)
- [Tests] ensure that this function remains anonymous, despite ES6 name inference. [`7540ae5`](https://github.com/inspect-js/object-inspect/commit/7540ae591278756db614fa4def55ca413150e1a3)
- [Refactor] explicitly coerce Error objects to strings. [`7f4ca84`](https://github.com/inspect-js/object-inspect/commit/7f4ca8424ee8dc2c0ca5a422d94f7fac40327261)
- [Refactor] split up `var` declarations for debuggability [`6f2c11e`](https://github.com/inspect-js/object-inspect/commit/6f2c11e6a85418586a00292dcec5e97683f89bc3)
- [Robustness] cache `Object.prototype.toString` [`df44a20`](https://github.com/inspect-js/object-inspect/commit/df44a20adfccf31529d60d1df2079bfc3c836e27)
- [Dev Deps] update `tape` [`3ec714e`](https://github.com/inspect-js/object-inspect/commit/3ec714eba57bc3f58a6eb4fca1376f49e70d300a)
- [Dev Deps] update `tape` [`beb72d9`](https://github.com/inspect-js/object-inspect/commit/beb72d969653747d7cde300393c28755375329b0)
## [v1.2.1](https://github.com/inspect-js/object-inspect/compare/v1.2.0...v1.2.1) - 2016-04-09
### Fixed
- [Fix] fix Boolean `false` object inspection. [`#7`](https://github.com/substack/object-inspect/pull/7)
## [v1.2.0](https://github.com/inspect-js/object-inspect/compare/v1.1.0...v1.2.0) - 2016-04-09
### Fixed
- [New] add support for inspecting String/Number/Boolean objects. [`#6`](https://github.com/inspect-js/object-inspect/issues/6)
### Commits
- [Dev Deps] update `tape` [`742caa2`](https://github.com/inspect-js/object-inspect/commit/742caa262cf7af4c815d4821c8bd0129c1446432)
## [v1.1.0](https://github.com/inspect-js/object-inspect/compare/1.0.2...v1.1.0) - 2015-12-14
### Merged
- [New] add ES6 Map/Set support. [`#4`](https://github.com/inspect-js/object-inspect/pull/4)
### Fixed
- [New] add ES6 Map/Set support. [`#3`](https://github.com/inspect-js/object-inspect/issues/3)
### Commits
- Update `travis.yml` to test on bunches of `iojs` and `node` versions. [`4c1fd65`](https://github.com/inspect-js/object-inspect/commit/4c1fd65cc3bd95307e854d114b90478324287fd2)
- [Dev Deps] update `tape` [`88a907e`](https://github.com/inspect-js/object-inspect/commit/88a907e33afbe408e4b5d6e4e42a33143f88848c)
## [1.0.2](https://github.com/inspect-js/object-inspect/compare/1.0.1...1.0.2) - 2015-08-07
### Commits
- [Fix] Cache `Object.prototype.hasOwnProperty` in case it's deleted later. [`1d0075d`](https://github.com/inspect-js/object-inspect/commit/1d0075d3091dc82246feeb1f9871cb2b8ed227b3)
- [Dev Deps] Update `tape` [`ca8d5d7`](https://github.com/inspect-js/object-inspect/commit/ca8d5d75635ddbf76f944e628267581e04958457)
- gitignore node_modules since this is a reusable modules. [`ed41407`](https://github.com/inspect-js/object-inspect/commit/ed41407811743ca530cdeb28f982beb96026af82)
## [1.0.1](https://github.com/inspect-js/object-inspect/compare/1.0.0...1.0.1) - 2015-07-19
### Commits
- Make `inspect` work with symbol primitives and objects, including in node 0.11 and 0.12. [`ddf1b94`](https://github.com/inspect-js/object-inspect/commit/ddf1b94475ab951f1e3bccdc0a48e9073cfbfef4)
- bump tape [`103d674`](https://github.com/inspect-js/object-inspect/commit/103d67496b504bdcfdd765d303a773f87ec106e2)
- use newer travis config [`d497276`](https://github.com/inspect-js/object-inspect/commit/d497276c1da14234bb5098a59cf20de75fbc316a)
## [1.0.0](https://github.com/inspect-js/object-inspect/compare/0.4.0...1.0.0) - 2014-08-05
### Commits
- error inspect works properly [`260a22d`](https://github.com/inspect-js/object-inspect/commit/260a22d134d3a8a482c67d52091c6040c34f4299)
- seen coverage [`57269e8`](https://github.com/inspect-js/object-inspect/commit/57269e8baa992a7439047f47325111fdcbcb8417)
- htmlelement instance coverage [`397ffe1`](https://github.com/inspect-js/object-inspect/commit/397ffe10a1980350868043ef9de65686d438979f)
- more element coverage [`6905cc2`](https://github.com/inspect-js/object-inspect/commit/6905cc2f7df35600177e613b0642b4df5efd3eca)
- failing test for type errors [`385b615`](https://github.com/inspect-js/object-inspect/commit/385b6152e49b51b68449a662f410b084ed7c601a)
- fn name coverage [`edc906d`](https://github.com/inspect-js/object-inspect/commit/edc906d40fca6b9194d304062c037ee8e398c4c2)
- server-side element test [`362d1d3`](https://github.com/inspect-js/object-inspect/commit/362d1d3e86f187651c29feeb8478110afada385b)
- custom inspect fn [`e89b0f6`](https://github.com/inspect-js/object-inspect/commit/e89b0f6fe6d5e03681282af83732a509160435a6)
- fixed browser test [`b530882`](https://github.com/inspect-js/object-inspect/commit/b5308824a1c8471c5617e394766a03a6977102a9)
- depth test, matches node [`1cfd9e0`](https://github.com/inspect-js/object-inspect/commit/1cfd9e0285a4ae1dff44101ad482915d9bf47e48)
- exercise hasOwnProperty path [`8d753fb`](https://github.com/inspect-js/object-inspect/commit/8d753fb362a534fa1106e4d80f2ee9bea06a66d9)
- more cases covered for errors [`c5c46a5`](https://github.com/inspect-js/object-inspect/commit/c5c46a569ec4606583497e8550f0d8c7ad39a4a4)
- \W obj key test case [`b0eceee`](https://github.com/inspect-js/object-inspect/commit/b0eceeea6e0eb94d686c1046e99b9e25e5005f75)
- coverage for explicit depth param [`e12b91c`](https://github.com/inspect-js/object-inspect/commit/e12b91cd59683362f3a0e80f46481a0211e26c15)
## [0.4.0](https://github.com/inspect-js/object-inspect/compare/0.3.1...0.4.0) - 2014-03-21
### Commits
- passing lowbyte interpolation test [`b847511`](https://github.com/inspect-js/object-inspect/commit/b8475114f5def7e7961c5353d48d3d8d9a520985)
- lowbyte test [`4a2b0e1`](https://github.com/inspect-js/object-inspect/commit/4a2b0e142667fc933f195472759385ac08f3946c)
## [0.3.1](https://github.com/inspect-js/object-inspect/compare/0.3.0...0.3.1) - 2014-03-04
### Commits
- sort keys [`a07b19c`](https://github.com/inspect-js/object-inspect/commit/a07b19cc3b1521a82d4fafb6368b7a9775428a05)
## [0.3.0](https://github.com/inspect-js/object-inspect/compare/0.2.0...0.3.0) - 2014-03-04
### Commits
- [] and {} instead of [ ] and { } [`654c44b`](https://github.com/inspect-js/object-inspect/commit/654c44b2865811f3519e57bb8526e0821caf5c6b)
## [0.2.0](https://github.com/inspect-js/object-inspect/compare/0.1.3...0.2.0) - 2014-03-04
### Commits
- failing holes test [`99cdfad`](https://github.com/inspect-js/object-inspect/commit/99cdfad03c6474740275a75636fe6ca86c77737a)
- regex already work [`e324033`](https://github.com/inspect-js/object-inspect/commit/e324033267025995ec97d32ed0a65737c99477a6)
- failing undef/null test [`1f88a00`](https://github.com/inspect-js/object-inspect/commit/1f88a00265d3209719dda8117b7e6360b4c20943)
- holes in the all example [`7d345f3`](https://github.com/inspect-js/object-inspect/commit/7d345f3676dcbe980cff89a4f6c243269ebbb709)
- check for .inspect(), fixes Buffer use-case [`c3f7546`](https://github.com/inspect-js/object-inspect/commit/c3f75466dbca125347d49847c05262c292f12b79)
- fixes for holes [`ce25f73`](https://github.com/inspect-js/object-inspect/commit/ce25f736683de4b92ff27dc5471218415e2d78d8)
- weird null behavior [`405c1ea`](https://github.com/inspect-js/object-inspect/commit/405c1ea72cd5a8cf3b498c3eaa903d01b9fbcab5)
- tape is actually a devDependency, upgrade [`703b0ce`](https://github.com/inspect-js/object-inspect/commit/703b0ce6c5817b4245a082564bccd877e0bb6990)
- put date in the example [`a342219`](https://github.com/inspect-js/object-inspect/commit/a3422190eeaa013215f46df2d0d37b48595ac058)
- passing the null test [`4ab737e`](https://github.com/inspect-js/object-inspect/commit/4ab737ebf862a75d247ebe51e79307a34d6380d4)
## [0.1.3](https://github.com/inspect-js/object-inspect/compare/0.1.1...0.1.3) - 2013-07-26
### Commits
- special isElement() check [`882768a`](https://github.com/inspect-js/object-inspect/commit/882768a54035d30747be9de1baf14e5aa0daa128)
- oh right old IEs don't have indexOf either [`36d1275`](https://github.com/inspect-js/object-inspect/commit/36d12756c38b08a74370b0bb696c809e529913a5)
## [0.1.1](https://github.com/inspect-js/object-inspect/compare/0.1.0...0.1.1) - 2013-07-26
### Commits
- tests! [`4422fd9`](https://github.com/inspect-js/object-inspect/commit/4422fd95532c2745aa6c4f786f35f1090be29998)
- fix for ie&lt;9, doesn't have hasOwnProperty [`6b7d611`](https://github.com/inspect-js/object-inspect/commit/6b7d61183050f6da801ea04473211da226482613)
- fix for all IEs: no f.name [`4e0c2f6`](https://github.com/inspect-js/object-inspect/commit/4e0c2f6dfd01c306d067d7163319acc97c94ee50)
- badges [`5ed0d88`](https://github.com/inspect-js/object-inspect/commit/5ed0d88e4e407f9cb327fa4a146c17921f9680f3)
## [0.1.0](https://github.com/inspect-js/object-inspect/compare/0.0.0...0.1.0) - 2013-07-26
### Commits
- [Function] for functions [`ad5c485`](https://github.com/inspect-js/object-inspect/commit/ad5c485098fc83352cb540a60b2548ca56820e0b)
## 0.0.0 - 2013-07-26
### Commits
- working browser example [`34be6b6`](https://github.com/inspect-js/object-inspect/commit/34be6b6548f9ce92bdc3c27572857ba0c4a1218d)
- package.json etc [`cad51f2`](https://github.com/inspect-js/object-inspect/commit/cad51f23fc6bcf1a456ed6abe16088256c2f632f)
- docs complete [`b80cce2`](https://github.com/inspect-js/object-inspect/commit/b80cce2490c4e7183a9ee11ea89071f0abec4446)
- circular example [`4b4a7b9`](https://github.com/inspect-js/object-inspect/commit/4b4a7b92209e4e6b4630976cb6bcd17d14165a59)
- string rep [`7afb479`](https://github.com/inspect-js/object-inspect/commit/7afb479baa798d27f09e0a178b72ea327f60f5c8)
@@ -0,0 +1,848 @@
/**
* @license React
* react.react-server.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 noop() {}
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable)
return null;
maybeIterable =
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 =
("function" === typeof Symbol &&
Symbol.toStringTag &&
value[Symbol.toStringTag]) ||
value.constructor.name ||
"Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (
("number" === typeof type.tag &&
console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
),
type.$$typeof)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return type.displayName || "Context";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if (
"object" === typeof type &&
null !== type &&
type.$$typeof === REACT_LAZY_TYPE
)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return !1;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown ||
((specialPropKeyWarningShown = !0),
console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = !0;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: !0
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] ||
((didWarnAboutElementRef[componentName] = !0),
console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, props, owner, debugStack, debugTask) {
var refProp = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
props: props,
_owner: owner
};
null !== (void 0 !== refProp ? refProp : null)
? Object.defineProperty(type, "ref", {
enumerable: !1,
get: elementRefGetterWithDeprecationWarning
})
: Object.defineProperty(type, "ref", { enumerable: !1, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function cloneAndReplaceKey(oldElement, newKey) {
newKey = ReactElement(
oldElement.type,
newKey,
oldElement.props,
oldElement._owner,
oldElement._debugStack,
oldElement._debugTask
);
oldElement._store &&
(newKey._store.validated = oldElement._store.validated);
return newKey;
}
function validateChildKeys(node) {
isValidElement(node)
? node._store && (node._store.validated = 1)
: "object" === typeof node &&
null !== node &&
node.$$typeof === REACT_LAZY_TYPE &&
("fulfilled" === node._payload.status
? isValidElement(node._payload.value) &&
node._payload.value._store &&
(node._payload.value._store.validated = 1)
: node._store && (node._store.validated = 1));
}
function isValidElement(object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
function escape(key) {
var escaperLookup = { "=": "=0", ":": "=2" };
return (
"$" +
key.replace(/[=:]/g, function (match) {
return escaperLookup[match];
})
);
}
function getElementKey(element, index) {
return "object" === typeof element &&
null !== element &&
null != element.key
? (checkKeyStringCoercion(element.key), escape("" + element.key))
: index.toString(36);
}
function resolveThenable(thenable) {
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
default:
switch (
("string" === typeof thenable.status
? thenable.then(noop, noop)
: ((thenable.status = "pending"),
thenable.then(
function (fulfilledValue) {
"pending" === thenable.status &&
((thenable.status = "fulfilled"),
(thenable.value = fulfilledValue));
},
function (error) {
"pending" === thenable.status &&
((thenable.status = "rejected"),
(thenable.reason = error));
}
)),
thenable.status)
) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
}
}
throw thenable;
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if ("undefined" === type || "boolean" === type) children = null;
var invokeCallback = !1;
if (null === children) invokeCallback = !0;
else
switch (type) {
case "bigint":
case "string":
case "number":
invokeCallback = !0;
break;
case "object":
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = !0;
break;
case REACT_LAZY_TYPE:
return (
(invokeCallback = children._init),
mapIntoArray(
invokeCallback(children._payload),
array,
escapedPrefix,
nameSoFar,
callback
)
);
}
}
if (invokeCallback) {
invokeCallback = children;
callback = callback(invokeCallback);
var childKey =
"" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
isArrayImpl(callback)
? ((escapedPrefix = ""),
null != childKey &&
(escapedPrefix =
childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
mapIntoArray(callback, array, escapedPrefix, "", function (c) {
return c;
}))
: null != callback &&
(isValidElement(callback) &&
(null != callback.key &&
((invokeCallback && invokeCallback.key === callback.key) ||
checkKeyStringCoercion(callback.key)),
(escapedPrefix = cloneAndReplaceKey(
callback,
escapedPrefix +
(null == callback.key ||
(invokeCallback && invokeCallback.key === callback.key)
? ""
: ("" + callback.key).replace(
userProvidedKeyEscapeRegex,
"$&/"
) + "/") +
childKey
)),
"" !== nameSoFar &&
null != invokeCallback &&
isValidElement(invokeCallback) &&
null == invokeCallback.key &&
invokeCallback._store &&
!invokeCallback._store.validated &&
(escapedPrefix._store.validated = 2),
(callback = escapedPrefix)),
array.push(callback));
return 1;
}
invokeCallback = 0;
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
if (isArrayImpl(children))
for (var i = 0; i < children.length; i++)
(nameSoFar = children[i]),
(type = childKey + getElementKey(nameSoFar, i)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if (((i = getIteratorFn(children)), "function" === typeof i))
for (
i === children.entries &&
(didWarnAboutMaps ||
console.warn(
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
),
(didWarnAboutMaps = !0)),
children = i.call(children),
i = 0;
!(nameSoFar = children.next()).done;
)
(nameSoFar = nameSoFar.value),
(type = childKey + getElementKey(nameSoFar, i++)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if ("object" === type) {
if ("function" === typeof children.then)
return mapIntoArray(
resolveThenable(children),
array,
escapedPrefix,
nameSoFar,
callback
);
array = String(children);
throw Error(
"Objects are not valid as a React child (found: " +
("[object Object]" === array
? "object with keys {" + Object.keys(children).join(", ") + "}"
: array) +
"). If you meant to render a collection of children, use an array instead."
);
}
return invokeCallback;
}
function mapChildren(children, func, context) {
if (null == children) return children;
var result = [],
count = 0;
mapIntoArray(children, result, "", "", function (child) {
return func.call(context, child, count++);
});
return result;
}
function resolveDispatcher() {
var dispatcher = ReactSharedInternals.H;
null === dispatcher &&
console.error(
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
);
return dispatcher;
}
function lazyInitializer(payload) {
if (-1 === payload._status) {
var ioInfo = payload._ioInfo;
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
ioInfo = payload._result;
var thenable = ioInfo();
thenable.then(
function (moduleObject) {
if (0 === payload._status || -1 === payload._status) {
payload._status = 1;
payload._result = moduleObject;
var _ioInfo = payload._ioInfo;
null != _ioInfo && (_ioInfo.end = performance.now());
void 0 === thenable.status &&
((thenable.status = "fulfilled"),
(thenable.value = moduleObject));
}
},
function (error) {
if (0 === payload._status || -1 === payload._status) {
payload._status = 2;
payload._result = error;
var _ioInfo2 = payload._ioInfo;
null != _ioInfo2 && (_ioInfo2.end = performance.now());
void 0 === thenable.status &&
((thenable.status = "rejected"), (thenable.reason = error));
}
}
);
ioInfo = payload._ioInfo;
if (null != ioInfo) {
ioInfo.value = thenable;
var displayName = thenable.displayName;
"string" === typeof displayName && (ioInfo.name = displayName);
}
-1 === payload._status &&
((payload._status = 0), (payload._result = thenable));
}
if (1 === payload._status)
return (
(ioInfo = payload._result),
void 0 === ioInfo &&
console.error(
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
ioInfo
),
"default" in ioInfo ||
console.error(
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
ioInfo
),
ioInfo.default
);
throw payload._result;
}
function createCacheRoot() {
return new WeakMap();
}
function createCacheNode() {
return { s: 0, v: void 0, o: null, p: null };
}
var ReactSharedInternals = {
H: null,
A: null,
getCurrentStack: null,
recentlyCreatedOwnerStacks: 0
},
isArrayImpl = Array.isArray,
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
hasOwnProperty = Object.prototype.hasOwnProperty,
assign = Object.assign,
createTask = console.createTask
? console.createTask
: function () {
return null;
},
createFakeCallStack = {
react_stack_bottom_frame: function (callStackForError) {
return callStackForError();
}
},
specialPropKeyWarningShown,
didWarnAboutOldJSXRuntime;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack =
createFakeCallStack.react_stack_bottom_frame.bind(
createFakeCallStack,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutMaps = !1,
userProvidedKeyEscapeRegex = /\/+/g;
exports.Children = {
map: mapChildren,
forEach: function (children, forEachFunc, forEachContext) {
mapChildren(
children,
function () {
forEachFunc.apply(this, arguments);
},
forEachContext
);
},
count: function (children) {
var n = 0;
mapChildren(children, function () {
n++;
});
return n;
},
toArray: function (children) {
return (
mapChildren(children, function (child) {
return child;
}) || []
);
},
only: function (children) {
if (!isValidElement(children))
throw Error(
"React.Children.only expected to receive a single React element child."
);
return children;
}
};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
ReactSharedInternals;
exports.cache = function (fn) {
return function () {
var dispatcher = ReactSharedInternals.A;
if (!dispatcher) return fn.apply(null, arguments);
var fnMap = dispatcher.getCacheForType(createCacheRoot);
dispatcher = fnMap.get(fn);
void 0 === dispatcher &&
((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));
fnMap = 0;
for (var l = arguments.length; fnMap < l; fnMap++) {
var arg = arguments[fnMap];
if (
"function" === typeof arg ||
("object" === typeof arg && null !== arg)
) {
var objectCache = dispatcher.o;
null === objectCache &&
(dispatcher.o = objectCache = new WeakMap());
dispatcher = objectCache.get(arg);
void 0 === dispatcher &&
((dispatcher = createCacheNode()),
objectCache.set(arg, dispatcher));
} else
(objectCache = dispatcher.p),
null === objectCache && (dispatcher.p = objectCache = new Map()),
(dispatcher = objectCache.get(arg)),
void 0 === dispatcher &&
((dispatcher = createCacheNode()),
objectCache.set(arg, dispatcher));
}
if (1 === dispatcher.s) return dispatcher.v;
if (2 === dispatcher.s) throw dispatcher.v;
try {
var result = fn.apply(null, arguments);
fnMap = dispatcher;
fnMap.s = 1;
return (fnMap.v = result);
} catch (error) {
throw (
((result = dispatcher), (result.s = 2), (result.v = error), error)
);
}
};
};
exports.cacheSignal = function () {
var dispatcher = ReactSharedInternals.A;
return dispatcher ? dispatcher.cacheSignal() : null;
};
exports.captureOwnerStack = function () {
var getCurrentStack = ReactSharedInternals.getCurrentStack;
return null === getCurrentStack ? null : getCurrentStack();
};
exports.cloneElement = function (element, config, children) {
if (null === element || void 0 === element)
throw Error(
"The argument must be a React element, but you passed " +
element +
"."
);
var props = assign({}, element.props),
key = element.key,
owner = element._owner;
if (null != config) {
var JSCompiler_inline_result;
a: {
if (
hasOwnProperty.call(config, "ref") &&
(JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
config,
"ref"
).get) &&
JSCompiler_inline_result.isReactWarning
) {
JSCompiler_inline_result = !1;
break a;
}
JSCompiler_inline_result = void 0 !== config.ref;
}
JSCompiler_inline_result && (owner = getOwner());
hasValidKey(config) &&
(checkKeyStringCoercion(config.key), (key = "" + config.key));
for (propName in config)
!hasOwnProperty.call(config, propName) ||
"key" === propName ||
"__self" === propName ||
"__source" === propName ||
("ref" === propName && void 0 === config.ref) ||
(props[propName] = config[propName]);
}
var propName = arguments.length - 2;
if (1 === propName) props.children = children;
else if (1 < propName) {
JSCompiler_inline_result = Array(propName);
for (var i = 0; i < propName; i++)
JSCompiler_inline_result[i] = arguments[i + 2];
props.children = JSCompiler_inline_result;
}
props = ReactElement(
element.type,
key,
props,
owner,
element._debugStack,
element._debugTask
);
for (key = 2; key < arguments.length; key++)
validateChildKeys(arguments[key]);
return props;
};
exports.createElement = function (type, config, children) {
for (var i = 2; i < arguments.length; i++)
validateChildKeys(arguments[i]);
i = {};
var key = null;
if (null != config)
for (propName in (didWarnAboutOldJSXRuntime ||
!("__self" in config) ||
"key" in config ||
((didWarnAboutOldJSXRuntime = !0),
console.warn(
"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
)),
hasValidKey(config) &&
(checkKeyStringCoercion(config.key), (key = "" + config.key)),
config))
hasOwnProperty.call(config, propName) &&
"key" !== propName &&
"__self" !== propName &&
"__source" !== propName &&
(i[propName] = config[propName]);
var childrenLength = arguments.length - 2;
if (1 === childrenLength) i.children = children;
else if (1 < childrenLength) {
for (
var childArray = Array(childrenLength), _i = 0;
_i < childrenLength;
_i++
)
childArray[_i] = arguments[_i + 2];
Object.freeze && Object.freeze(childArray);
i.children = childArray;
}
if (type && type.defaultProps)
for (propName in ((childrenLength = type.defaultProps), childrenLength))
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
key &&
defineKeyPropWarningGetter(
i,
"function" === typeof type
? type.displayName || type.name || "Unknown"
: type
);
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return ReactElement(
type,
key,
i,
getOwner(),
propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.createRef = function () {
var refObject = { current: null };
Object.seal(refObject);
return refObject;
};
exports.forwardRef = function (render) {
null != render && render.$$typeof === REACT_MEMO_TYPE
? console.error(
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
)
: "function" !== typeof render
? console.error(
"forwardRef requires a render function but was given %s.",
null === render ? "null" : typeof render
)
: 0 !== render.length &&
2 !== render.length &&
console.error(
"forwardRef render functions accept exactly two parameters: props and ref. %s",
1 === render.length
? "Did you forget to use the ref parameter?"
: "Any additional parameter will be undefined."
);
null != render &&
null != render.defaultProps &&
console.error(
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
);
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
ownName;
Object.defineProperty(elementType, "displayName", {
enumerable: !1,
configurable: !0,
get: function () {
return ownName;
},
set: function (name) {
ownName = name;
render.name ||
render.displayName ||
(Object.defineProperty(render, "name", { value: name }),
(render.displayName = name));
}
});
return elementType;
};
exports.isValidElement = isValidElement;
exports.lazy = function (ctor) {
ctor = { _status: -1, _result: ctor };
var lazyType = {
$$typeof: REACT_LAZY_TYPE,
_payload: ctor,
_init: lazyInitializer
},
ioInfo = {
name: "lazy",
start: -1,
end: -1,
value: null,
owner: null,
debugStack: Error("react-stack-top-frame"),
debugTask: console.createTask ? console.createTask("lazy()") : null
};
ctor._ioInfo = ioInfo;
lazyType._debugInfo = [{ awaited: ioInfo }];
return lazyType;
};
exports.memo = function (type, compare) {
null == type &&
console.error(
"memo: The first argument must be a component. Instead received: %s",
null === type ? "null" : typeof type
);
compare = {
$$typeof: REACT_MEMO_TYPE,
type: type,
compare: void 0 === compare ? null : compare
};
var ownName;
Object.defineProperty(compare, "displayName", {
enumerable: !1,
configurable: !0,
get: function () {
return ownName;
},
set: function (name) {
ownName = name;
type.name ||
type.displayName ||
(Object.defineProperty(type, "name", { value: name }),
(type.displayName = name));
}
});
return compare;
};
exports.use = function (usable) {
return resolveDispatcher().use(usable);
};
exports.useCallback = function (callback, deps) {
return resolveDispatcher().useCallback(callback, deps);
};
exports.useDebugValue = function (value, formatterFn) {
return resolveDispatcher().useDebugValue(value, formatterFn);
};
exports.useId = function () {
return resolveDispatcher().useId();
};
exports.useMemo = function (create, deps) {
return resolveDispatcher().useMemo(create, deps);
};
exports.version = "19.2.5";
})();
@@ -0,0 +1,46 @@
//#region src/utils/html.d.ts
/**
* @module
* HTML utility.
*/
export declare const HtmlEscapedCallbackPhase: {
readonly Stringify: 1;
readonly BeforeStream: 2;
readonly Stream: 3;
};
type HtmlEscapedCallbackOpts = {
buffer?: [string];
phase: (typeof HtmlEscapedCallbackPhase)[keyof typeof HtmlEscapedCallbackPhase];
context: Readonly<object>;
};
export type HtmlEscapedCallback = (opts: HtmlEscapedCallbackOpts) => Promise<string> | undefined;
export type HtmlEscaped = {
isEscaped: true;
callbacks?: HtmlEscapedCallback[];
};
export type HtmlEscapedString = string & HtmlEscaped;
/**
* StringBuffer contains string and Promise<string> alternately
* The length of the array will be odd, the odd numbered element will be a string,
* and the even numbered element will be a Promise<string>.
* When concatenating into a single string, it must be processed from the tail.
* @example
* [
* 'framework.',
* Promise.resolve('ultra fast'),
* 'a ',
* Promise.resolve('is '),
* 'Hono',
* ]
*/
export type StringBuffer = (string | Promise<string>)[];
export type StringBufferWithCallbacks = StringBuffer & {
callbacks: HtmlEscapedCallback[];
};
export declare const raw: (value: unknown, callbacks?: HtmlEscapedCallback[]) => HtmlEscapedString;
export declare const stringBufferToString: (buffer: StringBuffer, callbacks: HtmlEscapedCallback[] | undefined) => Promise<HtmlEscapedString>;
export declare const escapeToBuffer: (str: string, buffer: StringBuffer) => void;
export declare const resolveCallbackSync: (str: string | HtmlEscapedString) => string;
export declare const resolveCallback: (str: string | HtmlEscapedString | Promise<string>, phase: (typeof HtmlEscapedCallbackPhase)[keyof typeof HtmlEscapedCallbackPhase], preserveCallbacks: boolean, context: object, buffer?: [string]) => Promise<string>;
//#endregion
export {};
@@ -0,0 +1,73 @@
import { MiddlewareHandler } from "../../types.js";
import { Context } from "../../context.js";
//#region src/middleware/basic-auth/index.d.ts
type MessageFunction = (c: Context) => string | object | Promise<string | object>;
type BasicAuthOptions = {
username: string;
password: string;
realm?: string;
hashFunction?: Function;
invalidUserMessage?: string | object | MessageFunction;
onAuthSuccess?: (c: Context, username: string) => void | Promise<void>;
} | {
verifyUser: (username: string, password: string, c: Context) => boolean | Promise<boolean>;
realm?: string;
hashFunction?: Function;
invalidUserMessage?: string | object | MessageFunction;
onAuthSuccess?: (c: Context, username: string) => void | Promise<void>;
};
/**
* Basic Auth Middleware for Hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/basic-auth}
*
* @param {BasicAuthOptions} options - The options for the basic authentication middleware.
* @param {string} options.username - The username for authentication.
* @param {string} options.password - The password for authentication.
* @param {string} [options.realm="Secure Area"] - The realm attribute for the WWW-Authenticate header.
* @param {Function} [options.hashFunction] - The hash function used for secure comparison.
* @param {Function} [options.verifyUser] - The function to verify user credentials.
* @param {string | object | MessageFunction} [options.invalidUserMessage="Unauthorized"] - The invalid user message.
* @param {Function} [options.onAuthSuccess] - Callback function called on successful authentication.
* @returns {MiddlewareHandler} The middleware handler function.
* @throws {HTTPException} If neither "username and password" nor "verifyUser" options are provided.
*
* @example
* ```ts
* const app = new Hono()
*
* app.use(
* '/auth/*',
* basicAuth({
* username: 'hono',
* password: 'ahotproject',
* })
* )
*
* app.get('/auth/page', (c) => {
* return c.text('You are authorized')
* })
* ```
*
* @example
* ```ts
* // With onAuthSuccess callback
* app.use(
* '/auth/*',
* basicAuth({
* username: 'hono',
* password: 'ahotproject',
* onAuthSuccess: (c, username) => {
* c.set('user', { name: username, role: 'admin' })
* console.log(`User ${username} authenticated`)
* },
* })
* )
* ```
*/
export declare const basicAuth: (options: BasicAuthOptions, ...users: {
username: string;
password: string;
}[]) => MiddlewareHandler;
//#endregion
export {};
@@ -0,0 +1,277 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.access = access;
exports.assertArray = assertArray;
exports.assertAssumptions = assertAssumptions;
exports.assertBabelrcSearch = assertBabelrcSearch;
exports.assertBoolean = assertBoolean;
exports.assertCallerMetadata = assertCallerMetadata;
exports.assertCompact = assertCompact;
exports.assertConfigApplicableTest = assertConfigApplicableTest;
exports.assertConfigFileSearch = assertConfigFileSearch;
exports.assertFunction = assertFunction;
exports.assertIgnoreList = assertIgnoreList;
exports.assertInputSourceMap = assertInputSourceMap;
exports.assertObject = assertObject;
exports.assertPluginList = assertPluginList;
exports.assertRootMode = assertRootMode;
exports.assertSourceMaps = assertSourceMaps;
exports.assertSourceType = assertSourceType;
exports.assertString = assertString;
exports.assertTargets = assertTargets;
exports.msg = msg;
function _helperCompilationTargets() {
const data = require("@babel/helper-compilation-targets");
_helperCompilationTargets = function () {
return data;
};
return data;
}
var _options = require("./options.js");
function msg(loc) {
switch (loc.type) {
case "root":
return ``;
case "env":
return `${msg(loc.parent)}.env["${loc.name}"]`;
case "overrides":
return `${msg(loc.parent)}.overrides[${loc.index}]`;
case "option":
return `${msg(loc.parent)}.${loc.name}`;
case "access":
return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`;
default:
throw new Error(`Assertion failure: Unknown type ${loc.type}`);
}
}
function access(loc, name) {
return {
type: "access",
name,
parent: loc
};
}
function assertRootMode(loc, value) {
if (value !== undefined && value !== "root" && value !== "upward" && value !== "upward-optional") {
throw new Error(`${msg(loc)} must be a "root", "upward", "upward-optional" or undefined`);
}
return value;
}
function assertSourceMaps(loc, value) {
if (value !== undefined && typeof value !== "boolean" && value !== "inline" && value !== "both") {
throw new Error(`${msg(loc)} must be a boolean, "inline", "both", or undefined`);
}
return value;
}
function assertCompact(loc, value) {
if (value !== undefined && typeof value !== "boolean" && value !== "auto") {
throw new Error(`${msg(loc)} must be a boolean, "auto", or undefined`);
}
return value;
}
function assertSourceType(loc, value) {
if (value !== undefined && value !== "module" && value !== "commonjs" && value !== "script" && value !== "unambiguous") {
throw new Error(`${msg(loc)} must be "module", "commonjs", "script", "unambiguous", or undefined`);
}
return value;
}
function assertCallerMetadata(loc, value) {
const obj = assertObject(loc, value);
if (obj) {
if (typeof obj.name !== "string") {
throw new Error(`${msg(loc)} set but does not contain "name" property string`);
}
for (const prop of Object.keys(obj)) {
const propLoc = access(loc, prop);
const value = obj[prop];
if (value != null && typeof value !== "boolean" && typeof value !== "string" && typeof value !== "number") {
throw new Error(`${msg(propLoc)} must be null, undefined, a boolean, a string, or a number.`);
}
}
}
return value;
}
function assertInputSourceMap(loc, value) {
if (value !== undefined && typeof value !== "boolean" && (typeof value !== "object" || !value)) {
throw new Error(`${msg(loc)} must be a boolean, object, or undefined`);
}
return value;
}
function assertString(loc, value) {
if (value !== undefined && typeof value !== "string") {
throw new Error(`${msg(loc)} must be a string, or undefined`);
}
return value;
}
function assertFunction(loc, value) {
if (value !== undefined && typeof value !== "function") {
throw new Error(`${msg(loc)} must be a function, or undefined`);
}
return value;
}
function assertBoolean(loc, value) {
if (value !== undefined && typeof value !== "boolean") {
throw new Error(`${msg(loc)} must be a boolean, or undefined`);
}
return value;
}
function assertObject(loc, value) {
if (value !== undefined && (typeof value !== "object" || Array.isArray(value) || !value)) {
throw new Error(`${msg(loc)} must be an object, or undefined`);
}
return value;
}
function assertArray(loc, value) {
if (value != null && !Array.isArray(value)) {
throw new Error(`${msg(loc)} must be an array, or undefined`);
}
return value;
}
function assertIgnoreList(loc, value) {
const arr = assertArray(loc, value);
arr == null || arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item));
return arr;
}
function assertIgnoreItem(loc, value) {
if (typeof value !== "string" && typeof value !== "function" && !(value instanceof RegExp)) {
throw new Error(`${msg(loc)} must be an array of string/Function/RegExp values, or undefined`);
}
return value;
}
function assertConfigApplicableTest(loc, value) {
if (value === undefined) {
return value;
}
if (Array.isArray(value)) {
value.forEach((item, i) => {
if (!checkValidTest(item)) {
throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`);
}
});
} else if (!checkValidTest(value)) {
throw new Error(`${msg(loc)} must be a string/Function/RegExp, or an array of those`);
}
return value;
}
function checkValidTest(value) {
return typeof value === "string" || typeof value === "function" || value instanceof RegExp;
}
function assertConfigFileSearch(loc, value) {
if (value !== undefined && typeof value !== "boolean" && typeof value !== "string") {
throw new Error(`${msg(loc)} must be a undefined, a boolean, a string, ` + `got ${JSON.stringify(value)}`);
}
return value;
}
function assertBabelrcSearch(loc, value) {
if (value === undefined || typeof value === "boolean") {
return value;
}
if (Array.isArray(value)) {
value.forEach((item, i) => {
if (!checkValidTest(item)) {
throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`);
}
});
} else if (!checkValidTest(value)) {
throw new Error(`${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` + `or an array of those, got ${JSON.stringify(value)}`);
}
return value;
}
function assertPluginList(loc, value) {
const arr = assertArray(loc, value);
if (arr) {
arr.forEach((item, i) => assertPluginItem(access(loc, i), item));
}
return arr;
}
function assertPluginItem(loc, value) {
if (Array.isArray(value)) {
if (value.length === 0) {
throw new Error(`${msg(loc)} must include an object`);
}
if (value.length > 3) {
throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`);
}
assertPluginTarget(access(loc, 0), value[0]);
if (value.length > 1) {
const opts = value[1];
if (opts !== undefined && opts !== false && (typeof opts !== "object" || Array.isArray(opts) || opts === null)) {
throw new Error(`${msg(access(loc, 1))} must be an object, false, or undefined`);
}
}
if (value.length === 3) {
const name = value[2];
if (name !== undefined && typeof name !== "string") {
throw new Error(`${msg(access(loc, 2))} must be a string, or undefined`);
}
}
} else {
assertPluginTarget(loc, value);
}
return value;
}
function assertPluginTarget(loc, value) {
if ((typeof value !== "object" || !value) && typeof value !== "string" && typeof value !== "function") {
throw new Error(`${msg(loc)} must be a string, object, function`);
}
return value;
}
function assertTargets(loc, value) {
if ((0, _helperCompilationTargets().isBrowsersQueryValid)(value)) return value;
if (typeof value !== "object" || !value || Array.isArray(value)) {
throw new Error(`${msg(loc)} must be a string, an array of strings or an object`);
}
const browsersLoc = access(loc, "browsers");
const esmodulesLoc = access(loc, "esmodules");
assertBrowsersList(browsersLoc, value.browsers);
assertBoolean(esmodulesLoc, value.esmodules);
for (const key of Object.keys(value)) {
const val = value[key];
const subLoc = access(loc, key);
if (key === "esmodules") assertBoolean(subLoc, val);else if (key === "browsers") assertBrowsersList(subLoc, val);else if (!hasOwnProperty.call(_helperCompilationTargets().TargetNames, key)) {
const validTargets = Object.keys(_helperCompilationTargets().TargetNames).join(", ");
throw new Error(`${msg(subLoc)} is not a valid target. Supported targets are ${validTargets}`);
} else assertBrowserVersion(subLoc, val);
}
return value;
}
function assertBrowsersList(loc, value) {
if (value !== undefined && !(0, _helperCompilationTargets().isBrowsersQueryValid)(value)) {
throw new Error(`${msg(loc)} must be undefined, a string or an array of strings`);
}
}
function assertBrowserVersion(loc, value) {
if (typeof value === "number" && Math.round(value) === value) return;
if (typeof value === "string") return;
throw new Error(`${msg(loc)} must be a string or an integer number`);
}
function assertAssumptions(loc, value) {
if (value === undefined) return;
if (typeof value !== "object" || value === null) {
throw new Error(`${msg(loc)} must be an object or undefined.`);
}
let root = loc;
do {
root = root.parent;
} while (root.type !== "root");
const inPreset = root.source === "preset";
for (const name of Object.keys(value)) {
const subLoc = access(loc, name);
if (!_options.assumptionsNames.has(name)) {
throw new Error(`${msg(subLoc)} is not a supported assumption.`);
}
if (typeof value[name] !== "boolean") {
throw new Error(`${msg(subLoc)} must be a boolean.`);
}
if (inPreset && value[name] === false) {
throw new Error(`${msg(subLoc)} cannot be set to 'false' inside presets.`);
}
}
return value;
}
0 && 0;
//# sourceMappingURL=option-assertions.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_Z","130":"_A"},B:{"1":"_CK","130":"_0 _GE"},C:{"1":"_PI","2":"_f","130":"_uF","322":"_YF _KH"},D:{"1":"_DK","2":"_FC","130":"_wL _uG _GE"},E:{"1":"_PD","2":"_iC _e _tE","130":"_wB ND"},F:{"1":"_EK","2":"_T","130":"_MC _1E"},G:{"1":"_kG","2":"E lC _qM iD","130":"_FG _xC"},H:{"2":"1D"},I:{"1":"I","2":"_W","130":"_y"},J:{"2":"D","130":"A"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"130":"bC"},P:{"1":"_1B","130":"_FP"},Q:{"130":"JE"},R:{"130":"KE"},S:{"1":"_C"}},B:5,C:"CSS font-variant-alternates",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"octagon-x.js","sources":["../../../src/icons/octagon-x.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name OctagonX\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTUgOS02IDYiIC8+CiAgPHBhdGggZD0iTTIuNTg2IDE2LjcyNkEyIDIgMCAwIDEgMiAxNS4zMTJWOC42ODhhMiAyIDAgMCAxIC41ODYtMS40MTRsNC42ODgtNC42ODhBMiAyIDAgMCAxIDguNjg4IDJoNi42MjRhMiAyIDAgMCAxIDEuNDE0LjU4Nmw0LjY4OCA0LjY4OEEyIDIgMCAwIDEgMjIgOC42ODh2Ni42MjRhMiAyIDAgMCAxLS41ODYgMS40MTRsLTQuNjg4IDQuNjg4YTIgMiAwIDAgMS0xLjQxNC41ODZIOC42ODhhMiAyIDAgMCAxLTEuNDE0LS41ODZ6IiAvPgogIDxwYXRoIGQ9Im05IDkgNiA2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/octagon-x\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst OctagonX = createLucideIcon('OctagonX', [\n ['path', { d: 'm15 9-6 6', key: '1uzhvr' }],\n [\n 'path',\n {\n d: 'M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z',\n key: '2d38gg',\n },\n ],\n ['path', { d: 'm9 9 6 6', key: 'z0biqf' }],\n]);\n\nexport default OctagonX;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"pointer-off.js","sources":["../../../src/icons/pointer-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PointerOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgNC41VjRhMiAyIDAgMCAwLTIuNDEtMS45NTciIC8+CiAgPHBhdGggZD0iTTEzLjkgOC40YTIgMiAwIDAgMC0xLjI2LTEuMjk1IiAvPgogIDxwYXRoIGQ9Ik0yMS43IDE2LjJBOCA4IDAgMCAwIDIyIDE0di0zYTIgMiAwIDEgMC00IDB2LTFhMiAyIDAgMCAwLTMuNjMtMS4xNTgiIC8+CiAgPHBhdGggZD0ibTcgMTUtMS44LTEuOGEyIDIgMCAwIDAtMi43OSAyLjg2TDYgMTkuN2E3Ljc0IDcuNzQgMCAwIDAgNiAyLjNoMmE4IDggMCAwIDAgNS42NTctMi4zNDMiIC8+CiAgPHBhdGggZD0iTTYgNnY4IiAvPgogIDxwYXRoIGQ9Im0yIDIgMjAgMjAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/pointer-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst PointerOff = createLucideIcon('PointerOff', [\n ['path', { d: 'M10 4.5V4a2 2 0 0 0-2.41-1.957', key: 'jsi14n' }],\n ['path', { d: 'M13.9 8.4a2 2 0 0 0-1.26-1.295', key: 'hirc7f' }],\n [\n 'path',\n { d: 'M21.7 16.2A8 8 0 0 0 22 14v-3a2 2 0 1 0-4 0v-1a2 2 0 0 0-3.63-1.158', key: '1jxb2e' },\n ],\n [\n 'path',\n {\n d: 'm7 15-1.8-1.8a2 2 0 0 0-2.79 2.86L6 19.7a7.74 7.74 0 0 0 6 2.3h2a8 8 0 0 0 5.657-2.343',\n key: '10r7hm',\n },\n ],\n ['path', { d: 'M6 6v8', key: 'tv5xkp' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n]);\n\nexport default PointerOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC/D,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC5F,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,40 @@
'use strict';
var test = require('tape');
var hasToStringTag = require('has-tostringtag/shams')();
var inspect = require('../');
test('Symbol.toStringTag', { skip: !hasToStringTag }, function (t) {
t.plan(4);
var obj = { a: 1 };
t.equal(inspect(obj), '{ a: 1 }', 'object, no Symbol.toStringTag');
obj[Symbol.toStringTag] = 'foo';
t.equal(inspect(obj), '{ a: 1, [Symbol(Symbol.toStringTag)]: \'foo\' }', 'object with Symbol.toStringTag');
t.test('null objects', { skip: 'toString' in { __proto__: null } }, function (st) {
st.plan(2);
var dict = { __proto__: null, a: 1 };
st.equal(inspect(dict), '[Object: null prototype] { a: 1 }', 'null object with Symbol.toStringTag');
dict[Symbol.toStringTag] = 'Dict';
st.equal(inspect(dict), '[Dict: null prototype] { a: 1, [Symbol(Symbol.toStringTag)]: \'Dict\' }', 'null object with Symbol.toStringTag');
});
t.test('instances', function (st) {
st.plan(4);
function C() {
this.a = 1;
}
st.equal(Object.prototype.toString.call(new C()), '[object Object]', 'instance, no toStringTag, Object.prototype.toString');
st.equal(inspect(new C()), 'C { a: 1 }', 'instance, no toStringTag');
C.prototype[Symbol.toStringTag] = 'Class!';
st.equal(Object.prototype.toString.call(new C()), '[object Class!]', 'instance, with toStringTag, Object.prototype.toString');
st.equal(inspect(new C()), 'C [Class!] { a: 1 }', 'instance, with toStringTag');
});
});
@@ -0,0 +1 @@
{"version":3,"file":"dd-draggable.js","sourceRoot":"","sources":["../src/dd-draggable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAiB,KAAK,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAwB,MAAM,gBAAgB,CAAC;AAGvE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAkB5F,uEAAuE;AACvE,MAAM,aAAa,GAAG,mFAAmF,CAAC;AAE1G,yBAAyB;AAEzB,MAAa,WAAY,SAAQ,eAAe;IAmC9C,YAAmB,EAAuB,EAAS,SAAoB,EAAE;QACvE,KAAK,EAAE,CAAC;QADS,OAAE,GAAF,EAAE,CAAqB;QAAS,WAAM,GAAN,MAAM,CAAgB;QAZzE,gBAAgB;QACN,kBAAa,GAAkB;YACvC,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,CAAC;YACT,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;SACX,CAAC;QAwYF,8DAA8D;QACpD,oBAAe,GAAG,GAAS,EAAE;YACrC,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;YACvB,MAAM,UAAU,GAAG,IAAI,CAAC,oBAAoB,CAAC;YAC7C,IAAI,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE;gBAAE,IAAI,CAAC,cAAc,EAAE,CAAC;gBAAC,OAAO;aAAE;YAC1D,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;YACnD,IAAI,QAAQ,KAAK,CAAC,EAAE;gBAAE,IAAI,CAAC,cAAc,EAAE,CAAC;gBAAC,OAAO;aAAE;YAEtD,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE;gBAC7B,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,IAAI,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC;gBAC9E,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;aACzD;YACD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACjC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;YAC9D,MAAM,YAAY,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YAEnD,MAAM,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC;YACxC,UAAU,CAAC,SAAS,IAAI,YAAY,CAAC;YACrC,IAAI,UAAU,CAAC,SAAS,KAAK,UAAU,EAAE;gBAAE,IAAI,CAAC,cAAc,EAAE,CAAC;gBAAC,OAAO;aAAE;YAE3E,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE;gBAClC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAChC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC/B;YAED,IAAI,CAAC,iBAAiB,GAAG,qBAAqB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACvE,CAAC,CAAA;QAzZC,6DAA6D;QAC7D,MAAM,UAAU,GAAG,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;QAChD,MAAM,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QACvJ,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YAC7B,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC,CAAC;SACrB;QACD,+GAA+G;QAC/G,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED,4HAA4H;IAClH,aAAa;QACrB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAuB,EAAE;YACnG,IAAI,CAAC,CAAC,IAAI,YAAY,WAAW,CAAC;gBAAE,OAAO,KAAK,CAAC;YACjD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;YAC/C,OAAO,KAAK,KAAK,IAAI,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC;QACrC,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,EAAE,CAAC,KAAkB,EAAE,QAAoC;QAChE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAEM,GAAG,CAAC,KAAkB;QAC3B,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAEM,MAAM;QACX,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK;YAAE,OAAO;QACpC,KAAK,CAAC,MAAM,EAAE,CAAC;QACf,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAC5B,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;YACtD,IAAI,OAAO,EAAE;gBACX,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;gBAClD,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;gBACpD,kFAAkF;aACnF;QACH,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IAEM,OAAO,CAAC,UAAU,GAAG,KAAK;QAC/B,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI;YAAE,OAAO;QACnC,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAC5B,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;YACzD,IAAI,OAAO,EAAE;gBACX,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;gBACrD,MAAM,CAAC,mBAAmB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;aACxD;QACH,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,UAAU;YAAE,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IAClE,CAAC;IAEM,OAAO;QACZ,IAAI,IAAI,CAAC,WAAW;YAAE,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,IAAI,CAAC,WAAW,CAAC;QACxB,IAAI,IAAI,CAAC,cAAc;YAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC5D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACnB,OAAO,IAAI,CAAC,EAAE,CAAC;QACf,OAAO,IAAI,CAAC,MAAM,CAAC;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC;QACnB,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC;IAEM,YAAY,CAAC,IAAe;QACjC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC;IACd,CAAC;IAED,qEAAqE;IAC3D,UAAU,CAAC,CAAa;QAChC,0IAA0I;QAC1I,IAAI,OAAO,CAAC,YAAY,IAAI,CAAC,CAAC,SAAS;YAAE,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC;QAEtE,mDAAmD;QACnD,IAAI,SAAS,CAAC,YAAY;YAAE,OAAO;QACnC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC,CAAC,kBAAkB;QAEnD,qGAAqG;QACrG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KALine truncated
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ConciergeBell = createLucideIcon("ConciergeBell", [
[
"path",
{ d: "M3 20a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1Z", key: "1pvr1r" }
],
["path", { d: "M20 16a8 8 0 1 0-16 0", key: "1pa543" }],
["path", { d: "M12 4v4", key: "1bq03y" }],
["path", { d: "M10 4h4", key: "1xpv9s" }]
]);
export { ConciergeBell as default };
//# sourceMappingURL=concierge-bell.js.map
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileArchive = createLucideIcon("FileArchive", [
["path", { d: "M10 12v-1", key: "v7bkov" }],
["path", { d: "M10 18v-2", key: "1cjy8d" }],
["path", { d: "M10 7V6", key: "dljcrl" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
[
"path",
{ d: "M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01", key: "gkbcor" }
],
["circle", { cx: "10", cy: "20", r: "2", key: "1xzdoj" }]
]);
export { FileArchive as default };
//# sourceMappingURL=file-archive.js.map
@@ -0,0 +1,395 @@
"use strict";
const includeDeprecated = !process.env.ESLINT_CONFIG_PRETTIER_NO_DEPRECATED;
const specialRule = 0;
exports.rules = {
// The following rules can be used in some cases. See the README for more
// information. These are marked with `0` instead of `"off"` so that a
// script can distinguish them. Note that there are a few more of these
// in the deprecated section below.
"curly": specialRule,
"no-unexpected-multiline": specialRule,
"@stylistic/lines-around-comment": specialRule,
"@stylistic/max-len": specialRule,
"@stylistic/no-confusing-arrow": specialRule,
"@stylistic/no-mixed-operators": specialRule,
"@stylistic/no-tabs": specialRule,
"@stylistic/quotes": specialRule,
"@stylistic/js/lines-around-comment": specialRule,
"@stylistic/js/max-len": specialRule,
"@stylistic/js/no-confusing-arrow": specialRule,
"@stylistic/js/no-mixed-operators": specialRule,
"@stylistic/js/no-tabs": specialRule,
"@stylistic/js/quotes": specialRule,
"@stylistic/ts/lines-around-comment": specialRule,
"@stylistic/ts/quotes": specialRule,
"@typescript-eslint/lines-around-comment": specialRule,
"@typescript-eslint/quotes": specialRule,
"babel/quotes": specialRule,
"unicorn/template-indent": specialRule,
"vue/html-self-closing": specialRule,
"vue/max-len": specialRule,
// The rest are rules that you never need to enable when using Prettier.
"@babel/object-curly-spacing": "off",
"@babel/semi": "off",
"@stylistic/array-bracket-newline": "off",
"@stylistic/array-bracket-spacing": "off",
"@stylistic/array-element-newline": "off",
"@stylistic/arrow-parens": "off",
"@stylistic/arrow-spacing": "off",
"@stylistic/block-spacing": "off",
"@stylistic/brace-style": "off",
"@stylistic/comma-dangle": "off",
"@stylistic/comma-spacing": "off",
"@stylistic/comma-style": "off",
"@stylistic/computed-property-spacing": "off",
"@stylistic/dot-location": "off",
"@stylistic/eol-last": "off",
"@stylistic/func-call-spacing": "off",
"@stylistic/function-call-argument-newline": "off",
"@stylistic/function-call-spacing": "off",
"@stylistic/function-paren-newline": "off",
"@stylistic/generator-star-spacing": "off",
"@stylistic/implicit-arrow-linebreak": "off",
"@stylistic/indent": "off",
"@stylistic/jsx-quotes": "off",
"@stylistic/key-spacing": "off",
"@stylistic/keyword-spacing": "off",
"@stylistic/linebreak-style": "off",
"@stylistic/max-statements-per-line": "off",
"@stylistic/multiline-ternary": "off",
"@stylistic/new-parens": "off",
"@stylistic/newline-per-chained-call": "off",
"@stylistic/no-extra-parens": "off",
"@stylistic/no-extra-semi": "off",
"@stylistic/no-floating-decimal": "off",
"@stylistic/no-mixed-spaces-and-tabs": "off",
"@stylistic/no-multi-spaces": "off",
"@stylistic/no-multiple-empty-lines": "off",
"@stylistic/no-trailing-spaces": "off",
"@stylistic/no-whitespace-before-property": "off",
"@stylistic/nonblock-statement-body-position": "off",
"@stylistic/object-curly-newline": "off",
"@stylistic/object-curly-spacing": "off",
"@stylistic/object-property-newline": "off",
"@stylistic/one-var-declaration-per-line": "off",
"@stylistic/operator-linebreak": "off",
"@stylistic/padded-blocks": "off",
"@stylistic/quote-props": "off",
"@stylistic/rest-spread-spacing": "off",
"@stylistic/semi": "off",
"@stylistic/semi-spacing": "off",
"@stylistic/semi-style": "off",
"@stylistic/space-before-blocks": "off",
"@stylistic/space-before-function-paren": "off",
"@stylistic/space-in-parens": "off",
"@stylistic/space-infix-ops": "off",
"@stylistic/space-unary-ops": "off",
"@stylistic/switch-colon-spacing": "off",
"@stylistic/template-curly-spacing": "off",
"@stylistic/template-tag-spacing": "off",
"@stylistic/wrap-iife": "off",
"@stylistic/wrap-regex": "off",
"@stylistic/yield-star-spacing": "off",
"@stylistic/member-delimiter-style": "off",
"@stylistic/type-annotation-spacing": "off",
"@stylistic/jsx-child-element-spacing": "off",
"@stylistic/jsx-closing-bracket-location": "off",
"@stylistic/jsx-closing-tag-location": "off",
"@stylistic/jsx-curly-newline": "off",
"@stylistic/jsx-curly-spacing": "off",
"@stylistic/jsx-equals-spacing": "off",
"@stylistic/jsx-first-prop-new-line": "off",
"@stylistic/jsx-indent": "off",
"@stylistic/jsx-indent-props": "off",
"@stylistic/jsx-max-props-per-line": "off",
"@stylistic/jsx-newline": "off",
"@stylistic/jsx-one-expression-per-line": "off",
"@stylistic/jsx-props-no-multi-spaces": "off",
"@stylistic/jsx-tag-spacing": "off",
"@stylistic/jsx-wrap-multilines": "off",
"@stylistic/indent-binary-ops": "off",
"@stylistic/type-generic-spacing": "off",
"@stylistic/type-named-tuple-spacing": "off",
"@stylistic/js/array-bracket-newline": "off",
"@stylistic/js/array-bracket-spacing": "off",
"@stylistic/js/array-element-newline": "off",
"@stylistic/js/arrow-parens": "off",
"@stylistic/js/arrow-spacing": "off",
"@stylistic/js/block-spacing": "off",
"@stylistic/js/brace-style": "off",
"@stylistic/js/comma-dangle": "off",
"@stylistic/js/comma-spacing": "off",
"@stylistic/js/comma-style": "off",
"@stylistic/js/computed-property-spacing": "off",
"@stylistic/js/dot-location": "off",
"@stylistic/js/eol-last": "off",
"@stylistic/js/func-call-spacing": "off",
"@stylistic/js/function-call-argument-newline": "off",
"@stylistic/js/function-call-spacing": "off",
"@stylistic/js/function-paren-newline": "off",
"@stylistic/js/generator-star-spacing": "off",
"@stylistic/js/implicit-arrow-linebreak": "off",
"@stylistic/js/indent": "off",
"@stylistic/js/jsx-quotes": "off",
"@stylistic/js/key-spacing": "off",
"@stylistic/js/keyword-spacing": "off",
"@stylistic/js/linebreak-style": "off",
"@stylistic/js/max-statements-per-line": "off",
"@stylistic/js/multiline-ternary": "off",
"@stylistic/js/new-parens": "off",
"@stylistic/js/newline-per-chained-call": "off",
"@stylistic/js/no-extra-parens": "off",
"@stylistic/js/no-extra-semi": "off",
"@stylistic/js/no-floating-decimal": "off",
"@stylistic/js/no-mixed-spaces-and-tabs": "off",
"@stylistic/js/no-multi-spaces": "off",
"@stylistic/js/no-multiple-empty-lines": "off",
"@stylistic/js/no-trailing-spaces": "off",
"@stylistic/js/no-whitespace-before-property": "off",
"@stylistic/js/nonblock-statement-body-position": "off",
"@stylistic/js/object-curly-newline": "off",
"@stylistic/js/object-curly-spacing": "off",
"@stylistic/js/object-property-newline": "off",
"@stylistic/js/one-var-declaration-per-line": "off",
"@stylistic/js/operator-linebreak": "off",
"@stylistic/js/padded-blocks": "off",
"@stylistic/js/quote-props": "off",
"@stylistic/js/rest-spread-spacing": "off",
"@stylistic/js/semi": "off",
"@stylistic/js/semi-spacing": "off",
"@stylistic/js/semi-style": "off",
"@stylistic/js/space-before-blocks": "off",
"@stylistic/js/space-before-function-paren": "off",
"@stylistic/js/space-in-parens": "off",
"@stylistic/js/space-infix-ops": "off",
"@stylistic/js/space-unary-ops": "off",
"@stylistic/js/switch-colon-spacing": "off",
"@stylistic/js/template-curly-spacing": "off",
"@stylistic/js/template-tag-spacing": "off",
"@stylistic/js/wrap-iife": "off",
"@stylistic/js/wrap-regex": "off",
"@stylistic/js/yield-star-spacing": "off",
"@stylistic/ts/block-spacing": "off",
"@stylistic/ts/brace-style": "off",
"@stylistic/ts/comma-dangle": "off",
"@stylistic/ts/comma-spacing": "off",
"@stylistic/ts/func-call-spacing": "off",
"@stylistic/ts/function-call-spacing": "off",
"@stylistic/ts/indent": "off",
"@stylistic/ts/key-spacing": "off",
"@stylistic/ts/keyword-spacing": "off",
"@stylistic/ts/member-delimiter-style": "off",
"@stylistic/ts/no-extra-parens": "off",
"@stylistic/ts/no-extra-semi": "off",
"@stylistic/ts/object-curly-spacing": "off",
"@stylistic/ts/semi": "off",
"@stylistic/ts/space-before-blocks": "off",
"@stylistic/ts/space-before-function-paren": "off",
"@stylistic/ts/space-infix-ops": "off",
"@stylistic/ts/type-annotation-spacing": "off",
"@stylistic/jsx/jsx-child-element-spacing": "off",
"@stylistic/jsx/jsx-closing-bracket-location": "off",
"@stylistic/jsx/jsx-closing-tag-location": "off",
"@stylistic/jsx/jsx-curly-newline": "off",
"@stylistic/jsx/jsx-curly-spacing": "off",
"@stylistic/jsx/jsx-equals-spacing": "off",
"@stylistic/jsx/jsx-first-prop-new-line": "off",
"@stylistic/jsx/jsx-indent": "off",
"@stylistic/jsx/jsx-indent-props": "off",
"@stylistic/jsx/jsx-max-props-per-line": "off",
"@typescript-eslint/block-spacing": "off",
"@typescript-eslint/brace-style": "off",
"@typescript-eslint/comma-dangle": "off",
"@typescript-eslint/comma-spacing": "off",
"@typescript-eslint/func-call-spacing": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/key-spacing": "off",
"@typescript-eslint/keyword-spacing": "off",
"@typescript-eslint/member-delimiter-style": "off",
"@typescript-eslint/no-extra-parens": "off",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/object-curly-spacing": "off",
"@typescript-eslint/semi": "off",
"@typescript-eslint/space-before-blocks": "off",
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/space-infix-ops": "off",
"@typescript-eslint/type-annotation-spacing": "off",
"babel/object-curly-spacing": "off",
"babel/semi": "off",
"flowtype/boolean-style": "off",
"flowtype/delimiter-dangle": "off",
"flowtype/generic-spacing": "off",
"flowtype/object-type-curly-spacing": "off",
"flowtype/object-type-delimiter": "off",
"flowtype/quotes": "off",
"flowtype/semi": "off",
"flowtype/space-after-type-colon": "off",
"flowtype/space-before-generic-bracket": "off",
"flowtype/space-before-type-colon": "off",
"flowtype/union-intersection-spacing": "off",
"react/jsx-child-element-spacing": "off",
"react/jsx-closing-bracket-location": "off",
"react/jsx-closing-tag-location": "off",
"react/jsx-curly-newline": "off",
"react/jsx-curly-spacing": "off",
"react/jsx-equals-spacing": "off",
"react/jsx-first-prop-new-line": "off",
"react/jsx-indent": "off",
"react/jsx-indent-props": "off",
"react/jsx-max-props-per-line": "off",
"react/jsx-newline": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-multi-spaces": "off",
"react/jsx-tag-spacing": "off",
"react/jsx-wrap-multilines": "off",
"standard/array-bracket-even-spacing": "off",
"standard/computed-property-even-spacing": "off",
"standard/object-curly-even-spacing": "off",
"unicorn/empty-brace-spaces": "off",
"unicorn/no-nested-ternary": "off",
"unicorn/number-literal-case": "off",
"vue/array-bracket-newline": "off",
"vue/array-bracket-spacing": "off",
"vue/array-element-newline": "off",
"vue/arrow-spacing": "off",
"vue/block-spacing": "off",
"vue/block-tag-newline": "off",
"vue/brace-style": "off",
"vue/comma-dangle": "off",
"vue/comma-spacing": "off",
"vue/comma-style": "off",
"vue/dot-location": "off",
"vue/func-call-spacing": "off",
"vue/html-closing-bracket-newline": "off",
"vue/html-closing-bracket-spacing": "off",
"vue/html-end-tags": "off",
"vue/html-indent": "off",
"vue/html-quotes": "off",
"vue/key-spacing": "off",
"vue/keyword-spacing": "off",
"vue/max-attributes-per-line": "off",
"vue/multiline-html-element-content-newline": "off",
"vue/multiline-ternary": "off",
"vue/mustache-interpolation-spacing": "off",
"vue/no-extra-parens": "off",
"vue/no-multi-spaces": "off",
"vue/no-spaces-around-equal-signs-in-attribute": "off",
"vue/object-curly-newline": "off",
"vue/object-curly-spacing": "off",
"vue/object-property-newline": "off",
"vue/operator-linebreak": "off",
"vue/quote-props": "off",
"vue/script-indent": "off",
"vue/singleline-html-element-content-newline": "off",
"vue/space-in-parens": "off",
"vue/space-infix-ops": "off",
"vue/space-unary-ops": "off",
"vue/template-curly-spacing": "off",
...(includeDeprecated && {
// Removed in version 0.10.0.
// https://eslint.org/docs/latest/rules/space-unary-word-ops
"space-unary-word-ops": "off",
// Removed in version 1.0.0.
// https://github.com/eslint/eslint/issues/1898
"generator-star": "off",
"no-comma-dangle": "off",
"no-reserved-keys": "off",
"no-space-before-semi": "off",
"no-wrap-func": "off",
"space-after-function-name": "off",
"space-before-function-parentheses": "off",
"space-in-brackets": "off",
// Removed in version 2.0.0.
// https://github.com/eslint/eslint/issues/5032
"no-arrow-condition": "off",
"space-after-keywords": "off",
"space-before-keywords": "off",
"space-return-throw-case": "off",
// Deprecated since version 3.3.0.
// https://eslint.org/docs/rules/no-spaced-func
"no-spaced-func": "off",
// Deprecated since version 4.0.0.
// https://github.com/eslint/eslint/pull/8286
"indent-legacy": "off",
// Deprecated since version 8.53.0.
// https://eslint.org/blog/2023/10/deprecating-formatting-rules/
"array-bracket-newline": "off",
"array-bracket-spacing": "off",
"array-element-newline": "off",
"arrow-parens": "off",
"arrow-spacing": "off",
"block-spacing": "off",
"brace-style": "off",
"comma-dangle": "off",
"comma-spacing": "off",
"comma-style": "off",
"computed-property-spacing": "off",
"dot-location": "off",
"eol-last": "off",
"func-call-spacing": "off",
"function-call-argument-newline": "off",
"function-paren-newline": "off",
"generator-star-spacing": "off",
"implicit-arrow-linebreak": "off",
"indent": "off",
"jsx-quotes": "off",
"key-spacing": "off",
"keyword-spacing": "off",
"linebreak-style": "off",
"lines-around-comment": specialRule,
"max-len": specialRule,
"max-statements-per-line": "off",
"multiline-ternary": "off",
"new-parens": "off",
"newline-per-chained-call": "off",
"no-confusing-arrow": specialRule,
"no-extra-parens": "off",
"no-extra-semi": "off",
"no-floating-decimal": "off",
"no-mixed-operators": specialRule,
"no-mixed-spaces-and-tabs": "off",
"no-multi-spaces": "off",
"no-multiple-empty-lines": "off",
"no-tabs": specialRule,
"no-trailing-spaces": "off",
"no-whitespace-before-property": "off",
"nonblock-statement-body-position": "off",
"object-curly-newline": "off",
"object-curly-spacing": "off",
"object-property-newline": "off",
"one-var-declaration-per-line": "off",
"operator-linebreak": "off",
"padded-blocks": "off",
"quote-props": "off",
"quotes": specialRule,
"rest-spread-spacing": "off",
"semi": "off",
"semi-spacing": "off",
"semi-style": "off",
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-in-parens": "off",
"space-infix-ops": "off",
"space-unary-ops": "off",
"switch-colon-spacing": "off",
"template-curly-spacing": "off",
"template-tag-spacing": "off",
"wrap-iife": "off",
"wrap-regex": "off",
"yield-star-spacing": "off",
// Deprecated since version 7.0.0.
// https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#700---2017-05-06
"react/jsx-space-before-closing": "off",
}),
};
@@ -0,0 +1,277 @@
/**
* @fileoverview Rule to flag use of constructors without capital letters
* @author Nicholas C. Zakas
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const CAPS_ALLOWED = [
"Array",
"Boolean",
"Date",
"Error",
"Function",
"Number",
"Object",
"RegExp",
"String",
"Symbol",
"BigInt",
];
/**
* A reducer function to invert an array to an Object mapping the string form of the key, to `true`.
* @param {Object} map Accumulator object for the reduce.
* @param {string} key Object key to set to `true`.
* @returns {Object} Returns the updated Object for further reduction.
*/
function invert(map, key) {
map[key] = true;
return map;
}
/**
* Creates an object with the cap is new exceptions as its keys and true as their values.
* @param {Object} config Rule configuration
* @returns {Object} Object with cap is new exceptions.
*/
function calculateCapIsNewExceptions(config) {
const capIsNewExceptions = Array.from(
new Set([...config.capIsNewExceptions, ...CAPS_ALLOWED]),
);
return capIsNewExceptions.reduce(invert, {});
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Require constructor names to begin with a capital letter",
recommended: false,
url: "https://eslint.org/docs/latest/rules/new-cap",
},
schema: [
{
type: "object",
properties: {
newIsCap: {
type: "boolean",
},
capIsNew: {
type: "boolean",
},
newIsCapExceptions: {
type: "array",
items: {
type: "string",
},
},
newIsCapExceptionPattern: {
type: "string",
},
capIsNewExceptions: {
type: "array",
items: {
type: "string",
},
},
capIsNewExceptionPattern: {
type: "string",
},
properties: {
type: "boolean",
},
},
additionalProperties: false,
},
],
defaultOptions: [
{
capIsNew: true,
capIsNewExceptions: CAPS_ALLOWED,
newIsCap: true,
newIsCapExceptions: [],
properties: true,
},
],
messages: {
upper: "A function with a name starting with an uppercase letter should only be used as a constructor.",
lower: "A constructor name should not start with a lowercase letter.",
},
},
create(context) {
const [config] = context.options;
const skipProperties = !config.properties;
const newIsCapExceptions = config.newIsCapExceptions.reduce(invert, {});
const newIsCapExceptionPattern = config.newIsCapExceptionPattern
? new RegExp(config.newIsCapExceptionPattern, "u")
: null;
const capIsNewExceptions = calculateCapIsNewExceptions(config);
const capIsNewExceptionPattern = config.capIsNewExceptionPattern
? new RegExp(config.capIsNewExceptionPattern, "u")
: null;
const listeners = {};
const sourceCode = context.sourceCode;
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
/**
* Get exact callee name from expression
* @param {ASTNode} node CallExpression or NewExpression node
* @returns {string} name
*/
function extractNameFromExpression(node) {
return node.callee.type === "Identifier"
? node.callee.name
: astUtils.getStaticPropertyName(node.callee) || "";
}
/**
* Returns the capitalization state of the string -
* Whether the first character is uppercase, lowercase, or non-alphabetic
* @param {string} str String
* @returns {string} capitalization state: "non-alpha", "lower", or "upper"
*/
function getCap(str) {
const firstChar = str.charAt(0);
const firstCharLower = firstChar.toLowerCase();
const firstCharUpper = firstChar.toUpperCase();
if (firstCharLower === firstCharUpper) {
// char has no uppercase variant, so it's non-alphabetic
return "non-alpha";
}
if (firstChar === firstCharLower) {
return "lower";
}
return "upper";
}
/**
* Check if capitalization is allowed for a CallExpression
* @param {Object} allowedMap Object mapping calleeName to a Boolean
* @param {ASTNode} node CallExpression node
* @param {string} calleeName Capitalized callee name from a CallExpression
* @param {Object} pattern RegExp object from options pattern
* @returns {boolean} Returns true if the callee may be capitalized
*/
function isCapAllowed(allowedMap, node, calleeName, pattern) {
const sourceText = sourceCode.getText(node.callee);
if (allowedMap[calleeName] || allowedMap[sourceText]) {
return true;
}
if (pattern && pattern.test(sourceText)) {
return true;
}
const callee = astUtils.skipChainExpression(node.callee);
if (calleeName === "UTC" && callee.type === "MemberExpression") {
// allow if callee is Date.UTC
return (
callee.object.type === "Identifier" &&
callee.object.name === "Date"
);
}
return skipProperties && callee.type === "MemberExpression";
}
/**
* Reports the given messageId for the given node. The location will be the start of the property or the callee.
* @param {ASTNode} node CallExpression or NewExpression node.
* @param {string} messageId The messageId to report.
* @returns {void}
*/
function report(node, messageId) {
let callee = astUtils.skipChainExpression(node.callee);
if (callee.type === "MemberExpression") {
callee = callee.property;
}
context.report({ node, loc: callee.loc, messageId });
}
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
if (config.newIsCap) {
listeners.NewExpression = function (node) {
const constructorName = extractNameFromExpression(node);
if (constructorName) {
const capitalization = getCap(constructorName);
const isAllowed =
capitalization !== "lower" ||
isCapAllowed(
newIsCapExceptions,
node,
constructorName,
newIsCapExceptionPattern,
);
if (!isAllowed) {
report(node, "lower");
}
}
};
}
if (config.capIsNew) {
listeners.CallExpression = function (node) {
const calleeName = extractNameFromExpression(node);
if (calleeName) {
const capitalization = getCap(calleeName);
const isAllowed =
capitalization !== "upper" ||
isCapAllowed(
capIsNewExceptions,
node,
calleeName,
capIsNewExceptionPattern,
);
if (!isAllowed) {
report(node, "upper");
}
}
};
}
return listeners;
},
};
@@ -0,0 +1,92 @@
'use strict'
const u = require('universalify').fromPromise
const path = require('path')
const fs = require('../fs')
const { mkdirs, mkdirsSync } = require('../mkdirs')
const { symlinkPaths, symlinkPathsSync } = require('./symlink-paths')
const { symlinkType, symlinkTypeSync } = require('./symlink-type')
const { pathExists } = require('../path-exists')
const { areIdentical } = require('../util/stat')
async function createSymlink (srcpath, dstpath, type) {
let stats
try {
stats = await fs.lstat(dstpath)
} catch { }
if (stats && stats.isSymbolicLink()) {
// When srcpath is relative, resolve it relative to dstpath's directory
// (standard symlink behavior) or fall back to cwd if that doesn't exist
let srcStat
if (path.isAbsolute(srcpath)) {
srcStat = await fs.stat(srcpath)
} else {
const dstdir = path.dirname(dstpath)
const relativeToDst = path.join(dstdir, srcpath)
try {
srcStat = await fs.stat(relativeToDst)
} catch {
srcStat = await fs.stat(srcpath)
}
}
const dstStat = await fs.stat(dstpath)
if (areIdentical(srcStat, dstStat)) return
}
const relative = await symlinkPaths(srcpath, dstpath)
srcpath = relative.toDst
const toType = await symlinkType(relative.toCwd, type)
const dir = path.dirname(dstpath)
if (!(await pathExists(dir))) {
await mkdirs(dir)
}
return fs.symlink(srcpath, dstpath, toType)
}
function createSymlinkSync (srcpath, dstpath, type) {
let stats
try {
stats = fs.lstatSync(dstpath)
} catch { }
if (stats && stats.isSymbolicLink()) {
// When srcpath is relative, resolve it relative to dstpath's directory
// (standard symlink behavior) or fall back to cwd if that doesn't exist
let srcStat
if (path.isAbsolute(srcpath)) {
srcStat = fs.statSync(srcpath)
} else {
const dstdir = path.dirname(dstpath)
const relativeToDst = path.join(dstdir, srcpath)
try {
srcStat = fs.statSync(relativeToDst)
} catch {
srcStat = fs.statSync(srcpath)
}
}
const dstStat = fs.statSync(dstpath)
if (areIdentical(srcStat, dstStat)) return
}
const relative = symlinkPathsSync(srcpath, dstpath)
srcpath = relative.toDst
type = symlinkTypeSync(relative.toCwd, type)
const dir = path.dirname(dstpath)
const exists = fs.existsSync(dir)
if (exists) return fs.symlinkSync(srcpath, dstpath, type)
mkdirsSync(dir)
return fs.symlinkSync(srcpath, dstpath, type)
}
module.exports = {
createSymlink: u(createSymlink),
createSymlinkSync
}
@@ -0,0 +1,56 @@
import { motionValue } from '../../value/index.mjs';
import { isMotionValue } from '../../value/utils/is-motion-value.mjs';
/**
* Updates motion values from props changes.
* Uses `any` type for element to avoid circular dependencies with VisualElement.
*/
function updateMotionValuesFromProps(element, next, prev) {
for (const key in next) {
const nextValue = next[key];
const prevValue = prev[key];
if (isMotionValue(nextValue)) {
/**
* If this is a motion value found in props or style, we want to add it
* to our visual element's motion value map.
*/
element.addValue(key, nextValue);
}
else if (isMotionValue(prevValue)) {
/**
* If we're swapping from a motion value to a static value,
* create a new motion value from that
*/
element.addValue(key, motionValue(nextValue, { owner: element }));
}
else if (prevValue !== nextValue) {
/**
* If this is a flat value that has changed, update the motion value
* or create one if it doesn't exist. We only want to do this if we're
* not handling the value with our animation state.
*/
if (element.hasValue(key)) {
const existingValue = element.getValue(key);
if (existingValue.liveStyle === true) {
existingValue.jump(nextValue);
}
else if (!existingValue.hasAnimated) {
existingValue.set(nextValue);
}
}
else {
const latestValue = element.getStaticValue(key);
element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));
}
}
}
// Handle removed values
for (const key in prev) {
if (next[key] === undefined)
element.removeValue(key);
}
return next;
}
export { updateMotionValuesFromProps };
//# sourceMappingURL=motion-values.mjs.map
@@ -0,0 +1,3 @@
import { RegExpRouter } from "./router.js";
import { PreparedRegExpRouter, buildInitParams, serializeInitParams } from "./prepared-router.js";
export { PreparedRegExpRouter, RegExpRouter, buildInitParams, serializeInitParams };
@@ -0,0 +1,22 @@
Copyright JS Foundation and other contributors, https://js.foundation
Copyright (C) 2012-2013 Yusuke Suzuki (twitter: @Constellation) and other contributors.
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.
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 <COPYRIGHT HOLDER> 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 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_ZE","2":"_5B"},C:{"1":"_H _ZR","2":"_zC _5E _L"},D:{"1":"_sO","2":"_AR"},E:{"1":"_KF","2":"_3C","130":"C ZC"},F:{"1":"_cO","2":"_cR"},G:{"1":"_NC","2":"_0C"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_sF","2":"_4F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","2":"LE"}},B:1,C:"AbortController & AbortSignal",D:true};
@@ -0,0 +1,221 @@
var t = require('tap')
var fs = require('fs')
var path = require('path')
var fixture = path.resolve(__dirname, 'fixtures')
var meow = fixture + '/meow.cat'
var mine = fixture + '/mine.cat'
var ours = fixture + '/ours.cat'
var fail = fixture + '/fail.false'
var noent = fixture + '/enoent.exe'
var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
var isWindows = process.platform === 'win32'
var hasAccess = typeof fs.access === 'function'
var winSkip = isWindows && 'windows'
var accessSkip = !hasAccess && 'no fs.access function'
var hasPromise = typeof Promise === 'function'
var promiseSkip = !hasPromise && 'no global Promise'
function reset () {
delete require.cache[require.resolve('../')]
return require('../')
}
t.test('setup fixtures', function (t) {
rimraf.sync(fixture)
mkdirp.sync(fixture)
fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n')
fs.chmodSync(meow, parseInt('0755', 8))
fs.writeFileSync(fail, '#!/usr/bin/env false\n')
fs.chmodSync(fail, parseInt('0644', 8))
fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n')
fs.chmodSync(mine, parseInt('0744', 8))
fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n')
fs.chmodSync(ours, parseInt('0754', 8))
t.end()
})
t.test('promise', { skip: promiseSkip }, function (t) {
var isexe = reset()
t.test('meow async', function (t) {
isexe(meow).then(function (is) {
t.ok(is)
t.end()
})
})
t.test('fail async', function (t) {
isexe(fail).then(function (is) {
t.notOk(is)
t.end()
})
})
t.test('noent async', function (t) {
isexe(noent).catch(function (er) {
t.ok(er)
t.end()
})
})
t.test('noent ignore async', function (t) {
isexe(noent, { ignoreErrors: true }).then(function (is) {
t.notOk(is)
t.end()
})
})
t.end()
})
t.test('no promise', function (t) {
global.Promise = null
var isexe = reset()
t.throws('try to meow a promise', function () {
isexe(meow)
})
t.end()
})
t.test('access', { skip: accessSkip || winSkip }, function (t) {
runTest(t)
})
t.test('mode', { skip: winSkip }, function (t) {
delete fs.access
delete fs.accessSync
var isexe = reset()
t.ok(isexe.sync(ours, { uid: 0, gid: 0 }))
t.ok(isexe.sync(mine, { uid: 0, gid: 0 }))
runTest(t)
})
t.test('windows', function (t) {
global.TESTING_WINDOWS = true
var pathExt = '.EXE;.CAT;.CMD;.COM'
t.test('pathExt option', function (t) {
runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' })
})
t.test('pathExt env', function (t) {
process.env.PATHEXT = pathExt
runTest(t)
})
t.test('no pathExt', function (t) {
// with a pathExt of '', any filename is fine.
// so the "fail" one would still pass.
runTest(t, { pathExt: '', skipFail: true })
})
t.test('pathext with empty entry', function (t) {
// with a pathExt of '', any filename is fine.
// so the "fail" one would still pass.
runTest(t, { pathExt: ';' + pathExt, skipFail: true })
})
t.end()
})
t.test('cleanup', function (t) {
rimraf.sync(fixture)
t.end()
})
function runTest (t, options) {
var isexe = reset()
var optionsIgnore = Object.create(options || {})
optionsIgnore.ignoreErrors = true
if (!options || !options.skipFail) {
t.notOk(isexe.sync(fail, options))
}
t.notOk(isexe.sync(noent, optionsIgnore))
if (!options) {
t.ok(isexe.sync(meow))
} else {
t.ok(isexe.sync(meow, options))
}
t.ok(isexe.sync(mine, options))
t.ok(isexe.sync(ours, options))
t.throws(function () {
isexe.sync(noent, options)
})
t.test('meow async', function (t) {
if (!options) {
isexe(meow, function (er, is) {
if (er) {
throw er
}
t.ok(is)
t.end()
})
} else {
isexe(meow, options, function (er, is) {
if (er) {
throw er
}
t.ok(is)
t.end()
})
}
})
t.test('mine async', function (t) {
isexe(mine, options, function (er, is) {
if (er) {
throw er
}
t.ok(is)
t.end()
})
})
t.test('ours async', function (t) {
isexe(ours, options, function (er, is) {
if (er) {
throw er
}
t.ok(is)
t.end()
})
})
if (!options || !options.skipFail) {
t.test('fail async', function (t) {
isexe(fail, options, function (er, is) {
if (er) {
throw er
}
t.notOk(is)
t.end()
})
})
}
t.test('noent async', function (t) {
isexe(noent, options, function (er, is) {
t.ok(er)
t.notOk(is)
t.end()
})
})
t.test('noent ignore async', function (t) {
isexe(noent, optionsIgnore, function (er, is) {
if (er) {
throw er
}
t.notOk(is)
t.end()
})
})
t.test('directory is not executable', function (t) {
isexe(__dirname, options, function (er, is) {
if (er) {
throw er
}
t.notOk(is)
t.end()
})
})
t.end()
}
@@ -0,0 +1,5 @@
/**
* Removes everything after the last "/", but leaves the slash.
*/
export = function stripFilename(path: string | undefined | null): string;
//# sourceMappingURL=strip-filename.d.ts.map
@@ -0,0 +1,11 @@
import { ReadableStream } from 'node:stream/web';
import { Readable } from 'node:stream';
import { AnyRouter } from '../router.js';
export declare function transformReadableStreamWithRouter(router: AnyRouter, routerStream: ReadableStream): ReadableStream<any>;
export declare function transformPipeableStreamWithRouter(router: AnyRouter, routerStream: Readable): Readable;
export declare function transformStreamWithRouter(router: AnyRouter, appStream: ReadableStream, opts?: {
/** Timeout for serialization to complete after app render finishes (default: 60000ms) */
timeoutMs?: number;
/** Maximum lifetime of the stream transform (default: 60000ms). Safety net for cleanup. */
lifetimeMs?: number;
}): ReadableStream<any>;
@@ -0,0 +1 @@
{"version":3,"file":"panels-top-bottom.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,15 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ChevronDown = createLucideIcon("ChevronDown", [
["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
]);
export { ChevronDown as default };
//# sourceMappingURL=chevron-down.js.map
@@ -0,0 +1 @@
{"version":3,"file":"feedback.cjs","sources":["../../../src/matcher/wordSequence/feedback.ts"],"sourcesContent":[null],"names":["options","match","pattern","warning","suggestions","wordCount","translations","warnings","sequences","ascending","push","anotherWord","useWords"],"mappings":";;AAGA,0BAAe,CAACA,OAAgB,EAAEC,KAAqB,KAAI;AACzD,EAAA,IAAIA,KAAK,CAACC,OAAO,KAAK,cAAc,EAAE;AACpC,IAAA,OAAO,IAAI;AACb,EAAA;EAEA,IAAIC,OAAO,GAAG,IAAI;EAClB,MAAMC,WAAW,GAAa,EAAE;AAEhC;AACA,EAAA,IAAIH,KAAK,CAACI,SAAS,IAAI,CAAC,EAAE;AACxBF,IAAAA,OAAO,GAAGH,OAAO,CAACM,YAAY,CAACC,QAAQ,CAACC,SAAS;AACnD,EAAA;AAEA;EACA,IAAIP,KAAK,CAACQ,SAAS,EAAE;IACnBL,WAAW,CAACM,IAAI,CAACV,OAAO,CAACM,YAAY,CAACF,WAAW,CAACI,SAAS,CAAC;AAC9D,EAAA,CAAC,MAAM;IACLJ,WAAW,CAACM,IAAI,CAACV,OAAO,CAACM,YAAY,CAACF,WAAW,CAACO,WAAW,CAAC;AAChE,EAAA;AAEA,EAAA,IAAIV,KAAK,CAACI,SAAS,GAAG,CAAC,EAAE;IACvBD,WAAW,CAACM,IAAI,CAACV,OAAO,CAACM,YAAY,CAACF,WAAW,CAACQ,QAAQ,CAAC;AAC7D,EAAA;EAEA,OAAO;IACLT,OAAO;AACPC,IAAAA;GACD;AACH,CAAC;;;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_path","data","require","_debug","_options","_patternToRegex","_printer","_rewriteStackTrace","_configError","_index","_caching","_configDescriptors","debug","buildDebug","buildPresetChain","arg","context","chain","buildPresetChainWalker","plugins","dedupDescriptors","presets","options","map","o","createConfigChainOptions","files","Set","exports","makeChainWalker","root","preset","loadPresetDescriptors","env","envName","loadPresetEnvDescriptors","overrides","index","loadPresetOverridesDescriptors","overridesEnv","loadPresetOverridesEnvDescriptors","createLogger","makeWeakCacheSync","buildRootDescriptors","alias","createUncachedDescriptors","makeStrongCacheSync","buildEnvDescriptors","buildOverrideDescriptors","buildOverrideEnvDescriptors","buildRootChain","opts","configReport","babelRcReport","programmaticLogger","ConfigPrinter","programmaticChain","loadProgrammaticChain","dirname","cwd","undefined","programmaticReport","output","configFile","loadConfig","caller","findRootConfig","babelrc","babelrcRoots","babelrcRootsDirectory","configFileChain","emptyChain","configFileLogger","validatedFile","validateConfigFile","result","loadFileChain","mergeChain","ignoreFile","babelrcFile","isIgnored","fileChain","filename","pkgData","findPackageData","babelrcLoadEnabled","ignore","config","findRelativeConfig","add","filepath","shouldIgnore","validateBabelrcFile","babelrcLogger","showConfig","console","log","filter","x","join","fileHandling","absoluteRoot","directories","includes","babelrcPatterns","Array","isArray","pat","path","resolve","length","some","pathPatternToRegex","directory","matchPattern","file","validate","validateExtendFile","input","createCachedDescriptors","baseLogger","buildProgrammaticLogger","loadFileChainWalker","loadFileDescriptors","loadFileEnvDescriptors","loadFileOverridesDescriptors","loadFileOverridesEnvDescriptors","buildFileLogger","configure","ChainFormatter","Config","descriptors","_","_context$caller","Programmatic","callerName","name","_options$env","_options$overrides","Error","_options$overrides2","_override$env","override","chainWalker","flattenedConfigs","rootOpts","configIsApplicable","push","envOpts","forEach","overrideOps","overrideEnvOpts","only","logger","mergeExtendsChain","mergeChainOpts","extends","has","from","delete","target","source","Object","assign","passPerPreset","test","include","exclude","hasOwnProperty","call","sourceMaps","sourceMap","items","Map","item","value","fnKey","nameMap","get","set","desc","ownPass","reduce","acc","configName","configFieldIsApplicable","patterns","matchesPatterns","ignoreListReplacer","_key","RegExp","String","_context$filename","message","JSON","stringify","_context$filename2","pattern","pathToTest","endHiddenCallStack","ConfigError"],"sources":["../../src/config/config-chain.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-use-before-define */\n\nimport path from \"node:path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { validate } from \"./validation/options.ts\";\nimport type {\n ConfigApplicableTest,\n BabelrcSearch,\n CallerMetadata,\n MatchItem,\n InputOptions,\n ConfigChainOptions,\n} from \"./validation/options.ts\";\nimport pathPatternToRegex from \"./pattern-to-regex.ts\";\nimport { ConfigPrinter, ChainFormatter } from \"./printer.ts\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\n\nimport { endHiddenCallStack } from \"../errors/rewrite-stack-trace.ts\";\nimport ConfigError from \"../errors/config-error.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\nconst debug = buildDebug(\"babel:config:config-chain\");\n\nimport {\n findPackageData,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n} from \"./files/index.ts\";\nimport type { ConfigFile, IgnoreFile, FilePackageData } from \"./files/index.ts\";\n\nimport { makeWeakCacheSync, makeStrongCacheSync } from \"./caching.ts\";\n\nimport {\n createCachedDescriptors,\n createUncachedDescriptors,\n} from \"./config-descriptors.ts\";\nimport type {\n UnloadedDescriptor,\n OptionsAndDescriptors,\n ValidatedFile,\n} from \"./config-descriptors.ts\";\n\nexport type ConfigChain = {\n plugins: UnloadedDescriptor<PluginAPI>[];\n presets: UnloadedDescriptor<PresetAPI>[];\n options: ConfigChainOptions[];\n files: Set<string>;\n};\n\nexport type PresetInstance = {\n options: InputOptions;\n alias: string;\n dirname: string;\n externalDependencies: ReadonlyDeepArray<string>;\n};\n\nexport type ConfigContext = {\n filename: string | undefined;\n cwd: string;\n root: string;\n envName: string;\n caller: CallerMetadata | undefined;\n showConfig: boolean;\n};\n\n/**\n * Build a config chain for a given preset.\n */\nexport function* buildPresetChain(\n arg: PresetInstance,\n context: any,\n): Handler<ConfigChain | null> {\n const chain = yield* buildPresetChainWalker(arg, context);\n if (!chain) return null;\n\n return {\n Line truncated
@@ -0,0 +1,375 @@
# Cache Store
<!--introduced_in=v7.0.0-->
<!--type=module-->
<!-- source_link=lib/cache/memory-cache-store.js -->
> Stability: 2 - Stable
A cache store is the storage backend used by the cache interceptor to persist
and retrieve cached responses. A store decides which stored response to serve
for a request by comparing the request against the response's `Vary` header, and
is expected to be compliant with [RFC&nbsp;9111][].
undici ships two stores. `MemoryCacheStore` keeps responses in memory, while
`SqliteCacheStore` persists them to a SQLite database. Both are available under
the `cacheStores` export:
```mjs
import { cacheStores } from 'undici'
const { MemoryCacheStore, SqliteCacheStore } = cacheStores
```
`SqliteCacheStore` requires the [`node:sqlite`][] API. The class is always
exported, but constructing one throws if `node:sqlite` is not available in the
running Node.js version.
A cache store implements three methods — `get(key)`, `createWriteStream(key,
value)`, and `delete(key)` — that operate on a [`CacheKey`](#cachekey) and a
[`CacheValue`](#cachevalue). Any object implementing this contract can be passed
to the cache interceptor, so custom stores (for example, backed by Redis or a
remote service) are supported as well.
## Class: `MemoryCacheStore`
<!-- YAML
added: v7.0.0
-->
* Extends: {EventEmitter}
Stores cached responses in memory. The store enforces upper bounds on the total
number of responses, the total size of all responses, and the size of any single
response. When a limit is exceeded, the store evicts approximately half of its
entries, least recently used first, and emits a
[`'maxSizeExceeded'`](#event-maxsizeexceeded) event.
```mjs
import { interceptors, cacheStores, Agent, setGlobalDispatcher } from 'undici'
const store = new cacheStores.MemoryCacheStore({ maxSize: 50 * 1024 * 1024 })
setGlobalDispatcher(
new Agent().compose(interceptors.cache({ store }))
)
```
### `new MemoryCacheStore([options])`
<!-- YAML
added: v7.0.0
-->
* `options` {Object} (optional)
* `maxCount` {number} The maximum number of responses to store. **Default:**
`1024`.
* `maxSize` {number} The maximum total size, in bytes, of all stored
responses. **Default:** `104857600` (100 MiB).
* `maxEntrySize` {number} The maximum size, in bytes, of a single response
body. Responses whose body exceeds this value are not cached. **Default:**
`5242880` (5 MiB).
* `errorCallback` {Function} A callback invoked with any error raised by the
store. (optional)
* `err` {Error}
Each of `maxCount`, `maxSize`, and `maxEntrySize` must be a non-negative
integer; a `TypeError` is thrown otherwise.
### `memoryCacheStore.size`
<!-- YAML
added: v7.0.0
-->
* Type: {number}
The current total size, in bytes, of all stored response bodies.
### `memoryCacheStore.isFull()`
<!-- YAML
added: v7.0.0
-->
* Returns: {boolean} `true` when the store has reached its `maxSize` or
`maxCount` limit, `false` otherwise.
### `memoryCacheStore.get(key)`
<!-- YAML
added: v7.0.0
-->
* `key` {CacheKey} The request to look up. See [`CacheKey`](#cachekey).
* Returns: {GetResult|undefined} The matching cached response, or `undefined`
when there is no fresh entry for `key`. See [`GetResult`](#getresult).
Looks up a cached response for `key`. A stored entry matches only when its
`method` equals `key.method`, its `deleteAt` time is in the future, and every
header listed in its `vary` map matches the corresponding header in
`key.headers`.
### `memoryCacheStore.createWriteStream(key, value)`
<!-- YAML
added: v7.0.0
-->
* `key` {CacheKey} The request the response is being cached for. See
[`CacheKey`](#cachekey).
* `value` {CacheValue} The response metadata to store. See
[`CacheValue`](#cachevalue).
* Returns: {Writable|undefined} A writable stream that the response body is
written to, or `undefined` when the response cannot be cached.
Returns a {Writable} stream used to write the response body into the store. When
the stream finishes, the entry is committed; if its accumulated size exceeds
`maxEntrySize`, the stream is destroyed and nothing is stored. Writing a new
entry whose `key` matches an existing one replaces that entry.
### `memoryCacheStore.delete(key)`
<!-- YAML
added: v7.0.0
-->
* `key` {CacheKey} The request whose cached responses should be removed. See
[`CacheKey`](#cachekey).
* Returns: {undefined}
Removes every cached response stored for `key.origin` and `key.path`. Throws a
`TypeError` if `key` is not an object.
### Event: `'maxSizeExceeded'`
<!-- YAML
added: v7.10.0
-->
* `data` {Object}
* `size` {number} The current total size, in bytes, of all stored responses.
* `maxSize` {number} The configured `maxSize` limit.
* `count` {number} The current number of stored responses.
* `maxCount` {number} The configured `maxCount` limit.
Emitted when the store exceeds its `maxSize` or `maxCount` limit, immediately
before entries are evicted. The event fires only once per overflow; it is not
emitted again until the store drops back below both limits.
## Class: `SqliteCacheStore`
<!-- YAML
added: v7.0.0
-->
Stores cached responses in a SQLite database using the [`node:sqlite`][] API.
The constructor throws when [`node:sqlite`][] is not available. Response bodies
larger than `compressThreshold` are stored compressed with zstd and
decompressed when read back, saving database space.
```mjs
import { interceptors, cacheStores, Agent, setGlobalDispatcher } from 'undici'
const store = new cacheStores.SqliteCacheStore({ location: './cache.db' })
setGlobalDispatcher(
new Agent().compose(interceptors.cache({ store }))
)
```
### `new SqliteCacheStore([options])`
<!-- YAML
added: v7.0.0
-->
* `options` {Object} (optional)
* `location` {string} The location of the SQLite database. Use `':memory:'`
for an in-memory database. **Default:** `':memory:'`.
* `maxCount` {number} The maximum number of responses to store. **Default:**
`Infinity`.
* `maxEntrySize` {number} The maximum size, in bytes, of a single response
body. Responses whose body exceeds this value are not cached. Must not
exceed `2000000000` (2 GB). **Default:** `2000000000` (2 GB).
* `compressThreshold` {number} The size, in bytes, above which a response
body is stored compressed with zstd. Responses with an easily compressible
Content-Type (e.g. json, xml, plain text) are compressed regardless of
size. Requires a Node version with zstd
support (22.19+); when unavailable, bodies are stored uncompressed.
**Default:** `1048576` (1 MiB).
`maxCount`, `maxEntrySize`, and `compressThreshold` must be non-negative
integers; a `TypeError` is thrown otherwise, or if `maxEntrySize` is greater
than 2 GB.
### `sqliteCacheStore.close()`
<!-- YAML
added: v7.0.0
-->
* Returns: {undefined}
Closes the connection to the underlying SQLite database.
### `sqliteCacheStore.size`
<!-- YAML
added: v7.0.0
-->
* Type: {number}
The number of responses currently stored in the database.
### `sqliteCacheStore.get(key)`
<!-- YAML
added: v7.0.0
-->
* `key` {CacheKey} The request to look up. See [`CacheKey`](#cachekey).
* Returns: {GetResult|undefined} The matching cached response, or `undefined`
when there is no fresh entry for `key`. The returned `body` is a {Buffer}.
See [`GetResult`](#getresult).
Looks up a cached response for `key`, comparing the request method and every
header named in the stored `vary` map. A body that was stored compressed is
decompressed before being returned.
### `sqliteCacheStore.set(key, value)`
<!-- YAML
added: v7.0.0
-->
* `key` {CacheKey} The request the response is being cached for. See
[`CacheKey`](#cachekey).
* `value` {CacheValue} The response to store, with its `body` set to a {Buffer},
an {Array} of {Buffer}, or `null`. See [`CacheValue`](#cachevalue).
* Returns: {undefined}
Writes a response into the database directly, without going through a stream. If
the body exceeds `maxEntrySize`, nothing is stored. A body larger than
`compressThreshold`, or with an easily compressible Content-Type (e.g. json,
xml, plain text), is compressed with zstd before being written. When an entry
already exists for `key` it is overwritten; otherwise a new row is inserted and
old entries are pruned to honour `maxCount`. This method is used internally by
[`sqliteCacheStore.createWriteStream()`](#sqlitecachestorecreatewritestreamkey-value).
### `sqliteCacheStore.createWriteStream(key, value)`
<!-- YAML
added: v7.0.0
-->
* `key` {CacheKey} The request the response is being cached for. See
[`CacheKey`](#cachekey).
* `value` {CacheValue} The response metadata to store. See
[`CacheValue`](#cachevalue).
* Returns: {Writable|undefined} A writable stream that the response body is
written to, or `undefined` when the response cannot be cached.
Returns a {Writable} stream used to write the response body into the store. When
the stream finishes, the buffered body is committed via
[`sqliteCacheStore.set()`](#sqlitecachestoresetkey-value), where bodies larger
than `compressThreshold` or with an easily compressible Content-Type are
compressed with zstd. If the body exceeds
`maxEntrySize`, the stream is destroyed and nothing is stored.
### `sqliteCacheStore.delete(key)`
<!-- YAML
added: v7.0.0
-->
* `key` {CacheKey} The request whose cached responses should be removed. See
[`CacheKey`](#cachekey).
* Returns: {undefined}
Removes every cached response stored for the URL derived from `key.origin` and
`key.path`. Throws a `TypeError` if `key` is not an object.
## Implementing a custom cache store
A cache store is any object that implements the `CacheStore` interface:
* `get(key)` — Look up a response. Returns a [`GetResult`](#getresult),
`undefined`, or a {Promise} resolving to either.
* `createWriteStream(key, value)` — Return a {Writable} to receive the response
body, or `undefined` if the response cannot be stored.
* `delete(key)` — Remove all responses for `key`. May return a {Promise}.
Returning a {Promise} from `get` or `delete` lets a store be backed by an
asynchronous resource; the cache interceptor awaits these values, including on
the revalidation and stale-while-revalidate paths.
### `CacheKey`
The request a response is being looked up or stored for.
* `origin` {string} The request origin.
* `method` {string} The request method.
* `path` {string} The request path.
* `headers` {Record<string, string|string[]>} The request headers, used to
satisfy `Vary`. (optional)
### `CacheValue`
The metadata of a cached response, excluding its body.
* `statusCode` {number} The response's HTTP status code.
* `statusMessage` {string} The response's HTTP status message.
* `headers` {Record<string, string|string[]>} The response headers.
* `vary` {Record<string, string|string[]|null>} The header names listed in the
response's `Vary` header mapped to the values they had in the original
request. A value is `null` when that header was absent from the original
request. (optional)
* `etag` {string} The response's entity tag. (optional)
* `cacheControlDirectives` {Object} The parsed `Cache-Control` directives of the
response. (optional)
* `cachedAt` {number} The time, in milliseconds, at which the response was
cached.
* `staleAt` {number} The time, in milliseconds, at which the response becomes
stale.
* `deleteAt` {number} The time, in milliseconds, at which the response must be
evicted. A store must not return a response once this time has passed.
The `vary` map drives response selection. For a response such as:
```http
Vary: content-encoding, accept
content-encoding: utf8
accept: application/json
```
the recorded map is:
```js
{
'content-encoding': 'utf8',
accept: 'application/json'
}
```
If the original request did not include the `accept` header, its value is
recorded as `null`:
```js
{
'content-encoding': 'utf8',
accept: null
}
```
### `GetResult`
The value returned by `get`. It contains every field of
[`CacheValue`](#cachevalue) plus the response body.
* `body` {Readable|Iterable|AsyncIterable|Buffer|string} The cached response
body. (optional)
[RFC&nbsp;9111]: https://www.rfc-editor.org/rfc/rfc9111.html
[`node:sqlite`]: https://nodejs.org/api/sqlite.html
@@ -0,0 +1,26 @@
import { ZodFirstPartyTypeKind } from "zod/v3";
import { setResponseValueAndErrors } from "../errorMessages.js";
import { parseDef } from "../parseDef.js";
export function parseArrayDef(def, refs) {
const res = {
type: "array",
};
if (def.type?._def &&
def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) {
res.items = parseDef(def.type._def, {
...refs,
currentPath: [...refs.currentPath, "items"],
});
}
if (def.minLength) {
setResponseValueAndErrors(res, "minItems", def.minLength.value, def.minLength.message, refs);
}
if (def.maxLength) {
setResponseValueAndErrors(res, "maxItems", def.maxLength.value, def.maxLength.message, refs);
}
if (def.exactLength) {
setResponseValueAndErrors(res, "minItems", def.exactLength.value, def.exactLength.message, refs);
setResponseValueAndErrors(res, "maxItems", def.exactLength.value, def.exactLength.message, refs);
}
return res;
}
@@ -0,0 +1,139 @@
import { useRouter } from "./useRouter.js";
import { useMatch } from "./useMatch.js";
import { useLoaderData } from "./useLoaderData.js";
import { useLoaderDeps } from "./useLoaderDeps.js";
import { useParams } from "./useParams.js";
import { useSearch } from "./useSearch.js";
import { useNavigate } from "./useNavigate.js";
import { useRouteContext } from "./useRouteContext.js";
import { createRoute } from "./route.js";
//#region src/fileRoute.ts
/**
* Creates a file-based Route factory for a given path.
*
* Used by TanStack Router's file-based routing to associate a file with a
* route. The returned function accepts standard route options. In normal usage
* the `path` string is inserted and maintained by the `tsr` generator.
*
* @param path File path literal for the route (usually auto-generated).
* @returns A function that accepts Route options and returns a Route instance.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createFileRouteFunction
*/
function createFileRoute(path) {
return new FileRoute(path, { silent: true }).createRoute;
}
/**
@deprecated It's no longer recommended to use the `FileRoute` class directly.
Instead, use `createFileRoute('/path/to/file')(options)` to create a file route.
*/
var FileRoute = class {
constructor(path, _opts) {
this.path = path;
this.createRoute = (options) => {
if (process.env.NODE_ENV !== "production") {
if (!this.silent) console.warn("Warning: FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.");
}
const route = createRoute(options);
route.isRoot = false;
return route;
};
this.silent = _opts?.silent;
}
};
/**
@deprecated It's recommended not to split loaders into separate files.
Instead, place the loader function in the main route file via `createFileRoute`.
*/
function FileRouteLoader(_path) {
if (process.env.NODE_ENV !== "production") console.warn(`Warning: FileRouteLoader is deprecated and will be removed in the next major version. Please place the loader function in the main route file, inside the \`createFileRoute('/path/to/file')(options)\` options`);
return (loaderFn) => loaderFn;
}
var LazyRoute = class {
constructor(opts) {
this.useMatch = (opts) => {
return useMatch({
select: opts?.select,
from: this.options.id,
structuralSharing: opts?.structuralSharing
});
};
this.useRouteContext = (opts) => {
return useRouteContext({
...opts,
from: this.options.id
});
};
this.useSearch = (opts) => {
return useSearch({
select: opts?.select,
structuralSharing: opts?.structuralSharing,
from: this.options.id
});
};
this.useParams = (opts) => {
return useParams({
select: opts?.select,
structuralSharing: opts?.structuralSharing,
from: this.options.id
});
};
this.useLoaderDeps = (opts) => {
return useLoaderDeps({
...opts,
from: this.options.id
});
};
this.useLoaderData = (opts) => {
return useLoaderData({
...opts,
from: this.options.id
});
};
this.useNavigate = () => {
return useNavigate({ from: useRouter().routesById[this.options.id].fullPath });
};
this.options = opts;
}
};
/**
* Creates a lazily-configurable code-based route stub by ID.
*
* Use this for code-splitting with code-based routes. The returned function
* accepts only non-critical route options like `component`, `pendingComponent`,
* `errorComponent`, and `notFoundComponent` which are applied when the route
* is matched.
*
* @param id Route ID string literal to associate with the lazy route.
* @returns A function that accepts lazy route options and returns a `LazyRoute`.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createLazyRouteFunction
*/
function createLazyRoute(id) {
return (opts) => {
return new LazyRoute({
id,
...opts
});
};
}
/**
* Creates a lazily-configurable file-based route stub by file path.
*
* Use this for code-splitting with file-based routes (eg. `.lazy.tsx` files).
* The returned function accepts only non-critical route options like
* `component`, `pendingComponent`, `errorComponent`, and `notFoundComponent`.
*
* @param id File path literal for the route file.
* @returns A function that accepts lazy route options and returns a `LazyRoute`.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createLazyFileRouteFunction
*/
function createLazyFileRoute(id) {
if (typeof id === "object") return new LazyRoute(id);
return (opts) => new LazyRoute({
id,
...opts
});
}
//#endregion
export { FileRoute, FileRouteLoader, LazyRoute, createFileRoute, createLazyFileRoute, createLazyRoute };
//# sourceMappingURL=fileRoute.js.map
@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.clsx=n()}(this,(function(){function e(n){var t,f,o="";if("string"==typeof n||"number"==typeof n)o+=n;else if("object"==typeof n)if(Array.isArray(n)){var r=n.length;for(t=0;t<r;t++)n[t]&&(f=e(n[t]))&&(o&&(o+=" "),o+=f)}else for(f in n)n[f]&&(o&&(o+=" "),o+=f);return o}function n(){for(var n,t,f=0,o="",r=arguments.length;f<r;f++)(n=arguments[f])&&(t=e(n))&&(o&&(o+=" "),o+=t);return o}return n.clsx=n,n}));
@@ -0,0 +1,37 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_utils_html = require("../utils/html.js");
const require_helper_html_index = require("../helper/html/index.js");
const require_jsx_utils = require("./utils.js");
const require_jsx_base = require("./base.js");
const require_jsx_jsx_dev_runtime = require("./jsx-dev-runtime.js");
//#region src/jsx/jsx-runtime.ts
const jsxAttr = (key, v) => {
if (!require_jsx_utils.isValidAttributeName(key)) return require_utils_html.raw("");
const buffer = [`${key}="`];
if (key === "style" && typeof v === "object") {
let styleStr = "";
require_jsx_utils.styleObjectForEach(v, (property, value) => {
if (value != null) styleStr += `${styleStr ? ";" : ""}${property}:${value}`;
});
require_utils_html.escapeToBuffer(styleStr, buffer);
buffer[0] += "\"";
} else if (typeof v === "string") {
require_utils_html.escapeToBuffer(v, buffer);
buffer[0] += "\"";
} else if (v === null || v === void 0) return require_utils_html.raw("");
else if (typeof v === "number" || v.isEscaped) buffer[0] += `${v}"`;
else if (v instanceof Promise) buffer.unshift("\"", v);
else {
require_utils_html.escapeToBuffer(v.toString(), buffer);
buffer[0] += "\"";
}
return buffer.length === 1 ? require_utils_html.raw(buffer[0]) : require_utils_html.stringBufferToString(buffer, void 0);
};
const jsxEscape = (value) => value;
//#endregion
exports.Fragment = require_jsx_base.Fragment;
exports.jsx = require_jsx_jsx_dev_runtime.jsxDEV;
exports.jsxAttr = jsxAttr;
exports.jsxEscape = jsxEscape;
exports.jsxTemplate = require_helper_html_index.html;
exports.jsxs = require_jsx_jsx_dev_runtime.jsxDEV;
@@ -0,0 +1,31 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed 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
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
interface String {
/**
* Replace all instances of a substring in a string, using a regular expression or search string.
* @param searchValue A string to search for.
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
*/
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
/**
* Replace all instances of a substring in a string, using a regular expression or search string.
* @param searchValue A string to search for.
* @param replacer A function that returns the replacement text.
*/
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
}
@@ -0,0 +1,17 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import * as ts from 'typescript';
export * from '@typescript-eslint/utils/ast-utils';
/**
* Get the `loc` object of a given name in a `/*globals` comment directive.
* @param sourceCode The source code to convert index to loc.
* @param comment The `/*globals` comment directive which include the name.
* @param name The name to find.
* @returns The `loc` object.
*/
export declare function getNameLocationInGlobalDirectiveComment(sourceCode: TSESLint.SourceCode, comment: TSESTree.Comment, name: string): TSESTree.SourceLocation;
export declare function forEachReturnStatement<T>(body: ts.Block, visitor: (stmt: ts.ReturnStatement) => T): T | undefined;
/**
* Rough equivalent to ts.forEachChild for ESTree nodes.
* It returns the first truthy value returned by the callback, if any.
*/
export declare function forEachChildESTree<Result>(node: TSESTree.Node, callback: (child: TSESTree.Node) => false | Result | null | undefined): Result | undefined;
@@ -0,0 +1,159 @@
import { describe, expect, test } from "vitest";
import * as z from "zod";
describe("z.input / z.output", () => {
test("flat codec: input/output give the right side", () => {
const c = z.codec(z.string(), z.bigint(), {
decode: (s) => BigInt(s),
encode: (n) => n.toString(),
});
expect(z.input(c).parse("1")).toBe("1");
expect(z.output(c).parse(1n)).toBe(1n);
});
test("codec nested in object: output works recursively (regression #5224)", () => {
const c = z.codec(z.string(), z.bigint(), {
decode: (s) => BigInt(s),
encode: (n) => n.toString(),
});
const obj = z.object({ b: c });
const decoded = z.output(obj);
expect(decoded.parse({ b: 1n })).toEqual({ b: 1n });
const encoded = z.input(obj);
expect(encoded.parse({ b: "1" })).toEqual({ b: "1" });
});
test("nested across record / map: matches the use case in #5224", () => {
const keyCodec = z.codec(z.string(), z.enum(["a", "b"]), {
decode: (s) => (s === "a" || s === "b" ? s : z.NEVER),
encode: (s) => s,
});
const valueObject = z.object({
n: z.codec(z.string(), z.bigint(), { decode: (s) => BigInt(s), encode: (n) => n.toString() }),
});
const fullCodec = z.codec(
z.record(z.input(keyCodec), z.input(valueObject)),
z.map(z.output(keyCodec), z.output(valueObject)),
{
decode: (input) => {
const m = new Map<"a" | "b", { n: bigint }>();
for (const [k, v] of Object.entries(input)) {
m.set(keyCodec.decode(k), valueObject.decode(v));
}
return m;
},
encode: (input) => {
const out: Record<string, { n: string }> = {};
for (const [k, v] of input.entries()) {
out[keyCodec.encode(k)] = valueObject.encode(v);
}
return out;
},
}
);
expect(fullCodec.decode({ a: { n: "1" } })).toEqual(new Map([["a", { n: 1n }]]));
expect(fullCodec.encode(new Map([["b", { n: 2n }]]))).toEqual({ b: { n: "2" } });
});
test("schema without pipes is returned with identity (no clone)", () => {
const s = z.object({ a: z.string() });
expect(z.input(s)).toBe(s);
expect(z.output(s)).toBe(s);
});
test("z.output carries checks attached to a pipe", () => {
const c = z
.codec(z.string(), z.number().int(), { decode: Number, encode: String })
.refine((n) => n > 10, { error: "gt10" });
const obj = z.object({ list: z.array(c) });
const decoded = z.output(obj);
expect(decoded.parse({ list: [50] })).toEqual({ list: [50] });
// The pipe's own check and the one already on its out side both survive, in that order.
expect(() => decoded.parse({ list: [5] })).toThrow("gt10");
expect(() => decoded.parse({ list: [50.5] })).toThrow();
// A pipe's checks run on the decoded value in both directions, so encode enforces them too.
expect(() => decoded.encode({ list: [5] })).toThrow("gt10");
// Carrying them clones the out side rather than mutating it.
expect(c._zod.def.out._zod.def.checks).toHaveLength(1);
});
test("z.input drops a pipe's checks, which constrain a value the input side never produces", () => {
const c = z.codec(z.string(), z.number(), { decode: Number, encode: String }).refine((n) => n > 10);
expect(z.input(c).parse("5")).toBe("5");
// Control: a check that isn't attached to a pipe is left alone.
expect(() => z.input(z.object({ s: z.string().min(2) })).parse({ s: "a" })).toThrow();
});
test("z.input resolves past a preprocess transform, which is not a real input side", () => {
const p = z.preprocess((v) => String(v), z.string().min(5));
const encoded = z.input(p);
expect(encoded.parse("abcde")).toBe("abcde");
// The bare transform used to come back here: it validated nothing and re-ran the preprocessor.
expect(() => encoded.parse(1)).toThrow();
expect(() => encoded.parse("abc")).toThrow();
// The same resolution the JSON Schema emitter already makes for this schema.
expect(z.toJSONSchema(p, { io: "input" })).toMatchObject({ type: "string", minLength: 5 });
// A check on the pipe itself travels with whichever side wins.
const checked = z.preprocess((v) => String(v), z.string()).refine((s) => s.startsWith("ok"));
expect(z.input(checked).parse("okay")).toBe("okay");
expect(() => z.input(checked).parse("nope")).toThrow();
// Control: a codec has two real sides, so its input side is still `in`, by identity.
const c = z.codec(z.string(), z.number(), { decode: Number, encode: String });
expect(z.input(c)).toBe(c._zod.def.in);
});
test("a wrapper's stored value survives only on the side it belongs to", () => {
const c = z.codec(z.string(), z.number(), { decode: Number, encode: String });
// A default and a catch hold output-side values, so the input projection sheds them.
expect(z.input(c.default(7)).parse(undefined)).toBe(undefined);
expect(z.input(c.default(7)).parse("1")).toBe("1");
expect(() => z.input(c.catch(9)).parse(123 as any)).toThrow();
expect(z.input(c.catch(9)).parse("1")).toBe("1");
expect(z.output(c.default(7)).parse(undefined)).toBe(7);
expect(z.output(c.catch(9)).parse("zz" as any)).toBe(9);
// A prefault is fed through the schema, so it is input-side and the output projection sheds it.
expect(z.input(c.prefault("5")).parse(undefined)).toBe("5");
expect(() => z.output(c.prefault("5")).parse(undefined as any)).toThrow();
expect(z.output(c.prefault("5")).parse(3)).toBe(3);
});
test("a wrapper over a pipe-free schema keeps both its value and its identity", () => {
const d = z.string().default("x");
const k = z.string().catch("y");
const f = z.string().prefault("z");
expect(z.input(d)).toBe(d);
expect(z.input(d).parse(undefined)).toBe("x");
expect(z.input(k)).toBe(k);
expect(z.output(f)).toBe(f);
const obj = z.object({ a: z.string().default("q") });
expect(z.input(obj)).toBe(obj);
expect(z.input(obj).parse({})).toEqual({ a: "q" });
});
test("runtime `z.input` agrees with type-level `z.input<T>`", () => {
const c = z.codec(z.string(), z.bigint(), {
decode: (s) => BigInt(s),
encode: (n) => n.toString(),
});
const obj = z.object({ b: c });
// Runtime: parse the input shape.
const parsed = z.input(obj).parse({ b: "1" });
// Type: matches the declared input type.
const asType: z.input<typeof obj> = parsed;
expect(asType).toEqual({ b: "1" });
});
});
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CloudLightning = createLucideIcon("CloudLightning", [
["path", { d: "M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973", key: "1cez44" }],
["path", { d: "m13 12-3 5h4l-3 5", key: "1t22er" }]
]);
export { CloudLightning as default };
//# sourceMappingURL=cloud-lightning.js.map
@@ -0,0 +1,52 @@
{
"name": "@standard-schema/spec",
"description": "A family of specs for interoperable TypeScript",
"version": "1.1.0",
"license": "MIT",
"author": "Colin McDonnell",
"homepage": "https://standardschema.dev",
"repository": {
"type": "git",
"url": "https://github.com/standard-schema/standard-schema"
},
"keywords": [
"typescript",
"schema",
"validation",
"standard",
"interface"
],
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"standard-schema-spec": "./src/index.ts",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
}
},
"sideEffects": false,
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"devDependencies": {
"tsup": "^8.3.0",
"typescript": "^5.6.2"
},
"scripts": {
"lint": "pnpm biome lint ./src",
"format": "pnpm biome format --write ./src",
"check": "pnpm biome check ./src",
"build": "tsup"
}
}
@@ -0,0 +1,164 @@
import type { Register } from './router'
import type {
AnyContext,
AnyPathParams,
AnyRoute,
FileBaseRouteOptions,
ResolveParams,
Route,
RouteConstraints,
UpdatableRouteOptions,
} from './route'
import type { AnyValidator } from './validators'
export interface FileRouteTypes {
fileRoutesByFullPath: any
fullPaths: any
to: any
fileRoutesByTo: any
id: any
fileRoutesById: any
}
export type InferFileRouteTypes<TRouteTree extends AnyRoute> =
unknown extends TRouteTree['types']['fileRouteTypes']
? never
: TRouteTree['types']['fileRouteTypes'] extends FileRouteTypes
? TRouteTree['types']['fileRouteTypes']
: never
export interface FileRoutesByPath {
// '/': {
// parentRoute: typeof rootRoute
// }
}
export interface FileRouteOptions<
TRegister,
TFilePath extends string,
TParentRoute extends AnyRoute,
TId extends RouteConstraints['TId'],
TPath extends RouteConstraints['TPath'],
TFullPath extends RouteConstraints['TFullPath'],
TSearchValidator = undefined,
TParams = ResolveParams<TPath>,
TRouteContextFn = AnyContext,
TBeforeLoadFn = AnyContext,
TLoaderDeps extends Record<string, any> = {},
TLoaderFn = undefined,
TSSR = unknown,
TServerMiddlewares = unknown,
THandlers = undefined,
>
extends
FileBaseRouteOptions<
TRegister,
TParentRoute,
TId,
TPath,
TSearchValidator,
TParams,
TLoaderDeps,
TLoaderFn,
AnyContext,
TRouteContextFn,
TBeforeLoadFn,
AnyContext,
TSSR,
TServerMiddlewares,
THandlers
>,
UpdatableRouteOptions<
TParentRoute,
TId,
TFullPath,
TParams,
TSearchValidator,
TLoaderFn,
TLoaderDeps,
AnyContext,
TRouteContextFn,
TBeforeLoadFn
> {}
export type CreateFileRoute<
TFilePath extends string,
TParentRoute extends AnyRoute,
TId extends RouteConstraints['TId'],
TPath extends RouteConstraints['TPath'],
TFullPath extends RouteConstraints['TFullPath'],
> = <
TRegister = Register,
TSearchValidator = undefined,
TParams = ResolveParams<TPath>,
TRouteContextFn = AnyContext,
TBeforeLoadFn = AnyContext,
TLoaderDeps extends Record<string, any> = {},
TLoaderFn = undefined,
TSSR = unknown,
TServerMiddlewares = unknown,
THandlers = undefined,
>(
options?: FileRouteOptions<
TRegister,
TFilePath,
TParentRoute,
TId,
TPath,
TFullPath,
TSearchValidator,
TParams,
TRouteContextFn,
TBeforeLoadFn,
TLoaderDeps,
TLoaderFn,
TSSR,
TServerMiddlewares,
THandlers
>,
) => Route<
TRegister,
TParentRoute,
TPath,
TFullPath,
TFilePath,
TId,
TSearchValidator,
TParams,
AnyContext,
TRouteContextFn,
TBeforeLoadFn,
TLoaderDeps,
TLoaderFn,
unknown,
unknown,
TSSR,
TServerMiddlewares,
THandlers
>
export type LazyRouteOptions = Pick<
UpdatableRouteOptions<
AnyRoute,
string,
string,
AnyPathParams,
AnyValidator,
{},
AnyContext,
AnyContext,
AnyContext,
AnyContext
>,
'component' | 'errorComponent' | 'pendingComponent' | 'notFoundComponent'
>
export interface LazyRoute<in out TRoute extends AnyRoute> {
options: {
id: string
} & LazyRouteOptions
}
export type CreateLazyFileRoute<TRoute extends AnyRoute> = (
opts: LazyRouteOptions,
) => LazyRoute<TRoute>
@@ -0,0 +1,12 @@
import { AnySchema, AnyObjectSchema } from './zod-compat.js';
type JsonSchema = Record<string, unknown>;
type CommonOpts = {
strictUnions?: boolean;
pipeStrategy?: 'input' | 'output';
target?: 'jsonSchema7' | 'draft-7' | 'jsonSchema2019-09' | 'draft-2020-12';
};
export declare function toJsonSchemaCompat(schema: AnyObjectSchema, opts?: CommonOpts): JsonSchema;
export declare function getMethodLiteral(schema: AnyObjectSchema): string;
export declare function parseWithCompat(schema: AnySchema, data: unknown): unknown;
export {};
//# sourceMappingURL=zod-json-schema-compat.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"chrome.js","sources":["../../../src/icons/chrome.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Chrome\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI0IiAvPgogIDxsaW5lIHgxPSIyMS4xNyIgeDI9IjEyIiB5MT0iOCIgeTI9IjgiIC8+CiAgPGxpbmUgeDE9IjMuOTUiIHgyPSI4LjU0IiB5MT0iNi4wNiIgeTI9IjE0IiAvPgogIDxsaW5lIHgxPSIxMC44OCIgeDI9IjE1LjQ2IiB5MT0iMjEuOTQiIHkyPSIxNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/chrome\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n * @deprecated Brand icons have been deprecated and are due to be removed, please refer to https://github.com/lucide-icons/lucide/issues/670. We recommend using https://simpleicons.org/?q=chrome instead. This icon will be removed in v1.0\n */\nconst Chrome = createLucideIcon('Chrome', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['circle', { cx: '12', cy: '12', r: '4', key: '4exip2' }],\n ['line', { x1: '21.17', x2: '12', y1: '8', y2: '8', key: 'a0cw5f' }],\n ['line', { x1: '3.95', x2: '8.54', y1: '6.06', y2: '14', key: '1kftof' }],\n ['line', { x1: '10.88', x2: '15.46', y1: '21.94', y2: '14', key: '1ymyh8' }],\n]);\n\nexport default Chrome;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACzD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACnE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,67 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_http_exception = require("../../http-exception.js");
const require_context = require("../../context.js");
//#region src/adapter/cloudflare-pages/handler.ts
/**
* @deprecated `hono/cloudflare-pages` will be removed in v5. Cloudflare recommends Workers with static assets; use `hono` on Workers instead.
*/
const handle = (app) => (eventContext) => {
return app.fetch(eventContext.request, {
...eventContext.env,
eventContext
}, {
waitUntil: eventContext.waitUntil,
passThroughOnException: eventContext.passThroughOnException,
props: {}
});
};
/**
* @deprecated `hono/cloudflare-pages` will be removed in v5. Cloudflare recommends Workers with static assets; use `hono` on Workers instead.
*/
function handleMiddleware(middleware) {
return async (executionCtx) => {
const context = new require_context.Context(executionCtx.request, {
env: {
...executionCtx.env,
eventContext: executionCtx
},
executionCtx
});
let response = void 0;
try {
response = await middleware(context, async () => {
try {
context.res = await executionCtx.next();
} catch (error) {
if (error instanceof Error) context.error = error;
else throw error;
}
});
} catch (error) {
if (error instanceof Error) context.error = error;
else throw error;
}
if (response) return response;
if (context.error instanceof require_http_exception.HTTPException) return context.error.getResponse();
if (context.error) throw context.error;
return context.res;
};
}
/**
*
* @description `serveStatic()` is for advanced mode:
* https://developers.cloudflare.com/pages/platform/functions/advanced-mode/#set-up-a-function
*
* @deprecated `hono/cloudflare-pages` will be removed in v5. Cloudflare recommends Workers with static assets; use `hono` on Workers instead.
*/
const serveStatic = () => {
return async (c) => {
const res = await c.env.ASSETS.fetch(c.req.raw);
if (res.status === 404) return c.notFound();
return res;
};
};
//#endregion
exports.handle = handle;
exports.handleMiddleware = handleMiddleware;
exports.serveStatic = serveStatic;
@@ -0,0 +1 @@
{"version":3,"names":["_skipFirstGeneratorNext","fn","it","apply","arguments","next"],"sources":["../../src/helpers/skipFirstGeneratorNext.js"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nexport default function _skipFirstGeneratorNext(fn) {\n return function () {\n var it = fn.apply(this, arguments);\n it.next();\n return it;\n };\n}\n"],"mappings":";;;;;;AAEe,SAASA,uBAAuBA,CAACC,EAAE,EAAE;EAClD,OAAO,YAAY;IACjB,IAAIC,EAAE,GAAGD,EAAE,CAACE,KAAK,CAAC,IAAI,EAAEC,SAAS,CAAC;IAClCF,EAAE,CAACG,IAAI,CAAC,CAAC;IACT,OAAOH,EAAE;EACX,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,82 @@
type Key = string | number | symbol;
/**
* SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
* index of the `key` in the backing array.
*
* This is designed to allow synchronizing a second array with the contents of the backing array,
* like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
* and there are never duplicates.
*/
export class SetArray<T extends Key = Key> {
declare private _indexes: Record<T, number | undefined>;
declare array: readonly T[];
constructor() {
this._indexes = { __proto__: null } as any;
this.array = [];
}
}
interface PublicSet<T extends Key> {
array: T[];
_indexes: SetArray<T>['_indexes'];
}
/**
* Typescript doesn't allow friend access to private fields, so this just casts the set into a type
* with public access modifiers.
*/
function cast<T extends Key>(set: SetArray<T>): PublicSet<T> {
return set as any;
}
/**
* Gets the index associated with `key` in the backing array, if it is already present.
*/
export function get<T extends Key>(setarr: SetArray<T>, key: T): number | undefined {
return cast(setarr)._indexes[key];
}
/**
* Puts `key` into the backing array, if it is not already present. Returns
* the index of the `key` in the backing array.
*/
export function put<T extends Key>(setarr: SetArray<T>, key: T): number {
// The key may or may not be present. If it is present, it's a number.
const index = get(setarr, key);
if (index !== undefined) return index;
const { array, _indexes: indexes } = cast(setarr);
const length = array.push(key);
return (indexes[key] = length - 1);
}
/**
* Pops the last added item out of the SetArray.
*/
export function pop<T extends Key>(setarr: SetArray<T>): void {
const { array, _indexes: indexes } = cast(setarr);
if (array.length === 0) return;
const last = array.pop()!;
indexes[last] = undefined;
}
/**
* Removes the key, if it exists in the set.
*/
export function remove<T extends Key>(setarr: SetArray<T>, key: T): void {
const index = get(setarr, key);
if (index === undefined) return;
const { array, _indexes: indexes } = cast(setarr);
for (let i = index + 1; i < array.length; i++) {
const k = array[i];
array[i - 1] = k;
indexes[k]!--;
}
indexes[key] = undefined;
array.pop();
}
@@ -0,0 +1,636 @@
export default `flf2a$ 6 6 30 0 22
Explanation of first line: *** GoofY 0.1 ***
flf2a - necessary stuff to identify the kind of file
$ - the "hardblank" -- prints as a blank, but can't be smushed
6 - height of a character
6 - height of a character, not including descenders
30 - max line length (excluding comment lines) + a fudge factor
0 - put characters together, no smushing or whatever, please!
22 - number of comment lines (starting with the 'Explanation' line)
Written by Steven <GoofY> de Brouwer (Goofsel@dds.nl)
Based on the stupid reaction from people to watch the 'foreground-objects'
first (it's a kind of goofy, isn't it? :)
This font is NOT designed to be used for clear, long text!
Therefore lower-case is equal to UPPER-case!
____ _____ _____ ___ ___ __ _____
/ ) ____) ) ( ) ( \\ ___) ( ( ) ) )
( / / __ / (_\\ / \\ | (__ \\ \\/ / /
) ( ( ( \\ ( ) ( _ ) | __) \\ / (
/ \\ \\__) ) \\ / \\ ) / | ( ) / )
(______) (____) (_____) (___/ \\______/ (______/
*** Use the % for a double-o (oo), and the {} as begin- and end-markers! ***
___@
$$$@
$$$@
$$$@
$$$@
___@@
_$$$$__@
($$$$)$@
$\\$$/$$@
$$\\/$$$@
$$__$$$@
_($$)__@@
_$$$_$$$__@
($$$)$$$)$@
$)_/$)_/$$@
$$$$$$$$$$@
$$$$$$$$$$@
__________@@
__$$$_$$$___@
$_)$(_)$(_$$@
(_$$$_$$$_)$@
$_)$(_)$(_$$@
(_$$$_$$$_)$@
__)$(_)$(___@@
_$$$$$$$__@
$)$$_$$_)$@
($$(_||$$$@
$\\$$_$$\\$$@
$_||_)$$)$@
($$$$$$(__@@
__$$$$$_____$$$$$___@
$$)$$$($$$$$)$$$($$$@
$/$$$(_\\$$$/$$$$$\\$$@
($$$$$$$)$($_$$$$$)$@
$\\$$$$$/$$$\\$)$$$/$$@
__)$$$(_____)$$$(___@@
__$$$$_____@
$($()$)$$$$@
$$>$$<$$_$$@
$/$/\\$\\/$)$@
($(__)$$<$$@
_\\$$$$<>$)_@@
_$$$__@
($$$)$@
$)_/$$@
$$$$$$@
$$$$$$@
______@@
___$$$_@
$$/$$/$@
$/$$/$$@
($$($$$@
$\\$$\\$$@
__\\$$\\_@@
$$$____@
\\$$\\$$$@
$\\$$\\$$@
$$)$$)$@
$/$$/$$@
/$$/___@@
___________@
$$$_$$_$$$$@
$_($\\/$)_$$@
(__$$$$__)$@
$$(_/\\_)$$$@
___________@@
________@
$$$_$$$$@
$_($)_$$@
(__$__)$@
$$(_)$$$@
________@@
_____@
$$$$$@
$$$$$@
$__$$@
($$)$@
($/__@@
______@
$$$$$$@
$___$$@
(___)$@
$$$$$$@
______@@
_____@
$$$$$@
$$$$$@
$$$$$@
$__$$@
($$)_@@
____$$$$_@
$$$$)$$/$@
$$$/$$/$$@
$$/$$/$$$@
$/$$/$$$$@
/$$(_____@@
__$$$___@
$/$$$\\$$@
|$$$$$|$@
|$$$$$|$@
|$$$$$|$@
_\\$$$/__@@
_$$$$$___@
/_$$$|$$$@
$$|$$|$$$@
$$|$$|$$$@
$_|$$|_$$@
($$$$$$)_@@
__$$$$____@
$/$_$$\\$$$@
(_/$)$$)$$@
$$$/$$/$$$@
$$/$$/__$$@
_($$$$$$)_@@
_$$$$___@
(__$$\\$$@
$__)$$|$@
(__$$$|$@
$__)$$|$@
($$$$/__@@
___$$$$___@
$$/$$$|$$$@
$/$$$$|_$$@
(__$$$$_)$@
$$_|$$|_$$@
_($$$$$$)_@@
$$$$$$$__@
|$$____)$@
|$|___$$$@
|___$$\\$$@
$___)$$)$@
($$$$$/__@@
__$$$$___@
$/$$__)$$@
|$$(__$$$@
|$$$$$\\$$@
|$$$$$$)$@
_\\$$$$/__@@
$$$$$$$__@
(___$$$)$@
$$$/$$/$$@
$$/$$/$$$@
$/$$/$$$$@
($$/_____@@
__$$$___@
$/$$$\\$$@
($$$$$)$@
$>$$$<$$@
($$$$$)$@
_\\$$$/__@@
__$$$$___@
$/$$$$\\$$@
($$$$$$|$@
$\\__$$$|$@
$$__)$$|$@
_($$$$/__@@
____@
$_$$@
(_)$@
$_$$@
(_)$@
____@@
____@
$_$$@
(_)$@
$_$$@
($)$@
|/__@@
___$$$_@
$$/$$/$@
$/$$/$$@
<$$<$$$@
$\\$$\\$$@
__\\$$\\_@@
______@
$___$$@
(___)$@
$___$$@
(___)$@
______@@
$$$____@
\\$$\\$$$@
$\\$$\\$$@
$$>$$>$@
$/$$/$$@
/$$/___@@
_$$$__@
(_$$)$@
$/$/$$@
(_($$$@
$_$$$$@
($)___@@
__$$$$$$$___@
$/$$___$$\\$$@
|$$/$/\\)$$)$@
|$|$(____/$$@
|$$\\______$$@
_\\$$$$$$$$)_@@
____$$_____@
$$$/$$\\$$$$@
$$/$$$$\\$$$@
$/$$()$$\\$$@
|$$$__$$$|$@
|$$(__)$$|_@@
$$$$$$___@
\\$$$$$\\$$@
$|$$$$$)$@
$|$$$$<$$@
$|$$$$$)$@
/$$$$$/__@@
__$$$$__@
$/$$__)$@
|$$/$$$$@
|$|$$$$$@
|$$\\__$$@
_\\$$$$)_@@
$$$$$___@
|$$$$\\$$@
|$$$$$|$@
|$$$$$|$@
|$$$$$|$@
|$$$$/__@@
$$$$$$$$__@
\\$$$$___)$@
$|$$(__$$$@
$|$$$__)$$@
$|$$(___$$@
/$$$$$$$)_@@
$$$$$$$$__@
\\$$$$___)$@
$|$$(__$$$@
$|$$$__)$$@
$|$$($$$$$@
/$$$$\\____@@
__$$$$$$$___@
$$)$$____)$$@
$/$$/$$__$$$@
($$($$($$\\$$@
$\\$$\\__)$$)$@
__)$$$$$$(__@@
$$$$___$$$$_@
\\$$|$$$|$$/$@
$|$$\\_/$$|$$@
$|$$$_$$$|$$@
$|$$/$\\$$|$$@
/$$|___|$$\\_@@
_$$$$$$__@
(_$$$$_)$@
$$|$$|$$$@
$$|$$|$$$@
$_|$$|_$$@
($$$$$$)_@@
___$$$$$_@
$$(_$$$|$@
$$$$|$$|$@
$_$$|$$|$@
($|_|$$|$@
_\\$$$$/__@@
$$$$$_$$$$_@
\\$$$|$)$$/$@
$|$$|/$$/$$@
$|$$$$$($$$@
$|$$|\\$$\\$$@
/$$$|_)$$\\_@@
$$$$$____@
\\$$$|$$$$@
$|$$|$$$$@
$|$$|$$$$@
$|$$|__$$@
/$$$$$$)_@@
$$$$$$$$$$_@
|$$$$$$$$|$@
|$$|\\/|$$|$@
|$$|$$|$$|$@
|$$|$$|$$|$@
|$$|__|$$|_@@
$$$$$___$$$$_@
|$$$$\\$$|$$|$@
|$$|\\$\\$|$$|$@
|$$|$\\$\\|$$|$@
|$$|$$\\$$$$|$@
|$$|___\\$$$|_@@
__$$$$$___@
$$)$$$($$$@
$/$$$$$\\$$@
($$$$$$$)$@
$\\$$$$$/$$@
__)$$$(___@@
$$$$$___@
|$$$$\\$$@
|$$$$$)$@
|$$__/$$@
|$|$$$$$@
|$|_____@@
__$$$$$_@
$/$$$$|$@
($$$$$|$@
$\\__$$|$@
$$$$|$|$@
____|$|_@@
$$$$$___@
|$$$$\\$$@
|$$$$$)$@
|$$$$/$$@
|$|\\$\\$$@
|$|_\\$\\_@@
_$$$$$$$__@
$)$$____)$@
($$(___$$$@
$\\___$$\\$$@
$____)$$)$@
($$$$$$(__@@
_$$$$$$$$__@
(__$$$$__)$@
$$$|$$|$$$$@
$$$|$$|$$$$@
$$$|$$|$$$$@
___|$$|____@@
$$$$___$$$$_@
|$$|$$$|$$|$@
|$$|$$$|$$|$@
|$$|$$$|$$|$@
|$$$\\_/$$$|$@
_\\$$$$$$$/__@@
$$$$__$$$$_@
|$$|$$|$$|$@
|$$|$$|$$|$@
|$$|$$|$$|$@
$\\$$\\/$$/$$@
__\\$$$$/___@@
$$$$____$$$$_@
|$$|$$$$|$$|$@
|$$|$$$$|$$|$@
|$$|$$$$|$$|$@
$\\$$\\/\\/$$/$$@
__\\$$$$$$/___@@
$$$____$$$_@
\\$$\\$$/$$/$@
$\\$$\\/$$/$$@
$$>$$$$<$$$@
$/$$/\\$$\\$$@
/$$/__\\$$\\_@@
_$$$__$$$__@
($$($$)$$)$@
$\\$$\\/$$/$$@
$$\\$$$$/$$$@
$$$)$$/$$$$@
__/$$(_____@@
_$$$$$$__@
(___$$$)$@
$$$/$$/$$@
$$/$$/$$$@
$/$$/__$$@
($$$$$$)_@@
$$$$$$$_@
|$$$__|$@
|$$|$$$$@
|$$|$$$$@
|$$|__$$@
|$$$$$|_@@
$$$$_____@
\\$$($$$$$@
$\\$$\\$$$$@
$$\\$$\\$$$@
$$$\\$$\\$$@
____)$$\\_@@
$$$$$$$_@
|__$$$|$@
$$$|$$|$@
$$$|$$|$@
$__|$$|$@
|$$$$$|_@@
__$$$$___@
$/$/\\$\\$$@
(_/$$\\_)$@
$$$$$$$$$@
$$$$$$$$$@
_________@@
______@
$$$$$$@
$$$$$$@
$$$$$$@
____$$@
)$$$)_@@
_$$$__@
($$$)$@
$\\_($$@
$$$$$$@
$$$$$$@
______@@
____$$_____@
$$$/$$\\$$$$@
$$/$$$$\\$$$@
$/$$()$$\\$$@
|$$$__$$$|$@
|$$(__)$$|_@@
$$$$$$___@
\\$$$$$\\$$@
$|$$$$$)$@
$|$$$$<$$@
$|$$$$$)$@
/$$$$$/__@@
__$$$$__@
$/$$__)$@
|$$/$$$$@
|$|$$$$$@
|$$\\__$$@
_\\$$$$)_@@
$$$$$___@
|$$$$\\$$@
|$$$$$|$@
|$$$$$|$@
|$$$$$|$@
|$$$$/__@@
$$$$$$$$__@
\\$$$$___)$@
$|$$(__$$$@
$|$$$__)$$@
$|$$(___$$@
/$$$$$$$)_@@
$$$$$$$$__@
\\$$$$___)$@
$|$$(__$$$@
$|$$$__)$$@
$|$$($$$$$@
/$$$$\\____@@
__$$$$$$$___@
$$)$$____)$$@
$/$$/$$__$$$@
($$($$($$\\$$@
$\\$$\\__)$$)$@
__)$$$$$$(__@@
$$$$___$$$$_@
\\$$|$$$|$$/$@
$|$$\\_/$$|$$@
$|$$$_$$$|$$@
$|$$/$\\$$|$$@
/$$|___|$$\\_@@
_$$$$$$__@
(_$$$$_)$@
$$|$$|$$$@
$$|$$|$$$@
$_|$$|_$$@
($$$$$$)_@@
___$$$$$_@
$$(_$$$|$@
$$$$|$$|$@
$_$$|$$|$@
($|_|$$|$@
_\\$$$$/__@@
$$$$$_$$$$_@
\\$$$|$)$$/$@
$|$$|/$$/$$@
$|$$$$$($$$@
$|$$|\\$$\\$$@
/$$$|_)$$\\_@@
$$$$$____@
\\$$$|$$$$@
$|$$|$$$$@
$|$$|$$$$@
$|$$|__$$@
/$$$$$$)_@@
$$$$$$$$$$_@
|$$$$$$$$|$@
|$$|\\/|$$|$@
|$$|$$|$$|$@
|$$|$$|$$|$@
|$$|__|$$|_@@
$$$$$___$$$$_@
|$$$$\\$$|$$|$@
|$$|\\$\\$|$$|$@
|$$|$\\$\\|$$|$@
|$$|$$\\$$$$|$@
|$$|___\\$$$|_@@
__$$$$$___@
$$)$$$($$$@
$/$$$$$\\$$@
($$$$$$$)$@
$\\$$$$$/$$@
__)$$$(___@@
$$$$$___@
|$$$$\\$$@
|$$$$$)$@
|$$__/$$@
|$|$$$$$@
|$|_____@@
__$$$$$_@
$/$$$$|$@
($$$$$|$@
$\\__$$|$@
$$$$|$|$@
____|$|_@@
$$$$$___@
|$$$$\\$$@
|$$$$$)$@
|$$$$/$$@
|$|\\$\\$$@
|$|_\\$\\_@@
_$$$$$$$__@
$)$$____)$@
($$(___$$$@
$\\___$$\\$$@
$____)$$)$@
($$$$$$(__@@
_$$$$$$$$__@
(__$$$$__)$@
$$$|$$|$$$$@
$$$|$$|$$$$@
$$$|$$|$$$$@
___|$$|____@@
$$$$___$$$$_@
|$$|$$$|$$|$@
|$$|$$$|$$|$@
|$$|$$$|$$|$@
|$$$\\_/$$$|$@
_\\$$$$$$$/__@@
$$$$__$$$$_@
|$$|$$|$$|$@
|$$|$$|$$|$@
|$$|$$|$$|$@
$\\$$\\/$$/$$@
__\\$$$$/___@@
$$$$____$$$$_@
|$$|$$$$|$$|$@
|$$|$$$$|$$|$@
|$$|$$$$|$$|$@
$\\$$\\/\\/$$/$$@
__\\$$$$$$/___@@
$$$____$$$_@
\\$$\\$$/$$/$@
$\\$$\\/$$/$$@
$$>$$$$<$$$@
$/$$/\\$$\\$$@
/$$/__\\$$\\_@@
_$$$__$$$__@
($$($$)$$)$@
$\\$$\\/$$/$$@
$$\\$$$$/$$$@
$$$)$$/$$$$@
__/$$(_____@@
_$$$$$$__@
(___$$$)$@
$$$/$$/$$@
$$/$$/$$$@
$/$$/__$$@
($$$$$$)_@@
$$$__@
$$/$$@
$($$$@
$$)$$@
$/$$$@
(____@@
$$$_@
|$|$@
|$|$@
|$|$@
|$|$@
|$|_@@
___$@
$$$)@
$$/$@
$($$@
$$)$@
_/$$@@
__$$__$$_@
$/$$\\/$/$@
(_/\\__/$$@
$$$$$$$$$@
$$$$$$$$$@
_________@@
_$___$__@
(_)$(_)$@
$$___$$$@
$/$$$\\$$@
|$$_$$|$@
|$(_)$|_@@
_$___$__@
(_)$(_)$@
$$___$$$@
$/$$$\\$$@
($$$$$)$@
_\\$$$/__@@
_$___$__@
(_)$(_)$@
$_$$$_$$@
|$|$|$|$@
|$|_|$|$@
_\\$$$/__@@
_$___$__@
(_)$(_)$@
$$___$$$@
$/$$$\\$$@
|$$_$$|$@
|$(_)$|_@@
_$___$__@
(_)$(_)$@
$$___$$$@
$/$$$\\$$@
($$$$$)$@
_\\$$$/__@@
_$___$__@
(_)$(_)$@
$_$$$_$$@
|$|$|$|$@
|$|_|$|$@
_\\$$$/__@@
__$$$$$___@
$/$$__$\\$$@
|$$/$_)$)$@
|$|$(_$($$@
|$|$__)$)$@
|$|($$$/__@@
`
@@ -0,0 +1,178 @@
// @ts-check
const { resolve } = require('node:path')
const config = require('lilconfig')
const loadOptions = require('./options.js')
const loadPlugins = require('./plugins.js')
const req = require('./req.js')
const interopRequireDefault = obj =>
obj && obj.__esModule ? obj : { default: obj }
/**
* Process the result from cosmiconfig
*
* @param {Object} ctx Config Context
* @param {Object} result Cosmiconfig result
*
* @return {Promise<Object>} PostCSS Config
*/
async function processResult(ctx, result) {
let file = result.filepath || ''
let projectConfig = interopRequireDefault(result.config).default || {}
if (typeof projectConfig === 'function') {
projectConfig = projectConfig(ctx)
} else {
projectConfig = Object.assign({}, projectConfig, ctx)
}
if (!projectConfig.plugins) {
projectConfig.plugins = []
}
let res = {
file,
options: await loadOptions(projectConfig, file),
plugins: await loadPlugins(projectConfig, file)
}
delete projectConfig.plugins
return res
}
/**
* Builds the Config Context
*
* @param {Object} ctx Config Context
*
* @return {Object} Config Context
*/
function createContext(ctx) {
/**
* @type {Object}
*
* @prop {String} cwd=process.cwd() Config search start location
* @prop {String} env=process.env.NODE_ENV Config Enviroment, will be set to `development` by `postcss-load-config` if `process.env.NODE_ENV` is `undefined`
*/
ctx = Object.assign(
{
cwd: process.cwd(),
env: process.env.NODE_ENV
},
ctx
)
if (!ctx.env) {
process.env.NODE_ENV = 'development'
}
return ctx
}
async function loader(filepath) {
return req(filepath)
}
let yaml
async function yamlLoader(_, content) {
if (!yaml) {
try {
yaml = await import('yaml')
} catch (e) {
/* c8 ignore start */
throw new Error(
`'yaml' is required for the YAML configuration files. Make sure it is installed\nError: ${e.message}`
)
}
}
return yaml.parse(content);
}
/** @return {import('lilconfig').Options} */
const withLoaders = (options = {}) => {
let moduleName = 'postcss'
return {
...options,
loaders: {
...options.loaders,
'.cjs': loader,
'.cts': loader,
'.js': loader,
'.mjs': loader,
'.mts': loader,
'.ts': loader,
'.yaml': yamlLoader,
'.yml': yamlLoader
},
searchPlaces: [
...(options.searchPlaces || []),
'package.json',
`.${moduleName}rc`,
`.${moduleName}rc.json`,
`.${moduleName}rc.yaml`,
`.${moduleName}rc.yml`,
`.${moduleName}rc.ts`,
`.${moduleName}rc.cts`,
`.${moduleName}rc.mts`,
`.${moduleName}rc.js`,
`.${moduleName}rc.cjs`,
`.${moduleName}rc.mjs`,
`${moduleName}.config.ts`,
`${moduleName}.config.cts`,
`${moduleName}.config.mts`,
`${moduleName}.config.js`,
`${moduleName}.config.cjs`,
`${moduleName}.config.mjs`
]
}
}
/**
* Load Config
*
* @method rc
*
* @param {Object} ctx Config Context
* @param {String} path Config Path
* @param {Object} options Config Options
*
* @return {Promise} config PostCSS Config
*/
function rc(ctx, path, options) {
/**
* @type {Object} The full Config Context
*/
ctx = createContext(ctx)
/**
* @type {String} `process.cwd()`
*/
path = path ? resolve(path) : process.cwd()
return config
.lilconfig('postcss', withLoaders(options))
.search(path)
.then(result => {
if (!result) {
throw new Error(`No PostCSS Config found in: ${path}`)
}
return processResult(ctx, result)
})
}
/**
* Autoload Config for PostCSS
*
* @author Michael Ciniawsky @michael-ciniawsky <michael.ciniawsky@gmail.com>
* @license MIT
*
* @module postcss-load-config
* @version 2.1.0
*
* @requires comsiconfig
* @requires ./options
* @requires ./plugins
*/
module.exports = rc
@@ -0,0 +1,12 @@
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
let react = require("react");
react = require_runtime.__toESM(react);
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/SafeFragment.tsx
function SafeFragment(props) {
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: props.children });
}
//#endregion
exports.SafeFragment = SafeFragment;
//# sourceMappingURL=SafeFragment.cjs.map
@@ -0,0 +1 @@
{"version":3,"file":"dateSplits.mjs","sources":["../../src/data/dateSplits.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA,iBAAe;AACb,EAAA,CAAC,EAAE;AACD;EACA,CAAC,CAAC,EAAE,CAAC,CAAC;AAAE;AACR,EAAA,CAAC,CAAC,EAAE,CAAC,CAAC;GACP;AACD,EAAA,CAAC,EAAE,CACD,CAAC,CAAC,EAAE,CAAC,CAAC;AAAE;EACR,CAAC,CAAC,EAAE,CAAC,CAAC;AAAE;AACR;AACA,EAAA,CAAC,CAAC,EAAE,CAAC,CAAC;GACP;AACD,EAAA,CAAC,EAAE,CACD,CAAC,CAAC,EAAE,CAAC,CAAC;AAAE;EACR,CAAC,CAAC,EAAE,CAAC,CAAC;AAAE;AACR,EAAA,CAAC,CAAC,EAAE,CAAC,CAAC;GACP;AACD;AACA,EAAA,CAAC,EAAE,CACD,CAAC,CAAC,EAAE,CAAC,CAAC;AAAE;EACR,CAAC,CAAC,EAAE,CAAC,CAAC;AAAE;EACR,CAAC,CAAC,EAAE,CAAC,CAAC;AAAE;AACR,EAAA,CAAC,CAAC,EAAE,CAAC,CAAC;GACP;AACD,EAAA,CAAC,EAAE,CACD,CAAC,CAAC,EAAE,CAAC,CAAC;AAAE;AACR,EAAA,CAAC,CAAC,EAAE,CAAC,CAAC;AAAE;CAEX;;;;"}
@@ -0,0 +1,207 @@
<img align="right" alt="Ajv logo" width="160" src="https://ajv.js.org/img/ajv.svg">
&nbsp;
# Ajv JSON schema validator
The fastest JSON validator for Node.js and browser.
Supports JSON Schema draft-04/06/07/2019-09/2020-12 ([draft-04 support](https://ajv.js.org/json-schema.html#draft-04) requires ajv-draft-04 package) and JSON Type Definition [RFC8927](https://datatracker.ietf.org/doc/rfc8927/).
[![build](https://github.com/ajv-validator/ajv/actions/workflows/build.yml/badge.svg)](https://github.com/ajv-validator/ajv/actions?query=workflow%3Abuild)
[![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv)
[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv)
[![Coverage Status](https://coveralls.io/repos/github/ajv-validator/ajv/badge.svg?branch=master)](https://coveralls.io/github/ajv-validator/ajv?branch=master)
[![SimpleX](https://img.shields.io/badge/chat-on%20SimpleX-70F0F9)](https://simplex.chat/contact#/?v=1-2&smp=smp%3A%2F%2Fu2dS9sG8nMNURyZwqASV4yROM28Er0luVTx5X1CsMrU%3D%40smp4.simplex.im%2F8KvvURM6J38Gdq9dCuPswMOkMny0xCOJ%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAr8rPVRuMOXv6kwF2yUAap-eoVg-9ssOFCi1fIrxTUw0%253D%26srv%3Do5vmywmrnaxalvz6wi3zicyftgio6psuvyniis6gco6bp6ekl4cqj4id.onion&data=%7B%22type%22%3A%22group%22%2C%22groupLinkId%22%3A%224pwLRgWHU9tlroMWHz0uOg%3D%3D%22%7D)
[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv)
[![GitHub Sponsors](https://img.shields.io/badge/$-sponsors-brightgreen)](https://github.com/sponsors/epoberezkin)
## Ajv sponsors
[<img src="https://ajv.js.org/img/mozilla.svg" width="45%" alt="Mozilla">](https://www.mozilla.org)<img src="https://ajv.js.org/img/gap.svg" width="9%">[<img src="https://ajv.js.org/img/reserved.svg" width="45%">](https://opencollective.com/ajv)
[<img src="https://ajv.js.org/img/microsoft.png" width="31%" alt="Microsoft">](https://opensource.microsoft.com)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="31%">](https://opencollective.com/ajv)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="31%">](https://opencollective.com/ajv)
[<img src="https://ajv.js.org/img/retool.svg" width="22.5%" alt="Retool">](https://retool.com/?utm_source=sponsor&utm_campaign=ajv)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/tidelift.svg" width="22.5%" alt="Tidelift">](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=enterprise)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/simplex.svg" width="22.5%" alt="SimpleX">](https://github.com/simplex-chat/simplex-chat)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="22.5%">](https://opencollective.com/ajv)
## Contributing
More than 100 people contributed to Ajv, and we would love to have you join the development. We welcome implementing new features that will benefit many users and ideas to improve our documentation.
Please review [Contributing guidelines](./CONTRIBUTING.md) and [Code components](https://ajv.js.org/components.html).
## Documentation
All documentation is available on the [Ajv website](https://ajv.js.org).
Some useful site links:
- [Getting started](https://ajv.js.org/guide/getting-started.html)
- [JSON Schema vs JSON Type Definition](https://ajv.js.org/guide/schema-language.html)
- [API reference](https://ajv.js.org/api.html)
- [Strict mode](https://ajv.js.org/strict-mode.html)
- [Standalone validation code](https://ajv.js.org/standalone.html)
- [Security considerations](https://ajv.js.org/security.html)
- [Command line interface](https://ajv.js.org/packages/ajv-cli.html)
- [Frequently Asked Questions](https://ajv.js.org/faq.html)
## <a name="sponsors"></a>Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin)
Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant!
Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released.
Please sponsor Ajv via:
- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it)
- [Ajv Open Collective](https://opencollective.com/ajv)
Thank you.
#### Open Collective sponsors
<a href="https://opencollective.com/ajv"><img src="https://opencollective.com/ajv/individuals.svg?width=890"></a>
<a href="https://opencollective.com/ajv/organization/0/website"><img src="https://opencollective.com/ajv/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/1/website"><img src="https://opencollective.com/ajv/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/2/website"><img src="https://opencollective.com/ajv/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/3/website"><img src="https://opencollective.com/ajv/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/4/website"><img src="https://opencollective.com/ajv/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/5/website"><img src="https://opencollective.com/ajv/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/6/website"><img src="https://opencollective.com/ajv/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/7/website"><img src="https://opencollective.com/ajv/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/8/website"><img src="https://opencollective.com/ajv/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/9/website"><img src="https://opencollective.com/ajv/organization/9/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/10/website"><img src="https://opencollective.com/ajv/organization/10/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/11/website"><img src="https://opencollective.com/ajv/organization/11/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/12/website"><img src="https://opencollective.com/ajv/organization/12/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/13/website"><img src="https://opencollective.com/ajv/organization/13/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/14/website"><img src="https://opencollective.com/ajv/organization/14/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/15/website"><img src="https://opencollective.com/ajv/organization/15/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/16/website"><img src="https://opencollective.com/ajv/organization/16/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/17/website"><img src="https://opencollective.com/ajv/organization/17/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/18/website"><img src="https://opencollective.com/ajv/organization/18/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/19/website"><img src="https://opencollective.com/ajv/organization/19/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/20/website"><img src="https://opencollective.com/ajv/organization/20/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/21/website"><img src="https://opencollective.com/ajv/organization/21/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/22/website"><img src="https://opencollective.com/ajv/organization/22/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/23/website"><img src="https://opencollective.com/ajv/organization/23/avatar.svg"></a>
<a href="https://opencollective.com/ajv/organization/24/website"><img src="https://opencollective.com/ajv/organization/24/avatar.svg"></a>
## Performance
Ajv generates code to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization.
Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks:
- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place
- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster
- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)
- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=62,4,1&chs=600x416&chxl=-1:|ajv|@exodus/schemasafe|is-my-json-valid|djv|@cfworker/json-schema|jsonschema/=t:100,69.2,51.5,13.1,5.1,1.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
## Features
- Ajv implements JSON Schema [draft-06/07/2019-09/2020-12](http://json-schema.org/) standards (draft-04 is supported in v6):
- all validation keywords (see [JSON Schema validation keywords](https://ajv.js.org/json-schema.html))
- [OpenAPI](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) extensions:
- NEW: keyword [discriminator](https://ajv.js.org/json-schema.html#discriminator).
- keyword [nullable](https://ajv.js.org/json-schema.html#nullable).
- full support of remote references (remote schemas have to be added with `addSchema` or compiled to be available)
- support of recursive references between schemas
- correct string lengths for strings with unicode pairs
- JSON Schema [formats](https://ajv.js.org/guide/formats.html) (with [ajv-formats](https://github.com/ajv-validator/ajv-formats) plugin).
- [validates schemas against meta-schema](https://ajv.js.org/api.html#api-validateschema)
- NEW: supports [JSON Type Definition](https://datatracker.ietf.org/doc/rfc8927/):
- all keywords (see [JSON Type Definition schema forms](https://ajv.js.org/json-type-definition.html))
- meta-schema for JTD schemas
- "union" keyword and user-defined keywords (can be used inside "metadata" member of the schema)
- supports [browsers](https://ajv.js.org/guide/environments.html#browsers) and Node.js 18.x - current
- [asynchronous loading](https://ajv.js.org/guide/managing-schemas.html#asynchronous-schema-loading) of referenced schemas during compilation
- "All errors" validation mode with [option allErrors](https://ajv.js.org/options.html#allerrors)
- [error messages with parameters](https://ajv.js.org/api.html#validation-errors) describing error reasons to allow error message generation
- i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package
- [removing-additional-properties](https://ajv.js.org/guide/modifying-data.html#removing-additional-properties)
- [assigning defaults](https://ajv.js.org/guide/modifying-data.html#assigning-defaults) to missing properties and items
- [coercing data](https://ajv.js.org/guide/modifying-data.html#coercing-data-types) to the types specified in `type` keywords
- [user-defined keywords](https://ajv.js.org/guide/user-keywords.html)
- additional extension keywords with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package
- [\$data reference](https://ajv.js.org/guide/combining-schemas.html#data-reference) to use values from the validated data as values for the schema keywords
- [asynchronous validation](https://ajv.js.org/guide/async-validation.html) of user-defined formats and keywords
## Install
To install version 8:
```
npm install ajv
```
## <a name="usage"></a>Getting started
Try it in the Node.js REPL: https://runkit.com/npm/ajv
In JavaScript:
```javascript
// or ESM/TypeScript import
import Ajv from "ajv"
// Node.js require:
const Ajv = require("ajv")
const ajv = new Ajv() // options can be passed, e.g. {allErrors: true}
const schema = {
type: "object",
properties: {
foo: {type: "integer"},
bar: {type: "string"},
},
required: ["foo"],
additionalProperties: false,
}
const data = {
foo: 1,
bar: "abc",
}
const validate = ajv.compile(schema)
const valid = validate(data)
if (!valid) console.log(validate.errors)
```
Learn how to use Ajv and see more examples in the [Guide: getting started](https://ajv.js.org/guide/getting-started.html)
## Changes history
See [https://github.com/ajv-validator/ajv/releases](https://github.com/ajv-validator/ajv/releases)
**Please note**: [Changes in version 8.0.0](https://github.com/ajv-validator/ajv/releases/tag/v8.0.0)
[Version 7.0.0](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0)
[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0).
## Code of conduct
Please review and follow the [Code of conduct](./CODE_OF_CONDUCT.md).
Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team.
## Security contact
To report a security vulnerability, please use the
[Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues.
## Open-source software support
Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers.
## License
[MIT](./LICENSE)
@@ -0,0 +1,52 @@
"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.requiresQuoting = requiresQuoting;
const ts = __importStar(require("typescript"));
/*** Indicates whether identifiers require the use of quotation marks when accessing property definitions and dot notation. */
function requiresQuoting(name, target = ts.ScriptTarget.ESNext) {
if (name.length === 0) {
return true;
}
if (!ts.isIdentifierStart(name.charCodeAt(0), target)) {
return true;
}
for (let i = 1; i < name.length; i += 1) {
if (!ts.isIdentifierPart(name.charCodeAt(i), target)) {
return true;
}
}
return false;
}
@@ -0,0 +1,3 @@
import { MatchEstimated, MatchExtended } from '../../types';
declare const _default: ({ token }: MatchExtended | MatchEstimated) => number;
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"cubic-bezier.mjs","sources":["../../../../../src/animation/waapi/easing/cubic-bezier.ts"],"sourcesContent":["import { BezierDefinition } from \"motion-utils\"\n\nexport const cubicBezierAsString = ([a, b, c, d]: BezierDefinition) =>\n `cubic-bezier(${a}, ${b}, ${c}, ${d})`\n"],"names":[],"mappings":"AAEO,MAAM,mBAAmB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAmB,KAC9D,CAAA,aAAA,EAAgB,CAAC,CAAA,EAAA,EAAK,CAAC,CAAA,EAAA,EAAK,CAAC,CAAA,EAAA,EAAK,CAAC,CAAA,CAAA;;;;"}
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileDiff = createLucideIcon("FileDiff", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M9 10h6", key: "9gxzsh" }],
["path", { d: "M12 13V7", key: "h0r20n" }],
["path", { d: "M9 17h6", key: "r8uit2" }]
]);
export { FileDiff as default };
//# sourceMappingURL=file-diff.js.map
@@ -0,0 +1,206 @@
import { test } from "vitest";
// import path from "path";
// import { Node, Project, SyntaxKind } from "ts-morph";
// import { filePath } from "./language-server.source";
// The following tool is helpful for understanding the TypeScript AST associated with these tests: https://ts-ast-viewer.com/ (just copy the contents of language-server.source into the viewer)
test("", () => {});
// describe("Executing Go To Definition (and therefore Find Usages and Rename Refactoring) using an IDE works on inferred object properties", () => {
// // Compile file developmentEnvironment.source
// const project = new Project({
// tsConfigFilePath: path.join(__dirname, "..", "..", "tsconfig.json"),
// skipAddingFilesFromTsConfig: true,
// });
// const sourceFile = project.addSourceFileAtPath(filePath);
// test("works for object properties inferred from z.object()", () => {
// // Find usage of Test.f1 property
// const instanceVariable =
// sourceFile.getVariableDeclarationOrThrow("instanceOfTest");
// const propertyBeingAssigned = getPropertyBeingAssigned(
// instanceVariable,
// "f1"
// );
// // Find definition of Test.f1 property
// const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
// const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
// SyntaxKind.VariableDeclaration
// );
// // Assert that find definition returned the Zod definition of Test
// expect(definitionOfProperty?.getText()).toEqual("f1: z.number()");
// expect(parentOfProperty?.getName()).toEqual("Test");
// });
// // test("works for first object properties inferred from z.object().merge()", () => {
// // // Find usage of TestMerge.f1 property
// // const instanceVariable = sourceFile.getVariableDeclarationOrThrow(
// // "instanceOfTestMerge"
// // );
// // const propertyBeingAssigned = getPropertyBeingAssigned(
// // instanceVariable,
// // "f1"
// // );
// // // Find definition of TestMerge.f1 property
// // const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
// // const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
// // SyntaxKind.VariableDeclaration
// // );
// // // Assert that find definition returned the Zod definition of Test
// // expect(definitionOfProperty?.getText()).toEqual("f1: z.number()");
// // expect(parentOfProperty?.getName()).toEqual("Test");
// // });
// // test("works for second object properties inferred from z.object().merge()", () => {
// // // Find usage of TestMerge.f2 property
// // const instanceVariable = sourceFile.getVariableDeclarationOrThrow(
// // "instanceOfTestMerge"
// // );
// // const propertyBeingAssigned = getPropertyBeingAssigned(
// // instanceVariable,
// // "f2"
// // );
// // // Find definition of TestMerge.f2 property
// // const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
// // const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
// // SyntaxKind.VariableDeclaration
// // );
// // // Assert that find definition returned the Zod definition of TestMerge
// // expect(definitionOfProperty?.getText()).toEqual(
// // "f2: z.string().optional()"
// // );
// // expect(parentOfProperty?.getName()).toEqual("TestMerge");
// // });
// test("works for first object properties inferred from z.union()", () => {
// // Find usage of TestUnion.f1 property
// const instanceVariable = sourceFile.getVariableDeclarationOrThrow(
// "instanceOfTestUnion"
// );
// const propertyBeingAssigned = getPropertyBeingAssigned(
// instanceVariable,
// "f1"
// );
// // Find definition of TestUnion.f1 property
// const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
// const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
// SyntaxKind.VariableDeclaration
// );
// // Assert that find definition returned the Zod definition of Test
// expect(definitionOfProperty?.getText()).toEqual("f1: z.number()");
// expect(parentOfProperty?.getName()).toEqual("Test");
// });
// test("works for second object properties inferred from z.union()", () => {
// // Find usage of TestUnion.f2 property
// const instanceVariable = sourceFile.getVariableDeclarationOrThrow(
// "instanceOfTestUnion"
// );
// const propertyBeingAssigned = getPropertyBeingAssigned(
// instanceVariable,
// "f2"
// );
// // Find definition of TestUnion.f2 property
// const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
// const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
// SyntaxKind.VariableDeclaration
// );
// // Assert that find definition returned the Zod definition of TestUnion
// expect(definitionOfProperty?.getText()).toEqual(
// "f2: z.string().optional()"
// );
// expect(parentOfProperty?.getName()).toEqual("TestUnion");
// });
// test("works for object properties inferred from z.object().partial()", () => {
// // Find usage of TestPartial.f1 property
// const instanceVariable = sourceFile.getVariableDeclarationOrThrow(
// "instanceOfTestPartial"
// );
// const propertyBeingAssigned = getPropertyBeingAssigned(
// instanceVariable,
// "f1"
// );
// // Find definition of TestPartial.f1 property
// const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
// const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
// SyntaxKind.VariableDeclaration
// );
// // Assert that find definition returned the Zod definition of Test
// expect(definitionOfProperty?.getText()).toEqual("f1: z.number()");
// expect(parentOfProperty?.getName()).toEqual("Test");
// });
// test("works for object properties inferred from z.object().pick()", () => {
// // Find usage of TestPick.f1 property
// const instanceVariable =
// sourceFile.getVariableDeclarationOrThrow("instanceOfTestPick");
// const propertyBeingAssigned = getPropertyBeingAssigned(
// instanceVariable,
// "f1"
// );
// // Find definition of TestPick.f1 property
// const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
// const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
// SyntaxKind.VariableDeclaration
// );
// // Assert that find definition returned the Zod definition of Test
// expect(definitionOfProperty?.getText()).toEqual("f1: z.number()");
// expect(parentOfProperty?.getName()).toEqual("Test");
// });
// test("works for object properties inferred from z.object().omit()", () => {
// // Find usage of TestOmit.f1 property
// const instanceVariable =
// sourceFile.getVariableDeclarationOrThrow("instanceOfTestOmit");
// const propertyBeingAssigned = getPropertyBeingAssigned(
// instanceVariable,
// "f1"
// );
// // Find definition of TestOmit.f1 property
// const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
// const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
// SyntaxKind.VariableDeclaration
// );
// // Assert that find definition returned the Zod definition of Test
// expect(definitionOfProperty?.getText()).toEqual("f1: z.number()");
// expect(parentOfProperty?.getName()).toEqual("Test");
// });
// });
// const getPropertyBeingAssigned = (node: Node, name: string) => {
// const propertyAssignment = node.forEachDescendant((descendent) =>
// Node.isPropertyAssignment(descendent) && descendent.getName() == name
// ? descendent
// : undefined
// );
// if (propertyAssignment == null)
// fail(`Could not find property assignment with name ${name}`);
// const propertyLiteral = propertyAssignment.getFirstDescendantByKind(
// SyntaxKind.Identifier
// );
// if (propertyLiteral == null)
// fail(`Could not find property literal with name ${name}`);
// return propertyLiteral;
// };
@@ -0,0 +1,60 @@
import { r as resolveCoverageProviderModule } from './coverage.CTzCuANN.js';
import { addSerializer } from '@vitest/snapshot';
import { setSafeTimers } from '@vitest/utils/timers';
import { g as getWorkerState } from './utils.BX5Fg8C4.js';
async function startCoverageInsideWorker(options, loader, runtimeOptions) {
const coverageModule = await resolveCoverageProviderModule(options, loader);
if (coverageModule) return coverageModule.startCoverage?.(runtimeOptions);
return null;
}
async function takeCoverageInsideWorker(options, loader) {
const coverageModule = await resolveCoverageProviderModule(options, loader);
if (coverageModule) return coverageModule.takeCoverage?.({ moduleExecutionInfo: loader.moduleExecutionInfo });
return null;
}
async function stopCoverageInsideWorker(options, loader, runtimeOptions) {
const coverageModule = await resolveCoverageProviderModule(options, loader);
if (coverageModule) return coverageModule.stopCoverage?.(runtimeOptions);
return null;
}
let globalSetup = false;
async function setupCommonEnv(config) {
setupDefines(config);
setupEnv(config.env);
if (globalSetup) return;
globalSetup = true;
setSafeTimers();
if (config.globals) (await import('./globals.Dj1TGiMC.js')).registerApiGlobally();
}
function setupDefines(config) {
for (const key in config.defines) globalThis[key] = config.defines[key];
}
function setupEnv(env) {
const state = getWorkerState();
// same boolean-to-string assignment as VitestPlugin.configResolved
const { PROD, DEV, ...restEnvs } = env;
state.metaEnv.PROD = PROD;
state.metaEnv.DEV = DEV;
for (const key in restEnvs) state.metaEnv[key] = env[key];
}
async function loadDiffConfig(config, moduleRunner) {
if (typeof config.diff === "object") return config.diff;
if (typeof config.diff !== "string") return;
const diffModule = await moduleRunner.import(config.diff);
if (diffModule && typeof diffModule.default === "object" && diffModule.default != null) return diffModule.default;
else throw new Error(`invalid diff config file ${config.diff}. Must have a default export with config object`);
}
async function loadSnapshotSerializers(config, moduleRunner) {
const files = config.snapshotSerializers;
(await Promise.all(files.map(async (file) => {
const mo = await moduleRunner.import(file);
if (!mo || typeof mo.default !== "object" || mo.default === null) throw new Error(`invalid snapshot serializer file ${file}. Must export a default object`);
const config = mo.default;
if (typeof config.test !== "function" || typeof config.serialize !== "function" && typeof config.print !== "function") throw new TypeError(`invalid snapshot serializer in ${file}. Must have a 'test' method along with either a 'serialize' or 'print' method.`);
return config;
}))).forEach((serializer) => addSerializer(serializer));
}
export { loadSnapshotSerializers as a, startCoverageInsideWorker as b, stopCoverageInsideWorker as c, loadDiffConfig as l, setupCommonEnv as s, takeCoverageInsideWorker as t };
@@ -0,0 +1,72 @@
{
"name": "json5",
"version": "2.2.3",
"description": "JSON for Humans",
"main": "lib/index.js",
"module": "dist/index.mjs",
"bin": "lib/cli.js",
"browser": "dist/index.js",
"types": "lib/index.d.ts",
"files": [
"lib/",
"dist/"
],
"engines": {
"node": ">=6"
},
"scripts": {
"build": "rollup -c",
"build-package": "node build/package.js",
"build-unicode": "node build/unicode.js",
"coverage": "tap --coverage-report html test",
"lint": "eslint --fix .",
"lint-report": "eslint .",
"prepublishOnly": "npm run production",
"preversion": "npm run production",
"production": "run-s test build",
"tap": "tap -Rspec --100 test",
"test": "run-s lint-report tap",
"version": "npm run build-package && git add package.json5"
},
"repository": {
"type": "git",
"url": "git+https://github.com/json5/json5.git"
},
"keywords": [
"json",
"json5",
"es5",
"es2015",
"ecmascript"
],
"author": "Aseem Kishore <aseem.kishore@gmail.com>",
"contributors": [
"Max Nanasy <max.nanasy@gmail.com>",
"Andrew Eisenberg <andrew@eisenberg.as>",
"Jordan Tucker <jordanbtucker@gmail.com>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/json5/json5/issues"
},
"homepage": "http://json5.org/",
"devDependencies": {
"core-js": "^2.6.5",
"eslint": "^5.15.3",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"npm-run-all": "^4.1.5",
"regenerate": "^1.4.0",
"rollup": "^0.64.1",
"rollup-plugin-buble": "^0.19.6",
"rollup-plugin-commonjs": "^9.2.1",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-terser": "^1.0.1",
"sinon": "^6.3.5",
"tap": "^12.6.0",
"unicode-10.0.0": "^0.7.5"
}
}
@@ -0,0 +1,29 @@
'use strict'
const test = require('tape')
const fastURI = require('..')
test('URN parsing validates the complete scheme-specific input', (t) => {
const embedded = fastURI.parse('urn:x|foo:bar')
t.equal(embedded.error, 'URN can not be parsed.', 'does not search for a later nid:nss substring')
t.equal(embedded.nid, undefined, 'does not adopt the later nid')
t.equal(embedded.nss, undefined, 'does not adopt the later nss')
const trailing = fastURI.parse('urn:foo:bar|ignored')
t.equal(trailing.error, 'URN can not be parsed.', 'rejects trailing input outside the RFC 2141 NSS grammar')
t.equal(trailing.nid, undefined, 'does not return an nid from a partial match')
t.equal(trailing.nss, undefined, 'does not return a truncated nss')
t.end()
})
test('URN parsing preserves the complete RFC 2141 NSS', (t) => {
const parsed = fastURI.parse('urn:foo:allowed/evil')
t.equal(parsed.error, undefined, 'accepts slash in an RFC 2141 NSS')
t.equal(parsed.nid, 'foo', 'parses the nid')
t.equal(parsed.nss, 'allowed/evil', 'preserves the complete NSS')
t.equal(fastURI.normalize('urn:foo:allowed/evil'), 'urn:foo:allowed/evil', 'normalization retains slash data')
t.equal(fastURI.equal('urn:foo:allowed/evil', 'urn:foo:allowed'), false, 'distinct NSS values do not compare equal')
t.end()
})
@@ -0,0 +1,133 @@
// NOTE: Users of the `experimental` builds of React should add a reference
// to 'react-dom/experimental' in their project. See experimental.d.ts's top comment
// for reference and documentation on how exactly to do it.
export as namespace ReactDOM;
import { Key, ReactNode, ReactPortal } from "react";
declare module "react" {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface CacheSignal extends AbortSignal {}
}
export function createPortal(
children: ReactNode,
container: Element | DocumentFragment,
key?: Key | null,
): ReactPortal;
export const version: string;
export function flushSync<R>(fn: () => R): R;
export function unstable_batchedUpdates<A, R>(callback: (a: A) => R, a: A): R;
export function unstable_batchedUpdates<R>(callback: () => R): R;
export interface FormStatusNotPending {
pending: false;
data: null;
method: null;
action: null;
}
export interface FormStatusPending {
pending: true;
data: FormData;
method: string;
action: string | ((formData: FormData) => void | Promise<void>);
}
export type FormStatus = FormStatusPending | FormStatusNotPending;
export function useFormStatus(): FormStatus;
export function useFormState<State>(
action: (state: Awaited<State>) => State | Promise<State>,
initialState: Awaited<State>,
permalink?: string,
): [state: Awaited<State>, dispatch: () => void, isPending: boolean];
export function useFormState<State, Payload>(
action: (state: Awaited<State>, payload: Payload) => State | Promise<State>,
initialState: Awaited<State>,
permalink?: string,
): [state: Awaited<State>, dispatch: (payload: Payload) => void, isPending: boolean];
export function prefetchDNS(href: string): void;
export interface PreconnectOptions {
// Don't create a helper type.
// It would have to be in module scope to be inlined in TS tooltips.
// But then it becomes part of the public API.
// TODO: Upstream to microsoft/TypeScript-DOM-lib-generator -> w3c/webref
// since the spec has a notion of a dedicated type: https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attribute
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
}
export function preconnect(href: string, options?: PreconnectOptions): void;
export type PreloadAs =
| "audio"
| "document"
| "embed"
| "fetch"
| "font"
| "image"
| "object"
| "track"
| "script"
| "style"
| "video"
| "worker";
export interface PreloadOptions {
as: PreloadAs;
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
fetchPriority?: "high" | "low" | "auto" | undefined;
// TODO: These should only be allowed with `as: 'image'` but it's not trivial to write tests against the full TS support matrix.
imageSizes?: string | undefined;
imageSrcSet?: string | undefined;
integrity?: string | undefined;
type?: string | undefined;
nonce?: string | undefined;
referrerPolicy?: ReferrerPolicy | undefined;
media?: string | undefined;
}
export function preload(href: string, options?: PreloadOptions): void;
// https://html.spec.whatwg.org/multipage/links.html#link-type-modulepreload
export type PreloadModuleAs = RequestDestination;
export interface PreloadModuleOptions {
/**
* @default "script"
*/
as: PreloadModuleAs;
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
integrity?: string | undefined;
nonce?: string | undefined;
}
export function preloadModule(href: string, options?: PreloadModuleOptions): void;
export type PreinitAs = "script" | "style";
export interface PreinitOptions {
as: PreinitAs;
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
fetchPriority?: "high" | "low" | "auto" | undefined;
precedence?: string | undefined;
integrity?: string | undefined;
nonce?: string | undefined;
}
export function preinit(href: string, options?: PreinitOptions): void;
// Will be expanded to include all of https://github.com/tc39/proposal-import-attributes
export type PreinitModuleAs = "script";
export interface PreinitModuleOptions {
/**
* @default "script"
*/
as?: PreinitModuleAs;
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
integrity?: string | undefined;
nonce?: string | undefined;
}
export function preinitModule(href: string, options?: PreinitModuleOptions): void;
export function requestFormReset(form: HTMLFormElement): void;
@@ -0,0 +1,20 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const AlignHorizontalDistributeCenter = createLucideIcon("AlignHorizontalDistributeCenter", [
["rect", { width: "6", height: "14", x: "4", y: "5", rx: "2", key: "1wwnby" }],
["rect", { width: "6", height: "10", x: "14", y: "7", rx: "2", key: "1fe6j6" }],
["path", { d: "M17 22v-5", key: "4b6g73" }],
["path", { d: "M17 7V2", key: "hnrr36" }],
["path", { d: "M7 22v-3", key: "1r4jpn" }],
["path", { d: "M7 5V2", key: "liy1u9" }]
]);
export { AlignHorizontalDistributeCenter as default };
//# sourceMappingURL=align-horizontal-distribute-center.js.map
@@ -0,0 +1 @@
{"version":3,"file":"each-axis.mjs","sources":["../../../../src/projection/utils/each-axis.ts"],"sourcesContent":["type Callback = (axis: \"x\" | \"y\") => void\n\nexport function eachAxis(callback: Callback) {\n return [callback(\"x\"), callback(\"y\")]\n}\n"],"names":[],"mappings":"AAEM,SAAU,QAAQ,CAAC,QAAkB,EAAA;IACvC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;AACzC;;;;"}
@@ -0,0 +1,182 @@
"use strict"
var Buffer = require("safer-buffer").Buffer
var bomHandling = require("./bom-handling")
var mergeModules = require("./helpers/merge-exports")
// All codecs and aliases are kept here, keyed by encoding name/alias.
// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`.
// Cannot initialize with { __proto__: null } because Boolean({ __proto__: null }) === true
module.exports.encodings = null
// Characters emitted in case of error.
module.exports.defaultCharUnicode = "�"
module.exports.defaultCharSingleByte = "?"
// Public API.
module.exports.encode = function encode (str, encoding, options) {
str = "" + (str || "") // Ensure string.
var encoder = module.exports.getEncoder(encoding, options)
var res = encoder.write(str)
var trail = encoder.end()
return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res
}
module.exports.decode = function decode (buf, encoding, options) {
if (typeof buf === "string") {
if (!module.exports.skipDecodeWarning) {
console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding")
module.exports.skipDecodeWarning = true
}
buf = Buffer.from("" + (buf || ""), "binary") // Ensure buffer.
}
var decoder = module.exports.getDecoder(encoding, options)
var res = decoder.write(buf)
var trail = decoder.end()
return trail ? (res + trail) : res
}
module.exports.encodingExists = function encodingExists (enc) {
try {
module.exports.getCodec(enc)
return true
} catch (e) {
return false
}
}
// Legacy aliases to convert functions
module.exports.toEncoding = module.exports.encode
module.exports.fromEncoding = module.exports.decode
// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache.
module.exports._codecDataCache = { __proto__: null }
module.exports.getCodec = function getCodec (encoding) {
if (!module.exports.encodings) {
var raw = require("../encodings")
// TODO: In future versions when old nodejs support is removed can use object.assign
module.exports.encodings = { __proto__: null } // Initialize as empty object.
mergeModules(module.exports.encodings, raw)
}
// Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
var enc = module.exports._canonicalizeEncoding(encoding)
// Traverse iconv.encodings to find actual codec.
var codecOptions = {}
while (true) {
var codec = module.exports._codecDataCache[enc]
if (codec) { return codec }
var codecDef = module.exports.encodings[enc]
switch (typeof codecDef) {
case "string": // Direct alias to other encoding.
enc = codecDef
break
case "object": // Alias with options. Can be layered.
for (var key in codecDef) { codecOptions[key] = codecDef[key] }
if (!codecOptions.encodingName) { codecOptions.encodingName = enc }
enc = codecDef.type
break
case "function": // Codec itself.
if (!codecOptions.encodingName) { codecOptions.encodingName = enc }
// The codec function must load all tables and return object with .encoder and .decoder methods.
// It'll be called only once (for each different options object).
//
codec = new codecDef(codecOptions, module.exports)
module.exports._codecDataCache[codecOptions.encodingName] = codec // Save it to be reused later.
return codec
default:
throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '" + enc + "')")
}
}
}
module.exports._canonicalizeEncoding = function (encoding) {
// Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
return ("" + encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, "")
}
module.exports.getEncoder = function getEncoder (encoding, options) {
var codec = module.exports.getCodec(encoding)
var encoder = new codec.encoder(options, codec)
if (codec.bomAware && options && options.addBOM) { encoder = new bomHandling.PrependBOM(encoder, options) }
return encoder
}
module.exports.getDecoder = function getDecoder (encoding, options) {
var codec = module.exports.getCodec(encoding)
var decoder = new codec.decoder(options, codec)
if (codec.bomAware && !(options && options.stripBOM === false)) { decoder = new bomHandling.StripBOM(decoder, options) }
return decoder
}
// Streaming API
// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add
// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default.
// If you would like to enable it explicitly, please add the following code to your app:
// > iconv.enableStreamingAPI(require('stream'));
module.exports.enableStreamingAPI = function enableStreamingAPI (streamModule) {
if (module.exports.supportsStreams) { return }
// Dependency-inject stream module to create IconvLite stream classes.
var streams = require("./streams")(streamModule)
// Not public API yet, but expose the stream classes.
module.exports.IconvLiteEncoderStream = streams.IconvLiteEncoderStream
module.exports.IconvLiteDecoderStream = streams.IconvLiteDecoderStream
// Streaming API.
module.exports.encodeStream = function encodeStream (encoding, options) {
return new module.exports.IconvLiteEncoderStream(module.exports.getEncoder(encoding, options), options)
}
module.exports.decodeStream = function decodeStream (encoding, options) {
return new module.exports.IconvLiteDecoderStream(module.exports.getDecoder(encoding, options), options)
}
module.exports.supportsStreams = true
}
// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments).
var streamModule
try {
streamModule = require("stream")
} catch (e) {}
if (streamModule && streamModule.Transform) {
module.exports.enableStreamingAPI(streamModule)
} else {
// In rare cases where 'stream' module is not available by default, throw a helpful exception.
module.exports.encodeStream = module.exports.decodeStream = function () {
throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.")
}
}
// Some environments, such as browsers, may not load JavaScript files as UTF-8
// eslint-disable-next-line no-constant-condition
if ("Ā" !== "\u0100") {
console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info.")
}
@@ -0,0 +1,245 @@
{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{# def.setupNextLevel }}
{{## def.validateAdditional:
{{ /* additionalProperties is schema */
$it.schema = $aProperties;
$it.schemaPath = it.schemaPath + '.additionalProperties';
$it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
$it.errorPath = it.opts._errorDataPathProperty
? it.errorPath
: it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
var $passData = $data + '[' + $key + ']';
$it.dataPathArr[$dataNxt] = $key;
}}
{{# def.generateSubschemaCode }}
{{# def.optimizeValidate }}
#}}
{{
var $key = 'key' + $lvl
, $idx = 'idx' + $lvl
, $dataNxt = $it.dataLevel = it.dataLevel + 1
, $nextData = 'data' + $dataNxt
, $dataProperties = 'dataProperties' + $lvl;
var $schemaKeys = Object.keys($schema || {}).filter(notProto)
, $pProperties = it.schema.patternProperties || {}
, $pPropertyKeys = Object.keys($pProperties).filter(notProto)
, $aProperties = it.schema.additionalProperties
, $someProperties = $schemaKeys.length || $pPropertyKeys.length
, $noAdditional = $aProperties === false
, $additionalIsSchema = typeof $aProperties == 'object'
&& Object.keys($aProperties).length
, $removeAdditional = it.opts.removeAdditional
, $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional
, $ownProperties = it.opts.ownProperties
, $currentBaseId = it.baseId;
var $required = it.schema.required;
if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) {
var $requiredHash = it.util.toHash($required);
}
function notProto(p) { return p !== '__proto__'; }
}}
var {{=$errs}} = errors;
var {{=$nextValid}} = true;
{{? $ownProperties }}
var {{=$dataProperties}} = undefined;
{{?}}
{{? $checkAdditional }}
{{# def.iterateProperties }}
{{? $someProperties }}
var isAdditional{{=$lvl}} = !(false
{{? $schemaKeys.length }}
{{? $schemaKeys.length > 8 }}
|| validate.schema{{=$schemaPath}}.hasOwnProperty({{=$key}})
{{??}}
{{~ $schemaKeys:$propertyKey }}
|| {{=$key}} == {{= it.util.toQuotedString($propertyKey) }}
{{~}}
{{?}}
{{?}}
{{? $pPropertyKeys.length }}
{{~ $pPropertyKeys:$pProperty:$i }}
|| {{= it.usePattern($pProperty) }}.test({{=$key}})
{{~}}
{{?}}
);
if (isAdditional{{=$lvl}}) {
{{?}}
{{? $removeAdditional == 'all' }}
delete {{=$data}}[{{=$key}}];
{{??}}
{{
var $currentErrorPath = it.errorPath;
var $additionalProperty = '\' + ' + $key + ' + \'';
if (it.opts._errorDataPathProperty) {
it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
}
}}
{{? $noAdditional }}
{{? $removeAdditional }}
delete {{=$data}}[{{=$key}}];
{{??}}
{{=$nextValid}} = false;
{{
var $currErrSchemaPath = $errSchemaPath;
$errSchemaPath = it.errSchemaPath + '/additionalProperties';
}}
{{# def.error:'additionalProperties' }}
{{ $errSchemaPath = $currErrSchemaPath; }}
{{? $breakOnError }} break; {{?}}
{{?}}
{{?? $additionalIsSchema }}
{{? $removeAdditional == 'failing' }}
var {{=$errs}} = errors;
{{# def.setCompositeRule }}
{{# def.validateAdditional }}
if (!{{=$nextValid}}) {
errors = {{=$errs}};
if (validate.errors !== null) {
if (errors) validate.errors.length = errors;
else validate.errors = null;
}
delete {{=$data}}[{{=$key}}];
}
{{# def.resetCompositeRule }}
{{??}}
{{# def.validateAdditional }}
{{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
{{?}}
{{?}}
{{ it.errorPath = $currentErrorPath; }}
{{?}}
{{? $someProperties }}
}
{{?}}
}
{{# def.ifResultValid }}
{{?}}
{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }}
{{? $schemaKeys.length }}
{{~ $schemaKeys:$propertyKey }}
{{ var $sch = $schema[$propertyKey]; }}
{{? {{# def.nonEmptySchema:$sch}} }}
{{
var $prop = it.util.getProperty($propertyKey)
, $passData = $data + $prop
, $hasDefault = $useDefaults && $sch.default !== undefined;
$it.schema = $sch;
$it.schemaPath = $schemaPath + $prop;
$it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
$it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
$it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
}}
{{# def.generateSubschemaCode }}
{{? {{# def.willOptimize }} }}
{{
$code = {{# def._optimizeValidate }};
var $useData = $passData;
}}
{{??}}
{{ var $useData = $nextData; }}
var {{=$nextData}} = {{=$passData}};
{{?}}
{{? $hasDefault }}
{{= $code }}
{{??}}
{{? $requiredHash && $requiredHash[$propertyKey] }}
if ({{# def.noPropertyInData }}) {
{{=$nextValid}} = false;
{{
var $currentErrorPath = it.errorPath
, $currErrSchemaPath = $errSchemaPath
, $missingProperty = it.util.escapeQuotes($propertyKey);
if (it.opts._errorDataPathProperty) {
it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
}
$errSchemaPath = it.errSchemaPath + '/required';
}}
{{# def.error:'required' }}
{{ $errSchemaPath = $currErrSchemaPath; }}
{{ it.errorPath = $currentErrorPath; }}
} else {
{{??}}
{{? $breakOnError }}
if ({{# def.noPropertyInData }}) {
{{=$nextValid}} = true;
} else {
{{??}}
if ({{=$useData}} !== undefined
{{? $ownProperties }}
&& {{# def.isOwnProperty }}
{{?}}
) {
{{?}}
{{?}}
{{= $code }}
}
{{?}} {{ /* $hasDefault */ }}
{{?}} {{ /* def.nonEmptySchema */ }}
{{# def.ifResultValid }}
{{~}}
{{?}}
{{? $pPropertyKeys.length }}
{{~ $pPropertyKeys:$pProperty }}
{{ var $sch = $pProperties[$pProperty]; }}
{{? {{# def.nonEmptySchema:$sch}} }}
{{
$it.schema = $sch;
$it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
$it.errSchemaPath = it.errSchemaPath + '/patternProperties/'
+ it.util.escapeFragment($pProperty);
}}
{{# def.iterateProperties }}
if ({{= it.usePattern($pProperty) }}.test({{=$key}})) {
{{
$it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
var $passData = $data + '[' + $key + ']';
$it.dataPathArr[$dataNxt] = $key;
}}
{{# def.generateSubschemaCode }}
{{# def.optimizeValidate }}
{{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
}
{{? $breakOnError }} else {{=$nextValid}} = true; {{?}}
}
{{# def.ifResultValid }}
{{?}} {{ /* def.nonEmptySchema */ }}
{{~}}
{{?}}
{{? $breakOnError }}
{{= $closingBraces }}
if ({{=$errs}} == errors) {
{{?}}
@@ -0,0 +1,14 @@
import { ParsedLocation, ScrollRestorationEntry, ScrollRestorationOptions } from '@tanstack/router-core';
/**
* @deprecated Use the `scrollRestoration` router option instead.
*/
export declare function ScrollRestoration(_props: ScrollRestorationOptions): null;
export declare function useElementScrollRestoration(options: ({
id: string;
getElement?: () => Window | Element | undefined | null;
} | {
id?: string;
getElement: () => Window | Element | undefined | null;
}) & {
getKey?: (location: ParsedLocation) => string;
}): ScrollRestorationEntry | undefined;
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FilePlus = createLucideIcon("FilePlus", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M9 15h6", key: "cctwl0" }],
["path", { d: "M12 18v-6", key: "17g6i2" }]
]);
export { FilePlus as default };
//# sourceMappingURL=file-plus.js.map
@@ -0,0 +1,29 @@
'use strict'
// https://github.com/jprichardson/node-fs-extra/issues/1056
// Performing parallel operations on each item of an async iterator is
// surprisingly hard; you need to have handlers in place to avoid getting an
// UnhandledPromiseRejectionWarning.
// NOTE: This function does not presently handle return values, only errors
async function asyncIteratorConcurrentProcess (iterator, fn) {
const promises = []
for await (const item of iterator) {
promises.push(
fn(item).then(
() => null,
(err) => err ?? new Error('unknown error')
)
)
}
await Promise.all(
promises.map((promise) =>
promise.then((possibleErr) => {
if (possibleErr !== null) throw possibleErr
})
)
)
}
module.exports = {
asyncIteratorConcurrentProcess
}
@@ -0,0 +1,163 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = parseAndBuildMetadata;
var _t = require("@babel/types");
var _parser = require("@babel/parser");
var _codeFrame = require("@babel/code-frame");
const {
isCallExpression,
isExpressionStatement,
isFunction,
isIdentifier,
isJSXIdentifier,
isNewExpression,
isPlaceholder,
isStatement,
isStringLiteral,
removePropertiesDeep,
traverse
} = _t;
const PATTERN = /^[_$A-Z0-9]+$/;
function parseAndBuildMetadata(formatter, code, opts) {
const {
placeholderWhitelist,
placeholderPattern,
preserveComments,
syntacticPlaceholders
} = opts;
const ast = parseWithCodeFrame(code, opts.parser, syntacticPlaceholders);
removePropertiesDeep(ast, {
preserveComments
});
formatter.validate(ast);
const state = {
syntactic: {
placeholders: [],
placeholderNames: new Set()
},
legacy: {
placeholders: [],
placeholderNames: new Set()
},
placeholderWhitelist,
placeholderPattern,
syntacticPlaceholders
};
traverse(ast, placeholderVisitorHandler, state);
return Object.assign({
ast
}, state.syntactic.placeholders.length ? state.syntactic : state.legacy);
}
function placeholderVisitorHandler(node, ancestors, state) {
var _state$placeholderWhi;
let name;
let hasSyntacticPlaceholders = state.syntactic.placeholders.length > 0;
if (isPlaceholder(node)) {
if (state.syntacticPlaceholders === false) {
throw new Error("%%foo%%-style placeholders can't be used when " + "'.syntacticPlaceholders' is false.");
}
name = node.name.name;
hasSyntacticPlaceholders = true;
} else if (hasSyntacticPlaceholders || state.syntacticPlaceholders) {
return;
} else if (isIdentifier(node) || isJSXIdentifier(node)) {
name = node.name;
} else if (isStringLiteral(node)) {
name = node.value;
} else {
return;
}
if (hasSyntacticPlaceholders && (state.placeholderPattern != null || state.placeholderWhitelist != null)) {
throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'");
}
if (!hasSyntacticPlaceholders && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name)) && !((_state$placeholderWhi = state.placeholderWhitelist) != null && _state$placeholderWhi.has(name))) {
return;
}
ancestors = ancestors.slice();
const {
node: parent,
key
} = ancestors[ancestors.length - 1];
let type;
if (isStringLiteral(node) || isPlaceholder(node, {
expectedNode: "StringLiteral"
})) {
type = "string";
} else if (isNewExpression(parent) && key === "arguments" || isCallExpression(parent) && key === "arguments" || isFunction(parent) && key === "params") {
type = "param";
} else if (isExpressionStatement(parent) && !isPlaceholder(node)) {
type = "statement";
ancestors = ancestors.slice(0, -1);
} else if (isStatement(node) && isPlaceholder(node)) {
type = "statement";
} else {
type = "other";
}
const {
placeholders,
placeholderNames
} = !hasSyntacticPlaceholders ? state.legacy : state.syntactic;
placeholders.push({
name,
type,
resolve: ast => resolveAncestors(ast, ancestors),
isDuplicate: placeholderNames.has(name)
});
placeholderNames.add(name);
}
function resolveAncestors(ast, ancestors) {
let parent = ast;
for (let i = 0; i < ancestors.length - 1; i++) {
const {
key,
index
} = ancestors[i];
if (index === undefined) {
parent = parent[key];
} else {
parent = parent[key][index];
}
}
const {
key,
index
} = ancestors[ancestors.length - 1];
return {
parent,
key,
index
};
}
function parseWithCodeFrame(code, parserOpts, syntacticPlaceholders) {
const plugins = (parserOpts.plugins || []).slice();
if (syntacticPlaceholders !== false) {
plugins.push("placeholders");
}
parserOpts = Object.assign({
allowAwaitOutsideFunction: true,
allowReturnOutsideFunction: true,
allowNewTargetOutsideFunction: true,
allowSuperOutsideMethod: true,
allowYieldOutsideFunction: true,
sourceType: "module"
}, parserOpts, {
plugins
});
try {
return (0, _parser.parse)(code, parserOpts);
} catch (err) {
const loc = err.loc;
if (loc) {
err.message += "\n" + (0, _codeFrame.codeFrameColumns)(code, {
start: loc
});
err.code = "BABEL_TEMPLATE_PARSE_ERROR";
}
throw err;
}
}
//# sourceMappingURL=parse.js.map
@@ -0,0 +1,26 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ClipboardList = createLucideIcon("ClipboardList", [
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
[
"path",
{
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
key: "116196"
}
],
["path", { d: "M12 11h4", key: "1jrz19" }],
["path", { d: "M12 16h4", key: "n85exb" }],
["path", { d: "M8 11h.01", key: "1dfujw" }],
["path", { d: "M8 16h.01", key: "18s6g9" }]
]);
export { ClipboardList as default };
//# sourceMappingURL=clipboard-list.js.map