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,11 @@
{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{# def.$data }}
{{? !$isData }}
var schema{{=$lvl}} = validate.schema{{=$schemaPath}};
{{?}}
var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}});
{{# def.checkError:'const' }}
{{? $breakOnError }} else { {{?}}
@@ -0,0 +1 @@
{"version":3,"file":"mcp-BumlNux0.cjs","names":["COMPLETABLE_SYMBOL: unique symbol","onerror?: (error: Error) => void","honored: SubscriptionFilter","SUBSCRIPTION_ID_META_KEY","codecForVersion","MODERN_WIRE_REVISION","controller!: ReadableStreamDefaultController<Uint8Array>","unsubscribe: (() => void) | undefined","keepAliveTimer: ReturnType<typeof setInterval> | undefined","abortCleanup: (() => void) | undefined","SERVER_INFO_META_KEY","CHANGE_NOTIFICATION_METHODS: ReadonlySet<string>","_maxSubscriptions: number","uriParam: unknown","out: NotificationBody[]","out: ListenCloseFrame[]","OAuthError","OAuthErrorCode","OAuthError","OAuthErrorCode","OAuthError","OAuthErrorCode","ProtocolError","ProtocolErrorCode","requiredClientCapabilitiesForInputRequest","_host: LegacyInputRequiredShimHost","inputRequiredRoundsExceededMessage","responses: Record<string, unknown> | undefined","coerced: [string, CoercedEmbeddedInputRequest][]","missingClientCapabilities","linkedRoundAbort","legOptions: RequestOptions","sleep","REQUEST_STATE_ONLY_LEG_PACING_MS","ctxNext: ServerContext","requestStateAccessor","withRequestStateValue","isInputRequiredResult","INPUT_REQUIRED_CAPABLE_METHODS: ReadonlySet<string>","writeClientIdentity: (server: Server, identity: PerRequestClientIdentity) => void","installDiscoverHandler: (server: Server, servedModernVersions: readonly string[]) => void","readServerIdentity: (server: Server) => Implementation","Protocol","_serverInfo: Implementation","DefaultJsonSchemaValidator","modernProtocolVersions","SdkError","SdkErrorCode","transportSessionId: string | undefined","parseSchema","LoggingLevelSchema","threshold: LoggingLevel | undefined","LOG_LEVEL_META_KEY","mergeCapabilities","isInputRequiredResult","ProtocolError","ProtocolErrorCode","attachCacheHintFallback","codecForVersion","normalizeContentlessToolResult","isModernProtocolVersion","rawRequestState: unknown","withRequestStateValue","result: Result","LATEST_PROTOCOL_VERSION","missingClientCapabilities","MissingRequiredClientCapabilityError","CLIENT_CAPABILITIES_META_KEY","legacyProtocolVersions","formParams: ElicitRequestFormParams","stack: unknown[]","standardSchemaToJsonSchema","uri: URL","toolDefinition: Tool","ProtocolError","ProtocolErrorCode","isInputRequiredResult","validateStandardSchema","templateResources: Resource[]","attachCacheHintFallback","ResourceNotFoundError","promptArgumentsFromStandardSchema","metadata: ResourceMetadata","registeredResource: RegisteredResource","registeredResourceTemplate: RegisteredResourceTemplate","registeredPrompt: RegisteredPrompt","outputSchemaJson: Record<string, unknown> | undefined","registeredTool: RegisteredTool","normalizeRawShapeSchema","_callbacks: {\n /**\n * A callback to list all resources matching this template. This is required to be specified, even if `undefined`, to avoid accidentally forgetting resource listing.\n */\n list: ListResourcesCallback | undefined;\n\n /**\n * An optional callback to autocomplete variables within the URI template. Useful for clients and users to discover possible values.\n */\n complete?: {\n [variable: string]: CompleteResourceTemplateCallback;\n };\n }","UriTemplate","callback","scanXMcpHeaderDeclarations","EMPTY_COMPLETION_RESULT: CompleteResult"],"sources":["../src/server/completable.ts","../src/server/sseKeepAlive.ts","../src/server/serverEventBus.ts","../src/server/listenRouter.ts","../src/server/middleware/bearerAuth.ts","../src/server/middleware/oauthMetadata.ts","../src/server/scopeChallenge.ts","../src/server/legacyInputRequiredShim.ts","../src/server/server.ts","../src/server/mcp.ts"],"sourcesContent":["import type { StandardSchemaV1 } from '@modelcontextprotocol/core-internal';\n\nexport const COMPLETABLE_SYMBOL: unique symbol = Symbol.for('mcp.completable');\n\nexport type CompleteCallback<T extends StandardSchemaV1 = StandardSchemaV1> = (\n value: StandardSchemaV1.InferInput<T>,\n context?: {\n arguments?: Record<string, string>;\n }\n) => StandardSchemaV1.InferInput<T>[] | Promise<StandardSchemaV1.InferInput<T>[]>;\n\nexport type CompletableMeta<T extends StandardSchemaV1 = StandardSchemaV1> = {\n complete: CompleteCallback<T>;\n};\n\nexport type CompletableSchema<T extends StandardSchemaV1> = T & {\n [COMPLETABLE_SYMBOL]: CompletableMeta<T>;\n};\n\n/**\n * Wraps a schema to provide autocompletion capabilities. Useful for, e.g., prompt arguments in MCP.\n *\n * @example\n * ```ts source=\"./completable.examples.ts#completable_basicUsage\"\n * server.registerPrompt(\n * 'review-code',\n * {\n * title: 'Code Review',\n * argsSchema: z.object({\n * language: completable(z.string().describe('Programming language'), value =>\n * ['typescript', 'javascript', 'python', 'rust', 'go'].filter(lang => lang.startsWith(value))\n * )\n * })\n Line truncated
@@ -0,0 +1,23 @@
import type {CodeKeywordDefinition, ErrorObject} from "../../types"
import {
validatePropertyDeps,
error,
DependenciesErrorParams,
PropertyDependencies,
} from "../applicator/dependencies"
export type DependentRequiredError = ErrorObject<
"dependentRequired",
DependenciesErrorParams,
PropertyDependencies
>
const def: CodeKeywordDefinition = {
keyword: "dependentRequired",
type: "object",
schemaType: "object",
error,
code: (cxt) => validatePropertyDeps(cxt),
}
export default def
@@ -0,0 +1 @@
{"version":3,"file":"split-square-vertical.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,922 @@
flf2aQ 9 6 21 0 3 0 64 0
Font Author: half Cosmike, half Darth ObiKy
FIGFont created with: http://patorjk.com/figfont-editor
QQQ@
QQQ@
QQQ@
QQQ@
QQQ@
QQQ@
QQQ@
QQQ@
QQQ@@
.:@
;;;@
'[[@
$$@
""@
MM@
@
@
@@
Q:: ::Q@
Q"; ;"Q@
@
@
@
@
@
@
@@
@
:: :: @
__,;'_,;'_@
''[[''[[''@
,$" ,$" @
o88oo88oo @
,M" ,M" @
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Q@
@
@
@
@@
@
,, @
'[[, @
$c@
,od8"@
YM" @
@
@
@@
.-::::-.@
;;'```;;;@
,n[[' @
d$P" @
"" @
MM @
@
@
@@
.:::''''''':::. @
;;' ,;;;;;;,.; `;.@
:[[ [. .['[[ [[@
$$, 'Y$$$P'Y$$P' @
'Y8o,_ __,oo @
`"YUMMMMMMUY" @
@
@
@@
:::. @
;;`;; @
,[[ '[[, @
c$$$cc$$$c @
888 888 @
YMM \"\"`@
@
@
@@
:::::::. @
;;;'';;' @
[[[__[[\.@
$$""""Y$$@
_88o,,od8P@
""YUMMMP" @
@
@
@@
.,~::::: @
,;;;'````' @
[[[ @
$$$ @
`88bo,__,o, @
"YUMMMMMP"@
@
@
@@
:::::::-. @
;;, `';,@
`[[ [[@
$$, $$@
888_,o8P'@
MMMMP"` @
@
@
@@
.,:::::: @
;;;;'''' @
[[cccc @
$$"""" @
888oo,__ @
""""YUMMM@
@
@
@@
.-:::::'@
;;;'''' @
[[[,,== @
`$$$"`` @
888 @
"MM, @
@
@
@@
.,-:::::/ @
,;;-'````' @
[[[ [[[[[[/@
"$$c. "$$ @
`Y8bo,,,o88o@
`'YMUP"YMM@
@
@
@@
:: .: @
,;; ;;, @
,[[[,,,[[[ @
"$$$"""$$$ @
888 "88o@
MMM YMM@
@
@
@@
:::@
;;;@
[[[@
$$$@
888@
MMM@
@
@
@@
....::::::@
;;;;;;;;;````@
''` `[[. @
,,, `$$ @
888boood88 @
"MMMMMMMM" @
@
@
@@
::: . @
;;; .;;,.@
[[[[[/' @
_$$$$, @
"888"88o, @
MMM "MMP"@
@
@
@@
::: @
;;; @
[[[ @
$$' @
o88oo,.__@
""""YUMMM@
@
@
@@
. : @
;;,. ;;; @
[[[[, ,[[[[, @
$$$$$$$$"$$$ @
888 Y88" 888o@
MMM M' "MMM@
@
@
@@
:::. :::.@
`;;;;, `;;;@
[[[[[. '[[@
$$$ "Y$c$$@
888 Y88@
MMM YM@
@
@
@@
... @
.;;;;;;;. @
,[[ \[[,@
$$$, $$$@
"888,_ _,88P@
"YMMMMMP" @
@
@
@@
::::::::::. @
`;;;```.;;;@
`]]nnn]]' @
$$$"" @
888o @
YMMMb @
@
@
@@
.::::::. @
,;;'```';;, @
[[[ [[[\@
"$$c cc$$$"@
"*8bo,Y88b,@
"*YP" "M"@
@
@
@@
:::::::.. @
;;;;``;;;; @
[[[,/[[[' @
$$$$$$c @
888b "88bo,@
MMMM "W" @
@
@
@@
.::::::. @
;;;` ` @
'[==/[[[[,@
''' $@
88b dP@
"YMmMY" @
@
@
@@
::::::::::::@
;;;;;;;;''''@
[[ @
$$ @
88, @
MMM @
@
@
@@
... :::@
;; ;;;@
[[' [[[@
$$ $$$@
88 .d888@
"YmmMMMM""@
@
@
@@
::: .::.@
';;, ,;;;' @
\[[ .[[/ @
Y$c.$$" @
Y88P @
MP @
@
@
@@
.:: . .:::@
';;, ;; ;;;' @
'[[, [[, [[' @
Y$c$$$c$P @
"88"888 @
"M "M" @
@
@
@@
.,:: .:@
`;;;, .,;; @
'[[,,[[' @
Y$$$P @
oP"``"Yo, @
,m" "Mm,@
@
@
@@
.-:. ::-.@
';;. ;;;;'@
'[[,[[[' @
c$$" @
,8P"` @
mM" @
@
@
@@
:::::::::@
'`````;;;@
.n[['@
,$$P" @
,888bo,_ @
`""*UMM @
@
@
@@
::::@
;;' @
[[ @
$$ @
88, @
"YMM@
@
@
@@
`:\ @
`;\ @
'[n @
"$c @
"8o @
"Mm@
@
@
@@
::::@
';;@
[[@
$$@
,88@
MMP"@
@
@
@@
.:. @
;' `;@
@
@
@
@
@
@
@@
@
@
@
@
@
@
mmmmmmm@
@
@@
`:. @
`;,@
@
@
@
@
@
@
@@
@
@
,ccc, @
$$$cc$$$ @
888 888@
"YUM" MP@
@
@
@@
:: @
;;; @
[[[[ccc, @
$$""""Y$$@
88o,,od8P@
"YUMMMP" @
@
@
@@
@
@
,cc[[[cc. @
$$$ @
88b ,o,@
"YUMMMMP"@
@
@
@@
:: @
;;;@
,c[[[cc,@
$$""""Y$$@
88o,,od8P@
"YUMMMP" @
@
@
@@
@
@
,cc[[[cc. @
$$$___--' @
88b ,o,@
"YUMMMMP"@
@
@
@@
.::::.@
;; `'@
=[[,,==@
`$$$"``@
888 @
"MM, @
@
@
@@
@
@
,ccc, @
$$$cc$$$ @
888 888@
"YUM" MP@
MMM@
,c. ###@
\M###MMU @@
:: @
;;; @
[[[[cc,,. @
$$$"""$$$ @
888 "88o@
MMM YMM@
@
@
@@
@
;;,@
@
$$$@
888@
MMM@
@
@
@@
@
;;,@
@
`[.@
`[[@
`$$@
,,, /88@
888boood88@
"MMMMMMMM"@@
::: @
;;; .;;, @
[[[[[/' @
_$$$$, @
"888"88o, @
MMM "MMP"@
@
@
@@
`::. @
;;; @
[[[ @
$$' @
\8o @
MM;@
@
@
@@
@
@
[ccc, ,cccc, @
$$$$$$$$"$$$ @
888 Y88" 888o@
MMM M' "MMM@
@
@
@@
@
@
[ccccc, @
$$$$"$$$ @
888 Y88o@
MMM "MMM@
@
@
@@
@
@
,ccc, @
$$$"c$$$@
888 88@
"YUMMP @
@
@
@@
@
@
@
,$$$$$. @
88""""88@
MMoooMM'@
MMMP @
### @
"##b @@
@
@
,ccc, @
$$$cc$$$ @
888 888 @
"YUM" MP @
MMM @
### ,c.@
\M###MMP @@
@
@
=,,[[==@
`$$$"``@
888 @
"MM, @
@
@
@@
@
@
,cc[[[cc. @
$$$____ @
. 88,@
"YUMMMMP"@
@
@
@@
`:: @
;; @
=[[[[[[.@
$$ @
88, @
MMM @
@
@
@@
@
@
,c , @
$$' $$$ @
888 888@
"YUM" MP@
@
@
@@
@
@
\[[ .[[/@
Y$c $$" @
Y88P @
MP @
@
@
@@
@
@
'[[, [[, [['@
Y$ $$$ $P @
"88"888 @
"M "M" @
@
@
@@
@
@
'[[ ,c' @
Y$$$P @
oP``Yo, @
,m" "Mm,@
@
@
@@
@
@
@
`$$$ $P@
88b 88 @
'MooMM @
MM @
##" @
m##" @@
@
@
.nnnnn[['@
,$$P" @
,888bo,_ @
`""*UMM @
@
@
@@
.:@
;'@
[@
$"@
8 @
"M@
@
@
@@
`:@
,;@
[[@
$$@
88@
MM@
##@
@
@@
:.@
';@
[ @
"$@
8@
M"@
@
@
@@
@
@
':.:':.@
`;' `;@
@
@
@
@
@@
:: ::. :: @
;;`;; @
,[[ '[[, @
c$$$cc$$$c @
888 888,@
YMM ""` @
@
@
@@
:: ... :: @
.;;;;;;;. @
,[[ \[[,@
$$$, $$$@
"888,_ _,88P@
"YMMMMMP" @
@
@
@@
..:: :: ::@
;; ;;;@
[[' [[[@
$$ $$$@
88 .d888@
"YmmMMMM""@
@
@
@@
@
;; ;; @
,ccc, @
$$$cc$$$ @
888 888@
"YUM" MP@
@
@
@@
@
;; ;; @
,ccc, @
$$$"c$$$@
888 88@
"YUMMP @
@
@
@@
@
;; ;; @
,c , @
$$' $$$ @
888 888@
"YUM" MP@
@
@
@@
:::::::. @
;;;'';;' @
[[[__[[\.@
$$""""Y$$@
88o,,od8P@
MM`YMMP" @
@
@
@@
@@ -0,0 +1,260 @@
#!/usr/bin/env python3
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""gyptest.py -- test runner for GYP tests."""
import argparse
import os
import platform
import subprocess
import sys
import time
def is_test_name(f):
return f.startswith("gyptest") and f.endswith(".py")
def find_all_gyptest_files(directory):
result = []
for root, dirs, files in os.walk(directory):
result.extend([os.path.join(root, f) for f in files if is_test_name(f)])
result.sort()
return result
def main(argv=None):
if argv is None:
argv = sys.argv
parser = argparse.ArgumentParser()
parser.add_argument("-a", "--all", action="store_true", help="run all tests")
parser.add_argument("-C", "--chdir", action="store", help="change to directory")
parser.add_argument(
"-f",
"--format",
action="store",
default="",
help="run tests with the specified formats",
)
parser.add_argument(
"-G",
"--gyp_option",
action="append",
default=[],
help="Add -G options to the gyp command line",
)
parser.add_argument(
"-l", "--list", action="store_true", help="list available tests and exit"
)
parser.add_argument(
"-n",
"--no-exec",
action="store_true",
help="no execute, just print the command line",
)
parser.add_argument(
"--path", action="append", default=[], help="additional $PATH directory"
)
parser.add_argument(
"-q",
"--quiet",
action="store_true",
help="quiet, don't print anything unless there are failures",
)
parser.add_argument(
"-v",
"--verbose",
action="store_true",
help="print configuration info and test results.",
)
parser.add_argument("tests", nargs="*")
args = parser.parse_args(argv[1:])
if args.chdir:
os.chdir(args.chdir)
if args.path:
extra_path = [os.path.abspath(p) for p in args.path]
extra_path = os.pathsep.join(extra_path)
os.environ["PATH"] = extra_path + os.pathsep + os.environ["PATH"]
if not args.tests:
if not args.all:
sys.stderr.write("Specify -a to get all tests.\n")
return 1
args.tests = ["test"]
tests = []
for arg in args.tests:
if os.path.isdir(arg):
tests.extend(find_all_gyptest_files(os.path.normpath(arg)))
else:
if not is_test_name(os.path.basename(arg)):
print(arg, "is not a valid gyp test name.", file=sys.stderr)
sys.exit(1)
tests.append(arg)
if args.list:
for test in tests:
print(test)
sys.exit(0)
os.environ["PYTHONPATH"] = os.path.abspath("test/lib")
if args.verbose:
print_configuration_info()
if args.gyp_option and not args.quiet:
print("Extra Gyp options: %s\n" % args.gyp_option)
if args.format:
format_list = args.format.split(",")
else:
format_list = {
"aix5": ["make"],
"os400": ["make"],
"freebsd7": ["make"],
"freebsd8": ["make"],
"openbsd5": ["make"],
"cygwin": ["msvs"],
"win32": ["msvs", "ninja"],
"linux": ["make", "ninja"],
"linux2": ["make", "ninja"],
"linux3": ["make", "ninja"],
# TODO: Re-enable xcode-ninja.
# https://bugs.chromium.org/p/gyp/issues/detail?id=530
# 'darwin': ['make', 'ninja', 'xcode', 'xcode-ninja'],
"darwin": ["make", "ninja", "xcode"],
}[sys.platform]
gyp_options = []
for option in args.gyp_option:
gyp_options += ["-G", option]
runner = Runner(format_list, tests, gyp_options, args.verbose)
runner.run()
if not args.quiet:
runner.print_results()
return 1 if runner.failures else 0
def print_configuration_info():
print("Test configuration:")
if sys.platform == "darwin":
sys.path.append(os.path.abspath("test/lib"))
import TestMac # noqa: PLC0415
print(f" Mac {platform.mac_ver()[0]} {platform.mac_ver()[2]}")
print(f" Xcode {TestMac.Xcode.Version()}")
elif sys.platform == "win32":
sys.path.append(os.path.abspath("pylib"))
import gyp.MSVSVersion # noqa: PLC0415
print(" Win %s %s\n" % platform.win32_ver()[0:2])
print(" MSVS %s" % gyp.MSVSVersion.SelectVisualStudioVersion().Description())
elif sys.platform in ("linux", "linux2"):
print(" Linux %s" % " ".join(platform.linux_distribution()))
print(f" Python {platform.python_version()}")
print(f" PYTHONPATH={os.environ['PYTHONPATH']}")
print()
class Runner:
def __init__(self, formats, tests, gyp_options, verbose):
self.formats = formats
self.tests = tests
self.verbose = verbose
self.gyp_options = gyp_options
self.failures = []
self.num_tests = len(formats) * len(tests)
num_digits = len(str(self.num_tests))
self.fmt_str = "[%%%dd/%%%dd] (%%s) %%s" % (num_digits, num_digits)
self.isatty = sys.stdout.isatty() and not self.verbose
self.env = os.environ.copy()
self.hpos = 0
def run(self):
run_start = time.time()
i = 1
for fmt in self.formats:
for test in self.tests:
self.run_test(test, fmt, i)
i += 1
if self.isatty:
self.erase_current_line()
self.took = time.time() - run_start
def run_test(self, test, fmt, i):
if self.isatty:
self.erase_current_line()
msg = self.fmt_str % (i, self.num_tests, fmt, test)
self.print_(msg)
start = time.time()
cmd = [sys.executable, test] + self.gyp_options
self.env["TESTGYP_FORMAT"] = fmt
proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=self.env
)
proc.wait()
took = time.time() - start
stdout = proc.stdout.read().decode("utf8")
if proc.returncode == 2:
res = "skipped"
elif proc.returncode:
res = "failed"
self.failures.append(f"({test}) {fmt}")
else:
res = "passed"
res_msg = f" {res} {took:.3f}s"
self.print_(res_msg)
if stdout and not stdout.endswith(("PASSED\n", "NO RESULT\n")):
print()
print("\n".join(f" {line}" for line in stdout.splitlines()))
elif not self.isatty:
print()
def print_(self, msg):
print(msg, end="")
index = msg.rfind("\n")
if index == -1:
self.hpos += len(msg)
else:
self.hpos = len(msg) - index
sys.stdout.flush()
def erase_current_line(self):
print("\b" * self.hpos + " " * self.hpos + "\b" * self.hpos, end="")
sys.stdout.flush()
self.hpos = 0
def print_results(self):
num_failures = len(self.failures)
if num_failures:
print()
if num_failures == 1:
print("Failed the following test:")
else:
print("Failed the following %d tests:" % num_failures)
print("\t" + "\n\t".join(sorted(self.failures)))
print()
print(
"Ran %d tests in %.3fs, %d failed."
% (self.num_tests, self.took, num_failures)
)
print()
if __name__ == "__main__":
sys.exit(main())
@@ -0,0 +1 @@
{"version":3,"file":"circle.js","sources":["../../../src/icons/circle.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Circle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/circle\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 Circle = createLucideIcon('Circle', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n]);\n\nexport default Circle;\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,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,31 @@
import { useCallback } from "react";
import { useSyncExternalStoreWithSelector } from "use-sync-external-store/shim/with-selector";
function defaultCompare(a, b) {
return a === b;
}
function useStore(atom, selector, compare = defaultCompare) {
const subscribe = useCallback(
(handleStoreChange) => {
if (!atom) {
return () => {
};
}
const { unsubscribe } = atom.subscribe(handleStoreChange);
return unsubscribe;
},
[atom]
);
const boundGetSnapshot = useCallback(() => atom?.get(), [atom]);
const selectedSnapshot = useSyncExternalStoreWithSelector(
subscribe,
boundGetSnapshot,
boundGetSnapshot,
selector,
compare
);
return selectedSnapshot;
}
export {
useStore
};
//# sourceMappingURL=useStore.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ssr-server.cjs","names":[],"sources":["../../../src/ssr/ssr-server.ts"],"sourcesContent":["import { crossSerializeStream, getCrossReferenceHeader } from 'seroval'\nimport { invariant } from '../invariant'\nimport {\n createInlineCssPlaceholderAsset,\n createInlineCssStyleAsset,\n getStylesheetHref,\n isInlinableStylesheet,\n} from '../manifest'\nimport { decodePath } from '../utils'\nimport { createLRUCache } from '../lru-cache'\nimport { rootRouteId } from '../root'\nimport minifiedTsrBootStrapScript from './tsrScript?script-string'\nimport { GLOBAL_TSR, TSR_SCRIPT_BARRIER_ID } from './constants'\nimport { dehydrateSsrMatchId } from './ssr-match-id'\nimport { defaultSerovalPlugins } from './serializer/seroval-plugins'\nimport { makeSsrSerovalPlugin } from './serializer/transformer'\nimport type { LRUCache } from '../lru-cache'\nimport type { DehydratedMatch, DehydratedRouter } from './types'\nimport type { AnySerializationAdapter } from './serializer/transformer'\nimport type { AnyRouter } from '../router'\nimport type { AnyRouteMatch } from '../Matches'\nimport type { Manifest, RouterManagedTag } from '../manifest'\n\ndeclare module '../router' {\n interface ServerSsr {\n setRenderFinished: () => void\n cleanup: () => void\n }\n interface RouterEvents {\n onInjectedHtml: {\n type: 'onInjectedHtml'\n }\n onSerializationFinished: {\n type: 'onSerializationFinished'\n }\n }\n}\n\nconst SCOPE_ID = 'tsr'\n\nconst TSR_PREFIX = GLOBAL_TSR + '.router='\nconst P_PREFIX = GLOBAL_TSR + '.p(()=>'\nconst P_SUFFIX = ')'\n\nexport function dehydrateMatch(match: AnyRouteMatch): DehydratedMatch {\n const dehydratedMatch: DehydratedMatch = {\n i: dehydrateSsrMatchId(match.id),\n u: match.updatedAt,\n s: match.status,\n }\n\n const properties = [\n ['__beforeLoadContext', 'b'],\n ['loaderData', 'l'],\n ['error', 'e'],\n ['ssr', 'ssr'],\n ] as const\n\n for (const [key, shorthand] of properties) {\n if (match[key] !== undefined) {\n dehydratedMatch[shorthand] = match[key]\n }\n }\n if (match.globalNotFound) {\n dehydratedMatch.g = true\n }\n return dehydratedMatch\n}\n\nconst INITIAL_SCRIPTS = [\n getCrossReferenceHeader(SCOPE_ID),\n minifiedTsrBootStrapScript,\n]\n\nclass ScriptBuffer {\n private router: AnyRouter | undefined\n private _queue: Array<string>\n private _scriptBarrierLifted = false\n private _cleanedUp = false\n private _pendingMicrotask = false\n\n constructor(router: AnyRouter) {\n this.router = router\n // Copy INITIAL_SCRIPTS to avoid mutating the shared array\n this._queue = INITIAL_SCRIPTS.slice()\n }\n\n enqueue(script: string) {\n if (this._cleanedUp) return\n this._queue.push(script)\n // If barrier is lifted, schedule injection (if not already scheduled)\n if (this._scriptBarrierLifted && !this._pendingMicrotask) {\n this._pendingMicrotask = true\n queueMicrotask(() => {\n this._pendingMicrotask = false\n this.injectBufferedScripts()\n })\n }\n }\n\n liftBarrier() {\n if (this._scriptBarrierLifted || this._cleanedUp) return\n this._scriptBarrierLifted = true\n if (this._queue.length > 0 && !this._pendingMicrotask) {\n this._pendingMicrotask = true\n queueMicrotask(() => {\n this._pendingMicrotask = false\n this.injectBufferedScripts()\n })\n }\n }\n\n /**\n * Flushes any pending scripts synchronously.\n * Call this before emitting onSerializationFinished to ensure all scripts are injected.\n *\n * IMPORTANT: Only injects if the barrier has been lifted. Before the barrier is lifted,\n * scripts should remain in the queue so takeBufferedScripts() can retrieve them\n */\n flush() {\n if (!this._scriptBarrierLifted) return\n if (this._cleanedUp) return\n this._pendingMicrotask = false\n const scriptsToInject = this.takeAll()\n if (scriptsToInject && this.router?.serverSsr) {\n this.router.serverSsr.injectScript(scriptsToInject)\n }\n }\n\n takeAll() {\n const bufferedScripts = this._queue\n this._queue = []\n if (bufferedScripts.length === 0) {\n return undefined\n }\n // Optimization: if only one script, avoid join\n if (bufferedScripts.length === 1) {\n return bufferedScripts[0] + ';document.currentScript.remove()'\n }\n // Append cleanup script and join - avoid push() to not mutate then iterate\n return bufferedScripts.join(';') + ';document.currentScript.remove()'\n }\n\n injectBufferedScripts() {\n if (this._cleanedUp) return\n // Early return if queue is empty (avoids unnecessary takeAll() call)\n if (this._queue.length === 0) return\n const scriptsToInject = this.takeAll()\n if (scriptsToInject && this.router?.serverSsr) {\n this.router.serverSsr.injectScript(scriptsToInject)\n }\n }\n\n cleanup() {\n this._cleanedUp = true\n this._queue = []\n this.router = undefined\n }\n}\n\nconLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"picture-in-picture-2.js","sources":["../../../src/icons/picture-in-picture-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PictureInPicture2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEgOVY2YTIgMiAwIDAgMC0yLTJINGEyIDIgMCAwIDAtMiAydjEwYzAgMS4xLjkgMiAyIDJoNCIgLz4KICA8cmVjdCB3aWR0aD0iMTAiIGhlaWdodD0iNyIgeD0iMTIiIHk9IjEzIiByeD0iMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/picture-in-picture-2\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 PictureInPicture2 = createLucideIcon('PictureInPicture2', [\n ['path', { d: 'M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4', key: 'daa4of' }],\n ['rect', { width: '10', height: '7', x: '12', y: '13', rx: '2', key: '1nb8gs' }],\n]);\n\nexport default PictureInPicture2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACzF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,200 @@
"use client";
// src/tabs.tsx
import * as React from "react";
import { composeEventHandlers } from "@radix-ui/primitive";
import { createContextScope } from "@radix-ui/react-context";
import { createRovingFocusGroupScope } from "@radix-ui/react-roving-focus";
import { Presence } from "@radix-ui/react-presence";
import { Primitive } from "@radix-ui/react-primitive";
import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
import { useDirection } from "@radix-ui/react-direction";
import { useControllableState } from "@radix-ui/react-use-controllable-state";
import { useId } from "@radix-ui/react-id";
import { jsx } from "react/jsx-runtime";
var TABS_NAME = "Tabs";
var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
createRovingFocusGroupScope
]);
var useRovingFocusGroupScope = createRovingFocusGroupScope();
var [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);
var Tabs = React.forwardRef(
(props, forwardedRef) => {
const {
__scopeTabs,
value: valueProp,
onValueChange,
defaultValue,
orientation = "horizontal",
dir,
activationMode = "automatic",
...tabsProps
} = props;
const direction = useDirection(dir);
const [value, setValue] = useControllableState({
prop: valueProp,
onChange: onValueChange,
defaultProp: defaultValue ?? "",
caller: TABS_NAME
});
return /* @__PURE__ */ jsx(
TabsProvider,
{
scope: __scopeTabs,
baseId: useId(),
value,
onValueChange: setValue,
orientation,
dir: direction,
activationMode,
children: /* @__PURE__ */ jsx(
Primitive.div,
{
dir: direction,
"data-orientation": orientation,
...tabsProps,
ref: forwardedRef
}
)
}
);
}
);
Tabs.displayName = TABS_NAME;
var TAB_LIST_NAME = "TabsList";
var TabsList = React.forwardRef(
(props, forwardedRef) => {
const { __scopeTabs, loop = true, ...listProps } = props;
const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
return /* @__PURE__ */ jsx(
RovingFocusGroup.Root,
{
asChild: true,
...rovingFocusGroupScope,
orientation: context.orientation,
dir: context.dir,
loop,
children: /* @__PURE__ */ jsx(
Primitive.div,
{
role: "tablist",
"aria-orientation": context.orientation,
...listProps,
ref: forwardedRef
}
)
}
);
}
);
TabsList.displayName = TAB_LIST_NAME;
var TRIGGER_NAME = "TabsTrigger";
var TabsTrigger = React.forwardRef(
(props, forwardedRef) => {
const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
const context = useTabsContext(TRIGGER_NAME, __scopeTabs);
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
const triggerId = makeTriggerId(context.baseId, value);
const contentId = makeContentId(context.baseId, value);
const isSelected = value === context.value;
return /* @__PURE__ */ jsx(
RovingFocusGroup.Item,
{
asChild: true,
...rovingFocusGroupScope,
focusable: !disabled,
active: isSelected,
children: /* @__PURE__ */ jsx(
Primitive.button,
{
type: "button",
role: "tab",
"aria-selected": isSelected,
"aria-controls": contentId,
"data-state": isSelected ? "active" : "inactive",
"data-disabled": disabled ? "" : void 0,
disabled,
id: triggerId,
...triggerProps,
ref: forwardedRef,
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
if (!disabled && event.button === 0 && event.ctrlKey === false) {
context.onValueChange(value);
} else {
event.preventDefault();
}
}),
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
if ([" ", "Enter"].includes(event.key)) context.onValueChange(value);
}),
onFocus: composeEventHandlers(props.onFocus, () => {
const isAutomaticActivation = context.activationMode !== "manual";
if (!isSelected && !disabled && isAutomaticActivation) {
context.onValueChange(value);
}
})
}
)
}
);
}
);
TabsTrigger.displayName = TRIGGER_NAME;
var CONTENT_NAME = "TabsContent";
var TabsContent = React.forwardRef(
(props, forwardedRef) => {
const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
const context = useTabsContext(CONTENT_NAME, __scopeTabs);
const triggerId = makeTriggerId(context.baseId, value);
const contentId = makeContentId(context.baseId, value);
const isSelected = value === context.value;
const isMountAnimationPreventedRef = React.useRef(isSelected);
React.useEffect(() => {
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
return () => cancelAnimationFrame(rAF);
}, []);
return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(
Primitive.div,
{
"data-state": isSelected ? "active" : "inactive",
"data-orientation": context.orientation,
role: "tabpanel",
"aria-labelledby": triggerId,
hidden: !present,
id: contentId,
tabIndex: 0,
...contentProps,
ref: forwardedRef,
style: {
...props.style,
animationDuration: isMountAnimationPreventedRef.current ? "0s" : void 0
},
children: present && children
}
) });
}
);
TabsContent.displayName = CONTENT_NAME;
function makeTriggerId(baseId, value) {
return `${baseId}-trigger-${value}`;
}
function makeContentId(baseId, value) {
return `${baseId}-content-${value}`;
}
var Root2 = Tabs;
var List = TabsList;
var Trigger = TabsTrigger;
var Content = TabsContent;
export {
Content,
List,
Root2 as Root,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
Trigger,
createTabsScope
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"constants.js","names":[],"sources":["../../../src/ssr/constants.ts"],"sourcesContent":["export const GLOBAL_TSR = '$_TSR'\nexport declare const GLOBAL_SEROVAL: '$R'\nexport const TSR_SCRIPT_BARRIER_ID = '$tsr-stream-barrier'\n"],"mappings":";AAAA,MAAa,aAAa;AAE1B,MAAa,wBAAwB"}
@@ -0,0 +1 @@
{"version":3,"file":"scatter-chart.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sources":["../../../../src/effects/style/index.ts"],"sourcesContent":["import { isCSSVar } from \"../../render/dom/is-css-var\"\nimport { transformProps } from \"../../render/utils/keys-transform\"\nimport { isHTMLElement } from \"../../utils/is-html-element\"\nimport { MotionValue } from \"../../value\"\nimport { MotionValueState } from \"../MotionValueState\"\nimport { createSelectorEffect } from \"../utils/create-dom-effect\"\nimport { createEffect } from \"../utils/create-effect\"\nimport { buildTransform } from \"./transform\"\n\nconst originProps = new Set([\"originX\", \"originY\", \"originZ\"])\n\nexport const addStyleValue = (\n element: HTMLElement | SVGElement,\n state: MotionValueState,\n key: string,\n value: MotionValue\n) => {\n let render: VoidFunction | undefined = undefined\n let computed: MotionValue | undefined = undefined\n\n if (transformProps.has(key)) {\n if (!state.get(\"transform\")) {\n // If this is an HTML element, we need to set the transform-box to fill-box\n // to normalise the transform relative to the element's bounding box\n if (!isHTMLElement(element) && !state.get(\"transformBox\")) {\n addStyleValue(\n element,\n state,\n \"transformBox\",\n new MotionValue(\"fill-box\")\n )\n }\n\n state.set(\"transform\", new MotionValue(\"none\"), () => {\n element.style.transform = buildTransform(state)\n })\n }\n\n computed = state.get(\"transform\")\n } else if (originProps.has(key)) {\n if (!state.get(\"transformOrigin\")) {\n state.set(\"transformOrigin\", new MotionValue(\"\"), () => {\n const originX = state.latest.originX ?? \"50%\"\n const originY = state.latest.originY ?? \"50%\"\n const originZ = state.latest.originZ ?? 0\n element.style.transformOrigin = `${originX} ${originY} ${originZ}`\n })\n }\n\n computed = state.get(\"transformOrigin\")\n } else if (isCSSVar(key)) {\n render = () => {\n element.style.setProperty(key, state.latest[key] as string)\n }\n } else {\n render = () => {\n element.style[key as any] = state.latest[key] as string\n }\n }\n\n return state.set(key, value, render, computed)\n}\n\nexport const styleEffect = /*@__PURE__*/ createSelectorEffect(\n /*@__PURE__*/ createEffect(addStyleValue)\n)\n"],"names":[],"mappings":";;;;;;;;AASA,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAEvD,MAAM,aAAa,GAAG,CACzB,OAAiC,EACjC,KAAuB,EACvB,GAAW,EACX,KAAkB,KAClB;IACA,IAAI,MAAM,GAA6B,SAAS;IAChD,IAAI,QAAQ,GAA4B,SAAS;AAEjD,IAAA,IAAI,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACzB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;;;AAGzB,YAAA,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE;AACvD,gBAAA,aAAa,CACT,OAAO,EACP,KAAK,EACL,cAAc,EACd,IAAI,WAAW,CAAC,UAAU,CAAC,CAC9B;YACL;AAEA,YAAA,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE,MAAK;gBACjD,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC;AACnD,YAAA,CAAC,CAAC;QACN;AAEA,QAAA,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC;IACrC;AAAO,SAAA,IAAI,WA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ration-per-line",
meta: {
type: "layout",
docs: { description: "Require or disallow newlines around variable declarations" },
fixable: "whitespace",
schema: [{
type: "string",
enum: ["always", "initializations"]
}],
defaultOptions: ["initializations"],
messages: { expectVarOnNewline: "Expected variable declaration to be on a new line." }
},
create(context, [style]) {
const { sourceCode } = context;
const always = style === "always";
function isForTypeSpecifier(keyword) {
return keyword === "ForStatement" || keyword === "ForInStatement" || keyword === "ForOfStatement";
}
function checkForNewLine(node) {
if (isForTypeSpecifier(node.parent.type)) return;
const declarations = node.declarations;
for (let i = 1; i < declarations.length; i++) {
const prev = declarations[i - 1];
const current = declarations[i];
if ((0, import_ast_utils.isTokenOnSameLine)(prev, current)) {
if (always || prev.init || current.init) context.report({
node,
messageId: "expectVarOnNewline",
loc: current.loc,
fix: (fixer) => {
const tokenBefore = sourceCode.getTokenBefore(current);
return fixer.insertTextAfterRange([tokenBefore.range[1], current.range[0]], "\n");
}
});
}
}
}
return { VariableDeclaration: checkForNewLine };
}
});
export { one_var_declaration_per_line_default as t };
@@ -0,0 +1,16 @@
/**
* @license React
* react-compiler-runtime.profiling.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 ReactSharedInternals =
require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
exports.c = function (size) {
return ReactSharedInternals.H.useMemoCache(size);
};
@@ -0,0 +1 @@
{"version":3,"file":"square-chart-gantt.js","sources":["../../../src/icons/square-chart-gantt.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareChartGantt\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik05IDhoNyIgLz4KICA8cGF0aCBkPSJNOCAxMmg2IiAvPgogIDxwYXRoIGQ9Ik0xMSAxNmg1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/square-chart-gantt\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 SquareChartGantt = createLucideIcon('SquareChartGantt', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M9 8h7', key: 'kbo1nt' }],\n ['path', { d: 'M8 12h6', key: 'ikassy' }],\n ['path', { d: 'M11 16h5', key: 'oq65wt' }],\n]);\n\nexport default SquareChartGantt;\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,CAAmB,iBAAiB,kBAAoB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,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,202 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.StdioClientTransport = exports.DEFAULT_INHERITED_ENV_VARS = void 0;
exports.getDefaultEnvironment = getDefaultEnvironment;
const cross_spawn_1 = __importDefault(require("cross-spawn"));
const node_process_1 = __importDefault(require("node:process"));
const node_stream_1 = require("node:stream");
const stdio_js_1 = require("../shared/stdio.js");
/**
* Environment variables to inherit by default, if an environment is not explicitly given.
*/
exports.DEFAULT_INHERITED_ENV_VARS = node_process_1.default.platform === 'win32'
? [
'APPDATA',
'HOMEDRIVE',
'HOMEPATH',
'LOCALAPPDATA',
'PATH',
'PROCESSOR_ARCHITECTURE',
'SYSTEMDRIVE',
'SYSTEMROOT',
'TEMP',
'USERNAME',
'USERPROFILE',
'PROGRAMFILES'
]
: /* list inspired by the default env inheritance of sudo */
['HOME', 'LOGNAME', 'PATH', 'SHELL', 'TERM', 'USER'];
/**
* Returns a default environment object including only environment variables deemed safe to inherit.
*/
function getDefaultEnvironment() {
const env = {};
for (const key of exports.DEFAULT_INHERITED_ENV_VARS) {
const value = node_process_1.default.env[key];
if (value === undefined) {
continue;
}
if (value.startsWith('()')) {
// Skip functions, which are a security risk.
continue;
}
env[key] = value;
}
return env;
}
/**
* Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.
*
* This transport is only available in Node.js environments.
*/
class StdioClientTransport {
constructor(server) {
this._stderrStream = null;
this._serverParams = server;
this._readBuffer = new stdio_js_1.ReadBuffer({ maxBufferSize: server.maxBufferSize });
if (server.stderr === 'pipe' || server.stderr === 'overlapped') {
this._stderrStream = new node_stream_1.PassThrough();
}
}
/**
* Starts the server process and prepares to communicate with it.
*/
async start() {
if (this._process) {
throw new Error('StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.');
}
return new Promise((resolve, reject) => {
this._process = (0, cross_spawn_1.default)(this._serverParams.command, this._serverParams.args ?? [], {
// merge default env with server env because mcp server needs some env vars
env: {
...getDefaultEnvironment(),
...this._serverParams.env
},
stdio: ['pipe', 'pipe', this._serverParams.stderr ?? 'inherit'],
shell: false,
windowsHide: node_process_1.default.platform === 'win32',
cwd: this._serverParams.cwd
});
this._process.on('error', error => {
reject(error);
this.onerror?.(error);
});
this._process.on('spawn', () => {
resolve();
});
this._process.on('close', _code => {
this._process = undefined;
this.onclose?.();
});
this._process.stdin?.on('error', error => {
this.onerror?.(error);
});
this._process.stdout?.on('data', chunk => {
try {
this._readBuffer.append(chunk);
this.processReadBuffer();
}
catch (error) {
this.onerror?.(error);
this.close().catch(() => { });
}
});
this._process.stdout?.on('error', error => {
this.onerror?.(error);
});
if (this._stderrStream && this._process.stderr) {
this._process.stderr.pipe(this._stderrStream);
}
});
}
/**
* The stderr stream of the child process, if `StdioServerParameters.stderr` was set to "pipe" or "overlapped".
*
* If stderr piping was requested, a PassThrough stream is returned _immediately_, allowing callers to
* attach listeners before the start method is invoked. This prevents loss of any early
* error output emitted by the child process.
*/
get stderr() {
if (this._stderrStream) {
return this._stderrStream;
}
return this._process?.stderr ?? null;
}
/**
* The child process pid spawned by this transport.
*
* This is only available after the transport has been started.
*/
get pid() {
return this._process?.pid ?? null;
}
processReadBuffer() {
while (true) {
try {
const message = this._readBuffer.readMessage();
if (message === null) {
break;
}
this.onmessage?.(message);
}
catch (error) {
this.onerror?.(error);
}
}
}
async close() {
if (this._process) {
const processToClose = this._process;
this._process = undefined;
const closePromise = new Promise(resolve => {
processToClose.once('close', () => {
resolve();
});
});
try {
processToClose.stdin?.end();
}
catch {
// ignore
}
await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);
if (processToClose.exitCode === null) {
try {
processToClose.kill('SIGTERM');
}
catch {
// ignore
}
await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);
}
if (processToClose.exitCode === null) {
try {
processToClose.kill('SIGKILL');
}
catch {
// ignore
}
}
}
this._readBuffer.clear();
}
send(message) {
return new Promise(resolve => {
if (!this._process?.stdin) {
throw new Error('Not connected');
}
const json = (0, stdio_js_1.serializeMessage)(message);
if (this._process.stdin.write(json)) {
resolve();
}
else {
this._process.stdin.once('drain', resolve);
}
});
}
}
exports.StdioClientTransport = StdioClientTransport;
//# sourceMappingURL=stdio.js.map
@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useRefToCallback = exports.refToCallback = void 0;
/**
* Unmemoized version of {@link useRefToCallback}
* @see {@link useRefToCallback}
* @param ref
*/
function refToCallback(ref) {
return function (newValue) {
if (typeof ref === 'function') {
ref(newValue);
}
else if (ref) {
ref.current = newValue;
}
};
}
exports.refToCallback = refToCallback;
var nullCallback = function () { return null; };
// lets maintain a weak ref to, well, ref :)
// not using `kashe` to keep this package small
var weakMem = new WeakMap();
var weakMemoize = function (ref) {
var usedRef = ref || nullCallback;
var storedRef = weakMem.get(usedRef);
if (storedRef) {
return storedRef;
}
var cb = refToCallback(usedRef);
weakMem.set(usedRef, cb);
return cb;
};
/**
* Transforms a given `ref` into `callback`.
*
* To transform `callback` into ref use {@link useCallbackRef|useCallbackRef(undefined, callback)}
*
* @param {ReactRef} ref
* @returns {Function}
*
* @see https://github.com/theKashey/use-callback-ref#reftocallback
*
* @example
* const ref = useRef(0);
* const setRef = useRefToCallback(ref);
* 👉 setRef(10);
* ✅ ref.current === 10
*/
function useRefToCallback(ref) {
return weakMemoize(ref);
}
exports.useRefToCallback = useRefToCallback;
@@ -0,0 +1,2 @@
import { viteReactRefreshWrapperPlugin as reactRefreshWrapperPlugin } from "rolldown/experimental";
export { reactRefreshWrapperPlugin };
@@ -0,0 +1,25 @@
import { checkEncCryptoKey } from './crypto_key.js';
function checkKeySize(key, alg) {
if (key.algorithm.length !== parseInt(alg.slice(1, 4), 10)) {
throw new TypeError(`Invalid key size for alg: ${alg}`);
}
}
function getCryptoKey(key, alg, usage) {
if (key instanceof Uint8Array) {
return crypto.subtle.importKey('raw', key, 'AES-KW', true, [usage]);
}
checkEncCryptoKey(key, alg, usage);
return key;
}
export async function wrap(alg, key, cek) {
const cryptoKey = await getCryptoKey(key, alg, 'wrapKey');
checkKeySize(cryptoKey, alg);
const cryptoKeyCek = await crypto.subtle.importKey('raw', cek, { hash: 'SHA-256', name: 'HMAC' }, true, ['sign']);
return new Uint8Array(await crypto.subtle.wrapKey('raw', cryptoKeyCek, cryptoKey, 'AES-KW'));
}
export async function unwrap(alg, key, encryptedKey) {
const cryptoKey = await getCryptoKey(key, alg, 'unwrapKey');
checkKeySize(cryptoKey, alg);
const cryptoKeyCek = await crypto.subtle.unwrapKey('raw', encryptedKey, cryptoKey, 'AES-KW', { hash: 'SHA-256', name: 'HMAC' }, true, ['sign']);
return new Uint8Array(await crypto.subtle.exportKey('raw', cryptoKeyCek));
}
@@ -0,0 +1 @@
{"version":3,"file":"dice-5.js","sources":["../../../src/icons/dice-5.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Dice5\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiByeT0iMiIgLz4KICA8cGF0aCBkPSJNMTYgOGguMDEiIC8+CiAgPHBhdGggZD0iTTggOGguMDEiIC8+CiAgPHBhdGggZD0iTTggMTZoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xNiAxNmguMDEiIC8+CiAgPHBhdGggZD0iTTEyIDEyaC4wMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/dice-5\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 Dice5 = createLucideIcon('Dice5', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['path', { d: 'M16 8h.01', key: 'cr5u4v' }],\n ['path', { d: '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AA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,17 @@
import type { SchemaMap } from "../types";
import type { SchemaCxt } from "../compile";
import type { KeywordCxt } from "../compile/validate";
import { CodeGen, Code, Name } from "../compile/codegen";
export declare function checkReportMissingProp(cxt: KeywordCxt, prop: string): void;
export declare function checkMissingProp({ gen, data, it: { opts } }: KeywordCxt, properties: string[], missing: Name): Code;
export declare function reportMissingProp(cxt: KeywordCxt, missing: Name): void;
export declare function hasPropFunc(gen: CodeGen): Name;
export declare function isOwnProperty(gen: CodeGen, data: Name, property: Name | string): Code;
export declare function propertyInData(gen: CodeGen, data: Name, property: Name | string, ownProperties?: boolean): Code;
export declare function noPropertyInData(gen: CodeGen, data: Name, property: Name | string, ownProperties?: boolean): Code;
export declare function allSchemaProperties(schemaMap?: SchemaMap): string[];
export declare function schemaProperties(it: SchemaCxt, schemaMap: SchemaMap): string[];
export declare function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }: KeywordCxt, func: Code, context: Code, passSchema?: boolean): Code;
export declare function usePattern({ gen, it: { opts } }: KeywordCxt, pattern: string): Name;
export declare function validateArray(cxt: KeywordCxt): Name;
export declare function validateUnion(cxt: KeywordCxt): void;
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../src/posix.ts", "../../src/win32.ts", "options.js", "../../src/index.ts"],
"sourcesContent": ["/**\n * This is the Posix implementation of isexe, which uses the file\n * mode and uid/gid values.\n *\n * @module\n */\n\nimport { Stats, statSync } from 'node:fs'\nimport { stat } from 'node:fs/promises'\nimport { IsexeOptions } from './options.js'\n\n/**\n * Determine whether a path is executable according to the mode and\n * current (or specified) user and group IDs.\n */\nexport const isexe = async (\n path: string,\n options: IsexeOptions = {},\n): Promise<boolean> => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(await stat(path), options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\n/**\n * Synchronously determine whether a path is executable according to\n * the mode and current (or specified) user and group IDs.\n */\nexport const sync = (\n path: string,\n options: IsexeOptions = {},\n): boolean => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(statSync(path), options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\nconst checkStat = (stat: Stats, options: IsexeOptions) =>\n stat.isFile() && checkMode(stat, options)\n\nconst checkMode = (stat: Stats, options: IsexeOptions) => {\n const myUid = options.uid ?? process.getuid?.()\n const myGroups = options.groups ?? process.getgroups?.() ?? []\n const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]\n if (myUid === undefined || myGid === undefined) {\n throw new Error('cannot get uid or gid')\n }\n\n const groups = new Set([myGid, ...myGroups])\n\n const mod = stat.mode\n const uid = stat.uid\n const gid = stat.gid\n\n const u = parseInt('100', 8)\n const g = parseInt('010', 8)\n const o = parseInt('001', 8)\n const ug = u | g\n\n return !!(\n mod & o ||\n (mod & g && groups.has(gid)) ||\n (mod & u && uid === myUid) ||\n (mod & ug && myUid === 0)\n )\n}\n", "/**\n * This is the Windows implementation of isexe, which uses the file\n * extension and PATHEXT setting.\n *\n * @module\n */\n\nimport { Stats, statSync } from 'node:fs'\nimport { stat } from 'node:fs/promises'\nimport { IsexeOptions } from './options.js'\nimport { delimiter } from 'node:path'\n\n/**\n * Determine whether a path is executable based on the file extension\n * and PATHEXT environment variable (or specified pathExt option)\n */\nexport const isexe = async (\n path: string,\n options: IsexeOptions = {},\n): Promise<boolean> => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(await stat(path), path, options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\n/**\n * Synchronously determine whether a path is executable based on the file\n * extension and PATHEXT environment variable (or specified pathExt option)\n */\nexport const sync = (\n path: string,\n options: IsexeOptions = {},\n): boolean => {\n const { ignoreErrors = false } = options\n try {\n return checkStat(statSync(path), path, options)\n } catch (e) {\n const er = e as NodeJS.ErrnoException\n if (ignoreErrors || er.code === 'EACCES') return false\n throw er\n }\n}\n\nconst checkPathExt = (path: string, options: IsexeOptions) => {\n const { pathExt = process.env.PATHEXT || '' } = options\n const peSplit = pathExt.split(delimiter)\n if (peSplit.indexOf('') !== -1) {\n return true\n }\n\n for (const pes of peSplit) {\n const p = pes.toLowerCase()\n const ext = path.substring(path.length - p.length).toLowerCase()\n\n if (p && ext === p) {\n return true\n }\n }\n return false\n}\n\nconst checkStat = (stat: Stats, path: string, options: IsexeOptions) =>\n stat.isFile() && checkPathExt(path, options)\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=options.js.map", "import * as posix from './posix.js'\nimport * as win32 from './win32.js'\nexport * from './options.js'\nexport { win32, posix }\n\nconst platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform\nconst impl = platform === 'win32' ? win32 : posix\n\n/**\n * Determine whether a path is executable on the current platform.\n */\nexport const isexe = impl.isexe\n/**\n * Synchronously determine whether a path is executable on the\n * current platform.\n */\nexport const sync = impl.sync\n"],
"mappings": "2KAOA,IAAAA,EAAA,QAAA,SAAA,EACAC,EAAA,QAAA,kBAAA,EAOaC,EAAQ,MACnBC,EACAC,EAAwB,CAAA,IACJ,CACpB,GAAM,CAAE,aAAAC,EAAe,EAAK,EAAKD,EACjC,GAAI,CACF,OAAOE,EAAU,QAAML,EAAA,MAAKE,CAAI,EAAGC,CAAO,CAC5C,OAASG,EAAG,CACV,IAAMC,EAAKD,EACX,GAAIF,GAAgBG,EAAG,OAAS,SAAU,MAAO,GACjD,MAAMA,CACR,CACF,EAZaC,EAAA,MAAKP,EAkBX,IAAMQ,EAAO,CAClBP,EACAC,EAAwB,CAAA,IACb,CACX,GAAM,CAAE,aAAAC,EAAe,EAAK,EAAKD,EACjC,GAAI,CACF,OAAOE,KAAUN,EAAA,UAASG,CAAI,EAAGC,CAAO,CAC1C,OAASG,EAAG,CACV,IAAMC,EAAKD,EACX,GAAIF,GAAgBG,EAAG,OAAS,SAAU,MAAO,GACjD,MAAMA,CACR,CACF,EAZaC,EAAA,KAAIC,EAcjB,IAAMJ,EAAY,CAACK,EAAaP,IAC9BO,EAAK,OAAM,GAAMC,EAAUD,EAAMP,CAAO,EAEpCQ,EAAY,CAACD,EAAaP,IAAyB,CACvD,IAAMS,EAAQT,EAAQ,KAAO,QAAQ,SAAQ,EACvCU,EAAWV,EAAQ,QAAU,QAAQ,YAAW,GAAM,CAAA,EACtDW,EAAQX,EAAQ,KAAO,QAAQ,SAAQ,GAAMU,EAAS,CAAC,EAC7D,GAAID,IAAU,QAAaE,IAAU,OACnC,MAAM,IAAI,MAAM,uBAAuB,EAGzC,IAAMC,EAAS,IAAI,IAAI,CAACD,EAAO,GAAGD,CAAQ,CAAC,EAErCG,EAAMN,EAAK,KACXO,EAAMP,EAAK,IACXQ,EAAMR,EAAK,IAEXS,EAAI,SAAS,MAAO,CAAC,EACrBC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D,EACf,MAAO,EAEX,CACA,MAAO,EACT,EAEMT,EAAY,CAACW,EAAad,EAAcC,IAC5Ca,EAAK,OAAM,GAAMN,EAAaR,EAAMC,CAAO,ICnE7C,IAAAc,EAAAC,EAAAC,GAAA,cACA,OAAO,eAAeA,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,ykCCD5D,IAAAC,EAAAC,EAAA,GAAA,EAGgB,QAAA,MAAAD,EAFhB,IAAAE,EAAAD,EAAA,GAAA,EAES,QAAA,MAAAC,EADTC,EAAA,IAAA,OAAA,EAGA,IAAMC,EAAW,QAAQ,IAAI,uBAAyB,QAAQ,SACxDC,EAAOD,IAAa,QAAUF,EAAQF,EAK/B,QAAA,MAAQK,EAAK,MAKb,QAAA,KAAOA,EAAK",
"names": ["node_fs_1", "promises_1", "isexe", "path", "options", "ignoreErrors", "checkStat", "e", "er", "exports", "sync", "stat", "checkMode", "myUid", "myGroups", "myGid", "groups", "mod", "uid", "gid", "u", "g", "o", "ug", "node_fs_1", "promises_1", "node_path_1", "isexe", "path", "options", "ignoreErrors", "checkStat", "e", "er", "exports", "sync", "checkPathExt", "pathExt", "peSplit", "pes", "p", "ext", "stat", "require_options", "__commonJSMin", "exports", "posix", "__importStar", "win32", "__exportStar", "platform", "impl"]
}
@@ -0,0 +1,3 @@
import { n as AjvJsonSchemaValidator } from "./ajvProvider-FOQRM7up.cjs";
import process from "node:process";
export { AjvJsonSchemaValidator as DefaultJsonSchemaValidator, process };
@@ -0,0 +1,548 @@
export default `flf2a$ 3 2 7 0 8
This font is (c) Michel Eftimakis 1995 -- Version 1.1 -- 15 feb 1995
____________________________________________________________ /\`____
| Michel Eftimakis | "Ascii-Artist" '\\/ |
| Michel.Eftimakis@ustc.vlsi.com | Boo)- (00) ||
| Tel : (33) 92 96 27 19 | (_\`'_) ||
|__ Fax : (33) 92 96 27 01 _________|____ FRANCE ___________ _!!_ ____||
|_____________________________________________________________________|
$$@
$$@
$$@@
[]@
()@
@@
,,@
@
@@
@
=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183
o@
$@
@@
192
\` @
//\\@
@@
193
' @
//\\@
@@
194
^ @
//\\@
@@
195
~ @
//\\@
@@
196
..@
//\\@
@@
197
o @
//\\@
@@
198
____@
//\\|-@
\`-@@
199
@
((@
'@@
200
\`_@
||-@
\`-@@
201
'_@
||-@
\`-@@
202
^_@
||-@
\`-@@
203
..@
||-@
\`-@@
204
\` @
L|@
@@
205
'@
L|@
@@
206
^ @
L|@
@@
207
..@
L|@
@@
209
_~ @
[|\\|@
@@
210
\` @
(()@
@@
211
' @
(()@
@@
212
^ @
(()@
@@
213
~ @
(()@
@@
214
..@
(()@
@@
217
\` @
|U|@
\`-'@@
218
' @
|U|@
\`-'@@
219
^ @
|U|@
\`-'@@
220
..@
|U|@
\`-'@@
223
_ @
||}@
L| @@
224
-@
a@
@@
225
,@
a@
@@
226
^@
a@
@@
227
~@
a@
@@
228
..@
a @
@@
229
.@
a@
@@
231
@
c@
'@@
232
-@
e@
@@
233
,@
e@
@@
234
^@
e@
@@
235
..@
e @
@@
236
-@
i@
@@
237
,@
i@
@@
238
^@
i@
@@
239
..@
i @
@@
241
~@
n@
@@
242
-@
o@
@@
243
,@
o@
@@
244
^@
o@
@@
245
~@
o@
@@
246
..@
o @
@@
249
-@
u@
@@
250
,@
u@
@@
251
^@
u@
@@
252
..@
u @
@@
253
,@
y@
@@
255
..@
y @
@@
`
@@ -0,0 +1 @@
{"version":3,"file":"album.js","sources":["../../../src/icons/album.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Album\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiByeT0iMiIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSIxMSAzIDExIDExIDE0IDggMTcgMTEgMTcgMyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/album\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 Album = createLucideIcon('Album', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['polyline', { points: '11 3 11 11 14 8 17 11 17 3', key: '1wcwz3' }],\n]);\n\nexport default Album;\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,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CAAA,CACvF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACtE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,90 @@
/*!
* forwarded
* Copyright(c) 2014-2017 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module exports.
* @public
*/
module.exports = forwarded
/**
* Get all addresses in the request, using the `X-Forwarded-For` header.
*
* @param {object} req
* @return {array}
* @public
*/
function forwarded (req) {
if (!req) {
throw new TypeError('argument req is required')
}
// simple header parsing
var proxyAddrs = parse(req.headers['x-forwarded-for'] || '')
var socketAddr = getSocketAddr(req)
var addrs = [socketAddr].concat(proxyAddrs)
// return all addresses
return addrs
}
/**
* Get the socket address for a request.
*
* @param {object} req
* @return {string}
* @private
*/
function getSocketAddr (req) {
return req.socket
? req.socket.remoteAddress
: req.connection.remoteAddress
}
/**
* Parse the X-Forwarded-For header.
*
* @param {string} header
* @private
*/
function parse (header) {
var end = header.length
var list = []
var start = header.length
// gather addresses, backwards
for (var i = header.length - 1; i >= 0; i--) {
switch (header.charCodeAt(i)) {
case 0x20: /* */
if (start === end) {
start = end = i
}
break
case 0x2c: /* , */
if (start !== end) {
list.push(header.substring(start, end))
}
start = end = i
break
default:
start = i
break
}
}
// final address
if (start !== end) {
list.push(header.substring(start, end))
}
return list
}
@@ -0,0 +1 @@
{"version":3,"file":"set-active.mjs","sources":["../../../../../src/gestures/drag/state/set-active.ts"],"sourcesContent":["import { isDragging } from \"./is-active\"\n\nexport function setDragLock(axis: boolean | \"x\" | \"y\" | \"lockDirection\") {\n if (axis === \"x\" || axis === \"y\") {\n if (isDragging[axis]) {\n return null\n } else {\n isDragging[axis] = true\n return () => {\n isDragging[axis] = false\n }\n }\n } else {\n if (isDragging.x || isDragging.y) {\n return null\n } else {\n isDragging.x = isDragging.y = true\n return () => {\n isDragging.x = isDragging.y = false\n }\n }\n }\n}\n"],"names":[],"mappings":";;AAEM,SAAU,WAAW,CAAC,IAA2C,EAAA;IACnE,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,EAAE;AAC9B,QAAA,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;AAClB,YAAA,OAAO,IAAI;QACf;aAAO;AACH,YAAA,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI;AACvB,YAAA,OAAO,MAAK;AACR,gBAAA,UAAU,CAAC,IAAI,CAAC,GAAG,KAAK;AAC5B,YAAA,CAAC;QACL;IACJ;SAAO;QACH,IAAI,UAAU,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE;AAC9B,YAAA,OAAO,IAAI;QACf;aAAO;YACH,UAAU,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,IAAI;AAClC,YAAA,OAAO,MAAK;gBACR,UAAU,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,KAAK;AACvC,YAAA,CAAC;QACL;IACJ;AACJ;;;;"}
@@ -0,0 +1,317 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/* eslint-disable no-console */
var _commander = require('commander'); var _commander2 = _interopRequireDefault(_commander);
var _tinyglobby = require('tinyglobby');
var _fs = require('mz/fs');
var _path = require('path');
var _index = require('./index');
function run() {
_commander2.default
.description(`Sucrase: super-fast Babel alternative.`)
.usage("[options] <srcDir>")
.option(
"-d, --out-dir <out>",
"Compile an input directory of modules into an output directory.",
)
.option(
"-p, --project <dir>",
"Compile a TypeScript project, will read from tsconfig.json in <dir>",
)
.option("--out-extension <extension>", "File extension to use for all output files.", "js")
.option("--exclude-dirs <paths>", "Names of directories that should not be traversed.")
.option("-q, --quiet", "Don't print the names of converted files.")
.option("-t, --transforms <transforms>", "Comma-separated list of transforms to run.")
.option("--disable-es-transforms", "Opt out of all ES syntax transforms.")
.option("--jsx-runtime <string>", "Transformation mode for the JSX transform.")
.option("--production", "Disable debugging information from JSX in output.")
.option(
"--jsx-import-source <string>",
"Automatic JSX transform import path prefix, defaults to `React.Fragment`.",
)
.option(
"--jsx-pragma <string>",
"Classic JSX transform element creation function, defaults to `React.createElement`.",
)
.option(
"--jsx-fragment-pragma <string>",
"Classic JSX transform fragment component, defaults to `React.Fragment`.",
)
.option("--keep-unused-imports", "Disable automatic removal of type-only imports/exports.")
.option("--preserve-dynamic-import", "Don't transpile dynamic import() to require.")
.option(
"--inject-create-require-for-import-require",
"Use `createRequire` when transpiling TS `import = require` to ESM.",
)
.option(
"--enable-legacy-typescript-module-interop",
"Use default TypeScript ESM/CJS interop strategy.",
)
.option("--enable-legacy-babel5-module-interop", "Use Babel 5 ESM/CJS interop strategy.")
.parse(process.argv);
if (_commander2.default.project) {
if (
_commander2.default.outDir ||
_commander2.default.transforms ||
_commander2.default.args[0] ||
_commander2.default.enableLegacyTypescriptModuleInterop
) {
console.error(
"If TypeScript project is specified, out directory, transforms, source " +
"directory, and --enable-legacy-typescript-module-interop may not be specified.",
);
process.exit(1);
}
} else {
if (!_commander2.default.outDir) {
console.error("Out directory is required");
process.exit(1);
}
if (!_commander2.default.transforms) {
console.error("Transforms option is required.");
process.exit(1);
}
if (!_commander2.default.args[0]) {
console.error("Source directory is required.");
process.exit(1);
}
}
const options = {
outDirPath: _commander2.default.outDir,
srcDirPath: _commander2.default.args[0],
project: _commander2.default.project,
outExtension: _commander2.default.outExtension,
excludeDirs: _commander2.default.excludeDirs ? _commander2.default.excludeDirs.split(",") : [],
quiet: _commander2.default.quiet,
sucraseOptions: {
transforms: _commander2.default.transforms ? _commander2.default.transforms.split(",") : [],
disableESTransforms: _commander2.default.disableEsTransforms,
jsxRuntime: _commander2.default.jsxRuntime,
production: _commander2.default.production,
jsxImportSource: _commander2.default.jsxImportSource,
jsxPragma: _commander2.default.jsxPragma || "React.createElement",
jsxFragmentPragma: _commander2.default.jsxFragmentPragma || "React.Fragment",
keepUnusedImports: _commander2.default.keepUnusedImports,
preserveDynamicImport: _commander2.default.preserveDynamicImport,
injectCreateRequireForImportRequire: _commander2.default.injectCreateRequireForImportRequire,
enableLegacyTypeScriptModuleInterop: _commander2.default.enableLegacyTypescriptModuleInterop,
enableLegacyBabel5ModuleInterop: _commander2.default.enableLegacyBabel5ModuleInterop,
},
};
buildDirectory(options).catch((e) => {
process.exitCode = 1;
console.error(e);
});
} exports.default = run;
async function findFiles(options) {
const outDirPath = options.outDirPath;
const srcDirPath = options.srcDirPath;
const extensions = options.sucraseOptions.transforms.includes("typescript")
? [".ts", ".tsx"]
: [".js", ".jsx"];
if (!(await _fs.exists.call(void 0, outDirPath))) {
await _fs.mkdir.call(void 0, outDirPath);
}
const outArr = [];
for (const child of await _fs.readdir.call(void 0, srcDirPath)) {
if (["node_modules", ".git"].includes(child) || options.excludeDirs.includes(child)) {
continue;
}
const srcChildPath = _path.join.call(void 0, srcDirPath, child);
const outChildPath = _path.join.call(void 0, outDirPath, child);
if ((await _fs.stat.call(void 0, srcChildPath)).isDirectory()) {
const innerOptions = {...options};
innerOptions.srcDirPath = srcChildPath;
innerOptions.outDirPath = outChildPath;
const innerFiles = await findFiles(innerOptions);
outArr.push(...innerFiles);
} else if (extensions.some((ext) => srcChildPath.endsWith(ext))) {
const outPath = outChildPath.replace(/\.\w+$/, `.${options.outExtension}`);
outArr.push({
srcPath: srcChildPath,
outPath,
});
}
}
return outArr;
}
async function runGlob(options) {
const tsConfigPath = _path.join.call(void 0, options.project, "tsconfig.json");
let str;
try {
str = await _fs.readFile.call(void 0, tsConfigPath, "utf8");
} catch (err) {
console.error("Could not find project tsconfig.json");
console.error(` --project=${options.project}`);
console.error(err);
process.exit(1);
}
const json = JSON.parse(str);
const foundFiles = [];
const files = json.files;
const include = json.include;
const absProject = _path.join.call(void 0, process.cwd(), options.project);
const outDirs = [];
if (!(await _fs.exists.call(void 0, options.outDirPath))) {
await _fs.mkdir.call(void 0, options.outDirPath);
}
if (files) {
for (const file of files) {
if (file.endsWith(".d.ts")) {
continue;
}
if (!file.endsWith(".ts") && !file.endsWith(".js")) {
continue;
}
const srcFile = _path.join.call(void 0, absProject, file);
const outFile = _path.join.call(void 0, options.outDirPath, file);
const outPath = outFile.replace(/\.\w+$/, `.${options.outExtension}`);
const outDir = _path.dirname.call(void 0, outPath);
if (!outDirs.includes(outDir)) {
outDirs.push(outDir);
}
foundFiles.push({
srcPath: srcFile,
outPath,
});
}
}
if (include) {
for (const pattern of include) {
const globFiles = await _tinyglobby.glob.call(void 0, _path.join.call(void 0, absProject, pattern), {expandDirectories: false});
for (const file of globFiles) {
if (!file.endsWith(".ts") && !file.endsWith(".js")) {
continue;
}
if (file.endsWith(".d.ts")) {
continue;
}
const relativeFile = _path.relative.call(void 0, absProject, file);
const outFile = _path.join.call(void 0, options.outDirPath, relativeFile);
const outPath = outFile.replace(/\.\w+$/, `.${options.outExtension}`);
const outDir = _path.dirname.call(void 0, outPath);
if (!outDirs.includes(outDir)) {
outDirs.push(outDir);
}
foundFiles.push({
srcPath: file,
outPath,
});
}
}
}
for (const outDirPath of outDirs) {
if (!(await _fs.exists.call(void 0, outDirPath))) {
await _fs.mkdir.call(void 0, outDirPath);
}
}
// TODO: read exclude
return foundFiles;
}
async function updateOptionsFromProject(options) {
/**
* Read the project information and assign the following.
* - outDirPath
* - transform: imports
* - transform: typescript
* - enableLegacyTypescriptModuleInterop: true/false.
*/
const tsConfigPath = _path.join.call(void 0, options.project, "tsconfig.json");
let str;
try {
str = await _fs.readFile.call(void 0, tsConfigPath, "utf8");
} catch (err) {
console.error("Could not find project tsconfig.json");
console.error(` --project=${options.project}`);
console.error(err);
process.exit(1);
}
const json = JSON.parse(str);
const sucraseOpts = options.sucraseOptions;
if (!sucraseOpts.transforms.includes("typescript")) {
sucraseOpts.transforms.push("typescript");
}
const compilerOpts = json.compilerOptions;
if (compilerOpts.outDir) {
options.outDirPath = _path.join.call(void 0, process.cwd(), options.project, compilerOpts.outDir);
}
if (compilerOpts.esModuleInterop !== true) {
sucraseOpts.enableLegacyTypeScriptModuleInterop = true;
}
if (compilerOpts.module === "commonjs") {
if (!sucraseOpts.transforms.includes("imports")) {
sucraseOpts.transforms.push("imports");
}
}
}
async function buildDirectory(options) {
let files;
if (options.outDirPath && options.srcDirPath) {
files = await findFiles(options);
} else if (options.project) {
await updateOptionsFromProject(options);
files = await runGlob(options);
} else {
console.error("Project or Source directory required.");
process.exit(1);
}
for (const file of files) {
await buildFile(file.srcPath, file.outPath, options);
}
}
async function buildFile(srcPath, outPath, options) {
if (!options.quiet) {
console.log(`${srcPath} -> ${outPath}`);
}
const code = (await _fs.readFile.call(void 0, srcPath)).toString();
const transformedCode = _index.transform.call(void 0, code, {...options.sucraseOptions, filePath: srcPath}).code;
await _fs.writeFile.call(void 0, outPath, transformedCode);
}
@@ -0,0 +1,85 @@
import { expect, test } from "vitest";
import * as z from "zod/v4";
test("locales - tg", () => {
z.config(z.locales.tg());
const invalidType = z.number().safeParse("a");
expect(invalidType.error!.issues[0].code).toBe("invalid_type");
expect(invalidType.error!.issues[0].message).toBe("Вуруди нодуруст: рақам интизор мерафт, сатр гирифта шуд");
const invalidType2 = z.string().safeParse(1);
expect(invalidType2.error!.issues[0].code).toBe("invalid_type");
expect(invalidType2.error!.issues[0].message).toBe("Вуруди нодуруст: сатр интизор мерафт, рақам гирифта шуд");
const invalidValue = z.enum(["a", "b"]).safeParse(1);
expect(invalidValue.error!.issues[0].code).toBe("invalid_value");
expect(invalidValue.error!.issues[0].message).toBe('Интихоби нодуруст: яке аз "a"|"b" интизор мерафт');
const tooBig = z.number().max(10).safeParse(15);
expect(tooBig.error!.issues[0].code).toBe("too_big");
expect(tooBig.error!.issues[0].message).toBe("Хеле калон: number бояд <=10 бошад");
const tooSmall = z.number().min(10).safeParse(5);
expect(tooSmall.error!.issues[0].code).toBe("too_small");
expect(tooSmall.error!.issues[0].message).toBe("Хеле хурд: number бояд >=10 бошад");
// singular units after numerals in Tajik
const tooShort = z.string().min(5).safeParse("hi");
expect(tooShort.error!.issues[0].message).toBe("Хеле хурд: string бояд >=5 аломат дошта бошад");
const tooFewItems = z.array(z.number()).min(2).safeParse([1]);
expect(tooFewItems.error!.issues[0].message).toBe("Хеле хурд: array бояд >=2 унсур дошта бошад");
const invalidEmail = z.string().email().safeParse("nope");
expect(invalidEmail.error!.issues[0].code).toBe("invalid_format");
expect(invalidEmail.error!.issues[0].message).toBe("суроғаи email-и нодуруст");
const invalidStart = z.string().startsWith("ab").safeParse("xy");
expect(invalidStart.error!.issues[0].message).toBe('Сатри нодуруст: бояд бо "ab" оғоз шавад');
const invalidRegex = z.string().regex(/abcd/).safeParse("xy");
expect(invalidRegex.error!.issues[0].message).toContain("мувофиқат кунад");
const notMultipleOf = z.number().multipleOf(5).safeParse(7);
expect(notMultipleOf.error!.issues[0].message).toBe("Рақами нодуруст: бояд ба 5 бе бақия тақсим шавад");
const oneUnknownKey = z.strictObject({ a: z.string() }).safeParse({ a: "x", b: 1 });
expect(oneUnknownKey.error!.issues[0].message).toBe('Калиди номаълум: "b"');
const twoUnknownKeys = z.strictObject({ a: z.string() }).safeParse({ a: "x", b: 1, c: 2 });
expect(twoUnknownKeys.error!.issues[0].message).toBe('Калидҳои номаълум: "b", "c"');
const cases: [z.ZodType, unknown, string][] = [
[z.literal("a"), "b", 'Вуруди нодуруст: "a" интизор мерафт'],
[z.boolean(), null, "Вуруди нодуруст: boolean интизор мерафт, null гирифта шуд"],
[z.number(), Number.NaN, "Вуруди нодуруст: рақам интизор мерафт, NaN гирифта шуд"],
[z.number().lt(10), 10, "Хеле калон: number бояд <10 бошад"],
[z.number().gt(10), 10, "Хеле хурд: number бояд >10 бошад"],
[z.string().max(1), "ab", "Хеле калон: string бояд <=1 аломат дошта бошад"],
[z.set(z.string()).min(1), new Set(), "Хеле хурд: set бояд >=1 унсур дошта бошад"],
[z.map(z.string(), z.number()).min(1), new Map(), "Хеле хурд: map бояд >=1 сабт дошта бошад"],
[z.file().min(1), new File([], "empty"), "Хеле хурд: file бояд >=1 байт дошта бошад"],
[z.string().endsWith("ab"), "xy", 'Сатри нодуруст: бояд бо "ab" анҷом ёбад'],
[z.string().includes("ab"), "xy", 'Сатри нодуруст: бояд "ab"-ро дар бар гирад'],
[z.stringFormat("custom", () => false), "xy", "custom-и нодуруст"],
[z.union([z.string(), z.number()]), null, "Вуруди нодуруст"],
[
z.discriminatedUnion("kind", [z.object({ kind: z.literal("a") }), z.object({ kind: z.literal("b") })]),
{ kind: "c" },
"Қимати нодурусти дискриминатор: 'a' | 'b' интизор мерафт",
],
[z.record(z.string().min(2), z.number()), { a: 1 }, "Калиди нодуруст дар record"],
[z.map(z.string(), z.number()), new Map([[{}, 1]]), "Калиди нодуруст дар map"],
[z.map(z.object({}), z.number()), new Map([[{}, "a"]]), "Қимати нодуруст дар map"],
[z.custom(() => false), "a", "Вуруди нодуруст"],
];
for (const [schema, input, message] of cases) {
expect(schema.safeParse(input).error!.issues[0].message).toBe(message);
}
expect(z.object({ name: z.string().min(1), age: z.number().min(0) }).parse({ name: "Ali", age: 30 })).toEqual({
name: "Ali",
age: 30,
});
});
@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeUnicode = void 0;
// warning: extremely hot code path.
// This has been meticulously optimized for use
// within npm install on large package trees.
// Do not edit without careful benchmarking.
const normalizeCache = Object.create(null);
// Limit the size of this. Very low-sophistication LRU cache
const MAX = 10000;
const cache = new Set();
const normalizeUnicode = (s) => {
if (!cache.has(s)) {
// shake out identical accents and ligatures
normalizeCache[s] = s
.normalize('NFD')
.toLocaleLowerCase('en')
.toLocaleUpperCase('en');
}
else {
cache.delete(s);
}
cache.add(s);
const ret = normalizeCache[s];
let i = cache.size - MAX;
// only prune when we're 10% over the max
if (i > MAX / 10) {
for (const s of cache) {
cache.delete(s);
delete normalizeCache[s];
if (--i <= 0)
break;
}
}
return ret;
};
exports.normalizeUnicode = normalizeUnicode;
//# sourceMappingURL=normalize-unicode.js.map
@@ -0,0 +1,9 @@
/**
* Type-checked examples for style utilities in {@link ./styles.ts `styles.ts`}.
*
* These examples are included in the API documentation via `@includeCode` tags.
* Each function's region markers define the code snippet that appears in the docs.
*
* @module
*/
export {};
@@ -0,0 +1 @@
module.exports={C:{"52":0.027,"115":0.08871,"120":0.00771,"121":0.01543,"123":0.00386,"124":0.00386,"125":0.00386,"135":0.00771,"136":0.00386,"140":0.00771,"144":0.00386,"146":0.00386,"147":0.00386,"148":0.00386,"149":0.00386,"150":0.00771,"151":0.00771,"152":0.02314,"153":0.02314,"154":0.11571,"155":0.46284,"156":0.42813,"157":0.01157,_:"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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 126 127 128 129 130 131 132 133 134 137 138 139 141 142 143 145 158 159 160 3.5 3.6"},D:{"49":0.00771,"78":0.00386,"79":0.00386,"84":0.00771,"85":0.00771,"86":0.00386,"87":0.00386,"91":0.00386,"94":0.00386,"97":0.00386,"98":0.00386,"101":0.00771,"102":0.00386,"103":0.02314,"104":0.02314,"105":0.01929,"106":0.01929,"107":0.03086,"108":0.03086,"109":0.98354,"110":0.02314,"111":0.03086,"112":0.02314,"113":0.00386,"114":0.01157,"115":0.00386,"116":0.06943,"117":0.03086,"118":0.03471,"119":0.054,"120":0.07328,"121":0.027,"122":0.03471,"123":0.01543,"124":0.05786,"125":0.027,"126":0.02314,"127":0.01929,"128":0.03086,"129":0.01929,"130":0.054,"131":0.07328,"132":0.01157,"133":0.07714,"134":0.05786,"135":0.05786,"136":0.04243,"137":0.04628,"138":0.12728,"139":0.05786,"140":0.081,"141":0.05014,"142":0.11957,"143":0.06557,"144":0.06557,"145":0.05786,"146":0.06557,"147":0.09257,"148":0.14271,"149":0.12342,"150":0.30856,"151":1.77036,"152":11.45915,"153":8.33883,"154":1.72408,"155":0.03857,"156":0.01157,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 80 81 83 88 89 90 92 93 95 96 99 100 157"},F:{"95":0.01157,"101":0.01157,"102":0.00386,"106":0.00386,"133":0.00386,"134":0.01157,"135":0.11571,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 103 104 105 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 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.00386,"101":0.00386,"109":0.054,"112":0.00386,"117":0.00386,"119":0.00771,"120":0.01543,"121":0.00386,"122":0.00386,"123":0.00386,"125":0.01543,"126":0.00386,"127":0.00386,"130":0.00386,"131":0.00771,"132":0.00386,"133":0.01157,"134":0.00386,"135":0.00386,"136":0.00386,"137":0.00386,"138":0.00386,"139":0.00386,"140":0.00386,"141":0.00386,"142":0.01543,"143":0.01929,"144":0.00771,"145":0.00771,"146":0.01157,"147":0.00771,"148":0.01157,"149":0.027,"150":0.04243,"151":0.18128,"152":1.74336,"153":1.87065,"154":0.47055,_:"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 102 103 104 105 106 107 108 110 111 113 114 115 116 118 124 128 129"},E:{"14":0.00386,"27":0.08871,_:"4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 16.0 27.1 TP","13.1":0.00386,"14.1":0.00386,"15.4":0.00386,"15.5":0.00386,"15.6":0.03471,"16.1":0.01157,"16.2":0.00386,"16.3":0.01157,"16.4":0.00771,"16.5":0.00386,"16.6":0.054,"17.0":0.00771,"17.1":0.108,"17.2":0.00386,"17.3":0.01157,"17.4":0.01929,"17.5":0.03086,"17.6":0.07714,"18.0":0.00386,"18.1":0.027,"18.2":0.00386,"18.3":0.027,"18.4":0.00771,"18.5-18.7":0.04243,"26.0":0.02314,"26.1":0.01157,"26.2":0.06943,"26.3":0.05786,"26.4":0.08871,"26.5":0.30085,"26.6":1.52352,"27.2":0.00386},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00238,"5.0-5.1":0.00238,"6.0-6.1":0,"7.0-7.1":0.00476,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.0238,"11.0-11.2":0.00238,"11.3-11.4":0.00476,"12.0-12.1":0,"12.2-12.5":0.06189,"13.0-13.1":0,"13.2":0.0119,"13.3":0,"13.4-13.7":0.00238,"14.0-14.4":0.00952,"14.5-14.8":0.01428,"15.0-15.1":0.01428,"15.2-15.3":0.00952,"15.4":0.0119,"15.5":0.01428,"15.6-15.8":0.30945,"16.0":0.0238,"16.1":0.04285,"16.2":0.0238,"16.3":0.05237,"16.4":0.0119,"16.5":0.01904,"16.6-16.7":0.43085,"17.0":0.01666,"17.1":0.0238,"17.2":0.0238,"17.3":0.03571,"17.4":0.04999,"17.5":0.0976,"17.6-17.7":0.25232,"18.0":0.05237,"18.1":0.10474,"18.2":0.14282,"18.3":0.24756,"18.4":0.15473,"18.5-18.7":3.19689,"26.0":0.15473,"26.1":0.15711,"26.2":0.40943,"26.3":0.44276,"26.4":0.32374,"26.5":2.16856,"26.6":13.3803,"27.0":1.02596,"27.1":0,"27.2":0.02618},P:{"21":0.00894,"22":0.01788,"23":0.00894,"24":0.02683,"25":0.02683,"26":0.03577,"27":0.03577,"28":0.08048,"29":0.17884,"30":2.57526,_:"4 20 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 18.0","17.0":0.00894,"19.0":0.01788},I:{"0":0.00614,"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.Line truncated
@@ -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 FileChartColumn = createLucideIcon("FileChartColumn", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M8 18v-1", key: "zg0ygc" }],
["path", { d: "M12 18v-6", key: "17g6i2" }],
["path", { d: "M16 18v-3", key: "j5jt4h" }]
]);
export { FileChartColumn as default };
//# sourceMappingURL=file-chart-column.js.map
@@ -0,0 +1,15 @@
var log = require('./')
var net = require('net')
function createServer () {
var server = net.createServer()
setInterval(function () {}, 1000)
server.listen(0)
}
createServer()
createServer()
setTimeout(function () {
log()
}, 100)
@@ -0,0 +1 @@
{"version":3,"file":"badge-russian-ruble.js","sources":["../../../src/icons/badge-russian-ruble.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BadgeRussianRuble\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMy44NSA4LjYyYTQgNCAwIDAgMSA0Ljc4LTQuNzcgNCA0IDAgMCAxIDYuNzQgMCA0IDQgMCAwIDEgNC43OCA0Ljc4IDQgNCAwIDAgMSAwIDYuNzQgNCA0IDAgMCAxLTQuNzcgNC43OCA0IDQgMCAwIDEtNi43NSAwIDQgNCAwIDAgMS00Ljc4LTQuNzcgNCA0IDAgMCAxIDAtNi43NloiIC8+CiAgPHBhdGggZD0iTTkgMTZoNSIgLz4KICA8cGF0aCBkPSJNOSAxMmg1YTIgMiAwIDEgMCAwLTRoLTN2OSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/badge-russian-ruble\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 BadgeRussianRuble = createLucideIcon('BadgeRussianRuble', [\n [\n 'path',\n {\n d: 'M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z',\n key: '3c2336',\n },\n ],\n ['path', { d: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AB","2":"_r","33":"_JC _JD"},P:{"1":"_U","2":"J"},I:{"1":"I","2":"_G"}},B:6,C:"isolate-override from unicode-bidi",D:undefined};
@@ -0,0 +1 @@
{"version":3,"file":"scoring.mjs","sources":["../../../src/matcher/repeat/scoring.ts"],"sourcesContent":[null],"names":["baseGuesses","repeatCount"],"mappings":"AAEA,oBAAe,CAAC;EAAEA,WAAW;AAAEC,EAAAA;AAAW,CAAkC,KAC1ED,WAAW,GAAGC,WAAW;;;;"}
@@ -0,0 +1,254 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports._call = _call;
exports._forceSetScope = _forceSetScope;
exports._getQueueContexts = _getQueueContexts;
exports._resyncKey = _resyncKey;
exports._resyncList = _resyncList;
exports._resyncParent = _resyncParent;
exports._resyncRemoved = _resyncRemoved;
exports.call = call;
exports.isDenylisted = isDenylisted;
exports.popContext = popContext;
exports.pushContext = pushContext;
exports.requeue = requeue;
exports.requeueComputedKeyAndDecorators = requeueComputedKeyAndDecorators;
exports.resync = resync;
exports.setContext = setContext;
exports.setKey = setKey;
exports.setScope = setScope;
exports.setup = setup;
exports.skip = skip;
exports.skipKey = skipKey;
exports.stop = stop;
exports.visit = visit;
var _traverseNode = require("../traverse-node.js");
var _index = require("./index.js");
var _removal = require("./removal.js");
var t = require("@babel/types");
function call(key) {
const opts = this.opts;
this.debug(key);
if (this.node) {
if (_call.call(this, opts[key])) return true;
}
if (this.node) {
var _opts$this$node$type;
return _call.call(this, (_opts$this$node$type = opts[this.node.type]) == null ? void 0 : _opts$this$node$type[key]);
}
return false;
}
function _call(fns) {
if (!fns) return false;
for (const fn of fns) {
if (!fn) continue;
const node = this.node;
if (!node) return true;
const ret = fn.call(this.state, this, this.state);
if (ret && typeof ret === "object" && typeof ret.then === "function") {
throw new Error(`You appear to be using a plugin with an async traversal visitor, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
}
if (ret) {
throw new Error(`Unexpected return value from visitor method ${fn}`);
}
if (this.node !== node) return true;
if (this._traverseFlags > 0) return true;
}
return false;
}
function isDenylisted() {
var _this$opts$denylist;
const denylist = (_this$opts$denylist = this.opts.denylist) != null ? _this$opts$denylist : this.opts.blacklist;
return denylist == null ? void 0 : denylist.includes(this.node.type);
}
exports.isBlacklisted = isDenylisted;
function restoreContext(path, context) {
if (path.context !== context) {
path.context = context;
path.state = context.state;
path.opts = context.opts;
}
}
function visit() {
var _this$opts$shouldSkip, _this$opts;
if (!this.node) {
return false;
}
if (this.isDenylisted()) {
return false;
}
if ((_this$opts$shouldSkip = (_this$opts = this.opts).shouldSkip) != null && _this$opts$shouldSkip.call(_this$opts, this)) {
return false;
}
const currentContext = this.context;
if (this.shouldSkip || call.call(this, "enter")) {
this.debug("Skip...");
return this.shouldStop;
}
restoreContext(this, currentContext);
this.debug("Recursing into...");
this.shouldStop = (0, _traverseNode.traverseNode)(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
restoreContext(this, currentContext);
call.call(this, "exit");
return this.shouldStop;
}
function skip() {
this.shouldSkip = true;
}
function skipKey(key) {
if (this.skipKeys == null) {
this.skipKeys = {};
}
this.skipKeys[key] = true;
}
function stop() {
this._traverseFlags |= _index.SHOULD_SKIP | _index.SHOULD_STOP;
}
function _forceSetScope() {
var _this$scope;
let path = this.parentPath;
if ((this.key === "key" || this.listKey === "decorators") && path.isMethod() || this.key === "discriminant" && path.isSwitchStatement()) {
path = path.parentPath;
}
let target;
while (path && !target) {
target = path.scope;
path = path.parentPath;
}
this.scope = this.getScope(target);
(_this$scope = this.scope) == null || _this$scope.init();
}
function setScope() {
var _this$opts2, _this$scope2;
if ((_this$opts2 = this.opts) != null && _this$opts2.noScope) return;
let path = this.parentPath;
if ((this.key === "key" || this.listKey === "decorators") && path.isMethod() || this.key === "discriminant" && path.isSwitchStatement()) {
path = path.parentPath;
}
let target;
while (path && !target) {
var _path$opts;
if ((_path$opts = path.opts) != null && _path$opts.noScope) return;
target = path.scope;
path = path.parentPath;
}
this.scope = this.getScope(target);
(_this$scope2 = this.scope) == null || _this$scope2.init();
}
function setContext(context) {
if (this.skipKeys != null) {
this.skipKeys = {};
}
this._traverseFlags = 0;
if (context) {
this.context = context;
this.state = context.state;
this.opts = context.opts;
}
setScope.call(this);
return this;
}
function resync() {
if (this.removed) return;
_resyncParent.call(this);
_resyncList.call(this);
_resyncKey.call(this);
}
function _resyncParent() {
if (this.parentPath) {
this.parent = this.parentPath.node;
}
}
function _resyncKey() {
if (!this.container) return;
if (this.node === this.container[this.key]) {
return;
}
if (Array.isArray(this.container)) {
for (let i = 0; i < this.container.length; i++) {
if (this.container[i] === this.node) {
setKey.call(this, i);
return;
}
}
} else {
for (const key of Object.keys(this.container)) {
if (this.container[key] === this.node) {
setKey.call(this, key);
return;
}
}
}
this.key = null;
}
function _resyncList() {
if (!this.parent || !this.inList) return;
const newContainer = this.parent[this.listKey];
if (this.container === newContainer) return;
this.container = newContainer || null;
}
function _resyncRemoved() {
if (this.key == null || !this.container || this.container[this.key] !== this.node) {
_removal._markRemoved.call(this);
}
}
function popContext() {
this.contexts.pop();
if (this.contexts.length > 0) {
this.setContext(this.contexts[this.contexts.length - 1]);
} else {
this.setContext(undefined);
}
}
function pushContext(context) {
this.contexts.push(context);
this.setContext(context);
}
function setup(parentPath, container, listKey, key) {
this.listKey = listKey;
this.container = container;
this.parentPath = parentPath || this.parentPath;
setKey.call(this, key);
}
function setKey(key) {
var _this$node;
this.key = key;
this.node = this.container[this.key];
this.type = (_this$node = this.node) == null ? void 0 : _this$node.type;
}
function requeue(pathToQueue = this) {
if (pathToQueue.removed) return;
const contexts = this.contexts;
for (const context of contexts) {
context.maybeQueue(pathToQueue);
}
}
function requeueComputedKeyAndDecorators() {
const {
context,
node
} = this;
if (!t.isPrivate(node) && node.computed) {
context.maybeQueue(this.get("key"));
}
if (node.decorators) {
for (const decorator of this.get("decorators")) {
context.maybeQueue(decorator);
}
}
}
function _getQueueContexts() {
let path = this;
let contexts = this.contexts;
while (!contexts.length) {
path = path.parentPath;
if (!path) break;
contexts = path.contexts;
}
return contexts;
}
//# sourceMappingURL=context.js.map
@@ -0,0 +1,87 @@
/*
We purposely don't generate types for our plugin because TL;DR:
1) there's no real reason that anyone should do a typed import of our rules,
2) it would require us to change our code so there aren't as many inferred types
This type declaration exists as a hacky way to add a type to the export for our
internal packages that require it.
*** Long reason ***
When you turn on declaration files, TS requires all types to be "fully resolvable"
without changes to the code.
All of our lint rules `export default createRule(...)`, which means they all
implicitly reference the `TSESLint.Rule` type for the export.
TS wants to transpile each rule file to this `.d.ts` file:
```ts
import type { TSESLint } from '@typescript-eslint/utils';
declare const _default: TSESLint.RuleModule<TMessageIds, TOptions, TSESLint.RuleListener>;
export default _default;
```
Because we don't import `TSESLint` in most files, it means that TS would have to
insert a new import during the declaration emit to make this work.
However TS wants to avoid adding new imports to the file because a new module
could have type side-effects (like global augmentation) which could cause weird
type side-effects in the decl file that wouldn't exist in source TS file.
So TS errors on most of our rules with the following error:
```
The inferred type of 'default' cannot be named without a reference to
'../../../../node_modules/@typescript-eslint/utils/src/ts-eslint/Rule'.
This is likely not portable. A type annotation is necessary. ts(2742)
```
*/
/* eslint-disable no-restricted-syntax */
import type {
RuleModuleWithMetaDocs,
RuleRecommendation,
RuleRecommendationAcrossConfigs,
} from '@typescript-eslint/utils/ts-eslint';
interface ESLintPluginDocs {
/**
* Does the rule extend (or is it based off of) an ESLint code rule?
* Alternately accepts the name of the base rule, in case the rule has been renamed.
* This is only used for documentation purposes.
*/
extendsBaseRule?: boolean | string;
/**
* If a string config name, which starting config this rule is enabled in.
* If an object, which settings it has enabled in each of those configs.
*/
recommended?: RuleRecommendation | RuleRecommendationAcrossConfigs<unknown[]>;
/**
* Does the rule require us to create a full TypeScript Program in order for it
* to type-check code. This is only used for documentation purposes.
*/
requiresTypeChecking?: boolean;
}
type ESLintPluginRuleModule = RuleModuleWithMetaDocs<
string,
readonly unknown[],
ESLintPluginDocs
>;
type TypeScriptESLintRules = Record<
string,
RuleModuleWithMetaDocs<string, unknown[], ESLintPluginDocs>
>;
declare const rules: TypeScriptESLintRules;
declare namespace rules {
export type {
ESLintPluginDocs,
ESLintPluginRuleModule,
TypeScriptESLintRules,
};
}
export = rules;
@@ -0,0 +1 @@
{"version":3,"file":"pilcrow-right.js","sources":["../../../src/icons/pilcrow-right.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PilcrowRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgM3YxMSIgLz4KICA8cGF0aCBkPSJNMTAgOUg3YTEgMSAwIDAgMSAwLTZoOCIgLz4KICA8cGF0aCBkPSJNMTQgM3YxMSIgLz4KICA8cGF0aCBkPSJtMTggMTQgNCA0SDIiIC8+CiAgPHBhdGggZD0ibTIyIDE4LTQgNCIgLz4KPC9zdmc+) - https://lucide.dev/icons/pilcrow-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst PilcrowRight = createLucideIcon('PilcrowRight', [\n ['path', { d: 'M10 3v11', key: 'o3l5kj' }],\n ['path', { d: 'M10 9H7a1 1 0 0 1 0-6h8', key: '1wb1nc' }],\n ['path', { d: 'M14 3v11', key: 'mlfb7b' }],\n ['path', { d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AAU,CAAA,CAAA;AAAA,CAAA,CAC7C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,12 @@
"use client";
import { createContext } from 'react';
/**
* Note: Still used by components generated by old versions of Framer
*
* @deprecated
*/
const DeprecatedLayoutGroupContext = createContext(null);
export { DeprecatedLayoutGroupContext };
//# sourceMappingURL=DeprecatedLayoutGroupContext.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"additionalProperties.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/additionalProperties.ts"],"names":[],"mappings":";;AAOA,kCAAsE;AACtE,mDAAiE;AACjE,+CAAmC;AAEnC,6CAA0E;AAQ1E,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,qCAAqC;IAC9C,MAAM,EAAE,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,wBAAwB,MAAM,CAAC,kBAAkB,GAAG;CAC5E,CAAA;AAED,MAAM,GAAG,GAAmD;IAC1D,OAAO,EAAE,sBAAsB;IAC/B,IAAI,EAAE,CAAC,QAAQ,CAAC;IAChB,UAAU,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IACjC,cAAc,EAAE,IAAI;IACpB,WAAW,EAAE,IAAI;IACjB,KAAK;IACL,IAAI,CAAC,GAAG;QACN,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC5D,wBAAwB;QACxB,IAAI,CAAC,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;QAC3D,MAAM,EAAC,SAAS,EAAE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_wF","2":"_iF"},F:{"1":"_JK","2":"_OP"},G:{"1":"_JE","2":"_XF"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_yD","2":"_WE"},Q:{"16":"JE"},R:{"16":"KE"},S:{"2":"LE","16":"ME"}},B:5,C:"WebAssembly BigInt to i64 conversion in JS API",D:true};
@@ -0,0 +1,23 @@
/*! *****************************************************************************
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.
***************************************************************************** */
interface RegExp {
/**
* Returns a Boolean value indicating the state of the unicodeSets flag (v) used with a regular expression.
* Default is false. Read-only.
*/
readonly unicodeSets: boolean;
}
@@ -0,0 +1,9 @@
{
"extends": "@ljharb/tsconfig",
"compilerOptions": {
"target": "es2021",
},
"exclude": [
"coverage",
],
}
@@ -0,0 +1,29 @@
import { _ as _default } from './colors-C__qRT83.js';
type NamedUtilityValue = {
kind: 'named';
/**
* ```
* bg-red-500
* ^^^^^^^
*
* w-1/2
* ^
* ```
*/
value: string;
/**
* ```
* w-1/2
* ^^^
* ```
*/
fraction: string | null;
};
type PluginUtils = {
theme: (keypath: string, defaultValue?: any) => any;
colors: typeof _default;
};
export type { NamedUtilityValue as N, PluginUtils as P };
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.meta = exports.version = exports.withoutProjectParserOptions = exports.createProgram = exports.clearCaches = exports.parseForESLint = exports.parse = void 0;
var parser_1 = require("./parser");
Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parser_1.parse; } });
Object.defineProperty(exports, "parseForESLint", { enumerable: true, get: function () { return parser_1.parseForESLint; } });
var typescript_estree_1 = require("@typescript-eslint/typescript-estree");
Object.defineProperty(exports, "clearCaches", { enumerable: true, get: function () { return typescript_estree_1.clearCaches; } });
Object.defineProperty(exports, "createProgram", { enumerable: true, get: function () { return typescript_estree_1.createProgram; } });
Object.defineProperty(exports, "withoutProjectParserOptions", { enumerable: true, get: function () { return typescript_estree_1.withoutProjectParserOptions; } });
// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
exports.version = require('../package.json').version;
exports.meta = {
name: 'typescript-eslint/parser',
version: exports.version,
};
@@ -0,0 +1,20 @@
declare const _default: {
extends: string[];
rules: {
'@typescript-eslint/adjacent-overload-signatures': "error";
'@typescript-eslint/array-type': "error";
'@typescript-eslint/ban-tslint-comment': "error";
'@typescript-eslint/class-literal-property-style': "error";
'@typescript-eslint/consistent-generic-constructors': "error";
'@typescript-eslint/consistent-indexed-object-style': "error";
'@typescript-eslint/consistent-type-assertions': "error";
'@typescript-eslint/consistent-type-definitions': "error";
'@typescript-eslint/no-confusing-non-null-assertion': "error";
'no-empty-function': "off";
'@typescript-eslint/no-empty-function': "error";
'@typescript-eslint/no-inferrable-types': "error";
'@typescript-eslint/prefer-for-of': "error";
'@typescript-eslint/prefer-function-type': "error";
};
};
export = _default;
@@ -0,0 +1,64 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const dataType_1 = require("../../compile/validate/dataType");
const codegen_1 = require("../../compile/codegen");
const util_1 = require("../../compile/util");
const equal_1 = require("../../runtime/equal");
const error = {
message: ({ params: { i, j } }) => (0, codegen_1.str) `must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
params: ({ params: { i, j } }) => (0, codegen_1._) `{i: ${i}, j: ${j}}`,
};
const def = {
keyword: "uniqueItems",
type: "array",
schemaType: "boolean",
$data: true,
error,
code(cxt) {
const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;
if (!$data && !schema)
return;
const valid = gen.let("valid");
const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];
cxt.block$data(valid, validateUniqueItems, (0, codegen_1._) `${schemaCode} === false`);
cxt.ok(valid);
function validateUniqueItems() {
const i = gen.let("i", (0, codegen_1._) `${data}.length`);
const j = gen.let("j");
cxt.setParams({ i, j });
gen.assign(valid, true);
gen.if((0, codegen_1._) `${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));
}
function canOptimize() {
return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array");
}
function loopN(i, j) {
const item = gen.name("item");
const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);
const indices = gen.const("indices", (0, codegen_1._) `{}`);
gen.for((0, codegen_1._) `;${i}--;`, () => {
gen.let(item, (0, codegen_1._) `${data}[${i}]`);
gen.if(wrongType, (0, codegen_1._) `continue`);
if (itemTypes.length > 1)
gen.if((0, codegen_1._) `typeof ${item} == "string"`, (0, codegen_1._) `${item} += "_"`);
gen
.if((0, codegen_1._) `typeof ${indices}[${item}] == "number"`, () => {
gen.assign(j, (0, codegen_1._) `${indices}[${item}]`);
cxt.error();
gen.assign(valid, false).break();
})
.code((0, codegen_1._) `${indices}[${item}] = ${i}`);
});
}
function loopN2(i, j) {
const eql = (0, util_1.useFunc)(gen, equal_1.default);
const outer = gen.name("outer");
gen.label(outer).for((0, codegen_1._) `;${i}--;`, () => gen.for((0, codegen_1._) `${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._) `${eql}(${data}[${i}], ${data}[${j}])`, () => {
cxt.error();
gen.assign(valid, false).break(outer);
})));
}
},
};
exports.default = def;
//# sourceMappingURL=uniqueItems.js.map
@@ -0,0 +1,15 @@
import type { $ZodMemoizer, $ZodType } from "./schemas.cjs";
export declare class $ZodCyclicError extends Error {
constructor();
}
/**
* Whether one parse can re-enter this schema, i.e. its subtree contains a cycle.
* Exported for `z.compile`, which refuses to compile such a schema: cycle
* breaking is driven from here off state keyed on the parse context, and a
* generated fast path has no context to key on.
*/
export declare function isRecursiveSchema(inst: $ZodType): boolean;
/** The memoizer that gives containers cycle support. `zod` installs it by default; `zod/mini` opts in with `config({ memoizer: memoizer() })`. */
export declare function memoizer(): $ZodMemoizer;
/** Whether this value is a node a back-edge resolved to before it finished. */
export declare function isBackEdge(ctx: object, value: unknown): boolean;
@@ -0,0 +1,101 @@
/**
* @fileoverview Rule to flag when initializing to undefined
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const CONSTANT_BINDINGS = new Set(["const", "using", "await using"]);
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow initializing variables to `undefined`",
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/no-undef-init",
},
schema: [],
fixable: "code",
messages: {
unnecessaryUndefinedInit:
"It's not necessary to initialize '{{name}}' to undefined.",
},
},
create(context) {
const sourceCode = context.sourceCode;
return {
VariableDeclarator(node) {
const name = sourceCode.getText(node.id),
init = node.init && node.init.name,
scope = sourceCode.getScope(node),
undefinedVar = astUtils.getVariableByName(
scope,
"undefined",
),
shadowed = undefinedVar && undefinedVar.defs.length > 0,
lastToken = sourceCode.getLastToken(node);
if (
init === "undefined" &&
!CONSTANT_BINDINGS.has(node.parent.kind) &&
!shadowed
) {
context.report({
node,
messageId: "unnecessaryUndefinedInit",
data: { name },
fix(fixer) {
if (node.parent.kind === "var") {
return null;
}
if (
node.id.type === "ArrayPattern" ||
node.id.type === "ObjectPattern"
) {
// Don't fix destructuring assignment to `undefined`.
return null;
}
if (
sourceCode.commentsExistBetween(
node.id,
lastToken,
)
) {
return null;
}
return fixer.removeRange([
node.id.range[1],
node.range[1],
]);
},
});
}
},
};
},
};
@@ -0,0 +1,9 @@
import * as ts from 'typescript';
/**
* @param type Type being checked by name.
* @param allowAny Whether to consider `any` and `unknown` to match.
* @param allowedNames Symbol names checking on the type.
* @param matchAnyInstead Whether to instead just check if any parts match, rather than all parts.
* @returns Whether the type is, extends, or contains the allowed names (or all matches the allowed names, if mustMatchAll is true).
*/
export declare function containsAllTypesByName(type: ts.Type, allowAny: boolean, allowedNames: Set<string>, matchAnyInstead?: boolean): boolean;
@@ -0,0 +1,4 @@
'use strict';
/** @type {import('./functionApply')} */
module.exports = Function.prototype.apply;
@@ -0,0 +1,723 @@
import { A as getStaticPropertyName, B as isMixedLogicalAndCoalesceExpressions, G as isRegExpLiteral, K as isSingleLine, P as isDecimalInteger, Q as warnDeprecatedOptions, R as isJSDocComment, Y as isTopLevelExpressionStatement, Z as skipChainExpression, f as createRule, g as import_ast_utils, k as getPrecedence, m as AST_NODE_TYPES, w as canTokensBeAdjacent, z as isKeywordToken } from "../utils.js";
const isTypeAssertion = (0, import_ast_utils.isNodeOfTypes)([
AST_NODE_TYPES.TSAsExpression,
AST_NODE_TYPES.TSNonNullExpression,
AST_NODE_TYPES.TSSatisfiesExpression,
AST_NODE_TYPES.TSTypeAssertion
]);
var no_extra_parens_default = createRule({
name: "no-extra-parens",
meta: {
type: "layout",
docs: { description: "Disallow unnecessary parentheses" },
fixable: "code",
schema: { anyOf: [{
type: "array",
items: [{
type: "string",
enum: ["functions"]
}],
minItems: 0,
maxItems: 1
}, {
type: "array",
items: [{
type: "string",
enum: ["all"]
}, {
type: "object",
properties: {
conditionalAssign: { type: "boolean" },
ternaryOperandBinaryExpressions: { type: "boolean" },
nestedBinaryExpressions: { type: "boolean" },
returnAssign: { type: "boolean" },
ignoreJSX: {
type: "string",
enum: [
"none",
"all",
"single-line",
"multi-line"
]
},
enforceForArrowConditionals: { type: "boolean" },
enforceForSequenceExpressions: { type: "boolean" },
enforceForNewInMemberExpressions: { type: "boolean" },
enforceForFunctionPrototypeMethods: { type: "boolean" },
allowParensAfterCommentPattern: { type: "string" },
nestedConditionalExpressions: { type: "boolean" },
allowNodesInSpreadElement: {
type: "object",
properties: {
ConditionalExpression: { type: "boolean" },
LogicalExpression: { type: "boolean" },
AwaitExpression: { type: "boolean" }
},
additionalProperties: false
},
ignoredNodes: {
type: "array",
items: {
type: "string",
not: {
type: "string",
pattern: ":exit$"
}
}
}
},
additionalProperties: false
}],
minItems: 0,
maxItems: 2
}] },
defaultOptions: ["all"],
messages: { unexpected: "Unnecessary parentheses around expression." }
},
create(context, [nodes, options]) {
const sourceCode = context.sourceCode;
const tokensToIgnore = /* @__PURE__ */ new WeakSet();
const precedence = getPrecedence;
const ALL_NODES = nodes !== "functions";
const EXCEPT_COND_ASSIGN = ALL_NODES && options?.conditionalAssign === false;
const EXCEPT_COND_TERNARY = ALL_NODES && options?.ternaryOperandBinaryExpressions === false;
const IGNORE_NESTED_BINARY = ALL_NODES && options?.nestedBinaryExpressions === false;
const EXCEPT_RETURN_ASSIGN = ALL_NODES && options?.returnAssign === false;
const IGNORE_JSX = ALL_NODES && options?.ignoreJSX;
const IGNORE_ARROW_CONDITIONALS = ALL_NODES && options?.enforceForArrowConditionals === false;
const IGNORE_SEQUENCE_EXPRESSIONS = ALL_NODES && options?.enforceForSequenceExpressions === false;
const IGNORE_NEW_IN_MEMBER_EXPR = ALL_NODES && options?.enforceForNewInMemberExpressions === false;
const IGNORE_FUNCTION_PROTOTYPE_METHODS = ALL_NODES && options?.enforceForFunctionPrototypeMethods === false;
const ALLOW_PARENS_AFTER_COMMENT_PATTERN = ALL_NODES && options?.allowParensAfterCommentPattern;
const ALLOW_NESTED_TERNARY = ALL_NODES && options?.nestedConditionalExpressions === false;
const ALLOW_NODES_IN_SPREAD = ALL_NODES && options && new Set(Object.entries(options.allowNodesInSpreadElement || {}).filter(([_, value]) => value).map(([key]) => key));
warnDeprecatedOptions(options, [
"enforceForArrowConditionals",
"enforceForNewInMemberExpressions",
"allowNodesInSpreadElement"
], "ignoredNodes", "no-extra-parens");
const PRECEDENCE_OF_ASSIGNMENT_EXPR = precedence({ type: "AssignmentExpression" });
const PRECEDENCE_OF_UPDATE_EXPR = precedence({ type: "UpdateExpression" });
let reportsBuffer;
function pathToAncestor(node, ancestor) {
const path = [node];
let currentNode = node;
while (currentNode !== ancestor) {
currentNode = currentNode.parent;
if (currentNode === null || currentNode === void 0) throw new Error("Nodes are not in the ancestor-descendant relationship.");
path.push(currentNode);
}
return path;
}
function pathToDescendant(node, descendant) {
return pathToAncestor(descendant, node).reverse();
}
function isSafelyEnclosingInExpression(node, child) {
switch (node.type) {
case "ArrayExpression":
case "ArrayPattern":
case "BlockStatement":
case "ObjectExpression":
case "ObjectPattern":
case "TemplateLiteral": return true;
case "ArrowFunctionExpression":
case "FunctionExpression": return node.params.includes(child);
case "CallExpression":
case "NewExpression": return node.arguments.includes(child);
case "MemberExpression": return node.computed && node.property === child;
case "ConditionalExpression": return node.consequent === child;
default: return false;
}
}
function startNewReportsBuffering() {
reportsBuffer = {
upper: reportsBuffer,
inExpressionNodes: [],
reports: []
};
}
function endCurrentReportsBuffering() {
const { upper, inExpressionNodes, reports } = reportsBuffer ?? {};
if (upper) {
upper.inExpressionNodes.push(...inExpressionNodes ?? []);
upper.reports.push(...reports ?? []);
} else reports?.forEach(({ finishReport }) => finishReport());
reportsBuffer = upper;
}
function isInCurrentReportsBuffer(node) {
return reportsBuffer?.reports.some((r) => r.node === node);
}
function removeFromCurrentReportsBuffer(node) {
if (reportsBuffer) reportsBuffer.reports = reportsBuffer.reports.filter((r) => r.node !== node);
}
function isImmediateFunctionPrototypeMethodCall(node) {
const callNode = skipChainExpression(node);
if (callNode.type !== "CallExpression") return false;
const callee = skipChainExpression(callNode.callee);
return callee.type === "MemberExpression" && callee.object.type === "FunctionExpression" && ["call", "apply"].includes(getStaticPropertyName(callee));
}
function ruleApplies(node) {
if (node.type === "JSXElement" || node.type === "JSXFragment") switch (IGNORE_JSX) {
case "all": return false;
case "multi-line": return isSingleLine(node);
case "single-line": return !isSingleLine(node);
case "none": break;
}
if (node.type === "SequenceExpression" && IGNORE_SEQUENCE_EXPRESSIONS) return false;
if (isImmediateFunctionPrototypeMethodCall(node) && IGNORE_FUNCTION_PROTOTYPE_METHODS) return false;
return ALL_NODES || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression";
}
function isParenthesised(node) {
return (0, import_ast_utils.isParenthesized)(1, node, sourceCode);
}
function isParenthesisedTwice(node) {
return (0, import_ast_utils.isParenthesized)(2, node, sourceCode);
}
function hasExcessParens(node) {
return ruleApplies(node) && isParenthesised(node);
}
function hasDoubleExcessParens(node) {
return ruleApplies(node) && isParenthesisedTwice(node);
}
function hasExcessParensWithPrecedence(node, precedenceLowerLimit) {
if (ruleApplies(node) && isParenthesised(node)) {
if (precedence(node) >= precedenceLowerLimit || isParenthesisedTwice(node)) return true;
}
return false;
}
function isCondAssignException(node) {
return EXCEPT_COND_ASSIGN && node.test && node.test.type === "AssignmentExpression";
}
function isInReturnStatement(node) {
for (let currentNode = node; currentNode; currentNode = currentNode.parent) if (currentNode.type === "ReturnStatement" || currentNode.type === "ArrowFunctionExpression" && currentNode.body.type !== "BlockStatement") return true;
return false;
}
function isNewExpressionWithParens(newExpression) {
const lastToken = sourceCode.getLastToken(newExpression);
const penultimateToken = sourceCode.getTokenBefore(lastToken);
return newExpression.arguments.length > 0 || (0, import_ast_utils.isOpeningParenToken)(penultimateToken) && (0, import_ast_utils.isClosingParenToken)(lastToken) && newExpression.callee.range[1] < newExpression.range[1];
}
function isMemberExpInNewCallee(node) {
if (node.type === "MemberExpression") return node.parent.type === "NewExpression" && node.parent.callee === node ? true : "object" in node.parent && node.parent.object === node && isMemberExpInNewCallee(node.parent);
return false;
}
function doesMemberExpressionContainCallExpression(node) {
let currentNode = node.object;
let currentNodeType = node.object.type;
while (currentNodeType === "MemberExpression") {
if (!("object" in currentNode)) break;
currentNode = currentNode.object;
currentNodeType = currentNode.type;
}
return currentNodeType === "CallExpression";
}
function containsAssignment(node) {
if (node.type === "AssignmentExpression") return true;
if (node.type === "ConditionalExpression" && (node.consequent.type === "AssignmentExpression" || node.alternate.type === "AssignmentExpression")) return true;
if ("left" in node && (node.left && node.left.type === "AssignmentExpression" || node.right && node.right.type === "AssignmentExpression")) return true;
return false;
}
function isReturnAssignException(node) {
if (!EXCEPT_RETURN_ASSIGN || !isInReturnStatement(node)) return false;
if (node.type === "ReturnStatement") return node.argument && containsAssignment(node.argument);
if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") return containsAssignment(node.body);
return containsAssignment(node);
}
function hasExcessParensNoLineTerminator(token, node) {
if ((0, import_ast_utils.isTokenOnSameLine)(token, node)) return hasExcessParens(node);
return hasDoubleExcessParens(node);
}
function requiresLeadingSpace(node) {
const leftParenToken = sourceCode.getTokenBefore(node);
const tokenBeforeLeftParen = sourceCode.getTokenBefore(leftParenToken, { includeComments: true });
const tokenAfterLeftParen = sourceCode.getTokenAfter(leftParenToken, { includeComments: true });
return tokenBeforeLeftParen && tokenBeforeLeftParen.range[1] === leftParenToken.range[0] && leftParenToken.range[1] === tokenAfterLeftParen.range[0] && !canTokensBeAdjacent(tokenBeforeLeftParen, tokenAfterLeftParen);
}
function requiresTrailingSpace(node) {
const nextTwoTokens = sourceCode.getTokensAfter(node, { count: 2 });
const rightParenToken = nextTwoTokens[0];
const tokenAfterRightParen = nextTwoTokens[1];
const tokenBeforeRightParen = sourceCode.getLastToken(node);
return rightParenToken && tokenAfterRightParen && !sourceCode.isSpaceBetween(rightParenToken, tokenAfterRightParen) && !canTokensBeAdjacent(tokenBeforeRightParen, tokenAfterRightParen);
}
function isIIFE(node) {
const maybeCallNode = skipChainExpression(node);
return maybeCallNode.type === "CallExpression" && maybeCallNode.callee.type === "FunctionExpression";
}
function canBeAssignmentTarget(node) {
return !!(node && (node.type === "Identifier" || node.type === "MemberExpression"));
}
function isAnonymousFunctionAssignmentException({ left, operator, right }) {
if (left.type === "Identifier" && [
"=",
"&&=",
"||=",
"??="
].includes(operator)) {
const rhsType = right.type;
if (rhsType === "ArrowFunctionExpression") return true;
if ((rhsType === "FunctionExpression" || rhsType === "ClassExpression") && !right.id) return true;
}
return false;
}
function isFixable(node) {
if (node.type !== "Literal" || typeof node.value !== "string") return true;
if (isParenthesisedTwice(node)) return true;
return !isTopLevelExpressionStatement(node.parent);
}
function isAllowedByCommentDirective(leftParenToken) {
const comments = sourceCode.getCommentsBefore(leftParenToken);
if (comments.length === 0) return false;
const lastComment = comments.at(-1);
if (isJSDocComment(lastComment) && /@type\s*\{[^}]+\}/.test(lastComment.value)) return true;
if (ALLOW_PARENS_AFTER_COMMENT_PATTERN) {
if (new RegExp(ALLOW_PARENS_AFTER_COMMENT_PATTERN, "u").test(lastComment.value)) return true;
}
return false;
}
function report(node) {
let leftParenToken = sourceCode.getTokenBefore(node);
let rightParenToken = sourceCode.getTokenAfter(node);
if (!isParenthesisedTwice(node)) {
if (tokensToIgnore.has(sourceCode.getFirstToken(node))) return;
if (isIIFE(node) && !("callee" in node && isParenthesised(node.callee))) return;
}
let parenLayers = 2;
while (isAllowedByCommentDirective(leftParenToken)) {
if (!(0, import_ast_utils.isParenthesized)(parenLayers, node, sourceCode)) return;
leftParenToken = sourceCode.getTokenBefore(leftParenToken, import_ast_utils.isOpeningParenToken);
rightParenToken = sourceCode.getTokenAfter(rightParenToken, import_ast_utils.isClosingParenToken);
parenLayers++;
}
function finishReport() {
context.report({
node,
loc: leftParenToken.loc,
messageId: "unexpected",
fix: isFixable(node) ? (fixer) => {
return [fixer.replaceText(leftParenToken, requiresLeadingSpace(node) ? " " : ""), fixer.replaceText(rightParenToken, requiresTrailingSpace(node) ? " " : "")];
} : null
});
}
if (reportsBuffer) {
reportsBuffer.reports.push({
node,
finishReport
});
return;
}
finishReport();
}
function checkArgumentWithPrecedence(node) {
if ("argument" in node && node.argument && hasExcessParensWithPrecedence(node.argument, precedence(node))) report(node.argument);
}
function checkBinaryLogical(node) {
const isLeftTypeAssertion = isTypeAssertion(node.left);
const isRightTypeAssertion = isTypeAssertion(node.right);
if (isLeftTypeAssertion && isRightTypeAssertion) return;
const rule = (n) => {
const prec = precedence(n);
const leftPrecedence = precedence(n.left);
const rightPrecedence = precedence(n.right);
const isExponentiation = n.operator === "**";
const shouldSkipLeft = IGNORE_NESTED_BINARY && (n.left.type === "BinaryExpression" || n.left.type === "LogicalExpression");
const shouldSkipRight = IGNORE_NESTED_BINARY && (n.right.type === "BinaryExpression" || n.right.type === "LogicalExpression");
if (!shouldSkipLeft && hasExcessParens(n.left)) {
if (!(["AwaitExpression", "UnaryExpression"].includes(n.left.type) && isExponentiation) && !isMixedLogicalAndCoalesceExpressions(n.left, n) && !(n.parent.type === "ReturnStatement" && n.parent.loc.start.line !== n.left.loc.start.line && !isParenthesised(n)) && (leftPrecedence > prec || leftPrecedence === prec && !isExponentiation) || isParenthesisedTwice(n.left)) report(n.left);
}
if (!shouldSkipRight && hasExcessParens(n.right)) {
if (!isMixedLogicalAndCoalesceExpressions(n.right, n) && (rightPrecedence > prec || rightPrecedence === prec && isExponentiation) || isParenthesisedTwice(n.right)) report(n.right);
}
};
if (isLeftTypeAssertion) return rule({
...node,
left: {
...node.left,
type: AST_NODE_TYPES.SequenceExpression
}
});
if (isRightTypeAssertion) return rule({
...node,
right: {
...node.right,
type: AST_NODE_TYPES.SequenceExpression
}
});
return rule(node);
}
function checkCallNew(node) {
const rule = (node) => {
const callee = node.callee;
if (hasExcessParensWithPrecedence(callee, precedence(node))) {
if (hasDoubleExcessParens(callee) || !(isIIFE(node) || callee.type === "NewExpression" && !isNewExpressionWithParens(callee) && !(node.type === "NewExpression" && !isNewExpressionWithParens(node)) || node.type === "NewExpression" && callee.type === "MemberExpression" && doesMemberExpressionContainCallExpression(callee) || (!("optional" in node) || !node.optional) && callee.type === "ChainExpression")) report(node.callee);
}
node.arguments.forEach((arg) => {
if (hasExcessParensWithPrecedence(arg, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(arg);
});
};
if (isTypeAssertion(node.callee)) return rule({
...node,
callee: {
...node.callee,
type: AST_NODE_TYPES.SequenceExpression
}
});
return rule(node);
}
function checkClass(node) {
if (!node.superClass) return;
if (precedence(node.superClass) > PRECEDENCE_OF_UPDATE_EXPR ? hasExcessParens(node.superClass) : hasDoubleExcessParens(node.superClass)) report(node.superClass);
}
function checkExpressionOrExportStatement(node) {
const firstToken = isParenthesised(node) ? sourceCode.getTokenBefore(node) : sourceCode.getFirstToken(node);
const secondToken = sourceCode.getTokenAfter(firstToken, import_ast_utils.isNotOpeningParenToken);
const thirdToken = secondToken ? sourceCode.getTokenAfter(secondToken) : null;
const tokenAfterClosingParens = secondToken ? sourceCode.getTokenAfter(secondToken, import_ast_utils.isNotClosingParenToken) : null;
if ((0, import_ast_utils.isOpeningParenToken)(firstToken) && ((0, import_ast_utils.isOpeningBraceToken)(secondToken) || isKeywordToken(secondToken) && (secondToken.value === "function" || secondToken.value === "class" || secondToken.value === "let" && tokenAfterClosingParens && ((0, import_ast_utils.isOpeningBracketToken)(tokenAfterClosingParens) || tokenAfterClosingParens.type === "Identifier")) || secondToken && secondToken.type === "Identifier" && secondToken.value === "async" && isKeywordToken(thirdToken) && thirdToken.value === "function")) tokensToIgnore.add(secondToken);
if (node.parent.type === "ExportDefaultDeclaration" ? hasExcessParensWithPrecedence(node, PRECEDENCE_OF_ASSIGNMENT_EXPR) : hasExcessParens(node)) report(node);
}
function checkUnaryUpdate(node) {
if (isTypeAssertion(node.argument)) return checkArgumentWithPrecedence({
...node,
argument: {
...node.argument,
type: AST_NODE_TYPES.SequenceExpression
}
});
return checkArgumentWithPrecedence(node);
}
function checkClassProperty(node) {
if (node.computed && hasExcessParensWithPrecedence(node.key, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node.key);
if (node.value && hasExcessParensWithPrecedence(node.value, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node.value);
}
function checkTSBinaryType(node) {
node.types.forEach((type) => {
if (IGNORE_NESTED_BINARY && (0, import_ast_utils.isNodeOfTypes)([AST_NODE_TYPES.TSUnionType, AST_NODE_TYPES.TSIntersectionType])(type) ? isParenthesisedTwice(type) : hasExcessParensWithPrecedence(type, precedence(node))) report(type);
});
}
const baseListeners = {
ArrayExpression(node) {
node.elements.map((element) => isTypeAssertion(element) ? {
...element,
type: AST_NODE_TYPES.FunctionExpression
} : element).forEach((ele) => {
if (!!ele && hasExcessParensWithPrecedence(ele, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(ele);
});
},
ArrayPattern(node) {
node.elements.forEach((ele) => {
if (!!ele && canBeAssignmentTarget(ele) && hasExcessParens(ele)) report(ele);
});
},
ArrowFunctionExpression(node) {
if (isTypeAssertion(node.body)) return;
if (isReturnAssignException(node)) return;
if (node.body.type === "ConditionalExpression" && IGNORE_ARROW_CONDITIONALS) return;
if (node.body.type === "BlockStatement") return;
const firstBodyToken = sourceCode.getFirstToken(node.body, import_ast_utils.isNotOpeningParenToken);
if ((0, import_ast_utils.isOpeningParenToken)(sourceCode.getTokenBefore(firstBodyToken)) && (0, import_ast_utils.isOpeningBraceToken)(firstBodyToken)) tokensToIgnore.add(firstBodyToken);
if (hasExcessParensWithPrecedence(node.body, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node.body);
},
AssignmentExpression(node) {
if (canBeAssignmentTarget(node.left) && hasExcessParens(node.left) && (!isAnonymousFunctionAssignmentException(node) || isParenthesisedTwice(node.left))) report(node.left);
if (!isReturnAssignException(node) && hasExcessParensWithPrecedence(node.right, precedence(node))) report(node.right);
},
AssignmentPattern(node) {
const { left, right } = node;
if (canBeAssignmentTarget(left) && hasExcessParens(left)) report(left);
if (right && hasExcessParensWithPrecedence(right, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(right);
},
AwaitExpression(node) {
if (isTypeAssertion(node.argument)) return checkArgumentWithPrecedence({
...node,
argument: {
...node.argument,
type: AST_NODE_TYPES.SequenceExpression
}
});
return checkArgumentWithPrecedence(node);
},
BinaryExpression(node) {
if (reportsBuffer && node.operator === "in") reportsBuffer.inExpressionNodes.push(node);
checkBinaryLogical(node);
},
"CallExpression": checkCallNew,
ClassDeclaration(node) {
if (node.superClass?.type === AST_NODE_TYPES.TSAsExpression) return checkClass({
...node,
superClass: {
...node.superClass,
type: AST_NODE_TYPES.SequenceExpression
}
});
return checkClass(node);
},
ClassExpression(node) {
if (node.superClass?.type === AST_NODE_TYPES.TSAsExpression) return checkClass({
...node,
superClass: {
...node.superClass,
type: AST_NODE_TYPES.SequenceExpression
}
});
return checkClass(node);
},
ConditionalExpression(node) {
const rule = (node) => {
if (isReturnAssignException(node)) return;
const availableTypes = new Set(["BinaryExpression", "LogicalExpression"]);
if (!(EXCEPT_COND_TERNARY && availableTypes.has(node.test.type)) && !(ALLOW_NESTED_TERNARY && ["ConditionalExpression"].includes(node.test.type)) && !isCondAssignException(node) && hasExcessParensWithPrecedence(node.test, precedence({
type: "LogicalExpression",
operator: "||"
}))) report(node.test);
if (!(EXCEPT_COND_TERNARY && availableTypes.has(node.consequent.type)) && !(ALLOW_NESTED_TERNARY && ["ConditionalExpression"].includes(node.consequent.type)) && hasExcessParensWithPrecedence(node.consequent, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node.consequent);
if (!(EXCEPT_COND_TERNARY && availableTypes.has(node.alternate.type)) && !(ALLOW_NESTED_TERNARY && ["ConditionalExpression"].includes(node.alternate.type)) && hasExcessParensWithPrecedence(node.alternate, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node.alternate);
};
if (isTypeAssertion(node.test)) return rule({
...node,
test: {
...node.test,
type: AST_NODE_TYPES.SequenceExpression
}
});
if (isTypeAssertion(node.consequent)) return rule({
...node,
consequent: {
...node.consequent,
type: AST_NODE_TYPES.SequenceExpression
}
});
if (isTypeAssertion(node.alternate)) return rule({
...node,
alternate: {
...node.alternate,
type: AST_NODE_TYPES.SequenceExpression
}
});
return rule(node);
},
DoWhileStatement(node) {
if (hasExcessParens(node.test) && !isCondAssignException(node)) report(node.test);
},
ExportDefaultDeclaration(node) {
checkExpressionOrExportStatement(node.declaration);
},
ExpressionStatement(node) {
checkExpressionOrExportStatement(node.expression);
},
ForInStatement(node) {
if (isTypeAssertion(node.right)) return;
if (node.left.type !== "VariableDeclaration") {
const firstLeftToken = sourceCode.getFirstToken(node.left, import_ast_utils.isNotOpeningParenToken);
if (firstLeftToken.value === "let" && (0, import_ast_utils.isOpeningBracketToken)(sourceCode.getTokenAfter(firstLeftToken, import_ast_utils.isNotClosingParenToken))) tokensToIgnore.add(firstLeftToken);
}
if (hasExcessParens(node.left)) report(node.left);
if (hasExcessParens(node.right)) report(node.right);
},
ForOfStatement(node) {
if (node.left.type !== "VariableDeclaration") {
const firstLeftToken = sourceCode.getFirstToken(node.left, import_ast_utils.isNotOpeningParenToken);
if (firstLeftToken.value === "let") tokensToIgnore.add(firstLeftToken);
}
if (hasExcessParens(node.left)) report(node.left);
if (!isTypeAssertion(node.right) && hasExcessParensWithPrecedence(node.right, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node.right);
},
ForStatement(node) {
if (node.test && hasExcessParens(node.test) && !isCondAssignException(node) && !isTypeAssertion(node.test)) report(node.test);
if (node.update && hasExcessParens(node.update) && !isTypeAssertion(node.update)) report(node.update);
if (node.init && !isTypeAssertion(node.init)) {
if (node.init.type !== "VariableDeclaration") {
const firstToken = sourceCode.getFirstToken(node.init, import_ast_utils.isNotOpeningParenToken);
if (firstToken.value === "let" && (0, import_ast_utils.isOpeningBracketToken)(sourceCode.getTokenAfter(firstToken, import_ast_utils.isNotClosingParenToken))) tokensToIgnore.add(firstToken);
}
startNewReportsBuffering();
if (hasExcessParens(node.init)) report(node.init);
}
},
"ForStatement > *.init:exit": function(node) {
if (isTypeAssertion(node)) return;
if (reportsBuffer?.reports.length) reportsBuffer.inExpressionNodes.forEach((inExpressionNode) => {
const path = pathToDescendant(node, inExpressionNode);
let nodeToExclude = null;
for (let i = 0; i < path.length; i++) {
const pathNode = path[i];
if (i < path.length - 1) {
const nextPathNode = path[i + 1];
if (isSafelyEnclosingInExpression(pathNode, nextPathNode)) return;
}
if (isParenthesised(pathNode)) if (isInCurrentReportsBuffer(pathNode)) {
if (isParenthesisedTwice(pathNode)) return;
if (!nodeToExclude) nodeToExclude = pathNode;
} else return;
}
if (nodeToExclude) removeFromCurrentReportsBuffer(nodeToExclude);
});
endCurrentReportsBuffering();
},
IfStatement(node) {
if (hasExcessParens(node.test) && !isCondAssignException(node)) report(node.test);
},
ImportExpression(node) {
const { source } = node;
if (source.type === "SequenceExpression") {
if (hasDoubleExcessParens(source)) report(source);
} else if (hasExcessParens(source)) report(source);
},
"LogicalExpression": checkBinaryLogical,
MemberExpression(node) {
const rule = (node) => {
const nodeObjHasExcessParens = isMemberExpInNewCallee(node) && doesMemberExpressionContainCallExpression(node) ? hasDoubleExcessParens(node.object) : hasExcessParens(node.object) && !(isImmediateFunctionPrototypeMethodCall(node.parent) && "callee" in node.parent && node.parent.callee === node && IGNORE_FUNCTION_PROTOTYPE_METHODS);
if (nodeObjHasExcessParens && precedence(node.object) >= precedence(node) && (node.computed || !(isDecimalInteger(node.object) || isRegExpLiteral(node.object)))) report(node.object);
if (nodeObjHasExcessParens && node.object.type === "CallExpression") report(node.object);
if (nodeObjHasExcessParens && !IGNORE_NEW_IN_MEMBER_EXPR && node.object.type === "NewExpression" && isNewExpressionWithParens(node.object)) report(node.object);
if (nodeObjHasExcessParens && node.optional && node.object.type === "ChainExpression") report(node.object);
if (node.computed && hasExcessParens(node.property)) report(node.property);
};
if (isTypeAssertion(node.object)) return rule({
...node,
object: {
...node.object,
type: AST_NODE_TYPES.SequenceExpression
}
});
if (isTypeAssertion(node.property)) return rule({
...node,
property: {
...node.property,
type: AST_NODE_TYPES.FunctionExpression
}
});
return rule(node);
},
MethodDefinition(node) {
if (!node.computed) return;
if (hasExcessParensWithPrecedence(node.key, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(node.key);
},
"NewExpression": checkCallNew,
ObjectExpression(node) {
node.properties.forEach((property) => {
if (property.type === "Property" && property.value && hasExcessParensWithPrecedence(property.value, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(property.value);
});
},
ObjectPattern(node) {
node.properties.forEach(({ value }) => {
if (value && canBeAssignmentTarget(value) && hasExcessParens(value)) report(value);
});
},
Property(node) {
if (node.computed) {
const { key } = node;
if (key && hasExcessParensWithPrecedence(key, PRECEDENCE_OF_ASSIGNMENT_EXPR)) report(key);
}
},
"PropertyDefinition": checkClassProperty,
"AccessorProperty": checkClassProperty,
RestElement(node) {
const argument = node.argument;
if (canBeAssignmentTarget(argument) && hasExcessParens(argument)) report(argument);
},
ReturnStatement(node) {
const returnToken = sourceCode.getFirstToken(node);
if (isReturnAssignException(node)) return;
if (node.argument && returnToken && hasExcessParensNoLineTerminator(returnToken, node.argument) && !isRegExpLiteral(node.argument)) report(node.argument);
},
SequenceExpression(node) {
const precedenceOfNode = precedence(node);
node.expressions.forEach((expression) => {
if (hasExcessParensWithPrecedence(expression, precedenceOfNode)) report(expression);
});
},
SpreadElement(node) {
if (isTypeAssertion(node.argument)) return;
if (ALLOW_NODES_IN_SPREAD && ALLOW_NODES_IN_SPREAD.has(node.argument.type)) return;
if (!hasExcessParensWithPrecedence(node.argument, PRECEDENCE_OF_ASSIGNMENT_EXPR)) return;
report(node.argument);
},
SwitchCase(node) {
if (node.test && !isTypeAssertion(node.test) && hasExcessParens(node.test)) report(node.test);
},
SwitchStatement(node) {
if (hasExcessParens(node.discriminant)) report(node.discriminant);
},
TemplateLiteral(node) {
node.expressions.forEach((expression) => {
if (hasExcessParens(expression)) report(expression);
});
},
ThrowStatement(node) {
if (!node.argument || isTypeAssertion(node.argument)) return;
const throwToken = sourceCode.getFirstToken(node);
if (!throwToken) return;
if (hasExcessParensNoLineTerminator(throwToken, node.argument)) report(node.argument);
},
"UnaryExpression": checkUnaryUpdate,
UpdateExpression(node) {
if (isTypeAssertion(node.argument)) return checkUnaryUpdate(node);
if (node.prefix) checkArgumentWithPrecedence(node);
else {
const { argument } = node;
if ((0, import_ast_utils.isTokenOnSameLine)(argument, sourceCode.getLastToken(node))) checkArgumentWithPrecedence(node);
else if (hasDoubleExcessParens(argument)) report(argument);
}
},
VariableDeclarator(node) {
const rule = (node) => {
if (node.init && hasExcessParensWithPrecedence(node.init, PRECEDENCE_OF_ASSIGNMENT_EXPR) && !isRegExpLiteral(node.init)) report(node.init);
};
if (isTypeAssertion(node.init)) return rule({
...node,
type: AST_NODE_TYPES.VariableDeclarator,
init: {
...node.init,
type: AST_NODE_TYPES.FunctionExpression
}
});
return rule(node);
},
WhileStatement(node) {
if (hasExcessParens(node.test) && !isCondAssignException(node)) report(node.test);
},
WithStatement(node) {
if (hasExcessParens(node.object)) report(node.object);
},
YieldExpression(node) {
if (!node.argument || isTypeAssertion(node.argument)) return;
const yieldToken = sourceCode.getFirstToken(node);
if (precedence(node.argument) >= precedence(node) && yieldToken && hasExcessParensNoLineTerminator(yieldToken, node.argument) || hasDoubleExcessParens(node.argument)) report(node.argument);
},
TSArrayType(node) {
if (hasExcessParensWithPrecedence(node.elementType, precedence(node))) report(node.elementType);
},
"TSIntersectionType": checkTSBinaryType,
"TSUnionType": checkTSBinaryType,
TSTypeAnnotation(node) {
if (hasExcessParens(node.typeAnnotation)) report(node.typeAnnotation);
},
TSTypeAliasDeclaration(node) {
if (hasExcessParens(node.typeAnnotation)) report(node.typeAnnotation);
},
TSEnumMember(node) {
if (!node.initializer) return;
if (hasExcessParens(node.initializer)) report(node.initializer);
}
};
const listeners = {};
const ignoreNodes = /* @__PURE__ */ new Set();
const listenerCallQueue = [];
for (const key in baseListeners) listeners[key] = (node) => listenerCallQueue.push({
node,
listener: baseListeners[key]
});
return {
...listeners,
...options?.ignoredNodes?.reduce((listener, selector) => Object.assign(listener, { [selector]: (node) => ignoreNodes.add(node) }), {}),
"Program:exit": function() {
for (let i = 0; i < listenerCallQueue.length; i++) {
const { node, listener } = listenerCallQueue[i];
if (!ignoreNodes.has(node)) listener(node);
}
}
};
}
});
export { no_extra_parens_default as t };
@@ -0,0 +1 @@
{"version":3,"file":"commonWords.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"matching.cjs","sources":["../../../src/matcher/repeat/matching.ts"],"sourcesContent":[null],"names":["MatchRepeat","MatcherBaseClass","constructor","options","scoring","Scoring","match","password","omniMatch","matches","lastIndex","length","greedyMatch","getGreedyMatch","lazyMatch","getLazyMatch","baseToken","setMatchToken","j","index","baseGuesses","getBaseGuesses","push","normalizeMatch","hasPromises","some","Promise","all","baseMatch","pattern","i","token","repeatCount","then","resolvedBaseGuesses","greedy","exec","lazy","lazyAnchored","temp","resolvedMatches","baseAnalysis","mostGuessableMatchSequence","guesses"],"mappings":";;;;;AAMA;;;;AAIG;AACH,MAAMA,WAAY,SAAQC,sBAAgB,CAAA;EAGxCC,WAAAA,CAAYC,OAAgB,EAAA;IAC1B,KAAK,CAACA,OAAO,CAAC;AACd,IAAA,IAAI,CAACC,OAAO,GAAG,IAAIC,KAAO,CAACF,OAAO,CAAC;AACrC,EAAA;AAEA;AACAG,EAAAA,KAAKA,CAAC;IAAEC,QAAQ;AAAEC,IAAAA;AAAS,GAAgB,EAAA;IACzC,MAAMC,OAAO,GAA2C,EAAE;IAC1D,IAAIC,SAAS,GAAG,CAAC;AACjB,IAAA,OAAOA,SAAS,GAAGH,QAAQ,CAACI,MAAM,EAAE;MAClC,MAAMC,WAAW,GAAG,IAAI,CAACC,cAAc,CAACN,QAAQ,EAAEG,SAAS,CAAC;MAC5D,MAAMI,SAAS,GAAG,IAAI,CAACC,YAAY,CAACR,QAAQ,EAAEG,SAAS,CAAC;MACxD,IAAIE,WA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AIR,KAAK,EAAE;AACTU,QAAAA,SAAS,GAAGV,KAAK,CAAC,CAAC,CAAC;AACtB,MAAA;AACF,IAAA;IACA,OAAO;MACLA,KAAK;AACLU,MAAAA;KACD;AACH,EAAA;AAEAK,EAAAA,cAAcA,CAACL,SAAiB,EAAER,SAAmB,EAAA;AACnD,IAAA,MAAMC,OAAO,GAAGD,SAAS,CAACF,KAAK,CAACU,SAAS,CAAC;IAC1C,IAAIP,OAAO,YAAYiB,OAAO,EAAE;AAC9B,MAAA,OAAOjB,OAAO,CAACwB,IAAI,CAAEO,eAAe,IAAI;QACtC,MAAMC,YAAY,GAAG,IAAI,CAACrC,OAAO,CAACsC,0BAA0B,CAC1D1B,SAAS,EACTwB,eAAe,CAChB;QACD,OAAOC,YAAY,CAACE,OAAO;AAC7B,MAAA,CAAC,CAAC;AACJ,IAAA;IACA,MAAMF,YAAY,GAAG,IAAI,CAACrC,OAAO,CAACsC,0BAA0B,CAC1D1B,SAAS,EACTP,OAAO,CACR;IACD,OAAOgC,YAAY,CAACE,OAAO;AAC7B,EAAA;AACD;;;;"}
@@ -0,0 +1,722 @@
flf2a$ 7 5 12 0 7
fuzzy.flf by Juan Car (jc@juguete.quim.ucm.es)
version 1.0 -- 2/Feb/94
Uses spanish character set with -D option:
_ _
[ = a' \ = e' ] = i' { = o' | = u' } = n ~ = N
$$@
$$@
$$@
$$@
$$@
$$@
$$@@
.-.@
: :@
: :@
:_;@
:_;@
@
@@
.-.-.@
: : :@
`-'-'@
$ $ @
$ $ @
$ $ @
$ $ @@
_ _ @
_: :: :_ @
:_ .. _:@
:_ _:@
:_;:_; @
@
@@
,::. @
: ::-'@
`.::. @
_:: :@
`.::,'@
:: @
@@
,-. .-.@
`-'.'.'@
.'.' @
.'.'_ @
:_: :_;@
@
@@
.--. @
: .; ; @
; '_ @
: :;` ;@
`.__._;@
@
@@
.-.@
.'.'@
`-' @
$$ @
$$ @
$$ @
$$ @@
,-.@
.' ,'@
: : @
` `. @
`._;@
@
@@
.-. @
`. `.@
: :@
,' '@
:_,' @
@
@@
@
_.-._ @
: ` ' :@
,' '.@
`-:_:-'@
@
@@
@
_ @
_: :_ @
:_ _:@
:_: @
@
@@
$ @
$ @
$ @
_ @
: ;@
;' @
@@
@
@
_____ @
:_____:@
@
@
@@
$ @
$ @
$ @
_ @
:_;@
@
@@
.-.@
.'.'@
.'.' @
.'.' @
:_: @
@
@@
.--. @
: ,. :@
: :: :@
: :; :@
`.__.'@
@
@@
,-.@
.' :@
`: :@
: :@
:_;@
@
@@
.---. @
`--. :@
,','@
.'.'_ @
:____;@
@
@@
.----.@
`-- ;@
.' ' @
_`,`.@
`.__.'@
@
@@
.-. @
.'.' @
.'.'_ @
:_ ` :@
:_:$@
@
@@
.----.@
: .--'@
`. `. @
.-`, :@
`.__.'@
@
@@
.-. @
.'.' @
.' '. @
: .; :@
`.__.'@
@
@@
.----.@
`-- ;@
,',' @
: : @
:_: @
@
@@
.--. @
: .; :@
`. .'@
: .; :@
`.__.'@
@
@@
.--. @
: .; :@
`._, :@
: :@
:_:@
@
@@
@
_ @
:_:@
_ @
:_;@
@
@@
@
_ @
:_:@
_ @
: ;@
;' @
@@
@
-.@
$,','@
`.`. @
$ :_;@
@
@@
@
@
,-----.@
:-----:@
`-----'@
@
@@
@
.- @
`.`.$@
,','@
:_, $@
@
@@
.--. @
:_,. :@
,','@
:_; @
:_; @
@
@@
.-----. @
: ,.--, :@
: : .; ,'@
: :.__,_;@
`.______;@
@
@@
.--. @
: .; :@
: :@
: :: :@
:_;:_;@
@
@@
.---. @
: .; :@
: .'@
: .; :@
:___.'@
@
@@
.--. @
: .--'@
: : @
: :__ @
`.__.'@
@
@@
.---. @
: . :@
: :: :@
: :; :@
:___.'@
@
@@
.--. @
: .--'@
: `; @
: :__ @
`.__.'@
@
@@
.---. @
: .--'@
: `; @
: : @
:_; @
@
@@
.--. @
: .--'@
: : _ @
: :; :@
`.__.'@
@
@@
.-..-.@
: :; :@
: :@
: :: :@
:_;:_;@
@
@@
.-.@
: :@
: :@
: :@
:_;@
@
@@
.-.@
: :@
_ : :@
: :; :@
`.__.'@
@
@@
.-..-.@
: :' ;@
: ' @
: :.`.@
:_;:_;@
@
@@
.-. @
: : @
: : @
: :__ @
:___.'@
@
@@
.-..-.@
: `' :@
: .. :@
: :; :@
:_;:_;@
@
@@
.-..-.@
: `: :@
: .` :@
: :. :@
:_;:_;@
@
@@
.--. @
: ,. :@
: :: :@
: :; :@
`.__.'@
@
@@
.---. @
: .; :@
: _.'@
: : @
:_; @
@
@@
.--. @
: ,. :@
: :: :@
: :;_:@
`._:_;@
@
@@
.---. @
: .; :@
: .'@
: :.`.@
:_;:_;@
@
@@
.--. @
: .--'@
`. `. @
_`, :@
`.__.'@
@
@@
.-----.@
`-. .-'@
: : @
: : @
:_; @
@
@@
.-..-.@
: :: :@
: :: :@
: :; :@
`.__.'@
@
@@
.-..-.@
: :: :@
: :: :@
: `' ;@
`.,' @
@
@@
.-. .-.@
: :.-.: :@
: :: :: :@
: `' `' ;@
`.,`.,' @
@
@@
.-..-.@
: `' :@
` ' @
.' `.@
:_;:_;@
@
@@
.-..-.@
: :: :@
`. .'@
.' ; @
:_,' @
@
@@
.----.@
`--. :@
,','@
.'.'_ @
:____;@
@
@@
.----.@
: .--'@
: : @
: :__ @
:____:@
@
@@
.-. @
` ` @
` ` @
` ` @
`_;@
@
@@
.----.@
`--. :@
: :@
__: :@
:____:@
@
@@
-- @
.' `.@
`-'`-'@
$ $ @
$ $ @
$ $ @
$ $ @@
$ $ @
$ $ @
$ $ @
$ $ @
_____ @
:_____:@
@@
.- @
` `.@
`-'@
$$ @
$$ @
$$ @
$$ @@
@
@
.--. @
' .; ; @
`.__,_;@
@
@@
.-. @
: : @
: `-. @
' .; :@
`.__.'@
@
@@
@
@
.--. @
' ..'@
`.__.'@
@
@@
.-.@
: :@
.-' :@
' .; :@
`.__.'@
@
@@
@
@
.--. @
' '_.'@
`.__.'@
@
@@
.--.@
: .-'@
: `; @
: : @
:_; @
@
@@
@
@
.--. @
' .; :@
`._. ;@
.-. :@
`._.'@@
.-. @
: : @
: `-. @
: .. :@
:_;:_;@
@
@@
_ @
:_;@
.-.@
: :@
:_;@
@
@@
_ @
:_;@
.-.@
: :@
: :@
.-. :@
`._.'@@
.-. @
: :.-.@
: `'.'@
: . `.@
:_;:_;@
@
@@
.-. @
: : @
: : @
: :_ @
`.__;@
@
@@
@
@
,-.,-.,-.@
: ,. ,. :@
:_;:_;:_;@
@
@@
@
@
,-.,-.@
: ,. :@
:_;:_;@
@
@@
@
@
.--. @
' .; :@
`.__.'@
@
@@
@
@
.---. @
: .; `@
: ._.'@
: : @
:_; @@
@
@
.---.@
' .; :@
`._. ;@
: :@
:_:@@
@
@
.--. @
: ..'@
:_; @
@
@@
@
@
.--. @
`._-.'@
`.__.'@
@
@@
.-. @
.' `.@
`. .'@
: : @
:_; @
@
@@
@
@
.-..-.@
: :; :@
`.__.'@
@
@@
@
@
.-..-.@
: `; :@
`.__.'@
@
@@
@
@
.-..-..-.@
: `; `; :@
`.__.__.'@
@
@@
@
@
.-.,-.@
`. .'@
:_,._;@
@
@@
@
@
.-..-.@
: :; :@
`._. ;@
.-. :@
`._.'@@
@
@
.---. @
`-'_.'@
`.___;@
@
@@
.--.@
$: ,-'@
.' : @
$; :_ @
`.__;@
@
@@
.-.@
: :@
: :@
: :@
:_;@
@
@@
.--. @
`-. :$@
: `.@
_; :$@
:__.' @
@
@@
.-.,-.@
.', .'@
`-'`-' @
$ $ @
$ $ @
$ $ @
$ $ @@
.-. @
;,' @
.--. @
' .; ; @
`.__,_;@
@
@@
.-.@
;,'@
.--. @
' '_.'@
`.__.'@
@
@@
.-.@
;,'@
.-. @
: : @
:_; @
@
@@
.-.@
;,'@
.--. @
' .; :@
`.__.'@
@
@@
.-.@
;,'@
.-..-.@
: :; :@
`.__.'@
@
@@
____ @
:____:@
,-.,-.@
: ,. :@
:_;:_;@
@
@@
.----.@
;----:@
: .` :@
: :. :@
:_;:_;@
@
@@
@@ -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 AlignRight = createLucideIcon("AlignRight", [
["path", { d: "M21 12H9", key: "dn1m92" }],
["path", { d: "M21 18H7", key: "1ygte8" }],
["path", { d: "M21 6H3", key: "1jwq7v" }]
]);
export { AlignRight as default };
//# sourceMappingURL=align-right.js.map
@@ -0,0 +1,77 @@
import { NavigateOptions } from './link.cjs';
import { AnyRouter, RegisteredRouter } from './router.cjs';
export type AnyRedirect = Redirect<any, any, any, any, any>;
/**
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RedirectType)
*/
export type Redirect<TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string | undefined = undefined, TMaskFrom extends string = TFrom, TMaskTo extends string = '.'> = Response & {
options: NavigateOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo> & {};
redirectHandled?: boolean;
};
export type RedirectOptions<TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string | undefined = undefined, TMaskFrom extends string = TFrom, TMaskTo extends string = '.'> = {
href?: string;
/**
* @deprecated Use `statusCode` instead
**/
code?: number;
/**
* The HTTP status code to use when redirecting.
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RedirectType#statuscode-property)
*/
statusCode?: number;
/**
* If provided, will throw the redirect object instead of returning it. This can be useful in places where `throwing` in a function might cause it to have a return type of `never`. In that case, you can use `redirect({ throw: true })` to throw the redirect object instead of returning it.
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RedirectType#throw-property)
*/
throw?: any;
/**
* The HTTP headers to use when redirecting.
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RedirectType#headers-property)
*/
headers?: HeadersInit;
} & NavigateOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>;
export type ResolvedRedirect<TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string = '', TMaskFrom extends string = TFrom, TMaskTo extends string = ''> = Redirect<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>;
/**
* Options for route-bound redirect, where 'from' is automatically set.
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RedirectType)
*/
export type RedirectOptionsRoute<TDefaultFrom extends string = string, TRouter extends AnyRouter = RegisteredRouter, TTo extends string | undefined = undefined, TMaskTo extends string = ''> = Omit<RedirectOptions<TRouter, TDefaultFrom, TTo, TDefaultFrom, TMaskTo>, 'from'>;
/**
* A redirect function bound to a specific route, with 'from' pre-set to the route's fullPath.
* This enables relative redirects like `Route.redirect({ to: './overview' })`.
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RedirectType)
*/
export interface RedirectFnRoute<in out TDefaultFrom extends string = string> {
<TRouter extends AnyRouter = RegisteredRouter, const TTo extends string | undefined = undefined, const TMaskTo extends string = ''>(opts: RedirectOptionsRoute<TDefaultFrom, TRouter, TTo, TMaskTo>): Redirect<TRouter, TDefaultFrom, TTo, TDefaultFrom, TMaskTo>;
}
/**
* Create a redirect Response understood by TanStack Router.
*
* Use from route `loader`/`beforeLoad` or server functions to trigger a
* navigation. If `throw: true` is set, the redirect is thrown instead of
* returned. When an absolute `href` is supplied and `reloadDocument` is not
* set, a full-document navigation is inferred.
*
* @param opts Options for the redirect. Common fields:
* - `href`: absolute URL for external redirects; infers `reloadDocument`.
* - `statusCode`: HTTP status code to use (defaults to 307).
* - `headers`: additional headers to include on the Response.
* - Standard navigation options like `to`, `params`, `search`, `replace`,
* and `reloadDocument` for internal redirects.
* @returns A Response augmented with router navigation options.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/redirectFunction
*/
export declare function redirect<TRouter extends AnyRouter = RegisteredRouter, const TTo extends string | undefined = '.', const TFrom extends string = string, const TMaskFrom extends string = TFrom, const TMaskTo extends string = ''>(opts: RedirectOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>): Redirect<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>;
/** Check whether a value is a TanStack Router redirect Response. */
/** Check whether a value is a TanStack Router redirect Response. */
export declare function isRedirect(obj: any): obj is AnyRedirect;
/** True if value is a redirect with a resolved `href` location. */
/** True if value is a redirect with a resolved `href` location. */
export declare function isResolvedRedirect(obj: any): obj is AnyRedirect & {
options: {
href: string;
};
};
/** Parse a serialized redirect object back into a redirect Response. */
/** Parse a serialized redirect object back into a redirect Response. */
export declare function parseRedirect(obj: any): Redirect<AnyRouter, string, ".", string, ""> | undefined;
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright 2017 Andrey Sitnik <andrey@sitnik.ru>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_RE","2":"_x"},C:{"1":"_yL","2":"_UK"},D:{"1":"_qF","2":"_kF"},E:{"1":"_QB","2":"_TB"},F:{"1":"_MF","2":"_XI"},G:{"1":"_BB","2":"_OB"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_xB","2":"_3B"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:6,C:"String.prototype.padStart(), String.prototype.padEnd()",D:true};
@@ -0,0 +1,11 @@
export default class TrieNode {
parents: string[];
children: Map<string, TrieNode>;
subs?: string[];
constructor(parents?: string[]);
addSub(key: string, ...subs: string[]): this;
getChild(child: string): TrieNode | undefined;
isTerminal(): boolean;
addChild(child: string): void;
hasChild(child: string): boolean;
}
@@ -0,0 +1 @@
{"version":3,"file":"Feature.mjs","sources":["../../../src/render/Feature.ts"],"sourcesContent":["import type { VisualElement } from \"./VisualElement\"\n\n/**\n * Feature base class for extending VisualElement functionality.\n * Features are plugins that can be mounted/unmounted to add behavior\n * like gestures, animations, or layout tracking.\n */\nexport abstract class Feature<T extends any = any> {\n isMounted = false\n\n node: VisualElement<T>\n\n constructor(node: VisualElement<T>) {\n this.node = node\n }\n\n abstract mount(): void\n\n abstract unmount(): void\n\n update(): void {}\n}\n"],"names":[],"mappings":"AAEA;;;;AAIG;MACmB,OAAO,CAAA;AAKzB,IAAA,WAAA,CAAY,IAAsB,EAAA;QAJlC,IAAA,CAAA,SAAS,GAAG,KAAK;AAKb,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;IACpB;AAMA,IAAA,MAAM,KAAU;AACnB;;;;"}