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,46 @@
'use strict';
var test = require('tape');
var stringify = require('../');
test('simple object', function (t) {
t.plan(1);
var obj = { c: 6, b: [4,5], a: 3, z: null };
t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}');
});
test('object with undefined', function (t) {
t.plan(1);
var obj = { a: 3, z: undefined };
t.equal(stringify(obj), '{"a":3}');
});
test('object with null', function (t) {
t.plan(1);
var obj = { a: 3, z: null };
t.equal(stringify(obj), '{"a":3,"z":null}');
});
test('object with NaN and Infinity', function (t) {
t.plan(1);
var obj = { a: 3, b: NaN, c: Infinity };
t.equal(stringify(obj), '{"a":3,"b":null,"c":null}');
});
test('array with undefined', function (t) {
t.plan(1);
var obj = [4, undefined, 6];
t.equal(stringify(obj), '[4,null,6]');
});
test('object with empty string', function (t) {
t.plan(1);
var obj = { a: 3, z: '' };
t.equal(stringify(obj), '{"a":3,"z":""}');
});
test('array with empty string', function (t) {
t.plan(1);
var obj = [4, '', 6];
t.equal(stringify(obj), '[4,"",6]');
});
@@ -0,0 +1,131 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "کاراکتر", verb: "داشته باشد" },
file: { unit: "بایت", verb: "داشته باشد" },
array: { unit: "آیتم", verb: "داشته باشد" },
set: { unit: "آیتم", verb: "داشته باشد" },
map: { unit: "آیتم", verb: "داشته باشد" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const FormatDictionary: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "ورودی",
email: "آدرس ایمیل",
url: "URL",
emoji: "ایموجی",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "تاریخ و زمان ایزو",
date: "تاریخ ایزو",
time: "زمان ایزو",
duration: "مدت زمان ایزو",
ipv4: "IPv4 آدرس",
ipv6: "IPv6 آدرس",
mac: "MAC آدرس",
cidrv4: "IPv4 دامنه",
cidrv6: "IPv6 دامنه",
base64: "base64-encoded رشته",
base64url: "base64url-encoded رشته",
json_string: "JSON رشته",
e164: "E.164 عدد",
credit_card: "شماره کارت اعتباری",
currency_code: "کد ارز",
iban: "IBAN",
jwt: "JWT",
template_literal: "ورودی",
};
const TypeDictionary: {
[k in errors.$ZodInvalidTypeExpected | (string & {})]?: string;
} = {
nan: "NaN",
number: "عدد",
array: "آرایه",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `ورودی نامعتبر: می‌بایست instanceof ${issue.expected} می‌بود، ${received} دریافت شد`;
}
return `ورودی نامعتبر: می‌بایست ${expected} می‌بود، ${received} دریافت شد`;
}
case "invalid_value":
if (issue.values.length === 1) {
return `ورودی نامعتبر: می‌بایست ${util.stringifyPrimitive(issue.values[0])} می‌بود`;
}
return `گزینه نامعتبر: می‌بایست یکی از ${util.joinValues(issue.values, "|")} می‌بود`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing) {
return `خیلی بزرگ: ${issue.origin ?? "مقدار"} باید ${adj}${issue.maximum.toString()} ${sizing.unit ?? "عنصر"} باشد`;
}
return `خیلی بزرگ: ${issue.origin ?? "مقدار"} باید ${adj}${issue.maximum.toString()} باشد`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `خیلی کوچک: ${issue.origin} باید ${adj}${issue.minimum.toString()} ${sizing.unit} باشد`;
}
return `خیلی کوچک: ${issue.origin} باید ${adj}${issue.minimum.toString()} باشد`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") {
return `رشته نامعتبر: باید با "${_issue.prefix}" شروع شود`;
}
if (_issue.format === "ends_with") {
return `رشته نامعتبر: باید با "${_issue.suffix}" تمام شود`;
}
if (_issue.format === "includes") {
return `رشته نامعتبر: باید شامل "${_issue.includes}" باشد`;
}
if (_issue.format === "regex") {
return `رشته نامعتبر: باید با الگوی ${_issue.pattern} مطابقت داشته باشد`;
}
return `${FormatDictionary[_issue.format] ?? issue.format} نامعتبر`;
}
case "not_multiple_of":
return `عدد نامعتبر: باید مضرب ${issue.divisor} باشد`;
case "unrecognized_keys":
return `کلید${issue.keys.length > 1 ? "های" : ""} ناشناس: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `کلید ناشناس در ${issue.origin}`;
case "invalid_union":
return `ورودی نامعتبر`;
case "invalid_element":
return `مقدار نامعتبر در ${issue.origin}`;
default:
return `ورودی نامعتبر`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1 @@
{"version":3,"file":"VisualElementDragControls.mjs","sources":["../../../../src/gestures/drag/VisualElementDragControls.ts"],"sourcesContent":["import {\n addValueToWillChange,\n animateMotionValue,\n calcLength,\n convertBoundingBoxToBox,\n convertBoxToBoundingBox,\n createBox,\n eachAxis,\n frame,\n isElementTextInput,\n measurePageBox,\n mixNumber,\n PanInfo,\n percent,\n ResolvedConstraints,\n resize,\n setDragLock,\n Transition,\n type VisualElement,\n} from \"motion-dom\"\nimport { Axis, Point, invariant } from \"motion-utils\"\nimport { addDomEvent, type LayoutUpdateData } from \"motion-dom\"\nimport { addPointerEvent } from \"../../events/add-pointer-event\"\nimport { extractEventInfo } from \"../../events/event-info\"\nimport { MotionProps } from \"../../motion/types\"\nimport { getContextWindow } from \"../../utils/get-context-window\"\nimport { isRefObject } from \"../../utils/is-ref-object\"\nimport { PanSession } from \"../pan/PanSession\"\nimport {\n applyConstraints,\n calcOrigin,\n calcRelativeConstraints,\n calcViewportConstraints,\n defaultElastic,\n rebaseAxisConstraints,\n resolveDragElastic,\n} from \"./utils/constraints\"\n\nexport const elementDragControls = new WeakMap<\n VisualElement,\n VisualElementDragControls\n>()\n\nexport interface DragControlOptions {\n /**\n * This distance after which dragging starts and a direction is locked in.\n *\n * @public\n */\n distanceThreshold?: number\n\n /**\n * Whether to immediately snap to the cursor when dragging starts.\n *\n * @public\n */\n snapToCursor?: boolean\n}\n\ntype DragDirection = \"x\" | \"y\"\n\nexport class VisualElementDragControls {\n private visualElement: VisualElement<HTMLElement>\n\n private panSession?: PanSession\n\n private openDragLock: VoidFunction | null = null\n\n isDragging = false\n private currentDirection: DragDirection | null = null\n\n private originPoint: Point = { x: 0, y: 0 }\n\n /**\n * The permitted boundaries of travel, in pixels.\n */\n private constraints: ResolvedConstraints | false = false\n\n private hasMutatedConstraints = false\n\n /**\n * The per-axis resolved elastic values.\n */\n private elastic = createBox()\n\n /**\n * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n private latestPointerEvent: PointerEvent | null = null\n\n /**\n * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n private latestPanInfo: PanInfo | null = null\n\n constructor(visualElement: VisualElement<HTMLElement>) {\n this.visualElement = visualElement\n }\n\n start(\n originEvent: PointerEvent,\n { snapToCursor = false, distanceThreshold }: DragControlOptions = {}\n ) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement\n if (presenceContext && presenceContext.isPresent === false) return\n\n const onSessionStart = (event: PointerEvent) => {\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point)\n }\n this.stopAnimation()\n }\n\n const onStart = (event: PointerEvent, info: PanInfo) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps()\n\n if (drag && !dragPropagation) {\n if (this.openDragLock) this.openDragLock()\n\n this.openDragLock = setDragLock(drag)\n\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock) return\n }\n\n this.latestPointerEvent = event\n this.latestPanInfo = info\n this.isDragging = true\n\n this.currentDirection = null\n\n this.resolveConstraints()\n\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true\n this.visualElement.projection.target = undefined\n }\n\n /**\n * Record gesture origin and pointer offset\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0\n\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement\n\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis]\n\n if (measuredAxis) {\n Line truncated
@@ -0,0 +1,20 @@
import { MotionValue, transformProps, acceleratedValues } from 'motion-dom';
class WillChangeMotionValue extends MotionValue {
constructor() {
super(...arguments);
this.isEnabled = false;
}
add(name) {
if (transformProps.has(name) || acceleratedValues.has(name)) {
this.isEnabled = true;
this.update();
}
}
update() {
this.set(this.isEnabled ? "transform" : "auto");
}
}
export { WillChangeMotionValue };
//# sourceMappingURL=WillChangeMotionValue.mjs.map
@@ -0,0 +1,243 @@
import { invalidKeyInput } from './invalid_key_input.js';
import { encodeBase64, decodeBase64 } from '../lib/base64.js';
import { JOSENotSupported } from '../util/errors.js';
import { isCryptoKey, isKeyObject } from './is_key_like.js';
const formatPEM = (b64, descriptor) => {
const newlined = (b64.match(/.{1,64}/g) || []).join('\n');
return `-----BEGIN ${descriptor}-----\n${newlined}\n-----END ${descriptor}-----`;
};
const genericExport = async (keyType, keyFormat, key) => {
if (isKeyObject(key)) {
if (key.type !== keyType) {
throw new TypeError(`key is not a ${keyType} key`);
}
return key.export({ format: 'pem', type: keyFormat });
}
if (!isCryptoKey(key)) {
throw new TypeError(invalidKeyInput(key, 'CryptoKey', 'KeyObject'));
}
if (!key.extractable) {
throw new TypeError('CryptoKey is not extractable');
}
if (key.type !== keyType) {
throw new TypeError(`key is not a ${keyType} key`);
}
return formatPEM(encodeBase64(new Uint8Array(await crypto.subtle.exportKey(keyFormat, key))), `${keyType.toUpperCase()} KEY`);
};
export const toSPKI = (key) => genericExport('public', 'spki', key);
export const toPKCS8 = (key) => genericExport('private', 'pkcs8', key);
const bytesEqual = (a, b) => {
if (a.byteLength !== b.length)
return false;
for (let i = 0; i < a.byteLength; i++) {
if (a[i] !== b[i])
return false;
}
return true;
};
const createASN1State = (data) => ({ data, pos: 0 });
const parseLength = (state) => {
const first = state.data[state.pos++];
if (first & 0x80) {
const lengthOfLen = first & 0x7f;
let length = 0;
for (let i = 0; i < lengthOfLen; i++) {
length = (length << 8) | state.data[state.pos++];
}
return length;
}
return first;
};
const skipElement = (state, count = 1) => {
if (count <= 0)
return;
state.pos++;
const length = parseLength(state);
state.pos += length;
if (count > 1) {
skipElement(state, count - 1);
}
};
const expectTag = (state, expectedTag, errorMessage) => {
if (state.data[state.pos++] !== expectedTag) {
throw new Error(errorMessage);
}
};
const getSubarray = (state, length) => {
const result = state.data.subarray(state.pos, state.pos + length);
state.pos += length;
return result;
};
const parseAlgorithmOID = (state) => {
expectTag(state, 0x06, 'Expected algorithm OID');
const oidLen = parseLength(state);
return getSubarray(state, oidLen);
};
function parsePKCS8Header(state) {
expectTag(state, 0x30, 'Invalid PKCS#8 structure');
parseLength(state);
expectTag(state, 0x02, 'Expected version field');
const verLen = parseLength(state);
state.pos += verLen;
expectTag(state, 0x30, 'Expected algorithm identifier');
const algIdLen = parseLength(state);
const algIdStart = state.pos;
return { algIdStart, algIdLength: algIdLen };
}
function parseSPKIHeader(state) {
expectTag(state, 0x30, 'Invalid SPKI structure');
parseLength(state);
expectTag(state, 0x30, 'Expected algorithm identifier');
const algIdLen = parseLength(state);
const algIdStart = state.pos;
return { algIdStart, algIdLength: algIdLen };
}
const parseECAlgorithmIdentifier = (state) => {
const algOid = parseAlgorithmOID(state);
if (bytesEqual(algOid, [0x2b, 0x65, 0x6e])) {
return 'X25519';
}
if (!bytesEqual(algOid, [0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01])) {
throw new Error('Unsupported key algorithm');
}
expectTag(state, 0x06, 'Expected curve OID');
const curveOidLen = parseLength(state);
const curveOid = getSubarray(state, curveOidLen);
for (const { name, oid } of [
{ name: 'P-256', oid: [0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07] },
{ name: 'P-384', oid: [0x2b, 0x81, 0x04, 0x00, 0x22] },
{ name: 'P-521', oid: [0x2b, 0x81, 0x04, 0x00, 0x23] },
]) {
if (bytesEqual(curveOid, oid)) {
return name;
}
}
throw new Error('Unsupported named curve');
};
const genericImport = async (keyFormat, keyData, alg, options) => {
let algorithm;
let keyUsages;
const isPublic = keyFormat === 'spki';
const getSigUsages = () => (isPublic ? ['verify'] : ['sign']);
const getEncUsages = () => isPublic ? ['encrypt', 'wrapKey'] : ['decrypt', 'unwrapKey'];
switch (alg) {
case 'PS256':
case 'PS384':
case 'PS512':
algorithm = { name: 'RSA-PSS', hash: `SHA-${alg.slice(-3)}` };
keyUsages = getSigUsages();
break;
case 'RS256':
case 'RS384':
case 'RS512':
algorithm = { name: 'RSASSA-PKCS1-v1_5', hash: `SHA-${alg.slice(-3)}` };
keyUsages = getSigUsages();
break;
case 'RSA-OAEP':
case 'RSA-OAEP-256':
case 'RSA-OAEP-384':
case 'RSA-OAEP-512':
algorithm = {
name: 'RSA-OAEP',
hash: `SHA-${parseInt(alg.slice(-3), 10) || 1}`,
};
keyUsages = getEncUsages();
break;
case 'ES256':
case 'ES384':
case 'ES512': {
const curveMap = { ES256: 'P-256', ES384: 'P-384', ES512: 'P-521' };
algorithm = { name: 'ECDSA', namedCurve: curveMap[alg] };
keyUsages = getSigUsages();
break;
}
case 'ECDH-ES':
case 'ECDH-ES+A128KW':
case 'ECDH-ES+A192KW':
case 'ECDH-ES+A256KW': {
try {
const namedCurve = options.getNamedCurve(keyData);
algorithm = namedCurve === 'X25519' ? { name: 'X25519' } : { name: 'ECDH', namedCurve };
}
catch (cause) {
throw new JOSENotSupported('Invalid or unsupported key format');
}
keyUsages = isPublic ? [] : ['deriveBits'];
break;
}
case 'Ed25519':
case 'EdDSA':
algorithm = { name: 'Ed25519' };
keyUsages = getSigUsages();
break;
case 'ML-DSA-44':
case 'ML-DSA-65':
case 'ML-DSA-87':
algorithm = { name: alg };
keyUsages = getSigUsages();
break;
default:
throw new JOSENotSupported('Invalid or unsupported "alg" (Algorithm) value');
}
return crypto.subtle.importKey(keyFormat, keyData, algorithm, options?.extractable ?? (isPublic ? true : false), keyUsages);
};
const processPEMData = (pem, pattern) => {
return decodeBase64(pem.replace(pattern, ''));
};
export const fromPKCS8 = (pem, alg, options) => {
const keyData = processPEMData(pem, /(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g);
let opts = options;
if (alg?.startsWith?.('ECDH-ES')) {
opts ||= {};
opts.getNamedCurve = (keyData) => {
const state = createASN1State(keyData);
parsePKCS8Header(state);
return parseECAlgorithmIdentifier(state);
};
}
return genericImport('pkcs8', keyData, alg, opts);
};
export const fromSPKI = (pem, alg, options) => {
const keyData = processPEMData(pem, /(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g);
let opts = options;
if (alg?.startsWith?.('ECDH-ES')) {
opts ||= {};
opts.getNamedCurve = (keyData) => {
const state = createASN1State(keyData);
parseSPKIHeader(state);
return parseECAlgorithmIdentifier(state);
};
}
return genericImport('spki', keyData, alg, opts);
};
function spkiFromX509(buf) {
const state = createASN1State(buf);
expectTag(state, 0x30, 'Invalid certificate structure');
parseLength(state);
expectTag(state, 0x30, 'Invalid tbsCertificate structure');
parseLength(state);
if (buf[state.pos] === 0xa0) {
skipElement(state, 6);
}
else {
skipElement(state, 5);
}
const spkiStart = state.pos;
expectTag(state, 0x30, 'Invalid SPKI structure');
const spkiContentLen = parseLength(state);
return buf.subarray(spkiStart, spkiStart + spkiContentLen + (state.pos - spkiStart));
}
function extractX509SPKI(x509) {
const derBytes = processPEMData(x509, /(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g);
return spkiFromX509(derBytes);
}
export const fromX509 = (pem, alg, options) => {
let spki;
try {
spki = extractX509SPKI(pem);
}
catch (cause) {
throw new TypeError('Failed to parse the X.509 certificate', { cause });
}
return fromSPKI(formatPEM(encodeBase64(spki), 'PUBLIC KEY'), alg, options);
};
@@ -0,0 +1,425 @@
export default `flf2a? 4 3 9 0 12 0 64 0
Name : Heart Left
Author : LG Beard
Date : 2004/1/15 15:41:27
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.

.-.-. 
'._.' 

.-.-. 
( ! .' 
\`.( 

.-.-. 
( " .' 
'.( 

.-.-. 
( # .' 
'.( 

.-.-. 
( $ .' 
'.( 

.-.-. 
( % .' 
'.( 

.-.-. 
( & .' 
'.( 

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

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

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

.-.-. 
( * .' 
'.( 

.-.-. 
( + .' 
'.( 

.-.-. 
( , .' 
'.( 

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

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

.-.-. 
( / .' 
'.( 

.-.-. 
( 0 .' 
\`.( 

.-.-. 
( 1 .' 
\`.( 

.-.-. 
( 2 .' 
\`.( 

.-.-. 
( 3 .' 
\`.( 

.-.-. 
( 4 .' 
\`.( 

.-.-. 
( 5 .' 
\`.( 

.-.-. 
( 6 .' 
\`.( 

.-.-. 
( 7 .' 
\`.( 

.-.-. 
( 8 .' 
\`.( 

.-.-. 
( 9 .' 
\`.( 

.-.-. 
( : .' 
'.( 

.-.-. 
( ; .' 
'.( 

.-.-. 
( < .' 
'.( 

.-.-. 
( = .' 
'.( 

.-.-. 
( > .' 
'.( 

.-.-. 
( ? .' 
\`.( 

.-.-. 
( @ .' 
\`.( 

.-.-. 
( A .' 
\`.( 

.-.-. 
( B .' 
\`.( 

.-.-. 
( C .' 
\`.( 

.-.-. 
( D .' 
\`.( 

.-.-. 
( E .' 
\`.( 

.-.-. 
( F .' 
\`.( 

.-.-. 
( G .' 
\`.( 

.-.-. 
( H .' 
\`.( 

.-.-. 
( I .' 
\`.( 

.-.-. 
( J .' 
\`.( 

.-.-. 
( K .' 
\`.( 

.-.-. 
( L .' 
\`.( 

.-.-. 
( M .' 
\`.( 

.-.-. 
( N .' 
\`.( 

.-.-. 
( O .' 
\`.( 

.-.-. 
( P .' 
\`.( 

.-.-. 
( Q .' 
\`.( 

.-.-. 
( R .' 
\`.( 

.-.-. 
( S .' 
\`.( 

.-.-. 
( T .' 
\`.( 

.-.-. 
( U .' 
\`.( 

.-.-. 
( V .' 
\`.( 

.-.-. 
( W .' 
\`.( 

.-.-. 
( X .' 
\`.( 

.-.-. 
( Y .' 
\`.( 

.-.-. 
( Z .' 
\`.( 

.-.-. 
( [ .' 
'.( 

.-.-. 
( \\ .' 
'.( 

.-.-. 
( ] .' 
'.( 

.-.-. 
( ^ .' 
'.( 

.-.-. 
( _ .' 
'.( 

.-.-. 
( \` .' 
'.( 

.-.-. 
( a .' 
\`.( 

.-.-. 
( b .' 
\`.( 

.-.-. 
( c .' 
\`.( 

.-.-. 
( d .' 
\`.( 

.-.-. 
( e .' 
\`.( 

.-.-. 
( f .' 
\`.( 

.-.-. 
( g .' 
\`.( 

.-.-. 
( h .' 
\`.( 

.-.-. 
( i .' 
\`.( 

.-.-. 
( j .' 
\`.( 

.-.-. 
( k .' 
\`.( 

.-.-. 
( l .' 
\`.( 

.-.-. 
( m .' 
\`.( 

.-.-. 
( n .' 
\`.( 

.-.-. 
( o .' 
\`.( 

.-.-. 
( p .' 
\`.( 

.-.-. 
( q .' 
\`.( 

.-.-. 
( r .' 
\`.( 

.-.-. 
( s .' 
\`.( 

.-.-. 
( t .' 
\`.( 

.-.-. 
( u .' 
\`.( 

.-.-. 
( v .' 
\`.( 

.-.-. 
( w .' 
\`.( 

.-.-. 
( x .' 
\`.( 

.-.-. 
( y .' 
\`.( 

.-.-. 
( z .' 
\`.( 

.-.-. 
( { .' 
'.( 

.-.-. 
( | .' 
'.( 

.-.-. 
( } .' 
'.( 

.-.-. 
( ~ .' 
'.( 

.-.-. 
( A .' 
\`.( 

.-.-. 
( O .' 
\`.( 

.-.-. 
( U .' 
\`.( 

.-.-. 
( a .' 
\`.( 

.-.-. 
( o .' 
\`.( 

.-.-. 
( u .' 
\`.( 


.-.-. 
'._.' 

`
@@ -0,0 +1,936 @@
export default `flf2a$ 9 8 14 0 16 0 16255 0
Author : Ralph Bluecoat
Date : 2005/8/2
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.
---
Font modified June 17, 2007 by patorjk
This was to widen the space character and fix letter spacing.
$ $$#
$ $$#
$ $$#
$ $$#
$ $$#
$ $$#
$ $$#
$ $$#
$ $$##
!$#
$#
$#
$#
$#
$#
$#
$#
$##
"$#
$#
$#
$#
$#
$#
$#
$#
$##
$##
$#
$#
$#
$#
$#
$#
$#
$##
$$#
$#
$#
$#
$#
$#
$#
$#
$##
%$#
$#
$#
$#
$#
$#
$#
$#
$##
&$#
$#
$#
$#
$#
$#
$#
$#
$##
'$#
$#
$#
$#
$#
$#
$#
$#
$##
($#
$#
$#
$#
$#
$#
$#
$#
$##
)$#
$#
$#
$#
$#
$#
$#
$#
$##
*$#
$#
$#
$#
$#
$#
$#
$#
$##
+$#
$#
$#
$#
$#
$#
$#
$#
$##
,$#
$#
$#
$#
$#
$#
$#
$#
$##
-$#
$#
$#
$#
$#
$#
$#
$#
$##
.$#
$#
$#
$#
$#
$#
$#
$#
$##
/$#
$#
$#
$#
$#
$#
$#
$#
$##
0$#
$#
$#
$#
$#
$#
$#
$#
$##
1$#
$#
$#
$#
$#
$#
$#
$#
$##
2$#
$#
$#
$#
$#
$#
$#
$#
$##
3$#
$#
$#
$#
$#
$#
$#
$#
$##
4$#
$#
$#
$#
$#
$#
$#
$#
$##
5$#
$#
$#
$#
$#
$#
$#
$#
$##
6$#
$#
$#
$#
$#
$#
$#
$#
$##
7$#
$#
$#
$#
$#
$#
$#
$#
$##
8$#
$#
$#
$#
$#
$#
$#
$#
$##
9$#
$#
$#
$#
$#
$#
$#
$#
$##
:$#
$#
$#
$#
$#
$#
$#
$#
$##
;$#
$#
$#
$#
$#
$#
$#
$#
$##
<$#
$#
$#
$#
$#
$#
$#
$#
$##
=$#
$#
$#
$#
$#
$#
$#
$#
$##
>$#
$#
$#
$#
$#
$#
$#
$#
$##
?$#
$#
$#
$#
$#
$#
$#
$#
$##
@$#
$#
$#
$#
$#
$#
$#
$#
$##
------ $#
******** $#
---------- $#
**** ****$#
------------$#
************$#
---- ----$#
**** ****$#
$##
----------- $#
*********** $#
---- -$#
*********** $#
----------- $#
**** *$#
----------- $#
*********** $#
$##
------------$#
************$#
--- $#
*** $#
--- $#
*** $#
------------$#
************$#
$##
---------- $#
************$#
-- --$#
** **$#
-- --$#
** **$#
------------$#
********** $#
$##
------------$#
************$#
---- $#
************$#
------------$#
**** $#
------------$#
************$#
$##
------------$#
************$#
---- $#
************$#
------------$#
**** $#
---- $#
**** $#
$##
------------$#
************$#
---- $#
**** ******$#
---- ------$#
**** ****$#
------------$#
************$#
$##
---- ----$#
**** ****$#
---- ----$#
************$#
------------$#
**** ****$#
---- ----$#
**** ****$#
$##
-------- $#
******** $#
---- $#
**** $#
---- $#
**** $#
-------- $#
******** $#
$##
-------- $#
******** $#
--- $#
*** $#
--- $#
*** ** $#
-------- $#
******** $#
$##
---- ----$#
**** **** $#
---- ---- $#
********* $#
--------- $#
**** **** $#
---- ---- $#
**** ****$#
$##
---- $#
**** $#
---- $#
**** $#
---- $#
************$#
------------$#
************$#
$##
******** $#
---------- $#
************$#
--- -- ---$#
*** ** ***$#
--- -- ---$#
*** ** ***$#
--- ---$#
$##
---- ----$#
***** ****$#
------ ----$#
************$#
------------$#
**** ******$#
---- -----$#
**** ****$#
$##
-------- $#
********** $#
---- ----$#
*** ***$#
--- ---$#
**** ****$#
---------- $#
******** $#
$##
----------- $#
************$#
--- ---$#
************$#
----------- $#
**** $#
---- $#
**** $#
$##
-------- $#
********** $#
---- ----$#
*** ***$#
--- -- --$#
**** ** **$#
------ -- -$#
******* **$#
$##
----------- $#
*********** $#
---- --- $#
********* $#
--------- $#
**** **** $#
---- ---- $#
**** ****$#
$##
------------$#
************$#
---- $#
************$#
------------$#
*****$#
------------$#
************$#
$##
------------$#
************$#
------------$#
**** $#
---- $#
**** $#
---- $#
**** $#
$##
---- ----$#
**** ****$#
---- ----$#
**** ****$#
---- ----$#
************$#
------------$#
************$#
$##
--- --- $#
*** *** $#
--- --- $#
*** *** $#
--- --- $#
******** $#
------ $#
**** $#
$##
--- ---$#
*** ** ***$#
--- -- ---$#
*** ** ***$#
--- -- ---$#
************$#
---------- $#
******** $#
$##
--- ---$#
*** *** $#
--- --- $#
****** $#
------ $#
*** *** $#
--- --- $#
*** ***$#
$##
--- ---$#
*** *** $#
--- --- $#
****** $#
---- $#
**** $#
---- $#
**** $#
$##
------------$#
************$#
----$#
************$#
------------$#
**** $#
------------$#
************$#
$##
[$#
$#
$#
$#
$#
$#
$#
$#
$##
\\$#
$#
$#
$#
$#
$#
$#
$#
$##
]$#
$#
$#
$#
$#
$#
$#
$#
$##
^$#
$#
$#
$#
$#
$#
$#
$#
$##
_$#
$#
$#
$#
$#
$#
$#
$#
$##
\`$#
$#
$#
$#
$#
$#
$#
$#
$##
------ $#
******** $#
---------- $#
**** ****$#
------------$#
************$#
---- ----$#
**** ****$#
$##
----------- $#
*********** $#
---- -$#
*********** $#
----------- $#
**** *$#
----------- $#
*********** $#
$##
------------$#
************$#
--- $#
*** $#
--- $#
*** $#
------------$#
************$#
$##
---------- $#
************$#
-- --$#
** **$#
-- --$#
** **$#
------------$#
********** $#
$##
------------$#
************$#
---- $#
************$#
------------$#
**** $#
------------$#
************$#
$##
------------$#
************$#
---- $#
************$#
------------$#
**** $#
---- $#
**** $#
$##
------------$#
************$#
---- $#
**** ******$#
---- ------$#
**** ****$#
------------$#
************$#
$##
---- ----$#
**** ****$#
---- ----$#
************$#
------------$#
**** ****$#
---- ----$#
**** ****$#
$##
-------- $#
******** $#
---- $#
**** $#
---- $#
**** $#
-------- $#
******** $#
$##
-------- $#
******** $#
--- $#
*** $#
--- $#
*** ** $#
-------- $#
******** $#
$##
---- ----$#
**** **** $#
---- ---- $#
********* $#
--------- $#
**** **** $#
---- ---- $#
**** ****$#
$##
---- $#
**** $#
---- $#
**** $#
---- $#
************$#
------------$#
************$#
$##
******** $#
---------- $#
************$#
--- -- ---$#
*** ** ***$#
--- -- ---$#
*** ** ***$#
--- ---$#
$##
---- ----$#
***** ****$#
------ ----$#
************$#
------------$#
**** ******$#
---- -----$#
**** ****$#
$##
-------- $#
********** $#
---- ----$#
*** ***$#
--- ---$#
**** ****$#
---------- $#
******** $#
$##
----------- $#
************$#
--- ---$#
************$#
----------- $#
**** $#
---- $#
**** $#
$##
-------- $#
********** $#
---- ----$#
*** ***$#
--- -- --$#
**** ** **$#
------ -- -$#
******* **$#
$##
----------- $#
*********** $#
---- --- $#
********* $#
--------- $#
**** **** $#
---- ---- $#
**** ****$#
$##
------------$#
************$#
---- $#
************$#
------------$#
*****$#
------------$#
************$#
$##
------------$#
************$#
------------$#
**** $#
---- $#
**** $#
---- $#
**** $#
$##
---- ----$#
**** ****$#
---- ----$#
**** ****$#
---- ----$#
************$#
------------$#
************$#
$##
--- --- $#
*** *** $#
--- --- $#
*** *** $#
--- --- $#
******** $#
------ $#
**** $#
$##
--- ---$#
*** ** ***$#
--- -- ---$#
*** ** ***$#
--- -- ---$#
************$#
---------- $#
******** $#
$##
--- ---$#
*** *** $#
--- --- $#
****** $#
------ $#
*** *** $#
--- --- $#
*** ***$#
$##
--- ---$#
*** *** $#
--- --- $#
****** $#
---- $#
**** $#
---- $#
**** $#
$##
------------$#
************$#
----$#
************$#
------------$#
**** $#
------------$#
************$#
$##
{$#
$#
$#
$#
$#
$#
$#
$#
$##
|$#
$#
$#
$#
$#
$#
$#
$#
$##
}$#
$#
$#
$#
$#
$#
$#
$#
$##
~$#
$#
$#
$#
$#
$#
$#
$#
$##
------ $#
******** $#
---------- $#
**** ****$#
------------$#
************$#
---- ----$#
**** ****$#
$##
-------- $#
********** $#
---- ----$#
*** ***$#
--- ---$#
**** ****$#
---------- $#
******** $#
$##
---- ----$#
**** ****$#
---- ----$#
**** ****$#
---- ----$#
************$#
------------$#
************$#
$##
------ $#
******** $#
---------- $#
**** ****$#
------------$#
************$#
---- ----$#
**** ****$#
$##
-------- $#
********** $#
---- ----$#
*** ***$#
--- ---$#
**** ****$#
---------- $#
******** $#
$##
---- ----$#
**** ****$#
---- ----$#
**** ****$#
---- ----$#
************$#
------------$#
************$#
$##
�$#
$#
$#
$#
$#
$#
$#
$#
$##
`
@@ -0,0 +1,245 @@
import { ElementType } from "domelementtype";
interface SourceCodeLocation {
/** One-based line index of the first character. */
startLine: number;
/** One-based column index of the first character. */
startCol: number;
/** Zero-based first character index. */
startOffset: number;
/** One-based line index of the last character. */
endLine: number;
/** One-based column index of the last character. Points directly *after* the last character. */
endCol: number;
/** Zero-based last character index. Points directly *after* the last character. */
endOffset: number;
}
interface TagSourceCodeLocation extends SourceCodeLocation {
startTag?: SourceCodeLocation;
endTag?: SourceCodeLocation;
}
export declare type ParentNode = Document | Element | CDATA;
export declare type ChildNode = Text | Comment | ProcessingInstruction | Element | CDATA | Document;
export declare type AnyNode = ParentNode | ChildNode;
/**
* This object will be used as the prototype for Nodes when creating a
* DOM-Level-1-compliant structure.
*/
export declare abstract class Node {
/** The type of the node. */
abstract readonly type: ElementType;
/** Parent of the node */
parent: ParentNode | null;
/** Previous sibling */
prev: ChildNode | null;
/** Next sibling */
next: ChildNode | null;
/** The start index of the node. Requires `withStartIndices` on the handler to be `true. */
startIndex: number | null;
/** The end index of the node. Requires `withEndIndices` on the handler to be `true. */
endIndex: number | null;
/**
* `parse5` source code location info.
*
* Available if parsing with parse5 and location info is enabled.
*/
sourceCodeLocation?: SourceCodeLocation | null;
/**
* [DOM spec](https://dom.spec.whatwg.org/#dom-node-nodetype)-compatible
* node {@link type}.
*/
abstract readonly nodeType: number;
/**
* Same as {@link parent}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get parentNode(): ParentNode | null;
set parentNode(parent: ParentNode | null);
/**
* Same as {@link prev}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get previousSibling(): ChildNode | null;
set previousSibling(prev: ChildNode | null);
/**
* Same as {@link next}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get nextSibling(): ChildNode | null;
set nextSibling(next: ChildNode | null);
/**
* Clone this node, and optionally its children.
*
* @param recursive Clone child nodes as well.
* @returns A clone of the node.
*/
cloneNode<T extends Node>(this: T, recursive?: boolean): T;
}
/**
* A node that contains some data.
*/
export declare abstract class DataNode extends Node {
data: string;
/**
* @param data The content of the data node
*/
constructor(data: string);
/**
* Same as {@link data}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get nodeValue(): string;
set nodeValue(data: string);
}
/**
* Text within the document.
*/
export declare class Text extends DataNode {
type: ElementType.Text;
get nodeType(): 3;
}
/**
* Comments within the document.
*/
export declare class Comment extends DataNode {
type: ElementType.Comment;
get nodeType(): 8;
}
/**
* Processing instructions, including doc types.
*/
export declare class ProcessingInstruction extends DataNode {
name: string;
type: ElementType.Directive;
constructor(name: string, data: string);
get nodeType(): 1;
/** If this is a doctype, the document type name (parse5 only). */
"x-name"?: string;
/** If this is a doctype, the document type public identifier (parse5 only). */
"x-publicId"?: string;
/** If this is a doctype, the document type system identifier (parse5 only). */
"x-systemId"?: string;
}
/**
* A `Node` that can have children.
*/
export declare abstract class NodeWithChildren extends Node {
children: ChildNode[];
/**
* @param children Children of the node. Only certain node types can have children.
*/
constructor(children: ChildNode[]);
/** First child of the node. */
get firstChild(): ChildNode | null;
/** Last child of the node. */
get lastChild(): ChildNode | null;
/**
* Same as {@link children}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get childNodes(): ChildNode[];
set childNodes(children: ChildNode[]);
}
export declare class CDATA extends NodeWithChildren {
type: ElementType.CDATA;
get nodeType(): 4;
}
/**
* The root node of the document.
*/
export declare class Document extends NodeWithChildren {
type: ElementType.Root;
get nodeType(): 9;
/** [Document mode](https://dom.spec.whatwg.org/#concept-document-limited-quirks) (parse5 only). */
"x-mode"?: "no-quirks" | "quirks" | "limited-quirks";
}
/**
* The description of an individual attribute.
*/
interface Attribute {
name: string;
value: string;
namespace?: string;
prefix?: string;
}
/**
* An element within the DOM.
*/
export declare class Element extends NodeWithChildren {
name: string;
attribs: {
[name: string]: string;
};
type: ElementType.Tag | ElementType.Script | ElementType.Style;
/**
* @param name Name of the tag, eg. `div`, `span`.
* @param attribs Object mapping attribute names to attribute values.
* @param children Children of the node.
*/
constructor(name: string, attribs: {
[name: string]: string;
}, children?: ChildNode[], type?: ElementType.Tag | ElementType.Script | ElementType.Style);
get nodeType(): 1;
/**
* `parse5` source code location info, with start & end tags.
*
* Available if parsing with parse5 and location info is enabled.
*/
sourceCodeLocation?: TagSourceCodeLocation | null;
/**
* Same as {@link name}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get tagName(): string;
set tagName(name: string);
get attributes(): Attribute[];
/** Element namespace (parse5 only). */
namespace?: string;
/** Element attribute namespaces (parse5 only). */
"x-attribsNamespace"?: Record<string, string>;
/** Element attribute namespace-related prefixes (parse5 only). */
"x-attribsPrefix"?: Record<string, string>;
}
/**
* @param node Node to check.
* @returns `true` if the node is a `Element`, `false` otherwise.
*/
export declare function isTag(node: Node): node is Element;
/**
* @param node Node to check.
* @returns `true` if the node has the type `CDATA`, `false` otherwise.
*/
export declare function isCDATA(node: Node): node is CDATA;
/**
* @param node Node to check.
* @returns `true` if the node has the type `Text`, `false` otherwise.
*/
export declare function isText(node: Node): node is Text;
/**
* @param node Node to check.
* @returns `true` if the node has the type `Comment`, `false` otherwise.
*/
export declare function isComment(node: Node): node is Comment;
/**
* @param node Node to check.
* @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.
*/
export declare function isDirective(node: Node): node is ProcessingInstruction;
/**
* @param node Node to check.
* @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.
*/
export declare function isDocument(node: Node): node is Document;
/**
* @param node Node to check.
* @returns `true` if the node has children, `false` otherwise.
*/
export declare function hasChildren(node: Node): node is ParentNode;
/**
* Clone a node, and optionally its children.
*
* @param recursive Clone child nodes as well.
* @returns A clone of the node.
*/
export declare function cloneNode<T extends Node>(node: T, recursive?: boolean): T;
export {};
//# sourceMappingURL=node.d.ts.map
@@ -0,0 +1,26 @@
/**
* @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 HandPlatter = createLucideIcon("HandPlatter", [
["path", { d: "M12 3V2", key: "ar7q03" }],
[
"path",
{
d: "m15.4 17.4 3.2-2.8a2 2 0 1 1 2.8 2.9l-3.6 3.3c-.7.8-1.7 1.2-2.8 1.2h-4c-1.1 0-2.1-.4-2.8-1.2l-1.302-1.464A1 1 0 0 0 6.151 19H5",
key: "n2g93r"
}
],
["path", { d: "M2 14h12a2 2 0 0 1 0 4h-2", key: "1o2jem" }],
["path", { d: "M4 10h16", key: "img6z1" }],
["path", { d: "M5 10a7 7 0 0 1 14 0", key: "1ega1o" }],
["path", { d: "M5 14v6a1 1 0 0 1-1 1H2", key: "1hescx" }]
]);
export { HandPlatter as default };
//# sourceMappingURL=hand-platter.js.map
@@ -0,0 +1,80 @@
{
"name": "es-errors",
"version": "1.3.0",
"description": "A simple cache for a few of the JS Error constructors.",
"main": "index.js",
"exports": {
".": "./index.js",
"./eval": "./eval.js",
"./range": "./range.js",
"./ref": "./ref.js",
"./syntax": "./syntax.js",
"./type": "./type.js",
"./uri": "./uri.js",
"./package.json": "./package.json"
},
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run lint",
"test": "npm run tests-only",
"tests-only": "nyc tape 'test/**/*.js'",
"posttest": "aud --production",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/es-errors.git"
},
"keywords": [
"javascript",
"ecmascript",
"error",
"typeerror",
"syntaxerror",
"rangeerror"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/ljharb/es-errors/issues"
},
"homepage": "https://github.com/ljharb/es-errors#readme",
"devDependencies": {
"@ljharb/eslint-config": "^21.1.0",
"@types/tape": "^5.6.4",
"aud": "^2.0.4",
"auto-changelog": "^2.4.0",
"eclint": "^2.8.1",
"eslint": "^8.8.0",
"evalmd": "^0.0.19",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.4",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1,60 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
useEffectEvent: () => useEffectEvent
});
module.exports = __toCommonJS(index_exports);
// src/use-effect-event.tsx
var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect");
var React = __toESM(require("react"));
var useReactEffectEvent = React[" useEffectEvent ".trim().toString()];
var useReactInsertionEffect = React[" useInsertionEffect ".trim().toString()];
function useEffectEvent(callback) {
if (typeof useReactEffectEvent === "function") {
return useReactEffectEvent(callback);
}
const ref = React.useRef(() => {
throw new Error("Cannot call an event handler while rendering.");
});
if (typeof useReactInsertionEffect === "function") {
useReactInsertionEffect(() => {
ref.current = callback;
});
} else {
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
ref.current = callback;
});
}
return React.useMemo(() => (...args) => ref.current?.(...args), []);
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"fileRoute.js","names":[],"sources":["../../src/fileRoute.ts"],"sourcesContent":["import { createRoute } from './route'\n\nimport { useMatch } from './useMatch'\nimport { useLoaderDeps } from './useLoaderDeps'\nimport { useLoaderData } from './useLoaderData'\nimport { useSearch } from './useSearch'\nimport { useParams } from './useParams'\nimport { useNavigate } from './useNavigate'\nimport { useRouter } from './useRouter'\nimport { useRouteContext } from './useRouteContext'\nimport type { UseParamsRoute } from './useParams'\nimport type { UseMatchRoute } from './useMatch'\nimport type { UseSearchRoute } from './useSearch'\nimport type {\n AnyContext,\n AnyRoute,\n AnyRouter,\n Constrain,\n ConstrainLiteral,\n FileBaseRouteOptions,\n FileRoutesByPath,\n LazyRouteOptions,\n Register,\n RegisteredRouter,\n ResolveParams,\n Route,\n RouteById,\n RouteConstraints,\n RouteIds,\n RouteLoaderEntry,\n UpdatableRouteOptions,\n UseNavigateResult,\n} from '@tanstack/router-core'\nimport type { UseLoaderDepsRoute } from './useLoaderDeps'\nimport type { UseLoaderDataRoute } from './useLoaderData'\nimport type { UseRouteContextRoute } from './useRouteContext'\n\n/**\n * Creates a file-based Route factory for a given path.\n *\n * Used by TanStack Router's file-based routing to associate a file with a\n * route. The returned function accepts standard route options. In normal usage\n * the `path` string is inserted and maintained by the `tsr` generator.\n *\n * @param path File path literal for the route (usually auto-generated).\n * @returns A function that accepts Route options and returns a Route instance.\n * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createFileRouteFunction\n */\nexport function createFileRoute<\n TFilePath extends keyof FileRoutesByPath,\n TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'],\n TId extends RouteConstraints['TId'] = FileRoutesByPath[TFilePath]['id'],\n TPath extends RouteConstraints['TPath'] = FileRoutesByPath[TFilePath]['path'],\n TFullPath extends RouteConstraints['TFullPath'] =\n FileRoutesByPath[TFilePath]['fullPath'],\n>(\n path?: TFilePath,\n): FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>['createRoute'] {\n return new FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>(path, {\n silent: true,\n }).createRoute\n}\n\n/** \n @deprecated It's no longer recommended to use the `FileRoute` class directly.\n Instead, use `createFileRoute('/path/to/file')(options)` to create a file route.\n*/\nexport class FileRoute<\n TFilePath extends keyof FileRoutesByPath,\n TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'],\n TId extends RouteConstraints['TId'] = FileRoutesByPath[TFilePath]['id'],\n TPath extends RouteConstraints['TPath'] = FileRoutesByPath[TFilePath]['path'],\n TFullPath extends RouteConstraints['TFullPath'] =\n FileRoutesByPath[TFilePath]['fullPath'],\n> {\n silent?: boolean\n\n constructor(\n public path?: TFilePath,\n _opts?: { silent: boolean },\n ) {\n this.silent = _opts?.silent\n }\n\n createRoute = <\n TRegister = Register,\n TSearchValidator = undefined,\n TParams = ResolveParams<TPath>,\n TRouteContextFn = AnyContext,\n TBeforeLoadFn = AnyContext,\n TLoaderDeps extends Record<string, any> = {},\n TLoaderFn = undefined,\n TChildren = unknown,\n TSSR = unknown,\n const TMiddlewares = unknown,\n THandlers = undefined,\n >(\n options?: FileBaseRouteOptions<\n TRegister,\n TParentRoute,\n TId,\n TPath,\n TSearchValidator,\n TParams,\n TLoaderDeps,\n TLoaderFn,\n AnyContext,\n TRouteContextFn,\n TBeforeLoadFn,\n AnyContext,\n TSSR,\n TMiddlewares,\n THandlers\n > &\n UpdatableRouteOptions<\n TParentRoute,\n TId,\n TFullPath,\n TParams,\n TSearchValidator,\n TLoaderFn,\n TLoaderDeps,\n AnyContext,\n TRouteContextFn,\n TBeforeLoadFn\n >,\n ): Route<\n TRegister,\n TParentRoute,\n TPath,\n TFullPath,\n TFilePath,\n TId,\n TSearchValidator,\n TParams,\n AnyContext,\n TRouteContextFn,\n TBeforeLoadFn,\n TLoaderDeps,\n TLoaderFn,\n TChildren,\n unknown,\n TSSR,\n TMiddlewares,\n THandlers\n > => {\n if (process.env.NODE_ENV !== 'production') {\n if (!this.silent) {\n console.warn(\n 'Warning: FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.',\n )\n }\n }\n const route = createRoute(options as any)\n ;(route as any).isRoot = false\n return route as any\n }\n}\n\n/**\n @deprecated It's recommended not to split loaders into separate files.\n Instead, place the loader function in the main route file via `createFileRoute`.\n*/\nexport function FLine truncated
@@ -0,0 +1,89 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _genmapping = require('@jridgewell/gen-mapping');
var _charcodes = require('./parser/util/charcodes');
/**
* Generate a source map indicating that each line maps directly to the original line,
* with the tokens in their new positions.
*/
function computeSourceMap(
{code: generatedCode, mappings: rawMappings},
filePath,
options,
source,
tokens,
) {
const sourceColumns = computeSourceColumns(source, tokens);
const map = new (0, _genmapping.GenMapping)({file: options.compiledFilename});
let tokenIndex = 0;
// currentMapping is the output source index for the current input token being
// considered.
let currentMapping = rawMappings[0];
while (currentMapping === undefined && tokenIndex < rawMappings.length - 1) {
tokenIndex++;
currentMapping = rawMappings[tokenIndex];
}
let line = 0;
let lineStart = 0;
if (currentMapping !== lineStart) {
_genmapping.maybeAddSegment.call(void 0, map, line, 0, filePath, line, 0);
}
for (let i = 0; i < generatedCode.length; i++) {
if (i === currentMapping) {
const genColumn = currentMapping - lineStart;
const sourceColumn = sourceColumns[tokenIndex];
_genmapping.maybeAddSegment.call(void 0, map, line, genColumn, filePath, line, sourceColumn);
while (
(currentMapping === i || currentMapping === undefined) &&
tokenIndex < rawMappings.length - 1
) {
tokenIndex++;
currentMapping = rawMappings[tokenIndex];
}
}
if (generatedCode.charCodeAt(i) === _charcodes.charCodes.lineFeed) {
line++;
lineStart = i + 1;
if (currentMapping !== lineStart) {
_genmapping.maybeAddSegment.call(void 0, map, line, 0, filePath, line, 0);
}
}
}
const {sourceRoot, sourcesContent, ...sourceMap} = _genmapping.toEncodedMap.call(void 0, map);
return sourceMap ;
} exports.default = computeSourceMap;
/**
* Create an array mapping each token index to the 0-based column of the start
* position of the token.
*/
function computeSourceColumns(code, tokens) {
const sourceColumns = new Array(tokens.length);
let tokenIndex = 0;
let currentMapping = tokens[tokenIndex].start;
let lineStart = 0;
for (let i = 0; i < code.length; i++) {
if (i === currentMapping) {
sourceColumns[tokenIndex] = currentMapping - lineStart;
tokenIndex++;
currentMapping = tokens[tokenIndex].start;
}
if (code.charCodeAt(i) === _charcodes.charCodes.lineFeed) {
lineStart = i + 1;
}
}
return sourceColumns;
}
@@ -0,0 +1,135 @@
/*
Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
(function () {
'use strict';
var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;
// See `tools/generate-identifier-regex.js`.
ES5Regex = {
// ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierStart:
NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
// ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierPart:
NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFELine truncated
};
ES6Regex = {
// ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierStart:
NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uLine truncated
// ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierPart:
NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFELine truncated
};
function isDecimalDigit(ch) {
return 0x30 <= ch && ch <= 0x39; // 0..9
}
function isHexDigit(ch) {
return 0x30 <= ch && ch <= 0x39 || // 0..9
0x61 <= ch && ch <= 0x66 || // a..f
0x41 <= ch && ch <= 0x46; // A..F
}
function isOctalDigit(ch) {
return ch >= 0x30 && ch <= 0x37; // 0..7
}
// 7.2 White Space
NON_ASCII_WHITESPACES = [
0x1680,
0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A,
0x202F, 0x205F,
0x3000,
0xFEFF
];
function isWhiteSpace(ch) {
return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 ||
ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
}
// 7.3 Line Terminators
function isLineTerminator(ch) {
return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
}
// 7.6 Identifier Names and Identifiers
function fromCodePoint(cp) {
if (cp <= 0xFFFF) { return String.fromCharCode(cp); }
var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00);
return cu1 + cu2;
}
IDENTIFIER_START = new Array(0x80);
for(ch = 0; ch < 0x80; ++ch) {
IDENTIFIER_START[ch] =
ch >= 0x61 && ch <= 0x7A || // a..z
ch >= 0x41 && ch <= 0x5A || // A..Z
ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
}
IDENTIFIER_PART = new Array(0x80);
for(ch = 0; ch < 0x80; ++ch) {
IDENTIFIER_PART[ch] =
ch >= 0x61 && ch <= 0x7A || // a..z
ch >= 0x41 && ch <= 0x5A || // A..Z
ch >= 0x30 && ch <= 0x39 || // 0..9
ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
}
function isIdentifierStartES5(ch) {
return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
}
function isIdentifierPartES5(ch) {
return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
}
function isIdentifierStartES6(ch) {
return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
}
function isIdentifierPartES6(ch) {
return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
}
module.exports = {
isDecimalDigit: isDecimalDigit,
isHexDigit: isHexDigit,
isOctalDigit: isOctalDigit,
isWhiteSpace: isWhiteSpace,
isLineTerminator: isLineTerminator,
isIdentifierStartES5: isIdentifierStartES5,
isIdentifierPartES5: isIdentifierPartES5,
isIdentifierStartES6: isIdentifierStartES6,
isIdentifierPartES6: isIdentifierPartES6
};
}());
/* vim: set sw=4 ts=4 et tw=80 : */
@@ -0,0 +1,26 @@
const require_useMatch = require("./useMatch.cjs");
//#region src/useLoaderDeps.tsx
/**
* Read and select the current route's loader dependencies object.
*
* Options:
* - `from`: Choose which route's loader deps to read
* - `select`: Map the deps to a derived value
* - `structuralSharing`: Enable structural sharing for stable references
*
* @returns The loader deps (or selected value) for the matched route.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDepsHook
*/
function useLoaderDeps(opts) {
const { select, ...rest } = opts;
return require_useMatch.useMatch({
...rest,
select: (s) => {
return select ? select(s.loaderDeps) : s.loaderDeps;
}
});
}
//#endregion
exports.useLoaderDeps = useLoaderDeps;
//# sourceMappingURL=useLoaderDeps.cjs.map
@@ -0,0 +1,7 @@
/**
* Read an identifier, producing either a name token or matching on one of the existing keywords.
* For performance, we pre-generate big decision tree that we traverse. Each node represents a
* prefix and has 27 values, where the first value is the token or contextual token, if any (-1 if
* not), and the other 26 values are the transitions to other nodes, or -1 to stop.
*/
export default function readWord(): void;
@@ -0,0 +1,843 @@
export default `flf2a$ 8 7 18 4 25
crawford2.flf (FIGlet font)
Font created from original Crawford, update by PAT or JK, Jan 2008
Figlet conversion by Kent Nassen, knassen@umich.edu, 1/2/95
From: s1171180@giaeb.cc.monash.edu.au (Rowan Crawford)
Newsgroups: alt.ascii-art
Subject: Font - Style No 2....
Date: 14 Jan 1994 14:37:30 GMT
Organization: Monash University
Lines: 41
Message-ID: <2h6ana$db6@harbinger.cc.monash.edu.au>
NNTP-Posting-Host: giaeb.cc.monash.edu.au
X-Newsreader: NN version 6.5.0 #4 (NOV)
Status: RO
Had some spare time today, so I have done another font. Different
form to the last one though:
[...]
And there you are. "S" looks slightly odd and so does "J", but
otherwise fairly neat I guess.
Row.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
__ @
| |@
| |@
|__|@
__ @
| |@
|__|@
@@
$__ __ @
| || |@
|_ ||_ |@
$ \\| \\|@
$ @
$ @
$ @
$ @@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
__ @
| |@
|_ |@
\\|@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
__ @
| |@
|_ |@
\\|@@
@
@
_____ @
| |@
|_____|@
@
@
@@
@
@
@
@
__ @
| |@
|__|@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
__ @
| |@
|__|@
__ @
| |@
|__|@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
_____ @
/ |@
| Y |@
|__| |@
|__|@
__ @
|__|@
@@
____ @
/ \\@
| _ |@
| / |@
| \\__|@
| |@
\\__,_|@
@@
____ @
/ |@
| o |@
| |@
| _ |@
| | |@
|__|__|@
@@
____ @
| \\ @
| o )@
| |@
| O |@
| |@
|_____|@
@@
__ @
/ ]@
/ / @
/ / @
/ \\_ @
\\ |@
\\____|@
@@
___ @
| \\ @
| \\ @
| D |@
| |@
| |@
|_____|@
@@
___ @
/ _]@
/ [_ @
| _]@
| [_ @
| |@
|_____|@
@@
_____ @
| |@
| __|@
| |_ @
| _] @
| | @
|__| @
@@
____ @
/ |@
| __|@
| | |@
| |_ |@
| |@
|___,_|@
@@
__ __ @
| | |@
| | |@
| _ |@
| | |@
| | |@
|__|__|@
@@
____ @
| |@
| | @
| | @
| | @
| | @
|____|@
@@
____ @
| |@
|__ |@
__| |@
/ | |@
\\ \` |@
\\____j@
@@
__ _ @
| |/ ]@
| ' / @
| \\ @
| |@
| . |@
|__|\\_|@
@@
_ @
| | @
| | @
| |___ @
| |@
| |@
|_____|@
@@
___ ___ @
| | |@
| _ _ |@
| \\_/ |@
| | |@
| | |@
|___|___|@
@@
____ @
| \\ @
| _ |@
| | |@
| | |@
| | |@
|__|__|@
@@
___ @
/ \\ @
| |@
| O |@
| |@
| |@
\\___/ @
@@
____ @
| \\ @
| o )@
| _/ @
| | @
| | @
|__| @
@@
___ @
/ \\ @
| |@
| Q |@
| |@
| |@
\\__,_|@
@@
____ @
| \\ @
| D )@
| / @
| \\ @
| . \\@
|__|\\_|@
@@
_____@
/ ___/@
( \\_ @
\\__ |@
/ \\ |@
\\ |@
\\___|@
@@
______ @
| |@
| |@
|_| |_|@
| | @
| | @
|__| @
@@
__ __ @
| | |@
| | |@
| | |@
| : |@
| |@
\\__,_|@
@@
__ __ @
| | |@
| | |@
| | |@
| : |@
\\ / @
\\_/ @
@@
__ __ @
| |__| |@
| | | |@
| | | |@
| \` ' |@
\\ / @
\\_/\\_/ @
@@
__ __ @
| | |@
| | |@
|_ _|@
| |@
| | |@
|__|__|@
@@
__ __ @
| | |@
| | |@
| ~ |@
|___, |@
| |@
|____/ @
@@
_____ @
| |@
|__/ |@
| __|@
| / |@
| |@
|_____|@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
__ @
| |@
| _|@
|/ @
@
@
@
@@
____ @
/ |@
| o |@
| |@
| _ |@
| | |@
|__|__|@
@@
____ @
| \\ @
| o )@
| |@
| O |@
| |@
|_____|@
@@
__ @
/ ]@
/ / @
/ / @
/ \\_ @
\\ |@
\\____|@
@@
___ @
| \\ @
| \\ @
| D |@
| |@
| |@
|_____|@
@@
___ @
/ _]@
/ [_ @
| _]@
| [_ @
| |@
|_____|@
@@
_____ @
| |@
| __|@
| |_ @
| _] @
| | @
|__| @
@@
____ @
/ |@
| __|@
| | |@
| |_ |@
| |@
|___,_|@
@@
__ __ @
| | |@
| | |@
| _ |@
| | |@
| | |@
|__|__|@
@@
____ @
| |@
| | @
| | @
| | @
| | @
|____|@
@@
____ @
| |@
|__ |@
__| |@
/ | |@
\\ \` |@
\\____|@
@@
__ _ @
| |/ ]@
| ' / @
| \\ @
| \\@
| . |@
|__|\\_|@
@@
_ @
| | @
| | @
| |___ @
| |@
| |@
|_____|@
@@
___ ___ @
| | |@
| _ _ |@
| \\_/ |@
| | |@
| | |@
|___|___|@
@@
____ @
| \\ @
| _ |@
| | |@
| | |@
| | |@
|__|__|@
@@
___ @
/ \\ @
| |@
| O |@
| |@
| |@
\\___/ @
@@
____ @
| \\ @
| o )@
| _/ @
| | @
| | @
|__| @
@@
___ @
/ \\ @
| |@
| Q |@
| |@
| |@
\\__,_|@
@@
____ @
| \\ @
| D )@
| / @
| \\ @
| . \\@
|__|\\_|@
@@
_____@
/ ___/@
( \\_ @
\\__ |@
/ \\ |@
\\ |@
\\___|@
@@
______ @
| |@
| |@
|_| |_|@
| | @
| | @
|__| @
@@
__ __ @
| | |@
| | |@
| | |@
| : |@
| |@
\\__,_|@
@@
__ __ @
| | |@
| | |@
| | |@
| : |@
\\ / @
\\_/ @
@@
__ __ @
| |__| |@
| | | |@
| | | |@
| \` ' |@
\\ / @
\\_/\\_/ @
@@
__ __ @
| | |@
| | |@
|_ _|@
| |@
| | |@
|__|__|@
@@
__ __ @
| | |@
| | |@
| ~ |@
|___, |@
| |@
|____/ @
@@
_____ @
| |@
|__/ |@
| __|@
| / |@
| |@
|_____|@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,15 @@
/**
* @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 Square = createLucideIcon("Square", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
]);
export { Square as default };
//# sourceMappingURL=square.js.map
@@ -0,0 +1,33 @@
"use client";
import { Await, useAwaited } from "./awaited.js";
import { CatchBoundary, ErrorComponent } from "./CatchBoundary.js";
import { ClientOnly, useHydrated } from "./ClientOnly.js";
import { useRouter } from "./useRouter.js";
import { useMatch } from "./useMatch.js";
import { useLoaderData } from "./useLoaderData.js";
import { useLoaderDeps } from "./useLoaderDeps.js";
import { useParams } from "./useParams.js";
import { useSearch } from "./useSearch.js";
import { Navigate, useNavigate } from "./useNavigate.js";
import { useRouteContext } from "./useRouteContext.js";
import { Link, createLink, linkOptions, useLinkProps } from "./link.js";
import { NotFoundRoute, RootRoute, Route, RouteApi, createRootRoute, createRootRouteWithContext, createRoute, createRouteMask, getRouteApi, rootRouteWithContext } from "./route.js";
import { FileRoute, FileRouteLoader, LazyRoute, createFileRoute, createLazyFileRoute, createLazyRoute } from "./fileRoute.js";
import { lazyRouteComponent } from "./lazyRouteComponent.js";
import { CatchNotFound, DefaultGlobalNotFound } from "./not-found.js";
import { ScriptOnce } from "./ScriptOnce.js";
import { Match, Outlet } from "./Match.js";
import { MatchRoute, Matches, useChildMatches, useMatchRoute, useMatches, useParentMatches } from "./Matches.js";
import { Router, createRouter } from "./router.js";
import { RouterContextProvider, RouterProvider } from "./RouterProvider.js";
import { ScrollRestoration, useElementScrollRestoration } from "./ScrollRestoration.js";
import { Block, useBlocker } from "./useBlocker.js";
import { useRouterState } from "./useRouterState.js";
import { useLocation } from "./useLocation.js";
import { useCanGoBack } from "./useCanGoBack.js";
import { Asset } from "./Asset.js";
import { useTags } from "./headContentUtils.js";
import { Scripts } from "./Scripts.js";
import { DEFAULT_PROTOCOL_ALLOWLIST, SearchParamError, cleanPath, composeRewrites, createBrowserHistory, createControlledPromise, createHashHistory, createHistory, createMemoryHistory, createRouterConfig, createSerializationAdapter, deepEqual, defaultParseSearch, defaultStringifySearch, defer, functionalUpdate, interpolatePath, isMatch, isNotFound, isPlainArray, isPlainObject, isRedirect, joinPaths, lazyFn, notFound, parseSearchWith, redirect, replaceEqualDeep, resolvePath, retainSearchParams, rootRouteId, stringifySearchWith, stripSearchParams, trimPath, trimPathLeft, trimPathRight } from "./index.js";
import { HeadContent } from "./HeadContent.dev.js";
export { Asset, Await, Block, CatchBoundary, CatchNotFound, ClientOnly, DEFAULT_PROTOCOL_ALLOWLIST, DefaultGlobalNotFound, ErrorComponent, FileRoute, FileRouteLoader, HeadContent, LazyRoute, Link, Match, MatchRoute, Matches, Navigate, NotFoundRoute, Outlet, RootRoute, Route, RouteApi, Router, RouterContextProvider, RouterProvider, ScriptOnce, Scripts, ScrollRestoration, SearchParamError, cleanPath, composeRewrites, createBrowserHistory, createControlledPromise, createFileRoute, createHashHistory, createHistory, createLazyFileRoute, createLazyRoute, createLink, createMemoryHistory, createRootRoute, createRootRouteWithContext, createRoute, createRouteMask, createRouter, createRouterConfig, createSerializationAdapter, deepEqual, defaultParseSearch, defaultStringifySearch, defer, functionalUpdate, getRouteApi, interpolatePath, isMatch, isNotFound, isPlainArray, isPlainObject, isRedirect, joinPaths, lazyFn, lazyRouteComponent, linkOptions, notFound, parseSearchWith, redirect, replaceEqualDeep, resolvePath, retainSearchParams, rootRouteId, rootRouteWithContext, stringifySearchWith, stripSearchParams, trimPath, trimPathLeft, trimPathRight, useAwaited, useBlocker, useCanGoBack, useChildMatches, useElementScrollRestoration, useHydrated, useLinkProps, useLoaderData, useLoaderDeps, useLocation, useMatch, useMatchRoute, useMatches, useNavigate, useParams, useParentMatches, useRouteContext, useRouter, useRouterState, useSearch, useTags };
@@ -0,0 +1,139 @@
'use client'
import * as React from 'react'
import { batch, useStore } from '@tanstack/react-store'
import {
getLocationChangeInfo,
handleHashScroll,
trimPathRight,
} from '@tanstack/router-core'
import { useLayoutEffect, usePrevious } from './utils'
import { useRouter } from './useRouter'
export function Transitioner() {
const router = useRouter()
const mountLoadForRouter = React.useRef({ router, mounted: false })
const [isTransitioning, setIsTransitioning] = React.useState(false)
// Track pending state changes
const isLoading = useStore(router.stores.isLoading, (value) => value)
const hasPending = useStore(router.stores.hasPending, (value) => value)
const previousIsLoading = usePrevious(isLoading)
const isAnyPending = isLoading || isTransitioning || hasPending
const previousIsAnyPending = usePrevious(isAnyPending)
const isPagePending = isLoading || hasPending
const previousIsPagePending = usePrevious(isPagePending)
router.startTransition = (fn: () => void) => {
setIsTransitioning(true)
React.startTransition(() => {
fn()
setIsTransitioning(false)
})
}
// Subscribe to location changes
// and try to load the new location
React.useEffect(() => {
const unsub = router.history.subscribe(router.load)
const nextLocation = router.buildLocation({
to: router.latestLocation.pathname,
search: true,
params: true,
hash: true,
state: true,
_includeValidateSearch: true,
})
// Check if the current URL matches the canonical form.
// Compare publicHref (browser-facing URL) for consistency with
// the server-side redirect check in router.beforeLoad.
if (
trimPathRight(router.latestLocation.publicHref) !==
trimPathRight(nextLocation.publicHref)
) {
router.commitLocation({ ...nextLocation, replace: true })
}
return () => {
unsub()
}
}, [router, router.history])
// Try to load the initial location
useLayoutEffect(() => {
if (
// if we are hydrating from SSR, loading is triggered in ssr-client
(typeof window !== 'undefined' && router.ssr) ||
(mountLoadForRouter.current.router === router &&
mountLoadForRouter.current.mounted)
) {
return
}
mountLoadForRouter.current = { router, mounted: true }
const tryLoad = async () => {
try {
await router.load()
} catch (err) {
console.error(err)
}
}
tryLoad()
}, [router])
useLayoutEffect(() => {
// The router was loading and now it's not
if (previousIsLoading && !isLoading) {
router.emit({
type: 'onLoad', // When the new URL has committed, when the new matches have been loaded into state.matches
...getLocationChangeInfo(
router.stores.location.get(),
router.stores.resolvedLocation.get(),
),
})
}
}, [previousIsLoading, router, isLoading])
useLayoutEffect(() => {
// emit onBeforeRouteMount
if (previousIsPagePending && !isPagePending) {
router.emit({
type: 'onBeforeRouteMount',
...getLocationChangeInfo(
router.stores.location.get(),
router.stores.resolvedLocation.get(),
),
})
}
}, [isPagePending, previousIsPagePending, router])
useLayoutEffect(() => {
if (previousIsAnyPending && !isAnyPending) {
const changeInfo = getLocationChangeInfo(
router.stores.location.get(),
router.stores.resolvedLocation.get(),
)
router.emit({
type: 'onResolved',
...changeInfo,
})
batch(() => {
router.stores.status.set('idle')
router.stores.resolvedLocation.set(router.stores.location.get())
})
if (changeInfo.hrefChanged) {
handleHashScroll(router)
}
}
}, [isAnyPending, previousIsAnyPending, router])
return null
}
@@ -0,0 +1,857 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const index_js_1 = require("../../client/index.js");
const streamableHttp_js_1 = require("../../client/streamableHttp.js");
const node_readline_1 = require("node:readline");
const types_js_1 = require("../../types.js");
const in_memory_js_1 = require("../../experimental/tasks/stores/in-memory.js");
const metadataUtils_js_1 = require("../../shared/metadataUtils.js");
const ajv_1 = require("ajv");
// Create readline interface for user input
const readline = (0, node_readline_1.createInterface)({
input: process.stdin,
output: process.stdout
});
// Track received notifications for debugging resumability
let notificationCount = 0;
// Global client and transport for interactive commands
let client = null;
let transport = null;
let serverUrl = 'http://localhost:3000/mcp';
let notificationsToolLastEventId = undefined;
let sessionId = undefined;
async function main() {
console.log('MCP Interactive Client');
console.log('=====================');
// Connect to server immediately with default settings
await connect();
// Print help and start the command loop
printHelp();
commandLoop();
}
function printHelp() {
console.log('\nAvailable commands:');
console.log(' connect [url] - Connect to MCP server (default: http://localhost:3000/mcp)');
console.log(' disconnect - Disconnect from server');
console.log(' terminate-session - Terminate the current session');
console.log(' reconnect - Reconnect to the server');
console.log(' list-tools - List available tools');
console.log(' call-tool <name> [args] - Call a tool with optional JSON arguments');
console.log(' call-tool-task <name> [args] - Call a tool with task-based execution (example: call-tool-task delay {"duration":3000})');
console.log(' greet [name] - Call the greet tool');
console.log(' multi-greet [name] - Call the multi-greet tool with notifications');
console.log(' collect-info [type] - Test form elicitation with collect-user-info tool (contact/preferences/feedback)');
console.log(' collect-info-task [type] - Test bidirectional task support (server+client tasks) with elicitation');
console.log(' start-notifications [interval] [count] - Start periodic notifications');
console.log(' run-notifications-tool-with-resumability [interval] [count] - Run notification tool with resumability');
console.log(' list-prompts - List available prompts');
console.log(' get-prompt [name] [args] - Get a prompt with optional JSON arguments');
console.log(' list-resources - List available resources');
console.log(' read-resource <uri> - Read a specific resource by URI');
console.log(' help - Show this help');
console.log(' quit - Exit the program');
}
function commandLoop() {
readline.question('\n> ', async (input) => {
const args = input.trim().split(/\s+/);
const command = args[0]?.toLowerCase();
try {
switch (command) {
case 'connect':
await connect(args[1]);
break;
case 'disconnect':
await disconnect();
break;
case 'terminate-session':
await terminateSession();
break;
case 'reconnect':
await reconnect();
break;
case 'list-tools':
await listTools();
break;
case 'call-tool':
if (args.length < 2) {
console.log('Usage: call-tool <name> [args]');
}
else {
const toolName = args[1];
let toolArgs = {};
if (args.length > 2) {
try {
toolArgs = JSON.parse(args.slice(2).join(' '));
}
catch {
console.log('Invalid JSON arguments. Using empty args.');
}
}
await callTool(toolName, toolArgs);
}
break;
case 'greet':
await callGreetTool(args[1] || 'MCP User');
break;
case 'multi-greet':
await callMultiGreetTool(args[1] || 'MCP User');
break;
case 'collect-info':
await callCollectInfoTool(args[1] || 'contact');
break;
case 'collect-info-task': {
await callCollectInfoWithTask(args[1] || 'contact');
break;
}
case 'start-notifications': {
const interval = args[1] ? parseInt(args[1], 10) : 2000;
const count = args[2] ? parseInt(args[2], 10) : 10;
await startNotifications(interval, count);
break;
}
case 'run-notifications-tool-with-resumability': {
const interval = args[1] ? parseInt(args[1], 10) : 2000;
const count = args[2] ? parseInt(args[2], 10) : 10;
await runNotificationsToolWithResumability(interval, count);
break;
}
case 'call-tool-task':
if (args.length < 2) {
console.log('Usage: call-tool-task <name> [args]');
}
else {
const toolName = args[1];
let toolArgs = {};
if (args.length > 2) {
try {
toolArgs = JSON.parse(args.slice(2).join(' '));
}
catch {
console.log('Invalid JSON arguments. Using empty args.');
}
}
await callToolTask(toolName, toolArgs);
}
break;
case 'list-prompts':
await listPrompts();
break;
case 'get-prompt':
if (args.length < 2) {
console.log('Usage: get-prompt <name> [args]');
}
else {
const promptName = args[1];
let promptArgs = {};
if (args.length > 2) {
try {
promptArgs = JSON.parse(args.slice(2).join(' '));
}
catch {
console.log('Invalid JSON arguments. Using empty args.');
}
}
await getPrompt(promptName, promptArgs);
}
break;
case 'list-resources':
await listResources();
break;
case 'read-resource':
if (args.length < 2) {
console.log('Usage: read-resource <uri>');
}
else {
await readResource(args[1]);
}
break;
case 'help':
printHelp();
break;
case 'quit':
case 'exit':
await cleanup();
return;
default:
if (command) {
console.log(`Unknown command: ${command}`);
}
break;
}
}
catch (error) {
console.error(`Error executing command: ${error}`);
}
// Continue the command loop
commandLoop();
});
}
async function connect(url) {
if (client) {
console.log('Already connected. Disconnect first.');
return;
}
if (url) {
serverUrl = url;
}
console.log(`Connecting to ${serverUrl}...`);
try {
// Create task store for client-side task support
const clientTaskStore = new in_memory_js_1.InMemoryTaskStore();
// Create a new client with form elicitation capability and task support
client = new index_js_1.Client({
name: 'example-client',
version: '1.0.0'
}, {
capabilities: {
elicitation: {
form: {}
},
tasks: {
requests: {
elicitation: {
create: {}
}
}
}
},
taskStore: clientTaskStore
});
client.onerror = error => {
console.error('\x1b[31mClient error:', error, '\x1b[0m');
};
// Set up elicitation request handler with proper validation and task support
client.setRequestHandler(types_js_1.ElicitRequestSchema, async (request, extra) => {
if (request.params.mode !== 'form') {
throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Unsupported elicitation mode: ${request.params.mode}`);
}
console.log('\n🔔 Elicitation (form) Request Received:');
console.log(`Message: ${request.params.message}`);
console.log(`Related Task: ${request.params._meta?.[types_js_1.RELATED_TASK_META_KEY]?.taskId}`);
console.log(`Task Creation Requested: ${request.params.task ? 'yes' : 'no'}`);
console.log('Requested Schema:');
console.log(JSON.stringify(request.params.requestedSchema, null, 2));
// Helper to return result, optionally creating a task if requested
const returnResult = async (result) => {
if (request.params.task && extra.taskStore) {
// Create a task and store the result
const task = await extra.taskStore.createTask({ ttl: extra.taskRequestedTtl });
await extra.taskStore.storeTaskResult(task.taskId, 'completed', result);
console.log(`📋 Created client-side task: ${task.taskId}`);
return { task };
}
return result;
};
const schema = request.params.requestedSchema;
const properties = schema.properties;
const required = schema.required || [];
// Set up AJV validator for the requested schema
const ajv = new ajv_1.Ajv();
const validate = ajv.compile(schema);
let attempts = 0;
const maxAttempts = 3;
while (attempts < maxAttempts) {
attempts++;
console.log(`\nPlease provide the following information (attempt ${attempts}/${maxAttempts}):`);
const content = {};
let inputCancelled = false;
// Collect input for each field
for (const [fieldName, fieldSchema] of Object.entries(properties)) {
const field = fieldSchema;
const isRequired = required.includes(fieldName);
let prompt = `${field.title || fieldName}`;
// Add helpful information to the prompt
if (field.description) {
prompt += ` (${field.description})`;
}
if (field.enum) {
prompt += ` [options: ${field.enum.join(', ')}]`;
}
if (field.type === 'number' || field.type === 'integer') {
if (field.minimum !== undefined && field.maximum !== undefined) {
prompt += ` [${field.minimum}-${field.maximum}]`;
}
else if (field.minimum !== undefined) {
prompt += ` [min: ${field.minimum}]`;
}
else if (field.maximum !== undefined) {
prompt += ` [max: ${field.maximum}]`;
}
}
if (field.type === 'string' && field.format) {
prompt += ` [format: ${field.format}]`;
}
if (isRequired) {
prompt += ' *required*';
}
if (field.default !== undefined) {
prompt += ` [default: ${field.default}]`;
}
prompt += ': ';
const answer = await new Promise(resolve => {
readline.question(prompt, input => {
resolve(input.trim());
});
});
// Check for cancellation
if (answer.toLowerCase() === 'cancel' || answer.toLowerCase() === 'c') {
inputCancelled = true;
break;
}
// Parse and validate the input
try {
if (answer === '' && field.default !== undefined) {
content[fieldName] = field.default;
}
else if (answer === '' && !isRequired) {
// Skip optional empty fields
continue;
}
else if (answer === '') {
throw new Error(`${fieldName} is required`);
}
else {
// Parse the value based on type
let parsedValue;
if (field.type === 'boolean') {
parsedValue = answer.toLowerCase() === 'true' || answer.toLowerCase() === 'yes' || answer === '1';
}
else if (field.type === 'number') {
parsedValue = parseFloat(answer);
if (isNaN(parsedValue)) {
throw new Error(`${fieldName} must be a valid number`);
}
}
else if (field.type === 'integer') {
parsedValue = parseInt(answer, 10);
if (isNaN(parsedValue)) {
throw new Error(`${fieldName} must be a valid integer`);
}
}
else if (field.enum) {
if (!field.enum.includes(answer)) {
throw new Error(`${fieldName} must be one of: ${field.enum.join(', ')}`);
}
parsedValue = answer;
}
else {
parsedValue = answer;
}
content[fieldName] = parsedValue;
}
}
catch (error) {
console.log(`❌ Error: ${error}`);
// Continue to next attempt
break;
}
}
if (inputCancelled) {
return returnResult({ action: 'cancel' });
}
// If we didn't complete all fields due to an error, try again
if (Object.keys(content).length !==
Object.keys(properties).filter(name => required.includes(name) || content[name] !== undefined).length) {
if (attempts < maxAttempts) {
console.log('Please try again...');
continue;
}
else {
console.log('Maximum attempts reached. Declining request.');
return returnResult({ action: 'decline' });
}
}
// Validate the complete object against the schema
const isValid = validate(content);
if (!isValid) {
console.log('❌ Validation errors:');
validate.errors?.forEach(error => {
console.log(` - ${error.instancePath || 'root'}: ${error.message}`);
});
if (attempts < maxAttempts) {
console.log('Please correct the errors and try again...');
continue;
}
else {
console.log('Maximum attempts reached. Declining request.');
return returnResult({ action: 'decline' });
}
}
// Show the collected data and ask for confirmation
console.log('\n✅ Collected data:');
console.log(JSON.stringify(content, null, 2));
const confirmAnswer = await new Promise(resolve => {
readline.question('\nSubmit this information? (yes/no/cancel): ', input => {
resolve(input.trim().toLowerCase());
});
});
switch (confirmAnswer) {
case 'yes':
case 'y': {
return returnResult({
action: 'accept',
content: content
});
}
case 'cancel':
case 'c': {
return returnResult({ action: 'cancel' });
}
case 'no':
case 'n': {
if (attempts < maxAttempts) {
console.log('Please re-enter the information...');
continue;
}
else {
return returnResult({ action: 'decline' });
}
break;
}
}
}
console.log('Maximum attempts reached. Declining request.');
return returnResult({ action: 'decline' });
});
transport = new streamableHttp_js_1.StreamableHTTPClientTransport(new URL(serverUrl), {
sessionId: sessionId
});
// Set up notification handlers
client.setNotificationHandler(types_js_1.LoggingMessageNotificationSchema, notification => {
notificationCount++;
console.log(`\nNotification #${notificationCount}: ${notification.params.level} - ${notification.params.data}`);
// Re-display the prompt
process.stdout.write('> ');
});
client.setNotificationHandler(types_js_1.ResourceListChangedNotificationSchema, async (_) => {
console.log(`\nResource list changed notification received!`);
try {
if (!client) {
console.log('Client disconnected, cannot fetch resources');
return;
}
const resourcesResult = await client.request({
method: 'resources/list',
params: {}
}, types_js_1.ListResourcesResultSchema);
console.log('Available resources count:', resourcesResult.resources.length);
}
catch {
console.log('Failed to list resources after change notification');
}
// Re-display the prompt
process.stdout.write('> ');
});
// Connect the client
await client.connect(transport);
sessionId = transport.sessionId;
console.log('Transport created with session ID:', sessionId);
console.log('Connected to MCP server');
}
catch (error) {
console.error('Failed to connect:', error);
client = null;
transport = null;
}
}
async function disconnect() {
if (!client || !transport) {
console.log('Not connected.');
return;
}
try {
await transport.close();
console.log('Disconnected from MCP server');
client = null;
transport = null;
}
catch (error) {
console.error('Error disconnecting:', error);
}
}
async function terminateSession() {
if (!client || !transport) {
console.log('Not connected.');
return;
}
try {
console.log('Terminating session with ID:', transport.sessionId);
await transport.terminateSession();
console.log('Session terminated successfully');
// Check if sessionId was cleared after termination
if (!transport.sessionId) {
console.log('Session ID has been cleared');
sessionId = undefined;
// Also close the transport and clear client objects
await transport.close();
console.log('Transport closed after session termination');
client = null;
transport = null;
}
else {
console.log('Server responded with 405 Method Not Allowed (session termination not supported)');
console.log('Session ID is still active:', transport.sessionId);
}
}
catch (error) {
console.error('Error terminating session:', error);
}
}
async function reconnect() {
if (client) {
await disconnect();
}
await connect();
}
async function listTools() {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
const toolsRequest = {
method: 'tools/list',
params: {}
};
const toolsResult = await client.request(toolsRequest, types_js_1.ListToolsResultSchema);
console.log('Available tools:');
if (toolsResult.tools.length === 0) {
console.log(' No tools available');
}
else {
for (const tool of toolsResult.tools) {
console.log(` - id: ${tool.name}, name: ${(0, metadataUtils_js_1.getDisplayName)(tool)}, description: ${tool.description}`);
}
}
}
catch (error) {
console.log(`Tools not supported by this server (${error})`);
}
}
async function callTool(name, args) {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
const request = {
method: 'tools/call',
params: {
name,
arguments: args
}
};
console.log(`Calling tool '${name}' with args:`, args);
const result = await client.request(request, types_js_1.CallToolResultSchema);
console.log('Tool result:');
const resourceLinks = [];
result.content.forEach(item => {
if (item.type === 'text') {
console.log(` ${item.text}`);
}
else if (item.type === 'resource_link') {
const resourceLink = item;
resourceLinks.push(resourceLink);
console.log(` 📁 Resource Link: ${resourceLink.name}`);
console.log(` URI: ${resourceLink.uri}`);
if (resourceLink.mimeType) {
console.log(` Type: ${resourceLink.mimeType}`);
}
if (resourceLink.description) {
console.log(` Description: ${resourceLink.description}`);
}
}
else if (item.type === 'resource') {
console.log(` [Embedded Resource: ${item.resource.uri}]`);
}
else if (item.type === 'image') {
console.log(` [Image: ${item.mimeType}]`);
}
else if (item.type === 'audio') {
console.log(` [Audio: ${item.mimeType}]`);
}
else {
console.log(` [Unknown content type]:`, item);
}
});
// Offer to read resource links
if (resourceLinks.length > 0) {
console.log(`\nFound ${resourceLinks.length} resource link(s). Use 'read-resource <uri>' to read their content.`);
}
}
catch (error) {
console.log(`Error calling tool ${name}: ${error}`);
}
}
async function callGreetTool(name) {
await callTool('greet', { name });
}
async function callMultiGreetTool(name) {
console.log('Calling multi-greet tool with notifications...');
await callTool('multi-greet', { name });
}
async function callCollectInfoTool(infoType) {
console.log(`Testing form elicitation with collect-user-info tool (${infoType})...`);
await callTool('collect-user-info', { infoType });
}
async function callCollectInfoWithTask(infoType) {
console.log(`\n🔄 Testing bidirectional task support with collect-user-info-task tool (${infoType})...`);
console.log('This will create a task on the server, which will elicit input and create a task on the client.\n');
await callToolTask('collect-user-info-task', { infoType });
}
async function startNotifications(interval, count) {
console.log(`Starting notification stream: interval=${interval}ms, count=${count || 'unlimited'}`);
await callTool('start-notification-stream', { interval, count });
}
async function runNotificationsToolWithResumability(interval, count) {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
console.log(`Starting notification stream with resumability: interval=${interval}ms, count=${count || 'unlimited'}`);
console.log(`Using resumption token: ${notificationsToolLastEventId || 'none'}`);
const request = {
method: 'tools/call',
params: {
name: 'start-notification-stream',
arguments: { interval, count }
}
};
const onLastEventIdUpdate = (event) => {
notificationsToolLastEventId = event;
console.log(`Updated resumption token: ${event}`);
};
const result = await client.request(request, types_js_1.CallToolResultSchema, {
resumptionToken: notificationsToolLastEventId,
onresumptiontoken: onLastEventIdUpdate
});
console.log('Tool result:');
result.content.forEach(item => {
if (item.type === 'text') {
console.log(` ${item.text}`);
}
else {
console.log(` ${item.type} content:`, item);
}
});
}
catch (error) {
console.log(`Error starting notification stream: ${error}`);
}
}
async function listPrompts() {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
const promptsRequest = {
method: 'prompts/list',
params: {}
};
const promptsResult = await client.request(promptsRequest, types_js_1.ListPromptsResultSchema);
console.log('Available prompts:');
if (promptsResult.prompts.length === 0) {
console.log(' No prompts available');
}
else {
for (const prompt of promptsResult.prompts) {
console.log(` - id: ${prompt.name}, name: ${(0, metadataUtils_js_1.getDisplayName)(prompt)}, description: ${prompt.description}`);
}
}
}
catch (error) {
console.log(`Prompts not supported by this server (${error})`);
}
}
async function getPrompt(name, args) {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
const promptRequest = {
method: 'prompts/get',
params: {
name,
arguments: args
}
};
const promptResult = await client.request(promptRequest, types_js_1.GetPromptResultSchema);
console.log('Prompt template:');
promptResult.messages.forEach((msg, index) => {
console.log(` [${index + 1}] ${msg.role}: ${msg.content.type === 'text' ? msg.content.text : JSON.stringify(msg.content)}`);
});
}
catch (error) {
console.log(`Error getting prompt ${name}: ${error}`);
}
}
async function listResources() {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
const resourcesRequest = {
method: 'resources/list',
params: {}
};
const resourcesResult = await client.request(resourcesRequest, types_js_1.ListResourcesResultSchema);
console.log('Available resources:');
if (resourcesResult.resources.length === 0) {
console.log(' No resources available');
}
else {
for (const resource of resourcesResult.resources) {
console.log(` - id: ${resource.name}, name: ${(0, metadataUtils_js_1.getDisplayName)(resource)}, description: ${resource.uri}`);
}
}
}
catch (error) {
console.log(`Resources not supported by this server (${error})`);
}
}
async function readResource(uri) {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
const request = {
method: 'resources/read',
params: { uri }
};
console.log(`Reading resource: ${uri}`);
const result = await client.request(request, types_js_1.ReadResourceResultSchema);
console.log('Resource contents:');
for (const content of result.contents) {
console.log(` URI: ${content.uri}`);
if (content.mimeType) {
console.log(` Type: ${content.mimeType}`);
}
if ('text' in content && typeof content.text === 'string') {
console.log(' Content:');
console.log(' ---');
console.log(content.text
.split('\n')
.map((line) => ' ' + line)
.join('\n'));
console.log(' ---');
}
else if ('blob' in content && typeof content.blob === 'string') {
console.log(` [Binary data: ${content.blob.length} bytes]`);
}
}
}
catch (error) {
console.log(`Error reading resource ${uri}: ${error}`);
}
}
async function callToolTask(name, args) {
if (!client) {
console.log('Not connected to server.');
return;
}
console.log(`Calling tool '${name}' with task-based execution...`);
console.log('Arguments:', args);
// Use task-based execution - call now, fetch later
// Using the experimental tasks API - WARNING: may change without notice
console.log('This will return immediately while processing continues in the background...');
try {
// Call the tool with task metadata using streaming API
const stream = client.experimental.tasks.callToolStream({
name,
arguments: args
}, types_js_1.CallToolResultSchema, {
task: {
ttl: 60000 // Keep results for 60 seconds
}
});
console.log('Waiting for task completion...');
let lastStatus = '';
for await (const message of stream) {
switch (message.type) {
case 'taskCreated':
console.log('Task created successfully with ID:', message.task.taskId);
break;
case 'taskStatus':
if (lastStatus !== message.task.status) {
console.log(` ${message.task.status}${message.task.statusMessage ? ` - ${message.task.statusMessage}` : ''}`);
}
lastStatus = message.task.status;
break;
case 'result':
console.log('Task completed!');
console.log('Tool result:');
message.result.content.forEach(item => {
if (item.type === 'text') {
console.log(` ${item.text}`);
}
});
break;
case 'error':
throw message.error;
}
}
}
catch (error) {
console.log(`Error with task-based execution: ${error}`);
}
}
async function cleanup() {
if (client && transport) {
try {
// First try to terminate the session gracefully
if (transport.sessionId) {
try {
console.log('Terminating session before exit...');
await transport.terminateSession();
console.log('Session terminated successfully');
}
catch (error) {
console.error('Error terminating session:', error);
}
}
// Then close the transport
await transport.close();
}
catch (error) {
console.error('Error closing transport:', error);
}
}
process.stdin.setRawMode(false);
readline.close();
console.log('\nGoodbye!');
process.exit(0);
}
// Set up raw mode for keyboard input to capture Escape key
process.stdin.setRawMode(true);
process.stdin.on('data', async (data) => {
// Check for Escape key (27)
if (data.length === 1 && data[0] === 27) {
console.log('\nESC key pressed. Disconnecting from server...');
// Abort current operation and disconnect from server
if (client && transport) {
await disconnect();
console.log('Disconnected. Press Enter to continue.');
}
else {
console.log('Not connected to server.');
}
// Re-display the prompt
process.stdout.write('> ');
}
});
// Handle Ctrl+C
process.on('SIGINT', async () => {
console.log('\nReceived SIGINT. Cleaning up...');
await cleanup();
});
// Start the interactive client
main().catch((error) => {
console.error('Error running MCP client:', error);
process.exit(1);
});
//# sourceMappingURL=simpleStreamableHttp.js.map
@@ -0,0 +1,37 @@
# @eslint-community/eslint-utils
[![npm version](https://img.shields.io/npm/v/@eslint-community/eslint-utils.svg)](https://www.npmjs.com/package/@eslint-community/eslint-utils)
[![Downloads/month](https://img.shields.io/npm/dm/@eslint-community/eslint-utils.svg)](http://www.npmtrends.com/@eslint-community/eslint-utils)
[![Build Status](https://github.com/eslint-community/eslint-utils/workflows/CI/badge.svg)](https://github.com/eslint-community/eslint-utils/actions)
[![Coverage Status](https://codecov.io/gh/eslint-community/eslint-utils/branch/main/graph/badge.svg)](https://codecov.io/gh/eslint-community/eslint-utils)
## 🏁 Goal
This package provides utility functions and classes for make ESLint custom rules.
For examples:
- [`getStaticValue`](https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue) evaluates static value on AST.
- [`ReferenceTracker`](https://eslint-community.github.io/eslint-utils/api/scope-utils.html#referencetracker-class) checks the members of modules/globals as handling assignments and destructuring.
## 📖 Usage
See [documentation](https://eslint-community.github.io/eslint-utils).
## 📰 Changelog
See [releases](https://github.com/eslint-community/eslint-utils/releases).
## ❤️ Contributing
Welcome contributing!
Please use GitHub's Issues/PRs.
### Development Tools
- `npm run test-coverage` runs tests and measures coverage.
- `npm run clean` removes the coverage result of `npm run test-coverage` command.
- `npm run coverage` shows the coverage result of the last `npm run test-coverage` command.
- `npm run lint` runs ESLint.
- `npm run watch` runs tests on each file change.
@@ -0,0 +1,15 @@
The ISC License
Copyright (c) 2015, 2019 Elan Shanker, 2021 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors
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 @@
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/server/auth/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;aAKb,QAAQ,CAAC,EAAE,MAAM;IAJrC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC;gBAGrB,OAAO,EAAE,MAAM,EACC,QAAQ,CAAC,EAAE,MAAM,YAAA;IAMrC;;OAEG;IACH,gBAAgB,IAAI,kBAAkB;IAatC,IAAI,SAAS,IAAI,MAAM,CAEtB;CACJ;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,UAAU;IAC/C,MAAM,CAAC,SAAS,SAAqB;CACxC;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,UAAU;IAC9C,MAAM,CAAC,SAAS,SAAoB;CACvC;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,UAAU;IAC7C,MAAM,CAAC,SAAS,SAAmB;CACtC;AAED;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,UAAU;IACnD,MAAM,CAAC,SAAS,SAAyB;CAC5C;AAED;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,UAAU;IACrD,MAAM,CAAC,SAAS,SAA4B;CAC/C;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,UAAU;IAC7C,MAAM,CAAC,SAAS,SAAmB;CACtC;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,UAAU;IAC7C,MAAM,CAAC,SAAS,SAAmB;CACtC;AAED;;;GAGG;AACH,qBAAa,WAAY,SAAQ,UAAU;IACvC,MAAM,CAAC,SAAS,SAAkB;CACrC;AAED;;;GAGG;AACH,qBAAa,2BAA4B,SAAQ,UAAU;IACvD,MAAM,CAAC,SAAS,SAA6B;CAChD;AAED;;;GAGG;AACH,qBAAa,4BAA6B,SAAQ,UAAU;IACxD,MAAM,CAAC,SAAS,SAA+B;CAClD;AAED;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,UAAU;IACrD,MAAM,CAAC,SAAS,SAA4B;CAC/C;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,UAAU;IAC7C,MAAM,CAAC,SAAS,SAAmB;CACtC;AAED;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,UAAU;IACjD,MAAM,CAAC,SAAS,SAAwB;CAC3C;AAED;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,UAAU;IAChD,MAAM,CAAC,SAAS,SAAuB;CAC1C;AAED;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,UAAU;IACtD,MAAM,CAAC,SAAS,SAA6B;CAChD;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,UAAU;IAClD,MAAM,CAAC,SAAS,SAAwB;CAC3C;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,UAAU;IAC9C,MAAM,CAAC,SAAS,SAAoB;CACvC;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAExC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,MAAM,EACxC,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM;IAKrB,IAAI,SAAS,IAAI,MAAM,CAEtB;CACJ;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;CAkBf,CAAC"}
@@ -0,0 +1,717 @@
flf2a$ 7 5 20 -1 2
rozzo.flf font by Mike Rosulek [unar2@sfa.ope.ed.gov] 1/12/95
This was based on FujiyamaBlack TrueType Font.
$$#
$$#
$$#
$$#
$$#
$$#
$$##
888$#
888$#
"8"$#
e $#
"8"$#
$#
$##
8 8$#
8 8$#
$#
$#
$#
$#
$##
d8P d8"$#
88888888888$#
d8P d8P $#
88888888888$#
e8P d8P $#
$#
$##
8 $#
d8 8e $#
C88 $#
Y8 8b $#
88D$#
"8 8P $#
8 $##
,8, / $#
"8"/ $#
/ $#
/,8, $#
/ "8" $#
$#
$##
d8b,$#
,db YP'$#
e Y8b ,$#
d8b Y8b" $#
Y88b Y8b $#
$#
$##
d8b$#
Y8P$#
,P $#
P $#
$#
$#
$##
e88$#
d888$#
e8888$#
88888$#
"8888$#
Y888$#
"88$##
88e $#
888b $#
8888e$#
88888$#
8888"$#
888P $#
88" $##
Yb 8 dP$#
`D8K' $#
dP 8 Yb$#
$#
$#
$#
$##
$#
8 $#
88888$#
8 $#
$#
$#
$##
$#
$#
$#
d8b$#
Y8P$#
,P $#
P $##
$#
$#
888$#
$#
$#
$#
$##
$#
$#
$#
d8b$#
Y8P$#
$#
$##
d8P$#
d8P $#
d8P $#
d8P $#
d8P $#
$#
$##
e88 88e $#
d888 888b $#
C8888 8888D$#
Y888 888P $#
"88 88" $#
$#
$##
d88$#
d888$#
d"888$#
888$#
888$#
$#
$##
,8,"88e $#
" 888D$#
88P $#
,*" $#
8888888$#
$#
$##
,8,"88b,$#
" ,88P'$#
C8K $#
e `88b,$#
"8",88P'$#
$#
$##
d 888 $#
d8 888 $#
d88 888e$#
""" 888"$#
888 $#
$#
$##
8888888$#
88 $#
"""Y88b$#
e 888$#
"8",88P$#
$#
$##
e88",8, $#
d888 " $#
C8888 88e $#
Y888 888D$#
"88 88" $#
$#
$##
888888$#
,e$#
,eP $#
,e8P $#
88P $#
$#
$##
,d8 8b, $#
"Y8 8P" $#
,d8 8b, $#
C888 888D$#
"Y8 8P" $#
$#
$##
e88 88e $#
C888 888b $#
"88 8888D$#
e 888P $#
"8",88" $#
$#
$##
d8b$#
Y8P$#
$#
d8b$#
Y8P$#
$#
$##
d8b$#
Y8P$#
$#
d8b$#
Y8P$#
,P $#
P $##
d8P$#
d8P $#
C8K $#
Y8b $#
Y8b$#
$#
$##
$#
8888888$#
$#
8888888$#
$#
$#
$##
Y8b $#
Y8b $#
D8D$#
d8P $#
d8P $#
$#
$##
,8,'88b $#
" 888D$#
88P $#
,"' $#
"8" $#
$#
$##
,e""""e, $#
e" e"""e"e$#
8 C 8 8$#
"e "*ee"*"$#
`"eeeee" $#
$#
$##
e Y8b $#
d8b Y8b $#
d888b Y8b $#
d888888888b $#
d8888888b Y8b$#
$#
$##
888 88b,$#
888 88P'$#
888 8K $#
888 88b,$#
888 88P'$#
$#
$##
e88'Y88$#
d888 'Y$#
C8888 $#
Y888 ,d$#
"88,d88$#
$#
$##
888 88e $#
888 888b $#
888 8888D$#
888 888P $#
888 88" $#
$#
$##
888'Y88$#
888 ,'Y$#
888C8 $#
888 ",d$#
888,d88$#
$#
$##
888'Y88$#
888 ,'Y$#
888C8 $#
888 " $#
888 $#
$#
$##
e88'Y88 $#
d888 'Y $#
C8888 eeee$#
Y888 888P$#
"88 88" $#
$#
$##
888 888$#
888 888$#
8888888$#
888 888$#
888 888$#
$#
$##
888$#
888$#
888$#
888$#
888$#
$#
$##
888$#
888$#
888$#
e 88P$#
"8",P' $#
$#
$##
888 88P$#
888 8P $#
888 K $#
888 8b $#
888 88b$#
$#
$##
888 $#
888 $#
888 $#
888 ,d$#
888,d88$#
$#
$##
e e $#
d8b d8b $#
e Y8b Y8b $#
d8b Y8b Y8b $#
d888b Y8b Y8b$#
$#
$##
Y88b Y88$#
Y88b Y8$#
b Y88b Y$#
8b Y88b $#
88b Y88b$#
$#
$##
e88 88e $#
d888 888b $#
C8888 8888D$#
Y888 888P $#
"88 88" $#
$#
$##
888 88e $#
888 888D$#
888 88" $#
888 $#
888 $#
$#
$##
e88 88e $#
d888 888b $#
C8888 8888D$#
Y888 888P $#
"88 88" $#
b $#
8b, $##
888 88e $#
888 888D$#
888 88" $#
888 b, $#
888 88b,$#
$#
$##
dP"8$#
C8b Y$#
Y8b $#
b Y8D$#
8edP $#
$#
$##
88P'888'Y88$#
P' 888 'Y$#
888 $#
888 $#
888 $#
$#
$##
8888 8888$#
8888 8888$#
8888 8888$#
8888 8888$#
'Y88 88P'$#
$#
$##
Y8b Y88888P$#
Y8b Y888P $#
Y8b Y8P $#
Y8b Y $#
Y8P $#
$#
$##
Y8b Y8b Y888P$#
Y8b Y8b Y8P $#
Y8b Y8b Y $#
Y8b Y8b $#
Y8P Y $#
$#
$##
Y8b Y8P$#
Y8b Y $#
Y8b $#
e Y8b $#
d8b Y8b$#
$#
$##
Y88b Y8P$#
Y88b Y $#
Y88b $#
888 $#
888 $#
$#
$##
8P d8P$#
P d8P $#
d8P d$#
d8P d8$#
d8P d88$#
$#
$##
8888$#
88 $#
88 $#
88 $#
88 $#
88 $#
8888$##
d8P$#
d8P $#
d8P $#
d8P $#
d8P $#
$#
$##
8888$#
88$#
88$#
88$#
88$#
88$#
8888$##
d8b $#
dP Yb$#
$#
$#
$#
$#
$##
$#
$#
$#
$#
$#
888$#
$##
Y88$#
Y8$#
Y$#
$#
$#
$#
$##
$#
,"Y88b$#
"8" 888$#
,ee 888$#
"88 888$#
$#
$##
888 $#
888 88e $#
888 888b$#
888 888P$#
888 88" $#
$#
$##
$#
e88'888$#
d888 '8$#
Y888 ,$#
"88,e8'$#
$#
$##
888$#
e88 888$#
d888 888$#
Y888 888$#
"88 888$#
$#
$##
$#
,e e, $#
d88 88b$#
888 ,$#
"YeeP"$#
$#
$##
dP,e,$#
8b " $#
888888$#
888 $#
888 $#
$#
$##
$#
e88 888$#
d888 888$#
Y888 888$#
"88 888$#
, 88P$#
"8",P" $##
888 $#
888 ee $#
888 88b$#
888 888$#
888 888$#
$#
$##
,e,$#
" $#
888$#
888$#
888$#
$#
$##
,e,$#
" $#
888$#
888$#
888$#
88P$#
8" $##
888 $#
888 ee$#
888 P $#
888 b $#
888 8b$#
$#
$##
888$#
888$#
888$#
888$#
888$#
$#
$##
$#
888 888 8e $#
888 888 88b$#
888 888 888$#
888 888 888$#
$#
$##
$#
888 8e $#
888 88b$#
888 888$#
888 888$#
$#
$##
$#
e88 88e $#
d888 888b$#
Y888 888P$#
"88 88" $#
$#
$##
$#
888 88e $#
888 888b$#
888 888P$#
888 88" $#
888 $#
888 $##
$#
e88 888$#
d888 888$#
Y888 888$#
"88 888$#
888$#
888$##
$#
888,8,$#
888 " $#
888 $#
888 $#
$#
$##
$#
dP"Y$#
C88b $#
Y88D$#
d,dP $#
$#
$##
d8 $#
d88 $#
d88888$#
888 $#
888 $#
$#
$##
$#
8888 8888$#
8888 8888$#
Y888 888P$#
"88 88" $#
$#
$##
$#
Y8b Y888P$#
Y8b Y8P $#
Y8b " $#
Y8P $#
$#
$##
$#
Y8b Y8b Y888P$#
Y8b Y8b Y8P $#
Y8b Y8b " $#
YP Y8P $#
$#
$##
$#
Y8b Y8Y$#
Y8b Y $#
e Y8b $#
d8b Y8b $#
$#
$##
$#
Y8b Y888P$#
Y8b Y8P $#
Y8b Y $#
888 $#
888 $#
888 $##
$#
8P d8P$#
P d8P $#
d8P d$#
d8P d8$#
$#
$##
,888$#
88 $#
e8P $#
C8K $#
"8b $#
88 $#
"888$##
88$#
88$#
88$#
88$#
88$#
88$#
88$##
888, $#
88 $#
Y8 $#
D8D$#
d8 $#
88 $#
888" $##
,d8b,d8$#
8P"Y8P"$#
$#
$#
$#
$#
$##
e e Y8b e $#
"8"d8b Y8b"8"$#
d888b Y8b $#
d888888888b $#
d8888888b Y8b$#
$#
$##
e e88 88e e $#
"8"d888 888b"8"$#
C8888 8888D $#
Y888 888P $#
"88 88" $#
$#
$##
e 8888 8888 e $#
"8" 8888 8888 "8"$#
8888 8888 $#
Y888 888P $#
"88 88" $#
$#
$##
e e $#
"8","Y88b"8"$#
"8" 888 $#
,ee 888 $#
"88 888 $#
$#
$##
$#
e e88 88e e $#
"8"d888 888b"8"$#
Y888 888P $#
"88 88" $#
$#
$##
e e $#
"8"8888 8888"8"$#
8888 8888 $#
Y888 888P $#
"88 88" $#
$#
$##
$#
dP"Y$#
C88b $#
Y88D$#
d,dP $#
$#
$##
@@ -0,0 +1,121 @@
import { U as isParenthesised, f as createRule, g as import_ast_utils, k as getPrecedence } from "../utils.js";
const ARITHMETIC_OPERATORS = [
"+",
"-",
"*",
"/",
"%",
"**"
];
const BITWISE_OPERATORS = [
"&",
"|",
"^",
"~",
"<<",
">>",
">>>"
];
const COMPARISON_OPERATORS = [
"==",
"!=",
"===",
"!==",
">",
">=",
"<",
"<="
];
const LOGICAL_OPERATORS = ["&&", "||"];
const RELATIONAL_OPERATORS = ["in", "instanceof"];
const ALL_OPERATORS = [].concat(ARITHMETIC_OPERATORS, BITWISE_OPERATORS, COMPARISON_OPERATORS, LOGICAL_OPERATORS, RELATIONAL_OPERATORS, ["?:"], ["??"]);
const DEFAULT_GROUPS = [
ARITHMETIC_OPERATORS,
BITWISE_OPERATORS,
COMPARISON_OPERATORS,
LOGICAL_OPERATORS,
RELATIONAL_OPERATORS
];
const TARGET_NODE_TYPE = /^(?:Binary|Logical|Conditional)Expression$/u;
function includesBothInAGroup(groups, left, right) {
return groups.some((group) => group.includes(left) && group.includes(right));
}
function getChildNode(node) {
return node.type === "ConditionalExpression" ? node.test : node.left;
}
var no_mixed_operators_default = createRule({
name: "no-mixed-operators",
meta: {
type: "layout",
docs: { description: "Disallow mixed binary operators" },
schema: [{
type: "object",
properties: {
groups: {
type: "array",
items: {
type: "array",
items: {
type: "string",
enum: ALL_OPERATORS
},
minItems: 2,
uniqueItems: true
},
uniqueItems: true
},
allowSamePrecedence: { type: "boolean" }
},
additionalProperties: false
}],
defaultOptions: [{
groups: DEFAULT_GROUPS,
allowSamePrecedence: true
}],
messages: { unexpectedMixedOperator: "Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations." }
},
create(context, [options]) {
const sourceCode = context.sourceCode;
const { groups, allowSamePrecedence } = options;
function shouldIgnore(node) {
const a = node;
const b = node.parent;
return !includesBothInAGroup(groups, a.operator, b.type === "ConditionalExpression" ? "?:" : b.operator) || allowSamePrecedence && getPrecedence(a) === getPrecedence(b);
}
function isMixedWithParent(node) {
return node.operator !== node.parent.operator && !isParenthesised(sourceCode, node);
}
function getOperatorToken(node) {
return sourceCode.getTokenAfter(getChildNode(node), import_ast_utils.isNotClosingParenToken);
}
function reportBothOperators(node) {
const parent = node.parent;
const left = getChildNode(parent) === node ? node : parent;
const right = getChildNode(parent) !== node ? node : parent;
const data = {
leftOperator: left.operator || "?:",
rightOperator: right.operator || "?:"
};
context.report({
node: left,
loc: getOperatorToken(left).loc,
messageId: "unexpectedMixedOperator",
data
});
context.report({
node: right,
loc: getOperatorToken(right).loc,
messageId: "unexpectedMixedOperator",
data
});
}
function check(node) {
if (TARGET_NODE_TYPE.test(node.parent.type) && isMixedWithParent(node) && !shouldIgnore(node)) reportBothOperators(node);
}
return {
BinaryExpression: check,
LogicalExpression: check
};
}
});
export { no_mixed_operators_default as t };
@@ -0,0 +1,8 @@
import 'node:fs';
import 'node:url';
import 'magic-string';
export { a as automockModule } from './chunk-automock.js';
import 'estree-walker';
import 'node:module';
import 'node:path';
import './chunk-helpers.js';
@@ -0,0 +1 @@
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/metadata.ts"],"names":[],"mappings":";;;AAEA,6CAAoD;AAEpD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,QAAQ;IACpB,IAAI,CAAC,GAAe;QAClB,aAAa,CAAC,GAAG,CAAC,CAAA;QAClB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC7B,IAAI,IAAA,wBAAiB,EAAC,EAAE,EAAE,MAAM,CAAC;YAAE,OAAM;QACzC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/B,GAAG,CAAC,SAAS,CAAC,EAAC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;QAC9D,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;IACf,CAAC;CACF,CAAA;AAED,SAAgB,aAAa,CAAC,EAAC,EAAE,EAAE,OAAO,EAAa,EAAE,QAAkB;IACzE,IAAI,EAAE,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,SAAS,OAAO,0CAA0C,CAAC,CAAA;IAC7E,CAAC;AACH,CAAC;AAJD,sCAIC;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1,8 @@
/**
* Pure function - doesn't mutate either parameter!
* Uses the default options and overrides with the options provided by the user
* @param defaultOptions the defaults
* @param userOptions the user opts
* @returns the options with defaults
*/
export declare function applyDefault<User extends readonly unknown[], Default extends User>(defaultOptions: Readonly<Default>, userOptions: Readonly<User> | null): Default;
@@ -0,0 +1,485 @@
"use client";
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
const require_utils = require("./utils.cjs");
const require_ClientOnly = require("./ClientOnly.cjs");
const require_useRouter = require("./useRouter.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");
let react_dom = require("react-dom");
//#region src/link.tsx
/**
* Build anchor-like props for declarative navigation and preloading.
*
* Returns stable `href`, event handlers and accessibility props derived from
* router options and active state. Used internally by `Link` and custom links.
*
* Options cover `to`, `params`, `search`, `hash`, `state`, `preload`,
* `activeProps`, `inactiveProps`, and more.
*
* @returns React anchor props suitable for `<a>` or custom components.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLinkPropsHook
*/
function useLinkProps(options, forwardedRef) {
const router = require_useRouter.useRouter();
const innerRef = require_utils.useForwardedRef(forwardedRef);
const _isServer = _tanstack_router_core_isServer.isServer ?? router.isServer;
const { activeProps, inactiveProps, activeOptions, to, preload: userPreload, preloadDelay: userPreloadDelay, preloadIntentProximity: _preloadIntentProximity, hashScrollIntoView, replace, startTransition, resetScroll, viewTransition, children, target, disabled, style, className, onClick, onBlur, onFocus, onMouseEnter, onMouseLeave, onTouchStart, ignoreBlocker, params: _params, search: _search, hash: _hash, state: _state, mask: _mask, reloadDocument: _reloadDocument, unsafeRelative: _unsafeRelative, from: _from, _fromLocation, ...propsSafeToSpread } = options;
if (_isServer) {
const safeInternal = isSafeInternal(to);
if (typeof to === "string" && !safeInternal && to.indexOf(":") > -1) try {
new URL(to);
if ((0, _tanstack_router_core.isDangerousProtocol)(to, router.protocolAllowlist)) {
if (process.env.NODE_ENV !== "production") console.warn(`Blocked Link with dangerous protocol: ${to}`);
return {
...propsSafeToSpread,
ref: innerRef,
href: void 0,
...children && { children },
...target && { target },
...disabled && { disabled },
...style && { style },
...className && { className }
};
}
return {
...propsSafeToSpread,
ref: innerRef,
href: to,
...children && { children },
...target && { target },
...disabled && { disabled },
...style && { style },
...className && { className }
};
} catch {}
const next = router.buildLocation({
...options,
from: options.from
});
const hrefOption = getHrefOption(next.maskedLocation ? next.maskedLocation.publicHref : next.publicHref, next.maskedLocation ? next.maskedLocation.external : next.external, router.history, disabled);
const externalLink = (() => {
if (hrefOption?.external) {
if ((0, _tanstack_router_core.isDangerousProtocol)(hrefOption.href, router.protocolAllowlist)) {
if (process.env.NODE_ENV !== "production") console.warn(`Blocked Link with dangerous protocol: ${hrefOption.href}`);
return;
}
return hrefOption.href;
}
if (safeInternal) return void 0;
if (typeof to === "string" && to.indexOf(":") > -1) try {
new URL(to);
if ((0, _tanstack_router_core.isDangerousProtocol)(to, router.protocolAllowlist)) {
if (process.env.NODE_ENV !== "production") console.warn(`Blocked Link with dangerous protocol: ${to}`);
return;
}
return to;
} catch {}
})();
const isActive = (() => {
if (externalLink) return false;
const currentLocation = router.stores.location.get();
const exact = activeOptions?.exact ?? false;
if (exact) {
if (!(0, _tanstack_router_core.exactPathTest)(currentLocation.pathname, next.pathname, router.basepath)) return false;
} else {
const currentPathSplit = (0, _tanstack_router_core.removeTrailingSlash)(currentLocation.pathname, router.basepath);
const nextPathSplit = (0, _tanstack_router_core.removeTrailingSlash)(next.pathname, router.basepath);
if (!(currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === "/"))) return false;
}
if (activeOptions?.includeSearch ?? true) {
if (currentLocation.search !== next.search) {
const currentSearchEmpty = !currentLocation.search || typeof currentLocation.search === "object" && !(0, _tanstack_router_core.hasKeys)(currentLocation.search);
const nextSearchEmpty = !next.search || typeof next.search === "object" && !(0, _tanstack_router_core.hasKeys)(next.search);
if (!(currentSearchEmpty && nextSearchEmpty)) {
if (!(0, _tanstack_router_core.deepEqual)(currentLocation.search, next.search, {
partial: !exact,
ignoreUndefined: !activeOptions?.explicitUndefined
})) return false;
}
}
}
if (activeOptions?.includeHash) return false;
return true;
})();
if (externalLink) return {
...propsSafeToSpread,
ref: innerRef,
href: externalLink,
...children && { children },
...target && { target },
...disabled && { disabled },
...style && { style },
...className && { className }
};
const resolvedActiveProps = isActive ? (0, _tanstack_router_core.functionalUpdate)(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;
const resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : (0, _tanstack_router_core.functionalUpdate)(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;
const resolvedStyle = (() => {
const baseStyle = style;
const activeStyle = resolvedActiveProps.style;
const inactiveStyle = resolvedInactiveProps.style;
if (!baseStyle && !activeStyle && !inactiveStyle) return;
if (baseStyle && !activeStyle && !inactiveStyle) return baseStyle;
if (!baseStyle && activeStyle && !inactiveStyle) return activeStyle;
if (!baseStyle && !activeStyle && inactiveStyle) return inactiveStyle;
return {
...baseStyle,
...activeStyle,
...inactiveStyle
};
})();
const resolvedClassName = (() => {
const baseClassName = className;
const activeClassName = resolvedActiveProps.className;
const inactiveClassName = resolvedInactiveProps.className;
if (!baseClassName && !activeClassName && !inactiveClassName) return "";
let out = "";
if (baseClassName) out = baseClassName;
if (activeClassName) out = out ? `${out} ${activeClassName}` : activeClassName;
if (inactiveClassName) out = out ? `${out} ${inactiveClassName}` : inactiveClassName;
return out;
})();
return {
...propsSafeToSpread,
...resolvedActiveProps,
...resolvedInactiveProps,
href: hrefOption?.href,
ref: innerRef,
disabled: !!disabled,
target,
...resolvedStyle && { style: resolvedStyle },
...resolvedClassName && { className: resolvedClassName },
...disabled && STATIC_DISABLED_PROPS,
...isActive && STATIC_ACTIVE_PROPS
};
}
const isHydrated = require_ClientOnly.useHydrated();
const _options = react.useMemo(() => options, [
router,
options.from,
options._fromLocation,
options.hash,
options.to,
options.search,
options.params,
options.state,
options.mask,
options.unsafeRelative
]);
const currentLocation = (0, _tanstack_react_store.useStore)(router.stores.location, (l) => l, (prev, next) => prev.href === next.href);
const next = react.useMemo(() => {
const opts = {
_fromLocation: currentLocation,
..._options
};
return router.buildLocation(opts);
}, [
router,
currentLocation,
_options
]);
const hrefOptionPublicHref = next.maskedLocation ? next.maskedLocation.publicHref : next.publicHref;
const hrefOptionExternal = next.maskedLocation ? next.maskedLocation.external : next.external;
const hrefOption = react.useMemo(() => getHrefOption(hrefOptionPublicHref, hrefOptionExternal, router.history, disabled), [
disabled,
hrefOptionExternal,
hrefOptionPublicHref,
router.history
]);
const externalLink = react.useMemo(() => {
if (hrefOption?.external) {
if ((0, _tanstack_router_core.isDangerousProtocol)(hrefOption.href, router.protocolAllowlist)) {
if (process.env.NODE_ENV !== "production") console.warn(`Blocked Link with dangerous protocol: ${hrefOption.href}`);
return;
}
return hrefOption.href;
}
if (isSafeInternal(to)) return void 0;
if (typeof to !== "string" || to.indexOf(":") === -1) return void 0;
try {
new URL(to);
if ((0, _tanstack_router_core.isDangerousProtocol)(to, router.protocolAllowlist)) {
if (process.env.NODE_ENV !== "production") console.warn(`Blocked Link with dangerous protocol: ${to}`);
return;
}
return to;
} catch {}
}, [
to,
hrefOption,
router.protocolAllowlist
]);
const isActive = react.useMemo(() => {
if (externalLink) return false;
if (activeOptions?.exact) {
if (!(0, _tanstack_router_core.exactPathTest)(currentLocation.pathname, next.pathname, router.basepath)) return false;
} else {
const currentPathSplit = (0, _tanstack_router_core.removeTrailingSlash)(currentLocation.pathname, router.basepath);
const nextPathSplit = (0, _tanstack_router_core.removeTrailingSlash)(next.pathname, router.basepath);
if (!(currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === "/"))) return false;
}
if (activeOptions?.includeSearch ?? true) {
if (!(0, _tanstack_router_core.deepEqual)(currentLocation.search, next.search, {
partial: !activeOptions?.exact,
ignoreUndefined: !activeOptions?.explicitUndefined
})) return false;
}
if (activeOptions?.includeHash) return isHydrated && currentLocation.hash === next.hash;
return true;
}, [
activeOptions?.exact,
activeOptions?.explicitUndefined,
activeOptions?.includeHash,
activeOptions?.includeSearch,
currentLocation,
externalLink,
isHydrated,
next.hash,
next.pathname,
next.search,
router.basepath
]);
const resolvedActiveProps = isActive ? (0, _tanstack_router_core.functionalUpdate)(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;
const resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : (0, _tanstack_router_core.functionalUpdate)(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;
const resolvedClassName = [
className,
resolvedActiveProps.className,
resolvedInactiveProps.className
].filter(Boolean).join(" ");
const resolvedStyle = (style || resolvedActiveProps.style || resolvedInactiveProps.style) && {
...style,
...resolvedActiveProps.style,
...resolvedInactiveProps.style
};
const [isTransitioning, setIsTransitioning] = react.useState(false);
const hasRenderFetched = react.useRef(false);
const preload = options.reloadDocument || externalLink ? false : userPreload ?? router.options.defaultPreload;
const preloadDelay = userPreloadDelay ?? router.options.defaultPreloadDelay ?? 0;
const doPreload = react.useCallback(() => {
router.preloadRoute({
..._options,
_builtLocation: next
}).catch((err) => {
console.warn(err);
console.warn(_tanstack_router_core.preloadWarning);
});
}, [
router,
_options,
next
]);
require_utils.useIntersectionObserver(innerRef, react.useCallback((entry) => {
if (entry?.isIntersecting) doPreload();
}, [doPreload]), intersectionObserverOptions, { disabled: !!disabled || !(preload === "viewport") });
react.useEffect(() => {
if (hasRenderFetched.current) return;
if (!disabled && preload === "render") {
doPreload();
hasRenderFetched.current = true;
}
}, [
disabled,
doPreload,
preload
]);
const handleClick = (e) => {
const elementTarget = e.currentTarget.getAttribute("target");
const effectiveTarget = target !== void 0 ? target : elementTarget;
if (!disabled && !isCtrlEvent(e) && !e.defaultPrevented && (!effectiveTarget || effectiveTarget === "_self") && e.button === 0) {
e.preventDefault();
(0, react_dom.flushSync)(() => {
setIsTransitioning(true);
});
const unsub = router.subscribe("onResolved", () => {
unsub();
setIsTransitioning(false);
});
router.navigate({
..._options,
replace,
resetScroll,
hashScrollIntoView,
startTransition,
viewTransition,
ignoreBlocker
});
}
};
if (externalLink) return {
...propsSafeToSpread,
ref: innerRef,
href: externalLink,
...children && { children },
...target && { target },
...disabled && { disabled },
...style && { style },
...className && { className },
...onClick && { onClick },
...onBlur && { onBlur },
...onFocus && { onFocus },
...onMouseEnter && { onMouseEnter },
...onMouseLeave && { onMouseLeave },
...onTouchStart && { onTouchStart }
};
const enqueueIntentPreload = (e) => {
if (disabled || preload !== "intent") return;
if (!preloadDelay) {
doPreload();
return;
}
const eventTarget = e.currentTarget;
if (timeoutMap.has(eventTarget)) return;
const id = setTimeout(() => {
timeoutMap.delete(eventTarget);
doPreload();
}, preloadDelay);
timeoutMap.set(eventTarget, id);
};
const handleTouchStart = (_) => {
if (disabled || preload !== "intent") return;
doPreload();
};
const handleLeave = (e) => {
if (disabled || !preload || !preloadDelay) return;
const eventTarget = e.currentTarget;
const id = timeoutMap.get(eventTarget);
if (id) {
clearTimeout(id);
timeoutMap.delete(eventTarget);
}
};
return {
...propsSafeToSpread,
...resolvedActiveProps,
...resolvedInactiveProps,
href: hrefOption?.href,
ref: innerRef,
onClick: composeHandlers([onClick, handleClick]),
onBlur: composeHandlers([onBlur, handleLeave]),
onFocus: composeHandlers([onFocus, enqueueIntentPreload]),
onMouseEnter: composeHandlers([onMouseEnter, enqueueIntentPreload]),
onMouseLeave: composeHandlers([onMouseLeave, handleLeave]),
onTouchStart: composeHandlers([onTouchStart, handleTouchStart]),
disabled: !!disabled,
target,
...resolvedStyle && { style: resolvedStyle },
...resolvedClassName && { className: resolvedClassName },
...disabled && STATIC_DISABLED_PROPS,
...isActive && STATIC_ACTIVE_PROPS,
...isHydrated && isTransitioning && STATIC_TRANSITIONING_PROPS
};
}
var STATIC_EMPTY_OBJECT = {};
var STATIC_ACTIVE_OBJECT = { className: "active" };
var STATIC_DISABLED_PROPS = {
role: "link",
"aria-disabled": true
};
var STATIC_ACTIVE_PROPS = {
"data-status": "active",
"aria-current": "page"
};
var STATIC_TRANSITIONING_PROPS = { "data-transitioning": "transitioning" };
var timeoutMap = /* @__PURE__ */ new WeakMap();
var intersectionObserverOptions = { rootMargin: "100px" };
var composeHandlers = (handlers) => (e) => {
for (const handler of handlers) {
if (!handler) continue;
if (e.defaultPrevented) return;
handler(e);
}
};
function getHrefOption(publicHref, external, history, disabled) {
if (disabled) return void 0;
if (external) return {
href: publicHref,
external: true
};
return {
href: history.createHref(publicHref) || "/",
external: false
};
}
function isSafeInternal(to) {
if (typeof to !== "string") return false;
const zero = to.charCodeAt(0);
if (zero === 47) return to.charCodeAt(1) !== 47;
return zero === 46;
}
/**
* Creates a typed Link-like component that preserves TanStack Router's
* navigation semantics and type-safety while delegating rendering to the
* provided host component.
*
* Useful for integrating design system anchors/buttons while keeping
* router-aware props (eg. `to`, `params`, `search`, `preload`).
*
* @param Comp The host component to render (eg. a design-system Link/Button)
* @returns A router-aware component with the same API as `Link`.
* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-link
*/
function createLink(Comp) {
return react.forwardRef(function CreatedLink(props, ref) {
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Link, {
...props,
_asChild: Comp,
ref
});
});
}
/**
* A strongly-typed anchor component for declarative navigation.
* Handles path, search, hash and state updates with optional route preloading
* and active-state styling.
*
* Props:
* - `preload`: Controls route preloading (eg. 'intent', 'render', 'viewport', true/false)
* - `preloadDelay`: Delay in ms before preloading on hover
* - `activeProps`/`inactiveProps`: Additional props merged when link is active/inactive
* - `resetScroll`/`hashScrollIntoView`: Control scroll behavior on navigation
* - `viewTransition`/`startTransition`: Use View Transitions/React transitions for navigation
* - `ignoreBlocker`: Bypass registered blockers
*
* @returns An anchor-like element that navigates without full page reloads.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkComponent
*/
var Link = react.forwardRef((props, ref) => {
const { _asChild, ...rest } = props;
const { type: _type, ...linkProps } = useLinkProps(rest, ref);
const children = typeof rest.children === "function" ? rest.children({ isActive: linkProps["data-status"] === "active" }) : rest.children;
if (!_asChild) {
const { disabled: _, ...rest } = linkProps;
return react.createElement("a", rest, children);
}
return react.createElement(_asChild, linkProps, children);
});
function isCtrlEvent(e) {
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
}
/**
* Validate and reuse navigation options for `Link`, `navigate` or `redirect`.
* Accepts a literal options object and returns it typed for later spreading.
* @example
* const opts = linkOptions({ to: '/dashboard', search: { tab: 'home' } })
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkOptions
*/
var linkOptions = (options) => {
return options;
};
/**
* Type-check a literal object for use with `Link`, `navigate` or `redirect`.
* Use to validate and reuse navigation options across your app.
* @example
* const opts = linkOptions({ to: '/dashboard', search: { tab: 'home' } })
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkOptions
*/
//#endregion
exports.Link = Link;
exports.createLink = createLink;
exports.linkOptions = linkOptions;
exports.useLinkProps = useLinkProps;
//# sourceMappingURL=link.cjs.map
@@ -0,0 +1,350 @@
import { compose } from "./compose.js";
import { getPath, getPathNoStrict, mergePath } from "./utils/url.js";
import { Context } from "./context.js";
import { METHODS } from "./router.js";
import { COMPOSED_HANDLER } from "./utils/constants.js";
//#region src/hono-base.ts
/**
* @module
* This module is the base module for the Hono object.
*/
const notFoundHandler = (c) => {
return c.text("404 Not Found", 404);
};
const errorHandler = (err, c) => {
if ("getResponse" in err) {
const res = err.getResponse();
return c.newResponse(res.body, res);
}
console.error(err);
return c.text("Internal Server Error", 500);
};
var Hono = class Hono {
get;
post;
put;
delete;
options;
patch;
query;
all;
on;
use;
router;
getPath;
_basePath = "/";
#path = "/";
routes = [];
constructor(options = {}) {
[...METHODS, "all"].forEach((method) => {
this[method] = (args1, ...args) => {
const methodName = method.toUpperCase();
if (typeof args1 === "string") this.#path = args1;
else this.#addRoute(methodName, this.#path, args1);
args.forEach((handler) => {
this.#addRoute(methodName, this.#path, handler);
});
return this;
};
});
this.on = (method, path, ...handlers) => {
for (const p of [path].flat()) {
this.#path = p;
for (const m of [method].flat()) {
const methodName = m.toUpperCase();
for (const handler of handlers) this.#addRoute(methodName, this.#path, handler);
}
}
return this;
};
this.use = (arg1, ...handlers) => {
if (typeof arg1 === "string") this.#path = arg1;
else {
this.#path = "*";
handlers.unshift(arg1);
}
handlers.forEach((handler) => {
this.#addRoute("ALL", this.#path, handler);
});
return this;
};
const { strict, ...optionsWithoutStrict } = options;
Object.assign(this, optionsWithoutStrict);
this.getPath = strict ?? true ? options.getPath ?? getPath : getPathNoStrict;
}
#clone() {
const clone = new Hono({
router: this.router,
getPath: this.getPath
});
clone.errorHandler = this.errorHandler;
clone.#notFoundHandler = this.#notFoundHandler;
clone.routes = this.routes;
return clone;
}
#notFoundHandler = notFoundHandler;
errorHandler = errorHandler;
/**
* `.route()` allows grouping other Hono instance in routes.
*
* @see {@link https://hono.dev/docs/api/routing#grouping}
*
* @param {string} path - base Path
* @param {Hono} app - other Hono instance
* @returns {Hono} routed Hono instance
*
* @example
* ```ts
* const app = new Hono()
* const app2 = new Hono()
*
* app2.get("/user", (c) => c.text("user"))
* app.route("/api", app2) // GET /api/user
* ```
*/
route(path, app) {
const subApp = this.basePath(path);
app.routes.map((r) => {
let handler;
if (app.errorHandler === errorHandler) handler = r.handler;
else {
handler = async (c, next) => (await compose([], app.errorHandler)(c, () => r.handler(c, next))).res;
handler[COMPOSED_HANDLER] = r.handler;
}
subApp.#addRoute(r.method, r.path, handler, r.basePath);
});
return this;
}
/**
* `.basePath()` allows base paths to be specified.
*
* @see {@link https://hono.dev/docs/api/routing#base-path}
*
* @param {string} path - base Path
* @returns {Hono} changed Hono instance
*
* @example
* ```ts
* const api = new Hono().basePath('/api')
* ```
*/
basePath(path) {
const subApp = this.#clone();
subApp._basePath = mergePath(this._basePath, path);
return subApp;
}
/**
* `.onError()` handles an error and returns a customized Response.
*
* @see {@link https://hono.dev/docs/api/hono#error-handling}
*
* @param {ErrorHandler} handler - request Handler for error
* @returns {Hono} changed Hono instance
*
* @example
* ```ts
* app.onError((err, c) => {
* console.error(`${err}`)
* return c.text('Custom Error Message', 500)
* })
* ```
*/
onError = (handler) => {
this.errorHandler = handler;
return this;
};
/**
* `.notFound()` allows you to customize a Not Found Response.
*
* @see {@link https://hono.dev/docs/api/hono#not-found}
*
* @param {NotFoundHandler} handler - request handler for not-found
* @returns {Hono} changed Hono instance
*
* @example
* ```ts
* app.notFound((c) => {
* return c.text('Custom 404 Message', 404)
* })
* ```
*/
notFound = (handler) => {
this.#notFoundHandler = handler;
return this;
};
/**
* `.mount()` allows you to mount applications built with other frameworks into your Hono application.
*
* @deprecated Use `mount()` from `hono/mount` instead. `.mount()` will be removed in v5.
*
* @see {@link https://hono.dev/docs/api/hono#mount}
*
* @param {string} path - base Path
* @param {Function} applicationHandler - other Request Handler
* @param {MountOptions} [options] - options of `.mount()`
* @returns {Hono} mounted Hono instance
*
* @example
* ```ts
* import { Router as IttyRouter } from 'itty-router'
* import { Hono } from 'hono'
* // Create itty-router application
* const ittyRouter = IttyRouter()
* // GET /itty-router/hello
* ittyRouter.get('/hello', () => new Response('Hello from itty-router'))
*
* const app = new Hono()
* app.mount('/itty-router', ittyRouter.handle)
* ```
*
* @example
* ```ts
* const app = new Hono()
* // Send the request to another application without modification.
* app.mount('/app', anotherApp, {
* replaceRequest: (req) => req,
* })
* ```
*/
mount(path, applicationHandler, options) {
let replaceRequest;
let optionHandler;
if (options) {
if (typeof options === "function") optionHandler = options;
else {
optionHandler = options.optionHandler;
if (options.replaceRequest === false) replaceRequest = (request) => request;
else replaceRequest = options.replaceRequest;
}
}
const getOptions = optionHandler ? (c) => {
const options = optionHandler(c);
return Array.isArray(options) ? options : [options];
} : (c) => {
let executionContext = void 0;
try {
executionContext = c.executionCtx;
} catch {}
return [c.env, executionContext];
};
replaceRequest ||= (() => {
const mergedPath = mergePath(this._basePath, path);
const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length;
return (request) => {
const url = new URL(request.url);
url.pathname = this.getPath(request).slice(pathPrefixLength) || "/";
return new Request(url, request);
};
})();
const handler = async (c, next) => {
const res = await applicationHandler(replaceRequest(c.req.raw), ...getOptions(c));
if (res) return res;
await next();
};
this.#addRoute("ALL", mergePath(path, "*"), handler);
return this;
}
#addRoute(method, path, handler, baseRoutePath) {
path = mergePath(this._basePath, path);
const r = {
basePath: baseRoutePath !== void 0 ? mergePath(this._basePath, baseRoutePath) : this._basePath,
path,
method,
handler
};
this.router.add(method, path, [handler, r]);
this.routes.push(r);
}
#handleError(err, c) {
if (err instanceof Error) return this.errorHandler(err, c);
throw err;
}
#dispatch(request, executionCtx, env, method) {
if (method === "HEAD") return (async () => new Response(null, await this.#dispatch(request, executionCtx, env, "GET")))();
const path = this.getPath(request, { env });
const matchResult = this.router.match(method, path);
const c = new Context(request, {
path,
matchResult,
env,
executionCtx,
notFoundHandler: this.#notFoundHandler
});
if (matchResult[0].length === 1) {
let res;
try {
res = matchResult[0][0][0][0](c, async () => {
c.res = await this.#notFoundHandler(c);
});
} catch (err) {
return this.#handleError(err, c);
}
return res instanceof Promise ? res.then((resolved) => resolved || (c.finalized ? c.res : this.#notFoundHandler(c))).catch((err) => this.#handleError(err, c)) : res ?? this.#notFoundHandler(c);
}
const composed = compose(matchResult[0], this.errorHandler, this.#notFoundHandler);
return (async () => {
try {
const context = await composed(c);
if (!context.finalized) throw new Error("Context is not finalized. Did you forget to return a Response object or `await next()`?");
return context.res;
} catch (err) {
return this.#handleError(err, c);
}
})();
}
/**
* `.fetch()` will be entry point of your app.
*
* @see {@link https://hono.dev/docs/api/hono#fetch}
*
* @param {Request} request - request Object of request
* @param {Env} env - env Object
* @param {ExecutionContext} executionCtx - context of execution
* @returns {Response | Promise<Response>} response of request
*
*/
fetch = (request, ...rest) => {
return this.#dispatch(request, rest[1], rest[0], request.method);
};
/**
* `.request()` is a useful method for testing.
* You can pass a URL or pathname to send a GET request.
* app will return a Response object.
* ```ts
* test('GET /hello is ok', async () => {
* const res = await app.request('/hello')
* expect(res.status).toBe(200)
* })
* ```
* @see https://hono.dev/docs/api/hono#request
*/
request = (input, requestInit, Env, executionCtx) => {
if (input instanceof Request) return this.fetch(requestInit ? new Request(input, requestInit) : input, Env, executionCtx);
input = input.toString();
return this.fetch(new Request(/^https?:\/\//.test(input) ? input : `http://localhost${mergePath("/", input)}`, requestInit), Env, executionCtx);
};
/**
* `.fire()` automatically adds a global fetch event listener.
* This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers.
* @deprecated
* Use `fire` from `hono/service-worker` instead.
* ```ts
* import { Hono } from 'hono'
* import { fire } from 'hono/service-worker'
*
* const app = new Hono()
* // ...
* fire(app)
* ```
* @see https://hono.dev/docs/api/hono#fire
* @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
* @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/
*/
fire = () => {
addEventListener("fetch", (event) => {
event.respondWith(this.#dispatch(event.request, event, void 0, event.request.method));
});
};
};
//#endregion
export { Hono as HonoBase };
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_7L","2":"_uJ"},C:{"1":"9 _tH","2":"_bB _VG s _L","194":"_lG _bI t u _gE"},D:{"1":"_BK","2":"_sJ"},E:{"1":"_jN","2":"_gG"},F:{"1":"_JK","2":"_OP"},G:{"1":"_sE","2":"_AF"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_yD","2":"_WE"},Q:{"2":"JE"},R:{"1":"KE"},S:{"2":"_C"}},B:5,C:"CSS content-visibility",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"archive.js","sources":["../../../src/icons/archive.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Archive\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iNSIgeD0iMiIgeT0iMyIgcng9IjEiIC8+CiAgPHBhdGggZD0iTTQgOHYxMWEyIDIgMCAwIDAgMiAyaDEyYTIgMiAwIDAgMCAyLTJWOCIgLz4KICA8cGF0aCBkPSJNMTAgMTJoNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/archive\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 Archive = createLucideIcon('Archive', [\n ['rect', { width: '20', height: '5', x: '2', y: '3', rx: '1', key: '1wp1u1' }],\n ['path', { d: 'M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8', key: '1s80jp' }],\n ['path', { d: 'M10 12h4', key: 'a56b0p' }],\n]);\n\nexport default Archive;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,42 @@
import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_, str, operators, Code} from "../../compile/codegen"
const ops = operators
type Kwd = "maximum" | "minimum" | "exclusiveMaximum" | "exclusiveMinimum"
type Comparison = "<=" | ">=" | "<" | ">"
const KWDs: {[K in Kwd]: {okStr: Comparison; ok: Code; fail: Code}} = {
maximum: {okStr: "<=", ok: ops.LTE, fail: ops.GT},
minimum: {okStr: ">=", ok: ops.GTE, fail: ops.LT},
exclusiveMaximum: {okStr: "<", ok: ops.LT, fail: ops.GTE},
exclusiveMinimum: {okStr: ">", ok: ops.GT, fail: ops.LTE},
}
export type LimitNumberError = ErrorObject<
Kwd,
{limit: number; comparison: Comparison},
number | {$data: string}
>
const error: KeywordErrorDefinition = {
message: ({keyword, schemaCode}) => str`must be ${KWDs[keyword as Kwd].okStr} ${schemaCode}`,
params: ({keyword, schemaCode}) =>
_`{comparison: ${KWDs[keyword as Kwd].okStr}, limit: ${schemaCode}}`,
}
const def: CodeKeywordDefinition = {
keyword: Object.keys(KWDs),
type: "number",
schemaType: "number",
$data: true,
error,
code(cxt: KeywordCxt) {
const {keyword, data, schemaCode} = cxt
cxt.fail$data(_`${data} ${KWDs[keyword as Kwd].fail} ${schemaCode} || isNaN(${data})`)
},
}
export default def
@@ -0,0 +1,42 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { Definition } from '../definition';
import type { Reference } from '../referencer/Reference';
import type { Scope } from '../scope';
export declare class VariableBase {
/**
* A unique ID for this instance - primarily used to help debugging and testing
*/
readonly $id: number;
/**
* The array of the definitions of this variable.
* @public
*/
readonly defs: Definition[];
/**
* True if the variable is considered used for the purposes of `no-unused-vars`, false otherwise.
* @public
*/
eslintUsed: boolean;
/**
* The array of `Identifier` nodes which define this variable.
* If this variable is redeclared, this array includes two or more nodes.
* @public
*/
readonly identifiers: TSESTree.Identifier[];
/**
* The variable name, as given in the source code.
* @public
*/
readonly name: string;
/**
* List of {@link Reference} of this variable (excluding parameter entries) in its defining scope and all nested scopes.
* For defining occurrences only see {@link Variable#defs}.
* @public
*/
readonly references: Reference[];
/**
* Reference to the enclosing Scope.
*/
readonly scope: Scope;
constructor(name: string, scope: Scope);
}
@@ -0,0 +1,2 @@
If you believe you have found a security issue in the software in this
repository, please consult https://github.com/nodejs/node/blob/HEAD/SECURITY.md.
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const lib: LibDefinition;
@@ -0,0 +1 @@
{"version":3,"file":"mouse.js","sources":["../../../src/icons/mouse.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Mouse\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB4PSI1IiB5PSIyIiB3aWR0aD0iMTQiIGhlaWdodD0iMjAiIHJ4PSI3IiAvPgogIDxwYXRoIGQ9Ik0xMiA2djQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/mouse\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 Mouse = createLucideIcon('Mouse', [\n ['rect', { x: '5', y: '2', width: '14', height: '20', rx: '7', key: '11ol66' }],\n ['path', { d: 'M12 6v4', key: '16clxf' }],\n]);\n\nexport default Mouse;\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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,QAAQ,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,6 @@
function camelToDash(str) {
return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);
}
export { camelToDash };
//# sourceMappingURL=camel-to-dash.mjs.map
@@ -0,0 +1,94 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/json-schema-secure.json#",
"title": "Meta-schema for the security assessment of JSON Schemas",
"description": "If a JSON Schema fails validation against this meta-schema, it may be unsafe to validate untrusted data",
"definitions": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": {"$ref": "#"}
}
},
"dependencies": {
"patternProperties": {
"description": "prevent slow validation of large property names",
"required": ["propertyNames"],
"properties": {
"propertyNames": {
"required": ["maxLength"]
}
}
},
"uniqueItems": {
"description": "prevent slow validation of large non-scalar arrays",
"if": {
"properties": {
"uniqueItems": {"const": true},
"items": {
"properties": {
"type": {
"anyOf": [
{
"enum": ["object", "array"]
},
{
"type": "array",
"contains": {"enum": ["object", "array"]}
}
]
}
}
}
}
},
"then": {
"required": ["maxItems"]
}
},
"pattern": {
"description": "prevent slow pattern matching of large strings",
"required": ["maxLength"]
},
"format": {
"description": "prevent slow format validation of large strings",
"required": ["maxLength"]
}
},
"properties": {
"additionalItems": {"$ref": "#"},
"additionalProperties": {"$ref": "#"},
"dependencies": {
"additionalProperties": {
"anyOf": [
{"type": "array"},
{"$ref": "#"}
]
}
},
"items": {
"anyOf": [
{"$ref": "#"},
{"$ref": "#/definitions/schemaArray"}
]
},
"definitions": {
"additionalProperties": {"$ref": "#"}
},
"patternProperties": {
"additionalProperties": {"$ref": "#"}
},
"properties": {
"additionalProperties": {"$ref": "#"}
},
"if": {"$ref": "#"},
"then": {"$ref": "#"},
"else": {"$ref": "#"},
"allOf": {"$ref": "#/definitions/schemaArray"},
"anyOf": {"$ref": "#/definitions/schemaArray"},
"oneOf": {"$ref": "#/definitions/schemaArray"},
"not": {"$ref": "#"},
"contains": {"$ref": "#"},
"propertyNames": {"$ref": "#"}
}
}
@@ -0,0 +1,22 @@
import type { CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition, SchemaObject } from "../../types";
import type { KeywordCxt } from "../../compile/validate";
import { _JTDTypeError } from "./error";
declare enum PropError {
Additional = "additional",
Missing = "missing"
}
type PropKeyword = "properties" | "optionalProperties";
type PropSchema = {
[P in string]?: SchemaObject;
};
export type JTDPropertiesError = _JTDTypeError<PropKeyword, "object", PropSchema> | ErrorObject<PropKeyword, {
error: PropError.Additional;
additionalProperty: string;
}, PropSchema> | ErrorObject<PropKeyword, {
error: PropError.Missing;
missingProperty: string;
}, PropSchema>;
export declare const error: KeywordErrorDefinition;
declare const def: CodeKeywordDefinition;
export declare function validateProperties(cxt: KeywordCxt): void;
export default def;
@@ -0,0 +1 @@
{"version":3,"file":"notebook-tabs.js","sources":["../../../src/icons/notebook-tabs.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name NotebookTabs\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiA2aDQiIC8+CiAgPHBhdGggZD0iTTIgMTBoNCIgLz4KICA8cGF0aCBkPSJNMiAxNGg0IiAvPgogIDxwYXRoIGQ9Ik0yIDE4aDQiIC8+CiAgPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjIwIiB4PSI0IiB5PSIyIiByeD0iMiIgLz4KICA8cGF0aCBkPSJNMTUgMnYyMCIgLz4KICA8cGF0aCBkPSJNMTUgN2g1IiAvPgogIDxwYXRoIGQ9Ik0xNSAxMmg1IiAvPgogIDxwYXRoIGQ9Ik0xNSAxN2g1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/notebook-tabs\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 NotebookTabs = createLucideIcon('NotebookTabs', [\n ['path', { d: 'M2 6h4', key: 'aawbzj' }],\n ['path', { d: 'M2 10h4', key: 'l0bgd4' }],\n ['path', { d: 'M2 14h4', key: '1gsvsf' }],\n ['path', { d: 'M2 18h4', key: '1bu2t1' }],\n ['rect', { width: '16', height: '20', x: '4', y: '2', rx: '2', key: '1nb95v' }],\n ['path', { d: 'M15 2v20', key: 'dcj49h' }],\n ['path', { d: 'M15 7h5', key: '1xj5lc' }],\n ['path', { d: 'M15 12h5', key: 'w5shd9' }],\n ['path', { d: 'M15 17h5', key: '1qaofu' }],\n]);\n\nexport default NotebookTabs;\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,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,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 SquareSplitVertical = createLucideIcon("SquareSplitVertical", [
["path", { d: "M5 8V5c0-1 1-2 2-2h10c1 0 2 1 2 2v3", key: "1pi83i" }],
["path", { d: "M19 16v3c0 1-1 2-2 2H7c-1 0-2-1-2-2v-3", key: "ido5k7" }],
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
]);
export { SquareSplitVertical as default };
//# sourceMappingURL=square-split-vertical.js.map
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTextWithParentheses = getTextWithParentheses;
const _1 = require(".");
function getTextWithParentheses(sourceCode, node) {
// Capture parentheses before and after the node
let beforeCount = 0;
let afterCount = 0;
if ((0, _1.isParenthesized)(node, sourceCode)) {
const bodyOpeningParen = (0, _1.nullThrows)(sourceCode.getTokenBefore(node, _1.isOpeningParenToken), _1.NullThrowsReasons.MissingToken('(', 'node'));
const bodyClosingParen = (0, _1.nullThrows)(sourceCode.getTokenAfter(node, _1.isClosingParenToken), _1.NullThrowsReasons.MissingToken(')', 'node'));
beforeCount = node.range[0] - bodyOpeningParen.range[0];
afterCount = bodyClosingParen.range[1] - node.range[1];
}
return sourceCode.getText(node, beforeCount, afterCount);
}
@@ -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 Target = createLucideIcon("Target", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["circle", { cx: "12", cy: "12", r: "6", key: "1vlfrh" }],
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }]
]);
export { Target as default };
//# sourceMappingURL=target.js.map
@@ -0,0 +1,438 @@
import { describe, expect, test } from "vitest";
import * as z from "zod/v4";
// Utility functions
function expectMethodMatch(schema: z.ZodType, params?: z.core.ToJSONSchemaParams): void {
const staticResult = z.toJSONSchema(schema, params);
const methodResult = schema.toJSONSchema(params);
expect(methodResult).toEqual(staticResult);
}
describe("toJSONSchema method", () => {
describe("primitive types", () => {
test("string", () => {
expectMethodMatch(z.string());
});
test("number", () => {
expectMethodMatch(z.number());
});
test("boolean", () => {
expectMethodMatch(z.boolean());
});
test("bigint", () => {
expectMethodMatch(z.bigint(), { unrepresentable: "any" });
});
test("symbol", () => {
expectMethodMatch(z.symbol(), { unrepresentable: "any" });
});
test("null", () => {
expectMethodMatch(z.null());
});
test("undefined", () => {
expectMethodMatch(z.undefined(), { unrepresentable: "any" });
});
test("void", () => {
expectMethodMatch(z.void(), { unrepresentable: "any" });
});
test("never", () => {
expectMethodMatch(z.never());
});
test("any", () => {
expectMethodMatch(z.any());
});
test("unknown", () => {
expectMethodMatch(z.unknown());
});
test("date", () => {
expectMethodMatch(z.date(), { unrepresentable: "any" });
});
test("nan", () => {
expectMethodMatch(z.nan(), { unrepresentable: "any" });
});
});
describe("string formats", () => {
test("email", () => {
expectMethodMatch(z.email());
});
test("url", () => {
expectMethodMatch(z.url());
});
test("uuid", () => {
expectMethodMatch(z.uuid());
});
test("datetime", () => {
expectMethodMatch(z.iso.datetime());
});
test("date", () => {
expectMethodMatch(z.iso.date());
});
test("guid", () => {
expectMethodMatch(z.guid());
});
test("cuid", () => {
expectMethodMatch(z.cuid());
});
test("cuid2", () => {
expectMethodMatch(z.cuid2());
});
test("ulid", () => {
expectMethodMatch(z.ulid());
});
test("base64", () => {
expectMethodMatch(z.base64());
});
test("ipv4", () => {
expectMethodMatch(z.ipv4());
});
test("ipv6", () => {
expectMethodMatch(z.ipv6());
});
});
describe("string validations", () => {
test("min length", () => {
expectMethodMatch(z.string().min(5));
});
test("max length", () => {
expectMethodMatch(z.string().max(10));
});
test("length", () => {
expectMethodMatch(z.string().length(5));
});
test("regex", () => {
expectMethodMatch(z.string().regex(/^[A-Z]+$/));
});
test("multiple patterns", () => {
expectMethodMatch(
z
.string()
.regex(/^[A-Z]+$/)
.regex(/^[0-9]+$/)
);
});
test("startsWith", () => {
expectMethodMatch(z.string().startsWith("hello"));
});
test("endsWith", () => {
expectMethodMatch(z.string().endsWith("world"));
});
test("includes", () => {
expectMethodMatch(z.string().includes("test"));
});
});
describe("number validations", () => {
test("min", () => {
expectMethodMatch(z.number().min(5));
});
test("max", () => {
expectMethodMatch(z.number().max(10));
});
test("int", () => {
expectMethodMatch(z.int());
});
test("positive", () => {
expectMethodMatch(z.number().positive());
});
test("negative", () => {
expectMethodMatch(z.number().negative());
});
test("multipleOf", () => {
expectMethodMatch(z.number().multipleOf(2));
});
test("gte", () => {
expectMethodMatch(z.number().gte(5));
});
test("lte", () => {
expectMethodMatch(z.number().lte(10));
});
test("gt", () => {
expectMethodMatch(z.number().gt(5));
});
test("lt", () => {
expectMethodMatch(z.number().lt(10));
});
});
describe("literals and enums", () => {
test("literal string", () => {
expectMethodMatch(z.literal("hello"));
});
test("literal number", () => {
expectMethodMatch(z.literal(42));
});
test("literal boolean", () => {
expectMethodMatch(z.literal(true));
});
test("literal null", () => {
expectMethodMatch(z.literal(null));
});
test("multiple literals", () => {
expectMethodMatch(z.literal(["a", "b", "c"]));
});
test("enum", () => {
expectMethodMatch(z.enum(["red", "green", "blue"]));
});
test("nativeEnum", () => {
enum Colors {
Red = "red",
Green = "green",
Blue = "blue",
}
expectMethodMatch(z.nativeEnum(Colors));
});
});
describe("composite types", () => {
test("array", () => {
expectMethodMatch(z.array(z.string()));
});
test("array with min", () => {
expectMethodMatch(z.array(z.string()).min(2));
});
test("array with max", () => {
expectMethodMatch(z.array(z.string()).max(10));
});
test("object", () => {
expectMethodMatch(z.object({ name: z.string(), age: z.number() }));
});
test("object with optional", () => {
expectMethodMatch(z.object({ name: z.string(), age: z.number().optional() }));
});
test("strict object", () => {
expectMethodMatch(z.strictObject({ name: z.string() }));
});
test("loose object", () => {
expectMethodMatch(z.looseObject({ name: z.string() }));
});
test("object with catchall", () => {
expectMethodMatch(z.object({ name: z.string() }).catchall(z.string()));
});
test("tuple", () => {
expectMethodMatch(z.tuple([z.string(), z.number()]));
});
test("tuple with rest", () => {
expectMethodMatch(z.tuple([z.string()], z.number()));
});
test("record", () => {
expectMethodMatch(z.record(z.string(), z.number()));
});
test("union", () => {
expectMethodMatch(z.union([z.string(), z.number()]));
});
test("discriminated union", () => {
expectMethodMatch(
z.discriminatedUnion("type", [
z.object({ type: z.literal("a"), value: z.string() }),
z.object({ type: z.literal("b"), value: z.number() }),
])
);
});
test("intersection", () => {
expectMethodMatch(z.intersection(z.object({ a: z.string() }), z.object({ b: z.number() })));
});
});
describe("wrapper types", () => {
test("optional", () => {
expectMethodMatch(z.string().optional());
});
test("nullable", () => {
expectMethodMatch(z.string().nullable());
});
test("nullish", () => {
expectMethodMatch(z.string().nullish());
});
test("default", () => {
expectMethodMatch(z.string().default("hello"));
});
test("default function", () => {
expectMethodMatch(z.string().default(() => "hello"));
});
test("prefault", () => {
expectMethodMatch(z.string().prefault("hello"));
});
test("prefault function", () => {
expectMethodMatch(z.string().prefault(() => "hello"));
});
test("catch", () => {
expectMethodMatch(z.string().catch("hello"));
});
test("readonly", () => {
expectMethodMatch(z.string().readonly());
});
test("nonoptional", () => {
expectMethodMatch(z.string().optional().nonoptional());
});
});
describe("special types", () => {
test("lazy", () => {
type Node = {
value: string;
children?: Node[] | undefined;
};
const Node: z.ZodType<Node> = z.lazy(() =>
z.object({
value: z.string(),
children: z.array(Node).optional(),
})
) as z.ZodType<Node>;
expectMethodMatch(Node);
});
test("promise", () => {
expectMethodMatch(z.promise(z.string()));
});
test("pipe", () => {
expectMethodMatch(
z
.string()
.transform((val) => val.length)
.pipe(z.number())
);
});
test("transform", () => {
expectMethodMatch(
z.string().transform((val) => val.length),
{ unrepresentable: "any" }
);
});
test("file", () => {
expectMethodMatch(z.file());
});
test("file with mime", () => {
expectMethodMatch(z.file().mime("image/png"));
});
});
describe("parameters", () => {
test("target draft-7", () => {
expectMethodMatch(z.string(), { target: "draft-7" });
});
test("target draft-4", () => {
expectMethodMatch(z.string(), { target: "draft-4" });
});
test("target openapi-3.0", () => {
expectMethodMatch(z.string(), { target: "openapi-3.0" });
});
test("io input", () => {
expectMethodMatch(z.string().default("hello"), { io: "input" });
});
test("cycles throw", () => {
const schema = z.object({
name: z.string(),
get subcategories() {
return z.array(schema);
},
});
// Both should throw the same error
expect(() => z.toJSONSchema(schema, { cycles: "throw" })).toThrow();
expect(() => schema.toJSONSchema({ cycles: "throw" })).toThrow();
});
test("reused ref", () => {
const shared = z.string();
const schema = z.object({
a: shared,
b: shared,
});
expectMethodMatch(schema, { reused: "ref" });
});
});
describe("edge cases with metadata", () => {
test("schema with id metadata", () => {
const a = z.string().meta({ id: "hi" });
expectMethodMatch(a);
});
test("schema with id then additional metadata", () => {
const a = z.string().meta({ id: "hi2" });
const b = a.meta({ name: "asdf" });
expectMethodMatch(b);
});
test("nested schema with id", () => {
const inner = z.string().meta({ id: "inner" });
const outer = z.object({ value: inner });
expectMethodMatch(outer);
});
});
});
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const limitNumber_1 = require("./limitNumber");
const multipleOf_1 = require("./multipleOf");
const limitLength_1 = require("./limitLength");
const pattern_1 = require("./pattern");
const limitProperties_1 = require("./limitProperties");
const required_1 = require("./required");
const limitItems_1 = require("./limitItems");
const uniqueItems_1 = require("./uniqueItems");
const const_1 = require("./const");
const enum_1 = require("./enum");
const validation = [
// number
limitNumber_1.default,
multipleOf_1.default,
// string
limitLength_1.default,
pattern_1.default,
// object
limitProperties_1.default,
required_1.default,
// array
limitItems_1.default,
uniqueItems_1.default,
// any
{ keyword: "type", schemaType: ["string", "array"] },
{ keyword: "nullable", schemaType: "boolean" },
const_1.default,
enum_1.default,
];
exports.default = validation;
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"forklift.js","sources":["../../../src/icons/forklift.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Forklift\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTJINWEyIDIgMCAwIDAtMiAydjUiIC8+CiAgPGNpcmNsZSBjeD0iMTMiIGN5PSIxOSIgcj0iMiIgLz4KICA8Y2lyY2xlIGN4PSI1IiBjeT0iMTkiIHI9IjIiIC8+CiAgPHBhdGggZD0iTTggMTloM201LTE3djE3aDZNNiAxMlY3YzAtMS4xLjktMiAyLTJoM2w1IDUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/forklift\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 Forklift = createLucideIcon('Forklift', [\n ['path', { d: 'M12 12H5a2 2 0 0 0-2 2v5', key: '7zsz91' }],\n ['circle', { cx: '13', cy: '19', r: '2', key: 'wjnkru' }],\n ['circle', { cx: '5', cy: '19', r: '2', key: 'v8kfzx' }],\n ['path', { d: 'M8 19h3m5-17v17h6M6 12V7c0-1.1.9-2 2-2h3l5 5', key: '13bk1p' }],\n]);\n\nexport default Forklift;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,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,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC/E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,713 @@
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
Range: () => SliderRange,
Root: () => Slider,
Slider: () => Slider,
SliderRange: () => SliderRange,
SliderThumb: () => SliderThumb,
SliderTrack: () => SliderTrack,
Thumb: () => SliderThumb,
Track: () => SliderTrack,
createSliderScope: () => createSliderScope,
unstable_BubbleInput: () => SliderBubbleInput,
unstable_SliderBubbleInput: () => SliderBubbleInput,
unstable_SliderThumbProvider: () => SliderThumbProvider,
unstable_SliderThumbTrigger: () => SliderThumbTrigger,
unstable_ThumbProvider: () => SliderThumbProvider,
unstable_ThumbTrigger: () => SliderThumbTrigger
});
module.exports = __toCommonJS(index_exports);
// src/slider.tsx
var React = __toESM(require("react"));
var import_number = require("@radix-ui/number");
var import_primitive = require("@radix-ui/primitive");
var import_react_compose_refs = require("@radix-ui/react-compose-refs");
var import_react_context = require("@radix-ui/react-context");
var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state");
var import_react_direction = require("@radix-ui/react-direction");
var import_react_use_previous = require("@radix-ui/react-use-previous");
var import_react_use_size = require("@radix-ui/react-use-size");
var import_react_primitive = require("@radix-ui/react-primitive");
var import_react_collection = require("@radix-ui/react-collection");
var import_jsx_runtime = require("react/jsx-runtime");
var PAGE_KEYS = ["PageUp", "PageDown"];
var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
var BACK_KEYS = {
"from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
};
var SLIDER_NAME = "Slider";
var [Collection, useCollection, createCollectionScope] = (0, import_react_collection.createCollection)(SLIDER_NAME);
var [createSliderContext, createSliderScope] = (0, import_react_context.createContextScope)(SLIDER_NAME, [
createCollectionScope
]);
var [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME);
var Slider = React.forwardRef(
(props, forwardedRef) => {
const {
name,
min = 0,
max = 100,
step = 1,
orientation = "horizontal",
disabled = false,
minStepsBetweenThumbs = 0,
defaultValue = [min],
value,
onValueChange = () => {
},
onValueCommit = () => {
},
inverted = false,
form,
...sliderProps
} = props;
const thumbRefs = React.useRef(/* @__PURE__ */ new Set());
const valueIndexToChangeRef = React.useRef(0);
const isKeyboardInteractionRef = React.useRef(false);
const isHorizontal = orientation === "horizontal";
const SliderOrientation = isHorizontal ? SliderHorizontal : SliderVertical;
const [control, setControl] = React.useState(null);
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, setControl);
const [values = [], setValues] = (0, import_react_use_controllable_state.useControllableState)({
prop: value,
defaultProp: defaultValue,
onChange: (value2) => {
const thumbs = [...thumbRefs.current];
thumbs[valueIndexToChangeRef.current]?.focus({
preventScroll: true,
focusVisible: isKeyboardInteractionRef.current
});
isKeyboardInteractionRef.current = false;
onValueChange(value2);
}
});
const valuesBeforeSlideStartRef = React.useRef(values);
const initialValuesRef = React.useRef(values);
React.useEffect(() => {
const associatedForm = form ? control?.ownerDocument.getElementById(form) : control?.closest("form");
if (associatedForm instanceof HTMLFormElement) {
const reset = () => setValues(initialValuesRef.current);
associatedForm.addEventListener("reset", reset);
return () => associatedForm.removeEventListener("reset", reset);
}
}, [control, form, setValues]);
function handleSlideStart(value2) {
const closestIndex = getClosestValueIndex(values, value2);
updateValues(value2, closestIndex);
}
function handleSlideMove(value2) {
updateValues(value2, valueIndexToChangeRef.current);
}
function handleSlideEnd() {
const prevValue = valuesBeforeSlideStartRef.current[valueIndexToChangeRef.current];
const nextValue = values[valueIndexToChangeRef.current];
const hasChanged = nextValue !== prevValue;
if (hasChanged) onValueCommit(values);
}
function updateValues(value2, atIndex, { commit } = { commit: false }) {
const decimalCount = getDecimalCount(step);
const snapToStep = roundValue(Math.round((value2 - min) / step) * step + min, decimalCount);
const nextValue = (0, import_number.clamp)(snapToStep, [min, max]);
setValues((prevValues = []) => {
const nextValues = getNextSortedValues(prevValues, nextValue, atIndex);
if (hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs * step)) {
valueIndexToChangeRef.current = nextValues.indexOf(nextValue);
const hasChanged = String(nextValues) !== String(prevValues);
if (hasChanged && commit) onValueCommit(nextValues);
return hasChanged ? nextValues : prevValues;
} else {
return prevValues;
}
});
}
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
SliderProvider,
{
scope: props.__scopeSlider,
name,
disabled,
min,
max,
valueIndexToChangeRef,
thumbs: thumbRefs.current,
values,
orientation,
form,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Provider, { scope: props.__scopeSlider, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: props.__scopeSlider, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
SliderOrientation,
{
"aria-disabled": disabled,
"data-disabled": disabled ? "" : void 0,
...sliderProps,
ref: composedRefs,
onPointerDown: (0, import_primitive.composeEventHandlers)(sliderProps.onPointerDown, () => {
if (!disabled) {
valuesBeforeSlideStartRef.current = values;
isKeyboardInteractionRef.current = false;
}
}),
min,
max,
inverted,
onSlideStart: disabled ? void 0 : handleSlideStart,
onSlideMove: disabled ? void 0 : handleSlideMove,
onSlideEnd: disabled ? void 0 : handleSlideEnd,
onHomeKeyDown: () => {
if (!disabled) {
isKeyboardInteractionRef.current = true;
updateValues(min, 0, { commit: true });
}
},
onEndKeyDown: () => {
if (!disabled) {
isKeyboardInteractionRef.current = true;
updateValues(max, values.length - 1, { commit: true });
}
},
onStepKeyDown: ({ event, direction: stepDirection }) => {
if (!disabled) {
isKeyboardInteractionRef.current = true;
const isPageKey = PAGE_KEYS.includes(event.key);
const isSkipKey = isPageKey || event.shiftKey && ARROW_KEYS.includes(event.key);
const multiplier = isSkipKey ? 10 : 1;
const atIndex = valueIndexToChangeRef.current;
const value2 = values[atIndex];
const nextValue = getNextStepValue(value2, {
min,
step,
direction: stepDirection,
multiplier
});
updateValues(nextValue, atIndex, { commit: true });
}
}
}
) }) })
}
);
}
);
Slider.displayName = SLIDER_NAME;
var [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext(SLIDER_NAME, {
startEdge: "left",
endEdge: "right",
size: "width",
direction: 1
});
var SliderHorizontal = React.forwardRef(
(props, forwardedRef) => {
const {
min,
max,
dir,
inverted,
onSlideStart,
onSlideMove,
onSlideEnd,
onStepKeyDown,
...sliderProps
} = props;
const [slider, setSlider] = React.useState(null);
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, setSlider);
const rectRef = React.useRef(void 0);
const direction = (0, import_react_direction.useDirection)(dir);
const isDirectionLTR = direction === "ltr";
const isSlidingFromLeft = isDirectionLTR && !inverted || !isDirectionLTR && inverted;
function getValueFromPointer(pointerPosition) {
const rect = rectRef.current || slider.getBoundingClientRect();
const input = [0, rect.width];
const output = isSlidingFromLeft ? [min, max] : [max, min];
const value = linearScale(input, output);
rectRef.current = rect;
return value(pointerPosition - rect.left);
}
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
SliderOrientationProvider,
{
scope: props.__scopeSlider,
startEdge: isSlidingFromLeft ? "left" : "right",
endEdge: isSlidingFromLeft ? "right" : "left",
direction: isSlidingFromLeft ? 1 : -1,
size: "width",
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
SliderImpl,
{
dir: direction,
"data-orientation": "horizontal",
...sliderProps,
ref: composedRefs,
style: {
...sliderProps.style,
"--radix-slider-thumb-transform": "translateX(-50%)"
},
onSlideStart: (event) => {
const value = getValueFromPointer(event.clientX);
onSlideStart?.(value);
},
onSlideMove: (event) => {
const value = getValueFromPointer(event.clientX);
onSlideMove?.(value);
},
onSlideEnd: () => {
rectRef.current = void 0;
onSlideEnd?.();
},
onStepKeyDown: (event) => {
const slideDirection = isSlidingFromLeft ? "from-left" : "from-right";
const isBackKey = BACK_KEYS[slideDirection].includes(event.key);
onStepKeyDown?.({ event, direction: isBackKey ? -1 : 1 });
}
}
)
}
);
}
);
var SliderVertical = React.forwardRef(
(props, forwardedRef) => {
const {
min,
max,
inverted,
onSlideStart,
onSlideMove,
onSlideEnd,
onStepKeyDown,
...sliderProps
} = props;
const sliderRef = React.useRef(null);
const ref = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, sliderRef);
const rectRef = React.useRef(void 0);
const isSlidingFromBottom = !inverted;
function getValueFromPointer(pointerPosition) {
const rect = rectRef.current || sliderRef.current.getBoundingClientRect();
const input = [0, rect.height];
const output = isSlidingFromBottom ? [max, min] : [min, max];
const value = linearScale(input, output);
rectRef.current = rect;
return value(pointerPosition - rect.top);
}
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
SliderOrientationProvider,
{
scope: props.__scopeSlider,
startEdge: isSlidingFromBottom ? "bottom" : "top",
endEdge: isSlidingFromBottom ? "top" : "bottom",
size: "height",
direction: isSlidingFromBottom ? 1 : -1,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
SliderImpl,
{
"data-orientation": "vertical",
...sliderProps,
ref,
style: {
...sliderProps.style,
"--radix-slider-thumb-transform": "translateY(50%)"
},
onSlideStart: (event) => {
const value = getValueFromPointer(event.clientY);
onSlideStart?.(value);
},
onSlideMove: (event) => {
const value = getValueFromPointer(event.clientY);
onSlideMove?.(value);
},
onSlideEnd: () => {
rectRef.current = void 0;
onSlideEnd?.();
},
onStepKeyDown: (event) => {
const slideDirection = isSlidingFromBottom ? "from-bottom" : "from-top";
const isBackKey = BACK_KEYS[slideDirection].includes(event.key);
onStepKeyDown?.({ event, direction: isBackKey ? -1 : 1 });
}
}
)
}
);
}
);
var SliderImpl = React.forwardRef(
(props, forwardedRef) => {
const {
__scopeSlider,
onSlideStart,
onSlideMove,
onSlideEnd,
onHomeKeyDown,
onEndKeyDown,
onStepKeyDown,
...sliderProps
} = props;
const context = useSliderContext(SLIDER_NAME, __scopeSlider);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_react_primitive.Primitive.span,
{
...sliderProps,
ref: forwardedRef,
onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => {
if (event.key === "Home") {
onHomeKeyDown(event);
event.preventDefault();
} else if (event.key === "End") {
onEndKeyDown(event);
event.preventDefault();
} else if (PAGE_KEYS.concat(ARROW_KEYS).includes(event.key)) {
onStepKeyDown(event);
event.preventDefault();
}
}),
onPointerDown: (0, import_primitive.composeEventHandlers)(props.onPointerDown, (event) => {
const target = event.target;
target.setPointerCapture(event.pointerId);
event.preventDefault();
if (context.thumbs.has(target)) {
target.focus({ preventScroll: true, focusVisible: false });
} else {
onSlideStart(event);
}
}),
onPointerMove: (0, import_primitive.composeEventHandlers)(props.onPointerMove, (event) => {
const target = event.target;
if (target.hasPointerCapture(event.pointerId)) onSlideMove(event);
}),
onPointerUp: (0, import_primitive.composeEventHandlers)(props.onPointerUp, (event) => {
const target = event.target;
if (target.hasPointerCapture(event.pointerId)) {
target.releasePointerCapture(event.pointerId);
onSlideEnd(event);
}
})
}
);
}
);
var TRACK_NAME = "SliderTrack";
var SliderTrack = React.forwardRef(
(props, forwardedRef) => {
const { __scopeSlider, ...trackProps } = props;
const context = useSliderContext(TRACK_NAME, __scopeSlider);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_react_primitive.Primitive.span,
{
"data-disabled": context.disabled ? "" : void 0,
"data-orientation": context.orientation,
...trackProps,
ref: forwardedRef
}
);
}
);
SliderTrack.displayName = TRACK_NAME;
var RANGE_NAME = "SliderRange";
var SliderRange = React.forwardRef(
(props, forwardedRef) => {
const { __scopeSlider, ...rangeProps } = props;
const context = useSliderContext(RANGE_NAME, __scopeSlider);
const orientation = useSliderOrientationContext(RANGE_NAME, __scopeSlider);
const ref = React.useRef(null);
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref);
const valuesCount = context.values.length;
const percentages = context.values.map(
(value) => convertValueToPercentage(value, context.min, context.max)
);
const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;
const offsetEnd = 100 - Math.max(...percentages);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_react_primitive.Primitive.span,
{
"data-orientation": context.orientation,
"data-disabled": context.disabled ? "" : void 0,
...rangeProps,
ref: composedRefs,
style: {
...props.style,
[orientation.startEdge]: offsetStart + "%",
[orientation.endEdge]: offsetEnd + "%"
}
}
);
}
);
SliderRange.displayName = RANGE_NAME;
var THUMB_NAME = "SliderThumb";
var [SliderThumbContextProvider, useSliderThumbContext] = createSliderContext(THUMB_NAME);
var THUMB_PROVIDER_NAME = "SliderThumbProvider";
function SliderThumbProvider(props) {
const {
__scopeSlider,
name,
children,
// @ts-expect-error internal render prop
internal_do_not_use_render
} = props;
const context = useSliderContext(THUMB_PROVIDER_NAME, __scopeSlider);
const getItems = useCollection(__scopeSlider);
const [thumb, setThumb] = React.useState(null);
const index = React.useMemo(
() => thumb ? getItems().findIndex((item) => item.ref.current === thumb) : -1,
[getItems, thumb]
);
const size = (0, import_react_use_size.useSize)(thumb);
const isFormControl = thumb ? !!context.form || !!thumb.closest("form") : true;
const value = context.values[index];
const resolvedName = name ?? (context.name ? context.name + (context.values.length > 1 ? "[]" : "") : void 0);
const percent = value === void 0 ? 0 : convertValueToPercentage(value, context.min, context.max);
React.useEffect(() => {
if (thumb) {
context.thumbs.add(thumb);
return () => {
context.thumbs.delete(thumb);
};
}
}, [thumb, context.thumbs]);
const thumbContext = {
value,
name: resolvedName,
form: context.form,
isFormControl,
index,
thumb,
onThumbChange: setThumb,
percent,
size
};
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SliderThumbContextProvider, { scope: __scopeSlider, ...thumbContext, children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(thumbContext) : children });
}
SliderThumbProvider.displayName = THUMB_PROVIDER_NAME;
var THUMB_TRIGGER_NAME = "SliderThumbTrigger";
var SliderThumbTrigger = React.forwardRef(
(props, forwardedRef) => {
const { __scopeSlider, ...thumbProps } = props;
const context = useSliderContext(THUMB_TRIGGER_NAME, __scopeSlider);
const orientation = useSliderOrientationContext(THUMB_TRIGGER_NAME, __scopeSlider);
const { index, value, percent, size, onThumbChange } = useSliderThumbContext(
THUMB_TRIGGER_NAME,
__scopeSlider
);
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, onThumbChange);
const label = getLabel(index, context.values.length);
const orientationSize = size?.[orientation.size];
const thumbInBoundsOffset = orientationSize ? getThumbInBoundsOffset(orientationSize, percent, orientation.direction) : 0;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"span",
{
style: {
transform: "var(--radix-slider-thumb-transform)",
position: "absolute",
[orientation.startEdge]: `calc(${percent}% + ${thumbInBoundsOffset}px)`
},
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.ItemSlot, { scope: __scopeSlider, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_react_primitive.Primitive.span,
{
role: "slider",
"aria-label": props["aria-label"] || label,
"aria-valuemin": context.min,
"aria-valuenow": value,
"aria-valuemax": context.max,
"aria-orientation": context.orientation,
"data-orientation": context.orientation,
"data-disabled": context.disabled ? "" : void 0,
tabIndex: context.disabled ? void 0 : 0,
...thumbProps,
ref: composedRefs,
style: value === void 0 ? { display: "none" } : props.style,
onFocus: (0, import_primitive.composeEventHandlers)(props.onFocus, () => {
context.valueIndexToChangeRef.current = index;
})
}
) })
}
);
}
);
SliderThumbTrigger.displayName = THUMB_TRIGGER_NAME;
var SliderThumb = React.forwardRef(
(props, forwardedRef) => {
const { __scopeSlider, name, ...thumbProps } = props;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
SliderThumbProvider,
{
__scopeSlider,
name,
internal_do_not_use_render: ({ index, isFormControl }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
SliderThumbTrigger,
{
...thumbProps,
ref: forwardedRef,
__scopeSlider
}
),
isFormControl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
SliderBubbleInput,
{
__scopeSlider
},
index
) : null
] })
}
);
}
);
SliderThumb.displayName = THUMB_NAME;
var BUBBLE_INPUT_NAME = "SliderBubbleInput";
var SliderBubbleInput = React.forwardRef(
({ __scopeSlider, ...props }, forwardedRef) => {
const { value, name, form } = useSliderThumbContext(BUBBLE_INPUT_NAME, __scopeSlider);
const ref = React.useRef(null);
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(ref, forwardedRef);
const prevValue = (0, import_react_use_previous.usePrevious)(value);
React.useEffect(() => {
const input = ref.current;
if (!input) return;
const inputProto = window.HTMLInputElement.prototype;
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "value");
const setValue = descriptor.set;
if (prevValue !== value && setValue) {
const event = new Event("input", { bubbles: true });
setValue.call(input, value);
input.dispatchEvent(event);
}
}, [prevValue, value]);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_react_primitive.Primitive.input,
{
style: { display: "none" },
name,
form,
...props,
ref: composedRefs,
defaultValue: value
}
);
}
);
SliderBubbleInput.displayName = BUBBLE_INPUT_NAME;
function getNextSortedValues(prevValues = [], nextValue, atIndex) {
const nextValues = [...prevValues];
nextValues[atIndex] = nextValue;
return nextValues.sort((a, b) => a - b);
}
function convertValueToPercentage(value, min, max) {
const maxSteps = max - min;
const percentPerStep = 100 / maxSteps;
const percentage = percentPerStep * (value - min);
return (0, import_number.clamp)(percentage, [0, 100]);
}
function getLabel(index, totalValues) {
if (totalValues > 2) {
return `Value ${index + 1} of ${totalValues}`;
} else if (totalValues === 2) {
return ["Minimum", "Maximum"][index];
} else {
return void 0;
}
}
function getClosestValueIndex(values, nextValue) {
if (values.length === 1) return 0;
const distances = values.map((value) => Math.abs(value - nextValue));
const closestDistance = Math.min(...distances);
return distances.indexOf(closestDistance);
}
function getThumbInBoundsOffset(width, left, direction) {
const halfWidth = width / 2;
const halfPercent = 50;
const offset = linearScale([0, halfPercent], [0, halfWidth]);
return (halfWidth - offset(left) * direction) * direction;
}
function getStepsBetweenValues(values) {
return values.slice(0, -1).map((value, index) => values[index + 1] - value);
}
function hasMinStepsBetweenValues(values, minStepsBetweenValues) {
if (minStepsBetweenValues > 0) {
const stepsBetweenValues = getStepsBetweenValues(values);
const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues);
return actualMinStepsBetweenValues >= minStepsBetweenValues;
}
return true;
}
function linearScale(input, output) {
return (value) => {
if (input[0] === input[1] || output[0] === output[1]) return output[0];
const ratio = (output[1] - output[0]) / (input[1] - input[0]);
return output[0] + ratio * (value - input[0]);
};
}
function getDecimalCount(value) {
if (!Number.isFinite(value)) return 0;
const str = value.toString();
if (str.includes("e")) {
const [coefficient, exponent] = str.split("e");
const decimalPart2 = coefficient.split(".")[1] || "";
const exponentNum = Number(exponent);
return Math.max(0, decimalPart2.length - exponentNum);
}
const decimalPart = str.split(".")[1];
return decimalPart ? decimalPart.length : 0;
}
function roundValue(value, decimalCount) {
const rounder = Math.pow(10, decimalCount);
return Math.round(value * rounder) / rounder;
}
function getNextStepValue(value, {
min,
step,
direction,
multiplier
}) {
const decimalCount = getDecimalCount(step);
const stepsFromMin = (value - min) / step;
const nearestSteps = Math.round(stepsFromMin);
const isAligned = roundValue(nearestSteps * step + min, decimalCount) === roundValue(value, decimalCount);
let nextSteps;
if (isAligned) {
nextSteps = nearestSteps + multiplier * direction;
} else if (direction > 0) {
nextSteps = Math.ceil(stepsFromMin);
} else {
nextSteps = Math.floor(stepsFromMin);
}
return roundValue(nextSteps * step + min, decimalCount);
}
function isFunction(value) {
return typeof value === "function";
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _instanceof;
function _instanceof(left, right) {
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
return !!right[Symbol.hasInstance](left);
} else {
return left instanceof right;
}
}
//# sourceMappingURL=instanceof.js.map
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const UtensilsCrossed = createLucideIcon("UtensilsCrossed", [
["path", { d: "m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8", key: "n7qcjb" }],
[
"path",
{ d: "M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7", key: "d0u48b" }
],
["path", { d: "m2.1 21.8 6.4-6.3", key: "yn04lh" }],
["path", { d: "m19 5-7 7", key: "194lzd" }]
]);
export { UtensilsCrossed as default };
//# sourceMappingURL=utensils-crossed.js.map
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const UserRoundPlus = createLucideIcon("UserRoundPlus", [
["path", { d: "M2 21a8 8 0 0 1 13.292-6", key: "bjp14o" }],
["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }],
["path", { d: "M19 16v6", key: "tddt3s" }],
["path", { d: "M22 19h-6", key: "vcuq98" }]
]);
export { UserRoundPlus as default };
//# sourceMappingURL=user-round-plus.js.map
@@ -0,0 +1,25 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const PackageMinus = createLucideIcon("PackageMinus", [
["path", { d: "M16 16h6", key: "100bgy" }],
[
"path",
{
d: "M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",
key: "e7tb2h"
}
],
["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }],
["polyline", { points: "3.29 7 12 12 20.71 7", key: "ousv84" }],
["line", { x1: "12", x2: "12", y1: "22", y2: "12", key: "a4e8g8" }]
]);
export { PackageMinus as default };
//# sourceMappingURL=package-minus.js.map
@@ -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 Trash = createLucideIcon("Trash", [
["path", { d: "M3 6h18", key: "d0wm0j" }],
["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }]
]);
export { Trash as default };
//# sourceMappingURL=trash.js.map
@@ -0,0 +1,69 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.intRange = void 0;
const codegen_1 = require("../../compile/codegen");
const timestamp_1 = require("../../runtime/timestamp");
const util_1 = require("../../compile/util");
const metadata_1 = require("./metadata");
const error_1 = require("./error");
exports.intRange = {
int8: [-128, 127, 3],
uint8: [0, 255, 3],
int16: [-32768, 32767, 5],
uint16: [0, 65535, 5],
int32: [-2147483648, 2147483647, 10],
uint32: [0, 4294967295, 10],
};
const error = {
message: (cxt) => (0, error_1.typeErrorMessage)(cxt, cxt.schema),
params: (cxt) => (0, error_1.typeErrorParams)(cxt, cxt.schema),
};
function timestampCode(cxt) {
const { gen, data, it } = cxt;
const { timestamp, allowDate } = it.opts;
if (timestamp === "date")
return (0, codegen_1._) `${data} instanceof Date `;
const vts = (0, util_1.useFunc)(gen, timestamp_1.default);
const allowDateArg = allowDate ? (0, codegen_1._) `, true` : codegen_1.nil;
const validString = (0, codegen_1._) `typeof ${data} == "string" && ${vts}(${data}${allowDateArg})`;
return timestamp === "string" ? validString : (0, codegen_1.or)((0, codegen_1._) `${data} instanceof Date`, validString);
}
const def = {
keyword: "type",
schemaType: "string",
error,
code(cxt) {
(0, metadata_1.checkMetadata)(cxt);
const { data, schema, parentSchema, it } = cxt;
let cond;
switch (schema) {
case "boolean":
case "string":
cond = (0, codegen_1._) `typeof ${data} == ${schema}`;
break;
case "timestamp": {
cond = timestampCode(cxt);
break;
}
case "float32":
case "float64":
cond = (0, codegen_1._) `typeof ${data} == "number"`;
break;
default: {
const sch = schema;
cond = (0, codegen_1._) `typeof ${data} == "number" && isFinite(${data}) && !(${data} % 1)`;
if (!it.opts.int32range && (sch === "int32" || sch === "uint32")) {
if (sch === "uint32")
cond = (0, codegen_1._) `${cond} && ${data} >= 0`;
}
else {
const [min, max] = exports.intRange[sch];
cond = (0, codegen_1._) `${cond} && ${data} >= ${min} && ${data} <= ${max}`;
}
}
}
cxt.pass(parentSchema.nullable ? (0, codegen_1.or)((0, codegen_1._) `${data} === null`, cond) : cond);
},
};
exports.default = def;
//# sourceMappingURL=type.js.map
@@ -0,0 +1,27 @@
import MatchDictionary from '../../matching.mjs';
/*
* -------------------------------------------------------------------------------
* Dictionary reverse matching --------------------------------------------------
* -------------------------------------------------------------------------------
*/
class MatchReverse extends MatchDictionary {
match(matchOptions) {
const passwordReversed = matchOptions.password.split('').reverse().join('');
return super.match({
...matchOptions,
password: passwordReversed
}).map(match => ({
...match,
token: match.token.split('').reverse().join(''),
// reverse back
reversed: true,
// map coordinates back to original string
i: matchOptions.password.length - 1 - match.j,
j: matchOptions.password.length - 1 - match.i
}));
}
}
export { MatchReverse as default };
//# sourceMappingURL=reverse.mjs.map
@@ -0,0 +1,133 @@
{
"name": "jiti",
"version": "2.6.1",
"description": "Runtime typescript and ESM support for Node.js",
"repository": "unjs/jiti",
"license": "MIT",
"type": "module",
"exports": {
".": {
"import": {
"types": "./lib/jiti.d.mts",
"default": "./lib/jiti.mjs"
},
"require": {
"types": "./lib/jiti.d.cts",
"default": "./lib/jiti.cjs"
}
},
"./register": {
"types": "./lib/jiti-register.d.mts",
"import": "./lib/jiti-register.mjs"
},
"./native": {
"types": "./lib/jiti.d.mts",
"import": "./lib/jiti-native.mjs"
},
"./package.json": "./package.json"
},
"main": "./lib/jiti.cjs",
"module": "./lib/jiti.mjs",
"types": "./lib/jiti.d.cts",
"typesVersions": {
"*": {
"register": [
"./lib/jiti-register.d.mts"
],
"native": [
"./lib/jiti.d.mts"
]
}
},
"bin": {
"jiti": "./lib/jiti-cli.mjs"
},
"files": [
"lib",
"dist",
"register.cjs"
],
"scripts": {
"bench": "node test/bench.mjs && deno -A test/bench.mjs && bun --bun test/bench.mjs",
"build": "pnpm clean && pnpm rspack",
"clean": "rm -rf dist",
"dev": "pnpm clean && pnpm rspack --watch",
"jiti": "JITI_DEBUG=1 JITI_JSX=1 lib/jiti-cli.mjs",
"lint": "eslint . && prettier -c src lib test stubs",
"lint:fix": "eslint --fix . && prettier -w src lib test stubs",
"prepack": "pnpm build",
"release": "pnpm build && pnpm test && changelogen --release --push --publish",
"test": "pnpm lint && pnpm test:types && vitest run --coverage && pnpm test:node-register && pnpm test:bun && pnpm test:native",
"test:bun": "bun --bun test test/bun",
"test:native": "pnpm test:native:bun && pnpm test:native:node && pnpm test:native:deno",
"test:native:bun": "bun --bun test test/native/bun.test.ts",
"test:native:deno": "deno test -A --no-check test/native/deno.test.ts",
"test:native:node": "node --test --experimental-strip-types test/native/node.test.ts",
"test:node-register": "JITI_JSX=1 node --test test/node-register.test.mjs",
"test:types": "tsc --noEmit"
},
"devDependencies": {
"@babel/core": "^7.28.4",
"@babel/helper-module-imports": "^7.27.1",
"@babel/helper-module-transforms": "^7.28.3",
"@babel/helper-plugin-utils": "^7.27.1",
"@babel/helper-simple-access": "^7.27.1",
"@babel/plugin-proposal-decorators": "^7.28.0",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/plugin-syntax-import-assertions": "^7.27.1",
"@babel/plugin-syntax-jsx": "^7.27.1",
"@babel/plugin-transform-export-namespace-from": "^7.27.1",
"@babel/plugin-transform-react-jsx": "^7.27.1",
"@babel/plugin-transform-typescript": "^7.28.0",
"@babel/preset-typescript": "^7.27.1",
"@babel/template": "^7.27.2",
"@babel/traverse": "^7.28.4",
"@babel/types": "^7.28.4",
"@rspack/cli": "^1.5.8",
"@rspack/core": "^1.5.8",
"@types/babel__core": "^7.20.5",
"@types/babel__helper-module-imports": "^7.18.3",
"@types/babel__helper-plugin-utils": "^7.10.3",
"@types/babel__template": "^7.4.4",
"@types/babel__traverse": "^7.28.0",
"@types/node": "^24.6.1",
"@vitest/coverage-v8": "^3.2.4",
"acorn": "^8.15.0",
"babel-plugin-parameter-decorator": "^1.0.16",
"changelogen": "^0.6.2",
"config": "^4.1.1",
"consola": "^3.4.2",
"defu": "^6.1.4",
"destr": "^2.0.5",
"escape-string-regexp": "^5.0.0",
"eslint": "^9.36.0",
"eslint-config-unjs": "^0.5.0",
"estree-walker": "^3.0.3",
"etag": "^1.8.1",
"fast-glob": "^3.3.3",
"is-installed-globally": "^1.0.0",
"mime": "^4.1.0",
"mlly": "^1.8.0",
"moment-timezone": "^0.6.0",
"nano-jsx": "^0.2.0",
"pathe": "^2.0.3",
"pkg-types": "^2.3.0",
"preact": "^10.27.2",
"preact-render-to-string": "^6.6.2",
"prettier": "^3.6.2",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"reflect-metadata": "^0.2.2",
"solid-js": "^1.9.9",
"std-env": "^3.9.0",
"terser-webpack-plugin": "^5.3.14",
"tinyexec": "^1.0.1",
"ts-loader": "^9.5.4",
"typescript": "^5.9.3",
"vitest": "^3.2.4",
"vue": "^3.5.22",
"yoctocolors": "^2.1.2",
"zod": "^4.1.11"
},
"packageManager": "pnpm@10.17.1"
}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_A","2":"_Z"},B:{"1":"_J"},C:{"1":"_w","2":"_f"},D:{"1":"_7D","2":"J"},E:{"1":"_nB","2":"_k"},F:{"1":"_oB","2":"F"},G:{"2":"_M"},H:{"2":"1D"},I:{"1":"_8B","2":"_n"},J:{"1":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","2":"LE"}},B:1,C:"Autofocus attribute",D:true};
@@ -0,0 +1,11 @@
'use strict'
let Stringifier = require('./stringifier')
function stringify(node, builder) {
let str = new Stringifier(builder)
str.stringify(node)
}
module.exports = stringify
stringify.default = stringify
@@ -0,0 +1 @@
{"version":3,"file":"focus.mjs","sources":["../../../src/gestures/focus.ts"],"sourcesContent":["import { Feature, addDomEvent } from \"motion-dom\"\nimport { pipe } from \"motion-utils\"\n\nexport class FocusGesture extends Feature<Element> {\n private isActive = false\n\n onFocus() {\n let isFocusVisible = false\n\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current!.matches(\":focus-visible\")\n } catch (e) {\n isFocusVisible = true\n }\n\n if (!isFocusVisible || !this.node.animationState) return\n\n this.node.animationState.setActive(\"whileFocus\", true)\n this.isActive = true\n }\n\n onBlur() {\n if (!this.isActive || !this.node.animationState) return\n this.node.animationState.setActive(\"whileFocus\", false)\n this.isActive = false\n }\n\n mount() {\n this.unmount = pipe(\n addDomEvent(this.node.current!, \"focus\", () => this.onFocus()),\n addDomEvent(this.node.current!, \"blur\", () => this.onBlur())\n ) as VoidFunction\n }\n\n unmount() {}\n}\n"],"names":[],"mappings":";;;AAGM,MAAO,YAAa,SAAQ,OAAgB,CAAA;AAAlD,IAAA,WAAA,GAAA;;QACY,IAAA,CAAA,QAAQ,GAAG,KAAK;IAqC5B;IAnCI,OAAO,GAAA;QACH,IAAI,cAAc,GAAG,KAAK;AAE1B;;;;;AAKG;AACH,QAAA,IAAI;YACA,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,OAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC;QACjE;QAAE,OAAO,CAAC,EAAE;YACR,cAAc,GAAG,IAAI;QACzB;QAEA,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc;YAAE;QAElD,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC;AACtD,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;IACxB;IAEA,MAAM,GAAA;QACF,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc;YAAE;QACjD,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC;AACvD,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK;IACzB;IAEA,KAAK,GAAA;AACD,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CACf,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAQ,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,EAC9D,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAQ,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,CAC/C;IACrB;AAEA,IAAA,OAAO,KAAI;AACd;;;;"}
@@ -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 CloudFog = createLucideIcon("CloudFog", [
["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }],
["path", { d: "M16 17H7", key: "pygtm1" }],
["path", { d: "M17 21H9", key: "1u2q02" }]
]);
export { CloudFog as default };
//# sourceMappingURL=cloud-fog.js.map
@@ -0,0 +1,45 @@
{
"name": "any-promise",
"version": "1.3.0",
"description": "Resolve any installed ES6 compatible promise",
"main": "index.js",
"typings": "index.d.ts",
"browser": {
"./register.js": "./register-shim.js"
},
"scripts": {
"test": "ava"
},
"repository": {
"type": "git",
"url": "https://github.com/kevinbeaty/any-promise"
},
"keywords": [
"promise",
"es6"
],
"author": "Kevin Beaty",
"license": "MIT",
"bugs": {
"url": "https://github.com/kevinbeaty/any-promise/issues"
},
"homepage": "http://github.com/kevinbeaty/any-promise",
"dependencies": {},
"devDependencies": {
"ava": "^0.14.0",
"bluebird": "^3.0.0",
"es6-promise": "^3.0.0",
"is-promise": "^2.0.0",
"lie": "^3.0.0",
"mocha": "^2.0.0",
"native-promise-only": "^0.8.0",
"phantomjs-prebuilt": "^2.0.0",
"pinkie": "^2.0.0",
"promise": "^7.0.0",
"q": "^1.0.0",
"rsvp": "^3.0.0",
"vow": "^0.4.0",
"when": "^3.0.0",
"zuul": "^3.0.0"
}
}
@@ -0,0 +1,132 @@
{
'includes': [ 'common-sqlite.gypi' ],
'variables': {
'sqlite_magic%': '',
},
'target_defaults': {
'default_configuration': 'Release',
"cflags": [
'-O3', '-flto', '-pipe', '-ffunction-sections', '-fdata-sections', '-fvisibility=hidden'
],
'cxxflags':[
'-O3', '-flto', '-pipe', '-ffunction-sections', '-fdata-sections', '-fvisibility=hidden'
],
'ldflags': [ '-flto', '-Wl,--gc-sections', '-s' ],
'configurations': {
'Debug': {
'defines': [ 'DEBUG', '_DEBUG' ],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 1, # static debug
},
},
},
'Release': {
'defines': [ 'NDEBUG' ],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 0, # static release
},
},
}
},
'msvs_settings': {
'VCCLCompilerTool': {
'Optimization': 2, # /O2
'FavorSizeOrSpeed': 1, # /Ot (Favor fast code)
'StringPooling': 'true', # /GF
'EnableFunctionLevelLinking': 'true', # /Gy
'EnableIntrinsicFunctions': 'true',
},
'VCLibrarianTool': {
},
'VCLinkerTool': {
'EnableCOMDATFolding': '2', # /OPT:ICF
'OptimizeReferences': '2', # /OPT:REF
'LinkTimeCodeGeneration': 'true', # /LTCG
},
},
'conditions': [
['OS == "win"', {
'defines': [
'WIN32'
],
}]
],
},
'targets': [
{
'target_name': 'sqlite3',
'type': 'static_library',
'include_dirs': [ 'sqlite-amalgamation-<@(sqlite_version)/' ],
'sources': [
'sqlite-amalgamation-<@(sqlite_version)/sqlite3.c'
],
'direct_dependent_settings': {
'include_dirs': [ 'sqlite-amalgamation-<@(sqlite_version)/' ],
'defines': [
'SQLITE_THREADSAFE=1',
'HAVE_USLEEP=1',
'SQLITE_ENABLE_FTS3',
'SQLITE_ENABLE_FTS4',
'SQLITE_ENABLE_FTS5',
'SQLITE_ENABLE_RTREE',
'SQLITE_ENABLE_SESSION',
# The session extension is documented as requiring
# SQLITE_ENABLE_PREUPDATE_HOOK alongside SQLITE_ENABLE_SESSION;
# without it the session sources compile into a non-functional
# state (D08 plan §1). Decision recorded in the D08 handoff.
'SQLITE_ENABLE_PREUPDATE_HOOK',
'SQLITE_ENABLE_JSON',
'SQLITE_ENABLE_DBSTAT_VTAB=1',
'SQLITE_ENABLE_MATH_FUNCTIONS',
'SQLITE_ENABLE_STAT4',
# Deliverable 07: sqlite3_table_column_metadata and the
# sqlite3_column_{database,table,origin}_name family compile only
# with this define. Decision recorded in the D07 handoff: the
# ~30 KB of extra amalgamation code is accepted in exchange for
# column metadata (stmt.columns) and db.tableInfo().
'SQLITE_ENABLE_COLUMN_METADATA',
# Phase 6 (observability): sqlite3_normalized_sql compiles only
# with this define.
'SQLITE_ENABLE_NORMALIZE',
'SQLITE_DEFAULT_MEMSTATUS=0'
],
},
'cflags_cc': [
'-Wno-unused-value'
],
'defines': [
'_REENTRANT=1',
'SQLITE_THREADSAFE=1',
'HAVE_USLEEP=1',
'SQLITE_ENABLE_FTS3',
'SQLITE_ENABLE_FTS4',
'SQLITE_ENABLE_FTS5',
'SQLITE_ENABLE_RTREE',
'SQLITE_ENABLE_SESSION',
# See the direct_dependent_settings copy above (Deliverable 08).
'SQLITE_ENABLE_PREUPDATE_HOOK',
'SQLITE_ENABLE_JSON',
'SQLITE_ENABLE_DBSTAT_VTAB=1',
'SQLITE_ENABLE_MATH_FUNCTIONS',
'SQLITE_ENABLE_STAT4',
# See the direct_dependent_settings copy above (Deliverable 07).
'SQLITE_ENABLE_COLUMN_METADATA',
# See the direct_dependent_settings copy above (Phase 6).
'SQLITE_ENABLE_NORMALIZE',
'SQLITE_DEFAULT_MEMSTATUS=0'
],
'conditions': [
["sqlite_magic != ''", {
'defines': [
'SQLITE_FILE_HEADER="<(sqlite_magic)"'
]
}]
],
}
]
}
@@ -0,0 +1 @@
{"version":3,"file":"sidebar-open.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,18 @@
export * from './builtinSymbolLikes';
export * from './containsAllTypesByName';
export * from './getConstrainedTypeAtLocation';
export * from './getContextualType';
export * from './getDeclaration';
export * from './getSourceFileOfNode';
export * from './getTypeName';
export * from './isSymbolFromDefaultLibrary';
export * from './isTypeBrandedLiteralLike';
export * from './isTypeReadonly';
export * from './isUnsafeAssignment';
export * from './predicates';
export * from './propertyTypes';
export * from './requiresQuoting';
export * from './typeFlagUtils';
export * from './TypeOrValueSpecifier';
export * from './discriminateAnyType';
export { getDecorators, getModifiers, typescriptVersionIsAtLeast, } from '@typescript-eslint/typescript-estree';
@@ -0,0 +1,70 @@
'use strict'
let pico = require('picocolors')
let tokenizer = require('./tokenize')
let Input
function registerInput(dependant) {
Input = dependant
}
const HIGHLIGHT_THEME = {
';': pico.yellow,
':': pico.yellow,
'(': pico.cyan,
')': pico.cyan,
'[': pico.yellow,
']': pico.yellow,
'{': pico.yellow,
'}': pico.yellow,
'at-word': pico.cyan,
'brackets': pico.cyan,
'call': pico.cyan,
'class': pico.yellow,
'comment': pico.gray,
'hash': pico.magenta,
'string': pico.green
}
function getTokenType([type, value], processor) {
if (type === 'word') {
if (value[0] === '.') {
return 'class'
}
if (value[0] === '#') {
return 'hash'
}
}
if (!processor.endOfFile()) {
let next = processor.nextToken()
processor.back(next)
if (next[0] === 'brackets' || next[0] === '(') return 'call'
}
return type
}
function terminalHighlight(css) {
let processor = tokenizer(new Input(css), { ignoreErrors: true })
let result = ''
while (!processor.endOfFile()) {
let token = processor.nextToken()
let color = HIGHLIGHT_THEME[getTokenType(token, processor)]
if (color) {
result += token[1]
.split(/\r?\n/)
.map(i => color(i))
.join('\n')
} else {
result += token[1]
}
}
return result
}
terminalHighlight.registerInput = registerInput
module.exports = terminalHighlight
@@ -0,0 +1,39 @@
## detect-node
> This is a fork of `detect-node`.
Differences:
- uses named export {isNode}
- has d.ts integrated
- supports ESM
### Install
```shell
npm install --save detect-node-es
```
### Usage:
```diff
-var isNode = require('detect-node');
+var {isNode} = require('detect-node-es');
if (isNode) {
console.log("Running under Node.JS");
} else {
alert("Hello from browser (or whatever not-a-node env)");
}
```
The check is performed as:
```js
module.exports = false;
// Only Node.JS has a process variable that is of [[Class]] process
try {
module.exports = Object.prototype.toString.call(global.process) === '[object process]'
} catch(e) {}
```
Thanks to Ingvar Stepanyan for the initial idea. This check is both **the most reliable I could find** and it does not use `process` env directly, which would cause browserify to include it into the build.
@@ -0,0 +1,9 @@
"use strict";
// Generated using scripts/write-decode-map.ts
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = new Uint16Array(
// prettier-ignore
"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\uLine truncated
.split("")
.map(function (c) { return c.charCodeAt(0); }));
//# sourceMappingURL=decode-data-html.js.map
@@ -0,0 +1 @@
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).FloatingUICore={})}(this,(function(t){"use strict";const e=["top","right","bottom","left"],n=["start","end"],i=e.reduce(((t,e)=>t.concat(e,e+"-"+n[0],e+"-"+n[1])),[]),o=Math.min,r=Math.max,a={left:"right",right:"left",bottom:"top",top:"bottom"};function l(t,e,n){return r(t,o(e,n))}function s(t,e){return"function"==typeof t?t(e):t}function f(t){return t.split("-")[0]}function c(t){return t.split("-")[1]}function m(t){return"x"===t?"y":"x"}function u(t){return"y"===t?"height":"width"}function d(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function g(t){return m(d(t))}function p(t,e,n){void 0===n&&(n=!1);const i=c(t),o=g(t),r=u(o);let a="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=A(a)),[a,A(a)]}function h(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const y=["left","right"],w=["right","left"],x=["top","bottom"],v=["bottom","top"];function b(t,e,n,i){const o=c(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?w:y:e?y:w;case"left":case"right":return e?x:v;default:return[]}}(f(t),"start"===n,i);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(h)))),r}function A(t){const e=f(t);return a[e]+t.slice(e.length)}function R(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function O(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function P(t,e,n){let{reference:i,floating:o}=t;const r=d(e),a=g(e),l=u(a),s=f(e),m="y"===r,p=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,y=i[l]/2-o[l]/2;let w;switch(s){case"top":w={x:p,y:i.y-o.height};break;case"bottom":w={x:p,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y:h};break;case"left":w={x:i.x-o.width,y:h};break;default:w={x:i.x,y:i.y}}switch(c(e)){case"start":w[a]-=y*(n&&m?-1:1);break;case"end":w[a]+=y*(n&&m?-1:1)}return w}async function D(t,e){var n;void 0===e&&(e={});const{x:i,y:o,platform:r,rects:a,elements:l,strategy:f}=t,{boundary:c="clippingAncestors",rootBoundary:m="viewport",elementContext:u="floating",altBoundary:d=!1,padding:g=0}=s(e,t),p=R(g),h=l[d?"floating"===u?"reference":"floating":u],y=O(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(h)))||n?h:h.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:m,strategy:f})),w="floating"===u?{x:i,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),v=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},b=O(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:f}):w);return{top:(y.top-b.top+p.top)/v.y,bottom:(b.bottom-y.bottom+p.bottom)/v.y,left:(y.left-b.left+p.left)/v.x,right:(b.right-y.right+p.right)/v.x}}function T(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function E(t){return e.some((e=>t[e]>=0))}function L(t){const e=o(...t.map((t=>t.left))),n=o(...t.map((t=>t.top)));return{x:e,y:n,width:r(...t.map((t=>t.right)))-e,height:r(...t.map((t=>t.bottom)))-n}}const k=new Set(["left","top"]);t.arrow=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:r,rects:a,platform:f,elements:m,middlewareData:d}=e,{element:p,padding:h=0}=s(t,e)||{};if(null==p)return{};const y=R(h),w={x:n,y:i},x=g(r),v=u(x),b=await f.getDimensions(p),A="y"===x,O=A?"top":"left",P=A?"bottom":"right",D=A?"clientHeight":"clientWidth",T=a.reference[v]+a.reference[x]-w[x]-a.floating[v],E=w[x]-a.reference[x],L=await(null==f.getOffsetParent?void 0:f.getOffsetParent(p));let k=L?L[D]:0;k&&await(null==f.isElement?void 0:f.isElement(L))||(k=m.floating[D]||a.floating[v]);const C=T/2-E/2,H=k/2-b[v]/2-1,S=o(y[O],H),B=o(y[P],H),F=S,j=k-b[v]-B,z=k/2-b[v]/2+C,M=l(F,z,j),V=!d.arrow&&null!=c(r)&&z!==M&&a.reference[v]/2-(z<F?S:B)-b[v]/2<0,W=V?z<F?z-F:z-j:0;return{[x]:w[x]+W,data:{[x]:M,centerOffset:z-M-W,...V&&{alignmentOffset:W}},reset:V}}}),t.autoPlacement=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,r;const{rects:a,middlewareData:l,placement:m,platform:u,elements:d}=e,{crossAxis:g=!1,alignment:y,allowedPlacements:w=i,autoAlignment:x=!0,...v}=s(t,e),b=void 0!==y||w===i?function(t,e,n){return(t?[...n.filter((e=>c(e)===t)),...n.filter((e=>c(e)!==t))]:n.filter((t=>f(t)===t))).filter((n=>!t||c(n)===t||!!e&&h(n)!==n))}(y||null,x,w):w,A=await u.detectOverflow(e,v),R=(null==(n=l.autoPlacement)?void 0:n.index)||0,O=b[R];if(null==O)return{};const P=p(O,a,await(null==u.isRTL?void 0:u.isRTL(d.Line truncated
@@ -0,0 +1,13 @@
import { Plugin } from 'vite';
type PluginOptions = {
/**
* Optimize and minify the output CSS.
*/
optimize?: boolean | {
minify?: boolean;
};
};
declare function tailwindcss(opts?: PluginOptions): Plugin[];
export { type PluginOptions, tailwindcss as default };
@@ -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 Ticket = createLucideIcon("Ticket", [
[
"path",
{
d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",
key: "qn84l0"
}
],
["path", { d: "M13 5v2", key: "dyzc3o" }],
["path", { d: "M13 17v2", key: "1ont0d" }],
["path", { d: "M13 11v2", key: "1wjjxi" }]
]);
export { Ticket as default };
//# sourceMappingURL=ticket.js.map
@@ -0,0 +1,245 @@
import { auth, extractWWWAuthenticateParams, UnauthorizedError } from './auth.js';
/**
* Creates a fetch wrapper that handles OAuth authentication automatically.
*
* This wrapper will:
* - Add Authorization headers with access tokens
* - Handle 401 responses by attempting re-authentication
* - Retry the original request after successful auth
* - Handle OAuth errors appropriately (InvalidClientError, etc.)
*
* The baseUrl parameter is optional and defaults to using the domain from the request URL.
* However, you should explicitly provide baseUrl when:
* - Making requests to multiple subdomains (e.g., api.example.com, cdn.example.com)
* - Using API paths that differ from OAuth discovery paths (e.g., requesting /api/v1/data but OAuth is at /)
* - The OAuth server is on a different domain than your API requests
* - You want to ensure consistent OAuth behavior regardless of request URLs
*
* For MCP transports, set baseUrl to the same URL you pass to the transport constructor.
*
* Note: This wrapper is designed for general-purpose fetch operations.
* MCP transports (SSE and StreamableHTTP) already have built-in OAuth handling
* and should not need this wrapper.
*
* @param provider - OAuth client provider for authentication
* @param baseUrl - Base URL for OAuth server discovery (defaults to request URL domain)
* @returns A fetch middleware function
*/
export const withOAuth = (provider, baseUrl) => next => {
return async (input, init) => {
const makeRequest = async () => {
const headers = new Headers(init?.headers);
// Add authorization header if tokens are available
const tokens = await provider.tokens();
if (tokens) {
headers.set('Authorization', `Bearer ${tokens.access_token}`);
}
return await next(input, { ...init, headers });
};
let response = await makeRequest();
// Handle 401 responses by attempting re-authentication
if (response.status === 401) {
try {
const { resourceMetadataUrl, scope } = extractWWWAuthenticateParams(response);
// Use provided baseUrl or extract from request URL
const serverUrl = baseUrl || (typeof input === 'string' ? new URL(input).origin : input.origin);
const result = await auth(provider, {
serverUrl,
resourceMetadataUrl,
scope,
fetchFn: next
});
if (result === 'REDIRECT') {
throw new UnauthorizedError('Authentication requires user authorization - redirect initiated');
}
if (result !== 'AUTHORIZED') {
throw new UnauthorizedError(`Authentication failed with result: ${result}`);
}
// Retry the request with fresh tokens
response = await makeRequest();
}
catch (error) {
if (error instanceof UnauthorizedError) {
throw error;
}
throw new UnauthorizedError(`Failed to re-authenticate: ${error instanceof Error ? error.message : String(error)}`);
}
}
// If we still have a 401 after re-auth attempt, throw an error
if (response.status === 401) {
const url = typeof input === 'string' ? input : input.toString();
throw new UnauthorizedError(`Authentication failed for ${url}`);
}
return response;
};
};
/**
* Creates a fetch middleware that logs HTTP requests and responses.
*
* When called without arguments `withLogging()`, it uses the default logger that:
* - Logs successful requests (2xx) to `console.log`
* - Logs error responses (4xx/5xx) and network errors to `console.error`
* - Logs all requests regardless of status (statusLevel: 0)
* - Does not include request or response headers in logs
* - Measures and displays request duration in milliseconds
*
* Important: the default logger uses both `console.log` and `console.error` so it should not be used with
* `stdio` transports and applications.
*
* @param options - Logging configuration options
* @returns A fetch middleware function
*/
export const withLogging = (options = {}) => {
const { logger, includeRequestHeaders = false, includeResponseHeaders = false, statusLevel = 0 } = options;
const defaultLogger = input => {
const { method, url, status, statusText, duration, requestHeaders, responseHeaders, error } = input;
let message = error
? `HTTP ${method} ${url} failed: ${error.message} (${duration}ms)`
: `HTTP ${method} ${url} ${status} ${statusText} (${duration}ms)`;
// Add headers to message if requested
if (includeRequestHeaders && requestHeaders) {
const reqHeaders = Array.from(requestHeaders.entries())
.map(([key, value]) => `${key}: ${value}`)
.join(', ');
message += `\n Request Headers: {${reqHeaders}}`;
}
if (includeResponseHeaders && responseHeaders) {
const resHeaders = Array.from(responseHeaders.entries())
.map(([key, value]) => `${key}: ${value}`)
.join(', ');
message += `\n Response Headers: {${resHeaders}}`;
}
if (error || status >= 400) {
// eslint-disable-next-line no-console
console.error(message);
}
else {
// eslint-disable-next-line no-console
console.log(message);
}
};
const logFn = logger || defaultLogger;
return next => async (input, init) => {
const startTime = performance.now();
const method = init?.method || 'GET';
const url = typeof input === 'string' ? input : input.toString();
const requestHeaders = includeRequestHeaders ? new Headers(init?.headers) : undefined;
try {
const response = await next(input, init);
const duration = performance.now() - startTime;
// Only log if status meets the log level threshold
if (response.status >= statusLevel) {
logFn({
method,
url,
status: response.status,
statusText: response.statusText,
duration,
requestHeaders,
responseHeaders: includeResponseHeaders ? response.headers : undefined
});
}
return response;
}
catch (error) {
const duration = performance.now() - startTime;
// Always log errors regardless of log level
logFn({
method,
url,
status: 0,
statusText: 'Network Error',
duration,
requestHeaders,
error: error
});
throw error;
}
};
};
/**
* Composes multiple fetch middleware functions into a single middleware pipeline.
* Middleware are applied in the order they appear, creating a chain of handlers.
*
* @example
* ```typescript
* // Create a middleware pipeline that handles both OAuth and logging
* const enhancedFetch = applyMiddlewares(
* withOAuth(oauthProvider, 'https://api.example.com'),
* withLogging({ statusLevel: 400 })
* )(fetch);
*
* // Use the enhanced fetch - it will handle auth and log errors
* const response = await enhancedFetch('https://api.example.com/data');
* ```
*
* @param middleware - Array of fetch middleware to compose into a pipeline
* @returns A single composed middleware function
*/
export const applyMiddlewares = (...middleware) => {
return next => {
return middleware.reduce((handler, mw) => mw(handler), next);
};
};
/**
* Helper function to create custom fetch middleware with cleaner syntax.
* Provides the next handler and request details as separate parameters for easier access.
*
* @example
* ```typescript
* // Create custom authentication middleware
* const customAuthMiddleware = createMiddleware(async (next, input, init) => {
* const headers = new Headers(init?.headers);
* headers.set('X-Custom-Auth', 'my-token');
*
* const response = await next(input, { ...init, headers });
*
* if (response.status === 401) {
* console.log('Authentication failed');
* }
*
* return response;
* });
*
* // Create conditional middleware
* const conditionalMiddleware = createMiddleware(async (next, input, init) => {
* const url = typeof input === 'string' ? input : input.toString();
*
* // Only add headers for API routes
* if (url.includes('/api/')) {
* const headers = new Headers(init?.headers);
* headers.set('X-API-Version', 'v2');
* return next(input, { ...init, headers });
* }
*
* // Pass through for non-API routes
* return next(input, init);
* });
*
* // Create caching middleware
* const cacheMiddleware = createMiddleware(async (next, input, init) => {
* const cacheKey = typeof input === 'string' ? input : input.toString();
*
* // Check cache first
* const cached = await getFromCache(cacheKey);
* if (cached) {
* return new Response(cached, { status: 200 });
* }
*
* // Make request and cache result
* const response = await next(input, init);
* if (response.ok) {
* await saveToCache(cacheKey, await response.clone().text());
* }
*
* return response;
* });
* ```
*
* @param handler - Function that receives the next handler and request parameters
* @returns A fetch middleware function
*/
export const createMiddleware = (handler) => {
return next => (input, init) => handler(next, input, init);
};
//# sourceMappingURL=middleware.js.map
@@ -0,0 +1,27 @@
/**
* dd-elements.ts 12.6.0
* Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license
*/
import { DDResizable, DDResizableOpt } from './dd-resizable';
import { DDDragOpt, GridItemHTMLElement } from './types';
import { DDDraggable } from './dd-draggable';
import { DDDroppable, DDDroppableOpt } from './dd-droppable';
export interface DDElementHost extends GridItemHTMLElement {
ddElement?: DDElement;
}
export declare class DDElement {
el: DDElementHost;
static init(el: DDElementHost): DDElement;
ddDraggable?: DDDraggable;
ddDroppable?: DDDroppable;
ddResizable?: DDResizable;
constructor(el: DDElementHost);
on(eventName: string, callback: (event: MouseEvent) => void): DDElement;
off(eventName: string): DDElement;
setupDraggable(opts: DDDragOpt): DDElement;
cleanDraggable(): DDElement;
setupResizable(opts: DDResizableOpt): DDElement;
cleanResizable(): DDElement;
setupDroppable(opts: DDDroppableOpt): DDElement;
cleanDroppable(): DDElement;
}
@@ -0,0 +1 @@
{"version":3,"file":"mic-off.js","sources":["../../../src/icons/mic-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MicOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8bGluZSB4MT0iMiIgeDI9IjIyIiB5MT0iMiIgeTI9IjIyIiAvPgogIDxwYXRoIGQ9Ik0xOC44OSAxMy4yM0E3LjEyIDcuMTIgMCAwIDAgMTkgMTJ2LTIiIC8+CiAgPHBhdGggZD0iTTUgMTB2MmE3IDcgMCAwIDAgMTIgNSIgLz4KICA8cGF0aCBkPSJNMTUgOS4zNFY1YTMgMyAwIDAgMC01LjY4LTEuMzMiIC8+CiAgPHBhdGggZD0iTTkgOXYzYTMgMyAwIDAgMCA1LjEyIDIuMTIiIC8+CiAgPGxpbmUgeDE9IjEyIiB4Mj0iMTIiIHkxPSIxOSIgeTI9IjIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/mic-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 MicOff = createLucideIcon('MicOff', [\n ['line', { x1: '2', x2: '22', y1: '2', y2: '22', key: 'a6p6uj' }],\n ['path', { d: 'M18.89 13.23A7.12 7.12 0 0 0 19 12v-2', key: '80xlxr' }],\n ['path', { d: 'M5 10v2a7 7 0 0 0 12 5', key: 'p2k8kg' }],\n ['path', { d: 'M15 9.34V5a3 3 0 0 0-5.68-1.33', key: '1gzdoj' }],\n ['path', { d: 'M9 9v3a3 3 0 0 0 5.12 2.12', key: 'r2i35w' }],\n ['line', { x1: '12', x2: '12', y1: '19', y2: '22', key: 'x3vr5v' }],\n]);\n\nexport default MicOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAChE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACtE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC/D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC3D,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,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACpE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"repeat-2.js","sources":["../../../src/icons/repeat-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Repeat2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMiA5IDMtMyAzIDMiIC8+CiAgPHBhdGggZD0iTTEzIDE4SDdhMiAyIDAgMCAxLTItMlY2IiAvPgogIDxwYXRoIGQ9Im0yMiAxNS0zIDMtMy0zIiAvPgogIDxwYXRoIGQ9Ik0xMSA2aDZhMiAyIDAgMCAxIDIgMnYxMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/repeat-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Repeat2 = createLucideIcon('Repeat2', [\n ['path', { d: 'm2 9 3-3 3 3', key: '1ltn5i' }],\n ['path', { d: 'M13 18H7a2 2 0 0 1-2-2V6', key: '1r6tfw' }],\n ['path', { d: 'm22 15-3 3-3-3', key: '4rnwn2' }],\n ['path', { d: 'M11 6h6a2 2 0 0 1 2 2v10', key: '2f72bc' }],\n]);\n\nexport default Repeat2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,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,CAC7C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAA;AAAA,CAAA,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = generateCode;
function _convertSourceMap() {
const data = require("convert-source-map");
_convertSourceMap = function () {
return data;
};
return data;
}
function _generator() {
const data = require("@babel/generator");
_generator = function () {
return data;
};
return data;
}
var _mergeMap = require("./merge-map.js");
function generateCode(pluginPasses, file) {
const {
opts,
ast,
code,
inputMap
} = file;
const {
generatorOpts
} = opts;
generatorOpts.inputSourceMap = inputMap == null ? void 0 : inputMap.toObject();
const results = [];
for (const plugins of pluginPasses) {
for (const plugin of plugins) {
const {
generatorOverride
} = plugin;
if (generatorOverride) {
const result = generatorOverride(ast, generatorOpts, code, _generator().default);
if (result !== undefined) results.push(result);
}
}
}
let result;
if (results.length === 0) {
result = (0, _generator().default)(ast, generatorOpts, code);
} else if (results.length === 1) {
result = results[0];
if (typeof result.then === "function") {
throw new Error(`You appear to be using an async codegen plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version.`);
}
} else {
throw new Error("More than one plugin attempted to override codegen.");
}
let {
code: outputCode,
decodedMap: outputMap = result.map
} = result;
if (result.__mergedMap) {
outputMap = Object.assign({}, result.map);
} else {
if (outputMap) {
if (inputMap) {
outputMap = (0, _mergeMap.default)(inputMap.toObject(), outputMap, generatorOpts.sourceFileName);
} else {
outputMap = result.map;
}
}
}
if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") {
outputCode += "\n" + _convertSourceMap().fromObject(outputMap).toComment();
}
if (opts.sourceMaps === "inline") {
outputMap = null;
}
return {
outputCode,
outputMap
};
}
0 && 0;
//# sourceMappingURL=generate.js.map