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

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

No files matched your search

@@ -0,0 +1,21 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference lib="es2015" />
/// <reference lib="dom" />
/// <reference lib="dom.iterable" />
/// <reference lib="webworker.importscripts" />
/// <reference lib="scripthost" />
@@ -0,0 +1 @@
{"version":3,"file":"strip-trailing-slashes.js","sourceRoot":"","sources":["../../src/strip-trailing-slashes.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC,+CAA+C;AAC/C,6CAA6C;AAC7C,4CAA4C;AACrC,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAE,EAAE;IAClD,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAA;IACtB,IAAI,YAAY,GAAG,CAAC,CAAC,CAAA;IACrB,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACvC,YAAY,GAAG,CAAC,CAAA;QAChB,CAAC,EAAE,CAAA;IACL,CAAC;IACD,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC,CAAA;AAC/D,CAAC,CAAA;AARY,QAAA,oBAAoB,wBAQhC","sourcesContent":["// warning: extremely hot code path.\n// This has been meticulously optimized for use\n// within npm install on large package trees.\n// Do not edit without careful benchmarking.\nexport const stripTrailingSlashes = (str: string) => {\n let i = str.length - 1\n let slashesStart = -1\n while (i > -1 && str.charAt(i) === '/') {\n slashesStart = i\n i--\n }\n return slashesStart === -1 ? str : str.slice(0, slashesStart)\n}\n"]}
@@ -0,0 +1,23 @@
(The MIT License)
Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2016-2017 Douglas Christopher Wilson <doug@somethingdoug.com>
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,125 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "characters", verb: "to have" },
file: { unit: "bytes", verb: "to have" },
array: { unit: "items", verb: "to have" },
set: { unit: "items", verb: "to have" },
map: { unit: "entries", verb: "to have" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "input",
email: "email address",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO datetime",
date: "ISO date",
time: "ISO time",
duration: "ISO duration",
ipv4: "IPv4 address",
ipv6: "IPv6 address",
mac: "MAC address",
cidrv4: "IPv4 range",
cidrv6: "IPv6 range",
base64: "base64-encoded string",
base64url: "base64url-encoded string",
json_string: "JSON string",
e164: "E.164 number",
currency_code: "currency code",
credit_card: "credit card number",
iban: "IBAN",
jwt: "JWT",
template_literal: "input",
};
// type names: missing keys = do not translate (use raw value via ?? fallback)
const TypeDictionary = {
// Compatibility: "nan" -> "NaN" for display
nan: "NaN",
// All other type names omitted - they fall back to raw values via ?? operator
};
function getTypeName(type, input) {
if (type === "number" && typeof input === "number" && !Number.isFinite(input)) {
return String(input);
}
return TypeDictionary[type] ?? type;
}
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = getTypeName(issue.expected);
const receivedType = util.parsedType(issue.input);
const received = getTypeName(receivedType, issue.input);
return `Invalid input: expected ${expected}, received ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;
return `Invalid option: expected one of ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.exact ? "exactly " : issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Too big: expected ${issue.origin ?? "value"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"}`;
return `Too big: expected ${issue.origin ?? "value"} to be ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.exact ? "exactly " : issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `Invalid string: must start with "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `Invalid string: must end with "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Invalid string: must include "${_issue.includes}"`;
if (_issue.format === "regex")
return `Invalid string: must match pattern ${_issue.pattern}`;
return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Invalid number: must be a multiple of ${issue.divisor}`;
case "unrecognized_keys":
return `Unrecognized key${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Invalid key in ${issue.origin}`;
case "invalid_union":
if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {
const opts = issue.options.map((o) => `'${o}'`).join(" | ");
return `Invalid discriminator value. Expected ${opts}`;
}
if (issue.inclusive === false) {
return "Invalid input: more than one option matched";
}
return "Invalid input";
case "invalid_element":
return `Invalid value in ${issue.origin}`;
default:
return `Invalid input`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1 @@
{"version":3,"names":["STATEMENT_OR_BLOCK_KEYS","exports","FLATTENABLE_KEYS","FOR_INIT_KEYS","COMMENT_KEYS","LOGICAL_OPERATORS","UPDATE_OPERATORS","BOOLEAN_NUMBER_BINARY_OPERATORS","EQUALITY_BINARY_OPERATORS","COMPARISON_BINARY_OPERATORS","BOOLEAN_BINARY_OPERATORS","NUMBER_BINARY_OPERATORS","BINARY_OPERATORS","ASSIGNMENT_OPERATORS","map","op","BOOLEAN_UNARY_OPERATORS","NUMBER_UNARY_OPERATORS","STRING_UNARY_OPERATORS","UNARY_OPERATORS","INHERIT_KEYS","optional","force","BLOCK_SCOPED_SYMBOL","Symbol","for","NOT_LOCAL_BINDING"],"sources":["../../src/constants/index.ts"],"sourcesContent":["export const STATEMENT_OR_BLOCK_KEYS = [\"consequent\", \"body\", \"alternate\"];\nexport const FLATTENABLE_KEYS = [\"body\", \"expressions\"];\nexport const FOR_INIT_KEYS = [\"left\", \"init\"];\nexport const COMMENT_KEYS = [\n \"leadingComments\",\n \"trailingComments\",\n \"innerComments\",\n] as const;\n\nexport const LOGICAL_OPERATORS = [\"||\", \"&&\", \"??\"];\nexport const UPDATE_OPERATORS = [\"++\", \"--\"];\n\nexport const BOOLEAN_NUMBER_BINARY_OPERATORS = [\">\", \"<\", \">=\", \"<=\"];\nexport const EQUALITY_BINARY_OPERATORS = [\"==\", \"===\", \"!=\", \"!==\"];\nexport const COMPARISON_BINARY_OPERATORS = [\n ...EQUALITY_BINARY_OPERATORS,\n \"in\",\n \"instanceof\",\n];\nexport const BOOLEAN_BINARY_OPERATORS = [\n ...COMPARISON_BINARY_OPERATORS,\n ...BOOLEAN_NUMBER_BINARY_OPERATORS,\n];\nexport const NUMBER_BINARY_OPERATORS = [\n \"-\",\n \"/\",\n \"%\",\n \"*\",\n \"**\",\n \"&\",\n \"|\",\n \">>\",\n \">>>\",\n \"<<\",\n \"^\",\n];\nexport const BINARY_OPERATORS = [\n \"+\",\n ...NUMBER_BINARY_OPERATORS,\n ...BOOLEAN_BINARY_OPERATORS,\n \"|>\",\n];\n\nexport const ASSIGNMENT_OPERATORS = [\n \"=\",\n \"+=\",\n ...NUMBER_BINARY_OPERATORS.map(op => op + \"=\"),\n ...LOGICAL_OPERATORS.map(op => op + \"=\"),\n];\n\nexport const BOOLEAN_UNARY_OPERATORS = [\"delete\", \"!\"];\nexport const NUMBER_UNARY_OPERATORS = [\"+\", \"-\", \"~\"];\nexport const STRING_UNARY_OPERATORS = [\"typeof\"];\nexport const UNARY_OPERATORS = [\n \"void\",\n \"throw\",\n ...BOOLEAN_UNARY_OPERATORS,\n ...NUMBER_UNARY_OPERATORS,\n ...STRING_UNARY_OPERATORS,\n];\n\nexport const INHERIT_KEYS = {\n optional: [\"typeAnnotation\", \"typeParameters\", \"returnType\"],\n force: [\"start\", \"loc\", \"end\"],\n} as const;\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // eslint-disable-next-line no-restricted-globals\n exports.BLOCK_SCOPED_SYMBOL = Symbol.for(\"var used to be block scoped\");\n // eslint-disable-next-line no-restricted-globals\n exports.NOT_LOCAL_BINDING = Symbol.for(\n \"should not be considered a local binding\",\n );\n}\n"],"mappings":";;;;;;AAAO,MAAMA,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,CAAC;AACnE,MAAME,gBAAgB,GAAAD,OAAA,CAAAC,gBAAA,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC;AAChD,MAAMC,aAAa,GAAAF,OAAA,CAAAE,aAAA,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;AACtC,MAAMC,YAAY,GAAAH,OAAA,CAAAG,YAAA,GAAG,CAC1B,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,CACP;AAEH,MAAMC,iBAAiB,GAAAJ,OAAA,CAAAI,iBAAA,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAC5C,MAAMC,gBAAgB,GAAAL,OAAA,CAAAK,gBAAA,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC;AAErC,MAAMC,+BAA+B,GAAAN,OAAA,CAAAM,+BAAA,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;AAC9D,MAAMC,yBAAyB,GAAAP,OAAA,CAAAO,yBAAA,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;AAC5D,MAAMC,2BAA2B,GAAAR,OAAA,CAAAQ,2BAAA,GAAG,CACzC,GAAGD,yBAAyB,EAC5B,IAAI,EACJ,YAAY,CACb;AACM,MAAME,wBAAwB,GAAAT,OAAA,CAAAS,wBAAA,GAAG,CACtC,GAAGD,2BAA2B,EAC9B,GAAGF,+BAA+B,CACnC;AACM,MAAMI,uBAAuB,GAAAV,OAAA,CAAAU,uBAAA,GAAG,CACrC,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,GAAG,EACH,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,GAAG,CACJ;AACM,MAAMC,gBAAgB,GAAAX,OAAA,CAAAW,gBAAA,GAAG,CAC9B,GAAG,EACH,GAAGD,uBAAuB,EAC1B,GAAGD,wBAAwB,EAC3B,IAAI,CACL;AAEM,MAAMG,oBAAoB,GAAAZ,OAAA,CAAAY,oBAAA,GAAG,CAClC,GAAG,EACH,IAAI,EACJ,GAAGF,uBAAuB,CAACG,GAAG,CAACC,EAAE,IAAIA,EAAE,GAAG,GAAG,CAAC,EAC9C,GAAGV,iBAAiB,CAACS,GAAG,CAACC,EAAE,IAAIA,EAAE,GAAG,GAAG,CAAC,CACzC;AAEM,MAAMC,uBAAuB,GAAAf,OAAA,CAAAe,uBAAA,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC;AAC/C,MAAMC,sBAAsB,GAAAhB,OAAA,CAAAgB,sBAAA,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AAC9C,MAAMC,sBAAsB,GAAAjB,OAAA,CAAAiB,sBAAA,GAAG,CAAC,QAAQ,CAAC;AACzC,MAAMC,eAAe,GAAAlB,OAAA,CAAAkB,eAAA,GAAG,CAC7B,MAAM,EACN,OAAO,EACP,GAAGH,uBAAuB,EAC1B,GAAGC,sBAAsB,EACzB,GAAGC,sBAAsB,CAC1B;AAEM,MAAME,YAAY,GAAAnB,OAAA,CAAAmB,YAAA,GAAG;EAC1BC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,YAAY,CAAC;EAC5DC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK;AAC/B,CAAU;AAIRrB,OAAO,CAACsB,mBAAmB,GAAGC,MAAM,CAACC,GAAG,CAAC,6BAA6B,CAAC;AAEvExB,OAAO,CAACyB,iBAAiB,GAAGF,MAAM,CAACC,GAAG,CACpC,0CACF,CAAC","ignoreList":[]}
@@ -0,0 +1,24 @@
let urlAlphabet =
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
let customAlphabet = (alphabet, defaultSize = 21) => {
return (size = defaultSize) => {
let id = ''
let i = size | 0
while (i-- > 0) {
id += alphabet[(Math.random() * alphabet.length) | 0]
}
return id
}
}
let nanoid = (size = 21) => {
let id = ''
let i = size | 0
while (i-- > 0) {
id += urlAlphabet[(Math.random() * 64) | 0]
}
return id
}
module.exports = { nanoid, customAlphabet }
@@ -0,0 +1,194 @@
//#region src/filter/composable-filters.d.ts
type StringOrRegExp = string | RegExp;
type PluginModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});
type FilterExpressionKind = FilterExpression['kind'];
type FilterExpression = And | Or | Not | Id | ImporterId | ModuleType | Code | Query;
type TopLevelFilterExpression = Include | Exclude;
declare class And {
kind: 'and';
args: FilterExpression[];
constructor(...args: FilterExpression[]);
}
declare class Or {
kind: 'or';
args: FilterExpression[];
constructor(...args: FilterExpression[]);
}
declare class Not {
kind: 'not';
expr: FilterExpression;
constructor(expr: FilterExpression);
}
interface QueryFilterObject {
[key: string]: StringOrRegExp | boolean;
}
interface IdParams {
cleanUrl?: boolean;
}
declare class Id {
kind: 'id';
pattern: StringOrRegExp;
params: IdParams;
constructor(pattern: StringOrRegExp, params?: IdParams);
}
declare class ImporterId {
kind: 'importerId';
pattern: StringOrRegExp;
params: IdParams;
constructor(pattern: StringOrRegExp, params?: IdParams);
}
declare class ModuleType {
kind: 'moduleType';
pattern: PluginModuleType;
constructor(pattern: PluginModuleType);
}
declare class Code {
kind: 'code';
pattern: StringOrRegExp;
constructor(expr: StringOrRegExp);
}
declare class Query {
kind: 'query';
key: string;
pattern: StringOrRegExp | boolean;
constructor(key: string, pattern: StringOrRegExp | boolean);
}
declare class Include {
kind: 'include';
expr: FilterExpression;
constructor(expr: FilterExpression);
}
declare class Exclude {
kind: 'exclude';
expr: FilterExpression;
constructor(expr: FilterExpression);
}
declare function and(...args: FilterExpression[]): And;
declare function or(...args: FilterExpression[]): Or;
declare function not(expr: FilterExpression): Not;
declare function id(pattern: StringOrRegExp, params?: IdParams): Id;
declare function importerId(pattern: StringOrRegExp, params?: IdParams): ImporterId;
declare function moduleType(pattern: PluginModuleType): ModuleType;
declare function code(pattern: StringOrRegExp): Code;
declare function query(key: string, pattern: StringOrRegExp | boolean): Query;
declare function include(expr: FilterExpression): Include;
declare function exclude(expr: FilterExpression): Exclude;
/**
* convert a queryObject to FilterExpression like
* ```js
* and(query(k1, v1), query(k2, v2))
* ```
* @param queryFilterObject The query filter object needs to be matched.
* @returns a `And` FilterExpression
*/
declare function queries(queryFilter: QueryFilterObject): And;
declare function interpreter(exprs: TopLevelFilterExpression | TopLevelFilterExpression[], code?: string, id?: string, moduleType?: PluginModuleType, importerId?: string): boolean;
interface InterpreterCtx {
urlSearchParamsCache?: URLSearchParams;
}
declare function interpreterImpl(expr: TopLevelFilterExpression[], code?: string, id?: string, moduleType?: PluginModuleType, importerId?: string, ctx?: InterpreterCtx): boolean;
declare function exprInterpreter(expr: FilterExpression, code?: string, id?: string, moduleType?: PluginModuleType, importerId?: string, ctx?: InterpreterCtx): boolean;
//#endregion
//#region src/filter/filter-vite-plugins.d.ts
/**
* Filters out Vite plugins that have `apply: 'serve'` set.
*
* Since Rolldown operates in build mode, plugins marked with `apply: 'serve'`
* are intended only for Vite's dev server and should be excluded from the build process.
*
* @param plugins - Array of plugins (can include nested arrays)
* @returns Filtered array with serve-only plugins removed
*
* @example
* ```ts
* import { defineConfig } from 'rolldown';
* import { filterVitePlugins } from '@rolldown/pluginutils';
* import viteReact from '@vitejs/plugin-react';
*
* export default defineConfig({
* plugins: filterVitePlugins([
* viteReact(),
* {
* name: 'dev-only',
* apply: 'serve', // This will be filtered out
* // ...
* }
* ])
* });
* ```
*/
declare function filterVitePlugins<T = any>(plugins: T | T[] | null | undefined | false): T[];
//#endregion
//#region src/filter/simple-filters.d.ts
/**
* Constructs a RegExp that matches the exact string specified.
*
* This is useful for plugin hook filters.
*
* @param str the string to match.
* @param flags flags for the RegExp.
*
* @example
* ```ts
* import { exactRegex } from '@rolldown/pluginutils';
* const plugin = {
* name: 'plugin',
* resolveId: {
* filter: { id: exactRegex('foo') },
* handler(id) {} // will only be called for `foo`
* }
* }
* ```
*/
declare function exactRegex(str: string, flags?: string): RegExp;
/**
* Constructs a RegExp that matches a value that has the specified prefix.
*
* This is useful for plugin hook filters.
*
* @param str the string to match.
* @param flags flags for the RegExp.
*
* @example
* ```ts
* import { prefixRegex } from '@rolldown/pluginutils';
* const plugin = {
* name: 'plugin',
* resolveId: {
* filter: { id: prefixRegex('foo') },
* handler(id) {} // will only be called for IDs starting with `foo`
* }
* }
* ```
*/
declare function prefixRegex(str: string, flags?: string): RegExp;
type WidenString<T> = T extends string ? string : T;
/**
* Converts a id filter to match with an id with a query.
*
* @param input the id filters to convert.
*
* @example
* ```ts
* import { makeIdFiltersToMatchWithQuery } from '@rolldown/pluginutils';
* const plugin = {
* name: 'plugin',
* transform: {
* filter: { id: makeIdFiltersToMatchWithQuery(['**' + '/*.js', /\.ts$/]) },
* // The handler will be called for IDs like:
* // - foo.js
* // - foo.js?foo
* // - foo.txt?foo.js
* // - foo.ts
* // - foo.ts?foo
* // - foo.txt?foo.ts
* handler(code, id) {}
* }
* }
* ```
*/
declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: T): WidenString<T>;
declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: readonly T[]): WidenString<T>[];
declare function makeIdFiltersToMatchWithQuery(input: string | RegExp | readonly (string | RegExp)[]): string | RegExp | (string | RegExp)[];
//#endregion
export { FilterExpression, FilterExpressionKind, QueryFilterObject, TopLevelFilterExpression, and, code, exactRegex, exclude, exprInterpreter, filterVitePlugins, id, importerId, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query };
@@ -0,0 +1 @@
{"version":3,"file":"get-value-transition.mjs","sources":["../../../../src/animation/utils/get-value-transition.ts"],"sourcesContent":["import { resolveTransition } from \"./resolve-transition\"\n\nexport function getValueTransition(transition: any, key: string) {\n const valueTransition =\n transition?.[key as keyof typeof transition] ??\n transition?.[\"default\"] ??\n transition\n\n if (valueTransition !== transition) {\n return resolveTransition(valueTransition, transition)\n }\n\n return valueTransition\n}\n"],"names":[],"mappings":";;AAEM,SAAU,kBAAkB,CAAC,UAAe,EAAE,GAAW,EAAA;AAC3D,IAAA,MAAM,eAAe,GACjB,UAAU,GAAG,GAA8B,CAAC;QAC5C,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,UAAU;AAEd,IAAA,IAAI,eAAe,KAAK,UAAU,EAAE;AAChC,QAAA,OAAO,iBAAiB,CAAC,eAAe,EAAE,UAAU,CAAC;IACzD;AAEA,IAAA,OAAO,eAAe;AAC1B;;;;"}
@@ -0,0 +1,17 @@
import type {Vocabulary} from "../types"
export const metadataVocabulary: Vocabulary = [
"title",
"description",
"default",
"deprecated",
"readOnly",
"writeOnly",
"examples",
]
export const contentVocabulary: Vocabulary = [
"contentMediaType",
"contentEncoding",
"contentSchema",
]
@@ -0,0 +1,39 @@
"use client";
import { cancelFrame, frame } from 'motion-dom';
import { useIsomorphicLayoutEffect } from '../utils/use-isomorphic-effect.mjs';
import { useMotionValue } from './use-motion-value.mjs';
function useCombineMotionValues(values, combineValues) {
/**
* Initialise the returned motion value. This remains the same between renders.
*/
const value = useMotionValue(combineValues());
/**
* Create a function that will update the template motion value with the latest values.
* This is pre-bound so whenever a motion value updates it can schedule its
* execution in Framesync. If it's already been scheduled it won't be fired twice
* in a single frame.
*/
const updateValue = () => value.set(combineValues());
/**
* Synchronously update the motion value with the latest values during the render.
* This ensures that within a React render, the styles applied to the DOM are up-to-date.
*/
updateValue();
/**
* Subscribe to all motion values found within the template. Whenever any of them change,
* schedule an update.
*/
useIsomorphicLayoutEffect(() => {
const scheduleUpdate = () => frame.preRender(updateValue, false, true);
const subscriptions = values.map((v) => v.on("change", scheduleUpdate));
return () => {
subscriptions.forEach((unsubscribe) => unsubscribe());
cancelFrame(updateValue);
};
});
return value;
}
export { useCombineMotionValues };
//# sourceMappingURL=use-combine-values.mjs.map
@@ -0,0 +1,176 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const index_js_1 = require("../../client/index.js");
const streamableHttp_js_1 = require("../../client/streamableHttp.js");
const types_js_1 = require("../../types.js");
/**
* Parallel Tool Calls MCP Client
*
* This client demonstrates how to:
* 1. Start multiple tool calls in parallel
* 2. Track notifications from each tool call using a caller parameter
*/
// Command line args processing
const args = process.argv.slice(2);
const serverUrl = args[0] || 'http://localhost:3000/mcp';
async function main() {
console.log('MCP Parallel Tool Calls Client');
console.log('==============================');
console.log(`Connecting to server at: ${serverUrl}`);
let client;
let transport;
try {
// Create client with streamable HTTP transport
client = new index_js_1.Client({
name: 'parallel-tool-calls-client',
version: '1.0.0'
});
client.onerror = error => {
console.error('Client error:', error);
};
// Connect to the server
transport = new streamableHttp_js_1.StreamableHTTPClientTransport(new URL(serverUrl));
await client.connect(transport);
console.log('Successfully connected to MCP server');
// Set up notification handler with caller identification
client.setNotificationHandler(types_js_1.LoggingMessageNotificationSchema, notification => {
console.log(`Notification: ${notification.params.data}`);
});
console.log('List tools');
const toolsRequest = await listTools(client);
console.log('Tools: ', toolsRequest);
// 2. Start multiple notification tools in parallel
console.log('\n=== Starting Multiple Notification Streams in Parallel ===');
const toolResults = await startParallelNotificationTools(client);
// Log the results from each tool call
for (const [caller, result] of Object.entries(toolResults)) {
console.log(`\n=== Tool result for ${caller} ===`);
result.content.forEach((item) => {
if (item.type === 'text') {
console.log(` ${item.text}`);
}
else {
console.log(` ${item.type} content:`, item);
}
});
}
// 3. Wait for all notifications (10 seconds)
console.log('\n=== Waiting for all notifications ===');
await new Promise(resolve => setTimeout(resolve, 10000));
// 4. Disconnect
console.log('\n=== Disconnecting ===');
await transport.close();
console.log('Disconnected from MCP server');
}
catch (error) {
console.error('Error running client:', error);
process.exit(1);
}
}
/**
* List available tools on the server
*/
async function listTools(client) {
try {
const toolsRequest = {
method: 'tools/list',
params: {}
};
const toolsResult = await client.request(toolsRequest, types_js_1.ListToolsResultSchema);
console.log('Available tools:');
if (toolsResult.tools.length === 0) {
console.log(' No tools available');
}
else {
for (const tool of toolsResult.tools) {
console.log(` - ${tool.name}: ${tool.description}`);
}
}
}
catch (error) {
console.log(`Tools not supported by this server: ${error}`);
}
}
/**
* Start multiple notification tools in parallel with different configurations
* Each tool call includes a caller parameter to identify its notifications
*/
async function startParallelNotificationTools(client) {
try {
// Define multiple tool calls with different configurations
const toolCalls = [
{
caller: 'fast-notifier',
request: {
method: 'tools/call',
params: {
name: 'start-notification-stream',
arguments: {
interval: 2, // 0.5 second between notifications
count: 10, // Send 10 notifications
caller: 'fast-notifier' // Identify this tool call
}
}
}
},
{
caller: 'slow-notifier',
request: {
method: 'tools/call',
params: {
name: 'start-notification-stream',
arguments: {
interval: 5, // 2 seconds between notifications
count: 5, // Send 5 notifications
caller: 'slow-notifier' // Identify this tool call
}
}
}
},
{
caller: 'burst-notifier',
request: {
method: 'tools/call',
params: {
name: 'start-notification-stream',
arguments: {
interval: 1, // 0.1 second between notifications
count: 3, // Send just 3 notifications
caller: 'burst-notifier' // Identify this tool call
}
}
}
}
];
console.log(`Starting ${toolCalls.length} notification tools in parallel...`);
// Start all tool calls in parallel
const toolPromises = toolCalls.map(({ caller, request }) => {
console.log(`Starting tool call for ${caller}...`);
return client
.request(request, types_js_1.CallToolResultSchema)
.then(result => ({ caller, result }))
.catch(error => {
console.error(`Error in tool call for ${caller}:`, error);
throw error;
});
});
// Wait for all tool calls to complete
const results = await Promise.all(toolPromises);
// Organize results by caller
const resultsByTool = {};
results.forEach(({ caller, result }) => {
resultsByTool[caller] = result;
});
return resultsByTool;
}
catch (error) {
console.error(`Error starting parallel notification tools:`, error);
throw error;
}
}
// Start the client
main().catch((error) => {
console.error('Error running MCP client:', error);
process.exit(1);
});
//# sourceMappingURL=parallelToolCallsClient.js.map
@@ -0,0 +1 @@
{"version":3,"file":"washing-machine.js","sources":["../../../src/icons/washing-machine.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name WashingMachine\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA2aDMiIC8+CiAgPHBhdGggZD0iTTE3IDZoLjAxIiAvPgogIDxyZWN0IHdpZHRoPSIxOCIgaGVpZ2h0PSIyMCIgeD0iMyIgeT0iMiIgcng9IjIiIC8+CiAgPGNpcmNsZSBjeD0iMTIiIGN5PSIxMyIgcj0iNSIgLz4KICA8cGF0aCBkPSJNMTIgMThhMi41IDIuNSAwIDAgMCAwLTUgMi41IDIuNSAwIDAgMSAwLTUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/washing-machine\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 WashingMachine = createLucideIcon('WashingMachine', [\n ['path', { d: 'M3 6h3', key: '155dbl' }],\n ['path', { d: 'M17 6h.01', key: 'e2y6kg' }],\n ['rect', { width: '18', height: '20', x: '3', y: '2', rx: '2', key: 'od3kk9' }],\n ['circle', { cx: '12', cy: '13', r: '5', key: 'nlbqau' }],\n ['path', { d: 'M12 18a2.5 2.5 0 0 0 0-5 2.5 2.5 0 0 1 0-5', key: '17lach' }],\n]);\n\nexport default WashingMachine;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC9E,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC7E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,20 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Trophy = createLucideIcon("Trophy", [
["path", { d: "M6 9H4.5a2.5 2.5 0 0 1 0-5H6", key: "17hqa7" }],
["path", { d: "M18 9h1.5a2.5 2.5 0 0 0 0-5H18", key: "lmptdp" }],
["path", { d: "M4 22h16", key: "57wxv0" }],
["path", { d: "M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22", key: "1nw9bq" }],
["path", { d: "M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22", key: "1np0yb" }],
["path", { d: "M18 2H6v7a6 6 0 0 0 12 0V2Z", key: "u46fv3" }]
]);
export { Trophy as default };
//# sourceMappingURL=trophy.js.map
@@ -0,0 +1,6 @@
export { RouterServer } from './RouterServer.js';
export { defaultRenderHandler } from './defaultRenderHandler.js';
export { defaultStreamHandler } from './defaultStreamHandler.js';
export { renderRouterToStream } from './renderRouterToStream.js';
export { renderRouterToString } from './renderRouterToString.js';
export * from '@tanstack/router-core/ssr/server';
@@ -0,0 +1,956 @@
(function(global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.DateManip = {}));
})(this, function(exports2) {
"use strict";
const MS_IN_SECOND = 1e3;
const MS_IN_MINUTE = 6e4;
const MS_IN_HOUR = 36e5;
const MS_IN_DAY = 864e5;
const rangeOfUnits = [
"time",
"year",
"month",
"date",
"day",
"hour",
"minute",
"second",
"millisecond",
"utcOffset"
];
function addMilliseconds(date, ms) {
date.setTime(+date + ms);
return date;
}
function addDays(date, days) {
return addMilliseconds(date, days * MS_IN_DAY);
}
function addHours(date, hours) {
return addMilliseconds(date, hours * MS_IN_HOUR);
}
function addMinutes(date, minutes) {
return addMilliseconds(date, minutes * MS_IN_MINUTE);
}
function isLeapYear$1(year) {
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
}
const arr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
const arr2 = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function daysOfYear(year) {
return isLeapYear$1(year) ? arr2 : arr;
}
function daysInMonth(date) {
return daysOfYear(date.getFullYear())[date.getMonth()];
}
function addMonths(date, months) {
const expectedMonth = date.getMonth() + months;
const tempMaxDay = daysInMonth(new Date(date.getFullYear(), expectedMonth, 1, 0, 0, 0, 0));
const currentDay = date.getDate();
date.setMonth(expectedMonth, currentDay > tempMaxDay ? tempMaxDay : currentDay);
return date;
}
function addSeconds(date, seconds) {
return addMilliseconds(date, seconds * MS_IN_SECOND);
}
function addYears(date, years) {
return addMonths(date, years * 12);
}
const units = rangeOfUnits.reduce((acc, unit) => {
acc[unit.toUpperCase()] = unit;
return acc;
}, {});
const { DATE: DATE$5, DAY: DAY$6, HOUR: HOUR$7, MILLISECOND: MILLISECOND$3, MINUTE: MINUTE$7, MONTH: MONTH$7, SECOND: SECOND$7, TIME: TIME$1, YEAR: YEAR$7 } = units;
const compatUnits = {};
function mapUnit(key, ...args) {
for (let i = 0; i < arguments.length; i++) {
compatUnits[arguments[i]] = key;
}
}
mapUnit(YEAR$7, "Y", "y", "years");
mapUnit(MONTH$7, "M", "months");
mapUnit(DATE$5, "D", "dates");
mapUnit(DAY$6, "d", "days");
mapUnit(HOUR$7, "h", "hours");
mapUnit(MINUTE$7, "m", "minutes");
mapUnit(SECOND$7, "s", "seconds");
mapUnit(MILLISECOND$3, "ms", "milliseconds");
mapUnit(TIME$1, "t");
function normalizeUnit(u) {
return compatUnits[u];
}
const { DAY: DAY$1$1, HOUR: HOUR$1$1, MINUTE: MINUTE$1$1, MONTH: MONTH$1$1, SECOND: SECOND$1$1, YEAR: YEAR$1$1 } = units;
function addNumber(date, num, unit) {
unit = normalizeUnit(unit);
switch (unit) {
case YEAR$1$1:
return addYears(date, num);
case MONTH$1$1:
return addMonths(date, num);
case DAY$1$1:
return addDays(date, num);
case HOUR$1$1:
return addHours(date, num);
case MINUTE$1$1:
return addMinutes(date, num);
case SECOND$1$1:
return addSeconds(date, num);
default:
return addMilliseconds(date, num);
}
}
const { DAY: DAY$5, HOUR: HOUR$6, MINUTE: MINUTE$6, MONTH: MONTH$6, SECOND: SECOND$6, YEAR: YEAR$6 } = units;
function addObject(date, obj, times) {
let time = 0;
let expectedMonth = 0;
let expectedDay = 0;
Object.entries(obj).forEach(([unit, num]) => {
unit = normalizeUnit(unit);
num *= times;
switch (unit) {
case YEAR$6:
expectedMonth += num * 12;
return;
case MONTH$6:
expectedMonth += date.getMonth() + num;
return;
case DAY$5:
expectedDay = num;
return;
case HOUR$6:
num *= MS_IN_HOUR;
break;
case MINUTE$6:
num *= MS_IN_MINUTE;
break;
case SECOND$6:
num *= MS_IN_SECOND;
break;
}
time += num;
});
if (expectedMonth) {
const tempMaxDay = daysInMonth(new Date(date.getFullYear(), expectedMonth, 1, 0, 0, 0, 0));
const currentDay = date.getDate();
date.setMonth(expectedMonth, (currentDay > tempMaxDay ? tempMaxDay : currentDay) + expectedDay);
}
return addMilliseconds(date, time);
}
function add(date, num, unit) {
return typeof num === "object" && num !== null ? addObject(date, num, 1) : addNumber(date, num, unit);
}
const { YEAR: YEAR$5, MONTH: MONTH$5, DATE: DATE$4, HOUR: HOUR$5, MINUTE: MINUTE$5, SECOND: SECOND$5, MILLISECOND: MILLISECOND$2, UTC_OFFSET: UTC_OFFSET$1 } = units;
function escapeRegex(str) {
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
const TOKEN_MAP = {
YYYY: { pattern: "(\\d{1,4})", key: YEAR$5 },
// 年份
// YY: { pattern: '(\\d{1,2})', key: YEAR }, // 年份
MM: { pattern: "(\\d{1,2})", key: MONTH$5 },
// 月份
DD: { pattern: "(\\d{1,2})", key: DATE$4 },
// 日期
HH: { pattern: "(\\d{1,2})", key: HOUR$5 },
// 小时
mm: { pattern: "(\\d{1,2})", key: MINUTE$5 },
// 分钟
ss: { pattern: "(\\d{1,2})", key: SECOND$5 },
// 秒
SSS: { pattern: "(\\d{1,3})", key: MILLISECOND$2 },
// 毫秒
Z: { pattern: "(Z|[+-]\\d{2}(?::?\\d{2})?)", key: UTC_OFFSET$1 }
// 时区
};
const TOKEN_KEYS = Object.keys(TOKEN_MAP).sort((a, b) => b.length - a.length);
const TOKEN_PATTERN = new RegExp(`(${TOKEN_KEYS.join("|")})`, "g");
function compile(formatString) {
const matchedTokens = [];
const pattern2 = escapeRegex(formatString).replace(TOKEN_PATTERN, (m) => {
matchedTokens.push(m);
return TOKEN_MAP[m].pattern;
});
return { pattern: pattern2, tokens: matchedTokens };
}
function dayOfYear(date, val) {
const monthDays = daysOfYear(date.getFullYear());
const currentMonth = date.getMonth();
let dayCount = date.getDate();
for (let i = 0; i < currentMonth; i++) {
dayCount += monthDays[i];
}
if (val === void 0) {
return dayCount;
}
date.setTime(+date + (val - dayCount) * MS_IN_DAY);
return date;
}
function absFloor(v) {
return v < 0 ? Math.ceil(v) || 0 : Math.floor(v);
}
const BASIC_ISO_REGEX = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
const EXTENDED_ISO_REGEX = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
const ISO_TIMES_REGEX = [
/(\d\d):(\d\d):(\d\d)\.(\d+)/,
// 'HH:mm:ss.SSSS'
/(\d\d):(\d\d):(\d\d),(\d+)/,
// 'HH:mm:ss,SSSS'
/(\d\d):(\d\d):(\d\d)/,
// 'HH:mm:ss'
/(\d\d):(\d\d)/,
// 'HH:mm'
/(\d\d)(\d\d)(\d\d)\.(\d+)/,
// 'HHmmss.SSSS'
/(\d\d)(\d\d)(\d\d),(\d+)/,
// 'HHmmss,SSSS'
/(\d\d)(\d\d)(\d\d)/,
// 'HHmmss'
/(\d\d)(\d\d)/,
// 'HHmm'
/(\d\d)/
// 'HH'
];
const TZ_REGEX = /(Z)|([+-]\d\d)(?::?(\d\d))?/;
const ISO_DATES_REGEX = [
/(\d{4})-(\d\d)-(\d\d)/,
// 'YYYY-MM-DD'
/(\d{4})-(\d\d)/,
// 'YYYY-MM'
/(\d{4})(\d\d)(\d\d)/,
// 'YYYYMMDD'
/(\d{4})(\d\d)/,
// 'YYYYMM'
/(\d{4})/
// 'YYYY'
];
function autoExtract(input) {
const dateRet = new Array(8);
let matches;
const match = EXTENDED_ISO_REGEX.exec(input) || BASIC_ISO_REGEX.exec(input);
if (match) {
const datesLen = ISO_DATES_REGEX.length;
for (let i = 0; i < datesLen; i++) {
if (matches = ISO_DATES_REGEX[i].exec(match[1])) {
for (let j = 0; j < 3; j++) {
const matched = matches[j + 1];
dateRet[j] = matched ? +matched : 1;
}
if (dateRet[1]) {
dateRet[1] -= 1;
}
break;
}
}
matches = null;
if (match[3]) {
for (let i = 0, timesLen = ISO_TIMES_REGEX.length; i < timesLen; i++) {
if (matches = ISO_TIMES_REGEX[i].exec(match[3])) {
if (matches[4]) {
matches[4] = matches[4].padEnd(3, "00");
}
for (let j = 1, len = matches.length; j < len; j++) {
dateRet[j + 2] = +matches[j];
}
break;
}
}
}
matches = null;
if (match[4]) {
matches = TZ_REGEX.exec(match[4]);
if (matches) {
dateRet[7] = matches[1] ? NaN : +matches[2] * 60 + (matches[3] ? +matches[3] : 0);
}
}
return dateRet;
}
return input;
}
function createDate(y, m, d, h, minute, s, ms) {
let date;
if (y < 100 && y >= 0) {
date = new Date(y + 400, m, d, h, minute, s, ms);
if (isFinite(date.getFullYear())) {
date.setFullYear(y);
}
} else {
date = new Date(y, m, d, h, minute, s, ms);
}
return date;
}
function createUTCDate(y, m, d, h, minute, s, ms) {
let date;
if (y < 100 && y >= 0) {
y += 400;
date = new Date(Date.UTC(y, m, d, h, minute, s, ms));
if (isFinite(date.getUTCFullYear())) {
date.setUTCFullYear(y);
}
} else {
date = new Date(Date.UTC(y, m, d, h, minute, s, ms));
}
return date;
}
function createFromArray(input) {
const utcOffset = input[7];
const currentDate = /* @__PURE__ */ new Date();
const isUTC = Number.isNaN(utcOffset);
const flag = isUTC ? "UTC" : "";
const currentStuffing = [
currentDate[`get${flag}FullYear`](),
currentDate[`get${flag}Month`](),
currentDate[`get${flag}Date`]()
];
let i = 0;
const array = new Array(7);
for (; i < 3 && input[i] == null; ++i) {
array[i] = currentStuffing[i];
}
for (; i < 7; i++) {
array[i] = input[i] == null ? 0 : input[i];
}
let day = array[2];
if (day === 0) {
day = 1;
}
let minute = array[4];
if (!isUTC && typeof utcOffset === "number") {
minute -= utcOffset + currentDate.getTimezoneOffset();
}
return (isUTC ? createUTCDate : createDate)(
array[0],
array[1],
day,
array[3],
minute,
array[5],
array[6]
);
}
function toInteger(val) {
return parseInt(val, 10);
}
function toMonth(val) {
return parseInt(val, 10) - 1;
}
function toMilliseconds(val) {
return parseInt(val.padEnd(3, "0"), 10);
}
function parseTimezone(val) {
if (val === "Z") {
return NaN;
}
const matches = TZ_REGEX.exec(val);
return +matches[2] * 60 + (matches[3] ? +matches[3] : 0);
}
function extractWithFormat(input, format2) {
const { pattern: pattern2, tokens: tokens2 } = compile(format2);
const match = new RegExp(pattern2).exec(input);
if (!match) {
return "";
}
const parts = [];
tokens2.forEach((token, i) => {
const value = match[i + 1];
switch (token) {
case "YYYY":
parts[0] = toInteger(value);
break;
// case 'YY':
// parts[0] = toInteger(value);
// break;
case "MM":
parts[1] = toMonth(value);
break;
case "DD":
parts[2] = toInteger(value);
break;
case "HH":
parts[3] = toInteger(value);
break;
case "mm":
parts[4] = toInteger(value);
break;
case "ss":
parts[5] = toInteger(value);
break;
case "SSS":
parts[6] = toMilliseconds(value);
break;
case "Z":
parts[7] = parseTimezone(value);
break;
}
});
return parts;
}
const { DATE: DATE$3, DAY: DAY$4, HOUR: HOUR$4, MILLISECOND: MILLISECOND$1, MINUTE: MINUTE$4, MONTH: MONTH$4, SECOND: SECOND$4, YEAR: YEAR$4, UTC_OFFSET } = units;
const ASP_NET_JSON_REGEX = /^\/?Date\((-?\d+)/i;
function ensureType(value, checked) {
return checked;
}
function parseObject(obj) {
const array = [];
Object.entries(obj).forEach(([unit, value]) => {
unit = normalizeUnit(unit);
switch (unit) {
case YEAR$4:
array[0] = value;
break;
case MONTH$4:
array[1] = value;
break;
case DATE$3:
case DAY$4:
array[2] = value;
break;
case HOUR$4:
array[3] = value;
break;
case MINUTE$4:
array[4] = value;
break;
case SECOND$4:
array[5] = value;
break;
case MILLISECOND$1:
array[6] = value;
break;
case UTC_OFFSET:
array[7] = value;
break;
}
});
if (array.length === 0) {
return /* @__PURE__ */ new Date();
}
return createFromArray(array);
}
function parseString(input, format2) {
const extracted = typeof format2 === "string" && format2 ? extractWithFormat(input, format2) : autoExtract(input);
if (Array.isArray(extracted)) {
return createFromArray(extracted);
}
const matched = ASP_NET_JSON_REGEX.exec(input);
return new Date(matched !== null ? +matched[1] : Date.parse(extracted));
}
function parse$1(input, format2) {
let ret;
const whatType = typeof input;
if (ensureType(input, whatType === "string")) {
ret = parseString(input, format2);
} else if (Array.isArray(input)) {
ret = createFromArray(input);
} else if (input instanceof Date) {
ret = new Date(input);
} else if (ensureType(input, whatType === "object" && input !== null)) {
if (input.isValid && input.isValid()) {
ret = /* @__PURE__ */ new Date(+input);
} else {
ret = parseObject(input);
}
} else if (ensureType(input, whatType === "number")) {
ret = new Date(input);
} else if (ensureType(input, whatType === "undefined")) {
ret = format2 ? /* @__PURE__ */ new Date(NaN) : /* @__PURE__ */ new Date();
} else {
ret = new Date(Date.parse(input));
}
return ret;
}
function diffInDays(date, input, asFloat) {
const parsed = parse$1(input);
const output = (+date - +parsed) / MS_IN_DAY;
return asFloat ? output : absFloor(output);
}
function diffInHours(date, input, asFloat) {
const parsed = parse$1(input);
const output = (+date - +parsed) / MS_IN_HOUR;
return asFloat ? output : absFloor(output);
}
function diffInMilliseconds(date, input, asFloat) {
const parsed = parse$1(input);
const output = +date - +parsed;
return asFloat ? output : absFloor(output);
}
function diffInMinutes(date, input, asFloat) {
const parsed = parse$1(input);
const output = (+date - +parsed) / MS_IN_MINUTE;
return asFloat ? output : absFloor(output);
}
function monthDiff(a, b) {
const aTime = +a;
const bTime = +b;
if (aTime < bTime) {
return -monthDiff(b, a);
}
const wholeMonthDiff = (b.getFullYear() - a.getFullYear()) * 12 + (b.getMonth() - a.getMonth());
const anchor = +addMonths(new Date(aTime), wholeMonthDiff);
let anchor2;
let adjust;
if (bTime < anchor) {
anchor2 = +addMonths(new Date(aTime), wholeMonthDiff - 1);
adjust = (bTime - anchor) / (anchor - anchor2);
} else {
anchor2 = +addMonths(new Date(aTime), wholeMonthDiff + 1);
adjust = (bTime - anchor) / (anchor2 - anchor);
}
return -(wholeMonthDiff + adjust) || 0;
}
function diffInMonths(date, input, asFloat) {
const parsed = parse$1(input);
const output = monthDiff(date, parsed);
return asFloat ? output : absFloor(output);
}
function diffInSeconds(date, input, asFloat) {
const parsed = parse$1(input);
const output = (+date - +parsed) / MS_IN_SECOND;
return asFloat ? output : absFloor(output);
}
function diffInYears(date, input, asFloat) {
const parsed = parse$1(input);
const output = monthDiff(date, parsed) / 12;
return asFloat ? output : absFloor(output);
}
const {
DAY: DAY$3,
HOUR: HOUR$3,
MINUTE: MINUTE$3,
MONTH: MONTH$3,
SECOND: SECOND$3,
YEAR: YEAR$3
} = units;
function diff(date, input, unit, asFloat) {
unit = normalizeUnit(unit);
switch (unit) {
case YEAR$3:
return diffInYears(date, input, asFloat);
case MONTH$3:
return diffInMonths(date, input, asFloat);
// case DATE:
case DAY$3:
return diffInDays(date, input, asFloat);
case HOUR$3:
return diffInHours(date, input, asFloat);
case MINUTE$3:
return diffInMinutes(date, input, asFloat);
case SECOND$3:
return diffInSeconds(date, input, asFloat);
default:
return diffInMilliseconds(date, input, asFloat);
}
}
function startOfDate(date, y, m, d) {
return +new Date(
y || date.getFullYear(),
m == null ? date.getMonth() : m,
d || date.getDate()
);
}
function startOfTime(date, ms) {
const input = +date;
return input - input % ms;
}
const { DATE: DATE$2, DAY: DAY$2, HOUR: HOUR$2, MINUTE: MINUTE$2, MONTH: MONTH$2, SECOND: SECOND$2, YEAR: YEAR$2 } = units;
function endOf(date, unit) {
unit = normalizeUnit(unit);
let time = 0;
switch (unit) {
case YEAR$2:
time = startOfDate(date, date.getFullYear() + 1, 0, 1) - 1;
break;
case MONTH$2:
time = startOfDate(date, void 0, date.getMonth() + 1, 1) - 1;
break;
case DATE$2:
case DAY$2:
time = startOfDate(date) + MS_IN_DAY - 1;
break;
case HOUR$2:
time = startOfTime(date, MS_IN_HOUR) + MS_IN_HOUR - 1;
break;
case MINUTE$2:
time = startOfTime(date, MS_IN_MINUTE) + MS_IN_MINUTE - 1;
break;
case SECOND$2:
time = startOfTime(date, MS_IN_SECOND) + MS_IN_SECOND - 1;
break;
}
time && date.setTime(time);
return date;
}
function padLeft(val, len) {
return String(val).padStart(len || 2, "0");
}
function dateTimeFormat(date, opts) {
return new Intl.DateTimeFormat("en-US", opts).format(date);
}
function getOrdinalSuffix(day) {
if (day > 3 && day < 21) {
return "th";
}
switch (day % 10) {
case 1:
return "st";
case 2:
return "nd";
case 3:
return "rd";
default:
return "th";
}
}
function timezone(date, together) {
let offset = date.getTimezoneOffset();
let prefix;
if (offset <= 0) {
prefix = "+";
offset = Math.abs(offset);
} else {
prefix = "-";
}
return `${prefix}${padLeft(Math.floor(offset / 60))}${together ? "" : ":"}${padLeft(Math.floor(offset % 60))}`;
}
const FORMAT_MAP = {
// 年份
yyyy: (d) => d.getFullYear(),
YYYY: (d) => d.getFullYear(),
YY: (d) => padLeft(d.getFullYear() % 100),
// 月份
MMMM: (d) => dateTimeFormat(d, { month: "long" }),
MMM: (d) => dateTimeFormat(d, { month: "short" }),
MM: (d) => padLeft(d.getMonth() + 1),
M: (d) => d.getMonth() + 1,
// 日期
DD: (d) => padLeft(d.getDate()),
D: (d) => d.getDate(),
Do: (d) => {
const day = d.getDate();
return String(day) + getOrdinalSuffix(day);
},
// 星期
dddd: (d) => dateTimeFormat(d, { weekday: "long" }),
ddd: (d) => dateTimeFormat(d, { weekday: "short" }),
dd: (d) => dateTimeFormat(d, { weekday: "narrow" }),
// 时间
HH: (d) => padLeft(d.getHours()),
H: (d) => d.getHours(),
hh: (d) => padLeft(d.getHours() % 12 || 12),
h: (d) => d.getHours() % 12 || 12,
mm: (d) => padLeft(d.getMinutes()),
m: (d) => d.getMinutes(),
ss: (d) => padLeft(d.getSeconds()),
s: (d) => d.getSeconds(),
SSS: (d) => padLeft(d.getMilliseconds(), 3),
// 其他
A: (d) => d.getHours() >= 12 ? "PM" : "AM",
a: (d) => d.getHours() >= 12 ? "pm" : "am",
Z: (d) => timezone(d),
ZZ: (d) => timezone(d, true)
};
const tokens = Object.keys(FORMAT_MAP).sort((a, b) => b.length - a.length).join("|");
const pattern = new RegExp(
`${tokens}|\\[([^\\]]*)]`,
"g"
);
function format(date, formatString) {
if (!formatString || formatString === "ISO") {
return date.toISOString();
}
return formatString.replace(pattern, (match, escapeContent) => {
if (escapeContent) {
return escapeContent;
}
const formatter = FORMAT_MAP[match];
return formatter ? formatter(date) : match;
});
}
const { DATE: DATE$1, DAY: DAY$1, HOUR: HOUR$1, MILLISECOND, MINUTE: MINUTE$1, MONTH: MONTH$1, SECOND: SECOND$1, TIME, YEAR: YEAR$1 } = units;
const mapping = {
[YEAR$1]: "FullYear",
[MONTH$1]: "Month",
[DATE$1]: "Date",
[DAY$1]: "Day",
[HOUR$1]: "Hours",
[MINUTE$1]: "Minutes",
[SECOND$1]: "Seconds",
[MILLISECOND]: "Milliseconds",
[TIME]: "Time"
};
const setting = {};
const getting = {};
Object.entries(mapping).forEach(([key, method]) => {
if (key === DAY$1) {
setting[key] = function(date, val) {
const day = date.getDay();
if (val !== day) {
date.setTime(+date + (val - day) * MS_IN_DAY);
}
};
} else {
setting[key] = function(date, val) {
date[`set${method}`](val);
};
}
getting[key] = function(date) {
return date[`get${method}`]();
};
});
function get$1(date, unit) {
const fn = getting[normalizeUnit(unit)];
return fn ? fn(date) : 0;
}
function set$1(date, unit, val) {
const fn = setting[normalizeUnit(unit)];
fn && fn(date, val);
return date;
}
const { DATE, DAY, HOUR, MINUTE, MONTH, SECOND, YEAR } = units;
function startOf(date, unit) {
unit = normalizeUnit(unit);
let time = 0;
switch (unit) {
case YEAR:
time = startOfDate(date, void 0, 0, 1);
break;
case MONTH:
time = startOfDate(date, void 0, void 0, 1);
break;
case DATE:
case DAY:
time = startOfDate(date);
break;
case HOUR:
time = startOfTime(date, MS_IN_HOUR);
break;
case MINUTE:
time = startOfTime(date, MS_IN_MINUTE);
break;
case SECOND:
time = startOfTime(date, MS_IN_SECOND);
break;
}
time && date.setTime(time);
return date;
}
function isAfter(date, input, unit) {
unit = normalizeUnit(unit);
const inputMs = +parse$1(input);
if (!unit) {
return +date > inputMs;
}
return +startOf(new Date(date), unit) > inputMs;
}
function isBefore(date, input, unit) {
unit = normalizeUnit(unit);
const inputMs = +parse$1(input);
if (!unit) {
return +date < inputMs;
}
return +endOf(new Date(date), unit) < inputMs;
}
function isBetween(date, from, to, unit, inclusivity) {
inclusivity = inclusivity || "()";
return (inclusivity.startsWith("(") ? isAfter(date, from, unit) : !isBefore(date, from, unit)) && (inclusivity.charAt(1) === ")" ? isBefore(date, to, unit) : !isAfter(date, to, unit));
}
function isLeapYear(date) {
return isLeapYear$1(date.getFullYear());
}
function isSame(date, input, unit) {
unit = normalizeUnit(unit);
const inputMs = +parse$1(input);
if (!unit) {
return +date === inputMs;
}
return +startOf(new Date(date), unit) <= inputMs && inputMs <= +endOf(new Date(date), unit);
}
function isSameOrAfter(date, input, unit) {
return !isBefore(date, input, unit);
}
function isSameOrBefore(date, input, unit) {
return !isAfter(date, input, unit);
}
function isValid(date) {
return date.toString() !== "Invalid Date";
}
function subDays(date, days) {
return addDays(date, -days);
}
function subHours(date, hours) {
return addHours(date, -hours);
}
function subMilliseconds(date, ms) {
return addMilliseconds(date, -ms);
}
function subMinutes(date, minutes) {
return addMinutes(date, -minutes);
}
function subMonths(date, months) {
return addMonths(date, -months);
}
function subSeconds(date, seconds) {
return addSeconds(date, -seconds);
}
function subYears(date, years) {
return addMonths(date, -years * 12);
}
function subtract(date, num, unit) {
return typeof num === "object" && num !== null ? addObject(date, num, -1) : addNumber(date, -num, unit);
}
const fns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
add,
addDays,
addHours,
addMilliseconds,
addMinutes,
addMonths,
addSeconds,
addYears,
compile,
dayOfYear,
daysInMonth,
diff,
diffInDays,
diffInHours,
diffInMilliseconds,
diffInMinutes,
diffInMonths,
diffInSeconds,
diffInYears,
endOf,
format,
get: get$1,
isAfter,
isBefore,
isBetween,
isLeapYear,
isSame,
isSameOrAfter,
isSameOrBefore,
isValid,
parse: parse$1,
set: set$1,
startOf,
subDays,
subHours,
subMilliseconds,
subMinutes,
subMonths,
subSeconds,
subYears,
subtract,
units
}, Symbol.toStringTag, { value: "Module" }));
const { parse, get, set } = fns;
class DateChain {
constructor(input, format2) {
const _input = input instanceof DateChain ? input._d : input;
this._i = input;
this._f = format2;
this._d = parse(_input, format2);
}
clone() {
return new DateChain(this, this._f);
}
toArray() {
const date = this._d;
return [
get(date, "year"),
get(date, "month"),
get(date, "date"),
get(date, "hours"),
get(date, "minutes"),
get(date, "seconds"),
get(date, "milliseconds")
// -date.getTimezoneOffset()
];
}
toDate() {
return new Date(this._d);
}
toISOString() {
return this._d.toISOString();
}
toJSON() {
return this.toISOString();
}
toString() {
return this._d.toString();
}
valueOf() {
return this._d.valueOf();
}
}
const proto = DateChain.prototype;
Object.entries(units).forEach(([, method]) => {
const fn = function(val) {
if (val == null) {
return get(this._d, method);
}
set(this._d, method, val);
return this;
};
proto[method] = fn;
if (method !== "time") {
proto[`${method}s`] = fn;
}
});
const exclude = ["compile", "parse", "units"];
Object.entries(fns).forEach(([name, method]) => {
if (!exclude.includes(name)) {
proto[name] = function() {
const date = this._d;
const ret = method(date, ...arguments);
return ret === date ? this : ret;
};
}
DateChain[name] = method;
});
function chain(input, format2) {
return new DateChain(input, format2);
}
exports2.add = add;
exports2.addDays = addDays;
exports2.addHours = addHours;
exports2.addMilliseconds = addMilliseconds;
exports2.addMinutes = addMinutes;
exports2.addMonths = addMonths;
exports2.addSeconds = addSeconds;
exports2.addYears = addYears;
exports2.chain = chain;
exports2.compile = compile;
exports2.dayOfYear = dayOfYear;
exports2.daysInMonth = daysInMonth;
exports2.diff = diff;
exports2.diffInDays = diffInDays;
exports2.diffInHours = diffInHours;
exports2.diffInMilliseconds = diffInMilliseconds;
exports2.diffInMinutes = diffInMinutes;
exports2.diffInMonths = diffInMonths;
exports2.diffInSeconds = diffInSeconds;
exports2.diffInYears = diffInYears;
exports2.endOf = endOf;
exports2.format = format;
exports2.get = get$1;
exports2.isAfter = isAfter;
exports2.isBefore = isBefore;
exports2.isBetween = isBetween;
exports2.isLeapYear = isLeapYear;
exports2.isSame = isSame;
exports2.isSameOrAfter = isSameOrAfter;
exports2.isSameOrBefore = isSameOrBefore;
exports2.isValid = isValid;
exports2.parse = parse$1;
exports2.set = set$1;
exports2.startOf = startOf;
exports2.subDays = subDays;
exports2.subHours = subHours;
exports2.subMilliseconds = subMilliseconds;
exports2.subMinutes = subMinutes;
exports2.subMonths = subMonths;
exports2.subSeconds = subSeconds;
exports2.subYears = subYears;
exports2.subtract = subtract;
exports2.units = units;
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
});
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_J"},C:{"2":"_S"},D:{"2":"_Q"},E:{"2":"_R"},F:{"2":"_c"},G:{"2":"_M"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_N"},L:{"2":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"2":"_F"},Q:{"2":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:5,C:"CSS @when / @else conditional rules",D:true};
@@ -0,0 +1,3 @@
# `react-alert-dialog`
View docs [here](https://radix-ui.com/primitives/docs/components/alert-dialog).
@@ -0,0 +1 @@
{"version":3,"file":"tablets.js","sources":["../../../src/icons/tablets.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Tablets\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSI3IiBjeT0iNyIgcj0iNSIgLz4KICA8Y2lyY2xlIGN4PSIxNyIgY3k9IjE3IiByPSI1IiAvPgogIDxwYXRoIGQ9Ik0xMiAxN2gxMCIgLz4KICA8cGF0aCBkPSJtMy40NiAxMC41NCA3LjA4LTcuMDgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/tablets\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 Tablets = createLucideIcon('Tablets', [\n ['circle', { cx: '7', cy: '7', r: '5', key: 'x29byf' }],\n ['circle', { cx: '17', cy: '17', r: '5', key: '1op1d2' }],\n ['path', { d: 'M12 17h10', key: 'ls21zv' }],\n ['path', { d: 'm3.46 10.54 7.08-7.08', key: '1rehiu' }],\n]);\n\nexport default Tablets;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,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,CAAA;AAAA,CACtD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyB,CAAA,CAAA,CAAA,CAAA,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;AACxD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"replace.d.ts","sourceRoot":"","sources":["../../src/replace.ts"],"names":[],"mappings":"AAuPA,eAAO,MAAM,OAAO,sDA8BnB,CAAA"}
@@ -0,0 +1,69 @@
/**
* dd-base-impl.ts 12.6.0
* Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license
*/
/**
* Type for event callback functions used in drag & drop operations.
* Can return boolean to indicate if the event should continue propagation.
*/
export type EventCallback = (event: Event) => boolean | void;
/**
* Abstract base class for all drag & drop implementations.
* Provides common functionality for event handling, enable/disable state,
* and lifecycle management used by draggable, droppable, and resizable implementations.
*/
export declare abstract class DDBaseImplement {
/**
* Returns the current disabled state.
* Note: Use enable()/disable() methods to change state as other operations need to happen.
*/
get disabled(): boolean;
/**
* Register an event callback for the specified event.
*
* @param event - Event name to listen for
* @param callback - Function to call when event occurs
*/
on(event: string, callback: EventCallback): void;
/**
* Unregister an event callback for the specified event.
*
* @param event - Event name to stop listening for
*/
off(event: string): void;
/**
* Enable this drag & drop implementation.
* Subclasses should override to perform additional setup.
*/
enable(): void;
/**
* Disable this drag & drop implementation.
* Subclasses should override to perform additional cleanup.
*/
disable(): void;
/**
* Destroy this drag & drop implementation and clean up resources.
* Removes all event handlers and clears internal state.
*/
destroy(): void;
/**
* Trigger a registered event callback if one exists and the implementation is enabled.
*
* @param eventName - Name of the event to trigger
* @param event - DOM event object to pass to the callback
* @returns Result from the callback function, if any
*/
triggerEvent(eventName: string, event: Event): boolean | void;
}
/**
* Interface for HTML elements extended with drag & drop options.
* Used to associate DD configuration with DOM elements.
*/
export interface HTMLElementExtendOpt<T> {
/** The HTML element being extended */
el: HTMLElement;
/** The drag & drop options/configuration */
option: T;
/** Method to update the options and return the DD implementation */
updateOption(T: any): DDBaseImplement;
}
@@ -0,0 +1 @@
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"}
@@ -0,0 +1,295 @@
# Sucrase
[![Build Status](https://github.com/alangpierce/sucrase/workflows/All%20tests/badge.svg)](https://github.com/alangpierce/sucrase/actions)
[![npm version](https://img.shields.io/npm/v/sucrase.svg)](https://www.npmjs.com/package/sucrase)
[![Install Size](https://packagephobia.now.sh/badge?p=sucrase)](https://packagephobia.now.sh/result?p=sucrase)
[![MIT License](https://img.shields.io/npm/l/express.svg?maxAge=2592000)](LICENSE)
[![Join the chat at https://gitter.im/sucrasejs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sucrasejs/Lobby)
## [Try it out](https://sucrase.io)
## Quick usage
```bash
yarn add --dev sucrase # Or npm install --save-dev sucrase
node -r sucrase/register main.ts
```
Using the [ts-node](https://github.com/TypeStrong/ts-node) integration:
```bash
yarn add --dev sucrase ts-node typescript
./node_modules/.bin/ts-node --transpiler sucrase/ts-node-plugin main.ts
```
## Project overview
Sucrase is an alternative to Babel that allows super-fast development builds.
Instead of compiling a large range of JS features to be able to work in Internet
Explorer, Sucrase assumes that you're developing with a recent browser or recent
Node.js version, so it focuses on compiling non-standard language extensions:
JSX, TypeScript, and Flow. Because of this smaller scope, Sucrase can get away
with an architecture that is much more performant but less extensible and
maintainable. Sucrase's parser is forked from Babel's parser (so Sucrase is
indebted to Babel and wouldn't be possible without it) and trims it down to a
focused subset of what Babel solves. If it fits your use case, hopefully Sucrase
can speed up your development experience!
**Sucrase has been extensively tested.** It can successfully build
the [Benchling](https://benchling.com/) frontend code,
[Babel](https://github.com/babel/babel),
[React](https://github.com/facebook/react),
[TSLint](https://github.com/palantir/tslint),
[Apollo client](https://github.com/apollographql/apollo-client), and
[decaffeinate](https://github.com/decaffeinate/decaffeinate)
with all tests passing, about 1 million lines of code total.
**Sucrase is about 20x faster than Babel.** Here's one measurement of how
Sucrase compares with other tools when compiling the Jest codebase 3 times,
about 360k lines of code total:
```text
Time Speed
Sucrase 0.57 seconds 636975 lines per second
swc 1.19 seconds 304526 lines per second
esbuild 1.45 seconds 248692 lines per second
TypeScript 8.98 seconds 40240 lines per second
Babel 9.18 seconds 39366 lines per second
```
Details: Measured on July 2022. Tools run in single-threaded mode without warm-up. See the
[benchmark code](https://github.com/alangpierce/sucrase/blob/main/benchmark/benchmark.ts)
for methodology and caveats.
## Transforms
The main configuration option in Sucrase is an array of transform names. These
transforms are available:
* **jsx**: Enables JSX syntax. By default, JSX is transformed to `React.createClass`,
but may be preserved or transformed to `_jsx()` by setting the `jsxRuntime` option.
Also adds `createReactClass` display names and JSX context information.
* **typescript**: Compiles TypeScript code to JavaScript, removing type
annotations and handling features like enums. Does not check types. Sucrase
transforms each file independently, so you should enable the `isolatedModules`
TypeScript flag so that the typechecker will disallow the few features like
`const enum`s that need cross-file compilation. The Sucrase option `keepUnusedImports`
can be used to disable all automatic removal of imports and exports, analogous to TS
`verbatimModuleSyntax`.
* **flow**: Removes Flow type annotations. Does not check types.
* **imports**: Transforms ES Modules (`import`/`export`) to CommonJS
(`require`/`module.exports`) using the same approach as Babel and TypeScript
with `--esModuleInterop`. If `preserveDynamicImport` is specified in the Sucrase
options, then dynamic `import` expressions are left alone, which is particularly
useful in Node to load ESM-only libraries. If `preserveDynamicImport` is not
specified, `import` expressions are transformed into a promise-wrapped call to
`require`.
* **react-hot-loader**: Performs the equivalent of the `react-hot-loader/babel`
transform in the [react-hot-loader](https://github.com/gaearon/react-hot-loader)
project. This enables advanced hot reloading use cases such as editing of
bound methods.
* **jest**: Hoist desired [jest](https://jestjs.io/) method calls above imports in
the same way as [babel-plugin-jest-hoist](https://github.com/facebook/jest/tree/master/packages/babel-plugin-jest-hoist).
Does not validate the arguments passed to `jest.mock`, but the same rules still apply.
When the `imports` transform is *not* specified (i.e. when targeting ESM), the
`injectCreateRequireForImportRequire` option can be specified to transform TS
`import foo = require("foo");` in a way that matches the
[TypeScript 4.7 behavior](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#commonjs-interoperability)
with `module: nodenext`.
These newer JS features are transformed by default:
* [Optional chaining](https://github.com/tc39/proposal-optional-chaining): `a?.b`
* [Nullish coalescing](https://github.com/tc39/proposal-nullish-coalescing): `a ?? b`
* [Class fields](https://github.com/tc39/proposal-class-fields): `class C { x = 1; }`.
This includes static fields but not the `#x` private field syntax.
* [Numeric separators](https://github.com/tc39/proposal-numeric-separator):
`const n = 1_234;`
* [Optional catch binding](https://github.com/tc39/proposal-optional-catch-binding):
`try { doThing(); } catch { }`.
If your target runtime supports these features, you can specify
`disableESTransforms: true` so that Sucrase preserves the syntax rather than
trying to transform it. Note that transpiled and standard class fields behave
slightly differently; see the
[TypeScript 3.7 release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#the-usedefineforclassfields-flag-and-the-declare-property-modifier)
for details. If you use TypeScript, you can enable the TypeScript option
`useDefineForClassFields` to enable error checking related to these differences.
### Unsupported syntax
All JS syntax not mentioned above will "pass through" and needs to be supported
by your JS runtime. For example:
* Decorators, private fields, `throw` expressions, generator arrow functions,
and `do` expressions are all unsupported in browsers and Node (as of this
writing), and Sucrase doesn't make an attempt to transpile them.
* Object rest/spread, async functions, and async iterators are all recent
features that should work fine, but might cause issues if you use older
versions of tools like webpack. BigInt and newer regex features may or may not
work, based on your tooling.
### JSX Options
By default, JSX is compiled to React functions in development mode. This can be
configured with a few options:
* **jsxRuntime**: A string specifying the transform mode, which can be one of three values:
* `"classic"` (default): The original JSX transform that calls `React.createElement` by default.
To configure for non-React use cases, specify:
* **jsxPragma**: Element creation function, defaults to `React.createElement`.
* **jsxFragmentPragma**: Fragment component, defaults to `React.Fragment`.
* `"automatic"`: The [new JSX transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html)
introduced with React 17, which calls `jsx` functions and auto-adds import statements.
To configure for non-React use cases, specify:
* **jsxImportSource**: Package name for auto-generated import statements, defaults to `react`.
* `"preserve"`: Don't transform JSX, and instead emit it as-is in the output code.
* **production**: If `true`, use production version of functions and don't include debugging
information. When using React in production mode with the automatic transform, this *must* be
set to true to avoid an error about `jsxDEV` being missing.
### Legacy CommonJS interop
Two legacy modes can be used with the `imports` transform:
* **enableLegacyTypeScriptModuleInterop**: Use the default TypeScript approach
to CommonJS interop instead of assuming that TypeScript's `--esModuleInterop`
flag is enabled. For example, if a CJS module exports a function, legacy
TypeScript interop requires you to write `import * as add from './add';`,
while Babel, Webpack, Node.js, and TypeScript with `--esModuleInterop` require
you to write `import add from './add';`. As mentioned in the
[docs](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#support-for-import-d-from-cjs-form-commonjs-modules-with---esmoduleinterop),
the TypeScript team recommends you always use `--esModuleInterop`.
* **enableLegacyBabel5ModuleInterop**: Use the Babel 5 approach to CommonJS
interop, so that you can run `require('./MyModule')` instead of
`require('./MyModule').default`. Analogous to
[babel-plugin-add-module-exports](https://github.com/59naga/babel-plugin-add-module-exports).
## Usage
### Tool integrations
* [Webpack](https://github.com/alangpierce/sucrase/tree/main/integrations/webpack-loader)
* [Gulp](https://github.com/alangpierce/sucrase/tree/main/integrations/gulp-plugin)
* [Jest](https://github.com/alangpierce/sucrase/tree/main/integrations/jest-plugin)
* [Rollup](https://github.com/rollup/plugins/tree/master/packages/sucrase)
* [Broccoli](https://github.com/stefanpenner/broccoli-sucrase)
### Usage in Node
The most robust way is to use the Sucrase plugin for [ts-node](https://github.com/TypeStrong/ts-node),
which has various Node integrations and configures Sucrase via `tsconfig.json`:
```bash
ts-node --transpiler sucrase/ts-node-plugin
```
For projects that don't target ESM, Sucrase also has a require hook with some
reasonable defaults that can be accessed in a few ways:
* From code: `require("sucrase/register");`
* When invoking Node: `node -r sucrase/register main.ts`
* As a separate binary: `sucrase-node main.ts`
Options can be passed to the require hook via a `SUCRASE_OPTIONS` environment
variable holding a JSON string of options.
### Compiling a project to JS
For simple use cases, Sucrase comes with a `sucrase` CLI that mirrors your
directory structure to an output directory:
```bash
sucrase ./srcDir -d ./outDir --transforms typescript,imports
```
### Usage from code
For any advanced use cases, Sucrase can be called from JS directly:
```js
import {transform} from "sucrase";
const compiledCode = transform(code, {transforms: ["typescript", "imports"]}).code;
```
## What Sucrase is not
Sucrase is intended to be useful for the most common cases, but it does not aim
to have nearly the scope and versatility of Babel. Some specific examples:
* Sucrase does not check your code for errors. Sucrase's contract is that if you
give it valid code, it will produce valid JS code. If you give it invalid
code, it might produce invalid code, it might produce valid code, or it might
give an error. Always use Sucrase with a linter or typechecker, which is more
suited for error-checking.
* Sucrase is not pluginizable. With the current architecture, transforms need to
be explicitly written to cooperate with each other, so each additional
transform takes significant extra work.
* Sucrase is not good for prototyping language extensions and upcoming language
features. Its faster architecture makes new transforms more difficult to write
and more fragile.
* Sucrase will never produce code for old browsers like IE. Compiling code down
to ES5 is much more complicated than any transformation that Sucrase needs to
do.
* Sucrase is hesitant to implement upcoming JS features, although some of them
make sense to implement for pragmatic reasons. Its main focus is on language
extensions (JSX, TypeScript, Flow) that will never be supported by JS
runtimes.
* Like Babel, Sucrase is not a typechecker, and must process each file in
isolation. For example, TypeScript `const enum`s are treated as regular
`enum`s rather than inlining across files.
* You should think carefully before using Sucrase in production. Sucrase is
mostly beneficial in development, and in many cases, Babel or tsc will be more
suitable for production builds.
See the [Project Vision](./docs/PROJECT_VISION.md) document for more details on
the philosophy behind Sucrase.
## Motivation
As JavaScript implementations mature, it becomes more and more reasonable to
disable Babel transforms, especially in development when you know that you're
targeting a modern runtime. You might hope that you could simplify and speed up
the build step by eventually disabling Babel entirely, but this isn't possible
if you're using a non-standard language extension like JSX, TypeScript, or Flow.
Unfortunately, disabling most transforms in Babel doesn't speed it up as much as
you might expect. To understand, let's take a look at how Babel works:
1. Tokenize the input source code into a token stream.
2. Parse the token stream into an AST.
3. Walk the AST to compute the scope information for each variable.
4. Apply all transform plugins in a single traversal, resulting in a new AST.
5. Print the resulting AST.
Only step 4 gets faster when disabling plugins, so there's always a fixed cost
to running Babel regardless of how many transforms are enabled.
Sucrase bypasses most of these steps, and works like this:
1. Tokenize the input source code into a token stream using a trimmed-down fork
of the Babel parser. This fork does not produce a full AST, but still
produces meaningful token metadata specifically designed for the later
transforms.
2. Scan through the tokens, computing preliminary information like all
imported/exported names.
3. Run the transform by doing a pass through the tokens and performing a number
of careful find-and-replace operations, like replacing `<Foo` with
`React.createElement(Foo`.
Because Sucrase works on a lower level and uses a custom parser for its use
case, it is much faster than Babel.
## Contributing
Contributions are welcome, whether they be bug reports, PRs, docs, tests, or
anything else! Please take a look through the [Contributing Guide](./CONTRIBUTING.md)
to learn how to get started.
## License and attribution
Sucrase is MIT-licensed. A large part of Sucrase is based on a fork of the
[Babel parser](https://github.com/babel/babel/tree/main/packages/babel-parser),
which is also MIT-licensed.
## Why the name?
Sucrase is an enzyme that processes sugar. Get it?
@@ -0,0 +1 @@
{"version":3,"file":"clients.js","sourceRoot":"","sources":["../../../../src/server/auth/clients.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
{"version":3,"file":"sun-moon.js","sources":["../../../src/icons/sun-moon.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SunMoon\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgOGEyLjgzIDIuODMgMCAwIDAgNCA0IDQgNCAwIDEgMS00LTQiIC8+CiAgPHBhdGggZD0iTTEyIDJ2MiIgLz4KICA8cGF0aCBkPSJNMTIgMjB2MiIgLz4KICA8cGF0aCBkPSJtNC45IDQuOSAxLjQgMS40IiAvPgogIDxwYXRoIGQ9Im0xNy43IDE3LjcgMS40IDEuNCIgLz4KICA8cGF0aCBkPSJNMiAxMmgyIiAvPgogIDxwYXRoIGQ9Ik0yMCAxMmgyIiAvPgogIDxwYXRoIGQ9Im02LjMgMTcuNy0xLjQgMS40IiAvPgogIDxwYXRoIGQ9Im0xOS4xIDQuOS0xLjQgMS40IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/sun-moon\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 SunMoon = createLucideIcon('SunMoon', [\n ['path', { d: 'M12 8a2.83 2.83 0 0 0 4 4 4 4 0 1 1-4-4', key: '1fu5g2' }],\n ['path', { d: 'M12 2v2', key: 'tus03m' }],\n ['path', { d: 'M12 20v2', key: '1lh1kg' }],\n ['path', { d: 'm4.9 4.9 1.4 1.4', key: 'b9915j' }],\n ['path', { d: 'm17.7 17.7 1.4 1.4', key: 'qc3ed3' }],\n ['path', { d: 'M2 12h2', key: '1t8f8n' }],\n ['path', { d: 'M20 12h2', key: '1q8mjw' }],\n ['path', { d: 'm6.3 17.7-1.4 1.4', key: '5gca6' }],\n ['path', { d: 'm19.1 4.9-1.4 1.4', key: 'wpu9u6' }],\n]);\n\nexport default SunMoon;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACjD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAA;AAAA,CAAA,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqB,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,SAAS,CAAA,CAAA;AAAA,CAAA,CACjD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqB,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;AACpD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,98 @@
import * as estree from 'estree';
import { Rule, Linter } from 'eslint';
type ReactHooksFlatConfig = {
plugins: {
react: any;
};
rules: Linter.RulesRecord;
};
declare const plugin: {
meta: {
name: string;
version: string;
};
rules: {
'exhaustive-deps': {
meta: {
type: "suggestion";
docs: {
description: string;
recommended: true;
url: string;
};
fixable: "code";
hasSuggestions: true;
schema: {
type: "object";
additionalProperties: false;
enableDangerousAutofixThisMayCauseInfiniteLoops: boolean;
properties: {
additionalHooks: {
type: "string";
};
enableDangerousAutofixThisMayCauseInfiniteLoops: {
type: "boolean";
};
experimental_autoDependenciesHooks: {
type: "array";
items: {
type: "string";
};
};
requireExplicitEffectDeps: {
type: "boolean";
};
};
}[];
};
create(context: Rule.RuleContext): {
CallExpression: (node: estree.CallExpression) => void;
};
};
'rules-of-hooks': {
meta: {
type: "problem";
docs: {
description: string;
recommended: true;
url: string;
};
schema: {
type: "object";
additionalProperties: false;
properties: {
additionalHooks: {
type: "string";
};
};
}[];
};
create(context: Rule.RuleContext): {
'*'(node: any): void;
'*:exit'(node: any): void;
CallExpression(node: estree.CallExpression & Rule.NodeParentExtension): void;
Identifier(node: estree.Identifier & Rule.NodeParentExtension): void;
'CallExpression:exit'(node: estree.CallExpression & Rule.NodeParentExtension): void;
FunctionDeclaration(node: estree.FunctionDeclaration & Rule.NodeParentExtension): void;
ArrowFunctionExpression(node: estree.ArrowFunctionExpression & Rule.NodeParentExtension): void;
};
};
};
configs: {
recommended: {
plugins: string[];
rules: Linter.RulesRecord;
};
'recommended-latest': {
plugins: string[];
rules: Linter.RulesRecord;
};
flat: {
recommended: ReactHooksFlatConfig;
"recommended-latest": ReactHooksFlatConfig;
};
};
};
export { plugin as default };
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = buildChildren;
var _index = require("../../validators/generated/index.js");
var _cleanJSXElementLiteralChild = require("../../utils/react/cleanJSXElementLiteralChild.js");
function buildChildren(node) {
const elements = [];
for (let i = 0; i < node.children.length; i++) {
let child = node.children[i];
if ((0, _index.isJSXText)(child)) {
(0, _cleanJSXElementLiteralChild.default)(child, elements);
continue;
}
if ((0, _index.isJSXExpressionContainer)(child)) child = child.expression;
if ((0, _index.isJSXEmptyExpression)(child)) continue;
elements.push(child);
}
return elements;
}
//# sourceMappingURL=buildChildren.js.map
@@ -0,0 +1,16 @@
"use client";
import { animations } from '../../motion/features/animations.mjs';
import { gestureAnimations } from '../../motion/features/gestures.mjs';
import { createDomVisualElement } from './create-visual-element.mjs';
/**
* @public
*/
const domAnimation = {
renderer: createDomVisualElement,
...animations,
...gestureAnimations,
};
export { domAnimation };
//# sourceMappingURL=features-animation.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"l33t.cjs","sources":["../../../../../src/matcher/dictionary/variants/matching/l33t.ts"],"sourcesContent":[null],"names":["getExtras","passwordWithSubs","i","j","previousChanges","changes","filter","iUnsubbed","reduce","value","change","letter","length","substitution","usedChanges","jUnsubbed","filtered","subDisplay","forEach","existingIndex","findIndex","t","push","subs","join","MatchL33t","MatchDictionary","isAlreadyIncluded","matches","newMatch","some","l33tMatch","Object","entries","every","key","match","matchOptions","subbedPasswords","getCleanPasswords","password","options","l33tMaxSubstitutions","trieNodeRoot","hasFullMatch","subbedPassword","matchedDictionary","useLevenshtein","isFullSubstitution","extras","token","slice","l33t","alreadyIncluded","toLowerCase","matchedWord"],"mappings":";;;;;AAQA,MAAMA,SAAS,GAAGA,CAChBC,gBAAkC,EAClCC,CAAS,EACTC,CAAS,KACP;EACF,MAAMC,eAAe,GAAGH,gBAAgB,CAACI,OAAO,CAACC,MAAM,CAAED,OAAO,IAAI;AAClE,IAAA,OAAOA,OAAO,CAACH,CAAC,GAAGA,CAAC;AACtB,EAAA,CAAC,CAAC;EACF,MAAMK,SAAS,GAAGH,eAAe,CAACI,MAAM,CAAC,CAACC,KAAK,EAAEC,MAAM,KAAI;AACzD,IAAA,OAAOD,KAAK,GAAGC,MAAM,CAACC,MAAM,CAACC,MAAM,GAAGF,MAAM,CAACG,YAAY,CAACD,MAAM;EAClE,CAAC,EAAEV,CAAC,CAAC;EACL,MAAMY,WAAW,GAAGb,gBAAgB,CAACI,OAAO,CAACC,MAAM,CAAED,OAAO,IAAI;IAC9D,OAAOA,OAAO,CAACH,CAAC,IAAIA,CAAC,IAAIG,OAAO,CAACH,CAAC,IAAIC,CAAC;AACzC,EAAA,CAAC,CAAC;EACF,MAAMY,SAAS,GAAGD,WAAW,CAACN,MAAM,CAClC,CAACC,KAAK,EAAEC,MAAM,KAAI;AAChB,IAAA,OAAOD,KAAK,GAAGC,MAAM,CAACC,MAAM,CAACC,MAAM,GAAGF,MAAM,CAACG,YAAY,CAACD,MAAM;AAClE,EAAA,CAAC,EACDT,CAAC,GAAGD,CAAC,GAAGK,SAAS,CAClB;EACD,MAAMS,QAAQ,GAAsB,EAAE;EACtC,MAAMC,UAAU,GAAa,EAAE;AAC/BH,EAAAA,WAAW,CAACI,OAAO,CAAET,KAAK,IAAI;AAC5B,IAAA,MAAMU,aAAa,GAAGH,QAAQ,CAACI,SAAS,CAAEC,CAAC,IAAI;AAC7C,MAAA,OAAOA,CAAC,CAACV,MAAM,KAAKF,KAAK,CAACE,MAAM,IAAIU,CAAC,CAACR,YAAY,KAAKJ,KAAK,CAACI,YAAY;AAC3E,IAAA,CAAC,CAAC;IACF,IAAIM,aAAa,GAAG,CAAC,EAAE;MACrBH,QAAQ,CAACM,IAAI,CAAC;QACZX,MAAM,EAAEF,KAAK,CAACE,MAAM;QACpBE,YAAY,EAAEJ,KAAK,CAACI;AACrB,OAAA,CAAC;AACFI,MAAAA,UAAU,CAACK,IAAI,CAAC,CAAA,EAAGb,KAAK,CAACI,YAAY,CAAA,IAAA,EAAOJ,KAAK,CAACE,MAAM,CAAA,CAAE,CAAC;AAC7D,IAAA;AACF,EAAA,CAAC,CAAC;EACF,OAAO;AACLT,IAAAA,CAAC,EAAEK,SAAS;AACZJ,IAAAA,CAAC,EAAEY,SAAS;AACZQ,IAAAA,IAAI,EAAEP,QAAQ;AACdC,IAAAA,UAAU,EAAEA,UAAU,CAACO,IAAI,CAAC,IAAI;GACjC;AACH,CAAC;AAED;;;;AAIG;AACH,MAAMC,SAAU,SAAQC,QAAe,CAAA;AAC7BC,EAAAA,iBAAiBA,CAACC,OAAoB,EAAEC,QAAmB,EAAA;AACjE,IAAA,OAAOD,OAAO,CAACE,IAAI,CAAEC,SAAS,IAAI;AAChC,MAAA,OAAOC,MAAM,CAACC,OAAO,CAACF,SAAS,CAAC,CAACG,KAAK,CAAC,CAAC,CAACC,GAAG,EAAE1B,KAAK,CAAC,KAAI;QACtD,OAAO0B,GAAG,KAAK,MAAM,IAAI1B,KAAK,KAAKoB,QAAQ,CAACM,GAAG,CAAC;AAClD,MAAA,CAAC,CAAC;AACJ,IAAA,CAAC,CAAC;AACJ,EAAA;EAEOC,KAAKA,CAACC,YAAoC,EAAA;IAC/C,MAAMT,OAAO,GAAgB,EAAE;AAC/B,IAAA,MAAMU,eAAe,GAAGC,iBAAiB,CACvCF,YAAY,CAACG,QAAQ,EACrB,IAAI,CAACC,OAAO,CAACC,oBAAoB,EACjC,IAAI,CAACD,OAAO,CAACE,YAAY,CAC1B;IACD,IAAIC,YAAY,GAAG,KAAK;AACxBN,IAAAA,eAAe,CAACpB,OAAO,CAAE2B,cAAc,IAAI;AACzC,MAAA,IAAID,YAAY,EAAE;AAChB,QAAA;AACF,MAAA;AACA,MAAA,MAAME,iBAAiB,GAAG,KAAK,CAACV,KAAK,CAAC;AACpC,QAAA,GAAGC,YAAY;QACfG,QAAQ,EAAEK,cAAc,CAACL,QAAQ;QACjCO,cAAc,EAAEF,cAAc,CAACG;AAChC,OAAA,CAAC;AACFF,MAAAA,iBAAiB,CAAC5B,OAAO,CAAEkB,KAAsB,IAAI;QACnD,IAAI,CAACQ,YAAY,EAAE;AACjBA,UAAAA,YAAY,GACVR,KAAK,CAAClC,CAAC,KAAK,CAAC,IAAIkC,KAAK,CAACjC,CAAC,KAAKkC,YAAY,CAACG,QAAQ,CAAC5B,MAAM,GAAG,CAAC;AACjE,QAAA;AACA,QAAA,MAAMqC,MAAM,GAAGjD,SAAS,CAAC6C,cAAc,EAAET,KAAK,CAAClC,CAAC,EAAEkC,KAAK,CAACjC,CAAC,CAAC;AAC1D,QAAA,MAAM+C,KAAK,GAAGb,YAAY,CAACG,QAAQ,CAACW,KAAK,CAACF,MAAM,CAAC/C,CAAC,EAAE+C,MAAM,CAAC9C,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;AACxE,QAAA,MAAM0B,QAAQ,GAAc;AAC1B,UAAA,GAAGO,KAAK;AACRgB,UAAAA,IAAI,EAAE,IAAI;UACVF,KAAK;UACL,GAAGD;SACJ;QACD,MAAMI,eAAe,GAAG,IAAI,CAAC1B,iBAAiB,CAACC,OAAO,EAAEC,QAAQ,CAAC;AAEjE;AACA,QAAA,IAAIqB,KAAK,CAACI,WAAW,EAAE,KAAKlB,KAAK,CAACmB,WAAW,IAAI,CAACF,eAAe,EAAE;AACjEzB,UAAAA,OAAO,CAACN,IAAI,CAACO,QAAQ,CAAC;AACxB,QAAA;AACF,MAAA,CAAC,CAAC;AACJ,IAAA,CAAC,CAAC;AAEF;AACA;AACA;AACA,IAAA,OAAOD,OAAO,CAACtB,MAAM,CAAE8B,KAAK,IAAKA,KAAK,CAACc,KAAK,CAACtC,MAAM,GAAG,CAAC,CAAC;AAC1D,EAAA;AACD;;;;"}
@@ -0,0 +1,160 @@
{
"v0.8": {
"start": "2012-06-25",
"end": "2014-07-31"
},
"v0.10": {
"start": "2013-03-11",
"end": "2016-10-31"
},
"v0.12": {
"start": "2015-02-06",
"end": "2016-12-31"
},
"v4": {
"start": "2015-09-08",
"lts": "2015-10-12",
"maintenance": "2017-04-01",
"end": "2018-04-30",
"codename": "Argon"
},
"v5": {
"start": "2015-10-29",
"maintenance": "2016-04-30",
"end": "2016-06-30"
},
"v6": {
"start": "2016-04-26",
"lts": "2016-10-18",
"maintenance": "2018-04-30",
"end": "2019-04-30",
"codename": "Boron"
},
"v7": {
"start": "2016-10-25",
"maintenance": "2017-04-30",
"end": "2017-06-30"
},
"v8": {
"start": "2017-05-30",
"lts": "2017-10-31",
"maintenance": "2019-01-01",
"end": "2019-12-31",
"codename": "Carbon"
},
"v9": {
"start": "2017-10-01",
"maintenance": "2018-04-01",
"end": "2018-06-30"
},
"v10": {
"start": "2018-04-24",
"lts": "2018-10-30",
"maintenance": "2020-05-19",
"end": "2021-04-30",
"codename": "Dubnium"
},
"v11": {
"start": "2018-10-23",
"maintenance": "2019-04-22",
"end": "2019-06-01"
},
"v12": {
"start": "2019-04-23",
"lts": "2019-10-21",
"maintenance": "2020-11-30",
"end": "2022-04-30",
"codename": "Erbium"
},
"v13": {
"start": "2019-10-22",
"maintenance": "2020-04-01",
"end": "2020-06-01"
},
"v14": {
"start": "2020-04-21",
"lts": "2020-10-27",
"maintenance": "2021-10-19",
"end": "2023-04-30",
"codename": "Fermium"
},
"v15": {
"start": "2020-10-20",
"maintenance": "2021-04-01",
"end": "2021-06-01"
},
"v16": {
"start": "2021-04-20",
"lts": "2021-10-26",
"maintenance": "2022-10-18",
"end": "2023-09-11",
"codename": "Gallium"
},
"v17": {
"start": "2021-10-19",
"maintenance": "2022-04-01",
"end": "2022-06-01"
},
"v18": {
"start": "2022-04-19",
"lts": "2022-10-25",
"maintenance": "2023-10-18",
"end": "2025-04-30",
"codename": "Hydrogen"
},
"v19": {
"start": "2022-10-18",
"maintenance": "2023-04-01",
"end": "2023-06-01"
},
"v20": {
"start": "2023-04-18",
"lts": "2023-10-24",
"maintenance": "2024-10-22",
"end": "2026-04-30",
"codename": "Iron"
},
"v21": {
"start": "2023-10-17",
"maintenance": "2024-04-01",
"end": "2024-06-01"
},
"v22": {
"start": "2024-04-24",
"lts": "2024-10-29",
"maintenance": "2025-10-21",
"end": "2027-04-30",
"codename": "Jod"
},
"v23": {
"start": "2024-10-16",
"maintenance": "2025-04-01",
"end": "2025-06-01"
},
"v24": {
"start": "2025-05-06",
"lts": "2025-10-28",
"maintenance": "2026-10-20",
"end": "2028-04-30",
"codename": "Krypton"
},
"v25": {
"start": "2025-10-15",
"maintenance": "2026-04-01",
"end": "2026-06-01"
},
"v26": {
"start": "2026-05-05",
"lts": "2026-10-28",
"maintenance": "2027-10-20",
"end": "2029-04-30",
"codename": ""
},
"v27": {
"alpha": "2026-10-28",
"start": "2027-04-22",
"maintenance": "2027-10-20",
"end": "2030-04-30",
"codename": ""
}
}
@@ -0,0 +1,5 @@
import type { PreferOptionalChainMessageIds, PreferOptionalChainOptions } from './prefer-optional-chain-utils/PreferOptionalChainOptions';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<PreferOptionalChainMessageIds, [PreferOptionalChainOptions], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,8 @@
import type * as core from "../core/index.js";
import * as schemas from "./schemas.js";
export type input<T> = core.input<T>;
export type output<T> = core.output<T>;
/** Returns a copy of the schema with every pipe replaced by its input side. A codec's checks are dropped: they constrain the decoded value the input side never produces. */
export declare function input<T extends core.$ZodType>(schema: T): schemas.ZodType<core.input<T>, core.input<T>>;
/** Returns a copy of the schema with every pipe replaced by its output side, carrying over the pipe's own checks. */
export declare function output<T extends core.$ZodType>(schema: T): schemas.ZodType<core.output<T>, core.output<T>>;
@@ -0,0 +1,6 @@
type Colors = {
[key: string | number]: string | Colors;
};
declare function flattenColorPalette(colors: Colors): Record<string, string>;
export { flattenColorPalette as default };
@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.styleHookSingleton = exports.stylesheetSingleton = exports.styleSingleton = void 0;
var component_1 = require("./component");
Object.defineProperty(exports, "styleSingleton", { enumerable: true, get: function () { return component_1.styleSingleton; } });
var singleton_1 = require("./singleton");
Object.defineProperty(exports, "stylesheetSingleton", { enumerable: true, get: function () { return singleton_1.stylesheetSingleton; } });
var hook_1 = require("./hook");
Object.defineProperty(exports, "styleHookSingleton", { enumerable: true, get: function () { return hook_1.styleHookSingleton; } });
@@ -0,0 +1 @@
{"version":3,"file":"panel-right-open.js","sources":["../../../src/icons/panel-right-open.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PanelRightOpen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0xNSAzdjE4IiAvPgogIDxwYXRoIGQ9Im0xMCAxNS0zLTMgMy0zIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/panel-right-open\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 PanelRightOpen = createLucideIcon('PanelRightOpen', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M15 3v18', key: '14nvp0' }],\n ['path', { d: 'm10 15-3-3 3-3', key: '1pgupc' }],\n]);\n\nexport default PanelRightOpen;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeCommand = void 0;
const options_js_1 = require("./options.js");
const makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => {
return Object.assign((opt_ = [], entries, cb) => {
if (Array.isArray(opt_)) {
entries = opt_;
opt_ = {};
}
if (typeof entries === 'function') {
cb = entries;
entries = undefined;
}
entries = !entries ? [] : Array.from(entries);
const opt = (0, options_js_1.dealias)(opt_);
validate?.(opt, entries);
if ((0, options_js_1.isSyncFile)(opt)) {
if (typeof cb === 'function') {
throw new TypeError('callback not supported for sync tar functions');
}
return syncFile(opt, entries);
}
else if ((0, options_js_1.isAsyncFile)(opt)) {
const p = asyncFile(opt, entries);
return cb ? p.then(() => cb(), cb) : p;
}
else if ((0, options_js_1.isSyncNoFile)(opt)) {
if (typeof cb === 'function') {
throw new TypeError('callback not supported for sync tar functions');
}
return syncNoFile(opt, entries);
}
else if ((0, options_js_1.isAsyncNoFile)(opt)) {
if (typeof cb === 'function') {
throw new TypeError('callback only supported with file option');
}
return asyncNoFile(opt, entries);
/* c8 ignore start */
}
throw new Error('impossible options??');
/* c8 ignore stop */
}, {
syncFile,
asyncFile,
syncNoFile,
asyncNoFile,
validate,
});
};
exports.makeCommand = makeCommand;
//# sourceMappingURL=make-command.js.map
@@ -0,0 +1,77 @@
{
"name": "@radix-ui/react-popper",
"version": "1.2.8",
"license": "MIT",
"source": "./src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"files": [
"dist",
"README.md"
],
"sideEffects": false,
"dependencies": {
"@floating-ui/react-dom": "^2.0.0",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-arrow": "1.1.7",
"@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-use-layout-effect": "1.1.1",
"@radix-ui/react-use-rect": "1.1.1",
"@radix-ui/react-use-size": "1.1.1",
"@radix-ui/rect": "1.1.1",
"@radix-ui/react-use-callback-ref": "1.1.1"
},
"devDependencies": {
"@types/react": "^19.0.7",
"@types/react-dom": "^19.0.3",
"eslint": "^9.18.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"typescript": "^5.7.3",
"@repo/builder": "0.0.0",
"@repo/eslint-config": "0.0.0",
"@repo/typescript-config": "0.0.0"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
},
"homepage": "https://radix-ui.com/primitives",
"repository": {
"type": "git",
"url": "git+https://github.com/radix-ui/primitives.git"
},
"bugs": {
"url": "https://github.com/radix-ui/primitives/issues"
},
"scripts": {
"lint": "eslint --max-warnings 0 src",
"clean": "rm -rf dist",
"typecheck": "tsc --noEmit",
"build": "radix-build"
},
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
}
@@ -0,0 +1,210 @@
/*
* WARNING: This file is autogenerated using the tools/update-eslint-all.js
* script. Do not edit manually.
*/
"use strict";
module.exports = Object.freeze({
name: "@eslint/js/all",
rules: Object.freeze({
"accessor-pairs": "error",
"array-callback-return": "error",
"arrow-body-style": "error",
"block-scoped-var": "error",
"camelcase": "error",
"capitalized-comments": "error",
"class-methods-use-this": "error",
"complexity": "error",
"consistent-return": "error",
"consistent-this": "error",
"constructor-super": "error",
"curly": "error",
"default-case": "error",
"default-case-last": "error",
"default-param-last": "error",
"dot-notation": "error",
"eqeqeq": "error",
"for-direction": "error",
"func-name-matching": "error",
"func-names": "error",
"func-style": "error",
"getter-return": "error",
"grouped-accessor-pairs": "error",
"guard-for-in": "error",
"id-denylist": "error",
"id-length": "error",
"id-match": "error",
"init-declarations": "error",
"logical-assignment-operators": "error",
"max-classes-per-file": "error",
"max-depth": "error",
"max-lines": "error",
"max-lines-per-function": "error",
"max-nested-callbacks": "error",
"max-params": "error",
"max-statements": "error",
"new-cap": "error",
"no-alert": "error",
"no-array-constructor": "error",
"no-async-promise-executor": "error",
"no-await-in-loop": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-case-declarations": "error",
"no-class-assign": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-console": "error",
"no-const-assign": "error",
"no-constant-binary-expression": "error",
"no-constant-condition": "error",
"no-constructor-return": "error",
"no-continue": "error",
"no-control-regex": "error",
"no-debugger": "error",
"no-delete-var": "error",
"no-div-regex": "error",
"no-dupe-args": "error",
"no-dupe-class-members": "error",
"no-dupe-else-if": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-else-return": "error",
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-function": "error",
"no-empty-pattern": "error",
"no-empty-static-block": "error",
"no-eq-null": "error",
"no-eval": "error",
"no-ex-assign": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-boolean-cast": "error",
"no-extra-label": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-import-assign": "error",
"no-inline-comments": "error",
"no-inner-declarations": "error",
"no-invalid-regexp": "error",
"no-invalid-this": "error",
"no-irregular-whitespace": "error",
"no-iterator": "error",
"no-label-var": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-loss-of-precision": "error",
"no-magic-numbers": "error",
"no-misleading-character-class": "error",
"no-multi-assign": "error",
"no-multi-str": "error",
"no-negated-condition": "error",
"no-nested-ternary": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-native-nonconstructor": "error",
"no-new-wrappers": "error",
"no-nonoctal-decimal-escape": "error",
"no-obj-calls": "error",
"no-object-constructor": "error",
"no-octal": "error",
"no-octal-escape": "error",
"no-param-reassign": "error",
"no-plusplus": "error",
"no-promise-executor-return": "error",
"no-proto": "error",
"no-prototype-builtins": "error",
"no-redeclare": "error",
"no-regex-spaces": "error",
"no-restricted-exports": "error",
"no-restricted-globals": "error",
"no-restricted-imports": "error",
"no-restricted-properties": "error",
"no-restricted-syntax": "error",
"no-return-assign": "error",
"no-script-url": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-setter-return": "error",
"no-shadow": "error",
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-template-curly-in-string": "error",
"no-ternary": "error",
"no-this-before-super": "error",
"no-throw-literal": "error",
"no-unassigned-vars": "error",
"no-undef": "error",
"no-undef-init": "error",
"no-undefined": "error",
"no-underscore-dangle": "error",
"no-unexpected-multiline": "error",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "error",
"no-unreachable": "error",
"no-unreachable-loop": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unsafe-optional-chaining": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"no-unused-private-class-members": "error",
"no-unused-vars": "error",
"no-use-before-define": "error",
"no-useless-assignment": "error",
"no-useless-backreference": "error",
"no-useless-call": "error",
"no-useless-catch": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "error",
"no-useless-constructor": "error",
"no-useless-escape": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-var": "error",
"no-void": "error",
"no-warning-comments": "error",
"no-with": "error",
"object-shorthand": "error",
"one-var": "error",
"operator-assignment": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-destructuring": "error",
"prefer-exponentiation-operator": "error",
"prefer-named-capture-group": "error",
"prefer-numeric-literals": "error",
"prefer-object-has-own": "error",
"prefer-object-spread": "error",
"prefer-promise-reject-errors": "error",
"prefer-regex-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"preserve-caught-error": "error",
"radix": "error",
"require-atomic-updates": "error",
"require-await": "error",
"require-unicode-regexp": "error",
"require-yield": "error",
"sort-imports": "error",
"sort-keys": "error",
"sort-vars": "error",
"strict": "error",
"symbol-description": "error",
"unicode-bom": "error",
"use-isnan": "error",
"valid-typeof": "error",
"vars-on-top": "error",
"yoda": "error"
})
});
@@ -0,0 +1,15 @@
'use strict';
var bind = require('function-bind');
var $TypeError = require('es-errors/type');
var $call = require('./functionCall');
var $actualApply = require('./actualApply');
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
module.exports = function callBindBasic(args) {
if (args.length < 1 || typeof args[0] !== 'function') {
throw new $TypeError('a function is required');
}
return $actualApply(bind, $call, args);
};
@@ -0,0 +1,159 @@
'use strict'
const fs = require('../fs')
const path = require('path')
const u = require('universalify').fromPromise
function getStats (src, dest, opts) {
const statFunc = opts.dereference
? (file) => fs.stat(file, { bigint: true })
: (file) => fs.lstat(file, { bigint: true })
return Promise.all([
statFunc(src),
statFunc(dest).catch(err => {
if (err.code === 'ENOENT') return null
throw err
})
]).then(([srcStat, destStat]) => ({ srcStat, destStat }))
}
function getStatsSync (src, dest, opts) {
let destStat
const statFunc = opts.dereference
? (file) => fs.statSync(file, { bigint: true })
: (file) => fs.lstatSync(file, { bigint: true })
const srcStat = statFunc(src)
try {
destStat = statFunc(dest)
} catch (err) {
if (err.code === 'ENOENT') return { srcStat, destStat: null }
throw err
}
return { srcStat, destStat }
}
async function checkPaths (src, dest, funcName, opts) {
const { srcStat, destStat } = await getStats(src, dest, opts)
if (destStat) {
if (areIdentical(srcStat, destStat)) {
const srcBaseName = path.basename(src)
const destBaseName = path.basename(dest)
if (funcName === 'move' &&
srcBaseName !== destBaseName &&
srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
return { srcStat, destStat, isChangingCase: true }
}
throw new Error('Source and destination must not be the same.')
}
if (srcStat.isDirectory() && !destStat.isDirectory()) {
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
}
if (!srcStat.isDirectory() && destStat.isDirectory()) {
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)
}
}
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
throw new Error(errMsg(src, dest, funcName))
}
return { srcStat, destStat }
}
function checkPathsSync (src, dest, funcName, opts) {
const { srcStat, destStat } = getStatsSync(src, dest, opts)
if (destStat) {
if (areIdentical(srcStat, destStat)) {
const srcBaseName = path.basename(src)
const destBaseName = path.basename(dest)
if (funcName === 'move' &&
srcBaseName !== destBaseName &&
srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
return { srcStat, destStat, isChangingCase: true }
}
throw new Error('Source and destination must not be the same.')
}
if (srcStat.isDirectory() && !destStat.isDirectory()) {
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
}
if (!srcStat.isDirectory() && destStat.isDirectory()) {
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)
}
}
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
throw new Error(errMsg(src, dest, funcName))
}
return { srcStat, destStat }
}
// recursively check if dest parent is a subdirectory of src.
// It works for all file types including symlinks since it
// checks the src and dest inodes. It starts from the deepest
// parent and stops once it reaches the src parent or the root path.
async function checkParentPaths (src, srcStat, dest, funcName) {
const srcParent = path.resolve(path.dirname(src))
const destParent = path.resolve(path.dirname(dest))
if (destParent === srcParent || destParent === path.parse(destParent).root) return
let destStat
try {
destStat = await fs.stat(destParent, { bigint: true })
} catch (err) {
if (err.code === 'ENOENT') return
throw err
}
if (areIdentical(srcStat, destStat)) {
throw new Error(errMsg(src, dest, funcName))
}
return checkParentPaths(src, srcStat, destParent, funcName)
}
function checkParentPathsSync (src, srcStat, dest, funcName) {
const srcParent = path.resolve(path.dirname(src))
const destParent = path.resolve(path.dirname(dest))
if (destParent === srcParent || destParent === path.parse(destParent).root) return
let destStat
try {
destStat = fs.statSync(destParent, { bigint: true })
} catch (err) {
if (err.code === 'ENOENT') return
throw err
}
if (areIdentical(srcStat, destStat)) {
throw new Error(errMsg(src, dest, funcName))
}
return checkParentPathsSync(src, srcStat, destParent, funcName)
}
function areIdentical (srcStat, destStat) {
// stat.dev can be 0n on windows when node version >= 22.x.x
return destStat.ino !== undefined && destStat.dev !== undefined && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev
}
// return true if dest is a subdir of src, otherwise false.
// It only checks the path strings.
function isSrcSubdir (src, dest) {
const srcArr = path.resolve(src).split(path.sep).filter(i => i)
const destArr = path.resolve(dest).split(path.sep).filter(i => i)
return srcArr.every((cur, i) => destArr[i] === cur)
}
function errMsg (src, dest, funcName) {
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`
}
module.exports = {
// checkPaths
checkPaths: u(checkPaths),
checkPathsSync,
// checkParent
checkParentPaths: u(checkParentPaths),
checkParentPathsSync,
// Misc
isSrcSubdir,
areIdentical
}
@@ -0,0 +1,81 @@
import findLevenshteinDistance from '../../utils/levenshtein.mjs';
import { MatcherBaseClass } from '../../types.mjs';
import mergeUserInputDictionary from '../../utils/mergeUserInputDictionary.mjs';
class MatchDictionary extends MatcherBaseClass {
constructor(options, wordSequenceCheck) {
super(options);
this.wordSequenceCheck = wordSequenceCheck;
}
getRangedDictionaries(userInputsOptions) {
if (this.wordSequenceCheck) {
const rankedDictionaries = {};
const rankedDictionariesMaxWordSize = {};
Object.keys(this.options.rankedDictionaries).forEach(key => {
if (this.options.isWordSequence(key)) {
rankedDictionaries[key] = this.options.rankedDictionaries[key];
rankedDictionariesMaxWordSize[key] = this.options.rankedDictionariesMaxWordSize[key];
}
});
return {
rankedDictionaries,
rankedDictionariesMaxWordSize
};
}
return mergeUserInputDictionary(this.options.rankedDictionaries, this.options.rankedDictionariesMaxWordSize, userInputsOptions);
}
match({
password,
userInputsOptions,
useLevenshtein = true
}) {
const matches = [];
const passwordLength = password.length;
const passwordLower = password.toLowerCase();
const {
rankedDictionaries,
rankedDictionariesMaxWordSize
} = this.getRangedDictionaries(userInputsOptions);
// eslint-disable-next-line complexity,max-statements
Object.keys(rankedDictionaries).forEach(dictionaryName => {
const rankedDict = rankedDictionaries[dictionaryName];
const longestDictionaryWordSize = rankedDictionariesMaxWordSize[dictionaryName];
const searchWidth = Math.min(longestDictionaryWordSize, passwordLength);
for (let i = 0; i < passwordLength; i += 1) {
const searchEnd = Math.min(i + searchWidth, passwordLength);
for (let j = i; j < searchEnd; j += 1) {
const usedPassword = passwordLower.slice(i, j + 1 || 9e9);
const isInDictionary = usedPassword in rankedDict;
let foundLevenshteinDistance = {};
// only use levenshtein distance on full password to minimize the performance drop
// and because otherwise there would be to many false positives
const isFullPassword = i === 0 && j === passwordLength - 1;
if (this.options.useLevenshteinDistance && isFullPassword && !isInDictionary && useLevenshtein) {
foundLevenshteinDistance = findLevenshteinDistance(usedPassword, rankedDict, this.options.levenshteinThreshold);
}
const isLevenshteinMatch = Object.keys(foundLevenshteinDistance).length !== 0;
if (isInDictionary || isLevenshteinMatch) {
const usedRankPassword = isLevenshteinMatch ? foundLevenshteinDistance.levenshteinDistanceEntry : usedPassword;
const rank = rankedDict[usedRankPassword];
matches.push({
pattern: 'dictionary',
i,
j,
token: password.slice(i, j + 1 || 9e9),
matchedWord: usedPassword,
rank,
dictionaryName: dictionaryName,
reversed: false,
l33t: false,
...foundLevenshteinDistance
});
}
}
}
});
return matches;
}
}
export { MatchDictionary as default };
//# sourceMappingURL=matching.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"square-scissors.js","sources":["../../../src/icons/square-scissors.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareScissors\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHg9IjIiIHk9IjIiIHJ4PSIyIiAvPgogIDxjaXJjbGUgY3g9IjgiIGN5PSI4IiByPSIyIiAvPgogIDxwYXRoIGQ9Ik05LjQxNCA5LjQxNCAxMiAxMiIgLz4KICA8cGF0aCBkPSJNMTQuOCAxNC44IDE4IDE4IiAvPgogIDxjaXJjbGUgY3g9IjgiIGN5PSIxNiIgcj0iMiIgLz4KICA8cGF0aCBkPSJtMTggNi04LjU4NiA4LjU4NiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/square-scissors\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 SquareScissors = createLucideIcon('SquareScissors', [\n ['rect', { width: '20', height: '20', x: '2', y: '2', rx: '2', key: '1btzen' }],\n ['circle', { cx: '8', cy: '8', r: '2', key: '14cg06' }],\n ['path', { d: 'M9.414 9.414 12 12', key: 'qz4lzr' }],\n ['path', { d: 'M14.8 14.8 18 18', key: '11flf1' }],\n ['circle', { cx: '8', cy: '16', r: '2', key: '1acxsx' }],\n ['path', { d: 'm18 6-8.586 8.586', key: '11kzk1' }],\n]);\n\nexport default SquareScissors;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC9E,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,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,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAA;AAAA,CAAA,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,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,CACjD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqB,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;AACpD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_convertSourceMap","data","require","_generator","_mergeMap","generateCode","pluginPasses","file","opts","ast","code","inputMap","generatorOpts","inputSourceMap","toObject","results","plugins","plugin","generatorOverride","result","generate","undefined","push","length","then","Error","outputCode","decodedMap","outputMap","map","__mergedMap","Object","assign","mergeSourceMap","sourceFileName","sourceMaps","convertSourceMap","fromObject","toComment"],"sources":["../../../src/transformation/file/generate.ts"],"sourcesContent":["import type { PluginPasses } from \"../../config/index.ts\";\nimport convertSourceMap from \"convert-source-map\";\nimport type { GeneratorResult } from \"@babel/generator\";\nimport generate from \"@babel/generator\";\n\nimport type File from \"./file.ts\";\nimport mergeSourceMap from \"./merge-map.ts\";\n\nexport default function generateCode(\n pluginPasses: PluginPasses,\n file: File,\n): {\n outputCode: string;\n outputMap: GeneratorResult[\"map\"] | null;\n} {\n const { opts, ast, code, inputMap } = file;\n const { generatorOpts } = opts;\n\n generatorOpts.inputSourceMap = inputMap?.toObject();\n\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { generatorOverride } = plugin;\n if (generatorOverride) {\n const result = generatorOverride(ast, generatorOpts, code, generate);\n\n if (result !== undefined) results.push(result);\n }\n }\n }\n\n let result;\n if (results.length === 0) {\n result = generate(ast, generatorOpts, code);\n } else if (results.length === 1) {\n result = results[0];\n\n // @ts-expect-error check if generatorOverride returned a promise\n if (typeof result.then === \"function\") {\n throw new Error(\n `You appear to be using an async codegen plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version.`,\n );\n }\n } else {\n throw new Error(\"More than one plugin attempted to override codegen.\");\n }\n\n // Decoded maps are faster to merge, so we attempt to get use the decodedMap\n // first. But to preserve backwards compat with older Generator, we'll fall\n // back to the encoded map.\n let { code: outputCode, decodedMap: outputMap = result.map } = result;\n\n // @ts-expect-error For backwards compat.\n if (result.__mergedMap) {\n /**\n * @see mergeSourceMap\n */\n outputMap = { ...result.map };\n } else {\n if (outputMap) {\n if (inputMap) {\n // mergeSourceMap returns an encoded map\n outputMap = mergeSourceMap(\n inputMap.toObject(),\n outputMap,\n generatorOpts.sourceFileName,\n );\n } else {\n // We cannot output a decoded map, so retrieve the encoded form. Because\n // the decoded form is free, it's fine to prioritize decoded first.\n outputMap = result.map;\n }\n }\n }\n\n if (opts.sourceMaps === \"inline\" || opts.sourceMaps === \"both\") {\n outputCode += \"\\n\" + convertSourceMap.fromObject(outputMap).toComment();\n }\n\n if (opts.sourceMaps === \"inline\") {\n outputMap = null;\n }\n\n // @ts-expect-error outputMap must be an EncodedSourceMap or null\n return { outputCode, outputMap };\n}\n"],"mappings":";;;;;;AACA,SAAAA,kBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,iBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,IAAAG,SAAA,GAAAF,OAAA;AAEe,SAASG,YAAYA,CAClCC,YAA0B,EAC1BC,IAAU,EAIV;EACA,MAAM;IAAEC,IAAI;IAAEC,GAAG;IAAEC,IAAI;IAAEC;EAAS,CAAC,GAAGJ,IAAI;EAC1C,MAAM;IAAEK;EAAc,CAAC,GAAGJ,IAAI;EAE9BI,aAAa,CAACC,cAAc,GAAGF,QAAQ,oBAARA,QAAQ,CAAEG,QAAQ,CAAC,CAAC;EAEnD,MAAMC,OAAO,GAAG,EAAE;EAClB,KAAK,MAAMC,OAAO,IAAIV,YAAY,EAAE;IAClC,KAAK,MAAMW,MAAM,IAAID,OAAO,EAAE;MAC5B,MAAM;QAAEE;MAAkB,CAAC,GAAGD,MAAM;MACpC,IAAIC,iBAAiB,EAAE;QACrB,MAAMC,MAAM,GAAGD,iBAAiB,CAACT,GAAG,EAAEG,aAAa,EAAEF,IAAI,EAAEU,oBAAQ,CAAC;QAEpE,IAAID,MAAM,KAAKE,SAAS,EAAEN,OAAO,CAACO,IAAI,CAACH,MAAM,CAAC;MAChD;IACF;EACF;EAEA,IAAIA,MAAM;EACV,IAAIJ,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;IACxBJ,MAAM,GAAG,IAAAC,oBAAQ,EAACX,GAAG,EAAEG,aAAa,EAAEF,IAAI,CAAC;EAC7C,CAAC,MAAM,IAAIK,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;IAC/BJ,MAAM,GAAGJ,OAAO,CAAC,CAAC,CAAC;IAGnB,IAAI,OAAOI,MAAM,CAACK,IAAI,KAAK,UAAU,EAAE;MACrC,MAAM,IAAIC,KAAK,CACb,kDAAkD,GAChD,wDAAwD,GACxD,sCAAsC,GACtC,mDACJ,CAAC;IACH;EACF,CAAC,MAAM;IACL,MAAM,IAAIA,KAAK,CAAC,qDAAqD,CAAC;EACxE;EAKA,IAAI;IAAEf,IAAI,EAAEgB,UAAU;IAAEC,UAAU,EAAEC,SAAS,GAAGT,MAAM,CAACU;EAAI,CAAC,GAAGV,MAAM;EAGrE,IAAIA,MAAM,CAACW,WAAW,EAAE;IAItBF,SAAS,GAAAG,MAAA,CAAAC,MAAA,KAAQb,MAAM,CAACU,GAAG,CAAE;EAC/B,CAAC,MAAM;IACL,IAAID,SAAS,EAAE;MACb,IAAIjB,QAAQ,EAAE;QAEZiB,SAAS,GAAG,IAAAK,iBAAc,EACxBtB,QAAQ,CAACG,QAAQ,CAAC,CAAC,EACnBc,SAAS,EACThB,aAAa,CAACsB,cAChB,CAAC;MACH,Line truncated
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classPrivateGetter;
var _assertClassBrand = require("./assertClassBrand.js");
function _classPrivateGetter(privateMap, receiver, getter) {
return getter((0, _assertClassBrand.default)(privateMap, receiver));
}
//# sourceMappingURL=classPrivateGetter.js.map
@@ -0,0 +1,176 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
const gtFive = z.number().gt(5);
const gteFive = z.number().gte(-5).gte(5);
const minFive = z.number().min(0).min(5);
const ltFive = z.number().lte(10).lt(5);
const lteFive = z.number().lte(5);
const maxFive = z.number().max(10).max(5);
const intNum = z.number().int();
const positive = z.number().positive();
const negative = z.number().negative();
const nonpositive = z.number().nonpositive();
const nonnegative = z.number().nonnegative();
const multipleOfFive = z.number().multipleOf(5);
const multipleOfNegativeFive = z.number().multipleOf(-5);
const finite = z.number().finite();
const safe = z.number().safe();
const stepPointOne = z.number().step(0.1);
const stepPointZeroZeroZeroOne = z.number().step(0.0001);
const stepSixPointFour = z.number().step(6.4);
test("passing validations", () => {
z.number().parse(1);
z.number().parse(1.5);
z.number().parse(0);
z.number().parse(-1.5);
z.number().parse(-1);
z.number().parse(Number.POSITIVE_INFINITY);
z.number().parse(Number.NEGATIVE_INFINITY);
gtFive.parse(6);
gtFive.parse(Number.POSITIVE_INFINITY);
gteFive.parse(5);
gteFive.parse(Number.POSITIVE_INFINITY);
minFive.parse(5);
minFive.parse(Number.POSITIVE_INFINITY);
ltFive.parse(4);
ltFive.parse(Number.NEGATIVE_INFINITY);
lteFive.parse(5);
lteFive.parse(Number.NEGATIVE_INFINITY);
maxFive.parse(5);
maxFive.parse(Number.NEGATIVE_INFINITY);
intNum.parse(4);
positive.parse(1);
positive.parse(Number.POSITIVE_INFINITY);
negative.parse(-1);
negative.parse(Number.NEGATIVE_INFINITY);
nonpositive.parse(0);
nonpositive.parse(-1);
nonpositive.parse(Number.NEGATIVE_INFINITY);
nonnegative.parse(0);
nonnegative.parse(1);
nonnegative.parse(Number.POSITIVE_INFINITY);
multipleOfFive.parse(15);
multipleOfFive.parse(-15);
multipleOfNegativeFive.parse(-15);
multipleOfNegativeFive.parse(15);
finite.parse(123);
safe.parse(Number.MIN_SAFE_INTEGER);
safe.parse(Number.MAX_SAFE_INTEGER);
stepPointOne.parse(6);
stepPointOne.parse(6.1);
stepPointOne.parse(6.1);
stepSixPointFour.parse(12.8);
stepPointZeroZeroZeroOne.parse(3.01);
});
test("failing validations", () => {
expect(() => ltFive.parse(5)).toThrow();
expect(() => lteFive.parse(6)).toThrow();
expect(() => maxFive.parse(6)).toThrow();
expect(() => gtFive.parse(5)).toThrow();
expect(() => gteFive.parse(4)).toThrow();
expect(() => minFive.parse(4)).toThrow();
expect(() => intNum.parse(3.14)).toThrow();
expect(() => positive.parse(0)).toThrow();
expect(() => positive.parse(-1)).toThrow();
expect(() => negative.parse(0)).toThrow();
expect(() => negative.parse(1)).toThrow();
expect(() => nonpositive.parse(1)).toThrow();
expect(() => nonnegative.parse(-1)).toThrow();
expect(() => multipleOfFive.parse(7.5)).toThrow();
expect(() => multipleOfFive.parse(-7.5)).toThrow();
expect(() => multipleOfNegativeFive.parse(-7.5)).toThrow();
expect(() => multipleOfNegativeFive.parse(7.5)).toThrow();
expect(() => finite.parse(Number.POSITIVE_INFINITY)).toThrow();
expect(() => finite.parse(Number.NEGATIVE_INFINITY)).toThrow();
expect(() => safe.parse(Number.MIN_SAFE_INTEGER - 1)).toThrow();
expect(() => safe.parse(Number.MAX_SAFE_INTEGER + 1)).toThrow();
expect(() => stepPointOne.parse(6.11)).toThrow();
expect(() => stepPointOne.parse(6.1000000001)).toThrow();
expect(() => stepSixPointFour.parse(6.41)).toThrow();
});
test("parse NaN", () => {
expect(() => z.number().parse(Number.NaN)).toThrow();
});
test("min max getters", () => {
expect(z.number().minValue).toBeNull;
expect(ltFive.minValue).toBeNull;
expect(lteFive.minValue).toBeNull;
expect(maxFive.minValue).toBeNull;
expect(negative.minValue).toBeNull;
expect(nonpositive.minValue).toBeNull;
expect(intNum.minValue).toBeNull;
expect(multipleOfFive.minValue).toBeNull;
expect(finite.minValue).toBeNull;
expect(gtFive.minValue).toEqual(5);
expect(gteFive.minValue).toEqual(5);
expect(minFive.minValue).toEqual(5);
expect(minFive.min(10).minValue).toEqual(10);
expect(positive.minValue).toEqual(0);
expect(nonnegative.minValue).toEqual(0);
expect(safe.minValue).toEqual(Number.MIN_SAFE_INTEGER);
expect(z.number().maxValue).toBeNull;
expect(gtFive.maxValue).toBeNull;
expect(gteFive.maxValue).toBeNull;
expect(minFive.maxValue).toBeNull;
expect(positive.maxValue).toBeNull;
expect(nonnegative.maxValue).toBeNull;
expect(intNum.minValue).toBeNull;
expect(multipleOfFive.minValue).toBeNull;
expect(finite.minValue).toBeNull;
expect(ltFive.maxValue).toEqual(5);
expect(lteFive.maxValue).toEqual(5);
expect(maxFive.maxValue).toEqual(5);
expect(maxFive.max(1).maxValue).toEqual(1);
expect(negative.maxValue).toEqual(0);
expect(nonpositive.maxValue).toEqual(0);
expect(safe.maxValue).toEqual(Number.MAX_SAFE_INTEGER);
});
test("int getter", () => {
expect(z.number().isInt).toEqual(false);
expect(z.number().multipleOf(1.5).isInt).toEqual(false);
expect(gtFive.isInt).toEqual(false);
expect(gteFive.isInt).toEqual(false);
expect(minFive.isInt).toEqual(false);
expect(positive.isInt).toEqual(false);
expect(nonnegative.isInt).toEqual(false);
expect(finite.isInt).toEqual(false);
expect(ltFive.isInt).toEqual(false);
expect(lteFive.isInt).toEqual(false);
expect(maxFive.isInt).toEqual(false);
expect(negative.isInt).toEqual(false);
expect(nonpositive.isInt).toEqual(false);
expect(safe.isInt).toEqual(false);
expect(intNum.isInt).toEqual(true);
expect(multipleOfFive.isInt).toEqual(true);
});
test("finite getter", () => {
expect(z.number().isFinite).toEqual(false);
expect(gtFive.isFinite).toEqual(false);
expect(gteFive.isFinite).toEqual(false);
expect(minFive.isFinite).toEqual(false);
expect(positive.isFinite).toEqual(false);
expect(nonnegative.isFinite).toEqual(false);
expect(ltFive.isFinite).toEqual(false);
expect(lteFive.isFinite).toEqual(false);
expect(maxFive.isFinite).toEqual(false);
expect(negative.isFinite).toEqual(false);
expect(nonpositive.isFinite).toEqual(false);
expect(finite.isFinite).toEqual(true);
expect(intNum.isFinite).toEqual(true);
expect(multipleOfFive.isFinite).toEqual(true);
expect(z.number().min(5).max(10).isFinite).toEqual(true);
expect(safe.isFinite).toEqual(true);
});
@@ -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 Library = createLucideIcon("Library", [
["path", { d: "m16 6 4 14", key: "ji33uf" }],
["path", { d: "M12 6v14", key: "1n7gus" }],
["path", { d: "M8 8v12", key: "1gg7y9" }],
["path", { d: "M4 4v16", key: "6qkkli" }]
]);
export { Library as default };
//# sourceMappingURL=library.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ice-cream.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,68 @@
import { JOSENotSupported } from '../util/errors.js';
import { checkSigCryptoKey } from './crypto_key.js';
import { invalidKeyInput } from './invalid_key_input.js';
export function checkKeyLength(alg, key) {
if (alg.startsWith('RS') || alg.startsWith('PS')) {
const { modulusLength } = key.algorithm;
if (typeof modulusLength !== 'number' || modulusLength < 2048) {
throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);
}
}
}
function subtleAlgorithm(alg, algorithm) {
const hash = `SHA-${alg.slice(-3)}`;
switch (alg) {
case 'HS256':
case 'HS384':
case 'HS512':
return { hash, name: 'HMAC' };
case 'PS256':
case 'PS384':
case 'PS512':
return { hash, name: 'RSA-PSS', saltLength: parseInt(alg.slice(-3), 10) >> 3 };
case 'RS256':
case 'RS384':
case 'RS512':
return { hash, name: 'RSASSA-PKCS1-v1_5' };
case 'ES256':
case 'ES384':
case 'ES512':
return { hash, name: 'ECDSA', namedCurve: algorithm.namedCurve };
case 'Ed25519':
case 'EdDSA':
return { name: 'Ed25519' };
case 'ML-DSA-44':
case 'ML-DSA-65':
case 'ML-DSA-87':
return { name: alg };
default:
throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);
}
}
async function getSigKey(alg, key, usage) {
if (key instanceof Uint8Array) {
if (!alg.startsWith('HS')) {
throw new TypeError(invalidKeyInput(key, 'CryptoKey', 'KeyObject', 'JSON Web Key'));
}
return crypto.subtle.importKey('raw', key, { hash: `SHA-${alg.slice(-3)}`, name: 'HMAC' }, false, [usage]);
}
checkSigCryptoKey(key, alg, usage);
return key;
}
export async function sign(alg, key, data) {
const cryptoKey = await getSigKey(alg, key, 'sign');
checkKeyLength(alg, cryptoKey);
const signature = await crypto.subtle.sign(subtleAlgorithm(alg, cryptoKey.algorithm), cryptoKey, data);
return new Uint8Array(signature);
}
export async function verify(alg, key, signature, data) {
const cryptoKey = await getSigKey(alg, key, 'verify');
checkKeyLength(alg, cryptoKey);
const algorithm = subtleAlgorithm(alg, cryptoKey.algorithm);
try {
return await crypto.subtle.verify(algorithm, cryptoKey, signature, data);
}
catch {
return false;
}
}
@@ -0,0 +1 @@
{"version":3,"file":"weight.js","sources":["../../../src/icons/weight.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Weight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjUiIHI9IjMiIC8+CiAgPHBhdGggZD0iTTYuNSA4YTIgMiAwIDAgMC0xLjkwNSAxLjQ2TDIuMSAxOC41QTIgMiAwIDAgMCA0IDIxaDE2YTIgMiAwIDAgMCAxLjkyNS0yLjU0TDE5LjQgOS41QTIgMiAwIDAgMCAxNy40OCA4WiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/weight\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 Weight = createLucideIcon('Weight', [\n ['circle', { cx: '12', cy: '5', r: '3', key: 'rqqgnr' }],\n [\n 'path',\n {\n d: 'M6.5 8a2 2 0 0 0-1.905 1.46L2.1 18.5A2 2 0 0 0 4 21h16a2 2 0 0 0 1.925-2.54L19.4 9.5A2 2 0 0 0 17.48 8Z',\n key: '56o5sh',\n },\n ],\n]);\n\nexport default Weight;\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,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACvD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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,627 @@
flf2a$ 6 5 16 0 14
Original font by Gordon Lee <93cmgl@eng.cam.ac.uk>
==================================================
Original figletization by Tony Nugent (T.Nugent@sct.gu.edu.au)
Version 1 - Needs refining with hardblanks and cleaning up of some of
the characters. The last 6 chars need to be done properly.
==================================================
Version 2 by Ian Chai <spectre@uiuc.edu> Added the hardblank fix and
the German characters.
==================================================
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
oo$ @
8888$@
8888$@
88$ @
oo$ @
@@
888 888$@
888 888$@
@
@
@
@@
ooo ooo$ @
o888ooo888o$@
888 888$ @
o888ooo888o$@
888 888$ @
@@
oo oo$ @
oo88o88o8$ @
88o88o88oo$ @
88 88 88$@
o8o88o88o8$ @
88 88$ @@
oo ooo$@
8 8 o88$ @
88 o88 oo$ @
o88 8 8$@
o88 88$ @
@@
oooooo$ @
888 888$ @
88o88 o88$@
888 88o8$ @
888o88 88o$@
@@
888$@
888$@
o88$ @
@
@
@@
o88$@
888$ @
888$ @
888$ @
888$ @
88o$@@
88o$ @
888$ @
888$@
888$@
888$ @
o88$ @@
oo oo$ @
88oo88$ @
o88888888o$@
oo88oo$ @
o88 88o$ @
@@
ooo$ @
888$ @
oooo888oooo$@
888$ @
888$ @
@@
@
@
@
ooo$@
888$@
o88$ @@
@
@
ooooooooo$@
@
@
@@
@
@
@
ooo$@
888$@
@@
o88$@
o88$ @
o88$ @
o88$ @
o88$ @
o88$ @@
ooooooo$ @
o888 o888o$@
888 8 888$@
888o8 o888$@
88ooo88$ @
@@
oo$ @
o888$ @
888$ @
888$ @
o888o$@
@@
ooooooo$ @
o88 888$@
o888$ @
o888 o$@
o8888oooo88$@
@@
ooooooo$ @
o88 888o$@
88888o$ @
88o o888$@
88ooo88$ @
@@
o88$ @
o8888$ @
o88 888$ @
o888oo888oo$@
o888o$ @
@@
oooooooooo$ @
888$ @
888888888o$ @
ooo o888$@
88ooo88$ @
@@
ooooooo$ @
o88$ @
888888888o$ @
88o o888$@
88ooo88$ @
@@
ooooooooooo$@
888 888$ @
888$ @
888$ @
888$ @
@@
ooooooo$ @
o888 888o$@
888888888$ @
888o o888$@
88ooo88$ @
@@
ooooooo$ @
888 88o$@
888oo8888$@
888$ @
o888$ @
@@
@
ooo$@
888$@
ooo$@
888$@
@@
ooo$@
888$@
ooo$@
888$@
o88$ @
@@
o88$@
o88$ @
o88$ @
88o$ @
88o$@
@@
@
ooooooooo$@
@
ooooooooo$@
@
@@
88o$ @
88o$ @
88o$@
o88$ @
o88$ @
@@
o8888888o$ @
888 888$@
o888$ @
888$ @
ooo$ @
@@
o8888888o$ @
888 oo 888$@
888 8 8 888$@
888 88o88$ @
888ooooo8$ @
@@
o$ @
888$ @
8 88$ @
8oooo88$ @
o88o o888o$@
@@
oooooooooo$ @
888 888$@
888oooo88$ @
888 888$@
o888ooo888$ @
@@
oooooooo8$@
o888 88$@
888$ @
888o oo$@
888oooo88$ @
@@
ooooooooo$ @
888 88o$@
888 888$@
888 888$@
o888ooo88$ @
@@
ooooooooooo$@
888 88$ @
888ooo8$ @
888 oo$ @
o888ooo8888$@
@@
ooooooooooo$@
888 88$ @
888ooo8$ @
888$ @
o888o$ @
@@
ooooooo8$ @
o888 88$ @
888 oooo$@
888o 88$ @
888ooo888$ @
@@
ooooo ooooo$@
888 888$ @
888ooo888$ @
888 888$ @
o888o o888o$@
@@
ooooo$@
888$ @
888$ @
888$ @
o888o$@
@@
ooooo$@
888$ @
888$ @
888$ @
888$ @
8o888$ @@
oooo oooo$@
888 o88$ @
888888$ @
888 88o$ @
o888o o888o$@
@@
ooooo$ @
888$ @
888$ @
888 o$@
o888ooooo88$@
@@
oooo oooo$@
8888o 888$ @
88 888o8 88$ @
88 888 88$ @
o88o 8 o88o$@
@@
oooo oooo$@
8888o 88$ @
88 888o88$ @
88 8888$ @
o88o 88$ @
@@
ooooooo$ @
o888 888o$@
888 888$@
888o o888$@
88ooo88$ @
@@
oooooooooo$ @
888 888$@
888oooo88$ @
888$ @
o888o$ @
@@
ooooooo$ @
o888 888o$@
888 888$@
888o 8o888$@
88ooo88$ @
88o8$@@
oooooooooo$ @
888 888$@
888oooo88$ @
888 88o$ @
o888o 88o8$@
@@
oooooooo8$ @
888$ @
888oooooo$ @
888$@
o88oooo888$ @
@@
ooooooooooo$@
88 888 88$@
888$ @
888$ @
o888o$ @
@@
ooooo oooo$@
888 88$ @
888 88$ @
888 88$ @
888oo88$ @
@@
ooooo oooo$@
888 88$ @
888 88$ @
88888$ @
888$ @
@@
oooo oooo$@
88 88 88$ @
88 888 88$ @
888 888$ @
8 8$ @
@@
ooooo oooo$@
888 88$ @
888$ @
88 888$ @
o88o o888o$@
@@
ooooo oooo$@
888 88$ @
888$ @
888$ @
o888o$ @
@@
ooooooooooo$@
88 888$ @
888$ @
888 oo$@
o888oooo888$@
@@
888888$@
888$ @
888$ @
888$ @
888$ @
888888$@@
88o$ @
88o$ @
88o$ @
88o$ @
88o$ @
88o$@@
888888$@
888$@
888$@
888$@
888$@
888888$@@
o$ @
o8o$ @
o888o$ @
o88o88o$ @
o8888888o$@
@@
@
@
@
@
@
oooooooooooo$@@
888$ @
888$ @
88o$@
@
@
@@
@
ooooooo$ @
ooooo888$ @
888 888$ @
88ooo88 8o$@
@@
oooo$ @
888ooooo$ @
888 888$@
888 888$@
o888ooo88$ @
@@
@
ooooooo$ @
888 888$@
888$ @
88ooo888$ @
@@
oooo$@
ooooo888$ @
888 888$ @
888 888$ @
88ooo888o$@
@@
@
ooooooooo8$@
888oooooo8$ @
888$ @
88oooo888$@
@@
o888o$@
o888oo$ @
888$ @
888$ @
o888o$ @
@@
@
oooooooo8$@
888 88o$ @
888oo888o$ @
888 888$@
888ooo888$ @@
oooo$ @
888ooooo$ @
888 888$ @
888 888$ @
o888o o888o$@
@@
o88$ @
oooo$ @
888$ @
888$ @
o888o$@
@@
o88$@
oooo$@
888$@
888$@
888$@
o88$ @@
oooo$ @
888 ooooo$@
888o888$ @
8888 88o$ @
o888o o888o$@
@@
o888$ @
888$ @
888$ @
888$ @
o888o$@
@@
@
oo ooo oooo$ @
888 888 888$ @
888 888 888$ @
o888o888o888o$@
@@
@
oo oooooo$ @
888 888$ @
888 888$ @
o888o o888o$@
@@
@
ooooooo$ @
888 888$@
888 888$@
88ooo88$ @
@@
@
ooooooooo$ @
888 888$@
888 888$@
888ooo88$ @
o888$ @@
@
ooooooooo$@
888 888$ @
888 888$ @
88ooo888$ @
888o$@@
@
oo oooooo$ @
888 888$@
888$ @
o888o$ @
@@
@
oooooooo8$ @
888ooooooo$ @
888$@
88oooooo88$ @
@@
o8$ @
o888oo$@
888$ @
888$ @
888o$@
@@
@
oooo oooo$ @
888 888$ @
888 888$ @
888o88 8o$@
@@
@
oooo oooo$@
888 888$ @
888 888$ @
888$ @
@@
@
oooo o oooo$@
888 888 888$ @
888888888$ @
88 88$ @
@@
@
oooo oooo$@
888o888$ @
o88 88o$ @
o88o o88o$@
@@
@
oooo oooo$@
888 888$ @
888 888$ @
8888$ @
o8o888$ @@
@
ooooooooooo$@
8888$ @
8888$ @
o888ooooooo$@
@@
o8888$@
888$ @
o888$ @
888o$ @
888$ @
8888o$@@
888$@
888$@
888$@
888$@
888$@
888$@@
8888o$ @
888$ @
888o$@
o888$@
888$ @
o8888$ @@
o888o o888$@
888 888888$ @
@
@
@
@@
88 o 88$ @
888$ @
8 88$ @
8oooo88$ @
o88o o888o$@
@@
88ooooo88$ @
o888 888o$@
888 888$@
888o o888$@
88ooo88$ @
@@
o88oo o88o$@
888 88$ @
888 88$ @
888 88$ @
888oo88$ @
@@
88 88$ @
ooooooo$ @
ooooo888$ @
888 888$ @
88ooo88 8o$@
@@
88 88$ @
ooooooo$ @
888 888$@
888 888$@
88ooo88$ @
@@
88 88 @
oooo oooo$ @
888 888$ @
888 888$ @
888o88 8o$@
@@
ooooooo$ @
o88 888$@
888oooo88$ @
888 888$@
888 oo888$ @
o88 @@
@@ -0,0 +1 @@
{"version":3,"file":"searchParams.cjs","names":[],"sources":["../../src/searchParams.ts"],"sourcesContent":["import { decode, encode } from './qss'\nimport type { AnySchema } from './validators'\n\n/** Default `parseSearch` that strips leading '?' and JSON-parses values. */\nexport const defaultParseSearch = parseSearchWith(JSON.parse)\n/** Default `stringifySearch` using JSON.stringify for complex values. */\nexport const defaultStringifySearch = stringifySearchWith(\n JSON.stringify,\n JSON.parse,\n)\n\n/**\n * Build a `parseSearch` function using a provided JSON-like parser.\n *\n * The returned function strips a leading `?`, decodes values, and attempts to\n * JSON-parse string values using the given `parser`.\n *\n * @param parser Function to parse a string value (e.g. `JSON.parse`).\n * @returns A `parseSearch` function compatible with `Router` options.\n * @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization\n */\nexport function parseSearchWith(parser: (str: string) => any) {\n return (searchStr: string): AnySchema => {\n if (searchStr[0] === '?') {\n searchStr = searchStr.substring(1)\n }\n\n const query: Record<string, unknown> = decode(searchStr)\n\n // Try to parse any query params that might be json\n for (const key in query) {\n const value = query[key]\n if (typeof value === 'string') {\n try {\n query[key] = parser(value)\n } catch (_err) {\n // silent\n }\n }\n }\n\n return query\n }\n}\n\n/**\n * Build a `stringifySearch` function using a provided serializer.\n *\n * Non-primitive values are serialized with `stringify`. If a `parser` is\n * supplied, string values that are parseable are re-serialized to ensure\n * symmetry with `parseSearch`.\n *\n * @param stringify Function to serialize a value (e.g. `JSON.stringify`).\n * @param parser Optional parser to detect parseable strings.\n * @returns A `stringifySearch` function compatible with `Router` options.\n * @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization\n */\nexport function stringifySearchWith(\n stringify: (search: any) => string,\n parser?: (str: string) => any,\n) {\n const hasParser = typeof parser === 'function'\n function stringifyValue(val: any) {\n if (typeof val === 'object' && val !== null) {\n try {\n return stringify(val)\n } catch (_err) {\n // silent\n }\n } else if (hasParser && typeof val === 'string') {\n try {\n // Check if it's a valid parseable string.\n // If it is, then stringify it again.\n parser(val)\n return stringify(val)\n } catch (_err) {\n // silent\n }\n }\n return val\n }\n\n return (search: Record<string, any>) => {\n const searchStr = encode(search, stringifyValue)\n return searchStr ? `?${searchStr}` : ''\n }\n}\n\nexport type SearchSerializer = (searchObj: Record<string, any>) => string\nexport type SearchParser = (searchStr: string) => Record<string, any>\n"],"mappings":";;;AAIA,MAAa,qBAAqB,gBAAgB,KAAK,MAAM;;AAE7D,MAAa,yBAAyB,oBACpC,KAAK,WACL,KAAK,MACN;;;;;;;;;;;AAYD,SAAgB,gBAAgB,QAA8B;AAC5D,SAAQ,cAAiC;AACvC,MAAI,UAAU,OAAO,IACnB,aAAY,UAAU,UAAU,EAAE;EAGpC,MAAM,QAAiC,YAAA,OAAO,UAAU;AAGxD,OAAK,MAAM,OAAO,OAAO;GACvB,MAAM,QAAQ,MAAM;AACpB,OAAI,OAAO,UAAU,SACnB,KAAI;AACF,UAAM,OAAO,OAAO,MAAM;YACnB,MAAM;;AAMnB,SAAO;;;;;;;;;;;;;;;AAgBX,SAAgB,oBACd,WACA,QACA;CACA,MAAM,YAAY,OAAO,WAAW;CACpC,SAAS,eAAe,KAAU;AAChC,MAAI,OAAO,QAAQ,YAAY,QAAQ,KACrC,KAAI;AACF,UAAO,UAAU,IAAI;WACd,MAAM;WAGN,aAAa,OAAO,QAAQ,SACrC,KAAI;AAGF,UAAO,IAAI;AACX,UAAO,UAAU,IAAI;WACd,MAAM;AAIjB,SAAO;;AAGT,SAAQ,WAAgC;EACtC,MAAM,YAAY,YAAA,OAAO,QAAQ,eAAe;AAChD,SAAO,YAAY,IAAI,cAAc"}
@@ -0,0 +1,139 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "caractères", verb: "avoir" },
file: { unit: "octets", verb: "avoir" },
array: { unit: "éléments", verb: "avoir" },
set: { unit: "éléments", verb: "avoir" },
map: { unit: "éléments", verb: "avoir" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "entrée",
email: "adresse courriel",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "date-heure ISO",
date: "date ISO",
time: "heure ISO",
duration: "durée ISO",
ipv4: "adresse IPv4",
ipv6: "adresse IPv6",
mac: "adresse MAC",
cidrv4: "plage IPv4",
cidrv6: "plage IPv6",
base64: "chaîne encodée en base64",
base64url: "chaîne encodée en base64url",
json_string: "chaîne JSON",
e164: "numéro E.164",
credit_card: "numéro de carte de crédit",
currency_code: "code de devise",
iban: "IBAN",
jwt: "JWT",
template_literal: "entrée",
};
const TypeDictionary = {
nan: "NaN",
};
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 `Entrée invalide : attendu instanceof ${issue.expected}, reçu ${received}`;
}
return `Entrée invalide : attendu ${expected}, reçu ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Entrée invalide : attendu ${util.stringifyPrimitive(issue.values[0])}`;
return `Option invalide : attendu l'une des valeurs suivantes ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "≤" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Trop grand : attendu que ${issue.origin ?? "la valeur"} ait ${adj}${issue.maximum.toString()} ${sizing.unit}`;
return `Trop grand : attendu que ${issue.origin ?? "la valeur"} soit ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? "≥" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Trop petit : attendu que ${issue.origin} ait ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Trop petit : attendu que ${issue.origin} soit ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `Chaîne invalide : doit commencer par "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `Chaîne invalide : doit se terminer par "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Chaîne invalide : doit inclure "${_issue.includes}"`;
if (_issue.format === "regex")
return `Chaîne invalide : doit correspondre au motif ${_issue.pattern}`;
return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;
}
case "not_multiple_of":
return `Nombre invalide : doit être un multiple de ${issue.divisor}`;
case "unrecognized_keys":
return `Clé${issue.keys.length > 1 ? "s" : ""} non reconnue${issue.keys.length > 1 ? "s" : ""} : ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Clé invalide dans ${issue.origin}`;
case "invalid_union":
return "Entrée invalide";
case "invalid_element":
return `Valeur invalide dans ${issue.origin}`;
default:
return `Entrée invalide`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
module.exports = exports.default;
@@ -0,0 +1,23 @@
import { expect, test } from "vitest";
import * as z from "zod/v4";
declare module "zod/v4" {
interface ZodType {
/** @deprecated */
_classic(): string;
}
}
test("prototype extension", () => {
z.ZodType.prototype._classic = function () {
return "_classic";
};
// should pass
const result = z.string()._classic();
expect(result).toBe("_classic");
// expectTypeOf<typeof result>().toEqualTypeOf<string>();
// clean up
z.ZodType.prototype._classic = undefined;
});
@@ -0,0 +1 @@
{"version":3,"file":"filter.mjs","sources":["../../../../../src/value/types/complex/filter.ts"],"sourcesContent":["import { complex } from \".\"\nimport { floatRegex } from \"../utils/float-regex\"\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"])\n\nfunction applyDefaultFilter(v: string) {\n const [name, value] = v.slice(0, -1).split(\"(\")\n\n if (name === \"drop-shadow\") return v\n\n const [number] = value.match(floatRegex) || []\n if (!number) return v\n\n const unit = value.replace(number, \"\")\n let defaultValue = maxDefaults.has(name) ? 1 : 0\n if (number !== value) defaultValue *= 100\n\n return name + \"(\" + defaultValue + unit + \")\"\n}\n\nconst functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu\n\nexport const filter = {\n ...complex,\n getAnimatableNone: (v: string) => {\n const functions = v.match(functionRegex)\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v\n },\n}\n"],"names":[],"mappings":";;;AAGA;;AAEG;AACH,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;AAE9E,SAAS,kBAAkB,CAAC,CAAS,EAAA;IACjC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;IAE/C,IAAI,IAAI,KAAK,aAAa;AAAE,QAAA,OAAO,CAAC;AAEpC,IAAA,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE;AAC9C,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,CAAC;IAErB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;AACtC,IAAA,IAAI,YAAY,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAChD,IAAI,MAAM,KAAK,KAAK;QAAE,YAAY,IAAI,GAAG;IAEzC,OAAO,IAAI,GAAG,GAAG,GAAG,YAAY,GAAG,IAAI,GAAG,GAAG;AACjD;AAEA,MAAM,aAAa,GAAG,sBAAsB;AAErC,MAAM,MAAM,GAAG;AAClB,IAAA,GAAG,OAAO;AACV,IAAA,iBAAiB,EAAE,CAAC,CAAS,KAAI;QAC7B,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;AACxC,QAAA,OAAO,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IACtE,CAAC;;;;;"}