docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped

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

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"tree-palm.js","sources":["../../../src/icons/tree-palm.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TreePalm\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMgOGMwLTIuNzYtMi40Ni01LTUuNS01UzIgNS4yNCAyIDhoMmwxLTEgMSAxaDQiIC8+CiAgPHBhdGggZD0iTTEzIDcuMTRBNS44MiA1LjgyIDAgMCAxIDE2LjUgNmMzLjA0IDAgNS41IDIuMjQgNS41IDVoLTNsLTEtMS0xIDFoLTMiIC8+CiAgPHBhdGggZD0iTTUuODkgOS43MWMtMi4xNSAyLjE1LTIuMyA1LjQ3LS4zNSA3LjQzbDQuMjQtNC4yNS43LS43LjcxLS43MSAyLjEyLTIuMTJjLTEuOTUtMS45Ni01LjI3LTEuOC03LjQyLjM1IiAvPgogIDxwYXRoIGQ9Ik0xMSAxNS41Yy41IDIuNS0uMTcgNC41LTEgNi41aDRjMi01LjUtLjUtMTItMS0xNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/tree-palm\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 TreePalm = createLucideIcon('TreePalm', [\n ['path', { d: 'M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4', key: 'foxbe7' }],\n [\n 'path',\n { d: 'M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3', key: '18arnh' },\n ],\n [\n 'path',\n {\n d: 'M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35',\n key: 'ywahnh',\n },\n ],\n ['path', { d: 'M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14', key: 'ft0feo' }],\n]);\n\nexport default TreePalm;\n"],"names":[],"mappings":"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"}
@@ -0,0 +1,8 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/adapter/cloudflare-workers/conninfo.ts
/**
* @deprecated `hono/cloudflare-workers` will be removed in v5. Install `@hono/cloudflare-workers` and import from there instead.
*/
const getConnInfo = (c) => ({ remote: { address: c.req.header("cf-connecting-ip") } });
//#endregion
exports.getConnInfo = getConnInfo;
@@ -0,0 +1,4 @@
import { ChainInput, IDateChain } from './types';
declare function chain(input: ChainInput | IDateChain, format?: string): IDateChain;
export * from 'date-manip';
export { chain };
@@ -0,0 +1,122 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "karakter", verb: "legyen" },
file: { unit: "byte", verb: "legyen" },
array: { unit: "elem", verb: "legyen" },
set: { unit: "elem", verb: "legyen" },
map: { unit: "elem", verb: "legyen" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const FormatDictionary: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "bemenet",
email: "email cím",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO időbélyeg",
date: "ISO dátum",
time: "ISO idő",
duration: "ISO időintervallum",
ipv4: "IPv4 cím",
ipv6: "IPv6 cím",
mac: "MAC cím",
cidrv4: "IPv4 tartomány",
cidrv6: "IPv6 tartomány",
base64: "base64-kódolt string",
base64url: "base64url-kódolt string",
json_string: "JSON string",
e164: "E.164 szám",
credit_card: "hitelkártyaszám",
currency_code: "pénznemkód",
iban: "IBAN",
jwt: "JWT",
template_literal: "bemenet",
};
const TypeDictionary: {
[k in errors.$ZodInvalidTypeExpected | (string & {})]?: string;
} = {
nan: "NaN",
number: "szám",
array: "tömb",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Érvénytelen bemenet: a várt érték instanceof ${issue.expected}, a kapott érték ${received}`;
}
return `Érvénytelen bemenet: a várt érték ${expected}, a kapott érték ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Érvénytelen bemenet: a várt érték ${util.stringifyPrimitive(issue.values[0])}`;
return `Érvénytelen opció: valamelyik érték várt ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Túl nagy: ${issue.origin ?? "érték"} mérete túl nagy ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elem"}`;
return `Túl nagy: a bemeneti érték ${issue.origin ?? "érték"} túl nagy: ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Túl kicsi: a bemeneti érték ${issue.origin} mérete túl kicsi ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Túl kicsi: a bemeneti érték ${issue.origin} túl kicsi ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Érvénytelen string: "${_issue.prefix}" értékkel kell kezdődnie`;
if (_issue.format === "ends_with") return `Érvénytelen string: "${_issue.suffix}" értékkel kell végződnie`;
if (_issue.format === "includes") return `Érvénytelen string: "${_issue.includes}" értéket kell tartalmaznia`;
if (_issue.format === "regex") return `Érvénytelen string: ${_issue.pattern} mintának kell megfelelnie`;
return `Érvénytelen ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Érvénytelen szám: ${issue.divisor} többszörösének kell lennie`;
case "unrecognized_keys":
return `Ismeretlen kulcs${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Érvénytelen kulcs ${issue.origin}`;
case "invalid_union":
return "Érvénytelen bemenet";
case "invalid_element":
return `Érvénytelen érték: ${issue.origin}`;
default:
return `Érvénytelen bemenet`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquareMousePointer = createLucideIcon("SquareMousePointer", [
[
"path",
{
d: "M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z",
key: "xwnzip"
}
],
["path", { d: "M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6", key: "14rsvq" }]
]);
export { SquareMousePointer as default };
//# sourceMappingURL=square-mouse-pointer.js.map
@@ -0,0 +1,14 @@
import { addDomEvent } from '../../events/add-dom-event.mjs';
import { createProjectionNode } from './create-projection-node.mjs';
const DocumentProjectionNode = createProjectionNode({
attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify),
measureScroll: () => ({
x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
y: document.documentElement.scrollTop || document.body?.scrollTop || 0,
}),
checkIsScrollRoot: () => true,
});
export { DocumentProjectionNode };
//# sourceMappingURL=DocumentProjectionNode.mjs.map
@@ -0,0 +1,56 @@
declare class Queue<ValueType> implements Iterable<ValueType> {
/**
The size of the queue.
*/
readonly size: number;
/**
Tiny queue data structure.
The instance is an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols), which means you can iterate over the queue front to back with a “for…of” loop, or use spreading to convert the queue to an array. Don't do this unless you really need to though, since it's slow.
@example
```
import Queue = require('yocto-queue');
const queue = new Queue();
queue.enqueue('🦄');
queue.enqueue('🌈');
console.log(queue.size);
//=> 2
console.log(...queue);
//=> '🦄 🌈'
console.log(queue.dequeue());
//=> '🦄'
console.log(queue.dequeue());
//=> '🌈'
```
*/
constructor();
[Symbol.iterator](): IterableIterator<ValueType>;
/**
Add a value to the queue.
*/
enqueue(value: ValueType): void;
/**
Remove the next value in the queue.
@returns The removed value or `undefined` if the queue is empty.
*/
dequeue(): ValueType | undefined;
/**
Clear the queue.
*/
clear(): void;
}
export = Queue;
@@ -0,0 +1,25 @@
//#region src/utils/jwt/jwa.d.ts
/**
* @module
* JSON Web Algorithms (JWA)
* https://datatracker.ietf.org/doc/html/rfc7518
*/
export declare enum AlgorithmTypes {
HS256 = "HS256",
HS384 = "HS384",
HS512 = "HS512",
RS256 = "RS256",
RS384 = "RS384",
RS512 = "RS512",
PS256 = "PS256",
PS384 = "PS384",
PS512 = "PS512",
ES256 = "ES256",
ES384 = "ES384",
ES512 = "ES512",
EdDSA = "EdDSA"
}
export type SignatureAlgorithm = keyof typeof AlgorithmTypes;
export type SymmetricAlgorithm = 'HS256' | 'HS384' | 'HS512';
export type AsymmetricAlgorithm = 'RS256' | 'RS384' | 'RS512' | 'PS256' | 'PS384' | 'PS512' | 'ES256' | 'ES384' | 'ES512' | 'EdDSA';
//#endregion
@@ -0,0 +1,131 @@
'use strict';
const { EMPTY_BUFFER } = require('./constants');
const FastBuffer = Buffer[Symbol.species];
/**
* Merges an array of buffers into a new buffer.
*
* @param {Buffer[]} list The array of buffers to concat
* @param {Number} totalLength The total length of buffers in the list
* @return {Buffer} The resulting buffer
* @public
*/
function concat(list, totalLength) {
if (list.length === 0) return EMPTY_BUFFER;
if (list.length === 1) return list[0];
const target = Buffer.allocUnsafe(totalLength);
let offset = 0;
for (let i = 0; i < list.length; i++) {
const buf = list[i];
target.set(buf, offset);
offset += buf.length;
}
if (offset < totalLength) {
return new FastBuffer(target.buffer, target.byteOffset, offset);
}
return target;
}
/**
* Masks a buffer using the given mask.
*
* @param {Buffer} source The buffer to mask
* @param {Buffer} mask The mask to use
* @param {Buffer} output The buffer where to store the result
* @param {Number} offset The offset at which to start writing
* @param {Number} length The number of bytes to mask.
* @public
*/
function _mask(source, mask, output, offset, length) {
for (let i = 0; i < length; i++) {
output[offset + i] = source[i] ^ mask[i & 3];
}
}
/**
* Unmasks a buffer using the given mask.
*
* @param {Buffer} buffer The buffer to unmask
* @param {Buffer} mask The mask to use
* @public
*/
function _unmask(buffer, mask) {
for (let i = 0; i < buffer.length; i++) {
buffer[i] ^= mask[i & 3];
}
}
/**
* Converts a buffer to an `ArrayBuffer`.
*
* @param {Buffer} buf The buffer to convert
* @return {ArrayBuffer} Converted buffer
* @public
*/
function toArrayBuffer(buf) {
if (buf.length === buf.buffer.byteLength) {
return buf.buffer;
}
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
}
/**
* Converts `data` to a `Buffer`.
*
* @param {*} data The data to convert
* @return {Buffer} The buffer
* @throws {TypeError}
* @public
*/
function toBuffer(data) {
toBuffer.readOnly = true;
if (Buffer.isBuffer(data)) return data;
let buf;
if (data instanceof ArrayBuffer) {
buf = new FastBuffer(data);
} else if (ArrayBuffer.isView(data)) {
buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength);
} else {
buf = Buffer.from(data);
toBuffer.readOnly = false;
}
return buf;
}
module.exports = {
concat,
mask: _mask,
toArrayBuffer,
toBuffer,
unmask: _unmask
};
/* istanbul ignore else */
if (!process.env.WS_NO_BUFFER_UTIL) {
try {
const bufferUtil = require('bufferutil');
module.exports.mask = function (source, mask, output, offset, length) {
if (length < 48) _mask(source, mask, output, offset, length);
else bufferUtil.mask(source, mask, output, offset, length);
};
module.exports.unmask = function (buffer, mask) {
if (buffer.length < 32) _unmask(buffer, mask);
else bufferUtil.unmask(buffer, mask);
};
} catch (e) {
// Continue regardless of the error.
}
}
@@ -0,0 +1 @@
{"version":3,"file":"inspection-panel.js","sources":["../../../src/icons/inspection-panel.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name InspectionPanel\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik03IDdoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xNyA3aC4wMSIgLz4KICA8cGF0aCBkPSJNNyAxN2guMDEiIC8+CiAgPHBhdGggZD0iTTE3IDE3aC4wMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/inspection-panel\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 InspectionPanel = createLucideIcon('InspectionPanel', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M7 7h.01', key: '7u93v4' }],\n ['path', { d: 'M17 7h.01', key: '14a9sn' }],\n ['path', { d: 'M7 17h.01', key: '19xn7k' }],\n ['path', { d: 'M17 17h.01', key: '1sd3ek' }],\n]);\n\nexport default InspectionPanel;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,77 @@
#!/usr/bin/env node
/**
* Example demonstrating client_credentials grant for machine-to-machine authentication.
*
* Supports two authentication methods based on environment variables:
*
* 1. client_secret_basic (default):
* MCP_CLIENT_ID - OAuth client ID (required)
* MCP_CLIENT_SECRET - OAuth client secret (required)
*
* 2. private_key_jwt (when MCP_CLIENT_PRIVATE_KEY_PEM is set):
* MCP_CLIENT_ID - OAuth client ID (required)
* MCP_CLIENT_PRIVATE_KEY_PEM - PEM-encoded private key for JWT signing (required)
* MCP_CLIENT_ALGORITHM - Signing algorithm (default: RS256)
*
* Common:
* MCP_SERVER_URL - Server URL (default: http://localhost:3000/mcp)
* MCP_EXPECTED_ISSUER - Issuer URL of the authorization server the credentials were registered with (required)
*/
import { Client } from '../../client/index.js';
import { StreamableHTTPClientTransport } from '../../client/streamableHttp.js';
import { ClientCredentialsProvider, PrivateKeyJwtProvider } from '../../client/auth-extensions.js';
const DEFAULT_SERVER_URL = process.env.MCP_SERVER_URL || 'http://localhost:3000/mcp';
function createProvider() {
const clientId = process.env.MCP_CLIENT_ID;
if (!clientId) {
console.error('MCP_CLIENT_ID environment variable is required');
process.exit(1);
}
// The authorization server these credentials were registered with
const expectedIssuer = process.env.MCP_EXPECTED_ISSUER;
if (!expectedIssuer) {
console.error('MCP_EXPECTED_ISSUER environment variable is required');
process.exit(1);
}
// If private key is provided, use private_key_jwt authentication
const privateKeyPem = process.env.MCP_CLIENT_PRIVATE_KEY_PEM;
if (privateKeyPem) {
const algorithm = process.env.MCP_CLIENT_ALGORITHM || 'RS256';
console.log('Using private_key_jwt authentication');
return new PrivateKeyJwtProvider({
clientId,
privateKey: privateKeyPem,
algorithm,
expectedIssuer
});
}
// Otherwise, use client_secret_basic authentication
const clientSecret = process.env.MCP_CLIENT_SECRET;
if (!clientSecret) {
console.error('MCP_CLIENT_SECRET or MCP_CLIENT_PRIVATE_KEY_PEM environment variable is required');
process.exit(1);
}
console.log('Using client_secret_basic authentication');
return new ClientCredentialsProvider({
clientId,
clientSecret,
expectedIssuer
});
}
async function main() {
const provider = createProvider();
const client = new Client({ name: 'client-credentials-example', version: '1.0.0' }, { capabilities: {} });
const transport = new StreamableHTTPClientTransport(new URL(DEFAULT_SERVER_URL), {
authProvider: provider
});
await client.connect(transport);
console.log('Connected successfully.');
const tools = await client.listTools();
console.log('Available tools:', tools.tools.map(t => t.name).join(', ') || '(none)');
await transport.close();
}
main().catch(err => {
console.error(err);
process.exit(1);
});
//# sourceMappingURL=simpleClientCredentials.js.map
@@ -0,0 +1,470 @@
'use strict';
/**
* @fileoverview Merge Strategy
*/
//-----------------------------------------------------------------------------
// Class
//-----------------------------------------------------------------------------
/**
* Container class for several different merge strategies.
*/
class MergeStrategy {
/**
* Merges two keys by overwriting the first with the second.
* @template TValue1 The type of the value from the first object key.
* @template TValue2 The type of the value from the second object key.
* @param {TValue1} value1 The value from the first object key.
* @param {TValue2} value2 The value from the second object key.
* @returns {TValue2} The second value.
*/
static overwrite(value1, value2) {
return value2;
}
/**
* Merges two keys by replacing the first with the second only if the
* second is defined.
* @template TValue1 The type of the value from the first object key.
* @template TValue2 The type of the value from the second object key.
* @param {TValue1} value1 The value from the first object key.
* @param {TValue2} value2 The value from the second object key.
* @returns {TValue1 | TValue2} The second value if it is defined.
*/
static replace(value1, value2) {
if (typeof value2 !== "undefined") {
return value2;
}
return value1;
}
/**
* Merges two properties by assigning properties from the second to the first.
* @template {Record<string | number | symbol, unknown> | undefined} TValue1 The type of the value from the first object key.
* @template {Record<string | number | symbol, unknown>} TValue2 The type of the value from the second object key.
* @param {TValue1} value1 The value from the first object key.
* @param {TValue2} value2 The value from the second object key.
* @returns {Omit<TValue1, keyof TValue2> & TValue2} A new object containing properties from both value1 and
* value2.
*/
static assign(value1, value2) {
return Object.assign({}, value1, value2);
}
}
/**
* @fileoverview Validation Strategy
*/
//-----------------------------------------------------------------------------
// Class
//-----------------------------------------------------------------------------
/**
* Container class for several different validation strategies.
*/
class ValidationStrategy {
/**
* Validates that a value is an array.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static array(value) {
if (!Array.isArray(value)) {
throw new TypeError("Expected an array.");
}
}
/**
* Validates that a value is a boolean.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static boolean(value) {
if (typeof value !== "boolean") {
throw new TypeError("Expected a boolean.");
}
}
/**
* Validates that a value is a number.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static number(value) {
if (typeof value !== "number") {
throw new TypeError("Expected a number.");
}
}
/**
* Validates that a value is an object.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static object(value) {
if (!value || typeof value !== "object") {
throw new TypeError("Expected an object.");
}
}
/**
* Validates that a value is an object or null.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static "object?"(value) {
if (typeof value !== "object") {
throw new TypeError("Expected an object or null.");
}
}
/**
* Validates that a value is a string.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static string(value) {
if (typeof value !== "string") {
throw new TypeError("Expected a string.");
}
}
/**
* Validates that a value is a non-empty string.
* @param {unknown} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static "string!"(value) {
if (typeof value !== "string" || value.length === 0) {
throw new TypeError("Expected a non-empty string.");
}
}
}
/**
* @fileoverview Object Schema
*/
//-----------------------------------------------------------------------------
// Types
//-----------------------------------------------------------------------------
/** @import * as $typests from "./types.ts"; */
/** @typedef {$typests.BuiltInMergeStrategy} BuiltInMergeStrategy */
/** @typedef {$typests.BuiltInValidationStrategy} BuiltInValidationStrategy */
/** @typedef {$typests.CustomMergeStrategy} CustomMergeStrategy */
/** @typedef {$typests.CustomValidationStrategy} CustomValidationStrategy */
/** @typedef {$typests.ObjectDefinition} ObjectDefinition */
/** @typedef {$typests.PropertyDefinition} PropertyDefinition */
/** @typedef {$typests.PropertyDefinitionWithSchema} PropertyDefinitionWithSchema */
/** @typedef {$typests.PropertyDefinitionWithStrategies} PropertyDefinitionWithStrategies */
//-----------------------------------------------------------------------------
// Private
//-----------------------------------------------------------------------------
/**
* Validates a schema strategy.
* @param {string} name The name of the key this strategy is for.
* @param {PropertyDefinition} definition The strategy for the object key.
* @returns {void}
* @throws {TypeError} When the strategy is missing a name.
* @throws {TypeError} When the strategy is missing a merge() method.
* @throws {TypeError} When the strategy is missing a validate() method.
*/
function validateDefinition(name, definition) {
let hasSchema = false;
if (definition.schema) {
if (typeof definition.schema === "object") {
hasSchema = true;
} else {
throw new TypeError("Schema must be an object.");
}
}
if (typeof definition.merge === "string") {
if (!(definition.merge in MergeStrategy)) {
throw new TypeError(
`Definition for key "${name}" missing valid merge strategy.`,
);
}
} else if (!hasSchema && typeof definition.merge !== "function") {
throw new TypeError(
`Definition for key "${name}" must have a merge property.`,
);
}
if (typeof definition.validate === "string") {
if (!(definition.validate in ValidationStrategy)) {
throw new TypeError(
`Definition for key "${name}" missing valid validation strategy.`,
);
}
} else if (!hasSchema && typeof definition.validate !== "function") {
throw new TypeError(
`Definition for key "${name}" must have a validate() method.`,
);
}
}
//-----------------------------------------------------------------------------
// Errors
//-----------------------------------------------------------------------------
/**
* Error when an unexpected key is found.
*/
class UnexpectedKeyError extends Error {
/**
* Creates a new instance.
* @param {string} key The key that was unexpected.
*/
constructor(key) {
super(`Unexpected key "${key}" found.`);
}
}
/**
* Error when a required key is missing.
*/
class MissingKeyError extends Error {
/**
* Creates a new instance.
* @param {string} key The key that was missing.
*/
constructor(key) {
super(`Missing required key "${key}".`);
}
}
/**
* Error when a key requires other keys that are missing.
*/
class MissingDependentKeysError extends Error {
/**
* Creates a new instance.
* @param {string} key The key that was unexpected.
* @param {Array<string>} requiredKeys The keys that are required.
*/
constructor(key, requiredKeys) {
super(`Key "${key}" requires keys "${requiredKeys.join('", "')}".`);
}
}
/**
* Wrapper error for errors occuring during a merge or validate operation.
*/
class WrapperError extends Error {
/**
* Creates a new instance.
* @param {string} key The object key causing the error.
* @param {Error} source The source error.
*/
constructor(key, source) {
super(`Key "${key}": ${source.message}`, { cause: source });
// copy over custom properties that aren't represented
for (const sourceKey of Object.keys(source)) {
if (!(sourceKey in this)) {
this[sourceKey] = source[sourceKey];
}
}
}
}
//-----------------------------------------------------------------------------
// Main
//-----------------------------------------------------------------------------
/**
* Represents an object validation/merging schema.
*/
class ObjectSchema {
/**
* Track all definitions in the schema by key.
* @type {Map<string, PropertyDefinition>}
*/
#definitions = new Map();
/**
* Separately track any keys that are required for faster validation.
* @type {Map<string, PropertyDefinition>}
*/
#requiredKeys = new Map();
/**
* Creates a new instance.
* @param {ObjectDefinition} definitions The schema definitions.
* @throws {Error} When the definitions are missing or invalid.
*/
constructor(definitions) {
if (!definitions) {
throw new Error("Schema definitions missing.");
}
// add in all strategies
for (const key of Object.keys(definitions)) {
const definition = definitions[key];
validateDefinition(key, definition);
let normalizedDefinition = definition;
// normalize merge and validate methods if subschema is present
if (typeof normalizedDefinition.schema === "object") {
const schema = new ObjectSchema(normalizedDefinition.schema);
normalizedDefinition = {
...normalizedDefinition,
merge(first = {}, second = {}) {
return schema.merge(first, second);
},
validate(value) {
ValidationStrategy.object(value);
schema.validate(value);
},
};
}
// normalize the merge method in case there's a string
if (typeof normalizedDefinition.merge === "string") {
normalizedDefinition = {
...normalizedDefinition,
merge: MergeStrategy[normalizedDefinition.merge],
};
}
// normalize the validate method in case there's a string
if (typeof normalizedDefinition.validate === "string") {
normalizedDefinition = {
...normalizedDefinition,
validate: ValidationStrategy[normalizedDefinition.validate],
};
}
this.#definitions.set(key, normalizedDefinition);
if (normalizedDefinition.required) {
this.#requiredKeys.set(key, normalizedDefinition);
}
}
}
/**
* Determines if a strategy has been registered for the given object key.
* @param {string} key The object key to find a strategy for.
* @returns {boolean} True if the key has a strategy registered, false if not.
*/
hasKey(key) {
return this.#definitions.has(key);
}
/**
* Merges objects together to create a new object comprised of the keys
* of the all objects. Keys are merged based on the each key's merge
* strategy.
* @param {...Object} objects The objects to merge.
* @returns {Object} A new object with a mix of all objects' keys.
* @throws {TypeError} If any object is invalid.
*/
merge(...objects) {
// double check arguments
if (objects.length < 2) {
throw new TypeError("merge() requires at least two arguments.");
}
if (
objects.some(
object => object === null || typeof object !== "object",
)
) {
throw new TypeError("All arguments must be objects.");
}
return objects.reduce((result, object) => {
this.validate(object);
for (const [key, strategy] of this.#definitions) {
try {
if (key in result || key in object) {
const merge = /** @type {Function} */ (strategy.merge);
const value = merge.call(
this,
result[key],
object[key],
);
if (value !== undefined) {
result[key] = value;
}
}
} catch (ex) {
throw new WrapperError(key, ex);
}
}
return result;
}, {});
}
/**
* Validates an object's keys based on the validate strategy for each key.
* @param {Object} object The object to validate.
* @returns {void}
* @throws {Error} When the object is invalid.
*/
validate(object) {
// check existing keys first
for (const key of Object.keys(object)) {
// check to see if the key is defined
if (!this.hasKey(key)) {
throw new UnexpectedKeyError(key);
}
// validate existing keys
const definition = /** @type {PropertyDefinition} */ (
this.#definitions.get(key)
); // `definition` is guaranteed to exist since we check with `hasKey()` above.
// first check to see if any other keys are required
if (Array.isArray(definition.requires)) {
if (
!definition.requires.every(otherKey => otherKey in object)
) {
throw new MissingDependentKeysError(
key,
definition.requires,
);
}
}
// now apply remaining validation strategy
try {
const validate = /** @type {Function} */ (definition.validate);
validate.call(definition, object[key]);
} catch (ex) {
throw new WrapperError(key, ex);
}
}
// ensure required keys aren't missing
for (const [key] of this.#requiredKeys) {
if (!(key in object)) {
throw new MissingKeyError(key);
}
}
}
}
exports.MergeStrategy = MergeStrategy;
exports.ObjectSchema = ObjectSchema;
exports.ValidationStrategy = ValidationStrategy;
@@ -0,0 +1,8 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { ScopeManager } from '../ScopeManager';
import type { Scope } from './Scope';
import { ScopeBase } from './ScopeBase';
import { ScopeType } from './ScopeType';
export declare class TSEnumScope extends ScopeBase<ScopeType.tsEnum, TSESTree.TSEnumDeclaration, Scope> {
constructor(scopeManager: ScopeManager, upperScope: TSEnumScope['upper'], block: TSEnumScope['block']);
}
@@ -0,0 +1,99 @@
import { Buffer } from 'buffer';
import { Minipass } from 'minipass';
import * as realZlib from 'zlib';
export { constants } from './constants.js';
declare const _superWrite: unique symbol;
export declare class ZlibError extends Error {
code?: string;
errno?: number;
constructor(err: NodeJS.ErrnoException | Error, origin?: Function);
get name(): string;
}
declare const _flushFlag: unique symbol;
export type ChunkWithFlushFlag = Minipass.ContiguousData & {
[_flushFlag]?: number;
};
export type ZlibBaseOptions = Minipass.Options<Minipass.ContiguousData> & {
flush?: number;
finishFlush?: number;
fullFlushFlag?: number;
};
export type ZlibHandle = realZlib.Gzip | realZlib.Gunzip | realZlib.Deflate | realZlib.Inflate | realZlib.DeflateRaw | realZlib.InflateRaw | realZlib.BrotliCompress | realZlib.BrotliDecompress | realZlib.ZstdCompress | realZlib.ZstdDecompress;
export type ZlibMode = 'Gzip' | 'Gunzip' | 'Deflate' | 'Inflate' | 'DeflateRaw' | 'InflateRaw' | 'Unzip';
export type BrotliMode = 'BrotliCompress' | 'BrotliDecompress';
export type ZstdMode = 'ZstdCompress' | 'ZstdDecompress';
declare abstract class ZlibBase extends Minipass<Buffer, ChunkWithFlushFlag> {
#private;
get sawError(): boolean;
get handle(): ZlibHandle | undefined;
get flushFlag(): number;
constructor(opts: ZlibBaseOptions, mode: ZlibMode | BrotliMode | ZstdMode);
close(): void;
reset(): any;
flush(flushFlag?: number): void;
end(cb?: () => void): this;
end(chunk: ChunkWithFlushFlag, cb?: () => void): this;
end(chunk: ChunkWithFlushFlag, encoding?: Minipass.Encoding, cb?: () => void): this;
get ended(): boolean;
[_superWrite](data: Buffer & {
[_flushFlag]?: number;
}): boolean;
write(chunk: ChunkWithFlushFlag, cb?: () => void): boolean;
write(chunk: ChunkWithFlushFlag, encoding?: Minipass.Encoding, cb?: () => void): boolean;
}
export type ZlibOptions = ZlibBaseOptions & {
level?: number;
strategy?: number;
};
export declare class Zlib extends ZlibBase {
#private;
constructor(opts: ZlibOptions, mode: ZlibMode);
params(level: number, strategy: number): void;
}
export declare class Deflate extends Zlib {
constructor(opts: ZlibOptions);
}
export declare class Inflate extends Zlib {
constructor(opts: ZlibOptions);
}
export type GzipOptions = ZlibOptions & {
portable?: boolean;
};
export declare class Gzip extends Zlib {
#private;
constructor(opts: GzipOptions);
[_superWrite](data: Buffer & {
[_flushFlag]?: number;
}): boolean;
}
export declare class Gunzip extends Zlib {
constructor(opts: ZlibOptions);
}
export declare class DeflateRaw extends Zlib {
constructor(opts: ZlibOptions);
}
export declare class InflateRaw extends Zlib {
constructor(opts: ZlibOptions);
}
export declare class Unzip extends Zlib {
constructor(opts: ZlibOptions);
}
declare class Brotli extends ZlibBase {
constructor(opts: ZlibOptions, mode: BrotliMode);
}
export declare class BrotliCompress extends Brotli {
constructor(opts: ZlibOptions);
}
export declare class BrotliDecompress extends Brotli {
constructor(opts: ZlibOptions);
}
declare class Zstd extends ZlibBase {
constructor(opts: ZlibOptions, mode: ZstdMode);
}
export declare class ZstdCompress extends Zstd {
constructor(opts: ZlibOptions);
}
export declare class ZstdDecompress extends Zstd {
constructor(opts: ZlibOptions);
}
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,347 @@
'use strict'
const { states, opcodes } = require('./constants')
const { isUtf8 } = require('node:buffer')
const { removeHTTPWhitespace } = require('../fetch/data-url')
const { collectASequenceOfCodePointsFast } = require('../infra')
/**
* @param {number} readyState
* @returns {boolean}
*/
function isConnecting (readyState) {
// If the WebSocket connection is not yet established, and the connection
// is not yet closed, then the WebSocket connection is in the CONNECTING state.
return readyState === states.CONNECTING
}
/**
* @param {number} readyState
* @returns {boolean}
*/
function isEstablished (readyState) {
// If the server's response is validated as provided for above, it is
// said that _The WebSocket Connection is Established_ and that the
// WebSocket Connection is in the OPEN state.
return readyState === states.OPEN
}
/**
* @param {number} readyState
* @returns {boolean}
*/
function isClosing (readyState) {
// Upon either sending or receiving a Close control frame, it is said
// that _The WebSocket Closing Handshake is Started_ and that the
// WebSocket connection is in the CLOSING state.
return readyState === states.CLOSING
}
/**
* @param {number} readyState
* @returns {boolean}
*/
function isClosed (readyState) {
return readyState === states.CLOSED
}
/**
* @see https://dom.spec.whatwg.org/#concept-event-fire
* @param {string} e
* @param {EventTarget} target
* @param {(...args: ConstructorParameters<typeof Event>) => Event} eventFactory
* @param {EventInit | undefined} eventInitDict
* @returns {void}
*/
function fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) {
// 1. If eventConstructor is not given, then let eventConstructor be Event.
// 2. Let event be the result of creating an event given eventConstructor,
// in the relevant realm of target.
// 3. Initialize event’s type attribute to e.
const event = eventFactory(e, eventInitDict)
// 4. Initialize any other IDL attributes of event as described in the
// invocation of this algorithm.
// 5. Return the result of dispatching event at target, with legacy target
// override flag set if set.
target.dispatchEvent(event)
}
/**
* @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol
* @param {import('./websocket').Handler} handler
* @param {number} type Opcode
* @param {Buffer} data application data
* @returns {void}
*/
function websocketMessageReceived (handler, type, data) {
handler.onMessage(type, data)
}
/**
* @param {Buffer} buffer
* @returns {ArrayBuffer}
*/
function toArrayBuffer (buffer) {
if (buffer.byteLength === buffer.buffer.byteLength) {
return buffer.buffer
}
return new Uint8Array(buffer).buffer
}
/**
* @see https://datatracker.ietf.org/doc/html/rfc6455
* @see https://datatracker.ietf.org/doc/html/rfc2616
* @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407
* @param {string} protocol
* @returns {boolean}
*/
function isValidSubprotocol (protocol) {
// If present, this value indicates one
// or more comma-separated subprotocol the client wishes to speak,
// ordered by preference. The elements that comprise this value
// MUST be non-empty strings with characters in the range U+0021 to
// U+007E not including separator characters as defined in
// [RFC2616] and MUST all be unique strings.
if (protocol.length === 0) {
return false
}
for (let i = 0; i < protocol.length; ++i) {
const code = protocol.charCodeAt(i)
if (
code < 0x21 || // CTL, contains SP (0x20) and HT (0x09)
code > 0x7E ||
code === 0x22 || // "
code === 0x28 || // (
code === 0x29 || // )
code === 0x2C || // ,
code === 0x2F || // /
code === 0x3A || // :
code === 0x3B || // ;
code === 0x3C || // <
code === 0x3D || // =
code === 0x3E || // >
code === 0x3F || // ?
code === 0x40 || // @
code === 0x5B || // [
code === 0x5C || // \
code === 0x5D || // ]
code === 0x7B || // {
code === 0x7D // }
) {
return false
}
}
return true
}
/**
* @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4
* @param {number} code
* @returns {boolean}
*/
function isValidStatusCode (code) {
if (code >= 1000 && code < 1015) {
return (
code !== 1004 && // reserved
code !== 1005 && // "MUST NOT be set as a status code"
code !== 1006 // "MUST NOT be set as a status code"
)
}
return code >= 3000 && code <= 4999
}
/**
* @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5
* @param {number} opcode
* @returns {boolean}
*/
function isControlFrame (opcode) {
return (
opcode === opcodes.CLOSE ||
opcode === opcodes.PING ||
opcode === opcodes.PONG
)
}
/**
* @param {number} opcode
* @returns {boolean}
*/
function isContinuationFrame (opcode) {
return opcode === opcodes.CONTINUATION
}
/**
* @param {number} opcode
* @returns {boolean}
*/
function isTextBinaryFrame (opcode) {
return opcode === opcodes.TEXT || opcode === opcodes.BINARY
}
/**
*
* @param {number} opcode
* @returns {boolean}
*/
function isValidOpcode (opcode) {
return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode)
}
/**
* Parses a Sec-WebSocket-Extensions header value.
* @param {string} extensions
* @returns {Map<string, string>}
*/
// TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1
function parseExtensions (extensions) {
const position = { position: 0 }
const extensionList = new Map()
while (position.position < extensions.length) {
const pair = collectASequenceOfCodePointsFast(';', extensions, position)
const [name, value = ''] = pair.split('=', 2)
extensionList.set(
removeHTTPWhitespace(name, true, false),
removeHTTPWhitespace(value, false, true)
)
position.position++
}
return extensionList
}
/**
* @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2
* @description "client-max-window-bits = 1*DIGIT"
* @param {string} value
* @returns {boolean}
*/
function isValidClientWindowBits (value) {
// Must have at least one character
if (value.length === 0) {
return false
}
// Check all characters are ASCII digits
for (let i = 0; i < value.length; i++) {
const byte = value.charCodeAt(i)
if (byte < 0x30 || byte > 0x39) {
return false
}
}
// Check numeric range: zlib requires windowBits in range 8-15
const num = Number.parseInt(value, 10)
return num >= 8 && num <= 15
}
/**
* @see https://whatpr.org/websockets/48/7b748d3...d5570f3.html#get-a-url-record
* @param {string} url
* @param {string} [baseURL]
*/
function getURLRecord (url, baseURL) {
// 1. Let urlRecord be the result of applying the URL parser to url with baseURL .
// 2. If urlRecord is failure, then throw a " SyntaxError " DOMException .
let urlRecord
try {
urlRecord = new URL(url, baseURL)
} catch (e) {
throw new DOMException(e, 'SyntaxError')
}
// 3. If urlRecord ’s scheme is " http ", then set urlRecord ’s scheme to " ws ".
// 4. Otherwise, if urlRecord ’s scheme is " https ", set urlRecord ’s scheme to " wss ".
if (urlRecord.protocol === 'http:') {
urlRecord.protocol = 'ws:'
} else if (urlRecord.protocol === 'https:') {
urlRecord.protocol = 'wss:'
}
// 5. If urlRecord ’s scheme is not " ws " or " wss ", then throw a " SyntaxError " DOMException .
if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') {
throw new DOMException('expected a ws: or wss: url', 'SyntaxError')
}
// If urlRecord ’s fragment is non-null, then throw a " SyntaxError " DOMException .
if (urlRecord.hash.length || urlRecord.href.endsWith('#')) {
throw new DOMException('hash', 'SyntaxError')
}
// Return urlRecord .
return urlRecord
}
// https://whatpr.org/websockets/48.html#validate-close-code-and-reason
function validateCloseCodeAndReason (code, reason) {
// 1. If code is not null, but is neither an integer equal to
// 1000 nor an integer in the range 3000 to 4999, inclusive,
// throw an "InvalidAccessError" DOMException.
if (code !== null) {
if (code !== 1000 && (code < 3000 || code > 4999)) {
throw new DOMException('invalid code', 'InvalidAccessError')
}
}
// 2. If reason is not null, then:
if (reason !== null) {
// 2.1. Let reasonBytes be the result of UTF-8 encoding reason.
// 2.2. If reasonBytes is longer than 123 bytes, then throw a
// "SyntaxError" DOMException.
const reasonBytesLength = Buffer.byteLength(reason)
if (reasonBytesLength > 123) {
throw new DOMException(`Reason must be less than 123 bytes; received ${reasonBytesLength}`, 'SyntaxError')
}
}
}
/**
* Converts a Buffer to utf-8, even on platforms without icu.
* @type {(buffer: Buffer) => string}
*/
const utf8Decode = (() => {
if (typeof process.versions.icu === 'string') {
const fatalDecoder = new TextDecoder('utf-8', { fatal: true })
return fatalDecoder.decode.bind(fatalDecoder)
}
return function (buffer) {
if (isUtf8(buffer)) {
return buffer.toString('utf-8')
}
throw new TypeError('Invalid utf-8 received.')
}
})()
module.exports = {
isConnecting,
isEstablished,
isClosing,
isClosed,
fireEvent,
isValidSubprotocol,
isValidStatusCode,
websocketMessageReceived,
utf8Decode,
isControlFrame,
isContinuationFrame,
isTextBinaryFrame,
isValidOpcode,
parseExtensions,
isValidClientWindowBits,
toArrayBuffer,
getURLRecord,
validateCloseCodeAndReason
}
@@ -0,0 +1,12 @@
/**
* @fileoverview exports for config helpers
* @author Nicholas C. Zakas
*/
"use strict";
const { defineConfig, globalIgnores } = require("@eslint/config-helpers");
module.exports = {
defineConfig,
globalIgnores,
};
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parsePromiseDef = void 0;
const parseDef_js_1 = require("../parseDef.js");
function parsePromiseDef(def, refs) {
return (0, parseDef_js_1.parseDef)(def.type._def, refs);
}
exports.parsePromiseDef = parsePromiseDef;
@@ -0,0 +1,43 @@
"use client";
import { frame } from 'motion-dom';
import { MotionGlobalConfig } from 'motion-utils';
import { useRef, useEffect } from 'react';
import { useInstantLayoutTransition } from '../projection/use-instant-layout-transition.mjs';
import { useForceUpdate } from './use-force-update.mjs';
function useInstantTransition() {
const [forceUpdate, forcedRenderCount] = useForceUpdate();
const startInstantLayoutTransition = useInstantLayoutTransition();
const unlockOnFrameRef = useRef(-1);
useEffect(() => {
/**
* Unblock after two animation frames, otherwise this will unblock too soon.
*/
frame.postRender(() => frame.postRender(() => {
/**
* If the callback has been called again after the effect
* triggered this 2 frame delay, don't unblock animations. This
* prevents the previous effect from unblocking the current
* instant transition too soon. This becomes more likely when
* used in conjunction with React.startTransition().
*/
if (forcedRenderCount !== unlockOnFrameRef.current)
return;
MotionGlobalConfig.instantAnimations = false;
}));
}, [forcedRenderCount]);
return (callback) => {
startInstantLayoutTransition(() => {
MotionGlobalConfig.instantAnimations = true;
forceUpdate();
callback();
unlockOnFrameRef.current = forcedRenderCount + 1;
});
};
}
function disableInstantTransitions() {
MotionGlobalConfig.instantAnimations = false;
}
export { disableInstantTransitions, useInstantTransition };
//# sourceMappingURL=use-instant-transition.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"honoWebStandardStreamableHttp.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/honoWebStandardStreamableHttp.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -0,0 +1 @@
{"version":3,"file":"sha3-addons.js","sourceRoot":"","sources":["src/sha3-addons.ts"],"names":[],"mappings":"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 truncated
@@ -0,0 +1,143 @@
"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 () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNameLocationInGlobalDirectiveComment = getNameLocationInGlobalDirectiveComment;
exports.forEachReturnStatement = forEachReturnStatement;
exports.forEachChildESTree = forEachChildESTree;
const visitor_keys_1 = require("@typescript-eslint/visitor-keys");
const ts = __importStar(require("typescript"));
const escapeRegExp_1 = require("./escapeRegExp");
// deeply re-export, for convenience
__exportStar(require("@typescript-eslint/utils/ast-utils"), exports);
// The following is copied from `eslint`'s source code since it doesn't exist in eslint@5.
// https://github.com/eslint/eslint/blob/145aec1ab9052fbca96a44d04927c595951b1536/lib/rules/utils/ast-utils.js#L1751-L1779
// Could be export { getNameLocationInGlobalDirectiveComment } from 'eslint/lib/rules/utils/ast-utils'
/**
* Get the `loc` object of a given name in a `/*globals` comment directive.
* @param sourceCode The source code to convert index to loc.
* @param comment The `/*globals` comment directive which include the name.
* @param name The name to find.
* @returns The `loc` object.
*/
function getNameLocationInGlobalDirectiveComment(sourceCode, comment, name) {
const namePattern = new RegExp(`[\\s,]${(0, escapeRegExp_1.escapeRegExp)(name)}(?:$|[\\s,:])`, 'gu');
// To ignore the first text "global".
namePattern.lastIndex = comment.value.indexOf('global') + 6;
// Search a given variable name.
const match = namePattern.exec(comment.value);
// Convert the index to loc.
const start = sourceCode.getLocFromIndex(comment.range[0] + '/*'.length + (match ? match.index + 1 : 0));
const end = {
column: start.column + (match ? name.length : 1),
line: start.line,
};
return { end, start };
}
// Copied from typescript https://github.com/microsoft/TypeScript/blob/42b0e3c4630c129ca39ce0df9fff5f0d1b4dd348/src/compiler/utilities.ts#L1335
// Warning: This has the same semantics as the forEach family of functions,
// in that traversal terminates in the event that 'visitor' supplies a truthy value.
function forEachReturnStatement(body, visitor) {
return traverse(body);
function traverse(node) {
switch (node.kind) {
case ts.SyntaxKind.ReturnStatement:
return visitor(node);
case ts.SyntaxKind.CaseBlock:
case ts.SyntaxKind.Block:
case ts.SyntaxKind.IfStatement:
case ts.SyntaxKind.DoStatement:
case ts.SyntaxKind.WhileStatement:
case ts.SyntaxKind.ForStatement:
case ts.SyntaxKind.ForInStatement:
case ts.SyntaxKind.ForOfStatement:
case ts.SyntaxKind.WithStatement:
case ts.SyntaxKind.SwitchStatement:
case ts.SyntaxKind.CaseClause:
case ts.SyntaxKind.DefaultClause:
case ts.SyntaxKind.LabeledStatement:
case ts.SyntaxKind.TryStatement:
case ts.SyntaxKind.CatchClause:
return ts.forEachChild(node, traverse);
}
return undefined;
}
}
function isESTreeNodeLike(node) {
return (typeof node === 'object' &&
node != null &&
'type' in node &&
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
typeof node.type === 'string');
}
/**
* Rough equivalent to ts.forEachChild for ESTree nodes.
* It returns the first truthy value returned by the callback, if any.
*/
function forEachChildESTree(node, callback) {
function visit(currentNode) {
const result = callback(currentNode);
if (result) {
return result;
}
const currentKeys = visitor_keys_1.visitorKeys[currentNode.type];
if (!currentKeys) {
return undefined;
}
for (const key of currentKeys) {
const currentProperty = currentNode[key];
if (Array.isArray(currentProperty)) {
for (const child of currentProperty) {
if (isESTreeNodeLike(child)) {
const result = visit(child);
if (result) {
return result;
}
}
}
}
else if (isESTreeNodeLike(currentProperty)) {
const result = visit(currentProperty);
if (result) {
return result;
}
}
}
return undefined;
}
return visit(node);
}
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Smile = createLucideIcon("Smile", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
]);
export { Smile as default };
//# sourceMappingURL=smile.js.map
@@ -0,0 +1,922 @@
flf2a$ 9 8 19 0 3 0 64 0
Font Author: CoSMiC cHiLD
FIGFont created by patorjk.com's FIGFont Editor: http://patorjk.com/figfont-editor
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
▄████████$@
███ ███$@
███ ███$@
███ ███$@
▀███████████$@
███ ███$@
███ ███$@
███ █▀ $@
@@
▀█████████▄ $@
███ ███$@
███ ███$@
▄███▄▄▄██▀ $@
▀▀███▀▀▀██▄ $@
███ ██▄$@
███ ███$@
▄█████████▀ $@
@@
▄████████$@
███ ███$@
███ █▀ $@
███ $@
███ $@
███ █▄ $@
███ ███$@
████████▀ $@
@@
████████▄ $@
███ ▀███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ▄███$@
████████▀ $@
@@
▄████████$@
███ ███$@
███ █▀ $@
▄███▄▄▄ $@
▀▀███▀▀▀ $@
███ █▄ $@
███ ███$@
██████████$@
@@
▄████████$@
███ ███$@
███ █▀ $@
▄███▄▄▄ $@
▀▀███▀▀▀ $@
███ $@
███ $@
███ $@
@@
▄██████▄ $@
███ ███$@
███ █▀ $@
▄███ $@
▀▀███ ████▄ $@
███ ███$@
███ ███$@
████████▀ $@
@@
▄█ █▄ $@
███ ███ $@
███ ███ $@
▄███▄▄▄▄███▄▄$@
▀▀███▀▀▀▀███▀ $@
███ ███ $@
███ ███ $@
███ █▀ $@
@@
▄█ $@
███ $@
███▌$@
███▌$@
███▌$@
███ $@
███ $@
█▀ $@
@@
▄█$@
███$@
███$@
███$@
███$@
███$@
███$@
█▄ ▄███$@
▀▀▀▀▀▀ $@@
▄█ ▄█▄$@
███ ▄███▀$@
███▐██▀ $@
▄█████▀ $@
▀▀█████▄ $@
███▐██▄ $@
███ ▀███▄$@
███ ▀█▀$@
▀ $@@
▄█ $@
███ $@
███ $@
███ $@
███ $@
███ $@
███▌ ▄$@
█████▄▄██$@
▀ $@@
▄▄▄▄███▄▄▄▄ $@
▄██▀▀▀███▀▀▀██▄$@
███ ███ ███$@
███ ███ ███$@
███ ███ ███$@
███ ███ ███$@
███ ███ ███$@
▀█ ███ █▀ $@
@@
███▄▄▄▄ $@
███▀▀▀██▄$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
▀█ █▀ $@
@@
▄██████▄ $@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
▀██████▀ $@
@@
▄███████▄$@
███ ███$@
███ ███$@
███ ███$@
▀█████████▀ $@
███ $@
███ $@
▄████▀ $@
@@
████████▄ $@
███ ███ $@
███ ███ $@
███ ███ $@
███ ███ $@
███ ███ $@
███ ▀ ███ $@
▀██████▀▄█$@
@@
▄████████$@
███ ███$@
███ ███$@
▄███▄▄▄▄██▀$@
▀▀███▀▀▀▀▀ $@
▀███████████$@
███ ███$@
███ ███$@
███ ███$@@
▄████████$@
███ ███$@
███ █▀ $@
███ $@
▀███████████$@
███$@
▄█ ███$@
▄████████▀ $@
@@
███ $@
▀█████████▄$@
▀███▀▀██$@
███ ▀$@
███ $@
███ $@
███ $@
▄████▀ $@
@@
███ █▄ $@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
████████▀ $@
@@
▄█ █▄ $@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
▀██████▀ $@
@@
▄█ █▄ $@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ▄█▄ ███$@
▀███▀███▀ $@
@@
▀████ ▐████▀$@
███▌ ████▀ $@
███ ▐███ $@
▀███▄███▀ $@
████▀██▄ $@
▐███ ▀███ $@
▄███ ███▄ $@
████ ███▄$@
@@
▄██ ▄ $@
███ ██▄$@
███▄▄▄███$@
▀▀▀▀▀▀███$@
▄██ ███$@
███ ███$@
███ ███$@
▀█████▀ $@
@@
▄███████▄ $@
██▀ ▄██$@
▄███▀$@
▀█▀▄███▀▄▄$@
▄███▀ ▀$@
▄███▀ $@
███▄ ▄█$@
▀████████▀$@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
▄████████$@
███ ███$@
███ ███$@
███ ███$@
▀███████████$@
███ ███$@
███ ███$@
███ █▀ $@
@@
▀█████████▄ $@
███ ███$@
███ ███$@
▄███▄▄▄██▀ $@
▀▀███▀▀▀██▄ $@
███ ██▄$@
███ ███$@
▄█████████▀ $@
@@
▄████████$@
███ ███$@
███ █▀ $@
███ $@
███ $@
███ █▄ $@
███ ███$@
████████▀ $@
@@
████████▄ $@
███ ▀███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ▄███$@
████████▀ $@
@@
▄████████$@
███ ███$@
███ █▀ $@
▄███▄▄▄ $@
▀▀███▀▀▀ $@
███ █▄ $@
███ ███$@
██████████$@
@@
▄████████$@
███ ███$@
███ █▀ $@
▄███▄▄▄ $@
▀▀███▀▀▀ $@
███ $@
███ $@
███ $@
@@
▄██████▄ $@
███ ███$@
███ █▀ $@
▄███ $@
▀▀███ ████▄ $@
███ ███$@
███ ███$@
████████▀ $@
@@
▄█ █▄ $@
███ ███ $@
███ ███ $@
▄███▄▄▄▄███▄▄$@
▀▀███▀▀▀▀███▀ $@
███ ███ $@
███ ███ $@
███ █▀ $@
@@
▄█ $@
███ $@
███▌$@
███▌$@
███▌$@
███ $@
███ $@
█▀ $@
@@
▄█$@
███$@
███$@
███$@
███$@
███$@
███$@
█▄ ▄███$@
▀▀▀▀▀▀ $@@
▄█ ▄█▄$@
███ ▄███▀$@
███▐██▀ $@
▄█████▀ $@
▀▀█████▄ $@
███▐██▄ $@
███ ▀███▄$@
███ ▀█▀$@
▀ $@@
▄█ $@
███ $@
███ $@
███ $@
███ $@
███ $@
███▌ ▄$@
█████▄▄██$@
▀ $@@
▄▄▄▄███▄▄▄▄ $@
▄██▀▀▀███▀▀▀██▄$@
███ ███ ███$@
███ ███ ███$@
███ ███ ███$@
███ ███ ███$@
███ ███ ███$@
▀█ ███ █▀ $@
@@
███▄▄▄▄ $@
███▀▀▀██▄$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
▀█ █▀ $@
@@
▄██████▄ $@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
▀██████▀ $@
@@
▄███████▄$@
███ ███$@
███ ███$@
███ ███$@
▀█████████▀ $@
███ $@
███ $@
▄████▀ $@
@@
████████▄ $@
███ ███ $@
███ ███ $@
███ ███ $@
███ ███ $@
███ ███ $@
███ ▀ ███ $@
▀██████▀▄█$@
@@
▄████████$@
███ ███$@
███ ███$@
▄███▄▄▄▄██▀$@
▀▀███▀▀▀▀▀ $@
▀███████████$@
███ ███$@
███ ███$@
███ ███$@@
▄████████$@
███ ███$@
███ █▀ $@
███ $@
▀███████████$@
███$@
▄█ ███$@
▄████████▀ $@
@@
███ $@
▀█████████▄$@
▀███▀▀██$@
███ ▀$@
███ $@
███ $@
███ $@
▄████▀ $@
@@
███ █▄ $@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
████████▀ $@
@@
▄█ █▄ $@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
▀██████▀ $@
@@
▄█ █▄ $@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ███$@
███ ▄█▄ ███$@
▀███▀███▀ $@
@@
▀████ ▐████▀$@
███▌ ████▀ $@
███ ▐███ $@
▀███▄███▀ $@
████▀██▄ $@
▐███ ▀███ $@
▄███ ███▄ $@
████ ███▄$@
@@
▄██ ▄ $@
███ ██▄$@
███▄▄▄███$@
▀▀▀▀▀▀███$@
▄██ ███$@
███ ███$@
███ ███$@
▀█████▀ $@
@@
▄███████▄ $@
██▀ ▄██$@
▄███▀$@
▀█▀▄███▀▄▄$@
▄███▀ ▀$@
▄███▀ $@
███▄ ▄█$@
▀████████▀$@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@
@@
@@ -0,0 +1,829 @@
flf2a$ 8 7 13 63 3 0 20415 1
Version 1.0 April 2001
Characters by Henry Segerman henryseg@email.com,
Converted to FIGlet font by Markus Gebhard markus@jave.de
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
__ @
LJ @
FJ @
J__L@
__ @
J__L@
|__|@
@@
_ _ @
EJ LJ@
-- --@
@
@
@
@
@@
_ _ @
_FJ__L]_ @
| __ | @
_| |__| |_ @
L_ __ _J@
LJ__F__J__LJ@
|__L J__| @
@@
_F]_ @
F ___L @
J (___| @
J\___ \ @
.--___) \@
J\__ __J@
J__LJ__F@
LJ @@
_ _ @
FJ // @
--/ F @
/ /' @
/ F __ @
/__/F L_|@
J___| L_J@
@@
___ @
F _ ", @
J '-'(| @
/ ,-, V\ @
F L_/ < @
J\____,_-L@
J____,_-'@
@@
__@
FJ@
L-@
- @
$@
@
@
@@
_ @
.'_| @
/ /-' @
| L @
\ \__ @
\'.__L@
'.__|@
@@
_ @
|_'. @
'-\ \@
J |@
__/ /@
J__.'/@
|__.' @
@@
__ @
/\FJ/\ @
\ / @
.' '. @
J\.n n./L@
\/J__L\/ @
|__| @
@@
@
__ @
__FJ__ @
|__ __|@
L_J__L_J@
J__L @
@
@@
@
@
@
@
__ @
J L@
|_F @
|_F @@
@
@
______ @
|______|@
L______J@
$ @
@
@@
@
@
@
@
__ @
J__L@
|__|@
@@
_@
//@
/ F@
/ /'@
/ F @
/__/F @
J___| @
@@
____ @
F _ ] @
J |/ | L @
| | /| | @
F /_J J @
J\______/F@
J______F @
@@
__ @
/ J @
LFJ @
J L@
J L@
J__L@
|__|@
@@
____ @
/ _ `. @
J_/-7 .' @
`-:'.'.' @
.' ;_J__ @
J________L@
|________|@
@@
____ @
F___ J @
`-__| L @
|__ ( @
.-____] J @
J\______/F@
J______F @
@@
_ _ @
FJ L] @
J |__| L @
|____ | @
L____J J @
J__L@
J__|@
@@
____ @
F ___L @
J |___| @
|____ \ @
.--___) \@
J\______J@
J______F@
@@
____ @
F ___] @
J `--_] @
| ,--. L @
F L__J | @
J\______/L@
J______F @
@@
____ @
F___ ]@
`--7 /@
/ //@
J L @
J__L @
|__| @
@@
____ @
F __ J @
J `--' L @
/ ,--. \ @
F L__J J @
J\______/L@
J______F @
@@
____ @
F __ J @
J '--' L @
J`---. | @
`---J J @
J__L@
J__|@
@@
@
__ @
LJ @
-- @
__ @
J__L@
|__|@
@@
@
__ @
LJ @
-- @
__ @
J L@
|_F @
|_F @@
_ @
_-""_L @
," .""-' @
|"-_"--_ @
"-_"--_L@
"--_|@
@
@@
@
_____ @
|_____| @
_:_____:_@
L_______J@
L_______J@
@
@@
_ @
J_""-_ @
`-"". ",@
__--"_-"|@
J_--""_-" @
|_--" @
@
@@
____ @
,"__ ".@
FJ--/ J|@
-- /_// @
J__/ @
J__L @
|__| @
@@
____ @
F __ ] @
J | | L @
| |[L' | @
F L_-_/_ @
J\______/L@
J______F @
@@
_ @
/.\ @
//_\\ @
/ ___ \ @
/ L___J \ @
J__L J__L@
|__L J__|@
@@
___ @
F _ ", @
J `-'(| @
| ,--.\ @
F L__J \@
J_______J@
|_______F@
@@
___ @
,"___". @
FJ---L] @
J | LJ @
| \___--.@
J\_____/F@
J_____F @
@@
___ @
F __". @
J |--\ L@
| | J |@
F L__J |@
J______/F@
|______F @
@@
____ @
F ___J @
J |___: @
| _____| @
F L____: @
J________L@
|________|@
@@
____ @
F ___J @
J |___: @
| _____|@
F |____J@
J__F @
|__| @
@@
___ @
,"___". @
FJ---L] @
J | [""L@
| \___] |@
J\_____/F@
J_____F @
@@
_ _ @
FJ L] @
J |__| L @
| __ | @
F L__J J @
J__L J__L@
|__L J__|@
@@
__ @
FJ @
J L @
| | @
F J @
J____L@
|____|@
@@
_ @
L] @
| L@
| |@
.--__J J@
J\_____/@
J_____/@
@@
_ _ @
FJ / ; @
J |/ (| @
| L @
F L:\ L @
J__L \\__L@
|__L \L_|@
@@
_ @
FJ @
J | @
| | @
F L_____ @
J________L@
|________|@
@@
__ __ @
F \/ ] @
J |\__/| L @
| |`--'| | @
F L J J @
J__L J__L@
|__L J__|@
@@
_ _ @
F L L] @
J \| L @
| |\ | @
F L\\ J @
J__L \\__L@
|__L J__|@
@@
____ @
F __ ] @
J |--| L @
| | | | @
F L__J J @
J\______/F@
J______F @
@@
___ @
F _ ",@
J `-' |@
| __/F@
F |__/ @
J__| @
|__L @
@@
____ @
F __ ] @
J |--| L @
| | _| | @
F L_F J @
J\_____ \@
J_____\J]@
\J @@
___ @
F _ ", @
J `-'(| @
| _ L @
F |_\ L @
J__| \\__L@
|__| J__|@
@@
___ @
F __". @
J (___| @
J\___ \ @
.--___) \@
J\______J@
J______F@
@@
____ @
/_ _\@
[J L]@
| | @
F J @
J____L@
|____|@
@@
_ _ @
FJ L] @
J | | L @
| | | | @
F L__J J @
J\______/F@
J______F @
@@
_ _ @
FJ L] @
J | | L@
J J F L@
J\ \/ /F@
\\__// @
\__/ @
@@
_ _ @
F L J J @
J J .. L L @
| |/ \| | @
F /\ J @
J___//\\___L@
|___/ \___|@
@@
_ _ @
FJ LJ @
J \/ F @
/ \ @
/ /\ \ @
J__//\\__L@
|__/ \__|@
@@
_ _ @
FJ LJ@
J \/ F@
J\ /L@
F J @
|____|@
|____|@
@@
____ @
[__ '. @
`--7 .' @
.'.'.' @
.' (_(__ @
J________L@
|________|@
@@
____ @
F ___J @
J |---' @
| | @
F L_____ @
J________L@
|________|@
@@
_ @
\\ @
J \ @
'\ \ @
J \ @
J\__\ @
|___L@
@@
____ @
L___ ] @
`---| L @
| | @
_____J J @
J________L@
|________|@
@@
/\ @
/ \ @
/_/\_\@
L_/\_J@
$$$ @
$ @
@
@@
@
@
@
@
$ @
________ @
|________|@
L________J@@
_ @
\\ @
\\\@
$$ @
$ @
@
@
@@
@
___ _ @
F __` L @
| |--| | @
F L__J J @
J\____,__L@
J____,__F@
@@
_ @
FJ___ @
J __ J @
| |--| | @
F L__J J @
J__,____/L@
J__,____F @
@@
@
____ @
F ___J. @
| |---LJ @
F L___--.@
J\______/F@
J______F @
@@
_ @
___FJ @
F __ L @
| |--| | @
F L__J J @
J\____,__L@
J____,__F@
@@
@
____ @
F __ J @
| _____J @
F L___--.@
J\______/F@
J______F @
@@
____ @
/ ___J@
J |_--'@
| _| @
F |_J @
J__F @
|__| @
@@
@
___ _ @
F __` L @
| |--| | @
F L__J J @
)-____ L@
J\______/F@
J______F @@
_ @
FJ___ @
J __ `. @
| |--| | @
F L J J @
J__L J__L@
|__L J__|@
@@
__ @
LJ @
@
FJ @
J L@
J__L@
|__|@
@@
__ @
LJ @
_ @
J J @
J L@
,-_J |@
\_____/@
\_____/@@
_ @
FJ __ @
J |/ /L @
| \ @
F L:\ J @
J__L \\_J.@
|__L \L_|@
@@
__ @
LJ @
FJ @
J L@
J L@
J__L@
|__|@
@@
@
_ _____ @
J '_ _ `, @
| |_||_| | @
F L LJ J J @
J__L LJ J__L@
|__L LJ J__|@
@@
@
_ ___ @
J '__ J @
| |__| | @
F L J J @
J__L J__L@
|__L J__|@
@@
@
____ @
F __ J @
| |--| | @
F L__J J @
J\______/F@
J______F @
@@
@
_ ___ @
J '__ J @
| |--| | @
F L__J J @
J _____/L@
|_J_____F @
L_J @@
@
___ _ @
F __` L @
| |--| | @
F L__J J @
J\_____ L@
J_____L_|@
L_J@@
@
_ ___ @
J '__ ",@
| |__|-J@
F L `-'@
J__L @
|__L @
@@
@
____ @
F ___J @
| '----_ @
)-____ L@
J\______/F@
J______F @
@@
_ @
FJ_ @
J _| @
| |-' @
F |__-.@
\_____/@
J_____F@
@@
@
_ _ @
J | | L @
| | | | @
F L__J J @
J\____,__L@
J____,__F@
@@
@
_ _ @
J | | L@
J J F L@
J\ \/ /F@
\\__// @
\__/ @
@@
@
_ _ @
FJ .. L] @
| |/ \| | @
F /\ J @
J\__//\\__/L@
\__/ \__/ @
@@
@
_ _ @
J \ / F @
\ ' / @
.' . `. @
J__/:\__L@
|__/ \__|@
@@
@
_ _ @
J | | L @
| | | | @
F L__J J @
)-____ L@
J\______/F@
J______F @@
@
_____ @
[__ F @
`-.'.'/ @
.' (_(_ @
J_______L@
|_______|@
@@
_ @
."_J @
_/ /-' @
|_ (/ @
L_L."-__ @
"_"-__L@
"-__|@
@@
[] @
LJ @
FJ @
J L@
J L@
J L@
|__|@
|__|@@
_ @
F_". @
'-\ \_ @
\) _|@
__-".J_J@
J__-"_" @
|__-" @
@@
@
/\/]@
/ /@
L/\//@
L/\/ @
$ @
@
@@
[] [] @
`,-.' @
//_\\ @
/ ___ \ @
/ L___J \ @
J__L J__L@
|__L J__|@
@@
[]__[] @
,"__", @
J |--| L @
| | | | @
F L__J J @
J\______/F@
J______F @
@@
[] [] @
-, ,- @
J | | L @
| | | | @
F L__J J @
J\______/F@
J______F @
@@
[] [] @
____-, @
F __ L @
| |--| | @
F L__J J @
J\____-__L@
J____-__F@
@@
[] [] @
____ @
F __ J @
| |--| | @
F L__J J @
J\______/F@
J______F @
@@
[] [] @
_ _ @
J | | L @
| | | | @
F L__J J @
J\____-__L@
J____-__F@
@@
___ @
F _ ", @
J '-'(| @
| ,--.\ @
F L__J \@
J ____J@
|__|____F@
L__| @@
160 NO-BREAK SPACE
$$@
$$@
$$@
$$@
$$@
$$@
$$@
$$@@
@@ -0,0 +1,111 @@
{
"name": "has-symbols",
"version": "1.1.0",
"description": "Determine if the JS environment has Symbol support. Supports spec, or shams.",
"main": "index.js",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run --silent lint",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"tests-only": "npm run test:stock && npm run test:shams",
"test:stock": "nyc node test",
"test:staging": "nyc node --harmony --es-staging test",
"test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs",
"test:shams:corejs": "nyc node test/shams/core-js.js",
"test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git://github.com/inspect-js/has-symbols.git"
},
"keywords": [
"Symbol",
"symbols",
"typeof",
"sham",
"polyfill",
"native",
"core-js",
"ES6"
],
"author": {
"name": "Jordan Harband",
"email": "ljharb@gmail.com",
"url": "http://ljharb.codes"
},
"contributors": [
{
"name": "Jordan Harband",
"email": "ljharb@gmail.com",
"url": "http://ljharb.codes"
}
],
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/ljharb/has-symbols/issues"
},
"homepage": "https://github.com/ljharb/has-symbols#readme",
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.0",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.0",
"@types/core-js": "^2.5.8",
"@types/tape": "^5.6.5",
"auto-changelog": "^2.5.0",
"core-js": "^2.6.12",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"get-own-property-symbols": "^0.9.5",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows",
"types"
]
}
}
@@ -0,0 +1,76 @@
{
"name": "@floating-ui/react-dom",
"version": "2.1.8",
"description": "Floating UI for React DOM",
"publishConfig": {
"access": "public"
},
"main": "./dist/floating-ui.react-dom.umd.js",
"module": "./dist/floating-ui.react-dom.esm.js",
"unpkg": "./dist/floating-ui.react-dom.umd.min.js",
"types": "./dist/floating-ui.react-dom.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/floating-ui.react-dom.d.mts",
"default": "./dist/floating-ui.react-dom.mjs"
},
"types": "./dist/floating-ui.react-dom.d.ts",
"module": "./dist/floating-ui.react-dom.esm.js",
"default": "./dist/floating-ui.react-dom.umd.js"
}
},
"sideEffects": false,
"files": [
"dist"
],
"author": "atomiks",
"license": "MIT",
"bugs": "https://github.com/floating-ui/floating-ui",
"repository": {
"type": "git",
"url": "https://github.com/floating-ui/floating-ui.git",
"directory": "packages/react-dom"
},
"homepage": "https://floating-ui.com/docs/react-dom",
"keywords": [
"tooltip",
"popover",
"dropdown",
"menu",
"popup",
"positioning",
"react",
"react-dom"
],
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"dependencies": {
"@floating-ui/dom": "^1.7.6"
},
"devDependencies": {
"@babel/preset-react": "^7.23.3",
"@testing-library/react": "^16.2.0",
"@types/react": "^18.3.19",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"use-isomorphic-layout-effect": "^1.2.1",
"config": "0.0.0"
},
"scripts": {
"lint": "eslint .",
"format": "prettier --write .",
"clean": "rimraf dist out-tsc",
"test": "vitest run",
"test:watch": "vitest watch",
"build": "rollup -c",
"build:api": "build-api --tsc tsconfig.lib.json",
"publint": "publint",
"typecheck": "tsc -b"
}
}
@@ -0,0 +1,10 @@
import * as React from 'react';
import { Primitive } from '@radix-ui/react-primitive';
type PrimitiveLabelProps = React.ComponentPropsWithoutRef<typeof Primitive.label>;
interface LabelProps extends PrimitiveLabelProps {
}
declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
declare const Root: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
export { Label, type LabelProps, Root };
@@ -0,0 +1,626 @@
export default `flf2a$ 6 5 11 0 12
This font is (c) Michel Eftimakis 1995 -- Version 1.0 -- 11 may 1995
____________________________________________________________ /\`____
| Michel Eftimakis | "Ascii-Artist" '\\/ |
| Michel.Eftimakis@vlsi.com | Boo)- (00) ||
| | (_\`'_) ||
|___________________________________|____ FRANCE ___________ _!!_ ____||
|_____________________________________________________________________|
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$$@
$$@
$$@
$$@
$$@
$$@@
_ @
( )@
|_|@
_ @
/_\\@
@@
@
()()@
$ @
$ @
$ @
@@
@
_ _ @
_| |_| |_@
( ) ( ) @
-/_|-|_\\-@
@@
_ @
( ) @
/ __|@
\\_ \\@
(___/@
|_| @@
_ _ @
(_)/ )@
/ / @
( /_ @
/_/(_)@
@@
__ @
( o) @
)( @
/ o\`')@
\\__/\\\\@
@@
__@
/_/@
$ @
$ @
$ @
@@
_ @
/ )@
| |$@
( )$@
| \\$@
\\_\\@@
_ @
( \\ @
$| |@
$( )@
$/ |@
/_/ @@
. . @
_\\\`'/_@
)_ _(@
/'\`\\ @
@
@@
@
_ @
_| |_ @
(_ _)@
/_\\ @
@@
@
@
@
_ @
(_)@
/' @@
@
@
___ @
(___)@
@
@@
@
@
@
_ @
(_)@
@@
_ @
/ )@
/ / @
( / @
/_/ @
@@
@
_ @
/ \\ @
( 0 )@
\\_/ @
@@
@
__ @
/_ |@
$( )@
$/_\\@
@@
@
__ @
|_ | @
/(_ @
/___\\@
@@
@
___@
|_ /@
__))@
\\__/@
@@
@
. @
/| @
/o) @
/___\\@
@@
@
___@
| _/@
) \\@
/__/@
@@
@
_ @
// @
(o \\@
\\__/@
@@
@
____@
|_ /@
)) @
/_\\ @
@@
@
__ @
(o )@
/o \\@
\\__/@
@@
@
__ @
/o \\@
\\_ )@
/_/@
@@
@
@
_ @
(_)@
(_)@
@@
@
@
_ @
(_)@
(_)@
/' @@
_ @
/ )@
/ /$@
( \\$@
\\_\\@
@@
@
@
____ @
(____)@
(____)@
@@
_ @
( \\ @
$\\ \\@
$/ )@
/_/ @
@@
___ @
(_, )@
// @
(_) @
$_ @
(_) @@
@
__ @
/_ \\ @
((O)_)@
$\\___/@
@@
__ @
( ) @
/o \\ @
( __ )@
/_\\/_\\@
@@
___ @
( o ) @
| \\ @
( O )@
/___/ @
@@
___ @
( _)@
| | @
( )_ @
/___\\@
@@
__ @
( ) @
| \\ @
( O )@
/___/ @
@@
____ @
( __)@
| |_ @
( _) @
/____\\@
@@
____ @
( __)@
| |_ @
( __) @
/_\\ @
@@
____ @
( __)@
| | _ @
( )_))@
/____\\@
@@
_ _ @
( )( )@
| L| |@
( __ )@
/_\\/_\\@
@@
_ @
( )@
| |@
( )@
/_\\@
@@
_ @
( )@
_ | |@
((_( )@
\\__/ @
@@
_ @
( ) __@
| |/ /@
( _ ( @
/_\\\\_|@
@@
_ @
( ) @
| | @
( )_ @
/___\\@
@@
_ _ @
( \`-' )@
| \\_/ |@
( ) ( )@
/_\\ /_\\@
@@
_ _ @
( \\ ( )@
| \\\\| |@
( )\\\\ )@
/_\\ \\_\\@
@@
__ @
( ) @
/ \\ @
( O )@
\\__/ @
@@
___ @
( ) @
| O |@
( __/ @
/_\\ @
@@
__ @
( ) @
/ \\ @
( O )@
\\__\\\\@
~@@
___ @
( ) @
| O |@
( _ ( @
/_\\\\_|@
@@
___ @
/ _) @
\\_"-. @
__) )@
/___/ @
@@
_____ @
(_ _)@
| | @
( ) @
/_\\ @
@@
_ _ @
( )( )@
| || |@
( L| )@
/____\\@
@@
_ _ @
( )( )@
| || |@
( \\/ )@
\\__/ @
@@
_ _ @
( ) ( )@
| |__| |@
( ' \` )@
\\_/\\_/ @
@@
_ _ @
( \\/ )@
\\ / @
( ) @
/_/\\_\\@
@@
_ _ @
( \\_/ )@
\\ / @
( ) @
|_| @
@@
___ @
(__ )@
// @
((_ @
/___\\@
@@
___ @
( __)@
| |$ @
( )$ @
| \\_ @
|___|@@
_ @
( \\ @
\\ \\ @
\\ ) @
\\_\\@
@@
___ @
(__ )@
$| |@
$( )@
_/ |@
|___|@@
___ @
,;\`;;;,@
;; o o|@
(; _" |@
|\\__/ @
@@
@
@
@
@
____ @
|____|@@
__ @
\\_\\@
$ @
$ @
$ @
@@
@
@
___ @
( o )@
/_^_\\@
@@
_ @
( ) @
| |_ @
( o \\@
/___/@
@@
@
@
__@
/ /@
\\_\\@
@@
_ @
( )@
_| |@
/ o )@
\\___\\@
@@
@
@
___ @
( o_)@
\\( @
@@
_ @
,'_)@
| | @
( _)@
/_\\ @
@@
@
@
__ @
/o )@
\\__\\@
_|/@@
_ @
( ) @
| |_ @
( _ )@
/_\\||@
@@
_ @
(_)@
_ @
( )@
/_\\@
@@
_ @
(_)@
_ @
( )@
| |@
/_/@@
_ @
( ) @
| | _ @
( _'( @
/_\\\\_|@
@@
_ @
( )@
| |@
( )@
/_\\@
@@
@
@
__ __ @
( _\`'_ )@
/_\\\`'/_\\@
@@
@
@
____ @
( __ )@
/_\\/_\\@
@@
@
@
___ @
( o )@
\\_/ @
@@
@
@
___ @
( o \\@
/ __/@
|_| @@
@
@
___ @
/ o )@
\\__ \\@
|_|@@
@
@
__ @
( _)@
/_\\$@
@@
@
@
__ @
(_' @
/__)@
@@
_ @
( ) @
| | @
( _)@
/_\\ @
@@
@
@
_ _ @
( U )@
/___\\@
@@
@
@
_ _ @
( V )@
\\_/ @
@@
@
@
_ _ _ @
( V V )@
\\_^_/ @
@@
@
@
__ __@
\\ V /@
/_^_\\@
@@
@
@
_ _ @
( V )@
) / @
/_/ @@
@
@
__ @
(_ ) @
/__\\@
@@
_ @
/ )@
_) )@
(_ ( @
) )@
\\_\\@@
_ @
( )@
| |@
( )@
| \\@
|_|@@
_ @
( \\ @
( (_ @
) _)@
( ( @
/_/ @@
__ __ @
(_(\\)_)@
$$ @
$$ @
$$ @
@@
()() @
( ) @
/o \\ @
( __ )@
/_\\/_\\@
@@
()() @
( ) @
/ \\ @
( O )@
\\__/ @
@@
()() @
( )( )@
| || |@
( L| )@
/____\\@
@@
@
O O @
___ @
( o )@
/_^_\\@
@@
@
O O @
___ @
( o )@
\\_/ @
@@
@
O O @
_ _ @
( U )@
/___\\@
@@
___ @
( o ) @
| \\ @
( O )@
/ _/ @
|_| @@
`
@@ -0,0 +1,403 @@
/**
* @fileoverview Rule to check for the usage of var.
* @author Jamund Ferguson
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Types
//------------------------------------------------------------------------------
/** @typedef {import("eslint-scope").Scope} Scope */
/** @typedef {import("eslint-scope").Variable} Variable */
/** @typedef {import("eslint-scope").Reference} Reference */
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Check whether a given variable is a global variable or not.
* @param {Variable} variable The variable to check.
* @returns {boolean} `true` if the variable is a global variable.
*/
function isGlobal(variable) {
return Boolean(variable.scope) && variable.scope.type === "global";
}
/**
* Finds the nearest function scope or global scope walking up the scope
* hierarchy.
* @param {Scope} scope The scope to traverse.
* @returns {Scope} a function scope or global scope containing the given
* scope.
*/
function getEnclosingFunctionScope(scope) {
let currentScope = scope;
while (currentScope.type !== "function" && currentScope.type !== "global") {
currentScope = currentScope.upper;
}
return currentScope;
}
/**
* Checks whether the given variable has any references from a more specific
* function expression (i.e. a closure).
* @param {Variable} variable A variable to check.
* @returns {boolean} `true` if the variable is used from a closure.
*/
function isReferencedInClosure(variable) {
const enclosingFunctionScope = getEnclosingFunctionScope(variable.scope);
return variable.references.some(
reference =>
getEnclosingFunctionScope(reference.from) !==
enclosingFunctionScope,
);
}
/**
* Checks whether the given node is the assignee of a loop.
* @param {ASTNode} node A VariableDeclaration node to check.
* @returns {boolean} `true` if the declaration is assigned as part of loop
* iteration.
*/
function isLoopAssignee(node) {
return (
(node.parent.type === "ForOfStatement" ||
node.parent.type === "ForInStatement") &&
node === node.parent.left
);
}
/**
* Checks whether the given variable declaration is immediately initialized.
* @param {ASTNode} node A VariableDeclaration node to check.
* @returns {boolean} `true` if the declaration has an initializer.
*/
function isDeclarationInitialized(node) {
return node.declarations.every(declarator => declarator.init !== null);
}
const SCOPE_NODE_TYPE =
/^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/u;
/**
* Gets the scope node which directly contains a given node.
* @param {ASTNode} node A node to get. This is a `VariableDeclaration` or
* an `Identifier`.
* @returns {ASTNode} A scope node. This is one of `Program`, `BlockStatement`,
* `SwitchStatement`, `ForStatement`, `ForInStatement`, and
* `ForOfStatement`.
*/
function getScopeNode(node) {
for (
let currentNode = node;
currentNode;
currentNode = currentNode.parent
) {
if (SCOPE_NODE_TYPE.test(currentNode.type)) {
return currentNode;
}
}
/* c8 ignore next */
return null;
}
/**
* Checks whether a given variable is redeclared or not.
* @param {Variable} variable A variable to check.
* @returns {boolean} `true` if the variable is redeclared.
*/
function isRedeclared(variable) {
return variable.defs.length >= 2;
}
/**
* Checks whether a given variable is used from outside of the specified scope.
* @param {ASTNode} scopeNode A scope node to check.
* @returns {Function} The predicate function which checks whether a given
* variable is used from outside of the specified scope.
*/
function isUsedFromOutsideOf(scopeNode) {
/**
* Checks whether a given reference is inside of the specified scope or not.
* @param {Reference} reference A reference to check.
* @returns {boolean} `true` if the reference is inside of the specified
* scope.
*/
function isOutsideOfScope(reference) {
const scope = scopeNode.range;
const id = reference.identifier.range;
return id[0] < scope[0] || id[1] > scope[1];
}
return function (variable) {
return variable.references.some(isOutsideOfScope);
};
}
/**
* Creates the predicate function which checks whether a variable has their references in TDZ.
*
* The predicate function would return `true`:
*
* - if a reference is before the declarator. E.g. (var a = b, b = 1;)(var {a = b, b} = {};)
* - if a reference is in the expression of their default value. E.g. (var {a = a} = {};)
* - if a reference is in the expression of their initializer. E.g. (var a = a;)
* @param {ASTNode} node The initializer node of VariableDeclarator.
* @returns {Function} The predicate function.
* @private
*/
function hasReferenceInTDZ(node) {
const initStart = node.range[0];
const initEnd = node.range[1];
return variable => {
const id = variable.defs[0].name;
const idStart = id.range[0];
const defaultValue =
id.parent.type === "AssignmentPattern" ? id.parent.right : null;
const defaultStart = defaultValue && defaultValue.range[0];
const defaultEnd = defaultValue && defaultValue.range[1];
return variable.references.some(reference => {
const start = reference.identifier.range[0];
const end = reference.identifier.range[1];
return (
!reference.init &&
(start < idStart ||
(defaultValue !== null &&
start >= defaultStart &&
end <= defaultEnd) ||
(!astUtils.isFunction(node) &&
start >= initStart &&
end <= initEnd))
);
});
};
}
/**
* Checks whether a given variable has name that is allowed for 'var' declarations,
* but disallowed for `let` declarations.
* @param {Variable} variable The variable to check.
* @returns {boolean} `true` if the variable has a disallowed name.
*/
function hasNameDisallowedForLetDeclarations(variable) {
return variable.name === "let";
}
/**
* Checks whether a given variable has any references before its declaration.
* This is important because var allows hoisting, but let/const do not.
* @param {Variable} variable The variable to check.
* @returns {boolean} `true` if the variable is referenced before its declaration.
*/
function hasReferenceBeforeDeclaration(variable) {
const declarationStart = variable.defs[0].node.range[0];
return variable.references.some(reference => {
const referenceStart = reference.identifier.range[0];
/*
* Check if the reference occurs before the declaration.
* We don't need to check scopes because all references to this variable
* are already in variable.references (which only includes references
* that resolve to this specific variable binding).
*/
return !reference.init && referenceStart < declarationStart;
});
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
dialects: ["typescript", "javascript"],
language: "javascript",
docs: {
description: "Require `let` or `const` instead of `var`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-var",
},
schema: [],
fixable: "code",
messages: {
unexpectedVar: "Unexpected var, use let or const instead.",
},
},
create(context) {
const sourceCode = context.sourceCode;
/**
* Checks whether the variables which are defined by the given declarator node have their references in TDZ.
* @param {ASTNode} declarator The VariableDeclarator node to check.
* @returns {boolean} `true` if one of the variables which are defined by the given declarator node have their references in TDZ.
*/
function hasSelfReferenceInTDZ(declarator) {
if (!declarator.init) {
return false;
}
const variables = sourceCode.getDeclaredVariables(declarator);
return variables.some(hasReferenceInTDZ(declarator.init));
}
/**
* Checks whether it can fix a given variable declaration or not.
* It cannot fix if the following cases:
*
* - A variable is a global variable.
* - A variable is declared on a SwitchCase node.
* - A variable is redeclared.
* - A variable is used from outside the scope.
* - A variable is used from a closure within a loop.
* - A variable might be used before it is assigned within a loop.
* - A variable might be used in TDZ.
* - A variable is referenced before its declaration.
* - A variable is declared in statement position (e.g. a single-line `IfStatement`)
* - A variable has name that is disallowed for `let` declarations.
*
* ## A variable is declared on a SwitchCase node.
*
* If this rule modifies 'var' declarations on a SwitchCase node, it
* would generate the warnings of 'no-case-declarations' rule. And the
* 'eslint:recommended' preset includes 'no-case-declarations' rule, so
* this rule doesn't modify those declarations.
*
* ## A variable is redeclared.
*
* The language spec disallows redeclarations of `let` declarations.
* Those variables would cause syntax errors.
*
* ## A variable is used from outside the scope.
*
* The language spec disallows accesses from outside of the scope for
* `let` declarations. Those variables would cause reference errors.
*
* ## A variable is used from a closure within a loop.
*
* A `var` declaration within a loop shares the same variable instance
* across all loop iterations, while a `let` declaration creates a new
* instance for each iteration. This means if a variable in a loop is
* referenced by any closure, changing it from `var` to `let` would
* change the behavior in a way that is generally unsafe.
*
* ## A variable might be used before it is assigned within a loop.
*
* Within a loop, a `let` declaration without an initializer will be
* initialized to null, while a `var` declaration will retain its value
* from the previous iteration, so it is only safe to change `var` to
* `let` if we can statically determine that the variable is always
* assigned a value before its first access in the loop body. To keep
* the implementation simple, we only convert `var` to `let` within
* loops when the variable is a loop assignee or the declaration has an
* initializer.
* @param {ASTNode} node A variable declaration node to check.
* @returns {boolean} `true` if it can fix the node.
*/
function canFix(node) {
const variables = sourceCode.getDeclaredVariables(node);
const scopeNode = getScopeNode(node);
const parentStatementList = new Set([
...astUtils.STATEMENT_LIST_PARENTS,
"TSModuleBlock",
]);
if (
node.parent.type === "SwitchCase" ||
node.declarations.some(hasSelfReferenceInTDZ) ||
variables.some(isGlobal) ||
variables.some(isRedeclared) ||
variables.some(isUsedFromOutsideOf(scopeNode)) ||
variables.some(hasNameDisallowedForLetDeclarations) ||
variables.some(hasReferenceBeforeDeclaration)
) {
return false;
}
if (astUtils.isInLoop(node)) {
if (variables.some(isReferencedInClosure)) {
return false;
}
if (!isLoopAssignee(node) && !isDeclarationInitialized(node)) {
return false;
}
}
if (
!isLoopAssignee(node) &&
!(
node.parent.type === "ForStatement" &&
node.parent.init === node
) &&
!parentStatementList.has(node.parent.type)
) {
// If the declaration is not in a block, e.g. `if (foo) var bar = 1;`, then it can't be fixed.
return false;
}
return true;
}
/**
* Reports a given variable declaration node.
* @param {ASTNode} node A variable declaration node to report.
* @returns {void}
*/
function report(node) {
context.report({
node,
messageId: "unexpectedVar",
fix(fixer) {
const varToken = sourceCode.getFirstToken(node, {
filter: t => t.value === "var",
});
return canFix(node)
? fixer.replaceText(varToken, "let")
: null;
},
});
}
return {
"VariableDeclaration:exit"(node) {
if (node.kind !== "var") {
return;
}
if (
node.parent.type === "TSModuleBlock" &&
node.parent.parent.type === "TSModuleDeclaration" &&
node.parent.parent.global
) {
return;
}
report(node);
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"is-browser.mjs","sources":["../../../src/utils/is-browser.ts"],"sourcesContent":["export const isBrowser = typeof window !== \"undefined\"\n"],"names":[],"mappings":"MAAa,SAAS,GAAG,OAAO,MAAM,KAAK;;;;"}
@@ -0,0 +1,577 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict";
const { parseIdentifier } = require("./identifier");
/** @typedef {string | (string | ConditionalMapping)[]} DirectMapping */
/** @typedef {{ [k: string]: MappingValue }} ConditionalMapping */
/** @typedef {ConditionalMapping | DirectMapping | null} MappingValue */
/** @typedef {Record<string, MappingValue> | ConditionalMapping | DirectMapping} ExportsField */
/** @typedef {Record<string, MappingValue>} ImportsField */
/**
* Processing exports/imports field
* @callback FieldProcessor
* @param {string} request request
* @param {Set<string>} conditionNames condition names
* @returns {[string[], string | null]} resolved paths with used field
*/
/*
Example exports field:
{
".": "./main.js",
"./feature": {
"browser": "./feature-browser.js",
"default": "./feature.js"
}
}
Terminology:
Enhanced-resolve name keys ("." and "./feature") as exports field keys.
If value is string or string[], mapping is called as a direct mapping
and value called as a direct export.
If value is key-value object, mapping is called as a conditional mapping
and value called as a conditional export.
Key in conditional mapping is called condition name.
Conditional mapping nested in another conditional mapping is called nested mapping.
----------
Example imports field:
{
"#a": "./main.js",
"#moment": {
"browser": "./moment/index.js",
"default": "moment"
},
"#moment/": {
"browser": "./moment/",
"default": "moment/"
}
}
Terminology:
Enhanced-resolve name keys ("#a" and "#moment/", "#moment") as imports field keys.
If value is string or string[], mapping is called as a direct mapping
and value called as a direct export.
If value is key-value object, mapping is called as a conditional mapping
and value called as a conditional export.
Key in conditional mapping is called condition name.
Conditional mapping nested in another conditional mapping is called nested mapping.
*/
const slashCode = "/".charCodeAt(0);
const dotCode = ".".charCodeAt(0);
const hashCode = "#".charCodeAt(0);
const patternRegEx = /\*/g;
/**
* @param {string} a first string
* @param {string} b second string
* @returns {number} compare result
*/
function patternKeyCompare(a, b) {
const aPatternIndex = a.indexOf("*");
const bPatternIndex = b.indexOf("*");
const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1;
const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1;
if (baseLenA > baseLenB) return -1;
if (baseLenB > baseLenA) return 1;
if (aPatternIndex === -1) return 1;
if (bPatternIndex === -1) return -1;
if (a.length > b.length) return -1;
if (b.length > a.length) return 1;
return 0;
}
/**
* Trying to match request to field
* @param {string} request request
* @param {ExportsField | ImportsField} field exports or import field
* @returns {[MappingValue, string, boolean, boolean, string] | null} match or null, number is negative and one less when it's a folder mapping, number is request.length + 1 for direct mappings
*/
function findMatch(request, field) {
if (
Object.prototype.hasOwnProperty.call(field, request) &&
!request.includes("*") &&
!request.endsWith("/")
) {
const target = /** @type {{ [k: string]: MappingValue }} */ (field)[
request
];
return [target, "", false, false, request];
}
/** @type {string} */
let bestMatch = "";
/** @type {string | undefined} */
let bestMatchSubpath;
const keys = Object.getOwnPropertyNames(field);
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const patternIndex = key.indexOf("*");
if (patternIndex !== -1 && request.startsWith(key.slice(0, patternIndex))) {
const patternTrailer = key.slice(patternIndex + 1);
if (
request.length >= key.length &&
request.endsWith(patternTrailer) &&
patternKeyCompare(bestMatch, key) === 1 &&
key.lastIndexOf("*") === patternIndex
) {
bestMatch = key;
bestMatchSubpath = request.slice(
patternIndex,
request.length - patternTrailer.length,
);
}
}
// For legacy `./foo/`
else if (
key[key.length - 1] === "/" &&
request.startsWith(key) &&
patternKeyCompare(bestMatch, key) === 1
) {
bestMatch = key;
bestMatchSubpath = request.slice(key.length);
}
}
if (bestMatch === "") return null;
const target =
/** @type {{ [k: string]: MappingValue }} */
(field)[bestMatch];
const isSubpathMapping = bestMatch.endsWith("/");
const isPattern = bestMatch.includes("*");
return [
target,
/** @type {string} */ (bestMatchSubpath),
isSubpathMapping,
isPattern,
bestMatch,
];
}
/**
* @param {ConditionalMapping | DirectMapping | null} mapping mapping
* @returns {boolean} is conditional mapping
*/
function isConditionalMapping(mapping) {
return (
mapping !== null && typeof mapping === "object" && !Array.isArray(mapping)
);
}
/**
* @param {ConditionalMapping} conditionalMapping_ conditional mapping
* @param {Set<string>} conditionNames condition names
* @returns {DirectMapping | null} direct mapping if found
*/
function conditionalMapping(conditionalMapping_, conditionNames) {
/** @type {[ConditionalMapping, string[], number][]} */
const lookup = [[conditionalMapping_, Object.keys(conditionalMapping_), 0]];
loop: while (lookup.length > 0) {
const [mapping, conditions, j] = lookup[lookup.length - 1];
for (let i = j; i < conditions.length; i++) {
const condition = conditions[i];
if (condition === "default") {
const innerMapping = mapping[condition];
// is nested
if (isConditionalMapping(innerMapping)) {
const conditionalMapping = /** @type {ConditionalMapping} */ (
innerMapping
);
lookup[lookup.length - 1][2] = i + 1;
lookup.push([conditionalMapping, Object.keys(conditionalMapping), 0]);
continue loop;
}
return /** @type {DirectMapping} */ (innerMapping);
}
if (conditionNames.has(condition)) {
const innerMapping = mapping[condition];
// is nested
if (isConditionalMapping(innerMapping)) {
const conditionalMapping = /** @type {ConditionalMapping} */ (
innerMapping
);
lookup[lookup.length - 1][2] = i + 1;
lookup.push([conditionalMapping, Object.keys(conditionalMapping), 0]);
continue loop;
}
return /** @type {DirectMapping} */ (innerMapping);
}
}
lookup.pop();
}
return null;
}
/**
* @param {string | undefined} remainingRequest remaining request when folder mapping, undefined for file mappings
* @param {boolean} isPattern true, if mapping is a pattern (contains "*")
* @param {boolean} isSubpathMapping true, for subpath mappings
* @param {string} mappingTarget direct export
* @param {(d: string, f: boolean) => void} assert asserting direct value
* @returns {string} mapping result
*/
function targetMapping(
remainingRequest,
isPattern,
isSubpathMapping,
mappingTarget,
assert,
) {
if (remainingRequest === undefined) {
assert(mappingTarget, false);
return mappingTarget;
}
if (isSubpathMapping) {
assert(mappingTarget, true);
return mappingTarget + remainingRequest;
}
assert(mappingTarget, false);
let result = mappingTarget;
if (isPattern) {
result = result.replace(
patternRegEx,
remainingRequest.replace(/\$/g, "$$"),
);
}
return result;
}
/**
* @param {string | undefined} remainingRequest remaining request when folder mapping, undefined for file mappings
* @param {boolean} isPattern true, if mapping is a pattern (contains "*")
* @param {boolean} isSubpathMapping true, for subpath mappings
* @param {DirectMapping | null} mappingTarget direct export
* @param {Set<string>} conditionNames condition names
* @param {(d: string, f: boolean) => void} assert asserting direct value
* @returns {string[]} mapping result
*/
function directMapping(
remainingRequest,
isPattern,
isSubpathMapping,
mappingTarget,
conditionNames,
assert,
) {
if (mappingTarget === null) return [];
if (typeof mappingTarget === "string") {
return [
targetMapping(
remainingRequest,
isPattern,
isSubpathMapping,
mappingTarget,
assert,
),
];
}
/** @type {string[]} */
const targets = [];
for (const exp of mappingTarget) {
if (typeof exp === "string") {
targets.push(
targetMapping(
remainingRequest,
isPattern,
isSubpathMapping,
exp,
assert,
),
);
continue;
}
const mapping = conditionalMapping(exp, conditionNames);
if (!mapping) continue;
const innerExports = directMapping(
remainingRequest,
isPattern,
isSubpathMapping,
mapping,
conditionNames,
assert,
);
for (const innerExport of innerExports) {
targets.push(innerExport);
}
}
return targets;
}
/**
* @param {ExportsField | ImportsField} field root
* @param {(s: string) => string} normalizeRequest Normalize request, for `imports` field it adds `#`, for `exports` field it adds `.` or `./`
* @param {(s: string) => string} assertRequest assertRequest
* @param {(s: string, f: boolean) => void} assertTarget assertTarget
* @returns {FieldProcessor} field processor
*/
function createFieldProcessor(
field,
normalizeRequest,
assertRequest,
assertTarget,
) {
return function fieldProcessor(request, conditionNames) {
request = assertRequest(request);
const match = findMatch(normalizeRequest(request), field);
if (match === null) return [[], null];
const [mapping, remainingRequest, isSubpathMapping, isPattern, usedField] =
match;
/** @type {DirectMapping | null} */
let direct = null;
if (isConditionalMapping(mapping)) {
direct = conditionalMapping(
/** @type {ConditionalMapping} */ (mapping),
conditionNames,
);
// matching not found
if (direct === null) return [[], null];
} else {
direct = /** @type {DirectMapping} */ (mapping);
}
return [
directMapping(
remainingRequest,
isPattern,
isSubpathMapping,
direct,
conditionNames,
assertTarget,
),
usedField,
];
};
}
/**
* @param {string} request request
* @returns {string} updated request
*/
function assertExportsFieldRequest(request) {
if (request.charCodeAt(0) !== dotCode) {
throw new Error('Request should be relative path and start with "."');
}
if (request.length === 1) return "";
if (request.charCodeAt(1) !== slashCode) {
throw new Error('Request should be relative path and start with "./"');
}
if (request.charCodeAt(request.length - 1) === slashCode) {
throw new Error("Only requesting file allowed");
}
return request.slice(2);
}
/**
* @param {ExportsField} field exports field
* @returns {ExportsField} normalized exports field
*/
function buildExportsField(field) {
// handle syntax sugar, if exports field is direct mapping for "."
if (typeof field === "string" || Array.isArray(field)) {
return { ".": field };
}
const keys = Object.keys(field);
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
if (key.charCodeAt(0) !== dotCode) {
// handle syntax sugar, if exports field is conditional mapping for "."
if (i === 0) {
while (i < keys.length) {
const charCode = keys[i].charCodeAt(0);
if (charCode === dotCode || charCode === slashCode) {
throw new Error(
`Exports field key should be relative path and start with "." (key: ${JSON.stringify(
key,
)})`,
);
}
i++;
}
return { ".": field };
}
throw new Error(
`Exports field key should be relative path and start with "." (key: ${JSON.stringify(
key,
)})`,
);
}
if (key.length === 1) {
continue;
}
if (key.charCodeAt(1) !== slashCode) {
throw new Error(
`Exports field key should be relative path and start with "./" (key: ${JSON.stringify(
key,
)})`,
);
}
}
return field;
}
/**
* @param {string} exp export target
* @param {boolean} expectFolder is folder expected
*/
function assertExportTarget(exp, expectFolder) {
const parsedIdentifier = parseIdentifier(exp);
if (!parsedIdentifier) {
return;
}
const [relativePath] = parsedIdentifier;
const isFolder =
relativePath.charCodeAt(relativePath.length - 1) === slashCode;
if (isFolder !== expectFolder) {
throw new Error(
expectFolder
? `Expecting folder to folder mapping. ${JSON.stringify(
exp,
)} should end with "/"`
: `Expecting file to file mapping. ${JSON.stringify(
exp,
)} should not end with "/"`,
);
}
}
/**
* @param {ExportsField} exportsField the exports field
* @returns {FieldProcessor} process callback
*/
module.exports.processExportsField = function processExportsField(
exportsField,
) {
return createFieldProcessor(
buildExportsField(exportsField),
(request) => (request.length === 0 ? "." : `./${request}`),
assertExportsFieldRequest,
assertExportTarget,
);
};
/**
* @param {string} request request
* @returns {string} updated request
*/
function assertImportsFieldRequest(request) {
if (request.charCodeAt(0) !== hashCode) {
throw new Error('Request should start with "#"');
}
if (request.length === 1) {
throw new Error("Request should have at least 2 characters");
}
// Note: #/ patterns are now allowed per Node.js PR #60864
// https://github.com/nodejs/node/pull/60864
if (request.charCodeAt(request.length - 1) === slashCode) {
throw new Error("Only requesting file allowed");
}
return request.slice(1);
}
/**
* @param {string} imp import target
* @param {boolean} expectFolder is folder expected
*/
function assertImportTarget(imp, expectFolder) {
const parsedIdentifier = parseIdentifier(imp);
if (!parsedIdentifier) {
return;
}
const [relativePath] = parsedIdentifier;
const isFolder =
relativePath.charCodeAt(relativePath.length - 1) === slashCode;
if (isFolder !== expectFolder) {
throw new Error(
expectFolder
? `Expecting folder to folder mapping. ${JSON.stringify(
imp,
)} should end with "/"`
: `Expecting file to file mapping. ${JSON.stringify(
imp,
)} should not end with "/"`,
);
}
}
/**
* @param {ImportsField} importsField the exports field
* @returns {FieldProcessor} process callback
*/
module.exports.processImportsField = function processImportsField(
importsField,
) {
return createFieldProcessor(
importsField,
(request) => `#${request}`,
assertImportsFieldRequest,
assertImportTarget,
);
};
@@ -0,0 +1,15 @@
export type Options = [
{
allowAny?: boolean;
allowBoolean?: boolean;
allowNullish?: boolean;
allowNumberAndString?: boolean;
allowRegExp?: boolean;
skipCompoundAssignments?: boolean;
}
];
export type MessageIds = 'bigintAndNumber' | 'invalid' | 'mismatched';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jitter_factory_1 = require("../jitter/jitter.factory");
var Delay = /** @class */ (function () {
function Delay(options) {
this.options = options;
this.attempt = 0;
}
Delay.prototype.apply = function () {
var _this = this;
return new Promise(function (resolve) { return setTimeout(resolve, _this.jitteredDelay); });
};
Delay.prototype.setAttemptNumber = function (attempt) {
this.attempt = attempt;
};
Object.defineProperty(Delay.prototype, "jitteredDelay", {
get: function () {
var jitter = jitter_factory_1.JitterFactory(this.options);
return jitter(this.delay);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Delay.prototype, "delay", {
get: function () {
var constant = this.options.startingDelay;
var base = this.options.timeMultiple;
var power = this.numOfDelayedAttempts;
var delay = constant * Math.pow(base, power);
return Math.min(delay, this.options.maxDelay);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Delay.prototype, "numOfDelayedAttempts", {
get: function () {
return this.attempt;
},
enumerable: true,
configurable: true
});
return Delay;
}());
exports.Delay = Delay;
//# sourceMappingURL=delay.base.js.map
@@ -0,0 +1,26 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test("check any inference", () => {
const t1 = z.any();
t1.optional();
t1.nullable();
type t1 = z.infer<typeof t1>;
expectTypeOf<t1>().toEqualTypeOf<any>();
});
test("check unknown inference", () => {
const t1 = z.unknown();
t1.optional();
t1.nullable();
type t1 = z.infer<typeof t1>;
expectTypeOf<t1>().toEqualTypeOf<unknown>();
});
test("check never inference", () => {
const t1 = z.never();
expect(() => t1.parse(undefined)).toThrow();
expect(() => t1.parse("asdf")).toThrow();
expect(() => t1.parse(null)).toThrow();
});
@@ -0,0 +1,117 @@
flf2a 1 1 3 -1 14 1 0 0
===============================================================================
This is Upside Down Text, font file made by Pat Gillespie (patorjk.com).
It was created on August 18th, 2025. The following sites were used as references:
https://www.fileformat.info/convert/text/upside-down-map.htm
https://www.namecheap.com/visual/font-generator/upside-down-text/
https://www.upsidedowntext.com/unicode
This font is free software. It comes without any warranty, to the extent
permitted by applicable law. You can redistribute it and/or modify it under
the terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
details.
===============================================================================
@
¡@
„@
#@
$@
%@
⅋@
,@
)@
(@
*@
+@
'@
-@
˙.
/@
0@
Ɩ1
ᄅ2
Ɛ3
ᔭ4
ϛ5
96
Ɫ7
8@
69
:@
؛@
>@
=@
<@
¿@
@#
∀A
B@
ↃC
ᗡD
ƎE
ℲF
⅁G
H@
I@
ſJ
⋊K
⅂L
WM
ᴎN
O@
ԀP
ΌQ
ᴚR
S@
⊥T
∩U
ᴧV
MW
X@
⅄Y
Z@
]@
\@
[@
^@
‾@
,@
ɐa
qb
ɔc
pd
ǝe
ɟf
ƃg
ɥh
ᴉi
ɾj
ʞk
l@
ɯm
un
o@
dp
bq
ɹr
s@
ʇt
nu
ʌv
ʍw
x@
ʎy
z@
}@
|@
{@
~@
Ä@
Ö@
Ü@
ä@
ö@
ü@
ß@
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_IB","4":"_LC"},B:{"4":"_J"},C:{"4":"_S"},D:{"4":"_Q"},E:{"2":"_e","4":"_DB"},F:{"2":"F","4":"_oB"},G:{"4":"_M"},H:{"4":"1D"},I:{"2":"_W","4":"_X"},J:{"2":"_B"},K:{"4":"_N"},L:{"4":"I"},M:{"4":"YC"},N:{"4":"_A"},O:{"4":"bC"},P:{"4":"_F"},Q:{"4":"JE"},R:{"4":"KE"},S:{"4":"_C"}},B:2,C:"WAI-ARIA Accessibility features",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"tv.js","sources":["../../../src/icons/tv.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Tv\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHg9IjIiIHk9IjciIHJ4PSIyIiByeT0iMiIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSIxNyAyIDEyIDcgNyAyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/tv\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 Tv = createLucideIcon('Tv', [\n ['rect', { width: '20', height: '15', x: '2', y: '7', rx: '2', ry: '2', key: '10ag99' }],\n ['polyline', { points: '17 2 12 7 7 2', key: '11pgbg' }],\n]);\n\nexport default Tv;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,iBAAiB,IAAM,CAAA,CAAA,CAAA;AAAA,CAAA,CAChC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CAAA,CACvF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,4 @@
import { stream } from "./stream.js";
import { SSEMessage, SSEStreamingApi, streamSSE } from "./sse.js";
import { streamText } from "./text.js";
export { type SSEMessage, SSEStreamingApi, stream, streamSSE, streamText };
@@ -0,0 +1 @@
{"version":3,"file":"add-will-change.mjs","sources":["../../../../src/value/will-change/add-will-change.ts"],"sourcesContent":["import { MotionGlobalConfig } from \"motion-utils\"\nimport type { VisualElement } from \"../../render/VisualElement\"\nimport { isWillChangeMotionValue } from \"./is\"\n\nexport function addValueToWillChange(\n visualElement: VisualElement,\n key: string\n) {\n const willChange = visualElement.getValue(\"willChange\")\n\n /**\n * It could be that a user has set willChange to a regular MotionValue,\n * in which case we can't add the value to it.\n */\n if (isWillChangeMotionValue(willChange)) {\n return willChange.add(key)\n } else if (!willChange && MotionGlobalConfig.WillChange) {\n const newWillChange = new MotionGlobalConfig.WillChange(\"auto\")\n\n visualElement.addValue(\"willChange\", newWillChange)\n newWillChange.add(key)\n }\n}\n"],"names":[],"mappings":";;;AAIM,SAAU,oBAAoB,CAChC,aAA4B,EAC5B,GAAW,EAAA;IAEX,MAAM,UAAU,GAAG,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC;AAEvD;;;AAGG;AACH,IAAA,IAAI,uBAAuB,CAAC,UAAU,CAAC,EAAE;AACrC,QAAA,OAAO,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC;IAC9B;AAAO,SAAA,IAAI,CAAC,UAAU,IAAI,kBAAkB,CAAC,UAAU,EAAE;QACrD,MAAM,aAAa,GAAG,IAAI,kBAAkB,CAAC,UAAU,CAAC,MAAM,CAAC;AAE/D,QAAA,aAAa,CAAC,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;AACnD,QAAA,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC;IAC1B;AACJ;;;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_isValidIdentifier","require","_helperValidatorIdentifier","toIdentifier","input","name","c","isIdentifierChar","codePointAt","replace","match","toUpperCase","isValidIdentifier"],"sources":["../../src/converters/toIdentifier.ts"],"sourcesContent":["import isValidIdentifier from \"../validators/isValidIdentifier.ts\";\nimport { isIdentifierChar } from \"@babel/helper-validator-identifier\";\n\nexport default function toIdentifier(input: string): string {\n input = input + \"\";\n\n // replace all non-valid identifiers with dashes\n let name = \"\";\n for (const c of input) {\n name += isIdentifierChar(c.codePointAt(0)) ? c : \"-\";\n }\n\n // remove all dashes and numbers from start of name\n name = name.replace(/^[-0-9]+/, \"\");\n\n // camel case\n name = name.replace(/[-\\s]+(.)?/g, function (match, c) {\n return c ? c.toUpperCase() : \"\";\n });\n\n if (!isValidIdentifier(name)) {\n name = `_${name}`;\n }\n\n return name || \"_\";\n}\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAD,OAAA;AAEe,SAASE,YAAYA,CAACC,KAAa,EAAU;EAC1DA,KAAK,GAAGA,KAAK,GAAG,EAAE;EAGlB,IAAIC,IAAI,GAAG,EAAE;EACb,KAAK,MAAMC,CAAC,IAAIF,KAAK,EAAE;IACrBC,IAAI,IAAI,IAAAE,2CAAgB,EAACD,CAAC,CAACE,WAAW,CAAC,CAAC,CAAC,CAAC,GAAGF,CAAC,GAAG,GAAG;EACtD;EAGAD,IAAI,GAAGA,IAAI,CAACI,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;EAGnCJ,IAAI,GAAGA,IAAI,CAACI,OAAO,CAAC,aAAa,EAAE,UAAUC,KAAK,EAAEJ,CAAC,EAAE;IACrD,OAAOA,CAAC,GAAGA,CAAC,CAACK,WAAW,CAAC,CAAC,GAAG,EAAE;EACjC,CAAC,CAAC;EAEF,IAAI,CAAC,IAAAC,0BAAiB,EAACP,IAAI,CAAC,EAAE;IAC5BA,IAAI,GAAG,IAAIA,IAAI,EAAE;EACnB;EAEA,OAAOA,IAAI,IAAI,GAAG;AACpB","ignoreList":[]}
@@ -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 CalendarDays = createLucideIcon("CalendarDays", [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
["path", { d: "M3 10h18", key: "8toen8" }],
["path", { d: "M8 14h.01", key: "6423bh" }],
["path", { d: "M12 14h.01", key: "1etili" }],
["path", { d: "M16 14h.01", key: "1gbofw" }],
["path", { d: "M8 18h.01", key: "lrp35t" }],
["path", { d: "M12 18h.01", key: "mhygvu" }],
["path", { d: "M16 18h.01", key: "kzsmim" }]
]);
export { CalendarDays as default };
//# sourceMappingURL=calendar-days.js.map
@@ -0,0 +1,16 @@
import { styleHookSingleton } from './hook';
/**
* create a Component to add styles on demand
* - styles are added when first instance is mounted
* - styles are removed when the last instance is unmounted
* - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
*/
export var styleSingleton = function () {
var useStyle = styleHookSingleton();
var Sheet = function (_a) {
var styles = _a.styles, dynamic = _a.dynamic;
useStyle(styles, dynamic);
return null;
};
return Sheet;
};
@@ -0,0 +1 @@
module.exports={C:{"128":0.3428,"136":0.00753,"142":0.00753,"148":0.0226,"152":0.07911,"153":0.03767,"154":0.05274,"155":0.32396,"156":1.164,"157":0.00753,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 129 130 131 132 133 134 135 137 138 139 140 141 143 144 145 146 147 149 150 151 158 159 160 3.5 3.6"},D:{"104":0.00753,"108":0.00753,"109":0.16952,"112":0.00753,"116":0.01507,"128":0.01507,"133":0.00753,"136":0.01507,"137":0.00753,"138":0.00753,"142":0.03014,"146":0.00753,"148":0.0452,"149":0.09418,"150":0.26369,"151":0.43321,"152":3.15675,"153":1.18661,"154":0.48971,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 105 106 107 110 111 113 114 115 117 118 119 120 121 122 123 124 125 126 127 129 130 131 132 134 135 139 140 141 143 144 145 147 155 156 157"},F:{"135":0.18458,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 131 132 133 134 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"144":0.00753,"148":0.00753,"150":0.01507,"151":0.00753,"152":0.54245,"153":0.89278,"154":0.24109,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 145 146 147 149"},E:{"27":0.388,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.2-15.3 15.4 16.0 17.0 18.0 18.2 26.1 27.1 TP","14.1":0.00753,"15.1":0.06027,"15.5":0.00753,"15.6":0.09418,"16.1":0.01507,"16.2":0.07911,"16.3":0.21095,"16.4":0.0452,"16.5":0.10924,"16.6":2.71224,"17.1":2.64443,"17.2":0.25616,"17.3":0.13185,"17.4":0.3428,"17.5":0.73833,"17.6":10.07673,"18.1":0.18458,"18.3":0.03767,"18.4":0.08664,"18.5-18.7":0.21849,"26.0":0.00753,"26.2":0.10171,"26.3":0.12431,"26.4":0.15445,"26.5":0.87771,"26.6":4.82176,"27.2":0.01507},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00547,"5.0-5.1":0.00547,"6.0-6.1":0,"7.0-7.1":0.01094,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.05469,"11.0-11.2":0.00547,"11.3-11.4":0.01094,"12.0-12.1":0,"12.2-12.5":0.14218,"13.0-13.1":0,"13.2":0.02734,"13.3":0,"13.4-13.7":0.00547,"14.0-14.4":0.02187,"14.5-14.8":0.03281,"15.0-15.1":0.03281,"15.2-15.3":0.02187,"15.4":0.02734,"15.5":0.03281,"15.6-15.8":0.71092,"16.0":0.05469,"16.1":0.09843,"16.2":0.05469,"16.3":0.12031,"16.4":0.02734,"16.5":0.04375,"16.6-16.7":0.98981,"17.0":0.03828,"17.1":0.05469,"17.2":0.05469,"17.3":0.08203,"17.4":0.11484,"17.5":0.22421,"17.6-17.7":0.57967,"18.0":0.12031,"18.1":0.24062,"18.2":0.32811,"18.3":0.56873,"18.4":0.35546,"18.5-18.7":7.3443,"26.0":0.35546,"26.1":0.36093,"26.2":0.9406,"26.3":1.01716,"26.4":0.74373,"26.5":4.98188,"26.6":30.73889,"27.0":2.35696,"27.1":0,"27.2":0.06015},P:{"30":0.28044,_:"4 20 21 22 23 24 25 26 27 28 29 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0.28647,"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.00011},K:{"0":0,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":6.75544},R:{_:"0"},M:{"0":0.27421},Q:{_:"14.9"},O:{_:"0"},H:{all:0}};
@@ -0,0 +1,184 @@
import type {
CodeKeywordDefinition,
ErrorObject,
KeywordErrorDefinition,
SchemaObject,
} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {propertyInData, allSchemaProperties, isOwnProperty} from "../code"
import {alwaysValidSchema, schemaRefOrVal} from "../../compile/util"
import {_, and, not, Code, Name} from "../../compile/codegen"
import {checkMetadata} from "./metadata"
import {checkNullableObject} from "./nullable"
import {typeErrorMessage, typeErrorParams, _JTDTypeError} from "./error"
enum PropError {
Additional = "additional",
Missing = "missing",
}
type PropKeyword = "properties" | "optionalProperties"
type PropSchema = {[P in string]?: SchemaObject}
export type JTDPropertiesError =
| _JTDTypeError<PropKeyword, "object", PropSchema>
| ErrorObject<PropKeyword, {error: PropError.Additional; additionalProperty: string}, PropSchema>
| ErrorObject<PropKeyword, {error: PropError.Missing; missingProperty: string}, PropSchema>
export const error: KeywordErrorDefinition = {
message: (cxt) => {
const {params} = cxt
return params.propError
? params.propError === PropError.Additional
? "must NOT have additional properties"
: `must have property '${params.missingProperty}'`
: typeErrorMessage(cxt, "object")
},
params: (cxt) => {
const {params} = cxt
return params.propError
? params.propError === PropError.Additional
? _`{error: ${params.propError}, additionalProperty: ${params.additionalProperty}}`
: _`{error: ${params.propError}, missingProperty: ${params.missingProperty}}`
: typeErrorParams(cxt, "object")
},
}
const def: CodeKeywordDefinition = {
keyword: "properties",
schemaType: "object",
error,
code: validateProperties,
}
// const error: KeywordErrorDefinition = {
// message: "should NOT have additional properties",
// params: ({params}) => _`{additionalProperty: ${params.additionalProperty}}`,
// }
export function validateProperties(cxt: KeywordCxt): void {
checkMetadata(cxt)
const {gen, data, parentSchema, it} = cxt
const {additionalProperties, nullable} = parentSchema
if (it.jtdDiscriminator && nullable) throw new Error("JTD: nullable inside discriminator mapping")
if (commonProperties()) {
throw new Error("JTD: properties and optionalProperties have common members")
}
const [allProps, properties] = schemaProperties("properties")
const [allOptProps, optProperties] = schemaProperties("optionalProperties")
if (properties.length === 0 && optProperties.length === 0 && additionalProperties) {
return
}
const [valid, cond] =
it.jtdDiscriminator === undefined
? checkNullableObject(cxt, data)
: [gen.let("valid", false), true]
gen.if(cond, () =>
gen.assign(valid, true).block(() => {
validateProps(properties, "properties", true)
validateProps(optProperties, "optionalProperties")
if (!additionalProperties) validateAdditional()
})
)
cxt.pass(valid)
function commonProperties(): boolean {
const props = parentSchema.properties as Record<string, any> | undefined
const optProps = parentSchema.optionalProperties as Record<string, any> | undefined
if (!(props && optProps)) return false
for (const p in props) {
if (Object.prototype.hasOwnProperty.call(optProps, p)) return true
}
return false
}
function schemaProperties(keyword: string): [string[], string[]] {
const schema = parentSchema[keyword]
const allPs = schema ? allSchemaProperties(schema) : []
if (it.jtdDiscriminator && allPs.some((p) => p === it.jtdDiscriminator)) {
throw new Error(`JTD: discriminator tag used in ${keyword}`)
}
const ps = allPs.filter((p) => !alwaysValidSchema(it, schema[p]))
return [allPs, ps]
}
function validateProps(props: string[], keyword: string, required?: boolean): void {
const _valid = gen.var("valid")
for (const prop of props) {
gen.if(
propertyInData(gen, data, prop, it.opts.ownProperties),
() => applyPropertySchema(prop, keyword, _valid),
() => missingProperty(prop)
)
cxt.ok(_valid)
}
function missingProperty(prop: string): void {
if (required) {
gen.assign(_valid, false)
cxt.error(false, {propError: PropError.Missing, missingProperty: prop}, {schemaPath: prop})
} else {
gen.assign(_valid, true)
}
}
}
function applyPropertySchema(prop: string, keyword: string, _valid: Name): void {
cxt.subschema(
{
keyword,
schemaProp: prop,
dataProp: prop,
},
_valid
)
}
function validateAdditional(): void {
gen.forIn("key", data, (key: Name) => {
const addProp = isAdditional(key, allProps, "properties", it.jtdDiscriminator)
const addOptProp = isAdditional(key, allOptProps, "optionalProperties")
const extra =
addProp === true ? addOptProp : addOptProp === true ? addProp : and(addProp, addOptProp)
gen.if(extra, () => {
if (it.opts.removeAdditional) {
gen.code(_`delete ${data}[${key}]`)
} else {
cxt.error(
false,
{propError: PropError.Additional, additionalProperty: key},
{instancePath: key, parentSchema: true}
)
if (!it.opts.allErrors) gen.break()
}
})
})
}
function isAdditional(
key: Name,
props: string[],
keyword: string,
jtdDiscriminator?: string
): Code | true {
let additional: Code | boolean
if (props.length > 8) {
// TODO maybe an option instead of hard-coded 8?
const propsSchema = schemaRefOrVal(it, parentSchema[keyword], keyword)
additional = not(isOwnProperty(gen, propsSchema as Code, key))
if (jtdDiscriminator !== undefined) {
additional = and(additional, _`${key} !== ${jtdDiscriminator}`)
}
} else if (props.length || jtdDiscriminator !== undefined) {
const ps = jtdDiscriminator === undefined ? props : [jtdDiscriminator].concat(props)
additional = and(...ps.map((p) => _`${key} !== ${p}`))
} else {
additional = true
}
return additional
}
}
export default def
@@ -0,0 +1,20 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BotMessageSquare = createLucideIcon("BotMessageSquare", [
["path", { d: "M12 6V2H8", key: "1155em" }],
["path", { d: "m8 18-4 4V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2Z", key: "w2lp3e" }],
["path", { d: "M2 12h2", key: "1t8f8n" }],
["path", { d: "M9 11v2", key: "1ueba0" }],
["path", { d: "M15 11v2", key: "i11awn" }],
["path", { d: "M20 12h2", key: "1q8mjw" }]
]);
export { BotMessageSquare as default };
//# sourceMappingURL=bot-message-square.js.map
@@ -0,0 +1,114 @@
import { color } from '../color/index.mjs';
import { colorRegex } from '../utils/color-regex.mjs';
import { floatRegex } from '../utils/float-regex.mjs';
import { sanitize } from '../utils/sanitize.mjs';
function test(v) {
return (isNaN(v) &&
typeof v === "string" &&
(v.match(floatRegex)?.length || 0) +
(v.match(colorRegex)?.length || 0) >
0);
}
const NUMBER_TOKEN = "number";
const COLOR_TOKEN = "color";
const VAR_TOKEN = "var";
const VAR_FUNCTION_TOKEN = "var(";
const SPLIT_TOKEN = "${}";
// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`
const complexRegex = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
function analyseComplexValue(value) {
const originalValue = value.toString();
const values = [];
const indexes = {
color: [],
number: [],
var: [],
};
const types = [];
let i = 0;
const tokenised = originalValue.replace(complexRegex, (parsedValue) => {
if (color.test(parsedValue)) {
indexes.color.push(i);
types.push(COLOR_TOKEN);
values.push(color.parse(parsedValue));
}
else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {
indexes.var.push(i);
types.push(VAR_TOKEN);
values.push(parsedValue);
}
else {
indexes.number.push(i);
types.push(NUMBER_TOKEN);
values.push(parseFloat(parsedValue));
}
++i;
return SPLIT_TOKEN;
});
const split = tokenised.split(SPLIT_TOKEN);
return { values, split, indexes, types };
}
function parseComplexValue(v) {
return analyseComplexValue(v).values;
}
function buildTransformer({ split, types }) {
const numSections = split.length;
return (v) => {
let output = "";
for (let i = 0; i < numSections; i++) {
output += split[i];
if (v[i] !== undefined) {
const type = types[i];
if (type === NUMBER_TOKEN) {
output += sanitize(v[i]);
}
else if (type === COLOR_TOKEN) {
output += color.transform(v[i]);
}
else {
output += v[i];
}
}
}
return output;
};
}
function createTransformer(source) {
return buildTransformer(analyseComplexValue(source));
}
const convertNumbersToZero = (v) => typeof v === "number" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;
/**
* Convert a parsed value to its zero equivalent, but preserve numbers
* that act as divisors in CSS calc() expressions.
*
* analyseComplexValue extracts numbers from CSS strings and puts the
* surrounding text into a `split` template array. For example:
* "calc(var(--gap) / 5)" → values: [var(--gap), 5]
* split: ["calc(", " / ", ")"]
*
* When building a zero-equivalent for animation, naively zeroing all
* numbers turns the divisor into 0 → "calc(var(--gap) / 0)" → NaN.
* We detect this by checking whether the text preceding a number
* (split[i]) ends with "/" — the CSS calc division operator.
*/
const convertToZero = (value, splitBefore) => {
if (typeof value === "number") {
return splitBefore?.trim().endsWith("/") ? value : 0;
}
return convertNumbersToZero(value);
};
function getAnimatableNone(v) {
const info = analyseComplexValue(v);
const transformer = buildTransformer(info);
return transformer(info.values.map((value, i) => convertToZero(value, info.split[i])));
}
const complex = {
test,
parse: parseComplexValue,
createTransformer,
getAnimatableNone,
};
export { analyseComplexValue, complex };
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,45 @@
import type * as core from "../core/index.js";
import { clone, mergeDefs } from "../core/util.js";
import { visit } from "../core/visit.js";
import * as schemas from "./schemas.js";
// Co-located with the functions: a type and a value can only share a name from one module.
export type input<T> = core.input<T>;
export type output<T> = core.output<T>;
/** Appends a pipe's own checks to the side that replaces it, mirroring how `.check()` clones. */
function withChecks(side: core.$ZodType, checks: core.$ZodTypeDef["checks"]): core.$ZodType {
if (!checks?.length) return side;
const def = side._zod.def;
return clone(side, mergeDefs(def, { checks: [...(def.checks ?? []), ...checks] }), { parent: true });
}
/** The out side, carrying the pipe's own checks: those run against the decoded value, which is what `out` produces. */
function outSide(def: core.$ZodPipeDef): core.$ZodType {
return withChecks(def.out, def.checks);
}
/** The in side. `z.preprocess` pipes a transform into a schema, and a bare transform validates nothing, so the schema it feeds is the real input side — the resolution `toJSONSchema` already makes for this case. */
function inSide(def: core.$ZodPipeDef): core.$ZodType {
return def.in._zod.traits.has("$ZodTransform") ? outSide(def) : def.in;
}
/** Returns a copy of the schema with every pipe replaced by its input side. A codec's checks are dropped: they constrain the decoded value the input side never produces. */
export function input<T extends core.$ZodType>(schema: T): schemas.ZodType<core.input<T>, core.input<T>> {
return visit(schema, {
pipe: (s) => inSide(s._zod.def),
// A default value belongs to the output side, so a rewritten inner type leaves it stranded. `.default()` widens the declared input type with `undefined`, and `optional` is what carries that across.
default: (s, rewritten) => (rewritten ? schemas.optional(s._zod.def.innerType) : s),
// A catch value is output-side too, but `.catch()` leaves the declared input type alone, so the inner schema stands on its own.
catch: (s, rewritten) => (rewritten ? s._zod.def.innerType : s),
}) as schemas.ZodType<core.input<T>, core.input<T>>;
}
/** Returns a copy of the schema with every pipe replaced by its output side, carrying over the pipe's own checks. */
export function output<T extends core.$ZodType>(schema: T): schemas.ZodType<core.output<T>, core.output<T>> {
return visit(schema, {
pipe: (s) => outSide(s._zod.def),
// A prefault value is fed through the schema, which makes it input-side, so a rewritten inner type leaves it stranded.
prefault: (s, rewritten) => (rewritten ? s._zod.def.innerType : s),
}) as schemas.ZodType<core.output<T>, core.output<T>>;
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_4D","2":"_KB"},C:{"1":"_CM","2":"_oL"},D:{"1":"_9L","2":"_tJ"},E:{"1":"_JB","2":"_RB"},F:{"1":"_TO","2":"_GM"},G:{"1":"_9","2":"_iB"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"D","16":"A"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_hB","2":"_rC"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:6,C:"Object.entries",D:true};