docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Type Check & Test (push) Waiting to run

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

No files matched your search

@@ -0,0 +1,23 @@
'use strict';
var hasOwn = require('hasown');
var isInteger = require('../isInteger');
module.exports = function isRegExpRecord(value) {
return !!value
&& typeof value === 'object'
&& hasOwn(value, '[[IgnoreCase]]')
&& typeof value['[[IgnoreCase]]'] === 'boolean'
&& hasOwn(value, '[[Multiline]]')
&& typeof value['[[Multiline]]'] === 'boolean'
&& hasOwn(value, '[[DotAll]]')
&& typeof value['[[DotAll]]'] === 'boolean'
&& hasOwn(value, '[[Unicode]]')
&& typeof value['[[Unicode]]'] === 'boolean'
&& hasOwn(value, '[[CapturingGroupsCount]]')
&& typeof value['[[CapturingGroupsCount]]'] === 'number'
&& isInteger(value['[[CapturingGroupsCount]]'])
&& value['[[CapturingGroupsCount]]'] >= 0
&& (!hasOwn(value, '[[UnicodeSets]]') || typeof value['[[UnicodeSets]]'] === 'boolean'); // optional since it was added later
};
@@ -0,0 +1,53 @@
var cc = require('./lib/utils')
var join = require('path').join
var deepExtend = require('deep-extend')
var etc = '/etc'
var win = process.platform === "win32"
var home = win
? process.env.USERPROFILE
: process.env.HOME
module.exports = function (name, defaults, argv, parse) {
if('string' !== typeof name)
throw new Error('rc(name): name *must* be string')
if(!argv)
argv = require('minimist')(process.argv.slice(2))
defaults = (
'string' === typeof defaults
? cc.json(defaults) : defaults
) || {}
parse = parse || cc.parse
var env = cc.env(name + '_')
var configs = [defaults]
var configFiles = []
function addConfigFile (file) {
if (configFiles.indexOf(file) >= 0) return
var fileConfig = cc.file(file)
if (fileConfig) {
configs.push(parse(fileConfig))
configFiles.push(file)
}
}
// which files do we look at?
if (!win)
[join(etc, name, 'config'),
join(etc, name + 'rc')].forEach(addConfigFile)
if (home)
[join(home, '.config', name, 'config'),
join(home, '.config', name),
join(home, '.' + name, 'config'),
join(home, '.' + name + 'rc')].forEach(addConfigFile)
addConfigFile(cc.find('.'+name+'rc'))
if (env.config) addConfigFile(env.config)
if (argv.config) addConfigFile(argv.config)
return deepExtend.apply(null, configs.concat([
env,
argv,
configFiles.length ? {configs: configFiles, config: configFiles[configFiles.length - 1]} : undefined,
]))
}
@@ -0,0 +1,98 @@
{
"name": "neostandard",
"version": "0.12.2",
"description": "A modern successor to standard",
"homepage": "http://github.com/neostandard/neostandard",
"repository": {
"type": "git",
"url": "git://github.com/neostandard/neostandard.git"
},
"keywords": [],
"license": "MIT",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"bin": {
"neostandard": "cli.mjs"
},
"main": "index.js",
"types": "index.d.ts",
"files": [
"/index.js",
"/index.d.ts",
"/index.d.ts.map",
"lib/**/*.js",
"lib/**/*.d.ts",
"lib/**/*.d.ts.map"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"build:0": "run-s clean",
"build:1-declaration": "tsc -p declaration.tsconfig.json",
"build": "run-s build:*",
"check-peer-compatibility": "NEOSTANDARD_PATH=`pwd` && cd $(mktemp -d -p $NEOSTANDARD_PATH install-test-XXXXXXXXXX) && npm init -y && npm install --no-legacy-peer-deps --package-lock-only --strict-peer-deps --install-links eslint $NEOSTANDARD_PATH",
"check:installed-check": "installed-check --engine-check --version-check -i list-dependents-cli",
"check:knip": "knip",
"check:lint": "eslint --report-unused-disable-directives .",
"check:tsc": "tsc",
"check:type-coverage": "type-coverage --detail --strict --at-least 95 --ignore-files 'test/*'",
"check": "run-s clean && run-p check:*",
"clean:declarations-lib": "rm -rf $(find lib -type f -name '*.d.ts*' ! -name '*-types.d.ts')",
"clean:declarations-top": "rm -rf $(find . -maxdepth 1 -type f -name '*.d.ts*')",
"clean": "run-p clean:*",
"dependents-filter-one": "list-dependents filter --max-count=250 --sort-download --max-age=550 --repository-prefix=https://github.com/ $LIST_DEPENDENTS_FILTER_ARGS",
"dependents-filter:neostandard": "npm run --silent dependents-filter-one -- -i dependents-data/source/neostandard.ndjson -o dependents-data/neostandard-filtered.ndjson --min-downloads=1000 --exclude $(jq -r 'keys | join(\" --exclude \")' dependents-data/known-failures/neostandard.json)",
"dependents-filter:semistandard": "npm run --silent dependents-filter-one -- -i dependents-data/source/semistandard.ndjson -o dependents-data/semistandard-filtered.ndjson --min-downloads=1000 --target-version='>=16.0.0' --exclude $(jq -r 'keys | join(\" --exclude \")' dependents-data/known-failures/semistandard.json)",
"dependents-filter:standard": "npm run --silent dependents-filter-one -- -i dependents-data/source/standard.ndjson -o dependents-data/standard-filtered.ndjson --min-downloads=75000 --target-version='>=17.0.0' --exclude $(jq -r 'keys | join(\" --exclude \")' dependents-data/known-failures/standard.json)",
"dependents-filter:ts-standard": "npm run --silent dependents-filter-one -- -i dependents-data/source/ts-standard.ndjson -o dependents-data/ts-standard-filtered.ndjson --min-downloads=1000 --exclude $(jq -r 'keys | join(\" --exclude \")' dependents-data/known-failures/ts-standard.json)",
"dependents-filter-simplify": "for PROJECT in $(jq -r 'join(\" \")' dependents-data/projects.json); do jq -s '[.[].repositoryUrl | sub(\"https://github.com/\";\"\";\"i\")] | unique | sort' \"dependents-data/$PROJECT-filtered.ndjson\" > \"dependents-data/$PROJECT.json\"; done",
"dependents-filter": "run-p dependents-filter:* && run-s dependents-filter-simplify",
"dependents-refresh-one": "cd dependents-data/source/ && list-dependents refresh --precision 3 --field engines -n",
"dependents-refresh:neostandard": "run-s --print-label \"dependents-refresh-one -- {@}\" -- neostandard",
"dependents-refresh:compatibility": "run-s --print-label \"dependents-refresh-one -- {%}\" -- $(jq -r 'join(\" \")' dependents-data/projects.json)",
"dependents-refresh": "run-s --silent dependents-refresh:*",
"dependents-update-one": "cd dependents-data/source/ && list-dependents list --precision 3 --field engines -n",
"dependents-update:neostandard": "run-s --print-label \"dependents-update-one -- {@}\" -- neostandard --include-historic",
"dependents-update:compatibility": "run-s --print-label \"dependents-update-one -- {%}\" -- $(jq -r 'join(\" \")' dependents-data/projects.json)",
"dependents-update": "run-s --silent dependents-update:*",
"prepare": "husky",
"prepublishOnly": "run-s build",
"sync-refresh": "LIST_DEPENDENTS_FILTER_ARGS='--no-additions' run-s dependents-refresh dependents-filter",
"sync-update-canary": "run-s dependents-update:neostandard dependents-filter:neostandard",
"sync-update": "run-s dependents-update:compatibility dependents-filter",
"test-ci": "run-s test:*",
"test:eslint": "eslint .",
"test:tseslint-extension": "eslint -c test/ts-extension-eslint.config.mjs test/test-types.d.ts",
"test": "run-s check test:*"
},
"devDependencies": {
"@types/node": "^18.19.113",
"@voxpelli/tsconfig": "^15.1.2",
"eslint": "^9.30.0",
"husky": "^9.1.7",
"installed-check": "^9.3.0",
"knip": "^5.61.3",
"list-dependents-cli": "^2.7.1",
"npm-run-all2": "^7.0.2",
"type-coverage": "^2.29.7",
"typescript": "~5.8.3"
},
"dependencies": {
"@humanwhocodes/gitignore-to-minimatch": "^1.0.2",
"@stylistic/eslint-plugin": "2.11.0",
"eslint-import-resolver-typescript": "^3.10.1",
"eslint-plugin-import-x": "^4.16.1",
"eslint-plugin-n": "^17.20.0",
"eslint-plugin-promise": "^7.2.1",
"eslint-plugin-react": "^7.37.5",
"find-up": "^5.0.0",
"globals": "^15.15.0",
"peowly": "^1.3.2",
"typescript-eslint": "^8.35.1"
},
"peerDependencies": {
"eslint": "^9.0.0"
}
}
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 inversify
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,52 @@
export function isSpace(source) {
return /^\s+$/.test(source);
}
export function hasCR(source) {
return /\r$/.test(source);
}
export function splitCR(source) {
const matches = source.match(/\r+$/);
return matches == null
? ['', source]
: [source.slice(-matches[0].length), source.slice(0, -matches[0].length)];
}
export function splitSpace(source) {
const matches = source.match(/^\s+/);
return matches == null
? ['', source]
: [source.slice(0, matches[0].length), source.slice(matches[0].length)];
}
export function splitLines(source) {
return source.split(/\n/);
}
export function seedBlock(block = {}) {
return Object.assign({ description: '', tags: [], source: [], problems: [] }, block);
}
export function seedSpec(spec = {}) {
return Object.assign({ tag: '', name: '', type: '', optional: false, description: '', problems: [], source: [] }, spec);
}
export function seedTokens(tokens = {}) {
return Object.assign({ start: '', delimiter: '', postDelimiter: '', tag: '', postTag: '', name: '', postName: '', type: '', postType: '', description: '', end: '', lineEnd: '' }, tokens);
}
/**
* Assures Block.tags[].source contains references to the Block.source items,
* using Block.source as a source of truth. This is a counterpart of rewireSpecs
* @param block parsed coments block
*/
export function rewireSource(block) {
const source = block.source.reduce((acc, line) => acc.set(line.number, line), new Map());
for (const spec of block.tags) {
spec.source = spec.source.map((line) => source.get(line.number));
}
return block;
}
/**
* Assures Block.source contains references to the Block.tags[].source items,
* using Block.tags[].source as a source of truth. This is a counterpart of rewireSource
* @param block parsed coments block
*/
export function rewireSpecs(block) {
const source = block.tags.reduce((acc, spec) => spec.source.reduce((acc, line) => acc.set(line.number, line), acc), new Map());
block.source = block.source.map((line) => source.get(line.number) || line);
return block;
}
@@ -0,0 +1,723 @@
export default `flf2a$ 7 6 20 -1 7
fatty.flf by Mike Rosulek. 1/12/95
Based on Bravo TrueType Font.
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $##
d8b $#
!Y88!$#
Y8Y $#
8 $#
e $#
"8" $#
$##
8 8$#
Y P$#
$#
$#
$#
$#
$##
dP dP$#
____dP__dP_$#
dP dP $#
__dP__dP___$#
dP dP $#
dP dP $#
$##
,d88~/\\$#
8888/ $#
\`Y88b $#
\`Y88b,$#
/8888$#
\\/_88P'$#
$##
,8~\\ /$#
"8_// $#
/ $#
/ $#
/,8~\\$#
/ "8_/$#
$##
,d8P\\ $#
888b | $#
\`Y88X $#
/Y88b/ $#
| \`Y88b $#
\\_/Y88b$#
$##
d88b$#
Y88P$#
__/ $#
$#
$#
$#
$##
,8P~$#
88 $#
88 $#
88 $#
88 $#
88 $#
"8b_$##
~Y8,$#
88$#
88$#
88$#
88$#
88$#
_d8"$##
, 8 ,$#
"8" $#
e" "e$#
$#
$#
$#
$##
$#
888 $#
__888__$#
888 $#
888 $#
$#
$##
$#
$#
$#
$#
d88b$#
Y88P$#
__/ $##
$#
$#
____$#
$#
$#
$#
$##
$#
$#
$#
$#
d88b$#
Y88P$#
$##
/$#
/ $#
/ $#
/ $#
/ $#
/ $#
/ $##
,88~~\\ $#
d888 \\ $#
88888 |$#
88888 |$#
Y888 / $#
\`88__/ $#
$##
,d$#
,d888$#
888$#
888$#
888$#
888$#
$##
/~~88b$#
| 888$#
\` d88P$#
d88P $#
d88P $#
d88P___$#
$##
_-~88e $#
888b$#
__888"$#
888e$#
888P$#
~-_88" $#
$##
d8 $#
d88 $#
d888 $#
/ 888 $#
/__888__$#
888 $#
$##
/~~~~~~$#
/ $#
\`-~~88e $#
/ 888b$#
| 888P$#
\\__88" $#
$##
e88~-_ $#
d888 $#
8888~~\\ $#
8888 |$#
Y888 |$#
"88__/ $#
$##
[~~~~d88P$#
d88P $#
d88P $#
d88P $#
d88P $#
d88P $#
$##
d8~~\\ $#
C88b |$#
Y88b/ $#
/Y88b $#
| Y88D$#
\\__8P $#
$##
/~~88e $#
| 888b$#
| 8888$#
\\__8888$#
888P$#
~-_88" $#
$##
$#
d88b$#
Y88P$#
$#
d88b$#
Y88P$#
$##
$#
d88b$#
Y88P$#
$#
d88b$#
Y88P$#
__/ $##
_-$#
_-~ $#
< $#
~-_ $#
~-$#
$#
$##
$#
______$#
$#
______$#
$#
$#
$##
-_ $#
~-_ $#
>$#
_-~ $#
-~ $#
$#
$##
_-~88e$#
/ 88"$#
\` 8P $#
\` $#
d88b $#
Y88P $#
$##
__---__ $#
/ \\ $#
| dP~dP |$#
| dP_d8b_/ $#
\\______ $#
$#
$##
e $#
d8b $#
/Y88b $#
/ Y88b $#
/____Y88b $#
/ Y88b$#
$##
888~~\\ $#
888 |$#
888 _/ $#
888 \\ $#
888 |$#
888__/ $#
$##
e88~-_ $#
d888 \\$#
8888 $#
8888 $#
Y888 /$#
"88_-~ $#
$##
888~-_ $#
888 \\ $#
888 |$#
888 |$#
888 / $#
888_-~ $#
$##
888~~ $#
888___$#
888 $#
888 $#
888 $#
888___$#
$##
888~~ $#
888___$#
888 $#
888 $#
888 $#
888 $#
$##
e88~~\\ $#
d888 $#
8888 __ $#
8888 |$#
Y888 |$#
"88__/ $#
$##
888 |$#
888___|$#
888 |$#
888 |$#
888 |$#
888 |$#
$##
888$#
888$#
888$#
888$#
888$#
888$#
$##
888$#
888$#
888$#
888$#
| 88P$#
\\__8" $#
$##
888 / $#
888 / $#
888/\\ $#
888 \\ $#
888 \\ $#
888 \\$#
$##
888 $#
888 $#
888 $#
888 $#
888 $#
888____$#
$##
e e $#
d8b d8b $#
d888bdY88b $#
/ Y88Y Y888b $#
/ YY Y888b $#
/ Y888b$#
$##
888b |$#
|Y88b |$#
| Y88b |$#
| Y88b |$#
| Y88b|$#
| Y888$#
$##
,88~-_ $#
d888 \\ $#
88888 |$#
88888 |$#
Y888 / $#
\`88_-~ $#
$##
888~-_ $#
888 \\ $#
888 |$#
888 / $#
888_-~ $#
888 $#
$##
,88~-_ $#
d888 \\ $#
88888 |$#
88888 |$#
Y888 \\ / $#
\`88__X $#
\\ $##
888~-_ $#
888 \\ $#
888 |$#
888 / $#
888_-~ $#
888 ~-_ $#
$##
,d88~~\\$#
8888 $#
\`Y88b $#
\`Y88b,$#
8888$#
\\__88P'$#
$##
~~~888~~~$#
888 $#
888 $#
888 $#
888 $#
888 $#
$##
888 |$#
888 |$#
888 |$#
888 |$#
Y88 |$#
"8__/ $#
$##
Y88b /$#
Y88b / $#
Y88b / $#
Y888/ $#
Y8/ $#
Y $#
$##
Y88b /$#
Y88b / $#
Y88b e / $#
Y88bd8b/ $#
Y88Y8Y $#
Y Y $#
$##
Y88b /$#
Y88b / $#
Y88b/ $#
/Y88b $#
/ Y88b $#
/ Y88b$#
$##
Y88b /$#
Y88b / $#
Y88b/ $#
Y8Y $#
Y $#
/ $#
$##
~~~~d88P$#
d88P $#
d88P $#
d88P $#
d88P $#
d88P____ $#
$##
88~~$#
88 $#
88 $#
88 $#
88 $#
88 $#
88__$##
\\ $#
\\ $#
\\ $#
\\ $#
\\ $#
\\$#
$##
~~88$#
88$#
88$#
88$#
88$#
88$#
__88$##
/\\ $#
/ \\$#
$#
$#
$#
$#
$##
$#
$#
$#
$#
$#
$#
----$##
Y8b $#
Y8b$#
$#
$#
$#
$#
$##
$#
/~~~8e $#
88b$#
e88~-888$#
C888 888$#
"88_-888$#
$##
888 $#
888-~88e $#
888 888b$#
888 8888$#
888 888P$#
888-_88" $#
$##
$#
e88~~\\$#
d888 $#
8888 $#
Y888 $#
"88__/$#
$##
888$#
e88~\\888$#
d888 888$#
8888 888$#
Y888 888$#
"88_/888$#
$##
$#
e88~~8e $#
d888 88b$#
8888__888$#
Y888 ,$#
"88___/ $#
$##
88~\\$#
_888__$#
888 $#
888 $#
888 $#
888 $#
$##
/$#
e88~88e$#
888 888$#
"88_88"$#
/ $#
Cb $#
Y8""8D$##
888 $#
888-~88e$#
888 888$#
888 888$#
888 888$#
888 888$#
$##
,e,$#
" $#
888$#
888$#
888$#
888$#
$##
,e,$#
" $#
888$#
888$#
888$#
88P$#
\\_8" $##
888 _ $#
888 e~ ~ $#
888d8b $#
888Y88b $#
888 Y88b $#
888 Y88b$#
$##
888$#
888$#
888$#
888$#
888$#
888$#
$##
$#
888-~88e-~88e$#
888 888 888$#
888 888 888$#
888 888 888$#
888 888 888$#
$##
$#
888-~88e$#
888 888$#
888 888$#
888 888$#
888 888$#
$##
$#
e88~-_ $#
d888 i$#
8888 |$#
Y888 '$#
"88_-~ $#
$##
$#
888-~88e $#
888 888b$#
888 8888$#
888 888P$#
888-_88" $#
888 $##
$#
e88~-888$#
d888 888$#
8888 888$#
Y888 888$#
"88_-888$#
888$##
$#
888-~\\$#
888 $#
888 $#
888 $#
888 $#
$##
$#
d88~\\$#
C888 $#
Y88b $#
888D$#
\\_88P $#
$##
d8 $#
_d88__$#
888 $#
888 $#
888 $#
"88_/$#
$##
$#
888 888$#
888 888$#
888 888$#
888 888$#
"88_-888$#
$##
$#
Y88b /$#
Y88b / $#
Y88b/ $#
Y8/ $#
Y $#
$##
$#
Y88b e /$#
Y88b d8b / $#
Y888/Y88b/ $#
Y8/ Y8/ $#
Y Y $#
$##
$#
Y88b / $#
Y88b/ $#
Y88b $#
/Y88b $#
/ Y88b$#
$##
$#
Y88b /$#
Y888/ $#
Y8/ $#
Y $#
/ $#
_/ $##
$#
~~~d88P$#
d88P $#
d88P $#
d88P $#
d88P___ $#
$##
e8~~$#
88 $#
8P $#
<K $#
8b $#
88 $#
"8__$##
|$#
|$#
|$#
|$#
|$#
|$#
|$##
~~8e $#
88 $#
Y8 $#
D>$#
d8 $#
88 $#
__8" $##
$#
$#
$#
/~\\_/$#
$#
$#
$##
e e e $#
"8" d8b "8"$#
/Y88b $#
/ Y88b $#
/____Y88b $#
/ Y88b$#
$##
e ,88~-_ e $#
"8"d888 \\"8"$#
88888 | $#
88888 | $#
Y888 / $#
\`88_-~ $#
$##
e 888 | e $#
"8"888 |"8"$#
888 | $#
888 | $#
Y88 | $#
"8__/ $#
$##
e e $#
"8"/~~~8e"8"$#
88b $#
e88~-888 $#
C888 888 $#
"88_-888 $#
$##
e e $#
"8"e88~-_"8"$#
d888 i $#
8888 | $#
Y888 ' $#
"88_-~ $#
$##
e e $#
"8"888 888"8"$#
888 888 $#
888 888 $#
888 888 $#
"88_-888 $#
$##
#
#
#
#
#
#
##
`
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C"},C:{"1":"0 1 2 3 4 5 vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC J ZB K D E F A B C L 0C 1C","33":"6 7 8 9 M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB"},D:{"1":"0 1 2 3 4 5 iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB K D E F A B C L M G","33":"8 9 AB BB CB DB EB FB bB cB dB eB fB gB hB","66":"6 7 N O P aB"},E:{"1":"B C L M G aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A 2C ZC 3C 4C 5C 6C"},F:{"1":"0 1 2 3 4 5 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F B C FD GD HD ID NC uC JD OC","33":"6 7 8 9 G N O P aB"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C NC uC OC","16":"H"},L:{"2":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"16":"PC"},P:{"2":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"16":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:2,C:"Pointer Lock API",D:true};
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Inspect JS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1 @@
{"name":"@react-stately/table","version":"3.15.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532126743,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/Cell.main.js":{"checkedAt":1794532126743,"integrity":"sha512-zqYT/ZhUQSulW8dn8a/MSuaBywEeNGARlHF+CLi+cFFC6V7x0fJgRoD2Uhr4Cnf9GChiRbkkS5YeS7ZOYtRWHw==","mode":420,"size":1601},"dist/Cell.module.js":{"checkedAt":1794532126743,"integrity":"sha512-BApsgWhMCEWa7kJ9B6B8FhB6KTj2kjZNnsTYOQZqNpU/2ZmQcbSTxsCXf6KJi2ZeqmNxWgGzbWb0uYahth7j3g==","mode":420,"size":1445},"dist/Column.main.js":{"checkedAt":1794532126743,"integrity":"sha512-mDa1g4/pXeTy2JQALUeE3Uk3XUThTJjgLPbb6Aqb2VFW1Ll/Q1VeTsp1uo3jfzMvtD31XqIOlxkgdERfS2PZ9g==","mode":420,"size":3242},"dist/Column.module.js":{"checkedAt":1794532126743,"integrity":"sha512-BVAnlB2RkTKnop/Qm9QtmRwwxfqwBoyQRx9eVtAbld2I1BVtDsiYQNsR7SjEfW9XCmUX/OVmVY+Z78euMLd6Dw==","mode":420,"size":2947},"dist/main.js":{"checkedAt":1794532126743,"integrity":"sha512-lT1SZr4ThJxO+Iy+sx2zyrDhI8jSPawxs5qNmk1JeYDYQ9/4bixo9qFP6bB4IjLGd3idDemJ3oOtBiPiYbE/3g==","mode":420,"size":2816},"dist/module.js":{"checkedAt":1794532126744,"integrity":"sha512-IqHRWgqkrRoZXWIlgxpM1vsorb/IYkrFTt+mqxABz8asHTVCbCgOeKhghXpdCfmlFIK9WMT8ch5TvOYfj5b+Xg==","mode":420,"size":2700},"dist/Row.main.js":{"checkedAt":1794532126744,"integrity":"sha512-GwJMZXH5n+d9N5ZQqQsBn1FONp2DJODoG6F4xvqG79BQvlENBTZUPNrBqgBUsLKb7XVEk31sx2yQ62YMB1XItA==","mode":420,"size":4873},"dist/Row.module.js":{"checkedAt":1794532126744,"integrity":"sha512-+bbEcvlMAQCe5BfkW8ZwG7eJqBKTq3dbrSNsh8eEoQZrMMGy5uKJ/tDyse/lHh4qOYetRnmP3ZMiBPwknmsSTw==","mode":420,"size":4604},"dist/TableBody.main.js":{"checkedAt":1794532126744,"integrity":"sha512-2DHt2Co8T49px7paGWEGM/HmOVYYQCk9ollaue5kjTNK2J2lNPJX5l5r81WwK6jsbsgrySO75RGe1Wn2IkQmKw==","mode":420,"size":2383},"dist/TableBody.module.js":{"checkedAt":1794532126744,"integrity":"sha512-SUZxh/KCgrG7Go+gPBqYqUF5AsmaKLrjTcAqGV5keflJHeoRVVZLKd3iVTeuJLDLAfwVAauZ/L4X0InlpKeiog==","mode":420,"size":2114},"dist/TableCollection.main.js":{"checkedAt":1794532126744,"integrity":"sha512-CrQNdaOcncpQ2IeCsbduBRsA1fiU4AtNeAWvtTSmgnzzGU9Lor7aLoA0ZB/KL3USPiSq9lsYhmZYXE775nUs+A==","mode":420,"size":12718},"dist/TableCollection.module.js":{"checkedAt":1794532126744,"integrity":"sha512-N/bgeXbj1l0YR5GJYCT02wOSF109JtJ56qrguRaSw80JF20iyinGgQHx3a7zQcK33NKRSWYkoFLfbrn9Ku4Tow==","mode":420,"size":12513},"dist/TableColumnLayout.main.js":{"checkedAt":1794532126744,"integrity":"sha512-Gxh9rVt7XHKgaRcPuU62QcK14gMa4rBD5vnY5rwGB+l5woj64tZ0zguPo7shCBJUdInN/ojLw0NrE1iAcfe1yQ==","mode":420,"size":6368},"dist/TableColumnLayout.module.js":{"checkedAt":1794532126745,"integrity":"sha512-27K6JJZZaYdkxE69CN/fQX1b9f3EoFAMdhZskWyZqO5PhaGtJwSSE4v/T7RAAWzVRM159VtpVZXJeFIwzqIl0Q==","mode":420,"size":6372},"dist/TableHeader.main.js":{"checkedAt":1794532126745,"integrity":"sha512-lWpVXdtWf8kJT+c0oJMD/GivJK5K/mCbgpwUkCrM2SR3+a4FUTULyMBccKmnb8PfE2rl2LGP8zQQqbQhNXGZQQ==","mode":420,"size":2268},"dist/TableHeader.module.js":{"checkedAt":1794532126745,"integrity":"sha512-7RVCfIHD9Tb0Wk4o/jfSMPqGRRKQNLwr5mjYjnoh8vn9xJ84y7aR2gN2CK/muTGrE4DZgnuQ03KOC/t4it0Euw==","mode":420,"size":1999},"dist/TableUtils.main.js":{"checkedAt":1794532126745,"integrity":"sha512-vFoS/laZSmEoXYHTp5+/UR9Oo2ECuFU93q4dZCNmHmnVGLvgbp2qeBvpVuwQsOJWsrY+fHeW+qKabw2jsW9eSg==","mode":420,"size":8637},"dist/TableUtils.module.js":{"checkedAt":1794532126745,"integrity":"sha512-6l8UIFF3+H2wSAUVb2RX/3F1DR5gITV8xABYJas+4XIdYUN/xAV4aK4xE8LT44Pq/Zqn482R4YucQOeHgSQTsg==","mode":420,"size":8589},"dist/useTableColumnResizeState.main.js":{"checkedAt":1794532126745,"integrity":"sha512-k0S9AYoGYK0Y3k7TCX0HSEQP8lPRICqpsj2DgcqewBAc/sscTCnC3vxKWFPVq4Apa6eLVHodegNaSR20Z0bHCg==","mode":420,"size":4703},"dist/useTableColumnResizeState.module.js":{"checkedAt":1794532126746,"integrity":"sha512-xhOr1DMXIBNoRpWiYswnYu7PGfn+lDsl0oeG4wiULW7eYkqj/2JKYJgV42Zb7y7Ar48S7fwZTdoBvGMbTvwcoQ==","mode":420,"size":4593},"dist/useTableState.main.js":{"checkedAt":1794532126746,"integrity":"sha512-9XLVxPQddTZvgYbG5A3vlEQ54cKoZYTtzl3nVTRODJBhN6wFvF7eZx68txUoLj+b4bC9hHAu0JZuIcsy+gSeMA==","mode":420,"size":4212},"dist/useTableState.module.js":{"checkedAt":1794532126746,"integrity":"sha512-WgY4i4BSO9b4dfi5u+hU8hVjmc/i906n+KUTpt7XqyNJaCUaAS+SDeosdvulX0+2dr43nZR5Ri1S4enkpyRW6Q==","mode":420,"size":4082},"dist/useTreeGridState.main.js":{"checkedAt":1794532126746,"integrity":"sha512-IMKvBMXB99x5SyPIt1Dsug2gK8it9tHWAQFBgb23yI61iHFohy9NCpyZi4M9naUc/VVGkwKN6xxuvtonIED/ag==","mode":420,"size":8942},"dist/useTreeGridState.module.js":{"checkedAt":1794532126746,"integrity":"sha512-bGq9dp+pImPCmQ7dBxebx7sbB/AM4JLyrjZ5JZ+l2Qh6oCZXYLtnKlhq+jIqigi/cK18M1NmkFMTg4d/Kzxy+Q==","mode":420,"size":8832},"package.json":{"checkedAt":1794532126746,"integrity":"sha512-nBUMxI4JJY9vBXwlxd3tAEtHnUghXCam81q8DXuSc4/Lx0SRRoMW0Bo3SlUzUAb4fj5LhjawzYF8eG2S1aJdZA==","mode":420,"size":1171},"dist/Cell.main.js.map":{"checkedAt":179Line truncated
@@ -0,0 +1,200 @@
# mdast-util-phrasing
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
[mdast][] utility to check if a node is phrasing content.
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`phrasing(value)`](#phrasingvalue)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package is a tiny utility to check that a given [node][] is [phrasing
content][phrasing].
## When should I use this?
This utility is typically useful if you’re making other utilities.
It uses [`unist-util-is`][unist-util-is], which you can use for your own checks.
A different utility, [`hast-util-phrasing`][hast-util-phrasing], does the same
but on [hast][].
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install mdast-util-phrasing
```
In Deno with [`esm.sh`][esmsh]:
```js
import {phrasing} from 'https://esm.sh/mdast-util-phrasing@4'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {phrasing} from 'https://esm.sh/mdast-util-phrasing@4?bundle'
</script>
```
## Use
```js
import {phrasing} from 'mdast-util-phrasing'
phrasing({type: 'paragraph', children: [{type: 'text', value: 'Alpha'}]})
// => false
phrasing({type: 'strong', children: [{type: 'text', value: 'Delta'}]})
// => true
```
## API
This package exports the identifier [`phrasing`][api-phrasing].
There is no default export.
### `phrasing(value)`
Check if the given value is *[phrasing content][phrasing]*.
> 👉 **Note**: Excludes `html`, which can be both phrasing or flow.
###### Parameters
* `value` (`unknown`)
— thing to check, typically [`Node`][node]
###### Returns
Whether `value` is phrasing content (`boolean`).
## Types
This package is fully typed with [TypeScript][].
It does not export extra types.
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, `mdast-util-phrasing@^4`,
compatible with Node.js 16.
## Security
Use of `mdast-util-phrasing` does not involve **[hast][]**, user content, or
change the tree, so there are no openings for [cross-site scripting (XSS)][xss]
attacks.
## Related
* [`hast-util-phrasing`](https://github.com/syntax-tree/hast-util-phrasing)
— check if a hast node is phrasing content
* [`unist-util-is`](https://github.com/syntax-tree/unist-util-is)
— check if a node passes a test
## Contribute
See [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for
ways to get started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.
## License
[MIT][license] © [Victor Felder][author]
<!-- Definitions -->
[build-badge]: https://github.com/syntax-tree/mdast-util-phrasing/workflows/main/badge.svg
[build]: https://github.com/syntax-tree/mdast-util-phrasing/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-phrasing.svg
[coverage]: https://codecov.io/github/syntax-tree/mdast-util-phrasing
[downloads-badge]: https://img.shields.io/npm/dm/mdast-util-phrasing.svg
[downloads]: https://www.npmjs.com/package/mdast-util-phrasing
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-phrasing
[size]: https://bundlejs.com/?q=mdast-util-phrasing
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[collective]: https://opencollective.com/unified
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/syntax-tree/unist/discussions
[npm]: https://docs.npmjs.com/cli/install
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
[typescript]: https://www.typescriptlang.org
[license]: license
[author]: https://draft.li
[health]: https://github.com/syntax-tree/.github
[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md
[support]: https://github.com/syntax-tree/.github/blob/main/support.md
[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting
[hast]: https://github.com/syntax-tree/hast
[mdast]: https://github.com/syntax-tree/mdast
[node]: https://github.com/syntax-tree/mdast#nodes
[phrasing]: https://github.com/syntax-tree/mdast#phrasingcontent
[unist-util-is]: https://github.com/syntax-tree/unist-util-is
[hast-util-phrasing]: https://github.com/syntax-tree/hast-util-phrasing
[api-phrasing]: #phrasingvalue
@@ -0,0 +1,41 @@
// src/eye.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var EyeIcon = (props) => /* @__PURE__ */ jsxs(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 20 20",
width: "1em",
...props,
children: [
/* @__PURE__ */ jsx(
"path",
{
d: "M12.9833 10C12.9833 11.65 11.65 12.9833 10 12.9833C8.35 12.9833 7.01666 11.65 7.01666 10C7.01666 8.35 8.35 7.01666 10 7.01666C11.65 7.01666 12.9833 8.35 12.9833 10Z",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M9.99999 16.8916C12.9417 16.8916 15.6833 15.1583 17.5917 12.1583C18.3417 10.9833 18.3417 9.00831 17.5917 7.83331C15.6833 4.83331 12.9417 3.09998 9.99999 3.09998C7.05833 3.09998 4.31666 4.83331 2.40833 7.83331C1.65833 9.00831 1.65833 10.9833 2.40833 12.1583C4.31666 15.1583 7.05833 16.8916 9.99999 16.8916Z",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5
}
)
]
}
);
export {
EyeIcon
};
@@ -0,0 +1,28 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = awaitify;
// conditionally promisify a function.
// only return a promise if a callback is omitted
function awaitify(asyncFn, arity) {
if (!arity) arity = asyncFn.length;
if (!arity) throw new Error('arity is undefined');
function awaitable(...args) {
if (typeof args[arity - 1] === 'function') {
return asyncFn.apply(this, args);
}
return new Promise((resolve, reject) => {
args[arity - 1] = (err, ...cbArgs) => {
if (err) return reject(err);
resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
};
asyncFn.apply(this, args);
});
}
return awaitable;
}
module.exports = exports.default;
@@ -0,0 +1 @@
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["paragraph.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AACH,gCANW,SAAS,KACT,OAAO,GAAG,SAAS,SACnB,KAAK,QACL,IAAI,GACF,MAAM,CASlB;+BAjBoC,OAAO;6BAAP,OAAO;2BADd,wBAAwB;0BAAxB,wBAAwB"}
@@ -0,0 +1,6 @@
export * from './capitalize';
export * from './intrinsic-from-mapped-key';
export * from './intrinsic';
export * from './lowercase';
export * from './uncapitalize';
export * from './uppercase';
@@ -0,0 +1,18 @@
import getTag from './_getTag.js';
import isObjectLike from './isObjectLike.js';
/** `Object#toString` result references. */
var setTag = '[object Set]';
/**
* The base implementation of `_.isSet` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
*/
function baseIsSet(value) {
return isObjectLike(value) && getTag(value) == setTag;
}
export default baseIsSet;
@@ -0,0 +1,12 @@
import { ToObject } from './262';
/**
* https://tc39.es/ecma402/#sec-coerceoptionstoobject
* @param options
* @returns
*/
export function CoerceOptionsToObject(options) {
if (typeof options === 'undefined') {
return Object.create(null);
}
return ToObject(options);
}
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from '../types.js';
import 'react';
declare const PlusFilledIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { PlusFilledIcon };
@@ -0,0 +1,7 @@
"use client";
import {
useListbox
} from "./chunk-JEEKNW4E.mjs";
export {
useListbox
};
@@ -0,0 +1,775 @@
import type * as checks from "./checks.js";
import type { $ZodConfig } from "./core.js";
import type * as errors from "./errors.js";
import type * as schemas from "./schemas.js";
// json
export type JSONType = string | number | boolean | null | JSONType[] | { [key: string]: JSONType };
export type JWTAlgorithm =
| "HS256"
| "HS384"
| "HS512"
| "RS256"
| "RS384"
| "RS512"
| "ES256"
| "ES384"
| "ES512"
| "PS256"
| "PS384"
| "PS512"
| "EdDSA"
| (string & {});
export type IPVersion = "v4" | "v6";
export type MimeTypes =
| "application/json"
| "application/xml"
| "application/x-www-form-urlencoded"
| "application/javascript"
| "application/pdf"
| "application/zip"
| "application/vnd.ms-excel"
| "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
| "application/msword"
| "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
| "application/vnd.ms-powerpoint"
| "application/vnd.openxmlformats-officedocument.presentationml.presentation"
| "application/octet-stream"
| "application/graphql"
| "text/html"
| "text/plain"
| "text/css"
| "text/javascript"
| "text/csv"
| "image/png"
| "image/jpeg"
| "image/gif"
| "image/svg+xml"
| "image/webp"
| "audio/mpeg"
| "audio/ogg"
| "audio/wav"
| "audio/webm"
| "video/mp4"
| "video/webm"
| "video/ogg"
| "font/woff"
| "font/woff2"
| "font/ttf"
| "font/otf"
| "multipart/form-data"
| (string & {});
export type ParsedTypes =
| "string"
| "number"
| "bigint"
| "boolean"
| "symbol"
| "undefined"
| "object"
| "function"
| "file"
| "date"
| "array"
| "map"
| "set"
| "nan"
| "null"
| "promise";
// utils
export type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
export type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? false : true;
export type AssertExtends<T, U> = T extends U ? T : never;
export type IsAny<T> = 0 extends 1 & T ? true : false;
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
export type MakePartial<T, K extends keyof T> = Omit<T, K> & InexactPartial<Pick<T, K>>;
export type MakeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
export type NoUndefined<T> = T extends undefined ? never : T;
export type Whatever = {} | undefined | null;
export type LoosePartial<T extends object> = InexactPartial<T> & {
[k: string]: unknown;
};
export type Mask<Keys extends PropertyKey> = { [K in Keys]?: true };
export type Writeable<T> = { -readonly [P in keyof T]: T[P] } & {};
export type InexactPartial<T> = {
[P in keyof T]?: T[P] | undefined;
};
export type EmptyObject = Record<string, never>;
export type BuiltIn =
| (((...args: any[]) => any) | (new (...args: any[]) => any))
| { readonly [Symbol.toStringTag]: string }
| Date
| Error
| Generator
| Promise<unknown>
| RegExp;
export type MakeReadonly<T> = T extends Map<infer K, infer V>
? ReadonlyMap<K, V>
: T extends Set<infer V>
? ReadonlySet<V>
: T extends [infer Head, ...infer Tail]
? readonly [Head, ...Tail]
: T extends Array<infer V>
? ReadonlyArray<V>
: T extends BuiltIn
? T
: Readonly<T>;
export type SomeObject = Record<PropertyKey, any>;
export type Identity<T> = T;
export type Flatten<T> = Identity<{ [k in keyof T]: T[k] }>;
export type Mapped<T> = { [k in keyof T]: T[k] };
export type Prettify<T> = {
[K in keyof T]: T[K];
} & {};
export type NoNeverKeys<T> = {
[k in keyof T]: [T[k]] extends [never] ? never : k;
}[keyof T];
export type NoNever<T> = Identity<{
[k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never;
}>;
export type Extend<A extends SomeObject, B extends SomeObject> = Flatten<
// fast path when there is no keys overlap
keyof A & keyof B extends never
? A & B
: {
[K in keyof A as K extends keyof B ? never : K]: A[K];
} & {
[K in keyof B]: B[K];
}
>;
export type TupleItems = ReadonlyArray<schemas.SomeType>;
export type AnyFunc = (...args: any[]) => any;
export type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;
export type MaybeAsync<T> = T | Promise<T>;
export type KeyOf<T> = keyof OmitIndexSignature<T>;
export type OmitIndexSignature<T> = {
[K in keyof T as string extends K ? never : K extends string ? K : never]: T[K];
};
export type ExtractIndexSignature<T> = {
[K in keyof T as string extends K ? K : K extends string ? never : K]: T[K];
};
export type Keys<T extends object> = keyof OmitIndexSignature<T>;
export type SchemaClass<T extends schemas.SomeType> = {
new (def: T["_zod"]["def"]): T;
};
export type EnumValue = string | number; // | bigint | boolean | symbol;
export type EnumLike = Readonly<Record<string, EnumValue>>;
export type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k }>;
export type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;
export type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;
export type Literal = string | number | bigint | boolean | null | undefined;
export type LiteralArray = Array<Literal>;
export type Primitive = string | number | symbol | bigint | boolean | null | undefined;
export type PrimitiveArray = Array<Primitive>;
export type HasSize = { size: number };
export type HasLength = { length: number }; // string | Array<unknown> | Set<unknown> | File;
export type Numeric = number | bigint | Date;
export type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;
export type SafeParseSuccess<T> = { success: true; data: T; error?: never };
export type SafeParseError<T> = {
success: false;
data?: never;
error: errors.$ZodError<T>;
};
export type PropValues = Record<string, Set<Primitive>>;
export type PrimitiveSet = Set<Primitive>;
// functions
export function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B> {
return val;
}
export function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B> {
return val;
}
export function assertIs<T>(_arg: T): void {}
export function assertNever(_x: never): never {
throw new Error();
}
export function assert<T>(_: any): asserts _ is T {}
export function getEnumValues(entries: EnumLike): EnumValue[] {
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
const values = Object.entries(entries)
.filter(([k, _]) => numericValues.indexOf(+k) === -1)
.map(([_, v]) => v);
return values;
}
export function joinValues<T extends Primitive[]>(array: T, separator = "|"): string {
return array.map((val) => stringifyPrimitive(val)).join(separator);
}
export function jsonStringifyReplacer(_: string, value: any): any {
if (typeof value === "bigint") return value.toString();
return value;
}
export function cached<T>(getter: () => T): { value: T } {
const set = false;
return {
get value() {
if (!set) {
const value = getter();
Object.defineProperty(this, "value", { value });
return value;
}
throw new Error("cached value already set");
},
};
}
export function nullish(input: any): boolean {
return input === null || input === undefined;
}
export function cleanRegex(source: string): string {
const start = source.startsWith("^") ? 1 : 0;
const end = source.endsWith("$") ? source.length - 1 : source.length;
return source.slice(start, end);
}
export function floatSafeRemainder(val: number, step: number): number {
const valDecCount = (val.toString().split(".")[1] || "").length;
const stepDecCount = (step.toString().split(".")[1] || "").length;
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
return (valInt % stepInt) / 10 ** decCount;
}
export function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void {
const set = false;
Object.defineProperty(object, key, {
get() {
if (!set) {
const value = getter();
object[key] = value;
return value;
}
throw new Error("cached value already set");
},
set(v) {
Object.defineProperty(object, key, {
value: v,
// configurable: true,
});
// object[key] = v;
},
configurable: true,
});
}
export function assignProp<T extends object, K extends PropertyKey>(
target: T,
prop: K,
value: K extends keyof T ? T[K] : any
): void {
Object.defineProperty(target, prop, {
value,
writable: true,
enumerable: true,
configurable: true,
});
}
export function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any {
if (!path) return obj;
return path.reduce((acc, key) => acc?.[key], obj);
}
export function promiseAllObject<T extends object>(promisesObj: T): Promise<{ [k in keyof T]: Awaited<T[k]> }> {
const keys = Object.keys(promisesObj);
const promises = keys.map((key) => (promisesObj as any)[key]);
return Promise.all(promises).then((results) => {
const resolvedObj: any = {};
for (let i = 0; i < keys.length; i++) {
resolvedObj[keys[i]!] = results[i];
}
return resolvedObj;
});
}
export function randomString(length = 10): string {
const chars = "abcdefghijklmnopqrstuvwxyz";
let str = "";
for (let i = 0; i < length; i++) {
str += chars[Math.floor(Math.random() * chars.length)];
}
return str;
}
export function esc(str: string): string {
return JSON.stringify(str);
}
export const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void = Error.captureStackTrace
? Error.captureStackTrace
: (..._args) => {};
export function isObject(data: any): data is Record<PropertyKey, unknown> {
return typeof data === "object" && data !== null && !Array.isArray(data);
}
export const allowsEval: { value: boolean } = cached(() => {
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
return false;
}
try {
const F = Function;
new F("");
return true;
} catch (_) {
return false;
}
});
export function isPlainObject(o: any): o is Record<PropertyKey, unknown> {
if (isObject(o) === false) return false;
// modified constructor
const ctor = o.constructor;
if (ctor === undefined) return true;
// modified prototype
const prot = ctor.prototype;
if (isObject(prot) === false) return false;
// ctor doesn't have static `isPrototypeOf`
if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
return false;
}
return true;
}
export function numKeys(data: any): number {
let keyCount = 0;
for (const key in data) {
if (Object.prototype.hasOwnProperty.call(data, key)) {
keyCount++;
}
}
return keyCount;
}
export const getParsedType = (data: any): ParsedTypes => {
const t = typeof data;
switch (t) {
case "undefined":
return "undefined";
case "string":
return "string";
case "number":
return Number.isNaN(data) ? "nan" : "number";
case "boolean":
return "boolean";
case "function":
return "function";
case "bigint":
return "bigint";
case "symbol":
return "symbol";
case "object":
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
return "promise";
}
if (typeof Map !== "undefined" && data instanceof Map) {
return "map";
}
if (typeof Set !== "undefined" && data instanceof Set) {
return "set";
}
if (typeof Date !== "undefined" && data instanceof Date) {
return "date";
}
if (typeof File !== "undefined" && data instanceof File) {
return "file";
}
return "object";
default:
throw new Error(`Unknown data type: ${t}`);
}
};
export const propertyKeyTypes: Set<string> = new Set(["string", "number", "symbol"]);
export const primitiveTypes: Set<string> = new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
export function escapeRegex(str: string): string {
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
// zod-specific utils
export function clone<T extends schemas.$ZodType>(inst: T, def?: T["_zod"]["def"], params?: { parent: boolean }): T {
const cl = new inst._zod.constr(def ?? inst._zod.def);
if (!def || params?.parent) cl._zod.parent = inst;
return cl as any;
}
export type EmptyToNever<T> = keyof T extends never ? never : T;
export type Normalize<T> = T extends undefined
? never
: T extends Record<any, any>
? Flatten<
{
[k in keyof Omit<T, "error" | "message">]: T[k];
} & ("error" extends keyof T
? {
error?: Exclude<T["error"], string>;
// path?: PropertyKey[] | undefined;
// message?: string | undefined;
}
: unknown)
>
: never;
export function normalizeParams<T>(_params: T): Normalize<T> {
const params: any = _params;
if (!params) return {} as any;
if (typeof params === "string") return { error: () => params } as any;
if (params?.message !== undefined) {
if (params?.error !== undefined) throw new Error("Cannot specify both `message` and `error` params");
params.error = params.message;
}
delete params.message;
if (typeof params.error === "string") return { ...params, error: () => params.error } as any;
return params;
}
export function createTransparentProxy<T extends object>(getter: () => T): T {
let target: T;
return new Proxy(
{},
{
get(_, prop, receiver) {
target ??= getter();
return Reflect.get(target, prop, receiver);
},
set(_, prop, value, receiver) {
target ??= getter();
return Reflect.set(target, prop, value, receiver);
},
has(_, prop) {
target ??= getter();
return Reflect.has(target, prop);
},
deleteProperty(_, prop) {
target ??= getter();
return Reflect.deleteProperty(target, prop);
},
ownKeys(_) {
target ??= getter();
return Reflect.ownKeys(target);
},
getOwnPropertyDescriptor(_, prop) {
target ??= getter();
return Reflect.getOwnPropertyDescriptor(target, prop);
},
defineProperty(_, prop, descriptor) {
target ??= getter();
return Reflect.defineProperty(target, prop, descriptor);
},
}
) as T;
}
export function stringifyPrimitive(value: any): string {
if (typeof value === "bigint") return value.toString() + "n";
if (typeof value === "string") return `"${value}"`;
return `${value}`;
}
export function optionalKeys(shape: schemas.$ZodShape): string[] {
return Object.keys(shape).filter((k) => {
return shape[k]!._zod.optin === "optional" && shape[k]!._zod.optout === "optional";
});
}
export type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;
export type ToCleanMap<T extends schemas.$ZodLooseShape> = {
[k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k;
};
export type FromCleanMap<T extends schemas.$ZodLooseShape> = {
[k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k;
};
export const NUMBER_FORMAT_RANGES: Record<checks.$ZodNumberFormats, [number, number]> = {
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
int32: [-2147483648, 2147483647],
uint32: [0, 4294967295],
float32: [-3.4028234663852886e38, 3.4028234663852886e38],
float64: [-Number.MAX_VALUE, Number.MAX_VALUE],
};
export const BIGINT_FORMAT_RANGES: Record<checks.$ZodBigIntFormats, [bigint, bigint]> = {
int64: [/* @__PURE__*/ BigInt("-9223372036854775808"), /* @__PURE__*/ BigInt("9223372036854775807")],
uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")],
};
export function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>): any {
const newShape: Writeable<schemas.$ZodShape> = {};
const currDef = schema._zod.def; //.shape;
for (const key in mask) {
if (!(key in currDef.shape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!mask[key]) continue;
// pick key
newShape[key] = currDef.shape[key]!;
}
return clone(schema, {
...schema._zod.def,
shape: newShape,
checks: [],
}) as any;
}
export function omit(schema: schemas.$ZodObject, mask: object): any {
const newShape: Writeable<schemas.$ZodShape> = { ...schema._zod.def.shape };
const currDef = schema._zod.def; //.shape;
for (const key in mask) {
if (!(key in currDef.shape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!(mask as any)[key]) continue;
delete newShape[key];
}
return clone(schema, {
...schema._zod.def,
shape: newShape,
checks: [],
});
}
export function extend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any {
if (!isPlainObject(shape)) {
throw new Error("Invalid input to extend: expected a plain object");
}
const def = {
...schema._zod.def,
get shape() {
const _shape = { ...schema._zod.def.shape, ...shape };
assignProp(this, "shape", _shape); // self-caching
return _shape;
},
checks: [], // delete existing checks
} as any;
return clone(schema, def) as any;
}
export function merge(a: schemas.$ZodObject, b: schemas.$ZodObject): any {
return clone(a, {
...a._zod.def,
get shape() {
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
assignProp(this, "shape", _shape); // self-caching
return _shape;
},
catchall: b._zod.def.catchall,
checks: [], // delete existing checks
}) as any;
}
export function partial(
Class: SchemaClass<schemas.$ZodOptional> | null,
schema: schemas.$ZodObject,
mask: object | undefined
): any {
const oldShape = schema._zod.def.shape;
const shape: Writeable<schemas.$ZodShape> = { ...oldShape };
if (mask) {
for (const key in mask) {
if (!(key in oldShape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!(mask as any)[key]) continue;
// if (oldShape[key]!._zod.optin === "optional") continue;
shape[key] = Class
? new Class({
type: "optional",
innerType: oldShape[key]!,
})
: oldShape[key]!;
}
} else {
for (const key in oldShape) {
// if (oldShape[key]!._zod.optin === "optional") continue;
shape[key] = Class
? new Class({
type: "optional",
innerType: oldShape[key]!,
})
: oldShape[key]!;
}
}
return clone(schema, {
...schema._zod.def,
shape,
checks: [],
}) as any;
}
export function required(
Class: SchemaClass<schemas.$ZodNonOptional>,
schema: schemas.$ZodObject,
mask: object | undefined
): any {
const oldShape = schema._zod.def.shape;
const shape: Writeable<schemas.$ZodShape> = { ...oldShape };
if (mask) {
for (const key in mask) {
if (!(key in shape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!(mask as any)[key]) continue;
// overwrite with non-optional
shape[key] = new Class({
type: "nonoptional",
innerType: oldShape[key]!,
});
}
} else {
for (const key in oldShape) {
// overwrite with non-optional
shape[key] = new Class({
type: "nonoptional",
innerType: oldShape[key]!,
});
}
}
return clone(schema, {
...schema._zod.def,
shape,
// optional: [],
checks: [],
}) as any;
}
export type Constructor<T, Def extends any[] = any[]> = new (...args: Def) => T;
export function aborted(x: schemas.ParsePayload, startIndex = 0): boolean {
for (let i = startIndex; i < x.issues.length; i++) {
if (x.issues[i]?.continue !== true) return true;
}
return false;
}
export function prefixIssues(path: PropertyKey, issues: errors.$ZodRawIssue[]): errors.$ZodRawIssue[] {
return issues.map((iss) => {
(iss as any).path ??= [];
(iss as any).path.unshift(path);
return iss;
});
}
export function unwrapMessage(message: string | { message: string } | undefined | null): string | undefined {
return typeof message === "string" ? message : message?.message;
}
export function finalizeIssue(
iss: errors.$ZodRawIssue,
ctx: schemas.ParseContextInternal | undefined,
config: $ZodConfig
): errors.$ZodIssue {
const full = { ...iss, path: iss.path ?? [] } as errors.$ZodIssue;
// for backwards compatibility
if (!iss.message) {
const message =
unwrapMessage(iss.inst?._zod.def?.error?.(iss as never)) ??
unwrapMessage(ctx?.error?.(iss as never)) ??
unwrapMessage(config.customError?.(iss)) ??
unwrapMessage(config.localeError?.(iss)) ??
"Invalid input";
(full as any).message = message;
}
// delete (full as any).def;
delete (full as any).inst;
delete (full as any).continue;
if (!ctx?.reportInput) {
delete (full as any).input;
}
return full;
}
export function getSizableOrigin(input: any): "set" | "map" | "file" | "unknown" {
if (input instanceof Set) return "set";
if (input instanceof Map) return "map";
if (input instanceof File) return "file";
return "unknown";
}
export function getLengthableOrigin(input: any): "array" | "string" | "unknown" {
if (Array.isArray(input)) return "array";
if (typeof input === "string") return "string";
return "unknown";
}
////////// REFINES //////////
export function issue(_iss: string, input: any, inst: any): errors.$ZodRawIssue;
export function issue(_iss: errors.$ZodRawIssue): errors.$ZodRawIssue;
export function issue(...args: [string | errors.$ZodRawIssue, any?, any?]): errors.$ZodRawIssue {
const [iss, input, inst] = args;
if (typeof iss === "string") {
return {
message: iss,
code: "custom",
input,
inst,
};
}
return { ...iss };
}
export function cleanEnum(obj: Record<string, EnumValue>): EnumValue[] {
return Object.entries(obj)
.filter(([k, _]) => {
// return true if NaN, meaning it's not a number, thus a string key
return Number.isNaN(Number.parseInt(k, 10));
})
.map((el) => el[1]);
}
// instanceof
export abstract class Class {
constructor(..._args: any[]) {}
}
@@ -0,0 +1,4 @@
import { PluginFunc } from 'dayjs/esm'
declare const plugin: PluginFunc
export = plugin
@@ -0,0 +1,308 @@
# Chokidar [![Weekly downloads](https://img.shields.io/npm/dw/chokidar.svg)](https://github.com/paulmillr/chokidar) [![Yearly downloads](https://img.shields.io/npm/dy/chokidar.svg)](https://github.com/paulmillr/chokidar)
> Minimal and efficient cross-platform file watching library
[![NPM](https://nodei.co/npm/chokidar.png)](https://www.npmjs.com/package/chokidar)
## Why?
Node.js `fs.watch`:
* Doesn't report filenames on MacOS.
* Doesn't report events at all when using editors like Sublime on MacOS.
* Often reports events twice.
* Emits most changes as `rename`.
* Does not provide an easy way to recursively watch file trees.
* Does not support recursive watching on Linux.
Node.js `fs.watchFile`:
* Almost as bad at event handling.
* Also does not provide any recursive watching.
* Results in high CPU utilization.
Chokidar resolves these problems.
Initially made for **[Brunch](https://brunch.io/)** (an ultra-swift web app build tool), it is now used in
[Microsoft's Visual Studio Code](https://github.com/microsoft/vscode),
[gulp](https://github.com/gulpjs/gulp/),
[karma](https://karma-runner.github.io/),
[PM2](https://github.com/Unitech/PM2),
[browserify](http://browserify.org/),
[webpack](https://webpack.github.io/),
[BrowserSync](https://www.browsersync.io/),
and [many others](https://www.npmjs.com/browse/depended/chokidar).
It has proven itself in production environments.
Version 3 is out! Check out our blog post about it: [Chokidar 3: How to save 32TB of traffic every week](https://paulmillr.com/posts/chokidar-3-save-32tb-of-traffic/)
## How?
Chokidar does still rely on the Node.js core `fs` module, but when using
`fs.watch` and `fs.watchFile` for watching, it normalizes the events it
receives, often checking for truth by getting file stats and/or dir contents.
On MacOS, chokidar by default uses a native extension exposing the Darwin
`FSEvents` API. This provides very efficient recursive watching compared with
implementations like `kqueue` available on most \*nix platforms. Chokidar still
does have to do some work to normalize the events received that way as well.
On most other platforms, the `fs.watch`-based implementation is the default, which
avoids polling and keeps CPU usage down. Be advised that chokidar will initiate
watchers recursively for everything within scope of the paths that have been
specified, so be judicious about not wasting system resources by watching much
more than needed.
## Getting started
Install with npm:
```sh
npm install chokidar
```
Then `require` and use it in your code:
```javascript
const chokidar = require('chokidar');
// One-liner for current directory
chokidar.watch('.').on('all', (event, path) => {
console.log(event, path);
});
```
## API
```javascript
// Example of a more typical implementation structure
// Initialize watcher.
const watcher = chokidar.watch('file, dir, glob, or array', {
ignored: /(^|[\/\\])\../, // ignore dotfiles
persistent: true
});
// Something to use when events are received.
const log = console.log.bind(console);
// Add event listeners.
watcher
.on('add', path => log(`File ${path} has been added`))
.on('change', path => log(`File ${path} has been changed`))
.on('unlink', path => log(`File ${path} has been removed`));
// More possible events.
watcher
.on('addDir', path => log(`Directory ${path} has been added`))
.on('unlinkDir', path => log(`Directory ${path} has been removed`))
.on('error', error => log(`Watcher error: ${error}`))
.on('ready', () => log('Initial scan complete. Ready for changes'))
.on('raw', (event, path, details) => { // internal
log('Raw event info:', event, path, details);
});
// 'add', 'addDir' and 'change' events also receive stat() results as second
// argument when available: https://nodejs.org/api/fs.html#fs_class_fs_stats
watcher.on('change', (path, stats) => {
if (stats) console.log(`File ${path} changed size to ${stats.size}`);
});
// Watch new files.
watcher.add('new-file');
watcher.add(['new-file-2', 'new-file-3', '**/other-file*']);
// Get list of actual paths being watched on the filesystem
var watchedPaths = watcher.getWatched();
// Un-watch some files.
await watcher.unwatch('new-file*');
// Stop watching.
// The method is async!
watcher.close().then(() => console.log('closed'));
// Full list of options. See below for descriptions.
// Do not use this example!
chokidar.watch('file', {
persistent: true,
ignored: '*.txt',
ignoreInitial: false,
followSymlinks: true,
cwd: '.',
disableGlobbing: false,
usePolling: false,
interval: 100,
binaryInterval: 300,
alwaysStat: false,
depth: 99,
awaitWriteFinish: {
stabilityThreshold: 2000,
pollInterval: 100
},
ignorePermissionErrors: false,
atomic: true // or a custom 'atomicity delay', in milliseconds (default 100)
});
```
`chokidar.watch(paths, [options])`
* `paths` (string or array of strings). Paths to files, dirs to be watched
recursively, or glob patterns.
- Note: globs must not contain windows separators (`\`),
because that's how they work by the standard —
you'll need to replace them with forward slashes (`/`).
- Note 2: for additional glob documentation, check out low-level
library: [picomatch](https://github.com/micromatch/picomatch).
* `options` (object) Options object as defined below:
#### Persistence
* `persistent` (default: `true`). Indicates whether the process
should continue to run as long as files are being watched. If set to
`false` when using `fsevents` to watch, no more events will be emitted
after `ready`, even if the process continues to run.
#### Path filtering
* `ignored` ([anymatch](https://github.com/es128/anymatch)-compatible definition)
Defines files/paths to be ignored. The whole relative or absolute path is
tested, not just filename. If a function with two arguments is provided, it
gets called twice per path - once with a single argument (the path), second
time with two arguments (the path and the
[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats)
object of that path).
* `ignoreInitial` (default: `false`). If set to `false` then `add`/`addDir` events are also emitted for matching paths while
instantiating the watching as chokidar discovers these file paths (before the `ready` event).
* `followSymlinks` (default: `true`). When `false`, only the
symlinks themselves will be watched for changes instead of following
the link references and bubbling events through the link's path.
* `cwd` (no default). The base directory from which watch `paths` are to be
derived. Paths emitted with events will be relative to this.
* `disableGlobbing` (default: `false`). If set to `true` then the strings passed to `.watch()` and `.add()` are treated as
literal path names, even if they look like globs.
#### Performance
* `usePolling` (default: `false`).
Whether to use fs.watchFile (backed by polling), or fs.watch. If polling
leads to high CPU utilization, consider setting this to `false`. It is
typically necessary to **set this to `true` to successfully watch files over
a network**, and it may be necessary to successfully watch files in other
non-standard situations. Setting to `true` explicitly on MacOS overrides the
`useFsEvents` default. You may also set the CHOKIDAR_USEPOLLING env variable
to true (1) or false (0) in order to override this option.
* _Polling-specific settings_ (effective when `usePolling: true`)
* `interval` (default: `100`). Interval of file system polling, in milliseconds. You may also
set the CHOKIDAR_INTERVAL env variable to override this option.
* `binaryInterval` (default: `300`). Interval of file system
polling for binary files.
([see list of binary extensions](https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json))
* `useFsEvents` (default: `true` on MacOS). Whether to use the
`fsevents` watching interface if available. When set to `true` explicitly
and `fsevents` is available this supercedes the `usePolling` setting. When
set to `false` on MacOS, `usePolling: true` becomes the default.
* `alwaysStat` (default: `false`). If relying upon the
[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats)
object that may get passed with `add`, `addDir`, and `change` events, set
this to `true` to ensure it is provided even in cases where it wasn't
already available from the underlying watch events.
* `depth` (default: `undefined`). If set, limits how many levels of
subdirectories will be traversed.
* `awaitWriteFinish` (default: `false`).
By default, the `add` event will fire when a file first appears on disk, before
the entire file has been written. Furthermore, in some cases some `change`
events will be emitted while the file is being written. In some cases,
especially when watching for large files there will be a need to wait for the
write operation to finish before responding to a file creation or modification.
Setting `awaitWriteFinish` to `true` (or a truthy value) will poll file size,
holding its `add` and `change` events until the size does not change for a
configurable amount of time. The appropriate duration setting is heavily
dependent on the OS and hardware. For accurate detection this parameter should
be relatively high, making file watching much less responsive.
Use with caution.
* *`options.awaitWriteFinish` can be set to an object in order to adjust
timing params:*
* `awaitWriteFinish.stabilityThreshold` (default: 2000). Amount of time in
milliseconds for a file size to remain constant before emitting its event.
* `awaitWriteFinish.pollInterval` (default: 100). File size polling interval, in milliseconds.
#### Errors
* `ignorePermissionErrors` (default: `false`). Indicates whether to watch files
that don't have read permissions if possible. If watching fails due to `EPERM`
or `EACCES` with this set to `true`, the errors will be suppressed silently.
* `atomic` (default: `true` if `useFsEvents` and `usePolling` are `false`).
Automatically filters out artifacts that occur when using editors that use
"atomic writes" instead of writing directly to the source file. If a file is
re-added within 100 ms of being deleted, Chokidar emits a `change` event
rather than `unlink` then `add`. If the default of 100 ms does not work well
for you, you can override it by setting `atomic` to a custom value, in
milliseconds.
### Methods & Events
`chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`:
* `.add(path / paths)`: Add files, directories, or glob patterns for tracking.
Takes an array of strings or just one string.
* `.on(event, callback)`: Listen for an FS event.
Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`,
`raw`, `error`.
Additionally `all` is available which gets emitted with the underlying event
name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully.
* `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns.
Takes an array of strings or just one string.
* `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise. Use with `await` to ensure bugs don't happen.
* `.getWatched()`: Returns an object representing all the paths on the file
system being watched by this `FSWatcher` instance. The object's keys are all the
directories (using absolute paths unless the `cwd` option was used), and the
values are arrays of the names of the items contained in each directory.
## CLI
If you need a CLI interface for your file watching, check out
[chokidar-cli](https://github.com/open-cli-tools/chokidar-cli), allowing you to
execute a command on each change, or get a stdio stream of change events.
## Install Troubleshooting
* `npm WARN optional dep failed, continuing fsevents@n.n.n`
* This message is normal part of how `npm` handles optional dependencies and is
not indicative of a problem. Even if accompanied by other related error messages,
Chokidar should function properly.
* `TypeError: fsevents is not a constructor`
* Update chokidar by doing `rm -rf node_modules package-lock.json yarn.lock && npm install`, or update your dependency that uses chokidar.
* Chokidar is producing `ENOSP` error on Linux, like this:
* `bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell`
`Error: watch /home/ ENOSPC`
* This means Chokidar ran out of file handles and you'll need to increase their count by executing the following command in Terminal:
`echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`
## Changelog
For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md).
- **v3.5 (Jan 6, 2021):** Support for ARM Macs with Apple Silicon. Fixes for deleted symlinks.
- **v3.4 (Apr 26, 2020):** Support for directory-based symlinks. Fixes for macos file replacement.
- **v3.3 (Nov 2, 2019):** `FSWatcher#close()` method became async. That fixes IO race conditions related to close method.
- **v3.2 (Oct 1, 2019):** Improve Linux RAM usage by 50%. Race condition fixes. Windows glob fixes. Improve stability by using tight range of dependency versions.
- **v3.1 (Sep 16, 2019):** dotfiles are no longer filtered out by default. Use `ignored` option if needed. Improve initial Linux scan time by 50%.
- **v3 (Apr 30, 2019):** massive CPU & RAM consumption improvements; reduces deps / package size by a factor of 17x and bumps Node.js requirement to v8.16 and higher.
- **v2 (Dec 29, 2017):** Globs are now posix-style-only; without windows support. Tons of bugfixes.
- **v1 (Apr 7, 2015):** Glob support, symlink support, tons of bugfixes. Node 0.8+ is supported
- **v0.1 (Apr 20, 2012):** Initial release, extracted from [Brunch](https://github.com/brunch/brunch/blob/9847a065aea300da99bd0753f90354cde9de1261/src/helpers.coffee#L66)
## Also
Why was chokidar named this way? What's the meaning behind it?
>Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four). This word is also used in other languages like Urdu as (چوکیدار) which is widely used in Pakistan and India.
## License
MIT (c) Paul Miller (<https://paulmillr.com>), see [LICENSE](LICENSE) file.
@@ -0,0 +1,236 @@
'use strict';
var identity = require('./nodes/identity.js');
const BREAK = Symbol('break visit');
const SKIP = Symbol('skip children');
const REMOVE = Symbol('remove node');
/**
* Apply a visitor to an AST node or document.
*
* Walks through the tree (depth-first) starting from `node`, calling a
* `visitor` function with three arguments:
* - `key`: For sequence values and map `Pair`, the node's index in the
* collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.
* `null` for the root node.
* - `node`: The current node.
* - `path`: The ancestry of the current node.
*
* The return value of the visitor may be used to control the traversal:
* - `undefined` (default): Do nothing and continue
* - `visit.SKIP`: Do not visit the children of this node, continue with next
* sibling
* - `visit.BREAK`: Terminate traversal completely
* - `visit.REMOVE`: Remove the current node, then continue with the next one
* - `Node`: Replace the current node, then continue by visiting it
* - `number`: While iterating the items of a sequence or map, set the index
* of the next step. This is useful especially if the index of the current
* node has changed.
*
* If `visitor` is a single function, it will be called with all values
* encountered in the tree, including e.g. `null` values. Alternatively,
* separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,
* `Alias` and `Scalar` node. To define the same visitor function for more than
* one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)
* and `Node` (alias, map, seq & scalar) targets. Of all these, only the most
* specific defined one will be used for each node.
*/
function visit(node, visitor) {
const visitor_ = initVisitor(visitor);
if (identity.isDocument(node)) {
const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));
if (cd === REMOVE)
node.contents = null;
}
else
visit_(null, node, visitor_, Object.freeze([]));
}
// Without the `as symbol` casts, TS declares these in the `visit`
// namespace using `var`, but then complains about that because
// `unique symbol` must be `const`.
/** Terminate visit traversal completely */
visit.BREAK = BREAK;
/** Do not visit the children of the current node */
visit.SKIP = SKIP;
/** Remove the current node */
visit.REMOVE = REMOVE;
function visit_(key, node, visitor, path) {
const ctrl = callVisitor(key, node, visitor, path);
if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
replaceNode(key, path, ctrl);
return visit_(key, ctrl, visitor, path);
}
if (typeof ctrl !== 'symbol') {
if (identity.isCollection(node)) {
path = Object.freeze(path.concat(node));
for (let i = 0; i < node.items.length; ++i) {
const ci = visit_(i, node.items[i], visitor, path);
if (typeof ci === 'number')
i = ci - 1;
else if (ci === BREAK)
return BREAK;
else if (ci === REMOVE) {
node.items.splice(i, 1);
i -= 1;
}
}
}
else if (identity.isPair(node)) {
path = Object.freeze(path.concat(node));
const ck = visit_('key', node.key, visitor, path);
if (ck === BREAK)
return BREAK;
else if (ck === REMOVE)
node.key = null;
const cv = visit_('value', node.value, visitor, path);
if (cv === BREAK)
return BREAK;
else if (cv === REMOVE)
node.value = null;
}
}
return ctrl;
}
/**
* Apply an async visitor to an AST node or document.
*
* Walks through the tree (depth-first) starting from `node`, calling a
* `visitor` function with three arguments:
* - `key`: For sequence values and map `Pair`, the node's index in the
* collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.
* `null` for the root node.
* - `node`: The current node.
* - `path`: The ancestry of the current node.
*
* The return value of the visitor may be used to control the traversal:
* - `Promise`: Must resolve to one of the following values
* - `undefined` (default): Do nothing and continue
* - `visit.SKIP`: Do not visit the children of this node, continue with next
* sibling
* - `visit.BREAK`: Terminate traversal completely
* - `visit.REMOVE`: Remove the current node, then continue with the next one
* - `Node`: Replace the current node, then continue by visiting it
* - `number`: While iterating the items of a sequence or map, set the index
* of the next step. This is useful especially if the index of the current
* node has changed.
*
* If `visitor` is a single function, it will be called with all values
* encountered in the tree, including e.g. `null` values. Alternatively,
* separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,
* `Alias` and `Scalar` node. To define the same visitor function for more than
* one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)
* and `Node` (alias, map, seq & scalar) targets. Of all these, only the most
* specific defined one will be used for each node.
*/
async function visitAsync(node, visitor) {
const visitor_ = initVisitor(visitor);
if (identity.isDocument(node)) {
const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));
if (cd === REMOVE)
node.contents = null;
}
else
await visitAsync_(null, node, visitor_, Object.freeze([]));
}
// Without the `as symbol` casts, TS declares these in the `visit`
// namespace using `var`, but then complains about that because
// `unique symbol` must be `const`.
/** Terminate visit traversal completely */
visitAsync.BREAK = BREAK;
/** Do not visit the children of the current node */
visitAsync.SKIP = SKIP;
/** Remove the current node */
visitAsync.REMOVE = REMOVE;
async function visitAsync_(key, node, visitor, path) {
const ctrl = await callVisitor(key, node, visitor, path);
if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
replaceNode(key, path, ctrl);
return visitAsync_(key, ctrl, visitor, path);
}
if (typeof ctrl !== 'symbol') {
if (identity.isCollection(node)) {
path = Object.freeze(path.concat(node));
for (let i = 0; i < node.items.length; ++i) {
const ci = await visitAsync_(i, node.items[i], visitor, path);
if (typeof ci === 'number')
i = ci - 1;
else if (ci === BREAK)
return BREAK;
else if (ci === REMOVE) {
node.items.splice(i, 1);
i -= 1;
}
}
}
else if (identity.isPair(node)) {
path = Object.freeze(path.concat(node));
const ck = await visitAsync_('key', node.key, visitor, path);
if (ck === BREAK)
return BREAK;
else if (ck === REMOVE)
node.key = null;
const cv = await visitAsync_('value', node.value, visitor, path);
if (cv === BREAK)
return BREAK;
else if (cv === REMOVE)
node.value = null;
}
}
return ctrl;
}
function initVisitor(visitor) {
if (typeof visitor === 'object' &&
(visitor.Collection || visitor.Node || visitor.Value)) {
return Object.assign({
Alias: visitor.Node,
Map: visitor.Node,
Scalar: visitor.Node,
Seq: visitor.Node
}, visitor.Value && {
Map: visitor.Value,
Scalar: visitor.Value,
Seq: visitor.Value
}, visitor.Collection && {
Map: visitor.Collection,
Seq: visitor.Collection
}, visitor);
}
return visitor;
}
function callVisitor(key, node, visitor, path) {
if (typeof visitor === 'function')
return visitor(key, node, path);
if (identity.isMap(node))
return visitor.Map?.(key, node, path);
if (identity.isSeq(node))
return visitor.Seq?.(key, node, path);
if (identity.isPair(node))
return visitor.Pair?.(key, node, path);
if (identity.isScalar(node))
return visitor.Scalar?.(key, node, path);
if (identity.isAlias(node))
return visitor.Alias?.(key, node, path);
return undefined;
}
function replaceNode(key, path, node) {
const parent = path[path.length - 1];
if (identity.isCollection(parent)) {
parent.items[key] = node;
}
else if (identity.isPair(parent)) {
if (key === 'key')
parent.key = node;
else
parent.value = node;
}
else if (identity.isDocument(parent)) {
parent.contents = node;
}
else {
const pt = identity.isAlias(parent) ? 'alias' : 'scalar';
throw new Error(`Cannot replace node with ${pt} parent`);
}
}
exports.visit = visit;
exports.visitAsync = visitAsync;
@@ -0,0 +1,52 @@
#!/usr/bin/env node
var which = require("../")
if (process.argv.length < 3)
usage()
function usage () {
console.error('usage: which [-as] program ...')
process.exit(1)
}
var all = false
var silent = false
var dashdash = false
var args = process.argv.slice(2).filter(function (arg) {
if (dashdash || !/^-/.test(arg))
return true
if (arg === '--') {
dashdash = true
return false
}
var flags = arg.substr(1).split('')
for (var f = 0; f < flags.length; f++) {
var flag = flags[f]
switch (flag) {
case 's':
silent = true
break
case 'a':
all = true
break
default:
console.error('which: illegal option -- ' + flag)
usage()
}
}
return false
})
process.exit(args.reduce(function (pv, current) {
try {
var f = which.sync(current, { all: all })
if (all)
f = f.join('\n')
if (!silent)
console.log(f)
return pv;
} catch (e) {
return 1;
}
}, 0))
@@ -0,0 +1,177 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MessageType = void 0;
const message_type_contract_1 = require("./message-type-contract");
const reflection_info_1 = require("./reflection-info");
const reflection_type_check_1 = require("./reflection-type-check");
const reflection_json_reader_1 = require("./reflection-json-reader");
const reflection_json_writer_1 = require("./reflection-json-writer");
const reflection_binary_reader_1 = require("./reflection-binary-reader");
const reflection_binary_writer_1 = require("./reflection-binary-writer");
const reflection_create_1 = require("./reflection-create");
const reflection_merge_partial_1 = require("./reflection-merge-partial");
const json_typings_1 = require("./json-typings");
const json_format_contract_1 = require("./json-format-contract");
const reflection_equals_1 = require("./reflection-equals");
const binary_writer_1 = require("./binary-writer");
const binary_reader_1 = require("./binary-reader");
const baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
const messageTypeDescriptor = baseDescriptors[message_type_contract_1.MESSAGE_TYPE] = {};
/**
* This standard message type provides reflection-based
* operations to work with a message.
*/
class MessageType {
constructor(name, fields, options) {
this.defaultCheckDepth = 16;
this.typeName = name;
this.fields = fields.map(reflection_info_1.normalizeFieldInfo);
this.options = options !== null && options !== void 0 ? options : {};
messageTypeDescriptor.value = this;
this.messagePrototype = Object.create(null, baseDescriptors);
this.refTypeCheck = new reflection_type_check_1.ReflectionTypeCheck(this);
this.refJsonReader = new reflection_json_reader_1.ReflectionJsonReader(this);
this.refJsonWriter = new reflection_json_writer_1.ReflectionJsonWriter(this);
this.refBinReader = new reflection_binary_reader_1.ReflectionBinaryReader(this);
this.refBinWriter = new reflection_binary_writer_1.ReflectionBinaryWriter(this);
}
create(value) {
let message = reflection_create_1.reflectionCreate(this);
if (value !== undefined) {
reflection_merge_partial_1.reflectionMergePartial(this, message, value);
}
return message;
}
/**
* Clone the message.
*
* Unknown fields are discarded.
*/
clone(message) {
let copy = this.create();
reflection_merge_partial_1.reflectionMergePartial(this, copy, message);
return copy;
}
/**
* Determines whether two message of the same type have the same field values.
* Checks for deep equality, traversing repeated fields, oneof groups, maps
* and messages recursively.
* Will also return true if both messages are `undefined`.
*/
equals(a, b) {
return reflection_equals_1.reflectionEquals(this, a, b);
}
/**
* Is the given value assignable to our message type
* and contains no [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?
*/
is(arg, depth = this.defaultCheckDepth) {
return this.refTypeCheck.is(arg, depth, false);
}
/**
* Is the given value assignable to our message type,
* regardless of [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?
*/
isAssignable(arg, depth = this.defaultCheckDepth) {
return this.refTypeCheck.is(arg, depth, true);
}
/**
* Copy partial data into the target message.
*/
mergePartial(target, source) {
reflection_merge_partial_1.reflectionMergePartial(this, target, source);
}
/**
* Create a new message from binary format.
*/
fromBinary(data, options) {
let opt = binary_reader_1.binaryReadOptions(options);
return this.internalBinaryRead(opt.readerFactory(data), data.byteLength, opt);
}
/**
* Read a new message from a JSON value.
*/
fromJson(json, options) {
return this.internalJsonRead(json, json_format_contract_1.jsonReadOptions(options));
}
/**
* Read a new message from a JSON string.
* This is equivalent to `T.fromJson(JSON.parse(json))`.
*/
fromJsonString(json, options) {
let value = JSON.parse(json);
return this.fromJson(value, options);
}
/**
* Write the message to canonical JSON value.
*/
toJson(message, options) {
return this.internalJsonWrite(message, json_format_contract_1.jsonWriteOptions(options));
}
/**
* Convert the message to canonical JSON string.
* This is equivalent to `JSON.stringify(T.toJson(t))`
*/
toJsonString(message, options) {
var _a;
let value = this.toJson(message, options);
return JSON.stringify(value, null, (_a = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a !== void 0 ? _a : 0);
}
/**
* Write the message to binary format.
*/
toBinary(message, options) {
let opt = binary_writer_1.binaryWriteOptions(options);
return this.internalBinaryWrite(message, opt.writerFactory(), opt).finish();
}
/**
* This is an internal method. If you just want to read a message from
* JSON, use `fromJson()` or `fromJsonString()`.
*
* Reads JSON value and merges the fields into the target
* according to protobuf rules. If the target is omitted,
* a new instance is created first.
*/
internalJsonRead(json, options, target) {
if (json !== null && typeof json == "object" && !Array.isArray(json)) {
let message = target !== null && target !== void 0 ? target : this.create();
this.refJsonReader.read(json, message, options);
return message;
}
throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json)}.`);
}
/**
* This is an internal method. If you just want to write a message
* to JSON, use `toJson()` or `toJsonString().
*
* Writes JSON value and returns it.
*/
internalJsonWrite(message, options) {
return this.refJsonWriter.write(message, options);
}
/**
* This is an internal method. If you just want to write a message
* in binary format, use `toBinary()`.
*
* Serializes the message in binary format and appends it to the given
* writer. Returns passed writer.
*/
internalBinaryWrite(message, writer, options) {
this.refBinWriter.write(message, writer, options);
return writer;
}
/**
* This is an internal method. If you just want to read a message from
* binary data, use `fromBinary()`.
*
* Reads data from binary format and merges the fields into
* the target according to protobuf rules. If the target is
* omitted, a new instance is created first.
*/
internalBinaryRead(reader, length, options, target) {
let message = target !== null && target !== void 0 ? target : this.create();
this.refBinReader.read(reader, message, options, length);
return message;
}
}
exports.MessageType = MessageType;
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC;AAWM,MAAM,4CAAwB,CAAA,GAAA,YAAI,EAAE,aAAa,CAAyB;IAAC,UAAU,KAAO;AAAC;AACpG,0CAAsB,WAAW,GAAG","sources":["packages/@react-aria/interactions/src/context.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\nimport {PressProps} from './usePress';\nimport React, {MutableRefObject} from 'react';\n\ninterface IPressResponderContext extends PressProps {\n register(): void,\n ref?: MutableRefObject<FocusableElement>\n}\n\nexport const PressResponderContext = React.createContext<IPressResponderContext>({register: () => {}});\nPressResponderContext.displayName = 'PressResponderContext';\n"],"names":[],"version":3,"file":"context.module.js.map"}
@@ -0,0 +1,5 @@
import type { Token } from "../parser/tokenizer";
/**
* Get all identifier names in the code, in order, including duplicates.
*/
export default function getIdentifierNames(code: string, tokens: Array<Token>): Array<string>;
@@ -0,0 +1,10 @@
class Module {
static DEFAULTS = {};
constructor(quill) {
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
this.quill = quill;
this.options = options;
}
}
export default Module;
//# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
{"name":"is-regex","version":"1.2.1","requiresBuild":false,"files":{".editorconfig":{"checkedAt":1794532096903,"integrity":"sha512-SjWjY/6RyeOjTiOB2vIL7fuS3zFfsaQlsDaJpw2RqxsqM19GX0kNAIlx6RxcgHNlBKkM1F3dO+NFX4ZVJTgE3A==","mode":420,"size":324},".eslintrc":{"checkedAt":1794532096903,"integrity":"sha512-pGaLr7k7/DEgQ+INVpBqpn4baM/FlkNNdNZ9Jw4FRh6bmqbaMlvao4GbwsrIdMiohgvizVJ4Ife0H/KE+SwxwA==","mode":420,"size":99},".nycrc":{"checkedAt":1794532096904,"integrity":"sha512-aLxN7EM7vuJGE3vcz8CsQow+RuaR3thZWTHupkykz/8WOXUd8ayX5goRxPe3MCnZ0VVDkuEk8UBkk3NodRfMOg==","mode":420,"size":159},"LICENSE":{"checkedAt":1794532096904,"integrity":"sha512-VAafw6n4N41XvAsR+n+iEdr0zTIENa8hymUUtLGRZtNAEzrKNuwlPdG/4XVTK8bgjhOLpy2sORJp/QqopRK+Yg==","mode":420,"size":1081},"index.js":{"checkedAt":1794532096904,"integrity":"sha512-Naq62znBFpNJYWaMBjs6x3AAuqTq7rU//Op4xtByZez/UOJ+oGGTq+2yGSS8r7d937yx1G69rA+L6aiom5QQyQ==","mode":420,"size":2221},"test/index.js":{"checkedAt":1794532096904,"integrity":"sha512-8+MohCEETIypD6mrmUTD060QmlE8TCpx5W8jGx27aEw5YMoQXOHVe4y0aw4VzxxfzO4Vp0FkpJHP8IJ3jpDD0A==","mode":420,"size":3542},"package.json":{"checkedAt":1794532096904,"integrity":"sha512-Yd4ZiFdYYXqRVaxtl92zfeCCy0u48QKuq9p8LO8+LCkE1jI7C9bbp1bsotK2epGXWUzTnkkUu+F2ejZ7/E/rLg==","mode":420,"size":2806},"tsconfig.json":{"checkedAt":1794532096905,"integrity":"sha512-G5TL2bnT395BqGez+9xQ1y3SLgDH02BmKrcCPi2ZqYX4R9bnh5r/5OndAzu60nrsK4zZ2iGgHtH1RKQ1ridK5g==","mode":420,"size":114},"CHANGELOG.md":{"checkedAt":1794532096905,"integrity":"sha512-kZcnroll3h5za6n5L3kjTTeg7sJ1ecf7c+zjAiW2dc+fqA+ynD7N8F+qe0Uz8zuytYJvEAAcG2d+wUwIJypXvg==","mode":420,"size":23471},"README.md":{"checkedAt":1794532096905,"integrity":"sha512-purSVT2RnHOcDGWsYkciXKWMHPTtl9kFTFYueJf/k+jiNPvJsgQyfjY+QPM3KyW+twSxbMtjbCnSipIMpAWcqQ==","mode":420,"size":1837},"index.d.ts":{"checkedAt":1794532096905,"integrity":"sha512-Ob9OtzbDqbDg+E8e/P6j1S0/NGdVUbKfdlVyqVr2k627UNxDWyck10mH+wPGmAIxp44Lszvx0+0m8I3VnrjcfA==","mode":420,"size":78}}}
@@ -0,0 +1,16 @@
var SubjectAlternativeName_1;
import { __decorate } from "tslib";
import { AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { GeneralNames } from "../general_names";
import { id_ce } from "../object_identifiers";
export const id_ce_subjectAltName = `${id_ce}.17`;
let SubjectAlternativeName = SubjectAlternativeName_1 = class SubjectAlternativeName extends GeneralNames {
constructor(items) {
super(items);
Object.setPrototypeOf(this, SubjectAlternativeName_1.prototype);
}
};
SubjectAlternativeName = SubjectAlternativeName_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], SubjectAlternativeName);
export { SubjectAlternativeName };
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var isAppleDevice = /(mac|iphone|ipod|ipad)/i.test(typeof navigator !== 'undefined' ? navigator === null || navigator === void 0 ? void 0 : navigator.platform : '');
var _default = exports["default"] = isAppleDevice;
@@ -0,0 +1,14 @@
'use strict';
var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
// https://262.ecma-international.org/12.0/#sec-tolength
module.exports = function ToLength(argument) {
var len = ToIntegerOrInfinity(argument);
if (len <= 0) { return 0; } // includes converting -0 to +0
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
return len;
};
@@ -0,0 +1 @@
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../src/utilities.ts"],"names":[],"mappings":";;;AAAA,IAAM,qBAAqB,GAAG,oBAAoB,CAAC;AACnD,IAAM,YAAY,GAAG,WAAW,CAAC;AACjC,IAAM,eAAe,GAAG,SAAS,CAAC;AAClC,IAAM,mBAAmB,GAAG,4BAA4B,CAAC;AACzD,IAAM,sBAAsB,GAAG,SAAS,CAAC;AAEzC;;GAEG;AACH,IAAM,aAAa,GAAG,UAAC,QAAgB;IACrC,OAAA,CAAC,QAAQ;QACT,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC9B,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC;AAFpC,CAEoC,CAAC;AAEvC;;GAEG;AACH,IAAM,UAAU,GAAG,UAAC,KAAa,EAAE,SAAiB;IAClD,OAAA,SAAS,CAAC,WAAW,EAAE;AAAvB,CAAuB,CAAC;AAE1B;;GAEG;AACH,IAAM,UAAU,GAAG,UAAC,KAAa,EAAE,MAAc,IAAK,OAAA,UAAG,MAAM,MAAG,EAAZ,CAAY,CAAC;AASnE;;GAEG;AACI,IAAM,SAAS,GAAG,UAAC,QAAgB,EAAE,OAA8B;IAA9B,wBAAA,EAAA,YAA8B;IACxE,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAElC,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACxB,gDAAgD;QAChD,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;IAClE,CAAC;SAAM,CAAC;QACN,yEAAyE;QACzE,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,QAAQ,CAAC,OAAO,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AACpD,CAAC,CAAC;AAhBW,QAAA,SAAS,aAgBpB"}
@@ -0,0 +1,59 @@
{
"name": "code-points",
"version": "2.0.0-1",
"description": "Get the code points of each character in the string",
"main": "dist/code-points-cjs.js",
"files": [
"dist/code-points-cjs.js"
],
"scripts": {
"test": "gulp test",
"coverage": "istanbul cover test.js",
"coveralls": "${npm_package_scripts_coverage} && istanbul-coveralls"
},
"author": "Shinnosuke Watanabe (https://github.com/shinnn)",
"repository": "shinnn/code-points.js",
"license": "MIT",
"keywords": [
"code",
"point",
"code-point",
"string",
"char",
"character",
"unicode",
"utf16",
"utf-16",
"codepointat",
"surrogate",
"plane"
],
"dependencies": {
"code-point": "^1.0.1"
},
"devDependencies": {
"gulp": "^3.8.11",
"gulp-footer": "^1.0.5",
"gulp-header": "^1.2.2",
"gulp-jscs": "^1.6.0",
"gulp-jshint": "^1.11.0",
"gulp-jsonlint": "^1.0.1",
"gulp-load-plugins": "^0.10.0",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.3",
"istanbul": "^0.3.14",
"istanbul-coveralls": "^1.0.2",
"jshint-stylish": "^2.0.0",
"merge-stream": "^0.1.7",
"rimraf": "^2.3.4",
"tape": "^4.0.0",
"tiny-npm-license": "^1.0.0",
"to-camel-case": "^0.2.1"
},
"jscsConfig": {
"preset": "google",
"maximumLineLength": 98,
"requireBlocksOnNewline": true,
"validateLineBreaks": "LF"
}
}
@@ -0,0 +1,22 @@
const { dirname, resolve } = require('path');
const { readdir, stat } = require('fs');
const { promisify } = require('util');
const toStats = promisify(stat);
const toRead = promisify(readdir);
module.exports = async function (start, callback) {
let dir = resolve('.', start);
let tmp, stats = await toStats(dir);
if (!stats.isDirectory()) {
dir = dirname(dir);
}
while (true) {
tmp = await callback(dir, await toRead(dir));
if (tmp) return resolve(dir, tmp);
dir = dirname(tmp = dir);
if (tmp === dir) break;
}
}
@@ -0,0 +1,74 @@
# pump
pump is a small node module that pipes streams together and destroys all of them if one of them closes.
```
npm install pump
```
[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
## What problem does it solve?
When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
You are also not able to provide a callback to tell when then pipe has finished.
pump does these two things for you
## Usage
Simply pass the streams you want to pipe together to pump and add an optional callback
``` js
var pump = require('pump')
var fs = require('fs')
var source = fs.createReadStream('/dev/random')
var dest = fs.createWriteStream('/dev/null')
pump(source, dest, function(err) {
console.log('pipe finished', err)
})
setTimeout(function() {
dest.destroy() // when dest is closed pump will destroy source
}, 1000)
```
You can use pump to pipe more than two streams together as well
``` js
var transform = someTransformStream()
pump(source, transform, anotherTransform, dest, function(err) {
console.log('pipe finished', err)
})
```
If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
Similarly to `stream.pipe()`, `pump()` returns the last stream passed in, so you can do:
```
return pump(s1, s2) // returns s2
```
Note that `pump` attaches error handlers to the streams to do internal error handling, so if `s2` emits an
error in the above scenario, it will not trigger a `proccess.on('uncaughtException')` if you do not listen for it.
If you want to return a stream that combines *both* s1 and s2 to a single stream use
[pumpify](https://github.com/mafintosh/pumpify) instead.
## License
MIT
## Related
`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
## For enterprise
Available as part of the Tidelift Subscription.
The maintainers of pump and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-pump?utm_source=npm-pump&utm_medium=referral&utm_campaign=enterprise)
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var MenuListOptionRole = {
relatedConcepts: [],
type: 'widget'
};
var _default = MenuListOptionRole;
exports.default = _default;
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
/**
* @file 字体粗细度量
* @author mengke01(kekee000@gmail.com)
*/
var _default = exports.default = {
100: 'Ultra-light',
200: 'Extra-light',
300: 'Light',
400: 'Semi-light',
500: 'Medium (normal)',
600: 'Semi-bold',
700: 'Bold',
800: 'Extra-Bold',
900: 'Ultra-bold'
};
@@ -0,0 +1,22 @@
import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js";
function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (it) return (it = it.call(o)).next.bind(it);
// Fallback for engines without symbol support
if (Array.isArray(o) || (it = _unsupported_iterable_to_array(o)) || allowArrayLike && o && typeof o.length === "number") {
if (it) o = it;
var i = 0;
return function() {
if (i >= o.length) return { done: true };
return { done: false, value: o[i++] };
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
export { _create_for_of_iterator_helper_loose as _ };
@@ -0,0 +1,158 @@
/**
* @fileoverview Rule to disallow unused labels.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow unused labels",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-unused-labels",
},
schema: [],
fixable: "code",
messages: {
unused: "'{{name}}:' is defined but never used.",
},
},
create(context) {
const sourceCode = context.sourceCode;
let scopeInfo = null;
/**
* Adds a scope info to the stack.
* @param {ASTNode} node A node to add. This is a LabeledStatement.
* @returns {void}
*/
function enterLabeledScope(node) {
scopeInfo = {
label: node.label.name,
used: false,
upper: scopeInfo,
};
}
/**
* Checks if a `LabeledStatement` node is fixable.
* For a node to be fixable, there must be no comments between the label and the body.
* Furthermore, is must be possible to remove the label without turning the body statement into a
* directive after other fixes are applied.
* @param {ASTNode} node The node to evaluate.
* @returns {boolean} Whether or not the node is fixable.
*/
function isFixable(node) {
/*
* Only perform a fix if there are no comments between the label and the body. This will be the case
* when there is exactly one token/comment (the ":") between the label and the body.
*/
if (
sourceCode.getTokenAfter(node.label, {
includeComments: true,
}) !==
sourceCode.getTokenBefore(node.body, { includeComments: true })
) {
return false;
}
// Looking for the node's deepest ancestor which is not a `LabeledStatement`.
let ancestor = node.parent;
while (ancestor.type === "LabeledStatement") {
ancestor = ancestor.parent;
}
if (
ancestor.type === "Program" ||
(ancestor.type === "BlockStatement" &&
astUtils.isFunction(ancestor.parent))
) {
const { body } = node;
if (
body.type === "ExpressionStatement" &&
((body.expression.type === "Literal" &&
typeof body.expression.value === "string") ||
astUtils.isStaticTemplateLiteral(body.expression))
) {
return false; // potential directive
}
}
return true;
}
/**
* Removes the top of the stack.
* At the same time, this reports the label if it's never used.
* @param {ASTNode} node A node to report. This is a LabeledStatement.
* @returns {void}
*/
function exitLabeledScope(node) {
if (!scopeInfo.used) {
context.report({
node: node.label,
messageId: "unused",
data: node.label,
fix: isFixable(node)
? fixer =>
fixer.removeRange([
node.range[0],
node.body.range[0],
])
: null,
});
}
scopeInfo = scopeInfo.upper;
}
/**
* Marks the label of a given node as used.
* @param {ASTNode} node A node to mark. This is a BreakStatement or
* ContinueStatement.
* @returns {void}
*/
function markAsUsed(node) {
if (!node.label) {
return;
}
const label = node.label.name;
let info = scopeInfo;
while (info) {
if (info.label === label) {
info.used = true;
break;
}
info = info.upper;
}
}
return {
LabeledStatement: enterLabeledScope,
"LabeledStatement:exit": exitLabeledScope,
BreakStatement: markAsUsed,
ContinueStatement: markAsUsed,
};
},
};
@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "parseGlob", {
enumerable: true,
get: function() {
return parseGlob;
}
});
const _globparent = /*#__PURE__*/ _interop_require_default(require("glob-parent"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function parseGlob(pattern) {
let glob = pattern;
let base = (0, _globparent.default)(pattern);
if (base !== ".") {
glob = pattern.substr(base.length);
if (glob.charAt(0) === "/") {
glob = glob.substr(1);
}
}
if (glob.substr(0, 2) === "./") {
glob = glob.substr(2);
} else if (glob.charAt(0) === "/") {
glob = glob.substr(1);
}
return {
base,
glob
};
}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"K D E F wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC J ZB K D E F 0C 1C","33":"A B C L M G N O"},D:{"1":"0 1 2 3 4 5 eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB K D E F A B C L","33":"6 7 8 9 M G N O P aB AB BB CB DB EB FB bB cB dB"},E:{"1":"D E F A B C L M G 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K 2C ZC 3C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z OC","2":"F B C FD GD HD ID NC uC JD","33":"G N O P aB"},G:{"1":"E ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC LD MD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC","33":"mD nD"},J:{"1":"A","2":"D"},K:{"1":"H OC","2":"A B C NC uC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD","33":"J"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:2,C:"Page Visibility",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"PlanParamsOperationsManager.js","sourceRoot":"","sources":["../../../../src/container/services/PlanParamsOperationsManager.ts"],"names":[],"mappings":";;;AAAA,4CAK2B;AAI3B,MAAa,2BAA2B;IACtB,oBAAoB,CAAuB;IAClD,wBAAwB,CAA0B;IAE3D,YAAY,uBAAgD;QAC1D,IAAI,CAAC,wBAAwB,GAAG,uBAAuB,CAAC;QAExD,IAAI,CAAC,oBAAoB,GAAG;YAC1B,WAAW,EAAE,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAChE,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAC7C;YACD,kBAAkB,EAChB,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAC1D,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAC7C;YACH,gBAAgB,EAAhB,uBAAgB;YAChB,OAAO,EAAE,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,CAAC,GAAG,CAAC,IAAI,CACpE,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,CACrD;YACD,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;YACvC,uBAAuB,EACrB,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,IAAI,CAC/E,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,CACrD;YACH,OAAO,EAAE,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,CAAC,GAAG,CAAC,IAAI,CACpE,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,CACrD;SACF,CAAC;QAEF,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,GAAG,EAAE;YACzC,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,wBAAwB;QACtB,IAAI,CAAC,oBAAoB,CAAC,WAAW;YACnC,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CACnD,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAC7C,CAAC;QACJ,IAAI,CAAC,oBAAoB,CAAC,kBAAkB;YAC1C,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAC1D,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAC7C,CAAC;QACJ,IAAI,CAAC,oBAAoB,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC;IAED,WAAW,CAAC,OAAgB;QAC1B,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC1D,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,CAAC,wBAAwB,CAC3E;YACE,OAAO,EAAE,OAA2B;YACpC,IAAI,EAAE,mCAA4B,CAAC,YAAY;YAC/C,UAAU,EAAE,IAAI,CAAC,oBAAoB;SACtC,CACF,CAAC;IACJ,CAAC;CACF;AAxDD,kEAwDC"}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('uniqWith', require('../uniqWith'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,12 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { Referencer } from './Referencer';
import { Visitor } from './Visitor';
export declare class ImportVisitor extends Visitor {
#private;
constructor(declaration: TSESTree.ImportDeclaration, referencer: Referencer);
static visit(referencer: Referencer, declaration: TSESTree.ImportDeclaration): void;
protected ImportDefaultSpecifier(node: TSESTree.ImportDefaultSpecifier): void;
protected ImportNamespaceSpecifier(node: TSESTree.ImportNamespaceSpecifier): void;
protected ImportSpecifier(node: TSESTree.ImportSpecifier): void;
protected visitImport(id: TSESTree.Identifier, specifier: TSESTree.ImportDefaultSpecifier | TSESTree.ImportNamespaceSpecifier | TSESTree.ImportSpecifier): void;
}
@@ -0,0 +1,9 @@
<svg viewbox="0 0 18 18">
<g class="ql-fill ql-stroke ql-thin ql-transparent">
<rect height="3" rx="0.5" ry="0.5" width="7" x="4.5" y="2.5"></rect>
<rect height="3" rx="0.5" ry="0.5" width="7" x="4.5" y="12.5"></rect>
</g>
<rect class="ql-fill ql-stroke ql-thin" height="3" rx="0.5" ry="0.5" width="7" x="8.5" y="7.5"></rect>
<line class="ql-stroke ql-thin" x1="6.5" x2="3.5" y1="7.5" y2="10.5"></line>
<line class="ql-stroke ql-thin" x1="3.5" x2="6.5" y1="7.5" y2="10.5"></line>
</svg>

After

Width:  |  Height:  |  Size: 504 B

@@ -0,0 +1,105 @@
/**
* WARNING: This entrypoint is only available starting with `react-dom@18.0.0-rc.1`
*/
// See https://github.com/facebook/react/blob/main/packages/react-dom/client.js to see how the exports are declared,
import React = require("react");
export {};
declare const REACT_FORM_STATE_SIGIL: unique symbol;
export interface ReactFormState {
[REACT_FORM_STATE_SIGIL]: never;
}
export interface HydrationOptions {
formState?: ReactFormState | null;
/**
* Prefix for `useId`.
*/
identifierPrefix?: string;
onUncaughtError?:
| ((error: unknown, errorInfo: { componentStack?: string | undefined }) => void)
| undefined;
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void;
onCaughtError?:
| ((
error: unknown,
errorInfo: {
componentStack?: string | undefined;
errorBoundary?: React.Component<unknown> | undefined;
},
) => void)
| undefined;
}
export interface RootOptions {
/**
* Prefix for `useId`.
*/
identifierPrefix?: string;
onUncaughtError?:
| ((error: unknown, errorInfo: { componentStack?: string | undefined }) => void)
| undefined;
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void;
onCaughtError?:
| ((
error: unknown,
errorInfo: {
componentStack?: string | undefined;
errorBoundary?: React.Component<unknown> | undefined;
},
) => void)
| undefined;
}
export interface ErrorInfo {
componentStack?: string;
}
export interface Root {
render(children: React.ReactNode): void;
unmount(): void;
}
/**
* Different release channels declare additional types of ReactNode this particular release channel accepts.
* App or library types should never augment this interface.
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS {}
export type Container =
| Element
| DocumentFragment
| Document
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS[
keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS
];
/**
* createRoot lets you create a root to display React components inside a browser DOM node.
*
* @see {@link https://react.dev/reference/react-dom/client/createRoot API Reference for `createRoot`}
*/
export function createRoot(container: Container, options?: RootOptions): Root;
/**
* Same as `createRoot()`, but is used to hydrate a container whose HTML contents were rendered by ReactDOMServer.
*
* React will attempt to attach event listeners to the existing markup.
*
* **Example Usage**
*
* ```jsx
* hydrateRoot(document.querySelector('#root'), <App />)
* ```
*
* @see https://react.dev/reference/react-dom/client/hydrateRoot
*/
export function hydrateRoot(
container: Element | Document,
initialChildren: React.ReactNode,
options?: HydrationOptions,
): Root;
@@ -0,0 +1,40 @@
import { invariant } from '../utils';
import { CollapseNumberRange } from './CollapseNumberRange';
import { FormatApproximately } from './FormatApproximately';
import { FormatNumeric } from './FormatNumeric';
import { PartitionNumberPattern } from './PartitionNumberPattern';
/**
* https://tc39.es/ecma402/#sec-partitionnumberrangepattern
*/
export function PartitionNumberRangePattern(numberFormat, x, y, _a) {
var getInternalSlots = _a.getInternalSlots;
// 1. Assert: x and y are both mathematical values.
invariant(!x.isNaN() && !y.isNaN(), 'Input must be a number', RangeError);
var internalSlots = getInternalSlots(numberFormat);
// 3. Let xResult be ? PartitionNumberPattern(numberFormat, x).
var xResult = PartitionNumberPattern(internalSlots, x);
// 4. Let yResult be ? PartitionNumberPattern(numberFormat, y).
var yResult = PartitionNumberPattern(internalSlots, y);
if (FormatNumeric(internalSlots, x) === FormatNumeric(internalSlots, y)) {
var appxResult = FormatApproximately(internalSlots, xResult);
appxResult.forEach(function (el) {
el.source = 'shared';
});
return appxResult;
}
var result = [];
xResult.forEach(function (el) {
el.source = 'startRange';
result.push(el);
});
// 9. Let symbols be internalSlots.[[dataLocaleData]].[[numbers]].[[symbols]][internalSlots.[[numberingSystem]]].
var rangeSeparator = internalSlots.dataLocaleData.numbers.symbols[internalSlots.numberingSystem]
.rangeSign;
result.push({ type: 'literal', value: rangeSeparator, source: 'shared' });
yResult.forEach(function (el) {
el.source = 'endRange';
result.push(el);
});
// 13. Return ? CollapseNumberRange(numberFormat, result).
return CollapseNumberRange(numberFormat, result, { getInternalSlots: getInternalSlots });
}
@@ -0,0 +1,20 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
/**
* @param {unknown} path
* @returns {string}
*/
module.exports = function stripImportPathParams(path) {
const pathString = String(path)
const index = pathString.indexOf("!")
if (index === -1) {
return pathString
}
return pathString.slice(0, index)
}
@@ -0,0 +1,43 @@
/**
* Copyright (c) 2017 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { Terminal, ITerminalAddon, IEvent } from '@xterm/xterm';
declare module '@xterm/addon-canvas' {
/**
* An xterm.js addon that provides search functionality.
*/
export class CanvasAddon implements ITerminalAddon {
public textureAtlas?: HTMLCanvasElement;
/**
* An event that is fired when the texture atlas of the renderer changes.
*/
public readonly onChangeTextureAtlas: IEvent<HTMLCanvasElement>;
/**
* An event that is fired when the a new page is added to the texture atlas.
*/
public readonly onAddTextureAtlasCanvas: IEvent<HTMLCanvasElement>;
constructor();
/**
* Activates the addon.
* @param terminal The terminal the addon is being loaded in.
*/
public activate(terminal: Terminal): void;
/**
* Disposes the addon.
*/
public dispose(): void;
/**
* Clears the terminal's texture atlas and triggers a redraw.
*/
public clearTextureAtlas(): void;
}
}
@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_calendar=t()}(this,(function(){"use strict";return function(e,t,a){var n="h:mm A",d={lastDay:"[Yesterday at] "+n,sameDay:"[Today at] "+n,nextDay:"[Tomorrow at] "+n,nextWeek:"dddd [at] "+n,lastWeek:"[Last] dddd [at] "+n,sameElse:"MM/DD/YYYY"};t.prototype.calendar=function(e,t){var n=t||this.$locale().calendar||d,o=a(e||void 0).startOf("d"),s=this.diff(o,"d",!0),i="sameElse",f=s<-6?i:s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":i,l=n[f]||d[f];return"function"==typeof l?l.call(this,a()):this.format(l)}}}));
@@ -0,0 +1,40 @@
/**
* @author Yosuke Ota <https://github.com/ota-meshi>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
docs: {
description: "disallow `#x in obj`.",
category: "ES2022",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-private-in.html",
},
fixable: null,
messages: {
forbidden:
"ES2022 private in (`#{{private}} in {{object}}`) is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"BinaryExpression[operator='in'] > PrivateIdentifier.left"(node) {
context.report({
node,
messageId: "forbidden",
data: {
private: node.name,
object:
node.parent.right.type === "Identifier"
? node.parent.right.name
: "object",
},
})
},
}
},
}
@@ -0,0 +1,3 @@
import type * as ts from 'typescript';
export declare function getTypeOfPropertyOfName(checker: ts.TypeChecker, type: ts.Type, name: string, escapedName?: ts.__String): ts.Type | undefined;
export declare function getTypeOfPropertyOfType(checker: ts.TypeChecker, type: ts.Type, property: ts.Symbol): ts.Type | undefined;
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,eAAe,CAAC,WAAW,CAAC;AAChD","sources":["packages/@react-aria/breadcrumbs/intl/en-US.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Breadcrumbs\"\n}\n"],"names":[],"version":3,"file":"en-US.module.js.map"}
@@ -0,0 +1,6 @@
<svg viewbox="0 0 18 18">
<circle class="ql-fill" cx="7" cy="7" r="1"></circle>
<circle class="ql-fill" cx="11" cy="7" r="1"></circle>
<path class="ql-stroke" d="M7,10a2,2,0,0,0,4,0H7Z"></path>
<circle class="ql-stroke" cx="9" cy="9" r="6"></circle>
</svg>

After

Width:  |  Height:  |  Size: 264 B

@@ -0,0 +1,735 @@
export default `flf2a$ 7 7 20 1 19
os2.flf (FIGlet font)
By Kent Nassen, knassen@umich.edu, 4/30/95.
Looks like some sigs are still good for a few figlet font ideas.
This one's rather simplistic, I guess, but interesting nonetheless.
Thought I'd make a figlet font out of it. Along the "lines" of bright,
relief, and contrast...
--Kent
Font design based on:
____oooo______ooooo________oo____ooooo_____________________________________
__oo____oo___oo___oo______oo___oo____oo___ Peter Kay, IT Institute, _
_oo______oo___oo_________oo__________oo___ Salford University, Salford. _
_oo______oo_____oo______oo__________oo____ Beginner OS/2 WPS programmer _
__oo____oo___oo___oo___oo_________oo______ P.J.Kay@iti.salford.ac.uk _
____oooo______ooooo___oo________oooooo_____________________________________
____@
____@
____@
____@
____@
____@
____@@
oo_@
oo_@
oo_@
oo_@
___@
oo_@
oo_@@
o_o_@
o_o_@
o_o_@
____@
____@
____@
____@@
__o_o___@
__o_o___@
ooo_ooo_@
__o_o___@
ooo_ooo_@
__o_o___@
__o_o___@@
_ooooo__@
oo_o_oo_@
_ooo____@
___oo___@
oo_o_oo_@
_ooooo__@
___o____@@
_o____oo_@
o_o__oo__@
_o__oo___@
___oo____@
__oo__o__@
_oo__o_o_@
oo____o__@@
___oo_____@
__oo_o____@
___oo_____@
_oo_oo____@
oo___oo_o_@
oo___ooo__@
_oooo__oo_@@
_oo_@
_oo_@
oo__@
____@
____@
____@
____@@
___oo_@
_oo___@
oo____@
oo____@
_oo___@
___oo_@
______@@
oo____@
__oo__@
___oo_@
___oo_@
__oo__@
oo____@
______@@
________@
o__o__o_@
_o_o_o__@
__ooo___@
_o_o_o__@
o__o__o_@
________@@
______@
__o___@
__o___@
ooooo_@
__o___@
__o___@
______@@
____@
____@
____@
____@
_oo_@
_oo_@
oo__@@
______@
______@
______@
ooooo_@
______@
______@
______@@
___@
___@
___@
___@
oo_@
oo_@
___@@
______oo_@
_____oo__@
____oo___@
___oo____@
__oo_____@
_oo______@
oo_______@@
___ooo_o__@
_oo___oo__@
oo___o_oo_@
oo__o__oo_@
_ooo__oo__@
__oooo____@
_o________@@
___oo__@
_oooo__@
___oo__@
___oo__@
___oo__@
_ooooo_@
_______@@
__ooooo__@
oo____oo_@
______oo_@
____ooo__@
__ooo____@
oooooooo_@
_________@@
__ooooo__@
oo____oo_@
______oo_@
____ooo__@
oo____oo_@
_oooooo__@
_________@@
_____ooo_@
___oo_oo_@
_oo___oo_@
oooooooo_@
______oo_@
______oo_@
_________@@
ooooooo__@
oo_______@
ooooooo__@
______oo_@
oo____oo_@
_oooooo__@
_________@@
_oooooo__@
oo_______@
ooooooo__@
oo____oo_@
oo____oo_@
_oooooo__@
_________@@
ooooooo_@
_____oo_@
____oo__@
___oo___@
__oo____@
_oo_____@
________@@
_oooooo__@
oo____oo_@
_oooooo__@
oo____oo_@
oo____oo_@
_oooooo__@
_________@@
_oooooo__@
oo____oo_@
oo____oo_@
_ooooooo_@
o_____oo_@
_oooooo__@
_________@@
___@
oo_@
oo_@
___@
oo_@
oo_@
___@@
____@
_oo_@
_oo_@
____@
_oo_@
_oo_@
oo__@@
___oo_@
__oo__@
_oo___@
oo____@
_oo___@
__oo__@
___oo_@@
_______@
_______@
oooooo_@
_______@
oooooo_@
_______@
_______@@
oo____@
_oo___@
__oo__@
___oo_@
__oo__@
_oo___@
oo____@@
_oooo__@
oo__oo_@
____oo_@
__ooo__@
__oo___@
_______@
__oo___@@
____ooooo__@
__oo_oo_oo_@
_oo_o__o_o_@
oo_o__oo_o_@
oo__oo_ooo_@
_oo________@
__oooooo___@@
___ooo____@
_oo___oo__@
oo_____oo_@
ooooooooo_@
oo_____oo_@
oo_____oo_@
__________@@
ooooooo__@
oo____oo_@
oooooooo_@
oo____oo_@
oo____oo_@
ooooooo__@
_________@@
___oooo___@
_oo____oo_@
oo________@
oo________@
_oo____oo_@
___oooo___@
__________@@
oooooo____@
oo____oo__@
oo_____oo_@
oo_____oo_@
oo____oo__@
oooooo____@
__________@@
ooooooo_@
oo______@
oooo____@
oo______@
oo______@
ooooooo_@
________@@
ooooooo_@
oo______@
oooo____@
oo______@
oo______@
oo______@
________@@
___oooo___@
_oo____oo_@
oo________@
oo____ooo_@
_oo____oo_@
___oooo___@
__________@@
oo____oo_@
oo____oo_@
oo____oo_@
oooooooo_@
oo____oo_@
oo____oo_@
_________@@
oooo_@
_oo__@
_oo__@
_oo__@
_oo__@
oooo_@
_____@@
_____ooo_@
______oo_@
______oo_@
oo____oo_@
oo____oo_@
_ooooo___@
_________@@
oo____oo_@
oo___oo__@
oo__oo___@
oooooo___@
oo___oo__@
oo____oo_@
_________@@
oo______@
oo______@
oo______@
oo______@
oo______@
ooooooo_@
________@@
ooo_____ooo_@
oooo___oooo_@
oo_oo_oo_oo_@
oo__ooo__oo_@
oo_______oo_@
oo_______oo_@
____________@@
ooo____oo_@
oooo___oo_@
oo_oo__oo_@
oo__oo_oo_@
oo___oooo_@
oo____ooo_@
__________@@
___oooo____@
_oo____oo__@
oo______oo_@
oo______oo_@
_oo____oo__@
___oooo____@
___________@@
ooooooo__@
oo____oo_@
oo____oo_@
oooooo___@
oo_______@
oo_______@
_________@@
___oooo____@
_oo____oo__@
oo______oo_@
oo___o__oo_@
_oo___ooo__@
___oooo_o__@
_________oo@@
ooooooo___@
oo____oo__@
oo____oo__@
ooooooo___@
oo____oo__@
oo_____oo_@
__________@@
_ooooo__@
oo___oo_@
_oo_____@
___oo___@
oo___oo_@
_ooooo__@
________@@
oooooooo_@
___oo____@
___oo____@
___oo____@
___oo____@
___oo____@
_________@@
oo______oo_@
oo______oo_@
oo______oo_@
oo______oo_@
_oo____oo__@
___oooo____@
___________@@
oo____oo_@
oo____oo_@
oo____oo_@
_oo__oo__@
__oooo___@
___oo____@
_________@@
oo____oo____oo_@
oo____oo____oo_@
oo____oo____oo_@
_oo__oooo__oo__@
__oooo__oooo___@
___oo____oo____@
_______________@@
oo_____oo_@
_oo___oo__@
__oo_oo___@
___ooo____@
__oo_oo___@
_oo___oo__@
__________@@
oo____oo_@
oo____oo_@
_oo__oo__@
___oo____@
___oo____@
___oo____@
_________@@
ooooooo_@
_____oo_@
____oo__@
___o____@
_oo_____@
ooooooo_@
________@@
ooo_@
oo__@
oo__@
oo__@
oo__@
oo__@
ooo_@@
oo______@
_oo_____@
__oo____@
___oo___@
____oo__@
_____oo_@
______oo@@
ooo_@
_oo_@
_oo_@
_oo_@
_oo_@
_oo_@
ooo_@@
__ooo___@
_oo_oo__@
oo___oo_@
________@
________@
________@
________@@
________@
________@
________@
________@
________@
oooooooo@
________@@
oo__@
oo__@
_oo_@
____@
____@
____@
____@@
________@
_ooooo__@
oo___oo_@
oo___oo_@
oo___oo_@
_oooo_o_@
________@@
oo______@
oooooo__@
oo___oo_@
oo___oo_@
oo___oo_@
oooooo__@
________@@
________@
_ooooo__@
oo___oo_@
oo______@
oo______@
_ooooo__@
________@@
_____oo_@
_oooooo_@
oo___oo_@
oo___oo_@
oo___oo_@
_oooooo_@
________@@
________@
_ooooo__@
oo____o_@
ooooooo_@
oo______@
_ooooo__@
________@@
__oooo_@
_oo____@
ooooo__@
oo_____@
oo_____@
oo_____@
_______@@
________@
_oooo___@
oo__oo__@
oo___o__@
_oooooo_@
o____oo_@
_ooooo__@@
oo______@
oo_ooo__@
ooo___o_@
oo____o_@
oo____o_@
oo____o_@
________@@
_oo__@
_____@
_oo__@
_oo__@
_oo__@
oooo_@
_____@@
_____oo_@
________@
_____oo_@
_____oo_@
oo___oo_@
_oo__oo_@
__oooo__@@
oo_____@
oo___o_@
oo__o__@
oooo___@
oo__o__@
oo___o_@
_______@@
ooo___@
_oo___@
_oo___@
_oo___@
_oo___@
ooooo_@
______@@
__________@
oo_oo_oo__@
ooo_oo__o_@
oo__oo__o_@
oo__oo__o_@
oo______o_@
__________@@
________@
oo_ooo__@
ooo___o_@
oo____o_@
oo____o_@
oo____o_@
________@@
________@
_ooooo__@
oo___oo_@
oo___oo_@
oo___oo_@
_ooooo__@
________@@
__________@
___ooooo__@
___o___oo_@
__oo___oo_@
__oo___oo_@
o_ooooo___@
oooo______@@
__________@
_ooooo____@
oo___o____@
oo___oo___@
oo___oo___@
__ooooo_o_@
_____oooo_@@
________@
oo_ooo__@
ooo___o_@
oo______@
oo______@
oo______@
________@@
_______@
_oooo__@
oo___o_@
__oo___@
o___oo_@
_oooo__@
_______@@
_oo____@
_oo____@
oooo___@
_oo____@
_oo__o_@
__ooo__@
_______@@
________@
oo____o_@
oo____o_@
oo____o_@
ooo___o_@
oo_ooo__@
________@@
________@
oo____o_@
oo____o_@
oo___o__@
_oo_o___@
__oo____@
________@@
___________@
oo_______o_@
oo__oo___o_@
oo__oo___o_@
_oo_oo__o__@
__oo__oo___@
___________@@
_______@
o____o_@
_oo_o__@
__oo___@
_o_oo__@
o___oo_@
_______@@
________@
_o___oo_@
_o___oo_@
_o___oo_@
__ooooo_@
o____oo_@
_ooooo__@@
_______@
oooooo_@
_____o_@
___oo__@
_oo____@
oooooo_@
_______@@
___oo_@
_oo___@
_o____@
oo____@
_o____@
_oo___@
___oo_@@
oo_@
oo_@
oo_@
oo_@
oo_@
oo_@
oo_@@
oo____@
__oo__@
___o__@
___oo_@
___o__@
__oo__@
oo____@@
___ooo____@
_oo__oo_o_@
oo____oo__@
__________@
__________@
__________@
__________@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,26 @@
import * as _heroui_system from '@heroui/system';
import { HTMLHeroUIProps } from '@heroui/system';
import { GridNode } from '@react-types/grid';
import { ValuesType } from './use-table.js';
import '@react-types/table';
import 'react';
import '@heroui/theme';
import '@react-stately/virtualizer';
import '@react-types/shared';
import '@react-stately/table';
import '@react-aria/table';
import '@heroui/react-utils';
import '@heroui/checkbox';
interface TableHeaderRowProps<T = object> extends HTMLHeroUIProps<"tr"> {
/**
* The table node to render.
*/
node: GridNode<T>;
slots: ValuesType["slots"];
state: ValuesType["state"];
classNames?: ValuesType["classNames"];
}
declare const TableHeaderRow: _heroui_system.InternalForwardRefRenderFunction<"tr", TableHeaderRowProps<object>, never>;
export { type TableHeaderRowProps, TableHeaderRow as default };
@@ -0,0 +1,147 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
interface Map<K, V> {
clear(): void;
/**
* @returns true if an element in the Map existed and has been removed, or false if the element does not exist.
*/
delete(key: K): boolean;
/**
* Executes a provided function once per each key/value pair in the Map, in insertion order.
*/
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
/**
* Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
* @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.
*/
get(key: K): V | undefined;
/**
* @returns boolean indicating whether an element with the specified key exists or not.
*/
has(key: K): boolean;
/**
* Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
*/
set(key: K, value: V): this;
/**
* @returns the number of elements in the Map.
*/
readonly size: number;
}
interface MapConstructor {
new (): Map<any, any>;
new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
readonly prototype: Map<any, any>;
}
declare var Map: MapConstructor;
interface ReadonlyMap<K, V> {
forEach(callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void, thisArg?: any): void;
get(key: K): V | undefined;
has(key: K): boolean;
readonly size: number;
}
interface WeakMap<K extends WeakKey, V> {
/**
* Removes the specified element from the WeakMap.
* @returns true if the element was successfully removed, or false if it was not present.
*/
delete(key: K): boolean;
/**
* @returns a specified element.
*/
get(key: K): V | undefined;
/**
* @returns a boolean indicating whether an element with the specified key exists or not.
*/
has(key: K): boolean;
/**
* Adds a new element with a specified key and value.
* @param key Must be an object or symbol.
*/
set(key: K, value: V): this;
}
interface WeakMapConstructor {
new <K extends WeakKey = WeakKey, V = any>(entries?: readonly (readonly [K, V])[] | null): WeakMap<K, V>;
readonly prototype: WeakMap<WeakKey, any>;
}
declare var WeakMap: WeakMapConstructor;
interface Set<T> {
/**
* Appends a new element with a specified value to the end of the Set.
*/
add(value: T): this;
clear(): void;
/**
* Removes a specified value from the Set.
* @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist.
*/
delete(value: T): boolean;
/**
* Executes a provided function once per each value in the Set object, in insertion order.
*/
forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
/**
* @returns a boolean indicating whether an element with the specified value exists in the Set or not.
*/
has(value: T): boolean;
/**
* @returns the number of (unique) elements in Set.
*/
readonly size: number;
}
interface SetConstructor {
new <T = any>(values?: readonly T[] | null): Set<T>;
readonly prototype: Set<any>;
}
declare var Set: SetConstructor;
interface ReadonlySet<T> {
forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any): void;
has(value: T): boolean;
readonly size: number;
}
interface WeakSet<T extends WeakKey> {
/**
* Appends a new value to the end of the WeakSet.
*/
add(value: T): this;
/**
* Removes the specified element from the WeakSet.
* @returns Returns true if the element existed and has been removed, or false if the element does not exist.
*/
delete(value: T): boolean;
/**
* @returns a boolean indicating whether a value exists in the WeakSet or not.
*/
has(value: T): boolean;
}
interface WeakSetConstructor {
new <T extends WeakKey = WeakKey>(values?: readonly T[] | null): WeakSet<T>;
readonly prototype: WeakSet<WeakKey>;
}
declare var WeakSet: WeakSetConstructor;
@@ -0,0 +1 @@
!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_zh_tw=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(_,e){return"W"===e?_+"週":_+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(_,e){var t=100*_+e;return t<600?"凌晨":t<900?"早上":t<1100?"上午":t<1300?"中午":t<1800?"下午":"晚上"}};return t.default.locale(d,null,!0),d}));
@@ -0,0 +1,41 @@
/*
* FlushWritable
* Copyright 2014 Tom Frost
*/
var EventEmitter = require('events').EventEmitter,
Writable = require('stream').Writable,
util = require('util');
/**
* FlushWritable is a drop-in replacement for stream.Writable that implements
* the Transform stream's _flush() method. FlushWritable is meant to be
* extended, just like stream.Writable. However, in the child class's
* prototype, a method called _flush(cb) can be defined that will halt the
* firing of the 'finish' event until the callback is called. If the callback
* if called with a truthy first argument, 'error' is emitted instead.
* @param {Object} [opts] Options to configure this Writable stream. See the
* Node.js docs for stream.Writable.
* @constructor
*/
function FlushWritable(opts) {
Writable.call(this, opts);
}
util.inherits(FlushWritable, Writable);
FlushWritable.prototype.emit = function(evt) {
if (evt === 'finish' && this._flush && !Writable.prototype._flush) {
this._flush(function(err) {
if (err)
EventEmitter.prototype.emit.call(this, 'error', err);
else
EventEmitter.prototype.emit.call(this, 'finish');
}.bind(this));
}
else {
var args = Array.prototype.slice.call(arguments);
EventEmitter.prototype.emit.apply(this, args);
}
};
module.exports = FlushWritable;
@@ -0,0 +1,508 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = parseCFFCharstring;
/**
* @file 解析cff字形
* @author mengke01(kekee000@gmail.com)
*/
/**
* 解析cff字形,返回直线和三次bezier曲线点数组
*
* @param {Array} code 操作码
* @param {Object} font 相关联的font对象
* @param {number} index glyf索引
* @return {Object} glyf对象
*/
function parseCFFCharstring(code, font, index) {
var c1x;
var c1y;
var c2x;
var c2y;
var contours = [];
var contour = [];
var stack = [];
var glyfs = [];
var nStems = 0;
var haveWidth = false;
var width = font.defaultWidthX;
var open = false;
var x = 0;
var y = 0;
function lineTo(x, y) {
contour.push({
onCurve: true,
x: x,
y: y
});
}
function curveTo(c1x, c1y, c2x, c2y, x, y) {
contour.push({
x: c1x,
y: c1y
});
contour.push({
x: c2x,
y: c2y
});
contour.push({
onCurve: true,
x: x,
y: y
});
}
function newContour(x, y) {
if (open) {
contours.push(contour);
}
contour = [];
lineTo(x, y);
open = true;
}
function parseStems() {
// The number of stem operators on the stack is always even.
// If the value is uneven, that means a width is specified.
var hasWidthArg = stack.length % 2 !== 0;
if (hasWidthArg && !haveWidth) {
width = stack.shift() + font.nominalWidthX;
}
nStems += stack.length >> 1;
stack.length = 0;
haveWidth = true;
}
function parse(code) {
var b1;
var b2;
var b3;
var b4;
var codeIndex;
var subrCode;
var jpx;
var jpy;
var c3x;
var c3y;
var c4x;
var c4y;
var i = 0;
while (i < code.length) {
var v = code[i];
i += 1;
switch (v) {
case 1:
// hstem
parseStems();
break;
case 3:
// vstem
parseStems();
break;
case 4:
// vmoveto
if (stack.length > 1 && !haveWidth) {
width = stack.shift() + font.nominalWidthX;
haveWidth = true;
}
y += stack.pop();
newContour(x, y);
break;
case 5:
// rlineto
while (stack.length > 0) {
x += stack.shift();
y += stack.shift();
lineTo(x, y);
}
break;
case 6:
// hlineto
while (stack.length > 0) {
x += stack.shift();
lineTo(x, y);
if (stack.length === 0) {
break;
}
y += stack.shift();
lineTo(x, y);
}
break;
case 7:
// vlineto
while (stack.length > 0) {
y += stack.shift();
lineTo(x, y);
if (stack.length === 0) {
break;
}
x += stack.shift();
lineTo(x, y);
}
break;
case 8:
// rrcurveto
while (stack.length > 0) {
c1x = x + stack.shift();
c1y = y + stack.shift();
c2x = c1x + stack.shift();
c2y = c1y + stack.shift();
x = c2x + stack.shift();
y = c2y + stack.shift();
curveTo(c1x, c1y, c2x, c2y, x, y);
}
break;
case 10:
// callsubr
codeIndex = stack.pop() + font.subrsBias;
subrCode = font.subrs[codeIndex];
if (subrCode) {
parse(subrCode);
}
break;
case 11:
// return
return;
case 12:
// flex operators
v = code[i];
i += 1;
switch (v) {
case 35:
// flex
// |- dx1 dy1 dx2 dy2 dx3 dy3 dx4 dy4 dx5 dy5 dx6 dy6 fd flex (12 35) |-
c1x = x + stack.shift(); // dx1
c1y = y + stack.shift(); // dy1
c2x = c1x + stack.shift(); // dx2
c2y = c1y + stack.shift(); // dy2
jpx = c2x + stack.shift(); // dx3
jpy = c2y + stack.shift(); // dy3
c3x = jpx + stack.shift(); // dx4
c3y = jpy + stack.shift(); // dy4
c4x = c3x + stack.shift(); // dx5
c4y = c3y + stack.shift(); // dy5
x = c4x + stack.shift(); // dx6
y = c4y + stack.shift(); // dy6
stack.shift(); // flex depth
curveTo(c1x, c1y, c2x, c2y, jpx, jpy);
curveTo(c3x, c3y, c4x, c4y, x, y);
break;
case 34:
// hflex
// |- dx1 dx2 dy2 dx3 dx4 dx5 dx6 hflex (12 34) |-
c1x = x + stack.shift(); // dx1
c1y = y; // dy1
c2x = c1x + stack.shift(); // dx2
c2y = c1y + stack.shift(); // dy2
jpx = c2x + stack.shift(); // dx3
jpy = c2y; // dy3
c3x = jpx + stack.shift(); // dx4
c3y = c2y; // dy4
c4x = c3x + stack.shift(); // dx5
c4y = y; // dy5
x = c4x + stack.shift(); // dx6
curveTo(c1x, c1y, c2x, c2y, jpx, jpy);
curveTo(c3x, c3y, c4x, c4y, x, y);
break;
case 36:
// hflex1
// |- dx1 dy1 dx2 dy2 dx3 dx4 dx5 dy5 dx6 hflex1 (12 36) |-
c1x = x + stack.shift(); // dx1
c1y = y + stack.shift(); // dy1
c2x = c1x + stack.shift(); // dx2
c2y = c1y + stack.shift(); // dy2
jpx = c2x + stack.shift(); // dx3
jpy = c2y; // dy3
c3x = jpx + stack.shift(); // dx4
c3y = c2y; // dy4
c4x = c3x + stack.shift(); // dx5
c4y = c3y + stack.shift(); // dy5
x = c4x + stack.shift(); // dx6
curveTo(c1x, c1y, c2x, c2y, jpx, jpy);
curveTo(c3x, c3y, c4x, c4y, x, y);
break;
case 37:
// flex1
// |- dx1 dy1 dx2 dy2 dx3 dy3 dx4 dy4 dx5 dy5 d6 flex1 (12 37) |-
c1x = x + stack.shift(); // dx1
c1y = y + stack.shift(); // dy1
c2x = c1x + stack.shift(); // dx2
c2y = c1y + stack.shift(); // dy2
jpx = c2x + stack.shift(); // dx3
jpy = c2y + stack.shift(); // dy3
c3x = jpx + stack.shift(); // dx4
c3y = jpy + stack.shift(); // dy4
c4x = c3x + stack.shift(); // dx5
c4y = c3y + stack.shift(); // dy5
if (Math.abs(c4x - x) > Math.abs(c4y - y)) {
x = c4x + stack.shift();
} else {
y = c4y + stack.shift();
}
curveTo(c1x, c1y, c2x, c2y, jpx, jpy);
curveTo(c3x, c3y, c4x, c4y, x, y);
break;
default:
console.warn('Glyph ' + index + ': unknown operator ' + (1200 + v));
stack.length = 0;
}
break;
case 14:
// endchar
if (stack.length === 1 && !haveWidth) {
width = stack.shift() + font.nominalWidthX;
haveWidth = true;
} else if (stack.length === 4) {
glyfs[1] = {
glyphIndex: font.charset.indexOf(font.encoding[stack.pop()]),
transform: {
a: 1,
b: 0,
c: 0,
d: 1,
e: 0,
f: 0
}
};
glyfs[0] = {
glyphIndex: font.charset.indexOf(font.encoding[stack.pop()]),
transform: {
a: 1,
b: 0,
c: 0,
d: 1,
e: 0,
f: 0
}
};
glyfs[1].transform.f = stack.pop();
glyfs[1].transform.e = stack.pop();
} else if (stack.length === 5) {
if (!haveWidth) {
width = stack.shift() + font.nominalWidthX;
}
haveWidth = true;
glyfs[1] = {
glyphIndex: font.charset.indexOf(font.encoding[stack.pop()]),
transform: {
a: 1,
b: 0,
c: 0,
d: 1,
e: 0,
f: 0
}
};
glyfs[0] = {
glyphIndex: font.charset.indexOf(font.encoding[stack.pop()]),
transform: {
a: 1,
b: 0,
c: 0,
d: 1,
e: 0,
f: 0
}
};
glyfs[1].transform.f = stack.pop();
glyfs[1].transform.e = stack.pop();
}
if (open) {
contours.push(contour);
open = false;
}
break;
case 18:
// hstemhm
parseStems();
break;
case 19: // hintmask
case 20:
// cntrmask
parseStems();
i += nStems + 7 >> 3;
break;
case 21:
// rmoveto
if (stack.length > 2 && !haveWidth) {
width = stack.shift() + font.nominalWidthX;
haveWidth = true;
}
y += stack.pop();
x += stack.pop();
newContour(x, y);
break;
case 22:
// hmoveto
if (stack.length > 1 && !haveWidth) {
width = stack.shift() + font.nominalWidthX;
haveWidth = true;
}
x += stack.pop();
newContour(x, y);
break;
case 23:
// vstemhm
parseStems();
break;
case 24:
// rcurveline
while (stack.length > 2) {
c1x = x + stack.shift();
c1y = y + stack.shift();
c2x = c1x + stack.shift();
c2y = c1y + stack.shift();
x = c2x + stack.shift();
y = c2y + stack.shift();
curveTo(c1x, c1y, c2x, c2y, x, y);
}
x += stack.shift();
y += stack.shift();
lineTo(x, y);
break;
case 25:
// rlinecurve
while (stack.length > 6) {
x += stack.shift();
y += stack.shift();
lineTo(x, y);
}
c1x = x + stack.shift();
c1y = y + stack.shift();
c2x = c1x + stack.shift();
c2y = c1y + stack.shift();
x = c2x + stack.shift();
y = c2y + stack.shift();
curveTo(c1x, c1y, c2x, c2y, x, y);
break;
case 26:
// vvcurveto
if (stack.length % 2) {
x += stack.shift();
}
while (stack.length > 0) {
c1x = x;
c1y = y + stack.shift();
c2x = c1x + stack.shift();
c2y = c1y + stack.shift();
x = c2x;
y = c2y + stack.shift();
curveTo(c1x, c1y, c2x, c2y, x, y);
}
break;
case 27:
// hhcurveto
if (stack.length % 2) {
y += stack.shift();
}
while (stack.length > 0) {
c1x = x + stack.shift();
c1y = y;
c2x = c1x + stack.shift();
c2y = c1y + stack.shift();
x = c2x + stack.shift();
y = c2y;
curveTo(c1x, c1y, c2x, c2y, x, y);
}
break;
case 28:
// shortint
b1 = code[i];
b2 = code[i + 1];
stack.push((b1 << 24 | b2 << 16) >> 16);
i += 2;
break;
case 29:
// callgsubr
codeIndex = stack.pop() + font.gsubrsBias;
subrCode = font.gsubrs[codeIndex];
if (subrCode) {
parse(subrCode);
}
break;
case 30:
// vhcurveto
while (stack.length > 0) {
c1x = x;
c1y = y + stack.shift();
c2x = c1x + stack.shift();
c2y = c1y + stack.shift();
x = c2x + stack.shift();
y = c2y + (stack.length === 1 ? stack.shift() : 0);
curveTo(c1x, c1y, c2x, c2y, x, y);
if (stack.length === 0) {
break;
}
c1x = x + stack.shift();
c1y = y;
c2x = c1x + stack.shift();
c2y = c1y + stack.shift();
y = c2y + stack.shift();
x = c2x + (stack.length === 1 ? stack.shift() : 0);
curveTo(c1x, c1y, c2x, c2y, x, y);
}
break;
case 31:
// hvcurveto
while (stack.length > 0) {
c1x = x + stack.shift();
c1y = y;
c2x = c1x + stack.shift();
c2y = c1y + stack.shift();
y = c2y + stack.shift();
x = c2x + (stack.length === 1 ? stack.shift() : 0);
curveTo(c1x, c1y, c2x, c2y, x, y);
if (stack.length === 0) {
break;
}
c1x = x;
c1y = y + stack.shift();
c2x = c1x + stack.shift();
c2y = c1y + stack.shift();
x = c2x + stack.shift();
y = c2y + (stack.length === 1 ? stack.shift() : 0);
curveTo(c1x, c1y, c2x, c2y, x, y);
}
break;
default:
if (v < 32) {
console.warn('Glyph ' + index + ': unknown operator ' + v);
} else if (v < 247) {
stack.push(v - 139);
} else if (v < 251) {
b1 = code[i];
i += 1;
stack.push((v - 247) * 256 + b1 + 108);
} else if (v < 255) {
b1 = code[i];
i += 1;
stack.push(-(v - 251) * 256 - b1 - 108);
} else {
b1 = code[i];
b2 = code[i + 1];
b3 = code[i + 2];
b4 = code[i + 3];
i += 4;
stack.push((b1 << 24 | b2 << 16 | b3 << 8 | b4) / 65536);
}
}
}
}
parse(code);
var glyf = {
// 移除重复的起点和终点
contours: contours.map(function (contour) {
var last = contour.length - 1;
if (contour[0].x === contour[last].x && contour[0].y === contour[last].y) {
contour.splice(last, 1);
}
return contour;
}),
advanceWidth: width
};
if (glyfs.length) {
glyf.compound = true;
glyf.glyfs = glyfs;
}
return glyf;
}
@@ -0,0 +1,28 @@
{
"name": "@types/type-is",
"version": "1.6.7",
"description": "TypeScript definitions for type-is",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/type-is",
"license": "MIT",
"contributors": [
{
"name": "BendingBender",
"githubUsername": "BendingBender",
"url": "https://github.com/BendingBender"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/type-is"
},
"scripts": {},
"dependencies": {
"@types/node": "*"
},
"peerDependencies": {},
"typesPublisherContentHash": "80597c8510364ff454187444c230de636f6aa9b4714179a61e49aa7dbb579005",
"typeScriptVersion": "5.0"
}
@@ -0,0 +1,35 @@
/*
Copyright (c) 2010, Linden Research, Inc.
Copyright (c) 2012, Joshua Bell
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
$/LicenseInfo$
*/
// Original can be found at:
// https://bitbucket.org/lindenlab/llsd
// Modifications by Joshua Bell inexorabletash@gmail.com
// https://github.com/inexorabletash/polyfill
// ES3/ES5 implementation of the Krhonos Typed Array Specification
// Ref: http://www.khronos.org/registry/typedarray/specs/latest/
// Date: 2011-02-01
//
// Variations:
// * Allows typed_array.get/set() as alias for subscripts (typed_array[])
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-stately/slider/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useSliderState} from './useSliderState';\n\nexport type {SliderStateOptions} from './useSliderState';\nexport type {SliderState} from './useSliderState';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InversifyContainerError = void 0;
const isAppErrorSymbol = Symbol.for('@inversifyjs/container/InversifyContainerError');
class InversifyContainerError extends Error {
[isAppErrorSymbol];
kind;
constructor(kind, message, options) {
super(message, options);
this[isAppErrorSymbol] = true;
this.kind = kind;
}
static is(value) {
return (typeof value === 'object' &&
value !== null &&
value[isAppErrorSymbol] === true);
}
static isErrorOfKind(value, kind) {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
return InversifyContainerError.is(value) && value.kind === kind;
}
}
exports.InversifyContainerError = InversifyContainerError;
//# sourceMappingURL=InversifyContainerError.js.map
@@ -0,0 +1,5 @@
{
"name": "beep-boop",
"version": "1.2.3",
"repository" : "https://github.com/substack/beep-boop.git"
}
@@ -0,0 +1,32 @@
import toInteger from './toInteger.js';
import toLength from './toLength.js';
/**
* The base implementation of `_.fill` without an iteratee call guard.
*
* @private
* @param {Array} array The array to fill.
* @param {*} value The value to fill `array` with.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns `array`.
*/
function baseFill(array, value, start, end) {
var length = array.length;
start = toInteger(start);
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
end = (end === undefined || end > length) ? length : toInteger(end);
if (end < 0) {
end += length;
}
end = start > end ? 0 : toLength(end);
while (start < end) {
array[start++] = value;
}
return array;
}
export default baseFill;
@@ -0,0 +1,43 @@
var baseToString = require('./_baseToString'),
castSlice = require('./_castSlice'),
charsStartIndex = require('./_charsStartIndex'),
stringToArray = require('./_stringToArray'),
toString = require('./toString');
/** Used to match leading whitespace. */
var reTrimStart = /^\s+/;
/**
* Removes leading whitespace or specified characters from `string`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to trim.
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {string} Returns the trimmed string.
* @example
*
* _.trimStart(' abc ');
* // => 'abc '
*
* _.trimStart('-_-abc-_-', '_-');
* // => 'abc-_-'
*/
function trimStart(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined)) {
return string.replace(reTrimStart, '');
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
start = charsStartIndex(strSymbols, stringToArray(chars));
return castSlice(strSymbols, start).join('');
}
module.exports = trimStart;
@@ -0,0 +1,17 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
/**
* Gets the location of the head of the given for statement variant for reporting.
*
* - `for (const foo in bar) expressionOrBlock`
* ^^^^^^^^^^^^^^^^^^^^^^
*
* - `for (const foo of bar) expressionOrBlock`
* ^^^^^^^^^^^^^^^^^^^^^^
*
* - `for await (const foo of bar) expressionOrBlock`
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*
* - `for (let i = 0; i < 10; i++) expressionOrBlock`
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*/
export declare function getForStatementHeadLoc(sourceCode: TSESLint.SourceCode, node: TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement): TSESTree.SourceLocation;
@@ -0,0 +1,115 @@
{
"name": "attr-accept",
"description": "JavaScript implementation of the \"accept\" attribute for HTML5 <input type=\"file\">",
"version": "2.2.5",
"main": "dist/index.js",
"module": "dist/es/index.js",
"types": "index.d.ts",
"files": [
"dist",
"index.d.ts"
],
"scripts": {
"clean": "rimraf ./dist",
"build": "npm run clean && npm run build:cjs && npm run build:es",
"build:cjs": "webpack -p",
"build:es": "cross-env BABEL_ENV=es babel ./src --out-dir ./dist/es --ignore '**/*.spec.js'",
"prepublish": "npm test && npm run build",
"pretest": "npm run lint",
"test": "mocha --require @babel/register --recursive",
"test:watch": "npm test -- --watch",
"test:cov": "nyc --reporter=lcov --reporter=text mocha --require @babel/register --recursive",
"lint": "eslint src/ test/",
"precommit": "lint-staged",
"size": "size-limit",
"size:why": "size-limit --why"
},
"repository": {
"type": "git",
"url": "https://github.com/react-dropzone/attr-accept.git"
},
"publishConfig": {
"access": "public"
},
"keywords": [
"html5",
"input",
"tag",
"attribute",
"attr",
"accept",
"file"
],
"author": "Andrey Okonetchnikov @okonetchnikov",
"contributors": [
"Andrey Okonetchnikov <andrey@okonet.ru> (http://okonet.ru)",
"Roland Groza <rolandjitsu@gmail.com>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/react-dropzone/attr-accept/issues"
},
"homepage": "https://github.com/react-dropzone/attr-accept#readme",
"devDependencies": {
"@babel/cli": "^7.6.4",
"@babel/core": "^7.10.5",
"@babel/plugin-external-helpers": "^7.2.0",
"@babel/plugin-proposal-do-expressions": "^7.6.0",
"@babel/plugin-proposal-export-default-from": "^7.5.2",
"@babel/plugin-proposal-logical-assignment-operators": "^7.2.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
"@babel/plugin-proposal-pipeline-operator": "^7.5.0",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/preset-env": "^7.6.3",
"@babel/preset-react": "^7.6.3",
"@babel/register": "^7.6.2",
"@commitlint/cli": "^8.2.0",
"@size-limit/preset-small-lib": "^2.1.6",
"babel-eslint": "^8.0.0",
"babel-loader": "^8.0.0",
"babel-preset-env": "^1.6.0",
"core-js": "^3.1.4",
"cross-env": "^6.0.3",
"cz-conventional-changelog": "^1.2.0",
"eslint": "^4.6.1",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-okonet": "^6.1.3",
"eslint-config-prettier": "^2.4.0",
"eslint-plugin-flowtype": "^2.35.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-node": "^5.1.1",
"eslint-plugin-prettier": "^2.2.0",
"eslint-plugin-react": "^7.3.0",
"expect": "^1.20.2",
"husky": "^0.14.3",
"lint-staged": "^4.1.3",
"mocha": "^9.2.2",
"nyc": "^15.1.0",
"prettier": "^1.6.1",
"rimraf": "^3.0.0",
"webpack": "^4.0.0",
"webpack-cli": "^3.3.12"
},
"engines": {
"node": ">=4"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"lint-staged": {
"*.js": [
"eslint --fix",
"git add"
]
},
"size-limit": [
{
"path": "dist/index.js",
"limit": "2 KB"
}
]
}
@@ -0,0 +1,106 @@
{
"name": "signal-exit",
"version": "4.1.0",
"description": "when you want to fire an event no matter how a process exits.",
"main": "./dist/cjs/index.js",
"module": "./dist/mjs/index.js",
"browser": "./dist/mjs/browser.js",
"types": "./dist/mjs/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/mjs/index.d.ts",
"default": "./dist/mjs/index.js"
},
"require": {
"types": "./dist/cjs/index.d.ts",
"default": "./dist/cjs/index.js"
}
},
"./signals": {
"import": {
"types": "./dist/mjs/signals.d.ts",
"default": "./dist/mjs/signals.js"
},
"require": {
"types": "./dist/cjs/signals.d.ts",
"default": "./dist/cjs/signals.js"
}
},
"./browser": {
"import": {
"types": "./dist/mjs/browser.d.ts",
"default": "./dist/mjs/browser.js"
},
"require": {
"types": "./dist/cjs/browser.d.ts",
"default": "./dist/cjs/browser.js"
}
}
},
"files": [
"dist"
],
"engines": {
"node": ">=14"
},
"repository": {
"type": "git",
"url": "https://github.com/tapjs/signal-exit.git"
},
"keywords": [
"signal",
"exit"
],
"author": "Ben Coe <ben@npmjs.com>",
"license": "ISC",
"devDependencies": {
"@types/cross-spawn": "^6.0.2",
"@types/node": "^18.15.11",
"@types/signal-exit": "^3.0.1",
"@types/tap": "^15.0.8",
"c8": "^7.13.0",
"prettier": "^2.8.6",
"tap": "^16.3.4",
"ts-node": "^10.9.1",
"typedoc": "^0.23.28",
"typescript": "^5.0.2"
},
"scripts": {
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"preprepare": "rm -rf dist",
"prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash ./scripts/fixup.sh",
"pretest": "npm run prepare",
"presnap": "npm run prepare",
"test": "c8 tap",
"snap": "c8 tap",
"format": "prettier --write . --loglevel warn",
"typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts"
},
"prettier": {
"semi": false,
"printWidth": 75,
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"jsxSingleQuote": false,
"bracketSameLine": true,
"arrowParens": "avoid",
"endOfLine": "lf"
},
"tap": {
"coverage": false,
"jobs": 1,
"node-arg": [
"--no-warnings",
"--loader",
"ts-node/esm"
],
"ts": false
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
}
@@ -0,0 +1,829 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
import type { util } from "zod/v4/core";
test("z.boolean", () => {
const a = z.boolean();
expect(z.parse(a, true)).toEqual(true);
expect(z.parse(a, false)).toEqual(false);
expect(() => z.parse(a, 123)).toThrow();
expect(() => z.parse(a, "true")).toThrow();
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<boolean>();
});
test("z.bigint", () => {
const a = z.bigint();
expect(z.parse(a, BigInt(123))).toEqual(BigInt(123));
expect(() => z.parse(a, 123)).toThrow();
expect(() => z.parse(a, "123")).toThrow();
});
test("z.symbol", () => {
const a = z.symbol();
const sym = Symbol();
expect(z.parse(a, sym)).toEqual(sym);
expect(() => z.parse(a, "symbol")).toThrow();
});
test("z.date", () => {
const a = z.date();
const date = new Date();
expect(z.parse(a, date)).toEqual(date);
expect(() => z.parse(a, "date")).toThrow();
});
test("z.coerce.string", () => {
const a = z.coerce.string();
expect(z.parse(a, 123)).toEqual("123");
expect(z.parse(a, true)).toEqual("true");
expect(z.parse(a, null)).toEqual("null");
expect(z.parse(a, undefined)).toEqual("undefined");
});
test("z.coerce.number", () => {
const a = z.coerce.number();
expect(z.parse(a, "123")).toEqual(123);
expect(z.parse(a, "123.45")).toEqual(123.45);
expect(z.parse(a, true)).toEqual(1);
expect(z.parse(a, false)).toEqual(0);
expect(() => z.parse(a, "abc")).toThrow();
});
test("z.coerce.boolean", () => {
const a = z.coerce.boolean();
// test booleans
expect(z.parse(a, true)).toEqual(true);
expect(z.parse(a, false)).toEqual(false);
expect(z.parse(a, "true")).toEqual(true);
expect(z.parse(a, "false")).toEqual(true);
expect(z.parse(a, 1)).toEqual(true);
expect(z.parse(a, 0)).toEqual(false);
expect(z.parse(a, {})).toEqual(true);
expect(z.parse(a, [])).toEqual(true);
expect(z.parse(a, undefined)).toEqual(false);
expect(z.parse(a, null)).toEqual(false);
expect(z.parse(a, "")).toEqual(false);
});
test("z.coerce.bigint", () => {
const a = z.coerce.bigint();
expect(z.parse(a, "123")).toEqual(BigInt(123));
expect(z.parse(a, 123)).toEqual(BigInt(123));
expect(() => z.parse(a, "abc")).toThrow();
});
test("z.coerce.date", () => {
const a = z.coerce.date();
const date = new Date();
expect(z.parse(a, date.toISOString())).toEqual(date);
expect(z.parse(a, date.getTime())).toEqual(date);
expect(() => z.parse(a, "invalid date")).toThrow();
});
test("z.iso.datetime", () => {
const d1 = "2021-01-01T00:00:00Z";
const d2 = "2021-01-01T00:00:00.123Z";
const d3 = "2021-01-01T00:00:00";
const d4 = "2021-01-01T00:00:00+07:00";
const d5 = "bad data";
// local: false, offset: false, precision: null
const a = z.iso.datetime();
expect(z.safeParse(a, d1).success).toEqual(true);
expect(z.safeParse(a, d2).success).toEqual(true);
expect(z.safeParse(a, d3).success).toEqual(false);
expect(z.safeParse(a, d4).success).toEqual(false);
expect(z.safeParse(a, d5).success).toEqual(false);
const b = z.iso.datetime({ local: true });
expect(z.safeParse(b, d1).success).toEqual(true);
expect(z.safeParse(b, d2).success).toEqual(true);
expect(z.safeParse(b, d3).success).toEqual(true);
expect(z.safeParse(b, d4).success).toEqual(false);
expect(z.safeParse(b, d5).success).toEqual(false);
const c = z.iso.datetime({ offset: true });
expect(z.safeParse(c, d1).success).toEqual(true);
expect(z.safeParse(c, d2).success).toEqual(true);
expect(z.safeParse(c, d3).success).toEqual(false);
expect(z.safeParse(c, d4).success).toEqual(true);
expect(z.safeParse(c, d5).success).toEqual(false);
const d = z.iso.datetime({ precision: 3 });
expect(z.safeParse(d, d1).success).toEqual(false);
expect(z.safeParse(d, d2).success).toEqual(true);
expect(z.safeParse(d, d3).success).toEqual(false);
expect(z.safeParse(d, d4).success).toEqual(false);
expect(z.safeParse(d, d5).success).toEqual(false);
});
test("z.iso.date", () => {
const d1 = "2021-01-01";
const d2 = "bad data";
const a = z.iso.date();
expect(z.safeParse(a, d1).success).toEqual(true);
expect(z.safeParse(a, d2).success).toEqual(false);
const b = z.string().check(z.iso.date());
expect(z.safeParse(b, d1).success).toEqual(true);
expect(z.safeParse(b, d2).success).toEqual(false);
});
test("z.iso.time", () => {
const d1 = "00:00:00";
const d2 = "00:00:00.123";
const d3 = "bad data";
const a = z.iso.time();
expect(z.safeParse(a, d1).success).toEqual(true);
expect(z.safeParse(a, d2).success).toEqual(true);
expect(z.safeParse(a, d3).success).toEqual(false);
const b = z.iso.time({ precision: 3 });
expect(z.safeParse(b, d1).success).toEqual(false);
expect(z.safeParse(b, d2).success).toEqual(true);
expect(z.safeParse(b, d3).success).toEqual(false);
const c = z.string().check(z.iso.time());
expect(z.safeParse(c, d1).success).toEqual(true);
expect(z.safeParse(c, d2).success).toEqual(true);
expect(z.safeParse(c, d3).success).toEqual(false);
});
test("z.iso.duration", () => {
const d1 = "P3Y6M4DT12H30M5S";
const d2 = "bad data";
const a = z.iso.duration();
expect(z.safeParse(a, d1).success).toEqual(true);
expect(z.safeParse(a, d2).success).toEqual(false);
const b = z.string().check(z.iso.duration());
expect(z.safeParse(b, d1).success).toEqual(true);
expect(z.safeParse(b, d2).success).toEqual(false);
});
test("z.undefined", () => {
const a = z.undefined();
expect(z.parse(a, undefined)).toEqual(undefined);
expect(() => z.parse(a, "undefined")).toThrow();
});
test("z.null", () => {
const a = z.null();
expect(z.parse(a, null)).toEqual(null);
expect(() => z.parse(a, "null")).toThrow();
});
test("z.any", () => {
const a = z.any();
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, 123)).toEqual(123);
expect(z.parse(a, true)).toEqual(true);
expect(z.parse(a, null)).toEqual(null);
expect(z.parse(a, undefined)).toEqual(undefined);
z.parse(a, {});
z.parse(a, []);
z.parse(a, Symbol());
z.parse(a, new Date());
});
test("z.unknown", () => {
const a = z.unknown();
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, 123)).toEqual(123);
expect(z.parse(a, true)).toEqual(true);
expect(z.parse(a, null)).toEqual(null);
expect(z.parse(a, undefined)).toEqual(undefined);
z.parse(a, {});
z.parse(a, []);
z.parse(a, Symbol());
z.parse(a, new Date());
});
test("z.never", () => {
const a = z.never();
expect(() => z.parse(a, "hello")).toThrow();
});
test("z.void", () => {
const a = z.void();
expect(z.parse(a, undefined)).toEqual(undefined);
expect(() => z.parse(a, null)).toThrow();
});
test("z.array", () => {
const a = z.array(z.string());
expect(z.parse(a, ["hello", "world"])).toEqual(["hello", "world"]);
expect(() => z.parse(a, [123])).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
});
test("z.union", () => {
const a = z.union([z.string(), z.number()]);
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, 123)).toEqual(123);
expect(() => z.parse(a, true)).toThrow();
});
test("z.intersection", () => {
const a = z.intersection(z.object({ a: z.string() }), z.object({ b: z.number() }));
expect(z.parse(a, { a: "hello", b: 123 })).toEqual({ a: "hello", b: 123 });
expect(() => z.parse(a, { a: "hello" })).toThrow();
expect(() => z.parse(a, { b: 123 })).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
});
test("z.tuple", () => {
const a = z.tuple([z.string(), z.number()]);
expect(z.parse(a, ["hello", 123])).toEqual(["hello", 123]);
expect(() => z.parse(a, ["hello", "world"])).toThrow();
expect(() => z.parse(a, [123, 456])).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// tuple with rest
const b = z.tuple([z.string(), z.number(), z.optional(z.string())], z.boolean());
type b = z.output<typeof b>;
expectTypeOf<b>().toEqualTypeOf<[string, number, string?, ...boolean[]]>();
const datas = [
["hello", 123],
["hello", 123, "world"],
["hello", 123, "world", true],
["hello", 123, "world", true, false, true],
];
for (const data of datas) {
expect(z.parse(b, data)).toEqual(data);
}
expect(() => z.parse(b, ["hello", 123, 123])).toThrow();
expect(() => z.parse(b, ["hello", 123, "world", 123])).toThrow();
// tuple with readonly args
const cArgs = [z.string(), z.number(), z.optional(z.string())] as const;
const c = z.tuple(cArgs, z.boolean());
type c = z.output<typeof c>;
expectTypeOf<c>().toEqualTypeOf<[string, number, string?, ...boolean[]]>();
// type c = z.output<typeof c>;
});
test("z.record", () => {
// record schema with enum keys
const a = z.record(z.string(), z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<Record<string, string>>();
const b = z.record(z.union([z.string(), z.number(), z.symbol()]), z.string());
type b = z.output<typeof b>;
expectTypeOf<b>().toEqualTypeOf<Record<string | number | symbol, string>>();
expect(z.parse(b, { a: "hello", 1: "world", [Symbol.for("asdf")]: "symbol" })).toEqual({
a: "hello",
1: "world",
[Symbol.for("asdf")]: "symbol",
});
// enum keys
const c = z.record(z.enum(["a", "b", "c"]), z.string());
type c = z.output<typeof c>;
expectTypeOf<c>().toEqualTypeOf<Record<"a" | "b" | "c", string>>();
expect(z.parse(c, { a: "hello", b: "world", c: "world" })).toEqual({
a: "hello",
b: "world",
c: "world",
});
// missing keys
expect(() => z.parse(c, { a: "hello", b: "world" })).toThrow();
// extra keys
expect(() => z.parse(c, { a: "hello", b: "world", c: "world", d: "world" })).toThrow();
// partial enum
const d = z.record(z.enum(["a", "b"]).or(z.never()), z.string());
type d = z.output<typeof d>;
expectTypeOf<d>().toEqualTypeOf<Record<"a" | "b", string>>();
});
test("z.map", () => {
const a = z.map(z.string(), z.number());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<Map<string, number>>();
expect(z.parse(a, new Map([["hello", 123]]))).toEqual(new Map([["hello", 123]]));
expect(() => z.parse(a, new Map([["hello", "world"]]))).toThrow();
expect(() => z.parse(a, new Map([[1243, "world"]]))).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
const r1 = z.safeParse(a, new Map([[123, 123]]));
expect(r1.error?.issues[0].code).toEqual("invalid_type");
expect(r1.error?.issues[0].path).toEqual([123]);
const r2: any = z.safeParse(a, new Map([[BigInt(123), 123]]));
expect(r2.error!.issues[0].code).toEqual("invalid_key");
expect(r2.error!.issues[0].path).toEqual([]);
const r3: any = z.safeParse(a, new Map([["hello", "world"]]));
expect(r3.error!.issues[0].code).toEqual("invalid_type");
expect(r3.error!.issues[0].path).toEqual(["hello"]);
});
test("z.map invalid_element", () => {
const a = z.map(z.bigint(), z.number());
const r1 = z.safeParse(a, new Map([[BigInt(123), BigInt(123)]]));
expect(r1.error!.issues[0].code).toEqual("invalid_element");
expect(r1.error!.issues[0].path).toEqual([]);
});
test("z.map async", async () => {
const a = z.map(z.string().check(z.refine(async () => true)), z.number().check(z.refine(async () => true)));
const d1 = new Map([["hello", 123]]);
expect(await z.parseAsync(a, d1)).toEqual(d1);
await expect(z.parseAsync(a, new Map([[123, 123]]))).rejects.toThrow();
await expect(z.parseAsync(a, new Map([["hi", "world"]]))).rejects.toThrow();
await expect(z.parseAsync(a, new Map([[1243, "world"]]))).rejects.toThrow();
await expect(z.parseAsync(a, "hello")).rejects.toThrow();
const r = await z.safeParseAsync(a, new Map([[123, 123]]));
expect(r.success).toEqual(false);
expect(r.error!.issues[0].code).toEqual("invalid_type");
expect(r.error!.issues[0].path).toEqual([123]);
});
test("z.set", () => {
const a = z.set(z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<Set<string>>();
expect(z.parse(a, new Set(["hello", "world"]))).toEqual(new Set(["hello", "world"]));
expect(() => z.parse(a, new Set([123]))).toThrow();
expect(() => z.parse(a, ["hello", "world"])).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
const b = z.set(z.number());
expect(z.parse(b, new Set([1, 2, 3]))).toEqual(new Set([1, 2, 3]));
expect(() => z.parse(b, new Set(["hello"]))).toThrow();
expect(() => z.parse(b, [1, 2, 3])).toThrow();
expect(() => z.parse(b, 123)).toThrow();
});
test("z.enum", () => {
const a = z.enum(["A", "B", "C"]);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<"A" | "B" | "C">();
expect(z.parse(a, "A")).toEqual("A");
expect(z.parse(a, "B")).toEqual("B");
expect(z.parse(a, "C")).toEqual("C");
expect(() => z.parse(a, "D")).toThrow();
expect(() => z.parse(a, 123)).toThrow();
expect(a.enum.A).toEqual("A");
expect(a.enum.B).toEqual("B");
expect(a.enum.C).toEqual("C");
expect((a.enum as any).D).toEqual(undefined);
});
test("z.enum - native", () => {
enum NativeEnum {
A = "A",
B = "B",
C = "C",
}
const a = z.enum(NativeEnum);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<NativeEnum>();
expect(z.parse(a, NativeEnum.A)).toEqual(NativeEnum.A);
expect(z.parse(a, NativeEnum.B)).toEqual(NativeEnum.B);
expect(z.parse(a, NativeEnum.C)).toEqual(NativeEnum.C);
expect(() => z.parse(a, "D")).toThrow();
expect(() => z.parse(a, 123)).toThrow();
// test a.enum
a;
expect(a.enum.A).toEqual(NativeEnum.A);
expect(a.enum.B).toEqual(NativeEnum.B);
expect(a.enum.C).toEqual(NativeEnum.C);
});
test("z.nativeEnum", () => {
enum NativeEnum {
A = "A",
B = "B",
C = "C",
}
const a = z.nativeEnum(NativeEnum);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<NativeEnum>();
expect(z.parse(a, NativeEnum.A)).toEqual(NativeEnum.A);
expect(z.parse(a, NativeEnum.B)).toEqual(NativeEnum.B);
expect(z.parse(a, NativeEnum.C)).toEqual(NativeEnum.C);
expect(() => z.parse(a, "D")).toThrow();
expect(() => z.parse(a, 123)).toThrow();
// test a.enum
a;
expect(a.enum.A).toEqual(NativeEnum.A);
expect(a.enum.B).toEqual(NativeEnum.B);
expect(a.enum.C).toEqual(NativeEnum.C);
});
test("z.literal", () => {
const a = z.literal("hello");
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<"hello">();
expect(z.parse(a, "hello")).toEqual("hello");
expect(() => z.parse(a, "world")).toThrow();
expect(() => z.parse(a, 123)).toThrow();
});
test("z.file", () => {
const a = z.file();
const file = new File(["content"], "filename.txt", { type: "text/plain" });
expect(z.parse(a, file)).toEqual(file);
expect(() => z.parse(a, "file")).toThrow();
expect(() => z.parse(a, 123)).toThrow();
});
test("z.transform", () => {
const a = z.pipe(
z.string(),
z.transform((val) => val.toUpperCase())
);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(z.parse(a, "hello")).toEqual("HELLO");
expect(() => z.parse(a, 123)).toThrow();
});
test("z.transform async", async () => {
const a = z.pipe(
z.string(),
z.transform(async (val) => val.toUpperCase())
);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(await z.parseAsync(a, "hello")).toEqual("HELLO");
await expect(() => z.parseAsync(a, 123)).rejects.toThrow();
});
test("z.preprocess", () => {
const a = z.pipe(
z.transform((val) => String(val).toUpperCase()),
z.string()
);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(z.parse(a, 123)).toEqual("123");
expect(z.parse(a, true)).toEqual("TRUE");
expect(z.parse(a, BigInt(1234))).toEqual("1234");
// expect(() => z.parse(a, Symbol("asdf"))).toThrow();
});
// test("z.preprocess async", () => {
// const a = z.preprocess(async (val) => String(val), z.string());
// type a = z.output<typeof a>;
// expectTypeOf<a>().toEqualTypeOf<string>();
// expect(z.parse(a, 123)).toEqual("123");
// expect(z.parse(a, true)).toEqual("true");
// expect(() => z.parse(a, {})).toThrow();
// });
test("z.optional", () => {
const a = z.optional(z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string | undefined>();
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, undefined)).toEqual(undefined);
expect(() => z.parse(a, 123)).toThrow();
});
test("z.nullable", () => {
const a = z.nullable(z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string | null>();
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, null)).toEqual(null);
expect(() => z.parse(a, 123)).toThrow();
});
test("z.default", () => {
const a = z._default(z.string(), "default");
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(z.parse(a, undefined)).toEqual("default");
expect(z.parse(a, "hello")).toEqual("hello");
expect(() => z.parse(a, 123)).toThrow();
const b = z._default(z.string(), () => "default");
expect(z.parse(b, undefined)).toEqual("default");
expect(z.parse(b, "hello")).toEqual("hello");
expect(() => z.parse(b, 123)).toThrow();
});
test("z.catch", () => {
const a = z.catch(z.string(), "default");
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, 123)).toEqual("default");
const b = z.catch(z.string(), () => "default");
expect(z.parse(b, "hello")).toEqual("hello");
expect(z.parse(b, 123)).toEqual("default");
const c = z.catch(z.string(), (ctx) => {
return `${ctx.error.issues.length}issues`;
});
expect(z.parse(c, 1234)).toEqual("1issues");
});
test("z.nan", () => {
const a = z.nan();
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<number>();
expect(z.parse(a, Number.NaN)).toEqual(Number.NaN);
expect(() => z.parse(a, 123)).toThrow();
expect(() => z.parse(a, "NaN")).toThrow();
});
test("z.pipe", () => {
const a = z.pipe(
z.pipe(
z.string(),
z.transform((val) => val.length)
),
z.number()
);
type a_in = z.input<typeof a>;
expectTypeOf<a_in>().toEqualTypeOf<string>();
type a_out = z.output<typeof a>;
expectTypeOf<a_out>().toEqualTypeOf<number>();
expect(z.parse(a, "123")).toEqual(3);
expect(z.parse(a, "hello")).toEqual(5);
expect(() => z.parse(a, 123)).toThrow();
});
test("z.readonly", () => {
const a = z.readonly(z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<Readonly<string>>();
expect(z.parse(a, "hello")).toEqual("hello");
expect(() => z.parse(a, 123)).toThrow();
});
test("z.templateLiteral", () => {
const a = z.templateLiteral([z.string(), z.number()]);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<`${string}${number}`>();
expect(z.parse(a, "hello123")).toEqual("hello123");
expect(() => z.parse(a, "hello")).toThrow();
expect(() => z.parse(a, 123)).toThrow();
// multipart
const b = z.templateLiteral([z.string(), z.number(), z.string()]);
type b = z.output<typeof b>;
expectTypeOf<b>().toEqualTypeOf<`${string}${number}${string}`>();
expect(z.parse(b, "hello123world")).toEqual("hello123world");
expect(z.parse(b, "123")).toEqual("123");
expect(() => z.parse(b, "hello")).toThrow();
expect(() => z.parse(b, 123)).toThrow();
// include boolean
const c = z.templateLiteral([z.string(), z.boolean()]);
type c = z.output<typeof c>;
expectTypeOf<c>().toEqualTypeOf<`${string}${boolean}`>();
expect(z.parse(c, "hellotrue")).toEqual("hellotrue");
expect(z.parse(c, "hellofalse")).toEqual("hellofalse");
expect(() => z.parse(c, "hello")).toThrow();
expect(() => z.parse(c, 123)).toThrow();
// include literal prefix
const d = z.templateLiteral([z.literal("hello"), z.number()]);
type d = z.output<typeof d>;
expectTypeOf<d>().toEqualTypeOf<`hello${number}`>();
expect(z.parse(d, "hello123")).toEqual("hello123");
expect(() => z.parse(d, 123)).toThrow();
expect(() => z.parse(d, "world123")).toThrow();
// include literal union
const e = z.templateLiteral([z.literal(["aa", "bb"]), z.number()]);
type e = z.output<typeof e>;
expectTypeOf<e>().toEqualTypeOf<`aa${number}` | `bb${number}`>();
expect(z.parse(e, "aa123")).toEqual("aa123");
expect(z.parse(e, "bb123")).toEqual("bb123");
expect(() => z.parse(e, "cc123")).toThrow();
expect(() => z.parse(e, 123)).toThrow();
});
// this returns both a schema and a check
test("z.custom schema", () => {
const a = z.custom((val) => {
return typeof val === "string";
});
expect(z.parse(a, "hello")).toEqual("hello");
expect(() => z.parse(a, 123)).toThrow();
});
test("z.custom check", () => {
// @ts-expect-error Inference not possible, use z.refine()
z.date().check(z.custom((val) => val.getTime() > 0));
});
test("z.check", () => {
// this is a more flexible version of z.custom that accepts an arbitrary _parse logic
// the function should return base.$ZodResult
const a = z.any().check(
z.check<string>((ctx) => {
if (typeof ctx.value === "string") return;
ctx.issues.push({
code: "custom",
origin: "custom",
message: "Expected a string",
input: ctx.value,
});
})
);
expect(z.safeParse(a, "hello")).toMatchObject({
success: true,
data: "hello",
});
expect(z.safeParse(a, 123)).toMatchObject({
success: false,
error: { issues: [{ code: "custom", message: "Expected a string" }] },
});
});
test("z.instanceof", () => {
class A {}
const a = z.instanceof(A);
expect(z.parse(a, new A())).toBeInstanceOf(A);
expect(() => z.parse(a, {})).toThrow();
});
test("z.refine", () => {
const a = z.number().check(
z.refine((val) => val > 3),
z.refine((val) => val < 10)
);
expect(z.parse(a, 5)).toEqual(5);
expect(() => z.parse(a, 2)).toThrow();
expect(() => z.parse(a, 11)).toThrow();
expect(() => z.parse(a, "hi")).toThrow();
});
// test("z.superRefine", () => {
// const a = z.number([
// z.superRefine((val, ctx) => {
// if (val < 3) {
// return ctx.addIssue({
// code: "custom",
// origin: "custom",
// message: "Too small",
// input: val,
// });
// }
// if (val > 10) {
// return ctx.addIssue("Too big");
// }
// }),
// ]);
// expect(z.parse(a, 5)).toEqual(5);
// expect(() => z.parse(a, 2)).toThrow();
// expect(() => z.parse(a, 11)).toThrow();
// expect(() => z.parse(a, "hi")).toThrow();
// });
test("z.transform", () => {
const a = z.transform((val: number) => {
return `${val}`;
});
type a_in = z.input<typeof a>;
expectTypeOf<a_in>().toEqualTypeOf<number>();
type a_out = z.output<typeof a>;
expectTypeOf<a_out>().toEqualTypeOf<string>();
expect(z.parse(a, 123)).toEqual("123");
});
test("z.$brand()", () => {
const a = z.string().brand<"my-brand">();
type a = z.output<typeof a>;
const branded = (_: a) => {};
// @ts-expect-error
branded("asdf");
});
test("z.lazy", () => {
const a = z.lazy(() => z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(z.parse(a, "hello")).toEqual("hello");
expect(() => z.parse(a, 123)).toThrow();
});
// schema that validates JSON-like data
test("z.json", () => {
const a = z.json();
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<util.JSONType>();
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, 123)).toEqual(123);
expect(z.parse(a, true)).toEqual(true);
expect(z.parse(a, null)).toEqual(null);
expect(z.parse(a, {})).toEqual({});
expect(z.parse(a, { a: "hello" })).toEqual({ a: "hello" });
expect(z.parse(a, [1, 2, 3])).toEqual([1, 2, 3]);
expect(z.parse(a, [{ a: "hello" }])).toEqual([{ a: "hello" }]);
// fail cases
expect(() => z.parse(a, new Date())).toThrow();
expect(() => z.parse(a, Symbol())).toThrow();
expect(() => z.parse(a, { a: new Date() })).toThrow();
expect(() => z.parse(a, undefined)).toThrow();
expect(() => z.parse(a, { a: undefined })).toThrow();
});
// promise
test("z.promise", async () => {
const a = z.promise(z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(await z.safeParseAsync(a, Promise.resolve("hello"))).toMatchObject({
success: true,
data: "hello",
});
expect(await z.safeParseAsync(a, Promise.resolve(123))).toMatchObject({
success: false,
});
const b = z.string();
expect(() => z.parse(b, Promise.resolve("hello"))).toThrow();
});
// test("type assertions", () => {
// const schema = z.pipe(
// z.string(),
// z.transform((val) => val.length)
// );
// schema.assertInput<string>();
// // @ts-expect-error
// schema.assertInput<number>();
// schema.assertOutput<number>();
// // @ts-expect-error
// schema.assertOutput<string>();
// });
test("isPlainObject", () => {
expect(z.core.util.isPlainObject({})).toEqual(true);
expect(z.core.util.isPlainObject(Object.create(null))).toEqual(true);
expect(z.core.util.isPlainObject([])).toEqual(false);
expect(z.core.util.isPlainObject(new Date())).toEqual(false);
expect(z.core.util.isPlainObject(null)).toEqual(false);
expect(z.core.util.isPlainObject(undefined)).toEqual(false);
expect(z.core.util.isPlainObject("string")).toEqual(false);
expect(z.core.util.isPlainObject(123)).toEqual(false);
expect(z.core.util.isPlainObject(Symbol())).toEqual(false);
});
test("def typing", () => {
z.string().def.type satisfies "string";
z.number().def.type satisfies "number";
z.bigint().def.type satisfies "bigint";
z.boolean().def.type satisfies "boolean";
z.date().def.type satisfies "date";
z.symbol().def.type satisfies "symbol";
z.undefined().def.type satisfies "undefined";
z.string().nullable().def.type satisfies "nullable";
z.null().def.type satisfies "null";
z.any().def.type satisfies "any";
z.unknown().def.type satisfies "unknown";
z.never().def.type satisfies "never";
z.void().def.type satisfies "void";
z.array(z.string()).def.type satisfies "array";
z.object({ key: z.string() }).def.type satisfies "object";
z.union([z.string(), z.number()]).def.type satisfies "union";
z.intersection(z.string(), z.number()).def.type satisfies "intersection";
z.tuple([z.string(), z.number()]).def.type satisfies "tuple";
z.record(z.string(), z.number()).def.type satisfies "record";
z.map(z.string(), z.number()).def.type satisfies "map";
z.set(z.string()).def.type satisfies "set";
z.literal("example").def.type satisfies "literal";
z.enum(["a", "b", "c"]).def.type satisfies "enum";
z.promise(z.string()).def.type satisfies "promise";
z.lazy(() => z.string()).def.type satisfies "lazy";
z.string().optional().def.type satisfies "optional";
z.string().default("default").def.type satisfies "default";
z.templateLiteral([z.literal("a"), z.literal("b")]).def.type satisfies "template_literal";
z.custom<string>((val) => typeof val === "string").def.type satisfies "custom";
z.transform((val) => val as string).def.type satisfies "transform";
z.string().optional().nonoptional().def.type satisfies "nonoptional";
z.object({ key: z.string() }).readonly().def.type satisfies "readonly";
z.nan().def.type satisfies "nan";
z.unknown().pipe(z.number()).def.type satisfies "pipe";
z.success(z.string()).def.type satisfies "success";
z.string().catch("fallback").def.type satisfies "catch";
z.file().def.type satisfies "file";
});
@@ -0,0 +1,115 @@
/**
* @import {Chunk, Code, Encoding, Value} from 'micromark-util-types'
*/
/**
* @callback Preprocessor
* Preprocess a value.
* @param {Value} value
* Value.
* @param {Encoding | null | undefined} [encoding]
* Encoding when `value` is a typed array (optional).
* @param {boolean | null | undefined} [end=false]
* Whether this is the last chunk (default: `false`).
* @returns {Array<Chunk>}
* Chunks.
*/
const search = /[\0\t\n\r]/g;
/**
* @returns {Preprocessor}
* Preprocess a value.
*/
export function preprocess() {
let column = 1;
let buffer = '';
/** @type {boolean | undefined} */
let start = true;
/** @type {boolean | undefined} */
let atCarriageReturn;
return preprocessor;
/** @type {Preprocessor} */
// eslint-disable-next-line complexity
function preprocessor(value, encoding, end) {
/** @type {Array<Chunk>} */
const chunks = [];
/** @type {RegExpMatchArray | null} */
let match;
/** @type {number} */
let next;
/** @type {number} */
let startPosition;
/** @type {number} */
let endPosition;
/** @type {Code} */
let code;
value = buffer + (typeof value === 'string' ? value.toString() : new TextDecoder(encoding || undefined).decode(value));
startPosition = 0;
buffer = '';
if (start) {
// To do: `markdown-rs` actually parses BOMs (byte order mark).
if (value.charCodeAt(0) === 65279) {
startPosition++;
}
start = undefined;
}
while (startPosition < value.length) {
search.lastIndex = startPosition;
match = search.exec(value);
endPosition = match && match.index !== undefined ? match.index : value.length;
code = value.charCodeAt(endPosition);
if (!match) {
buffer = value.slice(startPosition);
break;
}
if (code === 10 && startPosition === endPosition && atCarriageReturn) {
chunks.push(-3);
atCarriageReturn = undefined;
} else {
if (atCarriageReturn) {
chunks.push(-5);
atCarriageReturn = undefined;
}
if (startPosition < endPosition) {
chunks.push(value.slice(startPosition, endPosition));
column += endPosition - startPosition;
}
switch (code) {
case 0:
{
chunks.push(65533);
column++;
break;
}
case 9:
{
next = Math.ceil(column / 4) * 4;
chunks.push(-2);
while (column++ < next) chunks.push(-1);
break;
}
case 10:
{
chunks.push(-4);
column = 1;
break;
}
default:
{
atCarriageReturn = true;
column = 1;
}
}
}
startPosition = endPosition + 1;
}
if (end) {
if (atCarriageReturn) chunks.push(-5);
if (buffer) chunks.push(buffer);
chunks.push(null);
}
return chunks;
}
}
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.createUpdateEffect = void 0;
var _react = require("react");
var createUpdateEffect = exports.createUpdateEffect = function createUpdateEffect(hook) {
return function (effect, deps) {
var isMounted = (0, _react.useRef)(false);
// for react-refresh
hook(function () {
return function () {
isMounted.current = false;
};
}, []);
hook(function () {
if (!isMounted.current) {
isMounted.current = true;
} else {
return effect();
}
}, deps);
};
};
var _default = exports["default"] = createUpdateEffect;
@@ -0,0 +1,5 @@
import { EventType, OneBotEvent } from '../../event/OneBotEvent';
export declare abstract class OB11BaseNoticeEvent extends OneBotEvent {
post_type: EventType;
abstract notice_type: string;
}
@@ -0,0 +1,13 @@
/**
* ```asn1
* AttCertValidityPeriod ::= SEQUENCE {
* notBeforeTime GeneralizedTime,
* notAfterTime GeneralizedTime
* }
* ```
*/
export declare class AttCertValidityPeriod {
notBeforeTime: Date;
notAfterTime: Date;
constructor(params?: Partial<AttCertValidityPeriod>);
}
@@ -0,0 +1,12 @@
import type { Scope } from "./parser/tokenizer/state";
import type TokenProcessor from "./TokenProcessor";
/**
* Traverse the given tokens and modify them if necessary to indicate that some names shadow global
* variables.
*/
export default function identifyShadowedGlobals(tokens: TokenProcessor, scopes: Array<Scope>, globalNames: Set<string>): void;
/**
* We can do a fast up-front check to see if there are any declarations to global names. If not,
* then there's no point in computing scope assignments.
*/
export declare function hasShadowedGlobals(tokens: TokenProcessor, globalNames: Set<string>): boolean;
@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/formatProdErrorMessage.ts","../src/utils/symbol-observable.ts","../src/utils/actionTypes.ts","../src/utils/isPlainObject.ts","../src/createStore.ts","../src/combineReducers.ts","../src/bindActionCreators.ts","../src/compose.ts","../src/applyMiddleware.ts","../src/utils/isAction.ts"],"sourcesContent":["/**\n * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js\n *\n * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes\n * during build.\n * @param {number} code\n */\nexport function formatProdErrorMessage(code: number) {\n return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or ` + 'use the non-minified dev environment for full errors. ';\n}","declare global {\n interface SymbolConstructor {\n readonly observable: symbol;\n }\n}\nconst $$observable = /* #__PURE__ */(() => typeof Symbol === 'function' && Symbol.observable || '@@observable')();\nexport default $$observable;","/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\n\nconst randomString = () => Math.random().toString(36).substring(7).split('').join('.');\nconst ActionTypes = {\n INIT: `@@redux/INIT${/* #__PURE__ */randomString()}`,\n REPLACE: `@@redux/REPLACE${/* #__PURE__ */randomString()}`,\n PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`\n};\nexport default ActionTypes;","/**\n * @param obj The object to inspect.\n * @returns True if the argument appears to be a plain object.\n */\nexport default function isPlainObject(obj: any): obj is object {\n if (typeof obj !== 'object' || obj === null) return false;\n let proto = obj;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;\n}","import { formatProdErrorMessage as _formatProdErrorMessage13 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage12 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage11 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage10 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage9 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage8 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage7 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage6 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage5 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage4 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage3 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage2 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage } from \"src/utils/formatProdErrorMessage\";\nimport $$observable from './utils/symbol-observable';\nimport { Store, StoreEnhancer, Dispatch, Observer, ListenerCallback, UnknownIfNonSpecific } from './types/store';\nimport { Action } from './types/actions';\nimport { Reducer } from './types/reducers';\nimport ActionTypes from './utils/actionTypes';\nimport isPlainObject from './utils/isPlainObject';\nimport { kindOf } from './utils/kindOf';\n\n/**\n * @deprecated\n *\n * **We recommend using the `configureStore` method\n * of the `@reduxjs/toolkit` package**, which replaces `createStore`.\n *\n * Redux Toolkit is our recommended approach for writing Redux logic today,\n * including store setup, reducers, data fetching, and more.\n *\n * **For more details, please read this Redux docs page:**\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * `configureStore` from Redux Toolkit is an improved version of `createStore` that\n * simplifies setup and helps avoid common bugs.\n *\n * You should not be using the `redux` core package by itself today, except for learning purposes.\n * The `createStore` method from the core `redux` package will not be removed, but we encourage\n * all users to migrate to using Redux Toolkit for all Redux code.\n *\n * If you want to use `createStore` without this visual deprecation warning, use\n * the `legacy_createStore` import instead:\n *\n * `import { legacy_createStore as createStore} from 'redux'`\n *\n */\nexport functiLine truncated
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"C L M G N O P","33":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB 0C 1C"},D:{"16":"J ZB K D E F A B C L M G N O P","33":"0 1 2 3 4 5 6 7 8 9 aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB 2C ZC 3C","33":"K D E F A B C L M G 4C 5C 6C aC NC OC 7C 8C 9C bC"},F:{"2":"F B C FD GD HD ID NC uC JD OC","33":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{"1":"cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","16":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC"},H:{"2":"hD"},I:{"16":"TC J iD jD kD lD vC mD nD","33":"I"},J:{"16":"D A"},K:{"2":"A B C NC uC OC","33":"H"},L:{"16":"I"},M:{"1":"MC"},N:{"16":"A B"},O:{"16":"PC"},P:{"16":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"33":"zD"},R:{"16":"0D"},S:{"1":"1D 2D"}},B:4,C:"CSS print-color-adjust",D:true};
@@ -0,0 +1,208 @@
// Type definitions for winston 3.0
// Project: https://github.com/winstonjs/winston
/// <reference types="node" />
import * as NodeJSStream from 'stream';
import * as logform from 'logform';
import * as Transport from 'winston-transport';
import * as Config from './lib/winston/config/index';
import * as Transports from './lib/winston/transports/index';
declare namespace winston {
// Hoisted namespaces from other modules
export import format = logform.format;
export import Logform = logform;
export import config = Config;
export import transports = Transports;
export import transport = Transport;
class ExceptionHandler {
constructor(logger: Logger);
logger: Logger;
handlers: Map<any, any>;
catcher: Function | boolean;
handle(...transports: Transport[]): void;
unhandle(...transports: Transport[]): void;
getAllInfo(err: string | Error): object;
getProcessInfo(): object;
getOsInfo(): object;
getTrace(err: Error): object;
}
class RejectionHandler {
constructor(logger: Logger);
logger: Logger;
handlers: Map<any, any>;
catcher: Function | boolean;
handle(...transports: Transport[]): void;
unhandle(...transports: Transport[]): void;
getAllInfo(err: string | Error): object;
getProcessInfo(): object;
getOsInfo(): object;
getTrace(err: Error): object;
}
interface QueryOptions {
rows?: number;
limit?: number;
start?: number;
from?: Date;
until?: Date;
order?: 'asc' | 'desc';
fields: any;
}
class Profiler {
logger: Logger;
start: Number;
done(info?: any): boolean;
}
interface LogEntry {
level: string;
message: string;
[optionName: string]: any;
}
interface LogMethod {
(level: string, message: string, ...meta: any[]): Logger;
(entry: LogEntry): Logger;
(level: string, message: any): Logger;
}
interface LeveledLogMethod {
(message: string, ...meta: any[]): Logger;
(message: any): Logger;
(infoObject: object): Logger;
}
interface LoggerOptions {
levels?: Config.AbstractConfigSetLevels;
silent?: boolean;
format?: logform.Format;
level?: string;
exitOnError?: Function | boolean;
defaultMeta?: any;
transports?: Transport[] | Transport;
handleExceptions?: boolean;
handleRejections?: boolean;
exceptionHandlers?: any;
rejectionHandlers?: any;
}
class Logger extends NodeJSStream.Transform {
constructor(options?: LoggerOptions);
silent: boolean;
format: logform.Format;
levels: Config.AbstractConfigSetLevels;
level: string;
transports: Transport[];
exceptions: ExceptionHandler;
rejections: RejectionHandler;
profilers: object;
exitOnError: Function | boolean;
defaultMeta?: any;
log: LogMethod;
add(transport: Transport): this;
remove(transport: Transport): this;
clear(): this;
close(): this;
// for cli and npm levels
error: LeveledLogMethod;
warn: LeveledLogMethod;
help: LeveledLogMethod;
data: LeveledLogMethod;
info: LeveledLogMethod;
debug: LeveledLogMethod;
prompt: LeveledLogMethod;
http: LeveledLogMethod;
verbose: LeveledLogMethod;
input: LeveledLogMethod;
silly: LeveledLogMethod;
// for syslog levels only
emerg: LeveledLogMethod;
alert: LeveledLogMethod;
crit: LeveledLogMethod;
warning: LeveledLogMethod;
notice: LeveledLogMethod;
query(
options?: QueryOptions,
callback?: (err: Error, results: any) => void
): any;
stream(options?: any): NodeJS.ReadableStream;
startTimer(): Profiler;
profile(id: string | number, meta?: Record<string, any>): this;
configure(options: LoggerOptions): void;
child(options: Object): this;
isLevelEnabled(level: string): boolean;
isErrorEnabled(): boolean;
isWarnEnabled(): boolean;
isInfoEnabled(): boolean;
isVerboseEnabled(): boolean;
isDebugEnabled(): boolean;
isSillyEnabled(): boolean;
}
class Container {
loggers: Map<string, Logger>;
options: LoggerOptions;
add(id: string, options?: LoggerOptions): Logger;
get(id: string, options?: LoggerOptions): Logger;
has(id: string): boolean;
close(id?: string): void;
constructor(options?: LoggerOptions);
}
let version: string;
let loggers: Container;
let addColors: (target: Config.AbstractConfigSetColors) => any;
let createLogger: (options?: LoggerOptions) => Logger;
// Pass-through npm level methods routed to the default logger.
let error: LeveledLogMethod;
let warn: LeveledLogMethod;
let info: LeveledLogMethod;
let http: LeveledLogMethod;
let verbose: LeveledLogMethod;
let debug: LeveledLogMethod;
let silly: LeveledLogMethod;
// Other pass-through methods routed to the default logger.
let log: LogMethod;
let query: (
options?: QueryOptions,
callback?: (err: Error, results: any) => void
) => any;
let stream: (options?: any) => NodeJS.ReadableStream;
let add: (transport: Transport) => Logger;
let remove: (transport: Transport) => Logger;
let clear: () => Logger;
let startTimer: () => Profiler;
let profile: (id: string | number) => Logger;
let configure: (options: LoggerOptions) => void;
let child: (options: Object) => Logger;
let level: string;
let exceptions: ExceptionHandler;
let rejections: RejectionHandler;
let exitOnError: Function | boolean;
// let default: object;
}
export = winston;
@@ -0,0 +1,437 @@
'use strict';
var utils = require('../utils.js');
var utils$1 = require('@typescript-eslint/utils');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
const PREV_TOKEN = /^[)\]}>]$/u;
const NEXT_TOKEN = /^(?:[([{<~!]|\+\+?|--?)$/u;
const PREV_TOKEN_M = /^[)\]}>*]$/u;
const NEXT_TOKEN_M = /^[{*]$/u;
const TEMPLATE_OPEN_PAREN = /\$\{$/u;
const TEMPLATE_CLOSE_PAREN = /^\}/u;
const CHECK_TYPE = /^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u;
const KEYS = utils.KEYWORDS_JS.concat(["as", "async", "await", "from", "get", "let", "of", "satisfies", "set", "yield"]);
(function() {
KEYS.sort();
for (let i = 1; i < KEYS.length; ++i) {
if (KEYS[i] === KEYS[i - 1])
throw new Error(`Duplication was found in the keyword list: ${KEYS[i]}`);
}
})();
function isOpenParenOfTemplate(token) {
return token.type === "Template" && TEMPLATE_OPEN_PAREN.test(token.value);
}
function isCloseParenOfTemplate(token) {
return token.type === "Template" && TEMPLATE_CLOSE_PAREN.test(token.value);
}
var _baseRule = utils.createRule({
name: "keyword-spacing",
package: "js",
meta: {
type: "layout",
docs: {
description: "Enforce consistent spacing before and after keywords"
},
fixable: "whitespace",
schema: [
{
type: "object",
properties: {
before: { type: "boolean", default: true },
after: { type: "boolean", default: true },
overrides: {
type: "object",
properties: KEYS.reduce((retv, key) => {
retv[key] = {
type: "object",
properties: {
before: { type: "boolean" },
after: { type: "boolean" }
},
additionalProperties: false
};
return retv;
}, {}),
additionalProperties: false
}
},
additionalProperties: false
}
],
messages: {
expectedBefore: 'Expected space(s) before "{{value}}".',
expectedAfter: 'Expected space(s) after "{{value}}".',
unexpectedBefore: 'Unexpected space(s) before "{{value}}".',
unexpectedAfter: 'Unexpected space(s) after "{{value}}".'
}
},
create(context) {
const sourceCode = context.sourceCode;
const tokensToIgnore = /* @__PURE__ */ new WeakSet();
function expectSpaceBefore(token, pattern) {
const prevToken = sourceCode.getTokenBefore(token);
if (prevToken && (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) && !isOpenParenOfTemplate(prevToken) && !tokensToIgnore.has(prevToken) && utils.isTokenOnSameLine(prevToken, token) && !sourceCode.isSpaceBetweenTokens(prevToken, token)) {
context.report({
loc: token.loc,
messageId: "expectedBefore",
// @ts-expect-error index signature for string is missing
data: token,
fix(fixer) {
return fixer.insertTextBefore(token, " ");
}
});
}
}
function unexpectSpaceBefore(token, pattern) {
const prevToken = sourceCode.getTokenBefore(token);
if (prevToken && (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) && !isOpenParenOfTemplate(prevToken) && !tokensToIgnore.has(prevToken) && utils.isTokenOnSameLine(prevToken, token) && sourceCode.isSpaceBetweenTokens(prevToken, token)) {
context.report({
loc: { start: prevToken.loc.end, end: token.loc.start },
messageId: "unexpectedBefore",
// @ts-expect-error index signature for string is missing
data: token,
fix(fixer) {
return fixer.removeRange([prevToken.range[1], token.range[0]]);
}
});
}
}
function expectSpaceAfter(token, pattern) {
const nextToken = sourceCode.getTokenAfter(token);
if (nextToken && (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) && !isCloseParenOfTemplate(nextToken) && !tokensToIgnore.has(nextToken) && utils.isTokenOnSameLine(token, nextToken) && !sourceCode.isSpaceBetweenTokens(token, nextToken)) {
context.report({
loc: token.loc,
messageId: "expectedAfter",
// @ts-expect-error index signature for string is missing
data: token,
fix(fixer) {
return fixer.insertTextAfter(token, " ");
}
});
}
}
function unexpectSpaceAfter(token, pattern) {
const nextToken = sourceCode.getTokenAfter(token);
if (nextToken && (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) && !isCloseParenOfTemplate(nextToken) && !tokensToIgnore.has(nextToken) && utils.isTokenOnSameLine(token, nextToken) && sourceCode.isSpaceBetweenTokens(token, nextToken)) {
context.report({
loc: { start: token.loc.end, end: nextToken.loc.start },
messageId: "unexpectedAfter",
// @ts-expect-error index signature for string is missing
data: token,
fix(fixer) {
return fixer.removeRange([token.range[1], nextToken.range[0]]);
}
});
}
}
function parseOptions(options = {}) {
const before = options.before !== false;
const after = options.after !== false;
const defaultValue = {
before: before ? expectSpaceBefore : unexpectSpaceBefore,
after: after ? expectSpaceAfter : unexpectSpaceAfter
};
const overrides = options && options.overrides || {};
const retv = /* @__PURE__ */ Object.create(null);
for (let i = 0; i < KEYS.length; ++i) {
const key = KEYS[i];
const override = overrides[key];
if (override) {
const thisBefore = "before" in override ? override.before : before;
const thisAfter = "after" in override ? override.after : after;
retv[key] = {
before: thisBefore ? expectSpaceBefore : unexpectSpaceBefore,
after: thisAfter ? expectSpaceAfter : unexpectSpaceAfter
};
} else {
retv[key] = defaultValue;
}
}
return retv;
}
const checkMethodMap = parseOptions(context.options[0]);
function checkSpacingBefore(token, pattern) {
checkMethodMap[token.value].before(token, pattern || PREV_TOKEN);
}
function checkSpacingAfter(token, pattern) {
checkMethodMap[token.value].after(token, pattern || NEXT_TOKEN);
}
function checkSpacingAround(token) {
checkSpacingBefore(token);
checkSpacingAfter(token);
}
function checkSpacingAroundFirstToken(node) {
const firstToken = node && sourceCode.getFirstToken(node);
if (firstToken && firstToken.type === "Keyword")
checkSpacingAround(firstToken);
}
function checkSpacingBeforeFirstToken(node) {
const firstToken = node && sourceCode.getFirstToken(node);
if (firstToken && firstToken.type === "Keyword")
checkSpacingBefore(firstToken);
}
function checkSpacingAroundTokenBefore(node) {
if (node) {
const token = sourceCode.getTokenBefore(node, utils.isKeywordToken);
if (token)
checkSpacingAround(token);
}
}
function checkSpacingForFunction(node) {
const firstToken = node && sourceCode.getFirstToken(node);
if (firstToken && (firstToken.type === "Keyword" && firstToken.value === "function" || firstToken.value === "async")) {
checkSpacingBefore(firstToken);
}
}
function checkSpacingForClass(node) {
checkSpacingAroundFirstToken(node);
checkSpacingAroundTokenBefore(node.superClass);
}
function checkSpacingForIfStatement(node) {
checkSpacingAroundFirstToken(node);
checkSpacingAroundTokenBefore(node.alternate);
}
function checkSpacingForTryStatement(node) {
checkSpacingAroundFirstToken(node);
checkSpacingAroundFirstToken(node.handler);
checkSpacingAroundTokenBefore(node.finalizer);
}
function checkSpacingForDoWhileStatement(node) {
checkSpacingAroundFirstToken(node);
checkSpacingAroundTokenBefore(node.test);
}
function checkSpacingForForInStatement(node) {
checkSpacingAroundFirstToken(node);
const inToken = sourceCode.getTokenBefore(node.right, utils.isNotOpeningParenToken);
const previousToken = sourceCode.getTokenBefore(inToken);
if (previousToken.type !== "PrivateIdentifier")
checkSpacingBefore(inToken);
checkSpacingAfter(inToken);
}
function checkSpacingForForOfStatement(node) {
if (node.await) {
checkSpacingBefore(sourceCode.getFirstToken(node, 0));
checkSpacingAfter(sourceCode.getFirstToken(node, 1));
} else {
checkSpacingAroundFirstToken(node);
}
const ofToken = sourceCode.getTokenBefore(node.right, utils.isNotOpeningParenToken);
const previousToken = sourceCode.getTokenBefore(ofToken);
if (previousToken.type !== "PrivateIdentifier")
checkSpacingBefore(ofToken);
checkSpacingAfter(ofToken);
}
function checkSpacingForModuleDeclaration(node) {
const firstToken = sourceCode.getFirstToken(node);
checkSpacingBefore(firstToken, PREV_TOKEN_M);
checkSpacingAfter(firstToken, NEXT_TOKEN_M);
if (node.type === "ExportDefaultDeclaration")
checkSpacingAround(sourceCode.getTokenAfter(firstToken));
if (node.type === "ExportAllDeclaration" && node.exported) {
const asToken = sourceCode.getTokenBefore(node.exported);
checkSpacingBefore(asToken, PREV_TOKEN_M);
checkSpacingAfter(asToken, NEXT_TOKEN_M);
}
if ("source" in node && node.source) {
const fromToken = sourceCode.getTokenBefore(node.source);
checkSpacingBefore(fromToken, PREV_TOKEN_M);
checkSpacingAfter(fromToken, NEXT_TOKEN_M);
}
}
function checkSpacingForImportSpecifier(node) {
if (node.imported.range[0] !== node.local.range[0]) {
const asToken = sourceCode.getTokenBefore(node.local);
checkSpacingBefore(asToken, PREV_TOKEN_M);
}
}
function checkSpacingForExportSpecifier(node) {
if (node.local.range[0] !== node.exported.range[0]) {
const asToken = sourceCode.getTokenBefore(node.exported);
checkSpacingBefore(asToken, PREV_TOKEN_M);
checkSpacingAfter(asToken, NEXT_TOKEN_M);
}
}
function checkSpacingForImportNamespaceSpecifier(node) {
const asToken = sourceCode.getFirstToken(node, 1);
checkSpacingBefore(asToken, PREV_TOKEN_M);
}
function checkSpacingForProperty(node) {
if ("static" in node && node.static)
checkSpacingAroundFirstToken(node);
if (node.kind === "get" || node.kind === "set" || ("method" in node && node.method || node.type === "MethodDefinition") && "async" in node.value && node.value.async) {
const token = sourceCode.getTokenBefore(
node.key,
(tok) => {
switch (tok.value) {
case "get":
case "set":
case "async":
return true;
default:
return false;
}
}
);
if (!token)
throw new Error("Failed to find token get, set, or async beside method name");
checkSpacingAround(token);
}
}
function checkSpacingForAwaitExpression(node) {
checkSpacingBefore(sourceCode.getFirstToken(node));
}
return {
// Statements
"DebuggerStatement": checkSpacingAroundFirstToken,
"WithStatement": checkSpacingAroundFirstToken,
// Statements - Control flow
"BreakStatement": checkSpacingAroundFirstToken,
"ContinueStatement": checkSpacingAroundFirstToken,
"ReturnStatement": checkSpacingAroundFirstToken,
"ThrowStatement": checkSpacingAroundFirstToken,
"TryStatement": checkSpacingForTryStatement,
// Statements - Choice
"IfStatement": checkSpacingForIfStatement,
"SwitchStatement": checkSpacingAroundFirstToken,
"SwitchCase": checkSpacingAroundFirstToken,
// Statements - Loops
"DoWhileStatement": checkSpacingForDoWhileStatement,
"ForInStatement": checkSpacingForForInStatement,
"ForOfStatement": checkSpacingForForOfStatement,
"ForStatement": checkSpacingAroundFirstToken,
"WhileStatement": checkSpacingAroundFirstToken,
// Statements - Declarations
"ClassDeclaration": checkSpacingForClass,
"ExportNamedDeclaration": checkSpacingForModuleDeclaration,
"ExportDefaultDeclaration": checkSpacingForModuleDeclaration,
"ExportAllDeclaration": checkSpacingForModuleDeclaration,
"FunctionDeclaration": checkSpacingForFunction,
"ImportDeclaration": checkSpacingForModuleDeclaration,
"VariableDeclaration": checkSpacingAroundFirstToken,
// Expressions
"ArrowFunctionExpression": checkSpacingForFunction,
"AwaitExpression": checkSpacingForAwaitExpression,
"ClassExpression": checkSpacingForClass,
"FunctionExpression": checkSpacingForFunction,
"NewExpression": checkSpacingBeforeFirstToken,
"Super": checkSpacingBeforeFirstToken,
"ThisExpression": checkSpacingBeforeFirstToken,
"UnaryExpression": checkSpacingBeforeFirstToken,
"YieldExpression": checkSpacingBeforeFirstToken,
// Others
"ImportSpecifier": checkSpacingForImportSpecifier,
"ExportSpecifier": checkSpacingForExportSpecifier,
"ImportNamespaceSpecifier": checkSpacingForImportNamespaceSpecifier,
"MethodDefinition": checkSpacingForProperty,
"PropertyDefinition": checkSpacingForProperty,
"StaticBlock": checkSpacingAroundFirstToken,
"Property": checkSpacingForProperty,
// To avoid conflicts with `space-infix-ops`, e.g. `a > this.b`
"BinaryExpression[operator='>']": function(node) {
const operatorToken = sourceCode.getTokenBefore(node.right, utils.isNotOpeningParenToken);
tokensToIgnore.add(operatorToken);
}
};
}
});
const baseRule = /* @__PURE__ */ utils.castRuleModule(_baseRule);
const baseSchema = Array.isArray(baseRule.meta.schema) ? baseRule.meta.schema[0] : baseRule.meta.schema;
const schema = utils.deepMerge(
baseSchema,
{
properties: {
overrides: {
properties: {
type: baseSchema.properties.overrides.properties.import
}
}
}
}
);
var keywordSpacing = utils.createRule({
name: "keyword-spacing",
package: "ts",
meta: {
type: "layout",
docs: {
description: "Enforce consistent spacing before and after keywords"
},
fixable: "whitespace",
hasSuggestions: baseRule.meta.hasSuggestions,
schema: [schema],
messages: baseRule.meta.messages
},
defaultOptions: [{}],
create(context, [options]) {
const { after, overrides } = options ?? {};
const sourceCode = context.sourceCode;
const baseRules = baseRule.create(context);
return {
...baseRules,
TSAsExpression(node) {
const asToken = utils.nullThrows(
sourceCode.getTokenAfter(
node.expression,
(token) => token.value === "as"
),
utils.NullThrowsReasons.MissingToken("as", node.type)
);
const oldTokenType = asToken.type;
asToken.type = utils$1.AST_TOKEN_TYPES.Keyword;
baseRules.DebuggerStatement(asToken);
asToken.type = oldTokenType;
},
// TODO: Stage3: copy from `TSAsExpression`, just call `checkSpacingAroundFirstToken` when refactor
TSSatisfiesExpression(node) {
const satisfiesToken = utils.nullThrows(
sourceCode.getTokenAfter(
node.expression,
(token) => token.value === "satisfies"
),
utils.NullThrowsReasons.MissingToken("satisfies", node.type)
);
const oldTokenType = satisfiesToken.type;
satisfiesToken.type = utils$1.AST_TOKEN_TYPES.Keyword;
baseRules.DebuggerStatement(satisfiesToken);
satisfiesToken.type = oldTokenType;
},
"ImportDeclaration[importKind=type]": function(node) {
const { type: typeOptionOverride = {} } = overrides ?? {};
const typeToken = sourceCode.getFirstToken(node, { skip: 1 });
const punctuatorToken = sourceCode.getTokenAfter(typeToken);
if (node.specifiers?.[0]?.type === utils$1.AST_NODE_TYPES.ImportDefaultSpecifier)
return;
const spacesBetweenTypeAndPunctuator = punctuatorToken.range[0] - typeToken.range[1];
if ((typeOptionOverride.after ?? after) === true && spacesBetweenTypeAndPunctuator === 0) {
context.report({
loc: typeToken.loc,
messageId: "expectedAfter",
data: { value: "type" },
fix(fixer) {
return fixer.insertTextAfter(typeToken, " ");
}
});
}
if ((typeOptionOverride.after ?? after) === false && spacesBetweenTypeAndPunctuator > 0) {
context.report({
loc: typeToken.loc,
messageId: "unexpectedAfter",
data: { value: "type" },
fix(fixer) {
return fixer.removeRange([
typeToken.range[1],
typeToken.range[1] + spacesBetweenTypeAndPunctuator
]);
}
});
}
}
};
}
});
module.exports = keywordSpacing;
@@ -0,0 +1,15 @@
var GeneralNames_1;
import { __decorate } from "tslib";
import { AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { GeneralName } from "./general_name";
import { AsnArray } from "@peculiar/asn1-schema";
let GeneralNames = GeneralNames_1 = class GeneralNames extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, GeneralNames_1.prototype);
}
};
GeneralNames = GeneralNames_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: GeneralName })
], GeneralNames);
export { GeneralNames };
@@ -0,0 +1 @@
module.exports=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";r.__esModule=!0,r.default=function(e,r){if(e&&r){var t=Array.isArray(r)?r:r.split(",");if(0===t.length)return!0;var n=e.name||"",o=(e.type||"").toLowerCase(),u=o.replace(/\/.*$/,"");return t.some((function(e){var r=e.trim().toLowerCase();return"."===r.charAt(0)?n.toLowerCase().endsWith(r):r.endsWith("/*")?u===r.replace(/\/.*$/,""):o===r}))}return!0}}]);
@@ -0,0 +1,59 @@
import test from 'tape';
import { elementType } from 'jsx-ast-utils';
import isNonInteractiveRole from '../../../src/util/isNonInteractiveRole';
import {
genElementSymbol,
genInteractiveRoleElements,
genNonInteractiveRoleElements,
} from '../../../__mocks__/genInteractives';
test('isNonInteractiveRole', (t) => {
t.equal(
isNonInteractiveRole(undefined, []),
false,
'identifies JSX Components (no tagName) as non-interactive elements',
);
t.test('elements with a non-interactive role', (st) => {
genNonInteractiveRoleElements().forEach(({ openingElement }) => {
const { attributes } = openingElement;
st.equal(
isNonInteractiveRole(
elementType(openingElement),
attributes,
),
true,
`identifies \`${genElementSymbol(openingElement)}\` as a non-interactive role element`,
);
});
st.end();
});
t.equal(
isNonInteractiveRole('div', []),
false,
'does NOT identify elements without a role as non-interactive role elements',
);
t.test('elements with an interactive role', (st) => {
genInteractiveRoleElements().forEach(({ openingElement }) => {
const { attributes } = openingElement;
st.equal(
isNonInteractiveRole(
elementType(openingElement),
attributes,
),
false,
`does NOT identify \`${genElementSymbol(openingElement)}\` as a non-interactive role element`,
);
});
st.end();
});
t.end();
});
@@ -0,0 +1,6 @@
"use strict";
const addObject = require("./addObject-BB40bW2H.js");
function subtract(date, num, unit) {
return typeof num === "object" && num !== null ? addObject.addObject(date, num, -1) : addObject.addNumber(date, -num, unit);
}
module.exports = subtract;
@@ -0,0 +1,27 @@
import {tableNestedRows as $4ns2c$tableNestedRows} from "@react-stately/flags";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $f917ee10f4c32dab$export$1b95a7d2d517b841(props, state, ref) {
let { node: node, isVirtualized: isVirtualized } = props;
let rowProps = {
role: 'row'
};
if (isVirtualized && !((0, $4ns2c$tableNestedRows)() && 'expandedKeys' in state)) rowProps['aria-rowindex'] = node.index + 1; // aria-rowindex is 1 based
return {
rowProps: rowProps
};
}
export {$f917ee10f4c32dab$export$1b95a7d2d517b841 as useTableHeaderRow};
//# sourceMappingURL=useTableHeaderRow.module.js.map
@@ -0,0 +1,72 @@
import * as asn1js from "asn1js";
import type { BufferSource } from "pvtsutils";
import { IEmptyConstructor } from "./types";
/**
* Deserializes objects from ASN.1 encoded data
*/
export declare class AsnParser {
/**
* Deserializes an object from the ASN.1 encoded buffer
* @param data ASN.1 encoded buffer
* @param target Target schema for object deserialization
*/
static parse<T>(data: BufferSource, target: IEmptyConstructor<T>): T;
/**
* Deserializes an object from the asn1js object
* @param asn1Schema asn1js object
* @param target Target schema for object deserialization
*/
static fromASN<T>(asn1Schema: asn1js.AsnType, target: IEmptyConstructor<T>): T;
/**
* Handles Choice types with context tags (IMPLICIT) and IMPLICIT tagging
*/
private static handleChoiceTypes;
/**
* Handles SEQUENCE types with optional CHOICE fields and schema comparison
*/
private static handleSequenceTypes;
/**
* Processes repeated fields in manual mapping
*/
private static processRepeatedField;
/**
* Processes primitive fields in manual mapping
*/
private static processPrimitiveField;
/**
* Checks if a schema item is an optional CHOICE field
*/
private static isOptionalChoiceField;
/**
* Processes optional CHOICE fields in manual mapping
*/
private static processOptionalChoiceField;
/**
* Handles array types
*/
private static handleArrayTypes;
/**
* Processes all schema items
*/
private static processSchemaItems;
/**
* Processes primitive schema items
*/
private static processPrimitiveSchemaItem;
/**
* Processes repeated primitive items
*/
private static processRepeatedPrimitiveItem;
/**
* Processes single primitive items
*/
private static processSinglePrimitiveItem;
/**
* Processes complex schema items (SEQUENCE, SET, CHOICE)
*/
private static processComplexSchemaItem;
/**
* Handles IMPLICIT tagging for complex types
*/
private static handleImplicitTagging;
}
@@ -0,0 +1 @@
{"version":3,"file":"typescriptDesignParameterTypesReflectKey.d.ts","sourceRoot":"","sources":["../../../../src/reflectMetadata/data/typescriptDesignParameterTypesReflectKey.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kCAAkC,EAAE,MAA4B,CAAC"}
@@ -0,0 +1 @@
[{"key":"af","name":"Afrikaans"},{"key":"am","name":"Amharic"},{"key":"ar-dz","name":"Arabic (Algeria)"},{"key":"ar-iq","name":" Arabic (Iraq)"},{"key":"ar-kw","name":"Arabic (Kuwait)"},{"key":"ar-ly","name":"Arabic (Lybia)"},{"key":"ar-ma","name":"Arabic (Morocco)"},{"key":"ar-sa","name":"Arabic (Saudi Arabia)"},{"key":"ar-tn","name":" Arabic (Tunisia)"},{"key":"ar","name":"Arabic"},{"key":"az","name":"Azerbaijani"},{"key":"be","name":"Belarusian"},{"key":"bg","name":"Bulgarian"},{"key":"bi","name":"Bislama"},{"key":"bm","name":"Bambara"},{"key":"bn-bd","name":"Bengali (Bangladesh)"},{"key":"bn","name":"Bengali"},{"key":"bo","name":"Tibetan"},{"key":"br","name":"Breton"},{"key":"ca","name":"Catalan"},{"key":"bs","name":"Bosnian"},{"key":"cs","name":"Czech"},{"key":"cv","name":"Chuvash"},{"key":"cy","name":"Welsh"},{"key":"da","name":"Danish"},{"key":"de-at","name":"German (Austria)"},{"key":"de-ch","name":"German (Switzerland)"},{"key":"de","name":"German"},{"key":"dv","name":"Maldivian"},{"key":"el","name":"Greek"},{"key":"en-au","name":"English (Australia)"},{"key":"en-ca","name":"English (Canada)"},{"key":"en-gb","name":"English (United Kingdom)"},{"key":"en-ie","name":"English (Ireland)"},{"key":"en-il","name":"English (Israel)"},{"key":"en-in","name":"English (India)"},{"key":"en-nz","name":"English (New Zealand)"},{"key":"en-sg","name":"English (Singapore)"},{"key":"en-tt","name":"English (Trinidad & Tobago)"},{"key":"en","name":"English"},{"key":"eo","name":"Esperanto"},{"key":"es-pr","name":"Spanish (Puerto Rico)"},{"key":"es-mx","name":"Spanish (Mexico)"},{"key":"es-do","name":"Spanish (Dominican Republic)"},{"key":"es-us","name":"Spanish (United States)"},{"key":"es","name":"Spanish"},{"key":"et","name":"Estonian"},{"key":"eu","name":"Basque"},{"key":"fa","name":"Persian"},{"key":"fi","name":"Finnish"},{"key":"fo","name":"Faroese"},{"key":"fr-ca","name":"French (Canada)"},{"key":"fr-ch","name":"French (Switzerland)"},{"key":"fr","name":"French"},{"key":"fy","name":"Frisian"},{"key":"ga","name":"Irish or Irish Gaelic"},{"key":"gd","name":"Scottish Gaelic"},{"key":"gl","name":"Galician"},{"key":"gom-latn","name":"Konkani Latin script"},{"key":"gu","name":"Gujarati"},{"key":"he","name":"Hebrew"},{"key":"hi","name":"Hindi"},{"key":"hr","name":"Croatian"},{"key":"ht","name":"Haitian Creole (Haiti)"},{"key":"hu","name":"Hungarian"},{"key":"hy-am","name":"Armenian"},{"key":"id","name":"Indonesian"},{"key":"is","name":"Icelandic"},{"key":"it-ch","name":"Italian (Switzerland)"},{"key":"it","name":"Italian"},{"key":"ja","name":"Japanese"},{"key":"jv","name":"Javanese"},{"key":"ka","name":"Georgian"},{"key":"kk","name":"Kazakh"},{"key":"km","name":"Cambodian"},{"key":"kn","name":"Kannada"},{"key":"ko","name":"Korean"},{"key":"ku","name":"Kurdish"},{"key":"lb","name":"Luxembourgish"},{"key":"ky","name":"Kyrgyz"},{"key":"lo","name":"Lao"},{"key":"lt","name":"Lithuanian"},{"key":"lv","name":"Latvian"},{"key":"me","name":"Montenegrin"},{"key":"mi","name":"Maori"},{"key":"mk","name":"Macedonian"},{"key":"ml","name":"Malayalam"},{"key":"mn","name":"Mongolian"},{"key":"mr","name":"Marathi"},{"key":"ms-my","name":"Malay"},{"key":"ms","name":"Malay"},{"key":"mt","name":"Maltese (Malta)"},{"key":"my","name":"Burmese"},{"key":"nb","name":"Norwegian Bokmål"},{"key":"ne","name":"Nepalese"},{"key":"nl-be","name":"Dutch (Belgium)"},{"key":"nl","name":"Dutch"},{"key":"nn","name":"Nynorsk"},{"key":"oc-lnc","name":"Occitan, lengadocian dialecte"},{"key":"pa-in","name":"Punjabi (India)"},{"key":"pl","name":"Polish"},{"key":"pt-br","name":"Portuguese (Brazil)"},{"key":"pt","name":"Portuguese"},{"key":"rn","name":"Kirundi"},{"key":"ro","name":"Romanian"},{"key":"ru","name":"Russian"},{"key":"rw","name":"Kinyarwanda (Rwanda)"},{"key":"sd","name":"Sindhi"},{"key":"se","name":"Northern Sami"},{"key":"si","name":"Sinhalese"},{"key":"sk","name":"Slovak"},{"key":"sl","name":"Slovenian"},{"key":"sq","name":"Albanian"},{"key":"sr-cyrl","name":"Serbian Cyrillic"},{"key":"sr","name":"Serbian"},{"key":"ss","name":"siSwati"},{"key":"sv-fi","name":"Finland Swedish"},{"key":"sv","name":"Swedish"},{"key":"sw","name":"Swahili"},{"key":"ta","name":"Tamil"},{"key":"te","name":"Telugu"},{"key":"tet","name":"Tetun Dili (East Timor)"},{"key":"tg","name":"Tajik"},{"key":"th","name":"Thai"},{"key":"tk","name":"Turkmen"},{"key":"tl-ph","name":"Tagalog (Philippines)"},{"key":"tlh","name":"Klingon"},{"key":"tr","name":"Turkish"},{"key":"tzl","name":"Talossan"},{"key":"tzm-latn","name":"Central Atlas Tamazight Latin"},{"key":"tzm","name":"Central Atlas Tamazight"},{"key":"ug-cn","name":"Uyghur (China)"},{"key":"uk","name":"Ukrainian"},{"key":"ur","name":"Urdu"},{"key":"uz-latn","name":"Uzbek Latin"},{"key":"uz","name":"Uzbek"},{"key":"vi","name":"Vietnamese"},{"key":"x-pseudo","name":"Pseudo"},{"key":"yo","name":"Yoruba Nigeria"},{"key":"zh-cn","name":"Chinese (China)"},{"key":"zh-hk","name":"Chinese (Hong Kong)"},{"key":"zh-tw","name":"Chinese (TaiwanLine truncated
@@ -0,0 +1,19 @@
"use client";
import {
useDropdownContext
} from "./chunk-BV7BCS3N.mjs";
// src/dropdown-trigger.tsx
import { PopoverTrigger } from "@heroui/popover";
import { jsx } from "react/jsx-runtime";
var DropdownTrigger = (props) => {
const { getMenuTriggerProps } = useDropdownContext();
const { children, ...otherProps } = props;
return /* @__PURE__ */ jsx(PopoverTrigger, { ...getMenuTriggerProps(otherProps), children });
};
DropdownTrigger.displayName = "HeroUI.DropdownTrigger";
var dropdown_trigger_default = DropdownTrigger;
export {
dropdown_trigger_default
};
@@ -0,0 +1,18 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./discard"), exports);
@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":";;;AAEA,IAAM,YAAY,GAAG,CAAC,CAAC;AACvB,IAAM,OAAO,GAAG,IAAI,GAAG,YAAY,CAAC;AAEvB,QAAA,eAAe,GAAG,EAAE,CAAC;AACrB,QAAA,oBAAoB,GAA6B,EAAE,CAAC;AACpD,QAAA,4BAA4B,GAAuB;IAC9D,eAAe,EAAE,KAAK;IACtB,MAAM,EAAE,4BAAoB;CAC7B,CAAC;AACW,QAAA,uBAAuB,GAAG,EAAE,GAAG,OAAO,CAAC;AACvC,QAAA,cAAc,GAAG,uCAAuC,CAAC;AACzD,QAAA,mBAAmB,GAAG,GAAG,CAAC;AAC1B,QAAA,uBAAuB,GAAG,EAAE,CAAC;AAC7B,QAAA,6BAA6B,GAAG,IAAI,CAAC;AACrC,QAAA,sBAAsB,GAAG,EAAE,CAAC;AAC5B,QAAA,iBAAiB,GAAG;IAC/B,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,KAAK;CAChB,CAAC;AAEF,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,gEAAmB,CAAA;IACnB,uDAAc,CAAA;IACd,2CAAQ,CAAA;IACR,iDAAW,CAAA;IACX,+CAAU,CAAA;AACZ,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB;AAED,IAAM,oBAAoB,GAAG;IAC3B,IAAI,CAAC;QACH,OAAO,aAAa,IAAI,UAAU,CAAC;IACrC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAA;AAEY,QAAA,aAAa,GAAG,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,CAAC,OAAO,KAAK,aAAa,CAAC;AACxF,QAAA,sBAAsB,GAAG,CAAC,qBAAa,IAAI,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,14 @@
import baseForOwnRight from './_baseForOwnRight.js';
import createBaseEach from './_createBaseEach.js';
/**
* The base implementation of `_.forEachRight` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
*/
var baseEachRight = createBaseEach(baseForOwnRight, true);
export default baseEachRight;
@@ -0,0 +1 @@
{"name":"ahooks","version":"3.9.6","requiresBuild":false,"files":{"dist/ahooks.js":{"checkedAt":1794532111017,"integrity":"sha512-U65km+rFotlw4C8yA7b9f+HbXBrGuPa9oPhPQR2jkCdx3Q6vzOZq8qCkNjsuH0Vy3DaT4mI0tkKqT0Fd+WojIw==","mode":420,"size":96656},"es/useRequest/src/utils/cache.js":{"checkedAt":1794532111017,"integrity":"sha512-GJyO8fgp5C7a3jW+kFc4pNEhwj0n1ir07539SlnoQLkkefup9d1hmncPUTPyBDTIKZU+Ek4MnU7WWKh+qeSOmQ==","mode":420,"size":898},"lib/useRequest/src/utils/cache.js":{"checkedAt":1794532111017,"integrity":"sha512-YUB8w9E9Q1ZQ8krAOiwJinZgzlB02cBTGVMyZbqpj5f5s+zmA8ORUMMJTUb1EpgjzIRb78BZn4NY90Wx2wEVlQ==","mode":420,"size":1069},"es/useRequest/src/utils/cachePromise.js":{"checkedAt":1794532111017,"integrity":"sha512-AyYQrmxk6XJ2NdnWoRi6oQWdIEVwftUoCzVUxvL3sum4/fVbJhAIP1gAd2E9o4ti9PxVXJPIdN3SnXbZRYWVxg==","mode":420,"size":631},"lib/useRequest/src/utils/cachePromise.js":{"checkedAt":1794532111017,"integrity":"sha512-2wGCNuow42nzycshZ7/XscBHoSLMd/0WJUFDsYONXPPpQNSnJNcJGwb1nBwuni51SfyhS3gOpQ1c0LL8H/rnvQ==","mode":420,"size":770},"es/useRequest/src/utils/cacheSubscribe.js":{"checkedAt":1794532111017,"integrity":"sha512-GuMSEfAN98u6zRkQAdwFhfeF4ecaa8WBK7TP8bj7a2cH12XThaJ/U+06nus3piTtpwZgSKx+uOoS49UQSTYssw==","mode":420,"size":476},"lib/useRequest/src/utils/cacheSubscribe.js":{"checkedAt":1794532111018,"integrity":"sha512-lNnw6oCQZsZ4b79N+NJPKhXG3uCi+83pBiGQ78s0zk0l+HMFpmyuAbcVy0OXLBpctwJtoFHJveGGjyqVvh/DgA==","mode":420,"size":604},"es/utils/createEffectWithTarget.js":{"checkedAt":1794532111018,"integrity":"sha512-jo8xq4bo6qnCEbJkF6Wq0m3wPzKIZaBPwWlsdLJ3yDUO71X459tQ3Otln22bjjcIEp9blH/KGp3LjF6kBJTT4g==","mode":420,"size":1857},"lib/utils/createEffectWithTarget.js":{"checkedAt":1794532111018,"integrity":"sha512-wh/eBhNCKLF78ZYjmdade6ZMaj1ucVJ6YHGd4o1eFt2ej3WjxF9JfJIXoF4NsnTsHgUnqh+4wzjNPD0UOfpYgQ==","mode":420,"size":2064},"es/useDebounce/debounceOptions.js":{"checkedAt":1794532111018,"integrity":"sha512-TuHIj4w/TkzTTLbAAzm/nW0Db/St469J6HHMiWa4THKdi3VJKsxkE8mmZKwApXlYIjrBPEIp2oxi6+alPk94Pw==","mode":420,"size":11},"lib/useDebounce/debounceOptions.js":{"checkedAt":1794532111018,"integrity":"sha512-pRLwq+0eAKyIpWr1sdtudhJX8EnpZgLPPyh6DHdOB7Vu8CU7MxZR+JRzwvBpSZUIC9MiGmVd0ZVsyClt8LF9yQ==","mode":420,"size":79},"es/utils/depsAreSame.js":{"checkedAt":1794532111018,"integrity":"sha512-zj5oInhJfi2nxhmBk9YtERpaP0pZNpgDOO5Z1SipB1Kna7bLsFScz7g41Qrnec87Nvr+gJUPY8FgFn1a3BxWqw==","mode":420,"size":276},"lib/utils/depsAreSame.js":{"checkedAt":1794532111018,"integrity":"sha512-MfVMwX1UvVuS1M0iCiUqEc1q6THwv8rdKVi08Wyf5XGz389f8vXQOcjzKAYNCcdW5ORYjFcO2oM9fdYO2rk6RA==","mode":420,"size":377},"es/utils/depsEqual.js":{"checkedAt":1794532111018,"integrity":"sha512-6XlfQ5/svD4JatMMvoNuAJqYJrbW9wpk06lZLbCY1hhVuVFUggn7lO+XhBfpgd0qlRn7ODsM9GxxR6iRJh1wrA==","mode":420,"size":212},"lib/utils/depsEqual.js":{"checkedAt":1794532111019,"integrity":"sha512-BB3Y4ti3qWrQ6GaWFt8wK72ohrDXpFa9s+j4cUCADgFzwMlnWr1sgig9SH+u4IQpkUjF39Zw65N7X+kEB0SuLg==","mode":420,"size":496},"es/utils/domTarget.js":{"checkedAt":1794532111019,"integrity":"sha512-39Vo4Cxr1szXbGHzpDyv07xdI5d7+iF5eLxDkMbDmXjhWxxPbXhOKmSjPVfvig/Z7g1RUQIDJdYqK9+pHT02Fg==","mode":420,"size":496},"lib/utils/domTarget.js":{"checkedAt":1794532111019,"integrity":"sha512-w3yNJdDbsdyeMRCp8II14ID6mhR6W8cL7A8SNUJkAKiqRMQUOkxV/cmnjKOUQdcFH0TBG7timydgMQaoeYrsDw==","mode":420,"size":698},"es/useRequest/src/Fetch.js":{"checkedAt":1794532111019,"integrity":"sha512-tBEQ/v37T8TraDIdowyAGNnY85YNAcbeYLQCdOulXqre/eu0Sf4vWkE3rBEoWp/2GGNPO/070Va3vT7o20xDaA==","mode":420,"size":6932},"lib/useRequest/src/Fetch.js":{"checkedAt":1794532111019,"integrity":"sha512-1suEQG+ga5z1gtjmwDMBwpCU/LpuOoro2Io5WAph25Ryiiqe3QE9/n/HTXRrZw6EnIRSaR1MLF22q/jnkv+Wlw==","mode":420,"size":6295},"es/useFusionTable/fusionAdapter.js":{"checkedAt":1794532111019,"integrity":"sha512-5Mc0SaqIXrPo7Zx9tMc8yh5wbx0uEympaaTlA2k9xYrtNjNKHwCHciN2DLOAvbcAfhk842TXlUL+l0sUgp1sbA==","mode":420,"size":1610},"lib/useFusionTable/fusionAdapter.js":{"checkedAt":1794532111019,"integrity":"sha512-oAlEwVsM1aqz17rtuXZLZ+u2SANtwbvD0DsPrl1qpGG5IkAmjnmGRhUrbcg7drgLwfwJb2LaALSvLQJCEsAPnA==","mode":420,"size":1791},"es/utils/getDocumentOrShadow.js":{"checkedAt":1794532111019,"integrity":"sha512-+ENmxpNxbu5pr4egikwW6RNIuOpvjH7uCpmOUqKsZZf3+rbwq+FdIDgewGwkm+gMZs/wRuqh/QKSCIhYJ91D+w==","mode":420,"size":854},"lib/utils/getDocumentOrShadow.js":{"checkedAt":1794532111020,"integrity":"sha512-bmQl97xC6av0HlXRj5+M1+XgHaGgjpv9P76OhYosKN+lWnD2eUrgULg0Oi6kTc6UvqQ0dREGUSYT31TPpp/BaA==","mode":420,"size":984},"es/createDeepCompareEffect/index.js":{"checkedAt":1794532111020,"integrity":"sha512-zJsECAtErJNVQ1XThAeYKCVp/kjPYz5GUNUT5hSGTvvTt0Kack9U8wFqHsW9utxH+KxWoQ0r++WdEjFQx1OMyQ==","mode":420,"size":402},"es/createUpdateEffect/index.js":{"checkedAt":1794532111020,"integrity":"sha512-Kq+EeUnOQbD/3EfeICs/kHvB9Shcvb87FNOvcqf4LBw2C1gr+Dja1xfO3ItvmO/S3jWcGmV2Of9S894A3qSSfw==","mode":420,"size":503},"es/createUseStorageState/index.js":{"checkedAt":1794532111020,"integrity":"sha512-S3ZplzZ/Line truncated
@@ -0,0 +1,43 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("eslint-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Math.asinh` method.",
category: "ES2015",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-math-asinh.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"() {
const tracker = new ReferenceTracker(context.getScope())
for (const { node, path } of tracker.iterateGlobalReferences({
Math: {
asinh: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,57 @@
/**
* @fileoverview Types for object-schema package.
*/
/**
* Built-in validation strategies.
*/
export type BuiltInValidationStrategy =
| "array"
| "boolean"
| "number"
| "object"
| "object?"
| "string"
| "string!";
/**
* Built-in merge strategies.
*/
export type BuiltInMergeStrategy = "assign" | "overwrite" | "replace";
/**
* Property definition.
*/
export interface PropertyDefinition {
/**
* Indicates if the property is required.
*/
required: boolean;
/**
* The other properties that must be present when this property is used.
*/
requires?: string[];
/**
* The strategy to merge the property.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213
merge: BuiltInMergeStrategy | ((target: any, source: any) => any);
/**
* The strategy to validate the property.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213
validate: BuiltInValidationStrategy | ((value: any) => void);
/**
* The schema for the object value of this property.
*/
schema?: ObjectDefinition;
}
/**
* Object definition.
*/
export type ObjectDefinition = Record<string, PropertyDefinition>;
@@ -0,0 +1,5 @@
import type { TSchema } from '../schema/index';
import { type TExtract } from './extract';
import { type TTemplateLiteral, type TTemplateLiteralToUnion } from '../template-literal/index';
export type TExtractFromTemplateLiteral<L extends TTemplateLiteral, R extends TSchema> = (TExtract<TTemplateLiteralToUnion<L>, R>);
export declare function ExtractFromTemplateLiteral<L extends TTemplateLiteral, R extends TSchema>(L: L, R: R): TExtractFromTemplateLiteral<L, R>;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more