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

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

No files matched your search

@@ -0,0 +1,4 @@
var K=Object.defineProperty;var o=(s,e)=>K(s,"name",{value:e,configurable:!0});import{r as Y}from"./get-pipe-path-BHW2eJdv.mjs";import d from"node:module";import p from"node:path";import{fileURLToPath as O}from"node:url";import{parseTsconfig as V,getTsconfig as Z,createFilesMatcher as q,createPathsMatcher as ee}from"get-tsconfig";import se,{writeSync as te}from"node:fs";import{b as ne,i as ae,a as re}from"./index-7AaEi15b.mjs";import{p as U}from"./client-BQVF1NaW.mjs";import{inspect as oe}from"node:util";import{b as ce,a as ie,c as le,d as fe,o as W}from"./index-gbaejti9.mjs";const R=o(s=>{if(!s.startsWith("data:text/javascript,"))return;const e=s.indexOf("?");if(e===-1)return;const n=new URLSearchParams(s.slice(e+1)).get("filePath");if(n)return n},"getOriginalFilePath"),D=o(s=>{const e=R(s);return e&&(d._cache[e]=d._cache[s],delete d._cache[s],s=e),s},"interopCjsExports"),me=o(s=>{const e=s.indexOf(":");if(e!==-1)return s.slice(0,e)},"getScheme"),N=o(s=>s[0]==="."&&(s[1]==="/"||s[1]==="."||s[2]==="/"),"isRelativePath"),j=o(s=>N(s)||p.isAbsolute(s),"isFilePath"),pe=o(s=>{if(j(s))return!0;const e=me(s);return e&&e!=="node"},"requestAcceptsQuery"),y="file://",he=[".ts",".tsx",".jsx",".mts",".cts"],C=/\.([cm]?ts|[tj]sx)($|\?)/,de=/[/\\].+\.(?:cts|cjs)(?:$|\?)/,ue=/\.json($|\?)/,E=/\/(?:$|\?)/,ge=/^(?:@[^/]+\/)?[^/\\]+$/,Q=`${p.sep}node_modules${p.sep}`;let M,_,S=!1;const A=o(s=>{let e=null;if(s){const a=p.resolve(s);e={path:a,config:V(a)}}else{try{e=Z()}catch{}if(!e)return}M=q(e),_=ee(e),S=e?.config.compilerOptions?.allowJs??!1},"loadTsconfig"),T=o(s=>Array.from(s).length>0?`?${s.toString()}`:"","urlSearchParamsStringify"),Pe=`
//# sourceMappingURL=data:application/json;base64,`,I=o(()=>process.sourceMapsEnabled??!0,"shouldApplySourceMap"),F=o(({code:s,map:e})=>s+Pe+Buffer.from(JSON.stringify(e),"utf8").toString("base64"),"inlineSourceMap"),v=Number(process.env.TSX_DEBUG);v&&(W.enabled=!0,W.supportLevel=3);const J=o(s=>(e,...a)=>{if(!v||e>v)return;const n=`${fe(` tsx P${process.pid} `)} ${s}`,t=a.map(r=>typeof r=="string"?r:oe(r,{colors:!0})).join(" ");te(1,`${n} ${t}
`)},"createLog"),P=J(ce(ie(" CJS "))),je=J(le(" ESM ")),be=[".cts",".mts",".ts",".tsx",".jsx"],xe=[".js",".cjs",".mjs"],k=[".ts",".tsx",".jsx"],$=o((s,e,a,n)=>{const t=Object.getOwnPropertyDescriptor(s,e);t?.set?s[e]=a:(!t||t.configurable)&&Object.defineProperty(s,e,{value:a,enumerable:t?.enumerable||n?.enumerable,writable:n?.writable??(t?t.writable:!0),configurable:n?.configurable??(t?t.configurable:!0)})},"safeSet"),ye=o((s,e,a)=>{const n=e[".js"],t=o((r,c)=>{if(s.enabled===!1)return n(r,c);const[i,f]=c.split("?");if((new URLSearchParams(f).get("namespace")??void 0)!==a)return n(r,c);P(2,"load",{filePath:c}),r.id.startsWith("data:text/javascript,")&&(r.path=p.dirname(i)),U?.send&&U.send({type:"dependency",path:i});const u=be.some(m=>i.endsWith(m)),g=xe.some(m=>i.endsWith(m));if(!u&&!g)return n(r,i);let h=se.readFileSync(i,"utf8");if(i.endsWith(".cjs")){const m=ne(c,h);m&&(h=I()?F(m):m.code)}else if(u||ae(h)){const m=re(h,c,{tsconfigRaw:M?.(i)});h=I()?F(m):m.code}P(1,"loaded",{filePath:i}),r._compile(h,i)},"transformer");$(e,".js",t);for(const r of k)$(e,r,t,{enumerable:!a,writable:!0,configurable:!0});return $(e,".mjs",t,{writable:!0,configurable:!0}),()=>{e[".js"]===t&&(e[".js"]=n);for(const r of[...k,".mjs"])e[r]===t&&delete e[r]}},"createExtensions"),Ee=o(s=>e=>{if((e==="."||e===".."||e.endsWith("/.."))&&(e+="/"),E.test(e)){let a=p.join(e,"index.js");e.startsWith("./")&&(a=`./${a}`);try{return s(a)}catch{}}try{return s(e)}catch(a){const n=a;if(n.code==="MODULE_NOT_FOUND")try{return s(`${e}${p.sep}index.js`)}catch{}throw n}},"createImplicitResolver"),B=[".js",".json"],G=[".ts",".tsx",".jsx"],_e=[...G,...B],Se=[...B,...G],b=Object.create(null);b[".js"]=[".ts",".tsx",".js",".jsx"],b[".jsx"]=[".tsx",".ts",".jsx",".js"],b[".cjs"]=[".cts"],b[".mjs"]=[".mts"];const X=o(s=>{const e=s.split("?"),a=e[1]?`?${e[1]}`:"",[n]=e,t=p.extname(n),r=[],c=b[t];if(c){const f=n.slice(0,-t.length);r.push(...c.map(l=>f+l+a))}const i=!(s.startsWith(y)||j(n))||n.includes(Q)||n.includes("/node_modules/")?Se:_e;return r.push(...i.map(f=>n+f+a)),r},"mapTsExtensions"),w=o((s,e,a)=>{if(P(3,"resolveTsFilename",{request:e,isDirectory:E.test(e),isTsParent:a,allowJs:S}),E.test(e)||!a&&!S)return;const n=X(e);if(n)for(const t of n)try{return s(t)}catch(r){const{code:c}=r;if(c!=="MODULE_NOT_FOUND"&&c!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw r}},"resolveTsFilename"),ve=o((s,e)=>a=>{if(P(3,"resolveTsFilename",{request:a,isTsParent:e,isFilePath:j(a)}),j(a)){const n=w(s,a,e);if(n)return n}try{return s(a)}catch(n){const t=n;if(t.code==="MODULE_NOT_FOUND"){if(t.path){const c=t.message.match(/^Cannot find module '([^']+)'$/);if(c){const f=c[1],l=w(s,f,e);if(l)return l}const i=t.message.match(/^Cannot find module '([^']+)'. Please verify that the package.json has a valid "main" entry$/);if(i){const f=i[1],l=w(s,f,e);if(l)return l}}const r=w(s,a,e);if(r)return r}throw t}},"createTsExtensionResolver"),z="at cjsPreparseModuleExports (node:internal",we=o(s=>{const e=s.stack.split(`
`).slice(1);return e[1].includes(z)||e[2].includes(z)},"isFromCjsLexer"),Me=o((s,e)=>{const a=s.split("?"),n=new URLSearchParams(a[1]);if(e?.filename){const t=R(e.filename);let r;if(t){const f=t.split("?"),l=f[0];r=f[1],e.filename=l,e.path=p.dirname(l),e.paths=d._nodeModulePaths(e.path),d._cache[l]=e}r||(r=e.filename.split("?")[1]);const i=new URLSearchParams(r).get("namespace");i&&n.append("namespace",i)}return[a[0],n,(t,r)=>(p.isAbsolute(t)&&!t.endsWith(".json")&&!t.endsWith(".node")&&!(r===0&&we(new Error))&&(t+=T(n)),t)]},"preserveQuery"),Te=o((s,e,a)=>{if(s.startsWith(y)&&(s=O(s)),_&&!j(s)&&!e?.filename?.includes(Q)){const n=_(s);for(const t of n)try{return a(t)}catch{}}return a(s)},"resolveTsPaths"),Fe=o((s,e,a)=>(n,t,...r)=>{if(s.enabled===!1)return e(n,t,...r);n=D(n);const[c,i,f]=Me(n,t);if((i.get("namespace")??void 0)!==a)return e(n,t,...r);P(2,"resolve",{request:n,parent:t?.filename??t,restOfArgs:r});let l=o(g=>e(g,t,...r),"nextResolveSimple");l=ve(l,!!(a||t?.filename&&C.test(t.filename))),l=Ee(l);const u=f(Te(c,t,l),r.length);return P(1,"resolved",{request:n,parent:t?.filename??t,resolved:u}),u},"createResolveFilename"),H=o((s,e)=>{if(!e)throw new Error("The current file path (__filename or import.meta.url) must be provided in the second argument of tsx.require()");return s.startsWith(".")?((typeof e=="string"&&e.startsWith(y)||e instanceof URL)&&(e=O(e)),p.resolve(p.dirname(e),s)):s},"resolveContext"),$e=o(s=>{const{sourceMapsEnabled:e}=process,a={enabled:!0};A(process.env.TSX_TSCONFIG_PATH),process.setSourceMapsEnabled(!0);const n=d._resolveFilename,t=Fe(a,n,s?.namespace);d._resolveFilename=t;const r=ye(a,d._extensions,s?.namespace),c=o(()=>{e===!1&&process.setSourceMapsEnabled(!1),a.enabled=!1,d._resolveFilename===t&&(d._resolveFilename=n),r()},"unregister");if(s?.namespace){const i=o((l,u)=>{const g=H(l,u),[h,m]=g.split("?"),x=new URLSearchParams(m);return s.namespace&&!h.startsWith("node:")&&x.set("namespace",s.namespace),Y(h+T(x))},"scopedRequire");c.require=i;const f=o((l,u,g)=>{const h=H(l,u),[m,x]=h.split("?"),L=new URLSearchParams(x);return s.namespace&&!m.startsWith("node:")&&L.set("namespace",s.namespace),t(m+T(L),module,!1,g)},"scopedResolve");c.resolve=f,c.unregister=c}return c},"register");export{D as a,ue as b,de as c,je as d,C as e,y as f,M as g,F as h,ge as i,v as j,pe as k,A as l,_ as m,E as n,X as o,N as p,S as q,$e as r,he as t};
@@ -0,0 +1,694 @@
// This definition file follows a somewhat unusual format. ESTree allows
// runtime type checks based on the `type` parameter. In order to explain this
// to typescript we want to use discriminated union types:
// https://github.com/Microsoft/TypeScript/pull/9163
//
// For ESTree this is a bit tricky because the high level interfaces like
// Node or Function are pulling double duty. We want to pass common fields down
// to the interfaces that extend them (like Identifier or
// ArrowFunctionExpression), but you can't extend a type union or enforce
// common fields on them. So we've split the high level interfaces into two
// types, a base type which passes down inherited fields, and a type union of
// all types which extend the base type. Only the type union is exported, and
// the union is how other types refer to the collection of inheriting types.
//
// This makes the definitions file here somewhat more difficult to maintain,
// but it has the notable advantage of making ESTree much easier to use as
// an end user.
export interface BaseNodeWithoutComments {
// Every leaf interface that extends BaseNode must specify a type property.
// The type property should be a string literal. For example, Identifier
// has: `type: "Identifier"`
type: string;
loc?: SourceLocation | null | undefined;
range?: [number, number] | undefined;
}
export interface BaseNode extends BaseNodeWithoutComments {
leadingComments?: Comment[] | undefined;
trailingComments?: Comment[] | undefined;
}
export interface NodeMap {
AssignmentProperty: AssignmentProperty;
CatchClause: CatchClause;
Class: Class;
ClassBody: ClassBody;
Expression: Expression;
Function: Function;
Identifier: Identifier;
Literal: Literal;
MethodDefinition: MethodDefinition;
ModuleDeclaration: ModuleDeclaration;
ModuleSpecifier: ModuleSpecifier;
Pattern: Pattern;
PrivateIdentifier: PrivateIdentifier;
Program: Program;
Property: Property;
PropertyDefinition: PropertyDefinition;
SpreadElement: SpreadElement;
Statement: Statement;
Super: Super;
SwitchCase: SwitchCase;
TemplateElement: TemplateElement;
VariableDeclarator: VariableDeclarator;
}
export type Node = NodeMap[keyof NodeMap];
export interface Comment extends BaseNodeWithoutComments {
type: "Line" | "Block";
value: string;
}
export interface SourceLocation {
source?: string | null | undefined;
start: Position;
end: Position;
}
export interface Position {
/** >= 1 */
line: number;
/** >= 0 */
column: number;
}
export interface Program extends BaseNode {
type: "Program";
sourceType: "script" | "module";
body: Array<Directive | Statement | ModuleDeclaration>;
comments?: Comment[] | undefined;
}
export interface Directive extends BaseNode {
type: "ExpressionStatement";
expression: Literal;
directive: string;
}
export interface BaseFunction extends BaseNode {
params: Pattern[];
generator?: boolean | undefined;
async?: boolean | undefined;
// The body is either BlockStatement or Expression because arrow functions
// can have a body that's either. FunctionDeclarations and
// FunctionExpressions have only BlockStatement bodies.
body: BlockStatement | Expression;
}
export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
export type Statement =
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| Declaration;
export interface BaseStatement extends BaseNode {}
export interface EmptyStatement extends BaseStatement {
type: "EmptyStatement";
}
export interface BlockStatement extends BaseStatement {
type: "BlockStatement";
body: Statement[];
innerComments?: Comment[] | undefined;
}
export interface StaticBlock extends Omit<BlockStatement, "type"> {
type: "StaticBlock";
}
export interface ExpressionStatement extends BaseStatement {
type: "ExpressionStatement";
expression: Expression;
}
export interface IfStatement extends BaseStatement {
type: "IfStatement";
test: Expression;
consequent: Statement;
alternate?: Statement | null | undefined;
}
export interface LabeledStatement extends BaseStatement {
type: "LabeledStatement";
label: Identifier;
body: Statement;
}
export interface BreakStatement extends BaseStatement {
type: "BreakStatement";
label?: Identifier | null | undefined;
}
export interface ContinueStatement extends BaseStatement {
type: "ContinueStatement";
label?: Identifier | null | undefined;
}
export interface WithStatement extends BaseStatement {
type: "WithStatement";
object: Expression;
body: Statement;
}
export interface SwitchStatement extends BaseStatement {
type: "SwitchStatement";
discriminant: Expression;
cases: SwitchCase[];
}
export interface ReturnStatement extends BaseStatement {
type: "ReturnStatement";
argument?: Expression | null | undefined;
}
export interface ThrowStatement extends BaseStatement {
type: "ThrowStatement";
argument: Expression;
}
export interface TryStatement extends BaseStatement {
type: "TryStatement";
block: BlockStatement;
handler?: CatchClause | null | undefined;
finalizer?: BlockStatement | null | undefined;
}
export interface WhileStatement extends BaseStatement {
type: "WhileStatement";
test: Expression;
body: Statement;
}
export interface DoWhileStatement extends BaseStatement {
type: "DoWhileStatement";
body: Statement;
test: Expression;
}
export interface ForStatement extends BaseStatement {
type: "ForStatement";
init?: VariableDeclaration | Expression | null | undefined;
test?: Expression | null | undefined;
update?: Expression | null | undefined;
body: Statement;
}
export interface BaseForXStatement extends BaseStatement {
left: VariableDeclaration | Pattern;
right: Expression;
body: Statement;
}
export interface ForInStatement extends BaseForXStatement {
type: "ForInStatement";
}
export interface DebuggerStatement extends BaseStatement {
type: "DebuggerStatement";
}
export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
export interface BaseDeclaration extends BaseStatement {}
export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
type: "FunctionDeclaration";
/** It is null when a function declaration is a part of the `export default function` statement */
id: Identifier | null;
body: BlockStatement;
}
export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
id: Identifier;
}
export interface VariableDeclaration extends BaseDeclaration {
type: "VariableDeclaration";
declarations: VariableDeclarator[];
kind: "var" | "let" | "const" | "using" | "await using";
}
export interface VariableDeclarator extends BaseNode {
type: "VariableDeclarator";
id: Pattern;
init?: Expression | null | undefined;
}
export interface ExpressionMap {
ArrayExpression: ArrayExpression;
ArrowFunctionExpression: ArrowFunctionExpression;
AssignmentExpression: AssignmentExpression;
AwaitExpression: AwaitExpression;
BinaryExpression: BinaryExpression;
CallExpression: CallExpression;
ChainExpression: ChainExpression;
ClassExpression: ClassExpression;
ConditionalExpression: ConditionalExpression;
FunctionExpression: FunctionExpression;
Identifier: Identifier;
ImportExpression: ImportExpression;
Literal: Literal;
LogicalExpression: LogicalExpression;
MemberExpression: MemberExpression;
MetaProperty: MetaProperty;
NewExpression: NewExpression;
ObjectExpression: ObjectExpression;
SequenceExpression: SequenceExpression;
TaggedTemplateExpression: TaggedTemplateExpression;
TemplateLiteral: TemplateLiteral;
ThisExpression: ThisExpression;
UnaryExpression: UnaryExpression;
UpdateExpression: UpdateExpression;
YieldExpression: YieldExpression;
}
export type Expression = ExpressionMap[keyof ExpressionMap];
export interface BaseExpression extends BaseNode {}
export type ChainElement = SimpleCallExpression | MemberExpression;
export interface ChainExpression extends BaseExpression {
type: "ChainExpression";
expression: ChainElement;
}
export interface ThisExpression extends BaseExpression {
type: "ThisExpression";
}
export interface ArrayExpression extends BaseExpression {
type: "ArrayExpression";
elements: Array<Expression | SpreadElement | null>;
}
export interface ObjectExpression extends BaseExpression {
type: "ObjectExpression";
properties: Array<Property | SpreadElement>;
}
export interface PrivateIdentifier extends BaseNode {
type: "PrivateIdentifier";
name: string;
}
export interface Property extends BaseNode {
type: "Property";
key: Expression | PrivateIdentifier;
value: Expression | Pattern; // Could be an AssignmentProperty
kind: "init" | "get" | "set";
method: boolean;
shorthand: boolean;
computed: boolean;
}
export interface PropertyDefinition extends BaseNode {
type: "PropertyDefinition";
key: Expression | PrivateIdentifier;
value?: Expression | null | undefined;
computed: boolean;
static: boolean;
}
export interface FunctionExpression extends BaseFunction, BaseExpression {
id?: Identifier | null | undefined;
type: "FunctionExpression";
body: BlockStatement;
}
export interface SequenceExpression extends BaseExpression {
type: "SequenceExpression";
expressions: Expression[];
}
export interface UnaryExpression extends BaseExpression {
type: "UnaryExpression";
operator: UnaryOperator;
prefix: true;
argument: Expression;
}
export interface BinaryExpression extends BaseExpression {
type: "BinaryExpression";
operator: BinaryOperator;
left: Expression | PrivateIdentifier;
right: Expression;
}
export interface AssignmentExpression extends BaseExpression {
type: "AssignmentExpression";
operator: AssignmentOperator;
left: Pattern | MemberExpression;
right: Expression;
}
export interface UpdateExpression extends BaseExpression {
type: "UpdateExpression";
operator: UpdateOperator;
argument: Expression;
prefix: boolean;
}
export interface LogicalExpression extends BaseExpression {
type: "LogicalExpression";
operator: LogicalOperator;
left: Expression;
right: Expression;
}
export interface ConditionalExpression extends BaseExpression {
type: "ConditionalExpression";
test: Expression;
alternate: Expression;
consequent: Expression;
}
export interface BaseCallExpression extends BaseExpression {
callee: Expression | Super;
arguments: Array<Expression | SpreadElement>;
}
export type CallExpression = SimpleCallExpression | NewExpression;
export interface SimpleCallExpression extends BaseCallExpression {
type: "CallExpression";
optional: boolean;
}
export interface NewExpression extends BaseCallExpression {
type: "NewExpression";
}
export interface MemberExpression extends BaseExpression, BasePattern {
type: "MemberExpression";
object: Expression | Super;
property: Expression | PrivateIdentifier;
computed: boolean;
optional: boolean;
}
export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
export interface BasePattern extends BaseNode {}
export interface SwitchCase extends BaseNode {
type: "SwitchCase";
test?: Expression | null | undefined;
consequent: Statement[];
}
export interface CatchClause extends BaseNode {
type: "CatchClause";
param: Pattern | null;
body: BlockStatement;
}
export interface Identifier extends BaseNode, BaseExpression, BasePattern {
type: "Identifier";
name: string;
}
export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
export interface SimpleLiteral extends BaseNode, BaseExpression {
type: "Literal";
value: string | boolean | number | null;
raw?: string | undefined;
}
export interface RegExpLiteral extends BaseNode, BaseExpression {
type: "Literal";
value?: RegExp | null | undefined;
regex: {
pattern: string;
flags: string;
};
raw?: string | undefined;
}
export interface BigIntLiteral extends BaseNode, BaseExpression {
type: "Literal";
value?: bigint | null | undefined;
bigint: string;
raw?: string | undefined;
}
export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
export type BinaryOperator =
| "=="
| "!="
| "==="
| "!=="
| "<"
| "<="
| ">"
| ">="
| "<<"
| ">>"
| ">>>"
| "+"
| "-"
| "*"
| "/"
| "%"
| "**"
| "|"
| "^"
| "&"
| "in"
| "instanceof";
export type LogicalOperator = "||" | "&&" | "??";
export type AssignmentOperator =
| "="
| "+="
| "-="
| "*="
| "/="
| "%="
| "**="
| "<<="
| ">>="
| ">>>="
| "|="
| "^="
| "&="
| "||="
| "&&="
| "??=";
export type UpdateOperator = "++" | "--";
export interface ForOfStatement extends BaseForXStatement {
type: "ForOfStatement";
await: boolean;
}
export interface Super extends BaseNode {
type: "Super";
}
export interface SpreadElement extends BaseNode {
type: "SpreadElement";
argument: Expression;
}
export interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
type: "ArrowFunctionExpression";
expression: boolean;
body: BlockStatement | Expression;
}
export interface YieldExpression extends BaseExpression {
type: "YieldExpression";
argument?: Expression | null | undefined;
delegate: boolean;
}
export interface TemplateLiteral extends BaseExpression {
type: "TemplateLiteral";
quasis: TemplateElement[];
expressions: Expression[];
}
export interface TaggedTemplateExpression extends BaseExpression {
type: "TaggedTemplateExpression";
tag: Expression;
quasi: TemplateLiteral;
}
export interface TemplateElement extends BaseNode {
type: "TemplateElement";
tail: boolean;
value: {
/** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
cooked?: string | null | undefined;
raw: string;
};
}
export interface AssignmentProperty extends Property {
value: Pattern;
kind: "init";
method: boolean; // false
}
export interface ObjectPattern extends BasePattern {
type: "ObjectPattern";
properties: Array<AssignmentProperty | RestElement>;
}
export interface ArrayPattern extends BasePattern {
type: "ArrayPattern";
elements: Array<Pattern | null>;
}
export interface RestElement extends BasePattern {
type: "RestElement";
argument: Pattern;
}
export interface AssignmentPattern extends BasePattern {
type: "AssignmentPattern";
left: Pattern;
right: Expression;
}
export type Class = ClassDeclaration | ClassExpression;
export interface BaseClass extends BaseNode {
superClass?: Expression | null | undefined;
body: ClassBody;
}
export interface ClassBody extends BaseNode {
type: "ClassBody";
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
}
export interface MethodDefinition extends BaseNode {
type: "MethodDefinition";
key: Expression | PrivateIdentifier;
value: FunctionExpression;
kind: "constructor" | "method" | "get" | "set";
computed: boolean;
static: boolean;
}
export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
type: "ClassDeclaration";
/** It is null when a class declaration is a part of the `export default class` statement */
id: Identifier | null;
}
export interface ClassDeclaration extends MaybeNamedClassDeclaration {
id: Identifier;
}
export interface ClassExpression extends BaseClass, BaseExpression {
type: "ClassExpression";
id?: Identifier | null | undefined;
}
export interface MetaProperty extends BaseExpression {
type: "MetaProperty";
meta: Identifier;
property: Identifier;
}
export type ModuleDeclaration =
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration;
export interface BaseModuleDeclaration extends BaseNode {}
export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier;
export interface BaseModuleSpecifier extends BaseNode {
local: Identifier;
}
export interface ImportDeclaration extends BaseModuleDeclaration {
type: "ImportDeclaration";
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
attributes: ImportAttribute[];
source: Literal;
}
export interface ImportSpecifier extends BaseModuleSpecifier {
type: "ImportSpecifier";
imported: Identifier | Literal;
}
export interface ImportAttribute extends BaseNode {
type: "ImportAttribute";
key: Identifier | Literal;
value: Literal;
}
export interface ImportExpression extends BaseExpression {
type: "ImportExpression";
source: Expression;
options?: Expression | null | undefined;
}
export interface ImportDefaultSpecifier extends BaseModuleSpecifier {
type: "ImportDefaultSpecifier";
}
export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
type: "ImportNamespaceSpecifier";
}
export interface ExportNamedDeclaration extends BaseModuleDeclaration {
type: "ExportNamedDeclaration";
declaration?: Declaration | null | undefined;
specifiers: ExportSpecifier[];
attributes: ImportAttribute[];
source?: Literal | null | undefined;
}
export interface ExportSpecifier extends Omit<BaseModuleSpecifier, "local"> {
type: "ExportSpecifier";
local: Identifier | Literal;
exported: Identifier | Literal;
}
export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
type: "ExportDefaultDeclaration";
declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression;
}
export interface ExportAllDeclaration extends BaseModuleDeclaration {
type: "ExportAllDeclaration";
exported: Identifier | Literal | null;
attributes: ImportAttribute[];
source: Literal;
}
export interface AwaitExpression extends BaseExpression {
type: "AwaitExpression";
argument: Expression;
}
@@ -0,0 +1 @@
{"version":3,"file":"ajvProvider-CEoC__sr.mjs","names":["_a","_addFormats","Ajv2020","Ajv2019","Draft7Ajv"],"sources":["../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js","../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js","../../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.json","../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js","../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js","../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js","../../../node_Line truncated
@@ -0,0 +1,10 @@
"use strict";
// Generated using scripts/write-decode-map.ts
Object.defineProperty(exports, "__esModule", { value: true });
exports.xmlDecodeTree = void 0;
exports.xmlDecodeTree = new Uint16Array(
// prettier-ignore
/* #__PURE__ */ "\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022"
.split("")
.map((c) => c.charCodeAt(0)));
//# sourceMappingURL=decode-data-xml.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Feedback.cjs","sources":["../src/Feedback.ts"],"sourcesContent":[null],"names":["defaultFeedback","warning","suggestions","Feedback","constructor","options","matchers","setDefaultSuggestions","bruteforce","bruteforceMatcher","date","dateMatcher","dictionary","dictionaryMatcher","regex","regexMatcher","repeat","repeatMatcher","sequence","sequenceMatcher","spatial","spatialMatcher","separator","separatorMatcher","wordSequence","wordSequenceMatcher","Object","entries","forEach","key","matcher","feedback","push","translations","useWords","noNeed","getFeedback","score","length","extraFeedback","anotherWord","longestMatch","getLongestMatch","getMatchFeedback","undefined","unshift","i","match","token","isSoleMatch","pattern"],"mappings":"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"}
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './pen-line.js';
//# sourceMappingURL=edit-3.js.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2022_object: LibDefinition;
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const PanelsTopLeft = createLucideIcon("PanelsTopLeft", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M3 9h18", key: "1pudct" }],
["path", { d: "M9 21V9", key: "1oto5p" }]
]);
export { PanelsTopLeft as default };
//# sourceMappingURL=panels-top-left.js.map
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 - present, Yusuke Wada and Hono contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,163 @@
"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: "caracteres", verb: "tener" },
file: { unit: "bytes", verb: "tener" },
array: { unit: "elementos", verb: "tener" },
set: { unit: "elementos", verb: "tener" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "entrada",
email: "dirección de correo electrónico",
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: "fecha y hora ISO",
date: "fecha ISO",
time: "hora ISO",
duration: "duración ISO",
ipv4: "dirección IPv4",
ipv6: "dirección IPv6",
mac: "dirección MAC",
cidrv4: "rango IPv4",
cidrv6: "rango IPv6",
base64: "cadena codificada en base64",
base64url: "URL codificada en base64",
json_string: "cadena JSON",
e164: "número E.164",
credit_card: "número de tarjeta de crédito",
currency_code: "código de moneda",
iban: "IBAN",
jwt: "JWT",
template_literal: "entrada",
};
const TypeDictionary = {
nan: "NaN",
string: "texto",
number: "número",
boolean: "booleano",
array: "arreglo",
object: "objeto",
set: "conjunto",
file: "archivo",
date: "fecha",
bigint: "número grande",
symbol: "símbolo",
undefined: "indefinido",
null: "nulo",
function: "función",
map: "mapa",
record: "registro",
tuple: "tupla",
enum: "enumeración",
union: "unión",
literal: "literal",
promise: "promesa",
void: "vacío",
never: "nunca",
unknown: "desconocido",
any: "cualquiera",
};
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 `Entrada inválida: se esperaba instanceof ${issue.expected}, recibido ${received}`;
}
return `Entrada inválida: se esperaba ${expected}, recibido ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Entrada inválida: se esperaba ${util.stringifyPrimitive(issue.values[0])}`;
return `Opción inválida: se esperaba una de ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
const origin = TypeDictionary[issue.origin] ?? issue.origin;
if (sizing)
return `Demasiado grande: se esperaba que ${origin ?? "valor"} tuviera ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementos"}`;
return `Demasiado grande: se esperaba que ${origin ?? "valor"} fuera ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
const origin = TypeDictionary[issue.origin] ?? issue.origin;
if (sizing) {
return `Demasiado pequeño: se esperaba que ${origin} tuviera ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Demasiado pequeño: se esperaba que ${origin} fuera ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Cadena inválida: debe comenzar con "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Cadena inválida: debe terminar en "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Cadena inválida: debe incluir "${_issue.includes}"`;
if (_issue.format === "regex")
return `Cadena inválida: debe coincidir con el patrón ${_issue.pattern}`;
return `Inválido ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Número inválido: debe ser múltiplo de ${issue.divisor}`;
case "unrecognized_keys":
return `Llave${issue.keys.length > 1 ? "s" : ""} desconocida${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Llave inválida en ${TypeDictionary[issue.origin] ?? issue.origin}`;
case "invalid_union":
return "Entrada inválida";
case "invalid_element":
return `Valor inválido en ${TypeDictionary[issue.origin] ?? issue.origin}`;
default:
return `Entrada inválida`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
module.exports = exports.default;
@@ -0,0 +1 @@
{"version":3,"file":"kanban-square-dashed.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,50 @@
{
"name": "@vitest/pretty-format",
"type": "module",
"version": "4.1.12",
"description": "Fork of pretty-format with support for ESM",
"license": "MIT",
"funding": "https://opencollective.com/vitest",
"homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/pretty-format",
"repository": {
"type": "git",
"url": "git+https://github.com/vitest-dev/vitest.git",
"directory": "packages/pretty-format"
},
"bugs": {
"url": "https://github.com/vitest-dev/vitest/issues"
},
"keywords": [
"vitest",
"test",
"pretty",
"pretty-format"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./*": "./*"
},
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"*.d.ts",
"dist"
],
"dependencies": {
"tinyrainbow": "^3.1.0"
},
"devDependencies": {
"@types/react-is": "^19.2.0",
"react-is": "^19.2.4",
"react-is-18": "npm:react-is@18.3.1"
},
"scripts": {
"build": "premove dist && rollup -c",
"dev": "rollup -c --watch"
}
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_J"},C:{"1":"_zH","2":"_tG"},D:{"1":"_mO","2":"_SO","194":"_kN"},E:{"1":"_QB","2":"_TB"},F:{"1":"_bO","2":"_j _nE _O","194":"_KH"},G:{"1":"_BB","2":"_OB"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_U","2":"J"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:6,C:"Rest parameters",D:true};
@@ -0,0 +1,313 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { ZodIssueCode } from "../ZodError.js";
import { util } from "../helpers/util.js";
test("refinement", () => {
const obj1 = z.object({
first: z.string(),
second: z.string(),
});
const obj2 = obj1.partial().strict();
const obj3 = obj2.refine((data) => data.first || data.second, "Either first or second should be filled in.");
expect(obj1 === (obj2 as any)).toEqual(false);
expect(obj2 === (obj3 as any)).toEqual(false);
expect(() => obj1.parse({})).toThrow();
expect(() => obj2.parse({ third: "adsf" })).toThrow();
expect(() => obj3.parse({})).toThrow();
obj3.parse({ first: "a" });
obj3.parse({ second: "a" });
obj3.parse({ first: "a", second: "a" });
});
test("refinement 2", () => {
const validationSchema = z
.object({
email: z.string().email(),
password: z.string(),
confirmPassword: z.string(),
})
.refine((data) => data.password === data.confirmPassword, "Both password and confirmation must match");
expect(() =>
validationSchema.parse({
email: "aaaa@gmail.com",
password: "aaaaaaaa",
confirmPassword: "bbbbbbbb",
})
).toThrow();
});
test("refinement type guard", () => {
const validationSchema = z.object({
a: z.string().refine((s): s is "a" => s === "a"),
});
type Input = z.input<typeof validationSchema>;
type Schema = z.infer<typeof validationSchema>;
util.assertEqual<"a", Input["a"]>(false);
util.assertEqual<string, Input["a"]>(true);
util.assertEqual<"a", Schema["a"]>(true);
util.assertEqual<string, Schema["a"]>(false);
});
test("refinement Promise", async () => {
const validationSchema = z
.object({
email: z.string().email(),
password: z.string(),
confirmPassword: z.string(),
})
.refine(
(data) => Promise.resolve().then(() => data.password === data.confirmPassword),
"Both password and confirmation must match"
);
await validationSchema.parseAsync({
email: "aaaa@gmail.com",
password: "password",
confirmPassword: "password",
});
});
test("custom path", async () => {
const result = await z
.object({
password: z.string(),
confirm: z.string(),
})
.refine((data) => data.confirm === data.password, { path: ["confirm"] })
.spa({ password: "asdf", confirm: "qewr" });
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues[0].path).toEqual(["confirm"]);
}
});
test("use path in refinement context", async () => {
const noNested = z.string()._refinement((_val, ctx) => {
if (ctx.path.length > 0) {
ctx.addIssue({
code: ZodIssueCode.custom,
message: `schema cannot be nested. path: ${ctx.path.join(".")}`,
});
return false;
} else {
return true;
}
});
const data = z.object({
foo: noNested,
});
const t1 = await noNested.spa("asdf");
const t2 = await data.spa({ foo: "asdf" });
expect(t1.success).toBe(true);
expect(t2.success).toBe(false);
if (t2.success === false) {
expect(t2.error.issues[0].message).toEqual("schema cannot be nested. path: foo");
}
});
test("superRefine", () => {
const Strings = z.array(z.string()).superRefine((val, ctx) => {
if (val.length > 3) {
ctx.addIssue({
code: z.ZodIssueCode.too_big,
maximum: 3,
type: "array",
inclusive: true,
exact: true,
message: "Too many items 😡",
});
}
if (val.length !== new Set(val).size) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: `No duplicates allowed.`,
});
}
});
const result = Strings.safeParse(["asfd", "asfd", "asfd", "asfd"]);
expect(result.success).toEqual(false);
if (!result.success) expect(result.error.issues.length).toEqual(2);
Strings.parse(["asfd", "qwer"]);
});
test("superRefine async", async () => {
const Strings = z.array(z.string()).superRefine(async (val, ctx) => {
if (val.length > 3) {
ctx.addIssue({
code: z.ZodIssueCode.too_big,
maximum: 3,
type: "array",
inclusive: true,
exact: true,
message: "Too many items 😡",
});
}
if (val.length !== new Set(val).size) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: `No duplicates allowed.`,
});
}
});
const result = await Strings.safeParseAsync(["asfd", "asfd", "asfd", "asfd"]);
expect(result.success).toEqual(false);
if (!result.success) expect(result.error.issues.length).toEqual(2);
Strings.parseAsync(["asfd", "qwer"]);
});
test("superRefine - type narrowing", () => {
type NarrowType = { type: string; age: number };
const schema = z
.object({
type: z.string(),
age: z.number(),
})
.nullable()
.superRefine((arg, ctx): arg is NarrowType => {
if (!arg) {
// still need to make a call to ctx.addIssue
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "cannot be null",
fatal: true,
});
return false;
}
return true;
});
util.assertEqual<z.infer<typeof schema>, NarrowType>(true);
expect(schema.safeParse({ type: "test", age: 0 }).success).toEqual(true);
expect(schema.safeParse(null).success).toEqual(false);
});
test("chained mixed refining types", () => {
type firstRefinement = { first: string; second: number; third: true };
type secondRefinement = { first: "bob"; second: number; third: true };
type thirdRefinement = { first: "bob"; second: 33; third: true };
const schema = z
.object({
first: z.string(),
second: z.number(),
third: z.boolean(),
})
.nullable()
.refine((arg): arg is firstRefinement => !!arg?.third)
.superRefine((arg, ctx): arg is secondRefinement => {
util.assertEqual<typeof arg, firstRefinement>(true);
if (arg.first !== "bob") {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "`first` property must be `bob`",
});
return false;
}
return true;
})
.refine((arg): arg is thirdRefinement => {
util.assertEqual<typeof arg, secondRefinement>(true);
return arg.second === 33;
});
util.assertEqual<z.infer<typeof schema>, thirdRefinement>(true);
});
test("get inner type", () => {
z.string()
.refine(() => true)
.innerType()
.parse("asdf");
});
test("chained refinements", () => {
const objectSchema = z
.object({
length: z.number(),
size: z.number(),
})
.refine(({ length }) => length > 5, {
path: ["length"],
message: "length greater than 5",
})
.refine(({ size }) => size > 7, {
path: ["size"],
message: "size greater than 7",
});
const r1 = objectSchema.safeParse({
length: 4,
size: 9,
});
expect(r1.success).toEqual(false);
if (!r1.success) expect(r1.error.issues.length).toEqual(1);
const r2 = objectSchema.safeParse({
length: 4,
size: 3,
});
expect(r2.success).toEqual(false);
if (!r2.success) expect(r2.error.issues.length).toEqual(2);
});
test("fatal superRefine", () => {
const Strings = z
.string()
.superRefine((val, ctx) => {
if (val === "") {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "foo",
fatal: true,
});
}
})
.superRefine((val, ctx) => {
if (val !== " ") {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "bar",
});
}
});
const result = Strings.safeParse("");
expect(result.success).toEqual(false);
if (!result.success) expect(result.error.issues.length).toEqual(1);
});
test("superRefine after skipped transform", () => {
const schema = z
.string()
.regex(/^\d+$/)
.transform((val) => Number(val))
.superRefine((val) => {
if (typeof val !== "number") {
throw new Error("Called without transform");
}
});
const result = schema.safeParse("");
expect(result.success).toEqual(false);
});
@@ -0,0 +1,204 @@
{
'variables' : {
'node_engine_include_dir%': 'deps/v8/include',
'node_host_binary%': 'node',
'node_with_ltcg%': 'true',
},
'target_defaults': {
'type': 'loadable_module',
'win_delay_load_hook': 'true',
'product_prefix': '',
'conditions': [
[ 'node_engine=="chakracore"', {
'variables': {
'node_engine_include_dir%': 'deps/chakrashim/include'
},
}]
],
'include_dirs': [
'<(node_root_dir)/include/node',
'<(node_root_dir)/src',
'<(node_root_dir)/deps/openssl/config',
'<(node_root_dir)/deps/openssl/openssl/include',
'<(node_root_dir)/deps/uv/include',
'<(node_root_dir)/deps/zlib',
'<(node_root_dir)/<(node_engine_include_dir)'
],
'defines!': [
'BUILDING_UV_SHARED=1', # Inherited from common.gypi.
'BUILDING_V8_SHARED=1', # Inherited from common.gypi.
],
'defines': [
'NODE_GYP_MODULE_NAME=>(_target_name)',
'USING_UV_SHARED=1',
'USING_V8_SHARED=1',
# Warn when using deprecated V8 APIs.
'V8_DEPRECATION_WARNINGS=1'
],
'target_conditions': [
['_type=="loadable_module"', {
'product_extension': 'node',
'defines': [
'BUILDING_NODE_EXTENSION'
],
'xcode_settings': {
'OTHER_LDFLAGS': [
'-undefined dynamic_lookup'
],
},
}],
['_type=="static_library"', {
# set to `1` to *disable* the -T thin archive 'ld' flag.
# older linkers don't support this flag.
'standalone_static_library': '<(standalone_static_library)'
}],
['_type!="executable"', {
'conditions': [
[ 'OS=="android"', {
'cflags!': [ '-fPIE' ],
}]
]
}],
['_win_delay_load_hook=="true"', {
# If the addon specifies `'win_delay_load_hook': 'true'` in its
# binding.gyp, link a delay-load hook into the DLL. This hook ensures
# that the addon will work regardless of whether the node/iojs binary
# is named node.exe, iojs.exe, or something else.
'conditions': [
[ 'OS=="win"', {
'defines': [ 'HOST_BINARY=\"<(node_host_binary)<(EXECUTABLE_SUFFIX)\"', ],
'sources': [
'<(node_gyp_dir)/src/win_delay_load_hook.cc',
],
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [ '<(node_host_binary)<(EXECUTABLE_SUFFIX)' ],
# Don't print a linker warning when no imports from either .exe
# are used.
'AdditionalOptions': [ '/ignore:4199' ],
},
},
}],
],
}],
],
'conditions': [
[ 'OS=="mac"', {
'defines': [
'_DARWIN_USE_64_BIT_INODE=1'
],
'xcode_settings': {
'DYLIB_INSTALL_NAME_BASE': '@rpath'
},
}],
[ 'OS=="aix"', {
'ldflags': [
'-Wl,-bimport:<(node_exp_file)'
],
}],
[ 'OS=="os400"', {
'ldflags': [
'-Wl,-bimport:<(node_exp_file)'
],
}],
[ 'OS=="zos"', {
'conditions': [
[ '"<!(echo $CC)" != "clang" and \
"<!(echo $CC)" != "ibm-clang64" and \
"<!(echo $CC)" != "ibm-clang"', {
'cflags': [
'-q64',
'-Wc,DLL',
'-qlonglong',
'-qenum=int',
'-qxclang=-fexec-charset=ISO8859-1'
],
'ldflags': [
'-q64',
'<(node_exp_file)',
],
}, {
'cflags': [
'-m64',
],
'ldflags': [
'-m64',
'<(node_exp_file)',
],
}],
],
'defines': [
'_ALL_SOURCE',
'MAP_FAILED=-1',
'_UNIX03_SOURCE',
],
}],
[ 'OS=="win"', {
'conditions': [
['node_engine=="chakracore"', {
'library_dirs': [ '<(node_root_dir)/$(ConfigurationName)' ],
'libraries': [ '<@(node_engine_libs)' ],
}],
['node_with_ltcg=="true"', {
'msvs_settings': {
'VCCLCompilerTool': {
'WholeProgramOptimization': 'true' # /GL, whole program optimization, needed for LTCG
},
'VCLibrarianTool': {
'AdditionalOptions': [
'/LTCG:INCREMENTAL', # incremental link-time code generation
]
},
'VCLinkerTool': {
'OptimizeReferences': 2, # /OPT:REF
'EnableCOMDATFolding': 2, # /OPT:ICF
'LinkIncremental': 1, # disable incremental linking
'AdditionalOptions': [
'/LTCG:INCREMENTAL', # incremental link-time code generation
]
}
}
}]
],
'libraries': [
'-lkernel32.lib',
'-luser32.lib',
'-lgdi32.lib',
'-lwinspool.lib',
'-lcomdlg32.lib',
'-ladvapi32.lib',
'-lshell32.lib',
'-lole32.lib',
'-loleaut32.lib',
'-luuid.lib',
'-lodbc32.lib',
'-ldelayimp.lib',
'-l"<(node_lib_file)"'
],
'msvs_disabled_warnings': [
# warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>'
# needs to have dll-interface to be used by
# clients of class 'node::ObjectWrap'
4251
],
}, {
# OS!="win"
'defines': [
'_LARGEFILE_SOURCE',
'_FILE_OFFSET_BITS=64'
],
}],
[ 'OS in "freebsd openbsd netbsd solaris android openharmony" or \
(OS=="linux" and target_arch!="ia32")', {
'cflags': [ '-fPIC' ],
}],
]
}
}
@@ -0,0 +1,30 @@
# @vitest/coverage-v8
[![NPM version](https://img.shields.io/npm/v/@vitest/coverage-v8?color=a1b858&label=)](https://npmx.dev/package/@vitest/coverage-v8)
Vitest coverage provider that supports native code coverage via [v8](https://v8.dev/blog/javascript-code-coverage).
## Installation
After installing the package, specify `v8` in the `coverage.provider` field of your Vitest configuration (or leave it empty as it is the default provider):
```ts
// vitest.config.ts
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
coverage: {
provider: 'v8',
},
},
})
```
Then run Vitest with coverage:
```sh
npx vitest --coverage
```
[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/coverage-v8) | [Documentation](https://vitest.dev/guide/coverage)
@@ -0,0 +1,5 @@
"use strict";
0 && 0;
//# sourceMappingURL=cache-contexts.js.map
@@ -0,0 +1,52 @@
/**
* @fileoverview Rule to flag use of arguments.callee and arguments.caller.
* @author Nicholas C. Zakas
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Disallow the use of `arguments.caller` or `arguments.callee`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-caller",
},
schema: [],
messages: {
unexpected: "Avoid arguments.{{prop}}.",
},
},
create(context) {
return {
MemberExpression(node) {
const objectName = node.object.name,
propertyName = node.property.name;
if (
objectName === "arguments" &&
!node.computed &&
propertyName &&
propertyName.match(/^calle[er]$/u)
) {
context.report({
node,
messageId: "unexpected",
data: { prop: propertyName },
});
}
},
};
},
};
@@ -0,0 +1,601 @@
export default `flf2a 1 1 2 -1 13 0 0 242
Terminal by Glenn Chappell 4/93
Includes characters 128-255
Enhanced for Latin-2,3,4 by John Cowan <cowan@ccil.org>
Latin character sets supported only if your screen font does
figlet release 2.2 -- November 1996
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
Double-checked by Paul Burton <solution@earthlink.net> 12/96. Added the new
parameter supported by FIGlet and FIGWin. Unlike all other FIGfonts, this one
is intended to produce output exactly the same as the input unless a control
file is used. Therefore it produces the SAME output for smush, kern or fit.
@
!@
"@
#@
$@
%@
&@
'@
(@
)@
*@
+@
,@
-@
.@
/@
0@
1@
2@
3@
4@
5@
6@
7@
8@
9@
:@
;@
<@
=@
>@
?@
@#
A@
B@
C@
D@
E@
F@
G@
H@
I@
J@
K@
L@
M@
N@
O@
P@
Q@
R@
S@
T@
U@
V@
W@
X@
Y@
Z@
[@
\\@
]@
^@
_@
\`@
a@
b@
c@
d@
e@
f@
g@
h@
i@
j@
k@
l@
m@
n@
o@
p@
q@
r@
s@
t@
u@
v@
w@
x@
y@
z@
{@
|@
}@
~@
�@
�@
�@
�@
�@
�@
�@
128
�@
129
�@
130
�@
131
�@
132
�@
133
�@
134
�@
135
�@
136
�@
137
�@
138
�@
139
�@
140
�@
141
�@
142
�@
143
�@
144
�@
145
�@
146
�@
147
�@
148
�@
149
�@
150
�@
151
�@
152
�@
153
�@
154
�@
155
�@
156
�@
157
�@
158
�@
159
�@
160 NO-BREAK SPACE
�@
161 INVERTED EXCLAMATION MARK
�@
162 CENT SIGN
�@
163 POUND SIGN
�@
164 CURRENCY SIGN
�@
165 YEN SIGN
�@
166 BROKEN BAR
�@
167 SECTION SIGN
�@
168 DIAERESIS
�@
169 COPYRIGHT SIGN
�@
170 FEMININE ORDINAL INDICATOR
�@
171 LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
�@
172 NOT SIGN
�@
173 SOFT HYPHEN
�@
174 REGISTERED SIGN
�@
175 MACRON
�@
176 DEGREE SIGN
�@
177 PLUS-MINUS SIGN
�@
178 SUPERSCRIPT TWO
�@
179 SUPERSCRIPT THREE
�@
180 ACUTE ACCENT
�@
181 MICRO SIGN
�@
182 PILCROW SIGN
�@
183 MIDDLE DOT
�@
184 CEDILLA
�@
185 SUPERSCRIPT ONE
�@
186 MASCULINE ORDINAL INDICATOR
�@
187 RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
�@
188 VULGAR FRACTION ONE QUARTER
�@
189 VULGAR FRACTION ONE HALF
�@
190 VULGAR FRACTION THREE QUARTERS
�@
191 INVERTED QUESTION MARK
�@
192 LATIN CAPITAL LETTER A WITH GRAVE
�@
193 LATIN CAPITAL LETTER A WITH ACUTE
�@
194 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
�@
195 LATIN CAPITAL LETTER A WITH TILDE
�@
196 LATIN CAPITAL LETTER A WITH DIAERESIS
�@
197 LATIN CAPITAL LETTER A WITH RING ABOVE
�@
198 LATIN CAPITAL LETTER AE
�@
199 LATIN CAPITAL LETTER C WITH CEDILLA
�@
200 LATIN CAPITAL LETTER E WITH GRAVE
�@
201 LATIN CAPITAL LETTER E WITH ACUTE
�@
202 LATIN CAPITAL LETTER E WITH CIRCUMFLEX
�@
203 LATIN CAPITAL LETTER E WITH DIAERESIS
�@
204 LATIN CAPITAL LETTER I WITH GRAVE
�@
205 LATIN CAPITAL LETTER I WITH ACUTE
�@
206 LATIN CAPITAL LETTER I WITH CIRCUMFLEX
�@
207 LATIN CAPITAL LETTER I WITH DIAERESIS
�@
208 LATIN CAPITAL LETTER ETH
�@
209 LATIN CAPITAL LETTER N WITH TILDE
�@
210 LATIN CAPITAL LETTER O WITH GRAVE
�@
211 LATIN CAPITAL LETTER O WITH ACUTE
�@
212 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
�@
213 LATIN CAPITAL LETTER O WITH TILDE
�@
214 LATIN CAPITAL LETTER O WITH DIAERESIS
�@
215 MULTIPLICATION SIGN
�@
216 LATIN CAPITAL LETTER O WITH STROKE
�@
217 LATIN CAPITAL LETTER U WITH GRAVE
�@
218 LATIN CAPITAL LETTER U WITH ACUTE
�@
219 LATIN CAPITAL LETTER U WITH CIRCUMFLEX
�@
220 LATIN CAPITAL LETTER U WITH DIAERESIS
�@
221 LATIN CAPITAL LETTER Y WITH ACUTE
�@
222 LATIN CAPITAL LETTER THORN
�@
223 LATIN SMALL LETTER SHARP S
�@
224 LATIN SMALL LETTER A WITH GRAVE
�@
225 LATIN SMALL LETTER A WITH ACUTE
�@
226 LATIN SMALL LETTER A WITH CIRCUMFLEX
�@
227 LATIN SMALL LETTER A WITH TILDE
�@
228 LATIN SMALL LETTER A WITH DIAERESIS
�@
229 LATIN SMALL LETTER A WITH RING ABOVE
�@
230 LATIN SMALL LETTER AE
�@
231 LATIN SMALL LETTER C WITH CEDILLA
�@
232 LATIN SMALL LETTER E WITH GRAVE
�@
233 LATIN SMALL LETTER E WITH ACUTE
�@
234 LATIN SMALL LETTER E WITH CIRCUMFLEX
�@
235 LATIN SMALL LETTER E WITH DIAERESIS
�@
236 LATIN SMALL LETTER I WITH GRAVE
�@
237 LATIN SMALL LETTER I WITH ACUTE
�@
238 LATIN SMALL LETTER I WITH CIRCUMFLEX
�@
239 LATIN SMALL LETTER I WITH DIAERESIS
�@
240 LATIN SMALL LETTER ETH
�@
241 LATIN SMALL LETTER N WITH TILDE
�@
242 LATIN SMALL LETTER O WITH GRAVE
�@
243 LATIN SMALL LETTER O WITH ACUTE
�@
244 LATIN SMALL LETTER O WITH CIRCUMFLEX
�@
245 LATIN SMALL LETTER O WITH TILDE
�@
246 LATIN SMALL LETTER O WITH DIAERESIS
�@
247 DIVISION SIGN
�@
248 LATIN SMALL LETTER O WITH STROKE
�@
249 LATIN SMALL LETTER U WITH GRAVE
�@
250 LATIN SMALL LETTER U WITH ACUTE
�@
251 LATIN SMALL LETTER U WITH CIRCUMFLEX
�@
252 LATIN SMALL LETTER U WITH DIAERESIS
�@
253 LATIN SMALL LETTER Y WITH ACUTE
�@
254 LATIN SMALL LETTER THORN
�@
255 LATIN SMALL LETTER Y WITH DIAERESIS
�@
0x0100 LATIN CAPITAL LETTER A WITH MACRON
�@
0x0101 LATIN SMALL LETTER A WITH MACRON
�@
0x0102 LATIN CAPITAL LETTER A WITH BREVE
�@
0x0103 LATIN SMALL LETTER A WITH BREVE
�@
0x0104 LATIN CAPITAL LETTER A WITH OGONEK
�@
0x0105 LATIN SMALL LETTER A WITH OGONEK
�@
0x0106 LATIN CAPITAL LETTER C WITH ACUTE
�@
0x0107 LATIN SMALL LETTER C WITH ACUTE
�@
0x0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX
�@
0x0109 LATIN SMALL LETTER C WITH CIRCUMFLEX
�@
0x010A LATIN CAPITAL LETTER C WITH DOT ABOVE
�@
0x010B LATIN SMALL LETTER C WITH DOT ABOVE
�@
0x010C LATIN CAPITAL LETTER C WITH CARON
�@
0x010D LATIN SMALL LETTER C WITH CARON
�@
0x010E LATIN CAPITAL LETTER D WITH CARON
�@
0x010F LATIN SMALL LETTER D WITH CARON
�@
0x0110 LATIN CAPITAL LETTER D WITH STROKE
�@
0x0111 LATIN SMALL LETTER D WITH STROKE
�@
0x0112 LATIN CAPITAL LETTER E WITH MACRON
�@
0x0113 LATIN SMALL LETTER E WITH MACRON
�@
0x0116 LATIN CAPITAL LETTER E WITH DOT ABOVE
�@
0x0117 LATIN SMALL LETTER E WITH DOT ABOVE
�@
0x0118 LATIN CAPITAL LETTER E WITH OGONEK
�@
0x0119 LATIN SMALL LETTER E WITH OGONEK
�@
0x011A LATIN CAPITAL LETTER E WITH CARON
�@
0x011B LATIN SMALL LETTER E WITH CARON
�@
0x011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX
�@
0x011D LATIN SMALL LETTER G WITH CIRCUMFLEX
�@
0x011E LATIN CAPITAL LETTER G WITH BREVE
�@
0x011F LATIN SMALL LETTER G WITH BREVE
�@
0x0120 LATIN CAPITAL LETTER G WITH DOT ABOVE
�@
0x0121 LATIN SMALL LETTER G WITH DOT ABOVE
�@
0x0122 LATIN CAPITAL LETTER G WITH CEDILLA
�@
0x0123 LATIN SMALL LETTER G WITH CEDILLA
�@
0x0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX
�@
0x0125 LATIN SMALL LETTER H WITH CIRCUMFLEX
�@
0x0126 LATIN CAPITAL LETTER H WITH STROKE
�@
0x0127 LATIN SMALL LETTER H WITH STROKE
�@
0x0128 LATIN CAPITAL LETTER I WITH TILDE
�@
0x0129 LATIN SMALL LETTER I WITH TILDE
�@
0x012A LATIN CAPITAL LETTER I WITH MACRON
�@
0x012B LATIN SMALL LETTER I WITH MACRON
�@
0x012E LATIN CAPITAL LETTER I WITH OGONEK
�@
0x012F LATIN SMALL LETTER I WITH OGONEK
�@
0x0130 LATIN CAPITAL LETTER I WITH DOT ABOVE
�@
0x0131 LATIN SMALL LETTER DOTLESS I
�@
0x0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX
�@
0x0135 LATIN SMALL LETTER J WITH CIRCUMFLEX
�@
0x0136 LATIN CAPITAL LETTER K WITH CEDILLA
�@
0x0137 LATIN SMALL LETTER K WITH CEDILLA
�@
0x0138 LATIN SMALL LETTER KRA
�@
0x0139 LATIN CAPITAL LETTER L WITH ACUTE
�@
0x013A LATIN SMALL LETTER L WITH ACUTE
�@
0x013B LATIN CAPITAL LETTER L WITH CEDILLA
�@
0x013C LATIN SMALL LETTER L WITH CEDILLA
�@
0x013D LATIN CAPITAL LETTER L WITH CARON
�@
0x013E LATIN SMALL LETTER L WITH CARON
�@
0x0141 LATIN CAPITAL LETTER L WITH STROKE
�@
0x0142 LATIN SMALL LETTER L WITH STROKE
�@
0x0143 LATIN CAPITAL LETTER N WITH ACUTE
�@
0x0144 LATIN SMALL LETTER N WITH ACUTE
�@
0x0145 LATIN CAPITAL LETTER N WITH CEDILLA
�@
0x0146 LATIN SMALL LETTER N WITH CEDILLA
�@
0x0147 LATIN CAPITAL LETTER N WITH CARON
�@
0x0148 LATIN SMALL LETTER N WITH CARON
�@
0x014A LATIN CAPITAL LETTER ENG
�@
0x014B LATIN SMALL LETTER ENG
�@
0x014C LATIN CAPITAL LETTER O WITH MACRON
�@
0x014D LATIN SMALL LETTER O WITH MACRON
�@
0x0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
�@
0x0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE
�@
0x0154 LATIN CAPITAL LETTER R WITH ACUTE
�@
0x0155 LATIN SMALL LETTER R WITH ACUTE
�@
0x0156 LATIN CAPITAL LETTER R WITH CEDILLA
�@
0x0157 LATIN SMALL LETTER R WITH CEDILLA
�@
0x0158 LATIN CAPITAL LETTER R WITH CARON
�@
0x0159 LATIN SMALL LETTER R WITH CARON
�@
0x015A LATIN CAPITAL LETTER S WITH ACUTE
�@
0x015B LATIN SMALL LETTER S WITH ACUTE
�@
0x015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX
�@
0x015D LATIN SMALL LETTER S WITH CIRCUMFLEX
�@
0x015E LATIN CAPITAL LETTER S WITH CEDILLA
�@
0x015F LATIN SMALL LETTER S WITH CEDILLA
�@
0x0160 LATIN CAPITAL LETTER S WITH CARON
�@
0x0161 LATIN SMALL LETTER S WITH CARON
�@
0x0162 LATIN CAPITAL LETTER T WITH CEDILLA
�@
0x0163 LATIN SMALL LETTER T WITH CEDILLA
�@
0x0164 LATIN CAPITAL LETTER T WITH CARON
�@
0x0165 LATIN SMALL LETTER T WITH CARON
�@
0x0166 LATIN CAPITAL LETTER T WITH STROKE
�@
0x0167 LATIN SMALL LETTER T WITH STROKE
�@
0x0168 LATIN CAPITAL LETTER U WITH TILDE
�@
0x0169 LATIN SMALL LETTER U WITH TILDE
�@
0x016A LATIN CAPITAL LETTER U WITH MACRON
�@
0x016B LATIN SMALL LETTER U WITH MACRON
�@
0x016C LATIN CAPITAL LETTER U WITH BREVE
�@
0x016D LATIN SMALL LETTER U WITH BREVE
�@
0x016E LATIN CAPITAL LETTER U WITH RING ABOVE
�@
0x016F LATIN SMALL LETTER U WITH RING ABOVE
�@
0x0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
�@
0x0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE
�@
0x0172 LATIN CAPITAL LETTER U WITH OGONEK
�@
0x0173 LATIN SMALL LETTER U WITH OGONEK
�@
0x0179 LATIN CAPITAL LETTER Z WITH ACUTE
�@
0x017A LATIN SMALL LETTER Z WITH ACUTE
�@
0x017B LATIN CAPITAL LETTER Z WITH DOT ABOVE
�@
0x017C LATIN SMALL LETTER Z WITH DOT ABOVE
�@
0x017D LATIN CAPITAL LETTER Z WITH CARON
�@
0x017E LATIN SMALL LETTER Z WITH CARON
�@
0x02C7 CARON
�@
0x02D8 BREVE
�@
0x02D9 DOT ABOVE
�@
0x02DB OGONEK
�@
0x02DD DOUBLE ACUTE ACCENT
�@
`
@@ -0,0 +1,135 @@
/**
* PBKDF (RFC 2898). Can be used to create a key from password and salt.
* @module
*/
import { hmac } from "./hmac.js";
// prettier-ignore
import { ahash, anumber, asyncLoop, checkOpts, clean, createView, kdfInputToBytes } from "./utils.js";
// Common start and end for sync/async functions
function pbkdf2Init(hash, _password, _salt, _opts) {
ahash(hash);
const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);
const { c, dkLen, asyncTick } = opts;
anumber(c, 'c');
anumber(dkLen, 'dkLen');
anumber(asyncTick, 'asyncTick');
if (c < 1)
throw new Error('iterations (c) must be >= 1');
// RFC 8018 §5.2 defines `dkLen` as "a positive integer".
if (dkLen < 1)
throw new Error('"dkLen" must be >= 1');
// RFC 8018 §5.2 step 1 requires rejecting oversize `dkLen`
// before allocating the destination buffer.
if (dkLen > (2 ** 32 - 1) * hash.outputLen)
throw new Error('derived key too long');
const password = kdfInputToBytes(_password, 'password');
const salt = kdfInputToBytes(_salt, 'salt');
// DK = PBKDF2(PRF, Password, Salt, c, dkLen);
const DK = new Uint8Array(dkLen);
// U1 = PRF(Password, Salt + INT_32_BE(i))
const PRF = hmac.create(hash, password);
// Cache PRF(P, S || ...) prefix state so each block only appends INT_32_BE(i).
const PRFSalt = PRF._cloneInto().update(salt);
return { c, dkLen, asyncTick, DK, PRF, PRFSalt };
}
function pbkdf2Output(PRF, PRFSalt, DK, prfW, u) {
// Shared sync/async cleanup point: wipe transient PRF state
// while preserving the derived key buffer.
PRF.destroy();
PRFSalt.destroy();
if (prfW)
prfW.destroy();
clean(u);
return DK;
}
/**
* PBKDF2-HMAC: RFC 8018 key derivation function.
* @param hash - hash function that would be used e.g. sha256
* @param password - password from which a derived key is generated;
* JS string inputs are UTF-8 encoded first
* @param salt - cryptographic salt; JS string inputs are UTF-8 encoded first
* @param opts - PBKDF2 work factor and output settings. `dkLen`, if provided,
* must be `>= 1` per RFC 8018 §5.2. See {@link Pbkdf2Opt}.
* @returns Derived key bytes.
* @throws If the PBKDF2 iteration count or derived-key settings are invalid. {@link Error}
* @example
* PBKDF2-HMAC: RFC 2898 key derivation function.
* ```ts
* import { pbkdf2 } from '@noble/hashes/pbkdf2.js';
* import { sha256 } from '@noble/hashes/sha2.js';
* const key = pbkdf2(sha256, 'password', 'salt', { dkLen: 32, c: Math.pow(2, 18) });
* ```
*/
export function pbkdf2(hash, password, salt, opts) {
const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
let prfW; // Working copy
const arr = new Uint8Array(4);
const view = createView(arr);
const u = new Uint8Array(PRF.outputLen);
// DK = T1 + T2 + ⋯ + Tdklen/hlen
for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
// Ti = F(Password, Salt, c, i)
// The last Ti view can be shorter than hLen, which applies
// RFC 8018 §5.2 step 4's T_l<0..r-1> truncation without extra copies.
const Ti = DK.subarray(pos, pos + PRF.outputLen);
view.setInt32(0, ti, false);
// F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc
// U1 = PRF(Password, Salt + INT_32_BE(i))
(prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
Ti.set(u.subarray(0, Ti.length));
for (let ui = 1; ui < c; ui++) {
// Uc = PRF(Password, Uc−1)
PRF._cloneInto(prfW).update(u).digestInto(u);
for (let i = 0; i < Ti.length; i++)
Ti[i] ^= u[i];
}
}
return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
}
/**
* PBKDF2-HMAC: RFC 8018 key derivation function. Async version.
* @param hash - hash function that would be used e.g. sha256
* @param password - password from which a derived key is generated;
* JS string inputs are UTF-8 encoded first
* @param salt - cryptographic salt; JS string inputs are UTF-8 encoded first
* @param opts - PBKDF2 work factor and output settings. `dkLen`, if provided,
* must be `>= 1` per RFC 8018 §5.2. `asyncTick` is only a local
* scheduler-yield knob for this JS wrapper, not part of RFC 8018.
* See {@link Pbkdf2Opt}.
* @returns Promise resolving to derived key bytes.
* @throws If the PBKDF2 iteration count or derived-key settings are invalid. {@link Error}
* @example
* PBKDF2-HMAC: RFC 2898 key derivation function.
* ```ts
* import { pbkdf2Async } from '@noble/hashes/pbkdf2.js';
* import { sha256 } from '@noble/hashes/sha2.js';
* const key = await pbkdf2Async(sha256, 'password', 'salt', { dkLen: 32, c: 500_000 });
* ```
*/
export async function pbkdf2Async(hash, password, salt, opts) {
const { c, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
let prfW; // Working copy
const arr = new Uint8Array(4);
const view = createView(arr);
const u = new Uint8Array(PRF.outputLen);
// DK = T1 + T2 + ⋯ + Tdklen/hlen
for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
// Ti = F(Password, Salt, c, i)
// The last Ti view can be shorter than hLen, which applies
// RFC 8018 §5.2 step 4's T_l<0..r-1> truncation without extra copies.
const Ti = DK.subarray(pos, pos + PRF.outputLen);
view.setInt32(0, ti, false);
// F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc
// U1 = PRF(Password, Salt + INT_32_BE(i))
(prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
Ti.set(u.subarray(0, Ti.length));
await asyncLoop(c - 1, asyncTick, () => {
// Uc = PRF(Password, Uc−1)
PRF._cloneInto(prfW).update(u).digestInto(u);
for (let i = 0; i < Ti.length; i++)
Ti[i] ^= u[i];
});
}
return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
}
//# sourceMappingURL=pbkdf2.js.map
@@ -0,0 +1 @@
{"version":3,"file":"scale.js","sources":["../../../src/icons/scale.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Scale\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYgMTYgMy04IDMgOGMtLjg3LjY1LTEuOTIgMS0zIDFzLTIuMTMtLjM1LTMtMVoiIC8+CiAgPHBhdGggZD0ibTIgMTYgMy04IDMgOGMtLjg3LjY1LTEuOTIgMS0zIDFzLTIuMTMtLjM1LTMtMVoiIC8+CiAgPHBhdGggZD0iTTcgMjFoMTAiIC8+CiAgPHBhdGggZD0iTTEyIDN2MTgiIC8+CiAgPHBhdGggZD0iTTMgN2gyYzIgMCA1LTEgNy0yIDIgMSA1IDIgNyAyaDIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/scale\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 Scale = createLucideIcon('Scale', [\n ['path', { d: 'm16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z', key: '7g6ntu' }],\n ['path', { d: 'm2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z', key: 'ijws7r' }],\n ['path', { d: 'M7 21h10', key: '1b0cd5' }],\n ['path', { d: 'M12 3v18', key: '108xh3' }],\n ['path', { d: 'M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2', key: '3gwbw2' }],\n]);\n\nexport default Scale;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACjF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAChF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,15 @@
export { default as AbortSignalPlugin } from './abort-signal';
export { default as BlobPlugin } from './blob';
export { default as CustomEventPlugin } from './custom-event';
export { default as DOMExceptionPlugin } from './dom-exception';
export { default as EventPlugin } from './event';
export { default as FilePlugin } from './file';
export { default as FormDataPlugin } from './form-data';
export { default as HeadersPlugin } from './headers';
export { default as ImageDataPlugin } from './image-data';
export { default as ReadableStreamPlugin } from './readable-stream';
export { default as RequestPlugin } from './request';
export { default as ResponsePlugin } from './response';
export { default as URLPlugin } from './url';
export { default as URLSearchParamsPlugin } from './url-search-params';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,102 @@
import { f as createRule, g as import_ast_utils } from "../utils.js";
const listeningNodes = [
"BreakStatement",
"ClassDeclaration",
"ContinueStatement",
"DebuggerStatement",
"DoWhileStatement",
"ExpressionStatement",
"ForInStatement",
"ForOfStatement",
"ForStatement",
"FunctionDeclaration",
"IfStatement",
"ImportDeclaration",
"LabeledStatement",
"ReturnStatement",
"SwitchStatement",
"ThrowStatement",
"TryStatement",
"VariableDeclaration",
"WhileStatement",
"WithStatement",
"ExportNamedDeclaration",
"ExportDefaultDeclaration",
"ExportAllDeclaration"
];
var max_statements_per_line_default = createRule({
name: "max-statements-per-line",
meta: {
type: "layout",
docs: { description: "Enforce a maximum number of statements allowed per line" },
schema: [{
type: "object",
properties: {
max: {
type: "integer",
minimum: 1
},
ignoredNodes: {
type: "array",
items: {
type: "string",
enum: listeningNodes
}
}
},
additionalProperties: false
}],
defaultOptions: [{ max: 1 }],
messages: { exceed: "This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}." }
},
create(context, [options]) {
const { max: maxStatementsPerLine = 1, ignoredNodes = [] } = options;
const sourceCode = context.sourceCode;
let lastStatementLine = 0;
let numberOfStatementsOnThisLine = 0;
let firstExtraStatement = null;
const SINGLE_CHILD_ALLOWED = /^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;
function reportFirstExtraStatementAndClear() {
if (firstExtraStatement) context.report({
node: firstExtraStatement,
messageId: "exceed",
data: {
numberOfStatementsOnThisLine,
maxStatementsPerLine,
statements: numberOfStatementsOnThisLine === 1 ? "statement" : "statements"
}
});
firstExtraStatement = null;
}
function getActualLastToken(node) {
return sourceCode.getLastToken(node, import_ast_utils.isNotSemicolonToken);
}
function enterStatement(node) {
const line = node.loc.start.line;
if (node.parent && SINGLE_CHILD_ALLOWED.test(node.parent.type) && (!("alternate" in node.parent) || node.parent.alternate !== node)) return;
if (line === lastStatementLine) numberOfStatementsOnThisLine += 1;
else {
reportFirstExtraStatementAndClear();
numberOfStatementsOnThisLine = 1;
lastStatementLine = line;
}
if (numberOfStatementsOnThisLine === maxStatementsPerLine + 1) firstExtraStatement = firstExtraStatement || node;
}
function leaveStatement(node) {
const line = getActualLastToken(node).loc.end.line;
if (line !== lastStatementLine) {
reportFirstExtraStatementAndClear();
numberOfStatementsOnThisLine = 1;
lastStatementLine = line;
}
}
const listeners = { "Program:exit": reportFirstExtraStatementAndClear };
for (const node of listeningNodes) {
if (ignoredNodes.includes(node)) continue;
listeners[node] = enterStatement;
listeners[`${node}:exit`] = leaveStatement;
}
return listeners;
}
});
export { max_statements_per_line_default as t };
@@ -0,0 +1,50 @@
// packages/core/rect/src/observe-element-rect.ts
function observeElementRect(elementToObserve, callback) {
const observedData = observedElements.get(elementToObserve);
if (observedData === void 0) {
observedElements.set(elementToObserve, { rect: {}, callbacks: [callback] });
if (observedElements.size === 1) {
rafId = requestAnimationFrame(runLoop);
}
} else {
observedData.callbacks.push(callback);
callback(elementToObserve.getBoundingClientRect());
}
return () => {
const observedData2 = observedElements.get(elementToObserve);
if (observedData2 === void 0) return;
const index = observedData2.callbacks.indexOf(callback);
if (index > -1) {
observedData2.callbacks.splice(index, 1);
}
if (observedData2.callbacks.length === 0) {
observedElements.delete(elementToObserve);
if (observedElements.size === 0) {
cancelAnimationFrame(rafId);
}
}
};
}
var rafId;
var observedElements = /* @__PURE__ */ new Map();
function runLoop() {
const changedRectsData = [];
observedElements.forEach((data, element) => {
const newRect = element.getBoundingClientRect();
if (!rectEquals(data.rect, newRect)) {
data.rect = newRect;
changedRectsData.push(data);
}
});
changedRectsData.forEach((data) => {
data.callbacks.forEach((callback) => callback(data.rect));
});
rafId = requestAnimationFrame(runLoop);
}
function rectEquals(rect1, rect2) {
return rect1.width === rect2.width && rect1.height === rect2.height && rect1.top === rect2.top && rect1.right === rect2.right && rect1.bottom === rect2.bottom && rect1.left === rect2.left;
}
export {
observeElementRect
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,6 @@
import decompress from '@zxcvbn-ts/dictionary-compression/decompress';
var passwords = decompress("A123456ApasswordA12345678AqwertyA123456789FEB11111B234567AdragonA123123AbaseballAabc123AfootballAmonkeyAletmeinAshadowAmasterA696969AmichaelBustangA666666AqwertyuiopA123321D4567890ApussyAsupermanA1qaz2wsxA7777777AfuckyouAjordanAqazwsxAjenniferA123qweA000000AkillerAtrustno1AhunterBarleyAzxcvbnmAasdfghAbusterAandrewAbatmanAsoccerAtiggerAcharlieArobertAsunshineAthomasAiloveyouAfuckmeArangerAdanielAhockeyAgeorgeAcomputerAmichelleAjessicaAstarwarsAassholeApepperAklasterA112233AzxcvbnAfreedomAprincessAjoshuaAmaggieApassAgingerA11111111B31313AfuckAamandaBshleyAloveAcheeseA159753AnicoleAsummerAmatthewAchelseaAdallasAbitemeAmatrixAwilliamAyankeesA6969AtaylorAcorvetteAaustinBccessAmartinAheatherAthunderAmerlinAsecretAdiamondAhelloAanthonyAhammerAfuckerA1234qwerAsilverAgfhjkmAjustinApatrickArichardAbaileyAinternetAsamanthaAgolferAscooterAtestAorangeAcookieAq1w2e3r4t5AmaverickAjacksonAsparkyAmickeyAphoenixAbigdogAsnoopyAguitarAwhateverAchickenAmorganAandreaAcamaroAmercedesApeanutAferrariAcowboyAfalconAwelcomeAsamsungBexyBteelersAjosephAsmokeyAdakotaAmelissaAarsenalAboomerAeaglesAtigersAmarinaAnascarAboobooAgatewayAporscheAyellowAmonsterAspiderAdiabloAhannahAbulldogAjuniorAlondonApurpleAcompaqAlakersAicemanAqwer1234AhardcoreAcowboysAmoneyAbananaAncc1701AbostonBrandonAtennisAjohnnyAmillerAq1w2e3r4AcoffeeAscoobyA123654AedwardAnikitaAmotherAyamahaAbrandyBarneyAchesterAfuckoffAoliverAcharlesAplayerAknightAforeverAstevenArangersAmidnightAchicagoAbigdaddyAredsoxAvictoriaAbadboyAangelApleaseAfenderAchrisAjasperCmesAslayerArabbitAnatashaArachelAbigdickAmarineAwizardAmarlboroAraidersAprinceAcasperAfishingBlowerAcrystalAjasmineApantiesAiwantuAadidasAwinnerDterAgandalfApassword1AenterAghbdtnA1q2w3e4rAangelaAmikeAgoldenAlaurenAcocacolaAjordan23AwinstonAmadisonAangelsAblowmeApantherAsexsexAbigtitsAspankyAbitchAshannonBophieAjohnsonAasdfasdfAdavidAhornyAthx1138BoyotaBigerAmurphyAdickAcanadaAdanielleA12344321AblowjobA8675309AjonathanAliverpooAmuffinAcooperAapplesAjackieAdennisAblackAqwerty123Apassw0rdAjohnAabcd1234AsandraApokemonA123abcAslipknotAcarlosAqazxswA123456aAscorpionAqwaszxAnathanAbutterAstartrekArainbowAasdfghjklArazzBedskinsAnewyorkAgeminiAcameronAqazwsxedcAfloridaAliverpoolAturtleAnicholasAvikingAboogerAwilsonAsierraAbuttheadAdoctorArocketA159357AvictorAdolphinsAcaptainAbanditAjaguarApackersBookieBeachesA789456AasdfAblueAdolphinAhelpmeAtuckerBhemanBiffanyAmaxwellAjeremyAqwertyuiAshitheadAdebbieAalbertAmaddogAloversAmonicaAalexAunitedAgiantsAnirvanaAmetallicAhotdogArosebudAmountainAbenjaminAwarriorAstupidAelephantAsuckitDcessAbond007AjackassAbonnieAalexisApornAluckyAjasonAscorpioBamsonAq1w2e3Arush2112AazertyAfreddyAdriverAwillieAcalvinA1q2w3e4r5tAsydneyAgatorsAdexterAred123A12345aF6qAbubbaAcreativeAgolfAvoodooAhappyAarthurAtroubleAamericaAnissanAgunnerArebeccaAstellaAgarfieldBordonAjessieAbullshitAparkerAasdfghjkA5150AfuckingAapolloAjackA1qazxsw2A2112AeminemAdecemberAlegendAairborneAbeavisAaugustAbearAappleAbrooklynAgodzillaAskippyAbuddyA4815162342AqwertAkittenAmagicAshelbyAbeaverAphantomAfredAnothingAasdasdAwilliamsAxavierAbravesAdarknessAblink182AtravisAcopperAtomcatAplatinumAqweqweAgirlsA01012011AbigboyAgreenApowerA102030AanimalApoliceA11223344AonlineAvoyagerAlifehackA12qwaszxAfishAsniperA315475AtrinityAwalterAblazerAheavenAloverAsnowballAplayboyAbubblesAlovemeAhootersAcricketAmarvinAwillowAdonkeyAtopgunAnintendoAsaturnAfamilyAnovemberAgabrielAdestinyApakistanBumpkinAdigitalAsergeyAchanceAexplorerAredwingsAprivateAtherockArunnerAtitsA789456123AlasvegasAguinnessAbeatlesAfireAcassieBhristinAqwerty1Aasdf1234AcelticAbroncosAandreyA007007AbabygirlAnelsonAdonaldAscottAeclipseAcartmanAfluffyAlouiseAmichiganAtestingAcarolinaAlittleAsamuelAalexandeAbirdieAsteveAcherryApanteraAsharonAgibsonAvampireAmexicoAdickheadApeterAbuffaloAmontanaAgeniusAbeerAflyersAmaximusAschoolAminecraftAlovelyAstalkerAmetallicaAdoggieAcarterAkristinaBimberlyAspencerDedyAbarbaraAsnickersBabrinaAcarmenAmarcusAbroncoAyankeeAfriendsAparadiseAlol123AdreamsAmagnumAhorsesAcoolBarolineA147258369AlacrosseAou812AgooberAmemberAqwertyuAenigmaAscottyApimpinAbollocksBrianAcockAsurferBammyAgenesisApoohbearAdaveAstarAasd123AqweasdzxcAbabyAracingAfriendAhello1BawaiiAeagle1AbillyAviperAoctoberAvanessaApoopooAeinsteinAboobiesAstanleyA12345qAwalkerAbitchesApaulAdrowssapAstephenAcourtneyAsimpleAalaskaAbadgerAactionAjakeAbillAdeniseAjesterA111222AspitfireAdrummerAforestApatriciaAmaryjaneAchampionAdieselAsvetlanaArockAfridayAkevinAmarkAgregoryApamelaAfrankAhotrodA147258AchevyAandersonAlucky1AdouglasAwestsideAsecurityAgoogleAbadassAshortyAtesterBhumperAhitmanAmozartAgeneralAreddogAboobsAzaq12wsxAmusicA010203AlizardAalexanderAmelanieAa123456AruslanA123456789aAvincentAeagleA1232323qAsweetAteresaAscarfaceA147852Aqwerty12Aa12345AmarshallAoliviaAveronicaApornoAbuddhaAspiritAfrankieAmoney1AstargateAantonioAlibertyAnatalieAmercuryAnarutoAqwe123A12345qwertAsuzukiBemperfiAkingApopcornAspookyAmarleyAsystemAbrittanyAclaudiaAkellyAscotlandAfreeAkittyAcherokeeAviLine truncated
export { passwords as default };
//# sourceMappingURL=passwords.json.mjs.map
@@ -0,0 +1,196 @@
# levn [![Build Status](https://travis-ci.org/gkz/levn.png)](https://travis-ci.org/gkz/levn) <a name="levn" />
__Light ECMAScript (JavaScript) Value Notation__
Levn is a library which allows you to parse a string into a JavaScript value based on an expected type. It is meant for short amounts of human entered data (eg. config files, command line arguments).
Levn aims to concisely describe JavaScript values in text, and allow for the extraction and validation of those values. Levn uses [type-check](https://github.com/gkz/type-check) for its type format, and to validate the results. MIT license. Version 0.4.1.
__How is this different than JSON?__ levn is meant to be written by humans only, is (due to the previous point) much more concise, can be validated against supplied types, has regex and date literals, and can easily be extended with custom types. On the other hand, it is probably slower and thus less efficient at transporting large amounts of data, which is fine since this is not its purpose.
npm install levn
For updates on levn, [follow me on twitter](https://twitter.com/gkzahariev).
## Quick Examples
```js
var parse = require('levn').parse;
parse('Number', '2'); // 2
parse('String', '2'); // '2'
parse('String', 'levn'); // 'levn'
parse('String', 'a b'); // 'a b'
parse('Boolean', 'true'); // true
parse('Date', '#2011-11-11#'); // (Date object)
parse('Date', '2011-11-11'); // (Date object)
parse('RegExp', '/[a-z]/gi'); // /[a-z]/gi
parse('RegExp', 're'); // /re/
parse('Int', '2'); // 2
parse('Number | String', 'str'); // 'str'
parse('Number | String', '2'); // 2
parse('[Number]', '[1,2,3]'); // [1,2,3]
parse('(String, Boolean)', '(hi, false)'); // ['hi', false]
parse('{a: String, b: Number}', '{a: str, b: 2}'); // {a: 'str', b: 2}
// at the top level, you can ommit surrounding delimiters
parse('[Number]', '1,2,3'); // [1,2,3]
parse('(String, Boolean)', 'hi, false'); // ['hi', false]
parse('{a: String, b: Number}', 'a: str, b: 2'); // {a: 'str', b: 2}
// wildcard - auto choose type
parse('*', '[hi,(null,[42]),{k: true}]'); // ['hi', [null, [42]], {k: true}]
```
## Usage
`require('levn');` returns an object that exposes three properties. `VERSION` is the current version of the library as a string. `parse` and `parsedTypeParse` are functions.
```js
// parse(type, input, options);
parse('[Number]', '1,2,3'); // [1, 2, 3]
// parsedTypeParse(parsedType, input, options);
var parsedType = require('type-check').parseType('[Number]');
parsedTypeParse(parsedType, '1,2,3'); // [1, 2, 3]
```
### parse(type, input, options)
`parse` casts the string `input` into a JavaScript value according to the specified `type` in the [type format](https://github.com/gkz/type-check#type-format) (and taking account the optional `options`) and returns the resulting JavaScript value.
##### arguments
* type - `String` - the type written in the [type format](https://github.com/gkz/type-check#type-format) which to check against
* input - `String` - the value written in the [levn format](#levn-format)
* options - `Maybe Object` - an optional parameter specifying additional [options](#options)
##### returns
`*` - the resulting JavaScript value
##### example
```js
parse('[Number]', '1,2,3'); // [1, 2, 3]
```
### parsedTypeParse(parsedType, input, options)
`parsedTypeParse` casts the string `input` into a JavaScript value according to the specified `type` which has already been parsed (and taking account the optional `options`) and returns the resulting JavaScript value. You can parse a type using the [type-check](https://github.com/gkz/type-check) library's `parseType` function.
##### arguments
* type - `Object` - the type in the parsed type format which to check against
* input - `String` - the value written in the [levn format](#levn-format)
* options - `Maybe Object` - an optional parameter specifying additional [options](#options)
##### returns
`*` - the resulting JavaScript value
##### example
```js
var parsedType = require('type-check').parseType('[Number]');
parsedTypeParse(parsedType, '1,2,3'); // [1, 2, 3]
```
## Levn Format
Levn can use the type information you provide to choose the appropriate value to produce from the input. For the same input, it will choose a different output value depending on the type provided. For example, `parse('Number', '2')` will produce the number `2`, but `parse('String', '2')` will produce the string `"2"`.
If you do not provide type information, and simply use `*`, levn will parse the input according the unambiguous "explicit" mode, which we will now detail - you can also set the `explicit` option to true manually in the [options](#options).
* `"string"`, `'string'` are parsed as a String, eg. `"a msg"` is `"a msg"`
* `#date#` is parsed as a Date, eg. `#2011-11-11#` is `new Date('2011-11-11')`
* `/regexp/flags` is parsed as a RegExp, eg. `/re/gi` is `/re/gi`
* `undefined`, `null`, `NaN`, `true`, and `false` are all their JavaScript equivalents
* `[element1, element2, etc]` is an Array, and the casting procedure is recursively applied to each element. Eg. `[1,2,3]` is `[1,2,3]`.
* `(element1, element2, etc)` is an tuple, and the casting procedure is recursively applied to each element. Eg. `(1, a)` is `(1, a)` (is `[1, 'a']`).
* `{key1: val1, key2: val2, ...}` is an Object, and the casting procedure is recursively applied to each property. Eg. `{a: 1, b: 2}` is `{a: 1, b: 2}`.
* Any test which does not fall under the above, and which does not contain special characters (`[``]``(``)``{``}``:``,`) is a string, eg. `$12- blah` is `"$12- blah"`.
If you do provide type information, you can make your input more concise as the program already has some information about what it expects. Please see the [type format](https://github.com/gkz/type-check#type-format) section of [type-check](https://github.com/gkz/type-check) for more information about how to specify types. There are some rules about what levn can do with the information:
* If a String is expected, and only a String, all characters of the input (including any special ones) will become part of the output. Eg. `[({})]` is `"[({})]"`, and `"hi"` is `'"hi"'`.
* If a Date is expected, the surrounding `#` can be omitted from date literals. Eg. `2011-11-11` is `new Date('2011-11-11')`.
* If a RegExp is expected, no flags need to be specified, and the regex is not using any of the special characters,the opening and closing `/` can be omitted - this will have the affect of setting the source of the regex to the input. Eg. `regex` is `/regex/`.
* If an Array is expected, and it is the root node (at the top level), the opening `[` and closing `]` can be omitted. Eg. `1,2,3` is `[1,2,3]`.
* If a tuple is expected, and it is the root node (at the top level), the opening `(` and closing `)` can be omitted. Eg. `1, a` is `(1, a)` (is `[1, 'a']`).
* If an Object is expected, and it is the root node (at the top level), the opening `{` and closing `}` can be omitted. Eg `a: 1, b: 2` is `{a: 1, b: 2}`.
If you list multiple types (eg. `Number | String`), it will first attempt to cast to the first type and then validate - if the validation fails it will move on to the next type and so forth, left to right. You must be careful as some types will succeed with any input, such as String. Thus put String at the end of your list. In non-explicit mode, Date and RegExp will succeed with a large variety of input - also be careful with these and list them near the end if not last in your list.
Whitespace between special characters and elements is inconsequential.
## Options
Options is an object. It is an optional parameter to the `parse` and `parsedTypeParse` functions.
### Explicit
A `Boolean`. By default it is `false`.
__Example:__
```js
parse('RegExp', 're', {explicit: false}); // /re/
parse('RegExp', 're', {explicit: true}); // Error: ... does not type check...
parse('RegExp | String', 're', {explicit: true}); // 're'
```
`explicit` sets whether to be in explicit mode or not. Using `*` automatically activates explicit mode. For more information, read the [levn format](#levn-format) section.
### customTypes
An `Object`. Empty `{}` by default.
__Example:__
```js
var options = {
customTypes: {
Even: {
typeOf: 'Number',
validate: function (x) {
return x % 2 === 0;
},
cast: function (x) {
return {type: 'Just', value: parseInt(x)};
}
}
}
}
parse('Even', '2', options); // 2
parse('Even', '3', options); // Error: Value: "3" does not type check...
```
__Another Example:__
```js
function Person(name, age){
this.name = name;
this.age = age;
}
var options = {
customTypes: {
Person: {
typeOf: 'Object',
validate: function (x) {
x instanceof Person;
},
cast: function (value, options, typesCast) {
var name, age;
if ({}.toString.call(value).slice(8, -1) !== 'Object') {
return {type: 'Nothing'};
}
name = typesCast(value.name, [{type: 'String'}], options);
age = typesCast(value.age, [{type: 'Numger'}], options);
return {type: 'Just', value: new Person(name, age)};
}
}
}
parse('Person', '{name: Laura, age: 25}', options); // Person {name: 'Laura', age: 25}
```
`customTypes` is an object whose keys are the name of the types, and whose values are an object with three properties, `typeOf`, `validate`, and `cast`. For more information about `typeOf` and `validate`, please see the [custom types](https://github.com/gkz/type-check#custom-types) section of type-check.
`cast` is a function which receives three arguments, the value under question, options, and the typesCast function. In `cast`, attempt to cast the value into the specified type. If you are successful, return an object in the format `{type: 'Just', value: CAST-VALUE}`, if you know it won't work, return `{type: 'Nothing'}`. You can use the `typesCast` function to cast any child values. Remember to pass `options` to it. In your function you can also check for `options.explicit` and act accordingly.
## Technical About
`levn` is written in [LiveScript](http://livescript.net/) - a language that compiles to JavaScript. It uses [type-check](https://github.com/gkz/type-check) to both parse types and validate values. It also uses the [prelude.ls](http://preludels.com/) library.
@@ -0,0 +1 @@
{"version":3,"file":"mirror.mjs","sources":["../../../../src/easing/modifiers/mirror.ts"],"sourcesContent":["// Accepts an easing function and returns a new one that outputs mirrored values for\n\nimport { EasingModifier } from \"../types\"\n\n// the second half of the animation. Turns easeIn into easeInOut.\nexport const mirrorEasing: EasingModifier = (easing) => (p) =>\n p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2\n"],"names":[],"mappings":"AAAA;AAIA;MACa,YAAY,GAAmB,CAAC,MAAM,KAAK,CAAC,CAAC,KACtD,CAAC,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI;;;;"}
@@ -0,0 +1,22 @@
import { ILayout, LogEvent, TCreateConverter, TPatternConverter } from './typings';
/**
* Pattern layout for logging messages (根据指定模版格式化日志内容)
*/
export default class PatternLayout implements ILayout {
private readonly converters;
/**
* Constructor (构造函数)
* @param pattern Pattern string (模版字符串)
*/
constructor(pattern?: string, createConverter?: TCreateConverter);
/**
* Add a converter (添加转换器)
* @param fn Converter function (转换器函数)
*/
use(fn: TPatternConverter): this;
/**
* Format a log event (格式化日志事件)
* @param event Log event (日志事件)
*/
format(event: LogEvent): string;
}
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeRefs = void 0;
var assignRef_1 = require("./assignRef");
var createRef_1 = require("./createRef");
/**
* Merges two or more refs together providing a single interface to set their value
* @param {RefObject|Ref} refs
* @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
*
* @see {@link useMergeRefs} to be used in ReactComponents
* @example
* const Component = React.forwardRef((props, ref) => {
* const ownRef = useRef();
* const domRef = mergeRefs([ref, ownRef]); // 👈 merge together
* return <div ref={domRef}>...</div>
* }
*/
function mergeRefs(refs) {
return (0, createRef_1.createCallbackRef)(function (newValue) { return refs.forEach(function (ref) { return (0, assignRef_1.assignRef)(ref, newValue); }); });
}
exports.mergeRefs = mergeRefs;
@@ -0,0 +1 @@
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../src/shared/transport.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2024_regexp: LibDefinition;
@@ -0,0 +1,7 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_middleware_language_language = require("./language.js");
exports.detectFromCookie = require_middleware_language_language.detectFromCookie;
exports.detectFromHeader = require_middleware_language_language.detectFromHeader;
exports.detectFromPath = require_middleware_language_language.detectFromPath;
exports.detectFromQuery = require_middleware_language_language.detectFromQuery;
exports.languageDetector = require_middleware_language_language.languageDetector;
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BusFront = createLucideIcon("BusFront", [
["path", { d: "M4 6 2 7", key: "1mqr15" }],
["path", { d: "M10 6h4", key: "1itunk" }],
["path", { d: "m22 7-2-1", key: "1umjhc" }],
["rect", { width: "16", height: "16", x: "4", y: "3", rx: "2", key: "1wxw4b" }],
["path", { d: "M4 11h16", key: "mpoxn0" }],
["path", { d: "M8 15h.01", key: "a7atzg" }],
["path", { d: "M16 15h.01", key: "rnfrdf" }],
["path", { d: "M6 19v2", key: "1loha6" }],
["path", { d: "M18 21v-2", key: "sqyl04" }]
]);
export { BusFront as default };
//# sourceMappingURL=bus-front.js.map
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const LayoutPanelTop = createLucideIcon("LayoutPanelTop", [
["rect", { width: "18", height: "7", x: "3", y: "3", rx: "1", key: "f1a2em" }],
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }],
["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }]
]);
export { LayoutPanelTop as default };
//# sourceMappingURL=layout-panel-top.js.map
@@ -0,0 +1,435 @@
---
name: router-core/not-found-and-errors
description: >-
notFound() function, notFoundComponent, defaultNotFoundComponent,
notFoundMode (fuzzy/root), errorComponent, CatchBoundary,
CatchNotFound, isNotFound, NotFoundRoute (deprecated), route
masking (mask option, createRouteMask, unmaskOnReload).
type: sub-skill
library: tanstack-router
library_version: '1.166.2'
requires:
- router-core
sources:
- TanStack/router:docs/router/guide/not-found-errors.md
- TanStack/router:docs/router/guide/route-masking.md
---
# Not Found and Errors
TanStack Router handles two categories of "not found": unmatched URL paths (automatic) and missing resources like a post that doesn't exist (manual via `notFound()`). Error boundaries are configured per-route via `errorComponent`.
> **CRITICAL**: Do NOT use the deprecated `NotFoundRoute`. When present, `notFound()` and `notFoundComponent` will NOT work. Remove it and use `notFoundComponent` instead.
> **CRITICAL**: `useLoaderData` may be undefined inside `notFoundComponent`. Use `useParams`, `useSearch`, or `useRouteContext` instead.
## Not Found Handling
### Global 404: `notFoundComponent` on Root Route
```tsx
// src/routes/__root.tsx
import { createRootRoute, Outlet, Link } from '@tanstack/react-router'
export const Route = createRootRoute({
component: () => <Outlet />,
notFoundComponent: () => {
return (
<div>
<h1>404 — Page Not Found</h1>
<Link to="/">Go Home</Link>
</div>
)
},
})
```
### Router-Wide Default: `defaultNotFoundComponent`
```tsx
// src/router.tsx
import { createRouter } from '@tanstack/react-router'
import { routeTree } from './routeTree.gen'
const router = createRouter({
routeTree,
defaultNotFoundComponent: () => {
return (
<div>
<p>Not found!</p>
<Link to="/">Go home</Link>
</div>
)
},
})
```
### Per-Route 404: Missing Resources with `notFound()`
Throw `notFound()` in `loader` or `beforeLoad` when a resource doesn't exist. It works like `redirect()` — throw it to trigger the not-found boundary.
```tsx
// src/routes/posts.$postId.tsx
import { createFileRoute, notFound } from '@tanstack/react-router'
import { getPost } from '../api'
export const Route = createFileRoute('/posts/$postId')({
loader: async ({ params: { postId } }) => {
const post = await getPost(postId)
if (!post) throw notFound()
return { post }
},
component: PostComponent,
notFoundComponent: ({ data }) => {
const { postId } = Route.useParams()
return <p>Post "{postId}" not found</p>
},
})
function PostComponent() {
const { post } = Route.useLoaderData()
return <h1>{post.title}</h1>
}
```
### Targeting a Specific Route with `notFound({ routeId })`
You can force a specific parent route to handle the not-found error:
```tsx
// src/routes/_layout/posts.$postId.tsx
import { createFileRoute, notFound } from '@tanstack/react-router'
export const Route = createFileRoute('/_layout/posts/$postId')({
loader: async ({ params: { postId } }) => {
const post = await getPost(postId)
if (!post) throw notFound({ routeId: '/_layout' })
return { post }
},
})
```
### Targeting Root Route with `rootRouteId`
```tsx
import { createFileRoute, notFound, rootRouteId } from '@tanstack/react-router'
export const Route = createFileRoute('/posts/$postId')({
loader: async ({ params: { postId } }) => {
const post = await getPost(postId)
if (!post) throw notFound({ routeId: rootRouteId })
return { post }
},
})
```
## `notFoundMode`: Fuzzy vs Root
### `fuzzy` (default)
The router finds the nearest parent route with children and a `notFoundComponent`. Preserves as much parent layout as possible.
Given routes: `__root__` → `posts` → `$postId`, accessing `/posts/1/edit`:
- `<Root>` renders
- `<Posts>` renders
- `<Posts.notFoundComponent>` renders (nearest parent with children + notFoundComponent)
### `root`
All not-found errors go to the root route's `notFoundComponent`, regardless of matching:
```tsx
const router = createRouter({
routeTree,
notFoundMode: 'root',
})
```
## Error Handling
### `errorComponent` Per Route
`errorComponent` receives `error`, `info`, and `reset` props. For loader errors, use `router.invalidate()` to re-run the loader — it automatically resets the error boundary.
```tsx
// src/routes/posts.$postId.tsx
import { createFileRoute, useRouter } from '@tanstack/react-router'
export const Route = createFileRoute('/posts/$postId')({
loader: async ({ params: { postId } }) => {
const res = await fetch(`/api/posts/${postId}`)
if (!res.ok) throw new Error('Failed to load post')
return res.json()
},
component: PostComponent,
errorComponent: PostErrorComponent,
})
function PostErrorComponent({
error,
}: {
error: Error
info: { componentStack: string }
reset: () => void
}) {
const router = useRouter()
return (
<div>
<p>Error: {error.message}</p>
<button
onClick={() => {
// Invalidate re-runs the loader and resets the error boundary
router.invalidate()
}}
>
Retry
</button>
</div>
)
}
function PostComponent() {
const data = Route.useLoaderData()
return <h1>{data.title}</h1>
}
```
### Router-Wide Default Error Component
```tsx
const router = createRouter({
routeTree,
defaultErrorComponent: ({ error }) => {
const router = useRouter()
return (
<div>
<p>Something went wrong: {error.message}</p>
<button
onClick={() => {
router.invalidate()
}}
>
Retry
</button>
</div>
)
},
})
```
## Data in `notFoundComponent`
`notFoundComponent` cannot reliably use `useLoaderData` because the loader may not have completed. Safe hooks:
```tsx
notFoundComponent: ({ data }) => {
// SAFE — always available:
const params = Route.useParams()
const search = Route.useSearch()
const context = Route.useRouteContext()
// UNSAFE — may be undefined:
// const loaderData = Route.useLoaderData()
return <p>Item {params.id} not found</p>
}
```
To forward partial data, use the `data` option on `notFound()`:
```tsx
loader: async ({ params }) => {
const partialData = await getPartialData(params.id)
if (!partialData.fullResource) {
throw notFound({ data: { name: partialData.name } })
}
return partialData
},
notFoundComponent: ({ data }) => {
// data is typed as unknown — validate it
const info = data as { name: string } | undefined
return <p>{info?.name ?? 'Resource'} not found</p>
},
```
## Route Masking
Route masking shows a different URL in the browser bar than the actual route being rendered. Masking data is stored in `location.state` and is lost when the URL is shared or opened in a new tab.
### Imperative Masking on `<Link>`
```tsx
import { Link } from '@tanstack/react-router'
function PhotoGrid({ photoId }: { photoId: string }) {
return (
<Link
to="/photos/$photoId/modal"
params={{ photoId }}
mask={{
to: '/photos/$photoId',
params: { photoId },
}}
>
Open Photo
</Link>
)
}
```
### Imperative Masking with `useNavigate`
```tsx
import { useNavigate } from '@tanstack/react-router'
function OpenPhotoButton({ photoId }: { photoId: string }) {
const navigate = useNavigate()
return (
<button
onClick={() =>
navigate({
to: '/photos/$photoId/modal',
params: { photoId },
mask: {
to: '/photos/$photoId',
params: { photoId },
},
})
}
>
Open Photo
</button>
)
}
```
### Declarative Masking with `createRouteMask`
```tsx
import { createRouter, createRouteMask } from '@tanstack/react-router'
import { routeTree } from './routeTree.gen'
const photoModalMask = createRouteMask({
routeTree,
from: '/photos/$photoId/modal',
to: '/photos/$photoId',
params: (prev) => ({ photoId: prev.photoId }),
})
const router = createRouter({
routeTree,
routeMasks: [photoModalMask],
})
```
### Unmasking on Reload
By default, masks survive local page reloads. To unmask on reload:
```tsx
// Per-mask
const mask = createRouteMask({
routeTree,
from: '/photos/$photoId/modal',
to: '/photos/$photoId',
params: (prev) => ({ photoId: prev.photoId }),
unmaskOnReload: true,
})
// Per-link
<Link
to="/photos/$photoId/modal"
params={{ photoId }}
mask={{ to: '/photos/$photoId', params: { photoId } }}
unmaskOnReload
>
Open Photo
</Link>
// Router-wide default
const router = createRouter({
routeTree,
unmaskOnReload: true,
})
```
## Common Mistakes
### 1. HIGH: Using deprecated `NotFoundRoute`
```tsx
// WRONG — NotFoundRoute blocks notFound() and notFoundComponent from working
import { NotFoundRoute } from '@tanstack/react-router'
const notFoundRoute = new NotFoundRoute({ component: () => <p>404</p> })
const router = createRouter({ routeTree, notFoundRoute })
// CORRECT — use notFoundComponent on root route
export const Route = createRootRoute({
component: () => <Outlet />,
notFoundComponent: () => <p>404</p>,
})
```
### 2. MEDIUM: Expecting `useLoaderData` in `notFoundComponent`
```tsx
// WRONG — loader may not have completed
notFoundComponent: () => {
const data = Route.useLoaderData() // may be undefined!
return <p>{data.title} not found</p>
}
// CORRECT — use safe hooks
notFoundComponent: () => {
const { postId } = Route.useParams()
return <p>Post {postId} not found</p>
}
```
### 3. MEDIUM: Leaf routes cannot handle not-found errors
Only routes with children (and therefore an `<Outlet>`) can render `notFoundComponent`. Leaf routes (routes without children) will never catch not-found errors — the error bubbles up to the nearest parent with children.
```tsx
// This route has NO children — notFoundComponent here will not catch
// unmatched child paths (there are no child paths to unmatch)
export const Route = createFileRoute('/posts/$postId')({
// notFoundComponent here only works for notFound() thrown in THIS route's loader
// It does NOT catch path-based not-founds
notFoundComponent: () => <p>Not found</p>,
})
```
### 4. MEDIUM: Expecting masked URLs to survive sharing
Masking data lives in `location.state` (browser history). When a masked URL is copied, shared, or opened in a new tab, the masking data is lost. The browser navigates to the visible (masked) URL directly.
### 5. HIGH (cross-skill): Using `reset()` alone instead of `router.invalidate()`
```tsx
// WRONG — reset() clears the error boundary but does NOT re-run the loader
function ErrorFallback({ error, reset }: { error: Error; reset: () => void }) {
return <button onClick={reset}>Retry</button>
}
// CORRECT — invalidate re-runs loaders and resets the error boundary
function ErrorFallback({ error }: { error: Error; reset: () => void }) {
const router = useRouter()
return (
<button
onClick={() => {
router.invalidate()
}}
>
Retry
</button>
)
}
```
## Cross-References
- **router-core/data-loading** — `notFound()` thrown in loaders interacts with error boundaries and loader data availability. `errorComponent` retry requires `router.invalidate()`.
- **router-core/type-safety** — `notFoundComponent` data is typed as `unknown`; validate before use.
@@ -0,0 +1,17 @@
import { importJWK } from '../key/import.js';
import { isObject } from '../lib/type_checks.js';
import { JWSInvalid } from '../util/errors.js';
export async function EmbeddedJWK(protectedHeader, token) {
const joseHeader = {
...protectedHeader,
...token?.header,
};
if (!isObject(joseHeader.jwk)) {
throw new JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object');
}
const key = await importJWK({ ...joseHeader.jwk, ext: true }, joseHeader.alg);
if (key instanceof Uint8Array || key.type !== 'public') {
throw new JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key');
}
return key;
}
@@ -0,0 +1,12 @@
"use client";
import { useAnimationFrame } from '../utils/use-animation-frame.mjs';
import { useMotionValue } from './use-motion-value.mjs';
function useTime() {
const time = useMotionValue(0);
useAnimationFrame((t) => time.set(t));
return time;
}
export { useTime };
//# sourceMappingURL=use-time.mjs.map
@@ -0,0 +1,32 @@
import { beforeEach, expect, test } from "vitest";
import * as z from "zod/v4";
// English is the default locale and must register on first ZodType construction even when bundlers tree-shake `sideEffects: false` modules (#5953, #5725). Reset between tests so each one observes the lazy init.
beforeEach(() => {
z.config({ localeError: undefined });
});
test("first ZodType construction registers the English default locale", () => {
expect(z.config().localeError).toBeUndefined();
const schema = z.enum(["km", "mi"]);
expect(z.config().localeError).toBeDefined();
const result = schema.safeParse("feet");
expect(result.success).toBe(false);
expect(result.error!.issues[0].message).toBe('Invalid option: expected one of "km"|"mi"');
});
test("explicit locale set before schema construction is preserved", () => {
z.config(z.locales.fr());
const schema = z.enum(["km", "mi"]);
const result = schema.safeParse("feet");
expect(result.success).toBe(false);
expect(result.error!.issues[0].message).toBe('Option invalide : une valeur parmi "km"|"mi" attendue');
});
test("explicit locale set after schema construction overrides default", () => {
const schema = z.enum(["km", "mi"]);
z.config(z.locales.fr());
const result = schema.safeParse("feet");
expect(result.success).toBe(false);
expect(result.error!.issues[0].message).toBe('Option invalide : une valeur parmi "km"|"mi" attendue');
});
@@ -0,0 +1 @@
{"version":3,"names":["_superPropBase","require","_get","Reflect","get","exports","default","bind","target","property","receiver","base","superPropBase","desc","Object","getOwnPropertyDescriptor","call","arguments","length","value","apply"],"sources":["../../src/helpers/get.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nimport superPropBase from \"./superPropBase.ts\";\n\n// https://tc39.es/ecma262/multipage/reflection.html#sec-reflect.get\n//\n// 28.1ak.5 Reflect.get ( target, propertyKey [ , receiver ] )\nexport default function _get<T extends object, P extends PropertyKey>(\n target: T,\n property: P,\n receiver?: unknown,\n): P extends keyof T ? T[P] : any;\nexport default function _get(): any {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n // need a bind because https://github.com/babel/babel/issues/14527\n // @ts-expect-error function reassign\n _get = Reflect.get.bind(/* undefined */);\n } else {\n // @ts-expect-error function reassign\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n\n if (!base) return;\n\n var desc = Object.getOwnPropertyDescriptor(base, property)!;\n if (desc.get) {\n // STEP 3. If receiver is not present, then set receiver to target.\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get.apply(null, arguments as any as Parameters<typeof Reflect.get>);\n}\n"],"mappings":";;;;;;AAEA,IAAAA,cAAA,GAAAC,OAAA;AAUe,SAASC,IAAIA,CAAA,EAAQ;EAClC,IAAI,OAAOC,OAAO,KAAK,WAAW,IAAIA,OAAO,CAACC,GAAG,EAAE;IAGjDC,OAAA,CAAAC,OAAA,GAAAJ,IAAI,GAAGC,OAAO,CAACC,GAAG,CAACG,IAAI,CAAgB,CAAC;EAC1C,CAAC,MAAM;IAELF,OAAA,CAAAC,OAAA,GAAAJ,IAAI,GAAG,SAASA,IAAIA,CAACM,MAAM,EAAEC,QAAQ,EAAEC,QAAQ,EAAE;MAC/C,IAAIC,IAAI,GAAG,IAAAC,sBAAa,EAACJ,MAAM,EAAEC,QAAQ,CAAC;MAE1C,IAAI,CAACE,IAAI,EAAE;MAEX,IAAIE,IAAI,GAAGC,MAAM,CAACC,wBAAwB,CAACJ,IAAI,EAAEF,QAAQ,CAAE;MAC3D,IAAII,IAAI,CAACT,GAAG,EAAE;QAEZ,OAAOS,IAAI,CAACT,GAAG,CAACY,IAAI,CAACC,SAAS,CAACC,MAAM,GAAG,CAAC,GAAGV,MAAM,GAAGE,QAAQ,CAAC;MAChE;MAEA,OAAOG,IAAI,CAACM,KAAK;IACnB,CAAC;EACH;EAEA,OAAOjB,IAAI,CAACkB,KAAK,CAAC,IAAI,EAAEH,SAAkD,CAAC;AAC7E","ignoreList":[]}
@@ -0,0 +1,70 @@
{
"name": "lucide-react",
"description": "A Lucide icon library package for React applications",
"version": "0.469.0",
"license": "ISC",
"homepage": "https://lucide.dev",
"bugs": "https://github.com/lucide-icons/lucide/issues",
"repository": {
"type": "git",
"url": "https://github.com/lucide-icons/lucide.git",
"directory": "packages/lucide-react"
},
"keywords": [
"Lucide",
"React",
"Feather",
"Icons",
"Icon",
"SVG",
"Feather Icons",
"Fontawesome",
"Font Awesome"
],
"author": "Eric Fennis",
"amdName": "lucide-react",
"main": "dist/cjs/lucide-react.js",
"main:umd": "dist/umd/lucide-react.js",
"module": "dist/esm/lucide-react.js",
"unpkg": "dist/umd/lucide-react.min.js",
"typings": "dist/lucide-react.d.ts",
"sideEffects": false,
"files": [
"dist",
"dynamicIconImports.js",
"dynamicIconImports.js.map",
"dynamicIconImports.d.ts"
],
"devDependencies": {
"@testing-library/jest-dom": "^6.1.6",
"@testing-library/react": "^14.1.2",
"@types/react": "^18.2.37",
"@vitejs/plugin-react": "^4.2.1",
"jest-serializer-html": "^7.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"rollup": "^4.22.4",
"rollup-plugin-dts": "^6.1.0",
"typescript": "^4.9.5",
"vite": "5.1.8",
"vitest": "^1.1.1",
"@lucide/build-icons": "1.1.0",
"@lucide/shared": "1.0.0",
"@lucide/rollup-plugins": "1.0.0"
},
"peerDependencies": {
"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"scripts": {
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm typecheck && pnpm build:bundles",
"copy:license": "cp ../../LICENSE ./LICENSE",
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.ts && rm -f dynamicIconImports.*",
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey --withAliases --withDynamicImports --separateAliasesFile --aliasesFileExtension=.ts --iconFileExtension=.ts --exportFileName=index.ts",
"build:bundles": "rollup -c ./rollup.config.mjs",
"typecheck": "tsc",
"typecheck:watch": "tsc -w",
"test": "pnpm build:icons && vitest run",
"test:watch": "vitest watch",
"version": "pnpm version --git-tag-version=false"
}
}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2015_reflect: LibDefinition;
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Club = createLucideIcon("Club", [
[
"path",
{
d: "M17.28 9.05a5.5 5.5 0 1 0-10.56 0A5.5 5.5 0 1 0 12 17.66a5.5 5.5 0 1 0 5.28-8.6Z",
key: "27yuqz"
}
],
["path", { d: "M12 17.66L12 22", key: "ogfahf" }]
]);
export { Club as default };
//# sourceMappingURL=club.js.map
@@ -0,0 +1,65 @@
/**
* Simple in-memory implementation of the EventStore interface for resumability
* This is primarily intended for examples and testing, not for production use
* where a persistent storage solution would be more appropriate.
*/
export class InMemoryEventStore {
constructor() {
this.events = new Map();
}
/**
* Generates a unique event ID for a given stream ID
*/
generateEventId(streamId) {
return `${streamId}_${Date.now()}_${Math.random().toString(36).substring(2, 10)}`;
}
/**
* Extracts the stream ID from an event ID
*/
getStreamIdFromEventId(eventId) {
const parts = eventId.split('_');
return parts.length > 0 ? parts[0] : '';
}
/**
* Stores an event with a generated event ID
* Implements EventStore.storeEvent
*/
async storeEvent(streamId, message) {
const eventId = this.generateEventId(streamId);
this.events.set(eventId, { streamId, message });
return eventId;
}
/**
* Replays events that occurred after a specific event ID
* Implements EventStore.replayEventsAfter
*/
async replayEventsAfter(lastEventId, { send }) {
if (!lastEventId || !this.events.has(lastEventId)) {
return '';
}
// Extract the stream ID from the event ID
const streamId = this.getStreamIdFromEventId(lastEventId);
if (!streamId) {
return '';
}
let foundLastEvent = false;
// Sort events by eventId for chronological ordering
const sortedEvents = [...this.events.entries()].sort((a, b) => a[0].localeCompare(b[0]));
for (const [eventId, { streamId: eventStreamId, message }] of sortedEvents) {
// Only include events from the same stream
if (eventStreamId !== streamId) {
continue;
}
// Start sending events after we find the lastEventId
if (eventId === lastEventId) {
foundLastEvent = true;
continue;
}
if (foundLastEvent) {
await send(eventId, message);
}
}
return streamId;
}
}
//# sourceMappingURL=inMemoryEventStore.js.map
@@ -0,0 +1,16 @@
import * as posix from './posix.js';
import * as win32 from './win32.js';
export * from './options.js';
export { win32, posix };
const platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform;
const impl = platform === 'win32' ? win32 : posix;
/**
* Determine whether a path is executable on the current platform.
*/
export const isexe = impl.isexe;
/**
* Synchronously determine whether a path is executable on the
* current platform.
*/
export const sync = impl.sync;
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_1D","2":"_RM"},D:{"1":"_H _DC","2":"_KO","194":"_nC _nD"},E:{"1":"_QB","2":"_TB"},F:{"1":"_RI","2":"_gO","194":"_mH _eJ"},G:{"1":"_BB","2":"_OB"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_yB","2":"J","194":"_mJ"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","2":"LE"}},B:4,C:"#rrggbbaa hex color notation",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"HeadContent.js","names":[],"sources":["../../src/HeadContent.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { Asset } from './Asset'\nimport { useRouter } from './useRouter'\nimport { useTags } from './headContentUtils'\nimport type { AssetCrossOriginConfig } from '@tanstack/router-core'\n\nexport interface HeadContentProps {\n assetCrossOrigin?: AssetCrossOriginConfig\n}\n\n/**\n * Render route-managed head tags (title, meta, links, styles, head scripts).\n * Place inside the document head of your app shell.\n * @link https://tanstack.com/router/latest/docs/framework/react/guide/document-head-management\n */\nexport function HeadContent(props: HeadContentProps) {\n const tags = useTags(props.assetCrossOrigin)\n const router = useRouter()\n const nonce = router.options.ssr?.nonce\n return (\n <>\n {tags.map((tag) => (\n <Asset {...tag} key={`tsr-meta-${JSON.stringify(tag)}`} nonce={nonce} />\n ))}\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAiBA,SAAgB,YAAY,OAAyB;CACnD,MAAM,OAAO,QAAQ,MAAM,iBAAiB;CAE5C,MAAM,QADS,WAAW,CACL,QAAQ,KAAK;AAClC,QACE,oBAAA,UAAA,EAAA,UACG,KAAK,KAAK,QACT,8BAAC,OAAD;EAAO,GAAI;EAAK,KAAK,YAAY,KAAK,UAAU,IAAI;EAAW;EAAS,CAAA,CACxE,EACD,CAAA"}
@@ -0,0 +1,68 @@
import Agent from './agent'
import Dispatcher from './dispatcher'
import { Interceptable, MockInterceptor } from './mock-interceptor'
import MockDispatch = MockInterceptor.MockDispatch
import { MockCallHistory } from './mock-call-history'
export default MockAgent
interface PendingInterceptor extends MockDispatch {
origin: string;
}
/** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */
declare class MockAgent<TMockAgentOptions extends MockAgent.Options = MockAgent.Options> extends Dispatcher {
constructor (options?: TMockAgentOptions)
/** Creates and retrieves mock Dispatcher instances which can then be used to intercept HTTP requests. If the number of connections on the mock agent is set to 1, a MockClient instance is returned. Otherwise a MockPool instance is returned. */
get<TInterceptable extends Interceptable>(origin: string): TInterceptable
get<TInterceptable extends Interceptable>(origin: RegExp): TInterceptable
get<TInterceptable extends Interceptable>(origin: ((origin: string) => boolean)): TInterceptable
/** Dispatches a mocked request. */
dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
/** Closes the mock agent and waits for registered mock pools and clients to also close before resolving. */
close (): Promise<void>
/** Disables mocking in MockAgent. */
deactivate (): void
/** Enables mocking in a MockAgent instance. When instantiated, a MockAgent is automatically activated. Therefore, this method is only effective after `MockAgent.deactivate` has been called. */
activate (): void
/** Define host matchers so only matching requests that aren't intercepted by the mock dispatchers will be attempted. */
enableNetConnect (): void
enableNetConnect (host: string): void
enableNetConnect (host: RegExp): void
enableNetConnect (host: ((host: string) => boolean)): void
/** Causes all requests to throw when requests are not matched in a MockAgent intercept. */
disableNetConnect (): void
/** get call history. returns the MockAgent call history or undefined if the option is not enabled. */
getCallHistory (): MockCallHistory | undefined
/** clear every call history. Any MockCallHistoryLog will be deleted on the MockCallHistory instance */
clearCallHistory (): void
/** Enable call history. Any subsequence calls will then be registered. */
enableCallHistory (): this
/** Disable call history. Any subsequence calls will then not be registered. */
disableCallHistory (): this
pendingInterceptors (): PendingInterceptor[]
assertNoPendingInterceptors (options?: {
pendingInterceptorsFormatter?: PendingInterceptorsFormatter;
}): void
}
interface PendingInterceptorsFormatter {
format(pendingInterceptors: readonly PendingInterceptor[]): string;
}
declare namespace MockAgent {
/** MockAgent options. */
export interface Options extends Agent.Options {
/** A custom agent to be encapsulated by the MockAgent. */
agent?: Dispatcher;
/** Ignore trailing slashes in the path */
ignoreTrailingSlash?: boolean;
/** Accept URLs with search parameters using non standard syntaxes. default false */
acceptNonStandardSearchParameters?: boolean;
/** Enable call history. you can either call MockAgent.enableCallHistory(). default false */
enableCallHistory?: boolean
}
}
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SwitchScope = void 0;
const ScopeBase_1 = require("./ScopeBase");
const ScopeType_1 = require("./ScopeType");
class SwitchScope extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.switch, upperScope, block, false);
}
}
exports.SwitchScope = SwitchScope;
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classPrivateFieldKey;
var id = 0;
function _classPrivateFieldKey(name) {
return "__private_" + id++ + "_" + name;
}
//# sourceMappingURL=classPrivateFieldLooseKey.js.map
@@ -0,0 +1,156 @@
'use strict'
const test = require('tape')
const fastURI = require('..')
const ABSOLUTE_BASES = [
'http://h/p/q/r',
'http://h/',
'foo://h/a/b/',
'http://h/p/q/'
]
const RELATIVE_BASES = ['', 'base', 'relative/base']
test('normalize keeps the meaning of relative-path references', (t) => {
const cases = [
['a/../b', 'b'],
['x/..', './'],
['../x', '../x'],
['./../x', '../x'],
['a/b/../../..', '..'],
['a/./b', 'a/b'],
['a/b/..', 'a/'],
['.', './'],
['..', '..'],
['../', '../'],
['../../a/./b/../c', '../../a/c'],
['a//..', 'a/'],
['a/../b?q#f', 'b?q#f']
]
for (const [input, expected] of cases) {
t.equal(fastURI.normalize(input), expected, `${input} -> ${expected}`)
}
t.end()
})
test('normalize never turns a relative-path reference into a root or network path', (t) => {
t.equal(fastURI.normalize('.//x'), './/x', 'leading empty segment is kept behind "."')
t.equal(fastURI.normalize('a/..//x'), './/x', 'collapsed prefix does not expose "//"')
t.equal(fastURI.parse(fastURI.normalize('a/..//x')).host, undefined, 'no authority is introduced')
t.equal(fastURI.normalize('./a:b'), './a:b', 'first-segment colon is kept behind a "." segment (RFC 3986 section 4.2)')
t.equal(fastURI.parse(fastURI.normalize('./a:b')).scheme, undefined, 'no scheme is introduced')
t.end()
})
test('normalize keeps the existing behavior for root-relative and absolute paths', (t) => {
t.equal(fastURI.normalize('/a/../b'), '/b')
t.equal(fastURI.normalize('/../x'), '/x')
t.equal(fastURI.normalize('http://h/a/../../b'), 'http://h/b')
t.end()
})
test('equal does not alias relative references with different targets', (t) => {
t.equal(fastURI.equal('../x', 'x'), false)
t.equal(fastURI.equal('a/../b', '/b'), false)
t.equal(fastURI.equal('x/..', '/'), false)
t.equal(fastURI.equal('a/../b', 'b'), true)
t.end()
})
test('resolving a normalized relative reference matches resolving the original', (t) => {
for (const base of [...ABSOLUTE_BASES, ...RELATIVE_BASES]) {
for (const ref of ['a/../b', 'x/..', '../x', './../x', 'a/b/../../..', '.', '..', './/x']) {
t.equal(
fastURI.resolve(base, fastURI.normalize(ref)),
fastURI.resolve(base, ref),
`${base} + ${ref}`
)
}
}
t.equal(fastURI.resolve('http://h/p/q/r', fastURI.normalize('a/../b')), 'http://h/p/q/b')
t.equal(fastURI.resolve('http://h/p/q/r', fastURI.normalize('../x')), 'http://h/p/x')
t.end()
})
test('property: normalization of relative references is resolution-preserving and idempotent', (t) => {
const segments = ['a', 'b', '.', '..', '', 'a:b']
// Deterministic linear congruential generator so failures are reproducible.
let seed = 0x5ec02
const next = (n) => {
seed = (seed * 1103515245 + 12345) % 2147483648
return Math.floor((seed / 2147483648) * n)
}
let failures = 0
let checked = 0
for (let i = 0; i < 4000; i++) {
const length = 1 + next(6)
const parts = []
for (let j = 0; j < length; j++) parts.push(segments[next(segments.length)])
const ref = parts.join('/')
// Only relative-path references: empty refs, refs starting with "/", and
// refs whose first segment contains ":" are not affected by this change.
if (ref === '' || ref[0] === '/' || fastURI.parse(ref).scheme !== undefined) continue
checked++
const normalized = fastURI.normalize(ref)
if (fastURI.normalize(normalized) !== normalized) {
failures++
t.fail(`not idempotent: ${ref} -> ${normalized} -> ${fastURI.normalize(normalized)}`)
}
// 3.x's removeDotSegments (used by resolve) collapses a trailing "//" to
// "/" (fixed in v4 by #185), so resolve() itself is inconsistent for
// these paths regardless of normalization.
if (normalized.endsWith('//')) continue
for (const base of ABSOLUTE_BASES) {
const expected = fastURI.resolve(base, ref)
const actual = fastURI.resolve(base, normalized)
if (actual !== expected) {
failures++
t.fail(`${base} + ${ref}: normalized ${normalized} resolves to ${actual}, expected ${expected}`)
}
}
}
t.ok(checked > 1000, `checked ${checked} relative references`)
t.equal(failures, 0, 'no relative reference changed meaning')
t.end()
})
test('suffix normalization preserves relative path meaning', (t) => {
const options = { reference: 'suffix', scheme: 'x' }
for (const [input, expected] of [
['a/../b', 'b'],
['x/..', './'],
['a/../a:b', './a:b']
]) {
t.equal(fastURI.normalize(input, options), expected, `${input} -> ${expected}`)
}
t.end()
})
test('normalize does not promote a colon-first relative reference to a scheme (skipEscape)', (t) => {
// RFC 3986 section 4.2: a first path segment containing ":" must stay
// protected by a leading "./", or it is mistaken for a scheme. Collapsing
// the protecting dot segment must not expose the colon. The default path
// escapes the colon; with skipEscape the colon is emitted raw and the
// reference is reparsed as absolute (scheme "a"), changing its meaning.
const colonRefs = ['./a:b', 'a/../a:b']
for (const ref of colonRefs) {
const normalized = fastURI.normalize(ref, { skipEscape: true })
t.equal(
fastURI.parse(normalized).scheme,
undefined,
`${ref} -> ${normalized} must not introduce a scheme`
)
for (const base of ABSOLUTE_BASES) {
t.equal(
fastURI.resolve(base, normalized, { skipEscape: true }),
fastURI.resolve(base, ref, { skipEscape: true }),
`${base} + ${ref}: normalized ${normalized} must resolve the same`
)
}
}
t.end()
})
@@ -0,0 +1,7 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/isServer/server.ts
const isServer = process.env.NODE_ENV === "test" ? void 0 : true;
//#endregion
exports.isServer = isServer;
//# sourceMappingURL=server.cjs.map
@@ -0,0 +1,63 @@
"use client";
import { jsx } from 'react/jsx-runtime';
import * as React from 'react';
import { useId, useMemo } from 'react';
import { PresenceContext } from '../../context/PresenceContext.mjs';
import { useConstant } from '../../utils/use-constant.mjs';
import { PopChild } from './PopChild.mjs';
const PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => {
const presenceChildren = useConstant(newChildrenMap);
const id = useId();
let isReusedContext = true;
let context = useMemo(() => {
isReusedContext = false;
return {
id,
initial,
isPresent,
custom,
onExitComplete: (childId) => {
presenceChildren.set(childId, true);
for (const isComplete of presenceChildren.values()) {
if (!isComplete)
return; // can stop searching when any is incomplete
}
onExitComplete && onExitComplete();
},
register: (childId) => {
presenceChildren.set(childId, false);
return () => presenceChildren.delete(childId);
},
};
}, [isPresent, presenceChildren, onExitComplete]);
/**
* If the presence of a child affects the layout of the components around it,
* we want to make a new context value to ensure they get re-rendered
* so they can detect that layout change.
*/
if (presenceAffectsLayout && isReusedContext) {
context = { ...context };
}
useMemo(() => {
presenceChildren.forEach((_, key) => presenceChildren.set(key, false));
}, [isPresent]);
/**
* If there's no `motion` components to fire exit animations, we want to remove this
* component immediately.
*/
React.useEffect(() => {
!isPresent &&
!presenceChildren.size &&
onExitComplete &&
onExitComplete();
}, [isPresent]);
children = (jsx(PopChild, { pop: mode === "popLayout", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, children: children }));
return (jsx(PresenceContext.Provider, { value: context, children: children }));
};
function newChildrenMap() {
return new Map();
}
export { PresenceChild };
//# sourceMappingURL=PresenceChild.mjs.map
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Clock6 = createLucideIcon("Clock6", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["polyline", { points: "12 6 12 12 12 16.5", key: "hb2qv6" }]
]);
export { Clock6 as default };
//# sourceMappingURL=clock-6.js.map
@@ -0,0 +1,5 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/types.ts
var FetchEventLike = class {};
//#endregion
exports.FetchEventLike = FetchEventLike;
@@ -0,0 +1,319 @@
/**
* @fileoverview Rule to enforce sorted `import` declarations within modules
* @author Christian Schuller
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
defaultOptions: [
{
allowSeparatedGroups: false,
ignoreCase: false,
ignoreDeclarationSort: false,
ignoreMemberSort: false,
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
},
],
docs: {
description: "Enforce sorted `import` declarations within modules",
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/sort-imports",
},
schema: [
{
type: "object",
properties: {
ignoreCase: {
type: "boolean",
},
memberSyntaxSortOrder: {
type: "array",
items: {
enum: ["none", "all", "multiple", "single"],
},
uniqueItems: true,
minItems: 4,
maxItems: 4,
},
ignoreDeclarationSort: {
type: "boolean",
},
ignoreMemberSort: {
type: "boolean",
},
allowSeparatedGroups: {
type: "boolean",
},
},
additionalProperties: false,
},
],
fixable: "code",
messages: {
sortImportsAlphabetically:
"Imports should be sorted alphabetically.",
sortMembersAlphabetically:
"Member '{{memberName}}' of the import declaration should be sorted alphabetically.",
unexpectedSyntaxOrder:
"Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax.",
},
},
create(context) {
const [
{
ignoreCase,
ignoreDeclarationSort,
ignoreMemberSort,
memberSyntaxSortOrder,
allowSeparatedGroups,
},
] = context.options;
const sourceCode = context.sourceCode;
let previousDeclaration = null;
/**
* Gets the used member syntax style.
*
* import "my-module.js" --> none
* import * as myModule from "my-module.js" --> all
* import {myMember} from "my-module.js" --> single
* import {foo, bar} from "my-module.js" --> multiple
* @param {ASTNode} node the ImportDeclaration node.
* @returns {string} used member parameter style, ["all", "multiple", "single"]
*/
function usedMemberSyntax(node) {
if (node.specifiers.length === 0) {
return "none";
}
if (node.specifiers[0].type === "ImportNamespaceSpecifier") {
return "all";
}
if (node.specifiers.length === 1) {
return "single";
}
return "multiple";
}
/**
* Gets the group by member parameter index for given declaration.
* @param {ASTNode} node the ImportDeclaration node.
* @returns {number} the declaration group by member index.
*/
function getMemberParameterGroupIndex(node) {
return memberSyntaxSortOrder.indexOf(usedMemberSyntax(node));
}
/**
* Gets the local name of the first imported module.
* @param {ASTNode} node the ImportDeclaration node.
* @returns {?string} the local name of the first imported module.
*/
function getFirstLocalMemberName(node) {
if (node.specifiers[0]) {
return node.specifiers[0].local.name;
}
return null;
}
/**
* Calculates number of lines between two nodes. It is assumed that the given `left` node appears before
* the given `right` node in the source code. Lines are counted from the end of the `left` node till the
* start of the `right` node. If the given nodes are on the same line, it returns `0`, same as if they were
* on two consecutive lines.
* @param {ASTNode} left node that appears before the given `right` node.
* @param {ASTNode} right node that appears after the given `left` node.
* @returns {number} number of lines between nodes.
*/
function getNumberOfLinesBetween(left, right) {
return Math.max(right.loc.start.line - left.loc.end.line - 1, 0);
}
return {
ImportDeclaration(node) {
if (!ignoreDeclarationSort) {
if (
previousDeclaration &&
allowSeparatedGroups &&
getNumberOfLinesBetween(previousDeclaration, node) > 0
) {
// reset declaration sort
previousDeclaration = null;
}
if (previousDeclaration) {
const currentMemberSyntaxGroupIndex =
getMemberParameterGroupIndex(node),
previousMemberSyntaxGroupIndex =
getMemberParameterGroupIndex(
previousDeclaration,
);
let currentLocalMemberName =
getFirstLocalMemberName(node),
previousLocalMemberName =
getFirstLocalMemberName(previousDeclaration);
if (ignoreCase) {
previousLocalMemberName =
previousLocalMemberName &&
previousLocalMemberName.toLowerCase();
currentLocalMemberName =
currentLocalMemberName &&
currentLocalMemberName.toLowerCase();
}
/*
* When the current declaration uses a different member syntax,
* then check if the ordering is correct.
* Otherwise, make a default string compare (like rule sort-vars to be consistent) of the first used local member name.
*/
if (
currentMemberSyntaxGroupIndex !==
previousMemberSyntaxGroupIndex
) {
if (
currentMemberSyntaxGroupIndex <
previousMemberSyntaxGroupIndex
) {
context.report({
node,
messageId: "unexpectedSyntaxOrder",
data: {
syntaxA:
memberSyntaxSortOrder[
currentMemberSyntaxGroupIndex
],
syntaxB:
memberSyntaxSortOrder[
previousMemberSyntaxGroupIndex
],
},
});
}
} else {
if (
previousLocalMemberName &&
currentLocalMemberName &&
currentLocalMemberName < previousLocalMemberName
) {
context.report({
node,
messageId: "sortImportsAlphabetically",
});
}
}
}
previousDeclaration = node;
}
if (!ignoreMemberSort) {
const importSpecifiers = node.specifiers.filter(
specifier => specifier.type === "ImportSpecifier",
);
const getSortableName = ignoreCase
? specifier => specifier.local.name.toLowerCase()
: specifier => specifier.local.name;
const firstUnsortedIndex = importSpecifiers
.map(getSortableName)
.findIndex(
(name, index, array) => array[index - 1] > name,
);
if (firstUnsortedIndex !== -1) {
context.report({
node: importSpecifiers[firstUnsortedIndex],
messageId: "sortMembersAlphabetically",
data: {
memberName:
importSpecifiers[firstUnsortedIndex].local
.name,
},
fix(fixer) {
if (
importSpecifiers.some(
specifier =>
sourceCode.getCommentsBefore(
specifier,
).length ||
sourceCode.getCommentsAfter(
specifier,
).length,
)
) {
// If there are comments in the ImportSpecifier list, don't rearrange the specifiers.
return null;
}
return fixer.replaceTextRange(
[
importSpecifiers[0].range[0],
importSpecifiers.at(-1).range[1],
],
importSpecifiers
// Clone the importSpecifiers array to avoid mutating it
.slice()
// Sort the array into the desired order
.sort((specifierA, specifierB) => {
const aName =
getSortableName(specifierA);
const bName =
getSortableName(specifierB);
return aName > bName ? 1 : -1;
})
// Build a string out of the sorted list of import specifiers and the text between the originals
.reduce(
(sourceText, specifier, index) => {
const textAfterSpecifier =
index ===
importSpecifiers.length - 1
? ""
: sourceCode
.getText()
.slice(
importSpecifiers[
index
].range[1],
importSpecifiers[
index +
1
].range[0],
);
return (
sourceText +
sourceCode.getText(
specifier,
) +
textAfterSpecifier
);
},
"",
),
);
},
});
}
}
},
};
},
};
@@ -0,0 +1,2 @@
import { SmartRouter } from "./router.js";
export { SmartRouter };
@@ -0,0 +1 @@
{"version":3,"file":"palette.js","sources":["../../../src/icons/palette.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Palette\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMy41IiBjeT0iNi41IiByPSIuNSIgZmlsbD0iY3VycmVudENvbG9yIiAvPgogIDxjaXJjbGUgY3g9IjE3LjUiIGN5PSIxMC41IiByPSIuNSIgZmlsbD0iY3VycmVudENvbG9yIiAvPgogIDxjaXJjbGUgY3g9IjguNSIgY3k9IjcuNSIgcj0iLjUiIGZpbGw9ImN1cnJlbnRDb2xvciIgLz4KICA8Y2lyY2xlIGN4PSI2LjUiIGN5PSIxMi41IiByPSIuNSIgZmlsbD0iY3VycmVudENvbG9yIiAvPgogIDxwYXRoIGQ9Ik0xMiAyQzYuNSAyIDIgNi41IDIgMTJzNC41IDEwIDEwIDEwYy45MjYgMCAxLjY0OC0uNzQ2IDEuNjQ4LTEuNjg4IDAtLjQzNy0uMTgtLjgzNS0uNDM3LTEuMTI1LS4yOS0uMjg5LS40MzgtLjY1Mi0uNDM4LTEuMTI1YTEuNjQgMS42NCAwIDAgMSAxLjY2OC0xLjY2OGgxLjk5NmMzLjA1MSAwIDUuNTU1LTIuNTAzIDUuNTU1LTUuNTU0QzIxLjk2NSA2LjAxMiAxNy40NjEgMiAxMiAyeiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/palette\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 Palette = createLucideIcon('Palette', [\n ['circle', { cx: '13.5', cy: '6.5', r: '.5', fill: 'currentColor', key: '1okk4w' }],\n ['circle', { cx: '17.5', cy: '10.5', r: '.5', fill: 'currentColor', key: 'f64h9f' }],\n ['circle', { cx: '8.5', cy: '7.5', r: '.5', fill: 'currentColor', key: 'fotxhn' }],\n ['circle', { cx: '6.5', cy: '12.5', r: '.5', fill: 'currentColor', key: 'qy21gx' }],\n [\n 'path',\n {\n d: 'M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z',\n key: '12rzf8',\n },\n ],\n]);\n\nexport default Palette;\n"],"names":[],"mappings":"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 truncated
@@ -0,0 +1,87 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createConfigItem = createConfigItem;
exports.createConfigItemAsync = createConfigItemAsync;
exports.createConfigItemSync = createConfigItemSync;
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _full.default;
}
});
exports.loadOptions = loadOptions;
exports.loadOptionsAsync = loadOptionsAsync;
exports.loadOptionsSync = loadOptionsSync;
exports.loadPartialConfig = loadPartialConfig;
exports.loadPartialConfigAsync = loadPartialConfigAsync;
exports.loadPartialConfigSync = loadPartialConfigSync;
function _gensync() {
const data = require("gensync");
_gensync = function () {
return data;
};
return data;
}
var _full = require("./full.js");
var _partial = require("./partial.js");
var _item = require("./item.js");
var _rewriteStackTrace = require("../errors/rewrite-stack-trace.js");
const loadPartialConfigRunner = _gensync()(_partial.loadPartialConfig);
function loadPartialConfigAsync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.async)(...args);
}
function loadPartialConfigSync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.sync)(...args);
}
function loadPartialConfig(opts, callback) {
if (callback !== undefined) {
(0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.errback)(opts, callback);
} else if (typeof opts === "function") {
(0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.errback)(undefined, opts);
} else {
return loadPartialConfigSync(opts);
}
}
function* loadOptionsImpl(opts) {
var _config$options;
const config = yield* (0, _full.default)(opts);
return (_config$options = config == null ? void 0 : config.options) != null ? _config$options : null;
}
const loadOptionsRunner = _gensync()(loadOptionsImpl);
function loadOptionsAsync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.async)(...args);
}
function loadOptionsSync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.sync)(...args);
}
function loadOptions(opts, callback) {
if (callback !== undefined) {
(0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.errback)(opts, callback);
} else if (typeof opts === "function") {
(0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.errback)(undefined, opts);
} else {
return loadOptionsSync(opts);
}
}
const createConfigItemRunner = _gensync()(_item.createConfigItem);
function createConfigItemAsync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.async)(...args);
}
function createConfigItemSync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.sync)(...args);
}
function createConfigItem(target, options, callback) {
if (callback !== undefined) {
(0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.errback)(target, options, callback);
} else if (typeof options === "function") {
(0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.errback)(target, undefined, callback);
} else {
return createConfigItemSync(target, options);
}
}
0 && 0;
//# sourceMappingURL=index.js.map
@@ -0,0 +1,17 @@
const extend = (listToExtend, list) =>
// eslint-disable-next-line prefer-spread
listToExtend.push.apply(listToExtend, list);
// sort on i primary, j secondary
const sorted = matches => matches.sort((m1, m2) => m1.i - m2.i || m1.j - m2.j);
const buildRankedDictionary = orderedList => {
const result = {};
let counter = 1; // rank starts at 1, not 0
orderedList.forEach(word => {
result[word] = counter;
counter += 1;
});
return result;
};
export { buildRankedDictionary, extend, sorted };
//# sourceMappingURL=helper.mjs.map
@@ -0,0 +1,615 @@
flf2a$ 6 5 10 -1 2
Lcd by Karl von Laudermann 11/93
$$$$$$@
$$$$$$@
$$$$$$@
$$$$$$@
$$$$$$@
$$$$$$@@
$ $@
$ | $@
$ + $@
$ $@
$ - $@
$ $@@
$ $@
$ | |$@
$ $@
$ $@
$ $@
$ $@@
$___ $@
| | |$@
|-+-|$@
| | |$@
$--- $@
$ $@@
$___ $@
| | $@
-+- $@
$ | |$@
$--- $@
$ $@@
$_ $@
| |/ $@
-+- $@
$/| |$@
$ - $@
$ $@@
$ _ $@
$ | |$@
-+- $@
| | $@
$--- $@
$ $@@
$ $@
$ / $@
$ $@
$ $@
$ $@
$ $@@
$ _ $@
$ | $@
$ + $@
$ | $@
$ - $@
$ $@@
$_ $@
$ | $@
$ + $@
$ | $@
$- $@
$ $@@
$ $@
$\|/ $@
$-+- $@
$/|\ $@
$ $@
$ $@@
$ $@
$ | $@
$-+- $@
$ | $@
$ $@
$ $@@
$ $@
$ $@
$ $@
$/ $@
$ $@
$ $@@
$ $@
$ $@
$-+- $@
$ $@
$ $@
$ $@@
$ $@
$ $@
$ $@
$ $@
$ - $@
$ $@@
$ $@
$ / $@
$ + $@
$/ $@
$ $@
$ $@@
$___ $@
| /|$@
| + |$@
|/ |$@
$--- $@
$ $@@
$_ $@
$ | $@
$ + $@
$ | $@
$--- $@
$ $@@
$___ $@
$ |$@
$-+- $@
| $@
$--- $@
$ $@@
$___ $@
$ |$@
$-+- $@
$ |$@
$--- $@
$ $@@
$ $@
| | $@
$-+- $@
$ | $@
$ $@
$ $@@
$___ $@
| $@
$-+- $@
$ |$@
$--- $@
$ $@@
$___ $@
| $@
|-+- $@
| |$@
$--- $@
$ $@@
$___ $@
$ / $@
$ + $@
$/ $@
$ $@
$ $@@
$___ $@
| |$@
-+- $@
| |$@
$--- $@
$ $@@
$___ $@
| |$@
$-+-|$@
$ |$@
$--- $@
$ $@@
$ $@
$ | $@
$ $@
$ | $@
$ $@
$ $@@
$ $@
$ | $@
$ $@
$/ $@
$ $@
$ $@@
$ $@
$ / $@
$ + $@
$ \ $@
$ $@
$ $@@
$ $@
$ $@
$-+- $@
$ $@
$--- $@
$ $@@
$ $@
$\ $@
$ + $@
$/ $@
$ $@
$ $@@
$___ $@
| |$@
$ +- $@
$ | $@
$ - $@
$ $@@
$___ $@
$ |$@
$- |$@
| | |$@
$--- $@
$ $@@
$___ $@
| |$@
|-+-|$@
| |$@
$ $@
$ $@@
$___ $@
$ | |$@
$ +- $@
$ | |$@
$--- $@
$ $@@
$___ $@
| $@
| $@
| $@
$--- $@
$ $@@
$___ $@
$ | |$@
$ + |$@
$ | |$@
$--- $@
$ $@@
$___ $@
| $@
|-+- $@
| $@
$--- $@
$ $@@
$___ $@
| $@
|-+- $@
| $@
$ $@
$ $@@
$___ $@
| $@
| +- $@
| |$@
$--- $@
$ $@@
$ $@
| |$@
|-+-|$@
| |$@
$ $@
$ $@@
$___ $@
$ | $@
$ + $@
$ | $@
$--- $@
$ $@@
$ $@
$ |$@
$ |$@
| |$@
$--- $@
$ $@@
$ $@
| / $@
|-+ $@
| \ $@
$ $@
$ $@@
$ $@
| $@
| $@
| $@
$--- $@
$ $@@
$ $@
|\ /|$@
| + |$@
| |$@
$ $@
$ $@@
$ $@
|\ |$@
| + |$@
| \|$@
$ $@
$ $@@
$___ $@
| |$@
| |$@
| |$@
$--- $@
$ $@@
$___ $@
| |$@
|-+- $@
| $@
$ $@
$ $@@
$___ $@
| |$@
| |$@
| \|$@
$--- $@
$ $@@
$___ $@
| |$@
|-+- $@
| \ $@
$ $@
$ $@@
$___ $@
| $@
$-+- $@
$ |$@
$--- $@
$ $@@
$___ $@
$ | $@
$ + $@
$ | $@
$ $@
$ $@@
$ $@
| |$@
| |$@
| |$@
$--- $@
$ $@@
$ $@
| / $@
| + $@
|/ $@
$ $@
$ $@@
$ $@
| |$@
| + |$@
|/ \|$@
$ $@
$ $@@
$ $@
$\ / $@
$ + $@
$/ \ $@
$ $@
$ $@@
$ $@
$\ / $@
$ + $@
$ | $@
$ $@
$ $@@
$___ $@
$ / $@
$ + $@
$/ $@
$--- $@
$ $@@
$ __ $@
$ | $@
$ + $@
$ | $@
$ -- $@
$ $@@
$ $@
$\ $@
$ + $@
$ \ $@
$ $@
$ $@@
$__ $@
$ | $@
$ + $@
$ | $@
$-- $@
$ $@@
$ $@
$ /|$@
$ $@
$ $@
$ $@
$ $@@
$ $@
$ $@
$ $@
$ $@
$--- $@
$ $@@
$ $@
$\ $@
$ $@
$ $@
$ $@
$ $@@
$ $@
$ $@
$- $@
| | $@
$-- $@
$ $@@
$ $@
| $@
|- $@
| | $@
$- $@
$ $@@
$ $@
$ $@
$- $@
| $@
$- $@
$ $@@
$ $@
$ |$@
$ -|$@
$ | |$@
$ - $@
$ $@@
$ $@
$ $@
$- $@
|/ $@
$-- $@
$ $@@
$ _ $@
$ | $@
$-+- $@
$ | $@
$ $@
$ $@@
$ _ $@
$ | |$@
$ -|$@
$ |$@
$ - $@
$ $@@
$ $@
| $@
|- $@
| | $@
$ $@
$ $@@
$ _ $@
$ $@
$ + $@
$ | $@
$ $@
$ $@@
$ _ $@
$ $@
$ + $@
| | $@
$- $@
$ $@@
$ $@
$ | $@
$ +- $@
$ |\ $@
$ $@
$ $@@
$ $@
$ | $@
$ + $@
$ | $@
$ - $@
$ $@@
$ $@
$ $@
|- - $@
| | |$@
$ $@
$ $@@
$ $@
$ $@
|- $@
| | $@
$ $@
$ $@@
$ $@
$ $@
$- $@
| | $@
$- $@
$ $@@
$_ $@
| | $@
|- $@
| $@
$ $@
$ $@@
$ _ $@
$ | |$@
$ -|$@
$ |$@
$ $@
$ $@@
$ $@
$ $@
|- $@
| $@
$ $@
$ $@@
$ $@
$ $@
$ - $@
$ \ $@
$ - $@
$ $@@
$ $@
$ | $@
$-+- $@
$ | $@
$ - $@
$ $@@
$ $@
$ $@
$ $@
| | $@
$-- $@
$ $@@
$ $@
$ $@
$ $@
|/ $@
$ $@
$ $@@
$ $@
$ $@
| + |$@
|/ \|$@
$ $@
$ $@@
$ $@
$ $@
$- - $@
$ | $@
$- - $@
$ $@@
$ $@
$\ / $@
$ + $@
$/ $@
$ $@
$ $@@
$ $@
$ $@
$- $@
$/ $@
$- $@
$ $@@
$ _ $@
$ | $@
$-+ $@
$ | $@
$ - $@
$ $@@
$ $@
$ | $@
$ + $@
$ | $@
$ $@
$ $@@
$_ $@
$ | $@
$ +- $@
$ | $@
$- $@
$ $@@
$ $@
|\| $@
$ $@
$ $@
$ $@
$ $@@
$_ _ $@
|\ $@
|-+ $@
| \ $@
$ $@
$ $@@
$_ _ $@
$@
-+- $@
| |$@
$--- $@
$ $@@
$_ _ $@
$ $@
| |$@
| |$@
$--- $@
$ $@@
$_ _ $@
$ $@
$- $@
| | $@
$-- $@
$ $@@
$_ _ $@
$ $@
$- $@
| | $@
$- $@
$ $@@
$_ _ $@
$ $@
$ $@
| | $@
$-- $@
$ $@@
$___ $@
| |$@
| - $@
| |$@
$ - $@
$ $@@
@@ -0,0 +1,567 @@
import {List} from 'immutable';
import {Value} from './index';
/** The HSL color space name. */
export type ColorSpaceHsl = 'hsl';
/** The HSL color space channel names. */
export type ChannelNameHsl = 'hue' | 'saturation' | 'lightness' | 'alpha';
/** The HWB color space name. */
export type ColorSpaceHwb = 'hwb';
/** The HWB color space channel names. */
export type ChannelNameHwb = 'hue' | 'whiteness' | 'blackness' | 'alpha';
/** The Lab / Oklab color space names. */
export type ColorSpaceLab = 'lab' | 'oklab';
/** The Lab / Oklab color space channel names. */
export type ChannelNameLab = 'lightness' | 'a' | 'b' | 'alpha';
/** The LCH / Oklch color space names. */
export type ColorSpaceLch = 'lch' | 'oklch';
/** The LCH / Oklch color space channel names. */
export type ChannelNameLch = 'lightness' | 'chroma' | 'hue' | 'alpha';
/** Names of color spaces with RGB channels. */
export type ColorSpaceRgb =
| 'a98-rgb'
| 'display-p3'
| 'display-p3-linear'
| 'prophoto-rgb'
| 'rec2020'
| 'rgb'
| 'srgb'
| 'srgb-linear';
/** RGB channel names. */
export type ChannelNameRgb = 'red' | 'green' | 'blue' | 'alpha';
/** Names of color spaces with XYZ channels. */
export type ColorSpaceXyz = 'xyz' | 'xyz-d50' | 'xyz-d65';
/** XYZ channel names. */
export type ChannelNameXyz = 'x' | 'y' | 'z' | 'alpha';
/** All supported color space channel names. */
export type ChannelName =
| ChannelNameHsl
| ChannelNameHwb
| ChannelNameLab
| ChannelNameLch
| ChannelNameRgb
| ChannelNameXyz;
/** All supported color space names. */
export type KnownColorSpace =
| ColorSpaceHsl
| ColorSpaceHwb
| ColorSpaceLab
| ColorSpaceLch
| ColorSpaceRgb
| ColorSpaceXyz;
/** Polar color space names (HSL, HWB, LCH, and Oklch spaces). */
export type PolarColorSpace = ColorSpaceHsl | ColorSpaceHwb | ColorSpaceLch;
/** Rectangular color space names (Lab, Oklab, RGB, and XYZ spaces). */
export type RectangularColorSpace = Exclude<KnownColorSpace, PolarColorSpace>;
/**
* Methods by which two hues are adjusted when interpolating between polar
* colors.
*/
export type HueInterpolationMethod =
| 'decreasing'
| 'increasing'
| 'longer'
| 'shorter';
/**
* Methods by which colors in bounded spaces can be mapped to within their
* gamut.
*
* * `local-minde`: The algorithm specified in [the original Color Level 4
* candidate recommendation]. This maps in the Oklch color space, using the
* [deltaEOK] color difference formula and the [local-MINDE] improvement.
*
* * `clip`: Clamp each color channel that's outside the gamut to the minimum or
* maximum value for that channel. This algorithm will produce poor visual
* results, but it may be useful to match the behavior of other situations in
* which a color can be clipped.
*
* [the original Color Level 4 candidate recommendation]: https://www.w3.org/TR/2024/CRD-css-color-4-20240213/#css-gamut-mapping
* [deltaEOK]: https://www.w3.org/TR/2024/CRD-css-color-4-20240213/#color-difference-OK
* [local-MINDE]: https://www.w3.org/TR/2024/CRD-css-color-4-20240213/#GM-chroma-local-MINDE
*/
export type GamutMapMethod = 'clip' | 'local-minde';
/**
* Sass's [color type](https://sass-lang.com/documentation/values/colors).
*
* No matter what representation was originally used to create this color, all
* of its channels are accessible.
*
* @category Custom Function
*/
export class SassColor extends Value {
/**
* Creates an [RGB color].
*
* If `space` is missing, **only** `undefined` should be used to indicate that
* `alpha` isn't passed. If `null` is used instead, it will be treated as a
* [missing component]. See [breaking changes] for details.
*
* If `space` is defined and `null` is passed for any component, it will be
* treated as a [missing component].
*
* [RGB color]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb
* [missing component]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
* [breaking changes]: /documentation/breaking-changes/null-alpha
*
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
constructor(options: {
red: number | null;
green: number | null;
blue: number | null;
alpha?: number | null;
space?: 'rgb';
});
/**
* Creates an [HSL color].
*
* If `space` is missing, **only** `undefined` should be used to indicate that
* `alpha` isn't passed. If `null` is used instead, it will be treated as a
* [missing component]. See [breaking changes] for details.
*
* If `space` is defined and `null` is passed for any component, it will be
* treated as a [missing component].
*
* [HSL color]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl
* [missing component]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
* [breaking changes]: /documentation/breaking-changes/null-alpha
*
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
constructor(options: {
hue: number | null;
saturation: number | null;
lightness: number | null;
alpha?: number | null;
space?: ColorSpaceHsl;
});
/**
* Creates an [HWB color].
*
* If `space` is missing, **only** `undefined` should be used to indicate that
* `alpha` isn't passed. If `null` is used instead, it will be treated as a
* [missing component]. See [breaking changes] for details.
*
* If `space` is defined and `null` is passed for any component, it will be
* treated as a [missing component].
*
* [HWB color]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hwb
* [missing component]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
* [breaking changes]: /documentation/breaking-changes/null-alpha
*
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
constructor(options: {
hue: number | null;
whiteness: number | null;
blackness: number | null;
alpha?: number | null;
space?: ColorSpaceHwb;
});
/**
* Creates a [Lab] or [Oklab] color.
*
* If `null` is passed for any component, it will be treated as a [missing
* component].
*
* [Lab]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/lab
* [Oklab]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklab
* [missing component]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
*
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
constructor(options: {
lightness: number | null;
a: number | null;
b: number | null;
alpha?: number | null;
space: ColorSpaceLab;
});
/**
* Creates an [LCH] or [Oklch] color.
*
* If `null` is passed for any component, it will be treated as a [missing
* component].
*
* [LCH]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/lch
* [Oklch]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch
* [missing component]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
*
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
constructor(options: {
lightness: number | null;
chroma: number | null;
hue: number | null;
alpha?: number | null;
space: ColorSpaceLch;
});
/**
* Creates a color in a predefined [RGB color space].
*
* If `null` is passed for any component, it will be treated as a [missing
* component].
*
* [RGB color space]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color#using_predefined_colorspaces_with_color
* [missing component]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
*
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
constructor(options: {
red: number | null;
green: number | null;
blue: number | null;
alpha?: number | null;
space: Exclude<ColorSpaceRgb, 'rgb'>;
});
/**
* Creates a color in a predefined [XYZ color space].
*
* If `null` is passed for any component, it will be treated as a [missing
* component].
*
* [XYZ color space]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color#using_the_xyz_colorspace_with_color
* [missing component]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
*
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
constructor(options: {
x: number | null;
y: number | null;
z: number | null;
alpha?: number | null;
space: ColorSpaceXyz;
});
/** The name of this color's space. */
get space(): KnownColorSpace;
/**
* Returns a new color that's the result of converting this color to the
* specified `space`.
*/
toSpace(space: KnownColorSpace): SassColor;
/**
* A boolean indicating whether this color is in a legacy color space (`rgb`,
* `hsl`, or `hwb`).
*/
get isLegacy(): boolean;
/**
* Returns a boolean indicating whether this color is in-gamut (as opposed to
* having one or more of its channels out of bounds) for the specified
* `space`, or its current color space if `space` is not specified.
*/
isInGamut(space?: KnownColorSpace): boolean;
/**
* Returns a copy of this color, modified so it is in-gamut for the specified
* `space`—or the current color space if `space` is not specified—using
* `method` to map out-of-gamut colors into the desired gamut.
*/
toGamut(options: {
space?: KnownColorSpace;
method: GamutMapMethod;
}): SassColor;
/**
* A list of this color's channel values (excluding alpha), with [missing
* channels] converted to `null`.
*
* [missing channels]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
*/
get channelsOrNull(): List<number | null>;
/**
* A list of this color's channel values (excluding alpha), with [missing
* channels] converted to `0`.
*
* [missing channels]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
*/
get channels(): List<number>;
/**
* Returns the value of a single specified `channel` of this color, with
* [missing channels] converted to `0`.
*
* [missing channels]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
*
* @throws `Error` if `channel` is not `alpha` or a channel in this color's
* space.
*/
channel(channel: ChannelName): number;
/**
* Returns the value of a single specified `channel` of this color after
* converting this color to the specified `space`, with [missing channels]
* converted to `0`.
*
* [missing channels]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
*
* @throws `Error` if `channel` is not `alpha` or a channel in `space`.
*/
channel(channel: ChannelNameHsl, options: {space: ColorSpaceHsl}): number;
channel(channel: ChannelNameHwb, options: {space: ColorSpaceHwb}): number;
channel(channel: ChannelNameLab, options: {space: ColorSpaceLab}): number;
channel(channel: ChannelNameLch, options: {space: ColorSpaceLch}): number;
channel(channel: ChannelNameRgb, options: {space: ColorSpaceRgb}): number;
channel(channel: ChannelNameXyz, options: {space: ColorSpaceXyz}): number;
/** This color's alpha channel, between `0` and `1`. */
get alpha(): number;
/**
* Returns a boolean indicating whether a given channel value is a [missing
* channel].
*
* [missing channel]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
*/
isChannelMissing(channel: ChannelName): boolean;
/**
* Returns a boolean indicating whether a given `channel` is [powerless] in
* this color. This is a special state that's defined for individual color
* spaces, which indicates that a channel's value won't affect how a color is
* displayed.
*
* [powerless]: https://www.w3.org/TR/css-color-4/#powerless
*/
isChannelPowerless(channel: ChannelName): boolean;
isChannelPowerless(
channel: ChannelNameHsl,
options?: {space: ColorSpaceHsl}
): boolean;
isChannelPowerless(
channel: ChannelNameHwb,
options?: {space: ColorSpaceHwb}
): boolean;
isChannelPowerless(
channel: ChannelNameLab,
options?: {space: ColorSpaceLab}
): boolean;
isChannelPowerless(
channel: ChannelNameLch,
options?: {space: ColorSpaceLch}
): boolean;
isChannelPowerless(
channel: ChannelNameRgb,
options?: {space: ColorSpaceRgb}
): boolean;
isChannelPowerless(
channel: ChannelNameXyz,
options?: {space: ColorSpaceXyz}
): boolean;
/**
* Returns a color partway between this color and `color2` according to
* `method`, as defined by the CSS Color 4 [color interpolation] procedure.
*
* [color interpolation]: https://www.w3.org/TR/css-color-4/#interpolation
*
* If `method` is missing and this color is in a rectangular color space (Lab,
* Oklab, RGB, and XYZ spaces), `method` defaults to the color space of this
* color. Otherwise, `method` defaults to a space separated list containing
* the color space of this color and the string "shorter".
*
* The `weight` is a number between 0 and 1 that indicates how much of this
* color should be in the resulting color. If omitted, it defaults to 0.5.
*/
interpolate(
color2: SassColor,
options?: {
weight?: number;
method?: HueInterpolationMethod;
}
): SassColor;
/**
* Returns a new color that's the result of changing one or more of this
* color's HSL channels.
*
* @throws `Error` if `space` is missing and this color is not in a legacy
* color space (`rgb`, `hsl`, or `hwb`).
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
change(
options: {
[key in ChannelNameHsl]?: number | null;
} & {
space?: ColorSpaceHsl;
}
): SassColor;
/**
* Returns a new color that's the result of changing one or more of this
* color's HWB channels.
*
* @throws `Error` if `space` is missing and this color is not in a legacy
* color space (`rgb`, `hsl`, or `hwb`).
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
change(
options: {
[key in ChannelNameHwb]?: number | null;
} & {
space?: ColorSpaceHwb;
}
): SassColor;
/**
* Returns a new color that's the result of changing one or more of this
* color's Lab channels.
*
* @throws `Error` if `space` is missing and this color is not in the Lab or
* Oklab color spaces.
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
change(
options: {
[key in ChannelNameLab]?: number | null;
} & {
space?: ColorSpaceLab;
}
): SassColor;
/**
* Returns a new color that's the result of changing one or more of this
* color's LCH channels.
*
* @throws `Error` if `space` is missing and this color is not in the LCH or
* Oklch color spaces.
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
change(
options: {
[key in ChannelNameLch]?: number | null;
} & {
space?: ColorSpaceLch;
}
): SassColor;
/**
* Returns a new color that's the result of changing one or more of this
* color's RGB channels.
*
* @throws `Error` if `space` is missing and this color is not in a legacy
* color space (`rgb`, `hsl`, or `hwb`).
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
change(
options: {
[key in ChannelNameRgb]?: number | null;
} & {
space?: ColorSpaceRgb;
}
): SassColor;
/**
* Returns a new color that's the result of changing one or more of this
* color's XYZ channels.
*
* @throws `Error` if `space` is missing and this color is not in an XYZ color
* space.
* @throws `Error` if `alpha` is set and isn't `null` or a number between `0`
* and `1`.
*/
change(
options: {
[key in ChannelNameXyz]?: number | null;
} & {
space?: ColorSpaceXyz;
}
): SassColor;
/**
* This color's red channel in the RGB color space.
*
* @deprecated Use {@link channel} instead.
*/
get red(): number;
/**
* This color's green channel in the RGB color space.
*
* @deprecated Use {@link channel} instead.
*/
get green(): number;
/**
* This color's blue channel in the RGB color space.
*
* @deprecated Use {@link channel} instead.
*/
get blue(): number;
/**
* This color's hue in the HSL color space.
*
* @deprecated Use {@link channel} instead.
*/
get hue(): number;
/**
* This color's saturation in the HSL color space.
*
* @deprecated Use {@link channel} instead.
*/
get saturation(): number;
/**
* This color's lightness in the HSL color space.
*
* @deprecated Use {@link channel} instead.
*/
get lightness(): number;
/**
* This color's whiteness in the HWB color space.
*
* @deprecated Use {@link channel} instead.
*/
get whiteness(): number;
/**
* This color's blackness in the HWB color space.
*
* @deprecated Use {@link channel} instead.
*/
get blackness(): number;
}
@@ -0,0 +1,69 @@
{
"name": "@typescript-eslint/tsconfig-utils",
"version": "8.58.2",
"description": "Utilities for collecting TSConfigs for linting scenarios.",
"files": [
"dist",
"!**/*.tsbuildinfo",
"package.json",
"README.md",
"LICENSE"
],
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
"directory": "packages/tsconfig-utils"
},
"bugs": {
"url": "https://github.com/typescript-eslint/typescript-eslint/issues"
},
"homepage": "https://typescript-eslint.io",
"license": "MIT",
"keywords": [
"eslint",
"typescript",
"estree"
],
"peerDependencies": {
"typescript": ">=4.8.4 <6.1.0"
},
"devDependencies": {
"@vitest/coverage-v8": "^4.0.18",
"rimraf": "^5.0.10",
"typescript": ">=4.8.4 <6.1.0",
"vitest": "^4.0.18"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"publishConfig": {
"access": "public"
},
"nx": {
"name": "tsconfig-utils",
"includedScripts": [
"clean"
]
},
"scripts": {
"//": "These package scripts are mostly here for convenience. Task running is handled by Nx at the root level.",
"build": "pnpm exec nx build",
"clean": "rimraf dist/ coverage/",
"format": "pnpm -w exec format",
"lint": "pnpm -w exec nx lint",
"test": "pnpm -w exec nx test",
"typecheck": "pnpm -w exec nx typecheck"
}
}
@@ -0,0 +1,378 @@
'use strict';
var undefined;
var $Object = require('es-object-atoms');
var $Error = require('es-errors');
var $EvalError = require('es-errors/eval');
var $RangeError = require('es-errors/range');
var $ReferenceError = require('es-errors/ref');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $URIError = require('es-errors/uri');
var abs = require('math-intrinsics/abs');
var floor = require('math-intrinsics/floor');
var max = require('math-intrinsics/max');
var min = require('math-intrinsics/min');
var pow = require('math-intrinsics/pow');
var round = require('math-intrinsics/round');
var sign = require('math-intrinsics/sign');
var $Function = Function;
// eslint-disable-next-line consistent-return
var getEvalledConstructor = function (expressionSyntax) {
try {
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
} catch (e) {}
};
var $gOPD = require('gopd');
var $defineProperty = require('es-define-property');
var throwTypeError = function () {
throw new $TypeError();
};
var ThrowTypeError = $gOPD
? (function () {
try {
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
arguments.callee; // IE 8 does not throw here
return throwTypeError;
} catch (calleeThrows) {
try {
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
return $gOPD(arguments, 'callee').get;
} catch (gOPDthrows) {
return throwTypeError;
}
}
}())
: throwTypeError;
var hasSymbols = require('has-symbols')();
var getProto = require('get-proto');
var $ObjectGPO = require('get-proto/Object.getPrototypeOf');
var $ReflectGPO = require('get-proto/Reflect.getPrototypeOf');
var $apply = require('call-bind-apply-helpers/functionApply');
var $call = require('call-bind-apply-helpers/functionCall');
var needsEval = {};
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);
var INTRINSICS = {
__proto__: null,
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
'%Array%': Array,
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,
'%AsyncFromSyncIteratorPrototype%': undefined,
'%AsyncFunction%': needsEval,
'%AsyncGenerator%': needsEval,
'%AsyncGeneratorFunction%': needsEval,
'%AsyncIteratorPrototype%': needsEval,
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,
'%Boolean%': Boolean,
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
'%Date%': Date,
'%decodeURI%': decodeURI,
'%decodeURIComponent%': decodeURIComponent,
'%encodeURI%': encodeURI,
'%encodeURIComponent%': encodeURIComponent,
'%Error%': $Error,
'%eval%': eval, // eslint-disable-line no-eval
'%EvalError%': $EvalError,
'%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array,
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
'%Function%': $Function,
'%GeneratorFunction%': needsEval,
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
'%isFinite%': isFinite,
'%isNaN%': isNaN,
'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
'%Map%': typeof Map === 'undefined' ? undefined : Map,
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),
'%Math%': Math,
'%Number%': Number,
'%Object%': $Object,
'%Object.getOwnPropertyDescriptor%': $gOPD,
'%parseFloat%': parseFloat,
'%parseInt%': parseInt,
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
'%RangeError%': $RangeError,
'%ReferenceError%': $ReferenceError,
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
'%RegExp%': RegExp,
'%Set%': typeof Set === 'undefined' ? undefined : Set,
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
'%String%': String,
'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,
'%Symbol%': hasSymbols ? Symbol : undefined,
'%SyntaxError%': $SyntaxError,
'%ThrowTypeError%': ThrowTypeError,
'%TypedArray%': TypedArray,
'%TypeError%': $TypeError,
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
'%URIError%': $URIError,
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,
'%Function.prototype.call%': $call,
'%Function.prototype.apply%': $apply,
'%Object.defineProperty%': $defineProperty,
'%Object.getPrototypeOf%': $ObjectGPO,
'%Math.abs%': abs,
'%Math.floor%': floor,
'%Math.max%': max,
'%Math.min%': min,
'%Math.pow%': pow,
'%Math.round%': round,
'%Math.sign%': sign,
'%Reflect.getPrototypeOf%': $ReflectGPO
};
if (getProto) {
try {
null.error; // eslint-disable-line no-unused-expressions
} catch (e) {
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
var errorProto = getProto(getProto(e));
INTRINSICS['%Error.prototype%'] = errorProto;
}
}
var doEval = function doEval(name) {
var value;
if (name === '%AsyncFunction%') {
value = getEvalledConstructor('async function () {}');
} else if (name === '%GeneratorFunction%') {
value = getEvalledConstructor('function* () {}');
} else if (name === '%AsyncGeneratorFunction%') {
value = getEvalledConstructor('async function* () {}');
} else if (name === '%AsyncGenerator%') {
var fn = doEval('%AsyncGeneratorFunction%');
if (fn) {
value = fn.prototype;
}
} else if (name === '%AsyncIteratorPrototype%') {
var gen = doEval('%AsyncGenerator%');
if (gen && getProto) {
value = getProto(gen.prototype);
}
}
INTRINSICS[name] = value;
return value;
};
var LEGACY_ALIASES = {
__proto__: null,
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
'%ArrayPrototype%': ['Array', 'prototype'],
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
'%BooleanPrototype%': ['Boolean', 'prototype'],
'%DataViewPrototype%': ['DataView', 'prototype'],
'%DatePrototype%': ['Date', 'prototype'],
'%ErrorPrototype%': ['Error', 'prototype'],
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
'%FunctionPrototype%': ['Function', 'prototype'],
'%Generator%': ['GeneratorFunction', 'prototype'],
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
'%JSONParse%': ['JSON', 'parse'],
'%JSONStringify%': ['JSON', 'stringify'],
'%MapPrototype%': ['Map', 'prototype'],
'%NumberPrototype%': ['Number', 'prototype'],
'%ObjectPrototype%': ['Object', 'prototype'],
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
'%PromisePrototype%': ['Promise', 'prototype'],
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
'%Promise_all%': ['Promise', 'all'],
'%Promise_reject%': ['Promise', 'reject'],
'%Promise_resolve%': ['Promise', 'resolve'],
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
'%RegExpPrototype%': ['RegExp', 'prototype'],
'%SetPrototype%': ['Set', 'prototype'],
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
'%StringPrototype%': ['String', 'prototype'],
'%SymbolPrototype%': ['Symbol', 'prototype'],
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
'%URIErrorPrototype%': ['URIError', 'prototype'],
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
'%WeakSetPrototype%': ['WeakSet', 'prototype']
};
var bind = require('function-bind');
var hasOwn = require('hasown');
var $concat = bind.call($call, Array.prototype.concat);
var $spliceApply = bind.call($apply, Array.prototype.splice);
var $replace = bind.call($call, String.prototype.replace);
var $strSlice = bind.call($call, String.prototype.slice);
var $exec = bind.call($call, RegExp.prototype.exec);
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
var stringToPath = function stringToPath(string) {
var first = $strSlice(string, 0, 1);
var last = $strSlice(string, -1);
if (first === '%' && last !== '%') {
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
} else if (last === '%' && first !== '%') {
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
}
var result = [];
$replace(string, rePropName, function (match, number, quote, subString) {
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
});
return result;
};
/* end adaptation */
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
var intrinsicName = name;
var alias;
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
alias = LEGACY_ALIASES[intrinsicName];
intrinsicName = '%' + alias[0] + '%';
}
if (hasOwn(INTRINSICS, intrinsicName)) {
var value = INTRINSICS[intrinsicName];
if (value === needsEval) {
value = doEval(intrinsicName);
}
if (typeof value === 'undefined' && !allowMissing) {
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
}
return {
alias: alias,
name: intrinsicName,
value: value
};
}
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
};
module.exports = function GetIntrinsic(name, allowMissing) {
if (typeof name !== 'string' || name.length === 0) {
throw new $TypeError('intrinsic name must be a non-empty string');
}
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
throw new $TypeError('"allowMissing" argument must be a boolean');
}
if ($exec(/^%?[^%]*%?$/, name) === null) {
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
}
var parts = stringToPath(name);
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
var intrinsicRealName = intrinsic.name;
var value = intrinsic.value;
var skipFurtherCaching = false;
var alias = intrinsic.alias;
if (alias) {
intrinsicBaseName = alias[0];
$spliceApply(parts, $concat([0, 1], alias));
}
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
var part = parts[i];
var first = $strSlice(part, 0, 1);
var last = $strSlice(part, -1);
if (
(
(first === '"' || first === "'" || first === '`')
|| (last === '"' || last === "'" || last === '`')
)
&& first !== last
) {
throw new $SyntaxError('property names with quotes must have matching quotes');
}
if (part === 'constructor' || !isOwn) {
skipFurtherCaching = true;
}
intrinsicBaseName += '.' + part;
intrinsicRealName = '%' + intrinsicBaseName + '%';
if (hasOwn(INTRINSICS, intrinsicRealName)) {
value = INTRINSICS[intrinsicRealName];
} else if (value != null) {
if (!(part in value)) {
if (!allowMissing) {
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
}
return void undefined;
}
if ($gOPD && (i + 1) >= parts.length) {
var desc = $gOPD(value, part);
isOwn = !!desc;
// By convention, when a data property is converted to an accessor
// property to emulate a data property that does not suffer from
// the override mistake, that accessor's getter is marked with
// an `originalValue` property. Here, when we detect this, we
// uphold the illusion by pretending to see that original data
// property, i.e., returning the value rather than the getter
// itself.
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
value = desc.get;
} else {
value = value[part];
}
} else {
isOwn = hasOwn(value, part);
value = value[part];
}
if (isOwn && !skipFurtherCaching) {
INTRINSICS[intrinsicRealName] = value;
}
}
}
return value;
};
@@ -0,0 +1,18 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/adapter/deno/conninfo.ts
/**
* Get conninfo with Deno
* @param c Context
* @returns ConnInfo
* @deprecated `hono/deno` will be removed in v5. Install `@hono/deno` and import from there instead.
*/
const getConnInfo = (c) => {
const { remoteAddr } = c.env;
return { remote: {
address: remoteAddr.hostname,
port: remoteAddr.port,
transport: remoteAddr.transport
} };
};
//#endregion
exports.getConnInfo = getConnInfo;
@@ -0,0 +1,171 @@
/**
* @fileoverview Ensures that the results of typeof are compared against a valid string
* @author Ian Christian Myers
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
defaultOptions: [
{
requireStringLiterals: false,
},
],
docs: {
description:
"Enforce comparing `typeof` expressions against valid strings",
recommended: true,
url: "https://eslint.org/docs/latest/rules/valid-typeof",
},
hasSuggestions: true,
schema: [
{
type: "object",
properties: {
requireStringLiterals: {
type: "boolean",
},
},
additionalProperties: false,
},
],
messages: {
invalidValue: "Invalid typeof comparison value.",
notString: "Typeof comparisons should be to string literals.",
suggestString: 'Use `"{{type}}"` instead of `{{type}}`.',
},
},
create(context) {
const VALID_TYPES = new Set([
"symbol",
"undefined",
"object",
"boolean",
"number",
"string",
"function",
"bigint",
]),
OPERATORS = new Set(["==", "===", "!=", "!=="]);
const sourceCode = context.sourceCode;
const [{ requireStringLiterals }] = context.options;
let globalScope;
/**
* Checks whether the given node represents a reference to a global variable that is not declared in the source code.
* These identifiers will be allowed, as it is assumed that user has no control over the names of external global variables.
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a reference to a global variable.
*/
function isReferenceToGlobalVariable(node) {
const variable = globalScope.set.get(node.name);
return (
variable &&
variable.defs.length === 0 &&
variable.references.some(ref => ref.identifier === node)
);
}
/**
* Determines whether a node is a typeof expression.
* @param {ASTNode} node The node
* @returns {boolean} `true` if the node is a typeof expression
*/
function isTypeofExpression(node) {
return (
node.type === "UnaryExpression" && node.operator === "typeof"
);
}
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
Program(node) {
globalScope = sourceCode.getScope(node);
},
UnaryExpression(node) {
if (isTypeofExpression(node)) {
const { parent } = node;
if (
parent.type === "BinaryExpression" &&
OPERATORS.has(parent.operator)
) {
const sibling =
parent.left === node ? parent.right : parent.left;
if (
sibling.type === "Literal" ||
astUtils.isStaticTemplateLiteral(sibling)
) {
const value =
sibling.type === "Literal"
? sibling.value
: sibling.quasis[0].value.cooked;
if (!VALID_TYPES.has(value)) {
context.report({
node: sibling,
messageId: "invalidValue",
});
}
} else if (
sibling.type === "Identifier" &&
sibling.name === "undefined" &&
isReferenceToGlobalVariable(sibling)
) {
context.report({
node: sibling,
messageId: requireStringLiterals
? "notString"
: "invalidValue",
suggest: [
{
messageId: "suggestString",
data: { type: "undefined" },
fix(fixer) {
return fixer.replaceText(
sibling,
'"undefined"',
);
},
},
],
});
} else if (
requireStringLiterals &&
!isTypeofExpression(sibling)
) {
context.report({
node: sibling,
messageId: "notString",
});
}
}
}
},
};
},
};
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Sparkle = createLucideIcon("Sparkle", [
[
"path",
{
d: "M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",
key: "4pj2yx"
}
]
]);
export { Sparkle as default };
//# sourceMappingURL=sparkle.js.map
@@ -0,0 +1 @@
{"version":3,"file":"kanban-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_arrayLikeToArray","require","_maybeArrayLike","orElse","arr","i","Array","isArray","length","len","arrayLikeToArray"],"sources":["../../src/helpers/maybeArrayLike.ts"],"sourcesContent":["/* @minVersion 7.9.0 */\n\nimport arrayLikeToArray from \"./arrayLikeToArray.ts\";\n\nexport default function _maybeArrayLike<T>(\n orElse: (arr: any, i: number) => T[] | undefined,\n arr: ArrayLike<T>,\n i: number,\n) {\n if (arr && !Array.isArray(arr) && typeof arr.length === \"number\") {\n var len = arr.length;\n return arrayLikeToArray<T>(arr, i !== void 0 && i < len ? i : len);\n }\n return orElse(arr, i);\n}\n"],"mappings":";;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAEe,SAASC,eAAeA,CACrCC,MAAgD,EAChDC,GAAiB,EACjBC,CAAS,EACT;EACA,IAAID,GAAG,IAAI,CAACE,KAAK,CAACC,OAAO,CAACH,GAAG,CAAC,IAAI,OAAOA,GAAG,CAACI,MAAM,KAAK,QAAQ,EAAE;IAChE,IAAIC,GAAG,GAAGL,GAAG,CAACI,MAAM;IACpB,OAAO,IAAAE,yBAAgB,EAAIN,GAAG,EAAEC,CAAC,KAAK,KAAK,CAAC,IAAIA,CAAC,GAAGI,GAAG,GAAGJ,CAAC,GAAGI,GAAG,CAAC;EACpE;EACA,OAAON,MAAM,CAACC,GAAG,EAAEC,CAAC,CAAC;AACvB","ignoreList":[]}
@@ -0,0 +1,22 @@
Copyright (c) 2012, 2013 Thorsten Lorenz <thlorenz@gmx.de>
Copyright (c) 2012 James Halliday <mail@substack.net>
Copyright (c) 2009 Thomas Robinson <280north.com>
This software is released under the MIT license:
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,16 @@
// Type-side twin of lib/sqlite3-binding.js: resolves the runtime import to
// the hand-written native declarations in lib/native.d.ts so the whole JS
// layer is checked against the addon's real shape (and never against the
// .js file itself, whose default export would be `any`).
import binding, {
Backup,
Blob,
Database,
Session,
Statement,
} from './native.js';
export default binding;
export type { NativeBinding } from './native.js';
export { Backup, Blob, Database, Session, Statement };