docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run

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

No files matched your search

@@ -0,0 +1,7 @@
import { d as daysOfYear } from "./daysOfYear-tJ4F7T8N.mjs";
function daysInMonth(date) {
return daysOfYear(date.getFullYear())[date.getMonth()];
}
export {
daysInMonth as default
};
@@ -0,0 +1,74 @@
/**
* Encrypting JSON Web Encryption (JWE) in General JSON Serialization
*
* @module
*/
import type * as types from '../../types.d.ts';
/** Used to build General JWE object's individual recipients. */
export interface Recipient {
/**
* Sets the JWE Per-Recipient Unprotected Header on the Recipient object.
*
* @param unprotectedHeader JWE Per-Recipient Unprotected Header.
*/
setUnprotectedHeader(unprotectedHeader: types.JWEHeaderParameters): Recipient;
/**
* Sets the JWE Key Management parameters to be used when encrypting.
*
* (ECDH-ES) Use of this method is needed for ECDH based algorithms to set the "apu" (Agreement
* PartyUInfo) or "apv" (Agreement PartyVInfo) parameters.
*
* @param parameters JWE Key Management parameters.
*/
setKeyManagementParameters(parameters: types.JWEKeyManagementHeaderParameters): Recipient;
/** A shorthand for calling addRecipient() on the enclosing {@link GeneralEncrypt} instance */
addRecipient(...args: Parameters<GeneralEncrypt['addRecipient']>): Recipient;
/** A shorthand for calling encrypt() on the enclosing {@link GeneralEncrypt} instance */
encrypt(...args: Parameters<GeneralEncrypt['encrypt']>): Promise<types.GeneralJWE>;
/** Returns the enclosing {@link GeneralEncrypt} instance */
done(): GeneralEncrypt;
}
/**
* The GeneralEncrypt class is used to build and encrypt General JWE objects.
*
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
* from its subpath export `'jose/jwe/general/encrypt'`.
*
*/
export declare class GeneralEncrypt {
#private;
/**
* {@link GeneralEncrypt} constructor
*
* @param plaintext Binary representation of the plaintext to encrypt.
*/
constructor(plaintext: Uint8Array);
/**
* Adds an additional recipient for the General JWE object.
*
* @param key Public Key or Secret to encrypt the Content Encryption Key for the recipient with.
* See {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
* @param options JWE Encryption options.
*/
addRecipient(key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.CritOption): Recipient;
/**
* Sets the JWE Protected Header on the GeneralEncrypt object.
*
* @param protectedHeader JWE Protected Header object.
*/
setProtectedHeader(protectedHeader: types.JWEHeaderParameters): this;
/**
* Sets the JWE Shared Unprotected Header on the GeneralEncrypt object.
*
* @param sharedUnprotectedHeader JWE Shared Unprotected Header object.
*/
setSharedUnprotectedHeader(sharedUnprotectedHeader: types.JWEHeaderParameters): this;
/**
* Sets the Additional Authenticated Data on the GeneralEncrypt object.
*
* @param aad Additional Authenticated Data.
*/
setAdditionalAuthenticatedData(aad: Uint8Array): this;
/** Encrypts and resolves the value of the General JWE object. */
encrypt(): Promise<types.GeneralJWE>;
}
@@ -0,0 +1,12 @@
# `typescript-eslint`
> Tooling which enables you to use TypeScript with ESLint
[![NPM Version](https://img.shields.io/npm/v/typescript-eslint.svg?style=flat-square)](https://www.npmjs.com/package/typescript-eslint)
[![NPM Downloads](https://img.shields.io/npm/dm/typescript-eslint.svg?style=flat-square)](https://www.npmjs.com/package/typescript-eslint)
👉 See **https://typescript-eslint.io/packages/typescript-eslint** for documentation on this package.
> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
<!-- Local path for docs: docs/packages/typescript-eslint.mdx -->
@@ -0,0 +1,63 @@
{
"name": "send",
"description": "Better streaming static file server with Range and conditional-GET support",
"version": "1.2.1",
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"James Wyatt Cready <jcready@gmail.com>",
"Jesús Leganés Combarro <piranna@gmail.com>"
],
"license": "MIT",
"repository": "pillarjs/send",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
},
"keywords": [
"static",
"file",
"server"
],
"dependencies": {
"debug": "^4.4.3",
"encodeurl": "^2.0.0",
"escape-html": "^1.0.3",
"etag": "^1.8.1",
"fresh": "^2.0.0",
"http-errors": "^2.0.1",
"mime-types": "^3.0.2",
"ms": "^2.1.3",
"on-finished": "^2.4.1",
"range-parser": "^1.2.1",
"statuses": "^2.0.2"
},
"devDependencies": {
"after": "^0.8.2",
"eslint": "7.32.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-markdown": "2.2.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.2.0",
"eslint-plugin-standard": "4.1.0",
"mocha": "^10.7.0",
"nyc": "^17.0.0",
"supertest": "6.3.4"
},
"files": [
"LICENSE",
"README.md",
"index.js"
],
"engines": {
"node": ">= 18"
},
"scripts": {
"lint": "eslint .",
"test": "mocha --check-leaks --reporter spec",
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test",
"version": "node scripts/version-history.js && git add HISTORY.md"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"folder-dot.js","sources":["../../../src/icons/folder-dot.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FolderDot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAyMGgxNmEyIDIgMCAwIDAgMi0yVjhhMiAyIDAgMCAwLTItMmgtNy45M2EyIDIgMCAwIDEtMS42Ni0uOWwtLjgyLTEuMkEyIDIgMCAwIDAgNy45MyAzSDRhMiAyIDAgMCAwLTIgMnYxM2MwIDEuMS45IDIgMiAyWiIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEzIiByPSIxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/folder-dot\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 FolderDot = createLucideIcon('FolderDot', [\n [\n 'path',\n {\n d: 'M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z',\n key: '1fr9dc',\n },\n ],\n ['circle', { cx: '12', cy: '13', r: '1', key: '49l61u' }],\n]);\n\nexport default FolderDot;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAC9C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,34 @@
"use strict";
const constants = require("./constants-DR3SPJ7u.js");
const normalizeUnit = require("./normalizeUnit-Cn0hUyBC.js");
const startOfTime = require("./startOfTime-CiMtfVAs.js");
const units = require("./units.js");
const { DATE, DAY, HOUR, MINUTE, MONTH, SECOND, YEAR } = units;
function startOf(date, unit) {
unit = normalizeUnit.normalizeUnit(unit);
let time = 0;
switch (unit) {
case YEAR:
time = startOfTime.startOfDate(date, void 0, 0, 1);
break;
case MONTH:
time = startOfTime.startOfDate(date, void 0, void 0, 1);
break;
case DATE:
case DAY:
time = startOfTime.startOfDate(date);
break;
case HOUR:
time = startOfTime.startOfTime(date, constants.MS_IN_HOUR);
break;
case MINUTE:
time = startOfTime.startOfTime(date, constants.MS_IN_MINUTE);
break;
case SECOND:
time = startOfTime.startOfTime(date, constants.MS_IN_SECOND);
break;
}
time && date.setTime(time);
return date;
}
module.exports = startOf;
@@ -0,0 +1,317 @@
/**
* Blake3 fast hash is Blake2 with reduced security (round count). Can also be used as MAC & KDF.
*
* It is advertised as "the fastest cryptographic hash". However, it isn't true in JS.
* Why is this so slow? While it must be 6x faster than blake2b, perf diff is only 20%:
*
* * There is only 30% reduction in number of rounds from blake2s
* * Speed-up comes from tree structure, which is parallelized using SIMD & threading.
* These features are not present in JS, so we only get overhead from trees.
* * Parallelization only happens on 1024-byte chunks: there is no benefit for small inputs.
* * It is still possible to make it faster using: a) loop unrolling b) web workers c) wasm
* @module
*/
import { SHA256_IV } from './_md.ts';
import { fromBig } from './_u64.ts';
import { _BLAKE2, compress } from './blake2.ts';
// prettier-ignore
import {
abytes, aexists, anumber, aoutput,
clean,
copyBytes,
createHasher, swap32IfBE,
u32, u8,
type CHashXOF,
type HashXOF,
type TArg,
type TRet
} from './utils.ts';
// Constructor-time mode flags (`KEYED_HASH`, `DERIVE_*`) plus per-node tree
// flags (`CHUNK_*`, `PARENT`, `ROOT`).
const B3_Flags = {
CHUNK_START: 0b1,
CHUNK_END: 0b10,
PARENT: 0b100,
ROOT: 0b1000,
KEYED_HASH: 0b10000,
DERIVE_KEY_CONTEXT: 0b100000,
DERIVE_KEY_MATERIAL: 0b1000000,
} as const;
// Default BLAKE3 IV, cloned from the shared BLAKE2s / SHA-256 IV basis.
const B3_IV = /* @__PURE__ */ SHA256_IV.slice();
// Seven 16-word rounds of BLAKE3 message schedule, generated by repeatedly
// permuting the identity row.
const B3_SIGMA: TRet<Uint8Array> = /* @__PURE__ */ (() => {
const Id = Array.from({ length: 16 }, (_, i) => i);
const permute = (arr: number[]) =>
[2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8].map((i) => arr[i]);
const res: number[] = [];
for (let i = 0, v = Id; i < 7; i++, v = permute(v)) res.push(...v);
return Uint8Array.from(res);
})();
/**
* Ensure to use EITHER `key` OR `context`, not both.
*
* * `key`: 32-byte MAC key.
* * `context`: caller-encoded KDF context bytes. If your protocol defines a
* string context, encode it before passing it here.
* A good default format for the original context string is
* "[application] [commit timestamp] [purpose]".
*/
export type Blake3Opts = {
/** Desired digest length in bytes. The BLAKE3 spec allows 0..2^64-1 bytes of output. */
dkLen?: number;
/** Optional 32-byte MAC key. */
key?: Uint8Array;
/** Optional KDF context bytes. */
context?: Uint8Array;
};
/** Blake3 hash. Can be used as MAC and KDF with caller-encoded context bytes. */
export class _BLAKE3 extends _BLAKE2<_BLAKE3> implements HashXOF<_BLAKE3> {
readonly canXOF = true;
private chunkPos = 0; // Position of current block in chunk
// How many chunks we already have; exact while this stays within
// JS's safe-integer range.
private chunksDone = 0;
private flags = 0 | 0;
private IV: Uint32Array;
private state: Uint32Array;
private stack: Uint32Array[] = [];
// Output
private posOut = 0;
private bufferOut32 = new Uint32Array(16);
private bufferOut: Uint8Array;
// Index of output chunk; exact while this stays within JS's
// safe-integer range.
private chunkOut = 0;
private enableXOF = true;
constructor(opts: Blake3Opts = {}, flags = 0) {
super(64, opts.dkLen === undefined ? 32 : opts.dkLen);
const { key, context } = opts;
const hasContext = context !== undefined;
if (key !== undefined) {
if (hasContext) throw new Error('Only "key" or "context" can be specified at same time');
abytes(key, 32, 'key');
const k = copyBytes(key);
this.IV = u32(k);
swap32IfBE(this.IV);
this.flags = flags | B3_Flags.KEYED_HASH;
} else if (hasContext) {
abytes(context, undefined, 'context');
const ctx = context;
const contextKey = new _BLAKE3({ dkLen: 32 }, B3_Flags.DERIVE_KEY_CONTEXT)
.update(ctx)
.digest();
this.IV = u32(contextKey);
swap32IfBE(this.IV);
this.flags = flags | B3_Flags.DERIVE_KEY_MATERIAL;
} else {
this.IV = B3_IV.slice();
this.flags = flags;
}
this.state = this.IV.slice();
this.bufferOut = u8(this.bufferOut32);
}
// _BLAKE2's scalar-state hooks are unused here: BLAKE3 keeps its tree/XOF state in arrays and
// copies it directly in _cloneInto().
protected get(): [] {
return [];
}
protected set(): void {}
// Truncated chunk/parent compression: seed v8..v15 as IV[0..3], t0, t1,
// block length, and flags, then keep only the first 8 output words.
private b2Compress(counter: number, flags: number, buf: Uint32Array, bufPos: number = 0) {
const { state: s, pos } = this;
const { h, l } = fromBig(BigInt(counter), true);
// prettier-ignore
const { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 } =
compress(
B3_SIGMA, bufPos, buf, 7,
s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7],
B3_IV[0], B3_IV[1], B3_IV[2], B3_IV[3], h, l, pos, flags
);
s[0] = v0 ^ v8;
s[1] = v1 ^ v9;
s[2] = v2 ^ v10;
s[3] = v3 ^ v11;
s[4] = v4 ^ v12;
s[5] = v5 ^ v13;
s[6] = v6 ^ v14;
s[7] = v7 ^ v15;
}
protected compress(buf: Uint32Array, bufPos: number = 0, isLast: boolean = false): void {
// Compress last block
let flags = this.flags;
if (!this.chunkPos) flags |= B3_Flags.CHUNK_START;
if (this.chunkPos === 15 || isLast) flags |= B3_Flags.CHUNK_END;
if (!isLast) this.pos = this.blockLen;
this.b2Compress(this.chunksDone, flags, buf, bufPos);
this.chunkPos += 1;
// If current block is last in chunk (16 blocks), then compress chunks
if (this.chunkPos === 16 || isLast) {
let chunk = this.state;
this.state = this.IV.slice();
// If not the last one, compress only when there are trailing zeros in chunk counter
// Chunks are used as a binary tree where the current stack is the path.
// Zero means the current leaf is finished and can be compressed.
// 1 (001) - leaf not finished (just push current chunk to stack)
// 2 (010) - leaf finished at depth=1 (merge with last elm on stack and push back)
// 3 (011) - last leaf not finished
// 4 (100) - leafs finished at depth=1 and depth=2
for (let last, chunks = this.chunksDone + 1; isLast || !(chunks & 1); chunks >>= 1) {
if (!(last = this.stack.pop())) break;
this.buffer32.set(last, 0);
this.buffer32.set(chunk, 8);
this.pos = this.blockLen;
this.b2Compress(0, this.flags | B3_Flags.PARENT, this.buffer32, 0);
chunk = this.state;
this.state = this.IV.slice();
}
this.chunksDone++;
this.chunkPos = 0;
this.stack.push(chunk);
}
this.pos = 0;
}
_cloneInto(to?: _BLAKE3): _BLAKE3 {
to = super._cloneInto(to) as _BLAKE3;
const { IV, flags, state, chunkPos, posOut, chunkOut, stack, chunksDone } = this;
to.state.set(state.slice());
// Clone each CV stack entry by value so extending or destroying the clone
// cannot alias the source tree state.
to.stack = stack.map((i) => Uint32Array.from(i));
to.IV.set(IV);
to.flags = flags;
to.chunkPos = chunkPos;
to.chunksDone = chunksDone;
to.posOut = posOut;
to.chunkOut = chunkOut;
to.enableXOF = this.enableXOF;
to.bufferOut32.set(this.bufferOut32);
return to;
}
destroy(): void {
this.destroyed = true;
clean(this.state, this.buffer32, this.IV, this.bufferOut32);
clean(...this.stack);
}
// Root/XOF compression: rerun the same ROOT inputs with incrementing output
// counter `t` and materialize all 16 output words.
// Same as b2Compress, but doesn't modify state and returns 16 u32 array (instead of 8)
private b2CompressOut() {
const { state: s, pos, flags, buffer32, bufferOut32: out32 } = this;
const { h, l } = fromBig(BigInt(this.chunkOut++));
swap32IfBE(buffer32);
// prettier-ignore
const { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 } =
compress(
B3_SIGMA, 0, buffer32, 7,
s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7],
B3_IV[0], B3_IV[1], B3_IV[2], B3_IV[3], l, h, pos, flags
);
out32[0] = v0 ^ v8;
out32[1] = v1 ^ v9;
out32[2] = v2 ^ v10;
out32[3] = v3 ^ v11;
out32[4] = v4 ^ v12;
out32[5] = v5 ^ v13;
out32[6] = v6 ^ v14;
out32[7] = v7 ^ v15;
out32[8] = s[0] ^ v8;
out32[9] = s[1] ^ v9;
out32[10] = s[2] ^ v10;
out32[11] = s[3] ^ v11;
out32[12] = s[4] ^ v12;
out32[13] = s[5] ^ v13;
out32[14] = s[6] ^ v14;
out32[15] = s[7] ^ v15;
swap32IfBE(buffer32);
swap32IfBE(out32);
this.posOut = 0;
}
protected finish(): void {
if (this.finished) return;
this.finished = true;
// Padding
clean(this.buffer.subarray(this.pos));
// Process last chunk
let flags = this.flags | B3_Flags.ROOT;
if (this.stack.length) {
// Finalize the current chunk first, then rerun the last parent
// compression as ROOT with t = 0 and b = 64.
flags |= B3_Flags.PARENT;
swap32IfBE(this.buffer32);
this.compress(this.buffer32, 0, true);
swap32IfBE(this.buffer32);
this.chunksDone = 0;
this.pos = this.blockLen;
} else {
flags |= (!this.chunkPos ? B3_Flags.CHUNK_START : 0) | B3_Flags.CHUNK_END;
}
this.flags = flags;
this.b2CompressOut();
}
private writeInto(out: TArg<Uint8Array>): TRet<Uint8Array> {
aexists(this, false);
abytes(out);
this.finish();
const { blockLen, bufferOut } = this;
for (let pos = 0, len = out.length; pos < len; ) {
if (this.posOut >= blockLen) this.b2CompressOut();
const take = Math.min(blockLen - this.posOut, len - pos);
out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
this.posOut += take;
pos += take;
}
return out as TRet<Uint8Array>;
}
xofInto(out: TArg<Uint8Array>): TRet<Uint8Array> {
if (!this.enableXOF) throw new Error('XOF is not possible after digest call');
return this.writeInto(out);
}
xof(bytes: number): TRet<Uint8Array> {
anumber(bytes);
return this.xofInto(new Uint8Array(bytes));
}
digestInto(out: TArg<Uint8Array>): void {
aoutput(out, this);
if (this.finished) throw new Error('digest() was already called');
this.enableXOF = false;
// `aoutput(...)` allows oversized buffers; digestInto() must fill only the configured digest.
this.writeInto(out.subarray(0, this.outputLen));
this.destroy();
}
digest(): TRet<Uint8Array> {
const out = new Uint8Array(this.outputLen);
this.digestInto(out);
return out as TRet<Uint8Array>;
}
}
/**
* BLAKE3 hash function. Can be used as MAC and KDF.
* @param msg - message that would be hashed
* @param opts - Optional output, MAC, or KDF configuration. `key` must be
* exactly 32 bytes, `context` is caller-encoded bytes, and `dkLen` can be
* 0..2^64-1 via the XOF-backed output path. See {@link Blake3Opts}.
* @returns Digest bytes.
* @example
* Hash, MAC, or derive key material with BLAKE3.
* ```ts
* import { blake3 } from '@noble/hashes/blake3.js';
* import { utf8ToBytes } from '@noble/hashes/utils.js';
* const data = new Uint8Array(32);
* const hash = blake3(data);
* const mac = blake3(data, { key: new Uint8Array(32) });
* const kdf = blake3(data, { context: utf8ToBytes('application name') });
* ```
*/
export const blake3: TRet<CHashXOF<_BLAKE3, Blake3Opts>> = /* @__PURE__ */ createHasher(
(opts = {}) => new _BLAKE3(opts)
);
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classStaticPrivateMethodSet;
function _classStaticPrivateMethodSet() {
throw new TypeError("attempted to set read only static private field");
}
//# sourceMappingURL=classStaticPrivateMethodSet.js.map
@@ -0,0 +1,421 @@
'use strict';
/*
Copyright 2012-2015, Yahoo Inc.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
const fs = require('fs');
const path = require('path');
const html = require('html-escaper');
const { ReportBase } = require('istanbul-lib-report');
const annotator = require('./annotator');
function htmlHead(details) {
return `
<head>
<title>Code coverage report for ${html.escape(details.entity)}</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="${html.escape(details.prettify.css)}" />
<link rel="stylesheet" href="${html.escape(details.base.css)}" />
<link rel="shortcut icon" type="image/x-icon" href="${html.escape(
details.favicon
)}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(${html.escape(details.sorter.image)});
}
</style>
</head>
`;
}
function headerTemplate(details) {
function metricsTemplate({ pct, covered, total }, kind) {
return `
<div class='fl pad1y space-right2'>
<span class="strong">${pct}% </span>
<span class="quiet">${kind}</span>
<span class='fraction'>${covered}/${total}</span>
</div>
`;
}
function skipTemplate(metrics) {
const statements = metrics.statements.skipped;
const branches = metrics.branches.skipped;
const functions = metrics.functions.skipped;
const countLabel = (c, label, plural) =>
c === 0 ? [] : `${c} ${label}${c === 1 ? '' : plural}`;
const skips = [].concat(
countLabel(statements, 'statement', 's'),
countLabel(functions, 'function', 's'),
countLabel(branches, 'branch', 'es')
);
if (skips.length === 0) {
return '';
}
return `
<div class='fl pad1y'>
<span class="strong">${skips.join(', ')}</span>
<span class="quiet">Ignored</span> &nbsp;&nbsp;&nbsp;&nbsp;
</div>
`;
}
return `
<!doctype html>
<html lang="en">
${htmlHead(details)}
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>${details.pathHtml}</h1>
<div class='clearfix'>
${metricsTemplate(details.metrics.statements, 'Statements')}
${metricsTemplate(details.metrics.branches, 'Branches')}
${metricsTemplate(details.metrics.functions, 'Functions')}
${metricsTemplate(details.metrics.lines, 'Lines')}
${skipTemplate(details.metrics)}
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line ${details.reportClass}'></div>
`;
}
function footerTemplate(details) {
return `
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at ${html.escape(details.datetime)}
</div>
<script src="${html.escape(details.prettify.js)}"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="${html.escape(details.sorter.js)}"></script>
<script src="${html.escape(details.blockNavigation.js)}"></script>
</body>
</html>
`;
}
function detailTemplate(data) {
const lineNumbers = new Array(data.maxLines).fill().map((_, i) => i + 1);
const lineLink = num =>
`<a name='L${num}'></a><a href='#L${num}'>${num}</a>`;
const lineCount = line =>
`<span class="cline-any cline-${line.covered}">${line.hits}</span>`;
/* This is rendered in a `<pre>`, need control of all whitespace. */
return [
'<tr>',
`<td class="line-count quiet">${lineNumbers
.map(lineLink)
.join('\n')}</td>`,
`<td class="line-coverage quiet">${data.lineCoverage
.map(lineCount)
.join('\n')}</td>`,
`<td class="text"><pre class="prettyprint lang-js">${data.annotatedCode.join(
'\n'
)}</pre></td>`,
'</tr>'
].join('');
}
const summaryTableHeader = [
'<div class="pad1">',
'<table class="coverage-summary">',
'<thead>',
'<tr>',
' <th data-col="file" data-fmt="html" data-html="true" class="file">File</th>',
' <th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>',
' <th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>',
' <th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>',
' <th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>',
' <th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>',
' <th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>',
' <th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>',
' <th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>',
' <th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>',
'</tr>',
'</thead>',
'<tbody>'
].join('\n');
function summaryLineTemplate(details) {
const { reportClasses, metrics, file, output } = details;
const percentGraph = pct => {
if (!isFinite(pct)) {
return '';
}
const cls = ['cover-fill'];
if (pct === 100) {
cls.push('cover-full');
}
pct = Math.floor(pct);
return [
`<div class="${cls.join(' ')}" style="width: ${pct}%"></div>`,
`<div class="cover-empty" style="width: ${100 - pct}%"></div>`
].join('');
};
const summaryType = (type, showGraph = false) => {
const info = metrics[type];
const reportClass = reportClasses[type];
const result = [
`<td data-value="${info.pct}" class="pct ${reportClass}">${info.pct}%</td>`,
`<td data-value="${info.total}" class="abs ${reportClass}">${info.covered}/${info.total}</td>`
];
if (showGraph) {
result.unshift(
`<td data-value="${info.pct}" class="pic ${reportClass}">`,
`<div class="chart">${percentGraph(info.pct)}</div>`,
`</td>`
);
}
return result;
};
return []
.concat(
'<tr>',
`<td class="file ${
reportClasses.statements
}" data-value="${html.escape(file)}"><a href="${html.escape(
output
)}">${html.escape(file)}</a></td>`,
summaryType('statements', true),
summaryType('branches'),
summaryType('functions'),
summaryType('lines'),
'</tr>\n'
)
.join('\n\t');
}
const summaryTableFooter = ['</tbody>', '</table>', '</div>'].join('\n');
const emptyClasses = {
statements: 'empty',
lines: 'empty',
functions: 'empty',
branches: 'empty'
};
const standardLinkMapper = {
getPath(node) {
if (typeof node === 'string') {
return node;
}
let filePath = node.getQualifiedName();
if (node.isSummary()) {
if (filePath !== '') {
filePath += '/index.html';
} else {
filePath = 'index.html';
}
} else {
filePath += '.html';
}
return filePath;
},
relativePath(source, target) {
const targetPath = this.getPath(target);
const sourcePath = path.dirname(this.getPath(source));
return path.posix.relative(sourcePath, targetPath);
},
assetPath(node, name) {
return this.relativePath(this.getPath(node), name);
}
};
function fixPct(metrics) {
Object.keys(emptyClasses).forEach(key => {
metrics[key].pct = 0;
});
return metrics;
}
class HtmlReport extends ReportBase {
constructor(opts) {
super();
this.verbose = opts.verbose;
this.linkMapper = opts.linkMapper || standardLinkMapper;
this.subdir = opts.subdir || '';
this.date = new Date().toISOString();
this.skipEmpty = opts.skipEmpty;
}
getBreadcrumbHtml(node) {
let parent = node.getParent();
const nodePath = [];
while (parent) {
nodePath.push(parent);
parent = parent.getParent();
}
const linkPath = nodePath.map(ancestor => {
const target = this.linkMapper.relativePath(node, ancestor);
const name = ancestor.getRelativeName() || 'All files';
return '<a href="' + target + '">' + name + '</a>';
});
linkPath.reverse();
return linkPath.length > 0
? linkPath.join(' / ') + ' ' + node.getRelativeName()
: 'All files';
}
fillTemplate(node, templateData, context) {
const linkMapper = this.linkMapper;
const summary = node.getCoverageSummary();
templateData.entity = node.getQualifiedName() || 'All files';
templateData.metrics = summary;
templateData.reportClass = context.classForPercent(
'statements',
summary.statements.pct
);
templateData.pathHtml = this.getBreadcrumbHtml(node);
templateData.base = {
css: linkMapper.assetPath(node, 'base.css')
};
templateData.sorter = {
js: linkMapper.assetPath(node, 'sorter.js'),
image: linkMapper.assetPath(node, 'sort-arrow-sprite.png')
};
templateData.blockNavigation = {
js: linkMapper.assetPath(node, 'block-navigation.js')
};
templateData.prettify = {
js: linkMapper.assetPath(node, 'prettify.js'),
css: linkMapper.assetPath(node, 'prettify.css')
};
templateData.favicon = linkMapper.assetPath(node, 'favicon.png');
}
getTemplateData() {
return { datetime: this.date };
}
getWriter(context) {
if (!this.subdir) {
return context.writer;
}
return context.writer.writerForDir(this.subdir);
}
onStart(root, context) {
const assetHeaders = {
'.js': '/* eslint-disable */\n'
};
['.', 'vendor'].forEach(subdir => {
const writer = this.getWriter(context);
const srcDir = path.resolve(__dirname, 'assets', subdir);
fs.readdirSync(srcDir).forEach(f => {
const resolvedSource = path.resolve(srcDir, f);
const resolvedDestination = '.';
const stat = fs.statSync(resolvedSource);
let dest;
if (stat.isFile()) {
dest = resolvedDestination + '/' + f;
if (this.verbose) {
console.log('Write asset: ' + dest);
}
writer.copyFile(
resolvedSource,
dest,
assetHeaders[path.extname(f)]
);
}
});
});
}
onSummary(node, context) {
const linkMapper = this.linkMapper;
const templateData = this.getTemplateData();
const children = node.getChildren();
const skipEmpty = this.skipEmpty;
this.fillTemplate(node, templateData, context);
const cw = this.getWriter(context).writeFile(linkMapper.getPath(node));
cw.write(headerTemplate(templateData));
cw.write(summaryTableHeader);
children.forEach(child => {
const metrics = child.getCoverageSummary();
const isEmpty = metrics.isEmpty();
if (skipEmpty && isEmpty) {
return;
}
const reportClasses = isEmpty
? emptyClasses
: {
statements: context.classForPercent(
'statements',
metrics.statements.pct
),
lines: context.classForPercent(
'lines',
metrics.lines.pct
),
functions: context.classForPercent(
'functions',
metrics.functions.pct
),
branches: context.classForPercent(
'branches',
metrics.branches.pct
)
};
const data = {
metrics: isEmpty ? fixPct(metrics) : metrics,
reportClasses,
file: child.getRelativeName(),
output: linkMapper.relativePath(node, child)
};
cw.write(summaryLineTemplate(data) + '\n');
});
cw.write(summaryTableFooter);
cw.write(footerTemplate(templateData));
cw.close();
}
onDetail(node, context) {
const linkMapper = this.linkMapper;
const templateData = this.getTemplateData();
this.fillTemplate(node, templateData, context);
const cw = this.getWriter(context).writeFile(linkMapper.getPath(node));
cw.write(headerTemplate(templateData));
cw.write('<pre><table class="coverage">\n');
cw.write(detailTemplate(annotator(node.getFileCoverage(), context)));
cw.write('</table></pre>\n');
cw.write(footerTemplate(templateData));
cw.close();
}
}
module.exports = HtmlReport;
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","2":"_z"},B:{"1":"_4D","129":"_KB"},C:{"1":"_LF","2":"_g","260":"_ZG","804":"_Y _L"},D:{"1":"_KK","260":"_SE","388":"QB _ME","1412":"_9I","1956":"_Y"},E:{"1":"_uC","129":"_vL QD _dN","1412":"_RC _tE","1956":"_u"},F:{"1":"_QL","2":"_fB","260":"_TF","388":"_MD","1796":"_oI","1828":"_6 _uE"},G:{"1":"_7B","129":"jD _jD _iL _XG","1412":"_SD iD","1956":"_1"},H:{"1828":"1D"},I:{"1":"I","388":"_y","1956":"_W"},J:{"1412":"A","1924":"D"},K:{"1":"H","2":"A","1828":"_bD"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"B","2":"A"},O:{"1":"bC"},P:{"1":"_xB","260":"_RH","388":"J"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","260":"LE"}},B:4,C:"CSS3 Border images",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"streamableHttp.js","sourceRoot":"","sources":["../../../src/client/streamableHttp.ts"],"names":[],"mappings":"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 truncated
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CornerUpRight = createLucideIcon("CornerUpRight", [
["polyline", { points: "15 14 20 9 15 4", key: "1tbx3s" }],
["path", { d: "M4 20v-7a4 4 0 0 1 4-4h12", key: "1lu4f8" }]
]);
export { CornerUpRight as default };
//# sourceMappingURL=corner-up-right.js.map
@@ -0,0 +1,95 @@
# json-schema-traverse
Traverse JSON Schema passing each schema object to callback
[![build](https://github.com/epoberezkin/json-schema-traverse/workflows/build/badge.svg)](https://github.com/epoberezkin/json-schema-traverse/actions?query=workflow%3Abuild)
[![npm](https://img.shields.io/npm/v/json-schema-traverse)](https://www.npmjs.com/package/json-schema-traverse)
[![coverage](https://coveralls.io/repos/github/epoberezkin/json-schema-traverse/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master)
## Install
```
npm install json-schema-traverse
```
## Usage
```javascript
const traverse = require('json-schema-traverse');
const schema = {
properties: {
foo: {type: 'string'},
bar: {type: 'integer'}
}
};
traverse(schema, {cb});
// cb is called 3 times with:
// 1. root schema
// 2. {type: 'string'}
// 3. {type: 'integer'}
// Or:
traverse(schema, {cb: {pre, post}});
// pre is called 3 times with:
// 1. root schema
// 2. {type: 'string'}
// 3. {type: 'integer'}
//
// post is called 3 times with:
// 1. {type: 'string'}
// 2. {type: 'integer'}
// 3. root schema
```
Callback function `cb` is called for each schema object (not including draft-06 boolean schemas), including the root schema, in pre-order traversal. Schema references ($ref) are not resolved, they are passed as is. Alternatively, you can pass a `{pre, post}` object as `cb`, and then `pre` will be called before traversing child elements, and `post` will be called after all child elements have been traversed.
Callback is passed these parameters:
- _schema_: the current schema object
- _JSON pointer_: from the root schema to the current schema object
- _root schema_: the schema passed to `traverse` object
- _parent JSON pointer_: from the root schema to the parent schema object (see below)
- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.)
- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema
- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'`
## Traverse objects in all unknown keywords
```javascript
const traverse = require('json-schema-traverse');
const schema = {
mySchema: {
minimum: 1,
maximum: 2
}
};
traverse(schema, {allKeys: true, cb});
// cb is called 2 times with:
// 1. root schema
// 2. mySchema
```
Without option `allKeys: true` callback will be called only with root schema.
## Enterprise support
json-schema-traverse package is a part of [Tidelift enterprise subscription](https://tidelift.com/subscription/pkg/npm-json-schema-traverse?utm_source=npm-json-schema-traverse&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - it provides a centralised commercial support to open-source software users, in addition to the support provided by software maintainers.
## Security contact
To report a security vulnerability, please use the
[Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerability via GitHub issues.
## License
[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE)
@@ -0,0 +1,97 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_utils_buffer = require("./buffer.js");
//#region src/utils/body.ts
const MAX_NESTED_OBJECTS = 1e4;
const isRawRequest = (request) => "headers" in request;
const parseBody = async (request, options = Object.create(null)) => {
const { all = false, dot = false } = options;
const mediaType = (isRawRequest(request) ? request.headers : request.raw.headers).get("Content-Type")?.split(";")[0].trim().toLowerCase();
if (mediaType === "multipart/form-data" || mediaType === "application/x-www-form-urlencoded") return parseFormData(request, {
all,
dot
});
return {};
};
/**
* Parses form data from a request.
*
* @template T - The type of the parsed body data.
* @param {HonoRequest | Request} request - The request object containing form data.
* @param {ParseBodyOptions} options - Options for parsing the form data.
* @returns {Promise<T>} The parsed body data.
*/
async function parseFormData(request, options) {
if (!isRawRequest(request) && request.bodyCache.formData) return convertFormDataToBodyData(await request.bodyCache.formData, options);
const headers = isRawRequest(request) ? request.headers : request.raw.headers;
const arrayBuffer = await request.arrayBuffer();
const formDataPromise = require_utils_buffer.bufferToFormData(arrayBuffer, headers.get("Content-Type") || "");
if (!isRawRequest(request)) request.bodyCache.formData = formDataPromise;
const formData = await formDataPromise;
if (formData) return convertFormDataToBodyData(formData, options);
return {};
}
/**
* Converts form data to body data based on the provided options.
*
* @template T - The type of the parsed body data.
* @param {FormData} formData - The form data to convert.
* @param {ParseBodyOptions} options - Options for parsing the form data.
* @returns {T} The converted body data.
*/
function convertFormDataToBodyData(formData, options) {
const form = Object.create(null);
const nestingState = { count: 0 };
formData.forEach((value, key) => {
if (!(options.all || key.endsWith("[]"))) form[key] = value;
else handleParsingAllValues(form, key, value);
});
if (options.dot) Object.entries(form).forEach(([key, value]) => {
if (key.includes(".")) {
handleParsingNestedValues(form, key, value, nestingState);
delete form[key];
}
});
return form;
}
/**
* Handles parsing all values for a given key, supporting multiple values as arrays.
*
* @param {BodyData} form - The form data object.
* @param {string} key - The key to parse.
* @param {FormDataEntryValue} value - The value to assign.
*/
const handleParsingAllValues = (form, key, value) => {
if (form[key] !== void 0) {
if (Array.isArray(form[key])) form[key].push(value);
else form[key] = [form[key], value];
} else if (!key.endsWith("[]")) form[key] = value;
else form[key] = [value];
};
/**
* Handles parsing nested values using dot notation keys.
*
* @param {BodyData} form - The form data object.
* @param {string} key - The dot notation key.
* @param {BodyDataValue} value - The value to assign.
*/
const handleParsingNestedValues = (form, key, value, state) => {
if (/(?:^|\.)__proto__\./.test(key)) return;
let nestedForm = form;
const keys = key.split(".", 34);
if (keys.length > 33) throwNestingLimitExceeded();
keys.forEach((key, index) => {
if (index === keys.length - 1) nestedForm[key] = value;
else {
if (!nestedForm[key] || typeof nestedForm[key] !== "object" || Array.isArray(nestedForm[key]) || nestedForm[key] instanceof File) {
if (state.count++ >= MAX_NESTED_OBJECTS) throwNestingLimitExceeded();
nestedForm[key] = Object.create(null);
}
nestedForm = nestedForm[key];
}
});
};
const throwNestingLimitExceeded = () => {
throw new Error("Nesting limit exceeded");
};
//#endregion
exports.parseBody = parseBody;
@@ -0,0 +1 @@
{"version":3,"file":"user-round-pen.js","sources":["../../../src/icons/user-round-pen.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name UserRoundPen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiAyMWE4IDggMCAwIDEgMTAuODIxLTcuNDg3IiAvPgogIDxwYXRoIGQ9Ik0yMS4zNzggMTYuNjI2YTEgMSAwIDAgMC0zLjAwNC0zLjAwNGwtNC4wMSA0LjAxMmEyIDIgMCAwIDAtLjUwNi44NTRsLS44MzcgMi44N2EuNS41IDAgMCAwIC42Mi42MmwyLjg3LS44MzdhMiAyIDAgMCAwIC44NTQtLjUwNnoiIC8+CiAgPGNpcmNsZSBjeD0iMTAiIGN5PSI4IiByPSI1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/user-round-pen\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 UserRoundPen = createLucideIcon('UserRoundPen', [\n ['path', { d: 'M2 21a8 8 0 0 1 10.821-7.487', key: '1c8h7z' }],\n [\n 'path',\n {\n d: 'M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z',\n key: '1817ys',\n },\n ],\n ['circle', { cx: '10', cy: '8', r: '5', key: 'o932ke' }],\n]);\n\nexport default UserRoundPen;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC7D,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,743 @@
'use strict';
const { Writable } = require('stream');
const PerMessageDeflate = require('./permessage-deflate');
const {
BINARY_TYPES,
EMPTY_BUFFER,
kStatusCode,
kWebSocket
} = require('./constants');
const { concat, toArrayBuffer, unmask } = require('./buffer-util');
const { isValidStatusCode, isValidUTF8 } = require('./validation');
const FastBuffer = Buffer[Symbol.species];
const GET_INFO = 0;
const GET_PAYLOAD_LENGTH_16 = 1;
const GET_PAYLOAD_LENGTH_64 = 2;
const GET_MASK = 3;
const GET_DATA = 4;
const INFLATING = 5;
const DEFER_EVENT = 6;
/**
* HyBi Receiver implementation.
*
* @extends Writable
*/
class Receiver extends Writable {
/**
* Creates a Receiver instance.
*
* @param {Object} [options] Options object
* @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
* multiple times in the same tick
* @param {String} [options.binaryType=nodebuffer] The type for binary data
* @param {Object} [options.extensions] An object containing the negotiated
* extensions
* @param {Boolean} [options.isServer=false] Specifies whether to operate in
* client or server mode
* @param {Number} [options.maxBufferedChunks=0] The maximum number of
* buffered data chunks
* @param {Number} [options.maxFragments=0] The maximum number of message
* fragments
* @param {Number} [options.maxPayload=0] The maximum allowed message length
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
* not to skip UTF-8 validation for text and close messages
*/
constructor(options = {}) {
super();
this._allowSynchronousEvents =
options.allowSynchronousEvents !== undefined
? options.allowSynchronousEvents
: true;
this._binaryType = options.binaryType || BINARY_TYPES[0];
this._extensions = options.extensions || {};
this._isServer = !!options.isServer;
this._maxBufferedChunks = options.maxBufferedChunks | 0;
this._maxFragments = options.maxFragments | 0;
this._maxPayload = options.maxPayload | 0;
this._skipUTF8Validation = !!options.skipUTF8Validation;
this[kWebSocket] = undefined;
this._bufferedBytes = 0;
this._buffers = [];
this._compressed = false;
this._payloadLength = 0;
this._mask = undefined;
this._fragmented = 0;
this._masked = false;
this._fin = false;
this._opcode = 0;
this._totalPayloadLength = 0;
this._messageLength = 0;
this._numFragments = 0;
this._fragments = [];
this._errored = false;
this._loop = false;
this._state = GET_INFO;
}
/**
* Implements `Writable.prototype._write()`.
*
* @param {Buffer} chunk The chunk of data to write
* @param {String} encoding The character encoding of `chunk`
* @param {Function} cb Callback
* @private
*/
_write(chunk, encoding, cb) {
if (this._opcode === 0x08 && this._state == GET_INFO) return cb();
if (
this._maxBufferedChunks > 0 &&
this._buffers.length >= this._maxBufferedChunks
) {
cb(
this.createError(
RangeError,
'Too many buffered chunks',
false,
1008,
'WS_ERR_TOO_MANY_BUFFERED_PARTS'
)
);
return;
}
this._bufferedBytes += chunk.length;
this._buffers.push(chunk);
this.startLoop(cb);
}
/**
* Consumes `n` bytes from the buffered data.
*
* @param {Number} n The number of bytes to consume
* @return {Buffer} The consumed bytes
* @private
*/
consume(n) {
this._bufferedBytes -= n;
if (n === this._buffers[0].length) return this._buffers.shift();
if (n < this._buffers[0].length) {
const buf = this._buffers[0];
this._buffers[0] = new FastBuffer(
buf.buffer,
buf.byteOffset + n,
buf.length - n
);
return new FastBuffer(buf.buffer, buf.byteOffset, n);
}
const dst = Buffer.allocUnsafe(n);
do {
const buf = this._buffers[0];
const offset = dst.length - n;
if (n >= buf.length) {
dst.set(this._buffers.shift(), offset);
} else {
dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);
this._buffers[0] = new FastBuffer(
buf.buffer,
buf.byteOffset + n,
buf.length - n
);
}
n -= buf.length;
} while (n > 0);
return dst;
}
/**
* Starts the parsing loop.
*
* @param {Function} cb Callback
* @private
*/
startLoop(cb) {
this._loop = true;
do {
switch (this._state) {
case GET_INFO:
this.getInfo(cb);
break;
case GET_PAYLOAD_LENGTH_16:
this.getPayloadLength16(cb);
break;
case GET_PAYLOAD_LENGTH_64:
this.getPayloadLength64(cb);
break;
case GET_MASK:
this.getMask();
break;
case GET_DATA:
this.getData(cb);
break;
case INFLATING:
case DEFER_EVENT:
this._loop = false;
return;
}
} while (this._loop);
if (!this._errored) cb();
}
/**
* Reads the first two bytes of a frame.
*
* @param {Function} cb Callback
* @private
*/
getInfo(cb) {
if (this._bufferedBytes < 2) {
this._loop = false;
return;
}
const buf = this.consume(2);
if ((buf[0] & 0x30) !== 0x00) {
const error = this.createError(
RangeError,
'RSV2 and RSV3 must be clear',
true,
1002,
'WS_ERR_UNEXPECTED_RSV_2_3'
);
cb(error);
return;
}
const compressed = (buf[0] & 0x40) === 0x40;
if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {
const error = this.createError(
RangeError,
'RSV1 must be clear',
true,
1002,
'WS_ERR_UNEXPECTED_RSV_1'
);
cb(error);
return;
}
this._fin = (buf[0] & 0x80) === 0x80;
this._opcode = buf[0] & 0x0f;
this._payloadLength = buf[1] & 0x7f;
if (this._opcode === 0x00) {
if (compressed) {
const error = this.createError(
RangeError,
'RSV1 must be clear',
true,
1002,
'WS_ERR_UNEXPECTED_RSV_1'
);
cb(error);
return;
}
if (!this._fragmented) {
const error = this.createError(
RangeError,
'invalid opcode 0',
true,
1002,
'WS_ERR_INVALID_OPCODE'
);
cb(error);
return;
}
this._opcode = this._fragmented;
} else if (this._opcode === 0x01 || this._opcode === 0x02) {
if (this._fragmented) {
const error = this.createError(
RangeError,
`invalid opcode ${this._opcode}`,
true,
1002,
'WS_ERR_INVALID_OPCODE'
);
cb(error);
return;
}
this._compressed = compressed;
} else if (this._opcode > 0x07 && this._opcode < 0x0b) {
if (!this._fin) {
const error = this.createError(
RangeError,
'FIN must be set',
true,
1002,
'WS_ERR_EXPECTED_FIN'
);
cb(error);
return;
}
if (compressed) {
const error = this.createError(
RangeError,
'RSV1 must be clear',
true,
1002,
'WS_ERR_UNEXPECTED_RSV_1'
);
cb(error);
return;
}
if (
this._payloadLength > 0x7d ||
(this._opcode === 0x08 && this._payloadLength === 1)
) {
const error = this.createError(
RangeError,
`invalid payload length ${this._payloadLength}`,
true,
1002,
'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH'
);
cb(error);
return;
}
} else {
const error = this.createError(
RangeError,
`invalid opcode ${this._opcode}`,
true,
1002,
'WS_ERR_INVALID_OPCODE'
);
cb(error);
return;
}
if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
this._masked = (buf[1] & 0x80) === 0x80;
if (this._isServer) {
if (!this._masked) {
const error = this.createError(
RangeError,
'MASK must be set',
true,
1002,
'WS_ERR_EXPECTED_MASK'
);
cb(error);
return;
}
} else if (this._masked) {
const error = this.createError(
RangeError,
'MASK must be clear',
true,
1002,
'WS_ERR_UNEXPECTED_MASK'
);
cb(error);
return;
}
if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;
else this.haveLength(cb);
}
/**
* Gets extended payload length (7+16).
*
* @param {Function} cb Callback
* @private
*/
getPayloadLength16(cb) {
if (this._bufferedBytes < 2) {
this._loop = false;
return;
}
this._payloadLength = this.consume(2).readUInt16BE(0);
this.haveLength(cb);
}
/**
* Gets extended payload length (7+64).
*
* @param {Function} cb Callback
* @private
*/
getPayloadLength64(cb) {
if (this._bufferedBytes < 8) {
this._loop = false;
return;
}
const buf = this.consume(8);
const num = buf.readUInt32BE(0);
//
// The maximum safe integer in JavaScript is 2^53 - 1. An error is returned
// if payload length is greater than this number.
//
if (num > Math.pow(2, 53 - 32) - 1) {
const error = this.createError(
RangeError,
'Unsupported WebSocket frame: payload length > 2^53 - 1',
false,
1009,
'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH'
);
cb(error);
return;
}
this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
this.haveLength(cb);
}
/**
* Payload length has been read.
*
* @param {Function} cb Callback
* @private
*/
haveLength(cb) {
if (this._payloadLength && this._opcode < 0x08) {
this._totalPayloadLength += this._payloadLength;
if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
const error = this.createError(
RangeError,
'Max payload size exceeded',
false,
1009,
'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
);
cb(error);
return;
}
}
if (this._masked) this._state = GET_MASK;
else this._state = GET_DATA;
}
/**
* Reads mask bytes.
*
* @private
*/
getMask() {
if (this._bufferedBytes < 4) {
this._loop = false;
return;
}
this._mask = this.consume(4);
this._state = GET_DATA;
}
/**
* Reads data bytes.
*
* @param {Function} cb Callback
* @private
*/
getData(cb) {
let data = EMPTY_BUFFER;
if (this._payloadLength) {
if (this._bufferedBytes < this._payloadLength) {
this._loop = false;
return;
}
data = this.consume(this._payloadLength);
if (
this._masked &&
(this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0
) {
unmask(data, this._mask);
}
}
if (this._opcode > 0x07) {
this.controlMessage(data, cb);
return;
}
if (this._maxFragments > 0 && ++this._numFragments > this._maxFragments) {
const error = this.createError(
RangeError,
'Too many message fragments',
false,
1008,
'WS_ERR_TOO_MANY_BUFFERED_PARTS'
);
cb(error);
return;
}
if (this._compressed) {
this._state = INFLATING;
this.decompress(data, cb);
return;
}
if (data.length) {
//
// This message is not compressed so its length is the sum of the payload
// length of all fragments.
//
this._messageLength = this._totalPayloadLength;
this._fragments.push(data);
}
this.dataMessage(cb);
}
/**
* Decompresses data.
*
* @param {Buffer} data Compressed data
* @param {Function} cb Callback
* @private
*/
decompress(data, cb) {
const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
perMessageDeflate.decompress(data, this._fin, (err, buf) => {
if (err) return cb(err);
if (buf.length) {
this._messageLength += buf.length;
if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
const error = this.createError(
RangeError,
'Max payload size exceeded',
false,
1009,
'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
);
cb(error);
return;
}
this._fragments.push(buf);
}
this.dataMessage(cb);
if (this._state === GET_INFO) this.startLoop(cb);
});
}
/**
* Handles a data message.
*
* @param {Function} cb Callback
* @private
*/
dataMessage(cb) {
if (!this._fin) {
this._state = GET_INFO;
return;
}
const messageLength = this._messageLength;
const fragments = this._fragments;
this._totalPayloadLength = 0;
this._messageLength = 0;
this._fragmented = 0;
this._numFragments = 0;
this._fragments = [];
if (this._opcode === 2) {
let data;
if (this._binaryType === 'nodebuffer') {
data = concat(fragments, messageLength);
} else if (this._binaryType === 'arraybuffer') {
data = toArrayBuffer(concat(fragments, messageLength));
} else if (this._binaryType === 'blob') {
data = new Blob(fragments);
} else {
data = fragments;
}
if (this._allowSynchronousEvents) {
this.emit('message', data, true);
this._state = GET_INFO;
} else {
this._state = DEFER_EVENT;
setImmediate(() => {
this.emit('message', data, true);
this._state = GET_INFO;
this.startLoop(cb);
});
}
} else {
const buf = concat(fragments, messageLength);
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
const error = this.createError(
Error,
'invalid UTF-8 sequence',
true,
1007,
'WS_ERR_INVALID_UTF8'
);
cb(error);
return;
}
if (this._state === INFLATING || this._allowSynchronousEvents) {
this.emit('message', buf, false);
this._state = GET_INFO;
} else {
this._state = DEFER_EVENT;
setImmediate(() => {
this.emit('message', buf, false);
this._state = GET_INFO;
this.startLoop(cb);
});
}
}
}
/**
* Handles a control message.
*
* @param {Buffer} data Data to handle
* @return {(Error|RangeError|undefined)} A possible error
* @private
*/
controlMessage(data, cb) {
if (this._opcode === 0x08) {
if (data.length === 0) {
this._loop = false;
this.emit('conclude', 1005, EMPTY_BUFFER);
this.end();
} else {
const code = data.readUInt16BE(0);
if (!isValidStatusCode(code)) {
const error = this.createError(
RangeError,
`invalid status code ${code}`,
true,
1002,
'WS_ERR_INVALID_CLOSE_CODE'
);
cb(error);
return;
}
const buf = new FastBuffer(
data.buffer,
data.byteOffset + 2,
data.length - 2
);
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
const error = this.createError(
Error,
'invalid UTF-8 sequence',
true,
1007,
'WS_ERR_INVALID_UTF8'
);
cb(error);
return;
}
this._loop = false;
this.emit('conclude', code, buf);
this.end();
}
this._state = GET_INFO;
return;
}
if (this._allowSynchronousEvents) {
this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);
this._state = GET_INFO;
} else {
this._state = DEFER_EVENT;
setImmediate(() => {
this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);
this._state = GET_INFO;
this.startLoop(cb);
});
}
}
/**
* Builds an error object.
*
* @param {function(new:Error|RangeError)} ErrorCtor The error constructor
* @param {String} message The error message
* @param {Boolean} prefix Specifies whether or not to add a default prefix to
* `message`
* @param {Number} statusCode The status code
* @param {String} errorCode The exposed error code
* @return {(Error|RangeError)} The error
* @private
*/
createError(ErrorCtor, message, prefix, statusCode, errorCode) {
this._loop = false;
this._errored = true;
const err = new ErrorCtor(
prefix ? `Invalid WebSocket frame: ${message}` : message
);
Error.captureStackTrace(err, this.createError);
err.code = errorCode;
err[kStatusCode] = statusCode;
return err;
}
}
module.exports = Receiver;
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var use_sidecar_1 = require("use-sidecar");
var SideEffect_1 = require("./SideEffect");
var medium_1 = require("./medium");
exports.default = (0, use_sidecar_1.exportSidecar)(medium_1.effectCar, SideEffect_1.RemoveScrollSideCar);
@@ -0,0 +1,299 @@
"use client";
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
const require_utils = require("./utils.cjs");
const require_CatchBoundary = require("./CatchBoundary.cjs");
const require_ClientOnly = require("./ClientOnly.cjs");
const require_matchContext = require("./matchContext.cjs");
const require_useRouter = require("./useRouter.cjs");
const require_not_found = require("./not-found.cjs");
const require_SafeFragment = require("./SafeFragment.cjs");
const require_renderRouteNotFound = require("./renderRouteNotFound.cjs");
const require_scroll_restoration = require("./scroll-restoration.cjs");
let _tanstack_router_core = require("@tanstack/router-core");
let react = require("react");
react = require_runtime.__toESM(react);
let react_jsx_runtime = require("react/jsx-runtime");
let _tanstack_react_store = require("@tanstack/react-store");
let _tanstack_router_core_isServer = require("@tanstack/router-core/isServer");
//#region src/Match.tsx
var Match = react.memo(function MatchImpl({ matchId }) {
const router = require_useRouter.useRouter();
if (_tanstack_router_core_isServer.isServer ?? router.isServer) {
const match = router.stores.matchStores.get(matchId)?.get();
if (!match) {
if (process.env.NODE_ENV !== "production") throw new Error(`Invariant failed: Could not find match for matchId "${matchId}". Please file an issue!`);
(0, _tanstack_router_core.invariant)();
}
const routeId = match.routeId;
const parentRouteId = router.routesById[routeId].parentRoute?.id;
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MatchView, {
router,
matchId,
resetKey: router.stores.loadedAt.get(),
matchState: {
routeId,
ssr: match.ssr,
_displayPending: match._displayPending,
parentRouteId
}
});
}
const matchStore = router.stores.matchStores.get(matchId);
if (!matchStore) {
if (process.env.NODE_ENV !== "production") throw new Error(`Invariant failed: Could not find match for matchId "${matchId}". Please file an issue!`);
(0, _tanstack_router_core.invariant)();
}
const resetKey = (0, _tanstack_react_store.useStore)(router.stores.loadedAt, (loadedAt) => loadedAt);
const match = (0, _tanstack_react_store.useStore)(matchStore, (value) => value);
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MatchView, {
router,
matchId,
resetKey,
matchState: react.useMemo(() => {
const routeId = match.routeId;
const parentRouteId = router.routesById[routeId].parentRoute?.id;
return {
routeId,
ssr: match.ssr,
_displayPending: match._displayPending,
parentRouteId
};
}, [
match._displayPending,
match.routeId,
match.ssr,
router.routesById
])
});
});
function MatchView({ router, matchId, resetKey, matchState }) {
const route = router.routesById[matchState.routeId];
const PendingComponent = route.options.pendingComponent ?? router.options.defaultPendingComponent;
const pendingElement = PendingComponent ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PendingComponent, {}) : null;
const routeErrorComponent = route.options.errorComponent ?? router.options.defaultErrorComponent;
const routeOnCatch = route.options.onCatch ?? router.options.defaultOnCatch;
const routeNotFoundComponent = route.isRoot ? route.options.notFoundComponent ?? router.options.notFoundRoute?.options.component : route.options.notFoundComponent;
const resolvedNoSsr = matchState.ssr === false || matchState.ssr === "data-only";
const ResolvedSuspenseBoundary = (!route.isRoot || route.options.wrapInSuspense || resolvedNoSsr) && (route.options.wrapInSuspense ?? PendingComponent ?? (route.options.errorComponent?.preload || resolvedNoSsr)) ? react.Suspense : require_SafeFragment.SafeFragment;
const ResolvedCatchBoundary = routeErrorComponent ? require_CatchBoundary.CatchBoundary : require_SafeFragment.SafeFragment;
const ResolvedNotFoundBoundary = routeNotFoundComponent ? require_not_found.CatchNotFound : require_SafeFragment.SafeFragment;
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(route.isRoot ? route.options.shellComponent ?? require_SafeFragment.SafeFragment : require_SafeFragment.SafeFragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_matchContext.matchContext.Provider, {
value: matchId,
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResolvedSuspenseBoundary, {
fallback: pendingElement,
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResolvedCatchBoundary, {
getResetKey: () => resetKey,
errorComponent: routeErrorComponent || require_CatchBoundary.ErrorComponent,
onCatch: (error, errorInfo) => {
if ((0, _tanstack_router_core.isNotFound)(error)) {
error.routeId ??= matchState.routeId;
throw error;
}
if (process.env.NODE_ENV !== "production") console.warn(`Warning: Error in route match: ${matchId}`);
routeOnCatch?.(error, errorInfo);
},
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResolvedNotFoundBoundary, {
fallback: (error) => {
error.routeId ??= matchState.routeId;
if (!routeNotFoundComponent || error.routeId && error.routeId !== matchState.routeId || !error.routeId && !route.isRoot) throw error;
return react.createElement(routeNotFoundComponent, error);
},
children: resolvedNoSsr || matchState._displayPending ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ClientOnly.ClientOnly, {
fallback: pendingElement,
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MatchInner, { matchId })
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MatchInner, { matchId })
})
})
})
}), matchState.parentRouteId === _tanstack_router_core.rootRouteId ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(OnRendered, { resetKey }), router.options.scrollRestoration && (_tanstack_router_core_isServer.isServer ?? router.isServer) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_scroll_restoration.ScrollRestoration, {}) : null] }) : null] });
}
function OnRendered({ resetKey }) {
const router = require_useRouter.useRouter();
if (_tanstack_router_core_isServer.isServer ?? router.isServer) return null;
const prevHrefRef = react.useRef(void 0);
require_utils.useLayoutEffect(() => {
const currentHref = router.latestLocation.href;
if (prevHrefRef.current === void 0 || prevHrefRef.current !== currentHref) {
router.emit({
type: "onRendered",
...(0, _tanstack_router_core.getLocationChangeInfo)(router.stores.location.get(), router.stores.resolvedLocation.get())
});
prevHrefRef.current = currentHref;
}
}, [
router.latestLocation.state.__TSR_key,
resetKey,
router
]);
return null;
}
var MatchInner = react.memo(function MatchInnerImpl({ matchId }) {
const router = require_useRouter.useRouter();
const getMatchPromise = (match, key) => {
return router.getMatch(match.id)?._nonReactive[key] ?? match._nonReactive[key];
};
if (_tanstack_router_core_isServer.isServer ?? router.isServer) {
const match = router.stores.matchStores.get(matchId)?.get();
if (!match) {
if (process.env.NODE_ENV !== "production") throw new Error(`Invariant failed: Could not find match for matchId "${matchId}". Please file an issue!`);
(0, _tanstack_router_core.invariant)();
}
const routeId = match.routeId;
const route = router.routesById[routeId];
const remountDeps = (router.routesById[routeId].options.remountDeps ?? router.options.defaultRemountDeps)?.({
routeId,
loaderDeps: match.loaderDeps,
params: match._strictParams,
search: match._strictSearch
});
const key = remountDeps ? JSON.stringify(remountDeps) : void 0;
const Comp = route.options.component ?? router.options.defaultComponent;
const out = Comp ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Comp, {}, key) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Outlet, {});
if (match._displayPending) throw getMatchPromise(match, "displayPendingPromise");
if (match._forcePending) throw getMatchPromise(match, "minPendingPromise");
if (match.status === "pending") throw getMatchPromise(match, "loadPromise");
if (match.status === "notFound") {
if (!(0, _tanstack_router_core.isNotFound)(match.error)) {
if (process.env.NODE_ENV !== "production") throw new Error("Invariant failed: Expected a notFound error");
(0, _tanstack_router_core.invariant)();
}
return require_renderRouteNotFound.renderRouteNotFound(router, route, match.error);
}
if (match.status === "redirected") {
if (!(0, _tanstack_router_core.isRedirect)(match.error)) {
if (process.env.NODE_ENV !== "production") throw new Error("Invariant failed: Expected a redirect error");
(0, _tanstack_router_core.invariant)();
}
throw getMatchPromise(match, "loadPromise");
}
if (match.status === "error") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)((route.options.errorComponent ?? router.options.defaultErrorComponent) || require_CatchBoundary.ErrorComponent, {
error: match.error,
reset: void 0,
info: { componentStack: "" }
});
return out;
}
const matchStore = router.stores.matchStores.get(matchId);
if (!matchStore) {
if (process.env.NODE_ENV !== "production") throw new Error(`Invariant failed: Could not find match for matchId "${matchId}". Please file an issue!`);
(0, _tanstack_router_core.invariant)();
}
const match = (0, _tanstack_react_store.useStore)(matchStore, (value) => value);
const routeId = match.routeId;
const route = router.routesById[routeId];
const key = react.useMemo(() => {
const remountDeps = (router.routesById[routeId].options.remountDeps ?? router.options.defaultRemountDeps)?.({
routeId,
loaderDeps: match.loaderDeps,
params: match._strictParams,
search: match._strictSearch
});
return remountDeps ? JSON.stringify(remountDeps) : void 0;
}, [
routeId,
match.loaderDeps,
match._strictParams,
match._strictSearch,
router.options.defaultRemountDeps,
router.routesById
]);
const out = react.useMemo(() => {
const Comp = route.options.component ?? router.options.defaultComponent;
if (Comp) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Comp, {}, key);
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Outlet, {});
}, [
key,
route.options.component,
router.options.defaultComponent
]);
if (match._displayPending) throw getMatchPromise(match, "displayPendingPromise");
if (match._forcePending) throw getMatchPromise(match, "minPendingPromise");
if (match.status === "pending") {
const pendingMinMs = route.options.pendingMinMs ?? router.options.defaultPendingMinMs;
if (pendingMinMs) {
const routerMatch = router.getMatch(match.id);
if (routerMatch && !routerMatch._nonReactive.minPendingPromise) {
if (!(_tanstack_router_core_isServer.isServer ?? router.isServer)) {
const minPendingPromise = (0, _tanstack_router_core.createControlledPromise)();
routerMatch._nonReactive.minPendingPromise = minPendingPromise;
setTimeout(() => {
minPendingPromise.resolve();
routerMatch._nonReactive.minPendingPromise = void 0;
}, pendingMinMs);
}
}
}
throw getMatchPromise(match, "loadPromise");
}
if (match.status === "notFound") {
if (!(0, _tanstack_router_core.isNotFound)(match.error)) {
if (process.env.NODE_ENV !== "production") throw new Error("Invariant failed: Expected a notFound error");
(0, _tanstack_router_core.invariant)();
}
return require_renderRouteNotFound.renderRouteNotFound(router, route, match.error);
}
if (match.status === "redirected") {
if (!(0, _tanstack_router_core.isRedirect)(match.error)) {
if (process.env.NODE_ENV !== "production") throw new Error("Invariant failed: Expected a redirect error");
(0, _tanstack_router_core.invariant)();
}
throw getMatchPromise(match, "loadPromise");
}
if (match.status === "error") {
if (_tanstack_router_core_isServer.isServer ?? router.isServer) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)((route.options.errorComponent ?? router.options.defaultErrorComponent) || require_CatchBoundary.ErrorComponent, {
error: match.error,
reset: void 0,
info: { componentStack: "" }
});
throw match.error;
}
return out;
});
/**
* Render the next child match in the route tree. Typically used inside
* a route component to render nested routes.
*
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/outletComponent
*/
var Outlet = react.memo(function OutletImpl() {
const router = require_useRouter.useRouter();
const matchId = react.useContext(require_matchContext.matchContext);
let routeId;
let parentGlobalNotFound = false;
let childMatchId;
if (_tanstack_router_core_isServer.isServer ?? router.isServer) {
const matches = router.stores.matches.get();
const parentIndex = matchId ? matches.findIndex((match) => match.id === matchId) : -1;
const parentMatch = parentIndex >= 0 ? matches[parentIndex] : void 0;
routeId = parentMatch?.routeId;
parentGlobalNotFound = parentMatch?.globalNotFound ?? false;
childMatchId = parentIndex >= 0 ? matches[parentIndex + 1]?.id : void 0;
} else {
const parentMatchStore = matchId ? router.stores.matchStores.get(matchId) : void 0;
[routeId, parentGlobalNotFound] = (0, _tanstack_react_store.useStore)(parentMatchStore, (match) => [match?.routeId, match?.globalNotFound ?? false]);
childMatchId = (0, _tanstack_react_store.useStore)(router.stores.matchesId, (ids) => {
return ids[ids.findIndex((id) => id === matchId) + 1];
});
}
const route = routeId ? router.routesById[routeId] : void 0;
const pendingElement = router.options.defaultPendingComponent ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(router.options.defaultPendingComponent, {}) : null;
if (parentGlobalNotFound) {
if (!route) {
if (process.env.NODE_ENV !== "production") throw new Error("Invariant failed: Could not resolve route for Outlet render");
(0, _tanstack_router_core.invariant)();
}
return require_renderRouteNotFound.renderRouteNotFound(router, route, void 0);
}
if (!childMatchId) return null;
const nextMatch = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Match, { matchId: childMatchId });
if (routeId === _tanstack_router_core.rootRouteId) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Suspense, {
fallback: pendingElement,
children: nextMatch
});
return nextMatch;
});
//#endregion
exports.Match = Match;
exports.Outlet = Outlet;
//# sourceMappingURL=Match.cjs.map
@@ -0,0 +1 @@
{"version":3,"file":"link.cjs","names":[],"sources":["../../src/link.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { useStore } from '@tanstack/react-store'\nimport { flushSync } from 'react-dom'\nimport {\n deepEqual,\n exactPathTest,\n functionalUpdate,\n hasKeys,\n isDangerousProtocol,\n preloadWarning,\n removeTrailingSlash,\n} from '@tanstack/router-core'\nimport { isServer } from '@tanstack/router-core/isServer'\nimport { useRouter } from './useRouter'\n\nimport { useForwardedRef, useIntersectionObserver } from './utils'\n\nimport { useHydrated } from './ClientOnly'\nimport type {\n AnyRouter,\n Constrain,\n LinkOptions,\n RegisteredRouter,\n RoutePaths,\n} from '@tanstack/router-core'\nimport type { ReactNode } from 'react'\nimport type {\n ValidateLinkOptions,\n ValidateLinkOptionsArray,\n} from './typePrimitives'\n\n/**\n * Build anchor-like props for declarative navigation and preloading.\n *\n * Returns stable `href`, event handlers and accessibility props derived from\n * router options and active state. Used internally by `Link` and custom links.\n *\n * Options cover `to`, `params`, `search`, `hash`, `state`, `preload`,\n * `activeProps`, `inactiveProps`, and more.\n *\n * @returns React anchor props suitable for `<a>` or custom components.\n * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLinkPropsHook\n */\nexport function useLinkProps<\n TRouter extends AnyRouter = RegisteredRouter,\n const TFrom extends string = string,\n const TTo extends string | undefined = undefined,\n const TMaskFrom extends string = TFrom,\n const TMaskTo extends string = '',\n>(\n options: UseLinkPropsOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>,\n forwardedRef?: React.ForwardedRef<Element>,\n): React.ComponentPropsWithRef<'a'> {\n const router = useRouter()\n const innerRef = useForwardedRef(forwardedRef)\n\n // Determine if we're on the server - used for tree-shaking client-only code\n const _isServer = isServer ?? router.isServer\n\n const {\n // custom props\n activeProps,\n inactiveProps,\n activeOptions,\n to,\n preload: userPreload,\n preloadDelay: userPreloadDelay,\n preloadIntentProximity: _preloadIntentProximity,\n hashScrollIntoView,\n replace,\n startTransition,\n resetScroll,\n viewTransition,\n // element props\n children,\n target,\n disabled,\n style,\n className,\n onClick,\n onBlur,\n onFocus,\n onMouseEnter,\n onMouseLeave,\n onTouchStart,\n ignoreBlocker,\n // prevent these from being returned\n params: _params,\n search: _search,\n hash: _hash,\n state: _state,\n mask: _mask,\n reloadDocument: _reloadDocument,\n unsafeRelative: _unsafeRelative,\n from: _from,\n _fromLocation,\n ...propsSafeToSpread\n } = options\n\n // ==========================================================================\n // SERVER EARLY RETURN\n // On the server, we return static props without any event handlers,\n // effects, or client-side interactivity.\n //\n // For SSR parity (to avoid hydration errors), we still compute the link's\n // active status on the server, but we avoid creating any router-state\n // subscriptions by reading from the location store directly.\n //\n // Note: `location.hash` is not available on the server.\n // ==========================================================================\n if (_isServer) {\n const safeInternal = isSafeInternal(to)\n\n // If `to` is obviously an absolute URL, treat as external and avoid\n // computing the internal location via `buildLocation`.\n if (\n typeof to === 'string' &&\n !safeInternal &&\n // Quick checks to avoid `new URL` in common internal-like cases\n to.indexOf(':') > -1\n ) {\n try {\n new URL(to)\n if (isDangerousProtocol(to, router.protocolAllowlist)) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`Blocked Link with dangerous protocol: ${to}`)\n }\n return {\n ...propsSafeToSpread,\n ref: innerRef as React.ComponentPropsWithRef<'a'>['ref'],\n href: undefined,\n ...(children && { children }),\n ...(target && { target }),\n ...(disabled && { disabled }),\n ...(style && { style }),\n ...(className && { className }),\n }\n }\n\n return {\n ...propsSafeToSpread,\n ref: innerRef as React.ComponentPropsWithRef<'a'>['ref'],\n href: to,\n ...(children && { children }),\n ...(target && { target }),\n ...(disabled && { disabled }),\n ...(style && { style }),\n ...(className && { className }),\n }\n } catch {\n // Not an absolute URL\n }\n }\n\n const next = router.buildLocation({ ...options, from: options.from } as any)\n\n /Line truncated
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Superscript = createLucideIcon("Superscript", [
["path", { d: "m4 19 8-8", key: "hr47gm" }],
["path", { d: "m12 19-8-8", key: "1dhhmo" }],
[
"path",
{
d: "M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06",
key: "1dfcux"
}
]
]);
export { Superscript as default };
//# sourceMappingURL=superscript.js.map
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MoveLeft = createLucideIcon("MoveLeft", [
["path", { d: "M6 8L2 12L6 16", key: "kyvwex" }],
["path", { d: "M2 12H22", key: "1m8cig" }]
]);
export { MoveLeft as default };
//# sourceMappingURL=move-left.js.map
@@ -0,0 +1 @@
{"version":3,"file":"share.js","sources":["../../../src/icons/share.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Share\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxMnY4YTIgMiAwIDAgMCAyIDJoMTJhMiAyIDAgMCAwIDItMnYtOCIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSIxNiA2IDEyIDIgOCA2IiAvPgogIDxsaW5lIHgxPSIxMiIgeDI9IjEyIiB5MT0iMiIgeTI9IjE1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/share\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 Share = createLucideIcon('Share', [\n ['path', { d: 'M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8', key: '1b2hhj' }],\n ['polyline', { points: '16 6 12 2 8 6', key: 'm901s6' }],\n ['line', { x1: '12', x2: '12', y1: '2', y2: '15', key: '1p0rca' }],\n]);\n\nexport default Share;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1E,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,CAAA;AAAA,CACvD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,157 @@
"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 __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNullableType = isNullableType;
exports.isTypeArrayTypeOrUnionOfArrayTypes = isTypeArrayTypeOrUnionOfArrayTypes;
exports.isTypeNeverType = isTypeNeverType;
exports.isTypeUnknownType = isTypeUnknownType;
exports.isTypeReferenceType = isTypeReferenceType;
exports.isTypeAnyType = isTypeAnyType;
exports.isTypeAnyArrayType = isTypeAnyArrayType;
exports.isTypeUnknownArrayType = isTypeUnknownArrayType;
exports.typeIsOrHasBaseType = typeIsOrHasBaseType;
exports.isTypeBigIntLiteralType = isTypeBigIntLiteralType;
exports.isTypeTemplateLiteralType = isTypeTemplateLiteralType;
const debug_1 = __importDefault(require("debug"));
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const typeFlagUtils_1 = require("./typeFlagUtils");
const log = (0, debug_1.default)('typescript-eslint:type-utils:predicates');
/**
* Checks if the given type is (or accepts) nullable
*/
function isNullableType(type) {
return (0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.Any |
ts.TypeFlags.Unknown |
ts.TypeFlags.Null |
ts.TypeFlags.Undefined |
ts.TypeFlags.Void);
}
/**
* Checks if the given type is either an array type,
* or a union made up solely of array types.
*/
function isTypeArrayTypeOrUnionOfArrayTypes(type, checker) {
for (const t of tsutils.unionConstituents(type)) {
if (!checker.isArrayType(t)) {
return false;
}
}
return true;
}
/**
* @returns true if the type is `never`
*/
function isTypeNeverType(type) {
return (0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.Never);
}
/**
* @returns true if the type is `unknown`
*/
function isTypeUnknownType(type) {
return (0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.Unknown);
}
// https://github.com/microsoft/TypeScript/blob/42aa18bf442c4df147e30deaf27261a41cbdc617/src/compiler/types.ts#L5157
const Nullable = ts.TypeFlags.Undefined | ts.TypeFlags.Null;
// https://github.com/microsoft/TypeScript/blob/42aa18bf442c4df147e30deaf27261a41cbdc617/src/compiler/types.ts#L5187
const ObjectFlagsType = ts.TypeFlags.Any |
Nullable |
ts.TypeFlags.Never |
ts.TypeFlags.Object |
ts.TypeFlags.Union |
ts.TypeFlags.Intersection;
function isTypeReferenceType(type) {
if ((type.flags & ObjectFlagsType) === 0) {
return false;
}
const objectTypeFlags = type.objectFlags;
return (objectTypeFlags & ts.ObjectFlags.Reference) !== 0;
}
/**
* @returns true if the type is `any`
*/
function isTypeAnyType(type) {
if ((0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.Any)) {
if (type.intrinsicName === 'error') {
log('Found an "error" any type');
}
return true;
}
return false;
}
/**
* @returns true if the type is `any[]`
*/
function isTypeAnyArrayType(type, checker) {
return (checker.isArrayType(type) &&
isTypeAnyType(checker.getTypeArguments(type)[0]));
}
/**
* @returns true if the type is `unknown[]`
*/
function isTypeUnknownArrayType(type, checker) {
return (checker.isArrayType(type) &&
isTypeUnknownType(checker.getTypeArguments(type)[0]));
}
/**
* @returns Whether a type is an instance of the parent type, including for the parent's base types.
*/
function typeIsOrHasBaseType(type, parentType) {
const parentSymbol = parentType.getSymbol();
if (!type.getSymbol() || !parentSymbol) {
return false;
}
const typeAndBaseTypes = [type];
const ancestorTypes = type.getBaseTypes();
if (ancestorTypes) {
typeAndBaseTypes.push(...ancestorTypes);
}
for (const baseType of typeAndBaseTypes) {
const baseSymbol = baseType.getSymbol();
if (baseSymbol?.name === parentSymbol.name) {
return true;
}
}
return false;
}
function isTypeBigIntLiteralType(type) {
return (0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.BigIntLiteral);
}
function isTypeTemplateLiteralType(type) {
return (0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.TemplateLiteral);
}
@@ -0,0 +1,6 @@
export { sidecar } from './hoc';
export { useSidecar } from './hook';
export { setConfig } from './config';
export { createMedium, createSidecarMedium } from './medium';
export { renderCar } from './renderProp';
export { exportSidecar } from './exports';
@@ -0,0 +1,41 @@
import type { SerovalNode } from 'seroval';
import { createPlugin } from 'seroval';
type BlobNode = {
type: SerovalNode;
buffer: SerovalNode;
};
const BlobPlugin = /* @__PURE__ */ createPlugin<Blob, BlobNode>({
tag: 'seroval-plugins/web/Blob',
test(value) {
if (typeof Blob === 'undefined') {
return false;
}
return value instanceof Blob;
},
parse: {
async async(value, ctx) {
return {
type: await ctx.parse(value.type),
buffer: await ctx.parse(await value.arrayBuffer()),
};
},
},
serialize(node, ctx) {
return (
'new Blob([' +
ctx.serialize(node.buffer) +
'],{type:' +
ctx.serialize(node.type) +
'})'
);
},
deserialize(node, ctx) {
return new Blob([ctx.deserialize(node.buffer) as ArrayBuffer], {
type: ctx.deserialize(node.type) as string,
});
},
});
export default BlobPlugin;
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const IterationCw = createLucideIcon("IterationCw", [
["path", { d: "M4 10c0-4.4 3.6-8 8-8s8 3.6 8 8-3.6 8-8 8H4", key: "tuf4su" }],
["polyline", { points: "8 22 4 18 8 14", key: "evkj9s" }]
]);
export { IterationCw as default };
//# sourceMappingURL=iteration-cw.js.map
@@ -0,0 +1 @@
{"version":3,"file":"gridstack-all.js","mappings":"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 truncated
@@ -0,0 +1,493 @@
/* eslint no-param-reassign: 0 -- stylistic choice */
import TokenTranslator from "./token-translator.js";
import { normalizeOptions } from "./options.js";
/**
* @import {
* CommentType,
* EspreeParserCtor,
* EsprimaNode,
* AcornJsxParserCtorEnhanced,
* TokTypes
* } from "./types.js";
* @import {
* Options,
* EspreeToken as EsprimaToken,
* EspreeTokens as EsprimaTokens,
* EspreeComment as EsprimaComment
* } from "../espree.js";
* @import { NormalizedEcmaVersion } from "./options.js";
* @import * as acorn from "acorn";
*/
/**
* @typedef {{
* originalSourceType: "script" | "module" | "commonjs" | undefined
* tokens: EsprimaToken[] | null,
* comments: EsprimaComment[] | null,
* impliedStrict: boolean,
* ecmaVersion: NormalizedEcmaVersion,
* jsxAttrValueToken: boolean,
* lastToken: acorn.Token | null,
* templateElements: acorn.TemplateElement[]
* }} State
*/
/**
* @typedef {{
* sourceType?: "script"|"module"|"commonjs";
* comments?: EsprimaComment[];
* tokens?: EsprimaToken[];
* body: acorn.Node[];
* } & acorn.Program} EsprimaProgramNode
*/
// ----------------------------------------------------------------------------
// Types exported from file
// ----------------------------------------------------------------------------
/**
* @typedef {{
* index?: number;
* lineNumber?: number;
* column?: number;
* } & SyntaxError} EnhancedSyntaxError
*/
// We add `jsxAttrValueToken` ourselves.
/**
* @typedef {{
* jsxAttrValueToken?: acorn.TokenType;
* } & TokTypes} EnhancedTokTypes
*/
const STATE = Symbol("espree's internal state");
const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode");
/**
* Converts an Acorn comment to a Esprima comment.
* @param {boolean} block True if it's a block comment, false if not.
* @param {string} text The text of the comment.
* @param {number} start The index at which the comment starts.
* @param {number} end The index at which the comment ends.
* @param {acorn.Position | undefined} startLoc The location at which the comment starts.
* @param {acorn.Position | undefined} endLoc The location at which the comment ends.
* @param {string} code The source code being parsed.
* @returns {EsprimaComment} The comment object.
* @private
*/
function convertAcornCommentToEsprimaComment(
block,
text,
start,
end,
startLoc,
endLoc,
code,
) {
/** @type {CommentType} */
let type;
if (block) {
type = "Block";
} else if (code.slice(start, start + 2) === "#!") {
type = "Hashbang";
} else {
type = "Line";
}
/**
* @type {{
* type: CommentType,
* value: string,
* start?: number,
* end?: number,
* range?: [number, number],
* loc?: {
* start: acorn.Position | undefined,
* end: acorn.Position | undefined
* }
* }}
*/
const comment = {
type,
value: text,
};
if (typeof start === "number") {
comment.start = start;
comment.end = end;
comment.range = [start, end];
}
if (typeof startLoc === "object") {
comment.loc = {
start: startLoc,
end: endLoc,
};
}
return comment;
}
// eslint-disable-next-line arrow-body-style -- For TS
export default () => {
/**
* Returns the Espree parser.
* @param {AcornJsxParserCtorEnhanced} Parser The Acorn parser. The `acorn` property is missing from acorn's
* TypeScript but is present statically on the class.
* @returns {EspreeParserCtor} The Espree Parser constructor.
*/
return Parser => {
const tokTypes = /** @type {EnhancedTokTypes} */ (
Object.assign({}, Parser.acorn.tokTypes)
);
if (Parser.acornJsx) {
Object.assign(tokTypes, Parser.acornJsx.tokTypes);
}
return class Espree extends Parser {
/**
* @param {Options | null | undefined} opts The parser options
* @param {string | object} code The code which will be converted to a string.
*/
constructor(opts, code) {
if (typeof opts !== "object" || opts === null) {
opts = {};
}
if (typeof code !== "string" && !(code instanceof String)) {
code = String(code);
}
// save original source type in case of commonjs
const originalSourceType = opts.sourceType;
const options = normalizeOptions(opts);
const ecmaFeatures = options.ecmaFeatures || {};
const tokenTranslator =
options.tokens === true
? new TokenTranslator(
tokTypes,
// @ts-expect-error Appears to be a TS bug since the type is indeed string|String
code,
)
: null;
/**
* Data that is unique to Espree and is not represented internally
* in Acorn.
*
* For ES2023 hashbangs, Espree will call `onComment()` during the
* constructor, so we must define state before having access to
* `this`.
* @type {State}
*/
const state = {
originalSourceType:
originalSourceType || options.sourceType,
tokens: tokenTranslator ? [] : null,
comments: options.comment === true ? [] : null,
impliedStrict:
ecmaFeatures.impliedStrict === true &&
options.ecmaVersion >= 5,
ecmaVersion: options.ecmaVersion,
jsxAttrValueToken: false,
lastToken: null,
templateElements: [],
};
// Initialize acorn parser.
super(
{
// do not use spread, because we don't want to pass any unknown options to acorn
ecmaVersion: options.ecmaVersion,
sourceType: options.sourceType,
ranges: options.ranges,
locations: options.locations,
allowReserved: options.allowReserved,
// Truthy value is true for backward compatibility.
allowReturnOutsideFunction:
options.allowReturnOutsideFunction,
// Collect tokens
onToken(token) {
if (tokenTranslator) {
// Use `tokens`, `ecmaVersion`, and `jsxAttrValueToken` in the state.
tokenTranslator.onToken(
token,
/**
* @type {Omit<State, "tokens"> & {
* tokens: EsprimaToken[]
* }}
*/
(state),
);
}
if (token.type !== tokTypes.eof) {
state.lastToken = token;
}
},
// Collect comments
onComment(block, text, start, end, startLoc, endLoc) {
if (state.comments) {
const comment =
convertAcornCommentToEsprimaComment(
block,
text,
start,
end,
startLoc,
endLoc,
// @ts-expect-error Appears to be a TS bug
// since the type is indeed string|String
code,
);
state.comments.push(comment);
}
},
},
// @ts-expect-error Appears to be a TS bug
// since the type is indeed string|String
code,
);
/*
* We put all of this data into a symbol property as a way to avoid
* potential naming conflicts with future versions of Acorn.
*/
this[STATE] = state;
}
/**
* Returns Espree tokens.
* @returns {EsprimaTokens} The Esprima-compatible tokens
*/
tokenize() {
do {
this.next();
} while (this.type !== tokTypes.eof);
// Consume the final eof token
this.next();
const extra = this[STATE];
const tokens = /** @type {EsprimaTokens} */ (extra.tokens);
if (extra.comments) {
tokens.comments = extra.comments;
}
return tokens;
}
/**
* Calls parent.
* @param {acorn.Node} node The node
* @param {string} type The type
* @returns {acorn.Node} The altered Node
*/
finishNode(node, type) {
const result = super.finishNode(node, type);
return this[ESPRIMA_FINISH_NODE](result);
}
/**
* Calls parent.
* @param {acorn.Node} node The node
* @param {string} type The type
* @param {number} pos The position
* @param {acorn.Position} loc The location
* @returns {acorn.Node} The altered Node
*/
finishNodeAt(node, type, pos, loc) {
const result = super.finishNodeAt(node, type, pos, loc);
return this[ESPRIMA_FINISH_NODE](result);
}
/**
* Parses.
* @returns {EsprimaProgramNode} The program Node
*/
parse() {
const extra = this[STATE];
const prog = super.parse();
const program = /** @type {EsprimaProgramNode} */ (prog);
// @ts-expect-error TS bug? We've already converted to `EsprimaProgramNode`
program.sourceType = extra.originalSourceType;
if (extra.comments) {
program.comments = extra.comments;
}
if (extra.tokens) {
program.tokens = extra.tokens;
}
/*
* https://github.com/eslint/espree/issues/349
* Ensure that template elements have correct range information.
* This is one location where Acorn produces a different value
* for its start and end properties vs. the values present in the
* range property. In order to avoid confusion, we set the start
* and end properties to the values that are present in range.
* This is done here, instead of in finishNode(), because Acorn
* uses the values of start and end internally while parsing, making
* it dangerous to change those values while parsing is ongoing.
* By waiting until the end of parsing, we can safely change these
* values without affect any other part of the process.
*/
this[STATE].templateElements.forEach(templateElement => {
const startOffset = -1;
const endOffset = templateElement.tail ? 1 : 2;
templateElement.start += startOffset;
templateElement.end += endOffset;
if (templateElement.range) {
templateElement.range[0] += startOffset;
templateElement.range[1] += endOffset;
}
if (templateElement.loc) {
templateElement.loc.start.column += startOffset;
templateElement.loc.end.column += endOffset;
}
});
return program;
}
/**
* Parses top level.
* @param {acorn.Node} node AST Node
* @returns {acorn.Node} The changed node
*/
parseTopLevel(node) {
if (this[STATE].impliedStrict) {
this.strict = true;
}
return super.parseTopLevel(node);
}
/**
* Overwrites the default raise method to throw Esprima-style errors.
* @param {number} pos The position of the error.
* @param {string} message The error message.
* @throws {EnhancedSyntaxError} A syntax error.
* @returns {void}
*/
raise(pos, message) {
const loc = Parser.acorn.getLineInfo(this.input, pos);
const err = /** @type {EnhancedSyntaxError} */ (
new SyntaxError(message)
);
err.index = pos;
err.lineNumber = loc.line;
err.column = loc.column + 1; // acorn uses 0-based columns
throw err;
}
/**
* Overwrites the default raise method to throw Esprima-style errors.
* @param {number} pos The position of the error.
* @param {string} message The error message.
* @throws {SyntaxError} A syntax error.
* @returns {void}
*/
raiseRecoverable(pos, message) {
this.raise(pos, message);
}
/**
* Overwrites the default unexpected method to throw Esprima-style errors.
* @param {number} pos The position of the error.
* @throws {SyntaxError} A syntax error.
* @returns {void}
*/
unexpected(pos) {
let message = "Unexpected token";
if (pos !== null && pos !== void 0) {
this.pos = pos;
if (this.options.locations) {
while (this.pos < this.lineStart) {
this.lineStart =
this.input.lastIndexOf(
"\n",
this.lineStart - 2,
) + 1;
--this.curLine;
}
}
this.nextToken();
}
if (this.end > this.start) {
message += ` ${this.input.slice(this.start, this.end)}`;
}
this.raise(this.start, message);
}
/**
* Esprima-FB represents JSX strings as tokens called "JSXText", but Acorn-JSX
* uses regular tt.string without any distinction between this and regular JS
* strings. As such, we intercept an attempt to read a JSX string and set a flag
* on extra so that when tokens are converted, the next token will be switched
* to JSXText via onToken.
* @param {number} quote A character code
* @returns {void}
*/ // eslint-disable-next-line camelcase -- required by API
jsx_readString(quote) {
const result = super.jsx_readString(quote);
if (this.type === tokTypes.string) {
this[STATE].jsxAttrValueToken = true;
}
return result;
}
/**
* Performs last-minute Esprima-specific compatibility checks and fixes.
* @param {acorn.Node} result The node to check.
* @returns {EsprimaNode} The finished node.
*/
[ESPRIMA_FINISH_NODE](result) {
// Acorn doesn't count the opening and closing backticks as part of templates
// so we have to adjust ranges/locations appropriately.
if (result.type === "TemplateElement") {
// save template element references to fix start/end later
this[STATE].templateElements.push(
/** @type {acorn.TemplateElement} */
(result),
);
}
if (
result.type.includes("Function") &&
!("generator" in result)
) {
/**
* @type {acorn.FunctionDeclaration|acorn.FunctionExpression|
* acorn.ArrowFunctionExpression}
*/
(result).generator = false;
}
return result;
}
};
};
};
@@ -0,0 +1,11 @@
# V8 Coverage
[![npm](https://img.shields.io/npm/v/@c88/v8-coverage.svg?maxAge=2592000)](https://www.npmjs.com/package/@c88/v8-coverage)
[![GitHub repository](https://img.shields.io/badge/Github-demurgos%2Fv8--coverage-blue.svg)](https://github.com/demurgos/v8-coverage)
[![Build status (Travis)](https://img.shields.io/travis/demurgos/v8-coverage/master.svg?maxAge=2592000)](https://travis-ci.org/demurgos/v8-coverage)
[![Build status (AppVeyor)](https://ci.appveyor.com/api/projects/status/qgcbdffyb9e09d0e?svg=true)](https://ci.appveyor.com/project/demurgos/v8-coverage)
[![Codecov](https://codecov.io/gh/demurgos/v8-coverage/branch/master/graph/badge.svg)](https://codecov.io/gh/demurgos/v8-coverage)
## License
[MIT License](./LICENSE.md)
@@ -0,0 +1,54 @@
import { AddressType } from "../helper/conninfo/types.js";
//#region src/utils/ipaddr.d.ts
/**
* Expand IPv6 Address
* @param ipV6 Shorten IPv6 Address
* @return expanded IPv6 Address
*/
export declare const expandIPv6: (ipV6: string) => string;
export declare const INVALID_IP_ADDRESS_ERROR_CODE = "ERR_INVALID_IP_ADDRESS";
export type InvalidIPAddressError = TypeError & {
code: typeof INVALID_IP_ADDRESS_ERROR_CODE;
};
/**
* Distinct Remote Addr
* @param remoteAddr Remote Addr
*/
export declare const distinctRemoteAddr: (remoteAddr: string) => AddressType;
/**
* Convert IPv4 to Uint8Array
* @param ipv4 IPv4 Address
* @returns BigInt
*/
export declare const convertIPv4ToBinary: (ipv4: string) => bigint;
/**
* Convert IPv6 to Uint8Array
* @param ipv6 IPv6 Address
* @returns BigInt
*/
export declare const convertIPv6ToBinary: (ipv6: string) => bigint;
/**
* Convert a binary representation of an IPv4 address to a string.
* @param ipV4 binary IPv4 Address
* @return IPv4 Address in string
*/
export declare const convertIPv4BinaryToString: (ipV4: bigint) => string;
/**
* Check if a binary IPv6 address is an IPv4-mapped IPv6 address (::ffff:x.x.x.x)
* @param ipv6binary binary IPv6 Address
* @return true if the address is an IPv4-mapped IPv6 address
*/
export declare const isIPv4MappedIPv6: (ipv6binary: bigint) => boolean;
/**
* Extract the IPv4 portion from an IPv4-mapped IPv6 address
* @param ipv6binary binary IPv4-mapped IPv6 Address
* @return binary IPv4 Address
*/
export declare const convertIPv4MappedIPv6ToIPv4: (ipv6binary: bigint) => bigint;
/**
* Convert a binary representation of an IPv6 address to a string.
* @param ipV6 binary IPv6 Address
* @return normalized IPv6 Address in string
*/
export declare const convertIPv6BinaryToString: (ipV6: bigint) => string;
//#endregion
@@ -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 Cpu = createLucideIcon("Cpu", [
["rect", { width: "16", height: "16", x: "4", y: "4", rx: "2", key: "14l7u7" }],
["rect", { width: "6", height: "6", x: "9", y: "9", rx: "1", key: "5aljv4" }],
["path", { d: "M15 2v2", key: "13l42r" }],
["path", { d: "M15 20v2", key: "15mkzm" }],
["path", { d: "M2 15h2", key: "1gxd5l" }],
["path", { d: "M2 9h2", key: "1bbxkp" }],
["path", { d: "M20 15h2", key: "19e6y8" }],
["path", { d: "M20 9h2", key: "19tzq7" }],
["path", { d: "M9 2v2", key: "165o2o" }],
["path", { d: "M9 20v2", key: "i2bqo8" }]
]);
export { Cpu as default };
//# sourceMappingURL=cpu.js.map
@@ -0,0 +1,51 @@
var _a;
export const $output = /*@__PURE__*/ Symbol("ZodOutput");
export const $input = /*@__PURE__*/ Symbol("ZodInput");
export class $ZodRegistry {
constructor() {
this._map = new WeakMap();
this._idmap = new Map();
}
add(schema, ..._meta) {
const meta = _meta[0];
this._map.set(schema, meta);
if (meta && typeof meta === "object" && "id" in meta) {
this._idmap.set(meta.id, schema);
}
return this;
}
clear() {
this._map = new WeakMap();
this._idmap = new Map();
return this;
}
remove(schema) {
const meta = this._map.get(schema);
if (meta && typeof meta === "object" && "id" in meta) {
this._idmap.delete(meta.id);
}
this._map.delete(schema);
return this;
}
get(schema) {
// return this._map.get(schema) as any;
// inherit metadata
const p = schema._zod.parent;
if (p) {
const pm = { ...(this.get(p) ?? {}) };
delete pm.id; // do not inherit id
const f = { ...pm, ...this._map.get(schema) };
return Object.keys(f).length ? f : undefined;
}
return this._map.get(schema);
}
has(schema) {
return this._map.has(schema);
}
}
// registries
export function registry() {
return new $ZodRegistry();
}
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
export const globalRegistry = globalThis.__zod_globalRegistry;
@@ -0,0 +1,947 @@
export default `flf2a$ 9 8 12 63 18 0 24511 0
Font : Fire Font-s
Author : MJP
Date : 2003/11/6 11:11:05
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
Based on Small.flf by Glenn Chappell 4/93 -- based on Standard
---
Font modified May 26, 2012 by patorjk
- Added the 0xCA0 character.
$ #
$ #
$ #
$ #
$ #
$ #
$ #
$ #
$ ##
____ #
| / #
| / #
| / #
|/ #
( #
)\\ #
((_) #
##
#
( ( #
)\\ )\\ #
((_)((_) #
#
#
#
#
##
#
_ _ #
_| | |_ #
|_ . _| #
|_ _| #
|_|_| #
#
#
##
#
#
||_ #
(_-< #
/ _/ #
|| #
#
#
##
#
#
#
_ __ #
(_)/ / #
/ /_ #
/_/(_) #
#
##
#
#
( #
__ )\\ #
/ _|((_) #
> _|_ _| #
\\_____| #
#
##
#
( #
)\\ #
((_) #
#
#
#
#
##
#
#
#
__ #
/ / #
| | #
| | #
\\_\\ #
##
#
#
#
__ #
\\ \\ #
| | #
| | #
/_/ #
##
_/\\_ #
> < #
\\/ #
#
#
#
#
#
##
#
#
#
_ #
_| |_ #
|_ _| #
|_| #
#
##
#
#
#
#
#
) #
/( #
(_)) #
##
#
#
#
___ #
|___| #
#
#
#
##
#
#
#
#
#
#
_ #
(_) #
##
#
#
#
__ #
/ / #
/ / #
/_/ #
#
##
#
) #
( /( #
)\\()) #
((_)\\ #
/ (_) #
| () | #
\\__/ #
##
#
) #
( /( #
)\\()) #
((_)\\ #
/ (_) #
| | #
|_| #
##
#
) #
( /( #
)(_)) #
((_) #
|_ ) #
/ / #
/___| #
##
#
) #
( /( #
)\\()) #
((_)\\ #
|__ (_) #
|_ \\ #
|___/ #
##
#
) #
( /( #
)\\()) #
((_)\\ #
| | (_) #
|_ _| #
|_| #
##
#
( ( #
)\\))( #
((_)()\\ #
(()((_) #
| __| #
|__ \\ #
|___/ #
##
#
( #
)\\ ) #
(()/( #
/(_)) #
(_) / #
/ _ \\ #
\\___/ #
##
#
) #
( /( #
)\\()) #
((_)\\ #
|__ / #
/ / #
/_/ #
##
#
( #
)\\ ( #
((_))\\ #
_((_) #
( _ ) #
/ _ \\ #
\\___/ #
##
#
) #
( /( #
)\\()) #
((_)\\ #
/ _(_) #
\\_, / #
/_/ #
##
#
#
#
#
_ #
(_) #
_ #
(_) #
##
#
#
#
#
_ #
(_) #
( #
)\\ #
((_) ##
#
#
#
#
__ #
/ / #
< < #
\\_\\ #
##
#
#
#
#
#
___ #
|___| #
|___| #
##
#
#
#
#
__ #
\\ \\ #
> > #
/_/ #
##
#
#
( #
)\\ #
((_) #
|__ \\ #
/_/ #
(_) #
##
#
#
( #
)\\ #
((_) #
/__ _\\ #
// _\` |\\ #
\\\\__,_|/ #
\\____/ ##
#
( #
)\\ #
((((_)( #
)\\ _ )\\ #
(_)_\\(_) #
/ _ \\ #
/_/ \\_\\ #
##
#
( #
( )\\ #
)((_) #
((_)_ #
| _ ) #
| _ \\ #
|___/ #
##
#
( #
)\\ #
(((_) #
)\\___ #
((/ __| #
| (__ #
\\___| #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_))_ #
| \\ #
| |) | #
|___/ #
##
#
#
( #
)\\ #
((_) #
| __| #
| _| #
|___| #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_))_| #
| |_ #
| __| #
|_| #
##
#
( #
)\\ ) #
(()/( #
/(_))_ #
(_)) __| #
| (_ | #
\\___| #
##
) #
( /( #
)\\()) #
((_)\\ #
_((_) #
| || | #
| __ | #
|_||_| #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_)) #
|_ _| #
| | #
|___| #
##
#
#
( #
)\\ #
((_) #
_ | | #
| || | #
\\__/ #
##
) #
( /( #
)\\()) #
|((_)\\ #
|_ ((_) #
| |/ / #
' < #
_|\\_\\ #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_)) #
| | #
| |__ #
|____| #
##
* #
( \` #
)\\))( #
((_)()\\ #
(_()((_) #
| \\/ | #
| |\\/| | #
|_| |_| #
##
) #
( /( #
)\\()) #
((_)\\ #
_((_) #
| \\| | #
| .\` | #
|_|\\_| #
##
) #
( /( #
)\\()) #
((_)\\ #
((_) #
/ _ \\ #
| (_) | #
\\___/ #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_)) #
| _ \\ #
| _/ #
|_| #
##
#
( #
( )\\ #
)((_) #
((_)_ #
/ _ \\ #
| (_) | #
\\__\\_\\ #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_)) #
| _ \\ #
| / #
|_|_\\ #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_)) #
/ __| #
\\__ \\ #
|___/ #
##
#
* ) #
\` ) /( #
( )(_)) #
(_(_()) #
|_ _| #
| | #
|_| #
##
#
#
( #
)\\ #
_ ((_) #
| | | | #
| |_| | #
\\___/ #
##
#
#
( ( #
)\\ )\\ #
((_)((_) #
\\ \\ / / #
\\ V / #
\\_/ #
##
#
( ( #
)\\))( '#
((_)()\\ ) #
_(())\\_)()#
\\ \\((_)/ /#
\\ \\/\\/ / #
\\_/\\_/ #
##
) #
( /( #
)\\()) #
((_)\\ #
__((_) #
\\ \\/ / #
> < #
/_/\\_\\ #
##
) #
( /( #
)\\()) #
((_)\\ #
__ ((_) #
\\ \\ / / #
\\ V / #
|_| #
##
) #
( /( #
)\\()) #
((_)\\ #
_((_) #
|_ / #
/ / #
/___| #
##
#
#
#
#
__ #
| _| #
| | #
| | #
|__| ##
#
#
#
#
__ #
\\ \\ #
\\ \\ #
\\_\\ #
##
#
#
#
#
__ #
|_ | #
| | #
| | #
|__| ##
#
/\\ #
|/\\| #
#
#
#
#
#
##
#
#
#
#
#
#
#
_____ #
|_____| ##
\`#
#
#
#
#
#
#
#
##
#
#
) #
( /( #
)(_)) #
((_)_ #
/ _\` | #
\\__,_| #
##
#
) #
( /( #
)\\()) #
((_)\\ #
| |(_) #
| '_ \\ #
|_.__/ #
##
#
#
#
( #
)\\ #
((_) #
/ _| #
\\__| #
##
#
( #
)\\ ) #
(()/( #
((_)) #
_| | #
/ _\` | #
\\__,_| #
##
#
#
( #
))\\ #
/((_) #
(_)) #
/ -_) #
\\___| #
##
#
( #
)\\ ) #
(()/( #
/(_)) #
(_) _| #
| _| #
|_| #
##
#
#
( ( #
)\\))( #
((_))\\ #
(()(_) #
/ _\` | #
\\__, | #
|___/ ##
#
) #
( /( #
)\\()) #
((_)\\ #
| |(_) #
| ' \\ #
|_||_| #
##
#
#
( #
)\\ #
((_) #
(_) #
| | #
|_| #
##
#
#
( #
)\\ #
((_) #
! #
| | #
_/ | #
|__/ ##
#
) #
( /( #
)\\()) #
((_)\\ #
| |(_) #
| / / #
|_\\_\\ #
##
#
( #
)\\ #
((_) #
_ #
| | #
| | #
|_| #
##
#
#
) #
( #
)\\ ' #
_((_)) #
| ' \\() #
|_|_|_| #
##
#
#
#
( #
)\\ ) #
_(_/( #
| ' \\)) #
|_||_| #
##
#
#
#
( #
)\\ #
((_) #
/ _ \\ #
\\___/ #
##
#
#
#
\` ) #
/(/( #
((_)_\\ #
| '_ \\) #
| .__/ #
|_| ##
#
#
( #
( )\\ #
)(( ) #
((_)_) #
/ _\` | #
\\__, | #
|_| ##
#
#
( #
)( #
(()\\ #
((_) #
| '_| #
|_| #
##
#
#
#
( #
)\\ #
((_) #
(_-< #
/__/ #
##
#
) #
( /( #
)\\()) #
(_))/ #
| |_ #
| _| #
\\__| #
##
#
#
( #
))\\ #
/((_) #
(_))( #
| || | #
\\_,_| #
##
#
#
) #
/(( #
(_))\\ #
_)((_) #
\\ V / #
\\_/ #
##
#
#
( ( #
)\\))( #
((_)()\\ #
_(()((_) #
\\ V V / #
\\_/\\_/ #
##
#
#
) #
( /( #
)\\()) #
((_)\\ #
\\ \\ / #
/_\\_\\ #
##
#
#
( #
)\\ ) #
(()/( #
)(_)) #
| || | #
\\_, | #
|__/ ##
#
#
#
( #
)\\ #
((_) #
|_ / #
/__| #
##
#
#
#
#
__ #
/ / #
_| | #
| | #
\\_\\ ##
#
#
#
#
_ #
| | #
| | #
| | #
|_| ##
#
#
#
#
__ #
\\ \\ #
| |_ #
| | #
/_/ ##
#
/\\/| #
|/\\/ #
#
#
#
#
#
##
) #
/( ( #
(_)))\\ #
(_)_(_) #
/_\\ #
/ _ \\ #
/_/ \\_\\ #
#
##
( #
) )\\ #
/(((_) #
(_)_(_) #
/ _ \\ #
| (_) | #
\\___/ #
#
##
) #
/( ( #
(_)))\\ #
(_)_(_) #
| | | | #
| |_| | #
\\___/ #
#
##
#
#
( #
_ )\\ #
(_((_) #
/ _\` | #
\\__,_| #
#
##
#
#
) #
/( _ #
(_))(_) #
/ _ \\ #
\\___/ #
#
##
#
#
( #
_ )\\ #
(_)((_) #
| |_| | #
\\___/ #
#
##
#
( #
( )\\ #
)((_) #
(/__ \\ #
| |< < #
| ||_/ #
|_| #
##
0xCA0 KANNADA LETTER TTHA
) #
( /( #
)\\()) #
((_)\\__)#
/____/ #
/ _ \\ #
| (_) | #
$\\___/$ #
##`
@@ -0,0 +1,386 @@
import { animateVisualElement } from '../../animation/interfaces/visual-element.mjs';
import { calcChildStagger } from '../../animation/utils/calc-child-stagger.mjs';
import { getVariantContext } from './get-variant-context.mjs';
import { isAnimationControls } from './is-animation-controls.mjs';
import { isKeyframesTarget } from './is-keyframes-target.mjs';
import { isVariantLabel } from './is-variant-label.mjs';
import { resolveVariant } from './resolve-dynamic-variants.mjs';
import { shallowCompare } from './shallow-compare.mjs';
import { variantPriorityOrder } from './variant-props.mjs';
const reversePriorityOrder = [...variantPriorityOrder].reverse();
const numAnimationTypes = variantPriorityOrder.length;
function createAnimateFunction(visualElement) {
return (animations) => {
return Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));
};
}
function createAnimationState(visualElement) {
let animate = createAnimateFunction(visualElement);
let state = createState();
let isInitialRender = true;
/**
* Track whether the animation state has been reset (e.g. via StrictMode
* double-invocation or Suspense unmount/remount). On the first
* animateChanges() call after a reset we need to behave like the initial
* render for variant-inheritance checks, even though isInitialRender is
* already false.
*/
let wasReset = false;
/**
* This function will be used to reduce the animation definitions for
* each active animation type into an object of resolved values for it.
*/
const buildResolvedTypeValues = (type) => (acc, definition) => {
const resolved = resolveVariant(visualElement, definition, type === "exit"
? visualElement.presenceContext?.custom
: undefined);
if (resolved) {
const { transition, transitionEnd, ...target } = resolved;
acc = { ...acc, ...target, ...transitionEnd };
}
return acc;
};
/**
* This just allows us to inject mocked animation functions
* @internal
*/
function setAnimateFunction(makeAnimator) {
animate = makeAnimator(visualElement);
}
/**
* When we receive new props, we need to:
* 1. Create a list of protected keys for each type. This is a directory of
* value keys that are currently being "handled" by types of a higher priority
* so that whenever an animation is played of a given type, these values are
* protected from being animated.
* 2. Determine if an animation type needs animating.
* 3. Determine if any values have been removed from a type and figure out
* what to animate those to.
*/
function animateChanges(changedActiveType) {
const { props } = visualElement;
const context = getVariantContext(visualElement.parent) || {};
/**
* A list of animations that we'll build into as we iterate through the animation
* types. This will get executed at the end of the function.
*/
const animations = [];
/**
* Keep track of which values have been removed. Then, as we hit lower priority
* animation types, we can check if they contain removed values and animate to that.
*/
const removedKeys = new Set();
/**
* A dictionary of all encountered keys. This is an object to let us build into and
* copy it without iteration. Each time we hit an animation type we set its protected
* keys - the keys its not allowed to animate - to the latest version of this object.
*/
let encounteredKeys = {};
/**
* If a variant has been removed at a given index, and this component is controlling
* variant animations, we want to ensure lower-priority variants are forced to animate.
*/
let removedVariantIndex = Infinity;
/**
* Iterate through all animation types in reverse priority order. For each, we want to
* detect which values it's handling and whether or not they've changed (and therefore
* need to be animated). If any values have been removed, we want to detect those in
* lower priority props and flag for animation.
*/
for (let i = 0; i < numAnimationTypes; i++) {
const type = reversePriorityOrder[i];
const typeState = state[type];
const prop = props[type] !== undefined
? props[type]
: context[type];
const propIsVariant = isVariantLabel(prop);
/**
* If this type has *just* changed isActive status, set activeDelta
* to that status. Otherwise set to null.
*/
const activeDelta = type === changedActiveType ? typeState.isActive : null;
if (activeDelta === false)
removedVariantIndex = i;
/**
* If this prop is an inherited variant, rather than been set directly on the
* component itself, we want to make sure we allow the parent to trigger animations.
*
* TODO: Can probably change this to a !isControllingVariants check
*/
let isInherited = prop === context[type] &&
prop !== props[type] &&
propIsVariant;
if (isInherited &&
(isInitialRender || wasReset) &&
visualElement.manuallyAnimateOnMount) {
isInherited = false;
}
/**
* Set all encountered keys so far as the protected keys for this type. This will
* be any key that has been animated or otherwise handled by active, higher-priortiy types.
*/
typeState.protectedKeys = { ...encounteredKeys };
// Check if we can skip analysing this prop early
if (
// If it isn't active and hasn't *just* been set as inactive
(!typeState.isActive && activeDelta === null) ||
// If we didn't and don't have any defined prop for this animation type
(!prop && !typeState.prevProp) ||
// Or if the prop doesn't define an animation
isAnimationControls(prop) ||
typeof prop === "boolean") {
continue;
}
/**
* If exit is already active and wasn't just activated, skip
* re-processing to prevent interrupting running exit animations.
* Re-resolving exit with a changed custom value can start new
* value animations that stop the originals, leaving the exit
* animation promise unresolved and the component stuck in the DOM.
*/
if (type === "exit" && typeState.isActive && activeDelta !== true) {
if (typeState.prevResolvedValues) {
encounteredKeys = {
...encounteredKeys,
...typeState.prevResolvedValues,
};
}
continue;
}
/**
* As we go look through the values defined on this type, if we detect
* a changed value or a value that was removed in a higher priority, we set
* this to true and add this prop to the animation list.
*/
const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);
let shouldAnimateType = variantDidChange ||
// If we're making this variant active, we want to always make it active
(type === changedActiveType &&
typeState.isActive &&
!isInherited &&
propIsVariant) ||
// If we removed a higher-priority variant (i is in reverse order)
(i > removedVariantIndex && propIsVariant);
let handledRemovedValues = false;
/**
* As animations can be set as variant lists, variants or target objects, we
* coerce everything to an array if it isn't one already
*/
const definitionList = Array.isArray(prop) ? prop : [prop];
/**
* Build an object of all the resolved values. We'll use this in the subsequent
* animateChanges calls to determine whether a value has changed.
*/
let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {});
if (activeDelta === false)
resolvedValues = {};
/**
* Now we need to loop through all the keys in the prev prop and this prop,
* and decide:
* 1. If the value has changed, and needs animating
* 2. If it has been removed, and needs adding to the removedKeys set
* 3. If it has been removed in a higher priority type and needs animating
* 4. If it hasn't been removed in a higher priority but hasn't changed, and
* needs adding to the type's protectedKeys list.
*/
const { prevResolvedValues = {} } = typeState;
const allKeys = {
...prevResolvedValues,
...resolvedValues,
};
const markToAnimate = (key) => {
shouldAnimateType = true;
if (removedKeys.has(key)) {
handledRemovedValues = true;
removedKeys.delete(key);
}
typeState.needsAnimating[key] = true;
const motionValue = visualElement.getValue(key);
if (motionValue)
motionValue.liveStyle = false;
};
for (const key in allKeys) {
const next = resolvedValues[key];
const prev = prevResolvedValues[key];
// If we've already handled this we can just skip ahead
if (encounteredKeys.hasOwnProperty(key))
continue;
/**
* If the value has changed, we probably want to animate it.
*/
let valueHasChanged = false;
if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {
valueHasChanged = !shallowCompare(next, prev);
}
else {
valueHasChanged = next !== prev;
}
if (valueHasChanged) {
if (next !== undefined && next !== null) {
// If next is defined and doesn't equal prev, it needs animating
markToAnimate(key);
}
else {
// If it's undefined, it's been removed.
removedKeys.add(key);
}
}
else if (next !== undefined && removedKeys.has(key)) {
/**
* If next hasn't changed and it isn't undefined, we want to check if it's
* been removed by a higher priority
*/
markToAnimate(key);
}
else {
/**
* If it hasn't changed, we add it to the list of protected values
* to ensure it doesn't get animated.
*/
typeState.protectedKeys[key] = true;
}
}
/**
* Update the typeState so next time animateChanges is called we can compare the
* latest prop and resolvedValues to these.
*/
typeState.prevProp = prop;
typeState.prevResolvedValues = resolvedValues;
if (typeState.isActive) {
encounteredKeys = { ...encounteredKeys, ...resolvedValues };
}
if ((isInitialRender || wasReset) &&
visualElement.blockInitialAnimation) {
shouldAnimateType = false;
}
/**
* If this is an inherited prop we want to skip this animation
* unless the inherited variants haven't changed on this render.
*/
const willAnimateViaParent = isInherited && variantDidChange;
const needsAnimating = !willAnimateViaParent || handledRemovedValues;
if (shouldAnimateType && needsAnimating) {
animations.push(...definitionList.map((animation) => {
const options = { type };
/**
* If we're performing the initial animation, but we're not
* rendering at the same time as the variant-controlling parent,
* we want to use the parent's transition to calculate the stagger.
*/
if (typeof animation === "string" &&
(isInitialRender || wasReset) &&
!willAnimateViaParent &&
visualElement.manuallyAnimateOnMount &&
visualElement.parent) {
const { parent } = visualElement;
const parentVariant = resolveVariant(parent, animation);
if (parent.enteringChildren && parentVariant) {
const { delayChildren } = parentVariant.transition || {};
options.delay = calcChildStagger(parent.enteringChildren, visualElement, delayChildren);
}
}
return {
animation: animation,
options,
};
}));
}
}
/**
* If there are some removed value that haven't been dealt with,
* we need to create a new animation that falls back either to the value
* defined in the style prop, or the last read value.
*/
if (removedKeys.size) {
const fallbackAnimation = {};
/**
* If the initial prop contains a transition we can use that, otherwise
* allow the animation function to use the visual element's default.
*/
if (typeof props.initial !== "boolean") {
const initialTransition = resolveVariant(visualElement, Array.isArray(props.initial)
? props.initial[0]
: props.initial);
if (initialTransition && initialTransition.transition) {
fallbackAnimation.transition = initialTransition.transition;
}
}
removedKeys.forEach((key) => {
const fallbackTarget = visualElement.getBaseTarget(key);
const motionValue = visualElement.getValue(key);
if (motionValue)
motionValue.liveStyle = true;
// @ts-expect-error - @mattgperry to figure if we should do something here
fallbackAnimation[key] = fallbackTarget ?? null;
});
animations.push({ animation: fallbackAnimation });
}
let shouldAnimate = Boolean(animations.length);
if (isInitialRender &&
(props.initial === false || props.initial === props.animate) &&
!visualElement.manuallyAnimateOnMount) {
shouldAnimate = false;
}
isInitialRender = false;
wasReset = false;
return shouldAnimate ? animate(animations) : Promise.resolve();
}
/**
* Change whether a certain animation type is active.
*/
function setActive(type, isActive) {
// If the active state hasn't changed, we can safely do nothing here
if (state[type].isActive === isActive)
return Promise.resolve();
// Propagate active change to children
visualElement.variantChildren?.forEach((child) => child.animationState?.setActive(type, isActive));
state[type].isActive = isActive;
const animations = animateChanges(type);
for (const key in state) {
state[key].protectedKeys = {};
}
return animations;
}
return {
animateChanges,
setActive,
setAnimateFunction,
getState: () => state,
reset: () => {
state = createState();
wasReset = true;
},
};
}
function checkVariantsDidChange(prev, next) {
if (typeof next === "string") {
return next !== prev;
}
else if (Array.isArray(next)) {
return !shallowCompare(next, prev);
}
return false;
}
function createTypeState(isActive = false) {
return {
isActive,
protectedKeys: {},
needsAnimating: {},
prevResolvedValues: {},
};
}
function createState() {
return {
animate: createTypeState(true),
whileInView: createTypeState(),
whileHover: createTypeState(),
whileTap: createTypeState(),
whileDrag: createTypeState(),
whileFocus: createTypeState(),
exit: createTypeState(),
};
}
export { checkVariantsDidChange, createAnimationState };
//# sourceMappingURL=animation-state.mjs.map
@@ -0,0 +1,5 @@
'use strict'
const SemVer = require('../classes/semver')
const major = (a, loose) => new SemVer(a, loose).major
module.exports = major
@@ -0,0 +1,78 @@
import type { IssueData, ZodErrorMap, ZodIssue } from "../ZodError.cjs";
import type { ZodParsedType } from "./util.cjs";
export declare const makeIssue: (params: {
data: any;
path: (string | number)[];
errorMaps: ZodErrorMap[];
issueData: IssueData;
}) => ZodIssue;
export type ParseParams = {
path: (string | number)[];
errorMap: ZodErrorMap;
async: boolean;
};
export type ParsePathComponent = string | number;
export type ParsePath = ParsePathComponent[];
export declare const EMPTY_PATH: ParsePath;
export interface ParseContext {
readonly common: {
readonly issues: ZodIssue[];
readonly contextualErrorMap?: ZodErrorMap | undefined;
readonly async: boolean;
};
readonly path: ParsePath;
readonly schemaErrorMap?: ZodErrorMap | undefined;
readonly parent: ParseContext | null;
readonly data: any;
readonly parsedType: ZodParsedType;
}
export type ParseInput = {
data: any;
path: (string | number)[];
parent: ParseContext;
};
export declare function addIssueToContext(ctx: ParseContext, issueData: IssueData): void;
export type ObjectPair = {
key: SyncParseReturnType<any>;
value: SyncParseReturnType<any>;
};
export declare class ParseStatus {
value: "aborted" | "dirty" | "valid";
dirty(): void;
abort(): void;
static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType;
static mergeObjectAsync(status: ParseStatus, pairs: {
key: ParseReturnType<any>;
value: ParseReturnType<any>;
}[]): Promise<SyncParseReturnType<any>>;
static mergeObjectSync(status: ParseStatus, pairs: {
key: SyncParseReturnType<any>;
value: SyncParseReturnType<any>;
alwaysSet?: boolean;
}[]): SyncParseReturnType;
}
export interface ParseResult {
status: "aborted" | "dirty" | "valid";
data: any;
}
export type INVALID = {
status: "aborted";
};
export declare const INVALID: INVALID;
export type DIRTY<T> = {
status: "dirty";
value: T;
};
export declare const DIRTY: <T>(value: T) => DIRTY<T>;
export type OK<T> = {
status: "valid";
value: T;
};
export declare const OK: <T>(value: T) => OK<T>;
export type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;
export type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;
export type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;
export declare const isAborted: (x: ParseReturnType<any>) => x is INVALID;
export declare const isDirty: <T>(x: ParseReturnType<T>) => x is OK<T> | DIRTY<T>;
export declare const isValid: <T>(x: ParseReturnType<T>) => x is OK<T>;
export declare const isAsync: <T>(x: ParseReturnType<T>) => x is AsyncParseReturnType<T>;
@@ -0,0 +1,32 @@
import { afterEach, expect, test } from "vitest";
import * as z from "zod/v4";
import * as core from "zod/v4/core";
// `globalConfig` is attached to `globalThis.__zod_globalConfig` so that a
// single config object is shared across CJS/ESM builds and across multiple
// bundled copies of Zod in a monorepo. This mirrors the existing
// `globalRegistry` -> `globalThis.__zod_globalRegistry` treatment.
//
// See #5789 for the footgun this fixes: users with both CJS and ESM instances of Zod loaded had to call `z.config({ jitless: true })` twice — once per instance — because each module-scope `globalConfig` was a different object. With this change, one call updates state seen by every loaded copy.
afterEach(() => {
// Don't leak config mutations into other test files.
delete core.globalConfig.jitless;
});
test("globalConfig is singleton and attached to globalThis", () => {
expect(core.globalConfig).toBe((globalThis as any).__zod_globalConfig);
});
test("z.config writes are observed via globalThis.__zod_globalConfig", () => {
z.config({ jitless: true });
expect((globalThis as any).__zod_globalConfig.jitless).toBe(true);
});
test("pre-set globalThis.__zod_globalConfig is preserved on import", () => {
// Object identity is preserved across reloads of the module: anyone who pre-populates `globalThis.__zod_globalConfig` before Zod loads (e.g. an inline script before the bundle) keeps that exact object as the source of truth. Mutating it directly is equivalent to z.config().
const direct = (globalThis as any).__zod_globalConfig;
direct.jitless = true;
expect(core.globalConfig.jitless).toBe(true);
expect(z.config()).toBe(core.globalConfig);
});
@@ -0,0 +1,8 @@
import { Params } from "../../router.js";
//#region src/router/trie-router/node.d.ts
export declare class Node<T> {
insert(method: string, path: string, handler: T): void;
search(method: string, path: string): [[T, Params][]];
}
//#endregion
@@ -0,0 +1,15 @@
The ISC License
Copyright (c) GitHub, Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1 @@
var _=(n,s)=>(s=Symbol[n])?s:Symbol.for("Symbol."+n),j=n=>{throw TypeError(n)};var P=(n,s,e)=>{if(s!=null){typeof s!="object"&&typeof s!="function"&&j("Object expected");var t,d;e&&(t=s[_("asyncDispose")]),t===void 0&&(t=s[_("dispose")],e&&(d=t)),typeof t!="function"&&j("Object not disposable"),d&&(t=function(){try{d.call(this)}catch(c){return Promise.reject(c)}}),n.push([e,t,s])}else e&&n.push([e]);return s},F=(n,s,e)=>{var t=typeof SuppressedError=="function"?SuppressedError:function(u,g,r,l){return l=Error(r),l.name="SuppressedError",l.error=u,l.suppressed=g,l},d=u=>s=e?new t(u,s,"An error was suppressed during disposal"):(e=!0,u),c=u=>{for(;u=n.pop();)try{var g=u[1]&&u[1].call(u[2]);if(u[0])return Promise.resolve(g).then(c,r=>(d(r),c()))}catch(r){d(r)}if(e)throw s};return c()};import{compile as I,env as K,Features as b,Instrumentation as V,normalizePath as J,optimize as N,toSourceMap as T}from"@tailwindcss/node";import{clearRequireCache as k}from"@tailwindcss/node/require-cache";import{Scanner as L}from"@tailwindcss/oxide";import{realpathSync as W}from"fs";import C from"fs/promises";import S from"path";import*as A from"vite";var p=K.DEBUG,M=/[?&](?:worker|sharedworker|raw|url)\b/,D=/\?commonjs-proxy/,E=/[?&]index=\d+\.css$/;function Y(n={}){let s=[],e=null,t=new x(r=>new Map),d=!1,c=!0,u=!0;function g(r,l){let i,o;if(r){let a=function(v,y){let R=v.createResolver(y),O;return async(w,z,G,U)=>w.name==="client"||w.name==="ssr"?R(z,G,U,w.name==="ssr"):(O??=A.createIdResolver(v,y),O(w,z,G,U))};var f=a;let m=a(r.config,{...r.config.resolve,extensions:[".css"],mainFields:["style"],conditions:["style","development|production"],tryIndex:!1,preferRelative:!0}),h=a(r.config,r.config.resolve);i=(v,y)=>m(r,v,y,!0),o=(v,y)=>h(r,v,y,!0)}else{let a=e.createResolver({...e.resolve,extensions:[".css"],mainFields:["style"],conditions:["style","development|production"],tryIndex:!1,preferRelative:!0}),m=e.createResolver(e.resolve);i=(h,v)=>a(h,v,!0,d),o=(h,v)=>m(h,v,!0,d)}return new B(l,e.root,e?.css.devSourcemap??!1,i,o)}return[{name:"@tailwindcss/vite:scan",enforce:"pre",configureServer(r){s.push(r)},async configResolved(r){e=r,d=e.build.ssr!==!1&&e.build.ssr!==void 0,n.optimize!==void 0&&(c=n.optimize!==!1),u=c&&e.build.cssMinify!==!1,typeof n.optimize=="object"&&(u=n.optimize.minify!==!1)}},{name:"@tailwindcss/vite:generate:serve",apply:"serve",enforce:"pre",transform:{filter:{id:{exclude:[/\/\.vite\//,M,D],include:[/\.css(?:\?.*)?$/,/&lang\.css/,E]}},async handler(r,l){var m=[];try{if(!$(l))return;let i=P(m,new V);p&&i.start("[@tailwindcss/vite] Generate CSS (serve)");let o=t.get(this.environment?.name??"default");let f=o.get(l);f||(f??=g(this.environment??null,l),o.set(l,f));let a=await f.generate(r,R=>this.addWatchFile(R),i);if(!a)return o.delete(l),r;p&&i.end("[@tailwindcss/vite] Generate CSS (serve)");return a}catch(h){var v=h,y=!0}finally{F(m,v,y)}}},hotUpdate({file:r,modules:l,timestamp:i,server:o}){{if(!(l.length>0&&l.every(a=>a.type==="asset"||a.id===void 0)))return;for(let a of Object.values(o.environments)){if(a.name===this.environment.name)continue;let m=a.moduleGraph.getModulesByFile(r);if(m){for(let h of m)if(h.type!=="asset")return}}for(let a of new Set([this.environment.name,"client"])){let m=t.get(a);if(m.size===0||!X(r,l,m))continue;let h=new Set;for(let v of l)this.environment.moduleGraph.invalidateModule(v,h,i,!0);return a===this.environment.name?this.environment.hot.send({type:"full-reload"}):o.hot.send?o.hot.send({type:"full-reload"}):o.ws.send&&o.ws.send({type:"full-reload"}),[]}}}},{name:"@tailwindcss/vite:generate:build",apply:"build",enforce:"pre",transform:{filter:{id:{exclude:[/\/\.vite\//,M,D],include:[/\.css(?:\?.*)?$/,/&lang\.css/,E]}},async handler(r,l){var m=[];try{if(!$(l))return;let i=P(m,new V);p&&i.start("[@tailwindcss/vite] Generate CSS (build)");let o=t.get(this.environment?.name??"default");let f=o.get(l);f||(f??=g(this.environment??null,l),o.set(l,f));let a=await f.generate(r,R=>this.addWatchFile(R),i);if(!a)return o.delete(l),r;p&&i.end("[@tailwindcss/vite] Generate CSS (build)");c&&(p&&i.start("[@tailwindcss/vite] Optimize CSS"),a=N(a.code,{minify:u,map:a.map}),p&&i.end("[@tailwindcss/vite] Optimize CSS"));return a}catch(h){var v=h,y=!0}finally{F(m,v,y)}}}}]}function Q(n){let[s]=n.split("?",2);return S.extname(s).slice(1)}function $(n){return n.includes("/.vite/")||M.test(n)||D.test(n)?!1:Q(n)==="css"||n.includes("&lang.css")||n.match(E)}function q(n){return S.resolve(n.replace(/\?.*$/,""))}var x=class extends Map{constructor(e){super();this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e,this),this.set(e,t)),t}},B=class{constructor(s,e,t,d,c){this.id=s;this.base=e;this.enableSourceMaps=t;this.customCssResolver=d;this.customJsResolver=c}compiler;scanner;candidates=new Set;buildDependencies=new Map;get scannedFiles(){return this.scanner?.files??[]}async generate(s,e,t){let d=q(this.id);function c(i){i!==d&&(/[#?].*\.svg$/.test(i)||e(i))}let u=this.requireLine truncated
@@ -0,0 +1,943 @@
export default `flf2a$ 9 8 18 0 24 0 64 0
Author : LG Beard
Date : 2005/5/8 6:45:39
Version: 1.0
-------------------------------------------------
_ _ _ _ _ _ ~ ~
=_/\\\\___ _____==__/\\\\___==_/\\\\___===_/\\\\_======_/\\\\_===_/\\\\___========~ ~====
(_ v ))(_ ____))(_ _ ))(_ _)) (____)) (_ )) ___~____
/ : <\\ \\\\ / ._)) / |))// / \\\\ / \\\\ / : \\\\ ((______))_
/:. | // ///:. |____ /:. ~ \\\\ /:. \\\\__ /:. \\\\ /:. | // \\:. /__)
\\___| //\\ // \\ _____))\\___| // \\__ ____))\\__ // \\___| // \\_ _/
=====\\//==\\//===\\//===========\\//=====\\//========\\//=======\\//=======~~======
~ ~ ~ ~ ~ ~ ~
Font Built from a sig dated 17 Feb 1995
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $##
_ #
_/\\\\_ #
(_ _)) #
/ \\\\ #
/ \\ :\\\\ #
\\__/\\// #
\\// #
#
##
"#
#
#
#
#
#
#
#
##
##
#
#
#
#
#
#
#
##
_ #
/\\\\_ #
/ _ \\\\ #
\\:.\\\\// #
/\\\\ \\\\ #
\\_ _// #
\\// #
#
##
%#
#
#
#
#
#
#
#
##
&#
#
#
#
#
#
#
#
##
____ #
(:. _)) #
\\// #
#
#
#
#
#
##
_ #
//\\__ #
// _\\ #
\\\\:\`\\ #
//:./_ #
\\\\ __/ #
\\\\/ #
#
##
_ #
__/\\\\ #
/_ \\\\ #
/':// #
_\\.:\\\\ #
\\__ // #
\\// #
#
##
*#
#
#
#
#
#
#
#
##
+#
#
#
#
#
#
#
#
##
#
#
#
#
___ #
((:. ) #
\\\\/ #
#
##
-#
#
#
#
#
#
#
#
##
#
#
#
#
_ #
_/\\\\_ #
(:.__)) #
#
##
_ #
//\\ #
// / #
// / #
_//./ #
((_ _) #
\\\\/ #
#
##
_ #
__/\\\\__ #
(_ __)) #
/ _ \\\\ #
/:.(_)) \\\\ #
\\ _____// #
\\// #
#
##
_ #
_/\\\\_ #
(____)) #
/ \\\\ #
/:. \\\\ #
\\__ // #
\\// #
#
##
_ #
__//\\ #
// \\ #
\\\\_/ / #
/.:/_/\\\\ #
\\ ___// #
\\// #
#
##
_ #
__/\\\\ #
/ \\\\ #
\\_/':// #
/ \\.:\\\\ #
\\__ // #
\\// #
#
##
_ #
/\\\\ _ #
/ ///\\\\ #
\\ \\/ // #
_\\:.// #
(_ _) #
\\// #
#
##
_ #
/\\\\__ #
/ _ \\\\ #
\\':\\\\\\// #
/ \\ \\\\ #
\\__ // #
\\// #
#
##
_ #
_/\\\\_ #
(____)) #
/ \\_ #
/:. / \\\\ #
\\ ___// #
\\// #
#
##
_ #
___/\\\\ #
/ \\\\ #
\\_/ .:// #
\\ // #
(_ _)) #
\\// #
#
##
_ #
/\\\\__ #
/:. \\\\ #
\\ \\_// #
/_\\ \\\\ #
\\__.:// #
\\// #
#
##
_ #
___/\\\\ #
/ \\\\ #
\\__/ :// #
\\ // #
(_ _)) #
\\// #
#
##
____ #
(:. _)) #
\\// #
#
_ #
_/\\\\_ #
(:.__)) #
#
##
____ #
(:. _)) #
\\// #
#
___ #
((:. ) #
\\\\/ #
#
##
#
_ #
//\\__ #
//. _\\ #
\\\\: __/ #
\\\\/ #
#
#
##
=#
#
#
#
#
#
#
#
##
#
_ #
__/\\\\ #
/_ :\\\\ #
\\__ '// #
\\// #
#
#
##
_ #
___/\\\\ #
/ \\\\ #
\\_/\\.:// #
_/ // #
(_ _)) #
\\// #
#
##
@#
#
#
#
#
#
#
#
##
_ #
__/\\\\__ #
(_ ____) #
/ _ \\\\ #
/:./_\\ \\\\ #
\\ _ // #
\\// \\// #
#
##
_ #
__/\\\\___ #
(_ __)) #
/ ._))// #
/: ._))\\\\ #
\\ ____// #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ || #
/:. ||___ #
\\ _____)) #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ _ \\\\ #
/:. |_\\ \\\\ #
\\ _____// #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ ._)) #
/:. ||___ #
\\ _____)) #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ ||__ #
/:. ._)) #
\\ _)) #
\\// #
#
##
_ #
__/\\\\__ #
(_ ___)) #
/ || _ #
/:. \\/ \\\\ #
\\ ____// #
\\// #
#
##
_ #
_/\\\\___ #
(_ __ __)) #
/ |_| \\\\ #
/:. _ \\\\ #
\\___| | // #
\\// #
#
##
_ #
_/\\\\_ #
(____)) #
/ \\\\ #
/:. \\\\ #
\\__ // #
\\// #
#
##
_ #
__/\\\\__ #
(_ _)) #
\\ \\\\ #
/\\/ .:\\\\ #
\\__ _// #
\\// #
#
##
#
_/\\\\___ #
(_ __)) #
/ : \\\\ #
/:. | // #
\\___| \\\\ #
\\// #
#
##
_ #
_/\\\\_ #
(_ _)) #
/ \\\\ #
/:. \\\\__ #
\\__ ____)) #
\\// #
#
##
_ #
_/\\\\___ _____ #
(_ v )) #
/ : <\\ \\\\ #
/:. | // // #
\\___| //\\ // #
\\// \\// #
#
##
_ #
_/\\\\___ #
(_ )) #
/ : \\\\ #
/:. | // #
\\___| // #
\\// #
#
##
_ #
__/\\\\___ #
(_ _)) #
/ _ \\\\ #
/:.(_)) \\\\ #
\\ _____// #
\\// #
#
##
_ #
_/\\\\___ #
(_ _ _)) #
/ |))\\\\ #
/:. ___// #
\\_ \\\\ #
\\// #
#
##
_ #
__/\\\\___ #
(_ __)) #
/ _ \\\\ #
/:.(_)) \\\\_ #
\\ _______// #
\\// #
#
##
_ #
_/\\\\___ #
(_ _ )) #
/ |))// #
/:. \\\\ #
\\___| // #
\\// #
#
##
_ #
/\\\\__ #
/ \\\\ #
_\\ \\_// #
// \\:.\\ #
\\\\__ / #
\\\\/ #
#
##
_ #
__/\\\\__ #
(__ __)) #
/ \\\\ #
/:. \\\\ #
\\__ // #
\\// #
#
##
_ #
___ /\\\\ #
/ //\\ \\\\ #
\\:.\\\\_\\ \\\\ #
\\ :. // #
(_ ___)) #
\\// #
#
##
_ #
_ /\\\\ #
/ \\\\ \\\\ #
\\:'/ // #
\\ // #
(_ _)) #
\\// #
#
##
_ _ #
___ /\\\\ /\\\\ #
/ | \\\\/ \\\\ #
\\:' | \\\\ \\\\ #
\\ : </ // #
(_ ___^____)) #
\\// #
#
##
_ _ #
_/\\\\/\\\\_ #
(_ / __)) #
\\/ \\\\ #
__/./.\\\\_ #
(_ _) _)) #
\\// \\// #
#
##
_ #
_ /\\\\ #
/\\\\ / // #
\\ \\/ // #
_\\:.// #
(_ _)) #
\\// #
#
##
_ #
__//\\ #
// \\ #
\\\\_/ /_ #
/.:/ \\\\ #
\\ __// #
\\// #
#
##
_ #
//\\__ #
// _\\ #
||:\`| #
||:.|_ #
\\\\ __/ #
\\\\/ #
#
##
_ #
/\\\\ #
\\ \\\\ #
\\ \\\\ #
\\:\\\\_ #
(_ _)) #
\\// #
#
##
_ #
__/\\\\ #
/_ \\\\ #
|':|| #
_|.:|| #
\\__ // #
\\// #
#
##
^#
#
#
#
#
#
#
#
##
_#
#
#
#
#
#
#
#
##
___ #
((:. ) #
\\\\/ #
#
#
#
#
#
##
_ #
__/\\\\__ #
(_ ____) #
/ _ \\\\ #
/:./_\\ \\\\ #
\\ _ // #
\\// \\// #
#
##
_ #
__/\\\\___ #
(_ __)) #
/ ._))// #
/: ._))\\\\ #
\\ ____// #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ || #
/:. ||___ #
\\ _____)) #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ _ \\\\ #
/:. |_\\ \\\\ #
\\ _____// #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ ._)) #
/:. ||___ #
\\ _____)) #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ ||__ #
/:. ._)) #
\\ _)) #
\\// #
#
##
_ #
__/\\\\__ #
(_ ___)) #
/ || _ #
/:. \\/ \\\\ #
\\ ____// #
\\// #
#
##
_ #
_/\\\\___ #
(_ __ __)) #
/ |_| \\\\ #
/:. _ \\\\ #
\\___| | // #
\\// #
#
##
_ #
_/\\\\_ #
(____)) #
/ \\\\ #
/:. \\\\ #
\\__ // #
\\// #
#
##
_ #
__/\\\\__ #
(_ _)) #
\\ \\\\ #
/\\/ .:\\\\ #
\\__ _// #
\\// #
#
##
#
_/\\\\___ #
(_ __)) #
/ : \\\\ #
/:. | // #
\\___| \\\\ #
\\// #
#
##
_ #
_/\\\\_ #
(_ _)) #
/ \\\\ #
/:. \\\\__ #
\\__ ____)) #
\\// #
#
##
_ #
_/\\\\___ _____ #
(_ v )) #
/ : <\\ \\\\ #
/:. | // // #
\\___| //\\ // #
\\// \\// #
#
##
_ #
_/\\\\___ #
(_ )) #
/ : \\\\ #
/:. | // #
\\___| // #
\\// #
#
##
_ #
__/\\\\___ #
(_ _)) #
/ _ \\\\ #
/:.(_)) \\\\ #
\\ _____// #
\\// #
#
##
_ #
_/\\\\___ #
(_ _ _)) #
/ |))\\\\ #
/:. ___// #
\\_ \\\\ #
\\// #
#
##
_ #
__/\\\\___ #
(_ __)) #
/ _ \\\\ #
/:.(_)) \\\\_ #
\\ _______// #
\\// #
#
##
_ #
_/\\\\___ #
(_ _ )) #
/ |))// #
/:. \\\\ #
\\___| // #
\\// #
#
##
_ #
/\\\\__ #
/ \\\\ #
_\\ \\_// #
// \\:.\\ #
\\\\__ / #
\\\\/ #
#
##
_ #
__/\\\\__ #
(__ __)) #
/ \\\\ #
/:. \\\\ #
\\__ // #
\\// #
#
##
_ #
___ /\\\\ #
/ //\\ \\\\ #
\\:.\\\\_\\ \\\\ #
\\ :. // #
(_ ___)) #
\\// #
#
##
_ #
_ /\\\\ #
/ \\\\ \\\\ #
\\:'/ // #
\\ // #
(_ _)) #
\\// #
#
##
_ _ #
___ /\\\\ /\\\\ #
/ | \\\\/ \\\\ #
\\:' | \\\\ \\\\ #
\\ : </ // #
(_ ___^____)) #
\\// #
#
##
_ _ #
_/\\\\/\\\\_ #
(_ / __)) #
\\/ \\\\ #
__/./.\\\\_ #
(_ _) _)) #
\\// \\// #
#
##
_ #
_ /\\\\ #
/\\\\ / // #
\\ \\/ // #
_\\:.// #
(_ _)) #
\\// #
#
##
_ #
__//\\ #
// \\ #
\\\\_/ /_ #
/.:/ \\\\ #
\\ __// #
\\// #
#
##
_ #
//\\__ #
// _\\ #
\\\\:\`\\ #
//:./_ #
\\\\ __/ #
\\\\/ #
#
##
_ #
_/\\\\_ #
(_ _)) #
/ \\\\ #
/:. \\\\ #
\\ _// #
\\// #
#
##
_ #
__/\\\\ #
/_ \\\\ #
/':// #
_\\.:\\\\ #
\\__ // #
\\// #
#
##
~#
#
#
#
#
#
#
#
##
_ #
__/\\\\__ #
(_ ____) #
/ _ \\\\ #
/:./_\\ \\\\ #
\\ _ // #
\\// \\// #
#
##
_ #
__/\\\\___ #
(_ _)) #
/ _ \\\\ #
/:.(_)) \\\\ #
\\ _____// #
\\// #
#
##
_ #
___ /\\\\ #
/ //\\ \\\\ #
\\:.\\\\_\\ \\\\ #
\\ :. // #
(_ ___)) #
\\// #
#
##
_ #
__/\\\\__ #
(_ ____) #
/ _ \\\\ #
/:./_\\ \\\\ #
\\ _ // #
\\// \\// #
#
##
_ #
__/\\\\___ #
(_ _)) #
/ _ \\\\ #
/:.(_)) \\\\ #
\\ _____// #
\\// #
#
##
_ #
___ /\\\\ #
/ //\\ \\\\ #
\\:.\\\\_\\ \\\\ #
\\ :. // #
(_ ___)) #
\\// #
#
##
�#
#
#
#
#
#
#
#
##`
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_aB","33":"_K","129":"_AC"},C:{"2":"_o _JF _L","33":"_DS"},D:{"16":"_6E","33":"_CN _HC"},E:{"2":"_k","33":"_nB"},F:{"2":"_T","33":"_a"},G:{"2":"_d","33":"_t"},H:{"2":"1D"},I:{"16":"_m","33":"_SB"},J:{"33":"_B"},K:{"2":"_D","33":"H"},L:{"33":"I"},M:{"33":"YC"},N:{"2":"_A"},O:{"33":"bC"},P:{"33":"_F"},Q:{"33":"JE"},R:{"33":"KE"},S:{"2":"LE","33":"ME"}},B:5,C:"CSS line-clamp",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"encode-html.d.ts","sourceRoot":"","sources":["../../../src/generated/encode-html.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GACb,MAAM,GACN;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAY1E,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAC,cAAc,CAAwhuB,CAAC"}
@@ -0,0 +1,4 @@
export function fullJitter(delay: number) {
const jitteredDelay = Math.random() * delay;
return Math.round(jitteredDelay);
}
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2019_string = void 0;
const base_config_1 = require("./base-config");
exports.es2019_string = {
libs: [],
variables: [['String', base_config_1.TYPE]],
};
@@ -0,0 +1 @@
{"version":3,"file":"mail-search.js","sources":["../../../src/icons/mail-search.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MailSearch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjIgMTIuNVY2YTIgMiAwIDAgMC0yLTJINGEyIDIgMCAwIDAtMiAydjEyYzAgMS4xLjkgMiAyIDJoNy41IiAvPgogIDxwYXRoIGQ9Im0yMiA3LTguOTcgNS43YTEuOTQgMS45NCAwIDAgMS0yLjA2IDBMMiA3IiAvPgogIDxwYXRoIGQ9Ik0xOCAyMWEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZaIiAvPgogIDxjaXJjbGUgY3g9IjE4IiBjeT0iMTgiIHI9IjMiIC8+CiAgPHBhdGggZD0ibTIyIDIyLTEuNS0xLjUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/mail-search\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 MailSearch = createLucideIcon('MailSearch', [\n ['path', { d: 'M22 12.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h7.5', key: 'w80f2v' }],\n ['path', { d: 'm22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7', key: '1ocrg3' }],\n ['path', { d: 'M18 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z', key: '8lzu5m' }],\n ['circle', { cx: '18', cy: '18', r: '3', key: '1xkwt0' }],\n ['path', { d: 'm22 22-1.5-1.5', key: '1x83k4' }],\n]);\n\nexport default MailSearch;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACpE,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,542 @@
/*
@license
Rollup.js v4.60.4
Thu, 14 May 2026 17:52:21 GMT - commit d311a84b0bb4d4a6f50d19ffd2c29cca28660c88
https://github.com/rollup/rollup
Released under the MIT License.
*/
'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const index = require('./index.js');
const promises = require('node:fs/promises');
const process$2 = require('node:process');
const cli = require('../bin/rollup');
const rollup = require('./rollup.js');
const parseAst_js = require('./parseAst.js');
const loadConfigFile_js = require('./loadConfigFile.js');
const node_child_process = require('node:child_process');
const rollup_js = require('../rollup.js');
require('path');
require('fs');
require('util');
require('stream');
require('os');
require('./fsevents-importer.js');
require('events');
require('node:path');
require('../native.js');
require('node:perf_hooks');
require('node:url');
require('../getLogFilter.js');
function timeZone(date = new Date()) {
const offset = date.getTimezoneOffset();
const absOffset = Math.abs(offset);
const hours = Math.floor(absOffset / 60);
const minutes = absOffset % 60;
const minutesOut = minutes > 0 ? ':' + ('0' + minutes).slice(-2) : '';
return (offset < 0 ? '+' : '-') + hours + minutesOut;
}
function dateTime(options = {}) {
let {
date = new Date(),
local = true,
showTimeZone = false,
showMilliseconds = false
} = options;
if (local) {
// Offset the date so it will return the correct value when getting the ISO string.
date = new Date(date.getTime() - (date.getTimezoneOffset() * 60000));
}
let end = '';
if (showTimeZone) {
end = ' UTC' + (local ? timeZone(date) : '');
}
if (showMilliseconds && date.getUTCMilliseconds() > 0) {
end = ` ${date.getUTCMilliseconds()}ms${end}`;
}
return date
.toISOString()
.replace(/T/, ' ')
.replace(/\..+/, end);
}
/**
* This is not the set of all possible signals.
*
* It IS, however, the set of all signals that trigger
* an exit on either Linux or BSD systems. Linux is a
* superset of the signal names supported on BSD, and
* the unknown signals just fail to register, so we can
* catch that easily enough.
*
* Windows signals are a different set, since there are
* signals that terminate Windows processes, but don't
* terminate (or don't even exist) on Posix systems.
*
* Don't bother with SIGKILL. It's uncatchable, which
* means that we can't fire any callbacks anyway.
*
* If a user does happen to register a handler on a non-
* fatal signal like SIGWINCH or something, and then
* exit, it'll end up firing `process.emit('exit')`, so
* the handler will be fired anyway.
*
* SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
* artificially, inherently leave the process in a
* state from which it is not safe to try and enter JS
* listeners.
*/
const signals = [];
signals.push('SIGHUP', 'SIGINT', 'SIGTERM');
if (process.platform !== 'win32') {
signals.push('SIGALRM', 'SIGABRT', 'SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT'
// should detect profiler and enable/disable accordingly.
// see #21
// 'SIGPROF'
);
}
if (process.platform === 'linux') {
signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT');
}
// Note: since nyc uses this module to output coverage, any lines
// that are in the direct sync flow of nyc's outputCoverage are
// ignored, since we can never get coverage for them.
// grab a reference to node's real process object right away
const processOk = (process) => !!process &&
typeof process === 'object' &&
typeof process.removeListener === 'function' &&
typeof process.emit === 'function' &&
typeof process.reallyExit === 'function' &&
typeof process.listeners === 'function' &&
typeof process.kill === 'function' &&
typeof process.pid === 'number' &&
typeof process.on === 'function';
const kExitEmitter = Symbol.for('signal-exit emitter');
const global = globalThis;
const ObjectDefineProperty = Object.defineProperty.bind(Object);
// teeny special purpose ee
class Emitter {
emitted = {
afterExit: false,
exit: false,
};
listeners = {
afterExit: [],
exit: [],
};
count = 0;
id = Math.random();
constructor() {
if (global[kExitEmitter]) {
return global[kExitEmitter];
}
ObjectDefineProperty(global, kExitEmitter, {
value: this,
writable: false,
enumerable: false,
configurable: false,
});
}
on(ev, fn) {
this.listeners[ev].push(fn);
}
removeListener(ev, fn) {
const list = this.listeners[ev];
const i = list.indexOf(fn);
/* c8 ignore start */
if (i === -1) {
return;
}
/* c8 ignore stop */
if (i === 0 && list.length === 1) {
list.length = 0;
}
else {
list.splice(i, 1);
}
}
emit(ev, code, signal) {
if (this.emitted[ev]) {
return false;
}
this.emitted[ev] = true;
let ret = false;
for (const fn of this.listeners[ev]) {
ret = fn(code, signal) === true || ret;
}
if (ev === 'exit') {
ret = this.emit('afterExit', code, signal) || ret;
}
return ret;
}
}
class SignalExitBase {
}
const signalExitWrap = (handler) => {
return {
onExit(cb, opts) {
return handler.onExit(cb, opts);
},
load() {
return handler.load();
},
unload() {
return handler.unload();
},
};
};
class SignalExitFallback extends SignalExitBase {
onExit() {
return () => { };
}
load() { }
unload() { }
}
class SignalExit extends SignalExitBase {
// "SIGHUP" throws an `ENOSYS` error on Windows,
// so use a supported signal instead
/* c8 ignore start */
#hupSig = process$1.platform === 'win32' ? 'SIGINT' : 'SIGHUP';
/* c8 ignore stop */
#emitter = new Emitter();
#process;
#originalProcessEmit;
#originalProcessReallyExit;
#sigListeners = {};
#loaded = false;
constructor(process) {
super();
this.#process = process;
// { <signal>: <listener fn>, ... }
this.#sigListeners = {};
for (const sig of signals) {
this.#sigListeners[sig] = () => {
// If there are no other listeners, an exit is coming!
// Simplest way: remove us and then re-send the signal.
// We know that this will kill the process, so we can
// safely emit now.
const listeners = this.#process.listeners(sig);
let { count } = this.#emitter;
// This is a workaround for the fact that signal-exit v3 and signal
// exit v4 are not aware of each other, and each will attempt to let
// the other handle it, so neither of them do. To correct this, we
// detect if we're the only handler *except* for previous versions
// of signal-exit, and increment by the count of listeners it has
// created.
/* c8 ignore start */
const p = process;
if (typeof p.__signal_exit_emitter__ === 'object' &&
typeof p.__signal_exit_emitter__.count === 'number') {
count += p.__signal_exit_emitter__.count;
}
/* c8 ignore stop */
if (listeners.length === count) {
this.unload();
const ret = this.#emitter.emit('exit', null, sig);
/* c8 ignore start */
const s = sig === 'SIGHUP' ? this.#hupSig : sig;
if (!ret)
process.kill(process.pid, s);
/* c8 ignore stop */
}
};
}
this.#originalProcessReallyExit = process.reallyExit;
this.#originalProcessEmit = process.emit;
}
onExit(cb, opts) {
/* c8 ignore start */
if (!processOk(this.#process)) {
return () => { };
}
/* c8 ignore stop */
if (this.#loaded === false) {
this.load();
}
const ev = opts?.alwaysLast ? 'afterExit' : 'exit';
this.#emitter.on(ev, cb);
return () => {
this.#emitter.removeListener(ev, cb);
if (this.#emitter.listeners['exit'].length === 0 &&
this.#emitter.listeners['afterExit'].length === 0) {
this.unload();
}
};
}
load() {
if (this.#loaded) {
return;
}
this.#loaded = true;
// This is the number of onSignalExit's that are in play.
// It's important so that we can count the correct number of
// listeners on signals, and don't wait for the other one to
// handle it instead of us.
this.#emitter.count += 1;
for (const sig of signals) {
try {
const fn = this.#sigListeners[sig];
if (fn)
this.#process.on(sig, fn);
}
catch (_) { }
}
this.#process.emit = (ev, ...a) => {
return this.#processEmit(ev, ...a);
};
this.#process.reallyExit = (code) => {
return this.#processReallyExit(code);
};
}
unload() {
if (!this.#loaded) {
return;
}
this.#loaded = false;
signals.forEach(sig => {
const listener = this.#sigListeners[sig];
/* c8 ignore start */
if (!listener) {
throw new Error('Listener not defined for signal: ' + sig);
}
/* c8 ignore stop */
try {
this.#process.removeListener(sig, listener);
/* c8 ignore start */
}
catch (_) { }
/* c8 ignore stop */
});
this.#process.emit = this.#originalProcessEmit;
this.#process.reallyExit = this.#originalProcessReallyExit;
this.#emitter.count -= 1;
}
#processReallyExit(code) {
/* c8 ignore start */
if (!processOk(this.#process)) {
return 0;
}
this.#process.exitCode = code || 0;
/* c8 ignore stop */
this.#emitter.emit('exit', this.#process.exitCode, null);
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
}
#processEmit(ev, ...args) {
const og = this.#originalProcessEmit;
if (ev === 'exit' && processOk(this.#process)) {
if (typeof args[0] === 'number') {
this.#process.exitCode = args[0];
/* c8 ignore start */
}
/* c8 ignore start */
const ret = og.call(this.#process, ev, ...args);
/* c8 ignore start */
this.#emitter.emit('exit', this.#process.exitCode, null);
/* c8 ignore stop */
return ret;
}
else {
return og.call(this.#process, ev, ...args);
}
}
}
const process$1 = globalThis.process;
// wrap so that we call the method on the actual handler, without
// exporting it directly.
const {
/**
* Called when the process is exiting, whether via signal, explicit
* exit, or running out of stuff to do.
*
* If the global process object is not suitable for instrumentation,
* then this will be a no-op.
*
* Returns a function that may be used to unload signal-exit.
*/
onExit} = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
const CLEAR_SCREEN = '\u001Bc';
function getResetScreen(configs, allowClearScreen) {
let clearScreen = allowClearScreen;
for (const config of configs) {
if (config.watch && config.watch.clearScreen === false) {
clearScreen = false;
}
}
if (clearScreen) {
return (heading) => rollup.stderr(CLEAR_SCREEN + heading);
}
let firstRun = true;
return (heading) => {
if (firstRun) {
rollup.stderr(heading);
firstRun = false;
}
};
}
function extractWatchHooks(command) {
if (!Array.isArray(command.watch))
return {};
return command.watch
.filter(value => typeof value === 'object')
.reduce((accumulator, keyValueOption) => ({ ...accumulator, ...keyValueOption }), {});
}
function createWatchHooks(command) {
const watchHooks = extractWatchHooks(command);
return function (hook) {
if (watchHooks[hook]) {
const cmd = watchHooks[hook];
if (!command.silent) {
rollup.stderr(rollup.cyan(`watch.${hook} ${rollup.bold(`$ ${cmd}`)}`));
}
try {
// !! important - use stderr for all writes from execSync
const stdio = [process.stdin, process.stderr, process.stderr];
node_child_process.execSync(cmd, { stdio: command.silent ? 'ignore' : stdio });
}
catch (error) {
rollup.stderr(error.message);
}
}
};
}
async function watch(command) {
process$2.env.ROLLUP_WATCH = 'true';
const isTTY = process$2.stderr.isTTY;
const silent = command.silent;
let watcher;
let configWatcher;
let resetScreen;
const configFile = command.config ? await cli.getConfigPath(command.config) : null;
const runWatchHook = createWatchHooks(command);
onExit(close);
process$2.on('uncaughtException', closeWithError);
async function loadConfigFromFileAndTrack(configFile) {
let configFileData = null;
let configFileRevision = 0;
configWatcher = index.chokidar.watch(configFile).on('change', reloadConfigFile);
await reloadConfigFile();
async function reloadConfigFile() {
try {
const newConfigFileData = await promises.readFile(configFile, 'utf8');
if (newConfigFileData === configFileData) {
return;
}
configFileRevision++;
const currentConfigFileRevision = configFileRevision;
if (configFileData) {
rollup.stderr(`\nReloading updated config...`);
}
configFileData = newConfigFileData;
const { options, warnings } = await loadConfigFile_js.loadConfigFile(configFile, command, true);
if (currentConfigFileRevision !== configFileRevision) {
return;
}
if (watcher) {
await watcher.close();
}
start(options, warnings);
}
catch (error) {
rollup.handleError(error, true);
}
}
}
if (configFile) {
await loadConfigFromFileAndTrack(configFile);
}
else {
const { options, warnings } = await cli.loadConfigFromCommand(command, true);
await start(options, warnings);
}
async function start(configs, warnings) {
watcher = rollup_js.watch(configs);
watcher.on('event', event => {
switch (event.code) {
case 'ERROR': {
warnings.flush();
rollup.handleError(event.error, true);
runWatchHook('onError');
break;
}
case 'START': {
if (!silent) {
if (!resetScreen) {
resetScreen = getResetScreen(configs, isTTY);
}
resetScreen(rollup.underline(`rollup v${rollup.version}`));
}
runWatchHook('onStart');
break;
}
case 'BUNDLE_START': {
if (!silent) {
let input = event.input;
if (typeof input !== 'string') {
input = Array.isArray(input)
? input.join(', ')
: Object.values(input).join(', ');
}
rollup.stderr(rollup.cyan(`bundles ${rollup.bold(input)} → ${rollup.bold(event.output.map(parseAst_js.relativeId).join(', '))}...`));
}
runWatchHook('onBundleStart');
break;
}
case 'BUNDLE_END': {
warnings.flush();
if (!silent)
rollup.stderr(rollup.green(`created ${rollup.bold(event.output.map(parseAst_js.relativeId).join(', '))} in ${rollup.bold(cli.prettyMilliseconds(event.duration))}`));
runWatchHook('onBundleEnd');
if (event.result && event.result.getTimings) {
cli.printTimings(event.result.getTimings());
}
break;
}
case 'END': {
runWatchHook('onEnd');
if (!silent) {
rollup.stderr(`\n[${dateTime()}] waiting for changes...`);
}
}
}
if ('result' in event && event.result) {
event.result.close().catch(error => rollup.handleError(error, true));
}
});
}
function close(code) {
process$2.removeListener('uncaughtException', closeWithError);
// removing a non-existent listener is a no-op
process$2.stdin.removeListener('end', close);
if (configWatcher)
configWatcher.close();
Promise.resolve(watcher?.close()).finally(() => {
process$2.exit(typeof code === 'number' ? code : 0);
});
// Tell signal-exit that we are handling this gracefully
return true;
}
// return a promise that never resolves to keep the process running
return new Promise(() => { });
}
function closeWithError(error) {
error.name = `Uncaught ${error.name}`;
rollup.handleError(error);
}
exports.watch = watch;
//# sourceMappingURL=watch-cli.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_2D","132":"C"},C:{"2":"_yJ","1090":"_hE _JH","2052":"_PG _WB _hF","4100":"_H _oN"},D:{"1":"_4G","2":"_pG","2052":"_HH"},E:{"2":"_iF","4100":"_wF"},F:{"1":"_c"},G:{"2":"_d","260":"_wD _UI _oE","8193":"_gL"},H:{"2":"1D"},I:{"1":"_X","2":"_LB","514":"_oF"},J:{"1":"A","2":"D"},K:{"1":"_N"},L:{"1":"I"},M:{"4100":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"2052":"_C"}},B:1,C:"Date and time input types",D:true};
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileKey2 = createLucideIcon("FileKey2", [
["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6", key: "rc0qvx" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["circle", { cx: "4", cy: "16", r: "2", key: "1ehqvc" }],
["path", { d: "m10 10-4.5 4.5", key: "7fwrp6" }],
["path", { d: "m9 11 1 1", key: "wa6s5q" }]
]);
export { FileKey2 as default };
//# sourceMappingURL=file-key-2.js.map
@@ -0,0 +1,4 @@
'use strict';
/** @type {import('./functionCall')} */
module.exports = Function.prototype.call;
@@ -0,0 +1,221 @@
// tar -r
import { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass';
import fs from 'node:fs';
import path from 'node:path';
import { Header } from './header.js';
import { list } from './list.js';
import { makeCommand } from './make-command.js';
import { isFile } from './options.js';
import { Pack, PackSync } from './pack.js';
// starting at the head of the file, read a Header
// If the checksum is invalid, that's our position to start writing
// If it is, jump forward by the specified size (round up to 512)
// and try again.
// Write the new Pack stream starting there.
const replaceSync = (opt, files) => {
const p = new PackSync(opt);
let threw = true;
let fd;
let position;
try {
try {
fd = fs.openSync(opt.file, 'r+');
}
catch (er) {
if (er?.code === 'ENOENT') {
fd = fs.openSync(opt.file, 'w+');
}
else {
throw er;
}
}
const st = fs.fstatSync(fd);
const headBuf = Buffer.alloc(512);
POSITION: for (position = 0; position < st.size; position += 512) {
for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) {
bytes = fs.readSync(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos);
if (position === 0 && headBuf[0] === 0x1f && headBuf[1] === 0x8b) {
throw new Error('cannot append to compressed archives');
}
if (!bytes) {
break POSITION;
}
}
const h = new Header(headBuf);
if (!h.cksumValid) {
break;
}
const entryBlockSize = 512 * Math.ceil((h.size || 0) / 512);
if (position + entryBlockSize + 512 > st.size) {
break;
}
// the 512 for the header we just parsed will be added as well
// also jump ahead all the blocks for the body
position += entryBlockSize;
if (opt.mtimeCache && h.mtime) {
opt.mtimeCache.set(String(h.path), h.mtime);
}
}
threw = false;
streamSync(opt, p, position, fd, files);
}
finally {
if (threw) {
try {
fs.closeSync(fd);
}
catch { }
}
}
};
const streamSync = (opt, p, position, fd, files) => {
const stream = new WriteStreamSync(opt.file, {
fd: fd,
start: position,
});
p.pipe(stream);
addFilesSync(p, files);
};
const replaceAsync = (opt, files) => {
files = Array.from(files);
const p = new Pack(opt);
const getPos = (fd, size, cb_) => {
const cb = (er, pos) => {
if (er) {
fs.close(fd, _ => cb_(er));
}
else {
cb_(null, pos);
}
};
let position = 0;
if (size === 0) {
return cb(null, 0);
}
let bufPos = 0;
const headBuf = Buffer.alloc(512);
const onread = (er, bytes) => {
if (er || bytes === undefined) {
return cb(er);
}
bufPos += bytes;
if (bufPos < 512 && bytes) {
return fs.read(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos, onread);
}
if (position === 0 && headBuf[0] === 0x1f && headBuf[1] === 0x8b) {
return cb(new Error('cannot append to compressed archives'));
}
// truncated header
if (bufPos < 512) {
return cb(null, position);
}
const h = new Header(headBuf);
if (!h.cksumValid) {
return cb(null, position);
}
/* c8 ignore next */
const entryBlockSize = 512 * Math.ceil((h.size ?? 0) / 512);
if (position + entryBlockSize + 512 > size) {
return cb(null, position);
}
position += entryBlockSize + 512;
if (position >= size) {
return cb(null, position);
}
if (opt.mtimeCache && h.mtime) {
opt.mtimeCache.set(String(h.path), h.mtime);
}
bufPos = 0;
fs.read(fd, headBuf, 0, 512, position, onread);
};
fs.read(fd, headBuf, 0, 512, position, onread);
};
const promise = new Promise((resolve, reject) => {
p.on('error', reject);
let flag = 'r+';
const onopen = (er, fd) => {
if (er && er.code === 'ENOENT' && flag === 'r+') {
flag = 'w+';
return fs.open(opt.file, flag, onopen);
}
if (er || !fd) {
return reject(er);
}
fs.fstat(fd, (er, st) => {
if (er) {
return fs.close(fd, () => reject(er));
}
getPos(fd, st.size, (er, position) => {
if (er) {
return reject(er);
}
const stream = new WriteStream(opt.file, {
fd: fd,
start: position,
});
p.pipe(stream);
stream.on('error', reject);
stream.on('close', resolve);
addFilesAsync(p, files);
});
});
};
fs.open(opt.file, flag, onopen);
});
return promise;
};
const addFilesSync = (p, files) => {
files.forEach(file => {
if (file.charAt(0) === '@') {
list({
file: path.resolve(p.cwd, file.slice(1)),
sync: true,
noResume: true,
onReadEntry: entry => p.add(entry),
});
}
else {
p.add(file);
}
});
p.end();
};
const addFilesAsync = async (p, files) => {
for (const file of files) {
if (file.charAt(0) === '@') {
await list({
file: path.resolve(String(p.cwd), file.slice(1)),
noResume: true,
onReadEntry: entry => p.add(entry),
});
}
else {
p.add(file);
}
}
p.end();
};
export const replace = makeCommand(replaceSync, replaceAsync,
/* c8 ignore start */
() => {
throw new TypeError('file is required');
}, () => {
throw new TypeError('file is required');
},
/* c8 ignore stop */
(opt, entries) => {
if (!isFile(opt)) {
throw new TypeError('file is required');
}
if (opt.gzip ||
opt.brotli ||
opt.zstd ||
opt.file.endsWith('.br') ||
opt.file.endsWith('.tbr')) {
throw new TypeError('cannot append to compressed archives');
}
if (!entries?.length) {
throw new TypeError('no paths specified to add/replace');
}
});
//# sourceMappingURL=replace.js.map
@@ -0,0 +1,483 @@
function isMockFunction(fn) {
return typeof fn === "function" && "_isMockFunction" in fn && fn._isMockFunction === true;
}
const MOCK_RESTORE = new Set();
// Jest keeps the state in a separate WeakMap which is good for memory,
// but it makes the state slower to access and return different values
// if you stored it before calling `mockClear` where it will be recreated
const REGISTERED_MOCKS = new Set();
const MOCK_CONFIGS = new WeakMap();
function createMockInstance(options = {}) {
const { originalImplementation, restore, mockImplementation, resetToMockImplementation, resetToMockName } = options;
if (restore) {
MOCK_RESTORE.add(restore);
}
const config = getDefaultConfig(originalImplementation);
const state = getDefaultState();
const mock = createMock({
config,
state,
...options
});
const mockLength = (mockImplementation || originalImplementation)?.length ?? 0;
Object.defineProperty(mock, "length", {
writable: true,
enumerable: false,
value: mockLength,
configurable: true
});
// inherit the default name so it appears in snapshots and logs
// this is used by `vi.spyOn()` for better debugging.
// when `vi.fn()` is called, we just use the default string
if (resetToMockName) {
config.mockName = mock.name || "vi.fn()";
}
MOCK_CONFIGS.set(mock, config);
REGISTERED_MOCKS.add(mock);
mock._isMockFunction = true;
mock.getMockImplementation = () => {
// Jest only returns `config.mockImplementation` here,
// but we think it makes sense to return what the next function will be called
return config.onceMockImplementations[0] || config.mockImplementation;
};
Object.defineProperty(mock, "mock", {
configurable: false,
enumerable: true,
writable: false,
value: state
});
mock.mockImplementation = function mockImplementation(implementation) {
config.mockImplementation = implementation;
return mock;
};
mock.mockImplementationOnce = function mockImplementationOnce(implementation) {
config.onceMockImplementations.push(implementation);
return mock;
};
mock.withImplementation = function withImplementation(implementation, callback) {
const previousImplementation = config.mockImplementation;
const previousOnceImplementations = config.onceMockImplementations;
const reset = () => {
config.mockImplementation = previousImplementation;
config.onceMockImplementations = previousOnceImplementations;
};
config.mockImplementation = implementation;
config.onceMockImplementations = [];
const returnValue = callback();
if (typeof returnValue === "object" && typeof returnValue?.then === "function") {
return returnValue.then(() => {
reset();
return mock;
});
} else {
reset();
}
return mock;
};
mock.mockReturnThis = function mockReturnThis() {
return mock.mockImplementation(function() {
return this;
});
};
mock.mockReturnValue = function mockReturnValue(value) {
return mock.mockImplementation(function() {
if (new.target) {
throwConstructorError("mockReturnValue");
}
return value;
});
};
mock.mockReturnValueOnce = function mockReturnValueOnce(value) {
return mock.mockImplementationOnce(function() {
if (new.target) {
throwConstructorError("mockReturnValueOnce");
}
return value;
});
};
mock.mockThrow = function mockThrow(value) {
// eslint-disable-next-line prefer-arrow-callback
return mock.mockImplementation(function() {
throw value;
});
};
mock.mockThrowOnce = function mockThrowOnce(value) {
// eslint-disable-next-line prefer-arrow-callback
return mock.mockImplementationOnce(function() {
throw value;
});
};
mock.mockResolvedValue = function mockResolvedValue(value) {
return mock.mockImplementation(function() {
if (new.target) {
throwConstructorError("mockResolvedValue");
}
return Promise.resolve(value);
});
};
mock.mockResolvedValueOnce = function mockResolvedValueOnce(value) {
return mock.mockImplementationOnce(function() {
if (new.target) {
throwConstructorError("mockResolvedValueOnce");
}
return Promise.resolve(value);
});
};
mock.mockRejectedValue = function mockRejectedValue(value) {
return mock.mockImplementation(function() {
if (new.target) {
throwConstructorError("mockRejectedValue");
}
return Promise.reject(value);
});
};
mock.mockRejectedValueOnce = function mockRejectedValueOnce(value) {
return mock.mockImplementationOnce(function() {
if (new.target) {
throwConstructorError("mockRejectedValueOnce");
}
return Promise.reject(value);
});
};
mock.mockClear = function mockClear() {
state.calls = [];
state.contexts = [];
state.instances = [];
state.invocationCallOrder = [];
state.results = [];
state.settledResults = [];
return mock;
};
mock.mockReset = function mockReset() {
mock.mockClear();
config.mockImplementation = resetToMockImplementation ? mockImplementation : undefined;
config.mockName = resetToMockName ? mock.name || "vi.fn()" : "vi.fn()";
config.onceMockImplementations = [];
return mock;
};
mock.mockRestore = function mockRestore() {
mock.mockReset();
return restore?.();
};
mock.mockName = function mockName(name) {
if (typeof name === "string") {
config.mockName = name;
}
return mock;
};
mock.getMockName = function getMockName() {
return config.mockName || "vi.fn()";
};
if (Symbol.dispose) {
mock[Symbol.dispose] = () => mock.mockRestore();
}
if (mockImplementation) {
mock.mockImplementation(mockImplementation);
}
return mock;
}
function fn(originalImplementation) {
// if the function is already a mock, just return the same function,
// similarly to how vi.spyOn() works
if (originalImplementation != null && isMockFunction(originalImplementation)) {
return originalImplementation;
}
return createMockInstance({
mockImplementation: originalImplementation,
resetToMockImplementation: true
});
}
function spyOn(object, key, accessor) {
assert(object != null, "The vi.spyOn() function could not find an object to spy upon. The first argument must be defined.");
assert(typeof object === "object" || typeof object === "function", "Vitest cannot spy on a primitive value.");
const [originalDescriptorObject, originalDescriptor] = getDescriptor(object, key) || [];
assert(originalDescriptor || key in object, `The property "${String(key)}" is not defined on the ${typeof object}.`);
let accessType = accessor || "value";
let ssr = false;
// vite ssr support - actual function is stored inside a getter
if (accessType === "value" && originalDescriptor && originalDescriptor.value == null && originalDescriptor.get) {
accessType = "get";
ssr = true;
}
let original;
if (originalDescriptor) {
original = originalDescriptor[accessType];
// weird Proxy edge case where descriptor's value is undefined,
// but there's still a value on the object when called
// https://github.com/vitest-dev/vitest/issues/9439
if (original == null && accessType === "value") {
original = object[key];
}
} else if (accessType !== "value") {
original = () => object[key];
} else {
original = object[key];
}
const originalImplementation = ssr && original ? original() : original;
const originalType = typeof originalImplementation;
assert(
// allow only functions
originalType === "function" || accessType !== "value" && original == null,
`vi.spyOn() can only spy on a function. Received ${originalType}.`
);
if (isMockFunction(originalImplementation)) {
return originalImplementation;
}
const reassign = (cb) => {
const { value, ...desc } = originalDescriptor || {
configurable: true,
writable: true
};
if (accessType !== "value") {
delete desc.writable;
}
desc[accessType] = cb;
Object.defineProperty(object, key, desc);
};
const restore = () => {
// if method is defined on the prototype, we can just remove it from
// the current object instead of redefining a copy of it
if (originalDescriptorObject !== object) {
Reflect.deleteProperty(object, key);
} else if (originalDescriptor && !original) {
Object.defineProperty(object, key, originalDescriptor);
} else {
reassign(original);
}
};
const mock = createMockInstance({
restore,
originalImplementation,
resetToMockName: true
});
try {
reassign(ssr ? () => mock : mock);
} catch (error) {
if (error instanceof TypeError && Symbol.toStringTag && object[Symbol.toStringTag] === "Module" && (error.message.includes("Cannot redefine property") || error.message.includes("Cannot replace module namespace") || error.message.includes("can't redefine non-configurable property"))) {
throw new TypeError(`Cannot spy on export "${String(key)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`, { cause: error });
}
throw error;
}
return mock;
}
function getDescriptor(obj, method) {
const objDescriptor = Object.getOwnPropertyDescriptor(obj, method);
if (objDescriptor) {
return [obj, objDescriptor];
}
let currentProto = Object.getPrototypeOf(obj);
while (currentProto !== null) {
const descriptor = Object.getOwnPropertyDescriptor(currentProto, method);
if (descriptor) {
return [currentProto, descriptor];
}
currentProto = Object.getPrototypeOf(currentProto);
}
}
function assert(condition, message) {
if (!condition) {
throw new Error(message);
}
}
let invocationCallCounter = 1;
function createMock({ state, config, name: mockName, prototypeState, prototypeConfig, keepMembersImplementation, mockImplementation, prototypeMembers = [] }) {
const original = config.mockOriginal;
const pseudoOriginal = mockImplementation;
const name = mockName || original?.name || "Mock";
const namedObject = { [name]: (function(...args) {
registerCalls(args, state, prototypeState);
registerInvocationOrder(invocationCallCounter++, state, prototypeState);
const result = {
type: "incomplete",
value: undefined
};
const settledResult = {
type: "incomplete",
value: undefined
};
registerResult(result, state, prototypeState);
registerSettledResult(settledResult, state, prototypeState);
const context = new.target ? undefined : this;
const [instanceIndex, instancePrototypeIndex] = registerInstance(context, state, prototypeState);
const [contextIndex, contextPrototypeIndex] = registerContext(context, state, prototypeState);
const implementation = config.onceMockImplementations.shift() || config.mockImplementation || prototypeConfig?.onceMockImplementations.shift() || prototypeConfig?.mockImplementation || original || function() {};
let returnValue;
let thrownValue;
let didThrow = false;
try {
if (new.target) {
returnValue = Reflect.construct(implementation, args, new.target);
// jest calls this before the implementation, but we have to resolve this _after_
// because we cannot do it before the `Reflect.construct` called the custom implementation.
// fortunately, the constructor is always an empty function because `prototypeMethods`
// are only used by the automocker, so this doesn't matter
for (const prop of prototypeMembers) {
const prototypeMock = returnValue[prop];
// the method was overridden because of inheritance, ignore it
// eslint-disable-next-line ts/no-use-before-define
if (prototypeMock !== mock.prototype[prop]) {
continue;
}
const isMock = isMockFunction(prototypeMock);
const prototypeState = isMock ? prototypeMock.mock : undefined;
const prototypeConfig = isMock ? MOCK_CONFIGS.get(prototypeMock) : undefined;
returnValue[prop] = createMockInstance({
originalImplementation: keepMembersImplementation ? prototypeConfig?.mockOriginal : undefined,
prototypeState,
prototypeConfig,
keepMembersImplementation
});
}
} else {
returnValue = implementation.apply(this, args);
}
} catch (error) {
thrownValue = error;
didThrow = true;
if (error instanceof TypeError && error.message.includes("is not a constructor")) {
console.warn(`[vitest] The ${namedObject[name].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`);
}
throw error;
} finally {
if (didThrow) {
result.type = "throw";
result.value = thrownValue;
settledResult.type = "rejected";
settledResult.value = thrownValue;
} else {
result.type = "return";
result.value = returnValue;
if (new.target) {
state.contexts[contextIndex - 1] = returnValue;
state.instances[instanceIndex - 1] = returnValue;
if (contextPrototypeIndex != null && prototypeState) {
prototypeState.contexts[contextPrototypeIndex - 1] = returnValue;
}
if (instancePrototypeIndex != null && prototypeState) {
prototypeState.instances[instancePrototypeIndex - 1] = returnValue;
}
}
if (returnValue instanceof Promise) {
returnValue.then((settledValue) => {
settledResult.type = "fulfilled";
settledResult.value = settledValue;
}, (rejectedValue) => {
settledResult.type = "rejected";
settledResult.value = rejectedValue;
});
} else {
settledResult.type = "fulfilled";
settledResult.value = returnValue;
}
}
}
return returnValue;
}) };
const mock = namedObject[name];
const copyPropertiesFrom = original || pseudoOriginal;
if (copyPropertiesFrom) {
copyOriginalStaticProperties(mock, copyPropertiesFrom);
}
return mock;
}
function registerCalls(args, state, prototypeState) {
state.calls.push(args);
prototypeState?.calls.push(args);
}
function registerInvocationOrder(order, state, prototypeState) {
state.invocationCallOrder.push(order);
prototypeState?.invocationCallOrder.push(order);
}
function registerResult(result, state, prototypeState) {
state.results.push(result);
prototypeState?.results.push(result);
}
function registerSettledResult(result, state, prototypeState) {
state.settledResults.push(result);
prototypeState?.settledResults.push(result);
}
function registerInstance(instance, state, prototypeState) {
const instanceIndex = state.instances.push(instance);
const instancePrototypeIndex = prototypeState?.instances.push(instance);
return [instanceIndex, instancePrototypeIndex];
}
function registerContext(context, state, prototypeState) {
const contextIndex = state.contexts.push(context);
const contextPrototypeIndex = prototypeState?.contexts.push(context);
return [contextIndex, contextPrototypeIndex];
}
function copyOriginalStaticProperties(mock, original) {
const { properties, descriptors } = getAllProperties(original);
for (const key of properties) {
const descriptor = descriptors[key];
const mockDescriptor = getDescriptor(mock, key);
if (mockDescriptor) {
continue;
}
Object.defineProperty(mock, key, descriptor);
}
}
const ignoreProperties = new Set([
"length",
"name",
"prototype",
Symbol.for("nodejs.util.promisify.custom")
]);
function getAllProperties(original) {
const properties = new Set();
const descriptors = {};
while (original && original !== Object.prototype && original !== Function.prototype) {
const ownProperties = [...Object.getOwnPropertyNames(original), ...Object.getOwnPropertySymbols(original)];
for (const prop of ownProperties) {
if (descriptors[prop] || ignoreProperties.has(prop)) {
continue;
}
properties.add(prop);
descriptors[prop] = Object.getOwnPropertyDescriptor(original, prop);
}
original = Object.getPrototypeOf(original);
}
return {
properties,
descriptors
};
}
function getDefaultConfig(original) {
return {
mockImplementation: undefined,
mockOriginal: original,
mockName: "vi.fn()",
onceMockImplementations: []
};
}
function getDefaultState() {
const state = {
calls: [],
contexts: [],
instances: [],
invocationCallOrder: [],
settledResults: [],
results: [],
get lastCall() {
return state.calls.at(-1);
}
};
return state;
}
function restoreAllMocks() {
for (const restore of MOCK_RESTORE) {
restore();
}
MOCK_RESTORE.clear();
}
function clearAllMocks() {
REGISTERED_MOCKS.forEach((mock) => mock.mockClear());
}
function resetAllMocks() {
REGISTERED_MOCKS.forEach((mock) => mock.mockReset());
}
function throwConstructorError(shorthand) {
throw new TypeError(`Cannot use \`${shorthand}\` when called with \`new\`. Use \`mockImplementation\` with a \`class\` keyword instead. See https://vitest.dev/api/mock#class-support for more information.`);
}
export { clearAllMocks, createMockInstance, fn, isMockFunction, resetAllMocks, restoreAllMocks, spyOn };
@@ -0,0 +1,23 @@
{
"name": "stackback",
"version": "0.0.2",
"description": "return list of CallSite objects from a captured stacktrace",
"main": "index.js",
"scripts": {
"test": "mocha --ui qunit"
},
"repository": {
"type": "git",
"url": "git://github.com/shtylman/node-stackback.git"
},
"keywords": [
"stacktrace",
"trace",
"stack"
],
"devDependencies": {
"mocha": "~1.6.0"
},
"author": "Roman Shtylman <shtylman@gmail.com>",
"license": "MIT"
}
@@ -0,0 +1 @@
{"version":3,"file":"screen-share-off.js","sources":["../../../src/icons/screen-share-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ScreenShareOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMgM0g0YTIgMiAwIDAgMC0yIDJ2MTBhMiAyIDAgMCAwIDIgMmgxNmEyIDIgMCAwIDAgMi0ydi0zIiAvPgogIDxwYXRoIGQ9Ik04IDIxaDgiIC8+CiAgPHBhdGggZD0iTTEyIDE3djQiIC8+CiAgPHBhdGggZD0ibTIyIDMtNSA1IiAvPgogIDxwYXRoIGQ9Im0xNyAzIDUgNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/screen-share-off\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 ScreenShareOff = createLucideIcon('ScreenShareOff', [\n ['path', { d: 'M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3', key: 'i8wdob' }],\n ['path', { d: 'M8 21h8', key: '1ev6f3' }],\n ['path', { d: 'M12 17v4', key: '1riwvh' }],\n ['path', { d: 'm22 3-5 5', key: '12jva0' }],\n ['path', { d: 'm17 3 5 5', key: 'k36vhe' }],\n]);\n\nexport default ScreenShareOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,204 @@
# yallist
Yet Another Linked List
There are many doubly-linked list implementations like it, but this
one is mine.
For when an array would be too big, and a Map can't be iterated in
reverse order.
[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist)
## basic usage
```javascript
var yallist = require('yallist')
var myList = yallist.create([1, 2, 3])
myList.push('foo')
myList.unshift('bar')
// of course pop() and shift() are there, too
console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']
myList.forEach(function (k) {
// walk the list head to tail
})
myList.forEachReverse(function (k, index, list) {
// walk the list tail to head
})
var myDoubledList = myList.map(function (k) {
return k + k
})
// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']
// mapReverse is also a thing
var myDoubledListReverse = myList.mapReverse(function (k) {
return k + k
}) // ['foofoo', 6, 4, 2, 'barbar']
var reduced = myList.reduce(function (set, entry) {
set += entry
return set
}, 'start')
console.log(reduced) // 'startfoo123bar'
```
## api
The whole API is considered "public".
Functions with the same name as an Array method work more or less the
same way.
There's reverse versions of most things because that's the point.
### Yallist
Default export, the class that holds and manages a list.
Call it with either a forEach-able (like an array) or a set of
arguments, to initialize the list.
The Array-ish methods all act like you'd expect. No magic length,
though, so if you change that it won't automatically prune or add
empty spots.
### Yallist.create(..)
Alias for Yallist function. Some people like factories.
#### yallist.head
The first node in the list
#### yallist.tail
The last node in the list
#### yallist.length
The number of nodes in the list. (Change this at your peril. It is
not magic like Array length.)
#### yallist.toArray()
Convert the list to an array.
#### yallist.forEach(fn, [thisp])
Call a function on each item in the list.
#### yallist.forEachReverse(fn, [thisp])
Call a function on each item in the list, in reverse order.
#### yallist.get(n)
Get the data at position `n` in the list. If you use this a lot,
probably better off just using an Array.
#### yallist.getReverse(n)
Get the data at position `n`, counting from the tail.
#### yallist.map(fn, thisp)
Create a new Yallist with the result of calling the function on each
item.
#### yallist.mapReverse(fn, thisp)
Same as `map`, but in reverse.
#### yallist.pop()
Get the data from the list tail, and remove the tail from the list.
#### yallist.push(item, ...)
Insert one or more items to the tail of the list.
#### yallist.reduce(fn, initialValue)
Like Array.reduce.
#### yallist.reduceReverse
Like Array.reduce, but in reverse.
#### yallist.reverse
Reverse the list in place.
#### yallist.shift()
Get the data from the list head, and remove the head from the list.
#### yallist.slice([from], [to])
Just like Array.slice, but returns a new Yallist.
#### yallist.sliceReverse([from], [to])
Just like yallist.slice, but the result is returned in reverse.
#### yallist.toArray()
Create an array representation of the list.
#### yallist.toArrayReverse()
Create a reversed array representation of the list.
#### yallist.unshift(item, ...)
Insert one or more items to the head of the list.
#### yallist.unshiftNode(node)
Move a Node object to the front of the list. (That is, pull it out of
wherever it lives, and make it the new head.)
If the node belongs to a different list, then that list will remove it
first.
#### yallist.pushNode(node)
Move a Node object to the end of the list. (That is, pull it out of
wherever it lives, and make it the new tail.)
If the node belongs to a list already, then that list will remove it
first.
#### yallist.removeNode(node)
Remove a node from the list, preserving referential integrity of head
and tail and other nodes.
Will throw an error if you try to have a list remove a node that
doesn't belong to it.
### Yallist.Node
The class that holds the data and is actually the list.
Call with `var n = new Node(value, previousNode, nextNode)`
Note that if you do direct operations on Nodes themselves, it's very
easy to get into weird states where the list is broken. Be careful :)
#### node.next
The next node in the list.
#### node.prev
The previous node in the list.
#### node.value
The data the node contains.
#### node.list
The list to which this node belongs. (Null if it does not belong to
any list.)
@@ -0,0 +1,48 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
class PluginPass {
constructor(file, key, options, isAsync) {
this._map = new Map();
this.key = void 0;
this.file = void 0;
this.opts = void 0;
this.cwd = void 0;
this.filename = void 0;
this.isAsync = void 0;
this.key = key;
this.file = file;
this.opts = options || {};
this.cwd = file.opts.cwd;
this.filename = file.opts.filename;
this.isAsync = isAsync;
}
set(key, val) {
this._map.set(key, val);
}
get(key) {
return this._map.get(key);
}
availableHelper(name, versionRange) {
return this.file.availableHelper(name, versionRange);
}
addHelper(name) {
return this.file.addHelper(name);
}
buildCodeFrameError(node, msg, _Error) {
return this.file.buildCodeFrameError(node, msg, _Error);
}
}
exports.default = PluginPass;
PluginPass.prototype.getModuleName = function getModuleName() {
return this.file.getModuleName();
};
PluginPass.prototype.addImport = function addImport() {
this.file.addImport();
};
0 && 0;
//# sourceMappingURL=plugin-pass.js.map
@@ -0,0 +1,788 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
* @format
*/
/**
* This transforms component syntax (https://flow.org/en/docs/react/component-syntax/)
* and hook syntax (https://flow.org/en/docs/react/hook-syntax/).
*
* It is expected that all transforms create valid ESTree AST output. If
* the transform requires outputting Babel specific AST nodes then it
* should live in `ConvertESTreeToBabel.js`
*/
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.transformProgram = transformProgram;
var _SimpleTransform = require("../transform/SimpleTransform");
var _astNodeMutationHelpers = require("../transform/astNodeMutationHelpers");
var _SimpleTraverser = require("../traverse/SimpleTraverser");
var _createSyntaxError = require("../utils/createSyntaxError");
const nodeWith = _SimpleTransform.SimpleTransform.nodeWith; // Rely on the mapper to fix up parent relationships.
const EMPTY_PARENT = null;
function createDefaultPosition() {
return {
line: 1,
column: 0
};
}
function mapDeclareComponent(node) {
return {
type: 'DeclareVariable',
id: nodeWith(node.id, {
typeAnnotation: {
type: 'TypeAnnotation',
typeAnnotation: {
type: 'AnyTypeAnnotation',
loc: node.loc,
range: node.range,
parent: EMPTY_PARENT
},
loc: node.loc,
range: node.range,
parent: EMPTY_PARENT
}
}),
kind: 'const',
loc: node.loc,
range: node.range,
parent: node.parent
};
}
function getComponentParameterName(paramName) {
switch (paramName.type) {
case 'Identifier':
return paramName.name;
case 'Literal':
return paramName.value;
default:
throw (0, _createSyntaxError.createSyntaxError)(paramName, `Unknown Component parameter name type of "${paramName.type}"`);
}
}
function createPropsTypeAnnotation(propTypes, spread, loc, range) {
// Create empty loc for type annotation nodes
const createParamsTypeLoc = () => ({
loc: {
start: (loc == null ? void 0 : loc.start) != null ? loc.start : createDefaultPosition(),
end: (loc == null ? void 0 : loc.end) != null ? loc.end : createDefaultPosition()
},
range: range != null ? range : [0, 0],
parent: EMPTY_PARENT
}); // Optimize `{...Props}` -> `Props`
if (spread != null && propTypes.length === 0) {
return {
type: 'TypeAnnotation',
typeAnnotation: spread.argument,
...createParamsTypeLoc()
};
}
const typeProperties = [...propTypes];
if (spread != null) {
// Spread needs to be the first type, as inline properties take precedence.
typeProperties.unshift(spread);
}
const propTypeObj = {
type: 'ObjectTypeAnnotation',
callProperties: [],
properties: typeProperties,
indexers: [],
internalSlots: [],
exact: false,
inexact: false,
...createParamsTypeLoc()
};
return {
type: 'TypeAnnotation',
typeAnnotation: {
type: 'GenericTypeAnnotation',
id: {
type: 'Identifier',
name: '$ReadOnly',
optional: false,
typeAnnotation: null,
...createParamsTypeLoc()
},
typeParameters: {
type: 'TypeParameterInstantiation',
params: [propTypeObj],
...createParamsTypeLoc()
},
...createParamsTypeLoc()
},
...createParamsTypeLoc()
};
}
function mapComponentParameters(params, options) {
var _options$reactRuntime;
if (params.length === 0) {
return {
props: null,
ref: null
};
} // Optimize `component Foo(...props: Props) {}` to `function Foo(props: Props) {}
if (params.length === 1 && params[0].type === 'RestElement' && params[0].argument.type === 'Identifier') {
const restElementArgument = params[0].argument;
return {
props: restElementArgument,
ref: null
};
} // Filter out any ref param and capture it's details when targeting React 18.
// React 19+ treats ref as a regular prop for function components.
let refParam = null;
const paramsWithoutRef = ((_options$reactRuntime = options.reactRuntimeTarget) != null ? _options$reactRuntime : '18') === '18' ? params.filter(param => {
if (param.type === 'ComponentParameter' && getComponentParameterName(param.name) === 'ref') {
refParam = param;
return false;
}
return true;
}) : params;
const [propTypes, spread] = paramsWithoutRef.reduce(([propTypes, spread], param) => {
switch (param.type) {
case 'RestElement':
{
if (spread != null) {
throw (0, _createSyntaxError.createSyntaxError)(param, `Invalid state, multiple rest elements found as Component Parameters`);
}
return [propTypes, mapComponentParameterRestElementType(param)];
}
case 'ComponentParameter':
{
propTypes.push(mapComponentParameterType(param));
return [propTypes, spread];
}
}
}, [[], null]);
const propsProperties = paramsWithoutRef.flatMap(mapComponentParameter);
let props = null;
if (propsProperties.length === 0) {
if (refParam == null) {
throw new Error('StripComponentSyntax: Invalid state, ref should always be set at this point if props are empty');
}
const emptyParamsLoc = {
start: refParam.loc.start,
end: refParam.loc.start
};
const emptyParamsRange = [refParam.range[0], refParam.range[0]]; // no properties provided (must have had a single ref)
props = {
type: 'Identifier',
name: '_$$empty_props_placeholder$$',
optional: false,
typeAnnotation: createPropsTypeAnnotation([], null, emptyParamsLoc, emptyParamsRange),
loc: emptyParamsLoc,
range: emptyParamsRange,
parent: EMPTY_PARENT
};
} else {
const lastPropsProperty = propsProperties[propsProperties.length - 1];
props = {
type: 'ObjectPattern',
properties: propsProperties,
typeAnnotation: createPropsTypeAnnotation(propTypes, spread, {
start: lastPropsProperty.loc.end,
end: lastPropsProperty.loc.end
}, [lastPropsProperty.range[1], lastPropsProperty.range[1]]),
loc: {
start: propsProperties[0].loc.start,
end: lastPropsProperty.loc.end
},
range: [propsProperties[0].range[0], lastPropsProperty.range[1]],
parent: EMPTY_PARENT
};
}
let ref = null;
if (refParam != null) {
ref = refParam.local;
}
return {
props,
ref
};
}
function mapComponentParameterType(param) {
var _typeAnnotation$typeA;
const typeAnnotation = param.local.type === 'AssignmentPattern' ? param.local.left.typeAnnotation : param.local.typeAnnotation;
const optional = param.local.type === 'AssignmentPattern' ? true : param.local.type === 'Identifier' ? param.local.optional : false;
return {
type: 'ObjectTypeProperty',
key: (0, _astNodeMutationHelpers.shallowCloneNode)(param.name),
value: (_typeAnnotation$typeA = typeAnnotation == null ? void 0 : typeAnnotation.typeAnnotation) != null ? _typeAnnotation$typeA : {
type: 'AnyTypeAnnotation',
loc: param.local.loc,
range: param.local.range,
parent: EMPTY_PARENT
},
kind: 'init',
optional,
method: false,
static: false,
proto: false,
variance: null,
loc: param.local.loc,
range: param.local.range,
parent: EMPTY_PARENT
};
}
function mapComponentParameterRestElementType(param) {
var _param$argument$typeA, _param$argument$typeA2;
if (param.argument.type !== 'Identifier' && param.argument.type !== 'ObjectPattern') {
throw (0, _createSyntaxError.createSyntaxError)(param, `Invalid ${param.argument.type} encountered in restParameter`);
}
return {
type: 'ObjectTypeSpreadProperty',
argument: (_param$argument$typeA = (_param$argument$typeA2 = param.argument.typeAnnotation) == null ? void 0 : _param$argument$typeA2.typeAnnotation) != null ? _param$argument$typeA : {
type: 'AnyTypeAnnotation',
loc: param.loc,
range: param.range,
parent: EMPTY_PARENT
},
loc: param.loc,
range: param.range,
parent: EMPTY_PARENT
};
}
function mapComponentParameter(param) {
switch (param.type) {
case 'RestElement':
{
switch (param.argument.type) {
case 'Identifier':
{
const a = nodeWith(param, {
typeAnnotation: null,
argument: nodeWith(param.argument, {
typeAnnotation: null
})
});
return [a];
}
case 'ObjectPattern':
{
return param.argument.properties.map(property => {
return nodeWith(property, {
typeAnnotation: null
});
});
}
default:
{
throw (0, _createSyntaxError.createSyntaxError)(param, `Unhandled ${param.argument.type} encountered in restParameter`);
}
}
}
case 'ComponentParameter':
{
let value;
if (param.local.type === 'AssignmentPattern') {
value = nodeWith(param.local, {
left: nodeWith(param.local.left, {
typeAnnotation: null,
optional: false
})
});
} else {
value = nodeWith(param.local, {
typeAnnotation: null,
optional: false
});
} // Shorthand params
if (param.name.type === 'Identifier' && param.shorthand && (value.type === 'Identifier' || value.type === 'AssignmentPattern')) {
return [{
type: 'Property',
key: param.name,
kind: 'init',
value,
method: false,
shorthand: true,
computed: false,
loc: param.loc,
range: param.range,
parent: EMPTY_PARENT
}];
} // Complex params
return [{
type: 'Property',
key: param.name,
kind: 'init',
value,
method: false,
shorthand: false,
computed: false,
loc: param.loc,
range: param.range,
parent: EMPTY_PARENT
}];
}
default:
{
throw (0, _createSyntaxError.createSyntaxError)(param, `Unknown Component parameter type of "${param.type}"`);
}
}
}
function createForwardRefWrapper(originalComponent) {
const internalCompId = {
type: 'Identifier',
name: `${originalComponent.id.name}_withRef`,
optional: false,
typeAnnotation: null,
loc: originalComponent.id.loc,
range: originalComponent.id.range,
parent: EMPTY_PARENT
};
return {
forwardRefStatement: {
type: 'VariableDeclaration',
kind: 'const',
declarations: [{
type: 'VariableDeclarator',
id: (0, _astNodeMutationHelpers.shallowCloneNode)(originalComponent.id),
init: {
type: 'CallExpression',
callee: {
type: 'MemberExpression',
object: {
type: 'Identifier',
name: 'React',
optional: false,
typeAnnotation: null,
loc: originalComponent.loc,
range: originalComponent.range,
parent: EMPTY_PARENT
},
property: {
type: 'Identifier',
name: 'forwardRef',
optional: false,
typeAnnotation: null,
loc: originalComponent.loc,
range: originalComponent.range,
parent: EMPTY_PARENT
},
computed: false,
optional: false,
loc: originalComponent.loc,
range: originalComponent.range,
parent: EMPTY_PARENT
},
arguments: [(0, _astNodeMutationHelpers.shallowCloneNode)(internalCompId)],
typeArguments: null,
optional: false,
loc: originalComponent.loc,
range: originalComponent.range,
parent: EMPTY_PARENT
},
loc: originalComponent.loc,
range: originalComponent.range,
parent: EMPTY_PARENT
}],
loc: originalComponent.loc,
range: originalComponent.range,
parent: originalComponent.parent
},
internalCompId: internalCompId,
forwardRefCompId: originalComponent.id
};
}
function mapComponentDeclaration(node, options) {
// Create empty loc for return type annotation nodes
const createRendersTypeLoc = () => ({
loc: {
start: node.body.loc.end,
end: node.body.loc.end
},
range: [node.body.range[1], node.body.range[1]],
parent: EMPTY_PARENT
});
const returnType = {
type: 'TypeAnnotation',
typeAnnotation: {
type: 'GenericTypeAnnotation',
id: {
type: 'QualifiedTypeIdentifier',
qualification: {
type: 'Identifier',
name: 'React',
optional: false,
typeAnnotation: null,
...createRendersTypeLoc()
},
id: {
type: 'Identifier',
name: 'Node',
optional: false,
typeAnnotation: null,
...createRendersTypeLoc()
},
...createRendersTypeLoc()
},
typeParameters: null,
...createRendersTypeLoc()
},
...createRendersTypeLoc()
};
const {
props,
ref
} = mapComponentParameters(node.params, options);
let forwardRefDetails = null;
if (ref != null) {
forwardRefDetails = createForwardRefWrapper(node);
}
const comp = {
type: 'FunctionDeclaration',
id: forwardRefDetails != null ? (0, _astNodeMutationHelpers.shallowCloneNode)(forwardRefDetails.internalCompId) : (0, _astNodeMutationHelpers.shallowCloneNode)(node.id),
__componentDeclaration: true,
typeParameters: node.typeParameters,
params: props == null ? [] : ref == null ? [props] : [props, ref],
returnType,
body: node.body,
async: false,
generator: false,
predicate: null,
loc: node.loc,
range: node.range,
parent: node.parent
};
return {
comp,
forwardRefDetails
};
}
function mapDeclareHook(node) {
return {
type: 'DeclareFunction',
id: {
type: 'Identifier',
name: node.id.name,
optional: node.id.optional,
typeAnnotation: {
type: 'TypeAnnotation',
typeAnnotation: {
type: 'FunctionTypeAnnotation',
this: null,
params: node.id.typeAnnotation.typeAnnotation.params,
typeParameters: node.id.typeAnnotation.typeAnnotation.typeParameters,
rest: node.id.typeAnnotation.typeAnnotation.rest,
returnType: node.id.typeAnnotation.typeAnnotation.returnType,
loc: node.id.typeAnnotation.typeAnnotation.loc,
range: node.id.typeAnnotation.typeAnnotation.range,
parent: node.id.typeAnnotation.typeAnnotation.parent
},
loc: node.id.typeAnnotation.loc,
range: node.id.typeAnnotation.range,
parent: node.id.typeAnnotation.parent
},
loc: node.id.loc,
range: node.id.range,
parent: node.id.parent
},
loc: node.loc,
range: node.range,
parent: node.parent,
predicate: null
};
}
function mapHookDeclaration(node) {
const comp = {
type: 'FunctionDeclaration',
id: node.id && (0, _astNodeMutationHelpers.shallowCloneNode)(node.id),
__hookDeclaration: true,
typeParameters: node.typeParameters,
params: node.params,
returnType: node.returnType,
body: node.body,
async: false,
generator: false,
predicate: null,
loc: node.loc,
range: node.range,
parent: node.parent
};
return comp;
}
/**
* Scan a list of statements and return the position of the
* first statement that contains a reference to a given component
* or null of no references were found.
*/
function scanForFirstComponentReference(compName, bodyList) {
for (let i = 0; i < bodyList.length; i++) {
const bodyNode = bodyList[i];
let referencePos = null;
_SimpleTraverser.SimpleTraverser.traverse(bodyNode, {
enter(node) {
switch (node.type) {
case 'Identifier':
{
if (node.name === compName) {
// We found a reference, record it and stop.
referencePos = i;
throw _SimpleTraverser.SimpleTraverser.Break;
}
}
}
},
leave(_node) {}
});
if (referencePos != null) {
return referencePos;
}
}
return null;
}
function mapComponentDeclarationIntoList(node, newBody, options, insertExport) {
const {
comp,
forwardRefDetails
} = mapComponentDeclaration(node, options);
if (forwardRefDetails != null) {
// Scan for references to our component.
const referencePos = scanForFirstComponentReference(forwardRefDetails.forwardRefCompId.name, newBody); // If a reference is found insert the forwardRef statement before it (to simulate function hoisting).
if (referencePos != null) {
newBody.splice(referencePos, 0, forwardRefDetails.forwardRefStatement);
} else {
newBody.push(forwardRefDetails.forwardRefStatement);
}
newBody.push(comp);
if (insertExport != null) {
newBody.push(insertExport(forwardRefDetails.forwardRefCompId));
}
return;
}
newBody.push(insertExport != null ? insertExport(comp) : comp);
}
function mapStatementList(stmts, options) {
const newBody = [];
for (const node of stmts) {
switch (node.type) {
case 'ComponentDeclaration':
{
mapComponentDeclarationIntoList(node, newBody, options);
break;
}
case 'HookDeclaration':
{
const decl = mapHookDeclaration(node);
newBody.push(decl);
break;
}
case 'ExportNamedDeclaration':
{
var _node$declaration, _node$declaration2;
if (((_node$declaration = node.declaration) == null ? void 0 : _node$declaration.type) === 'ComponentDeclaration') {
mapComponentDeclarationIntoList(node.declaration, newBody, options, componentOrRef => {
switch (componentOrRef.type) {
case 'FunctionDeclaration':
{
// No ref, so we can export the component directly.
return nodeWith(node, {
declaration: componentOrRef
});
}
case 'Identifier':
{
// If a ref is inserted, we should just export that id.
return {
type: 'ExportNamedDeclaration',
declaration: null,
specifiers: [{
type: 'ExportSpecifier',
exported: (0, _astNodeMutationHelpers.shallowCloneNode)(componentOrRef),
local: (0, _astNodeMutationHelpers.shallowCloneNode)(componentOrRef),
loc: node.loc,
range: node.range,
parent: EMPTY_PARENT
}],
exportKind: 'value',
source: null,
loc: node.loc,
range: node.range,
parent: node.parent
};
}
}
});
break;
}
if (((_node$declaration2 = node.declaration) == null ? void 0 : _node$declaration2.type) === 'HookDeclaration') {
const comp = mapHookDeclaration(node.declaration);
newBody.push(nodeWith(node, {
declaration: comp
}));
break;
}
newBody.push(node);
break;
}
case 'ExportDefaultDeclaration':
{
var _node$declaration3, _node$declaration4;
if (((_node$declaration3 = node.declaration) == null ? void 0 : _node$declaration3.type) === 'ComponentDeclaration') {
mapComponentDeclarationIntoList(node.declaration, newBody, options, componentOrRef => nodeWith(node, {
declaration: componentOrRef
}));
break;
}
if (((_node$declaration4 = node.declaration) == null ? void 0 : _node$declaration4.type) === 'HookDeclaration') {
const comp = mapHookDeclaration(node.declaration);
newBody.push(nodeWith(node, {
declaration: comp
}));
break;
}
newBody.push(node);
break;
}
default:
{
newBody.push(node);
}
}
}
return newBody;
}
function transformProgram(program, options) {
return _SimpleTransform.SimpleTransform.transformProgram(program, {
transform(node) {
switch (node.type) {
case 'DeclareComponent':
{
return mapDeclareComponent(node);
}
case 'DeclareHook':
{
return mapDeclareHook(node);
}
case 'Program':
case 'BlockStatement':
{
return nodeWith(node, {
body: mapStatementList(node.body, options)
});
}
case 'SwitchCase':
{
const consequent = mapStatementList(node.consequent, options);
return nodeWith(node, {
/* $FlowExpectedError[incompatible-call] We know `mapStatementList` will
not return `ModuleDeclaration` nodes if it is not passed any */
consequent
});
}
case 'ComponentDeclaration':
{
var _node$parent;
throw (0, _createSyntaxError.createSyntaxError)(node, `Components must be defined at the top level of a module or within a ` + `BlockStatement, instead got parent of "${(_node$parent = node.parent) == null ? void 0 : _node$parent.type}".`);
}
case 'HookDeclaration':
{
var _node$parent2;
throw (0, _createSyntaxError.createSyntaxError)(node, `Hooks must be defined at the top level of a module or within a ` + `BlockStatement, instead got parent of "${(_node$parent2 = node.parent) == null ? void 0 : _node$parent2.type}".`);
}
default:
{
return node;
}
}
}
});
}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;AAE9B,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9B,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AAExB,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAEhC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,cAAc,OAAO,CAAC"}
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MoveDiagonal = createLucideIcon("MoveDiagonal", [
["path", { d: "M11 19H5v-6", key: "8awifj" }],
["path", { d: "M13 5h6v6", key: "7voy1q" }],
["path", { d: "M19 5 5 19", key: "wwaj1z" }]
]);
export { MoveDiagonal as default };
//# sourceMappingURL=move-diagonal.js.map