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,23 @@
MIT License
Copyright (c) 2012-2018 Aseem Kishore, and [others].
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
[others]: https://github.com/json5/json5/contributors
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Redo = createLucideIcon("Redo", [
["path", { d: "M21 7v6h-6", key: "3ptur4" }],
["path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7", key: "1kgawr" }]
]);
export { Redo as default };
//# sourceMappingURL=redo.js.map
@@ -0,0 +1,3 @@
# `react-popover`
View docs [here](https://radix-ui.com/primitives/docs/components/popover).
@@ -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 AudioWaveform = createLucideIcon("AudioWaveform", [
[
"path",
{
d: "M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2",
key: "57tc96"
}
]
]);
export { AudioWaveform as default };
//# sourceMappingURL=audio-waveform.js.map
@@ -0,0 +1 @@
{"version":3,"file":"stringify.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["stringify.ts"],"names":[],"mappings":";;;;;AAkBA,oCAKC;AASD,oCAOC;AAUD,0BAMC;AAUD,kCAOC;AAUD,8BAOC;AAzFD,yCAOoB;AACpB,kEAAkE;AAClE,iDAA6C;AAE7C;;;;;;GAMG;AACH,SAAgB,YAAY,CACxB,IAAkC,EAClC,OAA8B;IAE9B,OAAO,IAAA,wBAAU,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CACxB,IAAa,EACb,OAA8B;IAE9B,OAAO,IAAA,wBAAW,EAAC,IAAI,CAAC;QACpB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,EAA3B,CAA2B,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QACnE,CAAC,CAAC,EAAE,CAAC;AACb,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,OAAO,CAAC,IAAyB;IAC7C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3D,IAAI,IAAA,kBAAK,EAAC,IAAI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,mBAAM,EAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC;AACd,CAAC"}
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useTransformRef = void 0;
var assignRef_1 = require("./assignRef");
var useRef_1 = require("./useRef");
/**
* Create a _lense_ on Ref, making it possible to transform ref value
* @param {ReactRef} ref
* @param {Function} transformer. 👉 Ref would be __NOT updated__ on `transformer` update.
* @returns {RefObject}
*
* @see https://github.com/theKashey/use-callback-ref#usetransformref-to-replace-reactuseimperativehandle
* @example
*
* const ResizableWithRef = forwardRef((props, ref) =>
* <Resizable {...props} ref={useTransformRef(ref, i => i ? i.resizable : null)}/>
* );
*/
function useTransformRef(ref, transformer) {
return (0, useRef_1.useCallbackRef)(null, function (value) { return (0, assignRef_1.assignRef)(ref, transformer(value)); });
}
exports.useTransformRef = useTransformRef;
@@ -0,0 +1,74 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_router_utils = require("../utils.js");
const require_router_reg_exp_router_node = require("./node.js");
//#region src/router/reg-exp-router/trie.ts
var Trie = class {
#context = { varIndex: 0 };
#root = new require_router_reg_exp_router_node.Node();
#index = 0;
paths = require_router_utils.createNullObject();
insert(path, isStatic) {
if (isStatic) {
this.#root.insert(path.split(""), 0, [], this.#context, true);
return;
}
const paramAssoc = [];
const groups = [];
let markedPath = path;
for (let i = 0;;) {
let replaced = false;
markedPath = markedPath.replace(/\{[^}]+\}/g, (m) => {
const mark = `@\\${i}`;
groups[i] = [mark, m];
i++;
replaced = true;
return mark;
});
if (!replaced) break;
}
/**
* - pattern (:label, :label{0-9]+}, ...)
* - /* wildcard
* - character
*/
const tokens = markedPath.match(/(?::[^\/]+)|(?:\/\*$)|./g) || [];
for (let i = groups.length - 1; i >= 0; i--) {
const [mark] = groups[i];
for (let j = tokens.length - 1; j >= 0; j--) if (tokens[j].indexOf(mark) !== -1) {
tokens[j] = tokens[j].replace(mark, groups[i][1]);
break;
}
}
this.#root.insert(tokens, this.#index, paramAssoc, this.#context, false);
this.paths[path] = [this.#index++, paramAssoc];
}
buildRegExp() {
let regexp = this.#root.buildRegExpStr();
if (regexp === "") return [
/^$/,
[],
[]
];
let captureIndex = 0;
const indexReplacementMap = [];
const paramReplacementMap = [];
regexp = regexp.replace(/#(\d+)|@(\d+)|\.\*\$/g, (_, handlerIndex, paramIndex) => {
if (handlerIndex !== void 0) {
indexReplacementMap[++captureIndex] = Number(handlerIndex);
return "$()";
}
if (paramIndex !== void 0) {
paramReplacementMap[Number(paramIndex)] = ++captureIndex;
return "";
}
return "";
});
return [
new RegExp(`^${regexp}`),
indexReplacementMap,
paramReplacementMap
];
}
};
//#endregion
exports.Trie = Trie;
@@ -0,0 +1 @@
{"version":3,"file":"simpleOAuthClientProvider.js","sourceRoot":"","sources":["../../../../src/examples/client/simpleOAuthClientProvider.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IAKpC,YACqB,YAA0B,EAC1B,eAAoC,EACrD,UAA+B,EACf,iBAA0B;QAHzB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,oBAAe,GAAf,eAAe,CAAqB;QAErC,sBAAiB,GAAjB,iBAAiB,CAAS;QAE1C,IAAI,CAAC,WAAW;YACZ,UAAU;gBACV,CAAC,GAAG,CAAC,EAAE;oBACH,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;gBAClD,CAAC,CAAC,CAAC;IACX,CAAC;IAID,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED,iBAAiB;QACb,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAED,qBAAqB,CAAC,iBAA8C;QAChE,IAAI,CAAC,kBAAkB,GAAG,iBAAiB,CAAC;IAChD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,UAAU,CAAC,MAAmB;QAC1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED,uBAAuB,CAAC,gBAAqB;QACzC,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IACvC,CAAC;IAED,gBAAgB,CAAC,YAAoB;QACjC,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IACtC,CAAC;IAED,YAAY;QACR,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC9C,CAAC;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;CACJ"}
@@ -0,0 +1,24 @@
/**
* @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 Wallpaper = createLucideIcon("Wallpaper", [
["circle", { cx: "8", cy: "9", r: "2", key: "gjzl9d" }],
[
"path",
{
d: "m9 17 6.1-6.1a2 2 0 0 1 2.81.01L22 15V5a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2",
key: "69xh40"
}
],
["path", { d: "M8 21h8", key: "1ev6f3" }],
["path", { d: "M12 17v4", key: "1riwvh" }]
]);
export { Wallpaper as default };
//# sourceMappingURL=wallpaper.js.map
@@ -0,0 +1,164 @@
import type { Primitive } from "./helpers/typeAliases.cjs";
import { util, type ZodParsedType } from "./helpers/util.cjs";
import type { TypeOf, ZodType } from "./index.cjs";
type allKeys<T> = T extends any ? keyof T : never;
export type inferFlattenedErrors<T extends ZodType<any, any, any>, U = string> = typeToFlattenedError<TypeOf<T>, U>;
export type typeToFlattenedError<T, U = string> = {
formErrors: U[];
fieldErrors: {
[P in allKeys<T>]?: U[];
};
};
export declare const ZodIssueCode: {
invalid_type: "invalid_type";
too_big: "too_big";
too_small: "too_small";
not_multiple_of: "not_multiple_of";
unrecognized_keys: "unrecognized_keys";
invalid_union: "invalid_union";
custom: "custom";
invalid_literal: "invalid_literal";
invalid_union_discriminator: "invalid_union_discriminator";
invalid_enum_value: "invalid_enum_value";
invalid_arguments: "invalid_arguments";
invalid_return_type: "invalid_return_type";
invalid_date: "invalid_date";
invalid_string: "invalid_string";
invalid_intersection_types: "invalid_intersection_types";
not_finite: "not_finite";
};
export type ZodIssueCode = keyof typeof ZodIssueCode;
export type ZodIssueBase = {
path: (string | number)[];
message?: string | undefined;
};
export interface ZodInvalidTypeIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_type;
expected: ZodParsedType;
received: ZodParsedType;
}
export interface ZodInvalidLiteralIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_literal;
expected: unknown;
received: unknown;
}
export interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
code: typeof ZodIssueCode.unrecognized_keys;
keys: string[];
}
export interface ZodInvalidUnionIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_union;
unionErrors: ZodError[];
}
export interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_union_discriminator;
options: Primitive[];
}
export interface ZodInvalidEnumValueIssue extends ZodIssueBase {
received: string | number;
code: typeof ZodIssueCode.invalid_enum_value;
options: (string | number)[];
}
export interface ZodInvalidArgumentsIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_arguments;
argumentsError: ZodError;
}
export interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_return_type;
returnTypeError: ZodError;
}
export interface ZodInvalidDateIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_date;
}
export type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "cidr" | "base64" | "jwt" | "base64url" | {
includes: string;
position?: number | undefined;
} | {
startsWith: string;
} | {
endsWith: string;
};
export interface ZodInvalidStringIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_string;
validation: StringValidation;
}
export interface ZodTooSmallIssue extends ZodIssueBase {
code: typeof ZodIssueCode.too_small;
minimum: number | bigint;
inclusive: boolean;
exact?: boolean;
type: "array" | "string" | "number" | "set" | "date" | "bigint";
}
export interface ZodTooBigIssue extends ZodIssueBase {
code: typeof ZodIssueCode.too_big;
maximum: number | bigint;
inclusive: boolean;
exact?: boolean;
type: "array" | "string" | "number" | "set" | "date" | "bigint";
}
export interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_intersection_types;
}
export interface ZodNotMultipleOfIssue extends ZodIssueBase {
code: typeof ZodIssueCode.not_multiple_of;
multipleOf: number | bigint;
}
export interface ZodNotFiniteIssue extends ZodIssueBase {
code: typeof ZodIssueCode.not_finite;
}
export interface ZodCustomIssue extends ZodIssueBase {
code: typeof ZodIssueCode.custom;
params?: {
[k: string]: any;
};
}
export type DenormalizedError = {
[k: string]: DenormalizedError | string[];
};
export type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue;
export type ZodIssue = ZodIssueOptionalMessage & {
fatal?: boolean | undefined;
message: string;
};
export declare const quotelessJson: (obj: any) => string;
type recursiveZodFormattedError<T> = T extends [any, ...any[]] ? {
[K in keyof T]?: ZodFormattedError<T[K]>;
} : T extends any[] ? {
[k: number]: ZodFormattedError<T[number]>;
} : T extends object ? {
[K in keyof T]?: ZodFormattedError<T[K]>;
} : unknown;
export type ZodFormattedError<T, U = string> = {
_errors: U[];
} & recursiveZodFormattedError<NonNullable<T>>;
export type inferFormattedError<T extends ZodType<any, any, any>, U = string> = ZodFormattedError<TypeOf<T>, U>;
export declare class ZodError<T = any> extends Error {
issues: ZodIssue[];
get errors(): ZodIssue[];
constructor(issues: ZodIssue[]);
format(): ZodFormattedError<T>;
format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>;
static create: (issues: ZodIssue[]) => ZodError<any>;
static assert(value: unknown): asserts value is ZodError;
toString(): string;
get message(): string;
get isEmpty(): boolean;
addIssue: (sub: ZodIssue) => void;
addIssues: (subs?: ZodIssue[]) => void;
flatten(): typeToFlattenedError<T>;
flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>;
get formErrors(): typeToFlattenedError<T, string>;
}
type stripPath<T extends object> = T extends any ? util.OmitKeys<T, "path"> : never;
export type IssueData = stripPath<ZodIssueOptionalMessage> & {
path?: (string | number)[];
fatal?: boolean | undefined;
};
export type ErrorMapCtx = {
defaultError: string;
data: any;
};
export type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => {
message: string;
};
export {};
@@ -0,0 +1,251 @@
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import operator
import os
import platform
import sys
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
from ._parser import (
MarkerAtom,
MarkerList,
Op,
Value,
Variable,
parse_marker as _parse_marker,
)
from ._tokenizer import ParserSyntaxError
from .specifiers import InvalidSpecifier, Specifier
from .utils import canonicalize_name
__all__ = [
"InvalidMarker",
"UndefinedComparison",
"UndefinedEnvironmentName",
"Marker",
"default_environment",
]
Operator = Callable[[str, str], bool]
class InvalidMarker(ValueError):
"""
An invalid marker was found, users should refer to PEP 508.
"""
class UndefinedComparison(ValueError):
"""
An invalid operation was attempted on a value that doesn't support it.
"""
class UndefinedEnvironmentName(ValueError):
"""
A name was attempted to be used that does not exist inside of the
environment.
"""
def _normalize_extra_values(results: Any) -> Any:
"""
Normalize extra values.
"""
if isinstance(results[0], tuple):
lhs, op, rhs = results[0]
if isinstance(lhs, Variable) and lhs.value == "extra":
normalized_extra = canonicalize_name(rhs.value)
rhs = Value(normalized_extra)
elif isinstance(rhs, Variable) and rhs.value == "extra":
normalized_extra = canonicalize_name(lhs.value)
lhs = Value(normalized_extra)
results[0] = lhs, op, rhs
return results
def _format_marker(
marker: Union[List[str], MarkerAtom, str], first: Optional[bool] = True
) -> str:
assert isinstance(marker, (list, tuple, str))
# Sometimes we have a structure like [[...]] which is a single item list
# where the single item is itself it's own list. In that case we want skip
# the rest of this function so that we don't get extraneous () on the
# outside.
if (
isinstance(marker, list)
and len(marker) == 1
and isinstance(marker[0], (list, tuple))
):
return _format_marker(marker[0])
if isinstance(marker, list):
inner = (_format_marker(m, first=False) for m in marker)
if first:
return " ".join(inner)
else:
return "(" + " ".join(inner) + ")"
elif isinstance(marker, tuple):
return " ".join([m.serialize() for m in marker])
else:
return marker
_operators: Dict[str, Operator] = {
"in": lambda lhs, rhs: lhs in rhs,
"not in": lambda lhs, rhs: lhs not in rhs,
"<": operator.lt,
"<=": operator.le,
"==": operator.eq,
"!=": operator.ne,
">=": operator.ge,
">": operator.gt,
}
def _eval_op(lhs: str, op: Op, rhs: str) -> bool:
try:
spec = Specifier("".join([op.serialize(), rhs]))
except InvalidSpecifier:
pass
else:
return spec.contains(lhs, prereleases=True)
oper: Optional[Operator] = _operators.get(op.serialize())
if oper is None:
raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.")
return oper(lhs, rhs)
def _normalize(*values: str, key: str) -> Tuple[str, ...]:
# PEP 685 – Comparison of extra names for optional distribution dependencies
# https://peps.python.org/pep-0685/
# > When comparing extra names, tools MUST normalize the names being
# > compared using the semantics outlined in PEP 503 for names
if key == "extra":
return tuple(canonicalize_name(v) for v in values)
# other environment markers don't have such standards
return values
def _evaluate_markers(markers: MarkerList, environment: Dict[str, str]) -> bool:
groups: List[List[bool]] = [[]]
for marker in markers:
assert isinstance(marker, (list, tuple, str))
if isinstance(marker, list):
groups[-1].append(_evaluate_markers(marker, environment))
elif isinstance(marker, tuple):
lhs, op, rhs = marker
if isinstance(lhs, Variable):
environment_key = lhs.value
lhs_value = environment[environment_key]
rhs_value = rhs.value
else:
lhs_value = lhs.value
environment_key = rhs.value
rhs_value = environment[environment_key]
lhs_value, rhs_value = _normalize(lhs_value, rhs_value, key=environment_key)
groups[-1].append(_eval_op(lhs_value, op, rhs_value))
else:
assert marker in ["and", "or"]
if marker == "or":
groups.append([])
return any(all(item) for item in groups)
def format_full_version(info: "sys._version_info") -> str:
version = "{0.major}.{0.minor}.{0.micro}".format(info)
if (kind := info.releaselevel) != "final":
version += kind[0] + str(info.serial)
return version
def default_environment() -> Dict[str, str]:
iver = format_full_version(sys.implementation.version)
implementation_name = sys.implementation.name
return {
"implementation_name": implementation_name,
"implementation_version": iver,
"os_name": os.name,
"platform_machine": platform.machine(),
"platform_release": platform.release(),
"platform_system": platform.system(),
"platform_version": platform.version(),
"python_full_version": platform.python_version(),
"platform_python_implementation": platform.python_implementation(),
"python_version": ".".join(platform.python_version_tuple()[:2]),
"sys_platform": sys.platform,
}
class Marker:
def __init__(self, marker: str) -> None:
# Note: We create a Marker object without calling this constructor in
# packaging.requirements.Requirement. If any additional logic is
# added here, make sure to mirror/adapt Requirement.
try:
self._markers = _normalize_extra_values(_parse_marker(marker))
# The attribute `_markers` can be described in terms of a recursive type:
# MarkerList = List[Union[Tuple[Node, ...], str, MarkerList]]
#
# For example, the following expression:
# python_version > "3.6" or (python_version == "3.6" and os_name == "unix")
#
# is parsed into:
# [
# (<Variable('python_version')>, <Op('>')>, <Value('3.6')>),
# 'and',
# [
# (<Variable('python_version')>, <Op('==')>, <Value('3.6')>),
# 'or',
# (<Variable('os_name')>, <Op('==')>, <Value('unix')>)
# ]
# ]
except ParserSyntaxError as e:
raise InvalidMarker(str(e)) from e
def __str__(self) -> str:
return _format_marker(self._markers)
def __repr__(self) -> str:
return f"<Marker('{self}')>"
def __hash__(self) -> int:
return hash((self.__class__.__name__, str(self)))
def __eq__(self, other: Any) -> bool:
if not isinstance(other, Marker):
return NotImplemented
return str(self) == str(other)
def evaluate(self, environment: Optional[Dict[str, str]] = None) -> bool:
"""Evaluate a marker.
Return the boolean from evaluating the given marker against the
environment. environment is an optional argument to override all or
part of the determined environment.
The environment is determined from the current Python process.
"""
current_environment = default_environment()
current_environment["extra"] = ""
if environment is not None:
current_environment.update(environment)
# The API used to allow setting extra to None. We need to handle this
# case for backwards compatibility.
if current_environment["extra"] is None:
current_environment["extra"] = ""
return _evaluate_markers(self._markers, current_environment)
@@ -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-terminal.js';
//# sourceMappingURL=terminal-square.js.map
@@ -0,0 +1,76 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `pnpm run generate-configs`
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("./base"));
const eslint_recommended_1 = __importDefault(require("./eslint-recommended"));
/**
* Contains all of `recommended` along with additional recommended rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked}
*/
exports.default = (plugin, parser) => [
(0, base_1.default)(plugin, parser),
(0, eslint_recommended_1.default)(plugin, parser),
{
name: 'typescript-eslint/recommended-type-checked',
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': 'error',
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-array-delete': 'error',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-empty-object-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'no-implied-eval': 'off',
'@typescript-eslint/no-implied-eval': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/no-redundant-type-constituents': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/no-unsafe-unary-minus': 'error',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-wrapper-object-types': 'error',
'no-throw-literal': 'off',
'@typescript-eslint/only-throw-error': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'prefer-promise-reject-errors': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'require-await': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/restrict-template-expressions': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/unbound-method': 'error',
},
},
];
@@ -0,0 +1 @@
{"version":3,"file":"clipboard.js","sources":["../../../src/icons/clipboard.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Clipboard\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI0IiB4PSI4IiB5PSIyIiByeD0iMSIgcnk9IjEiIC8+CiAgPHBhdGggZD0iTTE2IDRoMmEyIDIgMCAwIDEgMiAydjE0YTIgMiAwIDAgMS0yIDJINmEyIDIgMCAwIDEtMi0yVjZhMiAyIDAgMCAxIDItMmgyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/clipboard\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 Clipboard = createLucideIcon('Clipboard', [\n ['rect', { width: '8', height: '4', x: '8', y: '2', rx: '1', ry: '1', key: 'tgr4d6' }],\n [\n 'path',\n {\n d: 'M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2',\n key: '116196',\n },\n ],\n]);\n\nexport default Clipboard;\n"],"names":[],"mappings":";;;;;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A,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"user-x.js","sources":["../../../src/icons/user-x.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name UserX\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgMjF2LTJhNCA0IDAgMCAwLTQtNEg2YTQgNCAwIDAgMC00IDR2MiIgLz4KICA8Y2lyY2xlIGN4PSI5IiBjeT0iNyIgcj0iNCIgLz4KICA8bGluZSB4MT0iMTciIHgyPSIyMiIgeTE9IjgiIHkyPSIxMyIgLz4KICA8bGluZSB4MT0iMjIiIHgyPSIxNyIgeTE9IjgiIHkyPSIxMyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/user-x\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst UserX = createLucideIcon('UserX', [\n ['path', { d: 'M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2', key: '1yyitq' }],\n ['circle', { cx: '9', cy: '7', r: '4', key: 'nufk8' }],\n ['line', { x1: '17', x2: '22', y1: '8', y2: '13', key: '3nzzx3' }],\n ['line', { x1: '22', x2: '17', y1: '8', y2: '13', key: '1swrse' }],\n]);\n\nexport default UserX;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC1E,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAS,CAAA,CAAA;AAAA,CACrD,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,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,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,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,55 @@
/**
* Type of jitter to apply to the delay.
* - `"none"`: no jitter is applied
* - `"full"`: full jitter is applied (random value between `0` and `delay`)
*/
export declare type JitterType = "none" | "full";
export declare type BackoffOptions = Partial<IBackOffOptions>;
export interface IBackOffOptions {
/**
* Decides whether the `startingDelay` should be applied before the first call.
* If `false`, the first call will occur without a delay.
* @defaultValue `false`
*/
delayFirstAttempt: boolean;
/**
* Decides whether a [jitter](https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/)
* should be applied to the delay. Possible values are `"full"` and `"none"`.
* @defaultValue `"none"`
*/
jitter: JitterType;
/**
* The maximum delay, in milliseconds, between two consecutive attempts.
* @defaultValue `Infinity`
*/
maxDelay: number;
/**
* The maximum number of times to attempt the function.
* Must be at least `1`.
* @defaultValue `10`
*/
numOfAttempts: number;
/**
* The `retry` function can be used to run logic after every failed attempt (e.g. logging a message,
* assessing the last error, etc.).
* It is called with the last error and the upcoming attempt number.
* Returning `true` will retry the function as long as the `numOfAttempts` has not been exceeded.
* Returning `false` will end the execution.
* @defaultValue a function that always returns `true`.
* @param e The last error thrown by the function.
* @param attemptNumber The upcoming attempt number.
* @returns `true` to retry the function, `false` to end the execution
*/
retry: (e: any, attemptNumber: number) => boolean | Promise<boolean>;
/**
* The delay, in milliseconds, before executing the function for the first time.
* @defaultValue `100`
*/
startingDelay: number;
/**
* The `startingDelay` is multiplied by the `timeMultiple` to increase the delay between reattempts.
* @defaultValue `2`
*/
timeMultiple: number;
}
export declare function getSanitizedOptions(options: BackoffOptions): IBackOffOptions;
@@ -0,0 +1,16 @@
import type { TSESLint } from '@typescript-eslint/utils';
import type { TypeOrValueSpecifier } from '../util';
export type Options = [
{
allowForKnownSafeCalls?: TypeOrValueSpecifier[];
allowForKnownSafePromises?: TypeOrValueSpecifier[];
checkThenables?: boolean;
ignoreIIFE?: boolean;
ignoreVoid?: boolean;
}
];
export type MessageId = 'floating' | 'floatingFixAwait' | 'floatingFixVoid' | 'floatingPromiseArray' | 'floatingPromiseArrayVoid' | 'floatingUselessRejectionHandler' | 'floatingUselessRejectionHandlerVoid' | 'floatingVoid';
declare const _default: TSESLint.RuleModule<MessageId, Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener> & {
name: string;
};
export default _default;
@@ -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.es2021_intl = void 0;
const base_config_1 = require("./base-config");
exports.es2021_intl = {
libs: [],
variables: [['Intl', base_config_1.TYPE_VALUE]],
};
@@ -0,0 +1 @@
!function(f){typeof module!='undefined'&&typeof exports=='object'?module.exports=f():typeof define!='undefined'&&define.amd?define(f):(typeof self!='undefined'?self:this).fflate=f()}(function(){var _e={};"use strict";_e.deflate=zt,_e.deflateSync=kt,_e.inflate=At,_e.inflateSync=Tt,_e.gzip=It,_e.compress=It,_e.gzipSync=Ut,_e.compressSync=Ut,_e.gunzip=Zt,_e.gunzipSync=qt,_e.zlib=Lt,_e.zlibSync=Bt,_e.unzlib=Nt,_e.unzlibSync=Pt,_e.gzip=It,_e.compress=It,_e.decompress=Jt,_e.decompressSync=Kt,_e.strToU8=nn,_e.strFromU8=rn,_e.zip=dn,_e.zipSync=gn,_e.unzip=zn,_e.unzipSync=kn;var t=(typeof module!='undefined'&&typeof exports=='object'?function(_f){"use strict";var e,r,t,n=";var __w=require('worker_threads');__w.parentPort.on('message',function(m){onmessage({data:m})}),postMessage=function(m,t){__w.parentPort.postMessage(m,t)},close=process.exit;self=global";try{e=require("worker_threads"),r=e.Worker,t=e.isMarkedAsUntransferable}catch(e){}exports.default=r?function(e,o,a,s,u){var i=!1,l=new r(e+n,{eval:!0}).on("error",function(e){return u(e,null)}).on("message",function(e){return u(null,e)}).on("exit",function(e){e&&!i&&u(Error("exited with code "+e),null)});return t&&(s=s.filter(function(e){return!t(e)})),l.postMessage(a,s),l.terminate=function(){return i=!0,r.prototype.terminate.call(l)},l}:function(e,r,t,n,o){setImmediate(function(){return o(Error("async operations unsupported - update to Node 12+ (or Node 10-11 with the --experimental-worker CLI flag)"),null)});var a=function(){};return{terminate:a,postMessage:a}};return _f}:function(_f){"use strict";var e={};_f.default=function(r,t,s,a,n){var o=new Worker(e[t]||(e[t]=URL.createObjectURL(new Blob([r+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var r=e.data,t=r.$e$;if(t){var s=Error(t[0]);s.code=t[1],s.stack=t[2],n(s,null)}else n(null,r)},o.postMessage(s,a),o};return _f})({}),n=Uint8Array,r=Uint16Array,i=Int32Array,e=new n([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),o=new n([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,n){for(var e=new r(31),o=0;o<31;++o)e[o]=n+=1<<t[o-1];var s=new i(e[30]);for(o=1;o<30;++o)for(var a=e[o];a<e[o+1];++a)s[a]=a-e[o]<<5|o;return{b:e,r:s}},u=a(e,2),h=u.b,f=u.r;h[28]=258,f[258]=28;for(var c=a(o,0),l=c.b,p=c.r,v=new r(32768),d=0;d<32768;++d){var g=(43690&d)>>1|(21845&d)<<1;v[d]=((65280&(g=(61680&(g=(52428&g)>>2|(13107&g)<<2))>>4|(3855&g)<<4))>>8|(255&g)<<8)>>1}var y=function(t,n,i){for(var e=t.length,o=0,s=new r(n);o<e;++o)t[o]&&++s[t[o]-1];var a,u=new r(n);for(o=1;o<n;++o)u[o]=u[o-1]+s[o-1]<<1;if(i){a=new r(1<<n);var h=15-n;for(o=0;o<e;++o)if(t[o])for(var f=o<<4|t[o],c=n-t[o],l=u[t[o]-1]++<<c,p=l|(1<<c)-1;l<=p;++l)a[v[l]>>h]=f}else for(a=new r(e),o=0;o<e;++o)t[o]&&(a[o]=v[u[t[o]-1]++]>>15-t[o]);return a},m=new n(288);for(d=0;d<144;++d)m[d]=8;for(d=144;d<256;++d)m[d]=9;for(d=256;d<280;++d)m[d]=7;for(d=280;d<288;++d)m[d]=8;var b=new n(32);for(d=0;d<32;++d)b[d]=5;var w=y(m,9,0),x=y(m,9,1),z=y(b,5,0),k=y(b,5,1),M=function(t){for(var n=t[0],r=1;r<t.length;++r)t[r]>n&&(n=t[r]);return n},S=function(t,n,r){var i=n/8|0;return(t[i]|t[i+1]<<8)>>(7&n)&r},A=function(t,n){var r=n/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&n)},T=function(t){return(t+7)/8|0},D=function(t,r,i){return(null==r||r<0)&&(r=0),(null==i||i>t.length)&&(i=t.length),new n(t.subarray(r,i))};_e.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var C=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],I=function(t,n,r){var i=Error(n||C[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,I),!r)throw i;return i},U=function(t,r,i,a){var u=t.length,f=a?a.length:0;if(!u||r.f&&!r.l)return i||new n(0);var c=!i,p=c||2!=r.i,v=r.i;c&&(i=new n(3*u));var d=function(t){var r=i.length;if(t>r){var e=new n(Math.max(2*r,t));e.set(i),i=e}},g=r.f||0,m=r.p||0,b=r.b||0,w=r.l,z=r.d,C=r.m,U=r.n,F=8*u;do{if(!w){g=S(t,m,1);var E=S(t,m+1,3);if(m+=3,!E){var Z=t[(Y=T(m)+4)-4]|t[Y-3]<<8,q=Y+Z;if(q>u){v&&I(0);break}p&&d(b+Z),i.set(t.subarray(Y,q),b),r.b=b+=Z,r.p=m=8*q,r.f=g;continue}if(1==E)w=x,z=k,C=9,U=5;else if(2==E){var O=S(t,m,31)+257,G=S(t,m+10,15)+4,L=O+S(t,m+5,31)+1;m+=14;for(var B=new n(L),H=new n(19),j=0;j<G;++j)H[s[j]]=S(t,m+3*j,7);m+=3*G;var N=M(H),P=(1<<N)-1,V=y(H,N,1);for(j=0;j<L;){var Y,J=V[S(t,m,P)];if(m+=15&J,(Y=J>>4)<16)B[j++]=Y;else{var K=0,Q=0;for(16==Y?(Q=3+S(t,m,3),m+=2,K=B[j-1]):17==Y?(Q=3+S(t,mLine truncated
@@ -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 Globe = createLucideIcon("Globe", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
["path", { d: "M2 12h20", key: "9i4pu4" }]
]);
export { Globe as default };
//# sourceMappingURL=globe.js.map
@@ -0,0 +1,8 @@
require('./sass.dart.js');
const library = globalThis._cliPkgExports.pop();
if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports;
library.load({
immutable: require("immutable"),
});
module.exports = library;
@@ -0,0 +1,72 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'prefer-as-const',
meta: {
type: 'suggestion',
docs: {
description: 'Enforce the use of `as const` over literal type',
recommended: 'recommended',
},
fixable: 'code',
hasSuggestions: true,
messages: {
preferConstAssertion: 'Expected a `const` instead of a literal type assertion.',
variableConstAssertion: 'Expected a `const` assertion instead of a literal type annotation.',
variableSuggest: 'You should use `as const` instead of type annotation.',
},
schema: [],
},
defaultOptions: [],
create(context) {
function compareTypes(valueNode, typeNode, canFix) {
if (valueNode.type === utils_1.AST_NODE_TYPES.Literal &&
typeNode.type === utils_1.AST_NODE_TYPES.TSLiteralType &&
typeNode.literal.type === utils_1.AST_NODE_TYPES.Literal &&
valueNode.raw === typeNode.literal.raw) {
if (canFix) {
context.report({
node: typeNode,
messageId: 'preferConstAssertion',
fix: fixer => fixer.replaceText(typeNode, 'const'),
});
}
else {
context.report({
node: typeNode,
messageId: 'variableConstAssertion',
suggest: [
{
messageId: 'variableSuggest',
fix: (fixer) => [
fixer.remove(typeNode.parent),
fixer.insertTextAfter(valueNode, ' as const'),
],
},
],
});
}
}
}
return {
PropertyDefinition(node) {
if (node.value && node.typeAnnotation) {
compareTypes(node.value, node.typeAnnotation.typeAnnotation, false);
}
},
TSAsExpression(node) {
compareTypes(node.expression, node.typeAnnotation, true);
},
TSTypeAssertion(node) {
compareTypes(node.expression, node.typeAnnotation, true);
},
VariableDeclarator(node) {
if (node.init && node.id.typeAnnotation) {
compareTypes(node.init, node.id.typeAnnotation.typeAnnotation, false);
}
},
};
},
});
@@ -0,0 +1 @@
{"version":3,"file":"bot.js","sources":["../../../src/icons/bot.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Bot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgOFY0SDgiIC8+CiAgPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjEyIiB4PSI0IiB5PSI4IiByeD0iMiIgLz4KICA8cGF0aCBkPSJNMiAxNGgyIiAvPgogIDxwYXRoIGQ9Ik0yMCAxNGgyIiAvPgogIDxwYXRoIGQ9Ik0xNSAxM3YyIiAvPgogIDxwYXRoIGQ9Ik05IDEzdjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/bot\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 Bot = createLucideIcon('Bot', [\n ['path', { d: 'M12 8V4H8', key: 'hb8ula' }],\n ['rect', { width: '16', height: '12', x: '4', y: '8', rx: '2', key: 'enze0r' }],\n ['path', { d: 'M2 14h2', key: 'vft8re' }],\n ['path', { d: 'M20 14h2', key: '4cs60a' }],\n ['path', { d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AAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"image-up.js","sources":["../../../src/icons/image-up.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ImageUp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAuMyAyMUg1YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDE0YTIgMiAwIDAgMSAyIDJ2MTBsLTMuMS0zLjFhMiAyIDAgMCAwLTIuODE0LjAxNEw2IDIxIiAvPgogIDxwYXRoIGQ9Im0xNCAxOS41IDMtMyAzIDMiIC8+CiAgPHBhdGggZD0iTTE3IDIydi01LjUiIC8+CiAgPGNpcmNsZSBjeD0iOSIgY3k9IjkiIHI9IjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/image-up\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 ImageUp = createLucideIcon('ImageUp', [\n [\n 'path',\n {\n d: 'M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21',\n key: '9csbqa',\n },\n ],\n ['path', { d: 'm14 19.5 3-3 3 3', key: '9vmjn0' }],\n ['path', { d: 'M17 22v-5.5', key: '1aa6fl' }],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n]);\n\nexport default ImageUp;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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+1 @@
export { prerender, resumeAndPrerender, version } from "./static";
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CornerLeftDown = createLucideIcon("CornerLeftDown", [
["polyline", { points: "14 15 9 20 4 15", key: "nkc4i" }],
["path", { d: "M20 4h-7a4 4 0 0 0-4 4v12", key: "nbpdq2" }]
]);
export { CornerLeftDown as default };
//# sourceMappingURL=corner-left-down.js.map
@@ -0,0 +1 @@
{"version":3,"file":"user-2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_IE","2":"_x","260":"G","513":"_K"},C:{"1":"_YJ","2":"_zJ","194":"_nC"},D:{"1":"_HJ _vD","2":"_IC","260":"_EI","513":"_MM"},E:{"1":"_KF","2":"_VD"},F:{"1":"_LG _oG _sB","2":"_rR","260":"_TF _bC","513":"_8F"},G:{"1":"_mC","2":"_ND"},H:{"2":"1D"},I:{"2":"_G","513":"I"},J:{"2":"_B"},K:{"2":"_D","513":"H"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_xB","2":"J","260":"_RH"},Q:{"513":"JE"},R:{"1":"KE"},S:{"1":"ME","2":"LE"}},B:5,C:"IntersectionObserver",D:true};
@@ -0,0 +1 @@
module.exports={C:{"52":0.13144,"66":0.00657,"76":0.01972,"115":0.12487,"120":1.05809,"121":2.15562,"123":0.02629,"124":0.02629,"125":0.01972,"128":0.00657,"130":0.00657,"131":0.00657,"132":0.00657,"133":0.00657,"134":0.00657,"135":0.00657,"136":0.00657,"140":0.03943,"142":0.00657,"143":0.00657,"146":0.01972,"148":0.00657,"149":0.00657,"150":0.03286,"151":0.00657,"152":0.00657,"153":0.046,"154":0.13801,"155":0.44032,"156":0.47976,"157":0.01314,_:"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 53 54 55 56 57 58 59 60 61 62 63 64 65 67 68 69 70 71 72 73 74 75 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 126 127 129 137 138 139 141 144 145 147 158 159 160 3.5 3.6"},D:{"38":0.00657,"49":0.00657,"63":0.00657,"64":0.01314,"66":0.00657,"67":0.00657,"68":0.00657,"70":0.00657,"78":0.01972,"92":0.01314,"98":0.02629,"103":0.48633,"104":0.47976,"105":0.48633,"106":0.60462,"107":0.47976,"108":0.47976,"109":2.02418,"110":0.48633,"111":0.48633,"112":0.48633,"114":0.00657,"116":0.97266,"117":0.47976,"118":1.56414,"119":2.12276,"120":2.68795,"121":0.01972,"122":0.05915,"123":0.03286,"124":0.5389,"125":0.01314,"126":0.046,"127":0.01314,"128":0.01314,"130":0.00657,"131":0.97266,"132":0.02629,"133":1.33412,"134":0.46661,"135":0.40746,"136":0.45347,"137":0.42718,"138":0.45347,"139":0.44032,"140":0.4929,"141":0.47318,"142":1.54442,"143":0.01972,"144":0.23659,"145":0.09858,"146":0.4929,"147":0.03943,"148":1.78758,"149":0.51919,"150":0.48633,"151":4.83042,"152":6.99918,"153":6.1974,"154":1.4327,"155":0.02629,"156":0.00657,_:"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 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 65 69 71 72 73 74 75 76 77 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 99 100 101 102 113 115 129 157"},F:{"36":0.01972,"51":0.00657,"52":0.00657,"53":0.00657,"54":0.01972,"55":0.00657,"56":0.01314,"57":0.00657,"73":0.00657,"75":0.00657,"79":0.00657,"85":0.01314,"87":0.00657,"89":0.00657,"90":0.01314,"95":0.47976,"99":0.00657,"100":0.00657,"101":0.01314,"102":0.00657,"105":0.01314,"106":0.02629,"107":0.00657,"111":0.00657,"114":0.00657,"115":0.00657,"116":0.00657,"119":0.00657,"120":0.00657,"121":0.00657,"122":0.01314,"131":0.00657,"133":0.00657,"134":0.10515,"135":0.97923,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 37 38 39 40 41 42 43 44 45 46 47 48 49 50 58 60 62 63 64 65 66 67 68 69 70 71 72 74 76 77 78 80 81 82 83 84 86 88 91 92 93 94 96 97 98 103 104 108 109 110 112 113 117 118 123 124 125 126 127 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.01314,"109":0.06572,"118":0.00657,"119":1.03838,"120":1.07124,"122":0.01972,"123":0.00657,"124":0.00657,"131":0.00657,"132":0.00657,"133":0.00657,"134":0.00657,"135":0.00657,"139":0.00657,"140":0.00657,"141":0.00657,"142":0.00657,"143":0.01314,"144":0.00657,"145":0.00657,"146":0.00657,"147":0.01972,"148":0.02629,"149":0.00657,"150":0.02629,"151":0.09858,"152":1.1041,"153":1.26182,"154":0.33517,_:"12 13 14 15 16 17 18 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 110 111 112 113 114 115 116 117 121 125 126 127 128 129 130 136 137 138"},E:{"4":0.00657,"5":0.00657,"27":0.06572,_:"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 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.2 16.4 17.0 27.1 27.2 TP","13.1":0.00657,"15.6":0.03943,"16.1":0.00657,"16.3":0.00657,"16.5":0.00657,"16.6":0.01972,"17.1":0.02629,"17.2":0.00657,"17.3":0.00657,"17.4":0.01314,"17.5":0.01314,"17.6":0.05258,"18.0":0.01314,"18.1":0.01314,"18.2":0.00657,"18.3":0.01314,"18.4":0.01314,"18.5-18.7":0.01972,"26.0":0.01314,"26.1":0.01314,"26.2":0.02629,"26.3":0.03286,"26.4":0.01972,"26.5":0.1643,"26.6":0.41404},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00083,"5.0-5.1":0.00083,"6.0-6.1":0,"7.0-7.1":0.00165,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00825,"11.0-11.2":0.00083,"11.3-11.4":0.00165,"12.0-12.1":0,"12.2-12.5":0.02146,"13.0-13.1":0,"13.2":0.00413,"13.3":0,"13.4-13.7":0.00083,"14.0-14.4":0.0033,"14.5-14.8":0.00495,"15.0-15.1":0.00495,"15.2-15.3":0.0033,"15.4":0.00413,"15.5":0.00495,"15.6-15.8":0.10731,"16.0":0.00825,"16.1":0.01486,"16.2":0.00825,"16.3":0.01816,"16.4":0.00413,"16.5":0.0066,"16.6-16.7":0.14941,"17.0":0.00578,"17.1":0.00825,"17.2":0.00825,"17.3":0.01238,"17.4":0.01733,"17.5":0.03384,"17.6-17.7":0.0875,"18.0":0.01816,"18.1":0.03632,"18.2":0.04953,"18.3":0.08585,"18.4":0.05366,"18.5-18.7":1.1086,"26.0":0.05366,"26.1":0.05448,"26.2":0.14198,"26.3":0.15354,"26.4":0.11226,"26.5":0.752,"26.6":4.63992,"27.0":0.35577,"27.1":0,"27.2":0.00908},P:{"4":0.00909,"23":0.00909,"26":0.01819,"27":0.00909,"28":0.02728,"29":0.03637,"30":0.75474,_:"20 21 22 24 25 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.Line truncated
@@ -0,0 +1,179 @@
/**
* @fileoverview Disallow use of multiple spaces.
* @author Nicholas C. Zakas
* @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: "no-multi-spaces",
url: "https://eslint.style/rules/no-multi-spaces",
},
},
],
},
type: "layout",
docs: {
description: "Disallow multiple spaces",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-multi-spaces",
},
fixable: "whitespace",
schema: [
{
type: "object",
properties: {
exceptions: {
type: "object",
patternProperties: {
"^([A-Z][a-z]*)+$": {
type: "boolean",
},
},
additionalProperties: false,
},
ignoreEOLComments: {
type: "boolean",
default: false,
},
},
additionalProperties: false,
},
],
messages: {
multipleSpaces: "Multiple spaces found before '{{displayValue}}'.",
},
},
create(context) {
const sourceCode = context.sourceCode;
const options = context.options[0] || {};
const ignoreEOLComments = options.ignoreEOLComments;
const exceptions = Object.assign(
{ Property: true },
options.exceptions,
);
const hasExceptions = Object.keys(exceptions).some(
key => exceptions[key],
);
/**
* Formats value of given comment token for error message by truncating its length.
* @param {Token} token comment token
* @returns {string} formatted value
* @private
*/
function formatReportedCommentValue(token) {
const valueLines = token.value.split("\n");
const value = valueLines[0];
const formattedValue = `${value.slice(0, 12)}...`;
return valueLines.length === 1 && value.length <= 12
? value
: formattedValue;
}
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
Program() {
sourceCode.tokensAndComments.forEach(
(leftToken, leftIndex, tokensAndComments) => {
if (leftIndex === tokensAndComments.length - 1) {
return;
}
const rightToken = tokensAndComments[leftIndex + 1];
// Ignore tokens that don't have 2 spaces between them or are on different lines
if (
!sourceCode.text
.slice(leftToken.range[1], rightToken.range[0])
.includes(" ") ||
leftToken.loc.end.line < rightToken.loc.start.line
) {
return;
}
// Ignore comments that are the last token on their line if `ignoreEOLComments` is active.
if (
ignoreEOLComments &&
astUtils.isCommentToken(rightToken) &&
(leftIndex === tokensAndComments.length - 2 ||
rightToken.loc.end.line <
tokensAndComments[leftIndex + 2].loc.start
.line)
) {
return;
}
// Ignore tokens that are in a node in the "exceptions" object
if (hasExceptions) {
const parentNode = sourceCode.getNodeByRangeIndex(
rightToken.range[0] - 1,
);
if (parentNode && exceptions[parentNode.type]) {
return;
}
}
let displayValue;
if (rightToken.type === "Block") {
displayValue = `/*${formatReportedCommentValue(rightToken)}*/`;
} else if (rightToken.type === "Line") {
displayValue = `//${formatReportedCommentValue(rightToken)}`;
} else {
displayValue = rightToken.value;
}
context.report({
node: rightToken,
loc: {
start: leftToken.loc.end,
end: rightToken.loc.start,
},
messageId: "multipleSpaces",
data: { displayValue },
fix: fixer =>
fixer.replaceTextRange(
[leftToken.range[1], rightToken.range[0]],
" ",
),
});
},
);
},
};
},
};
@@ -0,0 +1,42 @@
/**
* @fileoverview Rule to flag when deleting variables
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow deleting variables",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-delete-var",
},
schema: [],
messages: {
unexpected: "Variables should not be deleted.",
},
},
create(context) {
return {
UnaryExpression(node) {
if (
node.operator === "delete" &&
node.argument.type === "Identifier"
) {
context.report({ node, messageId: "unexpected" });
}
},
};
},
};
@@ -0,0 +1 @@
module.exports={C:{"78":0.00379,"115":0.03408,"120":0.72332,"121":1.42391,"122":0.00379,"123":0.02272,"124":0.01136,"125":0.01136,"131":0.00379,"132":0.00757,"136":0.00379,"137":0.00379,"140":0.01894,"143":0.00379,"147":0.00379,"148":0.03787,"150":0.01894,"151":0.00379,"152":0.01136,"153":0.02651,"154":0.09468,"155":0.32947,"156":0.33326,"157":0.01515,_:"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 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 126 127 128 129 130 133 134 135 138 139 141 142 144 145 146 149 158 159 160 3.5 3.6"},D:{"49":0.00379,"52":0.00379,"62":0.00379,"63":0.00379,"66":0.00379,"67":0.00379,"68":0.00379,"73":0.00379,"75":0.01515,"83":0.00379,"86":0.00757,"87":0.00379,"90":0.00379,"92":0.00379,"101":0.00757,"103":0.50367,"104":0.52261,"105":0.51503,"106":0.51503,"107":0.51125,"108":0.51503,"109":0.94296,"110":0.50746,"111":0.53018,"112":0.51503,"113":0.00379,"114":0.00379,"116":0.95432,"117":0.51125,"118":1.08308,"119":1.46557,"120":1.96924,"121":0.01136,"122":0.0303,"123":0.01515,"124":0.53397,"125":0.00379,"126":0.00379,"128":0.01515,"129":0.00379,"130":0.00757,"131":0.95811,"132":0.00757,"133":1.03764,"134":0.09846,"135":0.10225,"136":0.12876,"137":0.10604,"138":0.12497,"139":0.10982,"140":0.13255,"141":0.12497,"142":0.42793,"143":0.01136,"144":0.17042,"145":0.15148,"146":0.13255,"147":0.02272,"148":0.1174,"149":0.24616,"150":0.28403,"151":3.84002,"152":3.8173,"153":3.05232,"154":0.67787,"155":0.00379,_:"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 53 54 55 56 57 58 59 60 61 64 65 69 70 71 72 74 76 77 78 79 80 81 84 85 88 89 91 93 94 95 96 97 98 99 100 102 115 127 156 157"},F:{"46":0.00379,"52":0.00379,"53":0.00379,"54":0.00379,"55":0.00379,"56":0.00379,"69":0.00379,"89":0.00379,"90":0.00379,"95":0.00379,"101":0.00379,"105":0.00379,"106":0.00757,"107":0.00757,"115":0.00379,"119":0.00379,"120":0.00379,"122":0.00379,"133":0.01136,"134":0.03408,"135":0.28024,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 57 58 60 62 63 64 65 66 67 68 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 91 92 93 94 96 97 98 99 100 102 103 104 108 109 110 111 112 113 114 116 117 118 121 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00379,"109":0.00379,"119":0.71574,"120":0.71196,"122":0.00757,"123":0.00379,"124":0.00379,"127":0.00379,"134":0.00379,"135":0.00379,"136":0.00379,"138":0.00379,"139":0.00379,"140":0.00379,"142":0.00379,"143":0.00379,"144":0.00379,"145":0.00757,"146":0.00379,"147":0.00379,"148":0.00757,"149":0.00379,"150":0.01515,"151":0.04166,"152":0.54912,"153":0.48095,"154":0.13633,_:"12 13 14 15 16 17 18 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 110 111 112 113 114 115 116 117 118 121 125 126 128 129 130 131 132 133 137 141"},E:{"27":0.07195,_:"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 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.2 16.4 17.0 17.2 27.1 TP","15.6":0.01894,"16.1":0.00757,"16.3":0.00379,"16.5":0.00379,"16.6":0.15527,"17.1":0.0303,"17.3":0.00379,"17.4":0.01515,"17.5":0.00757,"17.6":0.08331,"18.0":0.00379,"18.1":0.00379,"18.2":0.00379,"18.3":0.00379,"18.4":0.01136,"18.5-18.7":0.0303,"26.0":0.01136,"26.1":0.00757,"26.2":0.01136,"26.3":0.01894,"26.4":0.02272,"26.5":0.09089,"26.6":0.45444,"27.2":0.00757},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00248,"5.0-5.1":0.00248,"6.0-6.1":0,"7.0-7.1":0.00496,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.0248,"11.0-11.2":0.00248,"11.3-11.4":0.00496,"12.0-12.1":0,"12.2-12.5":0.06449,"13.0-13.1":0,"13.2":0.0124,"13.3":0,"13.4-13.7":0.00248,"14.0-14.4":0.00992,"14.5-14.8":0.01488,"15.0-15.1":0.01488,"15.2-15.3":0.00992,"15.4":0.0124,"15.5":0.01488,"15.6-15.8":0.32243,"16.0":0.0248,"16.1":0.04464,"16.2":0.0248,"16.3":0.05457,"16.4":0.0124,"16.5":0.01984,"16.6-16.7":0.44892,"17.0":0.01736,"17.1":0.0248,"17.2":0.0248,"17.3":0.0372,"17.4":0.05208,"17.5":0.10169,"17.6-17.7":0.2629,"18.0":0.05457,"18.1":0.10913,"18.2":0.14881,"18.3":0.25794,"18.4":0.16121,"18.5-18.7":3.33095,"26.0":0.16121,"26.1":0.1637,"26.2":0.4266,"26.3":0.46132,"26.4":0.33731,"26.5":2.25949,"26.6":13.94137,"27.0":1.06898,"27.1":0,"27.2":0.02728},P:{"4":0.00931,"23":0.03725,"25":0.00931,"26":0.04656,"27":0.00931,"28":0.06518,"29":0.14899,"30":3.41746,_:"20 21 22 24 5.0-5.4 6.2-6.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","7.2-7.4":0.03725,"19.0":0.00931},I:{"0":0.01242,"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.26095,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{Line truncated
@@ -0,0 +1,44 @@
{
"name": "json-schema-typed",
"description": "JSON Schema TypeScript definitions with complete inline documentation.",
"license": "BSD-2-Clause",
"version": "8.0.2",
"homepage": "https://github.com/RemyRylan/json-schema-typed/tree/main/dist/node",
"repository": {
"type": "git",
"url": "https://github.com/RemyRylan/json-schema-typed.git"
},
"author": {
"name": "Remy Rylan",
"url": "https://github.com/RemyRylan"
},
"main": "./draft_2020_12.js",
"types": "./draft_2020_12.d.ts",
"type": "module",
"exports": {
".": {
"types": "./draft_2020_12.d.ts",
"default": "./draft_2020_12.js"
},
"./draft-07": {
"types": "./draft_07.d.ts",
"default": "./draft_07.js"
},
"./draft-2019-09": {
"types": "./draft_2019_09.d.ts",
"default": "./draft_2019_09.js"
},
"./draft-2020-12": {
"types": "./draft_2020_12.d.ts",
"default": "./draft_2020_12.js"
}
},
"keywords": [
"jsonschema",
"typescript",
"types",
"definitions",
"json",
"schema"
]
}
@@ -0,0 +1,28 @@
const handler = {
scheme: "http",
domainHost: true,
parse: function (components, options) {
//report missing host
if (!components.host) {
components.error = components.error || "HTTP URIs must have a host.";
}
return components;
},
serialize: function (components, options) {
const secure = String(components.scheme).toLowerCase() === "https";
//normalize the default port
if (components.port === (secure ? 443 : 80) || components.port === "") {
components.port = undefined;
}
//normalize the empty path
if (!components.path) {
components.path = "/";
}
//NOTE: We do not parse query strings for HTTP URIs
//as WWW Form Url Encoded query strings are part of the HTML4+ spec,
//and not the HTTP spec.
return components;
}
};
export default handler;
//# sourceMappingURL=http.js.map
@@ -0,0 +1,7 @@
import * as ts from 'typescript';
/**
* Returns the contextual type of a given node.
* Contextual type is the type of the target the node is going into.
* i.e. the type of a called function's parameter, or the defined type of a variable declaration
*/
export declare function getContextualType(checker: ts.TypeChecker, node: ts.Expression): ts.Type | undefined;
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BatteryCharging = createLucideIcon("BatteryCharging", [
["path", { d: "M15 7h1a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-2", key: "1sdynx" }],
["path", { d: "M6 7H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h1", key: "1gkd3k" }],
["path", { d: "m11 7-3 5h4l-3 5", key: "b4a64w" }],
["line", { x1: "22", x2: "22", y1: "11", y2: "13", key: "4dh1rd" }]
]);
export { BatteryCharging as default };
//# sourceMappingURL=battery-charging.js.map
@@ -0,0 +1,132 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var t = require("@babel/types");
var _t = t;
var _traverseNode = require("../../traverse-node.js");
var _visitors = require("../../visitors.js");
var _context = require("../../path/context.js");
const {
getAssignmentIdentifiers
} = _t;
const renameVisitor = {
ReferencedIdentifier({
node
}, state) {
if (node.name === state.oldName) {
node.name = state.newName;
}
},
Scope(path, state) {
if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
path.skip();
if (path.isMethod()) {
if (!path.requeueComputedKeyAndDecorators) {
_context.requeueComputedKeyAndDecorators.call(path);
} else {
path.requeueComputedKeyAndDecorators();
}
}
if (path.isSwitchStatement()) {
path.context.maybeQueue(path.get("discriminant"));
}
}
},
ObjectProperty({
node,
scope
}, state) {
const {
name
} = node.key;
if (node.shorthand && (name === state.oldName || name === state.newName) && scope.getBindingIdentifier(name) === state.binding.identifier) {
var _node$extra;
node.shorthand = false;
if ((_node$extra = node.extra) != null && _node$extra.shorthand) node.extra.shorthand = false;
}
},
"AssignmentExpression|Declaration|VariableDeclarator"(path, state) {
if (path.isVariableDeclaration()) return;
const ids = path.isAssignmentExpression() ? getAssignmentIdentifiers(path.node) : path.getOuterBindingIdentifiers();
for (const name in ids) {
if (name === state.oldName) ids[name].name = state.newName;
}
}
};
class Renamer {
constructor(binding, oldName, newName) {
this.newName = newName;
this.oldName = oldName;
this.binding = binding;
}
maybeConvertFromExportDeclaration(parentDeclar) {
const maybeExportDeclar = parentDeclar.parentPath;
if (!maybeExportDeclar.isExportDeclaration()) {
return;
}
if (maybeExportDeclar.isExportDefaultDeclaration()) {
const {
declaration
} = maybeExportDeclar.node;
if (t.isDeclaration(declaration) && !declaration.id) {
return;
}
}
if (maybeExportDeclar.isExportAllDeclaration()) {
return;
}
maybeExportDeclar.splitExportDeclaration();
}
maybeConvertFromClassFunctionDeclaration(path) {
return path;
}
maybeConvertFromClassFunctionExpression(path) {
return path;
}
rename() {
const {
binding,
oldName,
newName
} = this;
const {
scope,
path
} = binding;
const parentDeclar = path.find(path => path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression());
if (parentDeclar) {
const bindingIds = parentDeclar.getOuterBindingIdentifiers();
if (bindingIds[oldName] === binding.identifier) {
this.maybeConvertFromExportDeclaration(parentDeclar);
}
}
const blockToTraverse = arguments[0] || scope.block;
const skipKeys = {
discriminant: true
};
if (t.isMethod(blockToTraverse)) {
if (blockToTraverse.computed) {
skipKeys.key = true;
}
if (!t.isObjectMethod(blockToTraverse)) {
skipKeys.decorators = true;
}
}
(0, _traverseNode.traverseNode)(blockToTraverse, (0, _visitors.explode)(renameVisitor), scope, this, scope.path, skipKeys);
if (!arguments[0]) {
scope.removeOwnBinding(oldName);
scope.bindings[newName] = binding;
this.binding.identifier.name = newName;
}
if (parentDeclar) {
this.maybeConvertFromClassFunctionDeclaration(path);
this.maybeConvertFromClassFunctionExpression(path);
}
}
}
exports.default = Renamer;
//# sourceMappingURL=renamer.js.map
@@ -0,0 +1,197 @@
// @ts-ignore TS6133
import { test } from "vitest";
import { z } from "zod/v3";
interface Category {
name: string;
subcategories: Category[];
}
const testCategory: Category = {
name: "I",
subcategories: [
{
name: "A",
subcategories: [
{
name: "1",
subcategories: [
{
name: "a",
subcategories: [],
},
],
},
],
},
],
};
test("recursion with z.late.object", () => {
const Category: z.ZodType<Category> = z.late.object(() => ({
name: z.string(),
subcategories: z.array(Category),
}));
Category.parse(testCategory);
});
test("recursion with z.lazy", () => {
const Category: z.ZodType<Category> = z.lazy(() =>
z.object({
name: z.string(),
subcategories: z.array(Category),
})
);
Category.parse(testCategory);
});
test("schema getter", () => {
z.lazy(() => z.string()).schema.parse("asdf");
});
type LinkedList = null | { value: number; next: LinkedList };
const linkedListExample = {
value: 1,
next: {
value: 2,
next: {
value: 3,
next: {
value: 4,
next: null,
},
},
},
};
test("recursion involving union type", () => {
const LinkedListSchema: z.ZodType<LinkedList> = z.lazy(() =>
z.union([
z.null(),
z.object({
value: z.number(),
next: LinkedListSchema,
}),
])
);
LinkedListSchema.parse(linkedListExample);
});
// interface A {
// val: number;
// b: B;
// }
// interface B {
// val: number;
// a: A;
// }
// const A: z.ZodType<A> = z.late.object(() => ({
// val: z.number(),
// b: B,
// }));
// const B: z.ZodType<B> = z.late.object(() => ({
// val: z.number(),
// a: A,
// }));
// const Alazy: z.ZodType<A> = z.lazy(() => z.object({
// val: z.number(),
// b: B,
// }));
// const Blazy: z.ZodType<B> = z.lazy(() => z.object({
// val: z.number(),
// a: A,
// }));
// const a: any = { val: 1 };
// const b: any = { val: 2 };
// a.b = b;
// b.a = a;
// test('valid check', () => {
// A.parse(a);
// B.parse(b);
// });
// test("valid check lazy", () => {
// A.parse({val:1, b:});
// B.parse(b);
// });
// test('masking check', () => {
// const FragmentOnA = z
// .object({
// val: z.number(),
// b: z
// .object({
// val: z.number(),
// a: z
// .object({
// val: z.number(),
// })
// .nonstrict(),
// })
// .nonstrict(),
// })
// .nonstrict();
// const fragment = FragmentOnA.parse(a);
// fragment;
// });
// test('invalid check', () => {
// expect(() => A.parse({} as any)).toThrow();
// });
// test('schema getter', () => {
// (A as z.ZodLazy<any>).schema;
// });
// test("self recursion with cyclical data", () => {
// interface Category {
// name: string;
// subcategories: Category[];
// }
// const Category: z.ZodType<Category> = z.late.object(() => ({
// name: z.string(),
// subcategories: z.array(Category),
// }));
// const untypedCategory: any = {
// name: "Category A",
// };
// // creating a cycle
// untypedCategory.subcategories = [untypedCategory];
// Category.parse(untypedCategory);
// });
// test("self recursion with base type", () => {
// const BaseCategory = z.object({
// name: z.string(),
// });
// type BaseCategory = z.infer<typeof BaseCategory>;
// type Category = BaseCategory & { subcategories: Category[] };
// const Category: z.ZodType<Category> = z.late
// .object(() => ({
// subcategories: z.array(Category),
// }))
// .extend({
// name: z.string(),
// });
// const untypedCategory: any = {
// name: "Category A",
// };
// // creating a cycle
// untypedCategory.subcategories = [untypedCategory];
// Category.parse(untypedCategory); // parses successfully
// });
@@ -0,0 +1 @@
{"version":3,"file":"chart-column-stacked.js","sources":["../../../src/icons/chart-column-stacked.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChartColumnStacked\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTEgMTNINyIgLz4KICA8cGF0aCBkPSJNMTkgOWgtNCIgLz4KICA8cGF0aCBkPSJNMyAzdjE2YTIgMiAwIDAgMCAyIDJoMTYiIC8+CiAgPHJlY3QgeD0iMTUiIHk9IjUiIHdpZHRoPSI0IiBoZWlnaHQ9IjEyIiByeD0iMSIgLz4KICA8cmVjdCB4PSI3IiB5PSI4IiB3aWR0aD0iNCIgaGVpZ2h0PSI5IiByeD0iMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/chart-column-stacked\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 ChartColumnStacked = createLucideIcon('ChartColumnStacked', [\n ['path', { d: 'M11 13H7', key: 't0o9gq' }],\n ['path', { d: 'M19 9h-4', key: 'rera1j' }],\n ['path', { d: 'M3 3v16a2 2 0 0 0 2 2h16', key: 'c24i48' }],\n ['rect', { x: '15', y: '5', width: '4', height: '12', rx: '1', key: 'q8uenq' }],\n ['rect', { x: '7', y: '8', width: '4', height: '9', rx: '1', key: 'sr5ea' }],\n]);\n\nexport default ChartColumnStacked;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB,iBAAiB,oBAAsB,CAAA,CAAA,CAAA;AAAA,CAAA,CAChE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,MAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAQ,CAAM,CAAA,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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAQ,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA;AAC7E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/server/completable.ts","../src/server/middleware/bearerAuth.ts","../src/server/middleware/hostHeaderValidation.ts","../src/server/middleware/oauthMetadata.ts","../src/server/middleware/originValidation.ts","../src/server/requestStateCodec.ts","../src/server/streamableHttp.ts","../src/server/requestBody.ts","../src/fromJsonSchema.ts"],"sourcesContent":[],"mappings":";;;;cAEa;KAED,2BAA2B,mBAAmB,4BAC/C,gBAAA,CAAiB,WAAW,WAHvC;cAKoB;AALpB,CAAA,EAAA,GAOK,gBAAA,CAAiB,UAPwD,CAO7C,CAP6C,CAAA,EAAA,GAOtC,OA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E;UMqBiB,+CAAA;;;ALxEjB;AAqBA;AAiCA;AA8EA;EAEa,kBAAA,CAAA,EAAA,CAAA,GAAA,GAAA,MAAA,CAAA,GAAA,SAAA;EACF;;;AAuDX;;;;EAGW,oBAAA,CAAA,EAAA,CAAA,CAAA,SAAA,EAAA,MAAA,EAAA,GAAA,IAAA,GKzG+C,OLyG/C,CAAA,IAAA,CAAA,CAAA,GAAA,SAAA;EA8CK;;;;;;;;;;EC3PJ,eAAA,CAAA,EAAA,CAAA,CAAA,SAA0B,EAAA,MAAA,EAAA,GAAA,IAAA,GIgHe,OJhHf,CAAA,IAAA,CAAA,CAAA,GAALine truncated
@@ -0,0 +1,7 @@
"use strict";
/*
* This file contains types that are intentionally wide/inaccurate, that exist
* for the purpose of satisfying both `defineConfig()` and `tseslint.config()`.
* See https://github.com/typescript-eslint/typescript-eslint/issues/10899
*/
Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
export declare const encode: (num: number, buf: Buffer) => Buffer<ArrayBufferLike>;
export declare const parse: (buf: Buffer) => number;
//# sourceMappingURL=large-numbers.d.ts.map
@@ -0,0 +1,111 @@
function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
import {TokenType as tt} from "../parser/tokenizer/types";
import Transformer from "./Transformer";
const JEST_GLOBAL_NAME = "jest";
const HOISTED_METHODS = ["mock", "unmock", "enableAutomock", "disableAutomock"];
/**
* Implementation of babel-plugin-jest-hoist, which hoists up some jest method
* calls above the imports to allow them to override other imports.
*
* To preserve line numbers, rather than directly moving the jest.mock code, we
* wrap each invocation in a function statement and then call the function from
* the top of the file.
*/
export default class JestHoistTransformer extends Transformer {
__init() {this.hoistedFunctionNames = []}
constructor(
rootTransformer,
tokens,
nameManager,
importProcessor,
) {
super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.nameManager = nameManager;this.importProcessor = importProcessor;JestHoistTransformer.prototype.__init.call(this);;
}
process() {
if (
this.tokens.currentToken().scopeDepth === 0 &&
this.tokens.matches4(tt.name, tt.dot, tt.name, tt.parenL) &&
this.tokens.identifierName() === JEST_GLOBAL_NAME
) {
// TODO: This only works if imports transform is active, which it will be for jest.
// But if jest adds module support and we no longer need the import transform, this needs fixing.
if (_optionalChain([this, 'access', _ => _.importProcessor, 'optionalAccess', _2 => _2.getGlobalNames, 'call', _3 => _3(), 'optionalAccess', _4 => _4.has, 'call', _5 => _5(JEST_GLOBAL_NAME)])) {
return false;
}
return this.extractHoistedCalls();
}
return false;
}
getHoistedCode() {
if (this.hoistedFunctionNames.length > 0) {
// This will be placed before module interop code, but that's fine since
// imports aren't allowed in module mock factories.
return this.hoistedFunctionNames.map((name) => `${name}();`).join("");
}
return "";
}
/**
* Extracts any methods calls on the jest-object that should be hoisted.
*
* According to the jest docs, https://jestjs.io/docs/en/jest-object#jestmockmodulename-factory-options,
* mock, unmock, enableAutomock, disableAutomock, are the methods that should be hoisted.
*
* We do not apply the same checks of the arguments as babel-plugin-jest-hoist does.
*/
extractHoistedCalls() {
// We're handling a chain of calls where `jest` may or may not need to be inserted for each call
// in the chain, so remove the initial `jest` to make the loop implementation cleaner.
this.tokens.removeToken();
// Track some state so that multiple non-hoisted chained calls in a row keep their chaining
// syntax.
let followsNonHoistedJestCall = false;
// Iterate through all chained calls on the jest object.
while (this.tokens.matches3(tt.dot, tt.name, tt.parenL)) {
const methodName = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
const shouldHoist = HOISTED_METHODS.includes(methodName);
if (shouldHoist) {
// We've matched e.g. `.mock(...)` or similar call.
// Replace the initial `.` with `function __jestHoist(){jest.`
const hoistedFunctionName = this.nameManager.claimFreeName("__jestHoist");
this.hoistedFunctionNames.push(hoistedFunctionName);
this.tokens.replaceToken(`function ${hoistedFunctionName}(){${JEST_GLOBAL_NAME}.`);
this.tokens.copyToken();
this.tokens.copyToken();
this.rootTransformer.processBalancedCode();
this.tokens.copyExpectedToken(tt.parenR);
this.tokens.appendCode(";}");
followsNonHoistedJestCall = false;
} else {
// This is a non-hoisted method, so just transform the code as usual.
if (followsNonHoistedJestCall) {
// If we didn't hoist the previous call, we can leave the code as-is to chain off of the
// previous method call. It's important to preserve the code here because we don't know
// for sure that the method actually returned the jest object for chaining.
this.tokens.copyToken();
} else {
// If we hoisted the previous call, we know it returns the jest object back, so we insert
// the identifier `jest` to continue the chain.
this.tokens.replaceToken(`${JEST_GLOBAL_NAME}.`);
}
this.tokens.copyToken();
this.tokens.copyToken();
this.rootTransformer.processBalancedCode();
this.tokens.copyExpectedToken(tt.parenR);
followsNonHoistedJestCall = true;
}
}
return true;
}
}
@@ -0,0 +1,101 @@
import { IncomingMessage, Server, ServerOptions, ServerResponse, createServer } from "node:http";
import { Http2SecureServer, Http2Server, Http2ServerRequest, Http2ServerResponse, SecureServerOptions, ServerOptions as ServerOptions$1, createSecureServer, createServer as createServer$1 } from "node:http2";
import { Duplex } from "node:stream";
import { UpgradeWebSocket } from "hono/ws";
import { AddressInfo } from "node:net";
import { ServerOptions as ServerOptions$2, createServer as createServer$2 } from "node:https";
//#region src/websocket-types.d.ts
type WSReadyState = 0 | 1 | 2 | 3;
type WebSocketData = string | ArrayBuffer | Uint8Array | readonly Uint8Array[];
type WebSocketSendOptions = {
compress?: boolean;
};
interface WebSocketLike {
protocol: string;
readyState: WSReadyState;
close(code?: number, reason?: string): void;
send(data: string | ArrayBuffer | ArrayBufferView, options?: WebSocketSendOptions): void;
on(event: 'message', listener: (data: WebSocketData, isBinary: boolean) => void): this;
on(event: 'close', listener: (code: number, reason: Uint8Array) => void): this;
on(event: 'error', listener: (error: unknown) => void): this;
off(event: 'message', listener: (data: WebSocketData, isBinary: boolean) => void): this;
}
interface WebSocketServerLike {
options: {
noServer?: boolean;
};
on(event: 'connection', listener: (ws: WebSocketLike, request: IncomingMessage) => void): this;
on(event: 'headers', listener: (headers: string[]) => void): this;
off(event: 'headers', listener: (headers: string[]) => void): this;
emit(event: 'connection', ws: WebSocketLike, request: IncomingMessage): boolean;
handleUpgrade(request: IncomingMessage, socket: Duplex, head: Buffer, callback: (ws: WebSocketLike) => void): void;
close(): void;
}
//#endregion
//#region src/types.d.ts
type HttpBindings = {
incoming: IncomingMessage;
outgoing: ServerResponse;
};
type Http2Bindings = {
incoming: Http2ServerRequest;
outgoing: Http2ServerResponse;
};
type FetchCallback = (request: Request, env: HttpBindings | Http2Bindings) => Promise<unknown> | unknown;
type ServerType = Server | Http2Server | Http2SecureServer;
type createHttpOptions = {
serverOptions?: ServerOptions;
createServer?: typeof createServer;
};
type createHttpsOptions = {
serverOptions?: ServerOptions$2;
createServer?: typeof createServer$2;
};
type createHttp2Options = {
serverOptions?: ServerOptions$1;
createServer?: typeof createServer$1;
};
type createSecureHttp2Options = {
serverOptions?: SecureServerOptions;
createServer?: typeof createSecureServer;
};
type ServerOptions$3 = createHttpOptions | createHttpsOptions | createHttp2Options | createSecureHttp2Options;
type Options = {
fetch: FetchCallback;
overrideGlobalObjects?: boolean;
autoCleanupIncoming?: boolean;
port?: number;
hostname?: string;
websocket?: {
server: WebSocketServerLike;
};
} & ServerOptions$3;
type CustomErrorHandler = (err: unknown) => void | Response | Promise<void | Response>;
//#endregion
//#region src/server.d.ts
declare const createAdaptorServer: (options: Options) => ServerType;
declare const serve: (options: Options, listeningListener?: (info: AddressInfo) => void) => ServerType;
//#endregion
//#region src/websocket.d.ts
type UpgradeWebSocketOptions = {
onError: (err: unknown) => void;
};
declare const upgradeWebSocket: UpgradeWebSocket<WebSocketLike, UpgradeWebSocketOptions>;
//#endregion
//#region src/listener.d.ts
declare const getRequestListener: (fetchCallback: FetchCallback, options?: {
hostname?: string;
errorHandler?: CustomErrorHandler;
overrideGlobalObjects?: boolean;
autoCleanupIncoming?: boolean;
}) => (incoming: IncomingMessage | Http2ServerRequest, outgoing: ServerResponse | Http2ServerResponse) => Promise<void>;
//#endregion
//#region src/error.d.ts
declare class RequestError extends Error {
constructor(message: string, options?: {
cause?: unknown;
});
}
//#endregion
export { type Http2Bindings, type HttpBindings, RequestError, type ServerType, type WebSocketData, type WebSocketLike, type WebSocketServerLike, createAdaptorServer, getRequestListener, serve, upgradeWebSocket };
@@ -0,0 +1 @@
{"version":3,"file":"chart-bar.js","sources":["../../../src/icons/chart-bar.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChartBar\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyAzdjE2YTIgMiAwIDAgMCAyIDJoMTYiIC8+CiAgPHBhdGggZD0iTTcgMTZoOCIgLz4KICA8cGF0aCBkPSJNNyAxMWgxMiIgLz4KICA8cGF0aCBkPSJNNyA2aDMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/chart-bar\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 ChartBar = createLucideIcon('ChartBar', [\n ['path', { d: 'M3 3v16a2 2 0 0 0 2 2h16', key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,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,12 @@
const isNotNull = (value) => value !== null;
function getFinalKeyframe(keyframes, { repeat, repeatType = "loop" }, finalKeyframe, speed = 1) {
const resolvedKeyframes = keyframes.filter(isNotNull);
const useFirstKeyframe = speed < 0 || (repeat && repeatType !== "loop" && repeat % 2 === 1);
const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1;
return !index || finalKeyframe === undefined
? resolvedKeyframes[index]
: finalKeyframe;
}
export { getFinalKeyframe };
//# sourceMappingURL=get-final.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"laugh.js","sources":["../../../src/icons/laugh.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Laugh\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNMTggMTNhNiA2IDAgMCAxLTYgNSA2IDYgMCAwIDEtNi01aDEyWiIgLz4KICA8bGluZSB4MT0iOSIgeDI9IjkuMDEiIHkxPSI5IiB5Mj0iOSIgLz4KICA8bGluZSB4MT0iMTUiIHgyPSIxNS4wMSIgeTE9IjkiIHkyPSI5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/laugh\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 Laugh = createLucideIcon('Laugh', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M18 13a6 6 0 0 1-6 5 6 6 0 0 1-6-5h12Z', key: 'b2q4dd' }],\n ['line', { x1: '9', x2: '9.01', y1: '9', y2: '9', key: 'yxxnd0' }],\n ['line', { x1: '15', x2: '15.01', y1: '9', y2: '9', key: '1p4y9e' }],\n]);\n\nexport default Laugh;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACvE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,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,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACrE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"eye.js","sources":["../../../src/icons/eye.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Eye\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMi4wNjIgMTIuMzQ4YTEgMSAwIDAgMSAwLS42OTYgMTAuNzUgMTAuNzUgMCAwIDEgMTkuODc2IDAgMSAxIDAgMCAxIDAgLjY5NiAxMC43NSAxMC43NSAwIDAgMS0xOS44NzYgMCIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/eye\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 Eye = createLucideIcon('Eye', [\n [\n 'path',\n {\n d: 'M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0',\n key: '1nclc0',\n },\n ],\n ['circle', { cx: '12', cy: '12', r: '3', key: '1v7zrd' }],\n]);\n\nexport default Eye;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAClC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,85 @@
/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var React = require("react"),
shim = require("use-sync-external-store/shim");
function is(x, y) {
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
}
var objectIs = "function" === typeof Object.is ? Object.is : is,
useSyncExternalStore = shim.useSyncExternalStore,
useRef = React.useRef,
useEffect = React.useEffect,
useMemo = React.useMemo,
useDebugValue = React.useDebugValue;
exports.useSyncExternalStoreWithSelector = function (
subscribe,
getSnapshot,
getServerSnapshot,
selector,
isEqual
) {
var instRef = useRef(null);
if (null === instRef.current) {
var inst = { hasValue: !1, value: null };
instRef.current = inst;
} else inst = instRef.current;
instRef = useMemo(
function () {
function memoizedSelector(nextSnapshot) {
if (!hasMemo) {
hasMemo = !0;
memoizedSnapshot = nextSnapshot;
nextSnapshot = selector(nextSnapshot);
if (void 0 !== isEqual && inst.hasValue) {
var currentSelection = inst.value;
if (isEqual(currentSelection, nextSnapshot))
return (memoizedSelection = currentSelection);
}
return (memoizedSelection = nextSnapshot);
}
currentSelection = memoizedSelection;
if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
var nextSelection = selector(nextSnapshot);
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
return (memoizedSnapshot = nextSnapshot), currentSelection;
memoizedSnapshot = nextSnapshot;
return (memoizedSelection = nextSelection);
}
var hasMemo = !1,
memoizedSnapshot,
memoizedSelection,
maybeGetServerSnapshot =
void 0 === getServerSnapshot ? null : getServerSnapshot;
return [
function () {
return memoizedSelector(getSnapshot());
},
null === maybeGetServerSnapshot
? void 0
: function () {
return memoizedSelector(maybeGetServerSnapshot());
}
];
},
[getSnapshot, getServerSnapshot, selector, isEqual]
);
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
useEffect(
function () {
inst.hasValue = !0;
inst.value = value;
},
[value]
);
useDebugValue(value);
return value;
};
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,OAAO,EAMR,MAAM,YAAY,CAAC;AAWpB,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA4ED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,EAClC,OAAO,GAAE,oBAAyB,GACjC,MAAM,CAUR;AAED,eAAe,MAAM,CAAC"}
@@ -0,0 +1,87 @@
{
"name": "side-channel-weakmap",
"version": "1.0.2",
"description": "Store information about any JS value in a side channel. Uses WeakMap if available.",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/side-channel-weakmap.git"
},
"keywords": [
"weakmap",
"map",
"side",
"channel",
"metadata"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/ljharb/side-channel-weakmap/issues"
},
"homepage": "https://github.com/ljharb/side-channel-weakmap#readme",
"dependencies": {
"call-bound": "^1.0.2",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.5",
"object-inspect": "^1.13.3",
"side-channel-map": "^1.0.1"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.1",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.2",
"@types/call-bind": "^1.0.5",
"@types/get-intrinsic": "^1.2.3",
"@types/object-inspect": "^1.13.0",
"@types/tape": "^5.6.5",
"auto-changelog": "^2.5.0",
"eclint": "^2.8.1",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1 @@
This is the linux-x64-glibc build of @parcel/watcher. See https://github.com/parcel-bundler/watcher for details.
@@ -0,0 +1 @@
{"version":3,"file":"bed-double.js","sources":["../../../src/icons/bed-double.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BedDouble\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiAyMHYtOGEyIDIgMCAwIDEgMi0yaDE2YTIgMiAwIDAgMSAyIDJ2OCIgLz4KICA8cGF0aCBkPSJNNCAxMFY2YTIgMiAwIDAgMSAyLTJoMTJhMiAyIDAgMCAxIDIgMnY0IiAvPgogIDxwYXRoIGQ9Ik0xMiA0djYiIC8+CiAgPHBhdGggZD0iTTIgMThoMjAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/bed-double\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 BedDouble = createLucideIcon('BedDouble', [\n ['path', { d: 'M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8', key: '1k78r4' }],\n ['path', { d: 'M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4', key: 'fb3tl2' }],\n ['path', { d: 'M12 4v6', key: '1dcgq2' }],\n ['path', { d: 'M2 18h20', key: 'ajqnye' }],\n]);\n\nexport default BedDouble;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACzE,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,"file":"zoom-in.js","sources":["../../../src/icons/zoom-in.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ZoomIn\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4IiAvPgogIDxsaW5lIHgxPSIyMSIgeDI9IjE2LjY1IiB5MT0iMjEiIHkyPSIxNi42NSIgLz4KICA8bGluZSB4MT0iMTEiIHgyPSIxMSIgeTE9IjgiIHkyPSIxNCIgLz4KICA8bGluZSB4MT0iOCIgeDI9IjE0IiB5MT0iMTEiIHkyPSIxMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/zoom-in\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 ZoomIn = createLucideIcon('ZoomIn', [\n ['circle', { cx: '11', cy: '11', r: '8', key: '4ej97u' }],\n ['line', { x1: '21', x2: '16.65', y1: '21', y2: '16.65', key: '13gj7c' }],\n ['line', { x1: '11', x2: '11', y1: '8', y2: '14', key: '1vmskp' }],\n ['line', { x1: '8', x2: '14', y1: '11', y2: '11', key: 'durymu' }],\n]);\n\nexport default ZoomIn;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,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;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,25 @@
/**
* @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 Anvil = createLucideIcon("Anvil", [
["path", { d: "M7 10H6a4 4 0 0 1-4-4 1 1 0 0 1 1-1h4", key: "1hjpb6" }],
[
"path",
{ d: "M7 5a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1 7 7 0 0 1-7 7H8a1 1 0 0 1-1-1z", key: "1qn45f" }
],
["path", { d: "M9 12v5", key: "3anwtq" }],
["path", { d: "M15 12v5", key: "5xh3zn" }],
[
"path",
{ d: "M5 20a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3 1 1 0 0 1-1 1H6a1 1 0 0 1-1-1", key: "1fi4x8" }
]
]);
export { Anvil as default };
//# sourceMappingURL=anvil.js.map
@@ -0,0 +1,70 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../router.js");
const require_utils_handler = require("../../utils/handler.js");
//#region src/helper/ssg/utils.ts
/**
* Get dirname
* @param path File Path
* @returns Parent dir path
*/
const dirname = (path) => {
return path.split(/[\/\\]/).slice(0, -1).join("/");
};
const normalizePath = (path) => {
return path.replace(/(\\)/g, "/").replace(/\/$/g, "");
};
const getUncRoot = (path) => {
const uncRoot = path.replace(/\\/g, "/").match(/^\/\/([^/]+)\/([^/]+)/);
if (uncRoot) return `${uncRoot[1].toLowerCase()}/${uncRoot[2].toLowerCase()}`;
};
const handleParent = (resultPaths) => {
if (resultPaths.length === 0 || resultPaths[resultPaths.length - 1] === "..") resultPaths.push("..");
else resultPaths.pop();
};
const handleNonDot = (path, resultPaths) => {
path = path.replace(/^\.(?!.)/, "");
if (path !== "") resultPaths.push(path);
};
const handleSegments = (paths, resultPaths) => {
for (const path of paths) if (path === "..") handleParent(resultPaths);
else handleNonDot(path, resultPaths);
};
const joinPaths = (...paths) => {
const hasUncPrefix = getUncRoot(paths[0]) !== void 0;
paths = paths.map(normalizePath);
const resultPaths = [];
handleSegments(paths.join("/").split("/"), resultPaths);
return (hasUncPrefix ? "//" : paths[0][0] === "/" ? "/" : "") + resultPaths.join("/");
};
const filterStaticGenerateRoutes = (hono) => {
return hono.routes.reduce((acc, { method, handler, path }) => {
const targetHandler = require_utils_handler.findTargetHandler(handler);
if (["GET", "ALL"].includes(method) && !require_utils_handler.isMiddleware(targetHandler)) acc.push({ path });
return acc;
}, []);
};
const isDynamicRoute = (path) => {
return path.split("/").some((segment) => segment.startsWith(":") || segment.includes("*"));
};
const toSegments = (path) => path === "" ? [] : path.split("/");
const getPathRoot = (path) => {
const normalizedPath = path.replace(/\\/g, "/");
const uncRoot = getUncRoot(normalizedPath);
if (uncRoot) return `unc:${uncRoot}`;
const driveRoot = normalizedPath.match(/^([A-Za-z]):/);
if (driveRoot) return `${normalizedPath[2] === "/" ? "drive-absolute" : "drive-relative"}:${driveRoot[1].toLowerCase()}`;
return normalizedPath.startsWith("/") ? "absolute" : "relative";
};
const ensureWithinOutDir = (outDir, filePath) => {
const outDirSegments = toSegments(joinPaths(outDir));
const filePathSegments = toSegments(joinPaths(filePath));
const hasMismatchedPathRoot = getPathRoot(outDir) !== getPathRoot(filePath);
const climbsAboveOutDir = filePathSegments[outDirSegments.length] === "..";
if (hasMismatchedPathRoot || filePathSegments.length <= outDirSegments.length || !outDirSegments.every((segment, i) => segment === filePathSegments[i]) || climbsAboveOutDir) throw new Error(`Path traversal detected: "${filePath}" is outside the output directory`);
};
//#endregion
exports.dirname = dirname;
exports.ensureWithinOutDir = ensureWithinOutDir;
exports.filterStaticGenerateRoutes = filterStaticGenerateRoutes;
exports.isDynamicRoute = isDynamicRoute;
exports.joinPaths = joinPaths;
@@ -0,0 +1,6 @@
function getType(value) {
return Object.prototype.toString.call(value).slice(8, -1);
}
export {
getType
};
@@ -0,0 +1,20 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const GitCompareArrows = createLucideIcon("GitCompareArrows", [
["circle", { cx: "5", cy: "6", r: "3", key: "1qnov2" }],
["path", { d: "M12 6h5a2 2 0 0 1 2 2v7", key: "1yj91y" }],
["path", { d: "m15 9-3-3 3-3", key: "1lwv8l" }],
["circle", { cx: "19", cy: "18", r: "3", key: "1qljk2" }],
["path", { d: "M12 18H7a2 2 0 0 1-2-2V9", key: "16sdep" }],
["path", { d: "m9 15 3 3-3 3", key: "1m3kbl" }]
]);
export { GitCompareArrows as default };
//# sourceMappingURL=git-compare-arrows.js.map
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/visually-hidden.tsx"],
"sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * VisuallyHidden\n * -----------------------------------------------------------------------------------------------*/\n\nconst VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: 'absolute',\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n}) satisfies React.CSSProperties;\n\nconst NAME = 'VisuallyHidden';\n\ntype VisuallyHiddenElement = React.ComponentRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface VisuallyHiddenProps extends PrimitiveSpanProps {}\n\nconst VisuallyHidden = React.forwardRef<VisuallyHiddenElement, VisuallyHiddenProps>(\n (props, forwardedRef) => {\n return (\n <Primitive.span\n {...props}\n ref={forwardedRef}\n style={{ ...VISUALLY_HIDDEN_STYLES, ...props.style }}\n />\n );\n }\n);\n\nVisuallyHidden.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = VisuallyHidden;\n\nexport {\n VisuallyHidden,\n //\n Root,\n //\n VISUALLY_HIDDEN_STYLES,\n};\nexport type { VisuallyHiddenProps };\n"],
"mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AA6BpB;AAvBN,IAAM,yBAAyB,OAAO,OAAO;AAAA;AAAA,EAE3C,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,UAAU;AACZ,CAAC;AAED,IAAM,OAAO;AAMb,IAAM,iBAAuB;AAAA,EAC3B,CAAC,OAAO,iBAAiB;AACvB,WACE;AAAA,MAAC,UAAU;AAAA,MAAV;AAAA,QACE,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,OAAO,EAAE,GAAG,wBAAwB,GAAG,MAAM,MAAM;AAAA;AAAA,IACrD;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;AAI7B,IAAM,OAAO;",
"names": []
}
@@ -0,0 +1,8 @@
import { cubicBezier } from './cubic-bezier.mjs';
const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);
const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);
const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);
export { easeIn, easeInOut, easeOut };
//# sourceMappingURL=ease.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"helpers.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["helpers.ts"],"names":[],"mappings":";;;AAUA,sCA6BC;AAuCD,0DA+CC;AAWD,gCAcC;AAtJD,yCAA8D;AAE9D;;;;;;;GAOG;AACH,SAAgB,aAAa,CAAC,KAAgB;IAC1C,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;IAEvB;;;OAGG;IACH,OAAO,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAChB,IAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QAExB;;;;WAIG;QACH,IAAI,GAAG,GAAG,CAAC,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;YACnD,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACrB,SAAS;QACb,CAAC;QAED,KAAK,IAAI,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,QAA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A1B,CAA0B,CAAC,CAAC;IAEnE,KAAK,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC;QACZ,IAAM,QAAQ,GAAG,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC/C,IAAI,QAAQ,GAAG,gBAAgB,CAAC,SAAS,EAAE,CAAC;YACxC,OAAO,CAAC,CAAC,CAAC;QACd,CAAC;aAAM,IAAI,QAAQ,GAAG,gBAAgB,CAAC,SAAS,EAAE,CAAC;YAC/C,OAAO,CAAC,CAAC;QACb,CAAC;QACD,OAAO,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACjB,CAAC"}
@@ -0,0 +1,182 @@
import {ContextualKeyword} from "../parser/tokenizer/keywords";
import {TokenType as tt} from "../parser/tokenizer/types";
import Transformer from "./Transformer";
export default class FlowTransformer extends Transformer {
constructor(
rootTransformer,
tokens,
isImportsTransformEnabled,
) {
super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.isImportsTransformEnabled = isImportsTransformEnabled;;
}
process() {
if (
this.rootTransformer.processPossibleArrowParamEnd() ||
this.rootTransformer.processPossibleAsyncArrowWithTypeParams() ||
this.rootTransformer.processPossibleTypeRange()
) {
return true;
}
if (this.tokens.matches1(tt._enum)) {
this.processEnum();
return true;
}
if (this.tokens.matches2(tt._export, tt._enum)) {
this.processNamedExportEnum();
return true;
}
if (this.tokens.matches3(tt._export, tt._default, tt._enum)) {
this.processDefaultExportEnum();
return true;
}
return false;
}
/**
* Handle a declaration like:
* export enum E ...
*
* With this imports transform, this becomes:
* const E = [[enum]]; exports.E = E;
*
* otherwise, it becomes:
* export const E = [[enum]];
*/
processNamedExportEnum() {
if (this.isImportsTransformEnabled) {
// export
this.tokens.removeInitialToken();
const enumName = this.tokens.identifierNameAtRelativeIndex(1);
this.processEnum();
this.tokens.appendCode(` exports.${enumName} = ${enumName};`);
} else {
this.tokens.copyToken();
this.processEnum();
}
}
/**
* Handle a declaration like:
* export default enum E
*
* With the imports transform, this becomes:
* const E = [[enum]]; exports.default = E;
*
* otherwise, it becomes:
* const E = [[enum]]; export default E;
*/
processDefaultExportEnum() {
// export
this.tokens.removeInitialToken();
// default
this.tokens.removeToken();
const enumName = this.tokens.identifierNameAtRelativeIndex(1);
this.processEnum();
if (this.isImportsTransformEnabled) {
this.tokens.appendCode(` exports.default = ${enumName};`);
} else {
this.tokens.appendCode(` export default ${enumName};`);
}
}
/**
* Transpile flow enums to invoke the "flow-enums-runtime" library.
*
* Currently, the transpiled code always uses `require("flow-enums-runtime")`,
* but if future flexibility is needed, we could expose a config option for
* this string (similar to configurable JSX). Even when targeting ESM, the
* default behavior of babel-plugin-transform-flow-enums is to use require
* rather than injecting an import.
*
* Flow enums are quite a bit simpler than TS enums and have some convenient
* constraints:
* - Element initializers must be either always present or always absent. That
* means that we can use fixed lookahead on the first element (if any) and
* assume that all elements are like that.
* - The right-hand side of an element initializer must be a literal value,
* not a complex expression and not referencing other elements. That means
* we can simply copy a single token.
*
* Enums can be broken up into three basic cases:
*
* Mirrored enums:
* enum E {A, B}
* ->
* const E = require("flow-enums-runtime").Mirrored(["A", "B"]);
*
* Initializer enums:
* enum E {A = 1, B = 2}
* ->
* const E = require("flow-enums-runtime")({A: 1, B: 2});
*
* Symbol enums:
* enum E of symbol {A, B}
* ->
* const E = require("flow-enums-runtime")({A: Symbol("A"), B: Symbol("B")});
*
* We can statically detect which of the three cases this is by looking at the
* "of" declaration (if any) and seeing if the first element has an initializer.
* Since the other transform details are so similar between the three cases, we
* use a single implementation and vary the transform within processEnumElement
* based on case.
*/
processEnum() {
// enum E -> const E
this.tokens.replaceToken("const");
this.tokens.copyExpectedToken(tt.name);
let isSymbolEnum = false;
if (this.tokens.matchesContextual(ContextualKeyword._of)) {
this.tokens.removeToken();
isSymbolEnum = this.tokens.matchesContextual(ContextualKeyword._symbol);
this.tokens.removeToken();
}
const hasInitializers = this.tokens.matches3(tt.braceL, tt.name, tt.eq);
this.tokens.appendCode(' = require("flow-enums-runtime")');
const isMirrored = !isSymbolEnum && !hasInitializers;
this.tokens.replaceTokenTrimmingLeftWhitespace(isMirrored ? ".Mirrored([" : "({");
while (!this.tokens.matches1(tt.braceR)) {
// ... is allowed at the end and has no runtime behavior.
if (this.tokens.matches1(tt.ellipsis)) {
this.tokens.removeToken();
break;
}
this.processEnumElement(isSymbolEnum, hasInitializers);
if (this.tokens.matches1(tt.comma)) {
this.tokens.copyToken();
}
}
this.tokens.replaceToken(isMirrored ? "]);" : "});");
}
/**
* Process an individual enum element, producing either an array element or an
* object element based on what type of enum this is.
*/
processEnumElement(isSymbolEnum, hasInitializers) {
if (isSymbolEnum) {
// Symbol enums never have initializers and are expanded to object elements.
// A, -> A: Symbol("A"),
const elementName = this.tokens.identifierName();
this.tokens.copyToken();
this.tokens.appendCode(`: Symbol("${elementName}")`);
} else if (hasInitializers) {
// Initializers are expanded to object elements.
// A = 1, -> A: 1,
this.tokens.copyToken();
this.tokens.replaceTokenTrimmingLeftWhitespace(":");
this.tokens.copyToken();
} else {
// Enum elements without initializers become string literal array elements.
// A, -> "A",
this.tokens.replaceToken(`"${this.tokens.identifierName()}"`);
}
}
}
@@ -0,0 +1,47 @@
'use strict';
// See http://www.robvanderwoude.com/escapechars.php
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
function escapeCommand(arg) {
// Escape meta chars
arg = arg.replace(metaCharsRegExp, '^$1');
return arg;
}
function escapeArgument(arg, doubleEscapeMetaChars) {
// Convert to string
arg = `${arg}`;
// Algorithm below is based on https://qntm.org/cmd
// It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input
// Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information
// Sequence of backslashes followed by a double quote:
// double up all the backslashes and escape the double quote
arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
// Sequence of backslashes followed by the end of the string
// (which will become a double quote later):
// double up all the backslashes
arg = arg.replace(/(?=(\\+?)?)\1$/, '$1$1');
// All other backslashes occur literally
// Quote the whole thing:
arg = `"${arg}"`;
// Escape meta chars
arg = arg.replace(metaCharsRegExp, '^$1');
// Double escape meta chars if necessary
if (doubleEscapeMetaChars) {
arg = arg.replace(metaCharsRegExp, '^$1');
}
return arg;
}
module.exports.command = escapeCommand;
module.exports.argument = escapeArgument;
@@ -0,0 +1,48 @@
{
"name": "@tailwindcss/node",
"version": "4.2.2",
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/tailwindlabs/tailwindcss.git",
"directory": "packages/@tailwindcss-node"
},
"bugs": "https://github.com/tailwindlabs/tailwindcss/issues",
"homepage": "https://tailwindcss.com",
"files": [
"dist/"
],
"publishConfig": {
"provenance": true,
"access": "public"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./require-cache": {
"types": "./dist/require-cache.d.ts",
"default": "./dist/require-cache.js"
},
"./esm-cache-loader": {
"types": "./dist/esm-cache.loader.d.mts",
"default": "./dist/esm-cache.loader.mjs"
}
},
"dependencies": {
"@jridgewell/remapping": "^2.3.5",
"enhanced-resolve": "^5.19.0",
"jiti": "^2.6.1",
"lightningcss": "1.32.0",
"magic-string": "^0.30.21",
"source-map-js": "^1.2.1",
"tailwindcss": "4.2.2"
},
"scripts": {
"build": "tsup-node",
"dev": "pnpm run build -- --watch"
}
}
@@ -0,0 +1,33 @@
import type { NodeWithParent, TSESTree } from '@typescript-eslint/types';
import type { DefinitionType } from './DefinitionType';
export declare abstract class DefinitionBase<Type extends DefinitionType, Node extends NodeWithParent, Parent extends TSESTree.Node | null, Name extends TSESTree.Node> {
/**
* A unique ID for this instance - primarily used to help debugging and testing
*/
readonly $id: number;
readonly type: Type;
/**
* The `Identifier` node of this definition
* @public
*/
readonly name: Name;
/**
* The enclosing node of the name.
* @public
*/
readonly node: Node;
/**
* the enclosing statement node of the identifier.
* @public
*/
readonly parent: Parent;
constructor(type: Type, name: Name, node: Node, parent: Parent);
/**
* `true` if the variable is valid in a type context, false otherwise
*/
abstract readonly isTypeDefinition: boolean;
/**
* `true` if the variable is valid in a value context, false otherwise
*/
abstract readonly isVariableDefinition: boolean;
}
@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isKeyword = isKeyword;
exports.isReservedWord = isReservedWord;
exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
exports.isStrictBindReservedWord = isStrictBindReservedWord;
exports.isStrictReservedWord = isStrictReservedWord;
const reservedWords = {
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
strictBind: ["eval", "arguments"]
};
const keywords = new Set(reservedWords.keyword);
const reservedWordsStrictSet = new Set(reservedWords.strict);
const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
function isReservedWord(word, inModule) {
return inModule && word === "await" || word === "enum";
}
function isStrictReservedWord(word, inModule) {
return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
}
function isStrictBindOnlyReservedWord(word) {
return reservedWordsStrictBindSet.has(word);
}
function isStrictBindReservedWord(word, inModule) {
return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
}
function isKeyword(word) {
return keywords.has(word);
}
//# sourceMappingURL=keyword.js.map
@@ -0,0 +1,32 @@
const isCompactDoubleQuotedString = (string) => {
return !string.match(/[\x00-\x1f\u2028\u2029\\"]/);
};
const compressWithPrefix = (parsed) => {
if (!Array.isArray(parsed)) {
return parsed;
}
if (!parsed.every(
(entry) => typeof entry === "string" && isCompactDoubleQuotedString(entry)
)) {
return parsed;
}
const deltas = [];
let last = "";
parsed.forEach((entry) => {
let prefixLen = 0;
const maxPrefixLen = Math.min(entry.length, last.length, 25);
while (prefixLen < maxPrefixLen && entry.charAt(prefixLen) === last.charAt(prefixLen)) {
prefixLen += 1;
}
deltas.push(String.fromCharCode(65 + prefixLen) + entry.slice(prefixLen));
last = entry;
});
return deltas.join("");
};
function compress(data) {
return compressWithPrefix(data);
}
export {
compress as default
};
//# sourceMappingURL=compress.mjs.map
@@ -0,0 +1,424 @@
export default `flf2a? 4 3 9 0 12 0 64 0
Name : Heart Right
Author : LG Beard
Date : 2004/1/15 15:41:27
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.

.-.-. 
'._.' 

.-.-. 
'. ! ) 
).' 

.-.-. 
'. " ) 
).' 

.-.-. 
'. # ) 
).' 

.-.-. 
'. $ ) 
).' 

.-.-. 
'. % ) 
).' 

.-.-. 
'. & ) 
).' 

.-.-. 
'. ' ) 
).' 

.-.-. 
'. ( ) 
).' 

.-.-. 
'. ) ) 
).' 

.-.-. 
'. * ) 
).' 

.-.-. 
'. + ) 
).' 

.-.-. 
'. , ) 
).' 

.-.-. 
'. - ) 
).' 

.-.-. 
'. . ) 
).' 

.-.-. 
'. / ) 
).' 

.-.-. 
'. 0 ) 
).' 

.-.-. 
'. 1 ) 
).' 

.-.-. 
'. 2 ) 
).' 

.-.-. 
'. 3 ) 
).' 

.-.-. 
'. 4 ) 
).' 

.-.-. 
'. 5 ) 
).' 

.-.-. 
'. 6 ) 
).' 

.-.-. 
'.7 ) 
).' 

.-.-. 
'. 8 ) 
).' 

.-.-. 
'. 9 ) 
).' 

.-.-. 
'. : ) 
).' 

.-.-. 
'. ; ) 
).' 

.-.-. 
'. < ) 
).' 

.-.-. 
'. = ) 
).' 

.-.-. 
'. > ) 
).' 

.-.-. 
'. ? ) 
).' 

.-.-. 
'. @ ) 
).' 

.-.-. 
'. A ) 
).' 

.-.-. 
'. B ) 
).' 

.-.-. 
'. C ) 
).' 

.-.-. 
'. D ) 
).' 

.-.-. 
'. E ) 
).' 

.-.-. 
'. F ) 
).' 

.-.-. 
'. G ) 
).' 

.-.-. 
'. H ) 
).' 

.-.-. 
'. I ) 
).' 

.-.-. 
'. J ) 
).' 

.-.-. 
'. K ) 
).' 

.-.-. 
'. L ) 
).' 

.-.-. 
'. M ) 
).' 

.-.-. 
'. N ) 
).' 

.-.-. 
'. O ) 
).' 

.-.-. 
'. P ) 
).' 

.-.-. 
'. Q ) 
).' 

.-.-. 
'. R ) 
).' 

.-.-. 
'. S ) 
).' 

.-.-. 
'. T ) 
).' 

.-.-. 
'. U ) 
).' 

.-.-. 
'. V ) 
).' 

.-.-. 
'. W ) 
).' 

.-.-. 
'. X ) 
).' 

.-.-. 
'. Y ) 
).' 

.-.-. 
'. Z ) 
).' 

.-.-. 
'. [ ) 
).' 

.-.-. 
'. \\ ) 
).' 

.-.-. 
'. ] ) 
).' 

.-.-. 
'. ^ ) 
).' 

.-.-. 
'. _ ) 
).' 

.-.-. 
'. \` ) 
).' 

.-.-. 
'. a ) 
).' 

.-.-. 
'. b ) 
).' 

.-.-. 
'. c ) 
).' 

.-.-. 
'. d ) 
).' 

.-.-. 
'. e ) 
).' 

.-.-. 
'. f ) 
).' 

.-.-. 
'. g ) 
).' 

.-.-. 
'. h ) 
).' 

.-.-. 
'. i ) 
).' 

.-.-. 
'. j ) 
).' 

.-.-. 
'. k ) 
).' 

.-.-. 
'. l ) 
).' 

.-.-. 
'. m ) 
).' 

.-.-. 
'. n ) 
).' 

.-.-. 
'. o ) 
).' 

.-.-. 
'. p ) 
).' 

.-.-. 
'. q ) 
).' 

.-.-. 
'. r ) 
).' 

.-.-. 
'. s ) 
).' 

.-.-. 
'. t ) 
).' 

.-.-. 
'. u ) 
).' 

.-.-. 
'. v ) 
).' 

.-.-. 
'. w ) 
).' 

.-.-. 
'. x ) 
).' 

.-.-. 
'. y ) 
).' 

.-.-. 
'. z ) 
).' 

.-.-. 
'. { ) 
).' 

.-.-. 
'. | ) 
).' 

.-.-. 
'. } ) 
).' 

.-.-. 
'. ~ ) 
).' 

.-.-. 
'. A ) 
).' 

.-.-. 
'. O ) 
).' 

.-.-. 
'. U ) 
).' 

.-.-. 
'. a ) 
).' 

.-.-. 
'. o ) 
).' 

.-.-. 
'. u ) 
).' 


.-.-. 
'._.' 

`
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const GitPullRequestCreate = createLucideIcon("GitPullRequestCreate", [
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
["path", { d: "M6 9v12", key: "1sc30k" }],
["path", { d: "M13 6h3a2 2 0 0 1 2 2v3", key: "1jb6z3" }],
["path", { d: "M18 15v6", key: "9wciyi" }],
["path", { d: "M21 18h-6", key: "139f0c" }]
]);
export { GitPullRequestCreate as default };
//# sourceMappingURL=git-pull-request-create.js.map
@@ -0,0 +1,20 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _types = require('../parser/tokenizer/types');
var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer);
class NumericSeparatorTransformer extends _Transformer2.default {
constructor( tokens) {
super();this.tokens = tokens;;
}
process() {
if (this.tokens.matches1(_types.TokenType.num)) {
const code = this.tokens.currentTokenCode();
if (code.includes("_")) {
this.tokens.replaceToken(code.replace(/_/g, ""));
return true;
}
}
return false;
}
} exports.default = NumericSeparatorTransformer;
@@ -0,0 +1,53 @@
// @ts-ignore TS6133
import { test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
test("branded types", () => {
const mySchema = z
.object({
name: z.string(),
})
.brand<"superschema">();
// simple branding
type MySchema = z.infer<typeof mySchema>;
util.assertEqual<MySchema, { name: string } & { [z.BRAND]: { superschema: true } }>(true);
const doStuff = (arg: MySchema) => arg;
doStuff(mySchema.parse({ name: "hello there" }));
// inheritance
const extendedSchema = mySchema.brand<"subschema">();
type ExtendedSchema = z.infer<typeof extendedSchema>;
util.assertEqual<ExtendedSchema, { name: string } & z.BRAND<"superschema"> & z.BRAND<"subschema">>(true);
doStuff(extendedSchema.parse({ name: "hello again" }));
// number branding
const numberSchema = z.number().brand<42>();
type NumberSchema = z.infer<typeof numberSchema>;
util.assertEqual<NumberSchema, number & { [z.BRAND]: { 42: true } }>(true);
// symbol branding
const MyBrand: unique symbol = Symbol("hello");
type MyBrand = typeof MyBrand;
const symbolBrand = z.number().brand<"sup">().brand<typeof MyBrand>();
type SymbolBrand = z.infer<typeof symbolBrand>;
// number & { [z.BRAND]: { sup: true, [MyBrand]: true } }
util.assertEqual<SymbolBrand, number & z.BRAND<"sup"> & z.BRAND<MyBrand>>(true);
// keeping brands out of input types
const age = z.number().brand<"age">();
type Age = z.infer<typeof age>;
type AgeInput = z.input<typeof age>;
util.assertEqual<AgeInput, Age>(false);
util.assertEqual<number, AgeInput>(true);
util.assertEqual<number & z.BRAND<"age">, Age>(true);
// @ts-expect-error
doStuff({ name: "hello there!" });
});
@@ -0,0 +1 @@
{"version":3,"file":"list-plus.js","sources":["../../../src/icons/list-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ListPlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTEgMTJIMyIgLz4KICA8cGF0aCBkPSJNMTYgNkgzIiAvPgogIDxwYXRoIGQ9Ik0xNiAxOEgzIiAvPgogIDxwYXRoIGQ9Ik0xOCA5djYiIC8+CiAgPHBhdGggZD0iTTIxIDEyaC02IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/list-plus\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 ListPlus = createLucideIcon('ListPlus', [\n ['path', { d: 'M11 12H3', key: '51ecnj' }],\n ['path', { d: 'M16 6H3', key: '1wxfjs' }],\n ['path', { d: 'M16 18H3', key: '12xzn7' }],\n ['path', { d: 'M18 9v6', key: '1twb98' }],\n ['path', { d: 'M21 12h-6', key: 'bt1uis' }],\n]);\n\nexport default ListPlus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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 @@
module.exports={C:{"78":0.00385,"81":0.00385,"92":0.00385,"115":0.27349,"120":0.00385,"121":0.01156,"127":0.0077,"128":0.0077,"137":0.00385,"140":0.4892,"146":0.0077,"147":0.01926,"148":0.00385,"149":0.00385,"150":0.01926,"151":0.02311,"152":0.02696,"153":0.06548,"154":0.21956,"155":1.75651,"156":1.19027,"157":0.02311,"158":0.0077,_:"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 79 80 82 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 109 110 111 112 113 114 116 117 118 119 122 123 124 125 126 129 130 131 132 133 134 135 136 138 139 141 142 143 144 145 159 160 3.5 3.6"},D:{"88":0.00385,"93":0.00385,"103":0.02696,"104":0.0077,"105":0.0077,"107":0.0077,"108":0.02311,"109":0.37364,"111":0.0077,"112":0.01156,"114":0.0077,"116":0.05008,"117":0.0077,"118":0.06934,"119":0.01541,"120":0.03082,"122":0.01156,"123":0.00385,"124":0.01926,"128":0.03852,"131":0.05008,"133":0.04237,"134":0.04622,"135":0.07319,"136":0.06934,"137":0.05393,"138":0.06163,"139":0.03467,"140":0.06163,"141":0.06548,"142":0.16564,"143":0.01541,"144":0.01156,"145":0.0077,"146":0.02311,"147":0.02311,"148":0.11171,"149":0.0886,"150":0.60091,"151":0.98226,"152":6.77952,"153":5.0076,"154":2.26112,"155":0.0077,_:"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 83 84 85 86 87 89 90 91 92 94 95 96 97 98 99 100 101 102 106 110 113 115 121 125 126 127 129 130 132 156 157"},F:{"46":0.00385,"95":0.00385,"113":0.00385,"132":0.00385,"134":0.15408,"135":0.43913,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 114 115 116 117 118 119 120 121 122 123 124 125 126 127 131 133 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"109":0.0077,"119":0.00385,"120":0.0077,"135":0.00385,"139":0.0077,"142":0.00385,"144":0.00385,"145":0.0077,"146":0.00385,"147":0.0077,"148":0.02311,"150":0.02311,"151":0.13097,"152":2.34202,"153":2.01845,"154":0.35824,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 121 122 123 124 125 126 127 128 129 130 131 132 133 134 136 137 138 140 141 143 149"},E:{"13":0.00385,"14":0.05393,"27":0.10015,_:"4 5 6 7 8 9 10 11 12 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 15.1 15.2-15.3 15.4 17.0 18.2 26.0 27.1 TP","11.1":0.0077,"12.1":0.0077,"13.1":0.03467,"14.1":0.01156,"15.5":0.01926,"15.6":0.14638,"16.0":0.01156,"16.1":0.2889,"16.2":0.0077,"16.3":0.06163,"16.4":0.02311,"16.5":0.04237,"16.6":0.74344,"17.1":0.78196,"17.2":0.0077,"17.3":0.01541,"17.4":0.03467,"17.5":0.06934,"17.6":0.84744,"18.0":0.00385,"18.1":0.01156,"18.3":0.01156,"18.4":0.00385,"18.5-18.7":0.104,"26.1":0.02696,"26.2":0.04622,"26.3":0.06163,"26.4":0.21186,"26.5":0.7781,"26.6":3.0739,"27.2":0.01541},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.0023,"5.0-5.1":0.0023,"6.0-6.1":0,"7.0-7.1":0.00459,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.02295,"11.0-11.2":0.0023,"11.3-11.4":0.00459,"12.0-12.1":0,"12.2-12.5":0.05967,"13.0-13.1":0,"13.2":0.01148,"13.3":0,"13.4-13.7":0.0023,"14.0-14.4":0.00918,"14.5-14.8":0.01377,"15.0-15.1":0.01377,"15.2-15.3":0.00918,"15.4":0.01148,"15.5":0.01377,"15.6-15.8":0.29836,"16.0":0.02295,"16.1":0.04131,"16.2":0.02295,"16.3":0.05049,"16.4":0.01148,"16.5":0.01836,"16.6-16.7":0.4154,"17.0":0.01607,"17.1":0.02295,"17.2":0.02295,"17.3":0.03443,"17.4":0.0482,"17.5":0.0941,"17.6-17.7":0.24328,"18.0":0.05049,"18.1":0.10098,"18.2":0.1377,"18.3":0.23869,"18.4":0.14918,"18.5-18.7":3.08225,"26.0":0.14918,"26.1":0.15147,"26.2":0.39475,"26.3":0.42688,"26.4":0.31213,"26.5":2.09079,"26.6":12.90047,"27.0":0.98917,"27.1":0,"27.2":0.02525},P:{"25":0.00971,"26":0.01942,"27":0.01942,"28":0.04854,"29":0.03883,"30":2.56305,_:"4 20 21 22 23 24 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.01229,"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.06763,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.00385,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":36.50116},R:{_:"0"},M:{"0":0.63939},Q:{_:"14.9"},O:{"0":0.01844},H:{all:0}};
@@ -0,0 +1,149 @@
import { d as safeReplaceTextBetween, f as createRule, g as import_ast_utils } from "../utils.js";
var function_paren_newline_default = createRule({
name: "function-paren-newline",
meta: {
type: "layout",
docs: { description: "Enforce consistent line breaks inside function parentheses" },
fixable: "whitespace",
schema: [{ oneOf: [{
type: "string",
enum: [
"always",
"never",
"consistent",
"multiline",
"multiline-arguments"
]
}, {
type: "object",
properties: { minItems: {
type: "integer",
minimum: 0
} },
additionalProperties: false
}] }],
defaultOptions: ["multiline"],
messages: {
expectedBefore: "Expected newline before ')'.",
expectedAfter: "Expected newline after '('.",
expectedBetween: "Expected newline between arguments/params.",
unexpectedBefore: "Unexpected newline before ')'.",
unexpectedAfter: "Unexpected newline after '('."
}
},
create(context, [rawOption]) {
const sourceCode = context.sourceCode;
const multilineOption = rawOption === "multiline";
const multilineArgumentsOption = rawOption === "multiline-arguments";
const consistentOption = rawOption === "consistent";
let minItems;
if (typeof rawOption === "object") minItems = rawOption.minItems;
else if (rawOption === "always") minItems = 0;
else if (rawOption === "never") minItems = Infinity;
function shouldHaveNewlines(elements, hasLeftNewline) {
if (multilineArgumentsOption && elements.length === 1) return hasLeftNewline;
if (multilineOption || multilineArgumentsOption) return elements.some((element, index) => index !== elements.length - 1 && !(0, import_ast_utils.isTokenOnSameLine)(element, elements[index + 1]));
if (consistentOption) return hasLeftNewline;
return minItems == null || elements.length >= minItems;
}
function validateParens(parens, elements) {
const leftParen = parens.leftParen;
const rightParen = parens.rightParen;
const tokenAfterLeftParen = sourceCode.getTokenAfter(leftParen);
const tokenBeforeRightParen = sourceCode.getTokenBefore(rightParen);
const hasLeftNewline = !(0, import_ast_utils.isTokenOnSameLine)(leftParen, tokenAfterLeftParen);
const hasRightNewline = !(0, import_ast_utils.isTokenOnSameLine)(tokenBeforeRightParen, rightParen);
const needsNewlines = shouldHaveNewlines(elements, hasLeftNewline);
if (hasLeftNewline && !needsNewlines) context.report({
node: leftParen,
messageId: "unexpectedAfter",
fix: safeReplaceTextBetween(sourceCode, leftParen, tokenAfterLeftParen, "")
});
else if (!hasLeftNewline && needsNewlines) context.report({
node: leftParen,
messageId: "expectedAfter",
fix: (fixer) => fixer.insertTextAfter(leftParen, "\n")
});
if (hasRightNewline && !needsNewlines) context.report({
node: rightParen,
messageId: "unexpectedBefore",
fix: safeReplaceTextBetween(sourceCode, tokenBeforeRightParen, rightParen, "")
});
else if (!hasRightNewline && needsNewlines) context.report({
node: rightParen,
messageId: "expectedBefore",
fix: (fixer) => fixer.insertTextBefore(rightParen, "\n")
});
}
function validateArguments(parens, elements) {
const leftParen = parens.leftParen;
const needsNewlines = shouldHaveNewlines(elements, !(0, import_ast_utils.isTokenOnSameLine)(leftParen, sourceCode.getTokenAfter(leftParen)));
for (let i = 0; i <= elements.length - 2; i++) {
const currentElement = elements[i];
const nextElement = elements[i + 1];
if (!!(0, import_ast_utils.isTokenOnSameLine)(currentElement, nextElement) && needsNewlines) context.report({
node: currentElement,
messageId: "expectedBetween",
fix: (fixer) => fixer.insertTextBefore(nextElement, "\n")
});
}
}
function getParenTokens(node) {
const isOpeningParenTokenOutsideTypeParameter = () => {
let typeParameterOpeningLevel = 0;
return (token) => {
if (token.type === "Punctuator" && token.value === "<") typeParameterOpeningLevel += 1;
if (token.type === "Punctuator" && token.value === ">") typeParameterOpeningLevel -= 1;
return typeParameterOpeningLevel !== 0 ? false : (0, import_ast_utils.isOpeningParenToken)(token);
};
};
switch (node.type) {
case "NewExpression": if (!node.arguments.length && !((0, import_ast_utils.isOpeningParenToken)(sourceCode.getLastToken(node, { skip: 1 })) && (0, import_ast_utils.isClosingParenToken)(sourceCode.getLastToken(node)) && node.callee.range[1] < node.range[1])) return null;
case "CallExpression": return {
leftParen: sourceCode.getTokenAfter(node.callee, isOpeningParenTokenOutsideTypeParameter()),
rightParen: sourceCode.getLastToken(node)
};
case "FunctionDeclaration":
case "FunctionExpression": {
const leftParen = sourceCode.getFirstToken(node, isOpeningParenTokenOutsideTypeParameter());
return {
leftParen,
rightParen: node.params.length ? sourceCode.getTokenAfter(node.params[node.params.length - 1], import_ast_utils.isClosingParenToken) : sourceCode.getTokenAfter(leftParen)
};
}
case "ArrowFunctionExpression": {
const firstToken = sourceCode.getFirstToken(node, { skip: node.async ? 1 : 0 });
if (!(0, import_ast_utils.isOpeningParenToken)(firstToken)) return null;
return {
leftParen: firstToken,
rightParen: node.params.length ? sourceCode.getTokenAfter(node.params[node.params.length - 1], import_ast_utils.isClosingParenToken) : sourceCode.getTokenAfter(firstToken)
};
}
case "ImportExpression": return {
leftParen: sourceCode.getFirstToken(node, 1),
rightParen: sourceCode.getLastToken(node)
};
default: throw new TypeError(`unexpected node with type ${node.type}`);
}
}
return { [[
"ArrowFunctionExpression",
"CallExpression",
"FunctionDeclaration",
"FunctionExpression",
"ImportExpression",
"NewExpression"
].join(", ")](node) {
const parens = getParenTokens(node);
let params;
if (node.type === "ImportExpression") params = [node.source, ...node.options ? [node.options] : []];
else if ((0, import_ast_utils.isFunction)(node)) params = node.params;
else params = node.arguments;
if (parens) {
validateParens(parens, params);
if (multilineArgumentsOption) validateArguments(parens, params);
}
} };
}
});
export { function_paren_newline_default as t };
@@ -0,0 +1 @@
{"version":3,"file":"scissors.js","sources":["../../../src/icons/scissors.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Scissors\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSI2IiBjeT0iNiIgcj0iMyIgLz4KICA8cGF0aCBkPSJNOC4xMiA4LjEyIDEyIDEyIiAvPgogIDxwYXRoIGQ9Ik0yMCA0IDguMTIgMTUuODgiIC8+CiAgPGNpcmNsZSBjeD0iNiIgY3k9IjE4IiByPSIzIiAvPgogIDxwYXRoIGQ9Ik0xNC44IDE0LjggMjAgMjAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/scissors\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 Scissors = createLucideIcon('Scissors', [\n ['circle', { cx: '6', cy: '6', r: '3', key: '1lh9wr' }],\n ['path', { d: 'M8.12 8.12 12 12', key: '1alkpv' }],\n ['path', { d: 'M20 4 8.12 15.88', key: 'xgtan2' }],\n ['circle', { cx: '6', cy: '18', r: '3', key: 'fqmcym' }],\n ['path', { d: 'M14.8 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A,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,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;AACnD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,21 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference lib="es2020" />
/// <reference lib="es2021.promise" />
/// <reference lib="es2021.string" />
/// <reference lib="es2021.weakref" />
/// <reference lib="es2021.intl" />
@@ -0,0 +1 @@
module.exports={A:{A:{"388":"_A","900":"_Z"},B:{"388":"_I","641":"_0H _i","900":"_FB _VG"},C:{"772":"_BQ _WC","900":"_o _vD _L"},D:{"641":"_0H _l","900":"_OR"},E:{"772":"A","900":"_UC _0I _WH _VH"},F:{"16":"_mB","129":"_6Q","641":"_ES","900":"_MC _7G"},G:{"900":"_M"},H:{"129":"1D"},I:{"641":"I","900":"_G"},J:{"900":"_B"},K:{"129":"_D","641":"H"},L:{"900":"I"},M:{"772":"YC"},N:{"388":"_A"},O:{"900":"bC"},P:{"641":"_6B","900":"_IL"},Q:{"900":"JE"},R:{"900":"KE"},S:{"772":"ME","900":"LE"}},B:2,C:"CSS page-break properties",D:true};
@@ -0,0 +1,25 @@
{
"name": "eslint-plugin-react-refresh",
"description": "Validate that your components can safely be updated with Fast Refresh",
"version": "0.5.2",
"type": "module",
"author": "Arnaud Barré (https://github.com/ArnaudBarre)",
"license": "MIT",
"repository": "github:ArnaudBarre/eslint-plugin-react-refresh",
"exports": {
".": {
"types": "./index.d.ts",
"default": "./index.js"
}
},
"keywords": [
"eslint",
"eslint-plugin",
"react",
"react-refresh",
"fast refresh"
],
"peerDependencies": {
"eslint": "^9 || ^10"
}
}
@@ -0,0 +1,305 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test("enum from string array", () => {
const MyEnum = z.enum(["Red", "Green", "Blue"]);
expect(MyEnum.enum.Red).toEqual("Red");
type MyEnum = z.infer<typeof MyEnum>;
expectTypeOf<MyEnum>().toEqualTypeOf<"Red" | "Green" | "Blue">();
});
test("enum from const object", () => {
const Fruits: { Apple: "apple"; Banana: "banana" } = {
Apple: "apple",
Banana: "banana",
};
const fruitEnum = z.nativeEnum(Fruits);
type fruitEnum = z.infer<typeof fruitEnum>;
fruitEnum.parse("apple");
fruitEnum.parse("banana");
fruitEnum.parse(Fruits.Apple);
fruitEnum.parse(Fruits.Banana);
expectTypeOf<fruitEnum>().toEqualTypeOf<"apple" | "banana">();
});
test("enum from native enum", () => {
enum Fruits {
Apple = "apple",
Banana = "banana",
Orange = 3,
}
// @ts-ignore
const fruitEnum = z.nativeEnum(Fruits);
type fruitEnum = z.infer<typeof fruitEnum>;
fruitEnum.parse("apple");
fruitEnum.parse("banana");
fruitEnum.parse(Fruits.Apple);
fruitEnum.parse(Fruits.Banana);
expect(fruitEnum.safeParse("Apple").success).toEqual(false);
expect(fruitEnum.safeParse("Cantaloupe").success).toEqual(false);
expectTypeOf<fruitEnum>().toMatchTypeOf<Fruits>();
expectTypeOf<Fruits>().toMatchTypeOf<fruitEnum>();
});
test("enum from native enum with numeric keys", () => {
const FruitValues = {
Apple: 10,
Banana: 20,
// @ts-ignore
} as const;
const fruitEnum = z.nativeEnum(FruitValues);
type fruitEnum = z.infer<typeof fruitEnum>;
fruitEnum.parse(10);
fruitEnum.parse(20);
fruitEnum.parse(FruitValues.Apple);
fruitEnum.parse(FruitValues.Banana);
expectTypeOf<fruitEnum>().toEqualTypeOf<10 | 20>();
});
test("issue metadata", () => {
const schema = z.enum(["Red", "Green", "Blue"]);
const result = schema.safeParse("Yellow");
expect(result.error!.issues[0]).toMatchInlineSnapshot(`
{
"code": "invalid_value",
"message": "Invalid option: expected one of "Red"|"Green"|"Blue"",
"path": [],
"values": [
"Red",
"Green",
"Blue",
],
}
`);
});
test("enum from non-const inputs", () => {
const foods = ["Pasta", "Pizza", "Tacos", "Burgers", "Salad"];
const FoodEnum = z.enum(foods);
expectTypeOf<z.infer<typeof FoodEnum>>().toEqualTypeOf<string>();
expect(FoodEnum.safeParse("Pasta").success).toEqual(true);
expect(FoodEnum.safeParse("Cucumbers").success).toEqual(false);
});
test("get options", () => {
expect(z.enum(["tuna", "trout"]).options).toEqual(["tuna", "trout"]);
enum Fish {
Tuna = 0,
Trout = 1,
}
// numeric enums carry reverse-mapping keys; options lists only what parse accepts
expect(z.enum(Fish).options).toEqual([Fish.Tuna, Fish.Trout]);
expect(z.enum(Fish).safeParse("Tuna").success).toEqual(false);
});
test("readonly enum", () => {
const HTTP_SUCCESS = ["200", "201"] as const;
const arg = z.enum(HTTP_SUCCESS);
type arg = z.infer<typeof arg>;
expectTypeOf<arg>().toEqualTypeOf<"200" | "201">();
arg.parse("201");
expect(() => arg.parse("202")).toThrow();
});
test("error map", () => {
const result = z
.enum(["test"], { error: (iss) => (iss.input === undefined ? "REQUIRED" : undefined) })
.safeParse(undefined);
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues[0].message).toEqual("REQUIRED");
}
});
test("type signatures", () => {
const a = z.enum(["a", "b", "c"]);
const b = z.enum(a.options);
expectTypeOf(a).toEqualTypeOf(b);
const c = z.enum({ a: 1, b: 2 } as const);
expectTypeOf(c.enum).toEqualTypeOf<{
readonly a: 1;
readonly b: 2;
}>();
enum Fruit {
Apple = "apple",
Banana = "banana",
Orange = "orange",
}
const d = z.enum(Fruit);
expectTypeOf(d.enum).toEqualTypeOf(Fruit);
const e = z.enum({ a: 1, b: 2 });
expectTypeOf(e.enum).toEqualTypeOf<{
readonly a: 1;
readonly b: 2;
}>();
});
test("extract", () => {
const foods = ["Pasta", "Pizza", "Tacos", "Burgers", "Salad"] as const;
const FoodEnum = z.enum(foods);
const ItalianEnum = FoodEnum.extract(["Pasta", "Pizza"]);
expect(ItalianEnum.safeParse("Pasta").success).toEqual(true);
expect(ItalianEnum.safeParse("Tacos").success).toEqual(false);
expectTypeOf<z.infer<typeof ItalianEnum>>().toEqualTypeOf<"Pasta" | "Pizza">();
});
test("exclude", () => {
const foods = ["Pasta", "Pizza", "Tacos", "Burgers", "Salad"] as const;
const FoodEnum = z.enum(foods);
const UnhealthyEnum = FoodEnum.exclude(["Salad"]);
expect(UnhealthyEnum.safeParse("Pasta").success).toEqual(true);
expect(UnhealthyEnum.safeParse("Salad").success).toEqual(false);
expectTypeOf<z.infer<typeof UnhealthyEnum>>().toEqualTypeOf<"Pasta" | "Pizza" | "Tacos" | "Burgers">();
const EmptyFoodEnum = FoodEnum.exclude(foods);
expectTypeOf<typeof EmptyFoodEnum>().toEqualTypeOf<z.ZodEnum<{}>>();
expectTypeOf<z.infer<typeof EmptyFoodEnum>>().toEqualTypeOf<never>();
});
test("empty enum matches nothing", () => {
const Empty = z.enum([]);
expect(Empty._zod.pattern.test("")).toEqual(false);
expect(z.templateLiteral(["", Empty]).safeParse("").success).toEqual(false);
expect(z.templateLiteral(["", z.object({}).keyof()]).safeParse("").success).toEqual(false);
expect(z.toJSONSchema(Empty)).toMatchObject({ not: {} });
expect(z.templateLiteral(["", z.enum([""])]).safeParse("").success).toEqual(true);
});
test("error map inheritance", () => {
const foods = ["Pasta", "Pizza", "Tacos", "Burgers", "Salad"] as const;
const FoodEnum = z.enum(foods, { error: () => "This is not food!" });
const ItalianEnum = FoodEnum.extract(["Pasta", "Pizza"]);
const foodsError = FoodEnum.safeParse("Cucumbers");
const italianError = ItalianEnum.safeParse("Tacos");
expect(foodsError.error!.issues[0].message).toEqual(italianError.error!.issues[0].message);
const UnhealthyEnum = FoodEnum.exclude(["Salad"], {
error: () => ({ message: "This is not healthy food!" }),
});
const unhealthyError = UnhealthyEnum.safeParse("Salad");
if (!unhealthyError.success) {
expect(unhealthyError.error.issues[0].message).toEqual("This is not healthy food!");
}
});
test("readonly in ZodEnumDef", () => {
type _a = z.ZodEnum<{ readonly a: "a"; readonly b: "b" }>;
type _b = z.ZodEnum<{ a: "a"; b: "b" }>;
});
test("enum error message, invalid enum elementstring", () => {
const result = z.enum(["Tuna", "Trout"]).safeParse("Salmon");
expect(result.success).toEqual(false);
expect(result.error!.issues.length).toEqual(1);
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"code": "invalid_value",
"values": [
"Tuna",
"Trout"
],
"path": [],
"message": "Invalid option: expected one of \\"Tuna\\"|\\"Trout\\""
}
]]
`);
});
test("enum error message, invalid type", () => {
const result = z.enum(["Tuna", "Trout"]).safeParse(12);
expect(result.success).toEqual(false);
expect(result.error!.issues.length).toEqual(1);
// expect(result.error!.issues[0].message).toEqual('Invalid input: expected one of "Tuna"|"Trout"');
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"code": "invalid_value",
"values": [
"Tuna",
"Trout"
],
"path": [],
"message": "Invalid option: expected one of \\"Tuna\\"|\\"Trout\\""
}
]]
`);
});
test("nativeEnum default error message", () => {
enum Fish {
Tuna = "Tuna",
Trout = "Trout",
}
const result = z.nativeEnum(Fish).safeParse("Salmon");
expect(result.success).toEqual(false);
expect(result.error!.issues.length).toEqual(1);
// expect(result.error!.issues[0].message).toEqual('Invalid input: expected one of "Tuna"|"Trout"');
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"code": "invalid_value",
"values": [
"Tuna",
"Trout"
],
"path": [],
"message": "Invalid option: expected one of \\"Tuna\\"|\\"Trout\\""
}
]]
`);
});
test("enum with message returns the custom error message", () => {
const schema = z.enum(["apple", "banana"], {
message: "the value provided is invalid",
});
const result1 = schema.safeParse("berries");
expect(result1.success).toEqual(false);
if (!result1.success) {
expect(result1.error.issues[0].message).toEqual("the value provided is invalid");
}
const result2 = schema.safeParse(undefined);
expect(result2.success).toEqual(false);
if (!result2.success) {
expect(result2.error.issues[0].message).toEqual("the value provided is invalid");
}
const result3 = schema.safeParse("banana");
expect(result3.success).toEqual(true);
const result4 = schema.safeParse(null);
expect(result4.success).toEqual(false);
if (!result4.success) {
expect(result4.error.issues[0].message).toEqual("the value provided is invalid");
}
});
test("enum with diagonal keys", () => {
const schema_02 = z.enum({
A: 1,
B: "A",
});
expect(schema_02.safeParse("A")).toMatchObject({ success: true });
});