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

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

No files matched your search

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.removedBarSizeVariable = exports.noScrollbarsClassName = exports.fullWidthClassName = exports.zeroRightClassName = void 0;
exports.zeroRightClassName = 'right-scroll-bar-position';
exports.fullWidthClassName = 'width-before-scroll-bar';
exports.noScrollbarsClassName = 'with-scroll-bars-hidden';
/**
* Name of a CSS variable containing the amount of "hidden" scrollbar
* ! might be undefined ! use will fallback!
*/
exports.removedBarSizeVariable = '--removed-body-scroll-bar-size';
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_LC","8":"_IB"},B:{"1":"_J"},C:{"1":"_zF","8":"_OC"},D:{"1":"_7D","8":"J"},E:{"1":"_nB","8":"_k"},F:{"1":"_0F","8":"_1G"},G:{"1":"_eB","2":"lC"},H:{"2":"1D"},I:{"1":"_IR","2":"2D"},J:{"1":"_B"},K:{"1":"_CB","8":"A"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"Hashchange event",D:true};
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.finalize = finalize;
exports.flattenToSet = flattenToSet;
function finalize(deepArr) {
return Object.freeze(deepArr);
}
function flattenToSet(arr) {
const result = new Set();
const stack = [arr];
while (stack.length > 0) {
for (const el of stack.pop()) {
if (Array.isArray(el)) stack.push(el);else result.add(el);
}
}
return result;
}
0 && 0;
//# sourceMappingURL=deep-array.js.map
@@ -0,0 +1 @@
{"version":3,"file":"anchor.js","sources":["../../../src/icons/anchor.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Anchor\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMjJWOCIgLz4KICA8cGF0aCBkPSJNNSAxMkgyYTEwIDEwIDAgMCAwIDIwIDBoLTMiIC8+CiAgPGNpcmNsZSBjeD0iMTIiIGN5PSI1IiByPSIzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/anchor\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 Anchor = createLucideIcon('Anchor', [\n ['path', { d: 'M12 22V8', key: 'qkxhtm' }],\n ['path', { d: 'M5 12H2a10 10 0 0 0 20 0h-3', key: '1hv3nh' }],\n ['circle', { cx: '12', cy: '5', r: '3', key: 'rqqgnr' }],\n]);\n\nexport default Anchor;\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,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,CAA+B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC5D,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,3 @@
import { JSX } from "../base.js";
import { Fragment, jsxDEV } from "./jsx-dev-runtime.js";
export { Fragment, type JSX, jsxDEV as jsx, jsxDEV as jsxs };
@@ -0,0 +1 @@
{"version":3,"file":"ssePollingClient.js","sourceRoot":"","sources":["../../../../src/examples/client/ssePollingClient.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;GAaG;AACH,oDAA+C;AAC/C,sEAA+E;AAC/E,6CAAwF;AAExF,MAAM,UAAU,GAAG,2BAA2B,CAAC;AAE/C,KAAK,UAAU,IAAI;IACf,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAC1C,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAC1C,OAAO,CAAC,GAAG,CAAC,iBAAiB,UAAU,KAAK,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,EAAE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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 HardDriveUpload = createLucideIcon("HardDriveUpload", [
["path", { d: "m16 6-4-4-4 4", key: "13yo43" }],
["path", { d: "M12 2v8", key: "1q4o3n" }],
["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", key: "w68u3i" }],
["path", { d: "M6 18h.01", key: "uhywen" }],
["path", { d: "M10 18h.01", key: "h775k" }]
]);
export { HardDriveUpload as default };
//# sourceMappingURL=hard-drive-upload.js.map
@@ -0,0 +1,65 @@
import type * as JSONSchema from "./json-schema.cjs";
import type { $ZodRegistry } from "./registries.cjs";
import type * as schemas from "./schemas.cjs";
import { type JSONSchemaGeneratorParams, type ProcessParams, type Seen, type ToJSONSchemaContext } from "./to-json-schema.cjs";
/**
* Parameters for the emit method of JSONSchemaGenerator.
* @deprecated Use toJSONSchema function instead
*/
export type EmitParams = Pick<JSONSchemaGeneratorParams, "cycles" | "reused" | "external">;
/**
* Parameters for JSONSchemaGenerator constructor.
* @deprecated Use toJSONSchema function instead
*/
type JSONSchemaGeneratorConstructorParams = Pick<JSONSchemaGeneratorParams, "metadata" | "target" | "unrepresentable" | "override" | "io">;
/**
* Legacy class-based interface for JSON Schema generation.
* This class wraps the new functional implementation to provide backward compatibility.
*
* @deprecated Use the `toJSONSchema` function instead for new code.
*
* @example
* ```typescript
* // Legacy usage (still supported)
* const gen = new JSONSchemaGenerator({ target: "draft-07" });
* gen.process(schema);
* const result = gen.emit(schema);
*
* // Preferred modern usage
* const result = toJSONSchema(schema, { target: "draft-07" });
* ```
*/
export declare class JSONSchemaGenerator {
private ctx;
/** @deprecated Access via ctx instead */
get metadataRegistry(): $ZodRegistry<Record<string, any>>;
/** @deprecated Access via ctx instead */
get target(): ({} & string) | "draft-2020-12" | "draft-07" | "openapi-3.0" | "draft-04";
/** @deprecated Access via ctx instead */
get unrepresentable(): ToJSONSchemaContext["unrepresentable"];
/** @deprecated Access via ctx instead */
get override(): (ctx: {
zodSchema: schemas.$ZodType;
jsonSchema: JSONSchema.BaseSchema;
path: (string | number)[];
}) => void;
/** @deprecated Access via ctx instead */
get io(): "input" | "output";
/** @deprecated Access via ctx instead */
get counter(): number;
set counter(value: number);
/** @deprecated Access via ctx instead */
get seen(): Map<schemas.$ZodType, Seen>;
constructor(params?: JSONSchemaGeneratorConstructorParams);
/**
* Process a schema to prepare it for JSON Schema generation.
* This must be called before emit().
*/
process(schema: schemas.$ZodType, _params?: ProcessParams): JSONSchema.BaseSchema;
/**
* Emit the final JSON Schema after processing.
* Must call process() first.
*/
emit(schema: schemas.$ZodType, _params?: EmitParams): JSONSchema.BaseSchema;
}
export {};
@@ -0,0 +1 @@
{"version":3,"names":["generatorFunctions","require","deprecatedGeneratorFunctions","generatorInfosMap","exports","Map","index","key","Object","keys","sort","startsWith","set","undefined"],"sources":["../src/nodes.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\n\nimport * as generatorFunctions from \"./generators/index.ts\";\nimport * as deprecatedGeneratorFunctions from \"./generators/deprecated.ts\";\nimport type { NodeHandler } from \"./node/index.ts\";\nimport type Printer from \"./printer.ts\";\n\ndeclare global {\n function __node(type: t.Node[\"type\"]): number;\n}\n\nconst generatorInfosMap = new Map<\n string,\n [\n (this: Printer, node: t.Node, parent?: t.Node | null) => void,\n number,\n NodeHandler<boolean> | undefined,\n ]\n>();\nlet index = 0;\n\nfor (const key of Object.keys(generatorFunctions).sort() as Exclude<\n keyof typeof generatorFunctions,\n `_${string}`\n>[]) {\n if (key.startsWith(\"_\")) continue;\n generatorInfosMap.set(key, [generatorFunctions[key], index++, undefined]);\n}\nif (!process.env.BABEL_8_BREAKING) {\n for (const key of Object.keys(\n deprecatedGeneratorFunctions,\n ) as (keyof typeof deprecatedGeneratorFunctions)[]) {\n generatorInfosMap.set(key, [\n deprecatedGeneratorFunctions[key],\n index++,\n undefined,\n ]);\n }\n}\n\nexport { generatorInfosMap };\n"],"mappings":";;;;;;AAEA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,4BAAA,GAAAD,OAAA;AAQA,MAAME,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAIE,GAAG,CAO/B,CAAC;AACH,IAAIC,KAAK,GAAG,CAAC;AAEb,KAAK,MAAMC,GAAG,IAAIC,MAAM,CAACC,IAAI,CAACT,kBAAkB,CAAC,CAACU,IAAI,CAAC,CAAC,EAGnD;EACH,IAAIH,GAAG,CAACI,UAAU,CAAC,GAAG,CAAC,EAAE;EACzBR,iBAAiB,CAACS,GAAG,CAACL,GAAG,EAAE,CAACP,kBAAkB,CAACO,GAAG,CAAC,EAAED,KAAK,EAAE,EAAEO,SAAS,CAAC,CAAC;AAC3E;AAEE,KAAK,MAAMN,GAAG,IAAIC,MAAM,CAACC,IAAI,CAC3BP,4BACF,CAAC,EAAmD;EAClDC,iBAAiB,CAACS,GAAG,CAACL,GAAG,EAAE,CACzBL,4BAA4B,CAACK,GAAG,CAAC,EACjCD,KAAK,EAAE,EACPO,SAAS,CACV,CAAC;AACJ","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"feedback.cjs","sources":["../../../src/matcher/sequence/feedback.ts"],"sourcesContent":[null],"names":["options","warning","translations","warnings","sequences","suggestions"],"mappings":";;AAEA,sBAAgBA,OAAgB,IAAI;EAClC,OAAO;AACLC,IAAAA,OAAO,EAAED,OAAO,CAACE,YAAY,CAACC,QAAQ,CAACC,SAAS;IAChDC,WAAW,EAAE,CAACL,OAAO,CAACE,YAAY,CAACG,WAAW,CAACD,SAAS;GACzD;AACH,CAAC;;;;"}
@@ -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 ClockArrowUp = createLucideIcon("ClockArrowUp", [
["path", { d: "M13.228 21.925A10 10 0 1 1 21.994 12.338", key: "1fzlyi" }],
["path", { d: "M12 6v6l1.562.781", key: "1ujuk9" }],
["path", { d: "m14 18 4-4 4 4", key: "ftkppy" }],
["path", { d: "M18 22v-8", key: "su0gjh" }]
]);
export { ClockArrowUp as default };
//# sourceMappingURL=clock-arrow-up.js.map
@@ -0,0 +1 @@
{"version":3,"file":"feedback.mjs","sources":["../../../src/matcher/date/feedback.ts"],"sourcesContent":[null],"names":["options","warning","translations","warnings","dates","suggestions"],"mappings":"AAEA,kBAAgBA,OAAgB,IAAI;EAClC,OAAO;AACLC,IAAAA,OAAO,EAAED,OAAO,CAACE,YAAY,CAACC,QAAQ,CAACC,KAAK;IAC5CC,WAAW,EAAE,CAACL,OAAO,CAACE,YAAY,CAACG,WAAW,CAACD,KAAK;GACrD;AACH,CAAC;;;;"}
@@ -0,0 +1,96 @@
import * as React from 'react'
import { isModuleNotFoundError } from '@tanstack/router-core'
import { reactUse } from './utils'
import type { AsyncRouteComponent } from './route'
/**
* Wrap a dynamic import to create a route component that supports
* `.preload()` and friendly reload-on-module-missing behavior.
*
* @param importer Function returning a module promise
* @param exportName Named export to use (default: `default`)
* @returns A lazy route component compatible with TanStack Router
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/lazyRouteComponentFunction
*/
export function lazyRouteComponent<
T extends Record<string, any>,
TKey extends keyof T = 'default',
>(
importer: () => Promise<T>,
exportName?: TKey,
): T[TKey] extends (props: infer TProps) => any
? AsyncRouteComponent<TProps>
: never {
let loadPromise: Promise<any> | undefined
let comp: T[TKey] | T['default']
let error: any
let reload: boolean
const load = () => {
if (!loadPromise) {
loadPromise = importer()
.then((res) => {
loadPromise = undefined
comp = res[exportName ?? 'default']
})
.catch((err) => {
// We don't want an error thrown from preload in this case, because
// there's nothing we want to do about module not found during preload.
// Record the error, the rest is handled during the render path.
error = err
// If the load fails due to module not found, it may mean a new version of
// the build was deployed and the user's browser is still using an old version.
// If this happens, the old version in the user's browser would have an outdated
// URL to the lazy module.
// In that case, we want to attempt one window refresh to get the latest.
if (isModuleNotFoundError(error)) {
if (
error instanceof Error &&
typeof window !== 'undefined' &&
typeof sessionStorage !== 'undefined'
) {
// Again, we want to reload one time on module not found error and not enter
// a reload loop if there is some other issue besides an old deploy.
// That's why we store our reload attempt in sessionStorage.
// Use error.message as key because it contains the module path that failed.
const storageKey = `tanstack_router_reload:${error.message}`
if (!sessionStorage.getItem(storageKey)) {
sessionStorage.setItem(storageKey, '1')
reload = true
}
}
}
})
}
return loadPromise
}
const lazyComp = function Lazy(props: any) {
// Now that we're out of preload and into actual render path,
if (reload) {
// If it was a module loading error,
// throw eternal suspense while we wait for window to reload
window.location.reload()
throw new Promise(() => {})
}
if (error) {
// Otherwise, just throw the error
throw error
}
if (!comp) {
if (reactUse) {
reactUse(load())
} else {
throw load()
}
}
return React.createElement(comp, props)
}
;(lazyComp as any).preload = load
return lazyComp as any
}
@@ -0,0 +1,37 @@
{
"name": "lightningcss-linux-x64-gnu",
"version": "1.32.0",
"license": "MPL-2.0",
"description": "A CSS parser, transformer, and minifier written in Rust",
"main": "lightningcss.linux-x64-gnu.node",
"browserslist": "last 2 versions, not dead",
"publishConfig": {
"access": "public"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
},
"repository": {
"type": "git",
"url": "https://github.com/parcel-bundler/lightningcss.git"
},
"engines": {
"node": ">= 12.0.0"
},
"files": [
"lightningcss.linux-x64-gnu.node"
],
"resolutions": {
"lightningcss": "link:."
},
"os": [
"linux"
],
"cpu": [
"x64"
],
"libc": [
"glibc"
]
}
@@ -0,0 +1,27 @@
import { describe, expect, it } from "vitest";
import * as z from "../index.js";
describe("z.describe() check", () => {
it("registers description in globalRegistry", () => {
const schema = z.string().check(z.describe("A string"));
expect(z.globalRegistry.get(schema)?.description).toBe("A string");
});
});
describe("z.meta() check", () => {
it("registers metadata in globalRegistry", () => {
const schema = z.number().check(z.meta({ title: "Age", description: "User's age" }));
const meta = z.globalRegistry.get(schema);
expect(meta?.title).toBe("Age");
expect(meta?.description).toBe("User's age");
});
});
describe("combined usage", () => {
it("works with multiple checks", () => {
const schema = z.string().check(z.describe("Email address"), z.meta({ title: "Email" }));
const meta = z.globalRegistry.get(schema);
expect(meta?.description).toBe("Email address");
expect(meta?.title).toBe("Email");
});
});
@@ -0,0 +1,63 @@
{
"name": "@tanstack/store",
"version": "0.9.3",
"description": "Framework agnostic type-safe store w/ reactive framework adapters",
"author": "Tanner Linsley",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/TanStack/store.git",
"directory": "packages/store"
},
"homepage": "https://tanstack.com/store",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"keywords": [
"store",
"typescript"
],
"type": "module",
"types": "dist/esm/index.d.ts",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.js",
"exports": {
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
}
},
"./package.json": "./package.json"
},
"sideEffects": false,
"files": [
"dist",
"src"
],
"devDependencies": {
"@angular/core": "^21.1.2",
"@preact/signals": "^1.3.2",
"solid-js": "^1.9.9",
"vue": "^3.5.22"
},
"scripts": {
"clean": "premove ./dist ./coverage",
"test:eslint": "eslint ./src ./tests",
"test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"",
"test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js",
"test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js",
"test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js",
"test:types:ts59": "tsc",
"test:lib": "vitest",
"test:bench": "vitest bench",
"test:lib:dev": "pnpm run test:lib --watch",
"test:build": "publint --strict",
"build": "vite build"
}
}
@@ -0,0 +1,18 @@
import { Env, FormValue, MiddlewareHandler, TypedResponse, ValidationTargets } from "../types.js";
import { Context } from "../context.js";
import { InferInput } from "./utils.js";
//#region src/validator/validator.d.ts
type ValidationTargetKeysWithBody = 'form' | 'json';
type ValidationTargetByMethod<M> = M extends 'get' | 'head' ? Exclude<keyof ValidationTargets, ValidationTargetKeysWithBody> : keyof ValidationTargets;
export type ValidationFunction<InputType, OutputType, E extends Env = {}, P extends string = string> = (value: InputType, c: Context<E, P>) => OutputType | TypedResponse | Promise<OutputType> | Promise<TypedResponse>;
export type ExtractValidationResponse<VF> = VF extends ((value: any, c: any) => infer R) ? R extends Promise<infer PR> ? PR extends TypedResponse<infer T, infer S, infer F> ? TypedResponse<T, S, F> : PR extends Response ? PR : PR extends undefined ? never : never : R extends TypedResponse<infer T, infer S, infer F> ? TypedResponse<T, S, F> : R extends Response ? R : R extends undefined ? never : never : never;
export declare const validator: <InputType, P extends string, M extends string, U extends ValidationTargetByMethod<M>, P2 extends string = P, VF extends (value: unknown extends InputType ? ValidationTargets[U] : InputType, c: Context<any, P2>) => any = (value: unknown extends InputType ? ValidationTargets[U] : InputType, c: Context<any, P2>) => any, V extends {
in: { [K in U]: K extends "json" ? unknown extends InputType ? ExtractValidatorOutput<VF> : InputType : InferInput<ExtractValidatorOutput<VF>, K, FormValue>; };
out: { [K in U]: ExtractValidatorOutput<VF>; };
} = {
in: { [K in U]: K extends "json" ? unknown extends InputType ? ExtractValidatorOutput<VF> : InputType : InferInput<ExtractValidatorOutput<VF>, K, FormValue>; };
out: { [K in U]: ExtractValidatorOutput<VF>; };
}, E extends Env = any>(target: U, validationFunc: VF) => MiddlewareHandler<E, P, V, ExtractValidationResponse<VF>>;
export type ExtractValidatorOutput<VF> = VF extends ((value: any, c: any) => infer R) ? R extends Promise<infer PR> ? PR extends Response | TypedResponse<any, any, any> ? never : PR : R extends Response | TypedResponse<any, any, any> ? never : R : never;
//#endregion
export {};
@@ -0,0 +1,532 @@
import { c as createSimpleStackTrace } from './chunk-helpers.js';
import { mockObject } from './index.js';
import { M as MockerRegistry, R as RedirectedModule, A as AutomockedModule } from './chunk-registry.js';
import { e as extname, j as join } from './chunk-pathe.M-eThtNZ.js';
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
function normalizeWindowsPath(input = "") {
if (!input) {
return input;
}
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
}
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
function cwd() {
if (typeof process !== "undefined" && typeof process.cwd === "function") {
return process.cwd().replace(/\\/g, "/");
}
return "/";
}
const resolve = function(...arguments_) {
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
let resolvedPath = "";
let resolvedAbsolute = false;
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
const path = index >= 0 ? arguments_[index] : cwd();
if (!path || path.length === 0) {
continue;
}
resolvedPath = `${path}/${resolvedPath}`;
resolvedAbsolute = isAbsolute(path);
}
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
return `/${resolvedPath}`;
}
return resolvedPath.length > 0 ? resolvedPath : ".";
};
function normalizeString(path, allowAboveRoot) {
let res = "";
let lastSegmentLength = 0;
let lastSlash = -1;
let dots = 0;
let char = null;
for (let index = 0; index <= path.length; ++index) {
if (index < path.length) {
char = path[index];
} else if (char === "/") {
break;
} else {
char = "/";
}
if (char === "/") {
if (lastSlash === index - 1 || dots === 1);
else if (dots === 2) {
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
if (res.length > 2) {
const lastSlashIndex = res.lastIndexOf("/");
if (lastSlashIndex === -1) {
res = "";
lastSegmentLength = 0;
} else {
res = res.slice(0, lastSlashIndex);
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
}
lastSlash = index;
dots = 0;
continue;
} else if (res.length > 0) {
res = "";
lastSegmentLength = 0;
lastSlash = index;
dots = 0;
continue;
}
}
if (allowAboveRoot) {
res += res.length > 0 ? "/.." : "..";
lastSegmentLength = 2;
}
} else {
if (res.length > 0) {
res += `/${path.slice(lastSlash + 1, index)}`;
} else {
res = path.slice(lastSlash + 1, index);
}
lastSegmentLength = index - lastSlash - 1;
}
lastSlash = index;
dots = 0;
} else if (char === "." && dots !== -1) {
++dots;
} else {
dots = -1;
}
}
return res;
}
const isAbsolute = function(p) {
return _IS_ABSOLUTE_RE.test(p);
};
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var intToChar = new Uint8Array(64);
var charToInt = new Uint8Array(128);
for (let i = 0; i < chars.length; i++) {
const c = chars.charCodeAt(i);
intToChar[i] = c;
charToInt[c] = i;
}
const CHROME_IE_STACK_REGEXP = /^\s*at .*(?:\S:\d+|\(native\))/m;
const SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\[native code\])?$/;
const NOW_LENGTH = Date.now().toString().length;
const REGEXP_VITEST = new RegExp(`vitest=\\d{${NOW_LENGTH}}`);
function extractLocation(urlLike) {
// Fail-fast but return locations like "(native)"
if (!urlLike.includes(":")) {
return [urlLike];
}
const regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
const parts = regExp.exec(urlLike.replace(/^\(|\)$/g, ""));
if (!parts) {
return [urlLike];
}
let url = parts[1];
if (url.startsWith("async ")) {
url = url.slice(6);
}
if (url.startsWith("http:") || url.startsWith("https:")) {
const urlObj = new URL(url);
urlObj.searchParams.delete("import");
urlObj.searchParams.delete("browserv");
url = urlObj.pathname + urlObj.hash + urlObj.search;
}
if (url.startsWith("/@fs/")) {
const isWindows = /^\/@fs\/[a-zA-Z]:\//.test(url);
url = url.slice(isWindows ? 5 : 4);
}
if (url.includes("vitest=")) {
url = url.replace(REGEXP_VITEST, "").replace(/[?&]$/, "");
}
return [
url,
parts[2] || undefined,
parts[3] || undefined
];
}
function parseSingleFFOrSafariStack(raw) {
let line = raw.trim();
if (SAFARI_NATIVE_CODE_REGEXP.test(line)) {
return null;
}
if (line.includes(" > eval")) {
line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1");
}
// Early return for lines that don't look like Firefox/Safari stack traces
// Firefox/Safari stack traces must contain '@' and should have location info after it
if (!line.includes("@")) {
return null;
}
// Find the correct @ that separates function name from location
// For cases like '@https://@fs/path' or 'functionName@https://@fs/path'
// we need to find the first @ that precedes a valid location (containing :)
let atIndex = -1;
let locationPart = "";
let functionName;
// Try each @ from left to right to find the one that gives us a valid location
for (let i = 0; i < line.length; i++) {
if (line[i] === "@") {
const candidateLocation = line.slice(i + 1);
// Minimum length 3 for valid location: 1 for filename + 1 for colon + 1 for line number (e.g., "a:1")
if (candidateLocation.includes(":") && candidateLocation.length >= 3) {
atIndex = i;
locationPart = candidateLocation;
functionName = i > 0 ? line.slice(0, i) : undefined;
break;
}
}
}
// Validate we found a valid location with minimum length (filename:line format)
if (atIndex === -1 || !locationPart.includes(":") || locationPart.length < 3) {
return null;
}
const [url, lineNumber, columnNumber] = extractLocation(locationPart);
if (!url || !lineNumber || !columnNumber) {
return null;
}
return {
file: url,
method: functionName || "",
line: Number.parseInt(lineNumber),
column: Number.parseInt(columnNumber)
};
}
function parseSingleStack(raw) {
const line = raw.trim();
if (!CHROME_IE_STACK_REGEXP.test(line)) {
return parseSingleFFOrSafariStack(line);
}
return parseSingleV8Stack(line);
}
// Based on https://github.com/stacktracejs/error-stack-parser
// Credit to stacktracejs
function parseSingleV8Stack(raw) {
let line = raw.trim();
if (!CHROME_IE_STACK_REGEXP.test(line)) {
return null;
}
if (line.includes("(eval ")) {
line = line.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, "");
}
let sanitizedLine = line.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, "");
// capture and preserve the parenthesized location "(/foo/my bar.js:12:87)" in
// case it has spaces in it, as the string is split on \s+ later on
const location = sanitizedLine.match(/ (\(.+\)$)/);
// remove the parenthesized location from the line, if it was matched
sanitizedLine = location ? sanitizedLine.replace(location[0], "") : sanitizedLine;
// if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine
// because this line doesn't have function name
const [url, lineNumber, columnNumber] = extractLocation(location ? location[1] : sanitizedLine);
let method = location && sanitizedLine || "";
let file = url && ["eval", "<anonymous>"].includes(url) ? undefined : url;
if (!file || !lineNumber || !columnNumber) {
return null;
}
if (method.startsWith("async ")) {
method = method.slice(6);
}
if (file.startsWith("file://")) {
file = file.slice(7);
}
// normalize Windows path (\ -> /)
file = file.startsWith("node:") || file.startsWith("internal:") ? file : resolve(file);
if (method) {
method = method.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g, "$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g, "").replace(/(Object\.)?__vite_ssr_export_default__\s?/g, "");
}
return {
method,
file,
line: Number.parseInt(lineNumber),
column: Number.parseInt(columnNumber)
};
}
function createCompilerHints(options) {
const globalThisAccessor = options?.globalThisKey || "__vitest_mocker__";
function _mocker() {
// @ts-expect-error injected by the plugin
return typeof globalThis[globalThisAccessor] !== "undefined" ? globalThis[globalThisAccessor] : new Proxy({}, { get(_, name) {
throw new Error("Vitest mocker was not initialized in this environment. " + `vi.${String(name)}() is forbidden.`);
} });
}
return {
hoisted(factory) {
if (typeof factory !== "function") {
throw new TypeError(`vi.hoisted() expects a function, but received a ${typeof factory}`);
}
return factory();
},
mock(path, factory) {
if (typeof path !== "string") {
throw new TypeError(`vi.mock() expects a string path, but received a ${typeof path}`);
}
const importer = getImporter("mock");
_mocker().queueMock(path, importer, typeof factory === "function" ? () => factory(() => _mocker().importActual(path, importer)) : factory);
},
unmock(path) {
if (typeof path !== "string") {
throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof path}`);
}
_mocker().queueUnmock(path, getImporter("unmock"));
},
doMock(path, factory) {
if (typeof path !== "string") {
throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof path}`);
}
const importer = getImporter("doMock");
_mocker().queueMock(path, importer, typeof factory === "function" ? () => factory(() => _mocker().importActual(path, importer)) : factory);
},
doUnmock(path) {
if (typeof path !== "string") {
throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof path}`);
}
_mocker().queueUnmock(path, getImporter("doUnmock"));
},
async importActual(path) {
return _mocker().importActual(path, getImporter("importActual"));
},
async importMock(path) {
return _mocker().importMock(path, getImporter("importMock"));
}
};
}
function getImporter(name) {
const stackTrace = /* @__PURE__ */ createSimpleStackTrace({ stackTraceLimit: 5 });
const stackArray = stackTrace.split("\n");
// if there is no message in a stack trace, use the item - 1
const importerStackIndex = stackArray.findIndex((stack) => {
return stack.includes(` at Object.${name}`) || stack.includes(`${name}@`);
});
const stack = /* @__PURE__ */ parseSingleStack(stackArray[importerStackIndex + 1]);
return stack?.file || "";
}
const hot = import.meta.hot || {
on: warn,
off: warn,
send: warn
};
function warn() {
console.warn("Vitest mocker cannot work if Vite didn't establish WS connection.");
}
function rpc(event, data) {
hot.send(event, data);
return new Promise((resolve, reject) => {
const timeout = setTimeout(() => {
reject(new Error(`Failed to resolve ${event} in time`));
}, 5e3);
hot.on(`${event}:result`, function r(data) {
resolve(data);
clearTimeout(timeout);
hot.off(`${event}:result`, r);
});
});
}
const { now } = Date;
class ModuleMocker {
registry = new MockerRegistry();
queue = new Set();
mockedIds = new Set();
constructor(interceptor, rpc, createMockInstance, config) {
this.interceptor = interceptor;
this.rpc = rpc;
this.createMockInstance = createMockInstance;
this.config = config;
}
async prepare() {
if (!this.queue.size) {
return;
}
await Promise.all([...this.queue.values()]);
}
async resolveFactoryModule(id) {
const mock = this.registry.get(id);
if (!mock || mock.type !== "manual") {
throw new Error(`Mock ${id} wasn't registered. This is probably a Vitest error. Please, open a new issue with reproduction.`);
}
const result = await mock.resolve();
return result;
}
getFactoryModule(id) {
const mock = this.registry.get(id);
if (!mock || mock.type !== "manual") {
throw new Error(`Mock ${id} wasn't registered. This is probably a Vitest error. Please, open a new issue with reproduction.`);
}
if (!mock.cache) {
throw new Error(`Mock ${id} wasn't resolved. This is probably a Vitest error. Please, open a new issue with reproduction.`);
}
return mock.cache;
}
async invalidate() {
const ids = Array.from(this.mockedIds);
if (!ids.length) {
return;
}
await this.rpc.invalidate(ids);
await this.interceptor.invalidate();
this.registry.clear();
}
async importActual(id, importer) {
const resolved = await this.rpc.resolveId(id, importer);
if (resolved == null) {
throw new Error(`[vitest] Cannot resolve "${id}" imported from "${importer}"`);
}
const ext = extname(resolved.id);
const url = new URL(resolved.url, this.getBaseUrl());
const query = `_vitest_original&ext${ext}`;
const actualUrl = `${url.pathname}${url.search ? `${url.search}&${query}` : `?${query}`}${url.hash}`;
return this.wrapDynamicImport(() => import(
/* @vite-ignore */
actualUrl
)).then((mod) => {
if (!resolved.optimized || typeof mod.default === "undefined") {
return mod;
}
// vite injects this helper for optimized modules, so we try to follow the same behavior
const m = mod.default;
return m?.__esModule ? m : {
...typeof m === "object" && !Array.isArray(m) || typeof m === "function" ? m : {},
default: m
};
});
}
getBaseUrl() {
return location.href;
}
async importMock(rawId, importer) {
await this.prepare();
const { resolvedId, resolvedUrl, redirectUrl } = await this.rpc.resolveMock(rawId, importer, { mock: "auto" });
const mockUrl = this.resolveMockPath(cleanVersion(resolvedUrl));
let mock = this.registry.get(mockUrl);
if (!mock) {
if (redirectUrl) {
const resolvedRedirect = new URL(this.resolveMockPath(cleanVersion(redirectUrl)), this.getBaseUrl()).toString();
mock = new RedirectedModule(rawId, resolvedId, mockUrl, resolvedRedirect);
} else {
mock = new AutomockedModule(rawId, resolvedId, mockUrl);
}
}
if (mock.type === "manual") {
return await mock.resolve();
}
if (mock.type === "automock" || mock.type === "autospy") {
const url = new URL(`/@id/${resolvedId}`, this.getBaseUrl());
const query = url.search ? `${url.search}&t=${now()}` : `?t=${now()}`;
const moduleObject = await import(
/* @vite-ignore */
`${url.pathname}${query}&mock=${mock.type}${url.hash}`
);
return this.mockObject(moduleObject, mock.type);
}
return import(
/* @vite-ignore */
mock.redirect
);
}
mockObject(object, mockExportsOrModuleType, moduleType) {
let mockExports;
if (mockExportsOrModuleType === "automock" || mockExportsOrModuleType === "autospy") {
moduleType = mockExportsOrModuleType;
mockExports = undefined;
} else {
mockExports = mockExportsOrModuleType;
}
moduleType ??= "automock";
const result = mockObject({
globalConstructors: {
Object,
Function,
Array,
Map,
RegExp
},
createMockInstance: this.createMockInstance,
type: moduleType
}, object, mockExports);
return result;
}
getMockContext() {
return { callstack: null };
}
queueMock(rawId, importer, factoryOrOptions) {
const promise = this.rpc.resolveMock(rawId, importer, { mock: typeof factoryOrOptions === "function" ? "factory" : factoryOrOptions?.spy ? "spy" : "auto" }).then(async ({ redirectUrl, resolvedId, resolvedUrl, needsInterop, mockType }) => {
const mockUrl = this.resolveMockPath(cleanVersion(resolvedUrl));
this.mockedIds.add(resolvedId);
const factory = typeof factoryOrOptions === "function" ? async () => {
const data = await factoryOrOptions();
// vite wraps all external modules that have "needsInterop" in a function that
// merges all exports from default into the module object
return needsInterop ? { default: data } : data;
} : undefined;
const mockRedirect = typeof redirectUrl === "string" ? new URL(this.resolveMockPath(cleanVersion(redirectUrl)), this.getBaseUrl()).toString() : null;
let module;
if (mockType === "manual") {
module = this.registry.register("manual", rawId, resolvedId, mockUrl, factory);
} else if (mockType === "autospy") {
module = this.registry.register("autospy", rawId, resolvedId, mockUrl);
} else if (mockType === "redirect") {
module = this.registry.register("redirect", rawId, resolvedId, mockUrl, mockRedirect);
} else {
module = this.registry.register("automock", rawId, resolvedId, mockUrl);
}
await this.interceptor.register(module);
}).finally(() => {
this.queue.delete(promise);
});
this.queue.add(promise);
}
queueUnmock(id, importer) {
const promise = this.rpc.resolveId(id, importer).then(async (resolved) => {
if (!resolved) {
return;
}
const mockUrl = this.resolveMockPath(cleanVersion(resolved.url));
this.mockedIds.add(resolved.id);
this.registry.delete(mockUrl);
await this.interceptor.delete(mockUrl);
}).finally(() => {
this.queue.delete(promise);
});
this.queue.add(promise);
}
// We need to await mock registration before importing the actual module
// In case there is a mocked module in the import chain
wrapDynamicImport(moduleFactory) {
if (typeof moduleFactory === "function") {
const promise = new Promise((resolve, reject) => {
this.prepare().finally(() => {
moduleFactory().then(resolve, reject);
});
});
return promise;
}
return moduleFactory;
}
getMockedModuleById(id) {
return this.registry.getById(id);
}
reset() {
this.registry.clear();
this.mockedIds.clear();
this.queue.clear();
}
resolveMockPath(path) {
const config = this.config;
const fsRoot = join("/@fs/", config.root);
// URL can be /file/path.js, but path is resolved to /file/path
if (path.startsWith(config.root)) {
return path.slice(config.root.length);
}
if (path.startsWith(fsRoot)) {
return path.slice(fsRoot.length);
}
return path;
}
}
const versionRegexp = /(\?|&)v=\w{8}/;
function cleanVersion(url) {
return url.replace(versionRegexp, "");
}
export { ModuleMocker as M, createCompilerHints as c, hot as h, rpc as r };
@@ -0,0 +1 @@
{"version":3,"names":["_defineAccessor","type","obj","key","fn","desc","configurable","enumerable","Object","defineProperty"],"sources":["../../src/helpers/defineAccessor.ts"],"sourcesContent":["/* @minVersion 7.20.7 */\n\nexport default function _defineAccessor<Type extends \"get\" | \"set\">(\n type: Type,\n obj: any,\n key: string | symbol,\n fn: PropertyDescriptor[Type],\n) {\n var desc: PropertyDescriptor = { configurable: true, enumerable: true };\n desc[type] = fn;\n return Object.defineProperty(obj, key, desc);\n}\n"],"mappings":";;;;;;AAEe,SAASA,eAAeA,CACrCC,IAAU,EACVC,GAAQ,EACRC,GAAoB,EACpBC,EAA4B,EAC5B;EACA,IAAIC,IAAwB,GAAG;IAAEC,YAAY,EAAE,IAAI;IAAEC,UAAU,EAAE;EAAK,CAAC;EACvEF,IAAI,CAACJ,IAAI,CAAC,GAAGG,EAAE;EACf,OAAOI,MAAM,CAACC,cAAc,CAACP,GAAG,EAAEC,GAAG,EAAEE,IAAI,CAAC;AAC9C","ignoreList":[]}
@@ -0,0 +1 @@
module.exports={C:{"68":0.01093,"78":0.0255,"113":0.0255,"115":0.05829,"120":0.28051,"121":0.58652,"123":0.0255,"124":0.00364,"129":0.00729,"133":0.00364,"134":0.00364,"136":0.00364,"140":0.01093,"146":0.00364,"147":0.00364,"148":0.00364,"149":0.00729,"150":0.00729,"151":0.00364,"152":0.01093,"153":0.01093,"154":0.0765,"155":0.19672,"156":0.22951,"157":0.00729,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 114 116 117 118 119 122 125 126 127 128 130 131 132 135 137 138 139 141 142 143 144 145 158 159 160 3.5 3.6"},D:{"49":0.01093,"55":0.00364,"56":0.00729,"57":0.00364,"63":0.00364,"64":0.00364,"65":0.00364,"66":0.01457,"68":0.01093,"69":0.00364,"70":0.00729,"72":0.00364,"73":0.02186,"74":0.00364,"75":0.00364,"76":0.01457,"78":0.01822,"79":0.04736,"80":0.00364,"81":0.00364,"83":0.09472,"85":0.00364,"86":0.01093,"87":0.12022,"88":0.01457,"91":0.04007,"92":0.00729,"95":0.00364,"97":0.00364,"98":0.01093,"100":0.00364,"101":0.051,"102":0.00364,"103":0.09836,"104":0.0765,"105":0.08015,"106":0.08743,"107":0.0765,"108":0.0765,"109":1.68671,"110":0.09836,"111":0.24772,"112":0.08015,"113":0.03643,"114":0.01457,"116":0.17851,"117":0.08015,"118":0.43352,"119":0.64117,"120":0.75046,"121":0.01822,"122":0.06557,"123":0.0255,"124":0.09108,"125":0.00364,"126":0.0255,"127":0.0765,"128":0.02186,"129":0.00364,"130":0.01093,"131":0.17122,"132":0.02186,"133":0.21858,"134":0.08379,"135":0.08743,"136":0.08743,"137":0.09108,"138":0.20401,"139":0.08743,"140":0.09472,"141":0.18579,"142":0.25137,"143":0.02914,"144":0.051,"145":0.19672,"146":0.07286,"147":0.02914,"148":0.10565,"149":0.17486,"150":0.36794,"151":2.01458,"152":6.65212,"153":6.42625,"154":1.64299,"155":0.05829,"156":0.02186,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 58 59 60 61 62 67 71 77 84 89 90 93 94 96 99 115 157"},F:{"28":0.00364,"36":0.01093,"40":0.00364,"46":0.20765,"57":0.00364,"79":0.01822,"85":0.01093,"86":0.01093,"93":0.00729,"94":0.00364,"95":0.18579,"101":0.00729,"105":0.00729,"106":0.00364,"107":0.00364,"109":0.01457,"114":0.00364,"119":0.00364,"120":0.00364,"121":0.00364,"122":0.00364,"131":0.00729,"132":0.00364,"133":0.01093,"134":0.102,"135":0.92168,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 37 38 39 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 87 88 89 90 91 92 96 97 98 99 100 102 103 104 108 110 111 112 113 115 116 117 118 123 124 125 126 127 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"14":0.02186,"16":0.00729,"18":0.00364,"92":0.00729,"107":0.00364,"109":0.02186,"118":0.00729,"119":0.28051,"120":0.30601,"122":0.00364,"124":0.00364,"127":0.00364,"131":0.00364,"132":0.00364,"136":0.01093,"139":0.00364,"140":0.01093,"141":0.01093,"142":0.01093,"143":0.01093,"144":0.00729,"145":0.00729,"146":0.00729,"147":0.03279,"148":0.02186,"149":0.03643,"150":0.05465,"151":0.14936,"152":0.78689,"153":1.02368,"154":0.29144,_:"12 13 15 17 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 108 110 111 112 113 114 115 116 117 121 123 125 126 128 129 130 133 134 135 137 138"},E:{"14":0.00364,"27":0.05829,_:"4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 15.4 15.5 16.0 16.4 27.1 27.2 TP","12.1":0.00729,"13.1":0.01093,"14.1":0.00729,"15.1":0.00364,"15.2-15.3":0.00729,"15.6":0.06557,"16.1":0.01093,"16.2":0.00364,"16.3":0.00364,"16.5":0.00729,"16.6":0.04372,"17.0":0.00364,"17.1":0.0255,"17.2":0.01457,"17.3":0.00364,"17.4":0.01457,"17.5":0.02914,"17.6":0.07286,"18.0":0.00729,"18.1":0.01822,"18.2":0.01457,"18.3":0.01093,"18.4":0.00364,"18.5-18.7":0.03643,"26.0":0.01457,"26.1":0.02186,"26.2":0.03279,"26.3":0.04007,"26.4":0.051,"26.5":0.18215,"26.6":0.40802},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00151,"5.0-5.1":0.00151,"6.0-6.1":0,"7.0-7.1":0.00302,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01509,"11.0-11.2":0.00151,"11.3-11.4":0.00302,"12.0-12.1":0,"12.2-12.5":0.03922,"13.0-13.1":0,"13.2":0.00754,"13.3":0,"13.4-13.7":0.00151,"14.0-14.4":0.00603,"14.5-14.8":0.00905,"15.0-15.1":0.00905,"15.2-15.3":0.00603,"15.4":0.00754,"15.5":0.00905,"15.6-15.8":0.19611,"16.0":0.01509,"16.1":0.02715,"16.2":0.01509,"16.3":0.03319,"16.4":0.00754,"16.5":0.01207,"16.6-16.7":0.27304,"17.0":0.01056,"17.1":0.01509,"17.2":0.01509,"17.3":0.02263,"17.4":0.03168,"17.5":0.06185,"17.6-17.7":0.1599,"18.0":0.03319,"18.1":0.06637,"18.2":0.09051,"18.3":0.15689,"18.4":0.09805,"18.5-18.7":2.02594,"26.0":0.09805,"26.1":0.09956,"26.2":0.25946,"26.3":0.28058,"26.4":0.20516,"26.5":1.37426,"26.6":8.47937,"27.0":0.65017,"27.1":0,"27.2":0.01659},P:{"4":0.33656,"22":0.0Line truncated
@@ -0,0 +1,36 @@
import Ajv, {AnySchema, AnyValidateFunction, ErrorObject} from "../core"
import standaloneCode from "."
import * as requireFromString from "require-from-string"
export default class AjvPack {
errors?: ErrorObject[] | null // errors from the last validation
constructor(readonly ajv: Ajv) {}
validate(schemaKeyRef: AnySchema | string, data: unknown): boolean | Promise<unknown> {
return Ajv.prototype.validate.call(this, schemaKeyRef, data)
}
compile<T = unknown>(schema: AnySchema, meta?: boolean): AnyValidateFunction<T> {
return this.getStandalone(this.ajv.compile<T>(schema, meta))
}
getSchema<T = unknown>(keyRef: string): AnyValidateFunction<T> | undefined {
const v = this.ajv.getSchema<T>(keyRef)
if (!v) return undefined
return this.getStandalone(v)
}
private getStandalone<T = unknown>(v: AnyValidateFunction<T>): AnyValidateFunction<T> {
return requireFromString(standaloneCode(this.ajv, v)) as AnyValidateFunction<T>
}
addSchema(...args: Parameters<typeof Ajv.prototype.addSchema>): AjvPack {
this.ajv.addSchema.call(this.ajv, ...args)
return this
}
addKeyword(...args: Parameters<typeof Ajv.prototype.addKeyword>): AjvPack {
this.ajv.addKeyword.call(this.ajv, ...args)
return this
}
}
@@ -0,0 +1 @@
{"version":3,"names":["_classApplyDescriptorSet","require","_classPrivateFieldGet","_classPrivateFieldSet","receiver","privateMap","value","descriptor","classPrivateFieldGet2","classApplyDescriptorSet"],"sources":["../../src/helpers/classPrivateFieldSet.js"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n/* @onlyBabel7 */\n\nimport classApplyDescriptorSet from \"classApplyDescriptorSet\";\nimport classPrivateFieldGet2 from \"classPrivateFieldGet2\";\nexport default function _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = classPrivateFieldGet2(privateMap, receiver);\n classApplyDescriptorSet(receiver, descriptor, value);\n return value;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AACe,SAASE,qBAAqBA,CAACC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAE;EACzE,IAAIC,UAAU,GAAGC,qBAAqB,CAACH,UAAU,EAAED,QAAQ,CAAC;EAC5DK,wBAAuB,CAACL,QAAQ,EAAEG,UAAU,EAAED,KAAK,CAAC;EACpD,OAAOA,KAAK;AACd","ignoreList":[]}
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 Toru Nagashima
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,60 @@
{
"name": "ts-interface-checker",
"version": "0.1.13",
"description": "Runtime library to validate data against TypeScript interfaces",
"main": "dist/index",
"typings": "dist/index",
"scripts": {
"build": "tsc",
"watch": "tsc -w",
"test": "tsc && nyc mocha -R list test/",
"bench": "tsc && node test/bench/bench.js",
"preversion": "npm test",
"version": "npm run build"
},
"keywords": [
"typescript",
"ts",
"interface",
"type",
"validate",
"validator",
"check"
],
"files": [
"dist"
],
"author": "Dmitry S, Grist Labs",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/gristlabs/ts-interface-checker"
},
"bugs": {
"url": "https://github.com/gristlabs/ts-interface-checker/issues"
},
"nyc": {
"extension": [
".ts"
],
"exclude": [
"**/*.d.ts"
]
},
"dependencies": {},
"devDependencies": {
"@types/benchmark": "^1.0.31",
"@types/chai": "~4.0.8",
"@types/mocha": "^8.0.1",
"@types/node": "^8.0.57",
"benchmark": "^2.1.4",
"chai": "^4.1.2",
"coveralls": "^3.0.0",
"mocha": "^7.1.2",
"nyc": "^15.0.1",
"protobufjs": "^6.8.3",
"source-map-support": "^0.5.0",
"ts-node": "^8.10.2",
"typescript": "^3.9.7"
}
}
@@ -0,0 +1 @@
{"version":3,"names":["_checkPrivateRedeclaration","obj","privateCollection","has","TypeError"],"sources":["../../src/helpers/checkPrivateRedeclaration.ts"],"sourcesContent":["/* @minVersion 7.14.1 */\n\nexport default function _checkPrivateRedeclaration(\n obj: object,\n privateCollection: WeakMap<object, unknown> | WeakSet<object>,\n) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\n \"Cannot initialize the same private elements twice on an object\",\n );\n }\n}\n"],"mappings":";;;;;;AAEe,SAASA,0BAA0BA,CAChDC,GAAW,EACXC,iBAA6D,EAC7D;EACA,IAAIA,iBAAiB,CAACC,GAAG,CAACF,GAAG,CAAC,EAAE;IAC9B,MAAM,IAAIG,SAAS,CACjB,gEACF,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2020 Vercel, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1 @@
{"version":3,"file":"sha3.d.ts","sourceRoot":"","sources":["src/sha3.ts"],"names":[],"mappings":"AAeA,OAAO,EAML,KAAK,KAAK,EAAE,KAAK,QAAQ,EACzB,KAAK,IAAI,EAET,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAyCpB;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,MAAM,GAAE,MAAW,GAAG,IAAI,CA2DvE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,MAAO,YAAW,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC;IAC1D,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC;IAC5B,SAAS,CAAC,GAAG,SAAK;IAClB,SAAS,CAAC,MAAM,SAAK;IACrB,SAAS,CAAC,QAAQ,UAAS;IAC3B,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC;IAC/B,SAAS,CAAC,SAAS,UAAS;IAErB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,SAAS,UAAS;IAC5B,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;gBAIvB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,SAAS,UAAQ,EACjB,MAAM,GAAE,MAAW;IAiBrB,KAAK,IAAI,MAAM;IAGf,SAAS,CAAC,MAAM,IAAI,IAAI;IAOxB,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI;IAY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AC;AASF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAEC,CAAC;AACzD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAEC,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAEF,CAAC;AACzD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAEF,CAAC"}
@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './arrow-down-wide-narrow.js';
//# sourceMappingURL=sort-desc.js.map
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/create-context.tsx"],
"sourcesContent": ["import * as React from 'react';\n\nfunction createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType\n) {\n const Context = React.createContext<ContextValueType | undefined>(defaultContext);\n\n const Provider: React.FC<ContextValueType & { children: React.ReactNode }> = (props) => {\n const { children, ...context } = props;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return <Context.Provider value={value}>{children}</Context.Provider>;\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext] as const;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * createContextScope\n * -----------------------------------------------------------------------------------------------*/\n\ntype Scope<C = any> = { [scopeName: string]: React.Context<C>[] } | undefined;\ntype ScopeHook = (scope: Scope) => { [__scopeProp: string]: Scope };\ninterface CreateScope {\n scopeName: string;\n (): ScopeHook;\n}\n\nfunction createContextScope(scopeName: string, createContextScopeDeps: CreateScope[] = []) {\n let defaultContexts: any[] = [];\n\n /* -----------------------------------------------------------------------------------------------\n * createContext\n * ---------------------------------------------------------------------------------------------*/\n\n function createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType\n ) {\n const BaseContext = React.createContext<ContextValueType | undefined>(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n\n const Provider: React.FC<\n ContextValueType & { scope: Scope<ContextValueType>; children: React.ReactNode }\n > = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return <Context.Provider value={value}>{children}</Context.Provider>;\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string, scope: Scope<ContextValueType | undefined>) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext] as const;\n }\n\n /* -----------------------------------------------------------------------------------------------\n * createScope\n * ---------------------------------------------------------------------------------------------*/\n\n const createScope: CreateScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope: Scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n\n createScope.scopeName = scopeName;\n return [createContext, composeContextScopes(createScope, ...createContextScopeDeps)] as const;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * composeContextScopes\n * -----------------------------------------------------------------------------------------------*/\n\nfunction composeContextScopes(...scopes: CreateScope[]) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n\n const createScope: CreateScope = () => {\n const scopeHooks = scopes.map((createScope) => ({\n useScope: createScope(),\n scopeName: createScope.scopeName,\n }));\n\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes, { useScope, scopeName }) => {\n Line truncated
"mappings": ";AAAA,YAAY,WAAW;AAaZ;AAXX,SAASA,eACP,mBACA,gBACA;AACA,QAAM,UAAgB,oBAA4C,cAAc;AAEhF,QAAM,WAAuE,CAAC,UAAU;AACtF,UAAM,EAAE,UAAU,GAAG,QAAQ,IAAI;AAGjC,UAAM,QAAc,cAAQ,MAAM,SAAS,OAAO,OAAO,OAAO,CAAC;AACjE,WAAO,oBAAC,QAAQ,UAAR,EAAiB,OAAe,UAAS;AAAA,EACnD;AAEA,WAAS,cAAc,oBAAoB;AAE3C,WAASC,YAAW,cAAsB;AACxC,UAAM,UAAgB,iBAAW,OAAO;AACxC,QAAI,QAAS,QAAO;AACpB,QAAI,mBAAmB,OAAW,QAAO;AAEzC,UAAM,IAAI,MAAM,KAAK,YAAY,4BAA4B,iBAAiB,IAAI;AAAA,EACpF;AAEA,SAAO,CAAC,UAAUA,WAAU;AAC9B;AAaA,SAAS,mBAAmB,WAAmB,yBAAwC,CAAC,GAAG;AACzF,MAAI,kBAAyB,CAAC;AAM9B,WAASD,eACP,mBACA,gBACA;AACA,UAAM,cAAoB,oBAA4C,cAAc;AACpF,UAAM,QAAQ,gBAAgB;AAC9B,sBAAkB,CAAC,GAAG,iBAAiB,cAAc;AAErD,UAAM,WAEF,CAAC,UAAU;AACb,YAAM,EAAE,OAAO,UAAU,GAAG,QAAQ,IAAI;AACxC,YAAM,UAAU,QAAQ,SAAS,IAAI,KAAK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AM;AAI5E,cAAM,aAAa,SAAS,cAAc;AAC1C,cAAM,eAAe,WAAW,UAAU,SAAS,EAAE;AACrD,eAAO,EAAE,GAAGA,aAAY,GAAG,aAAa;AAAA,MAC1C,GAAG,CAAC,CAAC;AAEL,aAAa,cAAQ,OAAO,EAAE,CAAC,UAAU,UAAU,SAAS,EAAE,GAAG,WAAW,IAAI,CAAC,UAAU,CAAC;AAAA,IAC9F;AAAA,EACF;AAEA,cAAY,YAAY,UAAU;AAClC,SAAO;AACT;",
"names": ["createContext", "useContext", "createScope", "nextScopes"]
}
@@ -0,0 +1,117 @@
// Update with any zlib constants that are added or changed in the future.
// Node v6 didn't export this, so we just hard code the version and rely
// on all the other hard-coded values from zlib v4736. When node v6
// support drops, we can just export the realZlibConstants object.
import realZlib from 'zlib';
/* c8 ignore start */
const realZlibConstants = realZlib.constants || { ZLIB_VERNUM: 4736 };
/* c8 ignore stop */
export const constants = Object.freeze(Object.assign(Object.create(null), {
Z_NO_FLUSH: 0,
Z_PARTIAL_FLUSH: 1,
Z_SYNC_FLUSH: 2,
Z_FULL_FLUSH: 3,
Z_FINISH: 4,
Z_BLOCK: 5,
Z_OK: 0,
Z_STREAM_END: 1,
Z_NEED_DICT: 2,
Z_ERRNO: -1,
Z_STREAM_ERROR: -2,
Z_DATA_ERROR: -3,
Z_MEM_ERROR: -4,
Z_BUF_ERROR: -5,
Z_VERSION_ERROR: -6,
Z_NO_COMPRESSION: 0,
Z_BEST_SPEED: 1,
Z_BEST_COMPRESSION: 9,
Z_DEFAULT_COMPRESSION: -1,
Z_FILTERED: 1,
Z_HUFFMAN_ONLY: 2,
Z_RLE: 3,
Z_FIXED: 4,
Z_DEFAULT_STRATEGY: 0,
DEFLATE: 1,
INFLATE: 2,
GZIP: 3,
GUNZIP: 4,
DEFLATERAW: 5,
INFLATERAW: 6,
UNZIP: 7,
BROTLI_DECODE: 8,
BROTLI_ENCODE: 9,
Z_MIN_WINDOWBITS: 8,
Z_MAX_WINDOWBITS: 15,
Z_DEFAULT_WINDOWBITS: 15,
Z_MIN_CHUNK: 64,
Z_MAX_CHUNK: Infinity,
Z_DEFAULT_CHUNK: 16384,
Z_MIN_MEMLEVEL: 1,
Z_MAX_MEMLEVEL: 9,
Z_DEFAULT_MEMLEVEL: 8,
Z_MIN_LEVEL: -1,
Z_MAX_LEVEL: 9,
Z_DEFAULT_LEVEL: -1,
BROTLI_OPERATION_PROCESS: 0,
BROTLI_OPERATION_FLUSH: 1,
BROTLI_OPERATION_FINISH: 2,
BROTLI_OPERATION_EMIT_METADATA: 3,
BROTLI_MODE_GENERIC: 0,
BROTLI_MODE_TEXT: 1,
BROTLI_MODE_FONT: 2,
BROTLI_DEFAULT_MODE: 0,
BROTLI_MIN_QUALITY: 0,
BROTLI_MAX_QUALITY: 11,
BROTLI_DEFAULT_QUALITY: 11,
BROTLI_MIN_WINDOW_BITS: 10,
BROTLI_MAX_WINDOW_BITS: 24,
BROTLI_LARGE_MAX_WINDOW_BITS: 30,
BROTLI_DEFAULT_WINDOW: 22,
BROTLI_MIN_INPUT_BLOCK_BITS: 16,
BROTLI_MAX_INPUT_BLOCK_BITS: 24,
BROTLI_PARAM_MODE: 0,
BROTLI_PARAM_QUALITY: 1,
BROTLI_PARAM_LGWIN: 2,
BROTLI_PARAM_LGBLOCK: 3,
BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4,
BROTLI_PARAM_SIZE_HINT: 5,
BROTLI_PARAM_LARGE_WINDOW: 6,
BROTLI_PARAM_NPOSTFIX: 7,
BROTLI_PARAM_NDIRECT: 8,
BROTLI_DECODER_RESULT_ERROR: 0,
BROTLI_DECODER_RESULT_SUCCESS: 1,
BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2,
BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3,
BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0,
BROTLI_DECODER_PARAM_LARGE_WINDOW: 1,
BROTLI_DECODER_NO_ERROR: 0,
BROTLI_DECODER_SUCCESS: 1,
BROTLI_DECODER_NEEDS_MORE_INPUT: 2,
BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3,
BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1,
BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2,
BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3,
BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4,
BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5,
BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6,
BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7,
BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8,
BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9,
BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10,
BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11,
BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12,
BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13,
BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14,
BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15,
BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16,
BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19,
BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20,
BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21,
BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22,
BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25,
BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26,
BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27,
BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30,
BROTLI_DECODER_ERROR_UNREACHABLE: -31,
}, realZlibConstants));
//# sourceMappingURL=constants.js.map
@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './circle-pause.js';
//# sourceMappingURL=pause-circle.js.map
@@ -0,0 +1,15 @@
ISC License
Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
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,57 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
test("function parsing", () => {
const schema = z.union([z.string().refine(() => false), z.number().refine(() => false)]);
const result = schema.safeParse("asdf");
expect(result.success).toEqual(false);
});
test("union 2", () => {
const result = z.union([z.number(), z.string().refine(() => false)]).safeParse("a");
expect(result.success).toEqual(false);
});
test("return valid over invalid", () => {
const schema = z.union([
z.object({
email: z.string().email(),
}),
z.string(),
]);
expect(schema.parse("asdf")).toEqual("asdf");
expect(schema.parse({ email: "asdlkjf@lkajsdf.com" })).toEqual({
email: "asdlkjf@lkajsdf.com",
});
});
test("return dirty result over aborted", () => {
const result = z.union([z.number(), z.string().refine(() => false)]).safeParse("a");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues).toEqual([
{
code: "custom",
message: "Invalid input",
path: [],
},
]);
}
});
test("options getter", async () => {
const union = z.union([z.string(), z.number()]);
union.options[0].parse("asdf");
union.options[1].parse(1234);
await union.options[0].parseAsync("asdf");
await union.options[1].parseAsync(1234);
});
test("readonly union", async () => {
const options = [z.string(), z.number()] as const;
const union = z.union(options);
union.parse("asdf");
union.parse(12);
});
@@ -0,0 +1 @@
{"version":3,"file":"scroll.js","sources":["../../../src/icons/scroll.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Scroll\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTkgMTdWNWEyIDIgMCAwIDAtMi0ySDQiIC8+CiAgPHBhdGggZD0iTTggMjFoMTJhMiAyIDAgMCAwIDItMnYtMWExIDEgMCAwIDAtMS0xSDExYTEgMSAwIDAgMC0xIDF2MWEyIDIgMCAxIDEtNCAwVjVhMiAyIDAgMSAwLTQgMHYyYTEgMSAwIDAgMCAxIDFoMyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/scroll\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 Scroll = createLucideIcon('Scroll', [\n ['path', { d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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,4 @@
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noFunctionConstructor" | "noImpliedEvalError", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BicepsFlexed = createLucideIcon("BicepsFlexed", [
[
"path",
{
d: "M12.409 13.017A5 5 0 0 1 22 15c0 3.866-4 7-9 7-4.077 0-8.153-.82-10.371-2.462-.426-.316-.631-.832-.62-1.362C2.118 12.723 2.627 2 10 2a3 3 0 0 1 3 3 2 2 0 0 1-2 2c-1.105 0-1.64-.444-2-1",
key: "1pmlyh"
}
],
["path", { d: "M15 14a5 5 0 0 0-7.584 2", key: "5rb254" }],
["path", { d: "M9.964 6.825C8.019 7.977 9.5 13 8 15", key: "kbvsx9" }]
]);
export { BicepsFlexed as default };
//# sourceMappingURL=biceps-flexed.js.map
@@ -0,0 +1 @@
{"version":3,"file":"replace.js","sourceRoot":"","sources":["../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,IAAI,cAAc,GAAG,GAAG,CAAA;YAChC,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;gBACrB,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;YAC3B,CAAC;YAED,IAAI,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;gBAC9B,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAA;YAC7C,CAAC;YACD,MAAM,GAAG,CAAC,CAAA;YACV,iBAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;QAChD,CAAC,CAAA;QACD,iBAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;IAChD,CAAC,CAAA;IAED,MAAM,OAAO,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpD,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QACrB,IAAI,IAAI,GAAG,IAAI,CAAA;QACf,MAAM,MAAM,GAAG,CAAC,EAAiC,EAAE,EAAW,EAAE,EAAE;YAChE,IAAI,EAAE,IAAILine truncated
@@ -0,0 +1 @@
{"version":3,"file":"camera.js","sources":["../../../src/icons/camera.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Camera\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTQuNSA0aC01TDcgN0g0YTIgMiAwIDAgMC0yIDJ2OWEyIDIgMCAwIDAgMiAyaDE2YTIgMiAwIDAgMCAyLTJWOWEyIDIgMCAwIDAtMi0yaC0zbC0yLjUtM3oiIC8+CiAgPGNpcmNsZSBjeD0iMTIiIGN5PSIxMyIgcj0iMyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/camera\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 Camera = createLucideIcon('Camera', [\n [\n 'path',\n {\n d: 'M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z',\n key: '1tc9qg',\n },\n ],\n ['circle', { cx: '12', cy: '13', r: '3', key: '1vg3eu' }],\n]);\n\nexport default Camera;\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,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,8 @@
declare const _default: {
parser: string;
parserOptions: {
sourceType: "module";
};
plugins: string[];
};
export = _default;
@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sources":["../../../../src/value/use-will-change/index.ts"],"sourcesContent":["\"use client\"\n\nimport type { WillChange } from \"motion-dom\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { WillChangeMotionValue } from \"./WillChangeMotionValue\"\n\nexport function useWillChange(): WillChange {\n return useConstant(() => new WillChangeMotionValue(\"auto\"))\n}\n"],"names":[],"mappings":";;;;;;AAQA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"animations.mjs","sources":["../../../../src/motion/features/animations.ts"],"sourcesContent":["import { AnimationFeature } from \"./animation\"\nimport { ExitAnimationFeature } from \"./animation/exit\"\nimport { FeaturePackages } from \"./types\"\n\nexport const animations: FeaturePackages = {\n animation: {\n Feature: AnimationFeature,\n },\n exit: {\n Feature: ExitAnimationFeature,\n },\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,UAAU,GAAoB;AACvC,IAAA,SAAS,EAAE;AACP,QAAA,OAAO,EAAE,gBAAgB;AAC5B,KAAA;AACD,IAAA,IAAI,EAAE;AACF,QAAA,OAAO,EAAE,oBAAoB;AAChC,KAAA;;;;;"}
@@ -0,0 +1,27 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_disposable = void 0;
const base_config_1 = require("./base-config");
const es2015_iterable_1 = require("./es2015.iterable");
const es2015_symbol_1 = require("./es2015.symbol");
const es2018_asynciterable_1 = require("./es2018.asynciterable");
exports.esnext_disposable = {
libs: [es2015_symbol_1.es2015_symbol, es2015_iterable_1.es2015_iterable, es2018_asynciterable_1.es2018_asynciterable],
variables: [
['SymbolConstructor', base_config_1.TYPE],
['Disposable', base_config_1.TYPE],
['AsyncDisposable', base_config_1.TYPE],
['SuppressedError', base_config_1.TYPE_VALUE],
['SuppressedErrorConstructor', base_config_1.TYPE],
['DisposableStack', base_config_1.TYPE_VALUE],
['DisposableStackConstructor', base_config_1.TYPE],
['AsyncDisposableStack', base_config_1.TYPE_VALUE],
['AsyncDisposableStackConstructor', base_config_1.TYPE],
['IteratorObject', base_config_1.TYPE],
['AsyncIteratorObject', base_config_1.TYPE],
],
};
@@ -0,0 +1,169 @@
import { OAuthClientProvider } from './auth.js';
import { FetchLike } from '../shared/transport.js';
/**
* Middleware function that wraps and enhances fetch functionality.
* Takes a fetch handler and returns an enhanced fetch handler.
*/
export type Middleware = (next: FetchLike) => FetchLike;
/**
* 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 declare const withOAuth: (provider: OAuthClientProvider, baseUrl?: string | URL) => Middleware;
/**
* Logger function type for HTTP requests
*/
export type RequestLogger = (input: {
method: string;
url: string | URL;
status: number;
statusText: string;
duration: number;
requestHeaders?: Headers;
responseHeaders?: Headers;
error?: Error;
}) => void;
/**
* Configuration options for the logging middleware
*/
export type LoggingOptions = {
/**
* Custom logger function, defaults to console logging
*/
logger?: RequestLogger;
/**
* Whether to include request headers in logs
* @default false
*/
includeRequestHeaders?: boolean;
/**
* Whether to include response headers in logs
* @default false
*/
includeResponseHeaders?: boolean;
/**
* Status level filter - only log requests with status >= this value
* Set to 0 to log all requests, 400 to log only errors
* @default 0
*/
statusLevel?: number;
};
/**
* 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 declare const withLogging: (options?: LoggingOptions) => Middleware;
/**
* 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 declare const applyMiddlewares: (...middleware: Middleware[]) => Middleware;
/**
* 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 declare const createMiddleware: (handler: (next: FetchLike, input: string | URL, init?: RequestInit) => Promise<Response>) => Middleware;
//# sourceMappingURL=middleware.d.ts.map
@@ -0,0 +1,223 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict";
const DescriptionFileUtils = require("./DescriptionFileUtils");
const forEachBail = require("./forEachBail");
const { processImportsField } = require("./util/entrypoints");
const { parseIdentifier } = require("./util/identifier");
const {
deprecatedInvalidSegmentRegEx,
invalidSegmentRegEx,
} = require("./util/path");
/** @typedef {import("./Resolver")} Resolver */
/** @typedef {import("./Resolver").JsonObject} JsonObject */
/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */
/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */
/** @typedef {import("./util/entrypoints").FieldProcessor} FieldProcessor */
/** @typedef {import("./util/entrypoints").ImportsField} ImportsField */
const dotCode = ".".charCodeAt(0);
module.exports = class ImportsFieldPlugin {
/**
* @param {string | ResolveStepHook} source source
* @param {Set<string>} conditionNames condition names
* @param {string | string[]} fieldNamePath name path
* @param {string | ResolveStepHook} targetFile target file
* @param {string | ResolveStepHook} targetPackage target package
*/
constructor(
source,
conditionNames,
fieldNamePath,
targetFile,
targetPackage,
) {
this.source = source;
this.targetFile = targetFile;
this.targetPackage = targetPackage;
this.conditionNames = conditionNames;
this.fieldName = fieldNamePath;
/** @type {WeakMap<JsonObject, FieldProcessor>} */
this.fieldProcessorCache = new WeakMap();
}
/**
* @param {Resolver} resolver the resolver
* @returns {void}
*/
apply(resolver) {
const targetFile = resolver.ensureHook(this.targetFile);
const targetPackage = resolver.ensureHook(this.targetPackage);
resolver
.getHook(this.source)
.tapAsync("ImportsFieldPlugin", (request, resolveContext, callback) => {
// When there is no description file, abort
if (!request.descriptionFilePath || request.request === undefined) {
return callback();
}
const remainingRequest =
request.request + request.query + request.fragment;
const importsField =
/** @type {ImportsField | null | undefined} */
(
DescriptionFileUtils.getField(
/** @type {JsonObject} */ (request.descriptionFileData),
this.fieldName,
)
);
if (!importsField) return callback();
if (request.directory) {
return callback(
new Error(
`Resolving to directories is not possible with the imports field (request was ${remainingRequest}/)`,
),
);
}
/** @type {string[]} */
let paths;
/** @type {string | null} */
let usedField;
try {
// We attach the cache to the description file instead of the importsField value
// because we use a WeakMap and the importsField could be a string too.
// Description file is always an object when exports field can be accessed.
let fieldProcessor = this.fieldProcessorCache.get(
/** @type {JsonObject} */ (request.descriptionFileData),
);
if (fieldProcessor === undefined) {
fieldProcessor = processImportsField(importsField);
this.fieldProcessorCache.set(
/** @type {JsonObject} */ (request.descriptionFileData),
fieldProcessor,
);
}
[paths, usedField] = fieldProcessor(
remainingRequest,
this.conditionNames,
);
} catch (/** @type {unknown} */ err) {
if (resolveContext.log) {
resolveContext.log(
`Imports field in ${request.descriptionFilePath} can't be processed: ${err}`,
);
}
return callback(/** @type {Error} */ (err));
}
if (paths.length === 0) {
return callback(
new Error(
`Package import ${remainingRequest} is not imported from package ${request.descriptionFileRoot} (see imports field in ${request.descriptionFilePath})`,
),
);
}
forEachBail(
paths,
/**
* @param {string} path path
* @param {(err?: null | Error, result?: null | ResolveRequest) => void} callback callback
* @param {number} i index
* @returns {void}
*/
(path, callback, i) => {
const parsedIdentifier = parseIdentifier(path);
if (!parsedIdentifier) return callback();
const [path_, query, fragment] = parsedIdentifier;
switch (path_.charCodeAt(0)) {
// should be relative
case dotCode: {
if (
invalidSegmentRegEx.exec(path_.slice(2)) !== null &&
deprecatedInvalidSegmentRegEx.test(path_.slice(2)) !== null
) {
if (paths.length === i) {
return callback(
new Error(
`Invalid "imports" target "${path}" defined for "${usedField}" in the package config ${request.descriptionFilePath}, targets must start with "./"`,
),
);
}
return callback();
}
/** @type {ResolveRequest} */
const obj = {
...request,
request: undefined,
path: resolver.join(
/** @type {string} */ (request.descriptionFileRoot),
path_,
),
relativePath: path_,
query,
fragment,
};
resolver.doResolve(
targetFile,
obj,
`using imports field: ${path}`,
resolveContext,
(err, result) => {
if (err) return callback(err);
// Don't allow to continue - https://github.com/webpack/enhanced-resolve/issues/400
if (result === undefined) return callback(null, null);
callback(null, result);
},
);
break;
}
// package resolving
default: {
/** @type {ResolveRequest} */
const obj = {
...request,
request: path_,
relativePath: path_,
fullySpecified: true,
query,
fragment,
};
resolver.doResolve(
targetPackage,
obj,
`using imports field: ${path}`,
resolveContext,
(err, result) => {
if (err) return callback(err);
// Don't allow to continue - https://github.com/webpack/enhanced-resolve/issues/400
if (result === undefined) return callback(null, null);
callback(null, result);
},
);
}
}
},
/**
* @param {null | Error=} err error
* @param {null | ResolveRequest=} result result
* @returns {void}
*/
(err, result) => callback(err, result || null),
);
});
}
};
@@ -0,0 +1 @@
{"version":3,"names":["_utils","require","_placeholders","_core","defineType","defineAliasedType","visitor","builder","fields","Object","assign","name","validate","assertNodeType","expectedNode","assertOneOf","PLACEHOLDERS","patternLikeCommon","assertValueType"],"sources":["../../src/definitions/misc.ts"],"sourcesContent":["import {\n defineAliasedType,\n assertNodeType,\n assertOneOf,\n assertValueType,\n} from \"./utils.ts\";\nimport { PLACEHOLDERS } from \"./placeholders.ts\";\nimport { patternLikeCommon } from \"./core.ts\";\n\nconst defineType = defineAliasedType(\"Miscellaneous\");\n\nif (!process.env.BABEL_8_BREAKING) {\n defineType(\"Noop\", {\n visitor: [],\n });\n}\n\ndefineType(\"Placeholder\", {\n visitor: [],\n builder: [\"expectedNode\", \"name\"],\n // aliases: [], defined in placeholders.js\n fields: {\n name: {\n validate: assertNodeType(\"Identifier\"),\n },\n expectedNode: {\n validate: assertOneOf(...PLACEHOLDERS),\n },\n ...patternLikeCommon(),\n },\n});\n\ndefineType(\"V8IntrinsicIdentifier\", {\n builder: [\"name\"],\n fields: {\n name: {\n validate: assertValueType(\"string\"),\n },\n },\n});\n"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,MAAMG,UAAU,GAAG,IAAAC,wBAAiB,EAAC,eAAe,CAAC;AAGnDD,UAAU,CAAC,MAAM,EAAE;EACjBE,OAAO,EAAE;AACX,CAAC,CAAC;AAGJF,UAAU,CAAC,aAAa,EAAE;EACxBE,OAAO,EAAE,EAAE;EACXC,OAAO,EAAE,CAAC,cAAc,EAAE,MAAM,CAAC;EAEjCC,MAAM,EAAAC,MAAA,CAAAC,MAAA;IACJC,IAAI,EAAE;MACJC,QAAQ,EAAE,IAAAC,qBAAc,EAAC,YAAY;IACvC,CAAC;IACDC,YAAY,EAAE;MACZF,QAAQ,EAAE,IAAAG,kBAAW,EAAC,GAAGC,0BAAY;IACvC;EAAC,GACE,IAAAC,uBAAiB,EAAC,CAAC;AAE1B,CAAC,CAAC;AAEFb,UAAU,CAAC,uBAAuB,EAAE;EAClCG,OAAO,EAAE,CAAC,MAAM,CAAC;EACjBC,MAAM,EAAE;IACNG,IAAI,EAAE;MACJC,QAAQ,EAAE,IAAAM,sBAAe,EAAC,QAAQ;IACpC;EACF;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
//#region src/isServer/server.ts
const isServer = process.env.NODE_ENV === "test" ? void 0 : true;
//#endregion
export { isServer };
//# sourceMappingURL=server.js.map
@@ -0,0 +1,834 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Tokenizer > should correctly mark attributes > for double quotes attribute 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onattribname",
5,
8,
],
[
"onattribdata",
10,
11,
],
[
"onattribend",
3,
12,
],
[
"onopentagend",
13,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should correctly mark attributes > for no quotes attribute 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onattribname",
5,
8,
],
[
"onattribdata",
9,
12,
],
[
"onattribend",
1,
12,
],
[
"onopentagend",
13,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should correctly mark attributes > for no value attribute 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onattribname",
5,
12,
],
[
"onattribend",
0,
12,
],
[
"onopentagend",
13,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should correctly mark attributes > for single quotes attribute 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onattribname",
5,
8,
],
[
"onattribdata",
10,
11,
],
[
"onattribend",
2,
12,
],
[
"onopentagend",
13,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should handle entities > for XML entities 1`] = `
[
[
"ontextentity",
38,
5,
],
[
"ontextentity",
62,
9,
],
[
"ontext",
9,
13,
],
[
"ontextentity",
60,
17,
],
[
"ontext",
17,
23,
],
[
"ontextentity",
97,
29,
],
[
"ontext",
29,
34,
],
[
"ontextentity",
99,
39,
],
[
"ontext",
39,
49,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should handle entities > for entities in attributes (#276) 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onattribname",
5,
8,
],
[
"onattribdata",
10,
24,
],
[
"onattribentity",
8465,
],
[
"onattribdata",
31,
41,
],
[
"onattribend",
3,
42,
],
[
"onselfclosingtag",
43,
],
[
"ontext",
44,
58,
],
[
"ontextentity",
8465,
65,
],
[
"ontext",
65,
75,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should handle entities > for multi-byte entities 1`] = `
[
[
"ontextentity",
8807,
21,
],
[
"ontextentity",
824,
21,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should handle entities > for trailing legacy entity 1`] = `
[
[
"ontextentity",
10801,
10,
],
[
"ontextentity",
215,
16,
],
[
"ontext",
16,
19,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should not break after special tag followed by an entity > for normal special tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onopentagend",
6,
],
[
"ontext",
7,
10,
],
[
"onclosetag",
12,
17,
],
[
"ontextentity",
39,
24,
],
[
"onopentagname",
25,
27,
],
[
"onselfclosingtag",
28,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should not break after special tag followed by an entity > for self-closing special tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onselfclosingtag",
8,
],
[
"ontextentity",
39,
15,
],
[
"onopentagname",
16,
18,
],
[
"onselfclosingtag",
19,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should not lose data when pausing 1`] = `
[
[
"ontextentity",
38,
5,
],
[
"ontext",
5,
12,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support self-closing special tags > for self-closing script tag 1`] = `
[
[
"onopentagname",
1,
7,
],
[
"onselfclosingtag",
9,
],
[
"onopentagname",
11,
14,
],
[
"onopentagend",
14,
],
[
"onclosetag",
17,
20,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support self-closing special tags > for self-closing style tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onselfclosingtag",
8,
],
[
"onopentagname",
10,
13,
],
[
"onopentagend",
13,
],
[
"onclosetag",
16,
19,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support self-closing special tags > for self-closing textarea tag 1`] = `
[
[
"onopentagname",
1,
9,
],
[
"onselfclosingtag",
11,
],
[
"onopentagname",
13,
16,
],
[
"onopentagend",
16,
],
[
"onclosetag",
19,
22,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support self-closing special tags > for self-closing title tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onselfclosingtag",
8,
],
[
"onopentagname",
10,
13,
],
[
"onopentagend",
13,
],
[
"onclosetag",
16,
19,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support self-closing special tags > for self-closing xmp tag 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onselfclosingtag",
6,
],
[
"onopentagname",
8,
11,
],
[
"onopentagend",
11,
],
[
"onclosetag",
14,
17,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support standard special tags > for normal script tag 1`] = `
[
[
"onopentagname",
1,
7,
],
[
"onopentagend",
7,
],
[
"onclosetag",
10,
16,
],
[
"onopentagname",
18,
21,
],
[
"onopentagend",
21,
],
[
"onclosetag",
24,
27,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support standard special tags > for normal sitle tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onopentagend",
6,
],
[
"onclosetag",
9,
14,
],
[
"onopentagname",
16,
19,
],
[
"onopentagend",
19,
],
[
"onclosetag",
22,
25,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support standard special tags > for normal style tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onopentagend",
6,
],
[
"onclosetag",
9,
14,
],
[
"onopentagname",
16,
19,
],
[
"onopentagend",
19,
],
[
"onclosetag",
22,
25,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support standard special tags > for normal textarea tag 1`] = `
[
[
"onopentagname",
1,
9,
],
[
"onopentagend",
9,
],
[
"onclosetag",
12,
20,
],
[
"onopentagname",
22,
25,
],
[
"onopentagend",
25,
],
[
"onclosetag",
28,
31,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support standard special tags > for normal xmp tag 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onopentagend",
4,
],
[
"onclosetag",
7,
10,
],
[
"onopentagname",
12,
15,
],
[
"onopentagend",
15,
],
[
"onclosetag",
18,
21,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should treat html inside special tags as text > for div inside script tag 1`] = `
[
[
"onopentagname",
1,
7,
],
[
"onopentagend",
7,
],
[
"ontext",
8,
19,
],
[
"onclosetag",
21,
27,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should treat html inside special tags as text > for div inside style tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onopentagend",
6,
],
[
"ontext",
7,
18,
],
[
"onclosetag",
20,
25,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should treat html inside special tags as text > for div inside textarea tag 1`] = `
[
[
"onopentagname",
1,
9,
],
[
"onopentagend",
9,
],
[
"ontext",
10,
21,
],
[
"onclosetag",
23,
31,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should treat html inside special tags as text > for div inside title tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onopentagend",
6,
],
[
"ontext",
7,
18,
],
[
"onclosetag",
20,
25,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should treat html inside special tags as text > for div inside xmp tag 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onopentagend",
4,
],
[
"ontext",
5,
16,
],
[
"onclosetag",
18,
21,
],
[
"onend",
],
]
`;
@@ -0,0 +1,281 @@
/**
* @fileoverview Rule to control spacing within function calls
* @author Matt DuVall <http://www.mattduvall.com>
* @deprecated in ESLint v8.53.0
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "function-call-spacing",
url: "https://eslint.style/rules/function-call-spacing",
},
},
],
},
type: "layout",
docs: {
description:
"Require or disallow spacing between function identifiers and their invocations",
recommended: false,
url: "https://eslint.org/docs/latest/rules/func-call-spacing",
},
fixable: "whitespace",
schema: {
anyOf: [
{
type: "array",
items: [
{
enum: ["never"],
},
],
minItems: 0,
maxItems: 1,
},
{
type: "array",
items: [
{
enum: ["always"],
},
{
type: "object",
properties: {
allowNewlines: {
type: "boolean",
},
},
additionalProperties: false,
},
],
minItems: 0,
maxItems: 2,
},
],
},
messages: {
unexpectedWhitespace:
"Unexpected whitespace between function name and paren.",
unexpectedNewline:
"Unexpected newline between function name and paren.",
missing: "Missing space between function name and paren.",
},
},
create(context) {
const never = context.options[0] !== "always";
const allowNewlines =
!never && context.options[1] && context.options[1].allowNewlines;
const sourceCode = context.sourceCode;
const text = sourceCode.getText();
/**
* Check if open space is present in a function name
* @param {ASTNode} node node to evaluate
* @param {Token} leftToken The last token of the callee. This may be the closing parenthesis that encloses the callee.
* @param {Token} rightToken The first token of the arguments. this is the opening parenthesis that encloses the arguments.
* @returns {void}
* @private
*/
function checkSpacing(node, leftToken, rightToken) {
const textBetweenTokens = text
.slice(leftToken.range[1], rightToken.range[0])
.replace(/\/\*.*?\*\//gu, "");
const hasWhitespace = /\s/u.test(textBetweenTokens);
const hasNewline =
hasWhitespace &&
astUtils.LINEBREAK_MATCHER.test(textBetweenTokens);
/*
* never allowNewlines hasWhitespace hasNewline message
* F F F F Missing space between function name and paren.
* F F F T (Invalid `!hasWhitespace && hasNewline`)
* F F T T Unexpected newline between function name and paren.
* F F T F (OK)
* F T T F (OK)
* F T T T (OK)
* F T F T (Invalid `!hasWhitespace && hasNewline`)
* F T F F Missing space between function name and paren.
* T T F F (Invalid `never && allowNewlines`)
* T T F T (Invalid `!hasWhitespace && hasNewline`)
* T T T T (Invalid `never && allowNewlines`)
* T T T F (Invalid `never && allowNewlines`)
* T F T F Unexpected space between function name and paren.
* T F T T Unexpected space between function name and paren.
* T F F T (Invalid `!hasWhitespace && hasNewline`)
* T F F F (OK)
*
* T T Unexpected space between function name and paren.
* F F Missing space between function name and paren.
* F F T Unexpected newline between function name and paren.
*/
if (never && hasWhitespace) {
context.report({
node,
loc: {
start: leftToken.loc.end,
end: {
line: rightToken.loc.start.line,
column: rightToken.loc.start.column - 1,
},
},
messageId: "unexpectedWhitespace",
fix(fixer) {
// Don't remove comments.
if (
sourceCode.commentsExistBetween(
leftToken,
rightToken,
)
) {
return null;
}
// If `?.` exists, it doesn't hide no-unexpected-multiline errors
if (node.optional) {
return fixer.replaceTextRange(
[leftToken.range[1], rightToken.range[0]],
"?.",
);
}
/*
* Only autofix if there is no newline
* https://github.com/eslint/eslint/issues/7787
*/
if (hasNewline) {
return null;
}
return fixer.removeRange([
leftToken.range[1],
rightToken.range[0],
]);
},
});
} else if (!never && !hasWhitespace) {
context.report({
node,
loc: {
start: {
line: leftToken.loc.end.line,
column: leftToken.loc.end.column - 1,
},
end: rightToken.loc.start,
},
messageId: "missing",
fix(fixer) {
if (node.optional) {
return null; // Not sure if inserting a space to either before/after `?.` token.
}
return fixer.insertTextBefore(rightToken, " ");
},
});
} else if (!never && !allowNewlines && hasNewline) {
context.report({
node,
loc: {
start: leftToken.loc.end,
end: rightToken.loc.start,
},
messageId: "unexpectedNewline",
fix(fixer) {
/*
* Only autofix if there is no newline
* https://github.com/eslint/eslint/issues/7787
* But if `?.` exists, it doesn't hide no-unexpected-multiline errors
*/
if (!node.optional) {
return null;
}
// Don't remove comments.
if (
sourceCode.commentsExistBetween(
leftToken,
rightToken,
)
) {
return null;
}
const range = [leftToken.range[1], rightToken.range[0]];
const qdToken = sourceCode.getTokenAfter(leftToken);
if (qdToken.range[0] === leftToken.range[1]) {
return fixer.replaceTextRange(range, "?. ");
}
if (qdToken.range[1] === rightToken.range[0]) {
return fixer.replaceTextRange(range, " ?.");
}
return fixer.replaceTextRange(range, " ?. ");
},
});
}
}
return {
"CallExpression, NewExpression"(node) {
const lastToken = sourceCode.getLastToken(node);
const lastCalleeToken = sourceCode.getLastToken(node.callee);
const parenToken = sourceCode.getFirstTokenBetween(
lastCalleeToken,
lastToken,
astUtils.isOpeningParenToken,
);
const prevToken =
parenToken &&
sourceCode.getTokenBefore(
parenToken,
astUtils.isNotQuestionDotToken,
);
// Parens in NewExpression are optional
if (!(parenToken && parenToken.range[1] < node.range[1])) {
return;
}
checkSpacing(node, prevToken, parenToken);
},
ImportExpression(node) {
const leftToken = sourceCode.getFirstToken(node);
const rightToken = sourceCode.getTokenAfter(leftToken);
checkSpacing(node, leftToken, rightToken);
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"names":["_defineProperty","require","_objectSpread","target","i","arguments","length","source","Object","ownKeys","keys","getOwnPropertySymbols","push","apply","filter","sym","getOwnPropertyDescriptor","enumerable","forEach","key","defineProperty"],"sources":["../../src/helpers/objectSpread.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n/* @onlyBabel7 */\n\nimport defineProperty from \"./defineProperty.ts\";\n\ntype Intersection<R extends any[]> = R extends [infer H, ...infer S]\n ? H & Intersection<S>\n : unknown;\n\nexport default function _objectSpread<T extends object, U extends unknown[]>(\n target: T,\n ...sources: U\n): T & Intersection<U>;\nexport default function _objectSpread(target: object) {\n for (var i = 1; i < arguments.length; i++) {\n var source: object = arguments[i] != null ? Object(arguments[i]) : {};\n var ownKeys: PropertyKey[] = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys.push.apply(\n ownKeys,\n Object.getOwnPropertySymbols(source).filter(function (sym) {\n // sym already comes from `Object.getOwnPropertySymbols`, so getOwnPropertyDescriptor should always be defined\n return Object.getOwnPropertyDescriptor(source, sym)!.enumerable;\n }),\n );\n }\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key as keyof typeof source]);\n });\n }\n return target;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,eAAA,GAAAC,OAAA;AAUe,SAASC,aAAaA,CAACC,MAAc,EAAE;EACpD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,SAAS,CAACC,MAAM,EAAEF,CAAC,EAAE,EAAE;IACzC,IAAIG,MAAc,GAAGF,SAAS,CAACD,CAAC,CAAC,IAAI,IAAI,GAAGI,MAAM,CAACH,SAAS,CAACD,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACrE,IAAIK,OAAsB,GAAGD,MAAM,CAACE,IAAI,CAACH,MAAM,CAAC;IAChD,IAAI,OAAOC,MAAM,CAACG,qBAAqB,KAAK,UAAU,EAAE;MACtDF,OAAO,CAACG,IAAI,CAACC,KAAK,CAChBJ,OAAO,EACPD,MAAM,CAACG,qBAAqB,CAACJ,MAAM,CAAC,CAACO,MAAM,CAAC,UAAUC,GAAG,EAAE;QAEzD,OAAOP,MAAM,CAACQ,wBAAwB,CAACT,MAAM,EAAEQ,GAAG,CAAC,CAAEE,UAAU;MACjE,CAAC,CACH,CAAC;IACH;IACAR,OAAO,CAACS,OAAO,CAAC,UAAUC,GAAG,EAAE;MAC7B,IAAAC,uBAAc,EAACjB,MAAM,EAAEgB,GAAG,EAAEZ,MAAM,CAACY,GAAG,CAAwB,CAAC;IACjE,CAAC,CAAC;EACJ;EACA,OAAOhB,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"edit-2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,17 @@
/**
* @fileoverview Assertion utilities.
* @author Nicholas C. Zakas
*/
/**
* Throws an error if the given condition is not truthy.
* @param {boolean} condition The condition to check.
* @param {string} message The message to include with the error.
* @returns {void}
* @throws {Error} When the condition is not truthy.
*/
export function assert(condition, message = "Assertion failed.") {
if (!condition) {
throw new Error(message);
}
}
@@ -0,0 +1,117 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
file: { unit: "ბაიტი", verb: "უნდა შეიცავდეს" },
array: { unit: "ელემენტი", verb: "უნდა შეიცავდეს" },
set: { unit: "ელემენტი", verb: "უნდა შეიცავდეს" },
map: { unit: "ელემენტი", verb: "უნდა შეიცავდეს" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
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-კოდირებული ველი",
base64url: "base64url-კოდირებული ველი",
json_string: "JSON ველი",
e164: "E.164 ნომერი",
credit_card: "საკრედიტო ბარათის ნომერი",
currency_code: "ვალუტის კოდი",
iban: "IBAN",
jwt: "JWT",
template_literal: "შეყვანა",
};
const TypeDictionary = {
nan: "NaN",
number: "რიცხვი",
string: "ველი",
boolean: "ბულეანი",
function: "ფუნქცია",
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 ?? "მნიშვნელობა"} ${sizing.verb} ${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} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `ზედმეტად პატარა: მოსალოდნელი ${issue.origin} იყოს ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
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 () {
return {
localeError: error(),
};
}
@@ -0,0 +1 @@
{"version":3,"file":"clock-6.js","sources":["../../../src/icons/clock-6.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Clock6\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSIxMiA2IDEyIDEyIDEyIDE2LjUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/clock-6\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 Clock6 = createLucideIcon('Clock6', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['polyline', { points: '12 6 12 12 12 16.5', key: 'hb2qv6' }],\n]);\n\nexport default Clock6;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAsB,CAAA,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;AAC9D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const esnext_string: LibDefinition;
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2021_string = void 0;
const base_config_1 = require("./base-config");
exports.es2021_string = {
libs: [],
variables: [['String', base_config_1.TYPE]],
};
@@ -0,0 +1,12 @@
'use strict';
var decompress = require('@zxcvbn-ts/dictionary-compression/decompress');
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var decompress__default = /*#__PURE__*/_interopDefault(decompress);
var passwords = decompress__default.default("A123456ApasswordA12345678AqwertyA123456789FEB11111B234567AdragonA123123AbaseballAabc123AfootballAmonkeyAletmeinAshadowAmasterA696969AmichaelBustangA666666AqwertyuiopA123321D4567890ApussyAsupermanA1qaz2wsxA7777777AfuckyouAjordanAqazwsxAjenniferA123qweA000000AkillerAtrustno1AhunterBarleyAzxcvbnmAasdfghAbusterAandrewAbatmanAsoccerAtiggerAcharlieArobertAsunshineAthomasAiloveyouAfuckmeArangerAdanielAhockeyAgeorgeAcomputerAmichelleAjessicaAstarwarsAassholeApepperAklasterA112233AzxcvbnAfreedomAprincessAjoshuaAmaggieApassAgingerA11111111B31313AfuckAamandaBshleyAloveAcheeseA159753AnicoleAsummerAmatthewAchelseaAdallasAbitemeAmatrixAwilliamAyankeesA6969AtaylorAcorvetteAaustinBccessAmartinAheatherAthunderAmerlinAsecretAdiamondAhelloAanthonyAhammerAfuckerA1234qwerAsilverAgfhjkmAjustinApatrickArichardAbaileyAinternetAsamanthaAgolferAscooterAtestAorangeAcookieAq1w2e3r4t5AmaverickAjacksonAsparkyAmickeyAphoenixAbigdogAsnoopyAguitarAwhateverAchickenAmorganAandreaAcamaroAmercedesApeanutAferrariAcowboyAfalconAwelcomeAsamsungBexyBteelersAjosephAsmokeyAdakotaAmelissaAarsenalAboomerAeaglesAtigersAmarinaAnascarAboobooAgatewayAporscheAyellowAmonsterAspiderAdiabloAhannahAbulldogAjuniorAlondonApurpleAcompaqAlakersAicemanAqwer1234AhardcoreAcowboysAmoneyAbananaAncc1701AbostonBrandonAtennisAjohnnyAmillerAq1w2e3r4AcoffeeAscoobyA123654AedwardAnikitaAmotherAyamahaAbrandyBarneyAchesterAfuckoffAoliverAcharlesAplayerAknightAforeverAstevenArangersAmidnightAchicagoAbigdaddyAredsoxAvictoriaAbadboyAangelApleaseAfenderAchrisAjasperCmesAslayerArabbitAnatashaArachelAbigdickAmarineAwizardAmarlboroAraidersAprinceAcasperAfishingBlowerAcrystalAjasmineApantiesAiwantuAadidasAwinnerDterAgandalfApassword1AenterAghbdtnA1q2w3e4rAangelaAmikeAgoldenAlaurenAcocacolaAjordan23AwinstonAmadisonAangelsAblowmeApantherAsexsexAbigtitsAspankyAbitchAshannonBophieAjohnsonAasdfasdfAdavidAhornyAthx1138BoyotaBigerAmurphyAdickAcanadaAdanielleA12344321AblowjobA8675309AjonathanAliverpooAmuffinAcooperAapplesAjackieAdennisAblackAqwerty123Apassw0rdAjohnAabcd1234AsandraApokemonA123abcAslipknotAcarlosAqazxswA123456aAscorpionAqwaszxAnathanAbutterAstartrekArainbowAasdfghjklArazzBedskinsAnewyorkAgeminiAcameronAqazwsxedcAfloridaAliverpoolAturtleAnicholasAvikingAboogerAwilsonAsierraAbuttheadAdoctorArocketA159357AvictorAdolphinsAcaptainAbanditAjaguarApackersBookieBeachesA789456AasdfAblueAdolphinAhelpmeAtuckerBhemanBiffanyAmaxwellAjeremyAqwertyuiAshitheadAdebbieAalbertAmaddogAloversAmonicaAalexAunitedAgiantsAnirvanaAmetallicAhotdogArosebudAmountainAbenjaminAwarriorAstupidAelephantAsuckitDcessAbond007AjackassAbonnieAalexisApornAluckyAjasonAscorpioBamsonAq1w2e3Arush2112AazertyAfreddyAdriverAwillieAcalvinA1q2w3e4r5tAsydneyAgatorsAdexterAred123A12345aF6qAbubbaAcreativeAgolfAvoodooAhappyAarthurAtroubleAamericaAnissanAgunnerArebeccaAstellaAgarfieldBordonAjessieAbullshitAparkerAasdfghjkA5150AfuckingAapolloAjackA1qazxsw2A2112AeminemAdecemberAlegendAairborneAbeavisAaugustAbearAappleAbrooklynAgodzillaAskippyAbuddyA4815162342AqwertAkittenAmagicAshelbyAbeaverAphantomAfredAnothingAasdasdAwilliamsAxavierAbravesAdarknessAblink182AtravisAcopperAtomcatAplatinumAqweqweAgirlsA01012011AbigboyAgreenApowerA102030AanimalApoliceA11223344AonlineAvoyagerAlifehackA12qwaszxAfishAsniperA315475AtrinityAwalterAblazerAheavenAloverAsnowballAplayboyAbubblesAlovemeAhootersAcricketAmarvinAwillowAdonkeyAtopgunAnintendoAsaturnAfamilyAnovemberAgabrielAdestinyApakistanBumpkinAdigitalAsergeyAchanceAexplorerAredwingsAprivateAtherockArunnerAtitsA789456123AlasvegasAguinnessAbeatlesAfireAcassieBhristinAqwerty1Aasdf1234AcelticAbroncosAandreyA007007AbabygirlAnelsonAdonaldAscottAeclipseAcartmanAfluffyAlouiseAmichiganAtestingAcarolinaAlittleAsamuelAalexandeAbirdieAsteveAcherryApanteraAsharonAgibsonAvampireAmexicoAdickheadApeterAbuffaloAmontanaAgeniusAbeerAflyersAmaximusAschoolAminecraftAlovelyAstalkerAmetallicaAdoggieAcarterAkristinaBimberlyAspencerDedyAbarbaraAsnickersBabrinaAcarmenAmarcusAbroncoAyankeeAfriendsAparadiseAlol123AdreamsAmagnumAhorsesAcoolBarolineA147258369AlacrosseAou812AgooberAmemberAqwertyuAenigmaAscottyApimpinAbollocksBrianAcockAsurferBammyAgenesisApoohbearAdaveAstarAasd123AqweasdzxcAbabyAracingAfriendAhello1BawaiiAeagle1AbillyAviperAoctoberAvanessaApoopooAeinsteinAboobiesAstanleyA12345qAwalkerAbitchesApaulAdrowssapAstephenAcourtneyAsimpleAalaskaAbadgerAactionAjakeAbillAdeniseAjesterA111222AspitfireAdrummerAforestApatriciaAmaryjaneAchampionAdieselAsvetlanaArockAfridayAkevinAmarkAgregoryApamelaAfrankAhotrodA147258AchevyAandersonAlucky1AdouglasAwestsideAsecurityAgoogleAbadassAshortyAtesterBhumperAhitmanAmozartAgeneralAreddogAboobsAzaq12wsxAmusicA010203AlizardAalexanderAmelanieAa123456AruslanA123456789aAvincentAeagleA1232323qAsweetAteresaAscarfaceA147852Aqwerty12Aa12345AmarshallAoliviaAveronicaApornoAbuddhaAspiritAfrankieAmoney1AstargateAantonioAlibertyAnatalieAmercuryAnarutoAqwe123A12345qwertAsuzukiBemperfiAkingApopcornAspookyAmarleyAsystemAbrittanyAclaudiaAkellyAscotlandAfreeALine truncated
module.exports = passwords;
//# sourceMappingURL=passwords.json.cjs.map
@@ -0,0 +1,7 @@
Copyright (c) 2015-20 [these people](https://github.com/Rich-Harris/estree-walker/graphs/contributors)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
{"version":3,"file":"layout-grid.js","sources":["../../../src/icons/layout-grid.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name LayoutGrid\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSI3IiB4PSIzIiB5PSIzIiByeD0iMSIgLz4KICA8cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSI3IiB4PSIxNCIgeT0iMyIgcng9IjEiIC8+CiAgPHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iNyIgeD0iMTQiIHk9IjE0IiByeD0iMSIgLz4KICA8cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSI3IiB4PSIzIiB5PSIxNCIgcng9IjEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/layout-grid\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 LayoutGrid = createLucideIcon('LayoutGrid', [\n ['rect', { width: '7', height: '7', x: '3', y: '3', rx: '1', key: '1g98yp' }],\n ['rect', { width: '7', height: '7', x: '14', y: '3', rx: '1', key: '6d4xhi' }],\n ['rect', { width: '7', height: '7', x: '14', y: '14', rx: '1', key: 'nxv5o0' }],\n ['rect', { width: '7', height: '7', x: '3', y: '14', rx: '1', key: '1bb6yr' }],\n]);\n\nexport default LayoutGrid;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CA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AAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC/E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,309 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LogicalExpression = exports.AssignmentExpression = AssignmentExpression;
exports.AssignmentPattern = AssignmentPattern;
exports.AwaitExpression = AwaitExpression;
exports.BinaryExpression = BinaryExpression;
exports.BindExpression = BindExpression;
exports.CallExpression = CallExpression;
exports.ConditionalExpression = ConditionalExpression;
exports.Decorator = Decorator;
exports.DoExpression = DoExpression;
exports.EmptyStatement = EmptyStatement;
exports.ExpressionStatement = ExpressionStatement;
exports.Import = Import;
exports.MemberExpression = MemberExpression;
exports.MetaProperty = MetaProperty;
exports.ModuleExpression = ModuleExpression;
exports.NewExpression = NewExpression;
exports.OptionalCallExpression = OptionalCallExpression;
exports.OptionalMemberExpression = OptionalMemberExpression;
exports.ParenthesizedExpression = ParenthesizedExpression;
exports.PrivateName = PrivateName;
exports.SequenceExpression = SequenceExpression;
exports.Super = Super;
exports.ThisExpression = ThisExpression;
exports.UnaryExpression = UnaryExpression;
exports.UpdateExpression = UpdateExpression;
exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier;
exports.YieldExpression = YieldExpression;
exports._shouldPrintDecoratorsBeforeExport = _shouldPrintDecoratorsBeforeExport;
var _t = require("@babel/types");
var _index = require("../node/index.js");
const {
isCallExpression,
isLiteral,
isMemberExpression,
isNewExpression,
isPattern
} = _t;
function UnaryExpression(node) {
const {
operator
} = node;
const firstChar = operator.charCodeAt(0);
if (firstChar >= 97 && firstChar <= 122) {
this.word(operator);
this.space();
} else {
this.tokenChar(firstChar);
}
this.print(node.argument);
}
function DoExpression(node) {
if (node.async) {
this.word("async", true);
this.space();
}
this.word("do");
this.space();
this.print(node.body);
}
function ParenthesizedExpression(node) {
this.tokenChar(40);
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.print(node.expression, undefined, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightParens(node);
}
function UpdateExpression(node) {
if (node.prefix) {
this.token(node.operator, false, 0, true);
this.print(node.argument);
} else {
this.print(node.argument, true);
this.token(node.operator, false, 0, true);
}
}
function ConditionalExpression(node) {
this.print(node.test);
this.space();
this.tokenChar(63);
this.space();
this.print(node.consequent);
this.space();
this.tokenChar(58);
this.space();
this.print(node.alternate);
}
function NewExpression(node, parent) {
this.word("new");
this.space();
this.print(node.callee);
if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression(parent, {
callee: node
}) && !isMemberExpression(parent) && !isNewExpression(parent)) {
return;
}
this.print(node.typeArguments);
this.print(node.typeParameters);
if (node.optional) {
this.token("?.");
}
if (node.arguments.length === 0 && this.tokenMap && !this.tokenMap.endMatches(node, ")")) {
return;
}
this.tokenChar(40);
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.printList(node.arguments, this.shouldPrintTrailingComma(")"), undefined, undefined, undefined, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightParens(node);
}
function SequenceExpression(node) {
this.printList(node.expressions);
}
function ThisExpression() {
this.word("this");
}
function Super() {
this.word("super");
}
function _shouldPrintDecoratorsBeforeExport(node) {
if (typeof this.format.decoratorsBeforeExport === "boolean") {
return this.format.decoratorsBeforeExport;
}
return typeof node.start === "number" && node.start === node.declaration.start;
}
function Decorator(node) {
this.tokenChar(64);
const {
expression
} = node;
this.print(expression);
this.newline();
}
function OptionalMemberExpression(node) {
let {
computed
} = node;
const {
optional,
property
} = node;
this.print(node.object);
if (!computed && isMemberExpression(property)) {
throw new TypeError("Got a MemberExpression for MemberExpression property");
}
if (isLiteral(property) && typeof property.value === "number") {
computed = true;
}
if (optional) {
this.token("?.");
}
if (computed) {
this.tokenChar(91);
this.print(property);
this.tokenChar(93);
} else {
if (!optional) {
this.tokenChar(46);
}
this.print(property);
}
}
function OptionalCallExpression(node) {
this.print(node.callee);
this.print(node.typeParameters);
if (node.optional) {
this.token("?.");
}
this.print(node.typeArguments);
this.tokenChar(40);
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.printList(node.arguments, undefined, undefined, undefined, undefined, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightParens(node);
}
function CallExpression(node) {
this.print(node.callee);
this.print(node.typeArguments);
this.print(node.typeParameters);
this.tokenChar(40);
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.printList(node.arguments, this.shouldPrintTrailingComma(")"), undefined, undefined, undefined, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightParens(node);
}
function Import() {
this.word("import");
}
function AwaitExpression(node) {
this.word("await");
this.space();
this.print(node.argument);
}
function YieldExpression(node) {
if (node.delegate) {
this.word("yield", true);
this.tokenChar(42);
if (node.argument) {
this.space();
this.print(node.argument);
}
} else if (node.argument) {
this.word("yield", true);
this.space();
this.print(node.argument);
} else {
this.word("yield");
}
}
function EmptyStatement() {
this.semicolon(true);
}
function ExpressionStatement(node) {
this.tokenContext |= _index.TokenContext.expressionStatement;
this.print(node.expression);
this.semicolon();
}
function AssignmentPattern(node) {
this.print(node.left);
if (node.left.type === "Identifier" || isPattern(node.left)) {
if (node.left.optional) this.tokenChar(63);
this.print(node.left.typeAnnotation);
}
this.space();
this.tokenChar(61);
this.space();
this.print(node.right);
}
function AssignmentExpression(node) {
this.print(node.left);
this.space();
this.token(node.operator, false, 0, true);
this.space();
this.print(node.right);
}
function BinaryExpression(node) {
this.print(node.left);
this.space();
const {
operator
} = node;
if (operator.charCodeAt(0) === 105) {
this.word(operator);
} else {
this.token(operator, false, 0, true);
this.setLastChar(operator.charCodeAt(operator.length - 1));
}
this.space();
this.print(node.right);
}
function BindExpression(node) {
this.print(node.object);
this.token("::");
this.print(node.callee);
}
function MemberExpression(node) {
this.print(node.object);
if (!node.computed && isMemberExpression(node.property)) {
throw new TypeError("Got a MemberExpression for MemberExpression property");
}
let computed = node.computed;
if (isLiteral(node.property) && typeof node.property.value === "number") {
computed = true;
}
if (computed) {
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.tokenChar(91);
this.print(node.property, undefined, true);
this.tokenChar(93);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
} else {
this.tokenChar(46);
this.print(node.property);
}
}
function MetaProperty(node) {
this.print(node.meta);
this.tokenChar(46);
this.print(node.property);
}
function PrivateName(node) {
this.tokenChar(35);
this.print(node.id);
}
function V8IntrinsicIdentifier(node) {
this.tokenChar(37);
this.word(node.name);
}
function ModuleExpression(node) {
this.word("module", true);
this.space();
this.tokenChar(123);
this.indent();
const {
body
} = node;
if (body.body.length || body.directives.length) {
this.newline();
}
this.print(body);
this.dedent();
this.rightBrace(node);
}
//# sourceMappingURL=expressions.js.map
@@ -0,0 +1,2 @@
import { n as CfWorkerSchemaDraft, t as CfWorkerJsonSchemaValidator } from "../cfWorkerProvider-doTkZbTr.cjs";
export { CfWorkerJsonSchemaValidator, type CfWorkerSchemaDraft };
@@ -0,0 +1 @@
module.exports={"0":"116","1":"117","2":"118","3":"119","4":"120","5":"121","6":"122","7":"123","8":"124","9":"125",A:"10",B:"11",C:"12",D:"7",E:"8",F:"9",G:"15",H:"80",I:"154",J:"4",K:"27",L:"6",M:"13",N:"14",O:"16",P:"17",Q:"18",R:"79",S:"81",T:"83",U:"84",V:"85",W:"86",X:"87",Y:"88",Z:"89",a:"90",b:"91",c:"92",d:"93",e:"94",f:"95",g:"96",h:"97",i:"98",j:"99",k:"100",l:"101",m:"102",n:"103",o:"104",p:"105",q:"106",r:"107",s:"108",t:"109",u:"110",v:"111",w:"112",x:"113",y:"114",z:"115",AB:"126",BB:"127",CB:"131",DB:"132",EB:"133",FB:"134",GB:"135",HB:"20",IB:"21",JB:"22",KB:"23",LB:"24",MB:"25",NB:"26",OB:"28",PB:"29",QB:"30",RB:"128",SB:"129",TB:"130",UB:"136",VB:"137",WB:"138",XB:"139",YB:"140",ZB:"141",aB:"142",bB:"143",cB:"144",dB:"145",eB:"146",fB:"147",gB:"148",hB:"149",iB:"150",jB:"151",kB:"152",lB:"153",mB:"5",nB:"19",oB:"31",pB:"32",qB:"33",rB:"34",sB:"35",tB:"36",uB:"37",vB:"38",wB:"39",xB:"40",yB:"41",zB:"42","0B":"43","1B":"44","2B":"45","3B":"46","4B":"47","5B":"48","6B":"49","7B":"50","8B":"51","9B":"52",AC:"53",BC:"54",CC:"55",DC:"56",EC:"57",FC:"58",GC:"60",HC:"62",IC:"63",JC:"64",KC:"65",LC:"66",MC:"67",NC:"68",OC:"69",PC:"70",QC:"71",RC:"72",SC:"73",TC:"74",UC:"75",VC:"76",WC:"77",XC:"78",YC:"157",ZC:"11.1",aC:"12.1",bC:"15.5",cC:"16.0",dC:"17.0",eC:"18.0",fC:"3",gC:"59",hC:"61",iC:"82",jC:"155",kC:"156",lC:"3.2",mC:"10.1",nC:"15.2-15.3",oC:"15.4",pC:"16.1",qC:"16.2",rC:"16.3",sC:"16.4",tC:"16.5",uC:"17.1",vC:"17.2",wC:"17.3",xC:"17.4",yC:"17.5",zC:"18.1","0C":"18.2","1C":"18.3","2C":"18.4","3C":"18.5-18.7","4C":"26.0","5C":"26.1","6C":"26.2","7C":"26.3","8C":"26.4","9C":"26.5",AD:"26.6",BD:"27.1",CD:"27.2",DD:"11.5",ED:"4.2-4.3",FD:"5.5",GD:"2",HD:"158",ID:"159",JD:"160",KD:"3.5",LD:"3.6",MD:"3.1",ND:"5.1",OD:"6.1",PD:"7.1",QD:"9.1",RD:"13.1",SD:"14.1",TD:"15.1",UD:"15.6",VD:"16.6",WD:"17.6",XD:"TP",YD:"9.5-9.6",ZD:"10.0-10.1",aD:"10.5",bD:"10.6",cD:"11.6",dD:"4.0-4.1",eD:"5.0-5.1",fD:"6.0-6.1",gD:"7.0-7.1",hD:"8.1-8.4",iD:"9.0-9.2",jD:"9.3",kD:"10.0-10.2",lD:"10.3",mD:"11.0-11.2",nD:"11.3-11.4",oD:"12.0-12.1",pD:"12.2-12.5",qD:"13.0-13.1",rD:"13.2",sD:"13.3",tD:"13.4-13.7",uD:"14.0-14.4",vD:"14.5-14.8",wD:"15.0-15.1",xD:"15.6-15.8",yD:"16.6-16.7",zD:"17.6-17.7","0D":"27.0","1D":"all","2D":"2.1","3D":"2.2","4D":"2.3","5D":"4.1","6D":"4.4","7D":"4.4.3-4.4.4","8D":"5.0-5.4","9D":"6.2-6.4",AE:"7.2-7.4",BE:"8.2",CE:"9.2",DE:"11.1-11.2",EE:"12.0",FE:"13.0",GE:"14.0",HE:"15.0",IE:"19.0",JE:"14.9",KE:"13.52",LE:"2.5",ME:"3.0-3.1"};
@@ -0,0 +1 @@
{"version":3,"file":"chart-no-axes-column.js","sources":["../../../src/icons/chart-no-axes-column.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChartNoAxesColumn\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8bGluZSB4MT0iMTgiIHgyPSIxOCIgeTE9IjIwIiB5Mj0iMTAiIC8+CiAgPGxpbmUgeDE9IjEyIiB4Mj0iMTIiIHkxPSIyMCIgeTI9IjQiIC8+CiAgPGxpbmUgeDE9IjYiIHgyPSI2IiB5MT0iMjAiIHkyPSIxNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/chart-no-axes-column\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 ChartNoAxesColumn = createLucideIcon('ChartNoAxesColumn', [\n ['line', { x1: '18', x2: '18', y1: '20', y2: '10', key: '1xfpm4' }],\n ['line', { x1: '12', x2: '12', y1: '20', y2: '4', key: 'be30l9' }],\n ['line', { x1: '6', x2: '6', y1: '20', y2: '14', key: '1r4le6' }],\n]);\n\nexport default ChartNoAxesColumn;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAC9D,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,CAAA;AAAA,CAClE,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,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,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;AAClE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,436 @@
import { n as __require, t as __commonJSMin } from "./rolldown-runtime.js";
var require_astUtilities = /* @__PURE__ */ __commonJSMin(((exports) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
enumerable: true,
get: function() {
return m[k];
}
};
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", {
enumerable: true,
value: v
});
}) : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || (function() {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function(o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
}
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isParenthesized = exports.hasSideEffect = exports.getStringIfConstant = exports.getStaticValue = exports.getPropertyName = exports.getFunctionNameWithKind = exports.getFunctionHeadLocation = void 0;
const eslintUtils$4 = __importStar(__require("@eslint-community/eslint-utils"));
exports.getFunctionHeadLocation = eslintUtils$4.getFunctionHeadLocation;
exports.getFunctionNameWithKind = eslintUtils$4.getFunctionNameWithKind;
exports.getPropertyName = eslintUtils$4.getPropertyName;
exports.getStaticValue = eslintUtils$4.getStaticValue;
exports.getStringIfConstant = eslintUtils$4.getStringIfConstant;
exports.hasSideEffect = eslintUtils$4.hasSideEffect;
exports.isParenthesized = eslintUtils$4.isParenthesized;
}));
var require_PatternMatcher = /* @__PURE__ */ __commonJSMin(((exports) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
enumerable: true,
get: function() {
return m[k];
}
};
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", {
enumerable: true,
value: v
});
}) : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || (function() {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function(o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
}
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.PatternMatcher = void 0;
exports.PatternMatcher = __importStar(__require("@eslint-community/eslint-utils")).PatternMatcher;
}));
var require_predicates$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
enumerable: true,
get: function() {
return m[k];
}
};
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", {
enumerable: true,
value: v
});
}) : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || (function() {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function(o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
}
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNotSemicolonToken = exports.isSemicolonToken = exports.isNotOpeningParenToken = exports.isOpeningParenToken = exports.isNotOpeningBracketToken = exports.isOpeningBracketToken = exports.isNotOpeningBraceToken = exports.isOpeningBraceToken = exports.isNotCommentToken = exports.isCommentToken = exports.isNotCommaToken = exports.isCommaToken = exports.isNotColonToken = exports.isColonToken = exports.isNotClosingParenToken = exports.isClosingParenToken = exports.isNotClosingBracketToken = exports.isClosingBracketToken = exports.isNotClosingBraceToken = exports.isClosingBraceToken = exports.isNotArrowToken = exports.isArrowToken = void 0;
const eslintUtils$2 = __importStar(__require("@eslint-community/eslint-utils"));
exports.isArrowToken = eslintUtils$2.isArrowToken;
exports.isNotArrowToken = eslintUtils$2.isNotArrowToken;
exports.isClosingBraceToken = eslintUtils$2.isClosingBraceToken;
exports.isNotClosingBraceToken = eslintUtils$2.isNotClosingBraceToken;
exports.isClosingBracketToken = eslintUtils$2.isClosingBracketToken;
exports.isNotClosingBracketToken = eslintUtils$2.isNotClosingBracketToken;
exports.isClosingParenToken = eslintUtils$2.isClosingParenToken;
exports.isNotClosingParenToken = eslintUtils$2.isNotClosingParenToken;
exports.isColonToken = eslintUtils$2.isColonToken;
exports.isNotColonToken = eslintUtils$2.isNotColonToken;
exports.isCommaToken = eslintUtils$2.isCommaToken;
exports.isNotCommaToken = eslintUtils$2.isNotCommaToken;
exports.isCommentToken = eslintUtils$2.isCommentToken;
exports.isNotCommentToken = eslintUtils$2.isNotCommentToken;
exports.isOpeningBraceToken = eslintUtils$2.isOpeningBraceToken;
exports.isNotOpeningBraceToken = eslintUtils$2.isNotOpeningBraceToken;
exports.isOpeningBracketToken = eslintUtils$2.isOpeningBracketToken;
exports.isNotOpeningBracketToken = eslintUtils$2.isNotOpeningBracketToken;
exports.isOpeningParenToken = eslintUtils$2.isOpeningParenToken;
exports.isNotOpeningParenToken = eslintUtils$2.isNotOpeningParenToken;
exports.isSemicolonToken = eslintUtils$2.isSemicolonToken;
exports.isNotSemicolonToken = eslintUtils$2.isNotSemicolonToken;
}));
var require_ReferenceTracker = /* @__PURE__ */ __commonJSMin(((exports) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
enumerable: true,
get: function() {
return m[k];
}
};
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", {
enumerable: true,
value: v
});
}) : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || (function() {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function(o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
}
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReferenceTracker = void 0;
const eslintUtils$1 = __importStar(__require("@eslint-community/eslint-utils"));
eslintUtils$1.ReferenceTracker.READ;
eslintUtils$1.ReferenceTracker.CALL;
eslintUtils$1.ReferenceTracker.CONSTRUCT;
eslintUtils$1.ReferenceTracker.ESM;
exports.ReferenceTracker = eslintUtils$1.ReferenceTracker;
}));
var require_scopeAnalysis = /* @__PURE__ */ __commonJSMin(((exports) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
enumerable: true,
get: function() {
return m[k];
}
};
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", {
enumerable: true,
value: v
});
}) : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || (function() {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function(o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) {
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
}
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getInnermostScope = exports.findVariable = void 0;
const eslintUtils = __importStar(__require("@eslint-community/eslint-utils"));
exports.findVariable = eslintUtils.findVariable;
exports.getInnermostScope = eslintUtils.getInnermostScope;
}));
var require_eslint_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
enumerable: true,
get: function() {
return m[k];
}
};
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __exportStar = exports && exports.__exportStar || function(m, exports$2) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$2, p)) __createBinding(exports$2, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require_astUtilities(), exports);
__exportStar(require_PatternMatcher(), exports);
__exportStar(require_predicates$1(), exports);
__exportStar(require_ReferenceTracker(), exports);
__exportStar(require_scopeAnalysis(), exports);
}));
var require_helpers = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNotTokenOfTypeWithConditions = exports.isTokenOfTypeWithConditions = exports.isNodeOfTypeWithConditions = exports.isNodeOfTypes = exports.isNodeOfType = void 0;
const isNodeOfType = (nodeType) => (node) => node?.type === nodeType;
exports.isNodeOfType = isNodeOfType;
const isNodeOfTypes = (nodeTypes) => (node) => !!node && nodeTypes.includes(node.type);
exports.isNodeOfTypes = isNodeOfTypes;
const isNodeOfTypeWithConditions = (nodeType, conditions) => {
const entries = Object.entries(conditions);
return (node) => node?.type === nodeType && entries.every(([key, value]) => node[key] === value);
};
exports.isNodeOfTypeWithConditions = isNodeOfTypeWithConditions;
const isTokenOfTypeWithConditions = (tokenType, conditions) => {
const entries = Object.entries(conditions);
return (token) => token?.type === tokenType && entries.every(([key, value]) => token[key] === value);
};
exports.isTokenOfTypeWithConditions = isTokenOfTypeWithConditions;
const isNotTokenOfTypeWithConditions = (tokenType, conditions) => (token) => !(0, exports.isTokenOfTypeWithConditions)(tokenType, conditions)(token);
exports.isNotTokenOfTypeWithConditions = isNotTokenOfTypeWithConditions;
}));
var require_misc = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.LINEBREAK_MATCHER = void 0;
exports.isTokenOnSameLine = isTokenOnSameLine;
exports.LINEBREAK_MATCHER = /\r\n|[\r\n\u2028\u2029]/;
function isTokenOnSameLine(left, right) {
return left.loc.end.line === right.loc.start.line;
}
}));
var require_ts_estree = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSESTree = exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
var types_1 = __require("@typescript-eslint/types");
Object.defineProperty(exports, "AST_NODE_TYPES", {
enumerable: true,
get: function() {
return types_1.AST_NODE_TYPES;
}
});
Object.defineProperty(exports, "AST_TOKEN_TYPES", {
enumerable: true,
get: function() {
return types_1.AST_TOKEN_TYPES;
}
});
Object.defineProperty(exports, "TSESTree", {
enumerable: true,
get: function() {
return types_1.TSESTree;
}
});
}));
var require_predicates = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.isLoop = exports.isImportKeyword = exports.isTypeKeyword = exports.isAwaitKeyword = exports.isAwaitExpression = exports.isIdentifier = exports.isConstructor = exports.isClassOrTypeElement = exports.isTSConstructorType = exports.isTSFunctionType = exports.isFunctionOrFunctionType = exports.isFunctionType = exports.isFunction = exports.isVariableDeclarator = exports.isTypeAssertion = exports.isLogicalOrOperator = exports.isOptionalCallExpression = exports.isNotNonNullAssertionPunctuator = exports.isNonNullAssertionPunctuator = exports.isNotOptionalChainPunctuator = exports.isOptionalChainPunctuator = void 0;
exports.isSetter = isSetter;
const ts_estree_1 = require_ts_estree();
const helpers_1 = require_helpers();
exports.isOptionalChainPunctuator = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "?." });
exports.isNotOptionalChainPunctuator = (0, helpers_1.isNotTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "?." });
exports.isNonNullAssertionPunctuator = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "!" });
exports.isNotNonNullAssertionPunctuator = (0, helpers_1.isNotTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "!" });
exports.isOptionalCallExpression = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.CallExpression, { optional: true });
exports.isLogicalOrOperator = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.LogicalExpression, { operator: "||" });
exports.isTypeAssertion = (0, helpers_1.isNodeOfTypes)([ts_estree_1.AST_NODE_TYPES.TSAsExpression, ts_estree_1.AST_NODE_TYPES.TSTypeAssertion]);
exports.isVariableDeclarator = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.VariableDeclarator);
const functionTypes = [
ts_estree_1.AST_NODE_TYPES.ArrowFunctionExpression,
ts_estree_1.AST_NODE_TYPES.FunctionDeclaration,
ts_estree_1.AST_NODE_TYPES.FunctionExpression
];
exports.isFunction = (0, helpers_1.isNodeOfTypes)(functionTypes);
const functionTypeTypes = [
ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
ts_estree_1.AST_NODE_TYPES.TSConstructorType,
ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
ts_estree_1.AST_NODE_TYPES.TSDeclareFunction,
ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
ts_estree_1.AST_NODE_TYPES.TSFunctionType,
ts_estree_1.AST_NODE_TYPES.TSMethodSignature
];
exports.isFunctionType = (0, helpers_1.isNodeOfTypes)(functionTypeTypes);
exports.isFunctionOrFunctionType = (0, helpers_1.isNodeOfTypes)([...functionTypes, ...functionTypeTypes]);
exports.isTSFunctionType = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.TSFunctionType);
exports.isTSConstructorType = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.TSConstructorType);
exports.isClassOrTypeElement = (0, helpers_1.isNodeOfTypes)([
ts_estree_1.AST_NODE_TYPES.PropertyDefinition,
ts_estree_1.AST_NODE_TYPES.FunctionExpression,
ts_estree_1.AST_NODE_TYPES.MethodDefinition,
ts_estree_1.AST_NODE_TYPES.TSAbstractPropertyDefinition,
ts_estree_1.AST_NODE_TYPES.TSAbstractMethodDefinition,
ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
ts_estree_1.AST_NODE_TYPES.TSIndexSignature,
ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
ts_estree_1.AST_NODE_TYPES.TSMethodSignature,
ts_estree_1.AST_NODE_TYPES.TSPropertySignature
]);
exports.isConstructor = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.MethodDefinition, { kind: "constructor" });
function isSetter(node) {
return !!node && (node.type === ts_estree_1.AST_NODE_TYPES.MethodDefinition || node.type === ts_estree_1.AST_NODE_TYPES.Property) && node.kind === "set";
}
exports.isIdentifier = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.Identifier);
exports.isAwaitExpression = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.AwaitExpression);
exports.isAwaitKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Identifier, { value: "await" });
exports.isTypeKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Identifier, { value: "type" });
exports.isImportKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Keyword, { value: "import" });
exports.isLoop = (0, helpers_1.isNodeOfTypes)([
ts_estree_1.AST_NODE_TYPES.DoWhileStatement,
ts_estree_1.AST_NODE_TYPES.ForStatement,
ts_estree_1.AST_NODE_TYPES.ForInStatement,
ts_estree_1.AST_NODE_TYPES.ForOfStatement,
ts_estree_1.AST_NODE_TYPES.WhileStatement
]);
}));
var require_ast_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
enumerable: true,
get: function() {
return m[k];
}
};
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];
}));
var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require_eslint_utils(), exports);
__exportStar(require_helpers(), exports);
__exportStar(require_misc(), exports);
__exportStar(require_predicates(), exports);
}));
function escapeStringRegexp(string) {
if (typeof string !== "string") throw new TypeError("Expected a string");
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}
export { require_ast_utils as n, escapeStringRegexp as t };
@@ -0,0 +1,139 @@
---
name: router-core
description: >-
Framework-agnostic core concepts for TanStack Router: route trees,
createRouter, createRoute, createRootRoute, createRootRouteWithContext,
addChildren, Register type declaration, route matching, route sorting,
file naming conventions. Entry point for all router skills.
type: core
library: tanstack-router
library_version: '1.166.2'
---
# TanStack Router Core
TanStack Router is a type-safe router for React and Solid with built-in SWR caching, JSON-first search params, file-based route generation, and end-to-end type inference. The core is framework-agnostic; React and Solid bindings layer on top.
> **CRITICAL**: TanStack Router types are FULLY INFERRED. Never cast, never annotate inferred values. This is the #1 AI agent mistake.
> **CRITICAL**: TanStack Router is CLIENT-FIRST. Loaders run on the client by default, NOT server-only like Remix/Next.js. Do not confuse TanStack Router APIs with Next.js or React Router.
## Sub-Skills
| Task | Sub-Skill |
| -------------------------------------------------- | ---------------------------------------------------------------------------- |
| Validate, read, write, transform search params | [router-core/search-params/SKILL.md](./search-params/SKILL.md) |
| Dynamic segments, splats, optional params | [router-core/path-params/SKILL.md](./path-params/SKILL.md) |
| Link, useNavigate, preloading, blocking | [router-core/navigation/SKILL.md](./navigation/SKILL.md) |
| Route loaders, SWR caching, context, deferred data | [router-core/data-loading/SKILL.md](./data-loading/SKILL.md) |
| Auth guards, RBAC, beforeLoad redirects | [router-core/auth-and-guards/SKILL.md](./auth-and-guards/SKILL.md) |
| Automatic and manual code splitting | [router-core/code-splitting/SKILL.md](./code-splitting/SKILL.md) |
| 404 handling, error boundaries, notFound() | [router-core/not-found-and-errors/SKILL.md](./not-found-and-errors/SKILL.md) |
| Inference, Register, from narrowing, TS perf | [router-core/type-safety/SKILL.md](./type-safety/SKILL.md) |
| Streaming/non-streaming SSR, hydration, head mgmt | [router-core/ssr/SKILL.md](./ssr/SKILL.md) |
## Quick Decision Tree
```
Need to add/read/write URL query parameters?
→ router-core/search-params
Need dynamic URL segments like /posts/$postId?
→ router-core/path-params
Need to create links or navigate programmatically?
→ router-core/navigation
Need to fetch data for a route?
Is it client-side only or client+server?
→ router-core/data-loading
Using TanStack Query as external cache?
→ compositions/router-query (separate skill)
Need to protect routes behind auth?
→ router-core/auth-and-guards
Need to reduce bundle size per route?
→ router-core/code-splitting
Need custom 404 or error handling?
→ router-core/not-found-and-errors
Having TypeScript issues or performance problems?
→ router-core/type-safety
Need server-side rendering?
→ router-core/ssr
```
## Minimal Working Example
```tsx
// src/routes/__root.tsx
import { createRootRoute, Outlet } from '@tanstack/react-router'
export const Route = createRootRoute({
component: () => <Outlet />,
})
```
```tsx
// src/routes/index.tsx
import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/')({
component: () => <h1>Home</h1>,
})
```
```tsx
// src/router.tsx
import { createRouter } from '@tanstack/react-router'
import { routeTree } from './routeTree.gen'
const router = createRouter({ routeTree })
// REQUIRED for type safety — without this, Link/useNavigate have no autocomplete
declare module '@tanstack/react-router' {
interface Register {
router: typeof router
}
}
export default router
```
```tsx
// src/main.tsx
import { RouterProvider } from '@tanstack/react-router'
import router from './router'
function App() {
return <RouterProvider router={router} />
}
```
## Common Mistakes
### HIGH: createFileRoute path string must match the file path
The Vite plugin manages the path string in `createFileRoute`. Do not change it manually — it must match the file's location under `src/routes/`:
```tsx
// File: src/routes/posts/$postId.tsx
export const Route = createFileRoute('/posts/$postId')({
// ✅ matches file path
component: PostPage,
})
export const Route = createFileRoute('/post/$postId')({
// ❌ silent mismatch
component: PostPage,
})
```
The plugin auto-generates this string. If you rename a route file, the plugin updates it. Never edit the path string by hand.
## Version Note
This skill targets `@tanstack/router-core` v1.166.2 and `@tanstack/react-router` v1.166.2. APIs are stable. Splat routes use `$` (not `*`); the `*` compat alias will be removed in v2.
@@ -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 ChartNoAxesColumnIncreasing = createLucideIcon("ChartNoAxesColumnIncreasing", [
["line", { x1: "12", x2: "12", y1: "20", y2: "10", key: "1vz5eb" }],
["line", { x1: "18", x2: "18", y1: "20", y2: "4", key: "cun8e5" }],
["line", { x1: "6", x2: "6", y1: "20", y2: "16", key: "hq0ia6" }]
]);
export { ChartNoAxesColumnIncreasing as default };
//# sourceMappingURL=chart-no-axes-column-increasing.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","2":"_IB","66":"_6H"},B:{"1":"_uJ","2":"_oH _i","1540":"_WP _WK"},C:{"1":"_YF _yE _JF","2":"_PL _2B _PT _p _L","66":"KB","129":"_3K _DG _cP","388":"XC _4E _5G"},D:{"1":"_1B _uG _fE","2":"_H _cL _rP _l","1540":"_WP _WK"},E:{"1":"_iC _oJ _mF _kL","2":"_ZC","513":"N RD","1028":"_wF"},F:{"1":"_9R aC","2":"_0B _SU _h _FJ","1540":"SC _LD T"},G:{"1":"_wD _iR","2":"_d","1028":"_sH"},H:{"16":"1D"},I:{"2":"_P"},J:{"1":"A","2":"D"},K:{"1":"aC","2":"_FE H _tB"},L:{"2":"I"},M:{"2":"YC"},N:{"1":"B","66":"A"},O:{"2":"bC"},P:{"1":"_OD","2":"_DF"},Q:{"16":"JE"},R:{"16":"KE"},S:{"1":"_C"}},B:7,C:"TLS 1.1",D:true};
@@ -0,0 +1,7 @@
"use client";
import { createContext } from 'react';
const ReorderContext = createContext(null);
export { ReorderContext };
//# sourceMappingURL=ReorderContext.mjs.map
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/alert-dialog.tsx"],
"sourcesContent": ["import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { createDialogScope } from '@radix-ui/react-dialog';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createSlottable } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst ROOT_NAME = 'AlertDialog';\n\ntype ScopedProps<P> = P & { __scopeAlertDialog?: Scope };\nconst [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope,\n]);\nconst useDialogScope = createDialogScope();\n\ntype DialogProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;\ninterface AlertDialogProps extends Omit<DialogProps, 'modal'> {}\n\nconst AlertDialog: React.FC<AlertDialogProps> = (props: ScopedProps<AlertDialogProps>) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Root {...dialogScope} {...alertDialogProps} modal={true} />;\n};\n\nAlertDialog.displayName = ROOT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTrigger\n * -----------------------------------------------------------------------------------------------*/\nconst TRIGGER_NAME = 'AlertDialogTrigger';\n\ntype AlertDialogTriggerElement = React.ComponentRef<typeof DialogPrimitive.Trigger>;\ntype DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\ninterface AlertDialogTriggerProps extends DialogTriggerProps {}\n\nconst AlertDialogTrigger = React.forwardRef<AlertDialogTriggerElement, AlertDialogTriggerProps>(\n (props: ScopedProps<AlertDialogTriggerProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Trigger {...dialogScope} {...triggerProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'AlertDialogPortal';\n\ntype DialogPortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;\ninterface AlertDialogPortalProps extends DialogPortalProps {}\n\nconst AlertDialogPortal: React.FC<AlertDialogPortalProps> = (\n props: ScopedProps<AlertDialogPortalProps>\n) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Portal {...dialogScope} {...portalProps} />;\n};\n\nAlertDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'AlertDialogOverlay';\n\ntype AlertDialogOverlayElement = React.ComponentRef<typeof DialogPrimitive.Overlay>;\ntype DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;\ninterface AlertDialogOverlayProps extends DialogOverlayProps {}\n\nconst AlertDialogOverlay = React.forwardRef<AlertDialogOverlayElement, AlertDialogOverlayProps>(\n (props: ScopedProps<AlertDialogOverlayProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Overlay {...dialogScope} {...overlayProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogOverlay.displayName = OVERLAY_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'AlertDialogContent';\n\ntype AlertDialogContentContextValue = {\n cancelRef: React.MutableRefObject<AlertDialogCancelElement | null>;\n};\n\nconst [AlertDialogContentProvider, useAlertDialogContentContext] =\n createAlertDialogContext<AlertDialogContentContextValue>(CONTENT_NAME);\n\ntype AlertDialogContentElement = React.ComponentRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\ninterface AlertDialogContentProps\n extends Omit<DialogContentProps, 'onPointerDownOutside' | 'onInteractOutside'> Line truncated
"mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,0BAA0B;AACnC,SAAS,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O;AACb,IAAMC,WAAU;AAChB,IAAMC,UAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,WAAU;AAChB,IAAM,SAAS;AACf,IAAM,SAAS;AACf,IAAMC,SAAQ;AACd,IAAMC,eAAc;",
"names": ["Root", "Trigger", "Portal", "Overlay", "Content", "Title", "Description"]
}
@@ -0,0 +1 @@
{"version":3,"file":"use-reduced-motion-config.mjs","sources":["../../../../src/utils/reduced-motion/use-reduced-motion-config.ts"],"sourcesContent":["\"use client\"\n\nimport { useContext } from \"react\"\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport { useReducedMotion } from \"./use-reduced-motion\"\n\nexport function useReducedMotionConfig() {\n const reducedMotionPreference = useReducedMotion()\n const { reducedMotion } = useContext(MotionConfigContext)\n\n if (reducedMotion === \"never\") {\n return false\n } else if (reducedMotion === \"always\") {\n return true\n } else {\n return reducedMotionPreference\n }\n}\n"],"names":[],"mappings":";;;;;;AAOI;;AAGA;AACI;;AACG;AACH;;;AAEA;;AAER;;"}
@@ -0,0 +1,20 @@
import semver = require("../index");
import SemVer = require("../classes/semver");
/**
* Compares two versions excluding build identifiers (the bit after `+` in the semantic version string).
*
* Sorts in ascending order when passed to `Array.sort()`.
*
* @return
* - `0` if `v1` == `v2`
* - `1` if `v1` is greater
* - `-1` if `v2` is greater.
*/
declare function compare(
v1: string | SemVer,
v2: string | SemVer,
optionsOrLoose?: boolean | semver.Options,
): 1 | 0 | -1;
export = compare;