docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run

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

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"beaker.js","sources":["../../../src/icons/beaker.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Beaker\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNC41IDNoMTUiIC8+CiAgPHBhdGggZD0iTTYgM3YxNmEyIDIgMCAwIDAgMiAyaDhhMiAyIDAgMCAwIDItMlYzIiAvPgogIDxwYXRoIGQ9Ik02IDE0aDEyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/beaker\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Beaker = createLucideIcon('Beaker', [\n ['path', { d: 'M4.5 3h15', key: 'c7n0jr' }],\n ['path', { d: 'M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3', key: 'm1uhx7' }],\n ['path', { d: 'M6 14h12', key: '4cwo0f' }],\n]);\n\nexport default Beaker;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,16 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); class Transformer {
// Return true if anything was processed, false otherwise.
getPrefixCode() {
return "";
}
getHoistedCode() {
return "";
}
getSuffixCode() {
return "";
}
} exports.default = Transformer;
@@ -0,0 +1,30 @@
Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
Copyright (c) 2021-present The Fastify team <https://github.com/fastify/fastify#team>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* The names of any contributors may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* * *
The complete list of contributors can be found at:
- https://github.com/garycourt/uri-js/graphs/contributors
@@ -0,0 +1,722 @@
export default `flf2a$ 7 7 13 0 7 0 64 0
Font Author: ?
More Info:
https://web.archive.org/web/20120819044459/http://www.roysac.com/thedrawfonts-tdf.asp
FIGFont created with: http://patorjk.com/figfont-editor
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
██╗@
██║@
██║@
╚═╝@
██╗@
╚═╝@
@@
@
@
@
@
@
@
@@
██╗ ██╗ @
████████╗@
╚██╔═██╔╝@
████████╗@
╚██╔═██╔╝@
╚═╝ ╚═╝ @
@@
▄▄███▄▄·@
██╔════╝@
███████╗@
╚════██║@
███████║@
╚═▀▀▀══╝@
@@
██╗ ██╗@
╚═╝██╔╝@
██╔╝ @
██╔╝ @
██╔╝██╗@
╚═╝ ╚═╝@
@@
██╗ @
██║ @
████████╗@
██╔═██╔═╝@
██████║ @
╚═════╝ @
@@
@
@
@
@
@
@
@@
██╗@
██╔╝@
██║ @
██║ @
╚██╗@
╚═╝@
@@
██╗ @
╚██╗@
██║@
██║@
██╔╝@
╚═╝ @
@@
@
▄ ██╗▄@
████╗@
▀╚██╔▀@
╚═╝ @
@
@@
@
@
@
@
@
@
@@
@
@
@
@
▄█╗@
╚═╝@
@@
@
@
█████╗@
╚════╝@
@
@
@@
@
@
@
@
██╗@
╚═╝@
@@
██╗@
██╔╝@
██╔╝ @
██╔╝ @
██╔╝ @
╚═╝ @
@@
██████╗ @
██╔═████╗@
██║██╔██║@
████╔╝██║@
╚██████╔╝@
╚═════╝ @
@@
██╗@
███║@
╚██║@
██║@
██║@
╚═╝@
@@
██████╗ @
╚════██╗@
█████╔╝@
██╔═══╝ @
███████╗@
╚══════╝@
@@
██████╗ @
╚════██╗@
█████╔╝@
╚═══██╗@
██████╔╝@
╚═════╝ @
@@
██╗ ██╗@
██║ ██║@
███████║@
╚════██║@
██║@
╚═╝@
@@
███████╗@
██╔════╝@
███████╗@
╚════██║@
███████║@
╚══════╝@
@@
██████╗ @
██╔════╝ @
███████╗ @
██╔═══██╗@
╚██████╔╝@
╚═════╝ @
@@
███████╗@
╚════██║@
██╔╝@
██╔╝ @
██║ @
╚═╝ @
@@
█████╗ @
██╔══██╗@
╚█████╔╝@
██╔══██╗@
╚█████╔╝@
╚════╝ @
@@
█████╗ @
██╔══██╗@
╚██████║@
╚═══██║@
█████╔╝@
╚════╝ @
@@
@
██╗@
╚═╝@
██╗@
╚═╝@
@
@@
@
██╗@
╚═╝@
▄█╗@
▀═╝@
@
@@
██╗@
██╔╝@
██╔╝ @
╚██╗ @
╚██╗@
╚═╝@
@@
@
@
@
@
@
@
@@
██╗ @
╚██╗ @
╚██╗@
██╔╝@
██╔╝ @
╚═╝ @
@@
██████╗ @
╚════██╗@
▄███╔╝@
▀▀══╝ @
██╗ @
╚═╝ @
@@
██████╗ @
██╔═══██╗@
██║██╗██║@
██║██║██║@
╚█║████╔╝@
╚╝╚═══╝ @
@@
█████╗ @
██╔══██╗@
███████║@
██╔══██║@
██║ ██║@
╚═╝ ╚═╝@
@@
██████╗ @
██╔══██╗@
██████╔╝@
██╔══██╗@
██████╔╝@
╚═════╝ @
@@
██████╗@
██╔════╝@
██║ @
██║ @
╚██████╗@
╚═════╝@
@@
██████╗ @
██╔══██╗@
██║ ██║@
██║ ██║@
██████╔╝@
╚═════╝ @
@@
███████╗@
██╔════╝@
█████╗ @
██╔══╝ @
███████╗@
╚══════╝@
@@
███████╗@
██╔════╝@
█████╗ @
██╔══╝ @
██║ @
╚═╝ @
@@
██████╗ @
██╔════╝ @
██║ ███╗@
██║ ██║@
╚██████╔╝@
╚═════╝ @
@@
██╗ ██╗@
██║ ██║@
███████║@
██╔══██║@
██║ ██║@
╚═╝ ╚═╝@
@@
██╗@
██║@
██║@
██║@
██║@
╚═╝@
@@
██╗@
██║@
██║@
██ ██║@
╚█████╔╝@
╚════╝ @
@@
██╗ ██╗@
██║ ██╔╝@
█████╔╝ @
██╔═██╗ @
██║ ██╗@
╚═╝ ╚═╝@
@@
██╗ @
██║ @
██║ @
██║ @
███████╗@
╚══════╝@
@@
███╗ ███╗@
████╗ ████║@
██╔████╔██║@
██║╚██╔╝██║@
██║ ╚═╝ ██║@
╚═╝ ╚═╝@
@@
███╗ ██╗@
████╗ ██║@
██╔██╗ ██║@
██║╚██╗██║@
██║ ╚████║@
╚═╝ ╚═══╝@
@@
██████╗ @
██╔═══██╗@
██║ ██║@
██║ ██║@
╚██████╔╝@
╚═════╝ @
@@
██████╗ @
██╔══██╗@
██████╔╝@
██╔═══╝ @
██║ @
╚═╝ @
@@
██████╗ @
██╔═══██╗@
██║ ██║@
██║▄▄ ██║@
╚██████╔╝@
╚══▀▀═╝ @
@@
██████╗ @
██╔══██╗@
██████╔╝@
██╔══██╗@
██║ ██║@
╚═╝ ╚═╝@
@@
███████╗@
██╔════╝@
███████╗@
╚════██║@
███████║@
╚══════╝@
@@
████████╗@
╚══██╔══╝@
██║ @
██║ @
██║ @
╚═╝ @
@@
██╗ ██╗@
██║ ██║@
██║ ██║@
██║ ██║@
╚██████╔╝@
╚═════╝ @
@@
██╗ ██╗@
██║ ██║@
██║ ██║@
╚██╗ ██╔╝@
╚████╔╝ @
╚═══╝ @
@@
██╗ ██╗@
██║ ██║@
██║ █╗ ██║@
██║███╗██║@
╚███╔███╔╝@
╚══╝╚══╝ @
@@
██╗ ██╗@
╚██╗██╔╝@
╚███╔╝ @
██╔██╗ @
██╔╝ ██╗@
╚═╝ ╚═╝@
@@
██╗ ██╗@
╚██╗ ██╔╝@
╚████╔╝ @
╚██╔╝ @
██║ @
╚═╝ @
@@
███████╗@
╚══███╔╝@
███╔╝ @
███╔╝ @
███████╗@
╚══════╝@
@@
███╗@
██╔╝@
██║ @
██║ @
███╗@
╚══╝@
@@
@
@
@
@
@
@
@@
███╗@
╚██║@
██║@
██║@
███║@
╚══╝@
@@
███╗ @
██╔██╗@
╚═╝╚═╝@
@
@
@
@@
@
@
@
@
███████╗@
╚══════╝@
@@
@
@
@
@
@
@
@@
█████╗ @
██╔══██╗@
███████║@
██╔══██║@
██║ ██║@
╚═╝ ╚═╝@
@@
██████╗ @
██╔══██╗@
██████╔╝@
██╔══██╗@
██████╔╝@
╚═════╝ @
@@
██████╗@
██╔════╝@
██║ @
██║ @
╚██████╗@
╚═════╝@
@@
██████╗ @
██╔══██╗@
██║ ██║@
██║ ██║@
██████╔╝@
╚═════╝ @
@@
███████╗@
██╔════╝@
█████╗ @
██╔══╝ @
███████╗@
╚══════╝@
@@
███████╗@
██╔════╝@
█████╗ @
██╔══╝ @
██║ @
╚═╝ @
@@
██████╗ @
██╔════╝ @
██║ ███╗@
██║ ██║@
╚██████╔╝@
╚═════╝ @
@@
██╗ ██╗@
██║ ██║@
███████║@
██╔══██║@
██║ ██║@
╚═╝ ╚═╝@
@@
██╗@
██║@
██║@
██║@
██║@
╚═╝@
@@
██╗@
██║@
██║@
██ ██║@
╚█████╔╝@
╚════╝ @
@@
██╗ ██╗@
██║ ██╔╝@
█████╔╝ @
██╔═██╗ @
██║ ██╗@
╚═╝ ╚═╝@
@@
██╗ @
██║ @
██║ @
██║ @
███████╗@
╚══════╝@
@@
███╗ ███╗@
████╗ ████║@
██╔████╔██║@
██║╚██╔╝██║@
██║ ╚═╝ ██║@
╚═╝ ╚═╝@
@@
███╗ ██╗@
████╗ ██║@
██╔██╗ ██║@
██║╚██╗██║@
██║ ╚████║@
╚═╝ ╚═══╝@
@@
██████╗ @
██╔═══██╗@
██║ ██║@
██║ ██║@
╚██████╔╝@
╚═════╝ @
@@
██████╗ @
██╔══██╗@
██████╔╝@
██╔═══╝ @
██║ @
╚═╝ @
@@
██████╗ @
██╔═══██╗@
██║ ██║@
██║▄▄ ██║@
╚██████╔╝@
╚══▀▀═╝ @
@@
██████╗ @
██╔══██╗@
██████╔╝@
██╔══██╗@
██║ ██║@
╚═╝ ╚═╝@
@@
███████╗@
██╔════╝@
███████╗@
╚════██║@
███████║@
╚══════╝@
@@
████████╗@
╚══██╔══╝@
██║ @
██║ @
██║ @
╚═╝ @
@@
██╗ ██╗@
██║ ██║@
██║ ██║@
██║ ██║@
╚██████╔╝@
╚═════╝ @
@@
██╗ ██╗@
██║ ██║@
██║ ██║@
╚██╗ ██╔╝@
╚████╔╝ @
╚═══╝ @
@@
██╗ ██╗@
██║ ██║@
██║ █╗ ██║@
██║███╗██║@
╚███╔███╔╝@
╚══╝╚══╝ @
@@
██╗ ██╗@
╚██╗██╔╝@
╚███╔╝ @
██╔██╗ @
██╔╝ ██╗@
╚═╝ ╚═╝@
@@
██╗ ██╗@
╚██╗ ██╔╝@
╚████╔╝ @
╚██╔╝ @
██║ @
╚═╝ @
@@
███████╗@
╚══███╔╝@
███╔╝ @
███╔╝ @
███████╗@
╚══════╝@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@`
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MessageSquareShare = createLucideIcon("MessageSquareShare", [
["path", { d: "M21 12v3a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h7", key: "tqtdkg" }],
["path", { d: "M16 3h5v5", key: "1806ms" }],
["path", { d: "m16 8 5-5", key: "15mbrl" }]
]);
export { MessageSquareShare as default };
//# sourceMappingURL=message-square-share.js.map
@@ -0,0 +1,163 @@
import { buildRankedDictionary } from './utils/helper.mjs';
import l33tTable from './data/l33tTable.mjs';
import translationKeys from './data/translationKeys.mjs';
import TrieNode from './matcher/dictionary/variants/matching/unmunger/TrieNode.mjs';
import l33tTableToTrieNode from './matcher/dictionary/variants/matching/unmunger/l33tTableToTrieNode.mjs';
import { timeEstimationValuesDefaults, checkTimeEstimationValues } from './TimeEstimates.mjs';
class Options {
constructor(options = {}, customMatchers = {}) {
this.matchers = {};
this.l33tTable = l33tTable;
this.trieNodeRoot = l33tTableToTrieNode(l33tTable, new TrieNode());
this.dictionary = {
userInputs: []
};
this.rankedDictionaries = {};
this.rankedDictionariesMaxWordSize = {};
this.translations = translationKeys;
this.graphs = {};
this.useLevenshteinDistance = false;
this.levenshteinThreshold = 2;
this.l33tMaxSubstitutions = 100;
this.maxLength = 256;
this.wordSequenceNames = ['cardinalNumbers', 'ordinalNumbers', 'daysOfWeek', 'months', 'seasons', 'timePeriods', 'rainbowColors', 'directions', 'intermediateDirections', 'sizeProgression', 'militaryAlphabet', 'planets', 'zodiacSigns', 'chineseZodiac'];
this.timeEstimationValues = {
scoring: {
...timeEstimationValuesDefaults.scoring
},
attackTime: {
...timeEstimationValuesDefaults.attackTime
}
};
this.setOptions(options);
Object.entries(customMatchers).forEach(([name, matcher]) => {
this.addMatcher(name, matcher);
});
}
isWordSequence(key) {
return this.wordSequenceNames.some(name => key === name || key.startsWith(`${name}-`));
}
// eslint-disable-next-line max-statements,complexity
setOptions(options = {}) {
if (options.l33tTable) {
this.l33tTable = options.l33tTable;
this.trieNodeRoot = l33tTableToTrieNode(options.l33tTable, new TrieNode());
}
if (options.dictionary) {
this.dictionary = options.dictionary;
this.setRankedDictionaries();
}
if (options.translations) {
this.setTranslations(options.translations);
}
if (options.graphs) {
this.graphs = options.graphs;
}
if (options.useLevenshteinDistance !== undefined) {
this.useLevenshteinDistance = options.useLevenshteinDistance;
}
if (options.levenshteinThreshold !== undefined) {
this.levenshteinThreshold = options.levenshteinThreshold;
}
if (options.l33tMaxSubstitutions !== undefined) {
this.l33tMaxSubstitutions = options.l33tMaxSubstitutions;
}
if (options.maxLength !== undefined) {
this.maxLength = options.maxLength;
}
if (options.timeEstimationValues !== undefined) {
checkTimeEstimationValues(options.timeEstimationValues);
this.timeEstimationValues = {
scoring: {
...options.timeEstimationValues.scoring
},
attackTime: {
...options.timeEstimationValues.attackTime
}
};
}
}
setTranslations(translations) {
if (this.checkCustomTranslations(translations)) {
this.translations = translations;
} else {
throw new Error('Invalid translations object fallback to keys');
}
}
checkCustomTranslations(translations) {
let valid = true;
Object.keys(translationKeys).forEach(type => {
if (type in translations) {
const translationType = type;
Object.keys(translationKeys[translationType]).forEach(key => {
if (!(key in translations[translationType])) {
valid = false;
}
const translation = translations[translationType][key];
if (typeof translation !== 'string' && typeof translation !== 'function') {
valid = false;
}
});
} else {
valid = false;
}
});
return valid;
}
setRankedDictionaries() {
const rankedDictionaries = {};
const rankedDictionariesMaxWorkSize = {};
Object.keys(this.dictionary).forEach(name => {
rankedDictionaries[name] = buildRankedDictionary(this.dictionary[name]);
rankedDictionariesMaxWorkSize[name] = this.getRankedDictionariesMaxWordSize(this.dictionary[name]);
});
this.rankedDictionaries = rankedDictionaries;
this.rankedDictionariesMaxWordSize = rankedDictionariesMaxWorkSize;
}
getRankedDictionariesMaxWordSize(list) {
const data = list.map(el => {
if (typeof el !== 'string') {
return el.toString().length;
}
return el.length;
});
// do not use Math.max(...data) because it can result in max stack size error because every entry will be used as an argument
if (data.length === 0) {
return 0;
}
return data.reduce((a, b) => Math.max(a, b), -Infinity);
}
buildSanitizedRankedDictionary(list) {
const sanitizedInputs = [];
list.forEach(input => {
const inputType = typeof input;
if (inputType === 'string' || inputType === 'number' || inputType === 'boolean') {
sanitizedInputs.push(input.toString().toLowerCase());
}
});
return buildRankedDictionary(sanitizedInputs);
}
getUserInputsOptions(dictionary) {
let rankedDictionary = {};
let rankedDictionaryMaxWordSize = 0;
if (dictionary) {
rankedDictionary = this.buildSanitizedRankedDictionary(dictionary);
rankedDictionaryMaxWordSize = this.getRankedDictionariesMaxWordSize(dictionary);
}
return {
rankedDictionary,
rankedDictionaryMaxWordSize
};
}
addMatcher(name, matcher) {
if (this.matchers[name]) {
console.info(`Matcher ${name} already exists`);
} else {
this.matchers[name] = matcher;
}
}
}
export { Options as default };
//# sourceMappingURL=Options.mjs.map
@@ -0,0 +1,77 @@
'use strict'
const test = require('tape')
const fastURI = require('..')
const MALFORMED_PERCENT_ERROR = 'URI contains malformed percent-encoding.'
const malformedComponents = [
['path', 'x://example.test/a%'],
['path with one trailing hex digit', 'x://example.test/a%2'],
['path with non-hex digits', 'x://example.test/a%GG'],
['host', 'x://exa%mple.test/path'],
['userinfo', 'x://us%er@example.test/path'],
['query', 'x://example.test/path?q=%G0'],
['fragment', 'x://example.test/path#frag%1']
]
test('parse reports malformed percent syntax in generic URI components', (t) => {
for (const [component, uri] of malformedComponents) {
t.equal(fastURI.parse(uri).error, MALFORMED_PERCENT_ERROR, component)
}
t.end()
})
test('normalize preserves malformed percent input unchanged', (t) => {
for (const [component, uri] of malformedComponents) {
t.equal(fastURI.normalize(uri), uri, component)
}
t.end()
})
test('equal does not equate malformed input with repaired valid input', (t) => {
const cases = [
['x://example.test/a%', 'x://example.test/a%25'],
['x://exa%mple.test/path', 'x://exa%25mple.test/path'],
['x://us%er@example.test/path', 'x://us%25er@example.test/path'],
['x://example.test/path?q=%', 'x://example.test/path?q=%25'],
['x://example.test/path#%', 'x://example.test/path#%25']
]
for (const [malformed, repaired] of cases) {
t.equal(fastURI.equal(malformed, repaired, {}), false, malformed)
}
t.end()
})
test('resolve rejects malformed percent syntax in either input', (t) => {
t.throws(
() => fastURI.resolve('x://example.test/base%', 'child'),
/URI contains malformed percent-encoding\./,
'malformed base'
)
t.throws(
() => fastURI.resolve('x://example.test/base', 'child%'),
/URI contains malformed percent-encoding\./,
'malformed relative reference'
)
t.end()
})
test('valid percent octets remain valid without UTF-8 validation', (t) => {
const uri = '/%ff?q=%80#%fe'
const parsed = fastURI.parse(uri)
t.equal(parsed.error, undefined, 'non-UTF-8 octets are valid percent syntax')
t.equal(parsed.path, '/%FF', 'path octet is preserved and hex is uppercased')
t.equal(parsed.query, 'q=%80', 'query octet is preserved')
t.equal(parsed.fragment, '%FE', 'fragment octet is preserved and hex is uppercased')
t.equal(fastURI.normalize(uri), '/%FF?q=%80#%FE', 'normalization preserves the octets')
const allGenericComponents = fastURI.parse('x://u%2f@exa%2fmple.test/%2f?q=%2f#%2f')
t.equal(allGenericComponents.error, undefined, 'valid escapes are accepted in every generic component')
const ipv6Zone = fastURI.parse('//[2001:db8::7%en0]')
t.equal(ipv6Zone.error, undefined, 'historically accepted raw IPv6 zone separator is unchanged')
t.end()
})
@@ -0,0 +1 @@
{"version":3,"file":"table-columns-split.js","sources":["../../../src/icons/table-columns-split.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TableColumnsSplit\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTQgMTR2MiIgLz4KICA8cGF0aCBkPSJNMTQgMjB2MiIgLz4KICA8cGF0aCBkPSJNMTQgMnYyIiAvPgogIDxwYXRoIGQ9Ik0xNCA4djIiIC8+CiAgPHBhdGggZD0iTTIgMTVoOCIgLz4KICA8cGF0aCBkPSJNMiAzaDZhMiAyIDAgMCAxIDIgMnYxNGEyIDIgMCAwIDEtMiAySDIiIC8+CiAgPHBhdGggZD0iTTIgOWg4IiAvPgogIDxwYXRoIGQ9Ik0yMiAxNWgtNCIgLz4KICA8cGF0aCBkPSJNMjIgM2gtMmEyIDIgMCAwIDAtMiAydjE0YTIgMiAwIDAgMCAyIDJoMiIgLz4KICA8cGF0aCBkPSJNMjIgOWgtNCIgLz4KICA8cGF0aCBkPSJNNSAzdjE4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/table-columns-split\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst TableColumnsSplit = createLucideIcon('TableColumnsSplit', [\n ['path', { d: 'M14 14v2', key: 'w2a1xv' }],\n ['path', { d: 'M14 20v2', key: '1lq872' }],\n ['path', { d: 'M14 2v2', key: '6buw04' }],\n ['path', { d: 'M14 8v2', key: 'i67w9a' }],\n ['path', { d: 'M2 15h8', key: '82wtch' }],\n ['path', { d: 'M2 3h6a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H2', key: 'up0l64' }],\n ['path', { d: 'M2 9h8', key: 'yelfik' }],\n ['path', { d: 'M22 15h-4', key: '1es58f' }],\n ['path', { d: 'M22 3h-2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h2', key: 'pdjoqf' }],\n ['path', { d: 'M22 9h-4', key: '1luja7' }],\n ['path', { d: 'M5 3v18', key: '14hmio' }],\n]);\n\nexport default TableColumnsSplit;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,624 @@
# Errors
<!--introduced_in=v1.0.0-->
<!--type=module-->
<!-- source_link=lib/core/errors.js -->
> Stability: 2 - Stable
undici raises typed error objects so that failures can be distinguished
programmatically. Every error class is exposed through the `errors` namespace of
the package:
```js
import { errors } from 'undici'
if (err instanceof errors.ConnectTimeoutError) {
// handle connect timeout
}
```
All errors, except [`HTTPParserError`][] and `WebAssemblyNotSupportedError`, extend [`UndiciError`][]. Each error
carries a stable `code` string (for example `UND_ERR_CONNECT_TIMEOUT`) and a
`name`.
Because the bundled (global) dispatcher may come from a different undici version
than the one you import directly, prefer matching on `error.code` rather than
`instanceof errors.UndiciError`:
```js
if (err.code === 'UND_ERR_CONNECT_TIMEOUT') {
// handle connect timeout
}
```
## Timeout-related errors
The timeout errors below are controlled by dispatcher/client options:
| Error code | When it is thrown | Related option |
| ---------- | ----------------- | -------------- |
| `UND_ERR_CONNECT_TIMEOUT` | A connection could not be established before the connection timeout elapsed. | [`connect.timeout`](Client.md) |
| `UND_ERR_HEADERS_TIMEOUT` | The full response headers were not received before the headers timeout elapsed. | [`headersTimeout`](Client.md) |
| `UND_ERR_BODY_TIMEOUT` | While reading the response body, no new data arrived before the body timeout elapsed. | [`bodyTimeout`](Client.md) |
| `UND_ERR_SOCKET` | A generic socket-level failure happened. | Inspect `error.socket` for connection details. |
### Configuring timeouts for `fetch`
If you are using `fetch` (including Node.js built-in `fetch`), configure timeouts
through the global dispatcher:
```js
import { Agent, setGlobalDispatcher, fetch } from 'undici'
setGlobalDispatcher(new Agent({
connect: { timeout: 10_000 }, // connection phase
headersTimeout: 15_000, // wait for response headers
bodyTimeout: 30_000 // wait between response body chunks
}))
await fetch('https://example.com/data')
```
You can inspect timeout error codes from `error.code` or (for wrapped fetch
errors) from `error.cause?.code`.
## Class: `UndiciError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made `UndiciError` and its subclasses reliable with `instanceof`
across realms and undici versions.
-->
* Extends: {Error}
The base class for all undici errors. It is reliable with `instanceof` even when
the error originates from a different undici version, because the check is based
on a well-known symbol rather than the prototype chain.
* `name` {string} Always `'UndiciError'`.
* `code` {string} Always `'UND_ERR'`.
## Class: `WebAssemblyNotSupportedError`
* Extends: {Error}
WebAssembly is unavailable when Undici initializes its HTTP/1 parser. Undici does
not provide an alternative parser for environments without WebAssembly, including
Node.js configurations where `--jitless` disables it. The check is performed when
the parser is needed, not when importing Undici or accessing `fetch`.
* `name` {string} Always `'Error'`.
* `code` {string} Always `'ERR_WEBASSEMBLY_NOT_SUPPORTED'`.
* `message` {string} By default `'WebAssembly is not supported in this environment, but is required for HTTP/1 parsing'`.
Client and dispatcher requests report this error directly. `fetch` rejects with
a `TypeError` whose `cause` is this error:
```js
try {
await fetch('http://localhost:3000')
} catch (error) {
if (error.cause?.code === 'ERR_WEBASSEMBLY_NOT_SUPPORTED') {
// HTTP/1 parsing requires WebAssembly in this environment.
}
}
```
`Headers`, `FormData`, `Request`, `Response`, and other operations that do not need
the HTTP/1 parser remain usable without WebAssembly.
## Class: `ConnectTimeoutError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
The socket was destroyed because establishing the connection exceeded the
`connectTimeout` option.
* `name` {string} Always `'ConnectTimeoutError'`.
* `code` {string} Always `'UND_ERR_CONNECT_TIMEOUT'`.
When `autoSelectFamily` is enabled and every attempted address times out, Node.js
raises an `AggregateError`. undici normalizes these multi-address timeouts into a
`ConnectTimeoutError` so that the error shape is the same regardless of whether
Node.js's per-address timer or undici's `connectTimeout` wins the race. The
original `AggregateError` is preserved on `error.cause`.
## Class: `HeadersTimeoutError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
The socket was destroyed because receiving the response headers exceeded the
`headersTimeout` option.
* `name` {string} Always `'HeadersTimeoutError'`.
* `code` {string} Always `'UND_ERR_HEADERS_TIMEOUT'`.
## Class: `HeadersOverflowError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
The socket was destroyed because the response headers exceeded the maximum
allowed size.
* `name` {string} Always `'HeadersOverflowError'`.
* `code` {string} Always `'UND_ERR_HEADERS_OVERFLOW'`.
## Class: `BodyTimeoutError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
The socket was destroyed because reading the response body exceeded the
`bodyTimeout` option.
* `name` {string} Always `'BodyTimeoutError'`.
* `code` {string} Always `'UND_ERR_BODY_TIMEOUT'`.
## Class: `InvalidArgumentError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
An invalid argument was passed to an undici API.
* `name` {string} Always `'InvalidArgumentError'`.
* `code` {string} Always `'UND_ERR_INVALID_ARG'`.
## Class: `InvalidReturnValueError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
A user-supplied callback or interceptor returned an invalid value.
* `name` {string} Always `'InvalidReturnValueError'`.
* `code` {string} Always `'UND_ERR_INVALID_RETURN_VALUE'`.
## Class: `AbortError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
The operation was aborted. This is the base class of [`RequestAbortedError`][].
* `name` {string} Always `'AbortError'`.
* `code` {string} Always `'UND_ERR_ABORT'`.
## Class: `RequestAbortedError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {AbortError}
The request was aborted by the user, typically through an `AbortSignal`.
* `name` {string} Always `'AbortError'`.
* `code` {string} Always `'UND_ERR_ABORTED'`.
## Class: `InformationalError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
An expected error carrying a reason, used internally to surface a cause for a
failed or retried request (for example as the `cause` of another error).
* `name` {string} Always `'InformationalError'`.
* `code` {string} Always `'UND_ERR_INFO'`.
## Class: `RequestContentLengthMismatchError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
The length of the request body did not match the `content-length` header.
* `name` {string} Always `'RequestContentLengthMismatchError'`.
* `code` {string} Always `'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'`.
## Class: `ResponseContentLengthMismatchError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
The length of the response body did not match the `content-length` header.
* `name` {string} Always `'ResponseContentLengthMismatchError'`.
* `code` {string} Always `'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'`.
## Class: `ClientDestroyedError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
An operation was attempted on a client that has already been destroyed.
* `name` {string} Always `'ClientDestroyedError'`.
* `code` {string} Always `'UND_ERR_DESTROYED'`.
## Class: `ClientClosedError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
An operation was attempted on a client that has already been closed.
* `name` {string} Always `'ClientClosedError'`.
* `code` {string} Always `'UND_ERR_CLOSED'`.
## Class: `SocketError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
An error occurred on the underlying socket.
* `name` {string} Always `'SocketError'`.
* `code` {string} Always `'UND_ERR_SOCKET'`.
* `socket` {SocketInfo|null} Metadata about the socket at the time of the error,
or `null` when no socket information is available.
The `socket` property, when present, holds the following fields:
```ts
interface SocketInfo {
localAddress?: string
localPort?: number
remoteAddress?: string
remotePort?: number
remoteFamily?: string
timeout?: number
bytesWritten?: number
bytesRead?: number
}
```
## Class: `NotSupportedError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
Unsupported functionality was requested.
* `name` {string} Always `'NotSupportedError'`.
* `code` {string} Always `'UND_ERR_NOT_SUPPORTED'`.
## Class: `BalancedPoolMissingUpstreamError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
No upstream has been added to the [`BalancedPool`][].
* `name` {string} Always `'MissingUpstreamError'`.
* `code` {string} Always `'UND_ERR_BPL_MISSING_UPSTREAM'`.
## Class: `HTTPParserError`
<!-- YAML
added: v4.0.0
-->
* Extends: {Error}
An error occurred while parsing the HTTP response. Unlike the other error
classes, `HTTPParserError` extends {Error} directly rather than
[`UndiciError`][].
* `name` {string} Always `'HTTPParserError'`.
* `code` {string} An `HPE_`-prefixed parser error code, or `undefined` when no
code was provided.
* `data` {string} The raw data associated with the parser failure, or
`undefined` when none was provided.
## Class: `ResponseExceededMaxSizeError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
The response body exceeded the maximum allowed size.
* `name` {string} Always `'ResponseExceededMaxSizeError'`.
* `code` {string} Always `'UND_ERR_RES_EXCEEDED_MAX_SIZE'`.
## Class: `RequestRetryError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
A request failed and could not be retried, for example because the body is
stateful (a stream or `AsyncIterable`) and cannot be replayed.
* `name` {string} Always `'RequestRetryError'`.
* `code` {string} Always `'UND_ERR_REQ_RETRY'`.
* `statusCode` {number} The HTTP status code of the failed response.
* `data` {Object} Retry metadata.
* `count` {number} The number of retry attempts that were made.
* `headers` {Record<string, string|string[]>} The response headers.
### `new RequestRetryError(message, code, options)`
* `message` {string} The error message.
* `code` {number} The HTTP status code of the failed response.
* `options` {Object}
* `headers` {Object|string[]|null} The response headers. (optional)
* `data` {Object|string|null} Retry metadata. (optional)
## Class: `ResponseError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
The response returned an error status code. This is raised, for example, when the
`throwOnError` option is enabled.
* `name` {string} Always `'ResponseError'`.
* `code` {string} Always `'UND_ERR_RESPONSE'`.
* `statusCode` {number} The HTTP status code of the response.
* `body` {Object|string|null} The response body.
* `bodyTruncated` {boolean} Whether `body` was truncated by a configured limit.
* `headers` {Object|string[]|null} The response headers.
### `new ResponseError(message, code, options)`
* `message` {string} The error message.
* `code` {number} The HTTP status code of the response.
* `options` {Object}
* `headers` {Object|string[]|null} The response headers. (optional)
* `body` {Object|string|null} The response body. (optional)
* `bodyTruncated` {boolean} Whether `body` was truncated. **Default:** `false`.
## Class: `ProxyConnectionError`
<!-- YAML
added: v8.10.1
changes:
- version: v8.10.1
pr-url: https://github.com/nodejs/undici/pull/5707
description: Added to fail the request instead of retrying forever when the proxy connection is torn down.
-->
* Extends: {UndiciError}
A connection to the proxy failed in a way that cannot be recovered on the
same connection, so the request fails instead of being retried.
* `name` {string} Always `'ProxyConnectionError'`.
* `code` {string} Always `'UND_ERR_PRX_CONN'`.
* `cause` {Error} The underlying error that caused the proxy connection to fail.
### `new ProxyConnectionError(cause[, message[, options]])`
* `cause` {Error} The underlying error. (optional)
* `message` {string} The error message. (optional)
* `options` {Object} Additional `Error` options merged with `cause`. (optional)
## Class: `SecureProxyConnectionError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4472
description: Made the error reliable with `instanceof`.
-->
* Extends: {UndiciError}
A TLS connection to a proxy failed.
* `name` {string} Always `'SecureProxyConnectionError'`.
* `code` {string} Always `'UND_ERR_PRX_TLS'`.
* `cause` {Error} The underlying error that caused the proxy connection to fail.
### `new SecureProxyConnectionError(cause[, message[, options]])`
* `cause` {Error} The underlying error. (optional)
* `message` {string} The error message. (optional)
* `options` {Object} Additional `Error` options merged with `cause`. (optional)
## Class: `MaxOriginsReachedError`
<!-- YAML
added: v1.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4365
description: Added to support capping the number of origins in `Agent`.
-->
* Extends: {UndiciError}
The maximum number of allowed origins has been reached.
* `name` {string} Always `'MaxOriginsReachedError'`.
* `code` {string} Always `'UND_ERR_MAX_ORIGINS_REACHED'`.
## Class: `MaxRedirectsError`
<!-- YAML
added: v8.12.0
-->
* Extends: {UndiciError}
The maximum number of redirects has been reached.
* `name` {string} Always `'MaxRedirectsError'`.
* `code` {string} Always `'UND_ERR_REDIRECT_MAX'`.
## Class: `Socks5ProxyError`
<!-- YAML
added: v7.23.0
-->
* Extends: {UndiciError}
An error occurred during SOCKS5 proxy negotiation.
* `name` {string} Always `'Socks5ProxyError'`.
* `code` {string} The error code. **Default:** `'UND_ERR_SOCKS5'`.
### `new Socks5ProxyError([message[, code]])`
* `message` {string} The error message. (optional)
* `code` {string} The error code. **Default:** `'UND_ERR_SOCKS5'`. (optional)
## Class: `MessageSizeExceededError`
<!-- YAML
added: v1.0.0
-->
* Extends: {UndiciError}
A decompressed WebSocket message exceeded the maximum allowed size.
* `name` {string} Always `'MessageSizeExceededError'`.
* `code` {string} Always `'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED'`.
[`BalancedPool`]: BalancedPool.md#class-balancedpool
[`HTTPParserError`]: #class-httpparsererror
[`RequestAbortedError`]: #class-requestabortederror
[`UndiciError`]: #class-undicierror
@@ -0,0 +1 @@
{"version":3,"file":"ticket-check.js","sources":["../../../src/icons/ticket-check.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TicketCheck\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiA5YTMgMyAwIDAgMSAwIDZ2MmEyIDIgMCAwIDAgMiAyaDE2YTIgMiAwIDAgMCAyLTJ2LTJhMyAzIDAgMCAxIDAtNlY3YTIgMiAwIDAgMC0yLTJINGEyIDIgMCAwIDAtMiAyWiIgLz4KICA8cGF0aCBkPSJtOSAxMiAyIDIgNC00IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/ticket-check\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst TicketCheck = createLucideIcon('TicketCheck', [\n [\n 'path',\n {\n d: 'M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z',\n key: 'qn84l0',\n },\n ],\n ['path', { d: 'm9 12 2 2 4-4', key: 'dzmm74' }],\n]);\n\nexport default TicketCheck;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA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AAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,15 @@
/**
* A list of values that can be hardware-accelerated.
*/
const acceleratedValues = new Set([
"opacity",
"clipPath",
"filter",
"transform",
// TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
// or until we implement support for linear() easing.
// "background-color"
]);
export { acceleratedValues };
//# sourceMappingURL=accelerated-values.mjs.map
@@ -0,0 +1,155 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.filter = filter;
exports.find = find;
exports.findOneChild = findOneChild;
exports.findOne = findOne;
exports.existsOne = existsOne;
exports.findAll = findAll;
var domhandler_1 = require("domhandler");
/**
* Search a node and its children for nodes passing a test function. If `node` is not an array, it will be wrapped in one.
*
* @category Querying
* @param test Function to test nodes on.
* @param node Node to search. Will be included in the result set if it matches.
* @param recurse Also consider child nodes.
* @param limit Maximum number of nodes to return.
* @returns All nodes passing `test`.
*/
function filter(test, node, recurse, limit) {
if (recurse === void 0) { recurse = true; }
if (limit === void 0) { limit = Infinity; }
return find(test, Array.isArray(node) ? node : [node], recurse, limit);
}
/**
* Search an array of nodes and their children for nodes passing a test function.
*
* @category Querying
* @param test Function to test nodes on.
* @param nodes Array of nodes to search.
* @param recurse Also consider child nodes.
* @param limit Maximum number of nodes to return.
* @returns All nodes passing `test`.
*/
function find(test, nodes, recurse, limit) {
var result = [];
/** Stack of the arrays we are looking at. */
var nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];
/** Stack of the indices within the arrays. */
var indexStack = [0];
for (;;) {
// First, check if the current array has any more elements to look at.
if (indexStack[0] >= nodeStack[0].length) {
// If we have no more arrays to look at, we are done.
if (indexStack.length === 1) {
return result;
}
// Otherwise, remove the current array from the stack.
nodeStack.shift();
indexStack.shift();
// Loop back to the start to continue with the next array.
continue;
}
var elem = nodeStack[0][indexStack[0]++];
if (test(elem)) {
result.push(elem);
if (--limit <= 0)
return result;
}
if (recurse && (0, domhandler_1.hasChildren)(elem) && elem.children.length > 0) {
/*
* Add the children to the stack. We are depth-first, so this is
* the next array we look at.
*/
indexStack.unshift(0);
nodeStack.unshift(elem.children);
}
}
}
/**
* Finds the first element inside of an array that matches a test function. This is an alias for `Array.prototype.find`.
*
* @category Querying
* @param test Function to test nodes on.
* @param nodes Array of nodes to search.
* @returns The first node in the array that passes `test`.
* @deprecated Use `Array.prototype.find` directly.
*/
function findOneChild(test, nodes) {
return nodes.find(test);
}
/**
* Finds one element in a tree that passes a test.
*
* @category Querying
* @param test Function to test nodes on.
* @param nodes Node or array of nodes to search.
* @param recurse Also consider child nodes.
* @returns The first node that passes `test`.
*/
function findOne(test, nodes, recurse) {
if (recurse === void 0) { recurse = true; }
var searchedNodes = Array.isArray(nodes) ? nodes : [nodes];
for (var i = 0; i < searchedNodes.length; i++) {
var node = searchedNodes[i];
if ((0, domhandler_1.isTag)(node) && test(node)) {
return node;
}
if (recurse && (0, domhandler_1.hasChildren)(node) && node.children.length > 0) {
var found = findOne(test, node.children, true);
if (found)
return found;
}
}
return null;
}
/**
* Checks if a tree of nodes contains at least one node passing a test.
*
* @category Querying
* @param test Function to test nodes on.
* @param nodes Array of nodes to search.
* @returns Whether a tree of nodes contains at least one node passing the test.
*/
function existsOne(test, nodes) {
return (Array.isArray(nodes) ? nodes : [nodes]).some(function (node) {
return ((0, domhandler_1.isTag)(node) && test(node)) ||
((0, domhandler_1.hasChildren)(node) && existsOne(test, node.children));
});
}
/**
* Search an array of nodes and their children for elements passing a test function.
*
* Same as `find`, but limited to elements and with less options, leading to reduced complexity.
*
* @category Querying
* @param test Function to test nodes on.
* @param nodes Array of nodes to search.
* @returns All nodes passing `test`.
*/
function findAll(test, nodes) {
var result = [];
var nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];
var indexStack = [0];
for (;;) {
if (indexStack[0] >= nodeStack[0].length) {
if (nodeStack.length === 1) {
return result;
}
// Otherwise, remove the current array from the stack.
nodeStack.shift();
indexStack.shift();
// Loop back to the start to continue with the next array.
continue;
}
var elem = nodeStack[0][indexStack[0]++];
if ((0, domhandler_1.isTag)(elem) && test(elem))
result.push(elem);
if ((0, domhandler_1.hasChildren)(elem) && elem.children.length > 0) {
indexStack.unshift(0);
nodeStack.unshift(elem.children);
}
}
}
//# sourceMappingURL=querying.js.map
@@ -0,0 +1,214 @@
import { LRUCache } from './lru-cache.cjs';
export declare const SEGMENT_TYPE_PATHNAME = 0;
export declare const SEGMENT_TYPE_PARAM = 1;
export declare const SEGMENT_TYPE_WILDCARD = 2;
export declare const SEGMENT_TYPE_OPTIONAL_PARAM = 3;
declare const SEGMENT_TYPE_INDEX = 4;
declare const SEGMENT_TYPE_PATHLESS = 5;
/**
* All the kinds of segments that can be present in a route path.
*/
export type SegmentKind = typeof SEGMENT_TYPE_PATHNAME | typeof SEGMENT_TYPE_PARAM | typeof SEGMENT_TYPE_WILDCARD | typeof SEGMENT_TYPE_OPTIONAL_PARAM;
/**
* All the kinds of segments that can be present in the segment tree.
*/
type ExtendedSegmentKind = SegmentKind | typeof SEGMENT_TYPE_INDEX | typeof SEGMENT_TYPE_PATHLESS;
type ParsedSegment = Uint16Array & {
/** segment type (0 = pathname, 1 = param, 2 = wildcard, 3 = optional param) */
0: SegmentKind;
/** index of the end of the prefix */
1: number;
/** index of the start of the value */
2: number;
/** index of the end of the value */
3: number;
/** index of the start of the suffix */
4: number;
/** index of the end of the segment */
5: number;
};
/**
* Populates the `output` array with the parsed representation of the given `segment` string.
*
* Usage:
* ```ts
* let output
* let cursor = 0
* while (cursor < path.length) {
* output = parseSegment(path, cursor, output)
* const end = output[5]
* cursor = end + 1
* ```
*
* `output` is stored outside to avoid allocations during repeated calls. It doesn't need to be typed
* or initialized, it will be done automatically.
*/
export declare function parseSegment(
/** The full path string containing the segment. */
path: string,
/** The starting index of the segment within the path. */
start: number,
/** A Uint16Array (length: 6) to populate with the parsed segment data. */
output?: Uint16Array): ParsedSegment;
type StaticSegmentNode<T extends RouteLike> = SegmentNode<T> & {
kind: typeof SEGMENT_TYPE_PATHNAME | typeof SEGMENT_TYPE_PATHLESS | typeof SEGMENT_TYPE_INDEX;
};
type DynamicSegmentNode<T extends RouteLike> = SegmentNode<T> & {
kind: typeof SEGMENT_TYPE_PARAM | typeof SEGMENT_TYPE_WILDCARD | typeof SEGMENT_TYPE_OPTIONAL_PARAM;
prefix?: string;
suffix?: string;
caseSensitive: boolean;
};
type AnySegmentNode<T extends RouteLike> = StaticSegmentNode<T> | DynamicSegmentNode<T>;
type SegmentNode<T extends RouteLike> = {
kind: ExtendedSegmentKind;
pathless: Array<StaticSegmentNode<T>> | null;
/** Exact index segment (highest priority) */
index: StaticSegmentNode<T> | null;
/** Static segments (2nd priority) */
static: Map<string, StaticSegmentNode<T>> | null;
/** Case insensitive static segments (3rd highest priority) */
staticInsensitive: Map<string, StaticSegmentNode<T>> | null;
/** Dynamic segments ($param) */
dynamic: Array<DynamicSegmentNode<T>> | null;
/** Optional dynamic segments ({-$param}) */
optional: Array<DynamicSegmentNode<T>> | null;
/** Wildcard segments ($ - lowest priority) */
wildcard: Array<DynamicSegmentNode<T>> | null;
/** Terminal route (if this path can end here) */
route: T | null;
/** The full path for this segment node (will only be valid on leaf nodes) */
fullPath: string;
parent: AnySegmentNode<T> | null;
depth: number;
/** route.options.params.parse function, set on the last node of the route */
parse: null | ((params: Record<string, string>) => unknown);
};
type RouteLike = {
id?: string;
path?: string;
children?: Array<RouteLike>;
parentRoute?: RouteLike;
isRoot?: boolean;
options?: {
caseSensitive?: boolean;
parseParams?: (params: Record<string, string>) => unknown;
params?: {
parse?: (params: Record<string, string>) => unknown;
};
};
} & ({
fullPath: string;
from?: never;
} | {
fullPath?: never;
from: string;
});
export type ProcessedTree<TTree extends Extract<RouteLike, {
fullPath: string;
}>, TFlat extends Extract<RouteLike, {
from: string;
}>, TSingle extends Extract<RouteLike, {
from: string;
}>> = {
/** a representation of the `routeTree` as a segment tree */
segmentTree: AnySegmentNode<TTree>;
/** a mini route tree generated from the flat `routeMasks` list */
masksTree: AnySegmentNode<TFlat> | null;
/** @deprecated keep until v2 so that `router.matchRoute` can keep not caring about the actual route tree */
singleCache: LRUCache<string, AnySegmentNode<TSingle>>;
/** a cache of route matches from the `segmentTree` */
matchCache: LRUCache<string, RouteMatch<TTree> | null>;
/** a cache of route matches from the `masksTree` */
flatCache: LRUCache<string, ReturnType<typeof findMatch<TFlat>>> | null;
};
export declare function processRouteMasks<TRouteLike extends Extract<RouteLike, {
from: string;
}>>(routeList: Array<TRouteLike>, processedTree: ProcessedTree<any, TRouteLike, any>): void;
/**
* Take an arbitrary list of routes, create a tree from them (if it hasn't been created already), and match a path against it.
*/
export declare function findFlatMatch<T extends Extract<RouteLike, {
from: string;
}>>(
/** The path to match. */
path: string,
/** The `processedTree` returned by the initial `processRouteTree` call. */
processedTree: ProcessedTree<any, T, any>): {
route: T;
/**
* The raw (unparsed) params extracted from the path.
* This will be the exhaustive list of all params defined in the route's path.
*/
rawParams: Record<string, string>;
} | null;
/**
* @deprecated keep until v2 so that `router.matchRoute` can keep not caring about the actual route tree
*/
export declare function findSingleMatch(from: string, caseSensitive: boolean, fuzzy: boolean, path: string, processedTree: ProcessedTree<any, any, {
from: string;
}>): {
route: {
from: string;
};
/**
* The raw (unparsed) params extracted from the path.
* This will be the exhaustive list of all params defined in the route's path.
*/
rawParams: Record<string, string>;
} | null;
type RouteMatch<T extends Extract<RouteLike, {
fullPath: string;
}>> = {
route: T;
rawParams: Record<string, string>;
branch: ReadonlyArray<T>;
};
export declare function findRouteMatch<T extends Extract<RouteLike, {
fullPath: string;
}>>(
/** The path to match against the route tree. */
path: string,
/** The `processedTree` returned by the initial `processRouteTree` call. */
processedTree: ProcessedTree<T, any, any>,
/** If `true`, allows fuzzy matching (partial matches), i.e. which node in the tree would have been an exact match if the `path` had been shorter? */
fuzzy?: boolean): RouteMatch<T> | null;
/** Trim trailing slashes (except preserving root '/'). */
export declare function trimPathRight(path: string): string;
export interface ProcessRouteTreeResult<TRouteLike extends Extract<RouteLike, {
fullPath: string;
}> & {
id: string;
}> {
/** Should be considered a black box, needs to be provided to all matching functions in this module. */
processedTree: ProcessedTree<TRouteLike, any, any>;
/** A lookup map of routes by their unique IDs. */
routesById: Record<string, TRouteLike>;
/** A lookup map of routes by their trimmed full paths. */
routesByPath: Record<string, TRouteLike>;
}
/**
* Processes a route tree into a segment trie for efficient path matching.
* Also builds lookup maps for routes by ID and by trimmed full path.
*/
export declare function processRouteTree<TRouteLike extends Extract<RouteLike, {
fullPath: string;
}> & {
id: string;
}>(
/** The root of the route tree to process. */
routeTree: TRouteLike,
/** Whether matching should be case sensitive by default (overridden by individual route options). */
caseSensitive?: boolean,
/** Optional callback invoked for each route during processing. */
initRoute?: (route: TRouteLike, index: number) => void): ProcessRouteTreeResult<TRouteLike>;
declare function findMatch<T extends RouteLike>(path: string, segmentTree: AnySegmentNode<T>, fuzzy?: boolean): {
route: T;
/**
* The raw (unparsed) params extracted from the path.
* This will be the exhaustive list of all params defined in the route's path.
*/
rawParams: Record<string, string>;
} | null;
export declare function buildRouteBranch<T extends RouteLike>(route: T): T[];
export {};
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './circle-power.js';
//# sourceMappingURL=power-circle.js.map
@@ -0,0 +1,154 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isInSubnet = isInSubnet;
exports.isHostInSubnet = isHostInSubnet;
exports.isGloballyReachable = isGloballyReachable;
exports.offsetBigInt = offsetBigInt;
exports.isCorrect = isCorrect;
exports.prefixLengthFromMask = prefixLengthFromMask;
exports.assertByteArray = assertByteArray;
exports.numberToPaddedHex = numberToPaddedHex;
exports.stringToPaddedHex = stringToPaddedHex;
exports.testBit = testBit;
const address_error_1 = require("./address-error");
/**
* Returns whether this address's *network* is contained within `address`,
* i.e. whether every address this one can represent also falls inside
* `address`. A network wider than `address` is not contained in it, so
* `10.0.0.0/8` is not in `10.0.0.0/16`.
*
* To ask whether the address itself falls inside a range, ignoring any CIDR
* suffix it was written with, use {@link isHostInSubnet} instead. That is the
* question the special-use classifiers ask.
*/
function isInSubnet(address) {
if (this.subnetMask < address.subnetMask) {
return false;
}
return isHostInSubnet.call(this, address);
}
/**
* Returns whether this address's host bits fall inside `address`, ignoring
* this address's own subnet mask.
*
* This is the primitive the special-use classifiers (`isLoopback`,
* `isPrivate`, `isLinkLocal`, `getType`, …) are built on: they answer a
* question about the address, so the answer must not change with the CIDR
* suffix the caller happened to write. Use this rather than
* {@link isInSubnet} when classifying a single address — notably when the
* address came from untrusted input and the result backs a trust-boundary
* decision such as an SSRF allow/deny filter.
*
* An address of one family is never inside a network of the other, so an
* `Address4` against an `Address6` (or the reverse) is `false`. To compare
* across families, convert first: `Address6.fromAddress4()`, `to4()`, or
* `toAddress4Nat64()`.
*/
function isHostInSubnet(address) {
// mask() is a bit string of the family's width, and the leading bits of a
// 32-bit string can coincide with those of a 128-bit one (a00::1 and
// 10.0.0.0/8 both mask to 00001010), so the widths must agree before the
// strings are compared.
if (this.binaryZeroPad().length !== address.binaryZeroPad().length) {
return false;
}
return this.mask(address.subnetMask) === address.mask();
}
/**
* Returns whether the registry marks this address globally reachable: the
* answer of the most specific entry containing it that has one, or `true`
* when no entry contains it.
*/
function isGloballyReachable(entries) {
let best = null;
for (let i = 0; i < entries.length; i++) {
const entry = entries[i];
if (entry.reachable !== null &&
isHostInSubnet.call(this, entry.subnet) &&
(best === null || entry.subnet.subnetMask > best.subnet.subnetMask)) {
best = entry;
}
}
return best === null ? true : best.reachable;
}
/**
* Adds `n` to `value` and returns the result, throwing `AddressError` unless
* `n` is an integer and the result stays within `[0, 2**bits - 1]`.
*/
function offsetBigInt(value, n, bits, family) {
if (typeof n === 'number' && !Number.isSafeInteger(n)) {
throw new address_error_1.AddressError(`${family} offset must be an integer`);
}
if (typeof n !== 'number' && typeof n !== 'bigint') {
throw new address_error_1.AddressError(`${family} offset must be an integer`);
}
const result = value + BigInt(n);
if (result < BigInt(0) || result > (BigInt(1) << BigInt(bits)) - BigInt(1)) {
throw new address_error_1.AddressError(`${family} offset leaves the address space`);
}
return result;
}
function isCorrect(defaultBits) {
return function isCorrectForm() {
if (this.addressMinusSuffix !== this.correctForm()) {
return false;
}
if (this.subnetMask === defaultBits && !this.parsedSubnet) {
return true;
}
return this.parsedSubnet === String(this.subnetMask);
};
}
/**
* Returns the prefix length (number of leading 1 bits) of a contiguous
* subnet mask. Throws `AddressError` if the mask is non-contiguous (e.g.
* `255.0.255.0`).
*/
function prefixLengthFromMask(value, totalBits) {
const binary = value.toString(2).padStart(totalBits, '0');
if (binary.length > totalBits) {
throw new address_error_1.AddressError('Invalid subnet mask.');
}
const firstZero = binary.indexOf('0');
if (firstZero === -1) {
return totalBits;
}
if (binary.slice(firstZero).includes('1')) {
throw new address_error_1.AddressError('Invalid subnet mask.');
}
return firstZero;
}
/**
* Throws `AddressError` unless `bytes` holds exactly `byteCount` integers,
* each from `minimum` to 255. Pass a `minimum` of `-128` where signed bytes
* are accepted and folded to unsigned, and `0` where they are not.
*/
function assertByteArray(bytes, byteCount, family, minimum) {
if (bytes.length !== byteCount) {
throw new address_error_1.AddressError(`${family} addresses require exactly ${byteCount} bytes`);
}
for (let i = 0; i < bytes.length; i++) {
if (!Number.isInteger(bytes[i]) || bytes[i] < minimum || bytes[i] > 255) {
throw new address_error_1.AddressError(`All bytes must be integers between ${minimum} and 255`);
}
}
}
function numberToPaddedHex(number) {
return number.toString(16).padStart(2, '0');
}
function stringToPaddedHex(numberString) {
return numberToPaddedHex(parseInt(numberString, 10));
}
/**
* @param binaryValue Binary representation of a value (e.g. `10`)
* @param position Byte position, where 0 is the least significant bit
*/
function testBit(binaryValue, position) {
const { length } = binaryValue;
if (position > length) {
return false;
}
const positionInString = length - position;
return binaryValue.substring(positionInString, positionInString + 1) === '1';
}
//# sourceMappingURL=common.js.map
@@ -0,0 +1,15 @@
declare namespace getSideChannelWeakMap {
type Channel<K, V> = {
assert: (key: K) => void;
has: (key: K) => boolean;
get: (key: K) => V | undefined;
set: (key: K, value: V) => void;
delete: (key: K) => boolean;
}
}
declare function getSideChannelWeakMap<K, V>(): getSideChannelWeakMap.Channel<K, V>;
declare const x: false | typeof getSideChannelWeakMap;
export = x;
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LegacyESLint = exports.ESLint = exports.FlatESLint = void 0;
var FlatESLint_1 = require("./eslint/FlatESLint");
Object.defineProperty(exports, "FlatESLint", { enumerable: true, get: function () { return FlatESLint_1.FlatESLint; } });
var FlatESLint_2 = require("./eslint/FlatESLint");
Object.defineProperty(exports, "ESLint", { enumerable: true, get: function () { return FlatESLint_2.FlatESLint; } });
var LegacyESLint_1 = require("./eslint/LegacyESLint");
// TODO(typescript-eslint@v9) - remove this in the next major release
/**
* @deprecated - use ESLint instead
*/
Object.defineProperty(exports, "LegacyESLint", { enumerable: true, get: function () { return LegacyESLint_1.LegacyESLint; } });
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const GitFork = createLucideIcon("GitFork", [
["circle", { cx: "12", cy: "18", r: "3", key: "1mpf1b" }],
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
["path", { d: "M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9", key: "1uq4wg" }],
["path", { d: "M12 12v3", key: "158kv8" }]
]);
export { GitFork as default };
//# sourceMappingURL=git-fork.js.map
@@ -0,0 +1,790 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __esm = (fn, res, err) => function __init() {
if (err) throw err[0];
try {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
} catch (e) {
throw err = [e], e;
}
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// scripts/build/shims/shared.js
var OPTIONAL_OBJECT, createMethodShim;
var init_shared = __esm({
"scripts/build/shims/shared.js"() {
OPTIONAL_OBJECT = 1;
createMethodShim = (methodName, getImplementation) => (flags, object, ...arguments_) => {
if (flags | OPTIONAL_OBJECT && (object === void 0 || object === null)) {
return;
}
const implementation = getImplementation.call(object) ?? object[methodName];
return implementation.apply(object, arguments_);
};
}
});
// scripts/build/shims/method-replace-all.js
var stringReplaceAll, replaceAll, method_replace_all_default;
var init_method_replace_all = __esm({
"scripts/build/shims/method-replace-all.js"() {
init_shared();
stringReplaceAll = String.prototype.replaceAll ?? function(pattern, replacement) {
if (pattern.global) {
return this.replace(pattern, replacement);
}
return this.split(pattern).join(replacement);
};
replaceAll = /* @__PURE__ */ createMethodShim("replaceAll", function() {
if (typeof this === "string") {
return stringReplaceAll;
}
});
method_replace_all_default = replaceAll;
}
});
// src/utilities/skip.js
function skip(characters) {
return (text, startIndex, options) => {
if (startIndex === false) {
return false;
}
const backwards = Boolean(options?.backwards);
const { length } = text;
let cursor = startIndex;
while (cursor >= 0 && cursor < length) {
const character = text.charAt(cursor);
if (characters instanceof RegExp) {
if (!characters.test(character)) {
return cursor;
}
} else if (!characters.includes(character)) {
return cursor;
}
backwards ? cursor-- : cursor++;
}
if (cursor === -1 || cursor === length) {
return cursor;
}
return false;
};
}
var skipWhitespace, skipSpaces, skipToLineEnd, skipEverythingButNewLine;
var init_skip = __esm({
"src/utilities/skip.js"() {
skipWhitespace = skip(/\s/);
skipSpaces = skip(" ");
skipToLineEnd = skip(",; ");
skipEverythingButNewLine = skip(/[^\n\r]/);
}
});
// src/utilities/skip-inline-comment.js
function skipInlineComment(text, startIndex) {
if (startIndex === false) {
return false;
}
if (text.charAt(startIndex) === "/" && text.charAt(startIndex + 1) === "*") {
for (let i = startIndex + 2; i < text.length; ++i) {
if (text.charAt(i) === "*" && text.charAt(i + 1) === "/") {
return i + 2;
}
}
}
return startIndex;
}
var skip_inline_comment_default;
var init_skip_inline_comment = __esm({
"src/utilities/skip-inline-comment.js"() {
skip_inline_comment_default = skipInlineComment;
}
});
// src/utilities/skip-newline.js
function skipNewline(text, startIndex, options) {
if (startIndex === false) {
return false;
}
const backwards = Boolean(options?.backwards);
const character = text.charAt(startIndex);
if (backwards) {
if (text.charAt(startIndex - 1) === "\r" && character === "\n") {
return startIndex - 2;
}
if (isNewlineCharacter(character)) {
return startIndex - 1;
}
} else {
if (character === "\r" && text.charAt(startIndex + 1) === "\n") {
return startIndex + 2;
}
if (isNewlineCharacter(character)) {
return startIndex + 1;
}
}
return startIndex;
}
var isNewlineCharacter, skip_newline_default;
var init_skip_newline = __esm({
"src/utilities/skip-newline.js"() {
isNewlineCharacter = (character) => character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029";
skip_newline_default = skipNewline;
}
});
// src/utilities/skip-trailing-comment.js
function skipTrailingComment(text, startIndex) {
if (startIndex === false) {
return false;
}
if (text.charAt(startIndex) === "/" && text.charAt(startIndex + 1) === "/") {
return skipEverythingButNewLine(text, startIndex);
}
return startIndex;
}
var skip_trailing_comment_default;
var init_skip_trailing_comment = __esm({
"src/utilities/skip-trailing-comment.js"() {
init_skip();
skip_trailing_comment_default = skipTrailingComment;
}
});
// src/utilities/get-next-non-space-non-comment-character-index.js
function getNextNonSpaceNonCommentCharacterIndex(text, startIndex) {
let oldIdx = null;
let nextIdx = startIndex;
while (nextIdx !== oldIdx) {
oldIdx = nextIdx;
nextIdx = skipSpaces(text, nextIdx);
nextIdx = skip_inline_comment_default(text, nextIdx);
nextIdx = skip_trailing_comment_default(text, nextIdx);
nextIdx = skip_newline_default(text, nextIdx);
}
return nextIdx;
}
var get_next_non_space_non_comment_character_index_default;
var init_get_next_non_space_non_comment_character_index = __esm({
"src/utilities/get-next-non-space-non-comment-character-index.js"() {
init_skip();
init_skip_inline_comment();
init_skip_newline();
init_skip_trailing_comment();
get_next_non_space_non_comment_character_index_default = getNextNonSpaceNonCommentCharacterIndex;
}
});
// src/utilities/has-newline.js
function hasNewline(text, startIndex, options = {}) {
const idx = skipSpaces(
text,
options.backwards ? startIndex - 1 : startIndex,
options
);
const idx2 = skip_newline_default(text, idx, options);
return idx !== idx2;
}
var has_newline_default;
var init_has_newline = __esm({
"src/utilities/has-newline.js"() {
init_skip();
init_skip_newline();
has_newline_default = hasNewline;
}
});
// src/utilities/is-next-line-empty.js
function isNextLineEmpty(text, startIndex) {
let oldIdx = null;
let idx = startIndex;
while (idx !== oldIdx) {
oldIdx = idx;
idx = skipToLineEnd(text, idx);
idx = skip_inline_comment_default(text, idx);
idx = skipSpaces(text, idx);
}
idx = skip_trailing_comment_default(text, idx);
idx = skip_newline_default(text, idx);
return idx !== false && has_newline_default(text, idx);
}
var is_next_line_empty_default;
var init_is_next_line_empty = __esm({
"src/utilities/is-next-line-empty.js"() {
init_has_newline();
init_skip();
init_skip_inline_comment();
init_skip_newline();
init_skip_trailing_comment();
is_next_line_empty_default = isNextLineEmpty;
}
});
// src/utilities/is-previous-line-empty.js
function isPreviousLineEmpty(text, startIndex) {
let idx = startIndex - 1;
idx = skipSpaces(text, idx, { backwards: true });
idx = skip_newline_default(text, idx, { backwards: true });
idx = skipSpaces(text, idx, { backwards: true });
const idx2 = skip_newline_default(text, idx, { backwards: true });
return idx !== idx2;
}
var is_previous_line_empty_default;
var init_is_previous_line_empty = __esm({
"src/utilities/is-previous-line-empty.js"() {
init_skip();
init_skip_newline();
is_previous_line_empty_default = isPreviousLineEmpty;
}
});
// src/main/comments/utilities.js
function describeNodeForDebugging(node) {
const nodeType = node.type || node.kind || "(unknown type)";
let nodeName = String(
node.name || node.id && (typeof node.id === "object" ? node.id.name : node.id) || node.key && (typeof node.key === "object" ? node.key.name : node.key) || node.value && (typeof node.value === "object" ? "" : String(node.value)) || node.operator || ""
);
if (nodeName.length > 20) {
nodeName = nodeName.slice(0, 19) + "\u2026";
}
return nodeType + (nodeName ? " " + nodeName : "");
}
function addCommentHelper(node, comment) {
const comments = node.comments ?? (node.comments = []);
comments.push(comment);
comment.printed = false;
comment.nodeDescription = describeNodeForDebugging(node);
}
function addLeadingComment(node, comment) {
comment.leading = true;
comment.trailing = false;
addCommentHelper(node, comment);
}
function addDanglingComment(node, comment, marker) {
comment.leading = false;
comment.trailing = false;
if (marker) {
comment.marker = marker;
}
addCommentHelper(node, comment);
}
function addTrailingComment(node, comment) {
comment.leading = false;
comment.trailing = true;
addCommentHelper(node, comment);
}
var init_utilities = __esm({
"src/main/comments/utilities.js"() {
}
});
// src/utilities/get-alignment-size.js
function getAlignmentSize(text, tabWidth, startIndex = 0) {
let size = 0;
for (let i = startIndex; i < text.length; ++i) {
if (text[i] === " ") {
size = size + tabWidth - size % tabWidth;
} else {
size++;
}
}
return size;
}
var get_alignment_size_default;
var init_get_alignment_size = __esm({
"src/utilities/get-alignment-size.js"() {
get_alignment_size_default = getAlignmentSize;
}
});
// src/utilities/get-indent-size.js
function getIndentSize(value, tabWidth) {
const lastNewlineIndex = value.lastIndexOf("\n");
if (lastNewlineIndex === -1) {
return 0;
}
return get_alignment_size_default(
// All the leading whitespaces
value.slice(lastNewlineIndex + 1).match(/^[\t ]*/)[0],
tabWidth
);
}
var get_indent_size_default;
var init_get_indent_size = __esm({
"src/utilities/get-indent-size.js"() {
init_get_alignment_size();
get_indent_size_default = getIndentSize;
}
});
// node_modules/escape-string-regexp/index.js
function escapeStringRegexp(string) {
if (typeof string !== "string") {
throw new TypeError("Expected a string");
}
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}
var init_escape_string_regexp = __esm({
"node_modules/escape-string-regexp/index.js"() {
}
});
// src/utilities/get-max-continuous-count.js
function getMaxContinuousCount(text, searchString) {
let results = text.matchAll(
new RegExp(`(?:${escapeStringRegexp(searchString)})+`, "g")
);
if (!results.reduce) {
results = [...results];
}
return results.reduce(
(maxCount, [result]) => Math.max(maxCount, result.length),
0
) / searchString.length;
}
var get_max_continuous_count_default;
var init_get_max_continuous_count = __esm({
"src/utilities/get-max-continuous-count.js"() {
init_escape_string_regexp();
get_max_continuous_count_default = getMaxContinuousCount;
}
});
// src/utilities/get-next-non-space-non-comment-character.js
function getNextNonSpaceNonCommentCharacter(text, startIndex) {
const index = get_next_non_space_non_comment_character_index_default(text, startIndex);
return index === false ? "" : text.charAt(index);
}
var get_next_non_space_non_comment_character_default;
var init_get_next_non_space_non_comment_character = __esm({
"src/utilities/get-next-non-space-non-comment-character.js"() {
init_get_next_non_space_non_comment_character_index();
get_next_non_space_non_comment_character_default = getNextNonSpaceNonCommentCharacter;
}
});
// src/utilities/get-preferred-quote.js
function getPreferredQuote(text, preferredQuoteOrPreferSingleQuote) {
const { preferred, alternate } = preferredQuoteOrPreferSingleQuote === true || preferredQuoteOrPreferSingleQuote === SINGLE_QUOTE ? SINGLE_QUOTE_SETTINGS : DOUBLE_QUOTE_SETTINGS;
const { length } = text;
let preferredQuoteCount = 0;
let alternateQuoteCount = 0;
for (let index = 0; index < length; index++) {
const codePoint = text.charCodeAt(index);
if (codePoint === preferred.codePoint) {
preferredQuoteCount++;
} else if (codePoint === alternate.codePoint) {
alternateQuoteCount++;
}
}
return (preferredQuoteCount > alternateQuoteCount ? alternate : preferred).character;
}
var SINGLE_QUOTE, DOUBLE_QUOTE, SINGLE_QUOTE_DATA, DOUBLE_QUOTE_DATA, SINGLE_QUOTE_SETTINGS, DOUBLE_QUOTE_SETTINGS;
var init_get_preferred_quote = __esm({
"src/utilities/get-preferred-quote.js"() {
SINGLE_QUOTE = "'";
DOUBLE_QUOTE = '"';
SINGLE_QUOTE_DATA = Object.freeze({
character: SINGLE_QUOTE,
codePoint: 39
});
DOUBLE_QUOTE_DATA = Object.freeze({
character: DOUBLE_QUOTE,
codePoint: 34
});
SINGLE_QUOTE_SETTINGS = Object.freeze({
preferred: SINGLE_QUOTE_DATA,
alternate: DOUBLE_QUOTE_DATA
});
DOUBLE_QUOTE_SETTINGS = Object.freeze({
preferred: DOUBLE_QUOTE_DATA,
alternate: SINGLE_QUOTE_DATA
});
}
});
// node_modules/emoji-regex/index.mjs
var emoji_regex_default;
var init_emoji_regex = __esm({
"node_modules/emoji-regex/index.mjs"() {
emoji_regex_default = () => {
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\u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\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\Line truncated
};
}
});
// node_modules/get-east-asian-width/lookup-data.js
var fullwidthMinimalCodePoint, fullwidthMaximumCodePoint, fullwidthRanges, wideMinimalCodePoint, wideMaximumCodePoint, wideRanges;
var init_lookup_data = __esm({
"node_modules/get-east-asian-width/lookup-data.js"() {
fullwidthMinimalCodePoint = 12288;
fullwidthMaximumCodePoint = 65510;
fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
wideMinimalCodePoint = 4352;
wideMaximumCodePoint = 262141;
wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
}
});
// node_modules/get-east-asian-width/utilities.js
var isInRange;
var init_utilities2 = __esm({
"node_modules/get-east-asian-width/utilities.js"() {
isInRange = (ranges, codePoint) => {
let low = 0;
let high = Math.floor(ranges.length / 2) - 1;
while (low <= high) {
const mid = Math.floor((low + high) / 2);
const i = mid * 2;
if (codePoint < ranges[i]) {
high = mid - 1;
} else if (codePoint > ranges[i + 1]) {
low = mid + 1;
} else {
return true;
}
}
return false;
};
}
});
// node_modules/get-east-asian-width/lookup.js
function findWideFastPathRange(ranges) {
let fastPathStart = ranges[0];
let fastPathEnd = ranges[1];
for (let index = 0; index < ranges.length; index += 2) {
const start = ranges[index];
const end = ranges[index + 1];
if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
return [start, end];
}
if (end - start > fastPathEnd - fastPathStart) {
fastPathStart = start;
fastPathEnd = end;
}
}
return [fastPathStart, fastPathEnd];
}
var commonCjkCodePoint, wideFastPathStart, wideFastPathEnd, isFullWidth, isWide;
var init_lookup = __esm({
"node_modules/get-east-asian-width/lookup.js"() {
init_lookup_data();
init_utilities2();
commonCjkCodePoint = 19968;
[wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
isFullWidth = (codePoint) => {
if (codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint) {
return false;
}
return isInRange(fullwidthRanges, codePoint);
};
isWide = (codePoint) => {
if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
return true;
}
if (codePoint < wideMinimalCodePoint || codePoint > wideMaximumCodePoint) {
return false;
}
return isInRange(wideRanges, codePoint);
};
}
});
// node_modules/get-east-asian-width/index.js
var init_get_east_asian_width = __esm({
"node_modules/get-east-asian-width/index.js"() {
init_lookup();
}
});
// node_modules/narrow-emojis/index.js
var narrowEmojiRegexp, isNarrowEmojiCharacter;
var init_narrow_emojis = __esm({
"node_modules/narrow-emojis/index.js"() {
narrowEmojiRegexp = /^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/;
isNarrowEmojiCharacter = (character) => narrowEmojiRegexp.test(character);
}
});
// src/utilities/get-string-width.js
function getStringWidth(text) {
if (!text) {
return 0;
}
if (!notAsciiRegex.test(text)) {
return text.length;
}
let width = 0;
text = text.replace(emoji_regex_default(), (character) => {
width += isNarrowEmojiCharacter(character) ? 1 : 2;
return "";
});
for (const character of text) {
const codePoint = character.codePointAt(0);
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
continue;
}
if (codePoint >= 768 && codePoint <= 879) {
continue;
}
if (codePoint >= 65024 && codePoint <= 65039) {
continue;
}
width += isFullWidth(codePoint) || isWide(codePoint) ? 2 : 1;
}
return width;
}
var notAsciiRegex, get_string_width_default;
var init_get_string_width = __esm({
"src/utilities/get-string-width.js"() {
init_emoji_regex();
init_get_east_asian_width();
init_narrow_emojis();
notAsciiRegex = /[^\x20-\x7F]/;
get_string_width_default = getStringWidth;
}
});
// src/utilities/has-newline-in-range.js
function hasNewlineInRange(text, startIndex, endIndex) {
for (let i = startIndex; i < endIndex; ++i) {
if (text.charAt(i) === "\n") {
return true;
}
}
return false;
}
var has_newline_in_range_default;
var init_has_newline_in_range = __esm({
"src/utilities/has-newline-in-range.js"() {
has_newline_in_range_default = hasNewlineInRange;
}
});
// src/utilities/has-spaces.js
function hasSpaces(text, startIndex, options = {}) {
const idx = skipSpaces(
text,
options.backwards ? startIndex - 1 : startIndex,
options
);
return idx !== startIndex;
}
var has_spaces_default;
var init_has_spaces = __esm({
"src/utilities/has-spaces.js"() {
init_skip();
has_spaces_default = hasSpaces;
}
});
// src/utilities/public.js
var public_exports = {};
__export(public_exports, {
addDanglingComment: () => addDanglingComment,
addLeadingComment: () => addLeadingComment,
addTrailingComment: () => addTrailingComment,
getAlignmentSize: () => get_alignment_size_default,
getIndentSize: () => get_indent_size_default,
getMaxContinuousCount: () => get_max_continuous_count_default,
getNextNonSpaceNonCommentCharacter: () => get_next_non_space_non_comment_character_default,
getNextNonSpaceNonCommentCharacterIndex: () => getNextNonSpaceNonCommentCharacterIndex2,
getPreferredQuote: () => getPreferredQuote,
getStringWidth: () => get_string_width_default,
hasNewline: () => has_newline_default,
hasNewlineInRange: () => has_newline_in_range_default,
hasSpaces: () => has_spaces_default,
isNextLineEmpty: () => isNextLineEmpty2,
isNextLineEmptyAfterIndex: () => is_next_line_empty_default,
isPreviousLineEmpty: () => isPreviousLineEmpty2,
makeString: () => makeString,
skip: () => skip,
skipEverythingButNewLine: () => skipEverythingButNewLine,
skipInlineComment: () => skip_inline_comment_default,
skipNewline: () => skip_newline_default,
skipSpaces: () => skipSpaces,
skipToLineEnd: () => skipToLineEnd,
skipTrailingComment: () => skip_trailing_comment_default,
skipWhitespace: () => skipWhitespace
});
function legacyGetNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) {
return get_next_non_space_non_comment_character_index_default(text, locEnd(node));
}
function getNextNonSpaceNonCommentCharacterIndex2(text, startIndex) {
return arguments.length === 2 || typeof startIndex === "number" ? get_next_non_space_non_comment_character_index_default(text, startIndex) : (
// @ts-expect-error -- expected
// eslint-disable-next-line prefer-rest-params
legacyGetNextNonSpaceNonCommentCharacterIndex(...arguments)
);
}
function legacyIsPreviousLineEmpty(text, node, locStart) {
return is_previous_line_empty_default(text, locStart(node));
}
function isPreviousLineEmpty2(text, startIndex) {
return arguments.length === 2 || typeof startIndex === "number" ? is_previous_line_empty_default(text, startIndex) : (
// @ts-expect-error -- expected
// eslint-disable-next-line prefer-rest-params
legacyIsPreviousLineEmpty(...arguments)
);
}
function legacyIsNextLineEmpty(text, node, locEnd) {
return is_next_line_empty_default(text, locEnd(node));
}
function makeString(rawText, enclosingQuote, unescapeUnnecessaryEscapes) {
const otherQuote = enclosingQuote === '"' ? "'" : '"';
const regex = /\\(.)|(["'])/gs;
const raw = method_replace_all_default(
/* OPTIONAL_OBJECT: false */
0,
rawText,
regex,
(match, escaped, quote) => {
if (escaped === otherQuote) {
return escaped;
}
if (quote === enclosingQuote) {
return "\\" + quote;
}
if (quote) {
return quote;
}
return unescapeUnnecessaryEscapes && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(escaped) ? escaped : "\\" + escaped;
}
);
return enclosingQuote + raw + enclosingQuote;
}
function isNextLineEmpty2(text, startIndex) {
return arguments.length === 2 || typeof startIndex === "number" ? is_next_line_empty_default(text, startIndex) : (
// @ts-expect-error -- expected
// eslint-disable-next-line prefer-rest-params
legacyIsNextLineEmpty(...arguments)
);
}
var init_public = __esm({
"src/utilities/public.js"() {
init_method_replace_all();
init_get_next_non_space_non_comment_character_index();
init_is_next_line_empty();
init_is_previous_line_empty();
init_utilities();
init_get_alignment_size();
init_get_indent_size();
init_get_max_continuous_count();
init_get_next_non_space_non_comment_character();
init_get_preferred_quote();
init_get_string_width();
init_has_newline();
init_has_newline_in_range();
init_has_spaces();
init_skip();
init_skip_inline_comment();
init_skip_newline();
init_skip_trailing_comment();
}
});
// src/main/version.evaluate.js
var version_evaluate_exports = {};
__export(version_evaluate_exports, {
default: () => version_evaluate_default
});
var version_evaluate_default;
var init_version_evaluate = __esm({
"src/main/version.evaluate.js"() {
version_evaluate_default = "3.9.10";
}
});
// src/index.cjs
var prettierPromise = import("./index.mjs");
var functionNames = [
"formatWithCursor",
"format",
"check",
"resolveConfig",
"resolveConfigFile",
"clearConfigCache",
"getFileInfo",
"getSupportInfo"
];
var prettier = /* @__PURE__ */ Object.create(null);
for (const name of functionNames) {
prettier[name] = async (...args) => {
const prettier2 = await prettierPromise;
return prettier2[name](...args);
};
}
var debugApiFunctionNames = [
"parse",
"formatAST",
"formatDoc",
"printToDoc",
"printDocToString"
];
var debugApis = /* @__PURE__ */ Object.create(null);
for (const name of debugApiFunctionNames) {
debugApis[name] = async (...args) => {
const prettier2 = await prettierPromise;
return prettier2.__debug[name](...args);
};
}
prettier.__debug = debugApis;
if (true) {
prettier.util = (init_public(), __toCommonJS(public_exports));
prettier.doc = require("./doc.js");
prettier.version = (init_version_evaluate(), __toCommonJS(version_evaluate_exports)).default;
} else {
Object.defineProperties(prettier, {
util: {
get() {
try {
return null;
} catch {
}
throw new Error(
"prettier.util is not available in development CommonJS version"
);
}
},
doc: {
get() {
try {
return null;
} catch {
}
throw new Error(
"prettier.doc is not available in development CommonJS version"
);
}
}
});
prettier.version = null.version;
}
module.exports = prettier;
@@ -0,0 +1,12 @@
export type MessageIds = 'comparingNullableToFalse' | 'comparingNullableToTrueDirect' | 'comparingNullableToTrueNegated' | 'direct' | 'negated' | 'noStrictNullCheck';
export type Options = [
{
allowComparingNullableBooleansToFalse?: boolean;
allowComparingNullableBooleansToTrue?: boolean;
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
}
];
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,19 @@
export { N as NodeBenchmarkRunner, T as VitestTestRunner } from './chunks/test.DNmyFkvJ.js';
import '@vitest/runner';
import '@vitest/utils/helpers';
import '@vitest/utils/timers';
import './chunks/benchmark.CX_oY03V.js';
import '@vitest/runner/utils';
import './chunks/utils.BX5Fg8C4.js';
import '@vitest/expect';
import '@vitest/utils/error';
import 'pathe';
import '@vitest/spy';
import '@vitest/utils/offset';
import '@vitest/utils/source-map';
import './chunks/_commonjsHelpers.D26ty3Ew.js';
import './chunks/rpc.MzXet3jl.js';
import './chunks/index.Chj8NDwU.js';
import '@vitest/snapshot';
console.warn("Importing from \"vitest/runners\" is deprecated since Vitest 4.1. Please use \"vitest\" instead.");
@@ -0,0 +1 @@
{"version":3,"file":"cooking-pot.js","sources":["../../../src/icons/cooking-pot.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CookingPot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiAxMmgyMCIgLz4KICA8cGF0aCBkPSJNMjAgMTJ2OGEyIDIgMCAwIDEtMiAySDZhMiAyIDAgMCAxLTItMnYtOCIgLz4KICA8cGF0aCBkPSJtNCA4IDE2LTQiIC8+CiAgPHBhdGggZD0ibTguODYgNi43OC0uNDUtMS44MWEyIDIgMCAwIDEgMS40NS0yLjQzbDEuOTQtLjQ4YTIgMiAwIDAgMSAyLjQzIDEuNDZsLjQ1IDEuOCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/cooking-pot\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CookingPot = createLucideIcon('CookingPot', [\n ['path', { d: 'M2 12h20', key: '9i4pu4' }],\n ['path', { d: 'M20 12v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8', key: 'u0tga0' }],\n ['path', { d: 'm4 8 16-4', key: '16g0ng' }],\n [\n 'path',\n {\n d: 'm8.86 6.78-.45-1.81a2 2 0 0 1 1.45-2.43l1.94-.48a2 2 0 0 1 2.43 1.46l.45 1.8',\n key: '12cejc',\n },\n ],\n]);\n\nexport default CookingPot;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,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AAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_gensync","data","require","_index","_index2","fs","transformFileRunner","gensync","filename","opts","options","Object","assign","config","loadConfig","code","readFile","run","transformFile","args","errback","transformFileSync","sync","transformFileAsync","async"],"sources":["../src/transform-file.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config/index.ts\";\nimport type { InputOptions, ResolvedConfig } from \"./config/index.ts\";\nimport { run } from \"./transformation/index.ts\";\nimport type { FileResult, FileResultCallback } from \"./transformation/index.ts\";\nimport * as fs from \"./gensync-utils/fs.ts\";\n\ntype transformFileBrowserType = typeof import(\"./transform-file-browser\");\ntype transformFileType = typeof import(\"./transform-file\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of transform-file-browser, since this file may be replaced at bundle time with\n// transform-file-browser.\n// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n({}) as any as transformFileBrowserType as transformFileType;\n\nconst transformFileRunner = gensync(function* (\n filename: string,\n opts?: InputOptions,\n): Handler<FileResult | null> {\n const options = { ...opts, filename };\n\n const config: ResolvedConfig | null = yield* loadConfig(options);\n if (config === null) return null;\n\n const code = yield* fs.readFile(filename, \"utf8\");\n return yield* run(config, code);\n});\n\n// @ts-expect-error TS doesn't detect that this signature is compatible\nexport function transformFile(\n filename: string,\n callback: FileResultCallback,\n): void;\nexport function transformFile(\n filename: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n): void;\nexport function transformFile(\n ...args: Parameters<typeof transformFileRunner.errback>\n) {\n transformFileRunner.errback(...args);\n}\n\nexport function transformFileSync(\n ...args: Parameters<typeof transformFileRunner.sync>\n) {\n return transformFileRunner.sync(...args);\n}\nexport function transformFileAsync(\n ...args: Parameters<typeof transformFileRunner.async>\n) {\n return transformFileRunner.async(...args);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,MAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,EAAA,GAAAH,OAAA;AASA,CAAC,CAAC,CAAC;AAEH,MAAMI,mBAAmB,GAAGC,SAAMA,CAAC,CAAC,WAClCC,QAAgB,EAChBC,IAAmB,EACS;EAC5B,MAAMC,OAAO,GAAAC,MAAA,CAAAC,MAAA,KAAQH,IAAI;IAAED;EAAQ,EAAE;EAErC,MAAMK,MAA6B,GAAG,OAAO,IAAAC,cAAU,EAACJ,OAAO,CAAC;EAChE,IAAIG,MAAM,KAAK,IAAI,EAAE,OAAO,IAAI;EAEhC,MAAME,IAAI,GAAG,OAAOV,EAAE,CAACW,QAAQ,CAACR,QAAQ,EAAE,MAAM,CAAC;EACjD,OAAO,OAAO,IAAAS,WAAG,EAACJ,MAAM,EAAEE,IAAI,CAAC;AACjC,CAAC,CAAC;AAYK,SAASG,aAAaA,CAC3B,GAAGC,IAAoD,EACvD;EACAb,mBAAmB,CAACc,OAAO,CAAC,GAAGD,IAAI,CAAC;AACtC;AAEO,SAASE,iBAAiBA,CAC/B,GAAGF,IAAiD,EACpD;EACA,OAAOb,mBAAmB,CAACgB,IAAI,CAAC,GAAGH,IAAI,CAAC;AAC1C;AACO,SAASI,kBAAkBA,CAChC,GAAGJ,IAAkD,EACrD;EACA,OAAOb,mBAAmB,CAACkB,KAAK,CAAC,GAAGL,IAAI,CAAC;AAC3C;AAAC","ignoreList":[]}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_zR","2":"_I","164":"_FB _MR","2049":"x"},C:{"1":"_6O","2":"_bB _sD _L","66":"_OF","2305":"_dI _ZK _AG","2820":"Y"},D:{"1":"_0R","2":"_vF","164":"_6B _uG _MR","2049":"x"},E:{"1":"_6D","2":"_u","132":"_oJ _NE","164":"_RC _zB","1540":"_rH _EE _7E"},F:{"1":"_OS","2":"_T","164":"_MC _GO","2049":"j"},G:{"1":"_UE","2":"_1","132":"_jD _GG _4K","164":"_SD _gC","1540":"_nN _aG"},H:{"2":"1D"},I:{"1":"I","2":"_W","164":"_y"},J:{"2":"D","164":"A"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"164":"bC"},P:{"1":"_EC","164":"_MK"},Q:{"164":"JE"},R:{"164":"KE"},S:{"2":"_C"}},B:5,C:"CSS image-set",D:true};
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRefs = void 0;
const Options_js_1 = require("./Options.js");
const getRefs = (options) => {
const _options = (0, Options_js_1.getDefaultOptions)(options);
const currentPath = _options.name !== undefined
? [..._options.basePath, _options.definitionPath, _options.name]
: _options.basePath;
return {
..._options,
flags: { hasReferencedOpenAiAnyType: false },
currentPath: currentPath,
propertyPath: undefined,
seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [
def._def,
{
def: def._def,
path: [..._options.basePath, _options.definitionPath, name],
// Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.
jsonSchema: undefined,
},
])),
};
};
exports.getRefs = getRefs;
@@ -0,0 +1,9 @@
import { AnyRouter } from '../router.cjs';
export interface HandlerCallback<TRouter extends AnyRouter> {
(ctx: {
request: Request;
router: TRouter;
responseHeaders: Headers;
}): Response | Promise<Response>;
}
export declare function defineHandlerCallback<TRouter extends AnyRouter>(handler: HandlerCallback<TRouter>): HandlerCallback<TRouter>;
@@ -0,0 +1,47 @@
// src/primitive.tsx
import * as React from "react";
import * as ReactDOM from "react-dom";
import { createSlot } from "@radix-ui/react-slot";
import { jsx } from "react/jsx-runtime";
var NODES = [
"a",
"button",
"div",
"form",
"h2",
"h3",
"img",
"input",
"label",
"li",
"nav",
"ol",
"p",
"select",
"span",
"svg",
"ul"
];
var Primitive = NODES.reduce((primitive, node) => {
const Slot = createSlot(`Primitive.${node}`);
const Node = React.forwardRef((props, forwardedRef) => {
const { asChild, ...primitiveProps } = props;
const Comp = asChild ? Slot : node;
if (typeof window !== "undefined") {
window[Symbol.for("radix-ui")] = true;
}
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
});
Node.displayName = `Primitive.${node}`;
return { ...primitive, [node]: Node };
}, {});
function dispatchDiscreteCustomEvent(target, event) {
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
}
var Root = Primitive;
export {
Primitive,
Root,
dispatchDiscreteCustomEvent
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,120 @@
# readdirp [![Weekly downloads](https://img.shields.io/npm/dw/readdirp.svg)](https://github.com/paulmillr/readdirp)
Recursive version of fs.readdir. Exposes a **stream API** (with small RAM & CPU footprint) and a **promise API**.
```sh
npm install readdirp
jsr add jsr:@paulmillr/readdirp
```
```javascript
// Use streams to achieve small RAM & CPU footprint.
// 1) Streams example with for-await.
import readdirp from 'readdirp';
for await (const entry of readdirp('.')) {
const {path} = entry;
console.log(`${JSON.stringify({path})}`);
}
// 2) Streams example, non for-await.
// Print out all JS files along with their size within the current folder & subfolders.
import readdirp from 'readdirp';
readdirp('.', {alwaysStat: true, fileFilter: (f) => f.basename.endsWith('.js')})
.on('data', (entry) => {
const {path, stats: {size}} = entry;
console.log(`${JSON.stringify({path, size})}`);
})
// Optionally call stream.destroy() in `warn()` in order to abort and cause 'close' to be emitted
.on('warn', error => console.error('non-fatal error', error))
.on('error', error => console.error('fatal error', error))
.on('end', () => console.log('done'));
// 3) Promise example. More RAM and CPU than streams / for-await.
import { readdirpPromise } from 'readdirp';
const files = await readdirpPromise('.');
console.log(files.map(file => file.path));
// Other options.
import readdirp from 'readdirp';
readdirp('test', {
fileFilter: (f) => f.basename.endsWith('.js'),
directoryFilter: (d) => d.basename !== '.git',
// directoryFilter: (di) => di.basename.length === 9
type: 'files_directories',
depth: 1
});
```
## API
`const stream = readdirp(root[, options])` — **Stream API**
- Reads given root recursively and returns a `stream` of [entry infos](#entryinfo)
- Optionally can be used like `for await (const entry of stream)` with node.js 10+ (`asyncIterator`).
- `on('data', (entry) => {})` [entry info](#entryinfo) for every file / dir.
- `on('warn', (error) => {})` non-fatal `Error` that prevents a file / dir from being processed. Example: inaccessible to the user.
- `on('error', (error) => {})` fatal `Error` which also ends the stream. Example: illegal options where passed.
- `on('end')` — we are done. Called when all entries were found and no more will be emitted.
- `on('close')` — stream is destroyed via `stream.destroy()`.
Could be useful if you want to manually abort even on a non fatal error.
At that point the stream is no longer `readable` and no more entries, warning or errors are emitted
- To learn more about streams, consult the very detailed [nodejs streams documentation](https://nodejs.org/api/stream.html)
or the [stream-handbook](https://github.com/substack/stream-handbook)
`const entries = await readdirp.promise(root[, options])` — **Promise API**. Returns a list of [entry infos](#entryinfo).
First argument is awalys `root`, path in which to start reading and recursing into subdirectories.
### options
- `fileFilter`: filter to include or exclude files
- **Function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry
- `directoryFilter`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into.
- `depth: 5`: depth at which to stop recursing even if more subdirectories are found
- `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes.
- `alwaysStat: false`: always return `stats` property for every file. Default is `false`, readdirp will return `Dirent` entries. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0.
- `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat`
### `EntryInfo`
Has the following properties:
- `path: 'assets/javascripts/react.js'`: path to the file/directory (relative to given root)
- `fullPath: '/Users/dev/projects/app/assets/javascripts/react.js'`: full path to the file/directory found
- `basename: 'react.js'`: name of the file/directory
- `dirent: fs.Dirent`: built-in [dir entry object](https://nodejs.org/api/fs.html#fs_class_fs_dirent) - only with `alwaysStat: false`
- `stats: fs.Stats`: built in [stat object](https://nodejs.org/api/fs.html#fs_class_fs_stats) - only with `alwaysStat: true`
## Changelog
- 4.0 (Aug 25, 2024) rewritten in typescript, producing hybrid common.js / esm module.
- Remove glob support and all dependencies
- Make sure you're using `let {readdirp} = require('readdirp')` in common.js
- 3.5 (Oct 13, 2020) disallows recursive directory-based symlinks.
Before, it could have entered infinite loop.
- 3.4 (Mar 19, 2020) adds support for directory-based symlinks.
- 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping.
- 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic.
- 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions".
- 3.0 brings huge performance improvements and stream backpressure support.
- Upgrading 2.x to 3.x:
- Signature changed from `readdirp(options)` to `readdirp(root, options)`
- Replaced callback API with promise API.
- Renamed `entryType` option to `type`
- Renamed `entryType: 'both'` to `'files_directories'`
- `EntryInfo`
- Renamed `stat` to `stats`
- Emitted only when `alwaysStat: true`
- `dirent` is emitted instead of `stats` by default with `alwaysStat: false`
- Renamed `name` to `basename`
- Removed `parentDir` and `fullParentDir` properties
- Supported node.js versions:
- 4.x: node 14+
- 3.x: node 8+
- 2.x: node 0.6+
## License
Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (<https://paulmillr.com>)
MIT License, see [LICENSE](LICENSE) file.
@@ -0,0 +1,151 @@
'use strict'
const test = require('tape')
const fastURI = require('..')
test('URI Serialize', (t) => {
let components = {
scheme: undefined,
userinfo: undefined,
host: undefined,
port: undefined,
path: undefined,
query: undefined,
fragment: undefined
}
t.equal(fastURI.serialize(components), '', 'Undefined Components')
components = {
scheme: '',
userinfo: '',
host: '',
port: 0,
path: '',
query: '',
fragment: ''
}
t.equal(fastURI.serialize(components), '//@:0?#', 'Empty Components')
components = {
scheme: 'uri',
userinfo: 'foo:bar',
host: 'example.com',
port: 1,
path: 'path',
query: 'query',
fragment: 'fragment'
}
t.equal(fastURI.serialize(components), 'uri://foo:bar@example.com:1/path?query#fragment', 'All Components')
components = {
scheme: 'uri',
host: 'example.com',
port: '9000'
}
t.equal(fastURI.serialize(components), 'uri://example.com:9000', 'String port')
t.equal(fastURI.serialize({ path: '//path' }), '/%2Fpath', 'Double slash path')
t.equal(fastURI.serialize({ path: 'foo:bar' }), 'foo%3Abar', 'Colon path')
t.equal(fastURI.serialize({ path: '?query' }), '%3Fquery', 'Query path')
t.equal(fastURI.serialize({ host: '10.10.10.10' }), '//10.10.10.10', 'IPv4address')
// mixed IPv4address & reg-name, example from terion-name (https://github.com/garycourt/uri-js/issues/4)
t.equal(fastURI.serialize({ host: '10.10.10.10.example.com' }), '//10.10.10.10.example.com', 'Mixed IPv4address & reg-name')
// IPv6address
t.equal(fastURI.serialize({ host: '2001:db8::7' }), '//[2001:db8::7]', 'IPv6 Host')
t.equal(fastURI.serialize({ host: '::ffff:129.144.52.38' }), '//[::ffff:129.144.52.38]', 'IPv6 Mixed Host')
t.equal(fastURI.serialize({ host: '2606:2800:220:1:248:1893:25c8:1946' }), '//[2606:2800:220:1:248:1893:25c8:1946]', 'IPv6 Full Host')
// IPv6address with zone identifier, RFC 6874
t.equal(fastURI.serialize({ host: 'fe80::a%en1' }), '//[fe80::a%25en1]', 'IPv6 Zone Unescaped Host')
t.equal(fastURI.serialize({ host: 'fe80::a%25en1' }), '//[fe80::a%25en1]', 'IPv6 Zone Escaped Host')
t.end()
})
test('WS serialize', (t) => {
t.equal(fastURI.serialize({ scheme: 'ws' }), 'ws:')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com' }), 'ws://example.com')
t.equal(fastURI.serialize({ scheme: 'ws', resourceName: '/' }), 'ws:')
t.equal(fastURI.serialize({ scheme: 'ws', resourceName: '/foo' }), 'ws:/foo')
t.equal(fastURI.serialize({ scheme: 'ws', resourceName: '/foo?bar' }), 'ws:/foo?bar')
t.equal(fastURI.serialize({ scheme: 'ws', secure: false }), 'ws:')
t.equal(fastURI.serialize({ scheme: 'ws', secure: true }), 'wss:')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com', resourceName: '/foo' }), 'ws://example.com/foo')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com', resourceName: '/foo?bar' }), 'ws://example.com/foo?bar')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com', secure: false }), 'ws://example.com')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com', secure: true }), 'wss://example.com')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com', resourceName: '/foo?bar', secure: false }), 'ws://example.com/foo?bar')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com', resourceName: '/foo?bar', secure: true }), 'wss://example.com/foo?bar')
t.end()
})
test('WSS serialize', (t) => {
t.equal(fastURI.serialize({ scheme: 'wss' }), 'wss:')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com' }), 'wss://example.com')
t.equal(fastURI.serialize({ scheme: 'wss', resourceName: '/' }), 'wss:')
t.equal(fastURI.serialize({ scheme: 'wss', resourceName: '/foo' }), 'wss:/foo')
t.equal(fastURI.serialize({ scheme: 'wss', resourceName: '/foo?bar' }), 'wss:/foo?bar')
t.equal(fastURI.serialize({ scheme: 'wss', secure: false }), 'ws:')
t.equal(fastURI.serialize({ scheme: 'wss', secure: true }), 'wss:')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com', resourceName: '/foo' }), 'wss://example.com/foo')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com', resourceName: '/foo?bar' }), 'wss://example.com/foo?bar')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com', secure: false }), 'ws://example.com')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com', secure: true }), 'wss://example.com')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com', resourceName: '/foo?bar', secure: false }), 'ws://example.com/foo?bar')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com', resourceName: '/foo?bar', secure: true }), 'wss://example.com/foo?bar')
t.end()
})
test('URN serialize', (t) => {
// example from RFC 2141
const components = {
scheme: 'urn',
nid: 'foo',
nss: 'a123,456'
}
t.equal(fastURI.serialize(components), 'urn:foo:a123,456')
// example from RFC 4122
let uuidcomponents = {
scheme: 'urn',
nid: 'uuid',
uuid: 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6'
}
t.equal(fastURI.serialize(uuidcomponents), 'urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6')
uuidcomponents = {
scheme: 'urn',
nid: 'uuid',
uuid: 'notauuid-7dec-11d0-a765-00a0c91e6bf6'
}
t.equal(fastURI.serialize(uuidcomponents), 'urn:uuid:notauuid-7dec-11d0-a765-00a0c91e6bf6')
uuidcomponents = {
scheme: 'urn',
nid: undefined,
uuid: 'notauuid-7dec-11d0-a765-00a0c91e6bf6'
}
t.throws(() => { fastURI.serialize(uuidcomponents) }, 'URN without nid cannot be serialized')
t.end()
})
test('URN NID Override', (t) => {
let components = fastURI.parse('urn:foo:f81d4fae-7dec-11d0-a765-00a0c91e6bf6', { nid: 'uuid' })
t.equal(components.error, undefined, 'errors')
t.equal(components.scheme, 'urn', 'scheme')
t.equal(components.path, undefined, 'path')
t.equal(components.nid, 'foo', 'nid')
t.equal(components.nss, undefined, 'nss')
t.equal(components.uuid, 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6', 'uuid')
components = {
scheme: 'urn',
nid: 'foo',
uuid: 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6'
}
t.equal(fastURI.serialize(components, { nid: 'uuid' }), 'urn:foo:f81d4fae-7dec-11d0-a765-00a0c91e6bf6')
t.end()
})
@@ -0,0 +1,94 @@
import { IncomingHttpHeaders } from './header'
import Dispatcher from './dispatcher'
import { BodyInit, Headers } from './fetch'
/** The scope associated with a mock dispatch. */
declare class MockScope<TData extends object = object> {
constructor (mockDispatch: MockInterceptor.MockDispatch<TData>)
/** Delay a reply by a set amount of time in ms. */
delay (waitInMs: number): MockScope<TData>
/** Persist the defined mock data for the associated reply. It will return the defined mock data indefinitely. */
persist (): MockScope<TData>
/** Define a reply for a set amount of matching requests. */
times (repeatTimes: number): MockScope<TData>
}
/** The interceptor for a Mock. */
declare class MockInterceptor {
constructor (options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[])
/** Mock an undici request with the defined reply. */
reply<TData extends object = object>(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback<TData>): MockScope<TData>
reply<TData extends object = object>(
statusCode: number,
data?: TData | Buffer | string | MockInterceptor.MockResponseDataHandler<TData>,
responseOptions?: MockInterceptor.MockResponseOptions
): MockScope<TData>
/** Mock an undici request by throwing the defined reply error. */
replyWithError<TError extends Error = Error>(error: TError): MockScope
/** Set default reply headers on the interceptor for subsequent mocked replies. */
defaultReplyHeaders (headers: IncomingHttpHeaders): MockInterceptor
/** Set default reply trailers on the interceptor for subsequent mocked replies. */
defaultReplyTrailers (trailers: Record<string, string>): MockInterceptor
/** Set automatically calculated content-length header on subsequent mocked replies. */
replyContentLength (): MockInterceptor
}
declare namespace MockInterceptor {
/** MockInterceptor options. */
export interface Options {
/** Path to intercept on. */
path: string | RegExp | ((path: string) => boolean);
/** Method to intercept on. Defaults to GET. */
method?: string | RegExp | ((method: string) => boolean);
/** Body to intercept on. */
body?: string | RegExp | ((body: string) => boolean);
/** Headers to intercept on. */
headers?: Record<string, string | RegExp | ((body: string) => boolean)> | ((headers: Record<string, string>) => boolean);
/** Query params to intercept on */
query?: Record<string, any>;
}
export interface MockDispatch<TData extends object = object, TError extends Error = Error> extends Options {
times: number | null;
persist: boolean;
consumed: boolean;
data: MockDispatchData<TData, TError>;
}
export interface MockDispatchData<TData extends object = object, TError extends Error = Error> extends MockResponseOptions {
error: TError | null;
statusCode?: number;
data?: TData | string;
}
export interface MockResponseOptions {
headers?: IncomingHttpHeaders;
trailers?: Record<string, string>;
}
export interface MockResponseCallbackOptions {
path: string;
method: string;
headers?: Headers | Record<string, string>;
origin?: string;
body?: BodyInit | Dispatcher.DispatchOptions['body'] | null;
}
export type MockResponseDataHandler<TData extends object = object> = (
opts: MockResponseCallbackOptions
) => TData | Buffer | string
export type MockReplyOptionsCallback<TData extends object = object> = (
opts: MockResponseCallbackOptions
) => { statusCode: number, data?: TData | Buffer | string, responseOptions?: MockResponseOptions }
}
interface Interceptable extends Dispatcher {
/** Intercepts any matching requests that use the same origin as this mock client. */
intercept(options: MockInterceptor.Options): MockInterceptor;
/** Clean up all the prepared mocks. */
cleanMocks (): void
}
export {
Interceptable,
MockInterceptor,
MockScope
}
@@ -0,0 +1,9 @@
"use strict";
const absFloor = require("./absFloor-CImRXpov.js");
const parse = require("./parse.js");
function diffInMilliseconds(date, input, asFloat) {
const parsed = parse(input);
const output = +date - +parsed;
return asFloat ? output : absFloor.absFloor(output);
}
module.exports = diffInMilliseconds;
@@ -0,0 +1,73 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference lib="es2021.promise" />
interface ErrorOptions {
cause?: unknown;
}
interface Error {
cause?: unknown;
}
interface ErrorConstructor {
new (message?: string, options?: ErrorOptions): Error;
(message?: string, options?: ErrorOptions): Error;
}
interface EvalErrorConstructor {
new (message?: string, options?: ErrorOptions): EvalError;
(message?: string, options?: ErrorOptions): EvalError;
}
interface RangeErrorConstructor {
new (message?: string, options?: ErrorOptions): RangeError;
(message?: string, options?: ErrorOptions): RangeError;
}
interface ReferenceErrorConstructor {
new (message?: string, options?: ErrorOptions): ReferenceError;
(message?: string, options?: ErrorOptions): ReferenceError;
}
interface SyntaxErrorConstructor {
new (message?: string, options?: ErrorOptions): SyntaxError;
(message?: string, options?: ErrorOptions): SyntaxError;
}
interface TypeErrorConstructor {
new (message?: string, options?: ErrorOptions): TypeError;
(message?: string, options?: ErrorOptions): TypeError;
}
interface URIErrorConstructor {
new (message?: string, options?: ErrorOptions): URIError;
(message?: string, options?: ErrorOptions): URIError;
}
interface AggregateErrorConstructor {
new (
errors: Iterable<any>,
message?: string,
options?: ErrorOptions,
): AggregateError;
(
errors: Iterable<any>,
message?: string,
options?: ErrorOptions,
): AggregateError;
}
@@ -0,0 +1,79 @@
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2014 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
var util = require('./util');
/**
* Determine whether mappingB is after mappingA with respect to generated
* position.
*/
function generatedPositionAfter(mappingA, mappingB) {
// Optimized for most common case
var lineA = mappingA.generatedLine;
var lineB = mappingB.generatedLine;
var columnA = mappingA.generatedColumn;
var columnB = mappingB.generatedColumn;
return lineB > lineA || lineB == lineA && columnB >= columnA ||
util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
}
/**
* A data structure to provide a sorted view of accumulated mappings in a
* performance conscious manner. It trades a neglibable overhead in general
* case for a large speedup in case of mappings being added in order.
*/
function MappingList() {
this._array = [];
this._sorted = true;
// Serves as infimum
this._last = {generatedLine: -1, generatedColumn: 0};
}
/**
* Iterate through internal items. This method takes the same arguments that
* `Array.prototype.forEach` takes.
*
* NOTE: The order of the mappings is NOT guaranteed.
*/
MappingList.prototype.unsortedForEach =
function MappingList_forEach(aCallback, aThisArg) {
this._array.forEach(aCallback, aThisArg);
};
/**
* Add the given source mapping.
*
* @param Object aMapping
*/
MappingList.prototype.add = function MappingList_add(aMapping) {
if (generatedPositionAfter(this._last, aMapping)) {
this._last = aMapping;
this._array.push(aMapping);
} else {
this._sorted = false;
this._array.push(aMapping);
}
};
/**
* Returns the flat, sorted array of mappings. The mappings are sorted by
* generated position.
*
* WARNING: This method returns internal data without copying, for
* performance. The return value must NOT be mutated, and should be treated as
* an immutable borrow. If you want to take ownership, you must make your own
* copy.
*/
MappingList.prototype.toArray = function MappingList_toArray() {
if (!this._sorted) {
this._array.sort(util.compareByGeneratedPositionsInflated);
this._sorted = true;
}
return this._array;
};
exports.MappingList = MappingList;
@@ -0,0 +1,73 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.encodeHTML = encodeHTML;
exports.encodeNonAsciiHTML = encodeNonAsciiHTML;
const encode_html_js_1 = require("./generated/encode-html.js");
const escape_js_1 = require("./escape.js");
const htmlReplacer = /[\t\n\f!-,./:-@[-`{-}\u0080-\uFFFF]/g;
/**
* Encodes all characters in the input using HTML entities. This includes
* characters that are valid ASCII characters in HTML documents, such as `#`.
*
* To get a more compact output, consider using the `encodeNonAsciiHTML`
* function, which will only encode characters that are not valid in HTML
* documents, as well as non-ASCII characters.
*
* If a character has no equivalent entity, a numeric hexadecimal reference
* (eg. `&#xfc;`) will be used.
*/
function encodeHTML(input) {
return encodeHTMLTrieRe(htmlReplacer, input);
}
/**
* Encodes all non-ASCII characters, as well as characters not valid in HTML
* documents using HTML entities. This function will not encode characters that
* are valid in HTML documents, such as `#`.
*
* If a character has no equivalent entity, a numeric hexadecimal reference
* (eg. `&#xfc;`) will be used.
*/
function encodeNonAsciiHTML(input) {
return encodeHTMLTrieRe(escape_js_1.xmlReplacer, input);
}
function encodeHTMLTrieRe(regExp, input) {
let returnValue = "";
let lastIndex = 0;
let match;
while ((match = regExp.exec(input)) !== null) {
const { index } = match;
returnValue += input.substring(lastIndex, index);
const char = input.charCodeAt(index);
let next = encode_html_js_1.htmlTrie.get(char);
if (typeof next === "object") {
// We are in a branch. Try to match the next char.
if (index + 1 < input.length) {
const nextChar = input.charCodeAt(index + 1);
const value = typeof next.n === "number"
? next.n === nextChar
? next.o
: undefined
: next.n.get(nextChar);
if (value !== undefined) {
returnValue += value;
lastIndex = regExp.lastIndex += 1;
continue;
}
}
next = next.v;
}
// We might have a tree node without a value; skip and use a numeric entity.
if (next === undefined) {
const cp = (0, escape_js_1.getCodePoint)(input, index);
returnValue += `&#x${cp.toString(16)};`;
// Increase by 1 if we have a surrogate pair
lastIndex = regExp.lastIndex += Number(cp !== char);
}
else {
returnValue += next;
lastIndex = index + 1;
}
}
return returnValue + input.substr(lastIndex);
}
//# sourceMappingURL=encode.js.map
@@ -0,0 +1,85 @@
declare namespace getRawBody {
export type Encoding = string | true;
export interface Options {
/**
* The expected length of the stream.
*/
length?: number | string | null;
/**
* The byte limit of the body. This is the number of bytes or any string
* format supported by `bytes`, for example `1000`, `'500kb'` or `'3mb'`.
*/
limit?: number | string | null;
/**
* The encoding to use to decode the body into a string. By default, a
* `Buffer` instance will be returned when no encoding is specified. Most
* likely, you want `utf-8`, so setting encoding to `true` will decode as
* `utf-8`. You can use any type of encoding supported by `iconv-lite`.
*/
encoding?: Encoding | null;
}
export interface RawBodyError extends Error {
/**
* The limit in bytes.
*/
limit?: number;
/**
* The expected length of the stream.
*/
length?: number;
expected?: number;
/**
* The received bytes.
*/
received?: number;
/**
* The encoding.
*/
encoding?: string;
/**
* The corresponding status code for the error.
*/
status: number;
statusCode: number;
/**
* The error type.
*/
type: string;
}
}
/**
* Gets the entire buffer of a stream either as a `Buffer` or a string.
* Validates the stream's length against an expected length and maximum
* limit. Ideal for parsing request bodies.
*/
declare function getRawBody(
stream: NodeJS.ReadableStream,
callback: (err: getRawBody.RawBodyError, body: Buffer) => void
): void;
declare function getRawBody(
stream: NodeJS.ReadableStream,
options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding,
callback: (err: getRawBody.RawBodyError, body: string) => void
): void;
declare function getRawBody(
stream: NodeJS.ReadableStream,
options: getRawBody.Options,
callback: (err: getRawBody.RawBodyError, body: Buffer) => void
): void;
declare function getRawBody(
stream: NodeJS.ReadableStream,
options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding
): Promise<string>;
declare function getRawBody(
stream: NodeJS.ReadableStream,
options?: getRawBody.Options
): Promise<Buffer>;
export = getRawBody;
@@ -0,0 +1 @@
{"version":3,"file":"circuit-board.js","sources":["../../../src/icons/circuit-board.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircuitBoard\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0xMSA5aDRhMiAyIDAgMCAwIDItMlYzIiAvPgogIDxjaXJjbGUgY3g9IjkiIGN5PSI5IiByPSIyIiAvPgogIDxwYXRoIGQ9Ik03IDIxdi00YTIgMiAwIDAgMSAyLTJoNCIgLz4KICA8Y2lyY2xlIGN4PSIxNSIgY3k9IjE1IiByPSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/circuit-board\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CircuitBoard = createLucideIcon('CircuitBoard', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M11 9h4a2 2 0 0 0 2-2V3', key: '1ve2rv' }],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n ['path', { d: 'M7 21v-4a2 2 0 0 1 2-2h4', key: '1fwkro' }],\n ['circle', { cx: '15', cy: '15', r: '2', key: '3i40o0' }],\n]);\n\nexport default CircuitBoard;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,C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EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,144 @@
'use strict'
const semver = require('semver')
const path = require('path')
const log = require('./log')
// versions where -headers.tar.gz started shipping
const headersTarballRange = '>= 3.0.0 || ~0.12.10 || ~0.10.42'
const bitsre = /\/win-(x86|x64|arm64)\//
const bitsreV3 = /\/win-(x86|ia32|x64)\// // io.js v3.x.x shipped with "ia32" but should
// have been "x86"
// Captures all the logic required to determine download URLs, local directory and
// file names. Inputs come from command-line switches (--target, --dist-url),
// `process.version` and `process.release` where it exists.
function processRelease (argv, gyp, defaultVersion, defaultRelease) {
let version = (semver.valid(argv[0]) && argv[0]) || gyp.opts.target || defaultVersion
const versionSemver = semver.parse(version)
let overrideDistUrl = gyp.opts['dist-url'] || gyp.opts.disturl
let isNamedForLegacyIojs
let name
let distBaseUrl
let baseUrl
let libUrl32
let libUrl64
let libUrlArm64
let tarballUrl
let canGetHeaders
if (!versionSemver) {
// not a valid semver string, nothing we can do
return { version }
}
// flatten version into String
version = versionSemver.version
// defaultVersion should come from process.version so ought to be valid semver
const isDefaultVersion = version === semver.parse(defaultVersion).version
// can't use process.release if we're using --target=x.y.z
if (!isDefaultVersion) {
defaultRelease = null
}
if (defaultRelease) {
// v3 onward, has process.release
name = defaultRelease.name.replace(/io\.js/, 'iojs') // remove the '.' for directory naming purposes
} else {
// old node or alternative --target=
// semver.satisfies() doesn't like prerelease tags so test major directly
isNamedForLegacyIojs = versionSemver.major >= 1 && versionSemver.major < 4
// isNamedForLegacyIojs is required to support Electron < 4 (in particular Electron 3)
// as previously this logic was used to ensure "iojs" was used to download iojs releases
// and "node" for node releases. Unfortunately the logic was broad enough that electron@3
// published release assets as "iojs" so that the node-gyp logic worked. Once Electron@3 has
// been EOL for a while (late 2019) we should remove this hack.
name = isNamedForLegacyIojs ? 'iojs' : 'node'
}
// check for the nvm.sh standard mirror env variables
if (!overrideDistUrl && process.env.NODEJS_ORG_MIRROR) {
overrideDistUrl = process.env.NODEJS_ORG_MIRROR
}
if (overrideDistUrl) {
log.verbose('download', 'using dist-url', overrideDistUrl)
}
if (overrideDistUrl) {
distBaseUrl = overrideDistUrl.replace(/\/+$/, '')
} else {
distBaseUrl = 'https://nodejs.org/dist'
}
distBaseUrl = new URL(distBaseUrl + '/v' + version + '/')
// new style, based on process.release so we have a lot of the data we need
if (defaultRelease && defaultRelease.headersUrl && !overrideDistUrl) {
baseUrl = new URL('./', defaultRelease.headersUrl)
libUrl32 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x86', versionSemver.major)
libUrl64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x64', versionSemver.major)
libUrlArm64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'arm64', versionSemver.major)
tarballUrl = defaultRelease.headersUrl
} else {
// older versions without process.release are captured here and we have to make
// a lot of assumptions, additionally if you --target=x.y.z then we can't use the
// current process.release
baseUrl = distBaseUrl
libUrl32 = resolveLibUrl(name, baseUrl, 'x86', versionSemver.major)
libUrl64 = resolveLibUrl(name, baseUrl, 'x64', versionSemver.major)
libUrlArm64 = resolveLibUrl(name, baseUrl, 'arm64', versionSemver.major)
// making the bold assumption that anything with a version number >3.0.0 will
// have a *-headers.tar.gz file in its dist location, even some frankenstein
// custom version
canGetHeaders = semver.satisfies(versionSemver, headersTarballRange)
tarballUrl = new URL(name + '-v' + version + (canGetHeaders ? '-headers' : '') + '.tar.gz', baseUrl).href
}
return {
version,
semver: versionSemver,
name,
baseUrl: baseUrl.href,
tarballUrl,
shasumsUrl: new URL('SHASUMS256.txt', baseUrl).href,
versionDir: (name !== 'node' ? name + '-' : '') + version,
ia32: {
libUrl: libUrl32.href,
libPath: normalizePath(path.relative(baseUrl.pathname, libUrl32.pathname))
},
x64: {
libUrl: libUrl64.href,
libPath: normalizePath(path.relative(baseUrl.pathname, libUrl64.pathname))
},
arm64: {
libUrl: libUrlArm64.href,
libPath: normalizePath(path.relative(baseUrl.pathname, libUrlArm64.pathname))
}
}
}
function normalizePath (p) {
return path.normalize(p).replace(/\\/g, '/')
}
function resolveLibUrl (name, defaultUrl, arch, versionMajor) {
if (!defaultUrl.pathname) defaultUrl = new URL(defaultUrl)
const base = new URL('./', defaultUrl)
const hasLibUrl = bitsre.test(defaultUrl.pathname) || (versionMajor === 3 && bitsreV3.test(defaultUrl.pathname))
if (!hasLibUrl) {
// let's assume it's a baseUrl then
if (versionMajor >= 1) {
return new URL('win-' + arch + '/' + name + '.lib', base)
}
// prior to io.js@1.0.0 32-bit node.lib lives in /, 64-bit lives in /x64/
return new URL((arch === 'x86' ? '' : arch + '/') + name + '.lib', base)
}
// else we have a proper url to a .lib, just make sure it's the right arch
return new URL(defaultUrl.pathname.replace(versionMajor === 3 ? bitsreV3 : bitsre, '/win-' + arch + '/'), defaultUrl)
}
module.exports = processRelease
@@ -0,0 +1,12 @@
'use strict';
var decompress = require('@zxcvbn-ts/dictionary-compression/decompress');
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var decompress__default = /*#__PURE__*/_interopDefault(decompress);
var lastnames = decompress__default.default("AsmithAjohnsonAwilliamsAjonesAbrownAdavisAmillerAwilsonAmooreAtaylorAandersonAthomasAjacksonAwhiteAharrisAmartinAthompsonAgarciaAmartinezArobinsonAclarkArodriguezAlewisCeAwalkerAhallAallenAyoungAhernandezAkingAwrightAlopezAhillAscottAgreenAadamsAbakerAgonzalezAnelsonAcarterAmitchellAperezArobertsAturnerAphillipsAcampbellAparkerAevansBdwardsAcollinsAstewartBanchezAmorrisArogersBeedAcookAmorganAbellAmurphyAbaileyAriveraAcooperArichardsonAcoxAhowardAwardAtorresApetersonAgrayAramirezAjamesAwatsonAbrooksAkellyAsandersApriceAbennettAwoodAbarnesArossAhendersonAcolemanAjenkinsAperryBowellAlongApattersonAhughesAfloresAwashingtonAbutlerAsimmonsAfosterAgonzalesAbryantAalexanderArussellAgriffinAdiazAhayesAmyersAfordAhamiltonAgrahamAsullivanAwallaceBoodsAcoleAwestAjordanAowensAreynoldsAfisherAellisAharrisonAgibsonAmcdonaldAcruzAmarshallAortizAgomezAmurrayAfreemanAwellsCbbAsimpsonBtevensAtuckerAporterAhunterBicksAcrawfordAhenryAboydAmasonBoralesAkennedyAwarrenAdixonAramosBeyesAburnsAgordonAshawAholmesAriceBobertsonAhuntAblackAdanielsApalmerAmillsAnicholsAgrantAknightAfergusonAroseAstoneAhawkinsAdunnAperkinsAhudsonAspencerAgardnerAstephensApayneBierceAberryAmatthewsAarnoldAwagnerBillisArayAwatkinsAolsonAcarrollAduncanAsnyderAhartAcunninghamAbradleyAlaneAandrewsAruizAharperAfoxArileyAarmstrongAcarpenterAweaverAgreeneAlawrenceAelliottAchavezAsimsAaustinApetersAkelleyAfranklinAlawsonAfieldsAgutierrezAryanAschmidtAcarrAvasquezAcastilloAwheelerAchapmanAoliverAmontgomeryArichardsAwilliamsonAjohnstonAbanksAmeyerAbishopAmccoyAhowellAalvarezAmorrisonAhansenAfernandezAgarzaAharveyAlittleAburtonAstanleyAnguyenAgeorgeAjacobsAreidAkimAfullerAlynchAdeanAgilbertBarrettAromeroAwelchAlarsonAfrazierAburkeAhansonAdayAmendozaBorenoAbowmanAmedinaAfowlerAbrewerAhoffmanAcarlsonAsilvaApearsonAhollandAdouglasAflemingAjensenAvargasAbyrdAdavidsonAhopkinsAmayAterryAherreraAwadeAsotoAwaltersAcurtisAnealAcaldwellAloweAjenningsAbarnettAgravesAjimenezAhortonAsheltonAbarrettAobrienAcastroAsuttonAgregoryAmckinneyAlucasAmilesAcraigArodriquezAchambersAholtAlambertAfletcherAwattsAbatesAhaleArhodesApenaAbeckAnewmanAhaynesAmcdanielBendezAbushAvaughnAparksAdawsonAsantiagoAnorrisAhardyAloveAsteeleAcurryApowersAschultzAbarkerAguzmanApageAmunozAballAkellerAchandlerAweberAleonardAwalshAlyonsAramseyAwolfeAschneiderAmullinsAbensonAsharpAbowenAdanielAbarberAcummingsAhinesAbaldwinAgriffithAvaldezAhubbardAsalazarAreevesAwarnerAstevensonAburgessAsantosAtateAcrossAgarnerAmannCckBossAthorntonAdennisAmcgeeAfarmerAdelgadoAaguilarAvegaAgloverAmanningAcohenAharmonArodgersCbbinsAnewtonAtoddAblairAhigginsAingramAreeseAcannonAstricklandAtownsendApotterAgoodwinAwaltonAroweAhamptonAortegaApattonAswansonAjosephAfrancisAgoodmanAmaldonadoAyatesAbeckerAericksonAhodgesAriosAconnerAadkinsAwebsterAnormanAmaloneAhammondAflowersAcobbAmoodyAquinnAblakeAmaxwellApopeAfloydAosborneApaulAmccarthyAguerreroAlindseyAestradaAsandovalAgibbsAtylerAgrossAfitzgeraldAstokesAdoyleAshermanBaundersAwiseAcolonAgillAalvaradoAgreerApadillaAsimonAwatersAnunezAballardAschwartzAmcbrideAhoustonAchristensenAkleinAprattAbriggsAparsonsAmclaughlinAzimmermanAfrenchAbuchananAmoranAcopelandAroyApittmanAbradyAmccormickAhollowayAbrockApooleAfrankAloganAowenAbassAmarshAdrakeAwongAjeffersonAparkAmortonAabbottAsparksApatrickAnortonAhuffAclaytonAmasseyAlloydAfigueroaAcarsonAbowersArobersonAbartonAtranAlambAharringtonAcaseyAbooneAcortezBlarkeAmathisAsingletonAwilkinsAcainAbryanAunderwoodAhoganAmckenzieAcollierAlunaAphelpsAmcguireAallisonAbridgesAwilkersonAnashAsummersAatkinsAwilcoxApittsAconleyAmarquezAburnettArichardAcochranBhaseAdavenportAhoodAgatesAclayAayalaAsawyerAromanAvazquezAdickersonAhodgeAacostaAflynnAespinozaAnicholsonAmonroeAwolfAmorrowAkirkArandallAanthonyAwhitakerAoconnorAskinnerAwareAmolinaAkirbyAhuffmanAbradfordAcharlesAgilmoreAdominguezAonealAbruceAlangAcombsAkramerAheathBancockAgallagherCinesAshafferCortAwigginsAmathewsBcclainAfischerAwallAsmallAmeltonAhensleyAbondAdyerAcameronAgrimesAcontrerasBhristianAwyattAbaxterAsnowAmosleyAshepherdAlarsenAhooverAbeasleyAglennApetersenAwhiteheadAmeyersAkeithAgarrisonAvincentAshieldsAhornAsavageAolsenAschroederAhartmanAwoodardAmuellerAkempAdeleonAboothApatelAcalhounAwileyAeatonAclineAnavarroAharrellAlesterAhumphreyAparrishAduranAhutchinsonBessAdorseyAbullockAroblesAbeardAdaltonAavilaAvanceArichAblackwellAyorkAjohnsAblankenshipAtrevinoAsalinasAcamposApruittAmosesAcallahanAgoldenAmontoyaAhardinAguerraAmcdowellAcareyAstaffordAgallegosAhensonAwilkinsonAbookerAmerrittBirandaAatkinsonAorrAdeckerAhobbsAprestonAtannerAknoxApachecoAstephensonAglassArojasAserranoAmarksAhickmanAenglishAsweeneyBtrongAprinceAmcclureAconwayAwalterArothAmaynardAfarrellAloweryAhurstAnixonAweissAtrujilloAellisonAsloanAjuarezAwintersAmcleanArandolphAleonAboyerAvillarrealAmccallAgentryAcarrilloAkentAayersAlaraAshannonBextonApaceAhullAleblancAbrowningAvelasquezAleachAchangAhouseAsellersAherringAnobleAfoleyAbartlettAmercadoAlandryAdurhamAwallsAbarrAmckeeAbauerAriverLine truncated
module.exports = lastnames;
//# sourceMappingURL=lastnames.json.cjs.map
@@ -0,0 +1,156 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getParsedType = exports.ZodParsedType = exports.objectUtil = exports.util = void 0;
var util;
(function (util) {
util.assertEqual = (_) => { };
function assertIs(_arg) { }
util.assertIs = assertIs;
function assertNever(_x) {
throw new Error();
}
util.assertNever = assertNever;
util.arrayToEnum = (items) => {
const obj = {};
for (const item of items) {
obj[item] = item;
}
return obj;
};
util.getValidEnumValues = (obj) => {
const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
const filtered = {};
for (const k of validKeys) {
filtered[k] = obj[k];
}
return util.objectValues(filtered);
};
util.objectValues = (obj) => {
return util.objectKeys(obj).map(function (e) {
return obj[e];
});
};
util.objectKeys = typeof Object.keys === "function" // eslint-disable-line ban/ban
? (obj) => Object.keys(obj) // eslint-disable-line ban/ban
: (object) => {
const keys = [];
for (const key in object) {
if (Object.prototype.hasOwnProperty.call(object, key)) {
keys.push(key);
}
}
return keys;
};
util.find = (arr, checker) => {
for (const item of arr) {
if (checker(item))
return item;
}
return undefined;
};
util.isInteger = typeof Number.isInteger === "function"
? (val) => Number.isInteger(val) // eslint-disable-line ban/ban
: (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
function joinValues(array, separator = " | ") {
return array.map((val) => (typeof val === "string" ? `'${val}'` : val)).join(separator);
}
util.joinValues = joinValues;
util.jsonStringifyReplacer = (_, value) => {
if (typeof value === "bigint") {
return value.toString();
}
return value;
};
})(util || (exports.util = util = {}));
var objectUtil;
(function (objectUtil) {
objectUtil.mergeShapes = (first, second) => {
return {
...first,
...second, // second overwrites first
};
};
})(objectUtil || (exports.objectUtil = objectUtil = {}));
exports.ZodParsedType = util.arrayToEnum([
"string",
"nan",
"number",
"integer",
"float",
"boolean",
"date",
"bigint",
"symbol",
"function",
"undefined",
"null",
"array",
"object",
"unknown",
"promise",
"void",
"never",
"map",
"set",
]);
const getParsedType = (data) => {
const t = typeof data;
switch (t) {
case "undefined":
return exports.ZodParsedType.undefined;
case "string":
return exports.ZodParsedType.string;
case "number":
return Number.isNaN(data) ? exports.ZodParsedType.nan : exports.ZodParsedType.number;
case "boolean":
return exports.ZodParsedType.boolean;
case "function":
return exports.ZodParsedType.function;
case "bigint":
return exports.ZodParsedType.bigint;
case "symbol":
return exports.ZodParsedType.symbol;
case "object":
if (Array.isArray(data)) {
return exports.ZodParsedType.array;
}
if (data === null) {
return exports.ZodParsedType.null;
}
if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
return exports.ZodParsedType.promise;
}
if (typeof Map !== "undefined" && data instanceof Map) {
return exports.ZodParsedType.map;
}
if (typeof Set !== "undefined" && data instanceof Set) {
return exports.ZodParsedType.set;
}
if (typeof Date !== "undefined" && data instanceof Date) {
return exports.ZodParsedType.date;
}
return exports.ZodParsedType.object;
default:
return exports.ZodParsedType.unknown;
}
};
exports.getParsedType = getParsedType;
// seal-cjs-exports
(function () {
var keys = Object.getOwnPropertyNames(exports);
for (var i = 0; i < keys.length; i++) {
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
if (!desc || !desc.get || !desc.configurable) continue;
var value;
try {
value = desc.get();
} catch (e) {
continue;
}
// a circular require may not have settled this one yet, so leave it live
if (value === undefined) continue;
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
}
Object.freeze(exports);
})();
@@ -0,0 +1,66 @@
import type { BaseContext, RequestId } from "@modelcontextprotocol/client";
import type { ZodLiteral, ZodObject, ZodType } from "zod/v4";
/**
* A whole-message Zod schema (`method` literal plus `params`), as accepted by
* the 1.x `setRequestHandler(Schema, handler)` forms.
*/
export type LegacyMethodSchema = ZodObject<{
method: ZodLiteral<string>;
params: ZodType;
}>;
/**
* The `extra` argument 1.x request handlers received.
*
* @deprecated Use the 2.x `BaseContext` (`extra.mcpReq.signal`, `extra.mcpReq.id`).
*/
export type LegacyRequestHandlerExtra = {
signal: AbortSignal;
requestId: RequestId;
sessionId?: string;
_meta?: BaseContext["mcpReq"]["_meta"];
sendRequest: BaseContext["mcpReq"]["send"];
sendNotification: BaseContext["mcpReq"]["notify"];
authInfo?: NonNullable<BaseContext["http"]>["authInfo"];
};
/** @deprecated Use `setRequestHandler("method", { params, result }, (params, ctx) => …)`. */
export type LegacyRequestHandler<S extends LegacyMethodSchema> = (request: S["_output"], extra: LegacyRequestHandlerExtra) => unknown;
/** @deprecated Use `setNotificationHandler("method", { params }, (params) => …)`. */
export type LegacyNotificationHandler<S extends LegacyMethodSchema> = (notification: S["_output"]) => void | Promise<void>;
/**
* `setRequestHandler` with the 1.x `(Schema, handler)` form kept as a
* deprecated overload next to the 2.x forms in `Modern`.
*/
export type LegacyRequestHandlerSetter<Modern> = Modern & {
/**
* @deprecated 1.x form. Pass the method name and `{ params }` instead;
* removed in 3.0.
*/
<S extends LegacyMethodSchema>(schema: S, handler: LegacyRequestHandler<S>): void;
};
/** `setNotificationHandler` counterpart of {@link LegacyRequestHandlerSetter}. */
export type LegacyNotificationHandlerSetter<Modern> = Modern & {
/**
* @deprecated 1.x form. Pass the method name and `{ params }` instead;
* removed in 3.0.
*/
<S extends LegacyMethodSchema>(schema: S, handler: LegacyNotificationHandler<S>): void;
};
/**
* Arguments for the 2.x three-argument `setRequestHandler` /
* `setNotificationHandler` form.
*/
type ModernArgs = [
method: string,
schemas: {
params: ZodType;
},
handler: (params: unknown, ctx: BaseContext) => unknown
];
/**
* Translate a 1.x `(Schema, handler)` registration into the 2.x
* `(method, { params }, handler)` form, or return `undefined` when the call
* is already in the 2.x form. The 1.x handler receives the reassembled
* `{ method, params }` message and, for requests, a 1.x-shaped `extra`.
*/
export declare function toModernArgs(kind: "request" | "notification", args: unknown[]): ModernArgs | undefined;
export {};
@@ -0,0 +1,7 @@
MIT License Copyright (c) 2025 Alexis Munsayac <alexis.munsayac@gmail.com>
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 (including the next paragraph) 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,7 @@
import addMinutes from "./addMinutes.mjs";
function subMinutes(date, minutes) {
return addMinutes(date, -minutes);
}
export {
subMinutes as default
};
@@ -0,0 +1 @@
{"version":3,"file":"bell-off.js","sources":["../../../src/icons/bell-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BellOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAuMjY4IDIxYTIgMiAwIDAgMCAzLjQ2NCAwIiAvPgogIDxwYXRoIGQ9Ik0xNyAxN0g0YTEgMSAwIDAgMS0uNzQtMS42NzNDNC41OSAxMy45NTYgNiAxMi40OTkgNiA4YTYgNiAwIDAgMSAuMjU4LTEuNzQyIiAvPgogIDxwYXRoIGQ9Im0yIDIgMjAgMjAiIC8+CiAgPHBhdGggZD0iTTguNjY4IDMuMDFBNiA2IDAgMCAxIDE4IDhjMCAyLjY4Ny43NyA0LjY1MyAxLjcwNyA2LjA1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/bell-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst BellOff = createLucideIcon('BellOff', [\n ['path', { d: 'M10.268 21a2 2 0 0 0 3.464 0', key: 'vwvbt9' }],\n [\n 'path',\n {\n d: 'M17 17H4a1 1 0 0 1-.74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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,84 @@
'use strict';
module.exports = function generate_not(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $errs = 'errs__' + $lvl;
var $it = it.util.copy(it);
$it.level++;
var $nextValid = 'valid' + $it.level;
if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {
$it.schema = $schema;
$it.schemaPath = $schemaPath;
$it.errSchemaPath = $errSchemaPath;
out += ' var ' + ($errs) + ' = errors; ';
var $wasComposite = it.compositeRule;
it.compositeRule = $it.compositeRule = true;
$it.createErrors = false;
var $allErrorsOption;
if ($it.opts.allErrors) {
$allErrorsOption = $it.opts.allErrors;
$it.opts.allErrors = false;
}
out += ' ' + (it.validate($it)) + ' ';
$it.createErrors = true;
if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
it.compositeRule = $it.compositeRule = $wasComposite;
out += ' if (' + ($nextValid) + ') { ';
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
if (it.opts.messages !== false) {
out += ' , message: \'should NOT be valid\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
if (it.opts.allErrors) {
out += ' } ';
}
} else {
out += ' var err = '; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
if (it.opts.messages !== false) {
out += ' , message: \'should NOT be valid\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
if ($breakOnError) {
out += ' if (false) { ';
}
}
return out;
}
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../src/slider.tsx"],
"sourcesContent": ["'use client';\nexport {\n createSliderScope,\n //\n Slider,\n SliderTrack,\n SliderRange,\n SliderThumb,\n SliderThumbProvider as unstable_SliderThumbProvider,\n SliderThumbTrigger as unstable_SliderThumbTrigger,\n SliderBubbleInput as unstable_SliderBubbleInput,\n //\n Root,\n Track,\n Range,\n Thumb,\n ThumbProvider as unstable_ThumbProvider,\n ThumbTrigger as unstable_ThumbTrigger,\n BubbleInput as unstable_BubbleInput,\n} from './slider';\nexport type {\n SliderProps,\n SliderTrackProps,\n SliderRangeProps,\n SliderThumbProps,\n SliderThumbProviderProps as unstable_SliderThumbProviderProps,\n SliderThumbTriggerProps as unstable_SliderThumbTriggerProps,\n SliderBubbleInputProps as unstable_SliderBubbleInputProps,\n} from './slider';\n", "import * as React from 'react';\nimport { clamp } from '@radix-ui/number';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { useSize } from '@radix-ui/react-use-size';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createCollection } from '@radix-ui/react-collection';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\nconst PAGE_KEYS = ['PageUp', 'PageDown'];\nconst ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\n\ntype SlideDirection = 'from-left' | 'from-right' | 'from-bottom' | 'from-top';\nconst BACK_KEYS: Record<SlideDirection, string[]> = {\n 'from-left': ['Home', 'PageDown', 'ArrowDown', 'ArrowLeft'],\n 'from-right': ['Home', 'PageDown', 'ArrowDown', 'ArrowRight'],\n 'from-bottom': ['Home', 'PageDown', 'ArrowDown', 'ArrowLeft'],\n 'from-top': ['Home', 'PageDown', 'ArrowUp', 'ArrowLeft'],\n};\n\ndeclare global {\n interface FocusOptions {\n /**\n * A boolean value that should be set to `true` to force, or `false` to prevent\n * visible indication that the element is focused. If the property is not\n * specified, a browser will provide visible indication if it determines\n * that this would improve accessibility for users.\n *\n * @see\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#focusvisible\n */\n focusVisible?: boolean;\n }\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slider\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLIDER_NAME = 'Slider';\n\nconst [Collection, useCollection, createCollectionScope] =\n createCollection<SliderThumbElement>(SLIDER_NAME);\n\ntype ScopedProps<P> = P & { __scopeSlider?: Scope };\nconst [createSliderContext, createSliderScope] = createContextScope(SLIDER_NAME, [\n createCollectionScope,\n]);\n\ntype SliderContextValue = {\n name: string | undefined;\n disabled: boolean | undefined;\n min: number;\n max: number;\n values: number[];\n valueIndexToChangeRef: React.MutableRefObject<number>;\n thumbs: Set<SliderThumbElement>;\n orientation: SliderProps['orientation'];\n form: string | undefined;\n};\n\nconst [SliderProvider, useSliderContext] = createSliderContext<SliderContextValue>(SLIDER_NAME);\n\ntype SliderElement = SliderHorizontalElement | SliderVerticalElement;\ninterface SliderProps extends Omit<\n SliderHorizontalProps | SliderVerticalProps,\n keyof SliderOrientationPrivateProps | 'defaultValue'\n> {\n name?: string;\n disabled?: boolean;\n orientation?: React.AriaAttributes['aria-orientation'];\n dir?: Direction;\n min?: number;\n max?: number;\n step?: number;\n minStepsBetweenThumbs?: number;\n value?: number[];\n defaultValue?: number[];\n onValueChange?(value: number[]): void;\n onValueCommit?(value: number[]): void;\n inverted?: boolean;\n form?: string;\n}\n\nconst Slider = React.forwardRef<SliderElement, SliderProps>(\n (props: ScopedProps<SliderProps>, forwardedRef) => {\n const {\n name,\n min = 0,\n max = 100,\n step = 1,\n orientation = 'horizontal',\n disabled = false,\n minStepsBetweenThumbs = 0,\n defaultValue = [min],\n value,\n onValueChange = () => {},\n onValueCommit = () => {},\n inverted = false,\n form,\n ...sliderProps\n } = props;\n const thumbRefs = React.useRef<SliderContextValue['thumbs']>(new Set());\n const valueIndexToChangeRef = React.useRef<number>(0);\n const isKeyboardInteractionRef = React.useRef(false);\n const isHorizontal = orientation === 'horizontal';\n const SliderOrientation = isHorizontal ? SliderHorizontal : SliderVertical;\n const [control, setControl] = React.useState<SliderElement | null>(null);Line truncated
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,oBAAsB;AACtB,uBAAqC;AACrC,gCAAgC;AAChC,2BAAmC;AACnC,0CAAqC;AACrC,6BAA6B;AAC7B,gCAA4B;AAC5B,4BAAwB;AACxB,6BAA0B;AAC1B,8BAAiC;AAuLrB;AAjLZ,IAAM,YAAY,CAAC,UAAU,UAAU;AACvC,IAAM,aAAa,CAAC,WAAW,aAAa,aAAa,YAAY;AAGrE,IAAM,YAA8C;AAAA,EAClD,aAAa,CAAC,QAAQ,YAAY,aAAa,WAAW;AAAA,EAC1D,cAAc,CAAC,QAAQ,YA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AU;AAClB,aAAO,MAAM,kBAAkB,KAAK,IAAI;AAAA,IAC1C;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,MAAM;AAAA,QACb,WAAW,oBAAoB,SAAS;AAAA,QACxC,SAAS,oBAAoB,UAAU;AAAA,QACvC,WAAW,oBAAoB,IAAI;AAAA,QACnC,MAAK;AAAA,QAEL;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,oBAAiB;AAAA,YAChB,GAAG;AAAA,YACJ,KAAK;AAAA,YACL,OAAO;AAAA,cACL,GAAG,YAAY;AAAA,cACf,kCAAkC;AAAALine truncated
"names": ["value", "decimalPart"]
}
@@ -0,0 +1,169 @@
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
export abstract class _CodeOrName {
abstract readonly str: string
abstract readonly names: UsedNames
abstract toString(): string
abstract emptyStr(): boolean
}
export const IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i
export class Name extends _CodeOrName {
readonly str: string
constructor(s: string) {
super()
if (!IDENTIFIER.test(s)) throw new Error("CodeGen: name must be a valid identifier")
this.str = s
}
toString(): string {
return this.str
}
emptyStr(): boolean {
return false
}
get names(): UsedNames {
return {[this.str]: 1}
}
}
export class _Code extends _CodeOrName {
readonly _items: readonly CodeItem[]
private _str?: string
private _names?: UsedNames
constructor(code: string | readonly CodeItem[]) {
super()
this._items = typeof code === "string" ? [code] : code
}
toString(): string {
return this.str
}
emptyStr(): boolean {
if (this._items.length > 1) return false
const item = this._items[0]
return item === "" || item === '""'
}
get str(): string {
return (this._str ??= this._items.reduce((s: string, c: CodeItem) => `${s}${c}`, ""))
}
get names(): UsedNames {
return (this._names ??= this._items.reduce((names: UsedNames, c) => {
if (c instanceof Name) names[c.str] = (names[c.str] || 0) + 1
return names
}, {}))
}
}
export type CodeItem = Name | string | number | boolean | null
export type UsedNames = Record<string, number | undefined>
export type Code = _Code | Name
export type SafeExpr = Code | number | boolean | null
export const nil = new _Code("")
type CodeArg = SafeExpr | string | undefined
export function _(strs: TemplateStringsArray, ...args: CodeArg[]): _Code {
const code: CodeItem[] = [strs[0]]
let i = 0
while (i < args.length) {
addCodeArg(code, args[i])
code.push(strs[++i])
}
return new _Code(code)
}
const plus = new _Code("+")
export function str(strs: TemplateStringsArray, ...args: (CodeArg | string[])[]): _Code {
const expr: CodeItem[] = [safeStringify(strs[0])]
let i = 0
while (i < args.length) {
expr.push(plus)
addCodeArg(expr, args[i])
expr.push(plus, safeStringify(strs[++i]))
}
optimize(expr)
return new _Code(expr)
}
export function addCodeArg(code: CodeItem[], arg: CodeArg | string[]): void {
if (arg instanceof _Code) code.push(...arg._items)
else if (arg instanceof Name) code.push(arg)
else code.push(interpolate(arg))
}
function optimize(expr: CodeItem[]): void {
let i = 1
while (i < expr.length - 1) {
if (expr[i] === plus) {
const res = mergeExprItems(expr[i - 1], expr[i + 1])
if (res !== undefined) {
expr.splice(i - 1, 3, res)
continue
}
expr[i++] = "+"
}
i++
}
}
function mergeExprItems(a: CodeItem, b: CodeItem): CodeItem | undefined {
if (b === '""') return a
if (a === '""') return b
if (typeof a == "string") {
if (b instanceof Name || a[a.length - 1] !== '"') return
if (typeof b != "string") return `${a.slice(0, -1)}${b}"`
if (b[0] === '"') return a.slice(0, -1) + b.slice(1)
return
}
if (typeof b == "string" && b[0] === '"' && !(a instanceof Name)) return `"${a}${b.slice(1)}`
return
}
export function strConcat(c1: Code, c2: Code): Code {
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`
}
// TODO do not allow arrays here
function interpolate(x?: string | string[] | number | boolean | null): SafeExpr | string {
return typeof x == "number" || typeof x == "boolean" || x === null
? x
: safeStringify(Array.isArray(x) ? x.join(",") : x)
}
export function stringify(x: unknown): Code {
return new _Code(safeStringify(x))
}
export function safeStringify(x: unknown): string {
return JSON.stringify(x)
.replace(/\u2028/g, "\\u2028")
.replace(/\u2029/g, "\\u2029")
}
export function getProperty(key: Code | string | number): Code {
return typeof key == "string" && IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`
}
//Does best effort to format the name properly
export function getEsmExportName(key: Code | string | number): Code {
if (typeof key == "string" && IDENTIFIER.test(key)) {
return new _Code(`${key}`)
}
throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`)
}
export function regexpCode(rx: RegExp): Code {
return new _Code(rx.toString())
}
@@ -0,0 +1 @@
module.exports={C:{"115":0.115,"120":0.01643,"121":0.02738,"135":0.09309,"140":0.04381,"150":0.06571,"152":0.53665,"153":1.06234,"154":0.24642,"155":5.09816,"156":1.16639,"157":0.0219,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 123 124 125 126 127 128 129 130 131 132 133 134 136 137 138 139 141 142 143 144 145 146 147 148 149 151 158 159 160 3.5 3.6"},D:{"81":0.00548,"101":0.00548,"103":0.2519,"104":0.24642,"105":0.2519,"106":0.2957,"107":0.28475,"108":0.25737,"109":0.47094,"110":0.25737,"111":0.22452,"112":0.28475,"116":0.5257,"117":0.32856,"118":0.08214,"119":0.02738,"120":0.30118,"121":0.00548,"122":0.01643,"123":0.00548,"124":0.2738,"126":0.00548,"127":0.00548,"129":0.01095,"130":0.01095,"131":0.70093,"133":0.60784,"134":0.09857,"135":0.07666,"136":0.08762,"137":0.10404,"138":0.3888,"139":0.19166,"140":0.09309,"141":0.115,"142":0.3888,"144":0.20261,"145":0.14238,"146":0.10952,"147":0.1369,"148":0.42713,"149":0.58593,"150":1.47852,"151":2.20683,"152":6.90524,"153":6.36859,"154":1.30329,"155":0.01643,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 102 113 114 115 125 128 132 143 156 157"},F:{"101":0.0219,"102":0.00548,"134":0.03833,"135":0.10952,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 131 132 133 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"100":0.00548,"104":0.10952,"109":0.01095,"119":0.01643,"120":0.01643,"122":0.01643,"134":0.00548,"140":0.00548,"145":0.00548,"146":0.03286,"147":0.03833,"148":0.0219,"149":0.03286,"150":0.09309,"151":0.53665,"152":3.61416,"153":5.25696,"154":1.16639,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 101 102 103 105 106 107 108 110 111 112 113 114 115 116 117 118 121 123 124 125 126 127 128 129 130 131 132 133 135 136 137 138 139 141 142 143 144"},E:{"11":0.02738,"27":1.33614,_:"4 5 6 7 8 9 10 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.3 16.4 17.0 17.2 17.3 18.0 18.1 18.4 26.1 27.1 27.2 TP","13.1":0.00548,"14.1":0.01643,"15.6":0.26832,"16.2":0.00548,"16.5":0.0219,"16.6":0.14238,"17.1":0.08214,"17.4":0.02738,"17.5":0.00548,"17.6":0.06571,"18.2":0.0219,"18.3":0.05476,"18.5-18.7":0.00548,"26.0":0.03286,"26.2":0.0219,"26.3":0.09857,"26.4":0.06571,"26.5":0.60784,"26.6":2.56277},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00205,"5.0-5.1":0.00205,"6.0-6.1":0,"7.0-7.1":0.00409,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.02047,"11.0-11.2":0.00205,"11.3-11.4":0.00409,"12.0-12.1":0,"12.2-12.5":0.05322,"13.0-13.1":0,"13.2":0.01024,"13.3":0,"13.4-13.7":0.00205,"14.0-14.4":0.00819,"14.5-14.8":0.01228,"15.0-15.1":0.01228,"15.2-15.3":0.00819,"15.4":0.01024,"15.5":0.01228,"15.6-15.8":0.26612,"16.0":0.02047,"16.1":0.03685,"16.2":0.02047,"16.3":0.04504,"16.4":0.01024,"16.5":0.01638,"16.6-16.7":0.37053,"17.0":0.01433,"17.1":0.02047,"17.2":0.02047,"17.3":0.03071,"17.4":0.04299,"17.5":0.08393,"17.6-17.7":0.21699,"18.0":0.04504,"18.1":0.09007,"18.2":0.12283,"18.3":0.2129,"18.4":0.13306,"18.5-18.7":2.74927,"26.0":0.13306,"26.1":0.13511,"26.2":0.3521,"26.3":0.38076,"26.4":0.27841,"26.5":1.86492,"26.6":11.50681,"27.0":0.8823,"27.1":0,"27.2":0.02252},P:{"27":0.02905,"29":0.00968,"30":2.57566,_:"4 20 21 22 23 24 25 26 28 5.0-5.4 6.2-6.4 7.2-7.4 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 18.0 19.0","8.2":0.13556,"17.0":0.00968},I:{"0":0.00904,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0.04976,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":21.27418},R:{_:"0"},M:{"0":0.64241},Q:{_:"14.9"},O:{_:"0"},H:{all:0}};
@@ -0,0 +1,30 @@
# Update Browserslist DB
<img width="120" height="120" alt="Browserslist logo by Anton Popov"
src="https://browsersl.ist/logo.svg" align="right">
CLI tool to update `caniuse-lite` with browsers DB
from [Browserslist](https://github.com/browserslist/browserslist/) config.
Some queries like `last 2 versions` or `>1%` depend on actual data
from `caniuse-lite`.
```sh
npx update-browserslist-db@latest
```
Or if using `pnpm`:
```sh
pnpm exec update-browserslist-db latest
```
Or if using `yarn`:
```sh
yarn dlx update-browserslist-db@latest
```
<a href="https://evilmartians.com/?utm_source=update-browserslist-db">
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
alt="Sponsored by Evil Martians" width="236" height="54">
</a>
## Docs
Read full docs **[here](https://github.com/browserslist/update-db#readme)**.
@@ -0,0 +1,30 @@
import postcss from './postcss.js'
export default postcss
export const stringify = postcss.stringify
export const fromJSON = postcss.fromJSON
export const plugin = postcss.plugin
export const parse = postcss.parse
export const list = postcss.list
export const document = postcss.document
export const comment = postcss.comment
export const atRule = postcss.atRule
export const rule = postcss.rule
export const decl = postcss.decl
export const root = postcss.root
export const CssSyntaxError = postcss.CssSyntaxError
export const Declaration = postcss.Declaration
export const Container = postcss.Container
export const Processor = postcss.Processor
export const Document = postcss.Document
export const Comment = postcss.Comment
export const Warning = postcss.Warning
export const AtRule = postcss.AtRule
export const Result = postcss.Result
export const Input = postcss.Input
export const Rule = postcss.Rule
export const Root = postcss.Root
export const Node = postcss.Node
@@ -0,0 +1,166 @@
# lru cache
A cache object that deletes the least-recently-used items.
[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache)
## Installation:
```javascript
npm install lru-cache --save
```
## Usage:
```javascript
var LRU = require("lru-cache")
, options = { max: 500
, length: function (n, key) { return n * 2 + key.length }
, dispose: function (key, n) { n.close() }
, maxAge: 1000 * 60 * 60 }
, cache = new LRU(options)
, otherCache = new LRU(50) // sets just the max size
cache.set("key", "value")
cache.get("key") // "value"
// non-string keys ARE fully supported
// but note that it must be THE SAME object, not
// just a JSON-equivalent object.
var someObject = { a: 1 }
cache.set(someObject, 'a value')
// Object keys are not toString()-ed
cache.set('[object Object]', 'a different value')
assert.equal(cache.get(someObject), 'a value')
// A similar object with same keys/values won't work,
// because it's a different object identity
assert.equal(cache.get({ a: 1 }), undefined)
cache.reset() // empty the cache
```
If you put more stuff in it, then items will fall out.
If you try to put an oversized thing in it, then it'll fall out right
away.
## Options
* `max` The maximum size of the cache, checked by applying the length
function to all values in the cache. Not setting this is kind of
silly, since that's the whole purpose of this lib, but it defaults
to `Infinity`. Setting it to a non-number or negative number will
throw a `TypeError`. Setting it to 0 makes it be `Infinity`.
* `maxAge` Maximum age in ms. Items are not pro-actively pruned out
as they age, but if you try to get an item that is too old, it'll
drop it and return undefined instead of giving it to you.
Setting this to a negative value will make everything seem old!
Setting it to a non-number will throw a `TypeError`.
* `length` Function that is used to calculate the length of stored
items. If you're storing strings or buffers, then you probably want
to do something like `function(n, key){return n.length}`. The default is
`function(){return 1}`, which is fine if you want to store `max`
like-sized things. The item is passed as the first argument, and
the key is passed as the second argumnet.
* `dispose` Function that is called on items when they are dropped
from the cache. This can be handy if you want to close file
descriptors or do other cleanup tasks when items are no longer
accessible. Called with `key, value`. It's called *before*
actually removing the item from the internal cache, so if you want
to immediately put it back in, you'll have to do that in a
`nextTick` or `setTimeout` callback or it won't do anything.
* `stale` By default, if you set a `maxAge`, it'll only actually pull
stale items out of the cache when you `get(key)`. (That is, it's
not pre-emptively doing a `setTimeout` or anything.) If you set
`stale:true`, it'll return the stale value before deleting it. If
you don't set this, then it'll return `undefined` when you try to
get a stale entry, as if it had already been deleted.
* `noDisposeOnSet` By default, if you set a `dispose()` method, then
it'll be called whenever a `set()` operation overwrites an existing
key. If you set this option, `dispose()` will only be called when a
key falls out of the cache, not when it is overwritten.
* `updateAgeOnGet` When using time-expiring entries with `maxAge`,
setting this to `true` will make each item's effective time update
to the current time whenever it is retrieved from cache, causing it
to not expire. (It can still fall out of cache based on recency of
use, of course.)
## API
* `set(key, value, maxAge)`
* `get(key) => value`
Both of these will update the "recently used"-ness of the key.
They do what you think. `maxAge` is optional and overrides the
cache `maxAge` option if provided.
If the key is not found, `get()` will return `undefined`.
The key and val can be any value.
* `peek(key)`
Returns the key value (or `undefined` if not found) without
updating the "recently used"-ness of the key.
(If you find yourself using this a lot, you *might* be using the
wrong sort of data structure, but there are some use cases where
it's handy.)
* `del(key)`
Deletes a key out of the cache.
* `reset()`
Clear the cache entirely, throwing away all values.
* `has(key)`
Check if a key is in the cache, without updating the recent-ness
or deleting it for being stale.
* `forEach(function(value,key,cache), [thisp])`
Just like `Array.prototype.forEach`. Iterates over all the keys
in the cache, in order of recent-ness. (Ie, more recently used
items are iterated over first.)
* `rforEach(function(value,key,cache), [thisp])`
The same as `cache.forEach(...)` but items are iterated over in
reverse order. (ie, less recently used items are iterated over
first.)
* `keys()`
Return an array of the keys in the cache.
* `values()`
Return an array of the values in the cache.
* `length`
Return total length of objects in cache taking into account
`length` options function.
* `itemCount`
Return total quantity of objects currently in cache. Note, that
`stale` (see options) items are returned as part of this item
count.
* `dump()`
Return an array of the cache entries ready for serialization and usage
with 'destinationCache.load(arr)`.
* `load(cacheEntriesArray)`
Loads another cache entries array, obtained with `sourceCache.dump()`,
into the cache. The destination cache is reset before loading new entries
* `prune()`
Manually iterates over the entire cache proactively pruning old entries
@@ -0,0 +1,8 @@
import { isObject } from "./isObject.mjs";
const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
function isESModule(value) {
return isObject(value) && (value.__esModule || hasSymbol && value[Symbol.toStringTag] === "Module");
}
export {
isESModule
};
@@ -0,0 +1 @@
{"version":3,"file":"circle-chevron-right.js","sources":["../../../src/icons/circle-chevron-right.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircleChevronRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJtMTAgOCA0IDQtNCA0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/circle-chevron-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CircleChevronRight = createLucideIcon('CircleChevronRight', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'm10 8 4 4-4 4', key: '1wy4r4' }],\n]);\n\nexport default CircleChevronRight;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB,iBAAiB,oBAAsB,CAAA,CAAA,CAAA;AAAA,CAChE,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"chevron-right-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Signature = createLucideIcon("Signature", [
[
"path",
{
d: "m21 17-2.156-1.868A.5.5 0 0 0 18 15.5v.5a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1c0-2.545-3.991-3.97-8.5-4a1 1 0 0 0 0 5c4.153 0 4.745-11.295 5.708-13.5a2.5 2.5 0 1 1 3.31 3.284",
key: "y32ogt"
}
],
["path", { d: "M3 21h18", key: "itz85i" }]
]);
export { Signature as default };
//# sourceMappingURL=signature.js.map
@@ -0,0 +1,7 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_client_fetch_result_please = require("./fetch-result-please.js");
const require_client_utils = require("./utils.js");
const require_client_client = require("./client.js");
exports.DetailedError = require_client_fetch_result_please.DetailedError;
exports.hc = require_client_client.hc;
exports.parseResponse = require_client_utils.parseResponse;
@@ -0,0 +1,13 @@
var spatialMatcher = (options, match) => {
let warning = options.translations.warnings.keyPattern;
if (match.turns === 1) {
warning = options.translations.warnings.straightRow;
}
return {
warning,
suggestions: [options.translations.suggestions.longerKeyboardPattern]
};
};
export { spatialMatcher as default };
//# sourceMappingURL=feedback.mjs.map
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './between-horizontal-end.js';
//# sourceMappingURL=between-horizonal-end.js.map
@@ -0,0 +1,89 @@
import type { SourceMapInput } from '@jridgewell/trace-mapping';
import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types.mts';
export type { DecodedSourceMap, EncodedSourceMap, Mapping };
export type Options = {
file?: string | null;
sourceRoot?: string | null;
};
/**
* Provides the state to generate a sourcemap.
*/
export declare class GenMapping {
private _names;
private _sources;
private _sourcesContent;
private _mappings;
private _ignoreList;
file: string | null | undefined;
sourceRoot: string | null | undefined;
constructor({ file, sourceRoot }?: Options);
}
/**
* A low-level API to associate a generated position with an original source position. Line and
* column here are 0-based, unlike `addMapping`.
*/
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void;
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void;
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void;
/**
* A high-level API to associate a generated position with an original source position. Line is
* 1-based, but column is 0-based, due to legacy behavior in `source-map` library.
*/
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source?: null;
original?: null;
name?: null;
content?: null;
}): void;
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source: string;
original: Pos;
name?: null;
content?: string | null;
}): void;
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source: string;
original: Pos;
name: string;
content?: string | null;
}): void;
/**
* Same as `addSegment`, but will only add the segment if it generates useful information in the
* resulting map. This only works correctly if segments are added **in order**, meaning you should
* not add a segment with a lower generated line/column than one that came before.
*/
export declare const maybeAddSegment: typeof addSegment;
/**
* Same as `addMapping`, but will only add the mapping if it generates useful information in the
* resulting map. This only works correctly if mappings are added **in order**, meaning you should
* not add a mapping with a lower generated line/column than one that came before.
*/
export declare const maybeAddMapping: typeof addMapping;
/**
* Adds/removes the content of the source file to the source map.
*/
export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void;
export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void;
/**
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function toDecodedMap(map: GenMapping): DecodedSourceMap;
/**
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function toEncodedMap(map: GenMapping): EncodedSourceMap;
/**
* Constructs a new GenMapping, using the already present mappings of the input.
*/
export declare function fromMap(input: SourceMapInput): GenMapping;
/**
* Returns an array of high-level mapping objects for every recorded segment, which could then be
* passed to the `source-map` library.
*/
export declare function allMappings(map: GenMapping): Mapping[];
//# sourceMappingURL=gen-mapping.d.ts.map
@@ -0,0 +1,6 @@
/* eslint-disable ts/ban-ts-comment */
export interface Disposable {
// @ts-ignore -- Symbol.dispose might not be in user types
[Symbol.dispose]: () => void
}
@@ -0,0 +1,3 @@
export * from './types.cjs';
export * from './atom.cjs';
export * from './store.cjs';
@@ -0,0 +1,85 @@
{
"name": "react-remove-scroll-bar",
"version": "2.3.8",
"description": "Removes body scroll without content _shake_",
"main": "dist/es5/index.js",
"jsnext:main": "dist/es2015/index.js",
"module": "dist/es2015/index.js",
"types": "dist/es5/index.d.ts",
"scripts": {
"dev": "lib-builder dev",
"test": "jest",
"test:ci": "jest --runInBand --coverage",
"build": "lib-builder build && yarn size:report",
"release": "yarn build && yarn test",
"size": "yarn size-limit",
"size:report": "yarn --silent size-limit --json > .size.json",
"lint": "lib-builder lint",
"format": "lib-builder format",
"update": "lib-builder update",
"prepublish": "yarn build && yarn changelog",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"changelog:rewrite": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"storybook": "start-storybook -p 6006"
},
"keywords": [
"scroll"
],
"author": "Anton Korzunov <thekashey@gmail.com>",
"license": "MIT",
"devDependencies": {
"@size-limit/preset-small-lib": "^11.0.2",
"size-limit": "^11.0.2",
"@storybook/react": "^6.4.22",
"@testing-library/react": "^12.1.5",
"@types/react": "^16.14.56",
"@theuiteam/lib-builder": "^0.1.4",
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
"engines": {
"node": ">=10"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
},
"files": [
"dist",
"constants"
],
"repository": "https://github.com/theKashey/react-remove-scroll-bar",
"dependencies": {
"react-style-singleton": "^2.2.2",
"tslib": "^2.0.0"
},
"module:es2019": "dist/es2019/index.js",
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts,tsx}": [
"prettier --write",
"eslint --fix",
"git add"
],
"*.{js,css,json,md}": [
"prettier --write",
"git add"
]
},
"prettier": {
"printWidth": 120,
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
}
@@ -0,0 +1,25 @@
MIT License
Copyright (c) 2024-present VoidZero Inc. & Contributors
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.
end of terms and conditions
The licenses of externally maintained libraries from which parts of the Software is derived are listed [here](https://github.com/rolldown/rolldown/blob/main/THIRD-PARTY-LICENSE).
@@ -0,0 +1 @@
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EACR,aAAa,EACb,YAAY,EACZ,OAAO,EACP,MAAM,EACN,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,0BAA0B,EAC1B,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,YAAY,EACf,MAAM,gBAAgB,CAAC;AAGxB;;;;;;;;;;;GAWG;AACH,qBAAa,uBAAuB,CAChC,QAAQ,SAAS,OAAO,GAAG,OAAO,EAClC,aAAa,SAAS,YAAY,GAAG,YAAY,EACjD,OAAO,SAAS,MAAM,GAAG,MAAM;IAEnB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC;IAE9E;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,CAAC,SAAS,SAAS,EAC7B,OAAO,EAAE,aAAa,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