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,21 @@
MIT License
Copyright (c) 2016-2018 Ari Porad
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,32 @@
<h1 align="center">
<br>
<picture>
<source media="(prefers-color-scheme: dark)" srcset=".github/logo-dark.svg">
<img width="160" alt="tsx" src=".github/logo-light.svg">
</picture>
<br><br>
<a href="https://npm.im/tsx"><img src="https://badgen.net/npm/v/tsx"></a> <a href="https://npm.im/tsx"><img src="https://badgen.net/npm/dm/tsx"></a>
</h1>
<p align="center">
TypeScript Execute (tsx): The easiest way to run TypeScript in Node.js
<br><br>
<a href="https://tsx.is">Documentation</a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://tsx.is/getting-started">Getting started →</a>
</p>
<br>
<p align="center">
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=398771"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/donate.webp"></a>
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=416984"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/sponsor.webp"></a>
</p>
<p align="center"><sup><i>Already a sponsor?</i> Join the discussion in the <a href="https://github.com/pvtnbr/tsx">Development repo</a>!</sup></p>
## Sponsors
<p align="center">
<a href="https://github.com/sponsors/privatenumber">
<img src="https://cdn.jsdelivr.net/gh/privatenumber/sponsors/sponsorkit/sponsors.svg">
</a>
</p>
@@ -0,0 +1,171 @@
import type {KeywordCxt} from "."
import type {
AnySchema,
SchemaValidateFunction,
AnyValidateFunction,
AddedKeywordDefinition,
MacroKeywordDefinition,
FuncKeywordDefinition,
} from "../../types"
import type {SchemaObjCxt} from ".."
import {_, nil, not, stringify, Code, Name, CodeGen} from "../codegen"
import N from "../names"
import type {JSONType} from "../rules"
import {callValidateCode} from "../../vocabularies/code"
import {extendErrors} from "../errors"
type KeywordCompilationResult = AnySchema | SchemaValidateFunction | AnyValidateFunction
export function macroKeywordCode(cxt: KeywordCxt, def: MacroKeywordDefinition): void {
const {gen, keyword, schema, parentSchema, it} = cxt
const macroSchema = def.macro.call(it.self, schema, parentSchema, it)
const schemaRef = useKeyword(gen, keyword, macroSchema)
if (it.opts.validateSchema !== false) it.self.validateSchema(macroSchema, true)
const valid = gen.name("valid")
cxt.subschema(
{
schema: macroSchema,
schemaPath: nil,
errSchemaPath: `${it.errSchemaPath}/${keyword}`,
topSchemaRef: schemaRef,
compositeRule: true,
},
valid
)
cxt.pass(valid, () => cxt.error(true))
}
export function funcKeywordCode(cxt: KeywordCxt, def: FuncKeywordDefinition): void {
const {gen, keyword, schema, parentSchema, $data, it} = cxt
checkAsyncKeyword(it, def)
const validate =
!$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate
const validateRef = useKeyword(gen, keyword, validate)
const valid = gen.let("valid")
cxt.block$data(valid, validateKeyword)
cxt.ok(def.valid ?? valid)
function validateKeyword(): void {
if (def.errors === false) {
assignValid()
if (def.modifying) modifyData(cxt)
reportErrs(() => cxt.error())
} else {
const ruleErrs = def.async ? validateAsync() : validateSync()
if (def.modifying) modifyData(cxt)
reportErrs(() => addErrs(cxt, ruleErrs))
}
}
function validateAsync(): Name {
const ruleErrs = gen.let("ruleErrs", null)
gen.try(
() => assignValid(_`await `),
(e) =>
gen.assign(valid, false).if(
_`${e} instanceof ${it.ValidationError as Name}`,
() => gen.assign(ruleErrs, _`${e}.errors`),
() => gen.throw(e)
)
)
return ruleErrs
}
function validateSync(): Code {
const validateErrs = _`${validateRef}.errors`
gen.assign(validateErrs, null)
assignValid(nil)
return validateErrs
}
function assignValid(_await: Code = def.async ? _`await ` : nil): void {
const passCxt = it.opts.passContext ? N.this : N.self
const passSchema = !(("compile" in def && !$data) || def.schema === false)
gen.assign(
valid,
_`${_await}${callValidateCode(cxt, validateRef, passCxt, passSchema)}`,
def.modifying
)
}
function reportErrs(errors: () => void): void {
gen.if(not(def.valid ?? valid), errors)
}
}
function modifyData(cxt: KeywordCxt): void {
const {gen, data, it} = cxt
gen.if(it.parentData, () => gen.assign(data, _`${it.parentData}[${it.parentDataProperty}]`))
}
function addErrs(cxt: KeywordCxt, errs: Code): void {
const {gen} = cxt
gen.if(
_`Array.isArray(${errs})`,
() => {
gen
.assign(N.vErrors, _`${N.vErrors} === null ? ${errs} : ${N.vErrors}.concat(${errs})`)
.assign(N.errors, _`${N.vErrors}.length`)
extendErrors(cxt)
},
() => cxt.error()
)
}
function checkAsyncKeyword({schemaEnv}: SchemaObjCxt, def: FuncKeywordDefinition): void {
if (def.async && !schemaEnv.$async) throw new Error("async keyword in sync schema")
}
function useKeyword(gen: CodeGen, keyword: string, result?: KeywordCompilationResult): Name {
if (result === undefined) throw new Error(`keyword "${keyword}" failed to compile`)
return gen.scopeValue(
"keyword",
typeof result == "function" ? {ref: result} : {ref: result, code: stringify(result)}
)
}
export function validSchemaType(
schema: unknown,
schemaType: JSONType[],
allowUndefined = false
): boolean {
// TODO add tests
return (
!schemaType.length ||
schemaType.some((st) =>
st === "array"
? Array.isArray(schema)
: st === "object"
? schema && typeof schema == "object" && !Array.isArray(schema)
: typeof schema == st || (allowUndefined && typeof schema == "undefined")
)
)
}
export function validateKeywordUsage(
{schema, opts, self, errSchemaPath}: SchemaObjCxt,
def: AddedKeywordDefinition,
keyword: string
): void {
/* istanbul ignore if */
if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {
throw new Error("ajv implementation error")
}
const deps = def.dependencies
if (deps?.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {
throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`)
}
if (def.validateSchema) {
const valid = def.validateSchema(schema[keyword])
if (!valid) {
const msg =
`keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` +
self.errorsText(def.validateSchema.errors)
if (opts.validateSchema === "log") self.logger.error(msg)
else throw new Error(msg)
}
}
}
@@ -0,0 +1,26 @@
import { batch, createAtom } from '@tanstack/react-store'
import {
createNonReactiveMutableStore,
createNonReactiveReadonlyStore,
} from '@tanstack/router-core'
import { isServer } from '@tanstack/router-core/isServer'
import type { Readable } from '@tanstack/react-store'
import type { GetStoreConfig } from '@tanstack/router-core'
declare module '@tanstack/router-core' {
export interface RouterReadableStore<TValue> extends Readable<TValue> {}
}
export const getStoreFactory: GetStoreConfig = (opts) => {
if (isServer ?? opts.isServer) {
return {
createMutableStore: createNonReactiveMutableStore,
createReadonlyStore: createNonReactiveReadonlyStore,
batch: (fn) => fn(),
}
}
return {
createMutableStore: createAtom,
createReadonlyStore: createAtom,
batch: batch,
}
}
@@ -0,0 +1 @@
{"version":3,"file":"flat-tree.mjs","sources":["../../../../src/projection/utils/flat-tree.ts"],"sourcesContent":["import { addUniqueItem, removeItem } from \"motion-utils\"\nimport { compareByDepth, WithDepth } from \"./compare-by-depth\"\n\nexport class FlatTree {\n private children: WithDepth[] = []\n\n private isDirty: boolean = false\n\n add(child: WithDepth) {\n addUniqueItem(this.children, child)\n this.isDirty = true\n }\n\n remove(child: WithDepth) {\n removeItem(this.children, child)\n this.isDirty = true\n }\n\n forEach(callback: (child: WithDepth) => void) {\n this.isDirty && this.children.sort(compareByDepth)\n this.isDirty = false\n this.children.forEach(callback)\n }\n}\n"],"names":[],"mappings":";;;MAGa,QAAQ,CAAA;AAArB,IAAA,WAAA,GAAA;QACY,IAAA,CAAA,QAAQ,GAAgB,EAAE;QAE1B,IAAA,CAAA,OAAO,GAAY,KAAK;IAiBpC;AAfI,IAAA,GAAG,CAAC,KAAgB,EAAA;AAChB,QAAA,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC;AACnC,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;IACvB;AAEA,IAAA,MAAM,CAAC,KAAgB,EAAA;AACnB,QAAA,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC;AAChC,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;IACvB;AAEA,IAAA,OAAO,CAAC,QAAoC,EAAA;QACxC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC;AAClD,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;AACpB,QAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;IACnC;AACH;;;;"}
@@ -0,0 +1,32 @@
import { W as WorkerGlobalState, a as WorkerSetupContext, B as BirpcOptions } from './chunks/worker.d.ZpHpO4yb.js';
import { T as Traces } from './chunks/traces.d.D2T_R8rx.js';
import { Awaitable } from '@vitest/utils';
import { ModuleRunner } from 'vite/module-runner';
import { R as RuntimeRPC } from './chunks/rpc.d.B_8sPU0w.js';
import '@vitest/runner';
import './chunks/config.d.A1h_Y6Jt.js';
import '@vitest/pretty-format';
import '@vitest/snapshot';
import '@vitest/utils/diff';
import './chunks/environment.d.CrsxCzP1.js';
/** @experimental */
declare function setupBaseEnvironment(context: WorkerSetupContext): Promise<() => Promise<void>>;
/** @experimental */
declare function runBaseTests(method: "run" | "collect", state: WorkerGlobalState, traces: Traces): Promise<void>;
type WorkerRpcOptions = Pick<BirpcOptions<RuntimeRPC>, "on" | "off" | "post" | "serialize" | "deserialize">;
interface VitestWorker extends WorkerRpcOptions {
runTests: (state: WorkerGlobalState, traces: Traces) => Awaitable<unknown>;
collectTests: (state: WorkerGlobalState, traces: Traces) => Awaitable<unknown>;
onModuleRunner?: (moduleRunner: ModuleRunner) => Awaitable<unknown>;
setup?: (context: WorkerSetupContext) => void | Promise<() => Promise<unknown>>;
}
interface Options extends VitestWorker {
teardown?: () => void;
}
/** @experimental */
declare function init(worker: Options): void;
export { init, runBaseTests, setupBaseEnvironment as setupEnvironment };
@@ -0,0 +1,131 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SPECIAL_PURPOSE = exports.RE_URL_WITH_PORT = exports.RE_URL = exports.RE_ZONE_STRING = exports.RE_SUBNET_STRING = exports.RE_BAD_ADDRESS = exports.RE_BAD_CHARACTERS = exports.TYPES = exports.SCOPES = exports.GROUPS = exports.BITS = void 0;
exports.BITS = 128;
exports.GROUPS = 8;
/**
* Represents IPv6 address scopes
* @memberof Address6
* @static
*/
exports.SCOPES = {
0: 'Reserved',
1: 'Interface local',
2: 'Link local',
4: 'Admin local',
5: 'Site local',
8: 'Organization local',
14: 'Global',
15: 'Reserved',
};
/**
* Represents IPv6 address types
* @memberof Address6
* @static
*/
exports.TYPES = {
'ff01::1/128': 'Multicast (All nodes on this interface)',
'ff01::2/128': 'Multicast (All routers on this interface)',
'ff02::1/128': 'Multicast (All nodes on this link)',
'ff02::2/128': 'Multicast (All routers on this link)',
'ff05::2/128': 'Multicast (All routers in this site)',
'ff02::5/128': 'Multicast (OSPFv3 AllSPF routers)',
'ff02::6/128': 'Multicast (OSPFv3 AllDR routers)',
'ff02::9/128': 'Multicast (RIP routers)',
'ff02::a/128': 'Multicast (EIGRP routers)',
'ff02::d/128': 'Multicast (PIM routers)',
'ff02::16/128': 'Multicast (MLDv2 reports)',
'ff01::fb/128': 'Multicast (mDNSv6)',
'ff02::fb/128': 'Multicast (mDNSv6)',
'ff05::fb/128': 'Multicast (mDNSv6)',
'ff02::1:2/128': 'Multicast (All DHCP servers and relay agents on this link)',
'ff05::1:2/128': 'Multicast (All DHCP servers and relay agents in this site)',
'ff02::1:3/128': 'Multicast (All DHCP servers on this link)',
'ff05::1:3/128': 'Multicast (All DHCP servers in this site)',
'::/128': 'Unspecified',
'::1/128': 'Loopback',
'::ffff:0:0/96': 'IPv4-mapped',
'ff00::/8': 'Multicast',
'fe80::/10': 'Link-local unicast',
'fc00::/7': 'Unique local',
'2001::/32': 'Teredo',
'2001:2::/48': 'Benchmarking',
'2002::/16': '6to4',
'2001:db8::/32': 'Documentation',
'3fff::/20': 'Documentation',
'100::/64': 'Discard-only',
'fec0::/10': 'Site-local unicast (deprecated)',
'::/96': 'IPv4-compatible (deprecated)',
'64:ff9b::/96': 'NAT64 (well-known)',
'64:ff9b:1::/48': 'NAT64 (local-use)',
};
/**
* A regular expression that matches bad characters in an IPv6 address
* @memberof Address6
* @static
*/
exports.RE_BAD_CHARACTERS = /([^0-9a-f:/%])/gi;
/**
* A regular expression that matches an incorrect IPv6 address
* @memberof Address6
* @static
*/
exports.RE_BAD_ADDRESS = /([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;
/**
* A regular expression that matches an IPv6 subnet
* @memberof Address6
* @static
*/
exports.RE_SUBNET_STRING = /\/\d{1,3}(?=%|$)/;
/**
* A regular expression that matches an IPv6 zone
* @memberof Address6
* @static
* @deprecated Takes quadratic time on input holding many `%` characters
* followed by a line terminator. The library finds the zone by index, as
* `Address6`'s constructor shows, and 11.0.0 removes this export.
*/
exports.RE_ZONE_STRING = /%.*$/;
exports.RE_URL = /^(?:\[([0-9a-f:.]+)\]|([0-9a-f:.]+))(?:[/?#].*)?$/i;
exports.RE_URL_WITH_PORT = /^\[([0-9a-f:.]+)\]:([0-9]{1,5})(?:[/?#].*)?$/i;
/**
* The IANA IPv6 Special-Purpose Address Registry
* (https://www.iana.org/assignments/iana-ipv6-special-registry/), one entry
* per block: `[cidr, name, globallyReachable]`. A `null` reachability means
* the registry says N/A or leaves the column blank; N/A blocks (Teredo, 6to4)
* are treated as not globally reachable, since a packet to one needs a relay,
* and blank blocks inherit the answer of the block containing them.
*
* `Address6.isGlobal()` answers from the most specific entry containing the
* address, after delegating IPv4-mapped and NAT64 well-known addresses to the
* embedded IPv4 address. `test/data/iana-corpus.json` is generated from the
* registry's CSV and pins this table to it.
*/
exports.SPECIAL_PURPOSE = [
['::1/128', 'Loopback Address', false],
['::/128', 'Unspecified Address', false],
['::ffff:0:0/96', 'IPv4-mapped Address', false],
['64:ff9b::/96', 'IPv4-IPv6 Translat.', true],
['64:ff9b:1::/48', 'IPv4-IPv6 Translat.', false],
['100::/64', 'Discard-Only Address Block', false],
['100:0:0:1::/64', 'Dummy IPv6 Prefix', false],
['2001::/23', 'IETF Protocol Assignments', false],
['2001::/32', 'TEREDO', false],
['2001:1::1/128', 'Port Control Protocol Anycast', true],
['2001:1::2/128', 'Traversal Using Relays around NAT Anycast', true],
['2001:1::3/128', 'DNS-SD Service Registration Protocol Anycast', true],
['2001:2::/48', 'Benchmarking', false],
['2001:3::/32', 'AMT', true],
['2001:4:112::/48', 'AS112-v6', true],
['2001:10::/28', 'Deprecated (previously ORCHID)', null],
['2001:20::/28', 'ORCHIDv2', true],
['2001:30::/28', 'Drone Remote ID Protocol Entity Tags (DETs) Prefix', true],
['2001:db8::/32', 'Documentation', false],
['2002::/16', '6to4', false],
['2620:4f:8000::/48', 'Direct Delegation AS112 Service', true],
['3fff::/20', 'Documentation', false],
['5f00::/16', 'Segment Routing (SRv6) SIDs', false],
['fc00::/7', 'Unique-Local', false],
['fe80::/10', 'Link-Local Unicast', false],
];
//# sourceMappingURL=constants.js.map
@@ -0,0 +1,23 @@
/**
* @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 SlidersHorizontal = createLucideIcon("SlidersHorizontal", [
["line", { x1: "21", x2: "14", y1: "4", y2: "4", key: "obuewd" }],
["line", { x1: "10", x2: "3", y1: "4", y2: "4", key: "1q6298" }],
["line", { x1: "21", x2: "12", y1: "12", y2: "12", key: "1iu8h1" }],
["line", { x1: "8", x2: "3", y1: "12", y2: "12", key: "ntss68" }],
["line", { x1: "21", x2: "16", y1: "20", y2: "20", key: "14d8ph" }],
["line", { x1: "12", x2: "3", y1: "20", y2: "20", key: "m0wm8r" }],
["line", { x1: "14", x2: "14", y1: "2", y2: "6", key: "14e1ph" }],
["line", { x1: "8", x2: "8", y1: "10", y2: "14", key: "1i6ji0" }],
["line", { x1: "16", x2: "16", y1: "18", y2: "22", key: "1lctlv" }]
]);
export { SlidersHorizontal as default };
//# sourceMappingURL=sliders-horizontal.js.map
@@ -0,0 +1,89 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
const gtFive = z.bigint().gt(BigInt(5));
const gteFive = z.bigint().gte(BigInt(5));
const ltFive = z.bigint().lt(BigInt(5));
const lteFive = z.bigint().lte(BigInt(5));
const positive = z.bigint().positive();
const negative = z.bigint().negative();
const nonnegative = z.bigint().nonnegative();
const nonpositive = z.bigint().nonpositive();
const multipleOfFive = z.bigint().multipleOf(BigInt(5));
test("passing validations", () => {
z.bigint().parse(BigInt(1));
z.bigint().parse(BigInt(0));
z.bigint().parse(BigInt(-1));
gtFive.parse(BigInt(6));
gteFive.parse(BigInt(5));
gteFive.parse(BigInt(6));
ltFive.parse(BigInt(4));
lteFive.parse(BigInt(5));
lteFive.parse(BigInt(4));
positive.parse(BigInt(3));
negative.parse(BigInt(-2));
nonnegative.parse(BigInt(0));
nonnegative.parse(BigInt(7));
nonpositive.parse(BigInt(0));
nonpositive.parse(BigInt(-12));
multipleOfFive.parse(BigInt(15));
});
test("failing validations", () => {
expect(() => gtFive.parse(BigInt(5))).toThrow();
expect(() => gteFive.parse(BigInt(4))).toThrow();
expect(() => ltFive.parse(BigInt(5))).toThrow();
expect(() => lteFive.parse(BigInt(6))).toThrow();
expect(() => positive.parse(BigInt(0))).toThrow();
expect(() => positive.parse(BigInt(-2))).toThrow();
expect(() => negative.parse(BigInt(0))).toThrow();
expect(() => negative.parse(BigInt(3))).toThrow();
expect(() => nonnegative.parse(BigInt(-1))).toThrow();
expect(() => nonpositive.parse(BigInt(1))).toThrow();
expect(() => multipleOfFive.parse(BigInt(13))).toThrow();
});
test("min max getters", () => {
expect(z.bigint().min(BigInt(5)).minValue).toEqual(BigInt(5));
expect(z.bigint().min(BigInt(5)).min(BigInt(10)).minValue).toEqual(BigInt(10));
expect(z.bigint().max(BigInt(5)).maxValue).toEqual(BigInt(5));
expect(z.bigint().max(BigInt(5)).max(BigInt(1)).maxValue).toEqual(BigInt(1));
});
test("a format check applied after min/max does not widen minValue/maxValue back out", () => {
const schema = z.bigint().min(0n).max(23n).check(z.int64());
expect(schema.minValue).toEqual(0n);
expect(schema.maxValue).toEqual(23n);
});
test("bigint formats are distinct at the type level", () => {
expectTypeOf(z.int64()._zod.def.format).toEqualTypeOf<"int64">();
expectTypeOf(z.uint64()._zod.def.format).toEqualTypeOf<"uint64">();
z.int64() satisfies z.ZodBigIntFormat;
z.int64() satisfies z.ZodBigInt;
// @ts-expect-error a uint64 schema is not a ZodInt64
z.uint64() satisfies z.ZodInt64;
});
test("multipleOf(0n) does not throw from safeParse", () => {
// `value % 0n` throws RangeError, so the compiled path declines and the runtime reports the failure
const schema = z.bigint().multipleOf(BigInt(0));
const result = schema.safeParse(BigInt(10));
expect(result.success).toBe(false);
expect(result.error!.issues[0].code).toEqual("not_multiple_of");
expect(schema.safeParse(BigInt(0)).success).toBe(false);
// matches the number equivalent
expect(z.number().multipleOf(0).safeParse(10).success).toBe(false);
expect(z.number().multipleOf(0).safeParse(0).success).toBe(false);
// a zero divisor nested in an object must not break the surrounding parse
const obj = z.object({ a: z.bigint().multipleOf(BigInt(0)), b: z.bigint() });
expect(obj.safeParse({ a: BigInt(1), b: BigInt(2) }).success).toBe(false);
expect(obj.safeParse({ a: BigInt(1), b: 2 }).success).toBe(false);
});
@@ -0,0 +1 @@
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":[null],"names":["dictionary","commonWords","firstnames","lastnames","wikipedia","wordSequences"],"mappings":";;;;;;;;;AAAA;AAQA,MAAMA,UAAU,GAAG;AACjB,EAAA,gBAAgB,EAAEC,WAAW;AAC7B,EAAA,eAAe,EAAEC,UAAU;AAC3B,EAAA,cAAc,EAAEC,SAAS;AACzB,EAAA,cAAc,EAAEC,SAAS;EACzB,GAAGC;;;;;;"}
@@ -0,0 +1,63 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.safeDecodeAsync = exports.safeEncodeAsync = exports.safeDecode = exports.safeEncode = exports.decodeAsync = exports.encodeAsync = exports.decode = exports.encode = exports.validateAsync = exports.validate = exports.safeParseAsync = exports.safeParse = exports.parseAsync = exports.parse = void 0;
const core = __importStar(require("../core/index.cjs"));
const errors_js_1 = require("./errors.cjs");
exports.parse = core._parse(errors_js_1.ZodRealError);
exports.parseAsync = core._parseAsync(errors_js_1.ZodRealError);
exports.safeParse = core._safeParse(errors_js_1.ZodRealError);
exports.safeParseAsync = core._safeParseAsync(errors_js_1.ZodRealError);
var index_js_1 = require("../core/index.cjs");
Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return index_js_1.validate; } });
Object.defineProperty(exports, "validateAsync", { enumerable: true, get: function () { return index_js_1.validateAsync; } });
// Codec functions
exports.encode = core._encode(errors_js_1.ZodRealError);
exports.decode = core._decode(errors_js_1.ZodRealError);
exports.encodeAsync = core._encodeAsync(errors_js_1.ZodRealError);
exports.decodeAsync = core._decodeAsync(errors_js_1.ZodRealError);
exports.safeEncode = core._safeEncode(errors_js_1.ZodRealError);
exports.safeDecode = core._safeDecode(errors_js_1.ZodRealError);
exports.safeEncodeAsync = core._safeEncodeAsync(errors_js_1.ZodRealError);
exports.safeDecodeAsync = core._safeDecodeAsync(errors_js_1.ZodRealError);
// seal-cjs-exports
(function () {
var keys = Object.getOwnPropertyNames(exports);
for (var i = 0; i < keys.length; i++) {
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
if (!desc || !desc.get || !desc.configurable) continue;
var value;
try {
value = desc.get();
} catch (e) {
continue;
}
// a circular require may not have settled this one yet, so leave it live
if (value === undefined) continue;
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
}
Object.freeze(exports);
})();
@@ -0,0 +1 @@
{"version":3,"names":["_path","data","require","normalizeOptions","config","filename","cwd","filenameRelative","path","relative","sourceType","inputSourceMap","sourceMaps","sourceRoot","options","moduleRoot","sourceFileName","basename","comments","compact","opts","Object","assign","parserOpts","extname","plugins","generatorOpts","auxiliaryCommentBefore","auxiliaryCommentAfter","retainLines","shouldPrintComment","minified","passes","plugin","manipulateOptions"],"sources":["../../src/transformation/normalize-opts.ts"],"sourcesContent":["import path from \"node:path\";\nimport type { ResolvedConfig } from \"../config/index.ts\";\nimport type { ResolvedOptions } from \"../config/validation/options.ts\";\n\nexport default function normalizeOptions(\n config: ResolvedConfig,\n): ResolvedOptions {\n const {\n filename,\n cwd,\n filenameRelative = typeof filename === \"string\"\n ? path.relative(cwd, filename)\n : \"unknown\",\n sourceType = \"module\",\n inputSourceMap,\n sourceMaps = !!inputSourceMap,\n sourceRoot = process.env.BABEL_8_BREAKING\n ? undefined\n : // @ts-ignore(Babel 7 vs Babel 8) moduleRoot is a Babel 7 option\n config.options.moduleRoot,\n\n sourceFileName = path.basename(filenameRelative),\n\n comments = true,\n compact = \"auto\",\n } = config.options;\n\n const opts = config.options;\n\n const options: ResolvedOptions = {\n ...opts,\n\n parserOpts: {\n sourceType:\n path.extname(filenameRelative) === \".mjs\" ? \"module\" : sourceType,\n\n // @ts-expect-error We should have passed `sourceFilename` here\n // pending https://github.com/babel/babel/issues/15917#issuecomment-2789278964\n sourceFileName: filename,\n plugins: [],\n ...opts.parserOpts,\n },\n\n generatorOpts: {\n // General generator flags.\n filename,\n\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n retainLines: opts.retainLines,\n comments,\n shouldPrintComment: opts.shouldPrintComment,\n compact,\n minified: opts.minified,\n\n // Source-map generation flags.\n // babel-generator does not differentiate between `true`, `\"inline\"` or `\"both\"`\n sourceMaps: !!sourceMaps,\n sourceRoot,\n sourceFileName,\n\n ...opts.generatorOpts,\n },\n };\n\n for (const plugins of config.passes) {\n for (const plugin of plugins) {\n if (plugin.manipulateOptions) {\n plugin.manipulateOptions(options, options.parserOpts);\n }\n }\n }\n\n return options;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIe,SAASE,gBAAgBA,CACtCC,MAAsB,EACL;EACjB,MAAM;IACJC,QAAQ;IACRC,GAAG;IACHC,gBAAgB,GAAG,OAAOF,QAAQ,KAAK,QAAQ,GAC3CG,MAAGA,CAAC,CAACC,QAAQ,CAACH,GAAG,EAAED,QAAQ,CAAC,GAC5B,SAAS;IACbK,UAAU,GAAG,QAAQ;IACrBC,cAAc;IACdC,UAAU,GAAG,CAAC,CAACD,cAAc;IAC7BE,UAAU,GAGNT,MAAM,CAACU,OAAO,CAACC,UAAU;IAE7BC,cAAc,GAAGR,MAAGA,CAAC,CAACS,QAAQ,CAACV,gBAAgB,CAAC;IAEhDW,QAAQ,GAAG,IAAI;IACfC,OAAO,GAAG;EACZ,CAAC,GAAGf,MAAM,CAACU,OAAO;EAElB,MAAMM,IAAI,GAAGhB,MAAM,CAACU,OAAO;EAE3B,MAAMA,OAAwB,GAAAO,MAAA,CAAAC,MAAA,KACzBF,IAAI;IAEPG,UAAU,EAAAF,MAAA,CAAAC,MAAA;MACRZ,UAAU,EACRF,MAAGA,CAAC,CAACgB,OAAO,CAACjB,gBAAgB,CAAC,KAAK,MAAM,GAAG,QAAQ,GAAGG,UAAU;MAInEM,cAAc,EAAEX,QAAQ;MACxBoB,OAAO,EAAE;IAAE,GACRL,IAAI,CAACG,UAAU,CACnB;IAEDG,aAAa,EAAAL,MAAA,CAAAC,MAAA;MAEXjB,QAAQ;MAERsB,sBAAsB,EAAEP,IAAI,CAACO,sBAAsB;MACnDC,qBAAqB,EAAER,IAAI,CAACQ,qBAAqB;MACjDC,WAAW,EAAET,IAAI,CAACS,WAAW;MAC7BX,QAAQ;MACRY,kBAAkB,EAAEV,IAAI,CAACU,kBAAkB;MAC3CX,OAAO;MACPY,QAAQ,EAAEX,IAAI,CAACW,QAAQ;MAIvBnB,UAAU,EAAE,CAAC,CAACA,UAAU;MACxBC,UAAU;MACVG;IAAc,GAEXI,IAAI,CAACM,aAAa;EACtB,EACF;EAED,KAAK,MAAMD,OAAO,IAAIrB,MAAM,CAAC4B,MAAM,EAAE;IACnC,KAAK,MAAMC,MAAM,IAAIR,OAAO,EAAE;MAC5B,IAAIQ,MAAM,CAACC,iBAAiB,EAAE;QAC5BD,MAAM,CAACC,iBAAiB,CAACpB,OAAO,EAAEA,OAAO,CAACS,UAAU,CAAC;MACvD;IACF;EACF;EAEA,OAAOT,OAAO;AAChB;AAAC","ignoreList":[]}
@@ -0,0 +1,51 @@
import { Feature } from 'motion-dom';
import { noop } from 'motion-utils';
import { VisualElementDragControls } from './VisualElementDragControls.mjs';
class DragGesture extends Feature {
constructor(node) {
super(node);
this.removeGroupControls = noop;
this.removeListeners = noop;
this.controls = new VisualElementDragControls(node);
}
mount() {
// If we've been provided a DragControls for manual control over the drag gesture,
// subscribe this component to it on mount.
const { dragControls } = this.node.getProps();
if (dragControls) {
this.removeGroupControls = dragControls.subscribe(this.controls);
}
this.removeListeners = this.controls.addListeners() || noop;
}
update() {
const { dragControls } = this.node.getProps();
const { dragControls: prevDragControls } = this.node.prevProps || {};
if (dragControls !== prevDragControls) {
this.removeGroupControls();
if (dragControls) {
this.removeGroupControls = dragControls.subscribe(this.controls);
}
}
}
unmount() {
this.removeGroupControls();
this.removeListeners();
/**
* In React 19, during list reorder reconciliation, components may
* briefly unmount and remount while the drag is still active. If we're
* actively dragging, we should NOT end the pan session - it will
* continue tracking pointer events via its window-level listeners.
*
* The pan session will be properly cleaned up when:
* 1. The drag ends naturally (pointerup/pointercancel)
* 2. The component is truly removed from the DOM
*/
if (!this.controls.isDragging) {
this.controls.endPanSession();
}
}
}
export { DragGesture };
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,363 @@
/**
* Creates a new {@linkcode Jiti} instance with custom options.
*
* @param id - Instance id, usually the current filename.
* @param userOptions - Custom options to override the default options.
* @returns A {@linkcode Jiti} instance.
*
* @example
* <caption>ESM Usage</caption>
*
* ```ts
* import { createJiti } from "jiti";
*
* const jiti = createJiti(import.meta.url, { debug: true });
* ```
*
* @example
* <caption>CommonJS Usage **(deprecated)**</caption>
*
* ```ts
* const { createJiti } = require("jiti");
*
* const jiti = createJiti(__filename, { debug: true });
* ```
*
* @since 2.0.0
*/
export declare function createJiti(id: string, userOptions?: JitiOptions): Jiti;
/**
* Jiti instance
*
* Calling `jiti()` is similar to CommonJS {@linkcode require()} but adds
* extra features such as TypeScript and ESM compatibility.
*
* **Note:** It is recommended to use
* {@linkcode Jiti.import | await jiti.import()} instead.
*/
export interface Jiti extends NodeRequire {
/**
* Resolved options
*/
options: JitiOptions;
/**
* ESM import a module with additional TypeScript and ESM compatibility.
*
* If you need the default export of module, you can use
* `jiti.import(id, { default: true })` as shortcut to `mod?.default ?? mod`.
*/
import<T = unknown>(
id: string,
opts?: JitiResolveOptions & { default?: true },
): Promise<T>;
/**
* Resolve with ESM import conditions.
*/
esmResolve(id: string, parentURL?: string): string;
esmResolve<T extends JitiResolveOptions = JitiResolveOptions>(
id: string,
opts?: T,
): T["try"] extends true ? string | undefined : string;
/**
* Transform source code
*/
transform: (opts: TransformOptions) => string;
/**
* Evaluate transformed code as a module
*/
evalModule: (source: string, options?: EvalModuleOptions) => unknown;
}
/**
* Jiti instance options
*/
export interface JitiOptions {
/**
* Filesystem source cache
*
* An string can be passed to set the custom cache directory.
*
* By default (when set to `true`), jiti uses
* `node_modules/.cache/jiti` (if exists) or `{TMP_DIR}/jiti`.
*
* This option can also be disabled using
* `JITI_FS_CACHE=false` environment variable.
*
* **Note:** It is recommended to keep this option
* enabled for better performance.
*
* @default true
*/
fsCache?: boolean | string;
/**
* Rebuild the filesystem source cache
*
* This option can also be enabled using
* `JITI_REBUILD_FS_CACHE=true` environment variable.
*
* @default false
*/
rebuildFsCache?: boolean;
/**
* @deprecated Use the {@linkcode fsCache} option.
*
* @default true
*/
cache?: boolean | string;
/**
* Runtime module cache
*
* Disabling allows editing code and importing same module multiple times.
*
* When enabled, jiti integrates with Node.js native CommonJS cache store.
*
* This option can also be disabled using
* `JITI_MODULE_CACHE=false` environment variable.
*
* @default true
*/
moduleCache?: boolean;
/**
* @deprecated Use the {@linkcode moduleCache} option.
*
* @default true
*/
requireCache?: boolean;
/**
* Custom transform function
*/
transform?: (opts: TransformOptions) => TransformResult;
/**
* Enable verbose debugging.
*
* Can also be enabled using `JITI_DEBUG=1` environment variable.
*
* @default false
*/
debug?: boolean;
/**
* Enable sourcemaps for transformed code.
*
* Can also be disabled using `JITI_SOURCE_MAPS=0` environment variable.
*
* @default false
*/
sourceMaps?: boolean;
/**
* Jiti combines module exports with the `default` export using an
* internal Proxy to improve compatibility with mixed CJS/ESM usage.
* You can check the current implementation
* {@link https://github.com/unjs/jiti/blob/main/src/utils.ts#L105 here}.
*
* Can be disabled using `JITI_INTEROP_DEFAULT=0` environment variable.
*
* @default true
*/
interopDefault?: boolean;
/**
* Jiti hard source cache version.
*
* @internal
*/
cacheVersion?: string;
/**
* Supported extensions to resolve.
*
* @default [".js", ".mjs", ".cjs", ".ts", ".tsx", ".mts", ".cts", ".mtsx", ".ctsx", ".json"]
*/
extensions?: string[];
/**
* Transform options
*/
transformOptions?: Omit<TransformOptions, "source">;
/**
* Resolve aliases
*
* You can use `JITI_ALIAS` environment variable to set aliases as
* a JSON string.
*
* @default {}
*/
alias?: Record<string, string>;
/**
* List of modules (within `node_modules`) to always use native
* require/import for them.
*
* You can use `JITI_NATIVE_MODULES` environment variable to set
* native modules as a JSON string.
*
* @default []
*/
nativeModules?: string[];
/**
* List of modules (within `node_modules`) to transform them
* regardless of syntax.
*
* You can use `JITI_TRANSFORM_MODULES` environment variable to set
* transform modules as a JSON string.
*
* @default []
*/
transformModules?: string[];
/**
* Parent module's {@linkcode ImportMeta | import.meta} context to use
* for ESM resolution.
*
* (Only used for `jiti/native` import)
*/
importMeta?: ImportMeta;
/**
* Try to use native require and import without jiti transformations first.
*
* Enabled if Bun is detected.
*
* @default false
*/
tryNative?: boolean;
/**
* Enable JSX support Enable JSX support using
* {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx | `@babel/plugin-transform-react-jsx`}.
*
* You can also use `JITI_JSX=1` environment variable to enable JSX support.
*
* @default false
*/
jsx?: boolean | JSXOptions;
}
interface NodeRequire {
/**
* Module cache
*/
cache: ModuleCache;
/**
* @deprecated Prefer {@linkcode Jiti.import | await jiti.import()}
* for better compatibility.
*/
(id: string): any;
/**
* @deprecated Prefer {@linkcode Jiti.esmResolve | jiti.esmResolve}
* for better compatibility.
*/
resolve: {
/** @deprecated */
(id: string, options?: { paths?: string[] | undefined }): string;
/** @deprecated */
paths(request: string): string[] | null;
};
/** @deprecated CommonJS API */
extensions: Record<
".js" | ".json" | ".node",
(m: NodeModule, filename: string) => any | undefined
>;
/** @deprecated CommonJS API */
main: NodeModule | undefined;
}
export interface NodeModule {
/**
* `true` if the module is running during the Node.js preload.
*/
isPreloading: boolean;
exports: any;
require: NodeRequire;
id: string;
filename: string;
loaded: boolean;
/**
* @deprecated since Node.js **v14.6.0** Please use
* {@linkcode NodeRequire.main | require.main} and
* {@linkcode NodeModule.children | module.children} instead.
*/
parent: NodeModule | null | undefined;
children: NodeModule[];
/**
* The directory name of the module.
* This is usually the same as the `path.dirname()` of the `module.id`.
*
* @since Node.js **v11.14.0**
*/
path: string;
paths: string[];
}
export type ModuleCache = Record<string, NodeModule>;
export type EvalModuleOptions = Partial<{
id: string;
filename: string;
ext: string;
cache: ModuleCache;
/**
* @default true
*/
async: boolean;
forceTranspile: boolean;
}>;
export interface TransformOptions {
source: string;
filename?: string;
ts?: boolean;
retainLines?: boolean;
interopDefault?: boolean;
/**
* @default false
*/
async?: boolean;
/**
* @default false
*/
jsx?: boolean | JSXOptions;
babel?: Record<string, any>;
}
export interface TransformResult {
code: string;
error?: any;
}
export interface JitiResolveOptions {
conditions?: string[];
parentURL?: string | URL;
try?: boolean;
}
/**
* @see {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx#options | Reference}
*/
export interface JSXOptions {
throwIfNamespace?: boolean;
runtime?: "classic" | "automatic";
importSource?: string;
pragma?: string;
pragmaFrag?: string;
useBuiltIns?: boolean;
useSpread?: boolean;
}
@@ -0,0 +1,31 @@
/**
* @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 ServerCrash = createLucideIcon("ServerCrash", [
[
"path",
{
d: "M6 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-2",
key: "4b9dqc"
}
],
[
"path",
{
d: "M6 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2",
key: "22nnkd"
}
],
["path", { d: "M6 6h.01", key: "1utrut" }],
["path", { d: "M6 18h.01", key: "uhywen" }],
["path", { d: "m13 6-4 6h6l-4 6", key: "14hqih" }]
]);
export { ServerCrash as default };
//# sourceMappingURL=server-crash.js.map
@@ -0,0 +1,18 @@
import { assignRef } from './assignRef';
import { createCallbackRef } from './createRef';
/**
* Merges two or more refs together providing a single interface to set their value
* @param {RefObject|Ref} refs
* @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
*
* @see {@link useMergeRefs} to be used in ReactComponents
* @example
* const Component = React.forwardRef((props, ref) => {
* const ownRef = useRef();
* const domRef = mergeRefs([ref, ownRef]); // 👈 merge together
* return <div ref={domRef}>...</div>
* }
*/
export function mergeRefs(refs) {
return createCallbackRef(function (newValue) { return refs.forEach(function (ref) { return assignRef(ref, newValue); }); });
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_nQ","2":"_o _eH _L"},D:{"1":"_H _UJ _uH","2":"_ER"},E:{"1":"_dE","2":"_LI"},F:{"1":"_OM","2":"_1F"},G:{"1":"_cE","2":"_3F"},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":"_9F","2":"_nF"},Q:{"16":"JE"},R:{"16":"KE"},S:{"2":"LE","16":"ME"}},B:5,C:"WebAssembly Bulk Memory Operations",D:true};
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const getType = require("./getType.js");
const isObject = require("./isObject.js");
function isPlainObject(value) {
if (!isObject.isObject(value) || getType.getType(value) !== "Object") {
return false;
}
const prototype = Object.getPrototypeOf(value);
return prototype === null || prototype === Object.prototype;
}
exports.isPlainObject = isPlainObject;
@@ -0,0 +1,51 @@
// zod-json-schema-compat.ts
// ----------------------------------------------------
// JSON Schema conversion for both Zod v3 and Zod v4 (Mini)
// v3 uses your vendored converter; v4 uses Mini's toJSONSchema
// ----------------------------------------------------
import * as z4mini from 'zod/v4-mini';
import { getObjectShape, safeParse, isZ4Schema, getLiteralValue } from './zod-compat.js';
import { zodToJsonSchema } from 'zod-to-json-schema';
function mapMiniTarget(t) {
if (!t)
return 'draft-7';
if (t === 'jsonSchema7' || t === 'draft-7')
return 'draft-7';
if (t === 'jsonSchema2019-09' || t === 'draft-2020-12')
return 'draft-2020-12';
return 'draft-7'; // fallback
}
export function toJsonSchemaCompat(schema, opts) {
if (isZ4Schema(schema)) {
// v4 branch — use Mini's built-in toJSONSchema
return z4mini.toJSONSchema(schema, {
target: mapMiniTarget(opts?.target),
io: opts?.pipeStrategy ?? 'input'
});
}
// v3 branch — use vendored converter
return zodToJsonSchema(schema, {
strictUnions: opts?.strictUnions ?? true,
pipeStrategy: opts?.pipeStrategy ?? 'input'
});
}
export function getMethodLiteral(schema) {
const shape = getObjectShape(schema);
const methodSchema = shape?.method;
if (!methodSchema) {
throw new Error('Schema is missing a method literal');
}
const value = getLiteralValue(methodSchema);
if (typeof value !== 'string') {
throw new Error('Schema method literal must be a string');
}
return value;
}
export function parseWithCompat(schema, data) {
const result = safeParse(schema, data);
if (!result.success) {
throw result.error;
}
return result.data;
}
//# sourceMappingURL=zod-json-schema-compat.js.map
@@ -0,0 +1,35 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `pnpm run generate-configs`
module.exports = {
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
rules: {
'@typescript-eslint/ban-ts-comment': 'error',
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-empty-object-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-wrapper-object-types': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
},
};
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,aAAa,SAAU,CAAA;AAYpC,eAAO,MAAM,oBAAoB,UAAY,CAAA;AAU7C,eAAO,MAAM,mBAAmB,OAAQ,CAAA;AAUxC,eAAO,MAAM,sBAAsB,OAAQ,CAAA;AAyE3C,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,YA+BtE"}
@@ -0,0 +1,38 @@
{
"name": "estree-walker",
"description": "Traverse an ESTree-compliant AST",
"version": "3.0.3",
"private": false,
"author": "Rich Harris",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/Rich-Harris/estree-walker"
},
"type": "module",
"module": "./src/index.js",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./types/index.d.ts",
"import": "./src/index.js"
}
},
"types": "types/index.d.ts",
"scripts": {
"prepublishOnly": "tsc && npm test",
"test": "uvu test"
},
"dependencies": {
"@types/estree": "^1.0.0"
},
"devDependencies": {
"typescript": "^4.9.0",
"uvu": "^0.5.1"
},
"files": [
"src",
"types",
"README.md"
]
}
@@ -0,0 +1,79 @@
# Fix TypeScript Declarations for default CJS exports
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
This utility will allow you to fix the TypeScript declaration in CommonJS modules when using default exports.
Check the CJS fixtures in the test folder and the [CJS](./CJS.md) document for further details when using `rollup-plugin-dts`.
## Features
- 🚀 Fix default exports in CommonJS modules via API or Rollup plugin
- ✨ Generate CommonJS `d.ts` and `d.cts` files from `d.mts` files
- 💥 Use it with custom builders like [unbuild](https://github.com/unjs/unbuild), [tsup](https://github.com/egoist/tsup) or [pkgroll](https://github.com/privatenumber/pkgroll) (right now only `unbuild` supported, `tsup` and `pkgroll` don't allow adding Rollup plugins)
## unbuild
> [!NOTE]
>
> [unbuild](https://github.com/unjs/unbuild) `v3.5.0` uses the Rollup plugin from this package to fix the default exports in CommonJS modules.
For older `unbuild` versions, you can add the Rollup plugin from this package using the `rollup:dts:options` hook.
> [!WARNING]
>
> You should register the plugin directly when enabling `rollup.emitCJS = true` option, otherwise you can get wrong transformations.
>
> The plugin exposed here is just a helper to fix the default exports in CommonJS modules, it cannot control what files are being generated, check the [declaration](https://github.com/unjs/unbuild?tab=readme-ov-file#configuration) option in the readme file.
You will need to remove its current internal plugin adding the one provided by this package:
```ts
// build.config.ts
import { FixDtsDefaultCjsExportsPlugin } from 'fix-dts-default-cjs-exports/rollup'
import { defineBuildConfig } from 'unbuild'
export default defineBuildConfig({
entries: ['<your-entry-points>'],
declaration: true,
clean: true,
rollup: { emitCJS: true },
hooks: {
'rollup:dts:options': (ctx, options) => {
/* uncomment this block if you want to remove the unbuild internal plugin
options.plugins = plugins.filter((p) => {
if (!p || typeof p === 'string' || Array.isArray(p) || !('name' in p))
return true
return p.name !== 'unbuild-fix-cjs-export-type'
})
*/
options.plugins.push(FixDtsDefaultCjsExportsPlugin({
warn: message => ctx.warnings.add(message)
}))
}
}
})
```
## tsup
Since [tsup](https://github.com/egoist/tsup) doesn't expose any hook to allow change internal configuration, we need a change in the package to include the Rollup plugin from this package instead its built-in one.
## pkgroll
[pkgroll](https://github.com/privatenumber/pkgroll) is exposing only the `cli`, we need a change in the package to include the Rollup plugin from this package instead its built-in one.
## License
[MIT](./LICENSE) License © 2025-PRESENT [Joaquín Sánchez](https://github.com/userquin)
<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/fix-dts-default-cjs-exports?style=flat&colorA=18181B&colorB=F0DB4F
[npm-version-href]: https://npmjs.com/package/fix-dts-default-cjs-exports
[npm-downloads-src]: https://img.shields.io/npm/dm/fix-dts-default-cjs-exports?style=flat&colorA=18181B&colorB=F0DB4F
[npm-downloads-href]: https://npmjs.com/package/fix-dts-default-cjs-exports
[license-src]: https://img.shields.io/github/license/userquin/fix-dts-default-cjs-exports.svg?style=flat&colorA=18181B&colorB=F0DB4F
[license-href]: https://github.com/userquin/fix-dts-default-cjs-exports/blob/main/LICENSE
@@ -0,0 +1,71 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_helper_route_index = require("../../helper/route/index.js");
//#region src/middleware/mount/index.ts
const defaultReplaceRequest = (c) => {
const pathPrefix = require_helper_route_index.routePath(c).replace(/\/\*$/, "");
const url = new URL(c.req.raw.url);
url.pathname = c.req.path.slice(pathPrefix.length) || "/";
return new Request(url, c.req.raw);
};
const defaultGetOptions = (c) => {
let executionContext = void 0;
try {
executionContext = c.executionCtx;
} catch {}
return [c.env, executionContext];
};
/**
* `mount()` allows you to mount applications built with other frameworks into your Hono application.
*
* @see {@link https://hono.dev/docs/api/hono#mount}
*
* @param {Function} applicationHandler - other Request Handler
* @param {MountOptions} [options] - options of `mount()`
* @returns {MiddlewareHandler} handler to register with `app.all()`
*
* @example
* ```ts
* import { Router as IttyRouter } from 'itty-router'
* import { Hono } from 'hono'
* import { mount } from 'hono/mount'
* // Create itty-router application
* const ittyRouter = IttyRouter()
* // GET /itty-router/hello
* ittyRouter.get('/hello', () => new Response('Hello from itty-router'))
*
* const app = new Hono()
* app.all('/itty-router/*', mount(ittyRouter.handle))
* ```
*
* @example
* ```ts
* const app = new Hono()
* // Send the request to another application without modification.
* app.all('/app/*', mount(anotherApp, {
* replaceRequest: (req) => req,
* }))
* ```
*/
const mount = (applicationHandler, options) => {
let replaceRequest;
let optionHandler;
if (options) {
if (typeof options === "function") optionHandler = options;
else {
optionHandler = options.optionHandler;
if (options.replaceRequest === false) replaceRequest = (request) => request;
else replaceRequest = options.replaceRequest;
}
}
const getOptions = optionHandler ? (c) => {
const options = optionHandler(c);
return Array.isArray(options) ? options : [options];
} : defaultGetOptions;
return async (c, next) => {
const res = await applicationHandler(replaceRequest ? replaceRequest(c.req.raw) : defaultReplaceRequest(c), ...getOptions(c));
if (res) return res;
await next();
};
};
//#endregion
exports.mount = mount;
@@ -0,0 +1,32 @@
/**
* Information about a validated access token, provided to request handlers.
*/
export interface AuthInfo {
/**
* The access token.
*/
token: string;
/**
* The client ID associated with this token.
*/
clientId: string;
/**
* Scopes associated with this token.
*/
scopes: string[];
/**
* When the token expires (in seconds since epoch).
*/
expiresAt?: number;
/**
* The RFC 8707 resource server identifier for which this token is valid.
* If set, this MUST match the MCP server's resource identifier (minus hash fragment).
*/
resource?: URL;
/**
* Additional data associated with the token.
* This field should be used for any additional data that needs to be attached to the auth info.
*/
extra?: Record<string, unknown>;
}
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,24 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Baby = createLucideIcon("Baby", [
["path", { d: "M9 12h.01", key: "157uk2" }],
["path", { d: "M15 12h.01", key: "1k8ypt" }],
["path", { d: "M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5", key: "1u7htd" }],
[
"path",
{
d: "M19 6.3a9 9 0 0 1 1.8 3.9 2 2 0 0 1 0 3.6 9 9 0 0 1-17.6 0 2 2 0 0 1 0-3.6A9 9 0 0 1 12 3c2 0 3.5 1.1 3.5 2.5s-.9 2.5-2 2.5c-.8 0-1.5-.4-1.5-1",
key: "5yv0yz"
}
]
]);
export { Baby as default };
//# sourceMappingURL=baby.js.map
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _construct;
var _isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
var _setPrototypeOf = require("./setPrototypeOf.js");
function _construct(Parent, args, Class) {
if ((0, _isNativeReflectConstruct.default)()) {
return Reflect.construct.apply(null, arguments);
}
var a = [null];
a.push.apply(a, args);
var instance = new (Parent.bind.apply(Parent, a))();
if (Class) (0, _setPrototypeOf.default)(instance, Class.prototype);
return instance;
}
//# sourceMappingURL=construct.js.map
@@ -0,0 +1,11 @@
/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict';
module.exports = require('./lib/express');
@@ -0,0 +1 @@
{"version":3,"file":"mini.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
"use strict";const _format=require("./confbox.3768c7e9.cjs");function createScanner(n,l=!1){const g=n.length;let e=0,u="",p=0,k=16,A=0,o=0,O=0,r=0,T=0;function L(t,s){let b=0,c=0;for(;b<t||!s;){let i=n.charCodeAt(e);if(i>=48&&i<=57)c=c*16+i-48;else if(i>=65&&i<=70)c=c*16+i-65+10;else if(i>=97&&i<=102)c=c*16+i-97+10;else break;e++,b++}return b<t&&(c=-1),c}function v(t){e=t,u="",p=0,k=16,T=0}function _(){let t=e;if(n.charCodeAt(e)===48)e++;else for(e++;e<n.length&&isDigit(n.charCodeAt(e));)e++;if(e<n.length&&n.charCodeAt(e)===46)if(e++,e<n.length&&isDigit(n.charCodeAt(e)))for(e++;e<n.length&&isDigit(n.charCodeAt(e));)e++;else return T=3,n.substring(t,e);let s=e;if(e<n.length&&(n.charCodeAt(e)===69||n.charCodeAt(e)===101))if(e++,(e<n.length&&n.charCodeAt(e)===43||n.charCodeAt(e)===45)&&e++,e<n.length&&isDigit(n.charCodeAt(e))){for(e++;e<n.length&&isDigit(n.charCodeAt(e));)e++;s=e}else T=3;return n.substring(t,s)}function U(){let t="",s=e;for(;;){if(e>=g){t+=n.substring(s,e),T=2;break}const b=n.charCodeAt(e);if(b===34){t+=n.substring(s,e),e++;break}if(b===92){if(t+=n.substring(s,e),e++,e>=g){T=2;break}switch(n.charCodeAt(e++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+=`
`;break;case 114:t+="\r";break;case 116:t+=" ";break;case 117:const i=L(4,!0);i>=0?t+=String.fromCharCode(i):T=4;break;default:T=5}s=e;continue}if(b>=0&&b<=31)if(isLineBreak(b)){t+=n.substring(s,e),T=2;break}else T=6;e++}return t}function w(){if(u="",T=0,p=e,o=A,r=O,e>=g)return p=g,k=17;let t=n.charCodeAt(e);if(isWhiteSpace(t)){do e++,u+=String.fromCharCode(t),t=n.charCodeAt(e);while(isWhiteSpace(t));return k=15}if(isLineBreak(t))return e++,u+=String.fromCharCode(t),t===13&&n.charCodeAt(e)===10&&(e++,u+=`
`),A++,O=e,k=14;switch(t){case 123:return e++,k=1;case 125:return e++,k=2;case 91:return e++,k=3;case 93:return e++,k=4;case 58:return e++,k=6;case 44:return e++,k=5;case 34:return e++,u=U(),k=10;case 47:const s=e-1;if(n.charCodeAt(e+1)===47){for(e+=2;e<g&&!isLineBreak(n.charCodeAt(e));)e++;return u=n.substring(s,e),k=12}if(n.charCodeAt(e+1)===42){e+=2;const b=g-1;let c=!1;for(;e<b;){const i=n.charCodeAt(e);if(i===42&&n.charCodeAt(e+1)===47){e+=2,c=!0;break}e++,isLineBreak(i)&&(i===13&&n.charCodeAt(e)===10&&e++,A++,O=e)}return c||(e++,T=1),u=n.substring(s,e),k=13}return u+=String.fromCharCode(t),e++,k=16;case 45:if(u+=String.fromCharCode(t),e++,e===g||!isDigit(n.charCodeAt(e)))return k=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return u+=_(),k=11;default:for(;e<g&&N(t);)e++,t=n.charCodeAt(e);if(p!==e){switch(u=n.substring(p,e),u){case"true":return k=8;case"false":return k=9;case"null":return k=7}return k=16}return u+=String.fromCharCode(t),e++,k=16}}function N(t){if(isWhiteSpace(t)||isLineBreak(t))return!1;switch(t){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function I(){let t;do t=w();while(t>=12&&t<=15);return t}return{setPosition:v,getPosition:()=>e,scan:l?I:w,getToken:()=>k,getTokenValue:()=>u,getTokenOffset:()=>p,getTokenLength:()=>e-p,getTokenStartLine:()=>o,getTokenStartCharacter:()=>p-r,getTokenError:()=>T}}function isWhiteSpace(n){return n===32||n===9}function isLineBreak(n){return n===10||n===13}function isDigit(n){return n>=48&&n<=57}var CharacterCodes;(function(n){n[n.lineFeed=10]="lineFeed",n[n.carriageReturn=13]="carriageReturn",n[n.space=32]="space",n[n._0=48]="_0",n[n._1=49]="_1",n[n._2=50]="_2",n[n._3=51]="_3",n[n._4=52]="_4",n[n._5=53]="_5",n[n._6=54]="_6",n[n._7=55]="_7",n[n._8=56]="_8",n[n._9=57]="_9",n[n.a=97]="a",n[n.b=98]="b",n[n.c=99]="c",n[n.d=100]="d",n[n.e=101]="e",n[n.f=102]="f",n[n.g=103]="g",n[n.h=104]="h",n[n.i=105]="i",n[n.j=106]="j",n[n.k=107]="k",n[n.l=108]="l",n[n.m=109]="m",n[n.n=110]="n",n[n.o=111]="o",n[n.p=112]="p",n[n.q=113]="q",n[n.r=114]="r",n[n.s=115]="s",n[n.t=116]="t",n[n.u=117]="u",n[n.v=118]="v",n[n.w=119]="w",n[n.x=120]="x",n[n.y=121]="y",n[n.z=122]="z",n[n.A=65]="A",n[n.B=66]="B",n[n.C=67]="C",n[n.D=68]="D",n[n.E=69]="E",n[n.F=70]="F",n[n.G=71]="G",n[n.H=72]="H",n[n.I=73]="I",n[n.J=74]="J",n[n.K=75]="K",n[n.L=76]="L",n[n.M=77]="M",n[n.N=78]="N",n[n.O=79]="O",n[n.P=80]="P",n[n.Q=81]="Q",n[n.R=82]="R",n[n.S=83]="S",n[n.T=84]="T",n[n.U=85]="U",n[n.V=86]="V",n[n.W=87]="W",n[n.X=88]="X",n[n.Y=89]="Y",n[n.Z=90]="Z",n[n.asterisk=42]="asterisk",n[n.backslash=92]="backslash",n[n.closeBrace=125]="closeBrace",n[n.closeBracket=93]="closeBracket",n[n.colon=58]="colon",n[n.comma=44]="comma",n[n.dot=46]="dot",n[n.doubleQuote=34]="doubleQuote",n[n.minus=45]="minus",n[n.openBrace=123]="openBrace",n[n.openBracket=91]="openBracket",n[n.plus=43]="plus",n[n.slash=47]="slash",n[n.formFeed=12]="formFeed",n[n.tab=9]="tab"})(CharacterCodes||(CharacterCodes={})),new Array(20).fill(0).map((n,l)=>" ".repeat(l));const maxCachedValues=200;new Array(maxCachedValues).fill(0).map((n,l)=>`
`+" ".repeat(l)),new Array(maxCachedValues).fill(0).map((n,l)=>"\r"+" ".repeat(l)),new Array(maxCachedValues).fill(0).map((n,l)=>`\r
`+" ".repeat(l)),new Array(maxCachedValues).fill(0).map((n,l)=>`
`+" ".repeat(l)),new Array(maxCachedValues).fill(0).map((n,l)=>"\r"+" ".repeat(l)),new Array(maxCachedValues).fill(0).map((n,l)=>`\r
`+" ".repeat(l));var ParseOptions;(function(n){n.DEFAULT={allowTrailingComma:!1}})(ParseOptions||(ParseOptions={}));function parse$1(n,l=[],g=ParseOptions.DEFAULT){let e=null,u=[];const p=[];function k(o){Array.isArray(u)?u.push(o):e!==null&&(u[e]=o)}return visit(n,{onObjectBegin:()=>{const o={};k(o),p.push(u),u=o,e=null},onObjectProperty:o=>{e=o},onObjectEnd:()=>{u=p.pop()},onArrayBegin:()=>{const o=[];k(o),p.push(u),u=o,e=null},onArrayEnd:()=>{u=p.pop()},onLiteralValue:k,onError:(o,O,r)=>{l.push({error:o,offset:O,length:r})}},g),u[0]}function visit(n,l,g=ParseOptions.DEFAULT){const e=createScanner(n,!1),u=[];let p=0;function k(f){return f?()=>p===0&&f(e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter()):()=>!0}function A(f){return f?m=>p===0&&f(m,e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter()):()=>!0}function o(f){return f?m=>p===0&&f(m,e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter(),()=>u.slice()):()=>!0}function O(f){return f?()=>{p>0?p++:f(e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter(),()=>u.slice())===!1&&(p=1)}:()=>!0}function r(f){return f?()=>{p>0&&p--,p===0&&f(e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter())}:()=>!0}const T=O(l.onObjectBegin),L=o(l.onObjectProperty),v=r(l.onObjectEnd),_=O(l.onArrayBegin),U=r(l.onArrayEnd),w=o(l.onLiteralValue),N=A(l.onSeparator),I=k(l.onComment),t=A(l.onError),s=g&&g.disallowComments,b=g&&g.allowTrailingComma;function c(){for(;;){const f=e.scan();switch(e.getTokenError()){case 4:i(14);break;case 5:i(15);break;case 3:i(13);break;case 1:s||i(11);break;case 2:i(12);break;case 6:i(16);break}switch(f){case 12:case 13:s?i(10):I();break;case 16:i(1);break;case 15:case 14:break;default:return f}}}function i(f,m=[],j=[]){if(t(f),m.length+j.length>0){let B=e.getToken();for(;B!==17;){if(m.indexOf(B)!==-1){c();break}else if(j.indexOf(B)!==-1)break;B=c()}}}function F(f){const m=e.getTokenValue();return f?w(m):(L(m),u.push(m)),c(),!0}function E(){switch(e.getToken()){case 11:const f=e.getTokenValue();let m=Number(f);isNaN(m)&&(i(2),m=0),w(m);break;case 7:w(null);break;case 8:w(!0);break;case 9:w(!1);break;default:return!1}return c(),!0}function J(){return e.getToken()!==10?(i(3,[],[2,5]),!1):(F(!1),e.getToken()===6?(N(":"),c(),V()||i(4,[],[2,5])):i(5,[],[2,5]),u.pop(),!0)}function a(){T(),c();let f=!1;for(;e.getToken()!==2&&e.getToken()!==17;){if(e.getToken()===5){if(f||i(4,[],[]),N(","),c(),e.getToken()===2&&b)break}else f&&i(6,[],[]);J()||i(4,[],[2,5]),f=!0}return v(),e.getToken()!==2?i(7,[2],[]):c(),!0}function y(){_(),c();let f=!0,m=!1;for(;e.getToken()!==4&&e.getToken()!==17;){if(e.getToken()===5){if(m||i(4,[],[]),N(","),c(),e.getToken()===4&&b)break}else m&&i(6,[],[]);f?(u.push(0),f=!1):u[u.length-1]++,V()||i(4,[],[4,5]),m=!0}return U(),f||u.pop(),e.getToken()!==4?i(8,[4],[]):c(),!0}function V(){switch(e.getToken()){case 3:return y();case 1:return a();case 10:return F(!0);default:return E()}}return c(),e.getToken()===17?g.allowEmptyContent?!0:(i(4,[],[]),!1):V()?(e.getToken()!==17&&i(9,[],[]),!0):(i(4,[],[]),!1)}var ScanError;(function(n){n[n.None=0]="None",n[n.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",n[n.UnexpectedEndOfString=2]="UnexpectedEndOfString",n[n.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",n[n.InvalidUnicode=4]="InvalidUnicode",n[n.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",n[n.InvalidCharacter=6]="InvalidCharacter"})(ScanError||(ScanError={}));var SyntaxKind;(function(n){n[n.OpenBraceToken=1]="OpenBraceToken",n[n.CloseBraceToken=2]="CloseBraceToken",n[n.OpenBracketToken=3]="OpenBracketToken",n[n.CloseBracketToken=4]="CloseBracketToken",n[n.CommaToken=5]="CommaToken",n[n.ColonToken=6]="ColonToken",n[n.NullKeyword=7]="NullKeyword",n[n.TrueKeyword=8]="TrueKeyword",n[n.FalseKeyword=9]="FalseKeyword",n[n.StringLiteral=10]="StringLiteral",n[n.NumericLiteral=11]="NumericLiteral",n[n.LineCommentTrivia=12]="LineCommentTrivia",n[n.BlockCommentTrivia=13]="BlockCommentTrivia",n[n.LineBreakTrivia=14]="LineBreakTrivia",n[n.Trivia=15]="Trivia",n[n.Unknown=16]="Unknown",n[n.EOF=17]="EOF"})(SyntaxKind||(SyntaxKind={}));const parse=parse$1;var ParseErrorCode;(function(n){n[n.InvalidSymbol=1]="InvalidSymbol",n[n.InvalidNumberFormat=2]="InvalidNumberFormat",n[n.PropertyNameExpected=3]="PropertyNameExpected",n[n.ValueExpected=4]="ValueExpected",n[n.ColonExpected=5]="ColonExpected",n[n.CommaExpected=6]="CommaExpected",n[n.CloseBraceExpected=7]="CloseBraceExpected",n[n.CloseBracketExpected=8]="CloseBracketExpected",n[n.EndOfFileExpected=9]="EndOfFileExpected",n[n.InvalidCommentToken=10]="InvalidCommentToken",n[n.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",n[n.UnexpectedEndOfString=12]="UnexpectedEndOfString",n[n.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",n[n.InvalidUnicode=14]="InvalidUnicode",n[n.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",n[n.InLine truncated
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ScanFace = createLucideIcon("ScanFace", [
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
["path", { d: "M9 9h.01", key: "1q5me6" }],
["path", { d: "M15 9h.01", key: "x1ddxp" }]
]);
export { ScanFace as default };
//# sourceMappingURL=scan-face.js.map
@@ -0,0 +1,66 @@
2.7.0 / 2017-09-13
==================
* feat: support fs.copyFile (#58)
2.6.0 / 2016-11-22
==================
* Added fdatasync to fs api (#46)
2.5.0 / 2016-11-04
==================
* feat: support fs.mkdtemp
2.4.0 / 2016-03-23
==================
* add `fs.truncate()` [#34](https://github.com/normalize/mz/pull/34)
2.3.1 / 2016-02-01
==================
* update `any-promise@v1`
2.3.0 / 2016-01-30
==================
* feat(package): switch to `any-promise` to support more promise engines
2.2.0 / 2016-01-24
==================
* feat(package): add index.js to files
2.1.0 / 2015-10-15
==================
* support for readline library
2.0.0 / 2015-05-24
==================
* support callbacks as well
1.2.0 / 2014-12-16
==================
* refactor promisification to `thenify` and `thenify-all`
1.1.0 / 2014-11-14
==================
* use `graceful-fs` if available
1.0.1 / 2014-08-18
==================
* don't use `bluebird.promisify()` - unnecessarily wraps runtime errors, causing issues
1.0.0 / 2014-06-18
==================
* use `bluebird` by default if found
* support node 0.8
@@ -0,0 +1,85 @@
import { addUniqueItem, removeItem } from 'motion-utils';
class NodeStack {
constructor() {
this.members = [];
}
add(node) {
addUniqueItem(this.members, node);
for (let i = this.members.length - 1; i >= 0; i--) {
const member = this.members[i];
if (member === node || member === this.lead || member === this.prevLead)
continue;
const inst = member.instance;
if ((!inst || inst.isConnected === false) && !member.snapshot) {
removeItem(this.members, member);
member.unmount();
}
}
node.scheduleRender();
}
remove(node) {
removeItem(this.members, node);
if (node === this.prevLead)
this.prevLead = undefined;
if (node === this.lead) {
const prevLead = this.members[this.members.length - 1];
if (prevLead)
this.promote(prevLead);
}
}
relegate(node) {
for (let i = this.members.indexOf(node) - 1; i >= 0; i--) {
const member = this.members[i];
if (member.isPresent !== false && member.instance?.isConnected !== false) {
this.promote(member);
return true;
}
}
return false;
}
promote(node, preserveFollowOpacity) {
const prevLead = this.lead;
if (node === prevLead)
return;
this.prevLead = prevLead;
this.lead = node;
node.show();
if (prevLead) {
prevLead.updateSnapshot();
node.scheduleRender();
const { layoutDependency: prevDep } = prevLead.options;
const { layoutDependency: nextDep } = node.options;
if (prevDep === undefined || prevDep !== nextDep) {
node.resumeFrom = prevLead;
if (preserveFollowOpacity)
prevLead.preserveOpacity = true;
if (prevLead.snapshot) {
node.snapshot = prevLead.snapshot;
node.snapshot.latestValues =
prevLead.animationValues || prevLead.latestValues;
}
if (node.root?.isUpdating)
node.isLayoutDirty = true;
}
if (node.options.crossfade === false)
prevLead.hide();
}
}
exitAnimationComplete() {
this.members.forEach((member) => {
member.options.onExitComplete?.();
member.resumingFrom?.options.onExitComplete?.();
});
}
scheduleRender() {
this.members.forEach((member) => member.instance && member.scheduleRender(false));
}
removeLeadSnapshot() {
if (this.lead?.snapshot)
this.lead.snapshot = undefined;
}
}
export { NodeStack };
//# sourceMappingURL=stack.mjs.map
@@ -0,0 +1,79 @@
{
"name": "@radix-ui/react-use-size",
"version": "1.1.1",
"license": "MIT",
"source": "./src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"publishConfig": {
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
},
"files": [
"dist",
"README.md"
],
"sideEffects": false,
"scripts": {
"lint": "eslint --max-warnings 0 src",
"clean": "rm -rf dist",
"version": "yarn version"
},
"dependencies": {
"@radix-ui/react-use-layout-effect": "1.1.1"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
},
"devDependencies": {
"@repo/eslint-config": "0.0.0",
"@repo/typescript-config": "0.0.0",
"@types/react": "^19.0.7",
"@types/react-dom": "^19.0.3",
"@types/resize-observer-browser": "^0.1.4",
"eslint": "^9.18.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"typescript": "^5.7.3"
},
"homepage": "https://radix-ui.com/primitives",
"repository": {
"type": "git",
"url": "git+https://github.com/radix-ui/primitives.git"
},
"bugs": {
"url": "https://github.com/radix-ui/primitives/issues"
},
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"types": "./dist/index.d.ts"
}
@@ -0,0 +1,7 @@
import { RemoveScrollUIType, IRemoveScrollSelfProps } from './types';
export type { IRemoveScrollSelfProps, RemoveScrollUIType };
/**
* Removes scrollbar from the page and contain the scroll within the Lock
*/
declare const RemoveScroll: RemoveScrollUIType;
export { RemoveScroll };
@@ -0,0 +1,624 @@
export default `flf2a$ 6 6 9 -1 10
Cyrillic font by Tracy Schuhwerk (Tracy.Schuhwerk@sdrc.com).
November 15th, 1993 Version 1.0
I sacrificed the following symbols for Cyrillic letters:
"\\" (slash)
"/" (back slash)
"|" (pipe)
"~" (tilde)
"\`" (single quote)
">" (greater than)
@
@
@
@
@
@@
@
# @
# @
# @
@
# @@
@
# # @
# # @
@
@
@@
@
# # @
### @
# # @
### @
# # @@
@
## @
## @
### @
## @
## @@
@
# # @
# @
# @
# @
# # @@
@
# @
# @
## @
# # @
### @@
@
# @
# @
# @
@
@@
@
# @
# @
# @
# @
# @@
@
# @
# @
# @
# @
# @@
@
# @
### @
# @
### @
# @@
@
@
# @
### @
# @
@@
@
@
@
@
# @
# @@
@
@
@
### @
@
@@
@
@
@
@
@
# @@
@
# @
# @
## @
# # @
## @@
@
### @
# # @
# # @
# # @
### @@
@
# @
## @
# @
# @
### @@
@
### @
# @
### @
# @
### @@
@
### @
# @
## @
# @
### @@
@
# # @
# # @
### @
# @
# @@
@
### @
# @
### @
# @
### @@
@
### @
# @
### @
# # @
### @@
@
### @
# @
# @
# @
# @@
@
### @
# # @
### @
# # @
### @@
@
### @
# # @
### @
# @
### @@
@
@
# @
@
# @
@@
@
@
# @
@
# @
# @@
@
# @
# @
# @
# @
# @@
@
@
### @
@
### @
@@
@
# # # @
# ## @
# # # @
## # @
# # @@
@
### @
# @
## @
@
# @@
@
### @
# # @
# @
### @
@@
@
# @
# # @
##### @
# # @
# # @@
@
#### @
# @
#### @
# # @
##### @@
@
# # @
# # @
#### @
# @
# @@
@
##### @
# # @
# # @
#### @
# # @@
@
##### @
# @
#### @
# @
##### @@
@
# @
### @
# # # @
### @
# @@
@
##### @
# # @
# @
# @
# @@
@
# # @
# # @
# @
# # @
# # @@
@
# # @
# ## @
# # # @
## # @
# # @@
@
# # # @
### @
# @
### @
# # # @@
@
# # @
# # @
### @
# # @
# # @@
@
##### @
# # @
# # @
# # @
# # @@
@
# # @
## ## @
# # # @
# # @
# # @@
@
# # @
# # @
##### @
# # @
# # @@
@
### @
# # @
# # @
# # @
### @@
@
##### @
# # @
# # @
# # @
# # @@
@
# # @
# # @
# # @
##### @
# @@
@
#### @
# # @
#### @
# @
# @@
@
#### @
# @
# @
# @
#### @@
@
##### @
# @
# @
# @
# @@
@
# # @
# # @
# @
# @
# @@
@
#### @
# # @
#### @
# # @
#### @@
@
# # @
# # # @
# # # @
# # # @
### @@
@
# # @
# # # @
# # # @
# # # @
##### @@
@
#### @
# # @
#### @
# # @
# # @@
@
#### @
# @
### @
# @
#### @@
@
## @
# @
# @
# @
## @@
@
## @
# @
## @
# # @
## @@
@
## @
# @
# @
# @
## @@
@
# @
# # @
@
@
@@
@
@
@
@
@
### @@
@
# ## @
# # # @
### # @
# # # @
# ## @@
@
# @
# # @
##### @
# # @
# # @@
@
#### @
# @
#### @
# # @
##### @@
@
# # @
# # @
#### @
# @
# @@
@
##### @
# # @
# # @
#### @
# # @@
@
##### @
# @
#### @
# @
##### @@
@
# @
### @
# # # @
### @
# @@
@
##### @
# # @
# @
# @
# @@
@
# # @
# # @
# @
# # @
# # @@
@
# # @
# ## @
# # # @
## # @
# # @@
@
# # # @
### @
# @
### @
# # # @@
@
# # @
# # @
### @
# # @
# # @@
@
##### @
# # @
# # @
# # @
# # @@
@
# # @
## ## @
# # # @
# # @
# # @@
@
# # @
# # @
##### @
# # @
# # @@
@
### @
# # @
# # @
# # @
### @@
@
##### @
# # @
# # @
# # @
# # @@
@
# # @
# # @
# # @
##### @
# @@
@
#### @
# # @
#### @
# @
# @@
@
#### @
# @
# @
# @
#### @@
@
##### @
# @
# @
# @
# @@
@
# # @
# # @
# @
# @
# @@
@
#### @
# # @
#### @
# # @
#### @@
@
# # @
# # # @
# # # @
# # # @
### @@
@
# # @
# # # @
# # # @
# # # @
##### @@
@
#### @
# # @
#### @
# # @
# # @@
@
#### @
# @
### @
# @
#### @@
@
## @
# @
## @
# @
## @@
@
# # @
# # @
## # @
# # # @
## # @@
@
## @
# @
## @
# @
## @@
@
#### @
# @
##### @
# @
#### @@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
`
@@ -0,0 +1,401 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test("number factory checks", () => {
const schema = z.number({ checks: [z.gte(1), z.lte(3)] as const });
const chained = z.number().min(1).max(3);
expectTypeOf<z.output<typeof schema>>().toEqualTypeOf<number>();
for (const value of [0, 1, 3, 4, Number.NaN, "2", undefined]) {
expect(z.validate(schema, value)).toBe(z.validate(chained, value));
expect(schema.safeParse(value)).toEqual(chained.safeParse(value));
}
expect(z.toJSONSchema(schema)).toEqual(z.toJSONSchema(chained));
expect(schema.minValue).toBe(1);
expect(schema.maxValue).toBe(3);
expect(z.coerce.number({ checks: [z.gte(1)] }).parse("2")).toBe(2);
const overwritten = z.number({ checks: [z.overwrite<number>((value) => value + 1), z.gte(2)] });
expect(overwritten.parse(1)).toBe(2);
expect(z.validate(overwritten, 0)).toBe(false);
// @ts-expect-error length checks cannot validate numbers
z.number({ checks: [z.minLength(1)] });
});
test("number factory checks snapshot caller arrays", () => {
for (const factory of [z.number, z.coerce.number]) {
const checks = [z.gte(1)];
const schema = factory({ checks });
let reads = 0;
factory({
get checks() {
if (++reads > 1) throw new Error("checks read twice");
return checks;
},
});
expect(reads).toBe(1);
const before = z.toJSONSchema(schema);
checks.push(z.gte(10));
expect(z.validate(schema, 3)).toBe(true);
expect(z.validate(z.compile(schema), 3)).toBe(true);
expect(z.toJSONSchema(schema)).toEqual(before);
}
});
test("z.number() basic validation", () => {
const schema = z.number();
expect(schema.parse(1234)).toEqual(1234);
});
test("NaN validation", () => {
const schema = z.number();
expect(() => schema.parse(Number.NaN)).toThrow();
});
test("Infinity validation", () => {
const schema = z.number();
expect(schema.safeParse(Number.POSITIVE_INFINITY)).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"expected": "number",
"code": "invalid_type",
"received": "Infinity",
"path": [],
"message": "Invalid input: expected number, received Infinity"
}
]],
"success": false,
}
`);
expect(schema.safeParse(Number.NEGATIVE_INFINITY)).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"expected": "number",
"code": "invalid_type",
"received": "-Infinity",
"path": [],
"message": "Invalid input: expected number, received -Infinity"
}
]],
"success": false,
}
`);
});
test(".gt() validation", () => {
const schema = z.number().gt(0).gt(5);
expect(schema.parse(6)).toEqual(6);
expect(() => schema.parse(5)).toThrow();
});
test(".gte() validation", () => {
const schema = z.number().gt(0).gte(1).gte(5);
expect(schema.parse(5)).toEqual(5);
expect(() => schema.parse(4)).toThrow();
});
test(".min() validation", () => {
const schema = z.number().min(0).min(5);
expect(schema.parse(5)).toEqual(5);
expect(() => schema.parse(4)).toThrow();
});
test(".lt() validation", () => {
const schema = z.number().lte(10).lt(5);
expect(schema.parse(4)).toEqual(4);
expect(() => schema.parse(5)).toThrow();
});
test(".lte() validation", () => {
const schema = z.number().lte(10).lte(5);
expect(schema.parse(5)).toEqual(5);
expect(() => schema.parse(6)).toThrow();
});
test(".max() validation", () => {
const schema = z.number().max(10).max(5);
expect(schema.parse(5)).toEqual(5);
expect(() => schema.parse(6)).toThrow();
});
test(".int() validation", () => {
const schema = z.number().int();
expect(schema.parse(4)).toEqual(4);
expect(() => schema.parse(3.14)).toThrow();
});
test(".positive() validation", () => {
const schema = z.number().positive();
expect(schema.parse(1)).toEqual(1);
expect(() => schema.parse(0)).toThrow();
expect(() => schema.parse(-1)).toThrow();
});
test(".negative() validation", () => {
const schema = z.number().negative();
expect(schema.parse(-1)).toEqual(-1);
expect(() => schema.parse(0)).toThrow();
expect(() => schema.parse(1)).toThrow();
});
test(".nonpositive() validation", () => {
const schema = z.number().nonpositive();
expect(schema.parse(0)).toEqual(0);
expect(schema.parse(-1)).toEqual(-1);
expect(() => schema.parse(1)).toThrow();
});
test(".nonnegative() validation", () => {
const schema = z.number().nonnegative();
expect(schema.parse(0)).toEqual(0);
expect(schema.parse(1)).toEqual(1);
expect(() => schema.parse(-1)).toThrow();
});
test("multipleOf", () => {
const numbers = {
number3: 5.123,
number6: 5.123456,
number7: 5.1234567,
number8: 5.12345678,
};
const schemas = {
schema6: z.number().multipleOf(0.000001),
schema7: z.number().multipleOf(0.0000001),
};
expect(() => schemas.schema6.parse(numbers.number3)).not.toThrow();
expect(() => schemas.schema6.parse(numbers.number6)).not.toThrow();
expect(() => schemas.schema6.parse(numbers.number7)).toThrow();
expect(() => schemas.schema6.parse(numbers.number8)).toThrow();
expect(() => schemas.schema7.parse(numbers.number3)).not.toThrow();
expect(() => schemas.schema7.parse(numbers.number6)).not.toThrow();
expect(() => schemas.schema7.parse(numbers.number7)).not.toThrow();
expect(() => schemas.schema7.parse(numbers.number8)).toThrow();
});
test(".multipleOf() accepts exact decimal multiples", () => {
// 2.03 === 29 * 0.07, but the quotient lands 2 ULP below 29, so the old tolerance rejected it while the neighbouring multiples 1.96 and 2.10 passed.
const schema = z.number().multipleOf(0.07);
expect(schema.safeParse(2.03).success).toBe(true);
expect(schema.safeParse(4.06).success).toBe(true);
expect(schema.safeParse(8.54).success).toBe(true);
// genuine non-multiples must still be rejected
expect(schema.safeParse(2.04).success).toBe(false);
});
test(".multipleOf() with positive divisor", () => {
const schema = z.number().multipleOf(5);
expect(schema.parse(15)).toEqual(15);
expect(schema.parse(-15)).toEqual(-15);
expect(() => schema.parse(7.5)).toThrow();
expect(() => schema.parse(-7.5)).toThrow();
});
test(".multipleOf() with negative divisor", () => {
const schema = z.number().multipleOf(-5);
expect(schema.parse(-15)).toEqual(-15);
expect(schema.parse(15)).toEqual(15);
expect(() => schema.parse(-7.5)).toThrow();
expect(() => schema.parse(7.5)).toThrow();
});
test(".multipleOf() with scientific notation (multi-digit exponents)", () => {
// Regression test for https://github.com/colinhacks/zod/pull/5687 — the regex was using \d? which only matches single-digit exponents
const schema = z.number().multipleOf(1e-10);
// These should all pass - they are valid multiples of 1e-10
expect(schema.parse(1e-10)).toEqual(1e-10);
expect(schema.parse(5e-10)).toEqual(5e-10);
expect(schema.parse(1e-9)).toEqual(1e-9); // 10 * 1e-10
// Test with 1e-15 (exponent = 15, two digits)
const schema15 = z.number().multipleOf(1e-15);
expect(schema15.parse(1e-15)).toEqual(1e-15);
expect(schema15.parse(3e-15)).toEqual(3e-15);
});
test(".multipleOf() with small floats / scientific notation (#5792)", () => {
const schema = z.number().multipleOf(1e-7);
// Valid multiples (integer * 1e-7)
expect(schema.safeParse(0).success).toBe(true);
expect(schema.safeParse(1e-7).success).toBe(true);
expect(schema.safeParse(2e-7).success).toBe(true);
expect(schema.safeParse(3e-7).success).toBe(true);
// Invalid — 2.5 and 1.5 are not integers
expect(schema.safeParse(2.5e-7).success).toBe(false);
expect(schema.safeParse(1.5e-7).success).toBe(false);
});
test(".step() validation", () => {
const schemaPointOne = z.number().step(0.1);
const schemaPointZeroZeroZeroOne = z.number().step(0.0001);
const schemaSixPointFour = z.number().step(6.4);
expect(schemaPointOne.parse(6)).toEqual(6);
expect(schemaPointOne.parse(6.1)).toEqual(6.1);
expect(schemaSixPointFour.parse(12.8)).toEqual(12.8);
expect(schemaPointZeroZeroZeroOne.parse(3.01)).toEqual(3.01);
expect(() => schemaPointOne.parse(6.11)).toThrow();
expect(() => schemaPointOne.parse(6.1000000001)).toThrow();
expect(() => schemaSixPointFour.parse(6.41)).toThrow();
});
test(".finite() validation", () => {
const schema = z.number().finite();
expect(schema.parse(123)).toEqual(123);
expect(schema.safeParse(Number.POSITIVE_INFINITY)).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"expected": "number",
"code": "invalid_type",
"received": "Infinity",
"path": [],
"message": "Invalid input: expected number, received Infinity"
}
]],
"success": false,
}
`);
expect(schema.safeParse(Number.NEGATIVE_INFINITY)).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"expected": "number",
"code": "invalid_type",
"received": "-Infinity",
"path": [],
"message": "Invalid input: expected number, received -Infinity"
}
]],
"success": false,
}
`);
});
test(".safe() validation", () => {
const schema = z.number().safe();
expect(schema.parse(Number.MIN_SAFE_INTEGER)).toEqual(Number.MIN_SAFE_INTEGER);
expect(schema.parse(Number.MAX_SAFE_INTEGER)).toEqual(Number.MAX_SAFE_INTEGER);
expect(() => schema.parse(Number.MIN_SAFE_INTEGER - 1)).toThrow();
expect(() => schema.parse(Number.MAX_SAFE_INTEGER + 1)).toThrow();
});
test("min value getters", () => {
expect(z.number().minValue).toBeNull;
expect(z.number().lt(5).minValue).toBeNull;
expect(z.number().lte(5).minValue).toBeNull;
expect(z.number().max(5).minValue).toBeNull;
expect(z.number().negative().minValue).toBeNull;
expect(z.number().nonpositive().minValue).toBeNull;
expect(z.number().int().minValue).toBeNull;
expect(z.number().multipleOf(5).minValue).toBeNull;
expect(z.number().finite().minValue).toBeNull;
expect(z.number().gt(5).minValue).toEqual(5);
expect(z.number().gte(5).minValue).toEqual(5);
expect(z.number().min(5).minValue).toEqual(5);
expect(z.number().min(5).min(10).minValue).toEqual(10);
expect(z.number().positive().minValue).toEqual(0);
expect(z.number().nonnegative().minValue).toEqual(0);
expect(z.number().safe().minValue).toEqual(Number.MIN_SAFE_INTEGER);
});
test("max value getters", () => {
expect(z.number().maxValue).toBeNull;
expect(z.number().gt(5).maxValue).toBeNull;
expect(z.number().gte(5).maxValue).toBeNull;
expect(z.number().min(5).maxValue).toBeNull;
expect(z.number().positive().maxValue).toBeNull;
expect(z.number().nonnegative().maxValue).toBeNull;
expect(z.number().int().minValue).toBeNull;
expect(z.number().multipleOf(5).minValue).toBeNull;
expect(z.number().finite().minValue).toBeNull;
expect(z.number().lt(5).maxValue).toEqual(5);
expect(z.number().lte(5).maxValue).toEqual(5);
expect(z.number().max(5).maxValue).toEqual(5);
expect(z.number().max(5).max(1).maxValue).toEqual(1);
expect(z.number().negative().maxValue).toEqual(0);
expect(z.number().nonpositive().maxValue).toEqual(0);
expect(z.number().safe().maxValue).toEqual(Number.MAX_SAFE_INTEGER);
});
test("int getter", () => {
expect(z.number().isInt).toEqual(false);
expect(z.number().int().isInt).toEqual(true);
expect(z.number().safe().isInt).toEqual(true);
expect(z.number().multipleOf(5).isInt).toEqual(true);
});
/** In Zod 4, number schemas don't accept infinite values. */
test("finite getter", () => {
expect(z.number().isFinite).toEqual(true);
});
test("string format methods", () => {
const a = z.int32().min(5);
expect(a.parse(6)).toEqual(6);
expect(() => a.parse(1)).toThrow();
});
test("negative zero edge case", () => {
const schema = z.number();
const negativeZero = -0;
const positiveZero = 0;
// Both -0 and 0 should be valid (parse succeeds)
expect(schema.safeParse(negativeZero).success).toBe(true);
expect(schema.safeParse(positiveZero).success).toBe(true);
// Note: -0 is normalized to 0 after parsing
expect(schema.parse(negativeZero) === 0).toBe(true);
expect(schema.parse(positiveZero)).toEqual(0);
// With positive() constraint, both should be invalid (0 is not positive)
const positiveSchema = z.number().positive();
expect(() => positiveSchema.parse(negativeZero)).toThrow();
expect(() => positiveSchema.parse(positiveZero)).toThrow();
// With nonnegative(), both should be valid (0 is non-negative)
const nonnegativeSchema = z.number().nonnegative();
expect(nonnegativeSchema.safeParse(negativeZero).success).toBe(true);
expect(nonnegativeSchema.safeParse(positiveZero).success).toBe(true);
expect(nonnegativeSchema.parse(negativeZero) === 0).toBe(true);
expect(nonnegativeSchema.parse(positiveZero)).toEqual(0);
});
test("error customization", () => {
z.number().gte(5, { error: (iss) => "Min: " + iss.minimum.valueOf() });
z.number().lte(5, { error: (iss) => "Max: " + iss.maximum.valueOf() });
});
test("number formats are distinct at the type level", () => {
expectTypeOf(z.int()._zod.def.format).toEqualTypeOf<"safeint">();
expectTypeOf(z.int32()._zod.def.format).toEqualTypeOf<"int32">();
expectTypeOf(z.uint32()._zod.def.format).toEqualTypeOf<"uint32">();
expectTypeOf(z.float32()._zod.def.format).toEqualTypeOf<"float32">();
expectTypeOf(z.float64()._zod.def.format).toEqualTypeOf<"float64">();
z.int() satisfies z.ZodNumberFormat;
z.int() satisfies z.ZodNumber;
// @ts-expect-error a float32 schema is not a ZodInt
z.float32() satisfies z.ZodInt;
// @ts-expect-error a uint32 schema is not a ZodInt32
z.uint32() satisfies z.ZodInt32;
// the point of the distinction: dispatching on the schema type in a conditional type
type Sql<T> = T extends z.ZodUInt32
? "BIGINT"
: T extends z.ZodInt32
? "INTEGER"
: T extends z.ZodFloat32
? "REAL"
: never;
expectTypeOf<Sql<z.ZodUInt32>>().toEqualTypeOf<"BIGINT">();
expectTypeOf<Sql<z.ZodInt32>>().toEqualTypeOf<"INTEGER">();
expectTypeOf<Sql<z.ZodFloat32>>().toEqualTypeOf<"REAL">();
});
@@ -0,0 +1,23 @@
/**
* @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 FolderInput = createLucideIcon("FolderInput", [
[
"path",
{
d: "M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",
key: "fm4g5t"
}
],
["path", { d: "M2 13h10", key: "pgb2dq" }],
["path", { d: "m9 16 3-3-3-3", key: "6m91ic" }]
]);
export { FolderInput as default };
//# sourceMappingURL=folder-input.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,YAAY,EAAE,MAAM,aAAa,CAAC;AASlE,wCAAwC;AACxC,oBAAY,WAAW;IACnB,iCAAiC;IACjC,GAAG,IAAI;IACP,mEAAmE;IACnE,IAAI,IAAI;CACX;AAED,oBAAY,YAAY;IACpB;;;OAGG;IACH,IAAI,IAAA;IACJ;;;;OAIG;IACH,KAAK,IAAA;IACL;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,IAAI,IAAA;CACP;AAED,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CASR;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAKR;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAkBR;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,UAAU,EACV,kBAAkB,EAElB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EAEnB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"}
@@ -0,0 +1 @@
{"version":3,"file":"requestBody.js","sourceRoot":"","sources":["../../../src/server/requestBody.ts"],"names":[],"mappings":";;;AAOA,gEAEC;AAOD,8DAQC;AAQD,0CA8BC;AA9DD,8FAA8F;AACjF,QAAA,6BAA6B,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7D,kFAAkF;AACrE,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC,wEAAwE;AACxE,SAAgB,0BAA0B,CAAC,QAAgB;IACvD,OAAO,mDAAmD,QAAQ,QAAQ,CAAC;AAC/E,CAAC;AAED;;;;GAIG;AACH,SAAgB,yBAAyB,CAAC,KAAyB;IAC/D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,qCAA6B,CAAC;IACzC,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QACrE,MAAM,IAAI,UAAU,CAAC,8DAA8D,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACxG,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,eAAe,CACjC,OAAgB,EAChB,WAAmB,qCAA6B;IAEhD,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAC;QAC3D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC9B,CAAC;IACD,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IACzC,CAAC;IACD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;IACxC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,IAAI,CAAC;QACD,SAAS,CAAC;YACN,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YAC5C,IAAI,IAAI,EAAE,CAAC;gBACP,MAAM;YACV,CAAC;YACD,QAAQ,IAAI,KAAK,CAAC,UAAU,CAAC;YAC7B,IAAI,QAAQ,GAAG,QAAQ,EAAE,CAAC;gBACtB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC9B,CAAC;YACD,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QACpD,CAAC;IACL,CAAC;YAAS,CAAC;QACP,MAAM,CAAC,WAAW,EAAE,CAAC;IACzB,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,27 @@
/**
* @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 FileVolume = createLucideIcon("FileVolume", [
["path", { d: "M11 11a5 5 0 0 1 0 6", key: "193qb2" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
[
"path",
{ d: "M4 6.765V4a2 2 0 0 1 2-2h9l5 5v13a2 2 0 0 1-2 2H6a2 2 0 0 1-.93-.23", key: "ifyjnl" }
],
[
"path",
{
d: "M7 10.51a.5.5 0 0 0-.826-.38l-1.893 1.628A1 1 0 0 1 3.63 12H2.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h1.129a1 1 0 0 1 .652.242l1.893 1.63a.5.5 0 0 0 .826-.38z",
key: "mk8rxu"
}
]
]);
export { FileVolume as default };
//# sourceMappingURL=file-volume.js.map
@@ -0,0 +1,307 @@
import { createPlugin } from 'seroval'
import { GLOBAL_TSR } from '../constants'
import type { Plugin, PluginInfo, SerovalNode } from 'seroval'
import type {
RegisteredConfigType,
RegisteredSsr,
SSROption,
} from '../../router'
import type { LooseReturnType } from '../../utils'
import type { AnyRoute, ResolveAllSSR } from '../../route'
import type { RawStream } from './RawStream'
declare const TSR_SERIALIZABLE: unique symbol
export type TSR_SERIALIZABLE = typeof TSR_SERIALIZABLE
export type TsrSerializable = { [TSR_SERIALIZABLE]: true }
export interface DefaultSerializable {
number: number
string: string
boolean: boolean
null: null
undefined: undefined
bigint: bigint
Date: Date
Uint8Array: Uint8Array
RawStream: RawStream
TsrSerializable: TsrSerializable
void: void
}
export interface SerializableExtensions extends DefaultSerializable {}
export type Serializable = SerializableExtensions[keyof SerializableExtensions]
export type UnionizeSerializationAdaptersInput<
TAdapters extends ReadonlyArray<AnySerializationAdapter>,
> = TAdapters[number]['~types']['input']
/**
* Create a strongly-typed serialization adapter for SSR hydration.
* Use to register custom types with the router serializer.
*/
export function createSerializationAdapter<
TInput = unknown,
TOutput = unknown,
const TExtendsAdapters extends
| ReadonlyArray<AnySerializationAdapter>
| never = never,
>(
opts: CreateSerializationAdapterOptions<TInput, TOutput, TExtendsAdapters>,
): SerializationAdapter<TInput, TOutput, TExtendsAdapters> {
return opts as unknown as SerializationAdapter<
TInput,
TOutput,
TExtendsAdapters
>
}
export interface CreateSerializationAdapterOptions<
TInput,
TOutput,
TExtendsAdapters extends ReadonlyArray<AnySerializationAdapter> | never,
> {
key: string
extends?: TExtendsAdapters
test: (value: unknown) => value is TInput
toSerializable: (
value: TInput,
) => ValidateSerializable<
TOutput,
Serializable | UnionizeSerializationAdaptersInput<TExtendsAdapters>
>
fromSerializable: (value: TOutput) => TInput
}
export type ValidateSerializable<T, TSerializable> = T extends TSerializable
? T
: T extends (...args: Array<any>) => any
? SerializationError<'Function may not be serializable'>
: T extends RegisteredReadableStream
? SerializationError<'JSX is not be serializable'>
: T extends ReadonlyArray<any>
? ValidateSerializableArray<T, TSerializable>
: T extends Promise<any>
? ValidateSerializablePromise<T, TSerializable>
: T extends ReadableStream<any>
? ValidateReadableStream<T, TSerializable>
: T extends Set<any>
? ValidateSerializableSet<T, TSerializable>
: T extends Map<any, any>
? ValidateSerializableMap<T, TSerializable>
: T extends AsyncGenerator<any, any>
? ValidateSerializableAsyncGenerator<T, TSerializable>
: T extends object
? ValidateSerializableMapped<T, TSerializable>
: SerializationError<'Type may not be serializable'>
export type ValidateSerializableAsyncGenerator<T, TSerializable> =
T extends AsyncGenerator<infer T, infer TReturn, infer TNext>
? AsyncGenerator<
ValidateSerializable<T, TSerializable>,
ValidateSerializable<TReturn, TSerializable>,
TNext
>
: never
export type ValidateSerializablePromise<T, TSerializable> =
T extends Promise<infer TAwaited>
? Promise<ValidateSerializable<TAwaited, TSerializable>>
: never
export type ValidateReadableStream<T, TSerializable> =
T extends ReadableStream<infer TStreamed>
? ReadableStream<ValidateSerializable<TStreamed, TSerializable>>
: never
export type ValidateSerializableSet<T, TSerializable> =
T extends Set<infer TItem>
? Set<ValidateSerializable<TItem, TSerializable>>
: never
export type ValidateSerializableMap<T, TSerializable> =
T extends Map<infer TKey, infer TValue>
? Map<
ValidateSerializable<TKey, TSerializable>,
ValidateSerializable<TValue, TSerializable>
>
: never
export type ValidateSerializableArray<T, TSerializable> = T extends readonly [
any,
...Array<any>,
]
? ValidateSerializableMapped<T, TSerializable>
: T extends Array<infer U>
? Array<ValidateSerializable<U, TSerializable>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<ValidateSerializable<U, TSerializable>>
: never
export type ValidateSerializableMapped<T, TSerializable> = {
[K in keyof T]: ValidateSerializable<T[K], TSerializable>
}
const SERIALIZATION_ERROR = Symbol.for('TSR_SERIALIZATION_ERROR')
export interface SerializationError<in out TMessage extends string> {
[SERIALIZATION_ERROR]: TMessage
}
export interface SerializationAdapter<
TInput,
TOutput,
TExtendsAdapters extends ReadonlyArray<AnySerializationAdapter>,
> {
'~types': SerializationAdapterTypes<TInput, TOutput, TExtendsAdapters>
key: string
extends?: TExtendsAdapters
test: (value: unknown) => value is TInput
toSerializable: (value: TInput) => TOutput
fromSerializable: (value: TOutput) => TInput
}
export interface SerializationAdapterTypes<
TInput,
TOutput,
TExtendsAdapters extends ReadonlyArray<AnySerializationAdapter>,
> {
input: TInput | UnionizeSerializationAdaptersInput<TExtendsAdapters>
output: TOutput
extends: TExtendsAdapters
}
export type AnySerializationAdapter = SerializationAdapter<any, any, any>
export interface AdapterNode extends PluginInfo {
v: SerovalNode
}
/** Create a Seroval plugin for server-side serialization only. */
/* @__NO_SIDE_EFFECTS__ */
export function makeSsrSerovalPlugin(
serializationAdapter: AnySerializationAdapter,
options: { didRun: boolean },
): Plugin<any, AdapterNode> {
return /* @__PURE__ */ createPlugin<any, AdapterNode>({
tag: '$TSR/t/' + serializationAdapter.key,
test: serializationAdapter.test,
parse: {
stream(value, ctx, _data) {
return {
v: ctx.parse(serializationAdapter.toSerializable(value)),
}
},
},
serialize(node, ctx, _data) {
options.didRun = true
return (
GLOBAL_TSR +
'.t.get("' +
serializationAdapter.key +
'")(' +
ctx.serialize(node.v) +
')'
)
},
// we never deserialize on the server during SSR
deserialize: undefined as never,
})
}
/** Create a Seroval plugin for client/server symmetric (de)serialization. */
/* @__NO_SIDE_EFFECTS__ */
export function makeSerovalPlugin(
serializationAdapter: AnySerializationAdapter,
): Plugin<any, AdapterNode> {
return /* @__PURE__ */ createPlugin<any, AdapterNode>({
tag: '$TSR/t/' + serializationAdapter.key,
test: serializationAdapter.test,
parse: {
sync(value, ctx, _data) {
return {
v: ctx.parse(serializationAdapter.toSerializable(value)),
}
},
async async(value, ctx, _data) {
return {
v: await ctx.parse(serializationAdapter.toSerializable(value)),
}
},
stream(value, ctx, _data) {
return {
v: ctx.parse(serializationAdapter.toSerializable(value)),
}
},
},
// we don't generate JS code outside of SSR (for now)
serialize: undefined as never,
deserialize(node, ctx, _data) {
return serializationAdapter.fromSerializable(ctx.deserialize(node.v))
},
})
}
export type ValidateSerializableInput<TRegister, T> = ValidateSerializable<
T,
RegisteredSerializableInput<TRegister>
>
export type RegisteredSerializableInput<TRegister> =
| (unknown extends RegisteredSerializationAdapters<TRegister>
? never
: RegisteredSerializationAdapters<TRegister> extends ReadonlyArray<AnySerializationAdapter>
? RegisteredSerializationAdapters<TRegister>[number]['~types']['input']
: never)
| Serializable
export type RegisteredSerializationAdapters<TRegister> = RegisteredConfigType<
TRegister,
'serializationAdapters'
>
export type RegisteredSSROption<TRegister> =
unknown extends RegisteredConfigType<TRegister, 'defaultSsr'>
? SSROption
: RegisteredConfigType<TRegister, 'defaultSsr'>
export type ValidateSerializableLifecycleResult<
TRegister,
TParentRoute extends AnyRoute,
TSSR,
TFn,
> =
false extends RegisteredSsr<TRegister>
? any
: ValidateSerializableLifecycleResultSSR<
TRegister,
TParentRoute,
TSSR,
TFn
> extends infer TInput
? TInput
: never
export type ValidateSerializableLifecycleResultSSR<
TRegister,
TParentRoute extends AnyRoute,
TSSR,
TFn,
> =
ResolveAllSSR<TParentRoute, TSSR> extends false
? any
: RegisteredSSROption<TRegister> extends false
? any
: ValidateSerializableInput<TRegister, LooseReturnType<TFn>>
export type RegisteredReadableStream =
unknown extends SerializerExtensions['ReadableStream']
? never
: SerializerExtensions['ReadableStream']
export interface DefaultSerializerExtensions {
ReadableStream: unknown
}
export interface SerializerExtensions extends DefaultSerializerExtensions {}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_A","2":"_Z"},B:{"1":"_I","322":"_K"},C:{"2":"_ZI","194":"_uO"},D:{"2":"_3J","322":"_FK"},E:{"1":"_jB","2":"_4C"},F:{"2":"_PM","322":"_8J"},G:{"1":"_2","2":"_r"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_D","322":"H"},L:{"322":"I"},M:{"2":"YC"},N:{"1":"_A"},O:{"322":"bC"},P:{"2":"_F"},Q:{"322":"JE"},R:{"322":"KE"},S:{"194":"_C"}},B:1,C:"Audio Tracks",D:true};
@@ -0,0 +1,89 @@
import type { Parser, Handler } from "../Parser.js";
interface Event {
$event: string;
data: unknown[];
startIndex: number;
endIndex: number;
}
/**
* Creates a handler that calls the supplied callback with simplified events on
* completion.
*
* @internal
* @param callback Function to call with all events.
*/
export function getEventCollector(
callback: (error: Error | null, events?: Event[]) => void,
): Partial<Handler> {
const events: Event[] = [];
let parser: Parser;
function handle(event: string, data: unknown[]): void {
switch (event) {
case "onerror": {
callback(data[0] as Error);
break;
}
case "onend": {
callback(null, events);
break;
}
case "onreset": {
events.length = 0;
break;
}
case "onparserinit": {
parser = data[0] as Parser;
// Don't collect event
break;
}
default: {
// eslint-disable-next-line unicorn/prefer-at
const last = events[events.length - 1];
// Combine text nodes
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (event === "ontext" && last && last.$event === "text") {
(last.data[0] as string) += data[0];
last.endIndex = parser.endIndex;
break;
}
// Remove `undefined`s from attribute responses, as they cannot be represented in JSON.
if (event === "onattribute" && data[2] === undefined) {
data.pop();
}
if (!(parser.startIndex <= parser.endIndex)) {
throw new Error(
`Invalid start/end index ${parser.startIndex} > ${parser.endIndex}`,
);
}
events.push({
$event: event.slice(2),
startIndex: parser.startIndex,
endIndex: parser.endIndex,
data,
});
}
}
}
return new Proxy(
{},
{
get:
(_, event: string) =>
(...data: unknown[]) =>
handle(event, data),
},
);
}
@@ -0,0 +1,40 @@
import { JSONRPCMessageSchema } from '../types.js';
export const STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
/**
* Buffers a continuous stdio stream into discrete JSON-RPC messages.
*/
export class ReadBuffer {
constructor(options) {
this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
}
append(chunk) {
const newSize = (this._buffer?.length ?? 0) + chunk.length;
if (newSize > this._maxBufferSize) {
this.clear();
throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
}
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
}
readMessage() {
if (!this._buffer) {
return null;
}
const index = this._buffer.indexOf('\n');
if (index === -1) {
return null;
}
const line = this._buffer.toString('utf8', 0, index).replace(/\r$/, '');
this._buffer = this._buffer.subarray(index + 1);
return deserializeMessage(line);
}
clear() {
this._buffer = undefined;
}
}
export function deserializeMessage(line) {
return JSONRPCMessageSchema.parse(JSON.parse(line));
}
export function serializeMessage(message) {
return JSON.stringify(message) + '\n';
}
//# sourceMappingURL=stdio.js.map
@@ -0,0 +1,22 @@
{
"name": "js-tokens",
"version": "10.0.0",
"author": "Simon Lydell",
"license": "MIT",
"description": "Tiny JavaScript tokenizer.",
"repository": "lydell/js-tokens",
"type": "module",
"exports": "./index.js",
"keywords": [
"JavaScript",
"js",
"ECMAScript",
"es",
"token",
"tokens",
"tokenize",
"tokenizer",
"regex",
"regexp"
]
}
@@ -0,0 +1,92 @@
import { Plugin, PluginInfo, SerovalNode } from 'seroval';
import { RegisteredConfigType, RegisteredSsr, SSROption } from '../../router.js';
import { LooseReturnType } from '../../utils.js';
import { AnyRoute, ResolveAllSSR } from '../../route.js';
import { RawStream } from './RawStream.js';
declare const TSR_SERIALIZABLE: unique symbol;
export type TSR_SERIALIZABLE = typeof TSR_SERIALIZABLE;
export type TsrSerializable = {
[TSR_SERIALIZABLE]: true;
};
export interface DefaultSerializable {
number: number;
string: string;
boolean: boolean;
null: null;
undefined: undefined;
bigint: bigint;
Date: Date;
Uint8Array: Uint8Array;
RawStream: RawStream;
TsrSerializable: TsrSerializable;
void: void;
}
export interface SerializableExtensions extends DefaultSerializable {
}
export type Serializable = SerializableExtensions[keyof SerializableExtensions];
export type UnionizeSerializationAdaptersInput<TAdapters extends ReadonlyArray<AnySerializationAdapter>> = TAdapters[number]['~types']['input'];
/**
* Create a strongly-typed serialization adapter for SSR hydration.
* Use to register custom types with the router serializer.
*/
export declare function createSerializationAdapter<TInput = unknown, TOutput = unknown, const TExtendsAdapters extends ReadonlyArray<AnySerializationAdapter> | never = never>(opts: CreateSerializationAdapterOptions<TInput, TOutput, TExtendsAdapters>): SerializationAdapter<TInput, TOutput, TExtendsAdapters>;
export interface CreateSerializationAdapterOptions<TInput, TOutput, TExtendsAdapters extends ReadonlyArray<AnySerializationAdapter> | never> {
key: string;
extends?: TExtendsAdapters;
test: (value: unknown) => value is TInput;
toSerializable: (value: TInput) => ValidateSerializable<TOutput, Serializable | UnionizeSerializationAdaptersInput<TExtendsAdapters>>;
fromSerializable: (value: TOutput) => TInput;
}
export type ValidateSerializable<T, TSerializable> = T extends TSerializable ? T : T extends (...args: Array<any>) => any ? SerializationError<'Function may not be serializable'> : T extends RegisteredReadableStream ? SerializationError<'JSX is not be serializable'> : T extends ReadonlyArray<any> ? ValidateSerializableArray<T, TSerializable> : T extends Promise<any> ? ValidateSerializablePromise<T, TSerializable> : T extends ReadableStream<any> ? ValidateReadableStream<T, TSerializable> : T extends Set<any> ? ValidateSerializableSet<T, TSerializable> : T extends Map<any, any> ? ValidateSerializableMap<T, TSerializable> : T extends AsyncGenerator<any, any> ? ValidateSerializableAsyncGenerator<T, TSerializable> : T extends object ? ValidateSerializableMapped<T, TSerializable> : SerializationError<'Type may not be serializable'>;
export type ValidateSerializableAsyncGenerator<T, TSerializable> = T extends AsyncGenerator<infer T, infer TReturn, infer TNext> ? AsyncGenerator<ValidateSerializable<T, TSerializable>, ValidateSerializable<TReturn, TSerializable>, TNext> : never;
export type ValidateSerializablePromise<T, TSerializable> = T extends Promise<infer TAwaited> ? Promise<ValidateSerializable<TAwaited, TSerializable>> : never;
export type ValidateReadableStream<T, TSerializable> = T extends ReadableStream<infer TStreamed> ? ReadableStream<ValidateSerializable<TStreamed, TSerializable>> : never;
export type ValidateSerializableSet<T, TSerializable> = T extends Set<infer TItem> ? Set<ValidateSerializable<TItem, TSerializable>> : never;
export type ValidateSerializableMap<T, TSerializable> = T extends Map<infer TKey, infer TValue> ? Map<ValidateSerializable<TKey, TSerializable>, ValidateSerializable<TValue, TSerializable>> : never;
export type ValidateSerializableArray<T, TSerializable> = T extends readonly [
any,
...Array<any>
] ? ValidateSerializableMapped<T, TSerializable> : T extends Array<infer U> ? Array<ValidateSerializable<U, TSerializable>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<ValidateSerializable<U, TSerializable>> : never;
export type ValidateSerializableMapped<T, TSerializable> = {
[K in keyof T]: ValidateSerializable<T[K], TSerializable>;
};
declare const SERIALIZATION_ERROR: unique symbol;
export interface SerializationError<in out TMessage extends string> {
[SERIALIZATION_ERROR]: TMessage;
}
export interface SerializationAdapter<TInput, TOutput, TExtendsAdapters extends ReadonlyArray<AnySerializationAdapter>> {
'~types': SerializationAdapterTypes<TInput, TOutput, TExtendsAdapters>;
key: string;
extends?: TExtendsAdapters;
test: (value: unknown) => value is TInput;
toSerializable: (value: TInput) => TOutput;
fromSerializable: (value: TOutput) => TInput;
}
export interface SerializationAdapterTypes<TInput, TOutput, TExtendsAdapters extends ReadonlyArray<AnySerializationAdapter>> {
input: TInput | UnionizeSerializationAdaptersInput<TExtendsAdapters>;
output: TOutput;
extends: TExtendsAdapters;
}
export type AnySerializationAdapter = SerializationAdapter<any, any, any>;
export interface AdapterNode extends PluginInfo {
v: SerovalNode;
}
/** Create a Seroval plugin for server-side serialization only. */
export declare function makeSsrSerovalPlugin(serializationAdapter: AnySerializationAdapter, options: {
didRun: boolean;
}): Plugin<any, AdapterNode>;
/** Create a Seroval plugin for client/server symmetric (de)serialization. */
export declare function makeSerovalPlugin(serializationAdapter: AnySerializationAdapter): Plugin<any, AdapterNode>;
export type ValidateSerializableInput<TRegister, T> = ValidateSerializable<T, RegisteredSerializableInput<TRegister>>;
export type RegisteredSerializableInput<TRegister> = (unknown extends RegisteredSerializationAdapters<TRegister> ? never : RegisteredSerializationAdapters<TRegister> extends ReadonlyArray<AnySerializationAdapter> ? RegisteredSerializationAdapters<TRegister>[number]['~types']['input'] : never) | Serializable;
export type RegisteredSerializationAdapters<TRegister> = RegisteredConfigType<TRegister, 'serializationAdapters'>;
export type RegisteredSSROption<TRegister> = unknown extends RegisteredConfigType<TRegister, 'defaultSsr'> ? SSROption : RegisteredConfigType<TRegister, 'defaultSsr'>;
export type ValidateSerializableLifecycleResult<TRegister, TParentRoute extends AnyRoute, TSSR, TFn> = false extends RegisteredSsr<TRegister> ? any : ValidateSerializableLifecycleResultSSR<TRegister, TParentRoute, TSSR, TFn> extends infer TInput ? TInput : never;
export type ValidateSerializableLifecycleResultSSR<TRegister, TParentRoute extends AnyRoute, TSSR, TFn> = ResolveAllSSR<TParentRoute, TSSR> extends false ? any : RegisteredSSROption<TRegister> extends false ? any : ValidateSerializableInput<TRegister, LooseReturnType<TFn>>;
export type RegisteredReadableStream = unknown extends SerializerExtensions['ReadableStream'] ? never : SerializerExtensions['ReadableStream'];
export interface DefaultSerializerExtensions {
ReadableStream: unknown;
}
export interface SerializerExtensions extends DefaultSerializerExtensions {
}
export {};
@@ -0,0 +1 @@
{"version":3,"file":"feedback.mjs","sources":["../../../src/matcher/separator/feedback.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA,uBAAe,MAAK;AAClB;AACA,EAAA,OAAO,IAAI;AACb,CAAC;;;;"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const react = require("react");
const withSelector = require("use-sync-external-store/shim/with-selector");
function defaultCompare(a, b) {
return a === b;
}
function useStore(atom, selector, compare = defaultCompare) {
const subscribe = react.useCallback(
(handleStoreChange) => {
if (!atom) {
return () => {
};
}
const { unsubscribe } = atom.subscribe(handleStoreChange);
return unsubscribe;
},
[atom]
);
const boundGetSnapshot = react.useCallback(() => atom?.get(), [atom]);
const selectedSnapshot = withSelector.useSyncExternalStoreWithSelector(
subscribe,
boundGetSnapshot,
boundGetSnapshot,
selector,
compare
);
return selectedSnapshot;
}
exports.useStore = useStore;
//# sourceMappingURL=useStore.cjs.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"2":"_S"},D:{"1":"_GK","2":"_MI","194":"_HJ _oC"},E:{"2":"_R"},F:{"1":"_8L","2":"_VK"},G:{"2":"_M"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"2":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"2":"_C"}},B:4,C:"Gyroscope",D:true};
@@ -0,0 +1,44 @@
//#region src/manifest.ts
function getAssetCrossOrigin(assetCrossOrigin, kind) {
if (!assetCrossOrigin) return;
if (typeof assetCrossOrigin === "string") return assetCrossOrigin;
return assetCrossOrigin[kind];
}
function resolveManifestAssetLink(link) {
if (typeof link === "string") return {
href: link,
crossOrigin: void 0
};
return link;
}
function getStylesheetHref(asset) {
if (asset.tag !== "link") return void 0;
const rel = asset.attrs?.rel;
const href = asset.attrs?.href;
if (typeof href !== "string") return void 0;
if (!(typeof rel === "string" ? rel.split(/\s+/) : []).includes("stylesheet")) return void 0;
return href;
}
function isInlinableStylesheet(manifest, asset) {
const href = getStylesheetHref(asset);
return !!href && manifest?.inlineCss?.styles[href] !== void 0;
}
function createInlineCssStyleAsset(css) {
return {
tag: "style",
attrs: { suppressHydrationWarning: true },
inlineCss: true,
children: css
};
}
function createInlineCssPlaceholderAsset() {
return {
tag: "style",
attrs: { suppressHydrationWarning: true },
inlineCss: true
};
}
//#endregion
export { createInlineCssPlaceholderAsset, createInlineCssStyleAsset, getAssetCrossOrigin, getStylesheetHref, isInlinableStylesheet, resolveManifestAssetLink };
//# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
{"version":3,"file":"use-constant.mjs","sources":["../../../src/utils/use-constant.ts"],"sourcesContent":["\"use client\"\n\nimport { useRef } from \"react\"\n\ntype Init<T> = () => T\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nexport function useConstant<T>(init: Init<T>) {\n const ref = useRef<T | null>(null)\n\n if (ref.current === null) {\n ref.current = init()\n }\n\n return ref.current\n}\n"],"names":[],"mappings":";;;AAMA;;;;;;AAMG;AACG;AACF;AAEA;AACI;;;AAIR;;"}
@@ -0,0 +1 @@
{"version":3,"file":"manifest.js","names":[],"sources":["../../src/manifest.ts"],"sourcesContent":["export type AssetCrossOrigin = 'anonymous' | 'use-credentials'\n\nexport type AssetCrossOriginConfig =\n | AssetCrossOrigin\n | Partial<Record<'modulepreload' | 'stylesheet', AssetCrossOrigin>>\n\nexport type ManifestAssetLink =\n | string\n | {\n href: string\n crossOrigin?: AssetCrossOrigin\n }\n\nexport function getAssetCrossOrigin(\n assetCrossOrigin: AssetCrossOriginConfig | undefined,\n kind: 'modulepreload' | 'stylesheet',\n): AssetCrossOrigin | undefined {\n if (!assetCrossOrigin) {\n return undefined\n }\n\n if (typeof assetCrossOrigin === 'string') {\n return assetCrossOrigin\n }\n\n return assetCrossOrigin[kind]\n}\n\nexport function resolveManifestAssetLink(link: ManifestAssetLink) {\n if (typeof link === 'string') {\n return { href: link, crossOrigin: undefined }\n }\n\n return link\n}\n\nexport type Manifest = {\n inlineCss?: {\n styles: Record<string, string>\n }\n routes: Record<\n string,\n {\n filePath?: string\n preloads?: Array<ManifestAssetLink>\n assets?: Array<RouterManagedTag>\n }\n >\n}\n\nexport type RouterManagedTag =\n | {\n tag: 'title'\n attrs?: Record<string, any>\n children: string\n }\n | {\n tag: 'meta' | 'link'\n attrs?: Record<string, any>\n children?: never\n }\n | {\n tag: 'script'\n attrs?: Record<string, any>\n children?: string\n }\n | {\n tag: 'style'\n attrs?: Record<string, any>\n children?: string\n inlineCss?: true\n }\n\nexport function getStylesheetHref(asset: RouterManagedTag) {\n if (asset.tag !== 'link') return undefined\n\n const rel = asset.attrs?.rel\n const href = asset.attrs?.href\n if (typeof href !== 'string') return undefined\n\n const relTokens = typeof rel === 'string' ? rel.split(/\\s+/) : []\n if (!relTokens.includes('stylesheet')) return undefined\n\n return href\n}\n\nexport function isInlinableStylesheet(\n manifest: Manifest | undefined,\n asset: RouterManagedTag,\n) {\n const href = getStylesheetHref(asset)\n return !!href && manifest?.inlineCss?.styles[href] !== undefined\n}\n\nexport function createInlineCssStyleAsset(css: string): RouterManagedTag {\n return {\n tag: 'style',\n attrs: {\n suppressHydrationWarning: true,\n },\n inlineCss: true,\n children: css,\n }\n}\n\nexport function createInlineCssPlaceholderAsset(): RouterManagedTag {\n return {\n tag: 'style',\n attrs: {\n suppressHydrationWarning: true,\n },\n inlineCss: true,\n }\n}\n"],"mappings":";AAaA,SAAgB,oBACd,kBACA,MAC8B;AAC9B,KAAI,CAAC,iBACH;AAGF,KAAI,OAAO,qBAAqB,SAC9B,QAAO;AAGT,QAAO,iBAAiB;;AAG1B,SAAgB,yBAAyB,MAAyB;AAChE,KAAI,OAAO,SAAS,SAClB,QAAO;EAAE,MAAM;EAAM,aAAa,KAAA;EAAW;AAG/C,QAAO;;AAwCT,SAAgB,kBAAkB,OAAyB;AACzD,KAAI,MAAM,QAAQ,OAAQ,QAAO,KAAA;CAEjC,MAAM,MAAM,MAAM,OAAO;CACzB,MAAM,OAAO,MAAM,OAAO;AAC1B,KAAI,OAAO,SAAS,SAAU,QAAO,KAAA;AAGrC,KAAI,EADc,OAAO,QAAQ,WAAW,IAAI,MAAM,MAAM,GAAG,EAAE,EAClD,SAAS,aAAa,CAAE,QAAO,KAAA;AAE9C,QAAO;;AAGT,SAAgB,sBACd,UACA,OACA;CACA,MAAM,OAAO,kBAAkB,MAAM;AACrC,QAAO,CAAC,CAAC,QAAQ,UAAU,WAAW,OAAO,UAAU,KAAA;;AAGzD,SAAgB,0BAA0B,KAA+B;AACvE,QAAO;EACL,KAAK;EACL,OAAO,EACL,0BAA0B,MAC3B;EACD,WAAW;EACX,UAAU;EACX;;AAGH,SAAgB,kCAAoD;AAClE,QAAO;EACL,KAAK;EACL,OAAO,EACL,0BAA0B,MAC3B;EACD,WAAW;EACZ"}
@@ -0,0 +1,200 @@
"use strict";
/**********************************************
* DO NOT MODIFY THIS FILE MANUALLY *
* *
* THIS FILE HAS BEEN COPIED FROM ast-spec. *
* ANY CHANGES WILL BE LOST ON THE NEXT BUILD *
* *
* MAKE CHANGES TO ast-spec AND THEN RUN *
* pnpm run build *
**********************************************/
Object.defineProperty(exports, "__esModule", { value: true });
exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
var AST_NODE_TYPES;
(function (AST_NODE_TYPES) {
AST_NODE_TYPES["AccessorProperty"] = "AccessorProperty";
AST_NODE_TYPES["ArrayExpression"] = "ArrayExpression";
AST_NODE_TYPES["ArrayPattern"] = "ArrayPattern";
AST_NODE_TYPES["ArrowFunctionExpression"] = "ArrowFunctionExpression";
AST_NODE_TYPES["AssignmentExpression"] = "AssignmentExpression";
AST_NODE_TYPES["AssignmentPattern"] = "AssignmentPattern";
AST_NODE_TYPES["AwaitExpression"] = "AwaitExpression";
AST_NODE_TYPES["BinaryExpression"] = "BinaryExpression";
AST_NODE_TYPES["BlockStatement"] = "BlockStatement";
AST_NODE_TYPES["BreakStatement"] = "BreakStatement";
AST_NODE_TYPES["CallExpression"] = "CallExpression";
AST_NODE_TYPES["CatchClause"] = "CatchClause";
AST_NODE_TYPES["ChainExpression"] = "ChainExpression";
AST_NODE_TYPES["ClassBody"] = "ClassBody";
AST_NODE_TYPES["ClassDeclaration"] = "ClassDeclaration";
AST_NODE_TYPES["ClassExpression"] = "ClassExpression";
AST_NODE_TYPES["ConditionalExpression"] = "ConditionalExpression";
AST_NODE_TYPES["ContinueStatement"] = "ContinueStatement";
AST_NODE_TYPES["DebuggerStatement"] = "DebuggerStatement";
AST_NODE_TYPES["Decorator"] = "Decorator";
AST_NODE_TYPES["DoWhileStatement"] = "DoWhileStatement";
AST_NODE_TYPES["EmptyStatement"] = "EmptyStatement";
AST_NODE_TYPES["ExportAllDeclaration"] = "ExportAllDeclaration";
AST_NODE_TYPES["ExportDefaultDeclaration"] = "ExportDefaultDeclaration";
AST_NODE_TYPES["ExportNamedDeclaration"] = "ExportNamedDeclaration";
AST_NODE_TYPES["ExportSpecifier"] = "ExportSpecifier";
AST_NODE_TYPES["ExpressionStatement"] = "ExpressionStatement";
AST_NODE_TYPES["ForInStatement"] = "ForInStatement";
AST_NODE_TYPES["ForOfStatement"] = "ForOfStatement";
AST_NODE_TYPES["ForStatement"] = "ForStatement";
AST_NODE_TYPES["FunctionDeclaration"] = "FunctionDeclaration";
AST_NODE_TYPES["FunctionExpression"] = "FunctionExpression";
AST_NODE_TYPES["Identifier"] = "Identifier";
AST_NODE_TYPES["IfStatement"] = "IfStatement";
AST_NODE_TYPES["ImportAttribute"] = "ImportAttribute";
AST_NODE_TYPES["ImportDeclaration"] = "ImportDeclaration";
AST_NODE_TYPES["ImportDefaultSpecifier"] = "ImportDefaultSpecifier";
AST_NODE_TYPES["ImportExpression"] = "ImportExpression";
AST_NODE_TYPES["ImportNamespaceSpecifier"] = "ImportNamespaceSpecifier";
AST_NODE_TYPES["ImportSpecifier"] = "ImportSpecifier";
AST_NODE_TYPES["JSXAttribute"] = "JSXAttribute";
AST_NODE_TYPES["JSXClosingElement"] = "JSXClosingElement";
AST_NODE_TYPES["JSXClosingFragment"] = "JSXClosingFragment";
AST_NODE_TYPES["JSXElement"] = "JSXElement";
AST_NODE_TYPES["JSXEmptyExpression"] = "JSXEmptyExpression";
AST_NODE_TYPES["JSXExpressionContainer"] = "JSXExpressionContainer";
AST_NODE_TYPES["JSXFragment"] = "JSXFragment";
AST_NODE_TYPES["JSXIdentifier"] = "JSXIdentifier";
AST_NODE_TYPES["JSXMemberExpression"] = "JSXMemberExpression";
AST_NODE_TYPES["JSXNamespacedName"] = "JSXNamespacedName";
AST_NODE_TYPES["JSXOpeningElement"] = "JSXOpeningElement";
AST_NODE_TYPES["JSXOpeningFragment"] = "JSXOpeningFragment";
AST_NODE_TYPES["JSXSpreadAttribute"] = "JSXSpreadAttribute";
AST_NODE_TYPES["JSXSpreadChild"] = "JSXSpreadChild";
AST_NODE_TYPES["JSXText"] = "JSXText";
AST_NODE_TYPES["LabeledStatement"] = "LabeledStatement";
AST_NODE_TYPES["Literal"] = "Literal";
AST_NODE_TYPES["LogicalExpression"] = "LogicalExpression";
AST_NODE_TYPES["MemberExpression"] = "MemberExpression";
AST_NODE_TYPES["MetaProperty"] = "MetaProperty";
AST_NODE_TYPES["MethodDefinition"] = "MethodDefinition";
AST_NODE_TYPES["NewExpression"] = "NewExpression";
AST_NODE_TYPES["ObjectExpression"] = "ObjectExpression";
AST_NODE_TYPES["ObjectPattern"] = "ObjectPattern";
AST_NODE_TYPES["PrivateIdentifier"] = "PrivateIdentifier";
AST_NODE_TYPES["Program"] = "Program";
AST_NODE_TYPES["Property"] = "Property";
AST_NODE_TYPES["PropertyDefinition"] = "PropertyDefinition";
AST_NODE_TYPES["RestElement"] = "RestElement";
AST_NODE_TYPES["ReturnStatement"] = "ReturnStatement";
AST_NODE_TYPES["SequenceExpression"] = "SequenceExpression";
AST_NODE_TYPES["SpreadElement"] = "SpreadElement";
AST_NODE_TYPES["StaticBlock"] = "StaticBlock";
AST_NODE_TYPES["Super"] = "Super";
AST_NODE_TYPES["SwitchCase"] = "SwitchCase";
AST_NODE_TYPES["SwitchStatement"] = "SwitchStatement";
AST_NODE_TYPES["TaggedTemplateExpression"] = "TaggedTemplateExpression";
AST_NODE_TYPES["TemplateElement"] = "TemplateElement";
AST_NODE_TYPES["TemplateLiteral"] = "TemplateLiteral";
AST_NODE_TYPES["ThisExpression"] = "ThisExpression";
AST_NODE_TYPES["ThrowStatement"] = "ThrowStatement";
AST_NODE_TYPES["TryStatement"] = "TryStatement";
AST_NODE_TYPES["UnaryExpression"] = "UnaryExpression";
AST_NODE_TYPES["UpdateExpression"] = "UpdateExpression";
AST_NODE_TYPES["VariableDeclaration"] = "VariableDeclaration";
AST_NODE_TYPES["VariableDeclarator"] = "VariableDeclarator";
AST_NODE_TYPES["WhileStatement"] = "WhileStatement";
AST_NODE_TYPES["WithStatement"] = "WithStatement";
AST_NODE_TYPES["YieldExpression"] = "YieldExpression";
AST_NODE_TYPES["TSAbstractAccessorProperty"] = "TSAbstractAccessorProperty";
AST_NODE_TYPES["TSAbstractKeyword"] = "TSAbstractKeyword";
AST_NODE_TYPES["TSAbstractMethodDefinition"] = "TSAbstractMethodDefinition";
AST_NODE_TYPES["TSAbstractPropertyDefinition"] = "TSAbstractPropertyDefinition";
AST_NODE_TYPES["TSAnyKeyword"] = "TSAnyKeyword";
AST_NODE_TYPES["TSArrayType"] = "TSArrayType";
AST_NODE_TYPES["TSAsExpression"] = "TSAsExpression";
AST_NODE_TYPES["TSAsyncKeyword"] = "TSAsyncKeyword";
AST_NODE_TYPES["TSBigIntKeyword"] = "TSBigIntKeyword";
AST_NODE_TYPES["TSBooleanKeyword"] = "TSBooleanKeyword";
AST_NODE_TYPES["TSCallSignatureDeclaration"] = "TSCallSignatureDeclaration";
AST_NODE_TYPES["TSClassImplements"] = "TSClassImplements";
AST_NODE_TYPES["TSConditionalType"] = "TSConditionalType";
AST_NODE_TYPES["TSConstructorType"] = "TSConstructorType";
AST_NODE_TYPES["TSConstructSignatureDeclaration"] = "TSConstructSignatureDeclaration";
AST_NODE_TYPES["TSDeclareFunction"] = "TSDeclareFunction";
AST_NODE_TYPES["TSDeclareKeyword"] = "TSDeclareKeyword";
AST_NODE_TYPES["TSEmptyBodyFunctionExpression"] = "TSEmptyBodyFunctionExpression";
AST_NODE_TYPES["TSEnumBody"] = "TSEnumBody";
AST_NODE_TYPES["TSEnumDeclaration"] = "TSEnumDeclaration";
AST_NODE_TYPES["TSEnumMember"] = "TSEnumMember";
AST_NODE_TYPES["TSExportAssignment"] = "TSExportAssignment";
AST_NODE_TYPES["TSExportKeyword"] = "TSExportKeyword";
AST_NODE_TYPES["TSExternalModuleReference"] = "TSExternalModuleReference";
AST_NODE_TYPES["TSFunctionType"] = "TSFunctionType";
AST_NODE_TYPES["TSImportEqualsDeclaration"] = "TSImportEqualsDeclaration";
AST_NODE_TYPES["TSImportType"] = "TSImportType";
AST_NODE_TYPES["TSIndexedAccessType"] = "TSIndexedAccessType";
AST_NODE_TYPES["TSIndexSignature"] = "TSIndexSignature";
AST_NODE_TYPES["TSInferType"] = "TSInferType";
AST_NODE_TYPES["TSInstantiationExpression"] = "TSInstantiationExpression";
AST_NODE_TYPES["TSInterfaceBody"] = "TSInterfaceBody";
AST_NODE_TYPES["TSInterfaceDeclaration"] = "TSInterfaceDeclaration";
AST_NODE_TYPES["TSInterfaceHeritage"] = "TSInterfaceHeritage";
AST_NODE_TYPES["TSIntersectionType"] = "TSIntersectionType";
AST_NODE_TYPES["TSIntrinsicKeyword"] = "TSIntrinsicKeyword";
AST_NODE_TYPES["TSLiteralType"] = "TSLiteralType";
AST_NODE_TYPES["TSMappedType"] = "TSMappedType";
AST_NODE_TYPES["TSMethodSignature"] = "TSMethodSignature";
AST_NODE_TYPES["TSModuleBlock"] = "TSModuleBlock";
AST_NODE_TYPES["TSModuleDeclaration"] = "TSModuleDeclaration";
AST_NODE_TYPES["TSNamedTupleMember"] = "TSNamedTupleMember";
AST_NODE_TYPES["TSNamespaceExportDeclaration"] = "TSNamespaceExportDeclaration";
AST_NODE_TYPES["TSNeverKeyword"] = "TSNeverKeyword";
AST_NODE_TYPES["TSNonNullExpression"] = "TSNonNullExpression";
AST_NODE_TYPES["TSNullKeyword"] = "TSNullKeyword";
AST_NODE_TYPES["TSNumberKeyword"] = "TSNumberKeyword";
AST_NODE_TYPES["TSObjectKeyword"] = "TSObjectKeyword";
AST_NODE_TYPES["TSOptionalType"] = "TSOptionalType";
AST_NODE_TYPES["TSParameterProperty"] = "TSParameterProperty";
AST_NODE_TYPES["TSPrivateKeyword"] = "TSPrivateKeyword";
AST_NODE_TYPES["TSPropertySignature"] = "TSPropertySignature";
AST_NODE_TYPES["TSProtectedKeyword"] = "TSProtectedKeyword";
AST_NODE_TYPES["TSPublicKeyword"] = "TSPublicKeyword";
AST_NODE_TYPES["TSQualifiedName"] = "TSQualifiedName";
AST_NODE_TYPES["TSReadonlyKeyword"] = "TSReadonlyKeyword";
AST_NODE_TYPES["TSRestType"] = "TSRestType";
AST_NODE_TYPES["TSSatisfiesExpression"] = "TSSatisfiesExpression";
AST_NODE_TYPES["TSStaticKeyword"] = "TSStaticKeyword";
AST_NODE_TYPES["TSStringKeyword"] = "TSStringKeyword";
AST_NODE_TYPES["TSSymbolKeyword"] = "TSSymbolKeyword";
AST_NODE_TYPES["TSTemplateLiteralType"] = "TSTemplateLiteralType";
AST_NODE_TYPES["TSThisType"] = "TSThisType";
AST_NODE_TYPES["TSTupleType"] = "TSTupleType";
AST_NODE_TYPES["TSTypeAliasDeclaration"] = "TSTypeAliasDeclaration";
AST_NODE_TYPES["TSTypeAnnotation"] = "TSTypeAnnotation";
AST_NODE_TYPES["TSTypeAssertion"] = "TSTypeAssertion";
AST_NODE_TYPES["TSTypeLiteral"] = "TSTypeLiteral";
AST_NODE_TYPES["TSTypeOperator"] = "TSTypeOperator";
AST_NODE_TYPES["TSTypeParameter"] = "TSTypeParameter";
AST_NODE_TYPES["TSTypeParameterDeclaration"] = "TSTypeParameterDeclaration";
AST_NODE_TYPES["TSTypeParameterInstantiation"] = "TSTypeParameterInstantiation";
AST_NODE_TYPES["TSTypePredicate"] = "TSTypePredicate";
AST_NODE_TYPES["TSTypeQuery"] = "TSTypeQuery";
AST_NODE_TYPES["TSTypeReference"] = "TSTypeReference";
AST_NODE_TYPES["TSUndefinedKeyword"] = "TSUndefinedKeyword";
AST_NODE_TYPES["TSUnionType"] = "TSUnionType";
AST_NODE_TYPES["TSUnknownKeyword"] = "TSUnknownKeyword";
AST_NODE_TYPES["TSVoidKeyword"] = "TSVoidKeyword";
})(AST_NODE_TYPES || (exports.AST_NODE_TYPES = AST_NODE_TYPES = {}));
var AST_TOKEN_TYPES;
(function (AST_TOKEN_TYPES) {
AST_TOKEN_TYPES["Boolean"] = "Boolean";
AST_TOKEN_TYPES["Identifier"] = "Identifier";
AST_TOKEN_TYPES["JSXIdentifier"] = "JSXIdentifier";
AST_TOKEN_TYPES["PrivateIdentifier"] = "PrivateIdentifier";
AST_TOKEN_TYPES["JSXText"] = "JSXText";
AST_TOKEN_TYPES["Keyword"] = "Keyword";
AST_TOKEN_TYPES["Null"] = "Null";
AST_TOKEN_TYPES["Numeric"] = "Numeric";
AST_TOKEN_TYPES["Punctuator"] = "Punctuator";
AST_TOKEN_TYPES["RegularExpression"] = "RegularExpression";
AST_TOKEN_TYPES["String"] = "String";
AST_TOKEN_TYPES["Template"] = "Template";
AST_TOKEN_TYPES["Block"] = "Block";
AST_TOKEN_TYPES["Line"] = "Line";
})(AST_TOKEN_TYPES || (exports.AST_TOKEN_TYPES = AST_TOKEN_TYPES = {}));
@@ -0,0 +1 @@
{"version":3,"file":"send.js","sources":["../../../src/icons/send.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Send\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTQuNTM2IDIxLjY4NmEuNS41IDAgMCAwIC45MzctLjAyNGw2LjUtMTlhLjQ5Ni40OTYgMCAwIDAtLjYzNS0uNjM1bC0xOSA2LjVhLjUuNSAwIDAgMC0uMDI0LjkzN2w3LjkzIDMuMThhMiAyIDAgMCAxIDEuMTEyIDEuMTF6IiAvPgogIDxwYXRoIGQ9Im0yMS44NTQgMi4xNDctMTAuOTQgMTAuOTM5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/send\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 Send = createLucideIcon('Send', [\n [\n 'path',\n {\n d: 'M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z',\n key: '1ffxy3',\n },\n ],\n ['path', { d: 'm21.854 2.147-10.94 10.939', key: '12cjpa' }],\n]);\n\nexport default Send;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CACpC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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;AAC7D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,8 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
export declare class VariableDefinition extends DefinitionBase<DefinitionType.Variable, TSESTree.VariableDeclarator, TSESTree.VariableDeclaration, TSESTree.Identifier> {
readonly isTypeDefinition = false;
readonly isVariableDefinition = true;
constructor(name: TSESTree.Identifier, node: VariableDefinition['node'], decl: TSESTree.VariableDeclaration);
}
@@ -0,0 +1 @@
module.exports={C:{"78":0.00399,"102":0.00399,"115":0.01997,"120":0.0559,"121":0.1158,"123":0.01198,"128":0.13576,"133":0.01597,"135":0.00399,"136":0.00399,"137":0.00399,"138":0.00399,"139":0.00399,"140":0.31145,"144":0.01597,"145":0.00799,"148":0.01198,"149":0.00799,"150":0.01198,"151":0.00799,"152":0.48315,"153":0.04392,"154":0.0599,"155":0.15972,"156":0.21163,"157":0.00399,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 124 125 126 127 129 130 131 132 134 141 142 143 146 147 158 159 160 3.5 3.6"},D:{"66":0.00399,"68":0.00399,"80":0.00399,"83":0.00399,"88":0.00399,"89":0.00399,"91":0.00399,"92":0.00399,"97":0.1717,"98":0.00799,"100":0.00799,"101":0.01597,"103":0.02396,"104":0.01597,"105":0.01997,"106":0.02795,"107":0.03194,"108":0.01597,"109":0.29149,"110":0.02396,"111":0.01597,"112":0.01997,"113":0.19965,"114":0.01198,"115":0.04792,"116":0.65885,"117":0.02396,"118":0.17569,"119":0.15972,"120":0.2276,"121":0.0559,"122":0.03194,"123":0.04792,"124":0.07587,"125":0.11979,"126":0.01997,"127":0.01997,"128":0.0559,"129":0.01997,"130":0.03594,"131":0.20764,"132":0.02795,"133":2.2241,"134":0.04392,"135":0.15972,"136":0.02396,"137":0.07187,"138":0.1717,"139":0.03993,"140":0.18368,"141":0.54305,"142":5.90565,"143":0.03594,"144":0.26354,"145":0.04792,"146":0.26753,"147":0.06788,"148":0.18368,"149":0.22361,"150":0.90242,"151":1.79685,"152":5.81381,"153":4.32442,"154":0.95033,"155":0.0599,"156":0.05191,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 67 69 70 71 72 73 74 75 76 77 78 79 81 84 85 86 87 90 93 94 95 96 99 102 157"},F:{"95":0.00399,"100":0.00399,"101":0.00799,"122":0.00399,"133":0.00799,"134":0.01997,"135":0.13976,_:"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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.01198,"109":0.03993,"113":0.0599,"114":0.01198,"116":0.00399,"117":0.01597,"119":0.0559,"120":0.0559,"122":0.01198,"124":0.00399,"125":0.00799,"126":0.00399,"127":0.00399,"130":0.00399,"131":0.02396,"132":0.02795,"133":0.00399,"134":0.00399,"135":0.01997,"136":0.00399,"137":0.00399,"138":0.0559,"139":0.00799,"140":0.02396,"141":0.03993,"142":0.06389,"143":0.04392,"144":0.02795,"145":0.02795,"146":0.01198,"147":0.03194,"148":0.02795,"149":0.0559,"150":0.03993,"151":0.12378,"152":1.6531,"153":2.01647,"154":0.89044,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 115 118 121 123 128 129"},E:{"27":0.0559,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 10.1 11.1 13.1 14.1 15.1 15.2-15.3 15.4 16.2 16.3 16.4 16.5 17.0 18.0 18.2 18.4 27.1 27.2 TP","9.1":0.01597,"12.1":0.00399,"15.5":0.00399,"15.6":0.03993,"16.0":0.00399,"16.1":0.00399,"16.6":0.01997,"17.1":0.02795,"17.2":0.01597,"17.3":0.00399,"17.4":0.00399,"17.5":0.00399,"17.6":0.00799,"18.1":0.04792,"18.3":0.11979,"18.5-18.7":0.00799,"26.0":0.00399,"26.1":0.00399,"26.2":0.01997,"26.3":0.01198,"26.4":0.00799,"26.5":0.06389,"26.6":0.41927},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.0011,"5.0-5.1":0.0011,"6.0-6.1":0,"7.0-7.1":0.0022,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01102,"11.0-11.2":0.0011,"11.3-11.4":0.0022,"12.0-12.1":0,"12.2-12.5":0.02864,"13.0-13.1":0,"13.2":0.00551,"13.3":0,"13.4-13.7":0.0011,"14.0-14.4":0.00441,"14.5-14.8":0.00661,"15.0-15.1":0.00661,"15.2-15.3":0.00441,"15.4":0.00551,"15.5":0.00661,"15.6-15.8":0.14322,"16.0":0.01102,"16.1":0.01983,"16.2":0.01102,"16.3":0.02424,"16.4":0.00551,"16.5":0.00881,"16.6-16.7":0.1994,"17.0":0.00771,"17.1":0.01102,"17.2":0.01102,"17.3":0.01653,"17.4":0.02314,"17.5":0.04517,"17.6-17.7":0.11678,"18.0":0.02424,"18.1":0.04847,"18.2":0.0661,"18.3":0.11458,"18.4":0.07161,"18.5-18.7":1.47956,"26.0":0.07161,"26.1":0.07271,"26.2":0.18949,"26.3":0.20491,"26.4":0.14983,"26.5":1.00363,"26.6":6.19256,"27.0":0.47483,"27.1":0,"27.2":0.01212},P:{"25":0.01857,"26":0.00928,"27":0.00928,"28":0.01857,"29":0.09284,"30":1.06761,_:"4 20 21 22 23 24 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 14.0 15.0 16.0 17.0 18.0 19.0","13.0":0.00928},I:{"0":0.03001,"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.00001},K:{"0":0.60671,_:"10 11 12 11.1 11.5 12.1"},A:{"9":0.19699,"11":0.39398,_:"6 7 8 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{Line truncated