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,21 @@
/**
* @deprecated The `node:constants` module is deprecated. When requiring access to constants
* relevant to specific Node.js builtin modules, developers should instead refer
* to the `constants` property exposed by the relevant module. For instance,
* `require('node:fs').constants` and `require('node:os').constants`.
*/
declare module "constants" {
const constants:
& typeof import("node:os").constants.dlopen
& typeof import("node:os").constants.errno
& typeof import("node:os").constants.priority
& typeof import("node:os").constants.signals
& typeof import("node:fs").constants
& typeof import("node:crypto").constants;
export = constants;
}
declare module "node:constants" {
import constants = require("constants");
export = constants;
}
@@ -0,0 +1,296 @@
{
"name": "rollup",
"version": "4.60.4",
"description": "Next-generation ES module bundler",
"main": "dist/rollup.js",
"module": "dist/es/rollup.js",
"types": "dist/rollup.d.ts",
"bin": {
"rollup": "dist/bin/rollup"
},
"napi": {
"binaryName": "rollup",
"packageName": "@rollup/rollup",
"targets": [
"aarch64-apple-darwin",
"aarch64-linux-android",
"aarch64-pc-windows-msvc",
"aarch64-unknown-freebsd",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"armv7-linux-androideabi",
"armv7-unknown-linux-gnueabihf",
"armv7-unknown-linux-musleabihf",
"i686-pc-windows-msvc",
"loongarch64-unknown-linux-gnu",
"loongarch64-unknown-linux-musl",
"riscv64gc-unknown-linux-gnu",
"riscv64gc-unknown-linux-musl",
"powerpc64le-unknown-linux-gnu",
"powerpc64le-unknown-linux-musl",
"s390x-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-gnu",
"x86_64-pc-windows-msvc",
"x86_64-unknown-freebsd",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"x86_64-unknown-openbsd",
"aarch64-unknown-linux-ohos"
]
},
"scripts": {
"build": "concurrently -c green,blue \"npm run build:wasm\" \"npm:build:ast-converters\" && concurrently -c green,blue \"npm run build:napi -- --release\" \"npm:build:js\" && npm run build:copy-native",
"build:quick": "concurrently -c green,blue 'npm:build:napi' 'npm:build:cjs' && npm run build:copy-native",
"build:napi": "napi build --cwd rust/bindings_napi --platform --dts ../../native.d.ts --no-js --output-dir ../.. --package-json-path ../../package.json",
"build:wasm": "wasm-pack build rust/bindings_wasm --out-dir ../../wasm --target web --no-pack && shx rm wasm/.gitignore",
"build:wasm:node": "wasm-pack build rust/bindings_wasm --out-dir ../../wasm-node --target nodejs --no-pack && shx rm wasm-node/.gitignore",
"update:napi": "npm run build:napi && npm run build:copy-native",
"build:js": "rollup --config rollup.config.ts --configPlugin typescript --forceExit",
"build:js:node": "rollup --config rollup.config.ts --configPlugin typescript --configIsBuildNode --forceExit",
"build:prepare": "concurrently -c green,blue \"npm run build:napi -- --release\" \"npm:build:js:node\" && npm run build:copy-native",
"update:js": "npm run build:js && npm run build:copy-native",
"build:copy-native": "shx mkdir -p dist && shx cp rollup.*.node dist/",
"dev": "concurrently -kc green,blue 'nodemon --watch rust -e rs --exec \"npm run build:wasm\"' 'vitepress dev docs'",
"build:cjs": "rollup --config rollup.config.ts --configPlugin typescript --configTest --forceExit",
"build:bootstrap": "shx mv dist dist-build && node dist-build/bin/rollup --config rollup.config.ts --configPlugin typescript --forceExit && shx rm -rf dist-build",
"build:bootstrap:cjs": "shx mv dist dist-build && node dist-build/bin/rollup --config rollup.config.ts --configPlugin typescript --configTest --forceExit && shx rm -rf dist-build",
"build:docs": "vitepress build docs",
"build:ast-converters": "node scripts/generate-ast-converters.js",
"preview:docs": "vitepress preview docs",
"ci:artifacts": "napi artifacts",
"ci:lint": "concurrently -c red,yellow,green,blue 'npm:lint:js:nofix' 'npm:lint:native-js' 'npm:lint:markdown:nofix' 'npm:lint:rust:nofix'",
"ci:test:all": "concurrently --kill-others-on-fail -c green,blue,magenta,cyan 'npm:test:only' 'npm:test:typescript' 'npm:test:leak' 'npm:test:browser'",
"ci:coverage": "NODE_OPTIONS=--no-experimental-require-module nyc --reporter lcovonly mocha",
"lint": "concurrently -c red,yellow,green,blue 'npm:lint:js' 'npm:lint:native-js' 'npm:lint:markdown' 'npm:lint:rust'",
"lint:js": "eslint . --fix --cache --concurrency auto",
"lint:js:nofix": "eslint . --cache --concurrency auto",
"lint:native-js": "node scripts/lint-native-js.js",
"lint:markdown": "prettier --write \"**/*.md\"",
"lint:markdown:nofix": "prettier --check \"**/*.md\"",
"lint:rust": "cd rust && cargo fmt && cargo clippy --fix --allow-dirty",
"lint:rust:nofix": "cd rust && cargo fmt --check && cargo clippy",
"perf": "npm run build:bootstrap:cjs && node --expose-gc scripts/perf-report/index.js",
"prepare": "husky && npm run prepare:patch && node scripts/check-release.js || npm run build:prepare",
"prepare:patch": "patch-package",
"prepublishOnly": "node scripts/check-release.js && node scripts/prepublish.js",
"postpublish": "node scripts/postpublish.js",
"prepublish:napi": "napi prepublish --no-gh-release",
"release": "node scripts/prepare-release.js",
"release:docs": "git fetch --update-head-ok origin master:master && git branch --force documentation-published master && git push origin documentation-published",
"check-audit": "check-audit",
"resolve-audit": "resolve-audit",
"test": "npm run build && npm run test:all",
"test:update-snapshots": "node scripts/update-snapshots.js",
"test:cjs": "npm run build:cjs && npm run test:only",
"test:quick": "mocha -b test/test.js",
"test:all": "concurrently --kill-others-on-fail -c green,blue,magenta,cyan,red 'npm:test:only' 'npm:test:browser' 'npm:test:typescript' 'npm:test:package' 'npm:test:options'",
"test:coverage": "npm run build:cjs && shx rm -rf coverage/* && nyc --reporter html mocha test/test.js",
"test:coverage:browser": "npm run build && shx rm -rf coverage/* && nyc mocha test/browser/index.js",
"test:leak": "npm install --no-save weak-napi && node --expose-gc test/leak/index.js",
"test:package": "node scripts/test-package.js",
"test:options": "node scripts/test-options.js",
"test:only": "mocha test/test.js",
"test:typescript": "shx rm -rf test/typescript/dist && shx cp -r dist test/typescript/ && tsc --noEmit -p test/typescript && tsc --noEmit -p . && tsc --noEmit -p scripts && vue-tsc --noEmit -p docs",
"test:browser": "mocha test/browser/index.js",
"watch": "rollup --config rollup.config.ts --configPlugin typescript --watch"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rollup/rollup.git"
},
"keywords": [
"modules",
"bundler",
"bundling",
"es6",
"optimizer"
],
"author": "Rich Harris",
"license": "MIT",
"bugs": {
"url": "https://github.com/rollup/rollup/issues"
},
"homepage": "https://rollupjs.org/",
"optionalDependencies": {
"fsevents": "~2.3.2",
"@rollup/rollup-darwin-arm64": "4.60.4",
"@rollup/rollup-android-arm64": "4.60.4",
"@rollup/rollup-win32-arm64-msvc": "4.60.4",
"@rollup/rollup-freebsd-arm64": "4.60.4",
"@rollup/rollup-linux-arm64-gnu": "4.60.4",
"@rollup/rollup-linux-arm64-musl": "4.60.4",
"@rollup/rollup-android-arm-eabi": "4.60.4",
"@rollup/rollup-linux-arm-gnueabihf": "4.60.4",
"@rollup/rollup-linux-arm-musleabihf": "4.60.4",
"@rollup/rollup-win32-ia32-msvc": "4.60.4",
"@rollup/rollup-linux-loong64-gnu": "4.60.4",
"@rollup/rollup-linux-loong64-musl": "4.60.4",
"@rollup/rollup-linux-riscv64-gnu": "4.60.4",
"@rollup/rollup-linux-riscv64-musl": "4.60.4",
"@rollup/rollup-linux-ppc64-gnu": "4.60.4",
"@rollup/rollup-linux-ppc64-musl": "4.60.4",
"@rollup/rollup-linux-s390x-gnu": "4.60.4",
"@rollup/rollup-darwin-x64": "4.60.4",
"@rollup/rollup-win32-x64-gnu": "4.60.4",
"@rollup/rollup-win32-x64-msvc": "4.60.4",
"@rollup/rollup-freebsd-x64": "4.60.4",
"@rollup/rollup-linux-x64-gnu": "4.60.4",
"@rollup/rollup-linux-x64-musl": "4.60.4",
"@rollup/rollup-openbsd-x64": "4.60.4",
"@rollup/rollup-openharmony-arm64": "4.60.4"
},
"dependencies": {
"@types/estree": "1.0.8"
},
"devDependenciesComments": {
"core-js": "We only update manually as every update requires a snapshot update"
},
"devDependencies": {
"@codemirror/commands": "^6.10.3",
"@codemirror/lang-javascript": "^6.2.5",
"@codemirror/language": "^6.12.3",
"@codemirror/search": "^6.7.0",
"@codemirror/state": "^6.6.0",
"@codemirror/view": "^6.41.1",
"@emnapi/core": "^1.10.0",
"@emnapi/runtime": "^1.10.0",
"@eslint/js": "^10.0.1",
"@inquirer/prompts": "^7.10.1",
"@jridgewell/sourcemap-codec": "^1.5.5",
"@mermaid-js/mermaid-cli": "^11.14.0",
"@napi-rs/cli": "3.4.1",
"@rollup/plugin-alias": "^6.0.0",
"@rollup/plugin-buble": "^1.0.3",
"@rollup/plugin-commonjs": "^29.0.2",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.3",
"@rollup/plugin-replace": "^6.0.3",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.3.0",
"@rollup/pluginutils": "^5.3.0",
"@shikijs/vitepress-twoslash": "^4.0.2",
"@types/mocha": "^10.0.10",
"@types/node": "^20.19.39",
"@types/picomatch": "^4.0.3",
"@types/semver": "^7.7.1",
"@types/yargs-parser": "^21.0.3",
"@vue/language-server": "^3.2.8",
"acorn": "^8.16.0",
"acorn-import-assertions": "^1.9.0",
"acorn-import-phases": "^1.0.4",
"acorn-jsx": "^5.3.2",
"buble": "^0.20.0",
"builtin-modules": "^5.1.0",
"chokidar": "^3.6.0",
"concurrently": "^9.2.1",
"core-js": "3.38.1",
"date-time": "^4.0.0",
"es5-shim": "^4.6.7",
"es6-shim": "^0.35.8",
"eslint": "^10.3.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-unicorn": "^64.0.0",
"eslint-plugin-vue": "^10.9.0",
"fixturify": "^3.0.0",
"flru": "^1.0.2",
"fs-extra": "^11.3.4",
"github-api": "^3.4.0",
"globals": "^17.6.0",
"husky": "^9.1.7",
"is-reference": "^3.0.3",
"lint-staged": "^16.4.0",
"locate-character": "^3.0.0",
"magic-string": "^0.30.21",
"memfs": "^4.57.2",
"mocha": "11.7.5",
"nodemon": "^3.1.14",
"npm-audit-resolver": "^3.0.0-RC.0",
"nyc": "^18.0.0",
"patch-package": "^8.0.1",
"picocolors": "^1.1.1",
"picomatch": "^4.0.4",
"pinia": "^3.0.4",
"prettier": "^3.8.3",
"prettier-plugin-organize-imports": "^4.3.0",
"pretty-bytes": "^7.1.0",
"pretty-ms": "^9.3.0",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"requirejs": "^2.3.8",
"rollup": "^4.60.3",
"rollup-plugin-license": "^3.7.1",
"semver": "^7.7.4",
"shx": "^0.4.0",
"signal-exit": "^4.1.0",
"source-map": "^0.7.6",
"source-map-support": "^0.5.21",
"systemjs": "^6.15.1",
"terser": "^5.46.2",
"tslib": "^2.8.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.59.2",
"vite": "^7.3.2",
"vitepress": "^1.6.4",
"vue": "^3.5.33",
"vue-eslint-parser": "^10.4.0",
"vue-tsc": "^3.2.8",
"wasm-pack": "^0.13.1",
"yargs-parser": "^21.1.1"
},
"overrides": {
"axios": "^1.16.0",
"esbuild": ">0.24.2",
"lodash-es": ">4.17.22",
"path-scurry": {
"lru-cache": ">=11.0.0"
},
"readable-stream": "npm:@built-in/readable-stream@1",
"semver": "^7.7.4",
"tar": ">7.5.6",
"vite": "$vite"
},
"comments": {
"vue-tsc": "This is necessary so that prettier-plugin-organize-imports works correctly in Vue templatges",
"@emnapi/core": "If missing this fails npm install for Linux ARM",
"@emnapi/runtime": "If missing this fails npm install for Linux ARM",
"react": "If missing this fails npm install for Linux ARM",
"react-dom": "If missing this fails npm install for Linux ARM"
},
"files": [
"dist/*.node",
"dist/**/*.js",
"dist/*.d.ts",
"dist/bin/rollup",
"dist/es/package.json"
],
"engines": {
"node": ">=18.0.0",
"npm": ">=8.0.0"
},
"exports": {
".": {
"types": "./dist/rollup.d.ts",
"import": "./dist/es/rollup.js",
"require": "./dist/rollup.js"
},
"./loadConfigFile": {
"types": "./dist/loadConfigFile.d.ts",
"require": "./dist/loadConfigFile.js",
"default": "./dist/loadConfigFile.js"
},
"./getLogFilter": {
"types": "./dist/getLogFilter.d.ts",
"import": "./dist/es/getLogFilter.js",
"require": "./dist/getLogFilter.js"
},
"./parseAst": {
"types": "./dist/parseAst.d.ts",
"import": "./dist/es/parseAst.js",
"require": "./dist/parseAst.js"
},
"./dist/*": "./dist/*",
"./package.json": "./package.json"
}
}
@@ -0,0 +1,51 @@
/**
* @fileoverview Rule to enforce `default` clauses in `switch` statements to be last
* @author Milos Djermanovic
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Enforce `default` clauses in `switch` statements to be last",
recommended: false,
url: "https://eslint.org/docs/latest/rules/default-case-last",
},
schema: [],
messages: {
notLast: "Default clause should be the last clause.",
},
},
create(context) {
return {
SwitchStatement(node) {
const cases = node.cases,
indexOfDefault = cases.findIndex(c => c.test === null);
if (
indexOfDefault !== -1 &&
indexOfDefault !== cases.length - 1
) {
const defaultClause = cases[indexOfDefault];
context.report({
node: defaultClause,
messageId: "notLast",
});
}
},
};
},
};
@@ -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 SquareRadical = createLucideIcon("SquareRadical", [
["path", { d: "M7 12h2l2 5 2-10h4", key: "1fxv6h" }],
["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", key: "h1oib" }]
]);
export { SquareRadical as default };
//# sourceMappingURL=square-radical.js.map
@@ -0,0 +1 @@
{"version":3,"file":"file-line-chart.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,3 @@
declare const EvalError: EvalErrorConstructor;
export = EvalError;
@@ -0,0 +1 @@
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG,IAAkB;IAC1C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;YAC5B,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SAC/B;QACD,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACrB;SAAM;QACN,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;KACf;AACF,CAAC;AAED,MAAM,iBAAiB,GAAU;IAChC,OAAO,KAAK,GAAG,GAAG,GAAG,GAAG,CAAC;AAC1B,CAAC;AAED,MAAM,iBAAiB,CAAK;IAC3B,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;AACpJ,CAAC;AAED,MAAM,sBAAsB,GAAU;IACrC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,kBAAkB,GAAO;IAC9B,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,MAAM,KAAK,QAAQ,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvM,CAAC;AAGD,MAAM,iBAAiB,MAAc,EAAE,MAAW;IACjD,MAAM,GAAG,GAAG,MAAa,CAAC;IAC1B,IAAI,MAAM,EAAE;QACX,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACzB,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;SACvB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"}
@@ -0,0 +1 @@
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,sDASlB,CAAA"}
@@ -0,0 +1,739 @@
flf2a$ 7 6 15 -1 24
stacey.flf (FIGlet font)
Figlet conversion by Kent Nassen, kentn@cyberspace.org, 11/24/94
From: davidstacey@BIX.com (davidstacey on BIX)
Newsgroups: alt.ascii-art
Subject: ASCII Font
Date: 16 Feb 94 04:20:45 GMT
Organization: Delphi Internet Services Corporation
Lines: 41
Message-ID: <davidstacey.761372445@BIX.com>
NNTP-Posting-Host: bix.com
Summary: Cool Ascii Font
Keywords: Ascii,Font
Status: RO
Presenting another fine colly!!
A font, use it for your adds etc.
Just don't be so lame and give the credz to the one who has earned them!!
Whirlwind Of Dutch Dreams!!!!!
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
____@
7 7@
| |@
!__!@
____@
7__7@
@@
___ ___@
7 7 7 7@
!/ !/ @
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
___@
7 7@
!/ @
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
___@
7 7@
!/ @@
@
@
@
@
@
@
@@
@
@
@
@
____@
7__7@
@@
@
@
@
@
@
@
@@
_______@
7 7@
| 7 |@
| | |@
| ! |@
!_____!@
@@
_____@
7 7@
!_ |@
7 |@
| |@
!__!@
@@
_______@
7 7@
!___ !@
| ___|@
| 7@
!_____!@
@@
_______@
7 7@
|___ !@
|__ |@
| |@
!_____!@
@@
_______@
7 7 7@
| ! |@
!___ |@
7 |@
!__!@
@@
_______@
7 ___7@
| 7@
!___ |@
7 |@
!_____!@
@@
_______@
7 7@
| ___!@
| 7@
| - |@
!_____!@
@@
_______@
7 7@
!___ |@
7 |@
| |@
!__!@
@@
_______@
7 _ 7@
!_ _!@
| |@
| - |@
!_____!@
@@
_______@
7 7@
| - |@
!___ |@
7 |@
!_____!@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
_______@
7 7@
!__! |@
!__!@
____@
7__7@
@@
@
@
@
@
@
@
@@
_______@
7 _ 7@
| _ |@
| 7 |@
| | |@
!__!__!@
@@
_______@
7 _ 7@
| __|@
| _ |@
| 7 |@
!_____!@
@@
_______@
7 7@
| ___!@
| 7___@
| 7@
!_____!@
@@
_____ @
7 \ @
| 7 |@
| | |@
| ! |@
!_____!@
@@
_______@
7 7@
| ___!@
| __|_@
| 7@
!_____!@
@@
_______@
7 7@
| ___!@
| __| @
| 7 @
!__! @
@@
_______@
7 7@
| __!@
| ! 7@
| |@
!_____!@
@@
_______@
7 7 7@
| ! |@
| |@
| 7 |@
!__!__!@
@@
____@
7 7@
| |@
| |@
| |@
!__!@
@@
____@
7 7@
___| |@
7 ! |@
| |@
!_____!@
@@
_______@
7 7 7@
| __!@
| |@
| 7 |@
!__!__!@
@@
____ @
7 7 @
| | @
| !___@
| 7@
!_____!@
@@
__________@
7 7@
| _ _ |@
| 7 7 |@
| | | |@
!__!__!__!@
@@
_______@
7 7@
| _ |@
| 7 |@
| | |@
!__!__!@
@@
_______@
7 7@
| 7 |@
| | |@
| ! |@
!_____!@
@@
_______@
7 7@
| - |@
| ___!@
| 7 @
!__! @
@@
_______ @
7 7 @
| 7 | @
| | | @
| ! |_ @
!_______!@
@@
_______@
7 _ 7@
| _|@
| _ \ @
| 7 |@
!__!__!@
@@
_______@
7 7@
| ___!@
!__ 7@
7 |@
!_____!@
@@
________@
7 7@
!__ __!@
7 7 @
| | @
!__! @
@@
_______@
7 7 7@
| | |@
| | |@
| ! |@
!_____!@
@@
___ ___@
7 V 7@
| | |@
| ! |@
| |@
!_____!@
@@
___ __ ___@
7 V V 7@
| | | |@
| ! ! |@
| |@
!________!@
@@
_______@
7 7 7@
!_ _!@
| |@
| 7 |@
!__!__!@
@@
_______@
7 7 7@
| ! |@
!_ _!@
7 7 @
!___! @
@@
_______@
7 7@
!___ |@
| __!@
| 7@
!_____!@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
___@
7 7@
\!@
@
@
@
@@
_______@
7 _ 7@
| _ |@
| 7 |@
| | |@
!__!__!@
@@
_______@
7 _ 7@
| __|@
| _ |@
| 7 |@
!_____!@
@@
_______@
7 7@
| ___!@
| 7___@
| 7@
!_____!@
@@
_____ @
7 \ @
| 7 |@
| | |@
| ! |@
!_____!@
@@
_______@
7 7@
| ___!@
| __|_@
| 7@
!_____!@
@@
_______@
7 7@
| ___!@
| __| @
| 7 @
!__! @
@@
_______@
7 7@
| __!@
| ! 7@
| |@
!_____!@
@@
_______@
7 7 7@
| ! |@
| |@
| 7 |@
!__!__!@
@@
____@
7 7@
| |@
| |@
| |@
!__!@
@@
____@
7 7@
___| |@
7 ! |@
| |@
!_____!@
@@
_______@
7 7 7@
| __!@
| |@
| 7 |@
!__!__!@
@@
____ @
7 7 @
| | @
| !___@
| 7@
!_____!@
@@
__________@
7 7@
| _ _ |@
| 7 7 |@
| | | |@
!__!__!__!@
@@
_______@
7 7@
| _ |@
| 7 |@
| | |@
!__!__!@
@@
_______@
7 7@
| 7 |@
| | |@
| ! |@
!_____!@
@@
_______@
7 7@
| - |@
| ___!@
| 7 @
!__! @
@@
_______ @
7 7 @
| 7 | @
| | | @
| ! |_ @
!_______!@
@@
_______@
7 _ 7@
| _|@
| _ \ @
| 7 |@
!__!__!@
@@
_______@
7 7@
| ___!@
!__ 7@
7 |@
!_____!@
@@
________@
7 7@
!__ __!@
7 7 @
| | @
!__! @
@@
_______@
7 7 7@
| | |@
| | |@
| ! |@
!_____!@
@@
___ ___@
7 V 7@
| | |@
| ! |@
| |@
!_____!@
@@
___ __ ___@
7 V V 7@
| | | |@
| ! ! |@
| |@
!________!@
@@
_______@
7 7 7@
!_ _!@
| |@
| 7 |@
!__!__!@
@@
_______@
7 7 7@
| ! |@
!_ _!@
7 7 @
!___! @
@@
_______@
7 7@
!___ |@
| __!@
| 7@
!_____!@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_sR","2":"_0 _MB"},C:{"1":"_H _2I _p","2":"_bB _tD _L"},D:{"1":"_tR","2":"_JO"},E:{"1":"_QE","2":"_cD"},F:{"1":"_TL _0K","2":"_4B _2J _O"},G:{"1":"_AD","2":"_YC"},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":"_GB cC _nM","2":"_lF HE"},Q:{"16":"JE"},R:{"16":"KE"},S:{"2":"LE","16":"ME"}},B:5,C:"WebAssembly SIMD",D:true};
@@ -0,0 +1,12 @@
/*
Convert velocity into velocity per second
@param [number]: Unit per frame
@param [number]: Frame duration in ms
*/
function velocityPerSecond(velocity, frameDuration) {
return frameDuration ? velocity * (1000 / frameDuration) : 0;
}
export { velocityPerSecond };
//# sourceMappingURL=velocity-per-second.mjs.map
@@ -0,0 +1,174 @@
#!/usr/bin/env node
// Standalone semver comparison program.
// Exits successfully and prints matching version(s) if
// any supplied version is valid and passes all tests.
var argv = process.argv.slice(2)
var versions = []
var range = []
var inc = null
var version = require('../package.json').version
var loose = false
var includePrerelease = false
var coerce = false
var rtl = false
var identifier
var semver = require('../semver')
var reverse = false
var options = {}
main()
function main () {
if (!argv.length) return help()
while (argv.length) {
var a = argv.shift()
var indexOfEqualSign = a.indexOf('=')
if (indexOfEqualSign !== -1) {
a = a.slice(0, indexOfEqualSign)
argv.unshift(a.slice(indexOfEqualSign + 1))
}
switch (a) {
case '-rv': case '-rev': case '--rev': case '--reverse':
reverse = true
break
case '-l': case '--loose':
loose = true
break
case '-p': case '--include-prerelease':
includePrerelease = true
break
case '-v': case '--version':
versions.push(argv.shift())
break
case '-i': case '--inc': case '--increment':
switch (argv[0]) {
case 'major': case 'minor': case 'patch': case 'prerelease':
case 'premajor': case 'preminor': case 'prepatch':
inc = argv.shift()
break
default:
inc = 'patch'
break
}
break
case '--preid':
identifier = argv.shift()
break
case '-r': case '--range':
range.push(argv.shift())
break
case '-c': case '--coerce':
coerce = true
break
case '--rtl':
rtl = true
break
case '--ltr':
rtl = false
break
case '-h': case '--help': case '-?':
return help()
default:
versions.push(a)
break
}
}
var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
versions = versions.map(function (v) {
return coerce ? (semver.coerce(v, options) || { version: v }).version : v
}).filter(function (v) {
return semver.valid(v)
})
if (!versions.length) return fail()
if (inc && (versions.length !== 1 || range.length)) { return failInc() }
for (var i = 0, l = range.length; i < l; i++) {
versions = versions.filter(function (v) {
return semver.satisfies(v, range[i], options)
})
if (!versions.length) return fail()
}
return success(versions)
}
function failInc () {
console.error('--inc can only be used on a single version with no range')
fail()
}
function fail () { process.exit(1) }
function success () {
var compare = reverse ? 'rcompare' : 'compare'
versions.sort(function (a, b) {
return semver[compare](a, b, options)
}).map(function (v) {
return semver.clean(v, options)
}).map(function (v) {
return inc ? semver.inc(v, inc, options, identifier) : v
}).forEach(function (v, i, _) { console.log(v) })
}
function help () {
console.log(['SemVer ' + version,
'',
'A JavaScript implementation of the https://semver.org/ specification',
'Copyright Isaac Z. Schlueter',
'',
'Usage: semver [options] <version> [<version> [...]]',
'Prints valid versions sorted by SemVer precedence',
'',
'Options:',
'-r --range <range>',
' Print versions that match the specified range.',
'',
'-i --increment [<level>]',
' Increment a version by the specified level. Level can',
' be one of: major, minor, patch, premajor, preminor,',
" prepatch, or prerelease. Default level is 'patch'.",
' Only one version may be specified.',
'',
'--preid <identifier>',
' Identifier to be used to prefix premajor, preminor,',
' prepatch or prerelease version increments.',
'',
'-l --loose',
' Interpret versions and ranges loosely',
'',
'-p --include-prerelease',
' Always include prerelease versions in range matching',
'',
'-c --coerce',
' Coerce a string into SemVer if possible',
' (does not imply --loose)',
'',
'--rtl',
' Coerce version strings right to left',
'',
'--ltr',
' Coerce version strings left to right (default)',
'',
'Program exits successfully if any valid version satisfies',
'all supplied ranges, and prints all satisfying versions.',
'',
'If no satisfying versions are found, then exits failure.',
'',
'Versions are printed in ascending order, so supplying',
'multiple versions to the utility will just sort them.'
].join('\n'))
}
@@ -0,0 +1,62 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.inferSingleRun = inferSingleRun;
const node_path_1 = __importDefault(require("node:path"));
/**
* ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts,
* such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback
* on a file in an IDE).
*
* When typescript-eslint handles TypeScript Program management behind the scenes, this distinction
* is important because there is significant overhead to managing the so called Watch Programs
* needed for the long-running use-case. We therefore use the following logic to figure out which
* of these contexts applies to the current execution.
*
* @returns Whether this is part of a single run, rather than a long-running process.
*/
function inferSingleRun(options) {
// https://github.com/typescript-eslint/typescript-eslint/issues/9504
// There's no support (yet?) for extraFileExtensions in single-run hosts.
// Only watch program hosts and project service can support that.
if (options?.extraFileExtensions?.length && options.project) {
return false;
}
if (
// single-run implies type-aware linting - no projects means we can't be in single-run mode
(options?.project == null && !options?.projectService) ||
// programs passed via options means the user should be managing the programs, so we shouldn't
// be creating our own single-run programs accidentally
options.programs != null) {
return false;
}
// Allow users to explicitly inform us of their intent to perform a single run (or not) with TSESTREE_SINGLE_RUN
if (process.env.TSESTREE_SINGLE_RUN === 'false') {
return false;
}
if (process.env.TSESTREE_SINGLE_RUN === 'true') {
return true;
}
// Ideally, we'd like to try to auto-detect CI or CLI usage that lets us infer a single CLI run.
if (!options.disallowAutomaticSingleRunInference) {
const possibleEslintBinPaths = [
'node_modules/.bin/eslint', // npm or yarn repo
'node_modules/eslint/bin/eslint.js', // pnpm repo
];
if (
// Default to single runs for CI processes. CI=true is set by most CI providers by default.
process.env.CI === 'true' ||
// This will be true for invocations such as `npx eslint ...` and `./node_modules/.bin/eslint ...`
possibleEslintBinPaths.some(binPath => process.argv.length > 1 &&
process.argv[1].endsWith(node_path_1.default.normalize(binPath)))) {
return !process.argv.includes('--fix');
}
}
/**
* Unless we can reliably infer otherwise, we default to assuming that this run could be part
* of a long-running session (e.g. in an IDE) and watch programs will therefore be required
*/
return false;
}
@@ -0,0 +1,35 @@
import type * as core from "./core.cjs";
import type { $ZodType } from "./schemas.cjs";
export declare const $output: unique symbol;
export type $output = typeof $output;
export declare const $input: unique symbol;
export type $input = typeof $input;
export type $replace<Meta, S extends $ZodType> = Meta extends $output ? core.output<S> : Meta extends $input ? core.input<S> : Meta extends (infer M)[] ? $replace<M, S>[] : Meta extends (...args: infer P) => infer R ? (...args: {
[K in keyof P]: $replace<P[K], S>;
}) => $replace<R, S> : Meta extends object ? {
[K in keyof Meta]: $replace<Meta[K], S>;
} : Meta;
type MetadataType = object | undefined;
export declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
_meta: Meta;
_schema: Schema;
_map: WeakMap<Schema, $replace<Meta, Schema>>;
_idmap: Map<string, Schema>;
add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;
clear(): this;
remove(schema: Schema): this;
get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;
has(schema: Schema): boolean;
}
export interface JSONSchemaMeta {
id?: string | undefined;
title?: string | undefined;
description?: string | undefined;
deprecated?: boolean | undefined;
[k: string]: unknown;
}
export interface GlobalMeta extends JSONSchemaMeta {
}
export declare function registry<T extends MetadataType = MetadataType, S extends $ZodType = $ZodType>(): $ZodRegistry<T, S>;
export declare const globalRegistry: $ZodRegistry<GlobalMeta>;
export {};
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_V","2":"_b"},B:{"1":"_J"},C:{"1":"_zH","2":"_tG"},D:{"1":"_AK","2":"_jJ"},E:{"1":"_JB","2":"_RB"},F:{"1":"_0J aC","2":"_yM _BC _FJ","16":"C"},G:{"1":"_9","2":"_iB"},H:{"2":"1D"},I:{"1":"_X","2":"_W"},J:{"2":"_B"},K:{"1":"_ZB","2":"_gB","16":"C"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:5,C:"KeyboardEvent.getModifierState()",D:true};
@@ -0,0 +1 @@
{"azerty":{"0":["ç9",null,null,")°","pP","oO"],"1":["²~",null,null,"é2","aA",null],"2":["&1",null,null,"\"3","zZ","aA"],"3":["é2",null,null,"'4","eE","zZ"],"4":["\"3",null,null,"(5","rR","eE"],"5":["'4",null,null,"-6","tT","rR"],"6":["(5",null,null,"è7","yY","tT"],"7":["-6",null,null,"_8","uU","yY"],"8":["è7",null,null,"ç9","iI","uU"],"9":["_8",null,null,"à0","oO","iI"],"²":[null,null,null,"&1",null,null],"~":[null,null,null,"&1",null,null],"&":["²~",null,null,"é2","aA",null],"é":["&1",null,null,"\"3","zZ","aA"],"\"":["pP",")°","+=","$£","ù%","mM"],"'":["\"3",null,null,"(5","rR","eE"],"(":["'4",null,null,"-6","tT","rR"],"-":["(5",null,null,"è7","yY","tT"],"è":["-6",null,null,"_8","uU","yY"],"_":["è7",null,null,"ç9","iI","uU"],"ç":["_8",null,null,"à0","oO","iI"],"à":["ç9",null,null,")°","pP","oO"],")":["à0",null,null,"+=","^\"","pP"],"°":["à0",null,null,"+=","^\"","pP"],"+":[")°",null,null,null,"$£","^\""],"=":[")°",null,null,null,"$£","^\""],"a":[null,"&1","é2","zZ","qQ",null],"A":[null,"&1","é2","zZ","qQ",null],"z":["aA","é2","\"3","eE","sS","qQ"],"Z":["aA","é2","\"3","eE","sS","qQ"],"e":["zZ","\"3","'4","rR","dD","sS"],"E":["zZ","\"3","'4","rR","dD","sS"],"r":["eE","'4","(5","tT","fF","dD"],"R":["eE","'4","(5","tT","fF","dD"],"t":["rR","(5","-6","yY","gG","fF"],"T":["rR","(5","-6","yY","gG","fF"],"y":["tT","-6","è7","uU","hH","gG"],"Y":["tT","-6","è7","uU","hH","gG"],"u":["yY","è7","_8","iI","jJ","hH"],"U":["yY","è7","_8","iI","jJ","hH"],"i":["uU","_8","ç9","oO","kK","jJ"],"I":["uU","_8","ç9","oO","kK","jJ"],"o":["iI","ç9","à0","pP","lL","kK"],"O":["iI","ç9","à0","pP","lL","kK"],"p":["oO","à0",")°","^\"","mM","lL"],"P":["oO","à0",")°","^\"","mM","lL"],"^":["pP",")°","+=","$£","ù%","mM"],"$":["^\"","+=",null,null,"*µ","ù%"],"£":["^\"","+=",null,null,"*µ","ù%"],"q":[null,"aA","zZ","sS","wW","<>"],"Q":[null,"aA","zZ","sS","wW","<>"],"s":["qQ","zZ","eE","dD","xX","wW"],"S":["qQ","zZ","eE","dD","xX","wW"],"d":["sS","eE","rR","fF","cC","xX"],"D":["sS","eE","rR","fF","cC","xX"],"f":["dD","rR","tT","gG","vV","cC"],"F":["dD","rR","tT","gG","vV","cC"],"g":["fF","tT","yY","hH","bB","vV"],"G":["fF","tT","yY","hH","bB","vV"],"h":["gG","yY","uU","jJ","nN","bB"],"H":["gG","yY","uU","jJ","nN","bB"],"j":["hH","uU","iI","kK",",?","nN"],"J":["hH","uU","iI","kK",",?","nN"],"k":["jJ","iI","oO","lL",";.",",?"],"K":["jJ","iI","oO","lL",";.",",?"],"l":["kK","oO","pP","mM",":/",";."],"L":["kK","oO","pP","mM",":/",";."],"m":["lL","pP","^\"","ù%","!§",":/"],"M":["lL","pP","^\"","ù%","!§",":/"],"ù":["mM","^\"","$£","*µ",null,"!§"],"%":["mM","^\"","$£","*µ",null,"!§"],"*":["ù%","$£",null,null,null,null],"µ":["ù%","$£",null,null,null,null],"<":[null,null,"qQ","wW",null,null],">":[null,null,"qQ","wW",null,null],"w":["<>","qQ","sS","xX",null,null],"W":["<>","qQ","sS","xX",null,null],"x":["wW","sS","dD","cC",null,null],"X":["wW","sS","dD","cC",null,null],"c":["xX","dD","fF","vV",null,null],"C":["xX","dD","fF","vV",null,null],"v":["cC","fF","gG","bB",null,null],"V":["cC","fF","gG","bB",null,null],"b":["vV","gG","hH","nN",null,null],"B":["vV","gG","hH","nN",null,null],"n":["bB","hH","jJ",",?",null,null],"N":["bB","hH","jJ",",?",null,null],",":["nN","jJ","kK",";.",null,null],"?":["nN","jJ","kK",";.",null,null],";":[",?","kK","lL",":/",null,null],".":[",?","kK","lL",":/",null,null],":":[";.","lL","mM","!§",null,null],"/":[";.","lL","mM","!§",null,null],"!":[":/","mM","ù%",null,null,null],"§":[":/","mM","ù%",null,null,null]},"dvorak":{"0":["9(",null,null,"[{","lL","rR"],"1":["`~",null,null,"2@","'\"",null],"2":["1!",null,null,"3#",",<","'\""],"3":["2@",null,null,"4$",".>",",<"],"4":["3#",null,null,"5%","pP",".>"],"5":["4$",null,null,"6^","yY","pP"],"6":["5%",null,null,"7&","fF","yY"],"7":["6^",null,null,"8*","gG","fF"],"8":["7&",null,null,"9(","cC","gG"],"9":["8*",null,null,"0)","rR","cC"],"`":[null,null,null,"1!",null,null],"~":[null,null,null,"1!",null,null],"!":["`~",null,null,"2@","'\"",null],"@":["1!",null,null,"3#",",<","'\""],"#":["2@",null,null,"4$",".>",",<"],"$":["3#",null,null,"5%","pP",".>"],"%":["4$",null,null,"6^","yY","pP"],"^":["5%",null,null,"7&","fF","yY"],"&":["6^",null,null,"8*","gG","fF"],"*":["7&",null,null,"9(","cC","gG"],"(":["8*",null,null,"0)","rR","cC"],")":["9(",null,null,"[{","lL","rR"],"[":["0)",null,null,"]}","/?","lL"],"{":["0)",null,null,"]}","/?","lL"],"]":["[{",null,null,null,"=+","/?"],"}":["[{",null,null,null,"=+","/?"],"'":[null,"1!","2@",",<","aA",null],"\"":[null,"1!","2@",",<","aA",null],",":["'\"","2@","3#",".>","oO","aA"],"<":["'\"","2@","3#",".>","oO","aA"],".":[",<","3#","4$","pP","eE","oO"],">":[",<","3#","4$","pP","eE","oO"],"p":[".>","4$","5%","yY","uU","eE"],"P":[".>","4$","5%","yY","uU","eE"],"y":["pP","5%","6^","fF","iI","uU"],"Y":["pP","5%","6^","fF","iI","uU"],"f":["yY","6^","7&","gG","dD","iI"],"F":["yY","6^","7&","gG","dD","iI"],"g":["fF","7&","8*","cC","hH","dD"],"G":["fF","7&","8*","cC","hH","dD"],"c":["gG",Line truncated
@@ -0,0 +1,8 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { ScopeManager } from '../ScopeManager';
import type { Scope } from './Scope';
import { ScopeBase } from './ScopeBase';
import { ScopeType } from './ScopeType';
export declare class ClassFieldInitializerScope extends ScopeBase<ScopeType.classFieldInitializer, TSESTree.Expression, Scope> {
constructor(scopeManager: ScopeManager, upperScope: ClassFieldInitializerScope['upper'], block: ClassFieldInitializerScope['block']);
}
@@ -0,0 +1,23 @@
'use strict'
const { createFile, createFileSync } = require('./file')
const { createLink, createLinkSync } = require('./link')
const { createSymlink, createSymlinkSync } = require('./symlink')
module.exports = {
// file
createFile,
createFileSync,
ensureFile: createFile,
ensureFileSync: createFileSync,
// link
createLink,
createLinkSync,
ensureLink: createLink,
ensureLinkSync: createLinkSync,
// symlink
createSymlink,
createSymlinkSync,
ensureSymlink: createSymlink,
ensureSymlinkSync: createSymlinkSync
}
@@ -0,0 +1,162 @@
import { describe, it, expect } from "vitest";
import { Tokenizer } from "./index.js";
import type { Callbacks } from "./Tokenizer.js";
function tokenize(data: string, options = {}) {
const log: unknown[][] = [];
const tokenizer = new Tokenizer(
options,
new Proxy(
{},
{
get(_, property) {
return (...values: unknown[]) =>
log.push([property, ...values]);
},
},
) as Callbacks,
);
tokenizer.write(data);
tokenizer.end();
return log;
}
describe("Tokenizer", () => {
describe("should support self-closing special tags", () => {
it("for self-closing script tag", () => {
expect(tokenize("<script /><div></div>")).toMatchSnapshot();
});
it("for self-closing style tag", () => {
expect(tokenize("<style /><div></div>")).toMatchSnapshot();
});
it("for self-closing title tag", () => {
expect(tokenize("<title /><div></div>")).toMatchSnapshot();
});
it("for self-closing textarea tag", () => {
expect(tokenize("<textarea /><div></div>")).toMatchSnapshot();
});
it("for self-closing xmp tag", () => {
expect(tokenize("<xmp /><div></div>")).toMatchSnapshot();
});
});
describe("should support standard special tags", () => {
it("for normal script tag", () => {
expect(tokenize("<script></script><div></div>")).toMatchSnapshot();
});
it("for normal style tag", () => {
expect(tokenize("<style></style><div></div>")).toMatchSnapshot();
});
it("for normal sitle tag", () => {
expect(tokenize("<title></title><div></div>")).toMatchSnapshot();
});
it("for normal textarea tag", () => {
expect(
tokenize("<textarea></textarea><div></div>"),
).toMatchSnapshot();
});
it("for normal xmp tag", () => {
expect(tokenize("<xmp></xmp><div></div>")).toMatchSnapshot();
});
});
describe("should treat html inside special tags as text", () => {
it("for div inside script tag", () => {
expect(tokenize("<script><div></div></script>")).toMatchSnapshot();
});
it("for div inside style tag", () => {
expect(tokenize("<style><div></div></style>")).toMatchSnapshot();
});
it("for div inside title tag", () => {
expect(tokenize("<title><div></div></title>")).toMatchSnapshot();
});
it("for div inside textarea tag", () => {
expect(
tokenize("<textarea><div></div></textarea>"),
).toMatchSnapshot();
});
it("for div inside xmp tag", () => {
expect(tokenize("<xmp><div></div></xmp>")).toMatchSnapshot();
});
});
describe("should correctly mark attributes", () => {
it("for no value attribute", () => {
expect(tokenize("<div aaaaaaa >")).toMatchSnapshot();
});
it("for no quotes attribute", () => {
expect(tokenize("<div aaa=aaa >")).toMatchSnapshot();
});
it("for single quotes attribute", () => {
expect(tokenize("<div aaa='a' >")).toMatchSnapshot();
});
it("for double quotes attribute", () => {
expect(tokenize('<div aaa="a" >')).toMatchSnapshot();
});
});
describe("should not break after special tag followed by an entity", () => {
it("for normal special tag", () => {
expect(tokenize("<style>a{}</style>&apos;<br/>")).toMatchSnapshot();
});
it("for self-closing special tag", () => {
expect(tokenize("<style />&apos;<br/>")).toMatchSnapshot();
});
});
describe("should handle entities", () => {
it("for XML entities", () =>
expect(
tokenize("&amp;&gt;&amp&lt;&uuml;&#x61;&#x62&#99;&#100&#101", {
xmlMode: true,
}),
).toMatchSnapshot());
it("for entities in attributes (#276)", () =>
expect(
tokenize(
'<img src="?&image_uri=1&&image;=2&image=3"/>?&image_uri=1&&image;=2&image=3',
),
).toMatchSnapshot());
it("for trailing legacy entity", () =>
expect(tokenize("&timesbar;&timesbar")).toMatchSnapshot());
it("for multi-byte entities", () =>
expect(tokenize("&NotGreaterFullEqual;")).toMatchSnapshot());
});
it("should not lose data when pausing", () => {
const log: unknown[][] = [];
const tokenizer = new Tokenizer(
{},
new Proxy(
{},
{
get(_, property) {
return (...values: unknown[]) => {
if (property === "ontext") {
tokenizer.pause();
}
log.push([property, ...values]);
};
},
},
) as Callbacks,
);
tokenizer.write("&am");
tokenizer.write("p; it up!");
tokenizer.resume();
tokenizer.resume();
// Tokenizer shouldn't be paused
expect(tokenizer).toHaveProperty("running", true);
tokenizer.end();
expect(log).toMatchSnapshot();
});
});
@@ -0,0 +1,827 @@
export default `flf2a$ 8 6 15 -1 9
nancyj-underlined.flf
named after the login of a woman who asked me to make her a
sig. this is the font that came out of it. this is my first
attempt at a figlet font, so leave me alone.
vampyr@acs.bu.edu
$$ @
$$ @
$$ @
$$ @
$$ @
$$ @
ooo@
$$ @@
dP @
88 @
88 @
dP @
@
oo @
ooo@
@@
dP dP @
dP dP @
@
@
@
@
oooooo@
@@
@
dP dP @
8888888 @
88 88 @
8888888 @
dP dP @
oooooooo@
@@
# # @
.d8888P' @
Y8#oo#o. @
# #88 @
\`88888P' @
# # @
ooooooooo@
@@
d8P dP @
8 8 d8' @
Y8P d8' @
d8' d8P @
d8' 8 8 @
88 Y8P @
ooooooooooo@
@@
d88b @
8\`'8 @
d8b @
d8P\`8b @
d8' \`8bP @
\`888P'\`YP @
ooooooooooo@
@@
d8 @
88 @
.P @
@
@
@
ooo@
@@
a88P @
d8' @
88 @
88 @
Y8. @
Y88b @
oooooo@
@@
Y88o @
\`8b @
88 @
88 @
.8P @
d88Y @
oooooo@
@@
dP @
8b. 88 .d8 @
\`8b88d8' @
.8P88Y8. @
8P' 88 \`Y8 @
dP @
ooooooooooo@
@@
@
dP @
88 @
88888888 @
88 @
dP @
ooooooooo@
@@
@
@
@
@
dP @
88 @
~.P~@
@@
@
@
@
88888888 @
@
@
ooooooooo@
@@
@
@
@
@
dP @
88 @
ooo@
@@
d8' @
d8' @
d8' @
d8' @
d8' @
88 @
ooooooooo@
@@
a8888a @
d8' ..8b @
88 .P 88 @
88 d' 88 @
Y8'' .8P @
Y8888P @
ooooooooo@
@@
d88 @
88 @
88 @
88 @
88 @
d88P @
ooooo@
@@
d8888b. @
\`88 @
.aaadP' @
88' @
88. @
Y88888P @
oooooooo@
@@
d8888b. @
\`88 @
aaad8' @
\`88 @
.88 @
d88888P @
oooooooo@
@@
dP dP @
88 88 @
88aaa88 @
88 @
88 @
dP @
oooooooo@
@@
888888P @
88' @
88baaa. @
\`88 @
88 @
d88888P @
oooooooo@
@@
.d8888P @
88' @
88baaa. @
88\` \`88 @
8b. .d8 @
\`Y888P' @
oooooooo@
@@
d88888P @
d8' @
d8' @
d8' @
d8' @
d8' @
oooooooo@
@@
.d888b. @
Y8' \`8P @
d8bad8b @
88\` \`88 @
8b. .88 @
Y88888P @
oooooooo@
@@
.d888b. @
Y8' \`88 @
\`8bad88 @
\`88 @
d. .88 @
\`8888P @
oooooooo@
@@
dP @
88 @
@
@
dP @
88 @
ooo@
@@
dP @
88 @
@
@
dP @
88 @
~.P~@
@@
d8 @
d8' @
d8' @
Y8. @
Y8. @
Y8 @
oooooo@
@@
@
@
aaaaaaaa @
@
88888888 @
@
ooooooooo@
@@
8b @
\`8b @
\`8b @
.8P @
.8P @
8P @
ooooo@
@@
.d8888ba @
\`8' \`8b @
.d8' @
d8P' @
"" @
oo @
oooooooooo@
@@
a88888b. @
d8' \`88 @
88 d8P 88 @
88 Yo8b88 @
Y8. @
Y88888P' @
oooooooooo@
@@
.d888888 @
d8' 88 @
88aaaaa88a @
88 88 @
88 88 @
88 88 @
ooooooooooo@
@@
888888ba @
88 \`8b @
a88aaaa8P' @
88 \`8b. @
88 .88 @
88888888P @
ooooooooooo@
@@
a88888b. @
d8' \`88 @
88 @
88 @
Y8. .88 @
Y88888P' @
oooooooooo@
@@
888888ba @
88 \`8b @
88 88 @
88 88 @
88 .8P @
8888888P @
oooooooooo@
@@
88888888b @
88 @
a88aaaa @
88 @
88 @
88888888P @
ooooooooooo@
@@
88888888b @
88 @
a88aaaa @
88 @
88 @
dP @
ooooooooooo@
@@
.88888. @
d8' \`88 @
88 @
88 YP88 @
Y8. .88 @
\`88888' @
oooooooooo@
@@
dP dP @
88 88 @
88aaaaa88a @
88 88 @
88 88 @
dP dP @
ooooooooooo@
@@
dP @
88 @
88 @
88 @
88 @
dP @
ooo@
@@
dP @
88 @
88 @
88 @
88. .d8P @
\`Y8888' @
oooooooooo@
@@
dP dP @
88 .d8' @
88aaa8P' @
88 \`8b. @
88 88 @
dP dP @
oooooooooo@
@@
dP @
88 @
88 @
88 @
88 @
88888888P @
oooooooooo@
@@
8888ba.88ba @
88 \`8b \`8b @
88 88 88 @
88 88 88 @
88 88 88 @
dP dP dP @
ooooooooooooo@
@@
888888ba @
88 \`8b @
88 88 @
88 88 @
88 88 @
dP dP @
oooooooooo@
@@
.88888. @
d8' \`8b @
88 88 @
88 88 @
Y8. .8P @
\`8888P' @
oooooooooo@
@@
888888ba @
88 \`8b @
a88aaaa8P' @
88 @
88 @
dP @
ooooooooooo@
@@
.88888. @
d8' \`8b @
88 88 @
88 db 88 @
Y8. Y88P @
\`8888PY8b @
ooooooooooo@
@@
888888ba @
88 \`8b @
a88aaaa8P' @
88 \`8b. @
88 88 @
dP dP @
ooooooooooo@
@@
.d88888b @
88. "' @
\`Y88888b. @
\`8b @
d8' .8P @
Y88888P @
oooooooooo@
@@
d888888P @
88 @
88 @
88 @
88 @
dP @
ooooooooo@
@@
dP dP @
88 88 @
88 88 @
88 88 @
Y8. .8P @
\`Y88888P' @
oooooooooo@
@@
dP dP @
88 88 @
88 .8P @
88 d8' @
88 .d8P @
888888' @
oooooooooo@
@@
dP dP dP @
88 88 88 @
88 .8P .8P @
88 d8' d8' @
88.d8P8.d8P @
8888' Y88' @
ooooooooooooo@
@@
dP dP @
Y8. .8P @
Y8aa8P @
d8' \`8b @
88 88 @
dP dP @
ooooooooo@
@@
dP dP @
Y8. .8P @
Y8aa8P @
88 @
88 @
dP @
ooooooooo@
@@
d8888888P @
.d8' @
.d8' @
.d8' @
d8' @
Y8888888P @
oooooooooo@
@@
8888P @
88 @
88 @
88 @
88 @
88888 @
oooooo@
@@
Yb @
\`Yb @
\`Yb @
\`Yb @
\`Yb @
88 @
oooooooo@
@@
d8888 @
88 @
88 @
88 @
88 @
88888 @
oooooo@
@@
db @
d8'\`8b @
\`" "' @
@
@
@
ooooooooo@
@@
@
@
@
@
@
@
vvvvvvvvvvv @
""""""""""" @@
dP @
88 @
Y. @
@
@
@
ooo@
@@
@
@
.d8888b. @
88' \`88 @
88. .88 @
\`88888P8 @
ooooooooo@
@@
dP @
88 @
88d888b. @
88' \`88 @
88. .88 @
88Y8888' @
ooooooooo@
@@
@
@
.d8888b. @
88' \`"" @
88. ... @
\`88888P' @
ooooooooo@
@@
dP @
88 @
.d888b88 @
88' \`88 @
88. .88 @
\`88888P8 @
ooooooooo@
@@
@
@
.d8888b. @
88ooood8 @
88. ... @
\`88888P' @
ooooooooo@
@@
.8888b @
88 " @
88aaa @
88 @
88 @
dP @
ooooooo@
@@
@
@
.d8888b. @
88' \`88 @
88. .88 @
\`8888P88 @
o~~~~.88~@
d8888P @@
dP @
88 @
88d888b. @
88' \`88 @
88 88 @
dP dP @
ooooooooo@
@@
oo @
@
dP @
88 @
88 @
dP @
ooo@
@@
oo @
@
dP @
88 @
88 @
88 @
88~@
dP @@
dP @
88 @
88 .dP @
88888" @
88 \`8b. @
dP \`YP @
ooooooooo@
@@
dP @
88 @
88 @
88 @
88 @
dP @
ooo@
@@
@
@
88d8b.d8b. @
88'\`88'\`88 @
88 88 88 @
dP dP dP @
ooooooooooo@
@@
@
@
88d888b. @
88' \`88 @
88 88 @
dP dP @
ooooooooo@
@@
@
@
.d8888b. @
88' \`88 @
88. .88 @
\`88888P' @
ooooooooo@
@@
@
@
88d888b. @
88' \`88 @
88. .88 @
88Y888P' @
~88~oooooo@
dP @@
@
@
.d8888b. @
88' \`88 @
88. .88 @
\`8888P88 @
ooooo~88~@
dP @@
@
@
88d888b. @
88' \`88 @
88 @
dP @
ooooooooo@
@@
@
@
.d8888b. @
Y8ooooo. @
88 @
\`88888P' @
ooooooooo@
@@
dP @
88 @
d8888P @
88 @
88 @
dP @
ooooooo@
@@
@
@
dP dP @
88 88 @
88. .88 @
\`88888P' @
ooooooooo@
@@
@
@
dP .dP @
88 d8' @
88 .88' @
8888P' @
ooooooooo@
@@
@
@
dP dP dP @
88 88 88 @
88.88b.88' @
8888P Y8P @
ooooooooooo@
@@
@
@
dP. .dP @
\`8bd8' @
.d88b. @
dP' \`dP @
ooooooooo@
@@
@
@
dP dP @
88 88 @
88. .88 @
\`8888P88 @
o~~~~.88~@
d8888P @@
@
@
d888888b @
.d8P' @
.Y8P @
d888888P @
ooooooooo@
@@
.d88P @
8: @
.oY8. @
d8 @
8: @
\`Y88b @
oooooooo@
@@
dP @
88 @
"' @
dP @
88 @
"' @
ooo@
@@
d88b. @
:8 @
.8Yo. @
8b @
:8 @
Y88P' @
oooooooo@
@@
.oo. .d @
dP" "d8P @
@
@
@
@
oooooooooo@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,3 @@
import { AnyRouter, RegisteredRouter, UseRouteContextBaseOptions, UseRouteContextOptions, UseRouteContextResult } from '@tanstack/router-core';
export type UseRouteContextRoute<out TFrom> = <TRouter extends AnyRouter = RegisteredRouter, TSelected = unknown>(opts?: UseRouteContextBaseOptions<TRouter, TFrom, true, TSelected>) => UseRouteContextResult<TRouter, TFrom, true, TSelected>;
export declare function useRouteContext<TRouter extends AnyRouter = RegisteredRouter, const TFrom extends string | undefined = undefined, TStrict extends boolean = true, TSelected = unknown>(opts: UseRouteContextOptions<TRouter, TFrom, TStrict, TSelected>): UseRouteContextResult<TRouter, TFrom, TStrict, TSelected>;
@@ -0,0 +1,159 @@
# etag
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Create simple HTTP ETags
This module generates HTTP ETags (as defined in RFC 7232) for use in
HTTP responses.
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh
$ npm install etag
```
## API
<!-- eslint-disable no-unused-vars -->
```js
var etag = require('etag')
```
### etag(entity, [options])
Generate a strong ETag for the given entity. This should be the complete
body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By
default, a strong ETag is generated except for `fs.Stats`, which will
generate a weak ETag (this can be overwritten by `options.weak`).
<!-- eslint-disable no-undef -->
```js
res.setHeader('ETag', etag(body))
```
#### Options
`etag` accepts these properties in the options object.
##### weak
Specifies if the generated ETag will include the weak validator mark (that
is, the leading `W/`). The actual entity tag is the same. The default value
is `false`, unless the `entity` is `fs.Stats`, in which case it is `true`.
## Testing
```sh
$ npm test
```
## Benchmark
```bash
$ npm run-script bench
> etag@1.8.1 bench nodejs-etag
> node benchmark/index.js
http_parser@2.7.0
node@6.11.1
v8@5.1.281.103
uv@1.11.0
zlib@1.2.11
ares@1.10.1-DEV
icu@58.2
modules@48
openssl@1.0.2k
> node benchmark/body0-100b.js
100B body
4 tests completed.
buffer - strong x 258,647 ops/sec ±1.07% (180 runs sampled)
buffer - weak x 263,812 ops/sec ±0.61% (184 runs sampled)
string - strong x 259,955 ops/sec ±1.19% (185 runs sampled)
string - weak x 264,356 ops/sec ±1.09% (184 runs sampled)
> node benchmark/body1-1kb.js
1KB body
4 tests completed.
buffer - strong x 189,018 ops/sec ±1.12% (182 runs sampled)
buffer - weak x 190,586 ops/sec ±0.81% (186 runs sampled)
string - strong x 144,272 ops/sec ±0.96% (188 runs sampled)
string - weak x 145,380 ops/sec ±1.43% (187 runs sampled)
> node benchmark/body2-5kb.js
5KB body
4 tests completed.
buffer - strong x 92,435 ops/sec ±0.42% (188 runs sampled)
buffer - weak x 92,373 ops/sec ±0.58% (189 runs sampled)
string - strong x 48,850 ops/sec ±0.56% (186 runs sampled)
string - weak x 49,380 ops/sec ±0.56% (190 runs sampled)
> node benchmark/body3-10kb.js
10KB body
4 tests completed.
buffer - strong x 55,989 ops/sec ±0.93% (188 runs sampled)
buffer - weak x 56,148 ops/sec ±0.55% (190 runs sampled)
string - strong x 27,345 ops/sec ±0.43% (188 runs sampled)
string - weak x 27,496 ops/sec ±0.45% (190 runs sampled)
> node benchmark/body4-100kb.js
100KB body
4 tests completed.
buffer - strong x 7,083 ops/sec ±0.22% (190 runs sampled)
buffer - weak x 7,115 ops/sec ±0.26% (191 runs sampled)
string - strong x 3,068 ops/sec ±0.34% (190 runs sampled)
string - weak x 3,096 ops/sec ±0.35% (190 runs sampled)
> node benchmark/stats.js
stat
4 tests completed.
real - strong x 871,642 ops/sec ±0.34% (189 runs sampled)
real - weak x 867,613 ops/sec ±0.39% (190 runs sampled)
fake - strong x 401,051 ops/sec ±0.40% (189 runs sampled)
fake - weak x 400,100 ops/sec ±0.47% (188 runs sampled)
```
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/etag.svg
[npm-url]: https://npmjs.org/package/etag
[node-version-image]: https://img.shields.io/node/v/etag.svg
[node-version-url]: https://nodejs.org/en/download/
[travis-image]: https://img.shields.io/travis/jshttp/etag/master.svg
[travis-url]: https://travis-ci.org/jshttp/etag
[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag/master.svg
[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master
[downloads-image]: https://img.shields.io/npm/dm/etag.svg
[downloads-url]: https://npmjs.org/package/etag
@@ -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 User = createLucideIcon("User", [
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
]);
export { User as default };
//# sourceMappingURL=user.js.map
@@ -0,0 +1 @@
module.exports={C:{"48":0.02747,"52":0.01099,"78":0.01099,"115":0.0934,"120":0.01099,"121":0.01648,"123":0.01099,"124":0.00549,"128":0.02198,"133":0.00549,"135":0.00549,"136":0.01648,"138":0.02198,"139":0.00549,"140":0.07692,"142":0.01099,"145":0.00549,"146":0.00549,"147":0.01099,"148":0.01099,"149":0.00549,"150":0.02747,"151":0.01648,"152":0.03296,"153":0.07142,"154":0.30217,"155":1.03837,"156":0.98343,"157":0.02747,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 125 126 127 129 130 131 132 134 137 141 143 144 158 159 160 3.5 3.6"},D:{"49":0.01648,"89":0.00549,"93":0.01648,"95":0.00549,"99":0.00549,"101":0.00549,"103":0.08241,"104":0.01099,"105":0.01099,"106":0.00549,"107":0.01099,"108":0.01648,"109":0.26921,"110":0.01099,"111":0.01099,"112":0.01099,"113":0.00549,"116":0.14834,"117":0.01099,"118":0.03296,"119":0.03296,"120":0.05494,"121":0.01648,"122":0.03296,"123":0.01099,"124":0.02747,"125":0.00549,"126":0.05494,"127":0.01099,"128":0.06043,"130":0.01099,"131":0.03296,"132":0.00549,"133":0.0879,"134":0.08241,"135":0.0879,"136":0.0934,"137":0.11537,"138":0.24174,"139":0.09889,"140":0.0934,"141":0.10439,"142":0.28569,"143":0.02198,"144":0.11537,"145":0.05494,"146":0.07692,"147":0.06593,"148":0.1868,"149":0.28569,"150":0.89003,"151":3.26344,"152":12.89442,"153":10.14742,"154":2.00531,"155":0.02198,"156":0.01099,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 85 86 87 88 90 91 92 94 96 97 98 100 102 114 115 129 157"},F:{"46":0.00549,"95":0.02747,"101":0.01648,"106":0.00549,"122":0.00549,"133":0.02198,"134":0.11537,"135":0.60434,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 102 103 104 105 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"109":0.02198,"111":0.01099,"119":0.00549,"120":0.00549,"122":0.00549,"128":0.00549,"132":0.00549,"133":0.00549,"134":0.00549,"139":0.00549,"140":0.00549,"141":0.01648,"142":0.01099,"143":0.02198,"144":0.01099,"145":0.01099,"146":0.01648,"147":0.01099,"148":0.02198,"149":0.03296,"150":0.11537,"151":0.50545,"152":3.25794,"153":3.82932,"154":0.99991,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 112 113 114 115 116 117 118 121 123 124 125 126 127 129 130 131 135 136 137 138"},E:{"27":0.21427,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 16.0 27.1 27.2 TP","12.1":0.00549,"13.1":0.03846,"14.1":0.03296,"15.1":0.01099,"15.2-15.3":0.00549,"15.4":0.00549,"15.5":0.00549,"15.6":0.19229,"16.1":0.01099,"16.2":0.1813,"16.3":0.01648,"16.4":0.00549,"16.5":0.01648,"16.6":0.25272,"17.0":0.00549,"17.1":0.29118,"17.2":0.01648,"17.3":0.01099,"17.4":0.02747,"17.5":0.05494,"17.6":0.33513,"18.0":0.01099,"18.1":0.03296,"18.2":0.01648,"18.3":0.14284,"18.4":0.03296,"18.5-18.7":0.04395,"26.0":0.01648,"26.1":0.02198,"26.2":0.10439,"26.3":0.12087,"26.4":0.08241,"26.5":0.51094,"26.6":3.18652},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00177,"5.0-5.1":0.00177,"6.0-6.1":0,"7.0-7.1":0.00355,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01773,"11.0-11.2":0.00177,"11.3-11.4":0.00355,"12.0-12.1":0,"12.2-12.5":0.0461,"13.0-13.1":0,"13.2":0.00887,"13.3":0,"13.4-13.7":0.00177,"14.0-14.4":0.00709,"14.5-14.8":0.01064,"15.0-15.1":0.01064,"15.2-15.3":0.00709,"15.4":0.00887,"15.5":0.01064,"15.6-15.8":0.2305,"16.0":0.01773,"16.1":0.03192,"16.2":0.01773,"16.3":0.03901,"16.4":0.00887,"16.5":0.01418,"16.6-16.7":0.32093,"17.0":0.01241,"17.1":0.01773,"17.2":0.01773,"17.3":0.0266,"17.4":0.03724,"17.5":0.0727,"17.6-17.7":0.18795,"18.0":0.03901,"18.1":0.07802,"18.2":0.10639,"18.3":0.1844,"18.4":0.11525,"18.5-18.7":2.38129,"26.0":0.11525,"26.1":0.11703,"26.2":0.30498,"26.3":0.3298,"26.4":0.24114,"26.5":1.6153,"26.6":9.96666,"27.0":0.76421,"27.1":0,"27.2":0.0195},P:{"4":0.00871,"21":0.00871,"22":0.00871,"23":0.00871,"24":0.01742,"25":0.01742,"26":0.01742,"27":0.00871,"28":0.05227,"29":0.09583,"30":2.49152,_:"20 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 18.0 19.0","17.0":0.00871},I:{"0":0.02702,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.19826,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":24.13007},Line truncated
@@ -0,0 +1,85 @@
import type {
CodeKeywordDefinition,
KeywordErrorDefinition,
ErrorObject,
AnySchema,
} from "../../types"
import {_, not, and, Name, Code} from "../../compile/codegen"
import {alwaysValidSchema, Type} from "../../compile/util"
import N from "../../compile/names"
export type UnevaluatedPropertiesError = ErrorObject<
"unevaluatedProperties",
{unevaluatedProperty: string},
AnySchema
>
const error: KeywordErrorDefinition = {
message: "must NOT have unevaluated properties",
params: ({params}) => _`{unevaluatedProperty: ${params.unevaluatedProperty}}`,
}
const def: CodeKeywordDefinition = {
keyword: "unevaluatedProperties",
type: "object",
schemaType: ["boolean", "object"],
trackErrors: true,
error,
code(cxt) {
const {gen, schema, data, errsCount, it} = cxt
/* istanbul ignore if */
if (!errsCount) throw new Error("ajv implementation error")
const {allErrors, props} = it
if (props instanceof Name) {
gen.if(_`${props} !== true`, () =>
gen.forIn("key", data, (key: Name) =>
gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))
)
)
} else if (props !== true) {
gen.forIn("key", data, (key: Name) =>
props === undefined
? unevaluatedPropCode(key)
: gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key))
)
}
it.props = true
cxt.ok(_`${errsCount} === ${N.errors}`)
function unevaluatedPropCode(key: Name): void {
if (schema === false) {
cxt.setParams({unevaluatedProperty: key})
cxt.error()
if (!allErrors) gen.break()
return
}
if (!alwaysValidSchema(it, schema)) {
const valid = gen.name("valid")
cxt.subschema(
{
keyword: "unevaluatedProperties",
dataProp: key,
dataPropType: Type.Str,
},
valid
)
if (!allErrors) gen.if(not(valid), () => gen.break())
}
}
function unevaluatedDynamic(evaluatedProps: Name, key: Name): Code {
return _`!${evaluatedProps} || !${evaluatedProps}[${key}]`
}
function unevaluatedStatic(evaluatedProps: {[K in string]?: true}, key: Name): Code {
const ps: Code[] = []
for (const p in evaluatedProps) {
if (evaluatedProps[p] === true) ps.push(_`${key} !== ${p}`)
}
return and(...ps)
}
},
}
export default def
@@ -0,0 +1,19 @@
import { decode } from '../util/base64url.js';
export const unprotected = Symbol();
export function assertNotSet(value, name) {
if (value) {
throw new TypeError(`${name} can only be called once`);
}
}
export function decodeBase64url(value, label, ErrorClass) {
try {
return decode(value);
}
catch {
throw new ErrorClass(`Failed to base64url decode the ${label}`);
}
}
export async function digest(algorithm, data) {
const subtleDigest = `SHA-${algorithm.slice(-3)}`;
return new Uint8Array(await crypto.subtle.digest(subtleDigest, data));
}
@@ -0,0 +1,65 @@
import type { $ZodRegistry } from "./registries.js";
import type * as schemas from "./schemas.js";
import { type Processor, type RegistryToJSONSchemaParams, type ToJSONSchemaParams, type ZodStandardJSONSchemaPayload } from "./to-json-schema.js";
type Bound = number | bigint | Date;
interface CheckAggregate<N extends Bound = Bound> {
minimum?: N;
maximum?: N;
exclusiveMinimum?: N;
exclusiveMaximum?: N;
multipleOf?: number[];
format?: string;
isInt?: boolean;
patterns?: Set<RegExp>;
mime?: string[];
contentEncoding?: string;
laxFormat?: boolean;
}
export declare function aggregateChecks<N extends Bound = Bound>(schema: schemas.$ZodType): CheckAggregate<N>;
export declare const stringProcessor: Processor<schemas.$ZodString>;
export declare const numberProcessor: Processor<schemas.$ZodNumber>;
export declare const booleanProcessor: Processor<schemas.$ZodBoolean>;
export declare const bigintProcessor: Processor<schemas.$ZodBigInt>;
export declare const symbolProcessor: Processor<schemas.$ZodSymbol>;
export declare const nullProcessor: Processor<schemas.$ZodNull>;
export declare const undefinedProcessor: Processor<schemas.$ZodUndefined>;
export declare const voidProcessor: Processor<schemas.$ZodVoid>;
export declare const neverProcessor: Processor<schemas.$ZodNever>;
export declare const anyProcessor: Processor<schemas.$ZodAny>;
export declare const unknownProcessor: Processor<schemas.$ZodUnknown>;
export declare const dateProcessor: Processor<schemas.$ZodDate>;
export declare const enumProcessor: Processor<schemas.$ZodEnum>;
export declare const literalProcessor: Processor<schemas.$ZodLiteral>;
export declare const nanProcessor: Processor<schemas.$ZodNaN>;
export declare const templateLiteralProcessor: Processor<schemas.$ZodTemplateLiteral>;
export declare const fileProcessor: Processor<schemas.$ZodFile>;
export declare const successProcessor: Processor<schemas.$ZodSuccess>;
export declare const customProcessor: Processor<schemas.$ZodCustom>;
export declare const functionProcessor: Processor<schemas.$ZodFunction>;
export declare const transformProcessor: Processor<schemas.$ZodTransform>;
export declare const mapProcessor: Processor<schemas.$ZodMap>;
export declare const setProcessor: Processor<schemas.$ZodSet>;
export declare const arrayProcessor: Processor<schemas.$ZodArray>;
export declare const objectProcessor: Processor<schemas.$ZodObject>;
export declare const unionProcessor: Processor<schemas.$ZodUnion>;
export declare const intersectionProcessor: Processor<schemas.$ZodIntersection>;
export declare const tupleProcessor: Processor<schemas.$ZodTuple>;
export declare const recordProcessor: Processor<schemas.$ZodRecord>;
export declare const nullableProcessor: Processor<schemas.$ZodNullable>;
export declare const nonoptionalProcessor: Processor<schemas.$ZodNonOptional>;
export declare const defaultProcessor: Processor<schemas.$ZodDefault>;
export declare const prefaultProcessor: Processor<schemas.$ZodPrefault>;
export declare const catchProcessor: Processor<schemas.$ZodCatch>;
export declare const pipeProcessor: Processor<schemas.$ZodPipe>;
export declare const readonlyProcessor: Processor<schemas.$ZodReadonly>;
export declare const promiseProcessor: Processor<schemas.$ZodPromise>;
export declare const optionalProcessor: Processor<schemas.$ZodOptional>;
export declare const lazyProcessor: Processor<schemas.$ZodLazy>;
export declare const allProcessors: Record<string, Processor<any>>;
export declare function toJSONSchema<T extends schemas.$ZodType>(schema: T, params?: ToJSONSchemaParams): ZodStandardJSONSchemaPayload<T>;
export declare function toJSONSchema(registry: $ZodRegistry<{
id?: string | undefined;
}>, params?: RegistryToJSONSchemaParams): {
schemas: Record<string, ZodStandardJSONSchemaPayload<schemas.$ZodType>>;
};
export {};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_J"},C:{"2":"_S"},D:{"2":"_Q"},E:{"1":"_6D","2":"_qB","130":"_FS _7E"},F:{"2":"_c"},G:{"1":"_UE","2":"_XB yD","130":"_vI _lM"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_N"},L:{"2":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"2":"_F"},Q:{"2":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:6,C:"HEIF/HEIC image format",D:true};
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isScope;
var _index = require("./generated/index.js");
function isScope(node, parent) {
if ((0, _index.isBlockStatement)(node) && ((0, _index.isFunction)(parent) || (0, _index.isCatchClause)(parent))) {
return false;
}
if ((0, _index.isPattern)(node) && ((0, _index.isFunction)(parent) || (0, _index.isCatchClause)(parent))) {
return true;
}
return (0, _index.isScopable)(node);
}
//# sourceMappingURL=isScope.js.map
@@ -0,0 +1,24 @@
import { Register } from './router.cjs';
import { AnyContext, AnyPathParams, AnyRoute, FileBaseRouteOptions, ResolveParams, Route, RouteConstraints, UpdatableRouteOptions } from './route.cjs';
import { AnyValidator } from './validators.cjs';
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 {
}
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,115 @@
import { resize, frame, cancelFrame, frameData } from 'motion-dom';
import { noop } from 'motion-utils';
import { createScrollInfo } from './info.mjs';
import { createOnScrollHandler } from './on-scroll-handler.mjs';
const scrollListeners = new WeakMap();
const resizeListeners = new WeakMap();
const onScrollHandlers = new WeakMap();
const scrollSize = new WeakMap();
const dimensionCheckProcesses = new WeakMap();
const getEventTarget = (element) => element === document.scrollingElement ? window : element;
function scrollInfo(onScroll, { container = document.scrollingElement, trackContentSize = false, ...options } = {}) {
if (!container)
return noop;
let containerHandlers = onScrollHandlers.get(container);
/**
* Get the onScroll handlers for this container.
* If one isn't found, create a new one.
*/
if (!containerHandlers) {
containerHandlers = new Set();
onScrollHandlers.set(container, containerHandlers);
}
/**
* Create a new onScroll handler for the provided callback.
*/
const info = createScrollInfo();
const containerHandler = createOnScrollHandler(container, onScroll, info, options);
containerHandlers.add(containerHandler);
/**
* Check if there's a scroll event listener for this container.
* If not, create one.
*/
if (!scrollListeners.has(container)) {
const measureAll = () => {
for (const handler of containerHandlers) {
handler.measure(frameData.timestamp);
}
frame.preUpdate(notifyAll);
};
const notifyAll = () => {
for (const handler of containerHandlers) {
handler.notify();
}
};
const listener = () => frame.read(measureAll);
scrollListeners.set(container, listener);
const target = getEventTarget(container);
window.addEventListener("resize", listener);
if (container !== document.documentElement) {
resizeListeners.set(container, resize(container, listener));
}
target.addEventListener("scroll", listener);
listener();
}
/**
* Enable content size tracking if requested and not already enabled.
*/
if (trackContentSize && !dimensionCheckProcesses.has(container)) {
const listener = scrollListeners.get(container);
// Store initial scroll dimensions (object is reused to avoid allocation)
const size = {
width: container.scrollWidth,
height: container.scrollHeight,
};
scrollSize.set(container, size);
// Add frame-based scroll dimension checking to detect content changes
const checkScrollDimensions = () => {
const newWidth = container.scrollWidth;
const newHeight = container.scrollHeight;
if (size.width !== newWidth || size.height !== newHeight) {
listener();
size.width = newWidth;
size.height = newHeight;
}
};
// Schedule with keepAlive=true to run every frame
const dimensionCheckProcess = frame.read(checkScrollDimensions, true);
dimensionCheckProcesses.set(container, dimensionCheckProcess);
}
const listener = scrollListeners.get(container);
frame.read(listener, false, true);
return () => {
cancelFrame(listener);
/**
* Check if we even have any handlers for this container.
*/
const currentHandlers = onScrollHandlers.get(container);
if (!currentHandlers)
return;
currentHandlers.delete(containerHandler);
if (currentHandlers.size)
return;
/**
* If no more handlers, remove the scroll listener too.
*/
const scrollListener = scrollListeners.get(container);
scrollListeners.delete(container);
if (scrollListener) {
getEventTarget(container).removeEventListener("scroll", scrollListener);
resizeListeners.get(container)?.();
window.removeEventListener("resize", scrollListener);
}
// Clean up scroll dimension checking
const dimensionCheckProcess = dimensionCheckProcesses.get(container);
if (dimensionCheckProcess) {
cancelFrame(dimensionCheckProcess);
dimensionCheckProcesses.delete(container);
}
scrollSize.delete(container);
};
}
export { scrollInfo };
//# sourceMappingURL=track.mjs.map
@@ -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 SquareChevronDown = createLucideIcon("SquareChevronDown", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "m16 10-4 4-4-4", key: "894hmk" }]
]);
export { SquareChevronDown as default };
//# sourceMappingURL=square-chevron-down.js.map
@@ -0,0 +1 @@
{"version":3,"file":"attach-animation.mjs","sources":["../../../../../src/render/dom/scroll/attach-animation.ts"],"sourcesContent":["import { AnimationPlaybackControls, observeTimeline } from \"motion-dom\"\nimport { ScrollOptionsWithDefaults } from \"./types\"\nimport { canUseNativeTimeline } from \"./utils/can-use-native-timeline\"\nimport { getTimeline } from \"./utils/get-timeline\"\nimport { offsetToViewTimelineRange } from \"./utils/offset-to-range\"\n\nexport function attachToAnimation(\n animation: AnimationPlaybackControls,\n options: ScrollOptionsWithDefaults\n) {\n const timeline = getTimeline(options)\n\n const range = options.target\n ? offsetToViewTimelineRange(options.offset)\n : undefined\n\n /**\n * Use native timeline when:\n * - No target: ScrollTimeline (existing behaviour)\n * - Target with mappable offset: ViewTimeline with named range\n * - Target with unmappable offset: fall back to JS observe\n */\n const useNative = options.target\n ? canUseNativeTimeline(options.target) && !!range\n : canUseNativeTimeline()\n\n return animation.attachTimeline({\n timeline: useNative ? timeline : undefined,\n ...(range &&\n useNative && {\n rangeStart: range.rangeStart,\n rangeEnd: range.rangeEnd,\n }),\n observe: (valueAnimation) => {\n valueAnimation.pause()\n\n return observeTimeline((progress) => {\n valueAnimation.time =\n valueAnimation.iterationDuration * progress\n }, timeline)\n },\n })\n}\n"],"names":[],"mappings":";;;;;AAMM,SAAU,iBAAiB,CAC7B,SAAoC,EACpC,OAAkC,EAAA;AAElC,IAAA,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC;AAErC,IAAA,MAAM,KAAK,GAAG,OAAO,CAAC;AAClB,UAAE,yBAAyB,CAAC,OAAO,CAAC,MAAM;UACxC,SAAS;AAEf;;;;;AAKG;AACH,IAAA,MAAM,SAAS,GAAG,OAAO,CAAC;UACpB,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;UAC1C,oBAAoB,EAAE;IAE5B,OAAO,SAAS,CAAC,cAAc,CAAC;QAC5B,QAAQ,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS;AAC1C,QAAA,IAAI,KAAK;AACL,YAAA,SAAS,IAAI;YACT,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ;SAC3B,CAAC;AACN,QAAA,OAAO,EAAE,CAAC,cAAc,KAAI;YACxB,cAAc,CAAC,KAAK,EAAE;AAEtB,YAAA,OAAO,eAAe,CAAC,CAAC,QAAQ,KAAI;AAChC,gBAAA,cAAc,CAAC,IAAI;AACf,oBAAA,cAAc,CAAC,iBAAiB,GAAG,QAAQ;YACnD,CAAC,EAAE,QAAQ,CAAC;QAChB,CAAC;AACJ,KAAA,CAAC;AACN;;;;"}
@@ -0,0 +1,90 @@
{
"name": "react-style-singleton",
"version": "2.2.3",
"description": "Just create a single stylesheet...",
"main": "dist/es5/index.js",
"types": "dist/es5/index.d.ts",
"jsnext:main": "dist/es2015/index.js",
"module": "dist/es2015/index.js",
"module:es2019": "dist/es2019/index.js",
"files": [
"dist"
],
"scripts": {
"dev": "lib-builder dev",
"test": "jest",
"test:ci": "jest --runInBand --coverage",
"build": "lib-builder build && yarn size:report",
"release": "yarn build && yarn test",
"size": "npx size-limit",
"size:report": "npx size-limit --json > .size.json",
"lint": "lib-builder lint",
"format": "lib-builder format",
"update": "lib-builder update",
"prepublish-only": "yarn build && yarn changelog",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"changelog:rewrite": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"
},
"repository": {
"type": "git",
"url": "https://github.com/theKashey/react-style-singleton"
},
"bugs": {
"url": "https://github.com/theKashey/react-style-singleton/issues"
},
"homepage": "https://github.com/theKashey/react-style-singleton#readme",
"author": "Anton Korzunov (thekashey@gmail.com)",
"license": "MIT",
"devDependencies": {
"@theuiteam/lib-builder": "^0.1.4",
"@size-limit/preset-small-lib": "^11.0.2",
"size-limit": "^11.0.2",
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
},
"keywords": [
"react",
"style",
"css"
],
"dependencies": {
"tslib": "^2.0.0",
"get-nonce": "^1.0.0"
},
"engines": {
"node": ">=10"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts,tsx}": [
"prettier --write",
"eslint --fix",
"git add"
],
"*.{js,css,json,md}": [
"prettier --write",
"git add"
]
},
"prettier": {
"printWidth": 120,
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
},
"packageManager": "yarn@1.22.19"
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_fN","2":"_KB","257":"_K"},C:{"1":"_1D","2":"_qL","194":"_EQ"},D:{"1":"_WO _AE _iD","2":"_Y _dG","257":"_RL"},E:{"1":"_7C","2":"_ZC"},F:{"1":"_iH _DM _sB","2":"_JP","257":"_8F"},G:{"1":"_2","2":"_r"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_N"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"1":"_U","2":"J"},Q:{"1":"JE"},R:{"2":"KE"},S:{"1":"_C"}},B:7,C:"Speech Synthesis API",D:true};
@@ -0,0 +1,52 @@
import type { AnyNode } from "domhandler";
export interface DomSerializerOptions {
/**
* Print an empty attribute's value.
*
* @default xmlMode
* @example With <code>emptyAttrs: false</code>: <code>&lt;input checked&gt;</code>
* @example With <code>emptyAttrs: true</code>: <code>&lt;input checked=""&gt;</code>
*/
emptyAttrs?: boolean;
/**
* Print self-closing tags for tags without contents.
*
* @default xmlMode
* @example With <code>selfClosingTags: false</code>: <code>&lt;foo&gt;&lt;/foo&gt;</code>
* @example With <code>selfClosingTags: true</code>: <code>&lt;foo /&gt;</code>
*/
selfClosingTags?: boolean;
/**
* Treat the input as an XML document; enables the `emptyAttrs` and `selfClosingTags` options.
*
* If the value is `"foreign"`, it will try to correct mixed-case attribute names.
*
* @default false
*/
xmlMode?: boolean | "foreign";
/**
* Encode characters that are either reserved in HTML or XML.
*
* If `xmlMode` is `true` or the value not `'utf8'`, characters outside of the utf8 range will be encoded as well.
*
* @default `decodeEntities`
*/
encodeEntities?: boolean | "utf8";
/**
* Option inherited from parsing; will be used as the default value for `encodeEntities`.
*
* @default true
*/
decodeEntities?: boolean;
}
/**
* Renders a DOM node or an array of DOM nodes to a string.
*
* Can be thought of as the equivalent of the `outerHTML` of the passed node(s).
*
* @param node Node to be rendered.
* @param options Changes serialization behavior
*/
export declare function render(node: AnyNode | ArrayLike<AnyNode>, options?: DomSerializerOptions): string;
export default render;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,12 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
export declare class ParameterDefinition extends DefinitionBase<DefinitionType.Parameter, TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSDeclareFunction | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignature, null, TSESTree.BindingName> {
/**
* Whether the parameter definition is a part of a rest parameter.
*/
readonly isTypeDefinition = false;
readonly isVariableDefinition = true;
readonly rest: boolean;
constructor(name: TSESTree.BindingName, node: ParameterDefinition['node'], rest: boolean);
}
@@ -0,0 +1,452 @@
| Linux / MacOS / Windows | Coverage | Downloads |
| ----------------------- | -------- | --------- |
| [![build][bb]][bl] | [![coverage][cb]][cl] | [![downloads][db]][dl] |
[bb]: https://github.com/kaelzhang/node-ignore/actions/workflows/nodejs.yml/badge.svg
[bl]: https://github.com/kaelzhang/node-ignore/actions/workflows/nodejs.yml
[cb]: https://codecov.io/gh/kaelzhang/node-ignore/branch/master/graph/badge.svg
[cl]: https://codecov.io/gh/kaelzhang/node-ignore
[db]: http://img.shields.io/npm/dm/ignore.svg
[dl]: https://www.npmjs.org/package/ignore
# ignore
`ignore` is a manager, filter and parser which implemented in pure JavaScript according to the [.gitignore spec 2.22.1](http://git-scm.com/docs/gitignore).
`ignore` is used by eslint, gitbook and [many others](https://www.npmjs.com/browse/depended/ignore).
Pay **ATTENTION** that [`minimatch`](https://www.npmjs.org/package/minimatch) (which used by `fstream-ignore`) does not follow the gitignore spec.
To filter filenames according to a .gitignore file, I recommend this npm package, `ignore`.
To parse an `.npmignore` file, you should use `minimatch`, because an `.npmignore` file is parsed by npm using `minimatch` and it does not work in the .gitignore way.
### Tested on
`ignore` is fully tested, and has more than **five hundreds** of unit tests.
- Linux + Node: `0.8` - `7.x`
- Windows + Node: `0.10` - `7.x`, node < `0.10` is not tested due to the lack of support of appveyor.
Actually, `ignore` does not rely on any versions of node specially.
Since `4.0.0`, ignore will no longer support `node < 6` by default, to use in node < 6, `require('ignore/legacy')`. For details, see [CHANGELOG](https://github.com/kaelzhang/node-ignore/blob/master/CHANGELOG.md).
## Table Of Main Contents
- [Usage](#usage)
- [`Pathname` Conventions](#pathname-conventions)
- See Also:
- [`glob-gitignore`](https://www.npmjs.com/package/glob-gitignore) matches files using patterns and filters them according to gitignore rules.
- [Upgrade Guide](#upgrade-guide)
## Install
```sh
npm i ignore
```
## Usage
```js
import ignore from 'ignore'
const ig = ignore().add(['.abc/*', '!.abc/d/'])
```
### Filter the given paths
```js
const paths = [
'.abc/a.js', // filtered out
'.abc/d/e.js' // included
]
ig.filter(paths) // ['.abc/d/e.js']
ig.ignores('.abc/a.js') // true
```
### As the filter function
```js
paths.filter(ig.createFilter()); // ['.abc/d/e.js']
```
### Win32 paths will be handled
```js
ig.filter(['.abc\\a.js', '.abc\\d\\e.js'])
// if the code above runs on windows, the result will be
// ['.abc\\d\\e.js']
```
## Why another ignore?
- `ignore` is a standalone module, and is much simpler so that it could easy work with other programs, unlike [isaacs](https://npmjs.org/~isaacs)'s [fstream-ignore](https://npmjs.org/package/fstream-ignore) which must work with the modules of the fstream family.
- `ignore` only contains utility methods to filter paths according to the specified ignore rules, so
- `ignore` never try to find out ignore rules by traversing directories or fetching from git configurations.
- `ignore` don't cares about sub-modules of git projects.
- Exactly according to [gitignore man page](http://git-scm.com/docs/gitignore), fixes some known matching issues of fstream-ignore, such as:
- '`/*.js`' should only match '`a.js`', but not '`abc/a.js`'.
- '`**/foo`' should match '`foo`' anywhere.
- Prevent re-including a file if a parent directory of that file is excluded.
- Handle trailing whitespaces:
- `'a '`(one space) should not match `'a '`(two spaces).
- `'a \ '` matches `'a '`
- All test cases are verified with the result of `git check-ignore`.
# Methods
## .add(pattern: string | Ignore): this
## .add(patterns: Array<string | Ignore>): this
## .add({pattern: string, mark?: string}): this since 7.0.0
- **pattern** `string | Ignore` An ignore pattern string, or the `Ignore` instance
- **patterns** `Array<string | Ignore>` Array of ignore patterns.
- **mark?** `string` Pattern mark, which is used to associate the pattern with a certain marker, such as the line no of the `.gitignore` file. Actually it could be an arbitrary string and is optional.
Adds a rule or several rules to the current manager.
Returns `this`
Notice that a line starting with `'#'`(hash) is treated as a comment. Put a backslash (`'\'`) in front of the first hash for patterns that begin with a hash, if you want to ignore a file with a hash at the beginning of the filename.
```js
ignore().add('#abc').ignores('#abc') // false
ignore().add('\\#abc').ignores('#abc') // true
```
`pattern` could either be a line of ignore pattern or a string of multiple ignore patterns, which means we could just `ignore().add()` the content of a ignore file:
```js
ignore()
.add(fs.readFileSync(filenameOfGitignore).toString())
.filter(filenames)
```
`pattern` could also be an `ignore` instance, so that we could easily inherit the rules of another `Ignore` instance.
## .ignores(pathname: [Pathname](#pathname-conventions)): boolean
> new in 3.2.0
Returns `Boolean` whether `pathname` should be ignored.
```js
ig.ignores('.abc/a.js') // true
```
Please **PAY ATTENTION** that `.ignores()` is **NOT** equivalent to `git check-ignore` although in most cases they return equivalent results.
However, for the purposes of imitating the behavior of `git check-ignore`, please use `.checkIgnore()` instead.
### `Pathname` Conventions:
#### 1. `Pathname` should be a `path.relative()`d pathname
`Pathname` should be a string that have been `path.join()`ed, or the return value of `path.relative()` to the current directory,
```js
// WRONG, an error will be thrown
ig.ignores('./abc')
// WRONG, for it will never happen, and an error will be thrown
// If the gitignore rule locates at the root directory,
// `'/abc'` should be changed to `'abc'`.
// ```
// path.relative('/', '/abc') -> 'abc'
// ```
ig.ignores('/abc')
// WRONG, that it is an absolute path on Windows, an error will be thrown
ig.ignores('C:\\abc')
// Right
ig.ignores('abc')
// Right
ig.ignores(path.join('./abc')) // path.join('./abc') -> 'abc'
```
In other words, each `Pathname` here should be a relative path to the directory of the gitignore rules.
Suppose the dir structure is:
```
/path/to/your/repo
|-- a
| |-- a.js
|
|-- .b
|
|-- .c
|-- .DS_store
```
Then the `paths` might be like this:
```js
[
'a/a.js'
'.b',
'.c/.DS_store'
]
```
#### 2. filenames and dirnames
`node-ignore` does NO `fs.stat` during path matching, so `node-ignore` treats
- `foo` as a file
- **`foo/` as a directory**
For the example below:
```js
// First, we add a ignore pattern to ignore a directory
ig.add('config/')
// `ig` does NOT know if 'config', in the real world,
// is a normal file, directory or something.
ig.ignores('config')
// `ig` treats `config` as a file, so it returns `false`
ig.ignores('config/')
// returns `true`
```
Specially for people who develop some library based on `node-ignore`, it is important to understand that.
Usually, you could use [`glob`](http://npmjs.org/package/glob) with `option.mark = true` to fetch the structure of the current directory:
```js
import glob from 'glob'
glob('**', {
// Adds a / character to directory matches.
mark: true
}, (err, files) => {
if (err) {
return console.error(err)
}
let filtered = ignore().add(patterns).filter(files)
console.log(filtered)
})
```
## .filter(paths: Array&lt;Pathname&gt;): Array&lt;Pathname&gt;
```ts
type Pathname = string
```
Filters the given array of pathnames, and returns the filtered array.
- **paths** `Array.<Pathname>` The array of `pathname`s to be filtered.
## .createFilter()
Creates a filter function which could filter an array of paths with `Array.prototype.filter`.
Returns `function(path)` the filter function.
## .test(pathname: Pathname): TestResult
> New in 5.0.0
Returns `TestResult`
```ts
// Since 5.0.0
interface TestResult {
ignored: boolean
// true if the `pathname` is finally unignored by some negative pattern
unignored: boolean
// The `IgnoreRule` which ignores the pathname
rule?: IgnoreRule
}
// Since 7.0.0
interface IgnoreRule {
// The original pattern
pattern: string
// Whether the pattern is a negative pattern
negative: boolean
// Which is used for other packages to build things upon `node-ignore`
mark?: string
}
```
- `{ignored: true, unignored: false}`: the `pathname` is ignored
- `{ignored: false, unignored: true}`: the `pathname` is unignored
- `{ignored: false, unignored: false}`: the `pathname` is never matched by any ignore rules.
## .checkIgnore(target: string): TestResult
> new in 7.0.0
Debugs gitignore / exclude files, which is equivalent to `git check-ignore -v`. Usually this method is used for other packages to implement the function of `git check-ignore -v` upon `node-ignore`
- **target** `string` the target to test.
Returns `TestResult`
```js
ig.add({
pattern: 'foo/*',
mark: '60'
})
const {
ignored,
rule
} = checkIgnore('foo/')
if (ignored) {
console.log(`.gitignore:${result}:${rule.mark}:${rule.pattern} foo/`)
}
// .gitignore:60:foo/* foo/
```
Please pay attention that this method does not have a strong built-in cache mechanism.
The purpose of introducing this method is to make it possible to implement the `git check-ignore` command in JavaScript based on `node-ignore`.
So do not use this method in those situations where performance is extremely important.
## static `isPathValid(pathname): boolean` since 5.0.0
Check whether the `pathname` is an valid `path.relative()`d path according to the [convention](#1-pathname-should-be-a-pathrelatived-pathname).
This method is **NOT** used to check if an ignore pattern is valid.
```js
import {isPathValid} from 'ignore'
isPathValid('./foo') // false
```
## <strike>.addIgnoreFile(path)</strike>
REMOVED in `3.x` for now.
To upgrade `ignore@2.x` up to `3.x`, use
```js
import fs from 'fs'
if (fs.existsSync(filename)) {
ignore().add(fs.readFileSync(filename).toString())
}
```
instead.
## ignore(options)
### `options.ignorecase` since 4.0.0
Similar to the `core.ignorecase` option of [git-config](https://git-scm.com/docs/git-config), `node-ignore` will be case insensitive if `options.ignorecase` is set to `true` (the default value), otherwise case sensitive.
```js
const ig = ignore({
ignorecase: false
})
ig.add('*.png')
ig.ignores('*.PNG') // false
```
### `options.ignoreCase?: boolean` since 5.2.0
Which is an alternative to `options.ignoreCase`
### `options.allowRelativePaths?: boolean` since 5.2.0
This option brings backward compatibility with projects which based on `ignore@4.x`. If `options.allowRelativePaths` is `true`, `ignore` will not check whether the given path to be tested is [`path.relative()`d](#pathname-conventions).
However, passing a relative path, such as `'./foo'` or `'../foo'`, to test if it is ignored or not is not a good practise, which might lead to unexpected behavior
```js
ignore({
allowRelativePaths: true
}).ignores('../foo/bar.js') // And it will not throw
```
****
# Upgrade Guide
## Upgrade 4.x -> 5.x
Since `5.0.0`, if an invalid `Pathname` passed into `ig.ignores()`, an error will be thrown, unless `options.allowRelative = true` is passed to the `Ignore` factory.
While `ignore < 5.0.0` did not make sure what the return value was, as well as
```ts
.ignores(pathname: Pathname): boolean
.filter(pathnames: Array<Pathname>): Array<Pathname>
.createFilter(): (pathname: Pathname) => boolean
.test(pathname: Pathname): {ignored: boolean, unignored: boolean}
```
See the convention [here](#1-pathname-should-be-a-pathrelatived-pathname) for details.
If there are invalid pathnames, the conversion and filtration should be done by users.
```js
import {isPathValid} from 'ignore' // introduced in 5.0.0
const paths = [
// invalid
//////////////////
'',
false,
'../foo',
'.',
//////////////////
// valid
'foo'
]
.filter(isPathValid)
ig.filter(paths)
```
## Upgrade 3.x -> 4.x
Since `4.0.0`, `ignore` will no longer support node < 6, to use `ignore` in node < 6:
```js
var ignore = require('ignore/legacy')
```
## Upgrade 2.x -> 3.x
- All `options` of 2.x are unnecessary and removed, so just remove them.
- `ignore()` instance is no longer an [`EventEmitter`](nodejs.org/api/events.html), and all events are unnecessary and removed.
- `.addIgnoreFile()` is removed, see the [.addIgnoreFile](#addignorefilepath) section for details.
****
# Collaborators
- [@whitecolor](https://github.com/whitecolor) *Alex*
- [@SamyPesse](https://github.com/SamyPesse) *Samy Pessé*
- [@azproduction](https://github.com/azproduction) *Mikhail Davydov*
- [@TrySound](https://github.com/TrySound) *Bogdan Chadkin*
- [@JanMattner](https://github.com/JanMattner) *Jan Mattner*
- [@ntwb](https://github.com/ntwb) *Stephen Edgar*
- [@kasperisager](https://github.com/kasperisager) *Kasper Isager*
- [@sandersn](https://github.com/sandersn) *Nathan Shively-Sanders*
@@ -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 SquareMinus = createLucideIcon("SquareMinus", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M8 12h8", key: "1wcyev" }]
]);
export { SquareMinus as default };
//# sourceMappingURL=square-minus.js.map
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getInclusionReasons = getInclusionReasons;
var _semver = require("semver");
var _pretty = require("./pretty.js");
var _utils = require("./utils.js");
function getInclusionReasons(item, targetVersions, list) {
const minVersions = list[item] || {};
return Object.keys(targetVersions).reduce((result, env) => {
const minVersion = (0, _utils.getLowestImplementedVersion)(minVersions, env);
const targetVersion = targetVersions[env];
if (!minVersion) {
result[env] = (0, _pretty.prettifyVersion)(targetVersion);
} else {
const minIsUnreleased = (0, _utils.isUnreleasedVersion)(minVersion, env);
const targetIsUnreleased = (0, _utils.isUnreleasedVersion)(targetVersion, env);
if (!targetIsUnreleased && (minIsUnreleased || _semver.lt(targetVersion.toString(), (0, _utils.semverify)(minVersion)))) {
result[env] = (0, _pretty.prettifyVersion)(targetVersion);
}
}
return result;
}, {});
}
//# sourceMappingURL=debug.js.map
@@ -0,0 +1 @@
{"version":3,"file":"subscribe-value.mjs","sources":["../../../src/value/subscribe-value.ts"],"sourcesContent":["import { MotionValue } from \".\"\nimport { cancelFrame, frame } from \"../frameloop\"\n\nexport function subscribeValue<O>(\n inputValues: MotionValue[],\n outputValue: MotionValue<O>,\n getLatest: () => O\n) {\n const update = () => outputValue.set(getLatest())\n const scheduleUpdate = () => frame.preRender(update, false, true)\n\n const subscriptions = inputValues.map((v) => v.on(\"change\", scheduleUpdate))\n\n outputValue.on(\"destroy\", () => {\n subscriptions.forEach((unsubscribe) => unsubscribe())\n cancelFrame(update)\n })\n}\n"],"names":[],"mappings":";;SAGgB,cAAc,CAC1B,WAA0B,EAC1B,WAA2B,EAC3B,SAAkB,EAAA;AAElB,IAAA,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;AACjD,IAAA,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC;IAEjE,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;AAE5E,IAAA,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAK;QAC3B,aAAa,CAAC,OAAO,CAAC,CAAC,WAAW,KAAK,WAAW,EAAE,CAAC;QACrD,WAAW,CAAC,MAAM,CAAC;AACvB,IAAA,CAAC,CAAC;AACN;;;;"}
@@ -0,0 +1,820 @@
flf2a$ 8 8 20 -1 3
banner3-D by Merlin Greywolf merlin@brahms.udel.edu
August 9, 1994
:::@
:::@
:::@
:::@
:::@
:::@
:::@
:::@@
'####:@
####:@
####:@
: ##::@
:..:::@
'####:@
####:@
....::@@
'####'####:@
#### ####:@
. ##:. ##::@
:..:::..:::@
:::::::::::@
:::::::::::@
:::::::::::@
:::::::::::@@
::'##'##:::@
:: ## ##:::@
'#########:@
.. ## ##.::@
'#########:@
.. ## ##.::@
:: ## ##:::@
::..:..::::@@
:'########::@
'##. ##. ##:@
##: ##:..::@
. ########::@
:... ##. ##:@
'##: ##: ##:@
. ########::@
:........:::@@
'#####::'##:::@
## ##:'##::::@
#####'##:::::@
.....'##::::::@
::::'##'#####:@
:::'##: ## ##:@
::'##:: #####:@
::..:::.....::@@
::'####::::@
:'##. ##:::@
:. ####::::@
:'####:::::@
'##. ##'##:@
##:. ##:::@
. ####. ##:@
:....::..::@@
'####:@
####:@
. ##::@
'##:::@
..::::@
::::::@
::::::@
::::::@@
::'###:@
:'##:::@
'##::::@
##::::@
##::::@
. ##:::@
:. ###:@
::...::@@
'###:::@
.. ##::@
::: ##:@
::: ##:@
::: ##:@
:: ##::@
###:::@
...::::@@
:::::::::::@
:'##::'##::@
:. ##'##:::@
'#########:@
.. ## ##.::@
: ##:. ##::@
:..:::..:::@
:::::::::::@@
::::::::@
::'##:::@
:: ##:::@
'######:@
.. ##.::@
:: ##:::@
::..::::@
::::::::@@
::::::@
::::::@
::::::@
'####:@
####:@
. ##::@
'##:::@
..::::@@
:::::::::@
:::::::::@
:::::::::@
'#######:@
........:@
:::::::::@
:::::::::@
:::::::::@@
:::::@
:::::@
:::::@
:::::@
:::::@
'###:@
###:@
...::@@
::::::'##:@
:::::'##::@
::::'##:::@
:::'##::::@
::'##:::::@
:'##::::::@
'##:::::::@
..::::::::@@
::'#####:::@
:'##.. ##::@
'##:::: ##:@
##:::: ##:@
##:::: ##:@
. ##:: ##::@
:. #####:::@
::.....::::@@
:::'##:::@
:'####:::@
:.. ##:::@
::: ##:::@
::: ##:::@
::: ##:::@
:'######:@
:......::@@
:'#######::@
'##.... ##:@
..::::: ##:@
:'#######::@
'##::::::::@
##::::::::@
#########:@
.........::@@
:'#######::@
'##.... ##:@
..::::: ##:@
:'#######::@
:...... ##:@
'##:::: ##:@
. #######::@
:.......:::@@
'##::::::::@
##:::'##::@
##::: ##::@
##::: ##::@
#########:@
...... ##::@
:::::: ##::@
::::::..:::@@
'########:@
##.....::@
##:::::::@
#######::@
...... ##:@
'##::: ##:@
. ######::@
:......:::@@
:'#######::@
'##.... ##:@
##::::..::@
########::@
##.... ##:@
##:::: ##:@
. #######::@
:.......:::@@
'########:@
##.. ##:@
..:: ##:::@
::: ##::::@
:: ##:::::@
:: ##:::::@
:: ##:::::@
::..::::::@@
:'#######::@
'##.... ##:@
##:::: ##:@
: #######::@
'##.... ##:@
##:::: ##:@
. #######::@
:.......:::@@
:'#######::@
'##.... ##:@
##:::: ##:@
: ########:@
:...... ##:@
'##:::: ##:@
. #######::@
:.......:::@@
:'##::@
'####:@
. ##::@
:..:::@
:'##::@
'####:@
. ##::@
:..:::@@
'####:@
####:@
....::@
'####:@
####:@
. ##::@
##:::@
.:::::@@
:::'##:@
::'##::@
:'##:::@
'##::::@
. ##:::@
:. ##::@
::. ##:@
:::..::@@
:::::::@
:::::::@
'#####:@
.....::@
'#####:@
.....::@
:::::::@
:::::::@@
'##::::@
. ##:::@
:. ##::@
::. ##:@
:: ##::@
: ##:::@
##::::@
..:::::@@
:'#######::@
'##.... ##:@
..:::: ##::@
:::: ###:::@
::: ##.::::@
:::..::::::@
:::'##:::::@
:::..::::::@@
:'#######::@
'##.... ##:@
##'### ##:@
## ### ##:@
## #####::@
##.....:::@
. #######::@
:.......:::@@
:::'###::::@
::'## ##:::@
:'##:. ##::@
'##:::. ##:@
#########:@
##.... ##:@
##:::: ##:@
..:::::..::@@
'########::@
##.... ##:@
##:::: ##:@
########::@
##.... ##:@
##:::: ##:@
########::@
........:::@@
:'######::@
'##... ##:@
##:::..::@
##:::::::@
##:::::::@
##::: ##:@
. ######::@
:......:::@@
'########::@
##.... ##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
########::@
........:::@@
'########:@
##.....::@
##:::::::@
######:::@
##...::::@
##:::::::@
########:@
........::@@
'########:@
##.....::@
##:::::::@
######:::@
##...::::@
##:::::::@
##:::::::@
..::::::::@@
:'######:::@
'##... ##::@
##:::..:::@
##::'####:@
##::: ##::@
##::: ##::@
. ######:::@
:......::::@@
'##::::'##:@
##:::: ##:@
##:::: ##:@
#########:@
##.... ##:@
##:::: ##:@
##:::: ##:@
..:::::..::@@
'####:@
. ##::@
: ##::@
: ##::@
: ##::@
: ##::@
'####:@
....::@@
::::::'##:@
:::::: ##:@
:::::: ##:@
:::::: ##:@
'##::: ##:@
##::: ##:@
. ######::@
:......:::@@
'##:::'##:@
##::'##::@
##:'##:::@
#####::::@
##. ##:::@
##:. ##::@
##::. ##:@
..::::..::@@
'##:::::::@
##:::::::@
##:::::::@
##:::::::@
##:::::::@
##:::::::@
########:@
........::@@
'##::::'##:@
###::'###:@
####'####:@
## ### ##:@
##. #: ##:@
##:.:: ##:@
##:::: ##:@
..:::::..::@@
'##::: ##:@
###:: ##:@
####: ##:@
## ## ##:@
##. ####:@
##:. ###:@
##::. ##:@
..::::..::@@
:'#######::@
'##.... ##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
. #######::@
:.......:::@@
'########::@
##.... ##:@
##:::: ##:@
########::@
##.....:::@
##::::::::@
##::::::::@
..:::::::::@@
:'#######::@
'##.... ##:@
##:::: ##:@
##:::: ##:@
##:'## ##:@
##:.. ##::@
: ##### ##:@
:.....:..::@@
'########::@
##.... ##:@
##:::: ##:@
########::@
##.. ##:::@
##::. ##::@
##:::. ##:@
..:::::..::@@
:'######::@
'##... ##:@
##:::..::@
. ######::@
:..... ##:@
'##::: ##:@
. ######::@
:......:::@@
'########:@
... ##..::@
::: ##::::@
::: ##::::@
::: ##::::@
::: ##::::@
::: ##::::@
:::..:::::@@
'##::::'##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
. #######::@
:.......:::@@
'##::::'##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
. ##:: ##::@
:. ## ##:::@
::. ###::::@
:::...:::::@@
'##:::::'##:@
##:'##: ##:@
##: ##: ##:@
##: ##: ##:@
##: ##: ##:@
##: ##: ##:@
. ###. ###::@
:...::...:::@@
'##::::'##:@
. ##::'##::@
:. ##'##:::@
::. ###::::@
:: ## ##:::@
: ##:. ##::@
##:::. ##:@
..:::::..::@@
'##:::'##:@
. ##:'##::@
:. ####:::@
::. ##::::@
::: ##::::@
::: ##::::@
::: ##::::@
:::..:::::@@
'########:@
..... ##::@
:::: ##:::@
::: ##::::@
:: ##:::::@
: ##::::::@
########:@
........::@@
'######:@
##...::@
##:::::@
##:::::@
##:::::@
##:::::@
######:@
......::@@
'##:::::::@
. ##::::::@
:. ##:::::@
::. ##::::@
:::. ##:::@
::::. ##::@
:::::. ##:@
::::::..::@@
'######:@
.... ##:@
:::: ##:@
:::: ##:@
:::: ##:@
:::: ##:@
'######:@
......::@@
::'###:::@
:'## ##::@
'##:. ##:@
..:::..::@
:::::::::@
:::::::::@
:::::::::@
:::::::::@@
:::::::::@
:::::::::@
:::::::::@
:::::::::@
:::::::::@
:::::::::@
'#######:@
.......::@@
'####:@
####:@
. ##::@
:. ##:@
::..::@
::::::@
::::::@
::::::@@
:::'###::::@
::'## ##:::@
:'##:. ##::@
'##:::. ##:@
#########:@
##.... ##:@
##:::: ##:@
..:::::..::@@
'########::@
##.... ##:@
##:::: ##:@
########::@
##.... ##:@
##:::: ##:@
########::@
........:::@@
:'######::@
'##... ##:@
##:::..::@
##:::::::@
##:::::::@
##::: ##:@
. ######::@
:......:::@@
'########::@
##.... ##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
########::@
........:::@@
'########:@
##.....::@
##:::::::@
######:::@
##...::::@
##:::::::@
########:@
........::@@
'########:@
##.....::@
##:::::::@
######:::@
##...::::@
##:::::::@
##:::::::@
..::::::::@@
:'######:::@
'##... ##::@
##:::..:::@
##::'####:@
##::: ##::@
##::: ##::@
. ######:::@
:......::::@@
'##::::'##:@
##:::: ##:@
##:::: ##:@
#########:@
##.... ##:@
##:::: ##:@
##:::: ##:@
..:::::..::@@
'####:@
. ##::@
: ##::@
: ##::@
: ##::@
: ##::@
'####:@
....::@@
::::::'##:@
:::::: ##:@
:::::: ##:@
:::::: ##:@
'##::: ##:@
##::: ##:@
. ######::@
:......:::@@
'##:::'##:@
##::'##::@
##:'##:::@
#####::::@
##. ##:::@
##:. ##::@
##::. ##:@
..::::..::@@
'##:::::::@
##:::::::@
##:::::::@
##:::::::@
##:::::::@
##:::::::@
########:@
........::@@
'##::::'##:@
###::'###:@
####'####:@
## ### ##:@
##. #: ##:@
##:.:: ##:@
##:::: ##:@
..:::::..::@@
'##::: ##:@
###:: ##:@
####: ##:@
## ## ##:@
##. ####:@
##:. ###:@
##::. ##:@
..::::..::@@
:'#######::@
'##.... ##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
. #######::@
:.......:::@@
'########::@
##.... ##:@
##:::: ##:@
########::@
##.....:::@
##::::::::@
##::::::::@
..:::::::::@@
:'#######::@
'##.... ##:@
##:::: ##:@
##:::: ##:@
##:'## ##:@
##:.. ##::@
. ##### ##:@
:.....:..::@@
'########::@
##.... ##:@
##:::: ##:@
########::@
##.. ##:::@
##::. ##::@
##:::. ##:@
..:::::..::@@
:'######::@
'##... ##:@
##:::..::@
. ######::@
:..... ##:@
'##::: ##:@
. ######::@
:......:::@@
'########:@
... ##..::@
::: ##::::@
::: ##::::@
::: ##::::@
::: ##::::@
::: ##::::@
:::..:::::@@
'##::::'##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
. #######::@
:.......:::@@
'##::::'##:@
##:::: ##:@
##:::: ##:@
##:::: ##:@
. ##:: ##::@
:. ## ##:::@
::. ###::::@
:::...:::::@@
'##:::::'##:@
##:'##: ##:@
##: ##: ##:@
##: ##: ##:@
##: ##: ##:@
##: ##: ##:@
. ###. ###::@
:...::...:::@@
'##::::'##:@
. ##::'##::@
:. ##'##:::@
::. ###::::@
:: ## ##:::@
: ##:. ##::@
##:::. ##:@
..:::::..::@@
'##:::'##:@
. ##:'##::@
:. ####:::@
::. ##::::@
::: ##::::@
::: ##::::@
::: ##::::@
:::..:::::@@
'########:@
..... ##::@
:::: ##:::@
::: ##::::@
:: ##:::::@
: ##::::::@
########:@
........::@@
::'####:@
:'##..::@
: ##::::@
'###::::@
. ##::::@
: ##::::@
:. ####:@
:::...::@@
'##:@
##:@
##:@
..::@
'##:@
##:@
##:@
..::@@
'####:::@
... ##::@
::: ##::@
::: ###:@
::: ##::@
::: ##::@
'####:::@
....::::@@
:'####::::::@
'## ##:'##:@
..::. ####::@
:::::....:::@
::::::::::::@
::::::::::::@
::::::::::::@
::::::::::::@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@@ -0,0 +1 @@
{"version":3,"file":"scoring.cjs","sources":["../../../src/matcher/date/scoring.ts"],"sourcesContent":[null],"names":["year","separator","yearSpace","Math","max","abs","REFERENCE_YEAR","MIN_YEAR_SPACE","guesses"],"mappings":";;;;AAGA,kBAAe,CAAC;EAAEA,IAAI;AAAEC,EAAAA;AAAS,CAAkC,KAAI;AACrE;AACA,EAAA,MAAMC,SAAS,GAAGC,IAAI,CAACC,GAAG,CAACD,IAAI,CAACE,GAAG,CAACL,IAAI,GAAGM,qBAAc,CAAC,EAAEC,qBAAc,CAAC;AAE3E,EAAA,IAAIC,OAAO,GAAGN,SAAS,GAAG,GAAG;AAC7B;AACA,EAAA,IAAID,SAAS,EAAE;AACbO,IAAAA,OAAO,IAAI,CAAC;AACd,EAAA;AACA,EAAA,OAAOA,OAAO;AAChB,CAAC;;;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_superPropBase","require","_defineProperty","set","target","property","value","receiver","Reflect","base","superPropBase","desc","Object","getOwnPropertyDescriptor","call","writable","defineProperty","_set","isStrict","s","TypeError"],"sources":["../../src/helpers/set.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nimport superPropBase from \"./superPropBase.ts\";\nimport defineProperty from \"./defineProperty.ts\";\n\nfunction set(\n target: object,\n property: PropertyKey,\n value: any,\n receiver?: any,\n): boolean {\n if (typeof Reflect !== \"undefined\" && Reflect.set) {\n // @ts-expect-error explicit function reassign\n set = Reflect.set;\n } else {\n // @ts-expect-error explicit function reassign\n set = function set(target, property, value, receiver) {\n var base = superPropBase(target, property);\n var desc;\n\n if (base) {\n desc = Object.getOwnPropertyDescriptor(base, property)!;\n if (desc.set) {\n desc.set.call(receiver, value);\n return true;\n // so getOwnPropertyDescriptor should always be defined\n } else if (!desc.writable) {\n // Both getter and non-writable fall into this.\n return false;\n }\n }\n\n // Without a super that defines the property, spec boils down to\n // \"define on receiver\" for some reason.\n desc = Object.getOwnPropertyDescriptor(receiver, property);\n if (desc) {\n if (!desc.writable) {\n // Setter, getter, and non-writable fall into this.\n return false;\n }\n\n desc.value = value;\n Object.defineProperty(receiver, property, desc);\n } else {\n // Avoid setters that may be defined on Sub's prototype, but not on\n // the instance.\n defineProperty(receiver, property, value);\n }\n\n return true;\n };\n }\n\n return set(target, property, value, receiver);\n}\n\nexport default function _set(\n target: object,\n property: PropertyKey,\n value: any,\n receiver?: any,\n isStrict?: boolean,\n) {\n var s = set(target, property, value, receiver || target);\n if (!s && isStrict) {\n throw new TypeError(\"failed to set property\");\n }\n\n return value;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAEA,SAASE,GAAGA,CACVC,MAAc,EACdC,QAAqB,EACrBC,KAAU,EACVC,QAAc,EACL;EACT,IAAI,OAAOC,OAAO,KAAK,WAAW,IAAIA,OAAO,CAACL,GAAG,EAAE;IAEjDA,GAAG,GAAGK,OAAO,CAACL,GAAG;EACnB,CAAC,MAAM;IAELA,GAAG,GAAG,SAASA,GAAGA,CAACC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,QAAQ,EAAE;MACpD,IAAIE,IAAI,GAAG,IAAAC,sBAAa,EAACN,MAAM,EAAEC,QAAQ,CAAC;MAC1C,IAAIM,IAAI;MAER,IAAIF,IAAI,EAAE;QACRE,IAAI,GAAGC,MAAM,CAACC,wBAAwB,CAACJ,IAAI,EAAEJ,QAAQ,CAAE;QACvD,IAAIM,IAAI,CAACR,GAAG,EAAE;UACZQ,IAAI,CAACR,GAAG,CAACW,IAAI,CAACP,QAAQ,EAAED,KAAK,CAAC;UAC9B,OAAO,IAAI;QAEb,CAAC,MAAM,IAAI,CAACK,IAAI,CAACI,QAAQ,EAAE;UAEzB,OAAO,KAAK;QACd;MACF;MAIAJ,IAAI,GAAGC,MAAM,CAACC,wBAAwB,CAACN,QAAQ,EAAEF,QAAQ,CAAC;MAC1D,IAAIM,IAAI,EAAE;QACR,IAAI,CAACA,IAAI,CAACI,QAAQ,EAAE;UAElB,OAAO,KAAK;QACd;QAEAJ,IAAI,CAACL,KAAK,GAAGA,KAAK;QAClBM,MAAM,CAACI,cAAc,CAACT,QAAQ,EAAEF,QAAQ,EAAEM,IAAI,CAAC;MACjD,CAAC,MAAM;QAGL,IAAAK,uBAAc,EAACT,QAAQ,EAAEF,QAAQ,EAAEC,KAAK,CAAC;MAC3C;MAEA,OAAO,IAAI;IACb,CAAC;EACH;EAEA,OAAOH,GAAG,CAACC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,QAAQ,CAAC;AAC/C;AAEe,SAASU,IAAIA,CAC1Bb,MAAc,EACdC,QAAqB,EACrBC,KAAU,EACVC,QAAc,EACdW,QAAkB,EAClB;EACA,IAAIC,CAAC,GAAGhB,GAAG,CAACC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,QAAQ,IAAIH,MAAM,CAAC;EACxD,IAAI,CAACe,CAAC,IAAID,QAAQ,EAAE;IAClB,MAAM,IAAIE,SAAS,CAAC,wBAAwB,CAAC;EAC/C;EAEA,OAAOd,KAAK;AACd","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"circle-user.js","sources":["../../../src/icons/circle-user.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircleUser\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEwIiByPSIzIiAvPgogIDxwYXRoIGQ9Ik03IDIwLjY2MlYxOWEyIDIgMCAwIDEgMi0yaDZhMiAyIDAgMCAxIDIgMnYxLjY2MiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/circle-user\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 CircleUser = createLucideIcon('CircleUser', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['circle', { cx: '12', cy: '10', r: '3', key: 'ilqhr7' }],\n ['path', { d: 'M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662', key: '154egf' }],\n]);\n\nexport default CircleUser;\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,CAChD,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,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACnF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,55 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of this License; and
You must cause any modified files to carry prominent notices stating that You changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
@@ -0,0 +1,65 @@
const require_qss = require("./qss.cjs");
//#region src/searchParams.ts
/** Default `parseSearch` that strips leading '?' and JSON-parses values. */
const defaultParseSearch = parseSearchWith(JSON.parse);
/** Default `stringifySearch` using JSON.stringify for complex values. */
const defaultStringifySearch = stringifySearchWith(JSON.stringify, JSON.parse);
/**
* Build a `parseSearch` function using a provided JSON-like parser.
*
* The returned function strips a leading `?`, decodes values, and attempts to
* JSON-parse string values using the given `parser`.
*
* @param parser Function to parse a string value (e.g. `JSON.parse`).
* @returns A `parseSearch` function compatible with `Router` options.
* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization
*/
function parseSearchWith(parser) {
return (searchStr) => {
if (searchStr[0] === "?") searchStr = searchStr.substring(1);
const query = require_qss.decode(searchStr);
for (const key in query) {
const value = query[key];
if (typeof value === "string") try {
query[key] = parser(value);
} catch (_err) {}
}
return query;
};
}
/**
* Build a `stringifySearch` function using a provided serializer.
*
* Non-primitive values are serialized with `stringify`. If a `parser` is
* supplied, string values that are parseable are re-serialized to ensure
* symmetry with `parseSearch`.
*
* @param stringify Function to serialize a value (e.g. `JSON.stringify`).
* @param parser Optional parser to detect parseable strings.
* @returns A `stringifySearch` function compatible with `Router` options.
* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization
*/
function stringifySearchWith(stringify, parser) {
const hasParser = typeof parser === "function";
function stringifyValue(val) {
if (typeof val === "object" && val !== null) try {
return stringify(val);
} catch (_err) {}
else if (hasParser && typeof val === "string") try {
parser(val);
return stringify(val);
} catch (_err) {}
return val;
}
return (search) => {
const searchStr = require_qss.encode(search, stringifyValue);
return searchStr ? `?${searchStr}` : "";
};
}
//#endregion
exports.defaultParseSearch = defaultParseSearch;
exports.defaultStringifySearch = defaultStringifySearch;
exports.parseSearchWith = parseSearchWith;
exports.stringifySearchWith = stringifySearchWith;
//# sourceMappingURL=searchParams.cjs.map
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../src/parse-class.ts", "../../src/index.ts"],
"sourcesContent": ["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { <posix class>: [<translation>, negated]\nconst posixClasses: { [k: string]: [e: string, n?: boolean] } = {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}'],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}'],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f'],\n '[:blank:]': ['\\\\p{Zs}\\\\t'],\n '[:cntrl:]': ['\\\\p{Cc}'],\n '[:digit:]': ['\\\\p{Nd}'],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true],\n '[:lower:]': ['\\\\p{Ll}'],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}\\\\p{S}'],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f'],\n '[:upper:]': ['\\\\p{Lu}'],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}'],\n '[:xdigit:]': ['A-Fa-f0-9'],\n}\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n\nexport type ParseClassResult = [re: RegExp, consumed: number]\n\nexport type Form = 'NFC' | 'NFD' | 'NFKC' | 'NFKD'\n\nconst noMatch = /$./\n\n// Takes a glob string at a posix brace expression. Returns a RegExp\n// that tests one character, and the number of glob chars consumed.\n// If the class is not closed, consumed is 0, and the `[` must be\n// treated as a literal character.\n// Out of order ranges are removed. If nothing is left, the RegExp\n// is `/$./`, and the rest of the glob is consumed, so that the\n// whole glob cannot match.\nexport const parseClass = (\n glob: string,\n position: number,\n nocase: boolean = false,\n form?: Form,\n): ParseClassResult => {\n // normalize one class member, if it stays one code point\n const norm = (c: string) => {\n const n = form ? c.normalize(form) : c\n return [...n].length === 1 ? n : c\n }\n const pos = position\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression')\n }\n /* c8 ignore stop */\n const ranges: string[] = []\n const negs: string[] = []\n\n let i = pos + 1\n let sawStart = false\n let escaping = false\n let negate = false\n let endPos = pos\n let rangeStart = ''\n WHILE: while (i < glob.length) {\n const c = String.fromCodePoint(glob.codePointAt(i)!)\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true\n i++\n continue\n }\n\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1\n break\n }\n\n sawStart = true\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true\n i++\n continue\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return [noMatch, glob.length - pos]\n }\n i += cls.length\n if (neg) negs.push(unip)\n else ranges.push(unip)\n continue WHILE\n }\n }\n }\n\n // now it's just a normal character, effectively\n escaping = false\n const n = norm(c)\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (n.codePointAt(0)! > rangeStart.codePointAt(0)!) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(n))\n } else if (n === rangeStart) {\n ranges.push(braceEscape(n))\n }\n rangeStart = ''\n i += c.length\n continue\n }\n\n // now might be the start of a range.\n // can be either c-d or c-] or c<more...>] or c] at this point\n if (glob.startsWith('-]', i + c.length)) {\n ranges.push(braceEscape(n + '-'))\n i += c.length + 1\n continue\n }\n if (glob.startsWith('-', i + c.length)) {\n rangeStart = n\n i += c.length + 1\n continue\n }\n\n // not the start of a range, just a single character\n ranges.push(braceEscape(n))\n i += c.length\n }\n\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return [noMatch, 0]\n }\n\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return [noMatch, glob.length - pos]\n }\n\n const sranges = '[' + (negate ? '^' : '') + ranges.join('') + ']'\n const snegs = '[' + (negate ? '' : '^') + negs.join('') + ']'\n const comb =\n '^' +\n (ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')'\n : ranges.length ? sranges\n : snegs)\n\n return [new RegExp(comb, nocase ? 'iu' : 'u'), endPos - pos]\n}\n", "import { type Form, parseClass } from './parse-class.js'\nLine truncated
"mappings": "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 truncated
"names": ["posixClasses", "braceEscape", "s", "noMatch", "parseClass", "glob", "position", "nocase", "form", "norm", "c", "n", "pos", "ranges", "negs", "i", "sawStart", "escaping", "negate", "endPos", "rangeStart", "WHILE", "cls", "unip", "neg", "sranges", "snegs", "comb", "MATCH", "extTypes", "lit", "ch", "reEscape", "s", "newFoldRe", "foldCache", "foldRe", "re", "litMatch", "l", "c", "code", "ascii", "tokenize", "p", "nocase", "noext", "form", "toks", "i", "e", "consumed", "parseClass", "pair", "pairs", "stack", "tok", "build", "start", "end", "top", "seq", "alts", "close", "sub", "normalize", "items", "out", "run", "flush", "it", "a", "compile", "id", "split", "next", "item", "after", "entry", "show", "lines", "seen", "ref", "walk", "indent", "line", "desc", "o", "State", "gen", "sameState", "b", "r", "marks", "size", "Sim", "#marks", "dots", "dotStart", "state", "n", "#visit", "node", "#addThread", "has", "th", "stateKey", "ids", "runs", "DFA_BUDGET", "Dfa", "#start", "#states", "#size", "#plain", "#dotStart", "#sim", "#dotSim", "#make", "#intern", "key", "found", "#clear", "d", "linear", "nodes", "testLinear", "chars", "ni", "ci", "starNi", "starCi", "lengths", "min", "max", "lo", "hi", "itemLengths", "loop", "hasAffix", "lits", "j", "slashOrSurrogate", "surrogate", "codePoints", "noSlash", "Matcher", "#dotsSim", "#literal", "#literalFold", "#literalRe", "#linear", "#wild", "#min", "#max", "#prefix", "#suffix", "#prefixStr", "#suffixStr", "#affix", "#dfa", "#form", "pattern", "options", "literal", "#test", "most", "least", "prefix", "sim", "dfa", "str"]
}
@@ -0,0 +1,38 @@
import type {CodeKeywordDefinition, ErrorNoParams, AnySchema} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {alwaysValidSchema} from "../../compile/util"
export type NotKeywordError = ErrorNoParams<"not", AnySchema>
const def: CodeKeywordDefinition = {
keyword: "not",
schemaType: ["object", "boolean"],
trackErrors: true,
code(cxt: KeywordCxt) {
const {gen, schema, it} = cxt
if (alwaysValidSchema(it, schema)) {
cxt.fail()
return
}
const valid = gen.name("valid")
cxt.subschema(
{
keyword: "not",
compositeRule: true,
createErrors: false,
allErrors: false,
},
valid
)
cxt.failResult(
valid,
() => cxt.reset(),
() => cxt.error()
)
},
error: {message: "must NOT be valid"},
}
export default def
@@ -0,0 +1 @@
{"version":3,"file":"edit-3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,132 @@
'use strict';
/// <reference types="../types/index.d.ts" />
// (c) 2020-present Andrea Giammarchi
const {parse: $parse, stringify: $stringify} = JSON;
const {keys} = Object;
const Primitive = String; // it could be Number
const primitive = 'string'; // it could be 'number'
const ignore = {};
const object = 'object';
const noop = (_, value) => value;
const primitives = value => (
value instanceof Primitive ? Primitive(value) : value
);
const Primitives = (_, value) => (
typeof value === primitive ? new Primitive(value) : value
);
const resolver = (input, lazy, parsed, $) => output => {
for (let ke = keys(output), {length} = ke, y = 0; y < length; y++) {
const k = ke[y];
const value = output[k];
if (value instanceof Primitive) {
const tmp = input[+value];
if (typeof tmp === object && !parsed.has(tmp)) {
parsed.add(tmp);
output[k] = ignore;
lazy.push({ o: output, k, r: tmp });
}
else
output[k] = $.call(output, k, tmp);
}
else if (output[k] !== ignore)
output[k] = $.call(output, k, value);
}
return output;
};
const set = (known, input, value) => {
const index = Primitive(input.push(value) - 1);
known.set(value, index);
return index;
};
/**
* Converts a specialized flatted string into a JS value.
* @param {string} text
* @param {(this: any, key: string, value: any) => any} [reviver]
* @returns {any}
*/
const parse = (text, reviver) => {
const input = $parse(text, Primitives).map(primitives);
const $ = reviver || noop;
let value = input[0];
if (typeof value === object && value) {
const lazy = [];
const revive = resolver(input, lazy, new Set, $);
value = revive(value);
let i = 0;
while (i < lazy.length) {
// it could be a lazy.shift() but that's costly
const {o, k, r} = lazy[i++];
o[k] = $.call(o, k, revive(r));
}
}
return $.call({'': value}, '', value);
};
exports.parse = parse;
/**
* Converts a JS value into a specialized flatted string.
* @param {any} value
* @param {((this: any, key: string, value: any) => any) | (string | number)[] | null | undefined} [replacer]
* @param {string | number | undefined} [space]
* @returns {string}
*/
const stringify = (value, replacer, space) => {
const $ = replacer && typeof replacer === object ?
(k, v) => (k === '' || -1 < replacer.indexOf(k) ? v : void 0) :
(replacer || noop);
const known = new Map;
const input = [];
const output = [];
let i = +set(known, input, $.call({'': value}, '', value));
let firstRun = !i;
while (i < input.length) {
firstRun = true;
output[i] = $stringify(input[i++], replace, space);
}
return '[' + output.join(',') + ']';
function replace(key, value) {
if (firstRun) {
firstRun = !firstRun;
return value;
}
const after = $.call(this, key, value);
switch (typeof after) {
case object:
if (after === null) return after;
case primitive:
return known.get(after) || set(known, input, after);
}
return after;
}
};
exports.stringify = stringify;
/**
* Converts a generic value into a JSON serializable object without losing recursion.
* @param {any} value
* @returns {any}
*/
const toJSON = value => $parse(stringify(value));
exports.toJSON = toJSON;
/**
* Converts a previously serialized object with recursion into a recursive one.
* @param {any} value
* @returns {any}
*/
const fromJSON = value => parse($stringify(value));
exports.fromJSON = fromJSON;
@@ -0,0 +1,64 @@
{
"name": "@radix-ui/react-use-controllable-state",
"version": "1.2.3",
"license": "MIT",
"source": "./src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"files": [
"dist",
"README.md"
],
"sideEffects": false,
"dependencies": {
"@radix-ui/react-use-effect-event": "0.0.3",
"@radix-ui/react-use-layout-effect": "1.1.2"
},
"devDependencies": {
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"typescript": "^5.9.3",
"@repo/builder": "0.0.0",
"@repo/typescript-config": "0.0.0"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
},
"homepage": "https://radix-ui.com/primitives",
"repository": {
"type": "git",
"url": "git+https://github.com/radix-ui/primitives.git",
"directory": "packages/react/use-controllable-state"
},
"bugs": {
"url": "https://github.com/radix-ui/primitives/issues"
},
"scripts": {
"lint": "oxlint --max-warnings 0 src",
"clean": "rm -rf dist",
"reset": "rm -rf dist node_modules",
"typecheck": "tsc --noEmit",
"build": "radix-build"
},
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
}
@@ -0,0 +1,624 @@
flf2a$ 6 5 12 -1 11 0 7999 0
Author : LG Beard
Date : 2006/7/3 23:58:25
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
$ #
$ #
$ #
$ #
$ #
$ ##
_ #
| | #
| | #
| | #
(_) #
##
"#
#
#
#
#
##
_ _ #
_ / // / #
[_/ // /] #
[/ // /_] #
/_//_/ #
##
_ #
/ \.-._ #
[| / _ \] #
\_.'/_| #
#
##
_ #
_ / / #
(_)/ /_ #
/ /(_) #
/_/ #
##
&#
#
#
#
#
##
_ #
|_| #
#
#
#
##
__ #
/ _| #
/ / #
\ \_ #
\__| #
##
__ #
|_ \ #
\ \ #
_/ / #
|__/ #
##
*#
#
#
#
#
##
_ #
_| |_ #
|_ _| #
|_| #
#
##
#
#
#
_ #
)_/ #
##
#
____ #
[____] #
#
#
##
#
#
_ #
(_) #
#
##
_ #
/ / #
/ / #
/ / #
/_/ #
##
_____ #
.' ___ '. #
| (___) | #
'._____.' #
#
##
_ _ #
| /___\ | #
| ______/ #
|_\ #
#
##
__ _ #
| _'._\ | #
| |`. / #
|_| '-' #
#
##
_ _ #
/ / / \ #
| |_/\\ | #
\_______/ #
#
##
__ #
| _\ #
__||_\\ #
|__ __\ #
|_| #
##
_ __ #
| /_.' | #
\ .'| | #
`-` |_| #
#
##
_______ #
/ ___ __| #
| \_/ | #
',___,' #
#
##
_ #
/ \ #
_____\ | #
\______ / #
#
##
__ __ #
.' '' '.#
| () () |#
'.__..__.'#
#
##
__ #
.'_ '. #
__|/_\ | #
|_______/ #
#
##
_ #
(_) #
#
_ #
(_) #
##
_ #
(_) #
#
_ #
)_/ #
##
<#
#
#
#
#
##
____ #
[____] #
____ #
[____] #
#
##
>#
#
#
#
#
##
__ #
\__'. #
.-`_\ #
|_| #
(_) #
##
@#
#
#
#
#
##
______ #
|_. _ '. #
_||_/ / #
|_____.' #
#
##
_______ #
| | #
| o v o | #
'._.'._.' #
#
##
_______ #
/ _____ \ #
| \ / | #
\_/ \_/ #
#
##
_______ #
| ___ | #
| '._.' | #
'._____.' #
#
##
_______ #
| ._ _. | #
| \ v / | #
|_/ \_| #
#
##
_______ #
|___ _ | #
/_|| | #
\_| #
#
##
_______ #
/ .---. \ #
\_'-. / | #
'.| \_/ #
#
##
_______ #
\__ __\ #
__| |__ #
\_______\ #
#
##
_ _ #
| |___| | #
| ___ | #
|_| |_| #
#
##
__ _ #
/ /___\ | #
\______ | #
/_| #
#
##
_______ #
|_ _| #
.' _ '. #
|_.' '._| #
#
##
_______ #
/ ______\ #
| \ #
|_/ #
#
##
_______ #
|__ _.' #
__> >_ #
|_______\ #
#
##
_______ #
|__ _.' #
_.' .'_ #
|_______| #
#
##
_______ #
/ ____ \ #
| /___/ | #
\_______/ #
#
##
_______ #
|__ ___ \ #
| \_/ | #
'.___.' #
#
##
_______ #
/ ____ \#
| /___/ |#
)_/_____/#
#
##
_______ #
|_ ___ \ #
/ \_/ | #
|_/'.__.' #
#
##
__ #
/ / .-. #
| /_/ _ \ #
\___.'/_| #
#
##
_ #
_____\ | #
\______ | #
/_| #
#
##
______ #
.' _____\ #
| /_____ #
'.______/ #
#
##
_____ #
/ ___.-' #
| '.____ #
\______\ #
#
##
_______ #
|__ _.' #
__< <_ #
|______'. #
#
##
_ _ #
\_'._.'_/ #
_> _ <_ #
/_.' '._\ #
#
##
_ #
____.'_| #
|___. '. #
'._| #
#
##
_ _ #
| '. | | #
| ._'.| | #
|_| '.__| #
#
##
___ #
| _| #
| | #
| |_ #
|___| #
##
_ #
\ \ #
\ \ #
\ \ #
\_\ #
##
___ #
|_ | #
| | #
_| | #
|___| #
##
__ #
/ \ #
/_/\_\ #
#
#
##
#
#
#
#
________ #
[________]##
__ #
\_\ #
#
#
#
##
______ #
|_. _ '. #
_||_/ / #
|_____.' #
#
##
_______ #
| | #
| o v o | #
'._.'._.' #
#
##
_______ #
/ _____ \ #
| \ / | #
\_/ \_/ #
#
##
_______ #
| ___ | #
| '._.' | #
'._____.' #
#
##
_______ #
| ._ _. | #
| \ v / | #
|_/ \_| #
#
##
_______ #
|___ _ | #
/_|| | #
\_| #
#
##
_______ #
/ .---. \ #
\_'-. / | #
'.| \_/ #
#
##
_______ #
\__ __\ #
__| |__ #
\_______\ #
#
##
_ _ #
| |___| | #
| ___ | #
|_| |_| #
#
##
__ _ #
/ /___\ | #
\______ | #
/_| #
#
##
_______ #
|_ _| #
.' _ '. #
|_.' '._| #
#
##
_______ #
/ ______\ #
| \ #
|_/ #
#
##
_______ #
|__ _.' #
__> >_ #
|_______\ #
#
##
_______ #
|__ _.' #
_.' .'_ #
|_______| #
#
##
_______ #
/ ____ \ #
| /___/ | #
\_______/ #
#
##
_______ #
|__ ___ \ #
| \_/ | #
'.___.' #
#
##
_______ #
/ ____ \#
| /___/ |#
)_/_____/#
#
##
_______ #
|_ ___ \ #
/ \_/ | #
|_/'.__.' #
#
##
__ #
/ / .-. #
| /_/ _ \ #
\___.'/_| #
#
##
_ #
_____\ | #
\______ | #
/_| #
#
##
______ #
.' _____\ #
| /_____ #
'.______/ #
#
##
_____ #
/ ___.-' #
| '.____ #
\______\ #
#
##
_______ #
|__ _.' #
__< <_ #
|______'. #
#
##
_ _ #
\_'._.'_/ #
_> _ <_ #
/_.' '._\ #
#
##
_ #
____.'_| #
|___. '. #
'._| #
#
##
_ _ #
| '. | | #
| ._'.| | #
|_| '.__| #
#
##
___ #
| _| #
/ | #
\ |_ #
|___| #
##
_ #
| | #
| | #
| | #
|_| #
##
___ #
|_ | #
| \ #
_| / #
|___| #
##
~#
#
#
#
#
##
______ #
|_. _ '. #
_||_/ / #
|_____.' #
#
##
_______ #
/ ____ \ #
| /___/ | #
\_______/ #
#
##
______ #
.' _____\ #
| /_____ #
'.______/ #
#
##
______ #
|_. _ '. #
_||_/ / #
|_____.' #
#
##
_______ #
/ ____ \ #
| /___/ | #
\_______/ #
#
##
______ #
.' _____\ #
| /_____ #
'.______/ #
#
##
ß#
#
#
#
#
##
@@ -0,0 +1,30 @@
const PATTERN_REGEX = /%(-)?(\d+)?(?:\.(\d+))?([a-zA-Z%])(?:\{([^}]+)\})?/g;
function compilePattern(pattern, createConverter, literalConverter) {
const converters = [];
let lastIndex = 0;
let match;
while ((match = PATTERN_REGEX.exec(pattern)) !== null) {
const [full, align, minWidth, precision, specifier, format] = match;
if (match.index > lastIndex) {
converters.push(literalConverter(pattern.substring(lastIndex, match.index)));
}
const converter = createConverter(
specifier,
align === "-",
parseInt(minWidth || "0", 10),
parseInt(precision || "0", 10),
format
);
if (converter) {
converters.push(converter);
}
lastIndex = match.index + full.length;
}
if (lastIndex < pattern.length) {
converters.push(literalConverter(pattern.substring(lastIndex)));
}
return converters;
}
export {
compilePattern as default
};
@@ -0,0 +1,142 @@
{
"name": "@modelcontextprotocol/ext-apps",
"repository": {
"type": "git",
"url": "git+https://github.com/modelcontextprotocol/ext-apps.git"
},
"homepage": "https://github.com/modelcontextprotocol/ext-apps",
"version": "2.0.3",
"license": "MIT",
"description": "MCP Apps SDK — Enable MCP servers to display interactive user interfaces in conversational clients.",
"type": "module",
"engines": {
"node": ">=20"
},
"main": "./dist/src/app.js",
"exports": {
".": {
"types": "./dist/src/app.d.ts",
"default": "./dist/src/app.js"
},
"./app-with-deps": {
"types": "./dist/src/app.d.ts",
"default": "./dist/src/app-with-deps.js"
},
"./react": {
"types": "./dist/src/react/index.d.ts",
"default": "./dist/src/react/index.js"
},
"./react-with-deps": {
"types": "./dist/src/react/index.d.ts",
"default": "./dist/src/react/react-with-deps.js"
},
"./app-bridge": {
"types": "./dist/src/app-bridge.d.ts",
"default": "./dist/src/app-bridge.js"
},
"./server": {
"types": "./dist/src/server/index.d.ts",
"default": "./dist/src/server/index.js"
},
"./schema.json": "./dist/src/generated/schema.json"
},
"files": [
"dist"
],
"workspaces": [
"examples/*"
],
"scripts": {
"start": "npm run examples:dev",
"generate:schemas": "tsx scripts/generate-schemas.ts && prettier --write \"src/generated/**/*\"",
"sync:snippets": "bun scripts/sync-snippets.ts",
"build": "npm run generate:schemas && npm run sync:snippets && node scripts/run-bun.mjs build.bun.ts && node scripts/link-self.mjs",
"prepack": "npm run build",
"build:all": "npm run examples:build",
"test": "bun test src examples",
"test:dependency-isolation": "npm run build && node scripts/check-dependency-isolation.mjs",
"test:e2e": "playwright test",
"test:e2e:update": "playwright test --update-snapshots",
"test:e2e:ui": "playwright test --ui",
"test:e2e:docker": "docker run --rm -e EXAMPLE -v $(pwd):/work -w /work -it mcr.microsoft.com/playwright:v1.57.0-noble sh -c 'apt-get update -qq && apt-get install -qq -y python3-venv curl > /dev/null && curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH=\"$HOME/.local/bin:$PATH\" && npm i -g bun && npm ci && npx playwright test'",
"test:e2e:docker:update": "npm run build:all && docker run --rm -e EXAMPLE -v $(pwd):/work -w /work -it mcr.microsoft.com/playwright:v1.57.0-noble sh -c 'apt-get update -qq && apt-get install -qq -y python3-venv curl > /dev/null && curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH=\"$HOME/.local/bin:$PATH\" && npm i -g bun && npm ci && npx playwright test --update-snapshots'",
"preexamples:build": "npm run build",
"examples:build": "bun examples/run-all.ts build",
"examples:start": "NODE_ENV=development npm run build && bun examples/run-all.ts start",
"examples:dev": "NODE_ENV=development bun examples/run-all.ts dev",
"watch": "nodemon --watch src --ext ts,tsx --exec 'bun build.bun.ts'",
"prepare": "npm run build && husky",
"docs": "typedoc",
"docs:watch": "typedoc --watch",
"generate:screenshots": "npm run build:all && docker run --rm -e EXAMPLE -e GENERATE_SCREENSHOTS=1 -v $(pwd):/work -w /work mcr.microsoft.com/playwright:v1.57.0-noble sh -c 'apt-get update -qq && apt-get install -qq -y python3-venv curl > /dev/null && curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH=\"$HOME/.local/bin:$PATH\" && npm i -g bun && npm ci && npx playwright test tests/e2e/generate-grid-screenshots.spec.ts'",
"prettier": "prettier -u \"**/*.{js,jsx,ts,tsx,mjs,json,md,yml,yaml}\" --check",
"prettier:fix": "prettier -u \"**/*.{js,jsx,ts,tsx,mjs,json,md,yml,yaml}\" --write",
"check:versions": "node scripts/check-versions.mjs",
"bump": "node scripts/bump-version.mjs",
"update-lock:docker": "rm -rf node_modules package-lock.json examples/*/node_modules && docker run --rm --platform linux/amd64 -v $(pwd):/work -w /work -e HOME=/tmp node:latest npm i --registry=https://registry.npmjs.org/ --ignore-scripts && rm -rf node_modules examples/*/node_modules && npm i --registry=https://registry.npmjs.org/"
},
"author": "Olivier Chafik",
"//interop": "The @modelcontextprotocol/sdk 1.x and ext-apps-v1 devDependencies exist only for src/interop-v1.test.ts, which runs the published 1.7.5 package against this build. The library does not use them.",
"devDependencies": {
"@boneskull/typedoc-plugin-mermaid": "^0.2.0",
"@modelcontextprotocol/client": "2.0.0",
"@modelcontextprotocol/core": "2.0.0",
"@modelcontextprotocol/sdk": "1.30.0",
"@modelcontextprotocol/server": "2.0.0",
"@playwright/test": "1.57.0",
"@types/bun": "^1.3.2",
"@types/node": "20.19.27",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"bun": "^1.2.21",
"caniuse-lite": "1.0.30001763",
"cheerio": "1.1.2",
"concurrently": "^9.2.1",
"cors": "^2.8.5",
"cross-env": "^10.1.0",
"electron-to-chromium": "1.5.267",
"esbuild": "^0.25.12",
"express": "^5.1.0",
"ext-apps-v1": "npm:@modelcontextprotocol/ext-apps@1.7.5",
"husky": "^9.1.7",
"nodemon": "^3.1.0",
"playwright": "1.57.0",
"playwright-core": "1.57.0",
"prettier": "^3.6.2",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"sharp": "^0.35.3",
"ts-to-zod": "^5.1.0",
"tsx": "^4.21.0",
"typedoc": "^0.28.14",
"typedoc-github-theme": "^0.4.0",
"typescript": "^5.9.3",
"zod": "^4.2.0"
},
"peerDependencies": {
"@modelcontextprotocol/client": "^2.0.0",
"@modelcontextprotocol/core": "^2.0.0",
"@modelcontextprotocol/server": "^2.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
"zod": "^4.2.0"
},
"peerDependenciesMeta": {
"@modelcontextprotocol/server": {
"optional": true
},
"react": {
"optional": true
},
"react-dom": {
"optional": true
}
},
"overrides": {
"solid-js": "1.9.15",
"@types/node": "20.19.27"
},
"dependencies": {
"@standard-schema/spec": "^1.1.0"
}
}
@@ -0,0 +1,116 @@
"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.findTruthinessAssertedArgument = findTruthinessAssertedArgument;
exports.findTypeGuardAssertedArgument = findTypeGuardAssertedArgument;
const utils_1 = require("@typescript-eslint/utils");
const ts = __importStar(require("typescript"));
/**
* Inspect a call expression to see if it's a call to an assertion function.
* If it is, return the node of the argument that is asserted.
*/
function findTruthinessAssertedArgument(services, node) {
// If the call looks like `assert(expr1, expr2, ...c, d, e, f)`, then we can
// only care if `expr1` or `expr2` is asserted, since anything that happens
// within or after a spread argument is out of scope to reason about.
const checkableArguments = [];
for (const argument of node.arguments) {
if (argument.type === utils_1.AST_NODE_TYPES.SpreadElement) {
break;
}
checkableArguments.push(argument);
}
// nothing to do
if (checkableArguments.length === 0) {
return undefined;
}
const checker = services.program.getTypeChecker();
const signature = services.getResolvedSignature(node);
if (signature == null) {
return undefined;
}
const firstTypePredicateResult = checker.getTypePredicateOfSignature(signature);
if (firstTypePredicateResult == null) {
return undefined;
}
const { kind, parameterIndex, type } = firstTypePredicateResult;
if (!(kind === ts.TypePredicateKind.AssertsIdentifier && type == null)) {
return undefined;
}
return checkableArguments.at(parameterIndex);
}
/**
* Inspect a call expression to see if it's a call to an assertion function.
* If it is, return the node of the argument that is asserted and other useful info.
*/
function findTypeGuardAssertedArgument(services, node) {
// If the call looks like `assert(expr1, expr2, ...c, d, e, f)`, then we can
// only care if `expr1` or `expr2` is asserted, since anything that happens
// within or after a spread argument is out of scope to reason about.
const checkableArguments = [];
for (const argument of node.arguments) {
if (argument.type === utils_1.AST_NODE_TYPES.SpreadElement) {
break;
}
checkableArguments.push(argument);
}
// nothing to do
if (checkableArguments.length === 0) {
return undefined;
}
const checker = services.program.getTypeChecker();
const callSignature = services.getResolvedSignature(node);
if (callSignature == null) {
return undefined;
}
const typePredicateInfo = checker.getTypePredicateOfSignature(callSignature);
if (typePredicateInfo == null) {
return undefined;
}
const { kind, parameterIndex, type } = typePredicateInfo;
if (!((kind === ts.TypePredicateKind.AssertsIdentifier ||
kind === ts.TypePredicateKind.Identifier) &&
type != null)) {
return undefined;
}
if (parameterIndex >= checkableArguments.length) {
return undefined;
}
return {
argument: checkableArguments[parameterIndex],
asserts: kind === ts.TypePredicateKind.AssertsIdentifier,
type,
};
}
@@ -0,0 +1,244 @@
'use strict'
const assert = require('node:assert')
const { utf8DecodeBytes } = require('../../encoding')
/**
* @param {(char: string) => boolean} condition
* @param {string} input
* @param {{ position: number }} position
* @returns {string}
*
* @see https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points
*/
function collectASequenceOfCodePoints (condition, input, position) {
// 1. Let result be the empty string.
let result = ''
// 2. While position doesn’t point past the end of input and the
// code point at position within input meets the condition condition:
while (position.position < input.length && condition(input[position.position])) {
// 1. Append that code point to the end of result.
result += input[position.position]
// 2. Advance position by 1.
position.position++
}
// 3. Return result.
return result
}
/**
* A faster collectASequenceOfCodePoints that only works when comparing a single character.
* @param {string} char
* @param {string} input
* @param {{ position: number }} position
* @returns {string}
*
* @see https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points
*/
function collectASequenceOfCodePointsFast (char, input, position) {
const idx = input.indexOf(char, position.position)
const start = position.position
if (idx === -1) {
position.position = input.length
return input.slice(start)
}
position.position = idx
return input.slice(start, position.position)
}
const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g // eslint-disable-line no-control-regex
/**
* @param {string} data
* @returns {Uint8Array | 'failure'}
*
* @see https://infra.spec.whatwg.org/#forgiving-base64-decode
*/
function forgivingBase64 (data) {
// 1. Remove all ASCII whitespace from data.
data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '')
let dataLength = data.length
// 2. If data’s code point length divides by 4 leaving
// no remainder, then:
if (dataLength % 4 === 0) {
// 1. If data ends with one or two U+003D (=) code points,
// then remove them from data.
if (data.charCodeAt(dataLength - 1) === 0x003D) {
--dataLength
if (data.charCodeAt(dataLength - 1) === 0x003D) {
--dataLength
}
}
}
// 3. If data’s code point length divides by 4 leaving
// a remainder of 1, then return failure.
if (dataLength % 4 === 1) {
return 'failure'
}
// 4. If data contains a code point that is not one of
// U+002B (+)
// U+002F (/)
// ASCII alphanumeric
// then return failure.
if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) {
return 'failure'
}
const buffer = Buffer.from(data, 'base64')
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength)
}
/**
* @param {number} char
* @returns {boolean}
*
* @see https://infra.spec.whatwg.org/#ascii-whitespace
*/
function isASCIIWhitespace (char) {
return (
char === 0x09 || // \t
char === 0x0a || // \n
char === 0x0c || // \f
char === 0x0d || // \r
char === 0x20 // space
)
}
/**
* @param {Uint8Array} input
* @returns {string}
*
* @see https://infra.spec.whatwg.org/#isomorphic-decode
*/
function isomorphicDecode (input) {
// 1. To isomorphic decode a byte sequence input, return a string whose code point
// length is equal to input’s length and whose code points have the same values
// as the values of input’s bytes, in the same order.
const length = input.length
if ((2 << 15) - 1 > length) {
return String.fromCharCode.apply(null, input)
}
let result = ''
let i = 0
let addition = (2 << 15) - 1
while (i < length) {
if (i + addition > length) {
addition = length - i
}
result += String.fromCharCode.apply(null, input.subarray(i, i += addition))
}
return result
}
const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/ // eslint-disable-line no-control-regex
/**
* @param {string} input
* @returns {string}
*
* @see https://infra.spec.whatwg.org/#isomorphic-encode
*/
function isomorphicEncode (input) {
// 1. Assert: input contains no code points greater than U+00FF.
assert(!invalidIsomorphicEncodeValueRegex.test(input))
// 2. Return a byte sequence whose length is equal to input’s code
// point length and whose bytes have the same values as the
// values of input’s code points, in the same order
return input
}
const nonASCIIRegex = /[^\x00-\x7F]/ // eslint-disable-line no-control-regex
/**
* @param {string} str
* @returns {string}
*
* @see https://infra.spec.whatwg.org/#ascii-lowercase
*/
function asciiLowercase (str) {
return nonASCIIRegex.test(str)
? str.replace(/[A-Z]+/g, (upper) => upper.toLowerCase())
: str.toLowerCase()
}
/**
* @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value
* @param {Uint8Array} bytes
*/
function parseJSONFromBytes (bytes) {
return JSON.parse(utf8DecodeBytes(bytes))
}
/**
* @param {string} str
* @param {boolean} [leading=true]
* @param {boolean} [trailing=true]
* @returns {string}
*
* @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace
*/
function removeASCIIWhitespace (str, leading = true, trailing = true) {
return removeChars(str, leading, trailing, isASCIIWhitespace)
}
/**
* @param {string} str
* @param {boolean} leading
* @param {boolean} trailing
* @param {(charCode: number) => boolean} predicate
* @returns {string}
*/
function removeChars (str, leading, trailing, predicate) {
let lead = 0
let trail = str.length - 1
if (leading) {
while (lead < str.length && predicate(str.charCodeAt(lead))) lead++
}
if (trailing) {
while (trail >= lead && predicate(str.charCodeAt(trail))) trail--
}
return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1)
}
// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string
function serializeJavascriptValueToJSONString (value) {
// 1. Let result be ? Call(%JSON.stringify%, undefined, « value »).
const result = JSON.stringify(value)
// 2. If result is undefined, then throw a TypeError.
if (result === undefined) {
throw new TypeError('Value is not JSON serializable')
}
// 3. Assert: result is a string.
assert(typeof result === 'string')
// 4. Return result.
return result
}
module.exports = {
asciiLowercase,
collectASequenceOfCodePoints,
collectASequenceOfCodePointsFast,
forgivingBase64,
isASCIIWhitespace,
isomorphicDecode,
isomorphicEncode,
parseJSONFromBytes,
removeASCIIWhitespace,
removeChars,
serializeJavascriptValueToJSONString
}
@@ -0,0 +1,46 @@
/*!
* content-type
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
/**
* The content type object contains a type string and optional parameters.
*/
export interface ContentType {
type: string;
index: number;
parameters: Record<string, string>;
}
/**
* Format an object into a `Content-Type` header.
*/
export declare function format(obj: Partial<ContentType>): string;
/**
* Options for parsing a `Content-Type` header.
*/
export interface ParseOptions {
/**
* Exit early on the first semicolon, returning only the type.
* This is useful for parsing the MIME from `Content-Type` headers.
*
* @default false
*/
parameters?: boolean;
/**
* Exits early on a comma, returning the first value and parameters.
* This is useful for parsing `Accept` headers.
*
* @default false
*/
comma?: boolean;
/**
* The index to start parsing from.
*
* @default 0
*/
start?: number;
}
/**
* Parse a `Content-Type` header.
*/
export declare function parse(header: string, options?: ParseOptions): ContentType;
@@ -0,0 +1 @@
{"version":3,"file":"matching.cjs","sources":["../../../src/matcher/wordSequence/matching.ts"],"sourcesContent":[null],"names":["MatchWordSequence","MatcherBaseClass","constructor","options","dictionary","DictionaryMatcher","dictionaryL33t","DictionaryL33tMatcher","dictionaryReverse","DictionaryReverseMatcher","match","matchOptions","password","dictionaryMatches","dictionaryL33tMatches","dictionaryReverseMatches","filteredDictionaryMatches","filterDictionaryMatches","wordMatches","convertToWordMatches","findWordSequences","matches","sort","a","b","i","j","reversed","l33t","rank","reduce","acc","last","length","push","map","word","matchedWord","dictionaryName","sequences","sortedMatches","startIdx","sequencesFromStart","findSequencesFromStart","startMatch","currentSequence","currentEnd","nextIdx","nextMatch","isValidWordSequence","createWordSequenceMatch","lastWord","textBetween","slice","separators","isSimpleConcat","hasValidSeparator","some","sep","isCamelCase","toUpperCase","toLowerCase","sequence","firstMatch","lastMatch","words","ranks","ascending","every","dictionaryNames","getMostCommon","pattern","token","wordCount","array","counts","Map","maxCount","mostCommon","forEach","item","count","get","set"],"mappings":";;;;;;;AAoBA;;;;AAIG;AACH,MAAMA,iBAAkB,SAAQC,sBAAgB,CAAA;EAO9CC,WAAAA,CAAYC,OAAgB,EAAA;IAC1B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,UAAU,GAAG,IAAIC,QAAiB,CAAC,IAAI,CAACF,OAAO,EAAE,IAAI,CAAC;IAC3D,IAAI,CAACG,cAAc,GAAG,IAAIC,IAAqB,CAAC,IAAI,CAACJ,OAAO,EAAE,IAAI,CAAC;IACnE,IAAI,CAACK,iBAAiB,GAAG,IAAIC,OAAwB,CAAC,IAAI,CAACN,OAAO,EAAE,IAAI,CAAC;AAC3E,EAAA;EAEAO,KAAKA,CAACC,YAA0B,EAAA;IAC9B,MAAM;AAAEC,MAAAA;AAAQ,KAAE,GAAGD,YAAY;AAEjC;IACA,MAAME,iBAAiB,GAAG,IAAI,CAACT,UAAU,CAACM,KAAK,CAACC,YAAY,CAAC;IAC7D,MAAMG,qBAAqB,GAAG,IAAI,CAACR,cAAc,CAACI,KAAK,CAACC,YAAY,CAAC;IACrE,MAAMI,wBAAwB,GAAG,IAAI,CAACP,iBAAiB,CAACE,KAAK,CAACC,YAAY,CAAC;AAE3E,IAAA,MAAMK,yBAAyB,GAAG,IAAI,CAACC,uBAAuB,CAAC,CAC7D,GAAGJ,iBAAiB,EACpB,GAAGC,qBAAqB,EACxB,GAAGC,wBAAwB,CAC5B,CAAC;AACF;AACA,IAAA,MAAMG,WAAW,GAAG,IAAI,CAACC,oBAAoB,CAACH,yBAAyB,CAAC;AAExE;AACA,IAAA,OAAO,IAAI,CAACI,iBAAiB,CAACF,WAAW,EAAEN,QAAQ,CAAC;AACtD,EAAA;EAEQK,uBAAuBA,CAACI,OAAwC,EAAA;AACtE;IACA,OACE,CAAC,GAAGA,OAAO,CAAC,CACTC,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAI;AACb,MAAA,IAAID,CAAC,CAACE,CAAC,KAAKD,CAAC,CAACC,CAAC,EAAE,OAAOF,CAAC,CAACE,CAAC,GAAGD,CAAC,CAACC,CAAC;AACjC,MAAA,IAAIF,CAAC,CAACG,CAAC,KAAKF,CAAC,CAACE,CAAC,EAAE,OAAOH,CAAC,CAACG,CAAC,GAAGF,CAAC,CAACE,CAAC;AAEjC;AACA,MAAA,IAAIH,CAAC,CAACI,QAAQ,KAAKH,CAAC,CAACG,QAAQ,EAAE,OAAOJ,CAAC,CAACI,QAAQ,GAAG,CAAC,GAAG,EAAE;AAEzD;AACA,MAAA,IAAIJ,CAAC,CAACK,IAAI,KAAKJ,CAAC,CAACI,IAAI,EAAE,OAAOL,CAAC,CAACK,IAAI,GAAG,CAAC,GAAG,EAAE;AAE7C;AACA,MAAA,OAAOL,CAAC,CAACM,IAAI,GAAGL,CAAC,CAACK,IAAI;IACxB,CAAC;AACD;AAAA,KACCC,MAAM,CAAoB,CAACC,GAAG,EAAErB,KAAK,KAAI;MACxC,MAAMsB,IAAI,GAAGD,GAAG,CAACA,GAAG,CAACE,MAAM,GAAG,CAAC,CAAC;MAChC,IAAI,CAACD,IAAI,IAAItB,KAAK,CAACe,CAAC,GAAGO,IAAI,CAACN,CAAC,EAAE;AAC7BK,QAAAA,GAAG,CAACG,IAAI,CAACxB,KAAK,CAAC;AACjB,MAAA;AACA,MAAA,OAAOqB,GAAG;IACZ,CAAC,EAAE,EAAE,CAAC;AAEZ,EAAA;EAEQZ,oBAAoBA,CAC1BN,iBAAoC,EAAA;AAEpC,IAAA,OAAOA,iBAAiB,CAACsB,GAAG,CAAEzB,KAAK,KAAM;MACvC0B,IAAI,EAAE1B,KAAK,CAAC2B,WAAW;MACvBZ,CAAC,EAAEf,KAAK,CAACe,CAAC;MACVC,CAAC,EAAEhB,KAAK,CAACgB,CAAC;MACVG,IAAI,EAAEnB,KAAK,CAACmB,IAAI;MAChBS,cAAc,EAAE5B,KAAK,CAAC4B;AACvB,KAAA,CAAC,CAAC;AACL,EAAA;AAEQlB,EAAAA,iBAAiBA,CACvBF,WAAwB,EACxBN,QAAgB,EAAA;IAEhB,MAAM2B,SAAS,GAAwB,EAAE;AAEzC,IAAA,IAAIrB,WAAW,CAACe,MAAM,KAAK,CAAC,EAAE;AAC5B,MAAA,OAAOM,SAAS;AAClB,IAAA;AAEA;IACA,MAAMC,aAAa,GAAG,CAAC,GAAGtB,WAAW,CAAC,CAACI,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAACE,CAAC,GAAGD,CAAC,CAACC,CAAC,CAAC;AAEhE;AACA,IAAA,KAAK,IAAIgB,QAAQ,GAAG,CAAC,EAAEA,QAAQ,GAAGD,aAAa,CAACP,MAAM,EAAEQ,QAAQ,IAAI,CAAC,EAAE;MACrE,MAAMC,kBAAkB,GAAG,IAAI,CAACC,sBAAsB,CACpDH,aAAa,EACbC,QAAQ,EACR7B,QAAQ,CACT;AACD2B,MAAAA,SAAS,CAACL,IAAI,CAAC,GAAGQ,kBAAkB,CAAC;AACvC,IAAA;AAEA,IAAA,OAAOH,SAAS;AAClB,EAAA;AAEA;AACQI,EAAAA,sBAAsBA,CAC5BH,aAA0B,EAC1BC,QAAgB,EAChB7B,QAAgB,EAAA;IAEhB,MAAM2B,SAAS,GAAwB,EAAE;AACzC,IAAA,MAAMK,UAAU,GAAGJ,aAAa,CAACC,QAAQ,CAAC;AAE1C;AACA,IAAA,IAAII,eAAe,GAAG,CAACD,UAAU,CAAC;AAClC,IAAA,IAAIE,UAAU,GAAGF,UAAU,CAAClB,CAAC;AAE7B;AACA,IAAA,KACE,IAAIqB,OAAO,GAAGN,QAAQ,GAAG,CAAC,EAC1BM,OAAO,GAAGP,aAAa,CAACP,MAAM,EAC9Bc,OAAO,IAAI,CAAC,EACZ;AACA,MAAA,MAAMC,SAAS,GAAGR,aAAa,CAACO,OAAO,CAAC;AAExC;MACA,IAAI,IAAI,CAACE,mBAAmB,CAACJ,eAAe,EAAEG,SAAS,EAAEpC,QAAQ,CAAC,EAAE;AAClEiC,QAAAA,eAAe,CAACX,IAAI,CAACc,SAAS,CAAC;QAC/BF,UAAU,GAAGE,SAAS,CAACtB,CAAC;AAC1B,MAAA,CAAC,MAAM,IAAIsB,SAAS,CAACvB,CAAC,GAAGqB,UAAU,EAAE;AACnC;AACA,QAAA,IAAID,eAAe,CAACZ,MAAM,GAAG,CAAC,EAAE;UAC9BM,SAAS,CAACL,IAAI,CACZ,IAAI,CAACgB,uBAAuB,CAACL,eAAe,EAAEjC,QAAQ,CAAC,CACxD;AACH,QAAA;QACAiC,eAAe,GAAG,CAACG,SAAS,CAAC;QAC7BF,UAAU,GAAGE,SAAS,CAACtB,CAAC;AAC1B,MAAA;AACA;AACF,IAAA;AAEA;AACA,IAAA,IAAImB,eAAe,CAACZ,MAAM,GAAG,CAAC,EAAE;MAC9BM,SAAS,CAACL,IAAI,CAAC,IAAI,CAACgB,uBAAuB,CAACL,eAAe,EAAEjC,QAAQ,CAAC,CAAC;AACzE,IAAA;AAEA,IAAA,OAAO2B,SAAS;AAClB,EAAA;AAEQU,EAAAA,mBAAmBA,CACzBJ,eAA4B,EAC5BG,SAAoB,EACLine truncated
@@ -0,0 +1,54 @@
export const balanced = (a, b, str) => {
const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
const r = ma !== null && mb != null && range(ma, mb, str);
return (r && {
start: r[0],
end: r[1],
pre: str.slice(0, r[0]),
body: str.slice(r[0] + ma.length, r[1]),
post: str.slice(r[1] + mb.length),
});
};
const maybeMatch = (reg, str) => {
const m = str.match(reg);
return m ? m[0] : null;
};
export const range = (a, b, str) => {
let begs, beg, left, right = undefined, result;
let ai = str.indexOf(a);
let bi = str.indexOf(b, ai + 1);
let i = ai;
if (ai >= 0 && bi > 0) {
if (a === b) {
return [ai, bi];
}
begs = [];
left = str.length;
while (i >= 0 && !result) {
if (i === ai) {
begs.push(i);
ai = str.indexOf(a, i + 1);
}
else if (begs.length === 1) {
const r = begs.pop();
if (r !== undefined)
result = [r, bi];
}
else {
beg = begs.pop();
if (beg !== undefined && beg < left) {
left = beg;
right = bi;
}
bi = str.indexOf(b, i + 1);
}
i = ai < bi && ai >= 0 ? ai : bi;
}
if (begs.length && right !== undefined) {
result = [left, right];
}
}
return result;
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"scoring.cjs","sources":["../../../src/matcher/sequence/scoring.ts"],"sourcesContent":[null],"names":["token","ascending","firstChr","charAt","baseGuesses","startingPoints","includes","exec","length"],"mappings":";;AAEA,sBAAe,CAAC;EAAEA,KAAK;AAAEC,EAAAA;AAAS,CAAkC,KAAI;AACtE,EAAA,MAAMC,QAAQ,GAAGF,KAAK,CAACG,MAAM,CAAC,CAAC,CAAC;AAChC,EAAA,IAAIC,WAAW;AACf,EAAA,MAAMC,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AAC1D;AACA,EAAA,IAAIA,cAAc,CAACC,QAAQ,CAACJ,QAAQ,CAAC,EAAE;AACrCE,IAAAA,WAAW,GAAG,CAAC;EACjB,CAAC,MAAM,IAAI,IAAI,CAACG,IAAI,CAACL,QAAQ,CAAC,EAAE;IAC9BE,WAAW,GAAG,EAAE,CAAA;AAClB,EAAA,CAAC,MAAM;AACL;AACA;AACAA,IAAAA,WAAW,GAAG,EAAE;AAClB,EAAA;AACA;AACA;EACA,IAAI,CAACH,SAAS,EAAE;AACdG,IAAAA,WAAW,IAAI,CAAC;AAClB,EAAA;AACA,EAAA,OAAOA,WAAW,GAAGJ,KAAK,CAACQ,MAAM;AACnC,CAAC;;;;"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_I","1025":"_cN _i","1537":"_FB _7G"},C:{"2":"GD","932":"_2P _0Q","2308":"_tO"},D:{"2":"_cL","545":"_1B _BE _zD","1025":"_cN _l","1537":"_nH _KD _eC _7G"},E:{"1":"_1C","2":"_4C","516":"_FS","548":"_AS","676":"_RJ _tE"},F:{"2":"_T","513":"rB","545":"_dG","1025":"_mQ _h","1537":"qB _aQ _mE _HG _aF"},G:{"1":"_kB","2":"_r","516":"_nN","548":"_iR","676":"_JC"},H:{"2":"1D"},I:{"2":"_W","545":"_y","1025":"I"},J:{"2":"D","545":"A"},K:{"2":"_D","1025":"H"},L:{"1025":"I"},M:{"2308":"YC"},N:{"2":"_A"},O:{"1537":"bC"},P:{"545":"J","1025":"_wQ","1537":"_rI _8Q _mS"},Q:{"1537":"JE"},R:{"1537":"KE"},S:{"932":"LE","2308":"ME"}},B:5,C:"Intrinsic & Extrinsic Sizing",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"headset.js","sources":["../../../src/icons/headset.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Headset\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyAxMWgzYTIgMiAwIDAgMSAyIDJ2M2EyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNVptMCAwYTkgOSAwIDEgMSAxOCAwbTAgMHY1YTIgMiAwIDAgMS0yIDJoLTFhMiAyIDAgMCAxLTItMnYtM2EyIDIgMCAwIDEgMi0yaDNaIiAvPgogIDxwYXRoIGQ9Ik0yMSAxNnYyYTQgNCAwIDAgMS00IDRoLTUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/headset\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 Headset = createLucideIcon('Headset', [\n [\n 'path',\n {\n d: 'M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z',\n key: '12oyoe',\n },\n ],\n ['path', { d: 'M21 16v2a4 4 0 0 1-4 4h-5', key: '1x7m43' }],\n]);\n\nexport default Headset;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,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;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,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC5D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,221 @@
import * as util from "../core/util.js";
const error = () => {
// Hebrew labels + grammatical gender
const TypeNames = {
string: { label: "מחרוזת", gender: "f" },
number: { label: "מספר", gender: "m" },
boolean: { label: "ערך בוליאני", gender: "m" },
bigint: { label: "BigInt", gender: "m" },
date: { label: "תאריך", gender: "m" },
array: { label: "מערך", gender: "m" },
object: { label: "אובייקט", gender: "m" },
null: { label: "ערך ריק (null)", gender: "m" },
undefined: { label: "ערך לא מוגדר (undefined)", gender: "m" },
symbol: { label: "סימבול (Symbol)", gender: "m" },
function: { label: "פונקציה", gender: "f" },
map: { label: "מפה (Map)", gender: "f" },
set: { label: "קבוצה (Set)", gender: "f" },
file: { label: "קובץ", gender: "m" },
promise: { label: "Promise", gender: "m" },
NaN: { label: "NaN", gender: "m" },
unknown: { label: "ערך לא ידוע", gender: "m" },
value: { label: "ערך", gender: "m" },
};
// Sizing units for size-related messages + localized origin labels
const Sizable = {
string: { unit: "תווים", shortLabel: "קצר", longLabel: "ארוך" },
file: { unit: "בייטים", shortLabel: "קטן", longLabel: "גדול" },
array: { unit: "פריטים", shortLabel: "קטן", longLabel: "גדול" },
set: { unit: "פריטים", shortLabel: "קטן", longLabel: "גדול" },
number: { unit: "", shortLabel: "קטן", longLabel: "גדול" }, // no unit
};
// Helpers — labels, articles, and verbs
const typeEntry = (t) => (t ? TypeNames[t] : undefined);
const typeLabel = (t) => {
const e = typeEntry(t);
if (e)
return e.label;
// fallback: show raw string if unknown
return t ?? TypeNames.unknown.label;
};
const withDefinite = (t) => `ה${typeLabel(t)}`;
const verbFor = (t) => {
const e = typeEntry(t);
const gender = e?.gender ?? "m";
return gender === "f" ? "צריכה להיות" : "צריך להיות";
};
const getSizing = (origin) => {
if (!origin)
return null;
return Sizable[origin] ?? null;
};
const FormatDictionary = {
regex: { label: "קלט", gender: "m" },
email: { label: "כתובת אימייל", gender: "f" },
url: { label: "כתובת רשת", gender: "f" },
emoji: { label: "אימוג'י", gender: "m" },
uuid: { label: "UUID", gender: "m" },
uuidv4: { label: "UUIDv4", gender: "m" },
uuidv6: { label: "UUIDv6", gender: "m" },
nanoid: { label: "nanoid", gender: "m" },
guid: { label: "GUID", gender: "m" },
cuid: { label: "cuid", gender: "m" },
cuid2: { label: "cuid2", gender: "m" },
ulid: { label: "ULID", gender: "m" },
xid: { label: "XID", gender: "m" },
ksuid: { label: "KSUID", gender: "m" },
datetime: { label: "תאריך וזמן ISO", gender: "m" },
date: { label: "תאריך ISO", gender: "m" },
time: { label: "זמן ISO", gender: "m" },
duration: { label: "משך זמן ISO", gender: "m" },
ipv4: { label: "כתובת IPv4", gender: "f" },
ipv6: { label: "כתובת IPv6", gender: "f" },
mac: { label: "כתובת MAC", gender: "f" },
cidrv4: { label: "טווח IPv4", gender: "m" },
cidrv6: { label: "טווח IPv6", gender: "m" },
base64: { label: "מחרוזת בבסיס 64", gender: "f" },
base64url: { label: "מחרוזת בבסיס 64 לכתובות רשת", gender: "f" },
json_string: { label: "מחרוזת JSON", gender: "f" },
e164: { label: "מספר E.164", gender: "m" },
credit_card: { label: "מספר כרטיס אשראי", gender: "m" },
currency_code: { label: "קוד מטבע", gender: "m" },
iban: { label: "IBAN", gender: "m" },
jwt: { label: "JWT", gender: "m" },
template_literal: { label: "קלט", gender: "m" },
ends_with: { label: "קלט", gender: "m" },
includes: { label: "קלט", gender: "m" },
lowercase: { label: "קלט", gender: "m" },
starts_with: { label: "קלט", gender: "m" },
uppercase: { label: "קלט", gender: "m" },
};
const TypeDictionary = {
nan: "NaN",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
// Expected type: show without definite article for clearer Hebrew
const expectedKey = issue.expected;
const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey);
// Received: show localized label if known, otherwise constructor/raw
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `קלט לא תקין: צריך להיות instanceof ${issue.expected}, התקבל ${received}`;
}
return `קלט לא תקין: צריך להיות ${expected}, התקבל ${received}`;
}
case "invalid_value": {
if (issue.values.length === 1) {
return `ערך לא תקין: הערך חייב להיות ${util.stringifyPrimitive(issue.values[0])}`;
}
// Join values with proper Hebrew formatting
const stringified = issue.values.map((v) => util.stringifyPrimitive(v));
if (issue.values.length === 2) {
return `ערך לא תקין: האפשרויות המתאימות הן ${stringified[0]} או ${stringified[1]}`;
}
// For 3+ values: "a", "b" או "c"
const lastValue = stringified[stringified.length - 1];
const restValues = stringified.slice(0, -1).join(", ");
return `ערך לא תקין: האפשרויות המתאימות הן ${restValues} או ${lastValue}`;
}
case "too_big": {
const sizing = getSizing(issue.origin);
const subject = withDefinite(issue.origin ?? "value");
if (issue.origin === "string") {
// Special handling for strings - more natural Hebrew
return `${sizing?.longLabel ?? "ארוך"} מדי: ${subject} צריכה להכיל ${issue.maximum.toString()} ${sizing?.unit ?? ""} ${issue.inclusive ? "או פחות" : "לכל היותר"}`.trim();
}
if (issue.origin === "number") {
// Natural Hebrew for numbers
const comparison = issue.inclusive ? `קטן או שווה ל-${issue.maximum}` : `קטן מ-${issue.maximum}`;
return `גדול מדי: ${subject} צריך להיות ${comparison}`;
}
if (issue.origin === "array" || issue.origin === "set") {
// Natural Hebrew for arrays and sets
const verb = issue.origin === "set" ? "צריכה" : "צריך";
const comparison = issue.inclusive
? `${issue.maximum} ${sizing?.unit ?? ""} או פחות`
: `פחות מ-${issue.maximum} ${sizing?.unit ?? ""}`;
return `גדול מדי: ${subject} ${verb} להכיל ${comparison}`.trim();
}
const adj = issue.inclusive ? "<=" : "<";
const be = verbFor(issue.origin ?? "value");
if (sizing?.unit) {
return `${sizing.longLabel} מדי: ${subject} ${be} ${adj}${issue.maximum.toString()} ${sizing.unit}`;
}
return `${sizing?.longLabel ?? "גדול"} מדי: ${subject} ${be} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const sizing = getSizing(issue.origin);
const subject = withDefinite(issue.origin ?? "value");
if (issue.origin === "string") {
// Special handling for strings - more natural Hebrew
return `${sizing?.shortLabel ?? "קצר"} מדי: ${subject} צריכה להכיל ${issue.minimum.toString()} ${sizing?.unit ?? ""} ${issue.inclusive ? "או יותר" : "לפחות"}`.trim();
}
if (issue.origin === "number") {
// Natural Hebrew for numbers
const comparison = issue.inclusive ? `גדול או שווה ל-${issue.minimum}` : `גדול מ-${issue.minimum}`;
return `קטן מדי: ${subject} צריך להיות ${comparison}`;
}
if (issue.origin === "array" || issue.origin === "set") {
// Natural Hebrew for arrays and sets
const verb = issue.origin === "set" ? "צריכה" : "צריך";
// Special case for singular (minimum === 1)
if (issue.minimum === 1 && issue.inclusive) {
const singularPhrase = issue.origin === "set" ? "לפחות פריט אחד" : "לפחות פריט אחד";
return `קטן מדי: ${subject} ${verb} להכיל ${singularPhrase}`;
}
const comparison = issue.inclusive
? `${issue.minimum} ${sizing?.unit ?? ""} או יותר`
: `יותר מ-${issue.minimum} ${sizing?.unit ?? ""}`;
return `קטן מדי: ${subject} ${verb} להכיל ${comparison}`.trim();
}
const adj = issue.inclusive ? ">=" : ">";
const be = verbFor(issue.origin ?? "value");
if (sizing?.unit) {
return `${sizing.shortLabel} מדי: ${subject} ${be} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `${sizing?.shortLabel ?? "קטן"} מדי: ${subject} ${be} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
// These apply to strings — use feminine grammar + ה׳ הידיעה
if (_issue.format === "starts_with")
return `המחרוזת חייבת להתחיל ב "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `המחרוזת חייבת להסתיים ב "${_issue.suffix}"`;
if (_issue.format === "includes")
return `המחרוזת חייבת לכלול "${_issue.includes}"`;
if (_issue.format === "regex")
return `המחרוזת חייבת להתאים לתבנית ${_issue.pattern}`;
// Handle gender agreement for formats
const nounEntry = FormatDictionary[_issue.format];
const noun = nounEntry?.label ?? _issue.format;
const gender = nounEntry?.gender ?? "m";
const adjective = gender === "f" ? "תקינה" : "תקין";
return `${noun} לא ${adjective}`;
}
case "not_multiple_of":
return `מספר לא תקין: חייב להיות מכפלה של ${issue.divisor}`;
case "unrecognized_keys":
return `מפתח${issue.keys.length > 1 ? "ות" : ""} לא מזוה${issue.keys.length > 1 ? "ים" : "ה"}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key": {
return `שדה לא תקין באובייקט`;
}
case "invalid_union":
return "קלט לא תקין";
case "invalid_element": {
const place = withDefinite(issue.origin ?? "array");
return `ערך לא תקין ב${place}`;
}
default:
return `קלט לא תקין`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1 @@
{"version":3,"file":"bell-dot.js","sources":["../../../src/icons/bell-dot.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BellDot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAuMjY4IDIxYTIgMiAwIDAgMCAzLjQ2NCAwIiAvPgogIDxwYXRoIGQ9Ik0xMy45MTYgMi4zMTRBNiA2IDAgMCAwIDYgOGMwIDQuNDk5LTEuNDExIDUuOTU2LTIuNzQgNy4zMjdBMSAxIDAgMCAwIDQgMTdoMTZhMSAxIDAgMCAwIC43NC0xLjY3MyA5IDkgMCAwIDEtLjU4NS0uNjY1IiAvPgogIDxjaXJjbGUgY3g9IjE4IiBjeT0iOCIgcj0iMyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/bell-dot\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 BellDot = createLucideIcon('BellDot', [\n ['path', { d: 'M10.268 21a2 2 0 0 0 3.464 0', key: 'vwvbt9' }],\n [\n 'path',\n {\n d: 'M13.916 2.314A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.74 7.327A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673 9 9 0 0 1-.585-.665',\n key: '1tip0g',\n },\n ],\n ['circle', { cx: '18', cy: '8', r: '3', key: '1g0gzu' }],\n]);\n\nexport default BellDot;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC7D,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;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,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,7 @@
// Generated using scripts/write-decode-map.ts
export const xmlDecodeTree = /* #__PURE__ */ new Uint16Array(
// prettier-ignore
/* #__PURE__ */ "\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022"
.split("")
.map((c) => c.charCodeAt(0)));
//# sourceMappingURL=decode-data-xml.js.map
@@ -0,0 +1,63 @@
var test = require('tape')
var _JSON = require('../')
function clone (o) {
return JSON.parse(JSON.stringify(o))
}
var examples = {
simple: { foo: [], bar: {}, baz: Buffer.from('some binary data') },
just_buffer: Buffer.from('JUST A BUFFER'),
all_types: {
string:'hello',
number: 3145,
null: null,
object: {},
array: [],
boolean: true,
boolean2: false
},
foo: Buffer.from('foo'),
foo2: Buffer.from('foo2'),
escape: {
buffer: Buffer.from('x'),
string: _JSON.stringify(Buffer.from('x'))
},
escape2: {
buffer: Buffer.from('x'),
string: ':base64:'+ Buffer.from('x').toString('base64')
},
undefined: {
empty: undefined, test: true
},
undefined2: {
first: 1, empty: undefined, test: true
},
undefinedArray: {
array: [undefined, 1, 'two']
},
fn: {
fn: function () {}
},
undefined: undefined
}
for(k in examples)
(function (value, k) {
test(k, function (t) {
var s = _JSON.stringify(value)
console.log('parse', s)
if(JSON.stringify(value) !== undefined) {
console.log(s)
var _value = _JSON.parse(s)
t.deepEqual(clone(_value), clone(value))
}
else
t.equal(s, undefined)
t.end()
})
})(examples[k], k)
@@ -0,0 +1,269 @@
import type {Format, FormatDefinition} from "ajv"
import type {FormatValidator, FormatCompare} from "ajv/dist/types"
export type FormatMode = "fast" | "full"
export type FormatName =
| "date"
| "time"
| "date-time"
| "iso-time"
| "iso-date-time"
| "duration"
| "uri"
| "uri-reference"
| "uri-template"
| "url"
| "email"
| "hostname"
| "ipv4"
| "ipv6"
| "regex"
| "uuid"
| "json-pointer"
| "json-pointer-uri-fragment"
| "relative-json-pointer"
| "byte"
| "int32"
| "int64"
| "float"
| "double"
| "password"
| "binary"
export type DefinedFormats = {
[key in FormatName]: Format
}
function fmtDef(
validate: RegExp | FormatValidator<string>,
compare: FormatCompare<string>
): FormatDefinition<string> {
return {validate, compare}
}
export const fullFormats: DefinedFormats = {
// date: http://tools.ietf.org/html/rfc3339#section-5.6
date: fmtDef(date, compareDate),
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
time: fmtDef(getTime(true), compareTime),
"date-time": fmtDef(getDateTime(true), compareDateTime),
"iso-time": fmtDef(getTime(), compareIsoTime),
"iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
// duration: https://tools.ietf.org/html/rfc3339#appendix-A
duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
uri,
"uri-reference":
/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
// uri-template: https://tools.ietf.org/html/rfc6570
"uri-template":
/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
// For the source: https://gist.github.com/dperini/729294
// For test cases: https://mathiasbynens.be/demo/url-regex
url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
email:
/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
hostname:
/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
// optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
regex,
// uuid: http://tools.ietf.org/html/rfc4122
uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
// JSON-pointer: https://tools.ietf.org/html/rfc6901
// uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
"json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
"json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
// relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
"relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
// the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types
// byte: https://github.com/miguelmota/is-base64
byte,
// signed 32 bit integer
int32: {type: "number", validate: validateInt32},
// signed 64 bit integer
int64: {type: "number", validate: validateInt64},
// C-type float
float: {type: "number", validate: validateNumber},
// C-type double
double: {type: "number", validate: validateNumber},
// hint to the UI to hide input strings
password: true,
// unchecked string payload
binary: true,
}
export const fastFormats: DefinedFormats = {
...fullFormats,
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
time: fmtDef(
/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,
compareTime
),
"date-time": fmtDef(
/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,
compareDateTime
),
"iso-time": fmtDef(
/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
compareIsoTime
),
"iso-date-time": fmtDef(
/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
compareIsoDateTime
),
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
"uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
// email (sources from jsen validator):
// http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
email:
/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
}
export const formatNames = Object.keys(fullFormats) as FormatName[]
function isLeapYear(year: number): boolean {
// https://tools.ietf.org/html/rfc3339#appendix-C
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0)
}
const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/
const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
function date(str: string): boolean {
// full-date from http://tools.ietf.org/html/rfc3339#section-5.6
const matches: string[] | null = DATE.exec(str)
if (!matches) return false
const year: number = +matches[1]
const month: number = +matches[2]
const day: number = +matches[3]
return (
month >= 1 &&
month <= 12 &&
day >= 1 &&
day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month])
)
}
function compareDate(d1: string, d2: string): number | undefined {
if (!(d1 && d2)) return undefined
if (d1 > d2) return 1
if (d1 < d2) return -1
return 0
}
const TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i
function getTime(strictTimeZone?: boolean): (str: string) => boolean {
return function time(str: string): boolean {
const matches: string[] | null = TIME.exec(str)
if (!matches) return false
const hr: number = +matches[1]
const min: number = +matches[2]
const sec: number = +matches[3]
const tz: string | undefined = matches[4]
const tzSign: number = matches[5] === "-" ? -1 : 1
const tzH: number = +(matches[6] || 0)
const tzM: number = +(matches[7] || 0)
if (tzH > 23 || tzM > 59 || (strictTimeZone && !tz)) return false
if (hr <= 23 && min <= 59 && sec < 60) return true
// leap second
const utcMin = min - tzM * tzSign
const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0)
return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61
}
}
function compareTime(s1: string, s2: string): number | undefined {
if (!(s1 && s2)) return undefined
const t1 = new Date("2020-01-01T" + s1).valueOf()
const t2 = new Date("2020-01-01T" + s2).valueOf()
if (!(t1 && t2)) return undefined
return t1 - t2
}
function compareIsoTime(t1: string, t2: string): number | undefined {
if (!(t1 && t2)) return undefined
const a1 = TIME.exec(t1)
const a2 = TIME.exec(t2)
if (!(a1 && a2)) return undefined
t1 = a1[1] + a1[2] + a1[3]
t2 = a2[1] + a2[2] + a2[3]
if (t1 > t2) return 1
if (t1 < t2) return -1
return 0
}
const DATE_TIME_SEPARATOR = /t|\s/i
function getDateTime(strictTimeZone?: boolean): (str: string) => boolean {
const time = getTime(strictTimeZone)
return function date_time(str: string): boolean {
// http://tools.ietf.org/html/rfc3339#section-5.6
const dateTime: string[] = str.split(DATE_TIME_SEPARATOR)
return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1])
}
}
function compareDateTime(dt1: string, dt2: string): number | undefined {
if (!(dt1 && dt2)) return undefined
const d1 = new Date(dt1).valueOf()
const d2 = new Date(dt2).valueOf()
if (!(d1 && d2)) return undefined
return d1 - d2
}
function compareIsoDateTime(dt1: string, dt2: string): number | undefined {
if (!(dt1 && dt2)) return undefined
const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR)
const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR)
const res = compareDate(d1, d2)
if (res === undefined) return undefined
return res || compareTime(t1, t2)
}
const NOT_URI_FRAGMENT = /\/|:/
const URI =
/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i
function uri(str: string): boolean {
// http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
return NOT_URI_FRAGMENT.test(str) && URI.test(str)
}
const BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm
function byte(str: string): boolean {
BYTE.lastIndex = 0
return BYTE.test(str)
}
const MIN_INT32 = -(2 ** 31)
const MAX_INT32 = 2 ** 31 - 1
function validateInt32(value: number): boolean {
return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32
}
function validateInt64(value: number): boolean {
// JSON and javascript max Int is 2**53, so any int that passes isInteger is valid for Int64
return Number.isInteger(value)
}
function validateNumber(): boolean {
return true
}
const Z_ANCHOR = /[^\\]\\Z/
function regex(str: string): boolean {
if (Z_ANCHOR.test(str)) return false
try {
new RegExp(str)
return true
} catch (e) {
return false
}
}
@@ -0,0 +1,20 @@
declare const canUseDOM: boolean;
declare function composeEventHandlers<E extends {
defaultPrevented: boolean;
}>(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
checkForDefaultPrevented?: boolean | undefined;
}): (event: E) => void;
declare function getOwnerWindow(element: Node | null | undefined): Window & typeof globalThis;
declare function getOwnerDocument(element: Node | null | undefined): Document;
/**
* Lifted from https://github.com/ariakit/ariakit/blob/main/packages/ariakit-core/src/utils/dom.ts#L37
* MIT License, Copyright (c) AriaKit.
*/
declare function getActiveElement(node: Node | null | undefined, activeDescendant?: boolean): HTMLElement | null;
declare function isFrame(element: Element): element is HTMLIFrameElement;
type Timeout = ReturnType<typeof setTimeout>;
type Interval = ReturnType<typeof setInterval>;
type Immediate = ReturnType<typeof setImmediate>;
export { type Immediate, type Interval, type Timeout, canUseDOM, composeEventHandlers, getActiveElement, getOwnerDocument, getOwnerWindow, isFrame };
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_DS","2":"_o _vD _L","194":"KC LC MC"},D:{"1":"_GK","2":"_CR"},E:{"1":"_2L","2":"_eR"},F:{"1":"_8L","2":"_VK"},G:{"1":"_sH","2":"_IO"},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:6,C:"BigInt",D:true};
@@ -0,0 +1,81 @@
'use strict'
module.exports = {
kClose: Symbol('close'),
kDestroy: Symbol('destroy'),
kDispatch: Symbol('dispatch'),
kUrl: Symbol('url'),
kRequestOrigin: Symbol('request origin'),
kRedirectCacheControl: Symbol('redirect cache control'),
kOriginless: Symbol('originless'),
kWriting: Symbol('writing'),
kResuming: Symbol('resuming'),
kQueue: Symbol('queue'),
kConnect: Symbol('connect'),
kConnecting: Symbol('connecting'),
kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'),
kKeepAliveMaxTimeout: Symbol('max keep alive timeout'),
kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'),
kKeepAliveTimeoutValue: Symbol('keep alive timeout'),
kKeepAlive: Symbol('keep alive'),
kHeadersTimeout: Symbol('headers timeout'),
kBodyTimeout: Symbol('body timeout'),
kServerName: Symbol('server name'),
kLocalAddress: Symbol('local address'),
kHost: Symbol('host'),
kNoRef: Symbol('no ref'),
kBodyUsed: Symbol('used'),
kBody: Symbol('abstracted request body'),
kRunning: Symbol('running'),
kBlocking: Symbol('blocking'),
kPending: Symbol('pending'),
kSize: Symbol('size'),
kBusy: Symbol('busy'),
kQueued: Symbol('queued'),
kFree: Symbol('free'),
kConnected: Symbol('connected'),
kClosed: Symbol('closed'),
kNeedDrain: Symbol('need drain'),
kReset: Symbol('reset'),
kDestroyed: Symbol.for('nodejs.stream.destroyed'),
kResume: Symbol('resume'),
kOnError: Symbol('on error'),
kMaxHeadersSize: Symbol('max headers size'),
kRunningIdx: Symbol('running index'),
kPendingIdx: Symbol('pending index'),
kError: Symbol('error'),
kClients: Symbol('clients'),
kClient: Symbol('client'),
kParser: Symbol('parser'),
kOnDestroyed: Symbol('destroy callbacks'),
kPipelining: Symbol('pipelining'),
kSocket: Symbol('socket'),
kHostHeader: Symbol('host header'),
kConnector: Symbol('connector'),
kStrictContentLength: Symbol('strict content length'),
kMaxRedirections: Symbol('maxRedirections'),
kMaxRequests: Symbol('maxRequestsPerClient'),
kProxy: Symbol('proxy agent options'),
kCounter: Symbol('socket request counter'),
kMaxResponseSize: Symbol('max response size'),
kHTTP2Session: Symbol('http2Session'),
kHTTP2Options: Symbol('http2 options'),
kHTTP2SessionState: Symbol('http2Session state'),
kRetryHandlerDefaultRetry: Symbol('retry agent default retry'),
kConstruct: Symbol('constructable'),
kListeners: Symbol('listeners'),
kHTTPContext: Symbol('http context'),
kMaxConcurrentStreams: Symbol('max concurrent streams'),
kHostAuthority: Symbol('host authority'),
kHTTP2InitialWindowSize: Symbol('http2 initial window size'),
kHTTP2ConnectionWindowSize: Symbol('http2 connection window size'),
kEnableConnectProtocol: Symbol('http2session connect protocol'),
kRemoteSettings: Symbol('http2session remote settings'),
kHTTP2Stream: Symbol('http2session client stream'),
kPingInterval: Symbol('ping interval'),
kUseMilo: Symbol('use milo'),
kNoProxyAgent: Symbol('no proxy agent'),
kHttpProxyAgent: Symbol('http proxy agent'),
kHttpsProxyAgent: Symbol('https proxy agent'),
kSocks5ProxyAgent: Symbol('socks5 proxy agent')
}
@@ -0,0 +1,266 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_utils_html = require("../utils/html.js");
const require_jsx_constants = require("./constants.js");
const require_jsx_context = require("./context.js");
const require_jsx_intrinsic_element_common = require("./intrinsic-element/common.js");
const require_jsx_intrinsic_element_components = require("./intrinsic-element/components.js");
const require_jsx_utils = require("./utils.js");
//#region src/jsx/base.ts
let nameSpaceContext = void 0;
const getNameSpaceContext = () => nameSpaceContext;
const toSVGAttributeName = (key) => /[A-Z]/.test(key) && key.match(/^(?:al|basel|clip(?:Path|Rule)$|co|do|fill|fl|fo|gl|let|lig|i|marker[EMS]|o|pai|pointe|sh|st[or]|text[^L]|tr|u|ve|w)/) ? key.replace(/([A-Z])/g, "-$1").toLowerCase() : key;
const emptyTags = [
"area",
"base",
"br",
"col",
"embed",
"hr",
"img",
"input",
"keygen",
"link",
"meta",
"param",
"source",
"track",
"wbr"
];
const booleanAttributes = [
"allowfullscreen",
"async",
"autofocus",
"autoplay",
"checked",
"controls",
"default",
"defer",
"disabled",
"download",
"formnovalidate",
"hidden",
"inert",
"ismap",
"itemscope",
"loop",
"multiple",
"muted",
"nomodule",
"novalidate",
"open",
"playsinline",
"readonly",
"required",
"reversed",
"selected"
];
const resolveFunctionComponentResult = (result, suspendedContext) => result.then((resolved) => {
if (typeof resolved !== "string" && !Array.isArray(resolved) && !(resolved instanceof JSXNode)) return resolved;
const children = Array.isArray(resolved) ? resolved : [resolved];
const render = () => {
const buffer = [""];
childrenToStringToBuffer(children, buffer);
return buffer.length === 1 ? require_utils_html.raw(buffer[0], buffer.callbacks) : require_utils_html.stringBufferToString(buffer, buffer.callbacks);
};
return suspendedContext ? suspendedContext(render) : require_jsx_context.runWithRenderContext(render);
});
const childrenToStringToBuffer = (children, buffer) => {
for (let i = 0, len = children.length; i < len; i++) {
const child = children[i];
if (typeof child === "string") require_utils_html.escapeToBuffer(child, buffer);
else if (typeof child === "boolean" || child === null || child === void 0) continue;
else if (child instanceof JSXNode) child.toStringToBuffer(buffer);
else if (typeof child === "number") buffer[0] += child;
else if (child.isEscaped) {
buffer[0] += child;
const callbacks = child.callbacks;
if (callbacks) {
buffer.callbacks ||= [];
buffer.callbacks.push(...callbacks);
}
} else if (child instanceof Promise) buffer.unshift("", child);
else childrenToStringToBuffer(child, buffer);
}
};
const renderChildren = (children) => require_jsx_context.runWithRenderContext(() => {
const buffer = [""];
childrenToStringToBuffer(children, buffer);
return buffer.length === 1 ? require_utils_html.raw(buffer[0], buffer.callbacks) : require_utils_html.stringBufferToString(buffer, buffer.callbacks);
});
const isUntrustedObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) && !(value instanceof JSXNode) && !(value instanceof Promise) && !value.isEscaped && typeof value.toString === "function";
const renderUntrustedObject = (value) => {
const stringified = value.toString();
const escape = (result) => renderChildren([String(result)]);
return stringified instanceof Promise ? stringified.then(escape) : escape(stringified);
};
var JSXNode = class {
tag;
props;
key;
children;
isEscaped = true;
constructor(tag, props, children) {
if (typeof tag !== "function" && !require_jsx_utils.isValidTagName(tag)) throw new Error(`Invalid JSX tag name: ${tag}`);
this.tag = tag;
this.props = props;
this.children = children;
}
get type() {
return this.tag;
}
get ref() {
return this.props.ref || null;
}
toString() {
const render = () => {
const buffer = [""];
this.toStringToBuffer(buffer);
return buffer.length === 1 ? "callbacks" in buffer ? require_utils_html.resolveCallbackSync(require_utils_html.raw(buffer[0], buffer.callbacks)).toString() : buffer[0] : require_utils_html.stringBufferToString(buffer, buffer.callbacks);
};
return require_jsx_context.runWithRenderContext(render);
}
toStringToBuffer(buffer) {
const tag = this.tag;
const props = this.props;
let { children } = this;
buffer[0] += `<${tag}`;
const normalizeKey = tag === "svg" || nameSpaceContext && require_jsx_context.useContext(nameSpaceContext) === "svg" ? (key) => toSVGAttributeName(require_jsx_utils.normalizeIntrinsicElementKey(key)) : (key) => require_jsx_utils.normalizeIntrinsicElementKey(key);
for (let [key, v] of Object.entries(props)) {
key = normalizeKey(key);
if (!require_jsx_utils.isValidAttributeName(key)) continue;
if (key === "children") {} else if (key === "style" && typeof v === "object") {
let styleStr = "";
require_jsx_utils.styleObjectForEach(v, (property, value) => {
if (value != null) styleStr += `${styleStr ? ";" : ""}${property}:${value}`;
});
buffer[0] += " style=\"";
require_utils_html.escapeToBuffer(styleStr, buffer);
buffer[0] += "\"";
} else if (typeof v === "string") {
buffer[0] += ` ${key}="`;
require_utils_html.escapeToBuffer(v, buffer);
buffer[0] += "\"";
} else if (v === null || v === void 0) {} else if (typeof v === "number" || v.isEscaped) buffer[0] += ` ${key}="${v}"`;
else if (typeof v === "boolean" && booleanAttributes.includes(key)) {
if (v) buffer[0] += ` ${key}=""`;
} else if (key === "dangerouslySetInnerHTML") {
if (children.length > 0) throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
children = [require_utils_html.raw(v.__html)];
} else if (v instanceof Promise) {
buffer[0] += ` ${key}="`;
buffer.unshift("\"", v);
} else if (typeof v === "function") {
if (!key.startsWith("on") && key !== "ref") throw new Error(`Invalid prop '${key}' of type 'function' supplied to '${tag}'.`);
} else {
buffer[0] += ` ${key}="`;
require_utils_html.escapeToBuffer(v.toString(), buffer);
buffer[0] += "\"";
}
}
if (emptyTags.includes(tag) && children.length === 0) {
buffer[0] += "/>";
return;
}
buffer[0] += ">";
childrenToStringToBuffer(children, buffer);
buffer[0] += `</${tag}>`;
}
};
var JSXFunctionNode = class extends JSXNode {
toStringToBuffer(buffer) {
const { children } = this;
const props = { ...this.props };
if (children.length) props.children = children.length === 1 ? children[0] : children;
const res = this.tag.call(null, props);
if (typeof res === "boolean" || res == null) return;
else if (res instanceof Promise) {
if (require_jsx_context.globalContexts.length === 0) buffer.unshift("", resolveFunctionComponentResult(res));
else buffer.unshift("", resolveFunctionComponentResult(res, require_jsx_context.captureRenderContext()));
} else if (res instanceof JSXNode) res.toStringToBuffer(buffer);
else if (Array.isArray(res)) childrenToStringToBuffer(res, buffer);
else if (typeof res === "number" || res.isEscaped) {
buffer[0] += res;
if (res.callbacks) {
buffer.callbacks ||= [];
buffer.callbacks.push(...res.callbacks);
}
} else require_utils_html.escapeToBuffer(res, buffer);
}
};
var JSXFragmentNode = class extends JSXNode {
toStringToBuffer(buffer) {
childrenToStringToBuffer(this.children, buffer);
}
};
const jsx = (tag, props, ...children) => {
props ??= {};
if (children.length) props.children = children.length === 1 ? children[0] : children;
const key = props.key;
delete props["key"];
const node = jsxFn(tag, props, children);
node.key = key;
return node;
};
let initDomRenderer = false;
const jsxFn = (tag, props, children) => {
if (!initDomRenderer) {
for (const k in require_jsx_intrinsic_element_common.domRenderers) require_jsx_intrinsic_element_components.components_exports[k][require_jsx_constants.DOM_RENDERER] = require_jsx_intrinsic_element_common.domRenderers[k];
initDomRenderer = true;
}
if (typeof tag === "function") return new JSXFunctionNode(tag, props, children);
else if (require_jsx_intrinsic_element_components.components_exports[tag]) return new JSXFunctionNode(require_jsx_intrinsic_element_components.components_exports[tag], props, children);
else if (tag === "svg" || tag === "head") {
nameSpaceContext ||= require_jsx_context.createContext("");
return new JSXNode(tag, props, [new JSXFunctionNode(nameSpaceContext, { value: tag }, children)]);
} else return new JSXNode(tag, props, children);
};
const shallowEqual = (a, b) => {
if (a === b) return true;
const aKeys = Object.keys(a).sort();
const bKeys = Object.keys(b).sort();
if (aKeys.length !== bKeys.length) return false;
for (let i = 0, len = aKeys.length; i < len; i++) if (aKeys[i] === "children" && bKeys[i] === "children" && !a.children?.length && !b.children?.length) continue;
else if (a[aKeys[i]] !== b[aKeys[i]]) return false;
return true;
};
const memo = (component, propsAreEqual = shallowEqual) => {
const wrapper = ((props) => component(props));
wrapper[require_jsx_constants.DOM_MEMO] = propsAreEqual;
wrapper[require_jsx_constants.DOM_RENDERER] = component;
return wrapper;
};
const Fragment = ({ children }) => {
return new JSXFragmentNode("", { children }, Array.isArray(children) ? children : children ? [children] : []);
};
const isValidElement = (element) => {
return !!(element && typeof element === "object" && "tag" in element && "props" in element);
};
const cloneElement = (element, props, ...children) => {
let childrenToClone;
if (children.length > 0) childrenToClone = children;
else {
const c = element.props.children;
childrenToClone = Array.isArray(c) ? c : [c];
}
return jsx(element.tag, {
...element.props,
...props
}, ...childrenToClone);
};
const reactAPICompatVersion = "19.0.0-hono-jsx";
//#endregion
exports.Fragment = Fragment;
exports.JSXFragmentNode = JSXFragmentNode;
exports.JSXNode = JSXNode;
exports.booleanAttributes = booleanAttributes;
exports.cloneElement = cloneElement;
exports.getNameSpaceContext = getNameSpaceContext;
exports.isUntrustedObject = isUntrustedObject;
exports.isValidElement = isValidElement;
exports.jsx = jsx;
exports.jsxFn = jsxFn;
exports.memo = memo;
exports.reactAPICompatVersion = reactAPICompatVersion;
exports.renderChildren = renderChildren;
exports.renderUntrustedObject = renderUntrustedObject;
exports.shallowEqual = shallowEqual;
@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.findSuggestion = findSuggestion;
const {
min
} = Math;
function levenshtein(a, b) {
let t = [],
u = [],
i,
j;
const m = a.length,
n = b.length;
if (!m) {
return n;
}
if (!n) {
return m;
}
for (j = 0; j <= n; j++) {
t[j] = j;
}
for (i = 1; i <= m; i++) {
for (u = [i], j = 1; j <= n; j++) {
u[j] = a[i - 1] === b[j - 1] ? t[j - 1] : min(t[j - 1], t[j], u[j - 1]) + 1;
}
t = u;
}
return u[n];
}
function findSuggestion(str, arr) {
const distances = arr.map(el => levenshtein(el, str));
return arr[distances.indexOf(min(...distances))];
}
//# sourceMappingURL=find-suggestion.js.map
@@ -0,0 +1,184 @@
import type {KeywordErrorCxt, KeywordErrorDefinition} from "../types"
import type {SchemaCxt} from "./index"
import {CodeGen, _, str, strConcat, Code, Name} from "./codegen"
import {SafeExpr} from "./codegen/code"
import {getErrorPath, Type} from "./util"
import N from "./names"
export const keywordError: KeywordErrorDefinition = {
message: ({keyword}) => str`must pass "${keyword}" keyword validation`,
}
export const keyword$DataError: KeywordErrorDefinition = {
message: ({keyword, schemaType}) =>
schemaType
? str`"${keyword}" keyword must be ${schemaType} ($data)`
: str`"${keyword}" keyword is invalid ($data)`,
}
export interface ErrorPaths {
instancePath?: Code
schemaPath?: string
parentSchema?: boolean
}
export function reportError(
cxt: KeywordErrorCxt,
error: KeywordErrorDefinition = keywordError,
errorPaths?: ErrorPaths,
overrideAllErrors?: boolean
): void {
const {it} = cxt
const {gen, compositeRule, allErrors} = it
const errObj = errorObjectCode(cxt, error, errorPaths)
if (overrideAllErrors ?? (compositeRule || allErrors)) {
addError(gen, errObj)
} else {
returnErrors(it, _`[${errObj}]`)
}
}
export function reportExtraError(
cxt: KeywordErrorCxt,
error: KeywordErrorDefinition = keywordError,
errorPaths?: ErrorPaths
): void {
const {it} = cxt
const {gen, compositeRule, allErrors} = it
const errObj = errorObjectCode(cxt, error, errorPaths)
addError(gen, errObj)
if (!(compositeRule || allErrors)) {
returnErrors(it, N.vErrors)
}
}
export function resetErrorsCount(gen: CodeGen, errsCount: Name): void {
gen.assign(N.errors, errsCount)
gen.if(_`${N.vErrors} !== null`, () =>
gen.if(
errsCount,
() => gen.assign(_`${N.vErrors}.length`, errsCount),
() => gen.assign(N.vErrors, null)
)
)
}
export function extendErrors({
gen,
keyword,
schemaValue,
data,
errsCount,
it,
}: KeywordErrorCxt): void {
/* istanbul ignore if */
if (errsCount === undefined) throw new Error("ajv implementation error")
const err = gen.name("err")
gen.forRange("i", errsCount, N.errors, (i) => {
gen.const(err, _`${N.vErrors}[${i}]`)
gen.if(_`${err}.instancePath === undefined`, () =>
gen.assign(_`${err}.instancePath`, strConcat(N.instancePath, it.errorPath))
)
gen.assign(_`${err}.schemaPath`, str`${it.errSchemaPath}/${keyword}`)
if (it.opts.verbose) {
gen.assign(_`${err}.schema`, schemaValue)
gen.assign(_`${err}.data`, data)
}
})
}
function addError(gen: CodeGen, errObj: Code): void {
const err = gen.const("err", errObj)
gen.if(
_`${N.vErrors} === null`,
() => gen.assign(N.vErrors, _`[${err}]`),
_`${N.vErrors}.push(${err})`
)
gen.code(_`${N.errors}++`)
}
function returnErrors(it: SchemaCxt, errs: Code): void {
const {gen, validateName, schemaEnv} = it
if (schemaEnv.$async) {
gen.throw(_`new ${it.ValidationError as Name}(${errs})`)
} else {
gen.assign(_`${validateName}.errors`, errs)
gen.return(false)
}
}
const E = {
keyword: new Name("keyword"),
schemaPath: new Name("schemaPath"), // also used in JTD errors
params: new Name("params"),
propertyName: new Name("propertyName"),
message: new Name("message"),
schema: new Name("schema"),
parentSchema: new Name("parentSchema"),
}
function errorObjectCode(
cxt: KeywordErrorCxt,
error: KeywordErrorDefinition,
errorPaths?: ErrorPaths
): Code {
const {createErrors} = cxt.it
if (createErrors === false) return _`{}`
return errorObject(cxt, error, errorPaths)
}
function errorObject(
cxt: KeywordErrorCxt,
error: KeywordErrorDefinition,
errorPaths: ErrorPaths = {}
): Code {
const {gen, it} = cxt
const keyValues: [Name, SafeExpr | string][] = [
errorInstancePath(it, errorPaths),
errorSchemaPath(cxt, errorPaths),
]
extraErrorProps(cxt, error, keyValues)
return gen.object(...keyValues)
}
function errorInstancePath({errorPath}: SchemaCxt, {instancePath}: ErrorPaths): [Name, Code] {
const instPath = instancePath
? str`${errorPath}${getErrorPath(instancePath, Type.Str)}`
: errorPath
return [N.instancePath, strConcat(N.instancePath, instPath)]
}
function errorSchemaPath(
{keyword, it: {errSchemaPath}}: KeywordErrorCxt,
{schemaPath, parentSchema}: ErrorPaths
): [Name, string | Code] {
let schPath = parentSchema ? errSchemaPath : str`${errSchemaPath}/${keyword}`
if (schemaPath) {
schPath = str`${schPath}${getErrorPath(schemaPath, Type.Str)}`
}
return [E.schemaPath, schPath]
}
function extraErrorProps(
cxt: KeywordErrorCxt,
{params, message}: KeywordErrorDefinition,
keyValues: [Name, SafeExpr | string][]
): void {
const {keyword, data, schemaValue, it} = cxt
const {opts, propertyName, topSchemaRef, schemaPath} = it
keyValues.push(
[E.keyword, keyword],
[E.params, typeof params == "function" ? params(cxt) : params || _`{}`]
)
if (opts.messages) {
keyValues.push([E.message, typeof message == "function" ? message(cxt) : message])
}
if (opts.verbose) {
keyValues.push(
[E.schema, schemaValue],
[E.parentSchema, _`${topSchemaRef}${schemaPath}`],
[N.data, data]
)
}
if (propertyName) keyValues.push([E.propertyName, propertyName])
}