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":"get-write-flag.d.ts","sourceRoot":"","sources":["../../src/get-write-flag.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,YAAY,2BAGd,MAAM,kBAAwC,CAAA"}
@@ -0,0 +1,15 @@
import type { TSESLint } from '@typescript-eslint/utils';
type Prefer = 'no-type-imports' | 'type-imports';
type FixStyle = 'inline-type-imports' | 'separate-type-imports';
export type Options = [
{
disallowTypeAnnotations?: boolean;
fixStyle?: FixStyle;
prefer?: Prefer;
}
];
export type MessageIds = 'avoidImportType' | 'noImportTypeAnnotations' | 'someImportsAreOnlyTypes' | 'typeOverValue';
declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,90 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://json-schema.org/draft/2020-12/meta/validation",
"$vocabulary": {
"https://json-schema.org/draft/2020-12/vocab/validation": true
},
"$dynamicAnchor": "meta",
"title": "Validation vocabulary meta-schema",
"type": ["object", "boolean"],
"properties": {
"type": {
"anyOf": [
{"$ref": "#/$defs/simpleTypes"},
{
"type": "array",
"items": {"$ref": "#/$defs/simpleTypes"},
"minItems": 1,
"uniqueItems": true
}
]
},
"const": true,
"enum": {
"type": "array",
"items": true
},
"multipleOf": {
"type": "number",
"exclusiveMinimum": 0
},
"maximum": {
"type": "number"
},
"exclusiveMaximum": {
"type": "number"
},
"minimum": {
"type": "number"
},
"exclusiveMinimum": {
"type": "number"
},
"maxLength": {"$ref": "#/$defs/nonNegativeInteger"},
"minLength": {"$ref": "#/$defs/nonNegativeIntegerDefault0"},
"pattern": {
"type": "string",
"format": "regex"
},
"maxItems": {"$ref": "#/$defs/nonNegativeInteger"},
"minItems": {"$ref": "#/$defs/nonNegativeIntegerDefault0"},
"uniqueItems": {
"type": "boolean",
"default": false
},
"maxContains": {"$ref": "#/$defs/nonNegativeInteger"},
"minContains": {
"$ref": "#/$defs/nonNegativeInteger",
"default": 1
},
"maxProperties": {"$ref": "#/$defs/nonNegativeInteger"},
"minProperties": {"$ref": "#/$defs/nonNegativeIntegerDefault0"},
"required": {"$ref": "#/$defs/stringArray"},
"dependentRequired": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/stringArray"
}
}
},
"$defs": {
"nonNegativeInteger": {
"type": "integer",
"minimum": 0
},
"nonNegativeIntegerDefault0": {
"$ref": "#/$defs/nonNegativeInteger",
"default": 0
},
"simpleTypes": {
"enum": ["array", "boolean", "integer", "null", "number", "object", "string"]
},
"stringArray": {
"type": "array",
"items": {"type": "string"},
"uniqueItems": true,
"default": []
}
}
}
@@ -0,0 +1 @@
{"version":3,"file":"hdmi-port.js","sources":["../../../src/icons/hdmi-port.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name HdmiPort\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjIgOWExIDEgMCAwIDAtMS0xSDNhMSAxIDAgMCAwLTEgMXY0YTEgMSAwIDAgMCAxIDFoMWwyIDJoMTJsMi0yaDFhMSAxIDAgMCAwIDEtMVoiIC8+CiAgPHBhdGggZD0iTTcuNSAxMmg5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/hdmi-port\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 HdmiPort = createLucideIcon('HdmiPort', [\n [\n 'path',\n {\n d: 'M22 9a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h1l2 2h12l2-2h1a1 1 0 0 0 1-1Z',\n key: '2128wb',\n },\n ],\n ['path', { d: 'M7.5 12h9', key: '1t0ckc' }],\n]);\n\nexport default HdmiPort;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,57 @@
import { isWindows } from "./is-windows.js";
const pathLikeEnvVarWhitelist = new Set(['PATH', 'NODE_PATH']);
/**
* This will transform UNIX-style list values to Windows-style.
* For example, the value of the $PATH variable "/usr/bin:/usr/local/bin:."
* will become "/usr/bin;/usr/local/bin;." on Windows.
* @param varValue Original value of the env variable
* @param varName Original name of the env variable
* @returns Converted value
*/
function replaceListDelimiters(varValue, varName = '') {
const targetSeparator = isWindows() ? ';' : ':';
if (!pathLikeEnvVarWhitelist.has(varName)) {
return varValue;
}
return varValue.replace(/(\\*):/g, (match, backslashes) => {
if (backslashes.length % 2) {
// Odd number of backslashes preceding it means it's escaped,
// remove 1 backslash and return the rest as-is
return match.substring(1);
}
return backslashes + targetSeparator;
});
}
/**
* This will attempt to resolve the value of any env variables that are inside
* this string. For example, it will transform this:
* cross-env FOO=$NODE_ENV BAR=\\$NODE_ENV echo $FOO $BAR
* Into this:
* FOO=development BAR=$NODE_ENV echo $FOO
* (Or whatever value the variable NODE_ENV has)
* Note that this function is only called with the right-side portion of the
* env var assignment, so in that example, this function would transform
* the string "$NODE_ENV" into "development"
* @param varValue Original value of the env variable
* @returns Converted value
*/
function resolveEnvVars(varValue) {
const envUnixRegex = /(\\*)(\$(\w+)|\${(\w+)})/g; // $my_var or ${my_var} or \$my_var
return varValue.replace(envUnixRegex, (_, escapeChars, varNameWithDollarSign, varName, altVarName) => {
// do not replace things preceded by a odd number of \
if (escapeChars.length % 2 === 1) {
return varNameWithDollarSign;
}
return (escapeChars.substring(0, escapeChars.length / 2) +
(process.env[varName || altVarName] || ''));
});
}
/**
* Converts an environment variable value to be appropriate for the current OS.
* @param originalValue Original value of the env variable
* @param originalName Original name of the env variable
* @returns Converted value
*/
export function varValueConvert(originalValue, originalName) {
return resolveEnvVars(replaceListDelimiters(originalValue, originalName));
}
@@ -0,0 +1,10 @@
import Options from '../../Options';
import { MatchEstimated } from '../../types';
declare const _default: (options: Options, match: MatchEstimated) => {
warning: string;
suggestions: string[];
} | {
warning: null;
suggestions: never[];
};
export default _default;
@@ -0,0 +1,18 @@
export namespace util {
/**
* Retrieves a header name and returns its lowercase value.
* @param value Header name
*/
export function headerNameToString (value: string | Buffer): string
/**
* Receives a header object and returns the parsed value.
* @param headers Header object
* @param obj Object to specify a proxy object. Used to assign parsed values.
* @returns If `obj` is specified, it is equivalent to `obj`.
*/
export function parseHeaders (
headers: (Buffer | string | (Buffer | string)[])[],
obj?: Record<string, string | string[]>
): Record<string, string | string[]>
}
@@ -0,0 +1,201 @@
/**
* @fileoverview Counts the cyclomatic complexity of each function of the script. See http://en.wikipedia.org/wiki/Cyclomatic_complexity.
* Counts the number of if, conditional, for, while, try, switch/case,
* @author Patrick Brosset
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
const { upperCaseFirst } = require("../shared/string-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
const THRESHOLD_DEFAULT = 20;
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
defaultOptions: [THRESHOLD_DEFAULT],
docs: {
description:
"Enforce a maximum cyclomatic complexity allowed in a program",
recommended: false,
url: "https://eslint.org/docs/latest/rules/complexity",
},
schema: [
{
oneOf: [
{
type: "integer",
minimum: 0,
},
{
type: "object",
properties: {
maximum: {
type: "integer",
minimum: 0,
},
max: {
type: "integer",
minimum: 0,
},
variant: {
enum: ["classic", "modified"],
},
},
additionalProperties: false,
},
],
},
],
messages: {
complex:
"{{name}} has a complexity of {{complexity}}. Maximum allowed is {{max}}.",
},
},
create(context) {
const sourceCode = context.sourceCode;
const option = context.options[0];
let threshold = THRESHOLD_DEFAULT;
let VARIANT = "classic";
if (typeof option === "object") {
if (
Object.hasOwn(option, "maximum") ||
Object.hasOwn(option, "max")
) {
threshold = option.maximum || option.max;
}
if (Object.hasOwn(option, "variant")) {
VARIANT = option.variant;
}
} else if (typeof option === "number") {
threshold = option;
}
const IS_MODIFIED_COMPLEXITY = VARIANT === "modified";
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
// Using a stack to store complexity per code path
const complexities = [];
/**
* Increase the complexity of the code path in context
* @returns {void}
* @private
*/
function increaseComplexity() {
complexities[complexities.length - 1]++;
}
//--------------------------------------------------------------------------
// Public API
//--------------------------------------------------------------------------
return {
onCodePathStart() {
// The initial complexity is 1, representing one execution path in the CodePath
complexities.push(1);
},
// Each branching in the code adds 1 to the complexity
CatchClause: increaseComplexity,
ConditionalExpression: increaseComplexity,
LogicalExpression: increaseComplexity,
ForStatement: increaseComplexity,
ForInStatement: increaseComplexity,
ForOfStatement: increaseComplexity,
IfStatement: increaseComplexity,
WhileStatement: increaseComplexity,
DoWhileStatement: increaseComplexity,
AssignmentPattern: increaseComplexity,
// Avoid `default`
"SwitchCase[test]": () =>
IS_MODIFIED_COMPLEXITY || increaseComplexity(),
SwitchStatement: () =>
IS_MODIFIED_COMPLEXITY && increaseComplexity(),
// Logical assignment operators have short-circuiting behavior
AssignmentExpression(node) {
if (astUtils.isLogicalAssignmentOperator(node.operator)) {
increaseComplexity();
}
},
MemberExpression(node) {
if (node.optional === true) {
increaseComplexity();
}
},
CallExpression(node) {
if (node.optional === true) {
increaseComplexity();
}
},
onCodePathEnd(codePath, node) {
const complexity = complexities.pop();
/*
* This rule only evaluates complexity of functions, so "program" is excluded.
* Class field initializers and class static blocks are implicit functions. Therefore,
* they shouldn't contribute to the enclosing function's complexity, but their
* own complexity should be evaluated.
*/
if (
codePath.origin !== "function" &&
codePath.origin !== "class-field-initializer" &&
codePath.origin !== "class-static-block"
) {
return;
}
if (complexity > threshold) {
let name;
let loc = node.loc;
if (codePath.origin === "class-field-initializer") {
name = "class field initializer";
} else if (codePath.origin === "class-static-block") {
name = "class static block";
loc = sourceCode.getFirstToken(node).loc;
} else {
name = astUtils.getFunctionNameWithKind(node);
loc = astUtils.getFunctionHeadLoc(node, sourceCode);
}
context.report({
node,
loc,
messageId: "complex",
data: {
name: upperCaseFirst(name),
complexity,
max: threshold,
},
});
}
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"decode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAAe,EAAE,EACpB,gBAAgB,EAChB,aAAa,GAChB,MAAM,uBAAuB,CAAC;AAE/B,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAExE,IAAW,SAaV;AAbD,WAAW,SAAS;IAChB,wCAAQ,CAAA;IACR,0CAAS,CAAA;IACT,8CAAW,CAAA;IACX,0CAAS,CAAA;IACT,0CAAS,CAAA;IACT,gDAAY,CAAA;IACZ,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,gDAAY,CAAA;IACZ,gDAAY,CA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IACK,mBAAmB,CAAC,GAAW,EAAE,MAAc;QACnD,MAAM,QAAQ,GAAG,MAAM,CAAC;QAExB,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;YACxB,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACpC,IAALine truncated
@@ -0,0 +1 @@
{"version":3,"file":"kanban.js","sources":["../../../src/icons/kanban.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Kanban\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiA1djExIiAvPgogIDxwYXRoIGQ9Ik0xMiA1djYiIC8+CiAgPHBhdGggZD0iTTE4IDV2MTQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/kanban\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 Kanban = createLucideIcon('Kanban', [\n ['path', { d: 'M6 5v11', key: 'mdvv1e' }],\n ['path', { d: 'M12 5v6', key: '14ar3b' }],\n ['path', { d: 'M18 5v14', key: '7ji314' }],\n]);\n\nexport default Kanban;\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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_asyncIterator","iterable","method","async","sync","retry","Symbol","asyncIterator","iterator","call","AsyncFromSyncIterator","TypeError","s","n","next","prototype","AsyncFromSyncIteratorContinuation","apply","arguments","return","value","ret","undefined","Promise","resolve","done","throw","maybeError","thr","reject","r","Object","then"],"sources":["../../src/helpers/asyncIterator.ts"],"sourcesContent":["/* @minVersion 7.15.9 */\n\ntype AsyncIteratorFn<T> = AsyncIterable<T>[typeof Symbol.asyncIterator];\ntype SyncIteratorFn<T> = Iterable<T>[typeof Symbol.iterator];\n\nexport default function _asyncIterator<T>(\n iterable: AsyncIterable<T> | Iterable<T>,\n) {\n var method: AsyncIteratorFn<T> | SyncIteratorFn<T>,\n async: typeof Symbol.asyncIterator | \"@@asyncIterator\" | undefined,\n sync: typeof Symbol.iterator | \"@@iterator\" | undefined,\n retry = 2;\n\n if (typeof Symbol !== \"undefined\") {\n async = Symbol.asyncIterator;\n sync = Symbol.iterator;\n }\n\n while (retry--) {\n // TypeScript doesn't have in-function narrowing, and TypeScript can't narrow\n // AsyncIterable<T> | Iterable<T> down to AsyncIterable<T>. So let's use any here.\n if (async && (method = (iterable as any)[async]) != null) {\n return (method as AsyncIteratorFn<T>).call(iterable as AsyncIterable<T>);\n }\n // Same here, TypeScript can't narrow AsyncIterable<T> | Iterable<T> down to Iterable<T>.\n if (sync && (method = (iterable as any)[sync]) != null) {\n return new AsyncFromSyncIterator(\n (method as SyncIteratorFn<T>).call(iterable as Iterable<T>),\n );\n }\n\n async = \"@@asyncIterator\";\n sync = \"@@iterator\";\n }\n\n throw new TypeError(\"Object is not async iterable\");\n}\n\n// AsyncFromSyncIterator is actually a class that implements AsyncIterator interface\ndeclare class AsyncFromSyncIterator<T = any, TReturn = any, TNext = undefined>\n implements AsyncIterator<T, TReturn, TNext>\n{\n s: Iterator<T>;\n n: Iterator<T>[\"next\"];\n constructor(s: Iterator<T>);\n\n next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;\n return?(\n value?: TReturn | PromiseLike<TReturn>,\n ): Promise<IteratorResult<T, TReturn>>;\n throw?(e?: any): Promise<IteratorResult<T, TReturn>>;\n}\n\n// Actual implementation of AsyncFromSyncIterator starts here\n// class only exists in ES6, so we need to use the old school way\n// This makes ESLint and TypeScript complain a lot, but it's the only way\nfunction AsyncFromSyncIterator<T, TReturn = any, TNext = undefined>(s: any) {\n // @ts-expect-error - Intentionally overriding the constructor.\n AsyncFromSyncIterator = function (\n this: AsyncFromSyncIterator,\n s: Iterator<T>,\n ) {\n this.s = s;\n this.n = s.next;\n };\n AsyncFromSyncIterator.prototype = {\n // Initiating the \"s\" and \"n\", use \"any\" to prevent TS from complaining\n /* SyncIterator */ s: null as any,\n /* SyncIterator.[[Next]] */ n: null as any,\n next: function () {\n return AsyncFromSyncIteratorContinuation<T, TReturn>(\n // Use \"arguments\" here for better compatibility and smaller bundle size\n // Intentionally casting \"arguments\" to an array for the type of func.apply\n this.n.apply(this.s, arguments as any as [] | [undefined]),\n );\n },\n return: function (value) {\n var ret = this.s[\"return\"];\n if (ret === undefined) {\n return Promise.resolve<IteratorReturnResult<TReturn>>({\n // \"TReturn | PromiseLike<TReturn>\" should have been unwrapped by Awaited<T>,\n // but TypeScript choked, let's just casting it away\n value: value as TReturn,\n done: true,\n });\n }\n return AsyncFromSyncIteratorContinuation<T, TReturn>(\n ret.apply(\n this.s,\n // Use \"arguments\" here for better compatibility and smaller bundle size\n // Intentionally casting \"arguments\" to an array for the type of func.apply\n arguments as any as [] | [TReturn | PromiseLike<TReturn>],\n ),\n );\n },\n throw: function (maybeError?: any) {\n var thr = this.s[\"return\"];\n if (thr === undefined) {\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\n return Promise.reject(maybeError);\n }\n return AsyncFromSyncIteratorContinuation<T, TReturn>(\n // Use \"arguments\" here for better compatibility and smaller bundle size\n // Intentionally casting \"arguments\" to an array for the type of func.apply\n thr.apply(this.s, arguments as any as [any]),\n );\n },\n } satisfies AsyncFromSyncIterator<T, TReturn, TNext>;\n\n function AsyncFromSyncIteratorContinuation<T, TReturn>(r: any) {\n // This step is _before_ calling AsyncFromSyncIteratorContinuation in the spec.\n if (Object(r) !== r) {\n return Promise.reject(new TypeError(r + \" is not an object.Line truncated
@@ -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 './arrow-up-1-0.js';
//# sourceMappingURL=arrow-up-10.js.map
@@ -0,0 +1,306 @@
import { readdir, readdirSync, realpath, realpathSync, stat, statSync } from "fs";
import { isAbsolute, posix, resolve } from "path";
import { fileURLToPath } from "url";
import { fdir } from "fdir";
import picomatch from "picomatch";
//#region src/utils.ts
const isReadonlyArray = Array.isArray;
const BACKSLASHES = /\\/g;
const isWin = process.platform === "win32";
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
function getPartialMatcher(patterns, options = {}) {
const patternsCount = patterns.length;
const patternsParts = Array(patternsCount);
const matchers = Array(patternsCount);
let i, j;
for (i = 0; i < patternsCount; i++) {
const parts = splitPattern(patterns[i]);
patternsParts[i] = parts;
const partsCount = parts.length;
const partMatchers = Array(partsCount);
for (j = 0; j < partsCount; j++) partMatchers[j] = picomatch(parts[j], options);
matchers[i] = partMatchers;
}
return (input) => {
const inputParts = input.split("/");
if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
for (i = 0; i < patternsCount; i++) {
const patternParts = patternsParts[i];
const matcher = matchers[i];
const inputPatternCount = inputParts.length;
const minParts = Math.min(inputPatternCount, patternParts.length);
j = 0;
while (j < minParts) {
const part = patternParts[j];
if (part.includes("/")) return true;
if (!matcher[j](inputParts[j])) break;
if (!options.noglobstar && part === "**") return true;
j++;
}
if (j === inputPatternCount) return true;
}
return false;
};
}
/* node:coverage ignore next 2 */
const WIN32_ROOT_DIR = /^[A-Z]:\/$/i;
const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/";
function buildFormat(cwd, root, absolute) {
if (cwd === root || root.startsWith(`${cwd}/`)) {
if (absolute) {
const start = cwd.length + +!isRoot(cwd);
return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || ".";
}
const prefix = root.slice(cwd.length + 1);
if (prefix) return (p, isDir) => {
if (p === ".") return prefix;
const result = `${prefix}/${p}`;
return isDir ? result.slice(0, -1) : result;
};
return (p, isDir) => isDir && p !== "." ? p.slice(0, -1) : p;
}
if (absolute) return (p) => posix.relative(cwd, p) || ".";
return (p) => posix.relative(cwd, `${root}/${p}`) || ".";
}
function buildRelative(cwd, root) {
if (root.startsWith(`${cwd}/`)) {
const prefix = root.slice(cwd.length + 1);
return (p) => `${prefix}/${p}`;
}
return (p) => {
const result = posix.relative(cwd, `${root}/${p}`);
return p[p.length - 1] === "/" && result !== "" ? `${result}/` : result || ".";
};
}
const splitPatternOptions = { parts: true };
function splitPattern(path) {
var _result$parts;
const result = picomatch.scan(path, splitPatternOptions);
return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path];
}
const ESCAPED_WIN32_BACKSLASHES = /\\(?![()[\]{}!+@])/g;
function convertPosixPathToPattern(path) {
return escapePosixPath(path);
}
function convertWin32PathToPattern(path) {
return escapeWin32Path(path).replace(ESCAPED_WIN32_BACKSLASHES, "/");
}
/**
* Converts a path to a pattern depending on the platform.
* Identical to {@link escapePath} on POSIX systems.
* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
*/
/* node:coverage ignore next 3 */
const convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern;
const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
const escapePosixPath = (path) => path.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
const escapeWin32Path = (path) => path.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
/**
* Escapes a path's special characters depending on the platform.
* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
*/
/* node:coverage ignore next */
const escapePath = isWin ? escapeWin32Path : escapePosixPath;
/**
* Checks if a pattern has dynamic parts.
*
* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
*
* - Doesn't necessarily return `false` on patterns that include `\`.
* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
*
* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
*/
function isDynamicPattern(pattern, options) {
if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true;
const scan = picomatch.scan(pattern);
return scan.isGlob || scan.negated;
}
function log(...tasks) {
console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
}
function ensureStringArray(value) {
return typeof value === "string" ? [value] : value !== null && value !== void 0 ? value : [];
}
//#endregion
//#region src/patterns.ts
const PARENT_DIRECTORY = /^(\/?\.\.)+/;
const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
function normalizePattern(pattern, opts, props, isIgnore) {
var _PARENT_DIRECTORY$exe;
const cwd = opts.cwd;
let result = pattern;
if (pattern[pattern.length - 1] === "/") result = pattern.slice(0, -1);
if (result[result.length - 1] !== "*" && opts.expandDirectories) result += "/**";
const escapedCwd = escapePath(cwd);
result = isAbsolute(result.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result) : posix.normalize(result);
const parentDir = (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) === null || _PARENT_DIRECTORY$exe === void 0 ? void 0 : _PARENT_DIRECTORY$exe[0];
const parts = splitPattern(result);
if (parentDir) {
const n = (parentDir.length + 1) / 3;
let i = 0;
const cwdParts = escapedCwd.split("/");
while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
i++;
}
const potentialRoot = posix.join(cwd, parentDir.slice(i * 3));
if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
props.root = potentialRoot;
props.depthOffset = -n + i;
}
}
if (!isIgnore && props.depthOffset >= 0) {
var _props$commonPath;
(_props$commonPath = props.commonPath) !== null && _props$commonPath !== void 0 || (props.commonPath = parts);
const newCommonPath = [];
const length = Math.min(props.commonPath.length, parts.length);
for (let i = 0; i < length; i++) {
const part = parts[i];
if (part === "**" && !parts[i + 1]) {
newCommonPath.pop();
break;
}
if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;
newCommonPath.push(part);
}
props.depthOffset = newCommonPath.length;
props.commonPath = newCommonPath;
props.root = newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd;
}
return result;
}
function processPatterns(options, patterns, props) {
const matchPatterns = [];
const ignorePatterns = [];
for (const pattern of options.ignore) {
if (!pattern) continue;
if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, options, props, true));
}
for (const pattern of patterns) {
if (!pattern) continue;
if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, options, props, false));
else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));
}
return {
match: matchPatterns,
ignore: ignorePatterns
};
}
//#endregion
//#region src/crawler.ts
function buildCrawler(options, patterns) {
const cwd = options.cwd;
const props = {
root: cwd,
depthOffset: 0
};
const processed = processPatterns(options, patterns, props);
if (options.debug) log("internal processing patterns:", processed);
const { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options;
const root = props.root.replace(BACKSLASHES, "");
const matchOptions = {
dot,
nobrace: options.braceExpansion === false,
nocase: !caseSensitiveMatch,
noextglob: options.extglob === false,
noglobstar: options.globstar === false,
posix: true
};
const matcher = picomatch(processed.match, matchOptions);
const ignore = picomatch(processed.ignore, matchOptions);
const partialMatcher = getPartialMatcher(processed.match, matchOptions);
const format = buildFormat(cwd, root, absolute);
const excludeFormatter = absolute ? format : buildFormat(cwd, root, true);
const excludePredicate = (_, p) => {
const relativePath = excludeFormatter(p, true);
return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
};
let maxDepth;
if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
const crawler = new fdir({
filters: [debug ? (p, isDirectory) => {
const path = format(p, isDirectory);
const matches = matcher(path) && !ignore(path);
if (matches) log(`matched ${path}`);
return matches;
} : (p, isDirectory) => {
const path = format(p, isDirectory);
return matcher(path) && !ignore(path);
}],
exclude: debug ? (_, p) => {
const skipped = excludePredicate(_, p);
log(`${skipped ? "skipped" : "crawling"} ${p}`);
return skipped;
} : excludePredicate,
fs: options.fs,
pathSeparator: "/",
relativePaths: !absolute,
resolvePaths: absolute,
includeBasePath: absolute,
resolveSymlinks: followSymbolicLinks,
excludeSymlinks: !followSymbolicLinks,
excludeFiles: onlyDirectories,
includeDirs: onlyDirectories || !options.onlyFiles,
maxDepth,
signal: options.signal
}).crawl(root);
if (options.debug) log("internal properties:", {
...props,
root
});
return [crawler, cwd !== root && !absolute && buildRelative(cwd, root)];
}
//#endregion
//#region src/index.ts
function formatPaths(paths, mapper) {
if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
return paths;
}
const defaultOptions = {
caseSensitiveMatch: true,
cwd: process.cwd(),
debug: !!process.env.TINYGLOBBY_DEBUG,
expandDirectories: true,
followSymbolicLinks: true,
onlyFiles: true
};
function getOptions(options) {
const opts = {
...defaultOptions,
...options
};
opts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve(opts.cwd)).replace(BACKSLASHES, "/");
opts.ignore = ensureStringArray(opts.ignore);
opts.fs && (opts.fs = {
readdir: opts.fs.readdir || readdir,
readdirSync: opts.fs.readdirSync || readdirSync,
realpath: opts.fs.realpath || realpath,
realpathSync: opts.fs.realpathSync || realpathSync,
stat: opts.fs.stat || stat,
statSync: opts.fs.statSync || statSync
});
if (opts.debug) log("globbing with options:", opts);
return opts;
}
function getCrawler(globInput, inputOptions = {}) {
var _ref;
if (globInput && (inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
const isModern = isReadonlyArray(globInput) || typeof globInput === "string";
const patterns = ensureStringArray((_ref = isModern ? globInput : globInput.patterns) !== null && _ref !== void 0 ? _ref : "**/*");
const options = getOptions(isModern ? inputOptions : globInput);
return patterns.length > 0 ? buildCrawler(options, patterns) : [];
}
async function glob(globInput, options) {
const [crawler, relative] = getCrawler(globInput, options);
return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
}
function globSync(globInput, options) {
const [crawler, relative] = getCrawler(globInput, options);
return crawler ? formatPaths(crawler.sync(), relative) : [];
}
//#endregion
export { convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };
@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.pinchOrZoom = void 0;
var ds = function (ab) { return (ab[0] <= 0 && ab[1] >= 0) || (ab[0] >= 0 && ab[1] <= 0); };
var sign = function (x) { return (x < 0 ? -1 : 1); };
var pinchOrZoom = function (event, cache) {
if (!event.changedTouches) {
return false;
}
if (event.touches.length === 2) {
var oldPoints = [cache[event.touches[0].identifier], cache[event.touches[1].identifier]];
var newPoints = [event.touches[0], event.touches[1]];
if (oldPoints[0] && oldPoints[1]) {
// Calculate the difference between the start and move coordinates
var diffx = [oldPoints[0].clientX - newPoints[0].clientX, oldPoints[1].clientX - newPoints[1].clientX];
var diffy = [oldPoints[0].clientY - newPoints[0].clientY, oldPoints[1].clientY - newPoints[1].clientY];
console.log(diffx, diffy);
if (ds(diffx) || ds(diffy)) {
return {
action: 'zoom',
};
}
var mx = Math.max(Math.abs(diffx[0]), Math.abs(diffx[1]));
var my = Math.max(Math.abs(diffy[0]), Math.abs(diffy[1]));
return {
action: 'pinch',
coords: [mx * sign(diffx[0]), my * sign(diffx[1])],
};
}
}
Array.from(event.changedTouches).forEach(function (touch) { return (cache[touch.identifier] = touch); });
return {
action: 'move',
coords: [event.changedTouches[0].clientX, event.changedTouches[0].clientY],
};
};
exports.pinchOrZoom = pinchOrZoom;
@@ -0,0 +1,22 @@
export function encodeBase64(input) {
if (Uint8Array.prototype.toBase64) {
return input.toBase64();
}
const CHUNK_SIZE = 0x8000;
const arr = [];
for (let i = 0; i < input.length; i += CHUNK_SIZE) {
arr.push(String.fromCharCode.apply(null, input.subarray(i, i + CHUNK_SIZE)));
}
return btoa(arr.join(''));
}
export function decodeBase64(encoded) {
if (Uint8Array.fromBase64) {
return Uint8Array.fromBase64(encoded);
}
const binary = atob(encoded);
const bytes = new Uint8Array(binary.length);
for (let i = 0; i < binary.length; i++) {
bytes[i] = binary.charCodeAt(i);
}
return bytes;
}
@@ -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 SquareCode = createLucideIcon("SquareCode", [
["path", { d: "M10 9.5 8 12l2 2.5", key: "3mjy60" }],
["path", { d: "m14 9.5 2 2.5-2 2.5", key: "1bir2l" }],
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
]);
export { SquareCode as default };
//# sourceMappingURL=square-code.js.map
@@ -0,0 +1,9 @@
import Range = require("../classes/range");
import semver = require("../index");
/**
* Mostly just for testing and legacy API reasons
*/
declare function toComparators(range: string | Range, optionsOrLoose?: boolean | semver.Options): string[][];
export = toComparators;
@@ -0,0 +1,15 @@
export class SymlinkError extends Error {
path;
symlink;
syscall = 'symlink';
code = 'TAR_SYMLINK_ERROR';
constructor(symlink, path) {
super('TAR_SYMLINK_ERROR: Cannot extract through symbolic link');
this.symlink = symlink;
this.path = path;
}
get name() {
return 'SymlinkError';
}
}
//# sourceMappingURL=symlink-error.js.map
@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACpC,cAAc,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,MAAM,CAAC;CAGlB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAC;CAGzC;AAED,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAY,SAAQ,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,MAAM,OAAO,GACf;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC"}
@@ -0,0 +1,80 @@
{
"name": "minizlib",
"version": "3.1.0",
"description": "A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.",
"main": "./dist/commonjs/index.js",
"dependencies": {
"minipass": "^7.1.2"
},
"scripts": {
"prepare": "tshy",
"pretest": "npm run prepare",
"test": "tap",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"format": "prettier --write . --loglevel warn",
"typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/isaacs/minizlib.git"
},
"keywords": [
"zlib",
"gzip",
"gunzip",
"deflate",
"inflate",
"compression",
"zip",
"unzip"
],
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"license": "MIT",
"devDependencies": {
"@types/node": "^24.5.2",
"tap": "^21.1.0",
"tshy": "^3.0.2",
"typedoc": "^0.28.1"
},
"files": [
"dist"
],
"engines": {
"node": ">= 18"
},
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"prettier": {
"semi": false,
"printWidth": 75,
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"jsxSingleQuote": false,
"bracketSameLine": true,
"arrowParens": "avoid",
"endOfLine": "lf"
},
"module": "./dist/esm/index.js"
}
@@ -0,0 +1,80 @@
import type { SourceMapSegment } from './sourcemap-segment.mts';
import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping, Ro } from './types.mts';
export type { SourceMapSegment } from './sourcemap-segment.mts';
export type { SourceMap, DecodedSourceMap, EncodedSourceMap, Section, SectionedSourceMap, SourceMapV3, Bias, EachMapping, GeneratedMapping, InvalidGeneratedMapping, InvalidOriginalMapping, Needle, OriginalMapping, OriginalMapping as Mapping, SectionedSourceMapInput, SourceMapInput, SourceNeedle, XInput, EncodedSourceMapXInput, DecodedSourceMapXInput, SectionedSourceMapXInput, SectionXInput, } from './types.mts';
export declare const LEAST_UPPER_BOUND = -1;
export declare const GREATEST_LOWER_BOUND = 1;
export { FlattenMap, FlattenMap as AnyMap } from './flatten-map.mts';
export declare class TraceMap implements SourceMap {
version: SourceMapV3['version'];
file: SourceMapV3['file'];
names: SourceMapV3['names'];
sourceRoot: SourceMapV3['sourceRoot'];
sources: SourceMapV3['sources'];
sourcesContent: SourceMapV3['sourcesContent'];
ignoreList: SourceMapV3['ignoreList'];
resolvedSources: string[];
private _encoded;
private _decoded;
private _decodedMemo;
private _bySources;
private _bySourceMemos;
constructor(map: Ro<SourceMapInput>, mapUrl?: string | null);
}
/**
* Returns the encoded (VLQ string) form of the SourceMap's mappings field.
*/
export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'];
/**
* Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
*/
export declare function decodedMappings(map: TraceMap): Readonly<DecodedSourceMap['mappings']>;
/**
* A low-level API to find the segment associated with a generated line/column (think, from a
* stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
*/
export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly<SourceMapSegment> | null;
/**
* A higher-level API to find the source/line/column associated with a generated line/column
* (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
* `source-map` library.
*/
export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping;
/**
* Finds the generated line/column position of the provided source/line/column source position.
*/
export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping;
/**
* Finds all generated line/column positions of the provided source/line/column source position.
*/
export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[];
/**
* Iterates each mapping in generated position order.
*/
export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void;
/**
* Retrieves the source content for a particular source, if its found. Returns null if not.
*/
export declare function sourceContentFor(map: TraceMap, source: string): string | null;
/**
* Determines if the source is marked to ignore by the source map.
*/
export declare function isIgnored(map: TraceMap, source: string): boolean;
/**
* A helper that skips sorting of the input map's mappings array, which can be expensive for larger
* maps.
*/
export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap;
/**
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function decodedMap(map: TraceMap): Omit<DecodedSourceMap, 'mappings'> & {
mappings: readonly SourceMapSegment[][];
};
/**
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function encodedMap(map: TraceMap): EncodedSourceMap;
//# sourceMappingURL=trace-mapping.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"battery-low.js","sources":["../../../src/icons/battery-low.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BatteryLow\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTAiIHg9IjIiIHk9IjciIHJ4PSIyIiByeT0iMiIgLz4KICA8bGluZSB4MT0iMjIiIHgyPSIyMiIgeTE9IjExIiB5Mj0iMTMiIC8+CiAgPGxpbmUgeDE9IjYiIHgyPSI2IiB5MT0iMTEiIHkyPSIxMyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/battery-low\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 BatteryLow = createLucideIcon('BatteryLow', [\n ['rect', { width: '16', height: '10', x: '2', y: '7', rx: '2', ry: '2', key: '1w10f2' }],\n ['line', { x1: '22', x2: '22', y1: '11', y2: '13', key: '4dh1rd' }],\n ['line', { x1: '6', x2: '6', y1: '11', y2: '13', key: '1wd6dw' }],\n]);\n\nexport default BatteryLow;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CACvF,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAClE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2017_arraybuffer = void 0;
const base_config_1 = require("./base-config");
exports.es2017_arraybuffer = {
libs: [],
variables: [['ArrayBufferConstructor', base_config_1.TYPE]],
};
@@ -0,0 +1,231 @@
const require_utils = require("./utils.cjs");
const require_new_process_route_tree = require("./new-process-route-tree.cjs");
let _tanstack_router_core_isServer = require("@tanstack/router-core/isServer");
//#region src/path.ts
/** Join path segments, cleaning duplicate slashes between parts. */
function joinPaths(paths) {
return cleanPath(paths.filter((val) => {
return val !== void 0;
}).join("/"));
}
/** Remove repeated slashes from a path string. */
function cleanPath(path) {
return path.replace(/\/{2,}/g, "/");
}
/** Trim leading slashes (except preserving root '/'). */
function trimPathLeft(path) {
return path === "/" ? path : path.replace(/^\/{1,}/, "");
}
/** Trim trailing slashes (except preserving root '/'). */
function trimPathRight(path) {
const len = path.length;
return len > 1 && path[len - 1] === "/" ? path.replace(/\/{1,}$/, "") : path;
}
/** Trim both leading and trailing slashes. */
function trimPath(path) {
return trimPathRight(trimPathLeft(path));
}
/** Remove a trailing slash from value when appropriate for comparisons. */
function removeTrailingSlash(value, basepath) {
if (value?.endsWith("/") && value !== "/" && value !== `${basepath}/`) return value.slice(0, -1);
return value;
}
/**
* Compare two pathnames for exact equality after normalizing trailing slashes
* relative to the provided `basepath`.
*/
function exactPathTest(pathName1, pathName2, basepath) {
return removeTrailingSlash(pathName1, basepath) === removeTrailingSlash(pathName2, basepath);
}
/**
* Resolve a destination path against a base, honoring trailing-slash policy
* and supporting relative segments (`.`/`..`) and absolute `to` values.
*/
function resolvePath({ base, to, trailingSlash = "never", cache }) {
const isAbsolute = to.startsWith("/");
const isBase = !isAbsolute && to === ".";
let key;
if (cache) {
key = isAbsolute ? to : isBase ? base : base + "\0" + to;
const cached = cache.get(key);
if (cached) return cached;
}
let baseSegments;
if (isBase) baseSegments = base.split("/");
else if (isAbsolute) baseSegments = to.split("/");
else {
baseSegments = base.split("/");
while (baseSegments.length > 1 && require_utils.last(baseSegments) === "") baseSegments.pop();
const toSegments = to.split("/");
for (let index = 0, length = toSegments.length; index < length; index++) {
const value = toSegments[index];
if (value === "") {
if (!index) baseSegments = [value];
else if (index === length - 1) baseSegments.push(value);
} else if (value === "..") baseSegments.pop();
else if (value === ".") {} else baseSegments.push(value);
}
}
if (baseSegments.length > 1) {
if (require_utils.last(baseSegments) === "") {
if (trailingSlash === "never") baseSegments.pop();
} else if (trailingSlash === "always") baseSegments.push("");
}
const result = cleanPath(baseSegments.join("/")) || "/";
if (key && cache) cache.set(key, result);
return result;
}
/**
* Create a pre-compiled decode config from allowed characters.
* This should be called once at router initialization.
*/
function compileDecodeCharMap(pathParamsAllowedCharacters) {
const charMap = new Map(pathParamsAllowedCharacters.map((char) => [encodeURIComponent(char), char]));
const pattern = Array.from(charMap.keys()).map((key) => key.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
const regex = new RegExp(pattern, "g");
return (encoded) => encoded.replace(regex, (match) => charMap.get(match) ?? match);
}
function encodeParam(key, params, decoder) {
const value = params[key];
if (typeof value !== "string") return value;
if (key === "_splat") {
if (/^[a-zA-Z0-9\-._~!/]*$/.test(value)) return value;
return value.split("/").map((segment) => encodePathParam(segment, decoder)).join("/");
} else return encodePathParam(value, decoder);
}
/**
* Interpolate params and wildcards into a route path template.
*
* - Encodes params safely (configurable allowed characters)
* - Supports `{-$optional}` segments, `{prefix{$id}suffix}` and `{$}` wildcards
*/
function interpolatePath({ path, params, decoder, ...rest }) {
let isMissingParams = false;
const usedParams = Object.create(null);
if (!path || path === "/") return {
interpolatedPath: "/",
usedParams,
isMissingParams
};
if (!path.includes("$")) return {
interpolatedPath: path,
usedParams,
isMissingParams
};
if (_tanstack_router_core_isServer.isServer ?? rest.server) {
if (path.indexOf("{") === -1) {
const length = path.length;
let cursor = 0;
let joined = "";
while (cursor < length) {
while (cursor < length && path.charCodeAt(cursor) === 47) cursor++;
if (cursor >= length) break;
const start = cursor;
let end = path.indexOf("/", cursor);
if (end === -1) end = length;
cursor = end;
const part = path.substring(start, end);
if (!part) continue;
if (part.charCodeAt(0) === 36) if (part.length === 1) {
const splat = params._splat;
usedParams._splat = splat;
usedParams["*"] = splat;
if (!splat) {
isMissingParams = true;
continue;
}
const value = encodeParam("_splat", params, decoder);
joined += "/" + value;
} else {
const key = part.substring(1);
if (!isMissingParams && !(key in params)) isMissingParams = true;
usedParams[key] = params[key];
const value = encodeParam(key, params, decoder) ?? "undefined";
joined += "/" + value;
}
else joined += "/" + part;
}
if (path.endsWith("/")) joined += "/";
return {
usedParams,
interpolatedPath: joined || "/",
isMissingParams
};
}
}
const length = path.length;
let cursor = 0;
let segment;
let joined = "";
while (cursor < length) {
const start = cursor;
segment = require_new_process_route_tree.parseSegment(path, start, segment);
const end = segment[5];
cursor = end + 1;
if (start === end) continue;
const kind = segment[0];
if (kind === 0) {
joined += "/" + path.substring(start, end);
continue;
}
if (kind === 2) {
const splat = params._splat;
usedParams._splat = splat;
usedParams["*"] = splat;
const prefix = path.substring(start, segment[1]);
const suffix = path.substring(segment[4], end);
if (!splat) {
isMissingParams = true;
if (prefix || suffix) joined += "/" + prefix + suffix;
continue;
}
const value = encodeParam("_splat", params, decoder);
joined += "/" + prefix + value + suffix;
continue;
}
if (kind === 1) {
const key = path.substring(segment[2], segment[3]);
if (!isMissingParams && !(key in params)) isMissingParams = true;
usedParams[key] = params[key];
const prefix = path.substring(start, segment[1]);
const suffix = path.substring(segment[4], end);
const value = encodeParam(key, params, decoder) ?? "undefined";
joined += "/" + prefix + value + suffix;
continue;
}
if (kind === 3) {
const key = path.substring(segment[2], segment[3]);
const valueRaw = params[key];
if (valueRaw == null) continue;
usedParams[key] = valueRaw;
const prefix = path.substring(start, segment[1]);
const suffix = path.substring(segment[4], end);
const value = encodeParam(key, params, decoder) ?? "";
joined += "/" + prefix + value + suffix;
continue;
}
}
if (path.endsWith("/")) joined += "/";
return {
usedParams,
interpolatedPath: joined || "/",
isMissingParams
};
}
function encodePathParam(value, decoder) {
const encoded = encodeURIComponent(value);
return decoder?.(encoded) ?? encoded;
}
//#endregion
exports.cleanPath = cleanPath;
exports.compileDecodeCharMap = compileDecodeCharMap;
exports.exactPathTest = exactPathTest;
exports.interpolatePath = interpolatePath;
exports.joinPaths = joinPaths;
exports.removeTrailingSlash = removeTrailingSlash;
exports.resolvePath = resolvePath;
exports.trimPath = trimPath;
exports.trimPathLeft = trimPathLeft;
exports.trimPathRight = trimPathRight;
//# sourceMappingURL=path.cjs.map
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileMusic = createLucideIcon("FileMusic", [
["path", { d: "M10.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v8.4", key: "1d3kfm" }],
["path", { d: "M8 18v-7.7L16 9v7", key: "1oie6o" }],
["circle", { cx: "14", cy: "16", r: "2", key: "1bzzi3" }],
["circle", { cx: "6", cy: "18", r: "2", key: "1fncim" }]
]);
export { FileMusic as default };
//# sourceMappingURL=file-music.js.map
@@ -0,0 +1,18 @@
import { REFERENCE_YEAR, MIN_YEAR_SPACE } from '../../data/const.mjs';
var dateMatcher = ({
year,
separator
}) => {
// base guesses: (year distance from REFERENCE_YEAR) * num_days * num_years
const yearSpace = Math.max(Math.abs(year - REFERENCE_YEAR), MIN_YEAR_SPACE);
let guesses = yearSpace * 365;
// add factor of 4 for separator selection (one of ~4 choices)
if (separator) {
guesses *= 4;
}
return guesses;
};
export { dateMatcher as default };
//# sourceMappingURL=scoring.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 './square-parking-off.js';
//# sourceMappingURL=parking-square-off.js.map
@@ -0,0 +1 @@
{"version":3,"file":"alarm-clock-check.js","sources":["../../../src/icons/alarm-clock-check.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AlarmClockCheck\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEzIiByPSI4IiAvPgogIDxwYXRoIGQ9Ik01IDMgMiA2IiAvPgogIDxwYXRoIGQ9Im0yMiA2LTMtMyIgLz4KICA8cGF0aCBkPSJNNi4zOCAxOC43IDQgMjEiIC8+CiAgPHBhdGggZD0iTTE3LjY0IDE4LjY3IDIwIDIxIiAvPgogIDxwYXRoIGQ9Im05IDEzIDIgMiA0LTQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/alarm-clock-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 AlarmClockCheck = createLucideIcon('AlarmClockCheck', [\n ['circle', { cx: '12', cy: '13', r: '8', key: '3y4lt7' }],\n ['path', { d: 'M5 3 2 6', key: '18tl5t' }],\n ['path', { d: 'm22 6-3-3', key: '1opdir' }],\n ['path', { d: 'M6.38 18.7 4 21', key: '17xu3x' }],\n ['path', { d: 'M17.64 18.67 20 21', key: 'kv2oe2' }],\n ['path', { d: 'm9 13 2 2 4-4', key: '6343dt' }],\n]);\n\nexport default AlarmClockCheck;\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,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAC1D,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACz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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,17 @@
import { Transport } from '../shared/transport.js';
import { JSONRPCMessage } from '../types.js';
/**
* Client transport for WebSocket: this will connect to a server over the WebSocket protocol.
*/
export declare class WebSocketClientTransport implements Transport {
private _socket?;
private _url;
onclose?: () => void;
onerror?: (error: Error) => void;
onmessage?: (message: JSONRPCMessage) => void;
constructor(url: URL);
start(): Promise<void>;
close(): Promise<void>;
send(message: JSONRPCMessage): Promise<void>;
}
//# sourceMappingURL=websocket.d.ts.map
@@ -0,0 +1,19 @@
'use strict';
function factorial(n) {
if (n <= 1) return 1;
return n * factorial(n - 1);
}
var wordSequenceMatcher = match => {
if (match.pattern !== 'wordSequence') {
return 0;
}
// Base guesses: factorial of word count (number of ways to order the words)
const baseGuesses = factorial(match.wordCount);
// Additional penalty for longer sequences
const lengthPenalty = 2 ** (match.wordCount - 2);
return baseGuesses * lengthPenalty;
};
module.exports = wordSequenceMatcher;
//# sourceMappingURL=scoring.cjs.map
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../src/create-context.tsx"],
"sourcesContent": ["export { createContext, createContextScope } from './create-context';\nexport type { CreateScope, Scope } from './create-context';\n", "import * as React from 'react';\n\ntype ContextProvider<ContextValueType extends object | null> = React.FC<\n ContextValueType & {\n children: React.ReactNode;\n }\n>;\n\ninterface UseAssertedContext<ContextValueType extends object | null> {\n (consumerName: string): ContextValueType;\n}\n\ninterface UseContext<ContextValueType extends object | null> {\n (consumerName: string): ContextValueType;\n (consumerName: string, options: { optional: true }): ContextValueType | undefined;\n}\n\nfunction createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n): readonly [ContextProvider<ContextValueType>, UseContext<ContextValueType>];\nfunction createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext: ContextValueType,\n): readonly [ContextProvider<ContextValueType>, UseAssertedContext<ContextValueType>];\n\nfunction createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType,\n): readonly [ContextProvider<ContextValueType>, UseContext<ContextValueType>] {\n const Context = React.createContext<ContextValueType | undefined>(defaultContext);\n Context.displayName = rootComponentName + 'Context';\n\n const Provider: ContextProvider<ContextValueType> = (props) => {\n const { children, ...context } = props;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return <Context.Provider value={value}>{children}</Context.Provider>;\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string): ContextValueType;\n function useContext(\n consumerName: string,\n options: { optional: true },\n ): ContextValueType | undefined;\n\n function useContext(\n consumerName: string,\n options: { optional?: boolean } = {},\n ): ContextValueType | undefined {\n const { optional = false } = options;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n if (optional) return undefined;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext];\n}\n\n/* -------------------------------------------------------------------------------------------------\n * createContextScope\n * -----------------------------------------------------------------------------------------------*/\n\ntype Scope<C = any> = { [scopeName: string]: React.Context<C>[] } | undefined;\ntype ScopeHook = (scope: Scope) => { [__scopeProp: string]: Scope };\ninterface CreateScope {\n scopeName: string;\n (): ScopeHook;\n}\n\ntype ScopedContextProvider<ContextValueType extends object | null> = React.FC<\n ContextValueType & {\n scope: Scope<ContextValueType>;\n children: React.ReactNode;\n }\n>;\n\ninterface UseScopedContext<ContextValueType extends object | null> {\n (consumerName: string, scope: Scope<ContextValueType | undefined>): ContextValueType;\n (\n consumerName: string,\n scope: Scope<ContextValueType | undefined>,\n options: { optional?: true },\n ): ContextValueType | undefined;\n}\n\ninterface UseAssertedScopedContext<ContextValueType extends object | null> {\n (consumerName: string, scope: Scope<ContextValueType | undefined>): ContextValueType;\n}\n\ninterface CreateScopedContext {\n <ContextValueType extends object | null>(\n rootComponentName: string,\n ): readonly [ScopedContextProvider<ContextValueType>, UseScopedContext<ContextValueType>];\n <ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext: ContextValueType,\n ): readonly [ScopedContextProvider<ContextValueType>, UseAssertedScopedContext<ContextValueType>];\n}\n\nfunction createContextScope(\n scopeName: string,\n createContextScopeDeps: CreateScope[] = [],\n): readonly [CreateScopedContext, CreateScope] {\n let defaultContexts: any[] = [];\n\n /* -----------------------------------------------------------------------------------------------\n * createContext\n * ---------------------------------------------------------------------------------------------*/\n\n function createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType,\n ) {\n const BaseContext = React.createContext<ContextValueType | undefined>(defaultContext);\n BaseContext.displayName = rootComponentName + 'Context';\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n\n const Line truncated
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,uBAAAA;AAAA,EAAA;AAAA;AAAA;;;ACAA,YAAuB;AAqCZ;AAZX,SAASC,eACP,mBACA,gBAC4E;AAC5E,QAAM,UAAgB,oBAA4C,cAAc;AAChF,UAAQ,cAAc,oBAAoB;AAE1C,QAAM,WAA8C,CAAC,UAAU;AAC7D,UAAM,EAAE,UAAU,GAAG,QAAQ,IAAI;AAGjC,UAAM,Q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 -0,0 +1,3 @@
# `react-checkbox`
View docs [here](https://radix-ui.com/primitives/docs/components/checkbox).
@@ -0,0 +1,134 @@
import { f as createRule, g as import_ast_utils } from "../utils.js";
var array_bracket_newline_default = createRule({
name: "array-bracket-newline",
meta: {
type: "layout",
docs: { description: "Enforce linebreaks after opening and before closing array brackets" },
fixable: "whitespace",
schema: [{ oneOf: [{
type: "string",
enum: [
"always",
"never",
"consistent"
]
}, {
type: "object",
properties: {
multiline: { type: "boolean" },
minItems: {
type: ["integer", "null"],
minimum: 0
}
},
additionalProperties: false
}] }],
defaultOptions: [],
messages: {
unexpectedOpeningLinebreak: "There should be no linebreak after '['.",
unexpectedClosingLinebreak: "There should be no linebreak before ']'.",
missingOpeningLinebreak: "A linebreak is required after '['.",
missingClosingLinebreak: "A linebreak is required before ']'."
}
},
create(context) {
const sourceCode = context.sourceCode;
function normalizeOptionValue(option) {
let consistent = false;
let multiline = false;
let minItems = 0;
if (option) if (option === "consistent") {
consistent = true;
minItems = Number.POSITIVE_INFINITY;
} else if (option === "always" || typeof option !== "string" && option.minItems === 0) minItems = 0;
else if (option === "never") minItems = Number.POSITIVE_INFINITY;
else {
multiline = Boolean(option.multiline);
minItems = option.minItems || Number.POSITIVE_INFINITY;
}
else {
consistent = false;
multiline = true;
minItems = Number.POSITIVE_INFINITY;
}
return {
consistent,
multiline,
minItems
};
}
function normalizeOptions(options) {
const value = normalizeOptionValue(options);
return {
ArrayExpression: value,
ArrayPattern: value
};
}
function reportNoBeginningLinebreak(node, token) {
context.report({
node,
loc: token.loc,
messageId: "unexpectedOpeningLinebreak",
fix(fixer) {
const nextToken = sourceCode.getTokenAfter(token, { includeComments: true });
if (!nextToken || (0, import_ast_utils.isCommentToken)(nextToken)) return null;
return fixer.removeRange([token.range[1], nextToken.range[0]]);
}
});
}
function reportNoEndingLinebreak(node, token) {
context.report({
node,
loc: token.loc,
messageId: "unexpectedClosingLinebreak",
fix(fixer) {
const previousToken = sourceCode.getTokenBefore(token, { includeComments: true });
if (!previousToken || (0, import_ast_utils.isCommentToken)(previousToken)) return null;
return fixer.removeRange([previousToken.range[1], token.range[0]]);
}
});
}
function reportRequiredBeginningLinebreak(node, token) {
context.report({
node,
loc: token.loc,
messageId: "missingOpeningLinebreak",
fix(fixer) {
return fixer.insertTextAfter(token, "\n");
}
});
}
function reportRequiredEndingLinebreak(node, token) {
context.report({
node,
loc: token.loc,
messageId: "missingClosingLinebreak",
fix(fixer) {
return fixer.insertTextBefore(token, "\n");
}
});
}
function check(node) {
const elements = node.elements;
const options = normalizeOptions(context.options[0])[node.type];
const openBracket = sourceCode.getFirstToken(node);
const closeBracket = sourceCode.getLastToken(node);
const firstIncComment = sourceCode.getTokenAfter(openBracket, { includeComments: true });
const lastIncComment = sourceCode.getTokenBefore(closeBracket, { includeComments: true });
const first = sourceCode.getTokenAfter(openBracket);
const last = sourceCode.getTokenBefore(closeBracket);
if (elements.length >= options.minItems || options.multiline && elements.length > 0 && !(0, import_ast_utils.isTokenOnSameLine)(lastIncComment, firstIncComment) || elements.length === 0 && firstIncComment.type === "Block" && !(0, import_ast_utils.isTokenOnSameLine)(lastIncComment, firstIncComment) && firstIncComment === lastIncComment || options.consistent && !(0, import_ast_utils.isTokenOnSameLine)(openBracket, first)) {
if ((0, import_ast_utils.isTokenOnSameLine)(openBracket, first)) reportRequiredBeginningLinebreak(node, openBracket);
if ((0, import_ast_utils.isTokenOnSameLine)(last, closeBracket)) reportRequiredEndingLinebreak(node, closeBracket);
} else {
if (!(0, import_ast_utils.isTokenOnSameLine)(openBracket, first)) reportNoBeginningLinebreak(node, openBracket);
if (!(0, import_ast_utils.isTokenOnSameLine)(last, closeBracket)) reportNoEndingLinebreak(node, closeBracket);
}
}
return {
ArrayPattern: check,
ArrayExpression: check
};
}
});
export { array_bracket_newline_default as t };
@@ -0,0 +1 @@
module.exports={C:{"50":0.0061,"52":0.0061,"55":0.0061,"56":0.0061,"57":0.0061,"58":0.0061,"59":0.0061,"60":0.0061,"66":0.0061,"67":0.0061,"115":0.07929,"118":0.0061,"120":2.28713,"121":4.57425,"123":0.0244,"124":0.0244,"125":0.0183,"130":0.0061,"132":0.0061,"133":0.0061,"135":0.0061,"136":0.0061,"140":0.03659,"142":0.0061,"144":0.0061,"146":0.0061,"147":0.0061,"150":0.0183,"151":0.0061,"152":0.0122,"153":0.0244,"154":0.04879,"155":0.17077,"156":0.16467,"157":0.0061,_:"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 51 53 54 61 62 63 64 65 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 119 122 126 127 128 129 131 134 137 138 139 141 143 145 148 149 158 159 160 3.5 3.6"},D:{"49":0.0061,"60":0.0061,"61":0.0061,"62":0.0061,"63":0.0061,"64":0.0122,"65":0.0061,"66":0.0061,"67":0.0061,"68":0.0061,"69":0.0061,"70":0.0061,"71":0.0061,"72":0.0061,"73":0.0061,"77":0.0061,"79":0.0061,"83":0.0061,"86":0.0061,"87":0.0061,"98":0.0061,"101":0.0061,"103":0.40253,"104":0.40253,"105":0.39034,"106":0.41473,"107":0.42083,"108":0.40253,"109":1.18321,"110":0.39034,"111":0.39644,"112":0.40253,"113":0.0061,"114":0.0122,"116":0.81117,"117":0.39644,"118":2.92752,"119":4.45837,"120":4.97069,"121":0.0183,"122":0.04879,"123":0.0305,"124":0.40863,"125":0.0305,"126":0.0183,"128":0.0061,"129":0.0061,"130":0.0183,"131":0.80507,"132":0.0061,"133":1.03073,"134":0.23786,"135":0.25006,"136":0.24396,"137":0.23786,"138":0.26226,"139":0.25006,"140":0.27446,"141":0.28055,"142":0.86606,"143":0.0244,"144":0.06099,"145":0.14638,"146":0.31105,"147":0.04269,"148":0.17077,"149":0.77457,"150":0.50622,"151":1.12222,"152":5.90383,"153":5.76965,"154":1.33568,"155":0.0122,"156":0.0061,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 74 75 76 78 80 81 84 85 88 89 90 91 92 93 94 95 96 97 99 100 102 115 127 157"},F:{"50":0.0061,"51":0.0061,"52":0.0061,"53":0.0122,"54":0.0183,"55":0.0122,"56":0.0183,"57":0.0061,"58":0.0061,"79":0.0183,"90":0.0061,"91":0.0061,"95":0.0183,"99":0.0061,"101":0.0061,"105":0.0122,"106":0.0244,"107":0.0122,"115":0.0061,"116":0.0122,"119":0.0061,"120":0.0061,"121":0.0061,"122":0.0061,"133":0.0061,"134":0.0183,"135":0.29885,_:"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 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 85 86 87 88 89 92 93 94 96 97 98 100 102 103 104 108 109 110 111 112 113 114 117 118 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.0061,"92":0.0122,"109":0.0061,"110":0.0061,"114":0.0061,"119":2.23223,"120":2.23223,"122":0.0244,"123":0.0061,"124":0.0061,"129":0.0061,"131":0.0061,"132":0.0122,"133":0.0061,"134":0.0061,"135":0.0061,"136":0.0061,"138":0.0061,"139":0.0061,"140":0.0122,"141":0.0061,"142":0.0061,"143":0.0122,"144":0.0061,"145":0.0122,"146":0.0122,"147":0.0244,"148":0.0305,"149":0.0061,"150":0.0183,"151":0.05489,"152":0.56111,"153":0.79897,"154":0.21347,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 111 112 113 115 116 117 118 121 125 126 127 128 130 137"},E:{"27":0.06709,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.2 17.3 17.5 18.0 18.2 18.4 26.0 27.1 TP","14.1":0.0061,"15.6":0.0183,"16.6":0.0061,"17.1":0.0122,"17.4":0.0061,"17.6":0.0122,"18.1":0.0061,"18.3":0.0122,"18.5-18.7":0.0061,"26.1":0.0061,"26.2":0.0122,"26.3":0.0122,"26.4":0.0122,"26.5":0.05489,"26.6":0.16467,"27.2":0.0061},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00047,"5.0-5.1":0.00047,"6.0-6.1":0,"7.0-7.1":0.00094,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00468,"11.0-11.2":0.00047,"11.3-11.4":0.00094,"12.0-12.1":0,"12.2-12.5":0.01216,"13.0-13.1":0,"13.2":0.00234,"13.3":0,"13.4-13.7":0.00047,"14.0-14.4":0.00187,"14.5-14.8":0.00281,"15.0-15.1":0.00281,"15.2-15.3":0.00187,"15.4":0.00234,"15.5":0.00281,"15.6-15.8":0.06079,"16.0":0.00468,"16.1":0.00842,"16.2":0.00468,"16.3":0.01029,"16.4":0.00234,"16.5":0.00374,"16.6-16.7":0.08464,"17.0":0.00327,"17.1":0.00468,"17.2":0.00468,"17.3":0.00701,"17.4":0.00982,"17.5":0.01917,"17.6-17.7":0.04957,"18.0":0.01029,"18.1":0.02057,"18.2":0.02806,"18.3":0.04863,"18.4":0.03039,"18.5-18.7":0.628,"26.0":0.03039,"26.1":0.03086,"26.2":0.08043,"26.3":0.08698,"26.4":0.06359,"26.5":0.42599,"26.6":2.62844,"27.0":0.20154,"27.1":0,"27.2":0.00514},P:{"4":0.00947,"23":0.06626,"24":0.00947,"26":0.0284,"27":0.0284,"28":0.0568,"29":0.06626,"30":0.70051,_:"20 21 22 25 5.0-5.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 18.0 19.0","6.2-6.4":0.00947,"7.2-7.4":0.04733,"16.0":0.00947,"17.0":0.00947},I:{"0":0.0039,"3":0,"4":0,"2.Line truncated
@@ -0,0 +1 @@
module.exports={C:{"115":0.004,"152":0.004,"154":0.024,"155":0.028,"156":0.036,_:"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 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 153 157 158 159 160 3.5 3.6"},D:{"79":0.004,"92":0.004,"93":0.012,"103":0.04,"104":0.004,"109":0.016,"110":0.004,"111":0.004,"116":0.036,"117":0.004,"118":0.004,"122":0.004,"126":0.008,"128":0.012,"130":0.008,"131":0.004,"133":0.004,"135":0.008,"137":0.008,"138":0.02,"140":0.004,"141":0.004,"142":0.008,"143":0.004,"146":0.012,"147":0.008,"148":0.068,"149":0.16,"150":0.516,"151":0.56,"152":1.064,"153":0.672,"154":0.092,"155":0.108,_:"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 80 81 83 84 85 86 87 88 89 90 91 94 95 96 97 98 99 100 101 102 105 106 107 108 112 113 114 115 119 120 121 123 124 125 127 129 132 134 136 139 144 145 156 157"},F:{"134":0.004,"135":0.008,_:"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 101 102 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:{"144":0.008,"146":0.004,"147":0.028,"148":0.004,"149":0.016,"150":0.024,"151":0.032,"152":0.352,"153":0.236,"154":0.064,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 145"},E:{"14":0.004,"27":1.076,_:"4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.2-15.3 15.4 16.0 17.0 27.1 TP","13.1":0.004,"14.1":0.008,"15.1":0.004,"15.5":0.276,"15.6":0.6,"16.1":0.48,"16.2":0.04,"16.3":0.044,"16.4":0.068,"16.5":0.012,"16.6":1.4,"17.1":3.54,"17.2":0.012,"17.3":0.036,"17.4":0.088,"17.5":0.124,"17.6":1.968,"18.0":0.132,"18.1":0.072,"18.2":0.012,"18.3":0.272,"18.4":0.02,"18.5-18.7":0.092,"26.0":0.14,"26.1":0.368,"26.2":1.488,"26.3":0.36,"26.4":0.196,"26.5":3.072,"26.6":15.508,"27.2":0.06},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00578,"5.0-5.1":0.00578,"6.0-6.1":0,"7.0-7.1":0.01156,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.0578,"11.0-11.2":0.00578,"11.3-11.4":0.01156,"12.0-12.1":0,"12.2-12.5":0.15028,"13.0-13.1":0,"13.2":0.0289,"13.3":0,"13.4-13.7":0.00578,"14.0-14.4":0.02312,"14.5-14.8":0.03468,"15.0-15.1":0.03468,"15.2-15.3":0.02312,"15.4":0.0289,"15.5":0.03468,"15.6-15.8":0.7514,"16.0":0.0578,"16.1":0.10404,"16.2":0.0578,"16.3":0.12716,"16.4":0.0289,"16.5":0.04624,"16.6-16.7":1.04619,"17.0":0.04046,"17.1":0.0578,"17.2":0.0578,"17.3":0.0867,"17.4":0.12138,"17.5":0.23698,"17.6-17.7":0.61268,"18.0":0.12716,"18.1":0.25432,"18.2":0.3468,"18.3":0.60112,"18.4":0.3757,"18.5-18.7":7.76259,"26.0":0.3757,"26.1":0.38148,"26.2":0.99417,"26.3":1.07509,"26.4":0.78608,"26.5":5.26561,"26.6":32.48959,"27.0":2.4912,"27.1":0,"27.2":0.06358},P:{"22":0.04845,"25":0.01938,"28":0.00969,"29":0.01938,"30":0.15505,_:"4 20 21 23 24 26 27 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0,"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,_:"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":2.2677},R:{_:"0"},M:{"0":0.03},Q:{_:"14.9"},O:{"0":0.05999},H:{all:0}};
@@ -0,0 +1,47 @@
/**
* Get original stacktrace without source map support the most performant way.
* - Create only 1 stack frame.
* - Rewrite prepareStackTrace to bypass "support-stack-trace" (usually takes ~250ms).
*/
function createSimpleStackTrace(options) {
const { message = "$$stack trace error", stackTraceLimit = 1 } = options || {};
const limit = Error.stackTraceLimit;
const prepareStackTrace = Error.prepareStackTrace;
Error.stackTraceLimit = stackTraceLimit;
Error.prepareStackTrace = (e) => e.stack;
const err = new Error(message);
const stackTrace = err.stack || "";
Error.prepareStackTrace = prepareStackTrace;
Error.stackTraceLimit = limit;
return stackTrace;
}
function slash(path) {
return path.replace(/\\/g, "/");
}
function filterOutComments(s) {
const result = [];
let commentState = "none";
for (let i = 0; i < s.length; ++i) {
if (commentState === "singleline") {
if (s[i] === "\n") {
commentState = "none";
}
} else if (commentState === "multiline") {
if (s[i - 1] === "*" && s[i] === "/") {
commentState = "none";
}
} else if (commentState === "none") {
if (s[i] === "/" && s[i + 1] === "/") {
commentState = "singleline";
} else if (s[i] === "/" && s[i + 1] === "*") {
commentState = "multiline";
i += 2;
} else {
result.push(s[i]);
}
}
}
return result.join("");
}
export { createSimpleStackTrace as c, filterOutComments as f, slash as s };
@@ -0,0 +1,4 @@
'use strict';
/** @type {import('./max')} */
module.exports = Math.max;
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Heart = createLucideIcon("Heart", [
[
"path",
{
d: "M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",
key: "c3ymky"
}
]
]);
export { Heart as default };
//# sourceMappingURL=heart.js.map
@@ -0,0 +1,171 @@
"use strict";
"use client";
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 __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);
// src/index.ts
var index_exports = {};
__export(index_exports, {
Presence: () => Presence,
Root: () => Root
});
module.exports = __toCommonJS(index_exports);
// src/presence.tsx
var React2 = __toESM(require("react"));
var import_react_compose_refs = require("@radix-ui/react-compose-refs");
var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect");
// src/use-state-machine.tsx
var React = __toESM(require("react"));
function useStateMachine(initialState, machine) {
return React.useReducer((state, event) => {
const nextState = machine[state][event];
return nextState ?? state;
}, initialState);
}
// src/presence.tsx
var Presence = (props) => {
const { present, children } = props;
const presence = usePresence(present);
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React2.Children.only(children);
const ref = (0, import_react_compose_refs.useComposedRefs)(presence.ref, getElementRef(child));
const forceMount = typeof children === "function";
return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;
};
Presence.displayName = "Presence";
function usePresence(present) {
const [node, setNode] = React2.useState();
const stylesRef = React2.useRef(null);
const prevPresentRef = React2.useRef(present);
const prevAnimationNameRef = React2.useRef("none");
const initialState = present ? "mounted" : "unmounted";
const [state, send] = useStateMachine(initialState, {
mounted: {
UNMOUNT: "unmounted",
ANIMATION_OUT: "unmountSuspended"
},
unmountSuspended: {
MOUNT: "mounted",
ANIMATION_END: "unmounted"
},
unmounted: {
MOUNT: "mounted"
}
});
React2.useEffect(() => {
const currentAnimationName = getAnimationName(stylesRef.current);
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
}, [state]);
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
const styles = stylesRef.current;
const wasPresent = prevPresentRef.current;
const hasPresentChanged = wasPresent !== present;
if (hasPresentChanged) {
const prevAnimationName = prevAnimationNameRef.current;
const currentAnimationName = getAnimationName(styles);
if (present) {
send("MOUNT");
} else if (currentAnimationName === "none" || styles?.display === "none") {
send("UNMOUNT");
} else {
const isAnimating = prevAnimationName !== currentAnimationName;
if (wasPresent && isAnimating) {
send("ANIMATION_OUT");
} else {
send("UNMOUNT");
}
}
prevPresentRef.current = present;
}
}, [present, send]);
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
if (node) {
let timeoutId;
const ownerWindow = node.ownerDocument.defaultView ?? window;
const handleAnimationEnd = (event) => {
const currentAnimationName = getAnimationName(stylesRef.current);
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
if (event.target === node && isCurrentAnimation) {
send("ANIMATION_END");
if (!prevPresentRef.current) {
const currentFillMode = node.style.animationFillMode;
node.style.animationFillMode = "forwards";
timeoutId = ownerWindow.setTimeout(() => {
if (node.style.animationFillMode === "forwards") {
node.style.animationFillMode = currentFillMode;
}
});
}
}
};
const handleAnimationStart = (event) => {
if (event.target === node) {
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
}
};
node.addEventListener("animationstart", handleAnimationStart);
node.addEventListener("animationcancel", handleAnimationEnd);
node.addEventListener("animationend", handleAnimationEnd);
return () => {
ownerWindow.clearTimeout(timeoutId);
node.removeEventListener("animationstart", handleAnimationStart);
node.removeEventListener("animationcancel", handleAnimationEnd);
node.removeEventListener("animationend", handleAnimationEnd);
};
} else {
send("ANIMATION_END");
}
}, [node, send]);
return {
isPresent: ["mounted", "unmountSuspended"].includes(state),
ref: React2.useCallback((node2) => {
stylesRef.current = node2 ? getComputedStyle(node2) : null;
setNode(node2);
}, [])
};
}
function getAnimationName(styles) {
return styles?.animationName || "none";
}
function getElementRef(element) {
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.ref;
}
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.props.ref;
}
return element.props.ref || element.ref;
}
var Root = Presence;
//# sourceMappingURL=index.js.map
@@ -0,0 +1,135 @@
import { escapeToBuffer, raw } from "../../utils/html.js";
import { DOM_RENDERER } from "../../jsx/constants.js";
import { CLASS_NAME, DEFAULT_STYLE_ID, SELECTOR, SELECTORS, STYLE_STRING, cssCommon, cxCommon, keyframesCommon, rawCssString, viewTransitionCommon } from "./common.js";
import { createCssJsxDomObjects } from "../../jsx/dom/css.js";
//#region src/helper/css/index.ts
/**
* @module
* css Helper for Hono.
*/
/**
* @experimental
* `createCssContext` is an experimental feature.
* The API might be changed.
*
* @param options.id - The ID for the style element
* @param options.classNameSlug - Optional function to customize generated CSS class names
* @param options.onInvalidSlug - Optional callback function called when an invalid slug is returned from ClassNameSlug
*/
const createCssContext = ({ id, classNameSlug, onInvalidSlug }) => {
const [cssJsxDomObject, StyleRenderToDom] = createCssJsxDomObjects({ id });
const contextMap = /* @__PURE__ */ new WeakMap();
const nonceMap = /* @__PURE__ */ new WeakMap();
const replaceStyleRe = new RegExp(`(<style id="${id}"(?: nonce="[^"]*")?>.*?)(</style>)`);
const newCssClassNameObject = (cssClassName) => {
const appendStyle = ({ buffer, context }) => {
const [toAdd, added] = contextMap.get(context);
const names = Object.keys(toAdd);
if (!names.length) return;
let stylesStr = "";
names.forEach((className) => {
added[className] = true;
stylesStr += className.startsWith(":-hono-global") ? toAdd[className] : `${className[0] === "@" ? "" : "."}${className}{${toAdd[className]}}`;
});
contextMap.set(context, [{}, added]);
if (buffer && replaceStyleRe.test(buffer[0])) {
buffer[0] = buffer[0].replace(replaceStyleRe, (_, pre, post) => `${pre}${stylesStr}${post}`);
return;
}
const nonce = nonceMap.get(context);
const appendStyleScript = `<script${nonce ? ` nonce="${nonce}"` : ""}>document.querySelector('#${id}').textContent+=${JSON.stringify(stylesStr)}<\/script>`;
if (buffer) {
buffer[0] = `${appendStyleScript}${buffer[0]}`;
return;
}
return Promise.resolve(appendStyleScript);
};
const addClassNameToContext = ({ context }) => {
if (!contextMap.has(context)) contextMap.set(context, [{}, {}]);
const [toAdd, added] = contextMap.get(context);
let allAdded = true;
if (!added[cssClassName[SELECTOR]]) {
allAdded = false;
toAdd[cssClassName[SELECTOR]] = cssClassName[STYLE_STRING];
}
cssClassName[SELECTORS].forEach(({ [CLASS_NAME]: className, [STYLE_STRING]: styleString }) => {
if (!added[className]) {
allAdded = false;
toAdd[className] = styleString;
}
});
if (allAdded) return;
return Promise.resolve(raw("", [appendStyle]));
};
const rawClassName = cssClassName[CLASS_NAME];
let escapedClassName = rawClassName;
if (/[&<>'"]/.test(rawClassName)) {
const escapedBuffer = [""];
escapeToBuffer(rawClassName, escapedBuffer);
escapedClassName = escapedBuffer[0];
}
const className = new String(escapedClassName);
Object.assign(className, cssClassName);
className.isEscaped = true;
className.callbacks = [addClassNameToContext];
const promise = Promise.resolve(className);
Object.assign(promise, cssClassName);
promise.toString = cssJsxDomObject.toString;
return promise;
};
const css = (strings, ...values) => {
return newCssClassNameObject(cssCommon(strings, values, classNameSlug, onInvalidSlug));
};
const cx = (...args) => {
args = cxCommon(args);
return css(Array(args.length).fill(""), ...args);
};
const keyframes = (strings, ...values) => keyframesCommon(strings, values, classNameSlug, onInvalidSlug);
const viewTransition = ((strings, ...values) => {
return newCssClassNameObject(viewTransitionCommon(strings, values, classNameSlug, onInvalidSlug));
});
const Style = ({ children, nonce } = {}) => raw(`<style id="${id}"${nonce ? ` nonce="${nonce}"` : ""}>${children ? children[STYLE_STRING] : ""}</style>`, [({ context }) => {
nonceMap.set(context, nonce);
}]);
Style[DOM_RENDERER] = StyleRenderToDom;
return {
css,
cx,
keyframes,
viewTransition,
Style
};
};
const defaultContext = createCssContext({ id: DEFAULT_STYLE_ID });
/**
* @experimental
* `css` is an experimental feature.
* The API might be changed.
*/
const css = defaultContext.css;
/**
* @experimental
* `cx` is an experimental feature.
* The API might be changed.
*/
const cx = defaultContext.cx;
/**
* @experimental
* `keyframes` is an experimental feature.
* The API might be changed.
*/
const keyframes = defaultContext.keyframes;
/**
* @experimental
* `viewTransition` is an experimental feature.
* The API might be changed.
*/
const viewTransition = defaultContext.viewTransition;
/**
* @experimental
* `Style` is an experimental feature.
* The API might be changed.
*/
const Style = defaultContext.Style;
//#endregion
export { Style, createCssContext, css, cx, keyframes, rawCssString, viewTransition };
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const IndentIncrease = createLucideIcon("IndentIncrease", [
["path", { d: "M21 12H11", key: "wd7e0v" }],
["path", { d: "M21 18H11", key: "4wu86t" }],
["path", { d: "M21 6H11", key: "6dy1d6" }],
["path", { d: "m3 8 4 4-4 4", key: "1a3j6y" }]
]);
export { IndentIncrease as default };
//# sourceMappingURL=indent-increase.js.map
@@ -0,0 +1,374 @@
/**
* @fileoverview Rule to enforce line breaks after each array element
* @author Jan Peer Stöcklmair <https://github.com/JPeer264>
* @deprecated in ESLint v8.53.0
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "array-element-newline",
url: "https://eslint.style/rules/array-element-newline",
},
},
],
},
type: "layout",
docs: {
description: "Enforce line breaks after each array element",
recommended: false,
url: "https://eslint.org/docs/latest/rules/array-element-newline",
},
fixable: "whitespace",
schema: {
definitions: {
basicConfig: {
oneOf: [
{
enum: ["always", "never", "consistent"],
},
{
type: "object",
properties: {
multiline: {
type: "boolean",
},
minItems: {
type: ["integer", "null"],
minimum: 0,
},
},
additionalProperties: false,
},
],
},
},
type: "array",
items: [
{
oneOf: [
{
$ref: "#/definitions/basicConfig",
},
{
type: "object",
properties: {
ArrayExpression: {
$ref: "#/definitions/basicConfig",
},
ArrayPattern: {
$ref: "#/definitions/basicConfig",
},
},
additionalProperties: false,
minProperties: 1,
},
],
},
],
},
messages: {
unexpectedLineBreak: "There should be no linebreak here.",
missingLineBreak: "There should be a linebreak after this element.",
},
},
create(context) {
const sourceCode = context.sourceCode;
//----------------------------------------------------------------------
// Helpers
//----------------------------------------------------------------------
/**
* Normalizes a given option value.
* @param {string|Object|undefined} providedOption An option value to parse.
* @returns {{multiline: boolean, minItems: number}} Normalized option object.
*/
function normalizeOptionValue(providedOption) {
let consistent = false;
let multiline = false;
let minItems;
const option = providedOption || "always";
if (!option || option === "always" || option.minItems === 0) {
minItems = 0;
} else if (option === "never") {
minItems = Number.POSITIVE_INFINITY;
} else if (option === "consistent") {
consistent = true;
minItems = Number.POSITIVE_INFINITY;
} else {
multiline = Boolean(option.multiline);
minItems = option.minItems || Number.POSITIVE_INFINITY;
}
return { consistent, multiline, minItems };
}
/**
* Normalizes a given option value.
* @param {string|Object|undefined} options An option value to parse.
* @returns {{ArrayExpression: {multiline: boolean, minItems: number}, ArrayPattern: {multiline: boolean, minItems: number}}} Normalized option object.
*/
function normalizeOptions(options) {
if (options && (options.ArrayExpression || options.ArrayPattern)) {
let expressionOptions, patternOptions;
if (options.ArrayExpression) {
expressionOptions = normalizeOptionValue(
options.ArrayExpression,
);
}
if (options.ArrayPattern) {
patternOptions = normalizeOptionValue(options.ArrayPattern);
}
return {
ArrayExpression: expressionOptions,
ArrayPattern: patternOptions,
};
}
const value = normalizeOptionValue(options);
return { ArrayExpression: value, ArrayPattern: value };
}
/**
* Reports that there shouldn't be a line break after the first token
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportNoLineBreak(token) {
const tokenBefore = sourceCode.getTokenBefore(token, {
includeComments: true,
});
context.report({
loc: {
start: tokenBefore.loc.end,
end: token.loc.start,
},
messageId: "unexpectedLineBreak",
fix(fixer) {
if (astUtils.isCommentToken(tokenBefore)) {
return null;
}
if (!astUtils.isTokenOnSameLine(tokenBefore, token)) {
return fixer.replaceTextRange(
[tokenBefore.range[1], token.range[0]],
" ",
);
}
/*
* This will check if the comma is on the same line as the next element
* Following array:
* [
* 1
* , 2
* , 3
* ]
*
* will be fixed to:
* [
* 1, 2, 3
* ]
*/
const twoTokensBefore = sourceCode.getTokenBefore(
tokenBefore,
{ includeComments: true },
);
if (astUtils.isCommentToken(twoTokensBefore)) {
return null;
}
return fixer.replaceTextRange(
[twoTokensBefore.range[1], tokenBefore.range[0]],
"",
);
},
});
}
/**
* Reports that there should be a line break after the first token
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportRequiredLineBreak(token) {
const tokenBefore = sourceCode.getTokenBefore(token, {
includeComments: true,
});
context.report({
loc: {
start: tokenBefore.loc.end,
end: token.loc.start,
},
messageId: "missingLineBreak",
fix(fixer) {
return fixer.replaceTextRange(
[tokenBefore.range[1], token.range[0]],
"\n",
);
},
});
}
/**
* Reports a given node if it violated this rule.
* @param {ASTNode} node A node to check. This is an ObjectExpression node or an ObjectPattern node.
* @returns {void}
*/
function check(node) {
const elements = node.elements;
const normalizedOptions = normalizeOptions(context.options[0]);
const options = normalizedOptions[node.type];
if (!options) {
return;
}
let elementBreak = false;
/*
* MULTILINE: true
* loop through every element and check
* if at least one element has linebreaks inside
* this ensures that following is not valid (due to elements are on the same line):
*
* [
* 1,
* 2,
* 3
* ]
*/
if (options.multiline) {
elementBreak = elements
.filter(element => element !== null)
.some(
element =>
element.loc.start.line !== element.loc.end.line,
);
}
let linebreaksCount = 0;
for (let i = 0; i < node.elements.length; i++) {
const element = node.elements[i];
const previousElement = elements[i - 1];
if (i === 0 || element === null || previousElement === null) {
continue;
}
const commaToken = sourceCode.getFirstTokenBetween(
previousElement,
element,
astUtils.isCommaToken,
);
const lastTokenOfPreviousElement =
sourceCode.getTokenBefore(commaToken);
const firstTokenOfCurrentElement =
sourceCode.getTokenAfter(commaToken);
if (
!astUtils.isTokenOnSameLine(
lastTokenOfPreviousElement,
firstTokenOfCurrentElement,
)
) {
linebreaksCount++;
}
}
const needsLinebreaks =
elements.length >= options.minItems ||
(options.multiline && elementBreak) ||
(options.consistent &&
linebreaksCount > 0 &&
linebreaksCount < node.elements.length);
elements.forEach((element, i) => {
const previousElement = elements[i - 1];
if (i === 0 || element === null || previousElement === null) {
return;
}
const commaToken = sourceCode.getFirstTokenBetween(
previousElement,
element,
astUtils.isCommaToken,
);
const lastTokenOfPreviousElement =
sourceCode.getTokenBefore(commaToken);
const firstTokenOfCurrentElement =
sourceCode.getTokenAfter(commaToken);
if (needsLinebreaks) {
if (
astUtils.isTokenOnSameLine(
lastTokenOfPreviousElement,
firstTokenOfCurrentElement,
)
) {
reportRequiredLineBreak(firstTokenOfCurrentElement);
}
} else {
if (
!astUtils.isTokenOnSameLine(
lastTokenOfPreviousElement,
firstTokenOfCurrentElement,
)
) {
reportNoLineBreak(firstTokenOfCurrentElement);
}
}
});
}
//----------------------------------------------------------------------
// Public
//----------------------------------------------------------------------
return {
ArrayPattern: check,
ArrayExpression: check,
};
},
};
@@ -0,0 +1,15 @@
"use client";
import { useInsertionEffect } from 'react';
function useMotionValueEvent(value, event, callback) {
/**
* useInsertionEffect will create subscriptions before any other
* effects will run. Effects run upwards through the tree so it
* can be that binding a useLayoutEffect higher up the tree can
* miss changes from lower down the tree.
*/
useInsertionEffect(() => value.on(event, callback), [value, event, callback]);
}
export { useMotionValueEvent };
//# sourceMappingURL=use-motion-value-event.mjs.map
@@ -0,0 +1,128 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_request_constants = require("../../request/constants.js");
const require_utils_url = require("../../utils/url.js");
//#region src/helper/route/index.ts
/**
* Get matched routes in the handler
*
* @param {Context} c - The context object
* @returns An array of matched routes
*
* @example
* ```ts
* import { matchedRoutes } from 'hono/route'
*
* app.use('*', async function logger(c, next) {
* await next()
* matchedRoutes(c).forEach(({ handler, method, path }, i) => {
* const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]')
* console.log(
* method,
* ' ',
* path,
* ' '.repeat(Math.max(10 - path.length, 0)),
* name,
* i === c.req.routeIndex ? '<- respond from here' : ''
* )
* })
* })
* ```
*/
const matchedRoutes = (c) => c.req[require_request_constants.GET_MATCH_RESULT][0].map(([[, route]]) => route);
/**
* Get the route path registered within the handler
*
* @param {Context} c - The context object
* @param {number} index - The index of the route from which to retrieve the path, similar to Array.prototype.at(), where a negative number is the index counted from the end of the matching route. Defaults to the current route index.
* @returns The route path registered within the handler
*
* @example
* ```ts
* import { routePath } from 'hono/route'
*
* app.use('*', (c, next) => {
* console.log(routePath(c)) // '*'
* console.log(routePath(c, -1)) // '/posts/:id'
* return next()
* })
*
* app.get('/posts/:id', (c) => {
* return c.text(routePath(c)) // '/posts/:id'
* })
* ```
*/
const routePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.path ?? "";
/**
* Get the basePath of the as-is route specified by routing.
*
* @param {Context} c - The context object
* @param {number} index - The index of the route from which to retrieve the path, similar to Array.prototype.at(), where a negative number is the index counted from the end of the matching route. Defaults to the current route index.
* @returns The basePath of the as-is route specified by routing.
*
* @example
* ```ts
* import { baseRoutePath } from 'hono/route'
*
* const app = new Hono()
*
* const subApp = new Hono()
* subApp.get('/posts/:id', (c) => {
* return c.text(baseRoutePath(c)) // '/:sub'
* })
*
* app.route('/:sub', subApp)
* ```
*/
const baseRoutePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.basePath ?? "";
/**
* Get the basePath with embedded parameters
*
* @param {Context} c - The context object
* @param {number} index - The index of the route from which to retrieve the path, similar to Array.prototype.at(), where a negative number is the index counted from the end of the matching route. Defaults to the current route index.
* @returns The basePath with embedded parameters.
*
* @example
* ```ts
* import { basePath } from 'hono/route'
*
* const app = new Hono()
*
* const subApp = new Hono()
* subApp.get('/posts/:id', (c) => {
* return c.text(basePath(c)) // '/requested-sub-app-path'
* })
*
* app.route('/:sub', subApp)
* ```
*/
const basePathCacheMap = /* @__PURE__ */ new WeakMap();
const basePath = (c, index) => {
index ??= c.req.routeIndex;
const cache = basePathCacheMap.get(c) || [];
if (typeof cache[index] === "string") return cache[index];
let result;
const rp = baseRoutePath(c, index);
if (!/[:*]/.test(rp)) result = rp;
else {
const paths = require_utils_url.splitRoutingPath(rp);
const reqPath = c.req.path;
let basePathLength = 0;
for (let i = 0, len = paths.length; i < len; i++) {
const pattern = require_utils_url.getPattern(paths[i], paths[i + 1]);
if (pattern) {
const re = pattern[2] === true || pattern === "*" ? /[^\/]+/ : pattern[2];
basePathLength += reqPath.substring(basePathLength + 1).match(re)?.[0].length || 0;
} else basePathLength += paths[i].length;
basePathLength += 1;
}
result = reqPath.substring(0, basePathLength);
}
cache[index] = result;
basePathCacheMap.set(c, cache);
return result;
};
//#endregion
exports.basePath = basePath;
exports.baseRoutePath = baseRoutePath;
exports.matchedRoutes = matchedRoutes;
exports.routePath = routePath;
@@ -0,0 +1,106 @@
import {ContextualKeyword} from "./keywords";
import { TokenType as tt} from "./types";
export class Scope {
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
this.startTokenIndex = startTokenIndex;
this.endTokenIndex = endTokenIndex;
this.isFunctionScope = isFunctionScope;
}
}
export class StateSnapshot {
constructor(
potentialArrowAt,
noAnonFunctionType,
inDisallowConditionalTypesContext,
tokensLength,
scopesLength,
pos,
type,
contextualKeyword,
start,
end,
isType,
scopeDepth,
error,
) {;this.potentialArrowAt = potentialArrowAt;this.noAnonFunctionType = noAnonFunctionType;this.inDisallowConditionalTypesContext = inDisallowConditionalTypesContext;this.tokensLength = tokensLength;this.scopesLength = scopesLength;this.pos = pos;this.type = type;this.contextualKeyword = contextualKeyword;this.start = start;this.end = end;this.isType = isType;this.scopeDepth = scopeDepth;this.error = error;}
}
export default class State {constructor() { State.prototype.__init.call(this);State.prototype.__init2.call(this);State.prototype.__init3.call(this);State.prototype.__init4.call(this);State.prototype.__init5.call(this);State.prototype.__init6.call(this);State.prototype.__init7.call(this);State.prototype.__init8.call(this);State.prototype.__init9.call(this);State.prototype.__init10.call(this);State.prototype.__init11.call(this);State.prototype.__init12.call(this);State.prototype.__init13.call(this); }
// Used to signify the start of a potential arrow function
__init() {this.potentialArrowAt = -1}
// Used by Flow to handle an edge case involving function type parsing.
__init2() {this.noAnonFunctionType = false}
// Used by TypeScript to handle ambiguities when parsing conditional types.
__init3() {this.inDisallowConditionalTypesContext = false}
// Token store.
__init4() {this.tokens = []}
// Array of all observed scopes, ordered by their ending position.
__init5() {this.scopes = []}
// The current position of the tokenizer in the input.
__init6() {this.pos = 0}
// Information about the current token.
__init7() {this.type = tt.eof}
__init8() {this.contextualKeyword = ContextualKeyword.NONE}
__init9() {this.start = 0}
__init10() {this.end = 0}
__init11() {this.isType = false}
__init12() {this.scopeDepth = 0}
/**
* If the parser is in an error state, then the token is always tt.eof and all functions can
* keep executing but should be written so they don't get into an infinite loop in this situation.
*
* This approach, combined with the ability to snapshot and restore state, allows us to implement
* backtracking without exceptions and without needing to explicitly propagate error states
* everywhere.
*/
__init13() {this.error = null}
snapshot() {
return new StateSnapshot(
this.potentialArrowAt,
this.noAnonFunctionType,
this.inDisallowConditionalTypesContext,
this.tokens.length,
this.scopes.length,
this.pos,
this.type,
this.contextualKeyword,
this.start,
this.end,
this.isType,
this.scopeDepth,
this.error,
);
}
restoreFromSnapshot(snapshot) {
this.potentialArrowAt = snapshot.potentialArrowAt;
this.noAnonFunctionType = snapshot.noAnonFunctionType;
this.inDisallowConditionalTypesContext = snapshot.inDisallowConditionalTypesContext;
this.tokens.length = snapshot.tokensLength;
this.scopes.length = snapshot.scopesLength;
this.pos = snapshot.pos;
this.type = snapshot.type;
this.contextualKeyword = snapshot.contextualKeyword;
this.start = snapshot.start;
this.end = snapshot.end;
this.isType = snapshot.isType;
this.scopeDepth = snapshot.scopeDepth;
this.error = snapshot.error;
}
}
@@ -0,0 +1,93 @@
# ClientStats
<!--introduced_in=v7.9.0-->
<!--type=module-->
<!-- source_link=lib/util/stats.js -->
> Stability: 2 - Stable
A `ClientStats` is a point-in-time snapshot of the connection and request
state of a single [`Client`][]. Instances are not created directly; a fresh
snapshot is produced each time the [`client.stats`][] getter is read.
```mjs
import { Client } from 'undici'
const client = new Client('http://localhost:3000')
const stats = client.stats
console.log(stats.connected, stats.running)
```
```cjs
const { Client } = require('undici')
const client = new Client('http://localhost:3000')
const stats = client.stats
console.log(stats.connected, stats.running)
```
## Class: `ClientStats`
<!-- YAML
added: v7.9.0
-->
Captures the connection and request counters of a [`Client`][] at the moment
the snapshot is taken. The values are read from the client at construction time
and do not update afterwards; read [`client.stats`][] again for current values.
### `new ClientStats(client)`
<!-- YAML
added: v7.9.0
-->
* `client` {Client} The client to read the statistics from.
Creates a snapshot from the supplied `client`. This constructor is used
internally by the [`client.stats`][] getter and is not normally invoked by
application code.
### `clientStats.connected`
<!-- YAML
added: v7.9.0
-->
* Type: {boolean}
`true` when the client currently has an open socket connection.
### `clientStats.pending`
<!-- YAML
added: v7.9.0
-->
* Type: {number}
Number of open socket connections of this client that do not have an active
request.
### `clientStats.running`
<!-- YAML
added: v7.9.0
-->
* Type: {number}
Number of currently active requests of this client.
### `clientStats.size`
<!-- YAML
added: v7.9.0
-->
* Type: {number}
Number of active, pending, or queued requests of this client.
[`Client`]: Client.md#class-client
[`client.stats`]: Client.md#clientstats
@@ -0,0 +1,235 @@
#ifndef NODE_SQLITE3_SRC_BACKUP_H
#define NODE_SQLITE3_SRC_BACKUP_H
#include "database.h"
#include <string>
#include <queue>
#include <set>
#include <sqlite3.h>
#include <napi.h>
using namespace Napi;
namespace node_sqlite3 {
/**
*
* A class for managing an sqlite3_backup object. For consistency
* with other node-sqlite3 classes, it maintains an internal queue
* of calls.
*
* Intended usage from node:
*
* var db = new sqlite3.Database('live.db');
* var backup = db.backup('backup.db');
* ...
* // in event loop, move backup forward when we have time.
* if (backup.idle) { backup.step(NPAGES); }
* if (backup.completed) { ... success ... }
* if (backup.failed) { ... sadness ... }
* // do other work in event loop - fine to modify live.db
* ...
*
* Here is how sqlite's backup api is exposed:
*
* - `sqlite3_backup_init`: This is implemented as
* `db.backup(filename, [callback])` or
* `db.backup(filename, destDbName, sourceDbName, filenameIsDest, [callback])`.
* - `sqlite3_backup_step`: `backup.step(pages, [callback])`.
* - `sqlite3_backup_finish`: `backup.finish([callback])`.
* - `sqlite3_backup_remaining`: `backup.remaining`.
* - `sqlite3_backup_pagecount`: `backup.pageCount`.
*
* There are the following read-only properties:
*
* - `backup.completed` is set to `true` when the backup
* succeeeds.
* - `backup.failed` is set to `true` when the backup
* has a fatal error.
* - `backup.idle` is set to `true` when no operation
* is currently in progress or queued for the backup.
* - `backup.remaining` is an integer with the remaining
* number of pages after the last call to `backup.step`
* (-1 if `step` not yet called).
* - `backup.pageCount` is an integer with the total number
* of pages measured during the last call to `backup.step`
* (-1 if `step` not yet called).
*
* There is the following writable property:
*
* - `backup.retryErrors`: an array of sqlite3 error codes
* that are treated as non-fatal - meaning, if they occur,
* backup.failed is not set, and the backup may continue.
* By default, this is `[sqlite3.BUSY, sqlite3.LOCKED]`.
*
* The `db.backup(filename, [callback])` shorthand is sufficient
* for making a backup of a database opened by node-sqlite3. If
* using attached or temporary databases, or moving data in the
* opposite direction, the more complete (but daunting)
* `db.backup(filename, destDbName, sourceDbName, filenameIsDest, [callback])`
* signature is provided.
*
* A backup will finish automatically when it succeeds or a fatal
* error occurs, meaning it is not necessary to call `db.finish()`.
* By default, SQLITE_LOCKED and SQLITE_BUSY errors are not
* treated as failures, and the backup will continue if they
* occur. The set of errors that are tolerated can be controlled
* by setting `backup.retryErrors`. To disable automatic
* finishing and stick strictly to sqlite's raw api, set
* `backup.retryErrors` to `[]`. In that case, it is necessary
* to call `backup.finish()`.
*
* In the same way as node-sqlite3 databases and statements,
* backup methods can be called safely without callbacks, due
* to an internal call queue. So for example this naive code
* will correctly back up a db, if there are no errors:
*
* var backup = db.backup('backup.db');
* backup.step(-1);
* backup.finish();
*
*/
class Backup : public Napi::ObjectWrap<Backup> {
public:
static Napi::Object Init(Napi::Env env, Napi::Object exports);
// Cross-class argument validation, against this env's constructor —
// see Database::HasInstanceIn.
static inline bool HasInstance(Napi::Value val) {
return Database::HasInstanceIn(val,
&Database::AddonData::backup_ctor);
}
struct Baton {
napi_async_work request = NULL;
Backup* backup;
Napi::FunctionReference callback;
Baton(Backup* backup_, Napi::Function cb_) : backup(backup_) {
backup->Ref();
callback.Reset(cb_, 1);
}
virtual ~Baton() {
if (request) napi_delete_async_work(backup->Env(), request);
backup->Unref();
callback.Reset();
}
};
struct InitializeBaton : Database::Baton {
Backup* backup;
std::string filename;
std::string sourceName;
std::string destName;
bool filenameIsDest;
InitializeBaton(Database* db_, Napi::Function cb_, Backup* backup_) :
Baton(db_, cb_), backup(backup_), filenameIsDest(true) {
backup->Ref();
}
virtual ~InitializeBaton() override {
backup->Unref();
if (db->IsClosed()) {
// The database handle was closed before the backup could be opened.
backup->FinishAll();
}
}
};
struct StepBaton : Baton {
int pages;
std::set<int> retryErrorsSet;
StepBaton(Backup* backup_, Napi::Function cb_, int pages_) :
Baton(backup_, cb_), pages(pages_) {}
virtual ~StepBaton() override = default;
};
typedef void (*Work_Callback)(Baton* baton);
struct Call {
Call(Work_Callback cb_, Baton* baton_) : callback(cb_), baton(baton_) {};
Work_Callback callback;
Baton* baton;
};
Backup(const Napi::CallbackInfo& info);
~Backup() {
if (!finished) {
FinishAll();
}
retryErrors.Reset();
}
WORK_DEFINITION(Step)
WORK_DEFINITION(Finish)
// End-of-call bookkeeping for an asynchronous backup operation.
void EndCall();
// Runs EndCall() on every exit path from a Work_After* handler.
// TRY_CATCH_CALL returns early when a JS callback throws, so doing the
// bookkeeping inline (the old trailing BACKUP_END() macro) was skipped
// on that path — leaving `locked` set and db->pending elevated forever.
// A leaked pending count permanently disables the connection's sync
// fast path and blocks every exclusive operation (close/exec/wait/
// loadExtension all assert pending == 0). Mirrors
// Statement::CallGuard.
struct CallGuard {
Backup* backup;
explicit CallGuard(Backup* b) : backup(b) {}
~CallGuard() { backup->EndCall(); }
CallGuard(const CallGuard&) = delete;
CallGuard& operator=(const CallGuard&) = delete;
};
Napi::Value IdleGetter(const Napi::CallbackInfo& info);
Napi::Value CompletedGetter(const Napi::CallbackInfo& info);
Napi::Value FailedGetter(const Napi::CallbackInfo& info);
Napi::Value PageCountGetter(const Napi::CallbackInfo& info);
Napi::Value RemainingGetter(const Napi::CallbackInfo& info);
Napi::Value RetryErrorGetter(const Napi::CallbackInfo& info);
void RetryErrorSetter(const Napi::CallbackInfo& info, const Napi::Value& value);
protected:
static void Work_BeginInitialize(Database::Baton* baton);
static void Work_Initialize(napi_env env, void* data);
static void Work_AfterInitialize(napi_env env, napi_status status, void* data);
void Schedule(Work_Callback callback, Baton* baton);
void Process();
void CleanQueue();
template <class T> static void Error(T* baton);
void FinishAll();
void FinishSqlite();
void GetRetryErrors(std::set<int>& retryErrorsSet);
// NULL when the constructor threw before validation completed; every
// destructor path gates on it.
Database* db = NULL;
sqlite3_backup* _handle = NULL;
sqlite3* _otherDb = NULL;
sqlite3* _destDb = NULL;
bool inited = false;
bool locked = true;
bool completed = false;
bool failed = false;
int remaining = -1;
int pageCount = -1;
bool finished = false;
int status;
std::string message;
std::queue<std::unique_ptr<Call>> queue;
Napi::Reference<Array> retryErrors;
};
}
#endif
@@ -0,0 +1,207 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ArrowFunctionExpression = ArrowFunctionExpression;
exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
exports._functionHead = _functionHead;
exports._methodHead = _methodHead;
exports._param = _param;
exports._parameters = _parameters;
exports._params = _params;
exports._predicate = _predicate;
exports._shouldPrintArrowParamsParens = _shouldPrintArrowParamsParens;
var _t = require("@babel/types");
var _index = require("../node/index.js");
const {
isIdentifier
} = _t;
function _params(node, noLineTerminator, idNode, parentNode) {
this.print(node.typeParameters);
if (idNode !== undefined || parentNode !== undefined) {
const nameInfo = _getFuncIdName.call(this, idNode, parentNode);
if (nameInfo) {
this.sourceIdentifierName(nameInfo.name, nameInfo.pos);
}
}
this.tokenChar(40);
_parameters.call(this, node.params, 41);
this.print(node.returnType, noLineTerminator);
this._noLineTerminator = noLineTerminator;
}
function _parameters(parameters, endToken) {
const oldNoLineTerminatorAfterNode = this.enterDelimited();
const trailingComma = this.shouldPrintTrailingComma(endToken);
const paramLength = parameters.length;
for (let i = 0; i < paramLength; i++) {
_param.call(this, parameters[i]);
if (trailingComma || i < paramLength - 1) {
this.tokenChar(44, i);
this.space();
}
}
this.tokenChar(endToken);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
}
function _param(parameter) {
this.printJoin(parameter.decorators, undefined, undefined, undefined, undefined, true);
this.print(parameter, undefined, true);
if (parameter.optional) {
this.tokenChar(63);
}
this.print(parameter.typeAnnotation, undefined, true);
}
function _methodHead(node) {
const kind = node.kind;
const key = node.key;
if (kind === "get" || kind === "set") {
this.word(kind);
this.space();
}
if (node.async) {
this.word("async", true);
this.space();
}
if (kind === "method" || kind === "init") {
if (node.generator) {
this.tokenChar(42);
}
}
if (node.computed) {
this.tokenChar(91);
this.print(key);
this.tokenChar(93);
} else {
this.print(key);
}
if (node.optional) {
this.tokenChar(63);
}
if (this._buf._map) {
_params.call(this, node, false, node.computed && node.key.type !== "StringLiteral" ? undefined : node.key);
} else {
_params.call(this, node, false);
}
}
function _predicate(node, noLineTerminatorAfter) {
if (node.predicate) {
if (!node.returnType) {
this.tokenChar(58);
}
this.space();
this.print(node.predicate, noLineTerminatorAfter);
}
}
function _functionHead(node, parent, hasPredicate) {
if (node.async) {
this.word("async");
if (!this.format.preserveFormat) {
this._innerCommentsState = 0;
}
this.space();
}
this.word("function");
if (node.generator) {
if (!this.format.preserveFormat) {
this._innerCommentsState = 0;
}
this.tokenChar(42);
}
this.space();
if (node.id) {
this.print(node.id);
}
if (this._buf._map) {
_params.call(this, node, false, node.id, parent);
} else {
_params.call(this, node, false);
}
if (hasPredicate) {
_predicate.call(this, node);
}
}
function FunctionExpression(node, parent) {
_functionHead.call(this, node, parent, true);
this.space();
this.print(node.body);
}
function ArrowFunctionExpression(node, parent) {
if (node.async) {
this.word("async", true);
this.space();
}
if (_shouldPrintArrowParamsParens.call(this, node)) {
_params.call(this, node, true, undefined, this._buf._map ? parent : undefined);
} else {
this.print(node.params[0], true);
}
_predicate.call(this, node, true);
this.space();
this.printInnerComments();
this.token("=>");
this.space();
this.tokenContext |= _index.TokenContext.arrowBody;
this.print(node.body);
}
function _shouldPrintArrowParamsParens(node) {
var _firstParam$leadingCo, _firstParam$trailingC;
if (node.params.length !== 1) return true;
if (node.typeParameters || node.returnType || node.predicate) {
return true;
}
const firstParam = node.params[0];
if (!isIdentifier(firstParam) || firstParam.typeAnnotation || firstParam.optional || (_firstParam$leadingCo = firstParam.leadingComments) != null && _firstParam$leadingCo.length || (_firstParam$trailingC = firstParam.trailingComments) != null && _firstParam$trailingC.length) {
return true;
}
if (this.tokenMap) {
if (node.loc == null) return true;
if (this.tokenMap.findMatching(node, "(") !== null) return true;
const arrowToken = this.tokenMap.findMatching(node, "=>");
if ((arrowToken == null ? void 0 : arrowToken.loc) == null) return true;
return arrowToken.loc.start.line !== node.loc.start.line;
}
if (this.format.retainLines) return true;
return false;
}
function _getFuncIdName(idNode, parent) {
let id = idNode;
if (!id && parent) {
const parentType = parent.type;
if (parentType === "VariableDeclarator") {
id = parent.id;
} else if (parentType === "AssignmentExpression" || parentType === "AssignmentPattern") {
id = parent.left;
} else if (parentType === "ObjectProperty" || parentType === "ClassProperty") {
if (!parent.computed || parent.key.type === "StringLiteral") {
id = parent.key;
}
} else if (parentType === "ClassPrivateProperty" || parentType === "ClassAccessorProperty") {
id = parent.key;
}
}
if (!id) return;
let nameInfo;
if (id.type === "Identifier") {
var _id$loc, _id$loc2;
nameInfo = {
pos: (_id$loc = id.loc) == null ? void 0 : _id$loc.start,
name: ((_id$loc2 = id.loc) == null ? void 0 : _id$loc2.identifierName) || id.name
};
} else if (id.type === "PrivateName") {
var _id$loc3;
nameInfo = {
pos: (_id$loc3 = id.loc) == null ? void 0 : _id$loc3.start,
name: "#" + id.id.name
};
} else if (id.type === "StringLiteral") {
var _id$loc4;
nameInfo = {
pos: (_id$loc4 = id.loc) == null ? void 0 : _id$loc4.start,
name: id.value
};
}
return nameInfo;
}
//# sourceMappingURL=methods.js.map
@@ -0,0 +1,4 @@
import * as z from "./external.cjs";
export * from "./external.cjs";
export { z };
export default z;
@@ -0,0 +1 @@
{"version":3,"file":"_u64.js","sourceRoot":"","sources":["src/_u64.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;AACvD,MAAM,IAAI,GAAG,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAExC,iGAAiG;AACjG,uEAAuE;AACvE,SAAS,OAAO,CACd,CAAS,EACT,EAAE,GAAG,KAAK;IAKV,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC;IAClF,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,UAAU,C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C,CAAC,GAAG,CAAC,CAAC;AAEvD,kBAAkB;AAClB,OAAO,EACL,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EACrK,CAAC;AACF,kEAAkE;Line truncated
@@ -0,0 +1,18 @@
/**
* This is the Posix implementation of isexe, which uses the file
* mode and uid/gid values.
*
* @module
*/
import { IsexeOptions } from './options.js';
/**
* Determine whether a path is executable according to the mode and
* current (or specified) user and group IDs.
*/
export declare const isexe: (path: string, options?: IsexeOptions) => Promise<boolean>;
/**
* Synchronously determine whether a path is executable according to
* the mode and current (or specified) user and group IDs.
*/
export declare const sync: (path: string, options?: IsexeOptions) => boolean;
//# sourceMappingURL=posix.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"link.js","names":[],"sources":["../../src/link.ts"],"sourcesContent":["import type { HistoryState, ParsedHistoryState } from '@tanstack/history'\nimport type {\n AllParams,\n CatchAllPaths,\n CurrentPath,\n FullSearchSchema,\n FullSearchSchemaInput,\n ParentPath,\n RouteByPath,\n RouteByToPath,\n RoutePaths,\n RouteToPath,\n ToPath,\n} from './routeInfo'\nimport type {\n AnyRouter,\n RegisteredRouter,\n ViewTransitionOptions,\n} from './router'\nimport type {\n ConstrainLiteral,\n Expand,\n MakeDifferenceOptional,\n NoInfer,\n NonNullableUpdater,\n Updater,\n} from './utils'\nimport type { ParsedLocation } from './location'\n\nexport type IsRequiredParams<TParams> =\n Record<never, never> extends TParams ? never : true\n\nexport interface ParsePathParamsResult<\n in out TRequired,\n in out TOptional,\n in out TRest,\n> {\n required: TRequired\n optional: TOptional\n rest: TRest\n}\n\nexport type AnyParsePathParamsResult = ParsePathParamsResult<\n string,\n string,\n string\n>\n\nexport type ParsePathParamsBoundaryStart<T extends string> =\n T extends `${infer TLeft}{-${infer TRight}`\n ? ParsePathParamsResult<\n ParsePathParams<TLeft>['required'],\n | ParsePathParams<TLeft>['optional']\n | ParsePathParams<TRight>['required']\n | ParsePathParams<TRight>['optional'],\n ParsePathParams<TRight>['rest']\n >\n : T extends `${infer TLeft}{${infer TRight}`\n ? ParsePathParamsResult<\n | ParsePathParams<TLeft>['required']\n | ParsePathParams<TRight>['required'],\n | ParsePathParams<TLeft>['optional']\n | ParsePathParams<TRight>['optional'],\n ParsePathParams<TRight>['rest']\n >\n : never\n\nexport type ParsePathParamsSymbol<T extends string> =\n T extends `${string}$${infer TRight}`\n ? TRight extends `${string}/${string}`\n ? TRight extends `${infer TParam}/${infer TRest}`\n ? TParam extends ''\n ? ParsePathParamsResult<\n ParsePathParams<TRest>['required'],\n '_splat' | ParsePathParams<TRest>['optional'],\n ParsePathParams<TRest>['rest']\n >\n : ParsePathParamsResult<\n TParam | ParsePathParams<TRest>['required'],\n ParsePathParams<TRest>['optional'],\n ParsePathParams<TRest>['rest']\n >\n : never\n : TRight extends ''\n ? ParsePathParamsResult<never, '_splat', never>\n : ParsePathParamsResult<TRight, never, never>\n : never\n\nexport type ParsePathParamsBoundaryEnd<T extends string> =\n T extends `${infer TLeft}}${infer TRight}`\n ? ParsePathParamsResult<\n | ParsePathParams<TLeft>['required']\n | ParsePathParams<TRight>['required'],\n | ParsePathParams<TLeft>['optional']\n | ParsePathParams<TRight>['optional'],\n ParsePathParams<TRight>['rest']\n >\n : never\n\nexport type ParsePathParamsEscapeStart<T extends string> =\n T extends `${infer TLeft}[${infer TRight}`\n ? ParsePathParamsResult<\n | ParsePathParams<TLeft>['required']\n | ParsePathParams<TRight>['required'],\n | ParsePathParams<TLeft>['optional']\n | ParsePathParams<TRight>['optional'],\n ParsePathParams<TRight>['rest']\n >\n : never\n\nexport type ParsePathParamsEscapeEnd<T extends string> =\n T extends `${string}]${infer TRight}` ? ParsePathParams<TRight> : never\n\nexport type ParsePathParams<T extends string> = T extends `${string}[${string}`\n ? ParsePathParamsEscapeStart<T>\n : T extends `${string}]${string}`\n ? ParsePathParamsEscapeEnd<T>\n : T extends `${string}}${string}`\n ? ParsePathParamsBoundaryEnd<T>\n : T extends `${string}{${string}`\n ? ParsePathParamsBoundaryStart<T>\n : T extends `${string}$${string}`\n ? ParsePathParamsSymbol<T>\n : never\n\nexport type AddTrailingSlash<T> = T extends `${string}/` ? T : `${T & string}/`\n\nexport type RemoveTrailingSlashes<T> = T & `${string}/` extends never\n ? T\n : T extends `${infer R}/`\n ? R\n : T\n\nexport type AddLeadingSlash<T> = T & `/${string}` extends never\n ? `/${T & string}`\n : T\n\nexport type RemoveLeadingSlashes<T> = T & `/${string}` extends never\n ? T\n : T extends `/${infer R}`\n ? R\n : T\n\ntype JoinPath<TLeft extends string, TRight extends string> = TRight extends ''\n ? TLeft\n : TLeft extends ''\n ? TRight\n : `${RemoveTrailingSlashes<TLeft>}/${RemoveLeadingSlashes<TRight>}`\n\ntype RemoveLastSegment<\n T extends string,\n TAcc extends string = '',\n> = T extends `${infer TSegment}/${infer TRest}`\n ? TRest & `${string}/${string}` extends never\n ? TRest extends ''\n ? TAcc\n : `${TAcc}${TSegment}`\n : RemoveLastSegment<TRest, `${TAcc}${TSegment}/`>\n : TAcc\n\nexport type ResolveCurrentPath<\n TFrom extends string,\n TTo extends string,\n> = TTo extends '.'\n ? TLine truncated
@@ -0,0 +1,108 @@
[![npm](https://img.shields.io/npm/v/json-schema-typed.svg?style=flat-square)](https://npmjs.org/package/json-schema-typed)
[![downloads-per-month](https://img.shields.io/npm/dm/json-schema-typed.svg?style=flat-square&label=npm%20downloads)](https://npmjs.org/package/json-schema-typed)
[![License](https://img.shields.io/badge/license-BSD--2--Clause-blue.svg?style=flat-square)][license]
# JSON Schema Typed
JSON Schema TypeScript definitions with complete inline documentation.
**NOTE:** This library only supports defining schemas. You will need a separate
library for data validation.
There are 3 JSON Schema drafts included in this package:
- `draft-07`
- `draft-2019-09`
- `draft-2020-12`
## Install
```sh
npm install json-schema-typed
```
## Usage
1. Chose which draft you'd like to import.
- The main package export points to the latest supported stable draft, currently
`draft-2020-12`. Future releases that point the main package export to a new
draft will always incur a bump to the major semantic version.
```ts
import { type JSONSchema } from "json-schema-typed";
```
- Or you can specify the exact draft you need.
```ts
import { type JSONSchema } from "json-schema-typed/draft-2020-12";
```
2. Define a schema
```ts
import { Format, type JSONSchema } from "json-schema-typed";
const schema: JSONSchema = {
properties: {
email: {
format: Format.Email,
type: "string",
},
},
type: "object",
};
// The JSONSchema namespace also provides type-specific narrowed interfaces
const stringSchema: JSONSchema.String = {
// Only { type: "string" } and common keywords are allowed
maxLength: 100,
type: "string",
};
```
## Upgrading
Version `8.0.0` has breaking changes from the previous release.
- Now a
[pure ESM package](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
- Many exports were renamed. The table below reflects the new export names.
These are considered final and unlikely to change in future releases.
- The `JSONSchema` type was changed from an `interface` to a `type` which is a
mixed union that allows `boolean` values in order to properly align with the
JSON Schema spec. If you were previously extending the `JSONSchema` interface,
you can access the `interface` directly with `JSONSchema.Interface`.
- The previous main package export pointed to Draft 7. Import it directly if you
need to continue using it:
```ts
import { type JSONSchema } from "json-schema-typed/draft-07";
```
## Exports supported in each draft module
| Name | Type | Purpose |
| ----------------- | --------------- | ------------------------------------------------------------------ |
| `$schema` | `string` | Draft meta schema URL that can be used with the `$schema` keyword. |
| `ContentEncoding` | Enum object | String content encoding strategies. |
| `draft` | `string` | Draft version. |
| `Format` | Enum object | String formats. |
| `JSONSchema` | TypeScript Type | Used to define a JSON Schema. |
| `keywords` | `string[]` | All the keywords for the imported draft. |
| `TypeName` | Enum object | Simple type names for the `type` keyword. |
## Versioning
This library follows [semantic versioning](https://semver.org).
---
## Maintainers
- [Remy Rylan](https://github.com/RemyRylan)
## License
[BSD-2-Clause][license]
[license]: https://github.com/RemyRylan/json-schema-typed/blob/main/dist/node/LICENSE.md
@@ -0,0 +1 @@
{"version":3,"file":"iteration-cw.js","sources":["../../../src/icons/iteration-cw.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name IterationCw\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxMGMwLTQuNCAzLjYtOCA4LThzOCAzLjYgOCA4LTMuNiA4LTggOEg0IiAvPgogIDxwb2x5bGluZSBwb2ludHM9IjggMjIgNCAxOCA4IDE0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/iteration-cw\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 IterationCw = createLucideIcon('IterationCw', [\n ['path', { d: 'M4 10c0-4.4 3.6-8 8-8s8 3.6 8 8-3.6 8-8 8H4', key: 'tuf4su' }],\n ['polyline', { points: '8 22 4 18 8 14', key: 'evkj9s' }],\n]);\n\nexport default IterationCw;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC5E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,97 @@
import { createRequire } from 'node:module';
import { performance } from 'node:perf_hooks';
import timers from 'node:timers';
import timersPromises from 'node:timers/promises';
import util from 'node:util';
import { startTests, collectTests } from '@vitest/runner';
import { KNOWN_ASSET_TYPES } from '@vitest/utils/constants';
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment, d as detectAsyncLeaks } from '../chunks/index.DXx9Dtk7.js';
import { s as setupCommonEnv, b as startCoverageInsideWorker, c as stopCoverageInsideWorker } from '../chunks/setup-common.DYx3LtFI.js';
import { i as index } from '../chunks/index.DdgEv5B1.js';
import { c as closeInspector } from '../chunks/inspector.CvyFGlXm.js';
import { g as getWorkerState } from '../chunks/utils.BX5Fg8C4.js';
import { g as globalExpect } from '../chunks/test.DNmyFkvJ.js';
import '@vitest/expect';
import 'node:async_hooks';
import '../chunks/rpc.MzXet3jl.js';
import '@vitest/utils/timers';
import '../chunks/index.Chj8NDwU.js';
import '../chunks/coverage.CTzCuANN.js';
import '@vitest/snapshot';
import '../chunks/benchmark.CX_oY03V.js';
import '@vitest/runner/utils';
import '@vitest/utils/helpers';
import '../chunks/evaluatedModules.Dg1zASAC.js';
import 'pathe';
import 'vite/module-runner';
import 'expect-type';
import 'node:url';
import '@vitest/utils/error';
import '@vitest/spy';
import '@vitest/utils/offset';
import '@vitest/utils/source-map';
import '../chunks/_commonjsHelpers.D26ty3Ew.js';
async function run(method, files, config, moduleRunner, traces) {
const workerState = getWorkerState();
await traces.$("vitest.runtime.global_env", () => setupCommonEnv(config));
Object.defineProperty(globalThis, "__vitest_index__", {
value: index,
enumerable: false
});
const viteEnvironment = workerState.environment.viteEnvironment || workerState.environment.name;
globalExpect.setState({ environment: workerState.environment.name });
if (viteEnvironment === "client") {
const _require = createRequire(import.meta.url);
// always mock "required" `css` files, because we cannot process them
_require.extensions[".css"] = resolveCss;
_require.extensions[".scss"] = resolveCss;
_require.extensions[".sass"] = resolveCss;
_require.extensions[".less"] = resolveCss;
// since we are using Vite, we can assume how these will be resolved
KNOWN_ASSET_TYPES.forEach((type) => {
_require.extensions[`.${type}`] = resolveAsset;
});
process.env.SSR = "";
} else process.env.SSR = "1";
// @ts-expect-error not typed global for patched timers
globalThis.__vitest_required__ = {
util,
timers,
timersPromises
};
await traces.$("vitest.runtime.coverage.start", () => startCoverageInsideWorker(config.coverage, moduleRunner, { isolate: false }));
if (config.chaiConfig) setupChaiConfig(config.chaiConfig);
const [testRunner, snapshotEnvironment] = await Promise.all([traces.$("vitest.runtime.runner", () => resolveTestRunner(config, moduleRunner, traces)), traces.$("vitest.runtime.snapshot.environment", () => resolveSnapshotEnvironment(config, moduleRunner))]);
config.snapshotOptions.snapshotEnvironment = snapshotEnvironment;
workerState.onCancel((reason) => {
closeInspector(config);
testRunner.cancel?.(reason);
});
workerState.durations.prepare = performance.now() - workerState.durations.prepare;
const { vi } = index;
await traces.$(`vitest.test.runner.${method}`, async () => {
for (const file of files) {
workerState.filepath = file.filepath;
if (method === "run") {
const collectAsyncLeaks = config.detectAsyncLeaks ? detectAsyncLeaks(file.filepath, workerState.ctx.projectName) : void 0;
await traces.$(`vitest.test.runner.${method}.module`, { attributes: { "code.file.path": file.filepath } }, () => startTests([file], testRunner));
const leaks = await collectAsyncLeaks?.();
if (leaks?.length) workerState.rpc.onAsyncLeaks(leaks);
} else await traces.$(`vitest.test.runner.${method}.module`, { attributes: { "code.file.path": file.filepath } }, () => collectTests([file], testRunner));
// reset after tests, because user might call `vi.setConfig` in setupFile
vi.resetConfig();
// mocks should not affect different files
vi.restoreAllMocks();
}
});
await traces.$("vitest.runtime.coverage.stop", () => stopCoverageInsideWorker(config.coverage, moduleRunner, { isolate: false }));
}
function resolveCss(mod) {
mod.exports = "";
}
function resolveAsset(mod, url) {
mod.exports = url;
}
export { run };
@@ -0,0 +1,167 @@
var getDefaultParent = function (originalTarget) {
if (typeof document === 'undefined') {
return null;
}
var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
return sampleTarget.ownerDocument.body;
};
var counterMap = new WeakMap();
var uncontrolledNodes = new WeakMap();
var markerMap = {};
var lockCount = 0;
var unwrapHost = function (node) {
return node && (node.host || unwrapHost(node.parentNode));
};
var correctTargets = function (parent, targets) {
return targets
.map(function (target) {
if (parent.contains(target)) {
return target;
}
var correctedTarget = unwrapHost(target);
if (correctedTarget && parent.contains(correctedTarget)) {
return correctedTarget;
}
console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');
return null;
})
.filter(function (x) { return Boolean(x); });
};
/**
* Marks everything except given node(or nodes) as aria-hidden
* @param {Element | Element[]} originalTarget - elements to keep on the page
* @param [parentNode] - top element, defaults to document.body
* @param {String} [markerName] - a special attribute to mark every node
* @param {String} [controlAttribute] - html Attribute to control
* @return {Undo} undo command
*/
var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {
var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
if (!markerMap[markerName]) {
markerMap[markerName] = new WeakMap();
}
var markerCounter = markerMap[markerName];
var hiddenNodes = [];
var elementsToKeep = new Set();
var elementsToStop = new Set(targets);
var keep = function (el) {
if (!el || elementsToKeep.has(el)) {
return;
}
elementsToKeep.add(el);
keep(el.parentNode);
};
targets.forEach(keep);
var deep = function (parent) {
if (!parent || elementsToStop.has(parent)) {
return;
}
Array.prototype.forEach.call(parent.children, function (node) {
if (elementsToKeep.has(node)) {
deep(node);
}
else {
try {
var attr = node.getAttribute(controlAttribute);
var alreadyHidden = attr !== null && attr !== 'false';
var counterValue = (counterMap.get(node) || 0) + 1;
var markerValue = (markerCounter.get(node) || 0) + 1;
counterMap.set(node, counterValue);
markerCounter.set(node, markerValue);
hiddenNodes.push(node);
if (counterValue === 1 && alreadyHidden) {
uncontrolledNodes.set(node, true);
}
if (markerValue === 1) {
node.setAttribute(markerName, 'true');
}
if (!alreadyHidden) {
node.setAttribute(controlAttribute, 'true');
}
}
catch (e) {
console.error('aria-hidden: cannot operate on ', node, e);
}
}
});
};
deep(parentNode);
elementsToKeep.clear();
lockCount++;
return function () {
hiddenNodes.forEach(function (node) {
var counterValue = counterMap.get(node) - 1;
var markerValue = markerCounter.get(node) - 1;
counterMap.set(node, counterValue);
markerCounter.set(node, markerValue);
if (!counterValue) {
if (!uncontrolledNodes.has(node)) {
node.removeAttribute(controlAttribute);
}
uncontrolledNodes.delete(node);
}
if (!markerValue) {
node.removeAttribute(markerName);
}
});
lockCount--;
if (!lockCount) {
// clear
counterMap = new WeakMap();
counterMap = new WeakMap();
uncontrolledNodes = new WeakMap();
markerMap = {};
}
};
};
/**
* Marks everything except given node(or nodes) as aria-hidden
* @param {Element | Element[]} originalTarget - elements to keep on the page
* @param [parentNode] - top element, defaults to document.body
* @param {String} [markerName] - a special attribute to mark every node
* @return {Undo} undo command
*/
export var hideOthers = function (originalTarget, parentNode, markerName) {
if (markerName === void 0) { markerName = 'data-aria-hidden'; }
var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
var activeParentNode = parentNode || getDefaultParent(originalTarget);
if (!activeParentNode) {
return function () { return null; };
}
// we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10
// and script elements, as they have no impact on accessibility.
targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));
return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
};
/**
* Marks everything except given node(or nodes) as inert
* @param {Element | Element[]} originalTarget - elements to keep on the page
* @param [parentNode] - top element, defaults to document.body
* @param {String} [markerName] - a special attribute to mark every node
* @return {Undo} undo command
*/
export var inertOthers = function (originalTarget, parentNode, markerName) {
if (markerName === void 0) { markerName = 'data-inert-ed'; }
var activeParentNode = parentNode || getDefaultParent(originalTarget);
if (!activeParentNode) {
return function () { return null; };
}
return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');
};
/**
* @returns if current browser supports inert
*/
export var supportsInert = function () {
return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');
};
/**
* Automatic function to "suppress" DOM elements - _hide_ or _inert_ in the best possible way
* @param {Element | Element[]} originalTarget - elements to keep on the page
* @param [parentNode] - top element, defaults to document.body
* @param {String} [markerName] - a special attribute to mark every node
* @return {Undo} undo command
*/
export var suppressOthers = function (originalTarget, parentNode, markerName) {
if (markerName === void 0) { markerName = 'data-suppressed'; }
return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);
};
@@ -0,0 +1 @@
{"version":3,"file":"panel-left-close.js","sources":["../../../src/icons/panel-left-close.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PanelLeftClose\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik05IDN2MTgiIC8+CiAgPHBhdGggZD0ibTE2IDE1LTMtMyAzLTMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/panel-left-close\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 PanelLeftClose = createLucideIcon('PanelLeftClose', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M9 3v18', key: 'fh3hqa' }],\n ['path', { d: 'm16 15-3-3 3-3', key: '14y99z' }],\n]);\n\nexport default PanelLeftClose;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,886 @@
export default `flf2a$ 5 4 10 62 8
This font is (c) Michel Eftimakis 1995 -- Version 2.0 -- 27 jan 1995
____________________________________________________________ /\`____
| Michel Eftimakis | "Ascii-Artist" '\\/ |
| Michel.Eftimakis@ustc.vlsi.com | Boo)- (00) ||
| Tel : (33) 92 96 27 19 | (_\`'_) ||
|__ Fax : (33) 92 96 27 01 _________|____ FRANCE ___________ _!!_ ____||
|_____________________________________________________________________|
$@
$@
$@
$@
$@@
||@
L|@
@
()@
@@
@
[][]@
$ @
$ @
@@
@
_||_||_@
|| || @
-L|-L|-@
@@
|L @
/ _|@
\\_ \\@
|__/@
L| @@
@
()/7@
// @
//()@
@@
_ @
(o) @
/oV7@
\\_n\\@
@@
_@
//@
$@
$@
@@
_@
//@
||$@
||$@
\\\\@@
_ @
\\\\ @
$||@
$||@
// @@
. ,@
x @
' \`@
$ @
@@
@
_||_ @
|_ _|@
L| @
@@
@
@
@
()$@
V @@
@
@
__ @
|__|@
@@
@
@
@
()$@
@@
_@
//@
// @
// @
@@
_ @
/ \\ @
| 0 |@
\\_/ @
@@
_ @
/o|@
$||@
$L|@
@@
__ @
[o )@
/( @
/__|@
@@
___@
|_ /@
__)\\@
\\__/@
@@
. @
/| @
/o| @
L___|@
@@
__ @
| _/@
\\_ \\@
|__/@
@@
_ @
// @
/o \\@
\\__/@
@@
____@
|__ /@
// @
// @
@@
__ @
(o )@
/o \\@
\\__/@
@@
__ @
/o \\@
\\_ /@
// @
@@
@
@
()@
()@
@@
@
@
()@
()@
V @@
_@
//@
<<$@
\\\\@
@@
@
___ @
|___|@
|___|@
@@
_ @
\\\\ @
$>>@
// @
@@
__ @
|o )@
// @
$ @
() @@
__ @
/_ \\@
((o_/@
$\\__7@
@@
_ @
/ \\ @
| o |@
|_n_|@
@@
___ @
| o )@
| o \\@
|___/@
@@
__ @
/ _|@
( (_ @
\\__|@
@@
__ @
| \\ @
| o )@
|__/ @
@@
___ @
| __|@
| _| @
|___|@
@@
___ @
| __|@
| _| @
|_| @
@@
__ @
/ _|@
( |_n@
\\__/@
@@
_ _ @
| U |@
| |@
|_n_|@
@@
_ @
| |@
| |@
|_|@
@@
_ @
| |@
n_| |@
\\__/ @
@@
_ _@
| |//@
| ( @
|_|\\\\@
@@
_ @
| | @
| |_ @
|___|@
@@
_ _ @
| \\_/ |@
| \\_/ |@
|_| |_|@
@@
_ _ @
| \\| |@
| \\\\ |@
|_|\\_|@
@@
_ @
/ \\ @
( o )@
\\_/ @
@@
___ @
| o \\@
| _/@
|_| @
@@
_ @
/ \\ @
( o )@
\\_,7@
@@
___ @
| o \\@
| /@
|_|\\\\@
@@
__ @
/ _|@
\\_ \\@
|__/@
@@
___ @
|_ _|@
| | @
|_| @
@@
_ _ @
| | |@
| U |@
|___|@
@@
_ _ @
| | |@
| V |@
\\_/ @
@@
_ _ _ @
| | | |@
| V V |@
\\_n_/ @
@@
__ __@
\\ V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_V_/@
[___]@
|_| @
@@
166
||@
L|@
@
||@
L|@@
168
@
()()@
$$ @
$$ @
@@
183
_ @
(_)@
$ @
$ @
@@
192
\\\\ @
/ \\ @
| o |@
|_n_|@
@@
193
// @
/ \\ @
| o |@
|_n_|@
@@
194
/^\\ @
/ \\ @
| o |@
|_n_|@
@@
195
/\\/ @
/ \\ @
| o |@
|_n_|@
@@
196
()_()@
/ \\ @
| o |@
|_n_|@
@@
197
(o) @
/ \\ @
| o |@
|_n_|@
@@
198
____ @
/ __|@
| o _| @
|_n___|@
@@
199
__ @
/ _|@
( (_ @
\\__|@
_) @@
200
\\\\_ @
| __|@
| _| @
|___|@
@@
201
//_ @
| __|@
| _| @
|___|@
@@
202
/^\\ @
| __|@
| _| @
|___|@
@@
203
()_()@
| __|@
| _| @
|___|@
@@
204
\\\\@
| |@
| |@
|_|@
@@
205
//@
| |@
| |@
|_|@
@@
206
/^\\@
| |@
| |@
|_|@
@@
207
()_()@
| | @
| | @
|_| @
@@
209
_/\\/ @
| \\| |@
| \\\\ |@
|_|\\_|@
@@
210
\\\\ @
/ \\ @
( o )@
\\_/ @
@@
211
// @
/ \\ @
( o )@
\\_/ @
@@
212
/^\\ @
/ \\ @
( o )@
\\_/ @
@@
213
/\\/ @
/ \\ @
( o )@
\\_/ @
@@
214
()_()@
/ \\ @
( o )@
\\_/ @
@@
217
_\\\\ @
| | |@
| U |@
|___|@
@@
218
//_ @
| | |@
| U |@
|___|@
@@
219
/^\\ @
| | |@
| U |@
|___|@
@@
220
()_()@
| | |@
| U |@
|___|@
@@
223
__ @
|o )@
|o \\@
||_/@
L| @@
224
_ @
\`\` @
/o\\ @
\\_,]@
@@
225
_ @
'' @
/o\\ @
\\_,]@
@@
226
@
^ @
/o\\ @
\\_,]@
@@
227
@
~ @
/o\\ @
\\_,]@
@@
228
@
O_O @
/o\\ @
\\_,]@
@@
229
@
O @
/o\\ @
\\_,]@
@@
230
@
_ _ @
/oYo\\@
\\_,( @
@@
231
@
_@
//@
\\\\@
Z@@
232
_ @
\`\`@
/o\\@
\\( @
@@
233
_@
''@
/o\\@
\\( @
@@
234
@
^ @
/o\\@
\\( @
@@
235
@
O_O@
/o\\@
\\( @
@@
236
_ @
\`\`@
||@
L|@
@@
237
_@
''@
||@
L|@
@@
238
@
'\`@
||@
L|@
@@
239
@
OO@
||@
L|@
@@
241
@
~ @
|/ \\@
L_n|@
@@
242
_ @
\`\`@
/o\\@
\\_/@
@@
243
_@
''@
/o\\@
\\_/@
@@
244
@
^ @
/o\\@
\\_/@
@@
245
@
~ @
/o\\@
\\_/@
@@
246
@
O_O@
/o\\@
\\_/@
@@
249
_ @
\`\`@
|U|@
\\_/@
@@
250
_@
''@
|U|@
\\_/@
@@
251
@
^ @
|U|@
\\_/@
@@
252
@
O O@
|U|@
\\_/@
@@
253
_ @
_'' @
\\ V7@
)/ @
// @@
255
@
_O O@
\\ V7@
)/ @
// @@
`
@@ -0,0 +1 @@
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/metadata.ts"],"names":[],"mappings":";;;;;AAKA,0CAaC;AAlBD,sDAAkD;AAElD,gDAAwB;AACxB,uEAAiE;AAEjE,SAAgB,eAAe,CAAC,QAAwD;IACpF,wEAAwE;IACxE,MAAM,MAAM,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAC;IAEhC,kFAAkF;IAClF,MAAM,CAAC,GAAG,CAAC,IAAA,cAAI,GAAE,CAAC,CAAC;IAEnB,MAAM,CAAC,GAAG,CAAC,IAAA,kCAAc,EAAC,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IAC/C,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACzB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -0,0 +1 @@
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/metadata.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAIxF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,aAAa,GAAG,8BAA8B,GAAG,cAAc,CAaxG"}
@@ -0,0 +1,15 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Navigation2 = createLucideIcon("Navigation2", [
["polygon", { points: "12 2 19 21 12 17 5 21 12 2", key: "x8c0qg" }]
]);
export { Navigation2 as default };
//# sourceMappingURL=navigation-2.js.map
@@ -0,0 +1,213 @@
"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 __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);
// src/index.ts
var src_exports = {};
__export(src_exports, {
loadTsConfig: () => loadTsConfig
});
module.exports = __toCommonJS(src_exports);
var import_path = __toESM(require("path"), 1);
var import_fs = __toESM(require("fs"), 1);
// node_modules/.pnpm/strip-json-comments@5.0.0/node_modules/strip-json-comments/index.js
var singleComment = Symbol("singleComment");
var multiComment = Symbol("multiComment");
var stripWithoutWhitespace = () => "";
var stripWithWhitespace = (string, start, end) => string.slice(start, end).replace(/\S/g, " ");
var isEscaped = (jsonString, quotePosition) => {
let index = quotePosition - 1;
let backslashCount = 0;
while (jsonString[index] === "\\") {
index -= 1;
backslashCount += 1;
}
return Boolean(backslashCount % 2);
};
function stripJsonComments(jsonString, { whitespace = true, trailingCommas = false } = {}) {
if (typeof jsonString !== "string") {
throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof jsonString}\``);
}
const strip = whitespace ? stripWithWhitespace : stripWithoutWhitespace;
let isInsideString = false;
let isInsideComment = false;
let offset = 0;
let buffer = "";
let result = "";
let commaIndex = -1;
for (let index = 0; index < jsonString.length; index++) {
const currentCharacter = jsonString[index];
const nextCharacter = jsonString[index + 1];
if (!isInsideComment && currentCharacter === '"') {
const escaped = isEscaped(jsonString, index);
if (!escaped) {
isInsideString = !isInsideString;
}
}
if (isInsideString) {
continue;
}
if (!isInsideComment && currentCharacter + nextCharacter === "//") {
buffer += jsonString.slice(offset, index);
offset = index;
isInsideComment = singleComment;
index++;
} else if (isInsideComment === singleComment && currentCharacter + nextCharacter === "\r\n") {
index++;
isInsideComment = false;
buffer += strip(jsonString, offset, index);
offset = index;
continue;
} else if (isInsideComment === singleComment && currentCharacter === "\n") {
isInsideComment = false;
buffer += strip(jsonString, offset, index);
offset = index;
} else if (!isInsideComment && currentCharacter + nextCharacter === "/*") {
buffer += jsonString.slice(offset, index);
offset = index;
isInsideComment = multiComment;
index++;
continue;
} else if (isInsideComment === multiComment && currentCharacter + nextCharacter === "*/") {
index++;
isInsideComment = false;
buffer += strip(jsonString, offset, index + 1);
offset = index + 1;
continue;
} else if (trailingCommas && !isInsideComment) {
if (commaIndex !== -1) {
if (currentCharacter === "}" || currentCharacter === "]") {
buffer += jsonString.slice(offset, index);
result += strip(buffer, 0, 1) + buffer.slice(1);
buffer = "";
offset = index;
commaIndex = -1;
} else if (currentCharacter !== " " && currentCharacter !== " " && currentCharacter !== "\r" && currentCharacter !== "\n") {
buffer += jsonString.slice(offset, index);
offset = index;
commaIndex = -1;
}
} else if (currentCharacter === ",") {
result += buffer + jsonString.slice(offset, index);
buffer = "";
offset = index;
commaIndex = index;
}
}
}
return result + buffer + (isInsideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset));
}
// src/utils.ts
function jsoncParse(data) {
try {
return new Function("return " + stripJsonComments(data).trim())();
} catch (_) {
return {};
}
}
// src/index.ts
var req = false ? createRequire(import_meta.url) : require;
var findUp = (name, startDir, stopDir = import_path.default.parse(startDir).root) => {
let dir = startDir;
while (dir !== stopDir) {
const file = import_path.default.join(dir, name);
if (import_fs.default.existsSync(file))
return file;
if (!file.endsWith(".json")) {
const fileWithExt = file + ".json";
if (import_fs.default.existsSync(fileWithExt))
return fileWithExt;
}
dir = import_path.default.dirname(dir);
}
return null;
};
var resolveTsConfigFromFile = (cwd, filename) => {
if (import_path.default.isAbsolute(filename))
return import_fs.default.existsSync(filename) ? filename : null;
return findUp(filename, cwd);
};
var resolveTsConfigFromExtends = (cwd, name) => {
if (import_path.default.isAbsolute(name))
return import_fs.default.existsSync(name) ? name : null;
if (name.startsWith("."))
return findUp(name, cwd);
const id = req.resolve(name, { paths: [cwd] });
return id;
};
var loadTsConfigInternal = (dir = process.cwd(), name = "tsconfig.json", isExtends = false) => {
var _a, _b;
dir = import_path.default.resolve(dir);
const id = isExtends ? resolveTsConfigFromExtends(dir, name) : resolveTsConfigFromFile(dir, name);
if (!id)
return null;
const data = jsoncParse(import_fs.default.readFileSync(id, "utf-8"));
const configDir = import_path.default.dirname(id);
if ((_a = data.compilerOptions) == null ? void 0 : _a.baseUrl) {
data.compilerOptions.baseUrl = import_path.default.join(
configDir,
data.compilerOptions.baseUrl
);
}
let extendsFiles = [];
if (data.extends) {
const extendsList = Array.isArray(data.extends) ? data.extends : [data.extends];
const extendsData = {};
for (const name2 of extendsList) {
const parentConfig = loadTsConfigInternal(configDir, name2, true);
if (parentConfig) {
Object.assign(extendsData, {
...parentConfig == null ? void 0 : parentConfig.data,
compilerOptions: {
...extendsData.compilerOptions,
...(_b = parentConfig == null ? void 0 : parentConfig.data) == null ? void 0 : _b.compilerOptions
}
});
extendsFiles.push(...parentConfig.files);
}
}
Object.assign(data, {
...extendsData,
...data,
compilerOptions: {
...extendsData.compilerOptions,
...data.compilerOptions
}
});
}
delete data.extends;
return { path: id, data, files: [...extendsFiles, id] };
};
var loadTsConfig = (dir, name) => loadTsConfigInternal(dir, name);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
loadTsConfig
});
@@ -0,0 +1,18 @@
/**
* Implement a practical max duration for keyframe generation
* to prevent infinite loops
*/
const maxGeneratorDuration = 20000;
function calcGeneratorDuration(generator) {
let duration = 0;
const timeStep = 50;
let state = generator.next(duration);
while (!state.done && duration < maxGeneratorDuration) {
duration += timeStep;
state = generator.next(duration);
}
return duration >= maxGeneratorDuration ? Infinity : duration;
}
export { calcGeneratorDuration, maxGeneratorDuration };
//# sourceMappingURL=calc-duration.mjs.map
@@ -0,0 +1,31 @@
# Polyfill for `Object.setPrototypeOf`
[![NPM Version](https://img.shields.io/npm/v/setprototypeof.svg)](https://npmjs.org/package/setprototypeof)
[![NPM Downloads](https://img.shields.io/npm/dm/setprototypeof.svg)](https://npmjs.org/package/setprototypeof)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard)
A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8.
## Usage:
```
$ npm install --save setprototypeof
```
```javascript
var setPrototypeOf = require('setprototypeof')
var obj = {}
setPrototypeOf(obj, {
foo: function () {
return 'bar'
}
})
obj.foo() // bar
```
TypeScript is also supported:
```typescript
import setPrototypeOf from 'setprototypeof'
```
@@ -0,0 +1,59 @@
'use strict'
const { addAbortListener } = require('../core/util')
const { RequestAbortedError } = require('../core/errors')
const kListener = Symbol('kListener')
const kSignal = Symbol('kSignal')
function abort (self) {
if (self.abort) {
self.abort(self[kSignal]?.reason)
} else {
self.reason = self[kSignal]?.reason ?? new RequestAbortedError()
}
removeSignal(self)
}
function addSignal (self, signal) {
self.reason = null
self[kSignal] = null
self[kListener] = null
if (!signal) {
return
}
if (signal.aborted) {
abort(self)
return
}
self[kSignal] = signal
self[kListener] = () => {
abort(self)
}
addAbortListener(self[kSignal], self[kListener])
}
function removeSignal (self) {
if (!self[kSignal]) {
return
}
if ('removeEventListener' in self[kSignal]) {
self[kSignal].removeEventListener('abort', self[kListener])
} else {
self[kSignal].removeListener('abort', self[kListener])
}
self[kSignal] = null
self[kListener] = null
}
module.exports = {
addSignal,
removeSignal
}
@@ -0,0 +1,22 @@
'use strict'
const browsers = require('./browsers').browsers
function unpackRegion(packed) {
return Object.keys(packed).reduce((list, browser) => {
let data = packed[browser]
list[browsers[browser]] = Object.keys(data).reduce((memo, key) => {
let stats = data[key]
if (key === '_') {
stats.split(' ').forEach(version => (memo[version] = null))
} else {
memo[key] = stats
}
return memo
}, {})
return list
}, {})
}
module.exports = unpackRegion
module.exports.default = unpackRegion
@@ -0,0 +1,29 @@
'use strict';
var sequenceMatcher = ({
token,
ascending
}) => {
const firstChr = token.charAt(0);
let baseGuesses;
const startingPoints = ['a', 'A', 'z', 'Z', '0', '1', '9'];
// lower guesses for obvious starting points
if (startingPoints.includes(firstChr)) {
baseGuesses = 4;
} else if (/\d/.exec(firstChr)) {
baseGuesses = 10; // digits
} else {
// could give a higher base for uppercase,
// assigning 26 to both upper and lower sequences is more conservative.
baseGuesses = 26;
}
// need to try a descending sequence in addition to every ascending sequence ->
// 2x guesses
if (!ascending) {
baseGuesses *= 2;
}
return baseGuesses * token.length;
};
module.exports = sequenceMatcher;
//# sourceMappingURL=scoring.cjs.map
@@ -0,0 +1,16 @@
/**
* @fileoverview JSON reporter, including rules metadata
* @author Chris Meyer
*/
"use strict";
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
module.exports = function (results, data) {
return JSON.stringify({
results,
metadata: data,
});
};
@@ -0,0 +1 @@
{"version":3,"file":"square-arrow-right.js","sources":["../../../src/icons/square-arrow-right.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareArrowRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik04IDEyaDgiIC8+CiAgPHBhdGggZD0ibTEyIDE2IDQtNC00LTQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/square-arrow-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 SquareArrowRight = createLucideIcon('SquareArrowRight', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M8 12h8', key: '1wcyev' }],\n ['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/defaultAttributes.ts","../../src/Icon.ts","../../src/createLucideIcon.ts","../../src/icons/a-arrow-down.ts","../../src/icons/a-arrow-up.ts","../../src/icons/a-large-small.ts","../../src/icons/accessibility.ts","../../src/icons/activity.ts","../../src/icons/air-vent.ts","../../src/icons/airplay.ts","../../src/icons/alarm-clock-check.ts","../../src/icons/alarm-clock-minus.ts","../../src/icons/alarm-clock-off.ts","../../src/icons/alarm-clock-plus.ts","../../src/icons/alarm-clock.ts","../../src/icons/alarm-smoke.ts","../../src/icons/album.ts","../../src/icons/align-center-horizontal.ts","../../src/icons/align-center-vertical.ts","../../src/icons/align-center.ts","../../src/icons/align-end-horizontal.ts","../../src/icons/align-end-vertical.ts","../../src/icons/align-horizontal-distribute-center.ts","../../src/icons/align-horizontal-distribute-end.ts","../../src/icons/align-horizontal-distribute-start.ts","../../src/icons/align-horizontal-justify-center.ts","../../src/icons/align-horizontal-justify-end.ts","../../src/icons/align-horizontal-justify-start.ts","../../src/icons/align-horizontal-space-around.ts","../../src/icons/align-horizontal-space-between.ts","../../src/icons/align-justify.ts","../../src/icons/align-left.ts","../../src/icons/align-right.ts","../../src/icons/align-start-horizontal.ts","../../src/icons/align-start-vertical.ts","../../src/icons/align-vertical-distribute-center.ts","../../src/icons/align-vertical-distribute-end.ts","../../src/icons/align-vertical-distribute-start.ts","../../src/icons/align-vertical-justify-center.ts","../../src/icons/align-vertical-justify-end.ts","../../src/icons/align-vertical-justify-start.ts","../../src/icons/align-vertical-space-around.ts","../../src/icons/align-vertical-space-between.ts","../../src/icons/ambulance.ts","../../src/icons/ampersand.ts","../../src/icons/ampersands.ts","../../src/icons/amphora.ts","../../src/icons/anchor.ts","../../src/icons/angry.ts","../../src/icons/annoyed.ts","../../src/icons/antenna.ts","../../src/icons/anvil.ts","../../src/icons/aperture.ts","../../src/icons/app-window-mac.ts","../../src/icons/app-window.ts","../../src/icons/apple.ts","../../src/icons/archive-restore.ts","../../src/icons/archive-x.ts","../../src/icons/archive.ts","../../src/icons/armchair.ts","../../src/icons/arrow-big-down-dash.ts","../../src/icons/arrow-big-down.ts","../../src/icons/arrow-big-left-dash.ts","../../src/icons/arrow-big-left.ts","../../src/icons/arrow-big-right-dash.ts","../../src/icons/arrow-big-right.ts","../../src/icons/arrow-big-up-dash.ts","../../src/icons/arrow-big-up.ts","../../src/icons/arrow-down-0-1.ts","../../src/icons/arrow-down-1-0.ts","../../src/icons/arrow-down-a-z.ts","../../src/icons/arrow-down-from-line.ts","../../src/icons/arrow-down-left.ts","../../src/icons/arrow-down-narrow-wide.ts","../../src/icons/arrow-down-right.ts","../../src/icons/arrow-down-to-dot.ts","../../src/icons/arrow-down-to-line.ts","../../src/icons/arrow-down-up.ts","../../src/icons/arrow-down-wide-narrow.ts","../../src/icons/arrow-down-z-a.ts","../../src/icons/arrow-down.ts","../../src/icons/arrow-left-from-line.ts","../../src/icons/arrow-left-right.ts","../../src/icons/arrow-left-to-line.ts","../../src/icons/arrow-left.ts","../../src/icons/arrow-right-from-line.ts","../../src/icons/arrow-right-left.ts","../../src/icons/arrow-right-to-line.ts","../../src/icons/arrow-right.ts","../../src/icons/arrow-up-0-1.ts","../../src/icons/arrow-up-1-0.ts","../../src/icons/arrow-up-a-z.ts","../../src/icons/arrow-up-down.ts","../../src/icons/arrow-up-from-dot.ts","../../src/icons/arrow-up-from-line.ts","../../src/icons/arrow-up-left.ts","../../src/icons/arrow-up-narrow-wide.ts","../../src/icons/arrow-up-right.ts","../../src/icons/arrow-up-to-line.ts","../../src/icons/arrow-up-wide-narrow.ts","../../src/icons/arrow-up-z-a.ts","../../src/icons/arrow-up.ts","../../src/icons/arrows-up-from-line.ts","../../src/icons/asterisk.ts","../../src/icons/at-sign.ts","../../src/icons/atom.ts","../../src/icons/audio-lines.ts","../../src/icons/audio-waveform.ts","../../src/icons/award.ts","../../src/icons/axe.ts","../../src/icons/axis-3d.ts","../../src/icons/baby.ts","../../src/icons/backpack.ts","../../src/icons/badge-alert.ts","../../src/icons/badge-cent.ts","../../src/icons/badge-check.ts","../../src/icons/badge-dollar-sign.ts","../../src/icons/badge-euro.ts","../../src/icons/badge-help.ts","../../src/icons/badge-indian-rupee.ts","../../src/icons/badge-info.ts","../../src/icons/badge-japanese-yen.ts","../../src/icons/badge-minus.ts","../../src/icons/badge-percent.ts","../../src/icons/badge-plus.ts","../../src/icons/badge-pound-sterling.ts","../../src/icons/badge-russian-ruble.ts","../../src/icons/badge-swiss-franc.ts","../../src/icons/badge-x.ts","../../src/icons/badge.ts","../../src/icons/baggage-claim.ts","../../src/icons/ban.ts","../../src/icons/banana.ts","../../src/icons/bandage.ts","../../srLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"hex.mjs","sources":["../../../../../src/value/types/color/hex.ts"],"sourcesContent":["import { RGBA } from \"../types\"\nimport { rgba } from \"./rgba\"\nimport { isColorString } from \"./utils\"\n\nfunction parseHex(v: string): RGBA {\n let r = \"\"\n let g = \"\"\n let b = \"\"\n let a = \"\"\n\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3)\n g = v.substring(3, 5)\n b = v.substring(5, 7)\n a = v.substring(7, 9)\n\n // Or we have 3 characters, ie #F00\n } else {\n r = v.substring(1, 2)\n g = v.substring(2, 3)\n b = v.substring(3, 4)\n a = v.substring(4, 5)\n r += r\n g += g\n b += b\n a += a\n }\n\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n }\n}\n\nexport const hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n}\n"],"names":[],"mappings":";;;AAIA,SAAS,QAAQ,CAAC,CAAS,EAAA;IACvB,IAAI,CAAC,GAAG,EAAE;IACV,IAAI,CAAC,GAAG,EAAE;IACV,IAAI,CAAC,GAAG,EAAE;IACV,IAAI,CAAC,GAAG,EAAE;;AAGV,IAAA,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;QACd,C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