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,101 @@
import * as _radix_ui_react_context from '@radix-ui/react-context';
import * as React from 'react';
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
import * as PopperPrimitive from '@radix-ui/react-popper';
import { Portal as Portal$1 } from '@radix-ui/react-portal';
import { Primitive } from '@radix-ui/react-primitive';
declare const createTooltipScope: _radix_ui_react_context.CreateScope;
interface TooltipProviderProps {
children: React.ReactNode;
/**
* The duration from when the pointer enters the trigger until the tooltip gets opened.
* @defaultValue 700
*/
delayDuration?: number;
/**
* How much time a user has to enter another trigger without incurring a delay again.
* @defaultValue 300
*/
skipDelayDuration?: number;
/**
* When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.
* @defaultValue false
*/
disableHoverableContent?: boolean;
}
declare const TooltipProvider: React.FC<TooltipProviderProps>;
interface TooltipProps {
children?: React.ReactNode;
open?: boolean;
defaultOpen?: boolean;
onOpenChange?: (open: boolean) => void;
/**
* The duration from when the pointer enters the trigger until the tooltip gets opened. This will
* override the prop with the same name passed to Provider.
* @defaultValue 700
*/
delayDuration?: number;
/**
* When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.
* @defaultValue false
*/
disableHoverableContent?: boolean;
}
declare const Tooltip: React.FC<TooltipProps>;
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
interface TooltipTriggerProps extends PrimitiveButtonProps {
}
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
interface TooltipPortalProps {
children?: React.ReactNode;
/**
* Specify a container element to portal the content into.
*/
container?: PortalProps['container'];
/**
* Used to force mounting when more control is needed. Useful when
* controlling animation with React animation libraries.
*/
forceMount?: true;
}
declare const TooltipPortal: React.FC<TooltipPortalProps>;
interface TooltipContentProps extends TooltipContentImplProps {
/**
* Used to force mounting when more control is needed. Useful when
* controlling animation with React animation libraries.
*/
forceMount?: true;
}
declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
type PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
interface TooltipContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {
/**
* A more descriptive label for accessibility purpose
*/
'aria-label'?: string;
/**
* Event handler called when the escape key is down.
* Can be prevented.
*/
onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];
/**
* Event handler called when the a `pointerdown` event happens outside of the `Tooltip`.
* Can be prevented.
*/
onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];
}
type PopperArrowProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
interface TooltipArrowProps extends PopperArrowProps {
}
declare const TooltipArrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
declare const Provider: React.FC<TooltipProviderProps>;
declare const Root: React.FC<TooltipProps>;
declare const Trigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
declare const Portal: React.FC<TooltipPortalProps>;
declare const Content: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
declare const Arrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
export { Arrow, Content, Portal, Provider, Root, Tooltip, TooltipArrow, type TooltipArrowProps, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipPortalProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, Trigger, createTooltipScope };
@@ -0,0 +1,842 @@
flf2a$ 8 7 18 4 25
crawford.flf (FIGlet font)
Figlet conversion by Kent Nassen, knassen@umich.edu, 1/2/95
From: s1171180@giaeb.cc.monash.edu.au (Rowan Crawford)
Newsgroups: alt.ascii-art
Subject: Font - Style No 2....
Date: 14 Jan 1994 14:37:30 GMT
Organization: Monash University
Lines: 41
Message-ID: <2h6ana$db6@harbinger.cc.monash.edu.au>
NNTP-Posting-Host: giaeb.cc.monash.edu.au
X-Newsreader: NN version 6.5.0 #4 (NOV)
Status: RO
Had some spare time today, so I have done another font. Different
form to the last one though:
[...]
And there you are. "S" looks slightly odd and so does "J", but
otherwise fairly neat I guess.
Row.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
__ @
| T@
| |@
|__j@
__ @
| T@
l__j@
@@
$__ __ @
T |T |@
l_ |l_ |@
$ \l \l@
$ @
$ @
$ @
$ @@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
__ @
T |@
l_ |@
\l@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
__ @
T |@
l_ |@
\l@@
@
@
_____ @
| |@
l_____j@
@
@
@@
@
@
@
@
__ @
| T@
l__j@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
__ @
| T@
l__j@
__ @
| T@
l__j@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
_____ @
/ T@
| Y |@
l__| |@
l__j@
__ @
l__j@
@@
____ @
/ \@
Y _ j@
| T |@
| \__|@
| |@
\__,_j@
@@
____ @
/ T@
Y o |@
| |@
| _ |@
| | |@
l__j__j@
@@
____ @
| \ @
| o )@
| T@
| O |@
| |@
l_____j@
@@
__ @
/ ]@
/ / @
/ / @
/ \_ @
\ |@
\____j@
@@
___ @
| \ @
| \ @
| D Y@
| |@
| |@
l_____j@
@@
___ @
/ _]@
/ [_ @
Y _]@
| [_ @
| T@
l_____j@
@@
_____ @
| |@
| __j@
| l_ @
| _] @
| T @
l__j @
@@
____ @
/ T@
Y __j@
| T |@
| l_ |@
| |@
l___,_j@
@@
__ __ @
| T T@
| l |@
| _ |@
| | |@
| | |@
l__j__j@
@@
____ @
l j@
| T @
| | @
| | @
j l @
|____j@
@@
____ @
| |@
l__ |@
__j |@
/ | |@
\ ` |@
\____j@
@@
__ _ @
| l/ ]@
| ' / @
| \ @
| Y@
| . |@
l__j\_j@
@@
_ @
| T @
| | @
| l___ @
| T@
| |@
l_____j@
@@
___ ___ @
| T T@
| _ _ |@
| \_/ |@
| | |@
| | |@
l___j___j@
@@
____ @
| \ @
| _ Y@
| | |@
| | |@
| | |@
l__j__j@
@@
___ @
/ \ @
Y Y@
| O |@
| |@
l !@
\___/ @
@@
____ @
| \ @
| o )@
| _/ @
| | @
| | @
l__j @
@@
___ @
/ \ @
Y Y@
| Q |@
| |@
l |@
\__,_j@
@@
____ @
| \ @
| D )@
| / @
| \ @
| . Y@
l__j\_j@
@@
_____@
/ ___/@
( \_ @
\__ T@
/ \ |@
\ |@
\___j@
@@
______ @
| T@
| |@
l_j l_j@
| | @
| | @
l__j @
@@
__ __ @
| T T@
| | |@
| | |@
| : |@
l |@
\__,_j@
@@
__ __ @
| T |@
| | |@
| | |@
l : !@
\ / @
\_/ @
@@
__ __ @
| T__T T@
| | | |@
| | | |@
l ` ' !@
\ / @
\_/\_/ @
@@
__ __ @
| T T@
| | |@
l_ _j@
| |@
| | |@
|__j__|@
@@
__ __ @
| T T@
| | |@
| ~ |@
l___, |@
| !@
l____/ @
@@
_____ @
| T@
l__/ |@
| __j@
| / |@
| |@
l_____j@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
__ @
| T@
| _j@
|/ @
@
@
@
@@
____ @
/ T@
Y o |@
| |@
| _ |@
| | |@
l__j__j@
@@
____ @
| \ @
| o )@
| T@
| O |@
| |@
l_____j@
@@
__ @
/ ]@
/ / @
/ / @
/ \_ @
\ |@
\____j@
@@
___ @
| \ @
| \ @
| D Y@
| |@
| |@
l_____j@
@@
___ @
/ _]@
/ [_ @
Y _]@
| [_ @
| T@
l_____j@
@@
_____ @
| |@
| __j@
| l_ @
| _] @
| T @
l__j @
@@
____ @
/ T@
Y __j@
| T |@
| l_ |@
| |@
l___,_j@
@@
__ __ @
| T T@
| l |@
| _ |@
| | |@
| | |@
l__j__j@
@@
____ @
l j@
| T @
| | @
| | @
j l @
|____j@
@@
____ @
| |@
l__ |@
__j |@
/ | |@
\ ` |@
\____j@
@@
__ _ @
| l/ ]@
| ' / @
| \ @
| Y@
| . |@
l__j\_j@
@@
_ @
| T @
| | @
| l___ @
| T@
| |@
l_____j@
@@
___ ___ @
| T T@
| _ _ |@
| \_/ |@
| | |@
| | |@
l___j___j@
@@
____ @
| \ @
| _ Y@
| | |@
| | |@
| | |@
l__j__j@
@@
___ @
/ \ @
Y Y@
| O |@
| |@
l !@
\___/ @
@@
____ @
| \ @
| o )@
| _/ @
| | @
| | @
l__j @
@@
___ @
/ \ @
Y Y@
| Q |@
| |@
l |@
\__,_j@
@@
____ @
| \ @
| D )@
| / @
| \ @
| . Y@
l__j\_j@
@@
_____@
/ ___/@
( \_ @
\__ T@
/ \ |@
\ |@
\___j@
@@
______ @
| T@
| |@
l_j l_j@
| | @
| | @
l__j @
@@
__ __ @
| T T@
| | |@
| | |@
| : |@
l |@
\__,_j@
@@
__ __ @
| T |@
| | |@
| | |@
l : !@
\ / @
\_/ @
@@
__ __ @
| T__T T@
| | | |@
| | | |@
l ` ' !@
\ / @
\_/\_/ @
@@
__ __ @
| T T@
| | |@
l_ _j@
| |@
| | |@
|__j__|@
@@
__ __ @
| T T@
| | |@
| ~ |@
l___, |@
| !@
l____/ @
@@
_____ @
| T@
l__/ |@
| __j@
| / |@
| |@
l_____j@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@@ -0,0 +1,22 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
* @format
*/
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _predicates = require("./predicates");
Object.keys(_predicates).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _predicates[key]) return;
exports[key] = _predicates[key];
});
@@ -0,0 +1,431 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const literalToPrimitiveTypeFlags = {
[ts.TypeFlags.BigIntLiteral]: ts.TypeFlags.BigInt,
[ts.TypeFlags.BooleanLiteral]: ts.TypeFlags.Boolean,
[ts.TypeFlags.NumberLiteral]: ts.TypeFlags.Number,
[ts.TypeFlags.StringLiteral]: ts.TypeFlags.String,
[ts.TypeFlags.TemplateLiteral]: ts.TypeFlags.String,
};
const literalTypeFlags = [
ts.TypeFlags.BigIntLiteral,
ts.TypeFlags.BooleanLiteral,
ts.TypeFlags.NumberLiteral,
ts.TypeFlags.StringLiteral,
ts.TypeFlags.TemplateLiteral,
];
const primitiveTypeFlags = [
ts.TypeFlags.BigInt,
ts.TypeFlags.Boolean,
ts.TypeFlags.Number,
ts.TypeFlags.String,
];
const primitiveTypeFlagNames = {
[ts.TypeFlags.BigInt]: 'bigint',
[ts.TypeFlags.Boolean]: 'boolean',
[ts.TypeFlags.Number]: 'number',
[ts.TypeFlags.String]: 'string',
};
const primitiveTypeFlagTypes = {
bigint: ts.TypeFlags.BigIntLiteral,
boolean: ts.TypeFlags.BooleanLiteral,
number: ts.TypeFlags.NumberLiteral,
string: ts.TypeFlags.StringLiteral,
};
const keywordNodeTypesToTsTypes = new Map([
[utils_1.TSESTree.AST_NODE_TYPES.TSAnyKeyword, ts.TypeFlags.Any],
[utils_1.TSESTree.AST_NODE_TYPES.TSBigIntKeyword, ts.TypeFlags.BigInt],
[utils_1.TSESTree.AST_NODE_TYPES.TSBooleanKeyword, ts.TypeFlags.Boolean],
[utils_1.TSESTree.AST_NODE_TYPES.TSNeverKeyword, ts.TypeFlags.Never],
[utils_1.TSESTree.AST_NODE_TYPES.TSNumberKeyword, ts.TypeFlags.Number],
[utils_1.TSESTree.AST_NODE_TYPES.TSStringKeyword, ts.TypeFlags.String],
[utils_1.TSESTree.AST_NODE_TYPES.TSUnknownKeyword, ts.TypeFlags.Unknown],
]);
function addToMapGroup(map, key, value) {
const existing = map.get(key);
if (existing) {
existing.push(value);
}
else {
map.set(key, [value]);
}
}
function describeLiteralType(type) {
if (type.isStringLiteral()) {
return JSON.stringify(type.value);
}
if ((0, util_1.isTypeBigIntLiteralType)(type)) {
return `${type.value.negative ? '-' : ''}${type.value.base10Value}n`;
}
if (type.isLiteral()) {
// eslint-disable-next-line @typescript-eslint/no-base-to-string
return type.value.toString();
}
if (tsutils.isIntrinsicErrorType(type) && type.aliasSymbol) {
return type.aliasSymbol.escapedName.toString();
}
if ((0, util_1.isTypeAnyType)(type)) {
return 'any';
}
if ((0, util_1.isTypeNeverType)(type)) {
return 'never';
}
if ((0, util_1.isTypeUnknownType)(type)) {
return 'unknown';
}
if ((0, util_1.isTypeTemplateLiteralType)(type)) {
return 'template literal type';
}
if ((0, util_1.isTypeBigIntLiteralType)(type)) {
return `${type.value.negative ? '-' : ''}${type.value.base10Value}n`;
}
if (tsutils.isTrueLiteralType(type)) {
return 'true';
}
if (tsutils.isFalseLiteralType(type)) {
return 'false';
}
return 'literal type';
}
function describeLiteralTypeNode(typeNode) {
switch (typeNode.type) {
case utils_1.AST_NODE_TYPES.TSAnyKeyword:
return 'any';
case utils_1.AST_NODE_TYPES.TSBooleanKeyword:
return 'boolean';
case utils_1.AST_NODE_TYPES.TSNeverKeyword:
return 'never';
case utils_1.AST_NODE_TYPES.TSNumberKeyword:
return 'number';
case utils_1.AST_NODE_TYPES.TSStringKeyword:
return 'string';
case utils_1.AST_NODE_TYPES.TSUnknownKeyword:
return 'unknown';
case utils_1.AST_NODE_TYPES.TSLiteralType:
switch (typeNode.literal.type) {
case utils_1.TSESTree.AST_NODE_TYPES.Literal:
switch (typeof typeNode.literal.value) {
case 'bigint':
return `${typeNode.literal.value < 0 ? '-' : ''}${typeNode.literal.value}n`;
case 'string':
return JSON.stringify(typeNode.literal.value);
default:
return `${typeNode.literal.value}`;
}
case utils_1.TSESTree.AST_NODE_TYPES.TemplateLiteral:
return 'template literal type';
}
}
return 'literal type';
}
function isNodeInsideReturnType(node) {
return (node.parent.type === utils_1.AST_NODE_TYPES.TSTypeAnnotation &&
(0, util_1.isFunctionOrFunctionType)(node.parent.parent));
}
/**
* @remarks TypeScript stores boolean types as the union false | true, always.
*/
function unionTypePartsUnlessBoolean(type) {
return type.isUnion() &&
type.types.length === 2 &&
tsutils.isFalseLiteralType(type.types[0]) &&
tsutils.isTrueLiteralType(type.types[1])
? [type]
: tsutils.unionConstituents(type);
}
exports.default = (0, util_1.createRule)({
name: 'no-redundant-type-constituents',
meta: {
type: 'suggestion',
docs: {
description: 'Disallow members of unions and intersections that do nothing or override type information',
recommended: 'recommended',
requiresTypeChecking: true,
},
messages: {
errorTypeOverrides: `'{{typeName}}' is an 'error' type that acts as 'any' and overrides all other types in this {{container}} type.`,
literalOverridden: `{{literal}} is overridden by {{primitive}} in this union type.`,
overridden: `'{{typeName}}' is overridden by other types in this {{container}} type.`,
overrides: `'{{typeName}}' overrides all other types in this {{container}} type.`,
primitiveOverridden: `{{primitive}} is overridden by the {{literal}} in this intersection type.`,
},
schema: [],
},
defaultOptions: [],
create(context) {
const services = (0, util_1.getParserServices)(context);
const typesCache = new Map();
function getTypeNodeTypePartFlags(typeNode) {
const keywordTypeFlags = keywordNodeTypesToTsTypes.get(typeNode.type);
if (keywordTypeFlags) {
return [
{
typeFlags: keywordTypeFlags,
typeName: describeLiteralTypeNode(typeNode),
},
];
}
if (typeNode.type === utils_1.AST_NODE_TYPES.TSLiteralType &&
typeNode.literal.type === utils_1.AST_NODE_TYPES.Literal) {
return [
{
typeFlags: primitiveTypeFlagTypes[typeof typeNode.literal
.value],
typeName: describeLiteralTypeNode(typeNode),
},
];
}
if (typeNode.type === utils_1.AST_NODE_TYPES.TSUnionType) {
return typeNode.types.flatMap(getTypeNodeTypePartFlags);
}
const nodeType = services.getTypeAtLocation(typeNode);
const typeParts = unionTypePartsUnlessBoolean(nodeType);
return typeParts.map(typePart => ({
typeFlags: typePart.flags,
typeName: describeLiteralType(typePart),
}));
}
function getTypeNodeTypePartFlagsCached(typeNode) {
const existing = typesCache.get(typeNode);
if (existing) {
return existing;
}
const created = getTypeNodeTypePartFlags(typeNode);
typesCache.set(typeNode, created);
return created;
}
return {
'TSIntersectionType:exit'(node) {
const seenLiteralTypes = new Map();
const seenPrimitiveTypes = new Map();
const seenUnionTypes = new Map();
function checkIntersectionBottomAndTopTypes({ typeFlags, typeName }, typeNode) {
for (const [messageId, checkFlag] of [
['overrides', ts.TypeFlags.Any],
['overrides', ts.TypeFlags.Never],
['overridden', ts.TypeFlags.Unknown],
]) {
if (typeFlags === checkFlag) {
context.report({
node: typeNode,
messageId: typeFlags === ts.TypeFlags.Any && typeName !== 'any'
? 'errorTypeOverrides'
: messageId,
data: {
container: 'intersection',
typeName,
},
});
return true;
}
}
return false;
}
for (const typeNode of node.types) {
const typePartFlags = getTypeNodeTypePartFlagsCached(typeNode);
for (const typePart of typePartFlags) {
if (checkIntersectionBottomAndTopTypes(typePart, typeNode)) {
continue;
}
for (const literalTypeFlag of literalTypeFlags) {
if (typePart.typeFlags === literalTypeFlag) {
addToMapGroup(seenLiteralTypes, literalToPrimitiveTypeFlags[literalTypeFlag], typePart.typeName);
break;
}
}
for (const primitiveTypeFlag of primitiveTypeFlags) {
if (typePart.typeFlags === primitiveTypeFlag) {
addToMapGroup(seenPrimitiveTypes, primitiveTypeFlag, typeNode);
}
}
}
// if any typeNode is TSTypeReference and typePartFlags have more than 1 element, than the referenced type is definitely a union.
if (typePartFlags.length >= 2) {
seenUnionTypes.set(typeNode, typePartFlags);
}
}
/**
* @example
* ```ts
* type F = "a"|2|"b";
* type I = F & string;
* ```
* This function checks if all the union members of `F` are assignable to the other member of `I`. If every member is assignable, then its reported else not.
*/
const checkIfUnionsAreAssignable = () => {
for (const [typeRef, typeValues] of seenUnionTypes) {
let primitive = undefined;
for (const { typeFlags } of typeValues) {
if (seenPrimitiveTypes.has(literalToPrimitiveTypeFlags[typeFlags])) {
primitive =
literalToPrimitiveTypeFlags[typeFlags];
}
else {
primitive = undefined;
break;
}
}
if (Number.isInteger(primitive)) {
context.report({
node: typeRef,
messageId: 'primitiveOverridden',
data: {
literal: typeValues.map(name => name.typeName).join(' | '),
primitive: primitiveTypeFlagNames[primitive],
},
});
}
}
};
if (seenUnionTypes.size > 0) {
checkIfUnionsAreAssignable();
return;
}
// For each primitive type of all the seen primitive types,
// if there was a literal type seen that overrides it,
// report each of the primitive type's type nodes
for (const [primitiveTypeFlag, typeNodes] of seenPrimitiveTypes) {
const matchedLiteralTypes = seenLiteralTypes.get(primitiveTypeFlag);
if (matchedLiteralTypes) {
for (const typeNode of typeNodes) {
context.report({
node: typeNode,
messageId: 'primitiveOverridden',
data: {
literal: matchedLiteralTypes.join(' | '),
primitive: primitiveTypeFlagNames[primitiveTypeFlag],
},
});
}
}
}
},
'TSUnionType:exit'(node) {
const seenLiteralTypes = new Map();
const seenPrimitiveTypes = new Set();
function checkUnionBottomAndTopTypes({ typeFlags, typeName }, typeNode) {
for (const checkFlag of [
ts.TypeFlags.Any,
ts.TypeFlags.Unknown,
]) {
if (typeFlags === checkFlag) {
context.report({
node: typeNode,
messageId: typeFlags === ts.TypeFlags.Any && typeName !== 'any'
? 'errorTypeOverrides'
: 'overrides',
data: {
container: 'union',
typeName,
},
});
return true;
}
}
if (typeFlags === ts.TypeFlags.Never &&
!isNodeInsideReturnType(node)) {
context.report({
node: typeNode,
messageId: 'overridden',
data: {
container: 'union',
typeName: 'never',
},
});
return true;
}
return false;
}
for (const typeNode of node.types) {
const typePartFlags = getTypeNodeTypePartFlagsCached(typeNode);
for (const typePart of typePartFlags) {
if (checkUnionBottomAndTopTypes(typePart, typeNode)) {
continue;
}
for (const literalTypeFlag of literalTypeFlags) {
if (typePart.typeFlags === literalTypeFlag) {
addToMapGroup(seenLiteralTypes, literalToPrimitiveTypeFlags[literalTypeFlag], {
literalValue: typePart.typeName,
typeNode,
});
break;
}
}
for (const primitiveTypeFlag of primitiveTypeFlags) {
if ((typePart.typeFlags & primitiveTypeFlag) !== 0) {
seenPrimitiveTypes.add(primitiveTypeFlag);
}
}
}
}
const overriddenTypeNodes = new Map();
// For each primitive type of all the seen literal types,
// if there was a primitive type seen that overrides it,
// upsert the literal text and primitive type under the backing type node
for (const [primitiveTypeFlag, typeNodesWithText] of seenLiteralTypes) {
if (seenPrimitiveTypes.has(primitiveTypeFlag)) {
for (const { literalValue, typeNode } of typeNodesWithText) {
addToMapGroup(overriddenTypeNodes, typeNode, {
literalValue,
primitiveTypeFlag,
});
}
}
}
// For each type node that had at least one overridden literal,
// group those literals by their primitive type,
// then report each primitive type with all its literals
for (const [typeNode, typeFlagsWithText] of overriddenTypeNodes) {
const grouped = (0, util_1.arrayGroupByToMap)(typeFlagsWithText, pair => pair.primitiveTypeFlag);
for (const [primitiveTypeFlag, pairs] of grouped) {
context.report({
node: typeNode,
messageId: 'literalOverridden',
data: {
literal: pairs.map(pair => pair.literalValue).join(' | '),
primitive: primitiveTypeFlagNames[primitiveTypeFlag],
},
});
}
}
},
};
},
});
@@ -0,0 +1,163 @@
import libCoverage, { FileCoverage, FileCoverageData, CoverageMap } from 'istanbul-lib-coverage';
import { ProxifiedModule } from 'magicast';
import { BaseCoverageProvider, CoverageProvider, Vitest, Vite, ReportContext } from 'vitest/node';
interface GeneratorOptions {
/**
* Optional string to add as a block comment at the start of the output file.
*/
auxiliaryCommentBefore?: string | undefined;
/**
* Optional string to add as a block comment at the end of the output file.
*/
auxiliaryCommentAfter?: string | undefined;
/**
* Function that takes a comment (as a string) and returns true if the comment should be included in the output.
* By default, comments are included if `opts.comments` is `true` or if `opts.minifed` is `false` and the comment
* contains `@preserve` or `@license`.
*/
shouldPrintComment?(comment: string): boolean;
/**
* Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces).
* Defaults to `false`.
*/
retainLines?: boolean | undefined;
/**
* Should comments be included in output? Defaults to `true`.
*/
comments?: boolean | undefined;
/**
* Set to true to avoid adding whitespace for formatting. Defaults to the value of `opts.minified`.
*/
compact?: boolean | "auto" | undefined;
/**
* Should the output be minified. Defaults to `false`.
*/
minified?: boolean | undefined;
/**
* Set to true to reduce whitespace (but not as much as opts.compact). Defaults to `false`.
*/
concise?: boolean | undefined;
/**
* The type of quote to use in the output. If omitted, autodetects based on `ast.tokens`.
*/
quotes?: "single" | "double" | undefined;
/**
* Used in warning messages
*/
filename?: string | undefined;
/**
* Enable generating source maps. Defaults to `false`.
*/
sourceMaps?: boolean | undefined;
/**
* The filename of the generated code that the source map will be associated with.
*/
sourceMapTarget?: string | undefined;
/**
* A root for all relative URLs in the source map.
*/
sourceRoot?: string | undefined;
/**
* The filename for the source code (i.e. the code in the `code` argument).
* This will only be used if `code` is a string.
*/
sourceFileName?: string | undefined;
/**
* Set to true to run jsesc with "json": true to print "\u00A9" vs. "©";
*/
jsonCompatibleStrings?: boolean | undefined;
}
interface StartOfSourceMap {
file?: string;
sourceRoot?: string;
}
interface RawSourceMap extends StartOfSourceMap {
version: string;
sources: string[];
names: string[];
sourcesContent?: string[];
mappings: string;
}
interface InstrumenterOptions {
coverageVariable: string;
preserveComments: boolean;
compact: boolean;
esModules: boolean;
autoWrap: boolean;
produceSourceMap: boolean;
sourceMapUrlCallback(filename: string, url: string): void;
debug: boolean;
coverageGlobalScope?: string;
coverageGlobalScopeFunc?: boolean;
ignoreClassMethods?: string[];
parserPlugins?: any[];
generatorOpts?: GeneratorOptions;
}
type InstrumenterCallback = (error: Error | null, code: string) => void;
declare class Instrumenter {
fileCoverage: FileCoverage;
sourceMap: RawSourceMap | null;
opts: InstrumenterOptions;
constructor(options?: Partial<InstrumenterOptions>);
normalizeOpts(options?: Partial<InstrumenterOptions>): InstrumenterOptions;
instrumentSync(
code: string,
filename: string,
inputSourceMap?: RawSourceMap,
): string;
instrument(
code: string,
filenameOrCallback: string | InstrumenterCallback,
callback?: InstrumenterCallback,
inputSourceMap?: RawSourceMap,
): void;
lastFileCoverage(): FileCoverageData;
lastSourceMap(): RawSourceMap;
}
declare class IstanbulCoverageProvider extends BaseCoverageProvider implements CoverageProvider {
name: "istanbul";
version: string;
instrumenter: Instrumenter;
private transformedModuleIds;
initialize(ctx: Vitest): void;
requiresTransform(id: string): boolean;
onFileTransform(sourceCode: string, id: string, pluginCtx: Vite.Rollup.TransformPluginContext): {
code: string;
map: any;
} | undefined;
createCoverageMap(): libCoverage.CoverageMap;
generateCoverage({ allTestsRun }: ReportContext): Promise<CoverageMap>;
generateReports(coverageMap: CoverageMap, allTestsRun: boolean | undefined): Promise<void>;
parseConfigModule(configFilePath: string): Promise<ProxifiedModule<any>>;
private getCoverageMapForUncoveredFiles;
onEnabled(): void;
private invalidateTree;
}
export { IstanbulCoverageProvider };
@@ -0,0 +1,2 @@
export * from './ColorfulAppender';
export * from './colors';
@@ -0,0 +1,43 @@
import { Parser, type Handler, type ParserOptions } from "./Parser.js";
/*
* NOTE: If either of these two imports produces a type error,
* please update your @types/node dependency!
*/
import { Writable } from "node:stream";
import { StringDecoder } from "node:string_decoder";
// Following the example in https://nodejs.org/api/stream.html#stream_decoding_buffers_in_a_writable_stream
function isBuffer(_chunk: string | Buffer, encoding: string): _chunk is Buffer {
return encoding === "buffer";
}
/**
* WritableStream makes the `Parser` interface available as a NodeJS stream.
*
* @see Parser
*/
export class WritableStream extends Writable {
private readonly _parser: Parser;
private readonly _decoder = new StringDecoder();
constructor(cbs: Partial<Handler>, options?: ParserOptions) {
super({ decodeStrings: false });
this._parser = new Parser(cbs, options);
}
override _write(
chunk: string | Buffer,
encoding: string,
callback: () => void,
): void {
this._parser.write(
isBuffer(chunk, encoding) ? this._decoder.write(chunk) : chunk,
);
callback();
}
override _final(callback: () => void): void {
this._parser.end(this._decoder.end());
callback();
}
}
@@ -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 Table2 = createLucideIcon("Table2", [
[
"path",
{
d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",
key: "gugj83"
}
]
]);
export { Table2 as default };
//# sourceMappingURL=table-2.js.map
@@ -0,0 +1,26 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference lib="es2015.symbol" />
/// <reference lib="decorators" />
interface SymbolConstructor {
readonly metadata: unique symbol;
}
interface Function {
[Symbol.metadata]: DecoratorMetadata | null;
}
@@ -0,0 +1,128 @@
{
"name": "@types/react-dom",
"version": "19.2.3",
"description": "TypeScript definitions for react-dom",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom",
"license": "MIT",
"contributors": [
{
"name": "Asana",
"url": "https://asana.com"
},
{
"name": "AssureSign",
"url": "http://www.assuresign.com"
},
{
"name": "Microsoft",
"url": "https://microsoft.com"
},
{
"name": "MartynasZilinskas",
"githubUsername": "MartynasZilinskas",
"url": "https://github.com/MartynasZilinskas"
},
{
"name": "Josh Rutherford",
"githubUsername": "theruther4d",
"url": "https://github.com/theruther4d"
},
{
"name": "Jessica Franco",
"githubUsername": "Jessidhia",
"url": "https://github.com/Jessidhia"
},
{
"name": "Sebastian Silbermann",
"githubUsername": "eps1lon",
"url": "https://github.com/eps1lon"
}
],
"main": "",
"types": "index.d.ts",
"exports": {
".": {
"types": {
"default": "./index.d.ts"
}
},
"./client": {
"types": {
"default": "./client.d.ts"
}
},
"./canary": {
"types": {
"default": "./canary.d.ts"
}
},
"./server": {
"types": {
"default": "./server.d.ts"
}
},
"./server.browser": {
"types": {
"default": "./server.browser.d.ts"
}
},
"./server.bun": {
"types": {
"default": "./server.bun.d.ts"
}
},
"./server.edge": {
"types": {
"default": "./server.edge.d.ts"
}
},
"./server.node": {
"types": {
"default": "./server.node.d.ts"
}
},
"./static": {
"types": {
"default": "./static.d.ts"
}
},
"./static.browser": {
"types": {
"default": "./static.browser.d.ts"
}
},
"./static.edge": {
"types": {
"default": "./static.edge.d.ts"
}
},
"./static.node": {
"types": {
"default": "./static.node.d.ts"
}
},
"./experimental": {
"types": {
"default": "./experimental.d.ts"
}
},
"./test-utils": {
"types": {
"default": "./test-utils/index.d.ts"
}
},
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/react-dom"
},
"scripts": {},
"dependencies": {},
"peerDependencies": {
"@types/react": "^19.2.0"
},
"typesPublisherContentHash": "6f16aac4f50b7ebe3201fdac53a58874d2899d6108894538ade2d61fbb99f8c5",
"typeScriptVersion": "5.2"
}
@@ -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 CopyMinus = createLucideIcon("CopyMinus", [
["line", { x1: "12", x2: "18", y1: "15", y2: "15", key: "1nscbv" }],
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
]);
export { CopyMinus as default };
//# sourceMappingURL=copy-minus.js.map
@@ -0,0 +1,21 @@
"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 __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./astUtilities"), exports);
__exportStar(require("./PatternMatcher"), exports);
__exportStar(require("./predicates"), exports);
__exportStar(require("./ReferenceTracker"), exports);
__exportStar(require("./scopeAnalysis"), exports);
@@ -0,0 +1,186 @@
#ifdef FS_EVENTS
#include "macos/FSEventsBackend.hh"
#endif
#ifdef WATCHMAN
#include "watchman/WatchmanBackend.hh"
#endif
#ifdef WINDOWS
#include "windows/WindowsBackend.hh"
#endif
#ifdef INOTIFY
#include "linux/InotifyBackend.hh"
#endif
#ifdef KQUEUE
#include "kqueue/KqueueBackend.hh"
#endif
#ifdef __wasm32__
#include "wasm/WasmBackend.hh"
#endif
#include "shared/BruteForceBackend.hh"
#include "Backend.hh"
#include <unordered_map>
static std::unordered_map<std::string, std::shared_ptr<Backend>>& getSharedBackends() {
static std::unordered_map<std::string, std::shared_ptr<Backend>>* sharedBackends =
new std::unordered_map<std::string, std::shared_ptr<Backend>>();
return *sharedBackends;
}
std::shared_ptr<Backend> getBackend(std::string backend) {
// Use FSEvents on macOS by default.
// Use watchman by default if available on other platforms.
// Fall back to brute force.
#ifdef FS_EVENTS
if (backend == "fs-events" || backend == "default") {
return std::make_shared<FSEventsBackend>();
}
#endif
#ifdef WATCHMAN
if ((backend == "watchman" || backend == "default") && WatchmanBackend::checkAvailable()) {
return std::make_shared<WatchmanBackend>();
}
#endif
#ifdef WINDOWS
if (backend == "windows" || backend == "default") {
return std::make_shared<WindowsBackend>();
}
#endif
#ifdef INOTIFY
if (backend == "inotify" || backend == "default") {
return std::make_shared<InotifyBackend>();
}
#endif
#ifdef KQUEUE
if (backend == "kqueue" || backend == "default") {
return std::make_shared<KqueueBackend>();
}
#endif
#ifdef __wasm32__
if (backend == "wasm" || backend == "default") {
return std::make_shared<WasmBackend>();
}
#endif
if (backend == "brute-force" || backend == "default") {
return std::make_shared<BruteForceBackend>();
}
return nullptr;
}
std::shared_ptr<Backend> Backend::getShared(std::string backend) {
auto found = getSharedBackends().find(backend);
if (found != getSharedBackends().end()) {
return found->second;
}
auto result = getBackend(backend);
if (!result) {
return getShared("default");
}
result->run();
getSharedBackends().emplace(backend, result);
return result;
}
void removeShared(Backend *backend) {
for (auto it = getSharedBackends().begin(); it != getSharedBackends().end(); it++) {
if (it->second.get() == backend) {
getSharedBackends().erase(it);
break;
}
}
// Free up memory.
if (getSharedBackends().size() == 0) {
getSharedBackends().rehash(0);
}
}
void Backend::run() {
#ifndef __wasm32__
mThread = std::thread([this] () {
try {
start();
} catch (std::exception &err) {
handleError(err);
}
});
if (mThread.joinable()) {
mStartedSignal.wait();
}
#else
try {
start();
} catch (std::exception &err) {
handleError(err);
}
#endif
}
void Backend::notifyStarted() {
mStartedSignal.notify();
}
void Backend::start() {
notifyStarted();
}
Backend::~Backend() {
#ifndef __wasm32__
// Wait for thread to stop
if (mThread.joinable()) {
// If the backend is being destroyed from the thread itself, detach, otherwise join.
if (mThread.get_id() == std::this_thread::get_id()) {
mThread.detach();
} else {
mThread.join();
}
}
#endif
}
void Backend::watch(WatcherRef watcher) {
std::unique_lock<std::mutex> lock(mMutex);
auto res = mSubscriptions.find(watcher);
if (res == mSubscriptions.end()) {
try {
this->subscribe(watcher);
mSubscriptions.insert(watcher);
} catch (std::exception&) {
unref();
throw;
}
}
}
void Backend::unwatch(WatcherRef watcher) {
std::unique_lock<std::mutex> lock(mMutex);
size_t deleted = mSubscriptions.erase(watcher);
if (deleted > 0) {
this->unsubscribe(watcher);
unref();
}
}
void Backend::unref() {
if (mSubscriptions.size() == 0) {
removeShared(this);
}
}
void Backend::handleWatcherError(WatcherError &err) {
unwatch(err.mWatcher);
err.mWatcher->notifyError(err);
}
void Backend::handleError(std::exception &err) {
std::unique_lock<std::mutex> lock(mMutex);
for (auto it = mSubscriptions.begin(); it != mSubscriptions.end(); it++) {
(*it)->notifyError(err);
}
removeShared(this);
}
@@ -0,0 +1 @@
{"version":3,"file":"chef-hat.js","sources":["../../../src/icons/chef-hat.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChefHat\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTcgMjFhMSAxIDAgMCAwIDEtMXYtNS4zNWMwLS40NTcuMzE2LS44NDQuNzI3LTEuMDQxYTQgNCAwIDAgMC0yLjEzNC03LjU4OSA1IDUgMCAwIDAtOS4xODYgMCA0IDQgMCAwIDAtMi4xMzQgNy41ODhjLjQxMS4xOTguNzI3LjU4NS43MjcgMS4wNDFWMjBhMSAxIDAgMCAwIDEgMVoiIC8+CiAgPHBhdGggZD0iTTYgMTdoMTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/chef-hat\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 ChefHat = createLucideIcon('ChefHat', [\n [\n 'path',\n {\n d: 'M17 21a1 1 0 0 0 1-1v-5.35c0-.457.316-.844.727-1.041a4 4 0 0 0-2.134-7.589 5 5 0 0 0-9.186 0 4 4 0 0 0-2.134 7.588c.411.198.727.585.727 1.041V20a1 1 0 0 0 1 1Z',\n key: '1qvrer',\n },\n ],\n ['path', { d: 'M6 17h12', key: '1jwigz' }],\n]);\n\nexport default ChefHat;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"plug-zap.js","sources":["../../../src/icons/plug-zap.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PlugZap\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNi4zIDIwLjNhMi40IDIuNCAwIDAgMCAzLjQgMEwxMiAxOGwtNi02LTIuMyAyLjNhMi40IDIuNCAwIDAgMCAwIDMuNFoiIC8+CiAgPHBhdGggZD0ibTIgMjIgMy0zIiAvPgogIDxwYXRoIGQ9Ik03LjUgMTMuNSAxMCAxMSIgLz4KICA8cGF0aCBkPSJNMTAuNSAxNi41IDEzIDE0IiAvPgogIDxwYXRoIGQ9Im0xOCAzLTQgNGg2bC00IDQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/plug-zap\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 PlugZap = createLucideIcon('PlugZap', [\n [\n 'path',\n { d: 'M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z', key: 'goz73y' },\n ],\n ['path', { d: 'm2 22 3-3', key: '19mgm9' }],\n ['path', { d: 'M7.5 13.5 10 11', key: '7xgeeb' }],\n ['path', { d: 'M10.5 16.5 13 14', key: '10btkg' }],\n ['path', { d: 'm18 3-4 4h6l-4 4', key: '16psg9' }],\n]);\n\nexport default PlugZap;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAyE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC9F,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,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,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACjD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,82 @@
'use strict';
const _path = require('./shared/pathe.BSlhyZSM.cjs');
const pathSeparators = /* @__PURE__ */ new Set(["/", "\\", void 0]);
const normalizedAliasSymbol = Symbol.for("pathe:normalizedAlias");
const SLASH_RE = /[/\\]/;
function normalizeAliases(_aliases) {
if (_aliases[normalizedAliasSymbol]) {
return _aliases;
}
const aliases = Object.fromEntries(
Object.entries(_aliases).sort(([a], [b]) => _compareAliases(a, b))
);
for (const key in aliases) {
for (const alias in aliases) {
if (alias === key || key.startsWith(alias)) {
continue;
}
if (aliases[key]?.startsWith(alias) && pathSeparators.has(aliases[key][alias.length])) {
aliases[key] = aliases[alias] + aliases[key].slice(alias.length);
}
}
}
Object.defineProperty(aliases, normalizedAliasSymbol, {
value: true,
enumerable: false
});
return aliases;
}
function resolveAlias(path, aliases) {
const _path$1 = _path.normalizeWindowsPath(path);
aliases = normalizeAliases(aliases);
for (const [alias, to] of Object.entries(aliases)) {
if (!_path$1.startsWith(alias)) {
continue;
}
const _alias = hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
if (hasTrailingSlash(_path$1[_alias.length])) {
return _path.join(to, _path$1.slice(alias.length));
}
}
return _path$1;
}
function reverseResolveAlias(path, aliases) {
const _path$1 = _path.normalizeWindowsPath(path);
aliases = normalizeAliases(aliases);
const matches = [];
for (const [to, alias] of Object.entries(aliases)) {
if (!_path$1.startsWith(alias)) {
continue;
}
const _alias = hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
if (hasTrailingSlash(_path$1[_alias.length])) {
matches.push(_path.join(to, _path$1.slice(alias.length)));
}
}
return matches.sort((a, b) => b.length - a.length);
}
function filename(path) {
const base = path.split(SLASH_RE).pop();
if (!base) {
return void 0;
}
const separatorIndex = base.lastIndexOf(".");
if (separatorIndex <= 0) {
return base;
}
return base.slice(0, separatorIndex);
}
function _compareAliases(a, b) {
return b.split("/").length - a.split("/").length;
}
function hasTrailingSlash(path = "/") {
const lastChar = path[path.length - 1];
return lastChar === "/" || lastChar === "\\";
}
exports.filename = filename;
exports.normalizeAliases = normalizeAliases;
exports.resolveAlias = resolveAlias;
exports.reverseResolveAlias = reverseResolveAlias;
@@ -0,0 +1,150 @@
/**
* @license React
* scheduler-unstable_post_task.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function runTask(priorityLevel, postTaskPriority, node, callback) {
deadline = getCurrentTime() + 5;
try {
currentPriorityLevel_DEPRECATED = priorityLevel;
var result = callback(!1);
if ("function" === typeof result) {
var continuationOptions = { signal: node._controller.signal },
nextTask = runTask.bind(
null,
priorityLevel,
postTaskPriority,
node,
result
);
void 0 !== scheduler.yield
? scheduler
.yield(continuationOptions)
.then(nextTask)
.catch(handleAbortError)
: scheduler
.postTask(nextTask, continuationOptions)
.catch(handleAbortError);
}
} catch (error) {
setTimeout(function () {
throw error;
});
} finally {
currentPriorityLevel_DEPRECATED = 3;
}
}
function handleAbortError() {}
var perf = window.performance,
setTimeout = window.setTimeout,
scheduler = global.scheduler,
getCurrentTime = perf.now.bind(perf),
deadline = 0,
currentPriorityLevel_DEPRECATED = 3;
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (node) {
node._controller.abort();
};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel_DEPRECATED;
};
exports.unstable_next = function (callback) {
switch (currentPriorityLevel_DEPRECATED) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel_DEPRECATED;
}
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_now = getCurrentTime;
exports.unstable_requestPaint = function () {};
exports.unstable_runWithPriority = function (priorityLevel, callback) {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
switch (priorityLevel) {
case 1:
case 2:
var postTaskPriority = "user-blocking";
break;
case 4:
case 3:
postTaskPriority = "user-visible";
break;
case 5:
postTaskPriority = "background";
break;
default:
postTaskPriority = "user-visible";
}
var controller = new TaskController({ priority: postTaskPriority });
options = {
delay:
"object" === typeof options && null !== options ? options.delay : 0,
signal: controller.signal
};
controller = { _controller: controller };
scheduler
.postTask(
runTask.bind(
null,
priorityLevel,
postTaskPriority,
controller,
callback
),
options
)
.catch(handleAbortError);
return controller;
};
exports.unstable_shouldYield = function () {
return getCurrentTime() >= deadline;
};
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel_DEPRECATED;
return function () {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = parentPriorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
};
})();
@@ -0,0 +1 @@
{"version":3,"file":"subscript.js","sources":["../../../src/icons/subscript.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Subscript\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNCA1IDggOCIgLz4KICA8cGF0aCBkPSJtMTIgNS04IDgiIC8+CiAgPHBhdGggZD0iTTIwIDE5aC00YzAtMS41LjQ0LTIgMS41LTIuNVMyMCAxNS4zMyAyMCAxNGMwLS40Ny0uMTctLjkzLS40OC0xLjI5YTIuMTEgMi4xMSAwIDAgMC0yLjYyLS40NGMtLjQyLjI0LS43NC42Mi0uOSAxLjA3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/subscript\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 Subscript = createLucideIcon('Subscript', [\n ['path', { d: 'm4 5 8 8', key: '1eunvl' }],\n ['path', { d: 'm12 5-8 8', key: '1ah0jp' }],\n [\n 'path',\n {\n d: 'M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07',\n key: 'e8ta8j',\n },\n ],\n]);\n\nexport default Subscript;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,55 @@
import { mixNumber } from '../../utils/mix/number.mjs';
import { percent } from '../../value/types/numbers/units.mjs';
import { scalePoint } from './delta-apply.mjs';
/**
* Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse
*/
function removePointDelta(point, translate, scale, originPoint, boxScale) {
point -= translate;
point = scalePoint(point, 1 / scale, originPoint);
if (boxScale !== undefined) {
point = scalePoint(point, 1 / boxScale, originPoint);
}
return point;
}
/**
* Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse
*/
function removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {
if (percent.test(translate)) {
translate = parseFloat(translate);
const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);
translate = relativeProgress - sourceAxis.min;
}
if (typeof translate !== "number")
return;
let originPoint = mixNumber(originAxis.min, originAxis.max, origin);
if (axis === originAxis)
originPoint -= translate;
axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);
axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);
}
/**
* Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse
* and acts as a bridge between motion values and removeAxisDelta
*/
function removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {
removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);
}
/**
* The names of the motion values we want to apply as translation, scale and origin.
*/
const xKeys = ["x", "scaleX", "originX"];
const yKeys = ["y", "scaleY", "originY"];
/**
* Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse
* and acts as a bridge between motion values and removeAxisDelta
*/
function removeBoxTransforms(box, transforms, originBox, sourceBox) {
removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);
removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);
}
export { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };
//# sourceMappingURL=delta-remove.mjs.map
@@ -0,0 +1,33 @@
import { JOSENotSupported, JWEInvalid, JWSInvalid } from '../util/errors.js';
export function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {
if (joseHeader.crit !== undefined && protectedHeader?.crit === undefined) {
throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected');
}
if (!protectedHeader || protectedHeader.crit === undefined) {
return new Set();
}
if (!Array.isArray(protectedHeader.crit) ||
protectedHeader.crit.length === 0 ||
protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) {
throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');
}
let recognized;
if (recognizedOption !== undefined) {
recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]);
}
else {
recognized = recognizedDefault;
}
for (const parameter of protectedHeader.crit) {
if (!recognized.has(parameter)) {
throw new JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`);
}
if (joseHeader[parameter] === undefined) {
throw new Err(`Extension Header Parameter "${parameter}" is missing`);
}
if (recognized.get(parameter) && protectedHeader[parameter] === undefined) {
throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`);
}
}
return new Set(protectedHeader.crit);
}
@@ -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 './square-user-round.js';
//# sourceMappingURL=user-square-2.js.map
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const resolve_1 = require("./resolve");
class MissingRefError extends Error {
constructor(resolver, baseId, ref, msg) {
super(msg || `can't resolve reference ${ref} from id ${baseId}`);
this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);
this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));
}
}
exports.default = MissingRefError;
//# sourceMappingURL=ref_error.js.map
@@ -0,0 +1,45 @@
import type * as core from "../core/index.js";
import { clone, mergeDefs } from "../core/util.js";
import { visit } from "../core/visit.js";
import * as schemas from "./schemas.js";
// See `classic/in-out.ts` for why these aliases exist.
export type input<T> = core.input<T>;
export type output<T> = core.output<T>;
/** See `classic/in-out.ts`. */
function withChecks(side: core.$ZodType, checks: core.$ZodTypeDef["checks"]): core.$ZodType {
if (!checks?.length) return side;
const def = side._zod.def;
return clone(side, mergeDefs(def, { checks: [...(def.checks ?? []), ...checks] }), { parent: true });
}
/** See `classic/in-out.ts`. */
function outSide(def: core.$ZodPipeDef): core.$ZodType {
return withChecks(def.out, def.checks);
}
/** See `classic/in-out.ts`. */
function inSide(def: core.$ZodPipeDef): core.$ZodType {
return def.in._zod.traits.has("$ZodTransform") ? outSide(def) : def.in;
}
/** See `classic/in-out.ts`. */
export function input<T extends core.$ZodType>(schema: T): schemas.ZodMiniType<core.input<T>, core.input<T>> {
return visit(schema, {
pipe: (s) => inSide(s._zod.def),
// A default value belongs to the output side, so a rewritten inner type leaves it stranded. `.default()` widens the declared input type with `undefined`, and `optional` is what carries that across.
default: (s, rewritten) => (rewritten ? schemas.optional(s._zod.def.innerType) : s),
// A catch value is output-side too, but `.catch()` leaves the declared input type alone, so the inner schema stands on its own.
catch: (s, rewritten) => (rewritten ? s._zod.def.innerType : s),
}) as schemas.ZodMiniType<core.input<T>, core.input<T>>;
}
/** See `classic/in-out.ts`. */
export function output<T extends core.$ZodType>(schema: T): schemas.ZodMiniType<core.output<T>, core.output<T>> {
return visit(schema, {
pipe: (s) => outSide(s._zod.def),
// A prefault value is fed through the schema, which makes it input-side, so a rewritten inner type leaves it stranded.
prefault: (s, rewritten) => (rewritten ? s._zod.def.innerType : s),
}) as schemas.ZodMiniType<core.output<T>, core.output<T>>;
}
@@ -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 PhoneOff = createLucideIcon("PhoneOff", [
[
"path",
{
d: "M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91",
key: "z86iuo"
}
],
["line", { x1: "22", x2: "2", y1: "2", y2: "22", key: "11kh81" }]
]);
export { PhoneOff as default };
//# sourceMappingURL=phone-off.js.map
@@ -0,0 +1,26 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Medal = createLucideIcon("Medal", [
[
"path",
{
d: "M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15",
key: "143lza"
}
],
["path", { d: "M11 12 5.12 2.2", key: "qhuxz6" }],
["path", { d: "m13 12 5.88-9.8", key: "hbye0f" }],
["path", { d: "M8 7h8", key: "i86dvs" }],
["circle", { cx: "12", cy: "17", r: "5", key: "qbz8iq" }],
["path", { d: "M12 18v-2h-.5", key: "fawc4q" }]
]);
export { Medal as default };
//# sourceMappingURL=medal.js.map
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CircleMinus = createLucideIcon("CircleMinus", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M8 12h8", key: "1wcyev" }]
]);
export { CircleMinus as default };
//# sourceMappingURL=circle-minus.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_LC","2":"_IB"},B:{"1":"_I","4":"_K"},C:{"1":"_GL _yE _tL","4":"_H _dL _nT _WC","16":"_f"},D:{"4":"_NF","16":"_iJ"},E:{"4":"_YB","16":"_4"},F:{"4":"_eD","16":"_6C"},G:{"4":"_2","16":"_r"},H:{"2":"1D"},I:{"4":"_PE","16":"_LB"},J:{"4":"_B"},K:{"4":"_ZB","16":"_cB"},L:{"4":"I"},M:{"4":"YC"},N:{"1":"_A"},O:{"4":"bC"},P:{"4":"_F"},Q:{"4":"JE"},R:{"4":"KE"},S:{"1":"LE","4":"ME"}},B:6,C:"X-Frame-Options HTTP header",D:true};
@@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2016 Douglas Christopher Wilson
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,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 AlignHorizontalJustifyCenter = createLucideIcon("AlignHorizontalJustifyCenter", [
["rect", { width: "6", height: "14", x: "2", y: "5", rx: "2", key: "dy24zr" }],
["rect", { width: "6", height: "10", x: "16", y: "7", rx: "2", key: "13zkjt" }],
["path", { d: "M12 2v20", key: "t6zp3m" }]
]);
export { AlignHorizontalJustifyCenter as default };
//# sourceMappingURL=align-horizontal-justify-center.js.map
@@ -0,0 +1,143 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
declare namespace Intl {
/**
* An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter.
*
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
*/
interface SegmenterOptions {
/** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */
localeMatcher?: "best fit" | "lookup" | undefined;
/** The type of input to be split */
granularity?: "grapheme" | "word" | "sentence" | undefined;
}
/**
* The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string.
*
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter)
*/
interface Segmenter {
/**
* Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity.
*
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment)
*
* @param input - The text to be segmented as a `string`.
*
* @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity.
*/
segment(input: string): Segments;
/**
* The `resolvedOptions()` method of `Intl.Segmenter` instances returns a new object with properties reflecting the options computed during initialization of this `Segmenter` object.
*
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/resolvedOptions)
*/
resolvedOptions(): ResolvedSegmenterOptions;
}
interface ResolvedSegmenterOptions {
locale: string;
granularity: "grapheme" | "word" | "sentence";
}
interface SegmentIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): SegmentIterator<T>;
}
/**
* A `Segments` object is an iterable collection of the segments of a text string. It is returned by a call to the `segment()` method of an `Intl.Segmenter` object.
*
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments)
*/
interface Segments {
/**
* Returns an object describing the segment in the original string that includes the code unit at a specified index.
*
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments/containing)
*
* @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`.
*/
containing(codeUnitIndex?: number): SegmentData | undefined;
/** Returns an iterator to iterate over the segments. */
[Symbol.iterator](): SegmentIterator<SegmentData>;
}
interface SegmentData {
/** A string containing the segment extracted from the original input string. */
segment: string;
/** The code unit index in the original input string at which the segment begins. */
index: number;
/** The complete input string that was segmented. */
input: string;
/**
* A boolean value only if granularity is "word"; otherwise, undefined.
* If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false.
*/
isWordLike?: boolean;
}
/**
* The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string.
*
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter)
*/
const Segmenter: {
prototype: Segmenter;
/**
* Creates a new `Intl.Segmenter` object.
*
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
* For the general form and interpretation of the `locales` argument,
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
*
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
* with some or all options of `SegmenterOptions`.
*
* @returns [Intl.Segmenter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object.
*
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter).
*/
new (locales?: LocalesArgument, options?: SegmenterOptions): Segmenter;
/**
* Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
*
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
* For the general form and interpretation of the `locales` argument,
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
*
* @param options An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters).
* with some or all possible options.
*
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf)
*/
supportedLocalesOf(locales: LocalesArgument, options?: Pick<SegmenterOptions, "localeMatcher">): UnicodeBCP47LocaleIdentifier[];
};
/**
* Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation.
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf)
*
* @param key A string indicating the category of values to return.
* @returns A sorted array of the supported values.
*/
function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[];
}
@@ -0,0 +1,90 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://json-schema.org/draft/2019-09/meta/validation",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/validation": true
},
"$recursiveAnchor": true,
"title": "Validation vocabulary meta-schema",
"type": ["object", "boolean"],
"properties": {
"multipleOf": {
"type": "number",
"exclusiveMinimum": 0
},
"maximum": {
"type": "number"
},
"exclusiveMaximum": {
"type": "number"
},
"minimum": {
"type": "number"
},
"exclusiveMinimum": {
"type": "number"
},
"maxLength": {"$ref": "#/$defs/nonNegativeInteger"},
"minLength": {"$ref": "#/$defs/nonNegativeIntegerDefault0"},
"pattern": {
"type": "string",
"format": "regex"
},
"maxItems": {"$ref": "#/$defs/nonNegativeInteger"},
"minItems": {"$ref": "#/$defs/nonNegativeIntegerDefault0"},
"uniqueItems": {
"type": "boolean",
"default": false
},
"maxContains": {"$ref": "#/$defs/nonNegativeInteger"},
"minContains": {
"$ref": "#/$defs/nonNegativeInteger",
"default": 1
},
"maxProperties": {"$ref": "#/$defs/nonNegativeInteger"},
"minProperties": {"$ref": "#/$defs/nonNegativeIntegerDefault0"},
"required": {"$ref": "#/$defs/stringArray"},
"dependentRequired": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/stringArray"
}
},
"const": true,
"enum": {
"type": "array",
"items": true
},
"type": {
"anyOf": [
{"$ref": "#/$defs/simpleTypes"},
{
"type": "array",
"items": {"$ref": "#/$defs/simpleTypes"},
"minItems": 1,
"uniqueItems": true
}
]
}
},
"$defs": {
"nonNegativeInteger": {
"type": "integer",
"minimum": 0
},
"nonNegativeIntegerDefault0": {
"$ref": "#/$defs/nonNegativeInteger",
"default": 0
},
"simpleTypes": {
"enum": ["array", "boolean", "integer", "null", "number", "object", "string"]
},
"stringArray": {
"type": "array",
"items": {"type": "string"},
"uniqueItems": true,
"default": []
}
}
}
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/select.tsx"],
"sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { clamp } from '@radix-ui/number';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createSlot } from '@radix-ui/react-slot';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { VISUALLY_HIDDEN_STYLES } from '@radix-ui/react-visually-hidden';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\nconst OPEN_KEYS = [' ', 'Enter', 'ArrowUp', 'ArrowDown'];\nconst SELECTION_KEYS = [' ', 'Enter'];\n\n/* -------------------------------------------------------------------------------------------------\n * Select\n * -----------------------------------------------------------------------------------------------*/\n\nconst SELECT_NAME = 'Select';\n\ntype ItemData = { value: string; disabled: boolean; textValue: string };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n SelectItemElement,\n ItemData\n>(SELECT_NAME);\n\ntype ScopedProps<P> = P & { __scopeSelect?: Scope };\nconst [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [\n createCollectionScope,\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype SelectContextValue = {\n trigger: SelectTriggerElement | null;\n onTriggerChange(node: SelectTriggerElement | null): void;\n valueNode: SelectValueElement | null;\n onValueNodeChange(node: SelectValueElement): void;\n valueNodeHasChildren: boolean;\n onValueNodeHasChildrenChange(hasChildren: boolean): void;\n contentId: string;\n value: string | undefined;\n onValueChange(value: string): void;\n open: boolean;\n required?: boolean;\n onOpenChange(open: boolean): void;\n dir: SelectProps['dir'];\n triggerPointerDownPosRef: React.MutableRefObject<{ x: number; y: number } | null>;\n disabled?: boolean;\n};\n\nconst [SelectProvider, useSelectContext] = createSelectContext<SelectContextValue>(SELECT_NAME);\n\ntype NativeOption = React.ReactElement<React.ComponentProps<'option'>>;\n\ntype SelectNativeOptionsContextValue = {\n onNativeOptionAdd(option: NativeOption): void;\n onNativeOptionRemove(option: NativeOption): void;\n};\nconst [SelectNativeOptionsProvider, useSelectNativeOptionsContext] =\n createSelectContext<SelectNativeOptionsContextValue>(SELECT_NAME);\n\ninterface ControlledClearableSelectProps {\n value: string | undefined;\n defaultValue?: never;\n onValueChange: (value: string | undefined) => void;\n}\n\ninterface ControlledUnclearableSelectProps {\n value: string;\n defaultValue?: never;\n onValueChange: (value: string) => void;\n}\n\ninterface UncontrolledSelectProps {\n value?: never;\n defaultValue?: string;\n onValueChange?: {\n (value: string): void;\n (value: string | undefined): void;\n };\n}\n\ntype SelectControlProps =\n | ControlledClearableSelectProps\n | ControlledUnclearableSelectProps\n | UncontrolledSelectProps;\n\ninterface SelectSharedProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n name?: string;\n autoComplete?: string;\n disabled?: boolean;\n required?: boolean;\n form?: string;\n}\n\n// TODO: Should improve typing somewhat, but this would be a breaking change.\n// Consider using in the next major version (along with some testing to be sure\n// it works as expected and doesn't cause problems)\ntype _FutureSelectProps = SelectSharedProps & SelectControlProps;\n\ntype SelectProps = SelectSharedProps & {\n value?: string;\n defaultValue?: string;\n onValueChange?(value: string): void;\n};\n\nconst Select: React.FC<SelectProps> = (props: ScopedProps<SelectProps>) => {\n const {\n __scopeSelect,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n value: valueProp,\n defaultValue,\n onValueChange,\n dir,\n name,\n aLine truncated
"mappings": ";;;AAAA,YAAY,WAAW;AACvB,YAAY,cAAc;AAC1B,SAAS,aAAa;AACtB,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,aAAa;AACtB,YAAY,qBAAqB;AACjC,SAAS,yBAAyB;AAClC,SAAS,UAAU,uBAAuB;AAC1C,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,8BAA8B;AACvC,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAiLnB,SA0LsC,UA1LtC,KAkBA,YAlBA;AA3KV,IAAM,YAAY,CAAC,KAAK,SAAS,WAAW,WAAW;AACvD,IAAM,iBAAiB,CAAC,KAAK,OAAO;AAMpC,IAAM,cAAc;AAGpB,IAAM,CAAC,YAAY,eAAe,qBAAqB,IAAI,iBAGzD,WAAW;AAGb,IAAM,CAAC,qBAAqB,iBAAiB,IAAI,mBAAmB,aAAa;AAAA,EAC/E;AAAA,EACA;AACF,CAAC;AACD,IAAM,iBAAiB,kBAAkB;AAoBzC,IAAM,CAAC,gBAAgB,gBAAgB,IAAI,oBAAwC,WAAW;AAQ9F,IAAM,CAAC,6BAA6B,6BAA6B,IAC/D,oBAAqD,WAAW;AAoDlE,IAAM,SAAgC,CAAC,UAAoC;AACzE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,cAAc,eAAe,aAAa;AAChD,QAAM,CAAC,SAAS,UAAU,IAAU,eAAsC,IAAI;AAC9E,QAAM,CAAC,WAAW,YAAY,IAAU,eAAoC,IAAI;AAChF,QAAM,CAAC,sBAAsB,uBAAuB,IAAU,eAAS,KAAK;AAC5E,QAAM,YAAY,aAAa,GAAG;AAClC,QAAM,CAAC,MAAM,OAAO,IAAI,qBAAqB;AAAA,IAC3C,MAAM;AAAA,IACN,aAAa,eAAe;AAAA,IAC5B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV,CAAC;AACD,QAAM,CAAC,OAAO,QAAQ,IAAI,qBAAqB;AAAA,IAC7C,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,QAAQ;AAAA,EACV,CAAC;AACD,QAAM,2BAAiC,aAAwC,IAAI;AAGnF,QAAM,gBAAgB,UAAU,QAAQ,CAAC,CAAC,QAAQ,QAAQ,MAAM,IAAI;AACpE,QAAM,CAAC,kBAAkB,mBAAmB,IAAU,eAAS,oBAAI,IAAkB,CAAC;AAOtF,QAAM,kBAAkB,MAAM,KAAK,gBAAgB,EAChD,IAAI,CAAC,WAAW,OAAO,MAAM,KAAK,EAClC,KAAK,GAAG;AAEX,SACE,oBAAiB,sBAAhB,EAAsB,GAAG,aACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA,iBAAiB;AAAA,MACjB;AAAA,MACA,mBAAmB;AAAA,MACnB;AAAA,MACA,8BAA8B;AAAA,MAC9B,WAAW,MAAM;AAAA,MACjB;AAAA,MACA,eAAe;AAAA,MACf;AAAA,MACA,cAAc;AAAA,MACd,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MAEA;AAAA,4BAAC,WAAW,UAAX,EAAoB,OAAO,eAC1B;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,MAAM;AAAA,YACb,mBAAyB,kBAAY,CAAC,WAAW;AAC/C,kCAAoB,CAAC,SAAS,IAAI,IAAI,IAAI,EAAE,IAAI,MAAM,CAAC;AAAA,YACzD,GAAG,CAAC,CAAC;AAAA,YACL,sBAA4B,kBAAY,CAAC,WAAW;AAClD,kCAAoB,CAAC,SAAS;AAC5B,sBAAM,aAAa,IAAI,IAAI,IAAI;AAC/B,2BAAW,OAAO,MAAM;AACxB,uBAAO;AAAA,cACT,CAAC;AAAA,YACH,GAAG,CAAC,CAAC;AAAA,YAEJ;AAAA;AAAA,QACH,GACF;AAAA,QAEC,gBACC;AAAA,UAAC;AAAA;AAAA,YAEC,eAAW;AAAA,YACX;AAAA,YACA,UAAU;AAAA,YACV;AAAA,YACA;AAAA,YACA;AAAA,YAEA,UAAU,CAAC,UAAU,SAAS,MAAM,OAAO,KAAK;AAAA,YAChD;AAAA,YACA;AAAA,YAEC;AAAA,wBAAU,SAAY,oBAAC,YAAO,OAAM,IAAG,IAAK;AAAA,cAC5C,MAAM,KAAK,gBAAgB;AAAA;AAAA;AAAA,UAbvB;AAAA,QAcP,IACE;AAAA;AAAA;AAAA,EACN,GACF;AAEJ;AAEA,OAAO,cAAc;AAMrB,IAAM,eAAe;AAMrB,IAAM,gBAAsB;AAAA,EAC1B,CAAC,OAAwC,iBAAiB;AACxD,UAAM,EAAE,eAAe,WAAW,OAAO,GAAG,aAAa,IAAI;AAC7D,UAAM,cAAc,eAAe,aAAa;AAChD,UAAM,UAAU,iBAAiB,cAAc,aAAa;AAC5D,UAAM,aAAa,QAAQ,YAAY;AACvC,UAAM,eAAe,gBAAgB,cAAc,QAAQ,eAAe;AAC1E,UAAM,WAAW,cAAc,aAAa;AAC5C,UAAM,iBAAuB,aAA0C,OAAO;AAE9E,UAAM,CAAC,WAAW,uBAAuB,cAAc,IAAI,mBAAmB,CAAC,WAAW;AACxF,YAAM,eAAe,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,QAAQ;AAC/D,YAAM,cAAc,aAAa,KAAK,CAAC,SAAS,KAAK,UAAU,QAAQ,KAAK;AAC5E,YAAM,WAAW,aAAa,cAAc,QAAQ,WAAW;AAC/D,UAAI,aAAa,QAAW;AAC1B,gBAAQ,cAAc,SAAS,KAAK;AAAA,MACtC;AAAA,IACF,CAAC;AAED,UAAM,aAAa,CAAC,iBAAyD;AAC3E,UAAI,CAAC,YAAY;AACf,gBAAQ,aAAa,IAAI;AAEzB,uBAAe;AAAA,MACjB;AAEA,UAAI,cAAc;AAChB,gBAAQ,yBAAyB,UAAU;AAAA,UACzC,GAAG,KAAK,MAAM,aAAa,KAAK;AAAA,UAChC,GAAG,KAAK,MAAM,aAAa,KAAK;AAAA,QAClC;AAAA,MACF;AAAA,IACF;AAEA,WACE,oBAAiB,wBAAhB,EAAuB,SAAO,MAAE,GAAG,aAClC;AAAA,MAAC,UAAU;AAAA,MAAV;AAAA,QACC,MAAK;AAAA,QACL,MAAK;AAAA,QACL,iBAAe,QAAQ;AAAA,QACvB,iBAAe,QAAQ;AAAA,QACvB,iBAAe,QAAQ;AAAA,QACvB,qBAAkB;AAAA,QAClB,KAAK,QAAQ;AAAA,QACb,cAAY,QAAQ,OAAO,SAAS;AAAA,QACpC,UAAU;AAAA,QACV,iBAAe,aAAa,KAAK;AAAA,QACjC,oBAAkB,sBAAsB,QAAQ,KAAK,IAAI,KAAK;AAAA,QAC7D,GAAG;AAAA,QACJ,KAAK;AAAA,QAEL,SAAS,qBAAqB,aAAa,SAAS,CAAC,UAAU;AAM7D,gBAAM,cAAc,MAAM;AAG1B,cAAI,eAAe,YAAY,SAAS;AACtC,uBAAW,KAAK;AAAA,UAClB;AAAA,QACF,CAAC;AAAA,QACD,eAAe,qBAAqB,aAAa,eAAe,CAAC,UAAU;AACzE,yBAAe,UAAU,MAAM;AAI/B,gBAAM,SAAS,MAAM;AACrB,cAAI,OAAO,kBAAkB,MAAM,SAAS,GAAG;AAC7C,mBAAO,sBAAsB,MAAM,SAAS;AAAA,UAC9C;AAKA,cAAI,MAAM,WAAW,KAAK,MAAM,YAAY,SAAS,MAAM,gBAAgB,SAAS;AAClF,uBAAW,KAAK;AAEhB,kBAAM,eAAe;AAAA,UACvB;AAAA,QACF,CAAC;AAAA,QACD,WAAW,qBAAqB,aAAa,WAAW,CAAC,UAAU;AACjE,gBAAM,gBAAgB,UAAU,YAAY;AAC5C,gBAAM,gBAAgB,MAAM,WAAW,MAAM,UAAU,MAAM;AAC7D,cAAI,CAAC,iBAAiB,MAAM,IAAI,WAAW,EAAG,uBAAsB,MAAM,GAAG;AAC7E,cAAI,iBAAiB,MAAM,QAAQ,IAAK;AACxC,cAAI,UAAU,SAAS,MAAM,GAAG,GAAG;AACjC,uBAAW;AACX,kBAAM,eAAe;AAAA,UACvB;AAAA,QACF,CAAC;AAAA;AAAA,IACH,GACF;AAAA,EAEJ;AACF;AAEA,cAAc,cAAc;AAM5B,IAAM,aAAa;AAQnB,IAAM,cAAoB;AAAA,EACxB,CAAC,OAAsC,iBAAiB;AAEtD,UAAM,EAAE,eAAe,WAAW,OAAO,UAAU,cAAc,IAAI,GAAG,WAAW,IAAI;AACvF,UAAM,UAAU,iBAAiB,YAAY,aAAa;AAC1D,UAAM,EAAE,6BAA6B,IAAI;AACzC,UAAM,cAAc,aAAa;AACjC,UAAM,eAAe,gBAAgB,cAAc,QAAQ,iBAAiB;AAE5E,oBAAgB,MAAM;AACpB,mCAA6B,WAAW;AAAA,IAC1C,GAAG,CAAC,8BAA8B,WAAW,CAAC;AAE9C,WACE;AAAA,MAAC,UAAU;AAAA,MAAV;AAAA,QACE,GAAG;AAAA,QACJ,KAAK;AAAA,QAGL,OAAO,EAAE,eAAe,OAAO;AAAA,QAE9B,Line truncated
"names": ["handleScroll", "canScrollUp", "canScrollDown", "Root", "Content", "Arrow"]
}
@@ -0,0 +1,749 @@
// ==================================================================================================
// JSON Schema Draft 04
// ==================================================================================================
/**
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
*/
export type JSONSchema4TypeName =
| "string" //
| "number"
| "integer"
| "boolean"
| "object"
| "array"
| "null"
| "any";
/**
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
*/
export type JSONSchema4Type =
| string //
| number
| boolean
| JSONSchema4Object
| JSONSchema4Array
| null;
// Workaround for infinite type recursion
export interface JSONSchema4Object {
[key: string]: JSONSchema4Type;
}
// Workaround for infinite type recursion
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
export interface JSONSchema4Array extends Array<JSONSchema4Type> {}
/**
* Meta schema
*
* Recommended values:
* - 'http://json-schema.org/schema#'
* - 'http://json-schema.org/hyper-schema#'
* - 'http://json-schema.org/draft-04/schema#'
* - 'http://json-schema.org/draft-04/hyper-schema#'
* - 'http://json-schema.org/draft-03/schema#'
* - 'http://json-schema.org/draft-03/hyper-schema#'
*
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
*/
export type JSONSchema4Version = string;
/**
* JSON Schema V4
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04
*/
export interface JSONSchema4 {
id?: string | undefined;
$ref?: string | undefined;
$schema?: JSONSchema4Version | undefined;
/**
* This attribute is a string that provides a short description of the
* instance property.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
*/
title?: string | undefined;
/**
* This attribute is a string that provides a full description of the of
* purpose the instance property.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
*/
description?: string | undefined;
default?: JSONSchema4Type | undefined;
multipleOf?: number | undefined;
maximum?: number | undefined;
exclusiveMaximum?: boolean | undefined;
minimum?: number | undefined;
exclusiveMinimum?: boolean | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
pattern?: string | undefined;
/**
* May only be defined when "items" is defined, and is a tuple of JSONSchemas.
*
* This provides a definition for additional items in an array instance
* when tuple definitions of the items is provided. This can be false
* to indicate additional items in the array are not allowed, or it can
* be a schema that defines the schema of the additional items.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
*/
additionalItems?: boolean | JSONSchema4 | undefined;
/**
* This attribute defines the allowed items in an instance array, and
* MUST be a schema or an array of schemas. The default value is an
* empty schema which allows any value for items in the instance array.
*
* When this attribute value is a schema and the instance value is an
* array, then all the items in the array MUST be valid according to the
* schema.
*
* When this attribute value is an array of schemas and the instance
* value is an array, each position in the instance array MUST conform
* to the schema in the corresponding position for this array. This
* called tuple typing. When tuple typing is used, additional items are
* allowed, disallowed, or constrained by the "additionalItems"
* (Section 5.6) attribute using the same rules as
* "additionalProperties" (Section 5.4) for objects.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
*/
items?: JSONSchema4 | JSONSchema4[] | undefined;
maxItems?: number | undefined;
minItems?: number | undefined;
uniqueItems?: boolean | undefined;
maxProperties?: number | undefined;
minProperties?: number | undefined;
/**
* This attribute indicates if the instance must have a value, and not
* be undefined. This is false by default, making the instance
* optional.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
*/
required?: boolean | string[] | undefined;
/**
* This attribute defines a schema for all properties that are not
* explicitly defined in an object type definition. If specified, the
* value MUST be a schema or a boolean. If false is provided, no
* additional properties are allowed beyond the properties defined in
* the schema. The default value is an empty schema which allows any
* value for additional properties.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
*/
additionalProperties?: boolean | JSONSchema4 | undefined;
definitions?: {
[k: string]: JSONSchema4;
} | undefined;
/**
* This attribute is an object with property definitions that define the
* valid values of instance object property values. When the instance
* value is an object, the property values of the instance object MUST
* conform to the property definitions in this object. In this object,
* each property definition's value MUST be a schema, and the property's
* name MUST be the name of the instance property that it defines. The
* instance property value MUST be valid according to the schema from
* the property definition. Properties are considered unordered, the
* order of the instance properties MAY be in any order.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
*/
properties?: {
[k: string]: JSONSchema4;
} | undefined;
/**
* This attribute is an object that defines the schema for a set of
* property names of an object instance. The name of each property of
* this attribute's object is a regular expression pattern in the ECMA
* 262/Perl 5 format, while the value is a schema. If the pattern
* matches the name of a property on the instance object, the value of
* the instance's property MUST be valid against the pattern name's
* schema value.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
*/
patternProperties?: {
[k: string]: JSONSchema4;
} | undefined;
dependencies?: {
[k: string]: JSONSchema4 | string[];
} | undefined;
/**
* This provides an enumeration of all possible values that are valid
* for the instance property. This MUST be an array, and each item in
* the array represents a possible value for the instance value. If
* this attribute is defined, the instance value MUST be one of the
* values in the array in order for the schema to be valid.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
*/
enum?: JSONSchema4Type[] | undefined;
/**
* A single type, or a union of simple types
*/
type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
allOf?: JSONSchema4[] | undefined;
anyOf?: JSONSchema4[] | undefined;
oneOf?: JSONSchema4[] | undefined;
not?: JSONSchema4 | undefined;
/**
* The value of this property MUST be another schema which will provide
* a base schema which the current schema will inherit from. The
* inheritance rules are such that any instance that is valid according
* to the current schema MUST be valid according to the referenced
* schema. This MAY also be an array, in which case, the instance MUST
* be valid for all the schemas in the array. A schema that extends
* another schema MAY define additional attributes, constrain existing
* attributes, or add other constraints.
*
* Conceptually, the behavior of extends can be seen as validating an
* instance against all constraints in the extending schema as well as
* the extended schema(s).
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
*/
extends?: string | string[] | undefined;
/**
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
*/
[k: string]: any;
format?: string | undefined;
}
// ==================================================================================================
// JSON Schema Draft 06
// ==================================================================================================
export type JSONSchema6TypeName =
| "string" //
| "number"
| "integer"
| "boolean"
| "object"
| "array"
| "null"
| "any";
export type JSONSchema6Type =
| string //
| number
| boolean
| JSONSchema6Object
| JSONSchema6Array
| null;
// Workaround for infinite type recursion
export interface JSONSchema6Object {
[key: string]: JSONSchema6Type;
}
// Workaround for infinite type recursion
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
export interface JSONSchema6Array extends Array<JSONSchema6Type> {}
/**
* Meta schema
*
* Recommended values:
* - 'http://json-schema.org/schema#'
* - 'http://json-schema.org/hyper-schema#'
* - 'http://json-schema.org/draft-06/schema#'
* - 'http://json-schema.org/draft-06/hyper-schema#'
*
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
*/
export type JSONSchema6Version = string;
/**
* JSON Schema V6
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01
*/
export type JSONSchema6Definition = JSONSchema6 | boolean;
export interface JSONSchema6 {
$id?: string | undefined;
$ref?: string | undefined;
$schema?: JSONSchema6Version | undefined;
/**
* Must be strictly greater than 0.
* A numeric instance is valid only if division by this keyword's value results in an integer.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1
*/
multipleOf?: number | undefined;
/**
* Representing an inclusive upper limit for a numeric instance.
* This keyword validates only if the instance is less than or exactly equal to "maximum".
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2
*/
maximum?: number | undefined;
/**
* Representing an exclusive upper limit for a numeric instance.
* This keyword validates only if the instance is strictly less than (not equal to) to "exclusiveMaximum".
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3
*/
exclusiveMaximum?: number | undefined;
/**
* Representing an inclusive lower limit for a numeric instance.
* This keyword validates only if the instance is greater than or exactly equal to "minimum".
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4
*/
minimum?: number | undefined;
/**
* Representing an exclusive lower limit for a numeric instance.
* This keyword validates only if the instance is strictly greater than (not equal to) to "exclusiveMinimum".
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5
*/
exclusiveMinimum?: number | undefined;
/**
* Must be a non-negative integer.
* A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6
*/
maxLength?: number | undefined;
/**
* Must be a non-negative integer.
* A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.
* Omitting this keyword has the same behavior as a value of 0.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7
*/
minLength?: number | undefined;
/**
* Should be a valid regular expression, according to the ECMA 262 regular expression dialect.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8
*/
pattern?: string | undefined;
/**
* This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
* Omitting this keyword has the same behavior as an empty schema.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9
*/
items?: JSONSchema6Definition | JSONSchema6Definition[] | undefined;
/**
* This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
* If "items" is an array of schemas, validation succeeds if every instance element
* at a position greater than the size of "items" validates against "additionalItems".
* Otherwise, "additionalItems" MUST be ignored, as the "items" schema
* (possibly the default value of an empty schema) is applied to all elements.
* Omitting this keyword has the same behavior as an empty schema.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10
*/
additionalItems?: JSONSchema6Definition | undefined;
/**
* Must be a non-negative integer.
* An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11
*/
maxItems?: number | undefined;
/**
* Must be a non-negative integer.
* An array instance is valid against "maxItems" if its size is greater than, or equal to, the value of this keyword.
* Omitting this keyword has the same behavior as a value of 0.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12
*/
minItems?: number | undefined;
/**
* If this keyword has boolean value false, the instance validates successfully.
* If it has boolean value true, the instance validates successfully if all of its elements are unique.
* Omitting this keyword has the same behavior as a value of false.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13
*/
uniqueItems?: boolean | undefined;
/**
* An array instance is valid against "contains" if at least one of its elements is valid against the given schema.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14
*/
contains?: JSONSchema6Definition | undefined;
/**
* Must be a non-negative integer.
* An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15
*/
maxProperties?: number | undefined;
/**
* Must be a non-negative integer.
* An object instance is valid against "maxProperties" if its number of properties is greater than,
* or equal to, the value of this keyword.
* Omitting this keyword has the same behavior as a value of 0.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16
*/
minProperties?: number | undefined;
/**
* Elements of this array must be unique.
* An object instance is valid against this keyword if every item in the array is the name of a property in the instance.
* Omitting this keyword has the same behavior as an empty array.
*
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17
*/
required?: string[] | undefined;
/**
* This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.
* Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,
* the child instance for that name successfully validates against the corresponding schema.
* Omitting this keyword has the same behavior as an empty object.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18
*/
properties?: {
[k: string]: JSONSchema6Definition;
} | undefined;
/**
* This attribute is an object that defines the schema for a set of property names of an object instance.
* The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema.
* If the pattern matches the name of a property on the instance object, the value of the instance's property
* MUST be valid against the pattern name's schema value.
* Omitting this keyword has the same behavior as an empty object.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19
*/
patternProperties?: {
[k: string]: JSONSchema6Definition;
} | undefined;
/**
* This attribute defines a schema for all properties that are not explicitly defined in an object type definition.
* If specified, the value MUST be a schema or a boolean.
* If false is provided, no additional properties are allowed beyond the properties defined in the schema.
* The default value is an empty schema which allows any value for additional properties.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20
*/
additionalProperties?: JSONSchema6Definition | undefined;
/**
* This keyword specifies rules that are evaluated if the instance is an object and contains a certain property.
* Each property specifies a dependency.
* If the dependency value is an array, each element in the array must be unique.
* Omitting this keyword has the same behavior as an empty object.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21
*/
dependencies?: {
[k: string]: JSONSchema6Definition | string[];
} | undefined;
/**
* Takes a schema which validates the names of all properties rather than their values.
* Note the property name that the schema is testing will always be a string.
* Omitting this keyword has the same behavior as an empty schema.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22
*/
propertyNames?: JSONSchema6Definition | undefined;
/**
* This provides an enumeration of all possible values that are valid
* for the instance property. This MUST be an array, and each item in
* the array represents a possible value for the instance value. If
* this attribute is defined, the instance value MUST be one of the
* values in the array in order for the schema to be valid.
*
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23
*/
enum?: JSONSchema6Type[] | undefined;
/**
* More readable form of a one-element "enum"
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24
*/
const?: JSONSchema6Type | undefined;
/**
* A single type, or a union of simple types
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25
*/
type?: JSONSchema6TypeName | JSONSchema6TypeName[] | undefined;
/**
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
*/
allOf?: JSONSchema6Definition[] | undefined;
/**
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
*/
anyOf?: JSONSchema6Definition[] | undefined;
/**
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
*/
oneOf?: JSONSchema6Definition[] | undefined;
/**
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29
*/
not?: JSONSchema6Definition | undefined;
/**
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1
*/
definitions?: {
[k: string]: JSONSchema6Definition;
} | undefined;
/**
* This attribute is a string that provides a short description of the instance property.
*
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
*/
title?: string | undefined;
/**
* This attribute is a string that provides a full description of the of purpose the instance property.
*
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
*/
description?: string | undefined;
/**
* This keyword can be used to supply a default JSON value associated with a particular schema.
* It is RECOMMENDED that a default value be valid against the associated schema.
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3
*/
default?: JSONSchema6Type | undefined;
/**
* Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4
*/
examples?: JSONSchema6Type[] | undefined;
/**
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8
*/
format?: string | undefined;
}
// ==================================================================================================
// JSON Schema Draft 07
// ==================================================================================================
// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
// --------------------------------------------------------------------------------------------------
/**
* Primitive type
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
*/
export type JSONSchema7TypeName =
| "string" //
| "number"
| "integer"
| "boolean"
| "object"
| "array"
| "null";
/**
* Primitive type
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
*/
export type JSONSchema7Type =
| string //
| number
| boolean
| JSONSchema7Object
| JSONSchema7Array
| null;
// Workaround for infinite type recursion
export interface JSONSchema7Object {
[key: string]: JSONSchema7Type;
}
// Workaround for infinite type recursion
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
export interface JSONSchema7Array extends Array<JSONSchema7Type> {}
/**
* Meta schema
*
* Recommended values:
* - 'http://json-schema.org/schema#'
* - 'http://json-schema.org/hyper-schema#'
* - 'http://json-schema.org/draft-07/schema#'
* - 'http://json-schema.org/draft-07/hyper-schema#'
*
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
*/
export type JSONSchema7Version = string;
/**
* JSON Schema v7
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
*/
export type JSONSchema7Definition = JSONSchema7 | boolean;
export interface JSONSchema7 {
$id?: string | undefined;
$ref?: string | undefined;
$schema?: JSONSchema7Version | undefined;
$comment?: string | undefined;
/**
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
*/
$defs?: {
[key: string]: JSONSchema7Definition;
} | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
*/
type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
enum?: JSONSchema7Type[] | undefined;
const?: JSONSchema7Type | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
*/
multipleOf?: number | undefined;
maximum?: number | undefined;
exclusiveMaximum?: number | undefined;
minimum?: number | undefined;
exclusiveMinimum?: number | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
*/
maxLength?: number | undefined;
minLength?: number | undefined;
pattern?: string | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
*/
items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
additionalItems?: JSONSchema7Definition | undefined;
maxItems?: number | undefined;
minItems?: number | undefined;
uniqueItems?: boolean | undefined;
contains?: JSONSchema7Definition | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
*/
maxProperties?: number | undefined;
minProperties?: number | undefined;
required?: string[] | undefined;
properties?: {
[key: string]: JSONSchema7Definition;
} | undefined;
patternProperties?: {
[key: string]: JSONSchema7Definition;
} | undefined;
additionalProperties?: JSONSchema7Definition | undefined;
dependencies?: {
[key: string]: JSONSchema7Definition | string[];
} | undefined;
propertyNames?: JSONSchema7Definition | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
*/
if?: JSONSchema7Definition | undefined;
then?: JSONSchema7Definition | undefined;
else?: JSONSchema7Definition | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
*/
allOf?: JSONSchema7Definition[] | undefined;
anyOf?: JSONSchema7Definition[] | undefined;
oneOf?: JSONSchema7Definition[] | undefined;
not?: JSONSchema7Definition | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
*/
format?: string | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
*/
contentMediaType?: string | undefined;
contentEncoding?: string | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
*/
definitions?: {
[key: string]: JSONSchema7Definition;
} | undefined;
/**
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
*/
title?: string | undefined;
description?: string | undefined;
default?: JSONSchema7Type | undefined;
readOnly?: boolean | undefined;
writeOnly?: boolean | undefined;
examples?: JSONSchema7Type | undefined;
}
export interface ValidationResult {
valid: boolean;
errors: ValidationError[];
}
export interface ValidationError {
property: string;
message: string;
}
/**
* To use the validator call JSONSchema.validate with an instance object and an optional schema object.
* If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
* that schema will be used to validate and the schema parameter is not necessary (if both exist,
* both validations will occur).
*/
export function validate(instance: {}, schema: JSONSchema4 | JSONSchema6 | JSONSchema7): ValidationResult;
/**
* The checkPropertyChange method will check to see if an value can legally be in property with the given schema
* This is slightly different than the validate method in that it will fail if the schema is readonly and it will
* not check for self-validation, it is assumed that the passed in value is already internally valid.
*/
export function checkPropertyChange(
value: any,
schema: JSONSchema4 | JSONSchema6 | JSONSchema7,
property: string,
): ValidationResult;
/**
* This checks to ensure that the result is valid and will throw an appropriate error message if it is not.
*/
export function mustBeValid(result: ValidationResult): void;
@@ -0,0 +1 @@
{"version":3,"file":"user-square-2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,51 @@
export { defer, isMatch, joinPaths, cleanPath, trimPathLeft, trimPathRight, trimPath, resolvePath, interpolatePath, rootRouteId, defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith, functionalUpdate, replaceEqualDeep, isPlainObject, isPlainArray, deepEqual, createControlledPromise, retainSearchParams, stripSearchParams, createSerializationAdapter, } from '@tanstack/router-core';
export type { AnyRoute, DeferredPromiseState, DeferredPromise, ParsedLocation, RemoveTrailingSlashes, RemoveLeadingSlashes, ActiveOptions, ResolveRelativePath, RootRouteId, AnyPathParams, ResolveParams, ResolveOptionalParams, ResolveRequiredParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, UpdatableStaticRouteOption, MetaDescriptor, RouteLinkEntry, ParseParamsFn, SearchFilter, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, TrimPath, TrimPathLeft, TrimPathRight, StringifyParamsFn, ParamsOptions, InferAllParams, InferAllContext, LooseReturnType, LooseAsyncReturnType, ContextReturnType, ContextAsyncReturnType, ResolveLoaderData, ResolveRouteContext, SearchSerializer, SearchParser, SearchMiddleware, TrailingSlashOption, Manifest, RouterManagedTag, ControlledPromise, Constrain, Expand, MergeAll, Assign, IntersectAssign, ResolveValidatorInput, ResolveValidatorOutput, Register, AnyValidator, DefaultValidator, ValidatorFn, AnySchema, AnyValidatorAdapter, AnyValidatorFn, AnyValidatorObj, ResolveValidatorInputFn, ResolveValidatorOutputFn, ResolveSearchValidatorInput, ResolveSearchValidatorInputFn, Validator, ValidatorAdapter, ValidatorObj, FileRoutesByPath, RouteById, RootRouteOptions, CreateFileRoute, SerializationAdapter, AnySerializationAdapter, SerializableExtensions, } from '@tanstack/router-core';
export { createHistory, createBrowserHistory, createHashHistory, createMemoryHistory, } from '@tanstack/history';
export type { BlockerFn, HistoryLocation, RouterHistory, ParsedPath, HistoryState, } from '@tanstack/history';
export { useAwaited, Await } from './awaited.js';
export type { AwaitOptions } from './awaited.js';
export { CatchBoundary, ErrorComponent } from './CatchBoundary.js';
export { ClientOnly, useHydrated } from './ClientOnly.js';
export { FileRoute, createFileRoute, FileRouteLoader, LazyRoute, createLazyRoute, createLazyFileRoute, } from './fileRoute.js';
export * from './history.js';
export { lazyRouteComponent } from './lazyRouteComponent.js';
export { useLinkProps, createLink, Link, linkOptions } from './link.js';
export type { InferDescendantToPaths, RelativeToPath, RelativeToParentPath, RelativeToCurrentPath, AbsoluteToPath, RelativeToPathAutoComplete, NavigateOptions, ToOptions, ToMaskOptions, ToSubOptions, ResolveRoute, SearchParamOptions, PathParamOptions, ToPathOption, LinkOptions, MakeOptionalPathParams, FileRouteTypes, RouteContextParameter, BeforeLoadContextParameter, ResolveAllContext, ResolveAllParamsFromParent, ResolveFullSearchSchema, ResolveFullSearchSchemaInput, RouteIds, NavigateFn, BuildLocationFn, FullSearchSchemaOption, MakeRemountDepsOptionsUnion, RemountDepsOptions, ResolveFullPath, AnyRouteWithContext, AnyRouterWithContext, CommitLocationOptions, MatchLocation, UseNavigateResult, AnyRedirect, Redirect, RedirectOptions, ResolvedRedirect, MakeRouteMatch, MakeRouteMatchUnion, RouteMatch, AnyRouteMatch, RouteContextFn, RouteContextOptions, BeforeLoadContextOptions, ContextOptions, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, RouteLoaderFn, LoaderFnContext, LazyRouteOptions, AnyRouter, RegisteredRouter, RouterContextOptions, ControllablePromise, InjectedHtmlEntry, RouterOptions, RouterState, ListenerFn, BuildNextOptions, RouterConstructorOptions, RouterEvents, RouterEvent, RouterListener, RouteConstraints, RouteMask, MatchRouteOptions, CreateLazyFileRoute, } from '@tanstack/router-core';
export type { UseLinkPropsOptions, ActiveLinkOptions, LinkProps, LinkComponent, LinkComponentProps, CreateLinkProps, } from './link.js';
export { Matches, useMatchRoute, MatchRoute, useMatches, useParentMatches, useChildMatches, } from './Matches.js';
export type { UseMatchRouteOptions, MakeMatchRouteOptions } from './Matches.js';
export { Match, Outlet } from './Match.js';
export { useMatch } from './useMatch.js';
export { useLoaderDeps } from './useLoaderDeps.js';
export { useLoaderData } from './useLoaderData.js';
export { redirect, isRedirect, createRouterConfig, DEFAULT_PROTOCOL_ALLOWLIST, } from '@tanstack/router-core';
export { RouteApi, getRouteApi, Route, createRoute, RootRoute, rootRouteWithContext, createRootRoute, createRootRouteWithContext, createRouteMask, NotFoundRoute, } from './route.js';
export type { AnyRootRoute, AsyncRouteComponent, RouteComponent, ErrorRouteComponent, NotFoundRouteComponent, DefaultRouteTypes, RouteTypes, } from './route.js';
export { createRouter, Router } from './router.js';
export { lazyFn, SearchParamError } from '@tanstack/router-core';
export { RouterProvider, RouterContextProvider } from './RouterProvider.js';
export type { RouterProps } from './RouterProvider.js';
export { useElementScrollRestoration, ScrollRestoration, } from './ScrollRestoration.js';
export type { UseBlockerOpts, ShouldBlockFn } from './useBlocker.js';
export { useBlocker, Block } from './useBlocker.js';
export { useNavigate, Navigate } from './useNavigate.js';
export { useParams } from './useParams.js';
export { useSearch } from './useSearch.js';
export { useRouteContext } from './useRouteContext.js';
export { useRouter } from './useRouter.js';
export { useRouterState } from './useRouterState.js';
export { useLocation } from './useLocation.js';
export { useCanGoBack } from './useCanGoBack.js';
export { CatchNotFound, DefaultGlobalNotFound } from './not-found.js';
export { notFound, isNotFound } from '@tanstack/router-core';
export type { NotFoundError } from '@tanstack/router-core';
export type { ValidateLinkOptions, InferStructuralSharing, ValidateUseSearchOptions, ValidateUseParamsOptions, ValidateLinkOptionsArray, } from './typePrimitives.js';
export type { ValidateFromPath, ValidateToPath, ValidateSearch, ValidateParams, InferFrom, InferTo, InferMaskTo, InferMaskFrom, ValidateNavigateOptions, ValidateNavigateOptionsArray, ValidateRedirectOptions, ValidateRedirectOptionsArray, ValidateId, InferStrict, InferShouldThrow, InferSelected, ValidateUseSearchResult, ValidateUseParamsResult, SerializerExtensions, RegisteredSerializableInput, Serializable, } from '@tanstack/router-core';
export { ScriptOnce } from './ScriptOnce.js';
export { Asset } from './Asset.js';
export { HeadContent } from './HeadContent.js';
export { useTags } from './headContentUtils.js';
export { Scripts } from './Scripts.js';
export type * from './ssr/serializer.js';
export { composeRewrites } from '@tanstack/router-core';
export type { LocationRewrite, LocationRewriteFunction, } from '@tanstack/router-core';
@@ -0,0 +1 @@
{"version":3,"names":["_utils","require","_core","_is","defineType","defineAliasedType","bool","assertValueType","tSFunctionTypeAnnotationCommon","returnType","validate","assertNodeType","optional","typeParameters","aliases","visitor","fields","accessibility","assertOneOf","readonly","parameter","override","decorators","arrayOfType","Object","assign","functionDeclarationCommon","classMethodOrPropertyUnionShapeCommon","classMethodOrDeclareMethodCommon","left","validateType","right","signatureDeclarationCommon","validateOptionalType","validateArrayOfType","callConstructSignatureDeclaration","namedTypeElementCommon","key","computed","default","validateOptional","typeAnnotation","kind","static","parameters","tsKeywordTypes","type","fnOrCtrBase","abstract","typeName","builder","parameterName","asserts","exprName","members","elementType","elementTypes","label","unionOrIntersection","types","checkType","extendsType","trueType","falseType","typeParameter","operator","objectType","indexType","nameType","quasis","chain","assertEach","node","val","length","TypeError","literal","unaryExpression","unaryOperator","validator","parent","is","argument","oneOfNodeTypes","expression","declare","id","extends","body","TSTypeExpression","const","initializer","global","qualifier","options","isExport","moduleReference","importKind","params","name","in","out","constraint"],"sources":["../../src/definitions/typescript.ts"],"sourcesContent":["import type * as t from \"../index.ts\";\nimport {\n defineAliasedType,\n arrayOfType,\n assertEach,\n assertNodeType,\n assertOneOf,\n assertValueType,\n chain,\n validate,\n validateArrayOfType,\n validateOptional,\n validateOptionalType,\n validateType,\n type ValidatorImpl,\n type ValidatorOneOfNodeTypes,\n} from \"./utils.ts\";\nimport {\n functionDeclarationCommon,\n classMethodOrDeclareMethodCommon,\n classMethodOrPropertyUnionShapeCommon,\n} from \"./core.ts\";\nimport is from \"../validators/is.ts\";\n\nconst defineType = defineAliasedType(\"TypeScript\");\n\nconst bool = assertValueType(\"boolean\");\n\nconst tSFunctionTypeAnnotationCommon = () => ({\n returnType: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TSTypeAnnotation\")\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n assertNodeType(\"TSTypeAnnotation\", \"Noop\"),\n optional: true,\n },\n typeParameters: {\n validate: process.env.BABEL_8_BREAKING\n ? assertNodeType(\"TSTypeParameterDeclaration\")\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n assertNodeType(\"TSTypeParameterDeclaration\", \"Noop\"),\n optional: true,\n },\n});\n\ndefineType(\"TSParameterProperty\", {\n aliases: process.env.BABEL_8_BREAKING ? [] : [\"LVal\"],\n visitor: [\"parameter\"],\n fields: {\n accessibility: {\n validate: assertOneOf(\"public\", \"private\", \"protected\"),\n optional: true,\n },\n readonly: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n parameter: {\n validate: assertNodeType(\"Identifier\", \"AssignmentPattern\"),\n },\n override: {\n validate: assertValueType(\"boolean\"),\n optional: true,\n },\n decorators: {\n validate: arrayOfType(\"Decorator\"),\n optional: true,\n },\n },\n});\n\ndefineType(\"TSDeclareFunction\", {\n aliases: [\"Statement\", \"Declaration\"],\n visitor: [\"id\", \"typeParameters\", \"params\", \"returnType\"],\n fields: {\n ...functionDeclarationCommon(),\n ...tSFunctionTypeAnnotationCommon(),\n },\n});\n\ndefineType(\"TSDeclareMethod\", {\n visitor: [\"decorators\", \"key\", \"typeParameters\", \"params\", \"returnType\"],\n ...classMethodOrPropertyUnionShapeCommon(),\n fields: {\n ...classMethodOrDeclareMethodCommon(),\n ...tSFunctionTypeAnnotationCommon(),\n },\n});\n\ndefineType(\"TSQualifiedName\", {\n aliases: [\"TSEntityName\"],\n visitor: [\"left\", \"right\"],\n fields: {\n left: validateType(\"TSEntityName\"),\n right: validateType(\"Identifier\"),\n },\n});\n\nconst signatureDeclarationCommon = () => ({\n typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n [process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\"]: validateArrayOfType(\n \"ArrayPattern\",\n \"Identifier\",\n \"ObjectPattern\",\n \"RestElement\",\n ),\n [process.env.BABEL_8_BREAKING ? \"returnType\" : \"typeAnnotation\"]:\n validateOptionalType(\"TSTypeAnnotation\"),\n});\n\nconst callConstructSignatureDeclaration = {\n aliases: [\"TSTypeElement\"],\n visitor: [\n \"typeParameters\",\n process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\",\n process.env.BABEL_8_BREAKING ? \"returnType\" : \"typeAnnotation\",\n ],\n fields: signatureDeclarationCommon(),\n};\n\ndefineType(\"TSCallSignatureDeclaration\", callConstructSignatureDeclaration);\ndefineType(\n \"TSConstructSignatureDeclaration\",\n callConstructSignatureDeclaration,\n);\n\nconst namedTypeElementCLine truncated
@@ -0,0 +1,361 @@
// Generated file, do not edit! Run "yarn generate" to re-generate this file.
/* istanbul ignore file */
/**
* Enum of all token types, with bit fields to signify meaningful properties.
*/
export var TokenType; (function (TokenType) {
// Precedence 0 means not an operator; otherwise it is a positive number up to 12.
const PRECEDENCE_MASK = 0xf; TokenType[TokenType["PRECEDENCE_MASK"] = PRECEDENCE_MASK] = "PRECEDENCE_MASK";
const IS_KEYWORD = 1 << 4; TokenType[TokenType["IS_KEYWORD"] = IS_KEYWORD] = "IS_KEYWORD";
const IS_ASSIGN = 1 << 5; TokenType[TokenType["IS_ASSIGN"] = IS_ASSIGN] = "IS_ASSIGN";
const IS_RIGHT_ASSOCIATIVE = 1 << 6; TokenType[TokenType["IS_RIGHT_ASSOCIATIVE"] = IS_RIGHT_ASSOCIATIVE] = "IS_RIGHT_ASSOCIATIVE";
const IS_PREFIX = 1 << 7; TokenType[TokenType["IS_PREFIX"] = IS_PREFIX] = "IS_PREFIX";
const IS_POSTFIX = 1 << 8; TokenType[TokenType["IS_POSTFIX"] = IS_POSTFIX] = "IS_POSTFIX";
const IS_EXPRESSION_START = 1 << 9; TokenType[TokenType["IS_EXPRESSION_START"] = IS_EXPRESSION_START] = "IS_EXPRESSION_START";
const num = 512; TokenType[TokenType["num"] = num] = "num"; // num startsExpr
const bigint = 1536; TokenType[TokenType["bigint"] = bigint] = "bigint"; // bigint startsExpr
const decimal = 2560; TokenType[TokenType["decimal"] = decimal] = "decimal"; // decimal startsExpr
const regexp = 3584; TokenType[TokenType["regexp"] = regexp] = "regexp"; // regexp startsExpr
const string = 4608; TokenType[TokenType["string"] = string] = "string"; // string startsExpr
const name = 5632; TokenType[TokenType["name"] = name] = "name"; // name startsExpr
const eof = 6144; TokenType[TokenType["eof"] = eof] = "eof"; // eof
const bracketL = 7680; TokenType[TokenType["bracketL"] = bracketL] = "bracketL"; // [ startsExpr
const bracketR = 8192; TokenType[TokenType["bracketR"] = bracketR] = "bracketR"; // ]
const braceL = 9728; TokenType[TokenType["braceL"] = braceL] = "braceL"; // { startsExpr
const braceBarL = 10752; TokenType[TokenType["braceBarL"] = braceBarL] = "braceBarL"; // {| startsExpr
const braceR = 11264; TokenType[TokenType["braceR"] = braceR] = "braceR"; // }
const braceBarR = 12288; TokenType[TokenType["braceBarR"] = braceBarR] = "braceBarR"; // |}
const parenL = 13824; TokenType[TokenType["parenL"] = parenL] = "parenL"; // ( startsExpr
const parenR = 14336; TokenType[TokenType["parenR"] = parenR] = "parenR"; // )
const comma = 15360; TokenType[TokenType["comma"] = comma] = "comma"; // ,
const semi = 16384; TokenType[TokenType["semi"] = semi] = "semi"; // ;
const colon = 17408; TokenType[TokenType["colon"] = colon] = "colon"; // :
const doubleColon = 18432; TokenType[TokenType["doubleColon"] = doubleColon] = "doubleColon"; // ::
const dot = 19456; TokenType[TokenType["dot"] = dot] = "dot"; // .
const question = 20480; TokenType[TokenType["question"] = question] = "question"; // ?
const questionDot = 21504; TokenType[TokenType["questionDot"] = questionDot] = "questionDot"; // ?.
const arrow = 22528; TokenType[TokenType["arrow"] = arrow] = "arrow"; // =>
const template = 23552; TokenType[TokenType["template"] = template] = "template"; // template
const ellipsis = 24576; TokenType[TokenType["ellipsis"] = ellipsis] = "ellipsis"; // ...
const backQuote = 25600; TokenType[TokenType["backQuote"] = backQuote] = "backQuote"; // `
const dollarBraceL = 27136; TokenType[TokenType["dollarBraceL"] = dollarBraceL] = "dollarBraceL"; // ${ startsExpr
const at = 27648; TokenType[TokenType["at"] = at] = "at"; // @
const hash = 29184; TokenType[TokenType["hash"] = hash] = "hash"; // # startsExpr
const eq = 29728; TokenType[TokenType["eq"] = eq] = "eq"; // = isAssign
const assign = 30752; TokenType[TokenType["assign"] = assign] = "assign"; // _= isAssign
const preIncDec = 32640; TokenType[TokenType["preIncDec"] = preIncDec] = "preIncDec"; // ++/-- prefix postfix startsExpr
const postIncDec = 33664; TokenType[TokenType["postIncDec"] = postIncDec] = "postIncDec"; // ++/-- prefix postfix startsExpr
const bang = 34432; TokenType[TokenType["bang"] = bang] = "bang"; // ! prefix startsExpr
const tilde = 35456; TokenType[TokenType["tilde"] = tilde] = "tilde"; // ~ prefix startsExpr
const pipeline = 35841; TokenType[TokenType["pipeline"] = pipeline] = "pipeline"; // |> prec:1
const nullishCoalescing = 36866; TokenType[TokenType["nullishCoalescing"] = nullishCoalescing] = "nullishCoalescing"; // ?? prec:2
const logicalOR = 37890; TokenType[TokenType["logicalOR"] = logicalOR] = "logicalOR"; // || prec:2
const logicalAND = 38915; TokenType[TokenType["logicalAND"] = logicalAND] = "logicalAND"; // && prec:3
const bitwiseOR = 39940; TokenType[TokenType["bitwiseOR"] = bitwiseOR] = "bitwiseOR"; // | prec:4
const bitwiseXOR = 40965; TokenType[TokenType["bitwiseXOR"] = bitwiseXOR] = "bitwiseXOR"; // ^ prec:5
const bitwiseAND = 41990; TokenType[TokenType["bitwiseAND"] = bitwiseAND] = "bitwiseAND"; // & prec:6
const equality = 43015; TokenType[TokenType["equality"] = equality] = "equality"; // ==/!= prec:7
const lessThan = 44040; TokenType[TokenType["lessThan"] = lessThan] = "lessThan"; // < prec:8
const greaterThan = 45064; TokenType[TokenType["greaterThan"] = greaterThan] = "greaterThan"; // > prec:8
const relationalOrEqual = 46088; TokenType[TokenType["relationalOrEqual"] = relationalOrEqual] = "relationalOrEqual"; // <=/>= prec:8
const bitShiftL = 47113; TokenType[TokenType["bitShiftL"] = bitShiftL] = "bitShiftL"; // << prec:9
const bitShiftR = 48137; TokenType[TokenType["bitShiftR"] = bitShiftR] = "bitShiftR"; // >>/>>> prec:9
const plus = 49802; TokenType[TokenType["plus"] = plus] = "plus"; // + prec:10 prefix startsExpr
const minus = 50826; TokenType[TokenType["minus"] = minus] = "minus"; // - prec:10 prefix startsExpr
const modulo = 51723; TokenType[TokenType["modulo"] = modulo] = "modulo"; // % prec:11 startsExpr
const star = 52235; TokenType[TokenType["star"] = star] = "star"; // * prec:11
const slash = 53259; TokenType[TokenType["slash"] = slash] = "slash"; // / prec:11
const exponent = 54348; TokenType[TokenType["exponent"] = exponent] = "exponent"; // ** prec:12 rightAssociative
const jsxName = 55296; TokenType[TokenType["jsxName"] = jsxName] = "jsxName"; // jsxName
const jsxText = 56320; TokenType[TokenType["jsxText"] = jsxText] = "jsxText"; // jsxText
const jsxEmptyText = 57344; TokenType[TokenType["jsxEmptyText"] = jsxEmptyText] = "jsxEmptyText"; // jsxEmptyText
const jsxTagStart = 58880; TokenType[TokenType["jsxTagStart"] = jsxTagStart] = "jsxTagStart"; // jsxTagStart startsExpr
const jsxTagEnd = 59392; TokenType[TokenType["jsxTagEnd"] = jsxTagEnd] = "jsxTagEnd"; // jsxTagEnd
const typeParameterStart = 60928; TokenType[TokenType["typeParameterStart"] = typeParameterStart] = "typeParameterStart"; // typeParameterStart startsExpr
const nonNullAssertion = 61440; TokenType[TokenType["nonNullAssertion"] = nonNullAssertion] = "nonNullAssertion"; // nonNullAssertion
const _break = 62480; TokenType[TokenType["_break"] = _break] = "_break"; // break keyword
const _case = 63504; TokenType[TokenType["_case"] = _case] = "_case"; // case keyword
const _catch = 64528; TokenType[TokenType["_catch"] = _catch] = "_catch"; // catch keyword
const _continue = 65552; TokenType[TokenType["_continue"] = _continue] = "_continue"; // continue keyword
const _debugger = 66576; TokenType[TokenType["_debugger"] = _debugger] = "_debugger"; // debugger keyword
const _default = 67600; TokenType[TokenType["_default"] = _default] = "_default"; // default keyword
const _do = 68624; TokenType[TokenType["_do"] = _do] = "_do"; // do keyword
const _else = 69648; TokenType[TokenType["_else"] = _else] = "_else"; // else keyword
const _finally = 70672; TokenType[TokenType["_finally"] = _finally] = "_finally"; // finally keyword
const _for = 71696; TokenType[TokenType["_for"] = _for] = "_for"; // for keyword
const _function = 73232; TokenType[TokenType["_function"] = _function] = "_function"; // function keyword startsExpr
const _if = 73744; TokenType[TokenType["_if"] = _if] = "_if"; // if keyword
const _return = 74768; TokenType[TokenType["_return"] = _return] = "_return"; // return keyword
const _switch = 75792; TokenType[TokenType["_switch"] = _switch] = "_switch"; // switch keyword
const _throw = 77456; TokenType[TokenType["_throw"] = _throw] = "_throw"; // throw keyword prefix startsExpr
const _try = 77840; TokenType[TokenType["_try"] = _try] = "_try"; // try keyword
const _var = 78864; TokenType[TokenType["_var"] = _var] = "_var"; // var keyword
const _let = 79888; TokenType[TokenType["_let"] = _let] = "_let"; // let keyword
const _const = 80912; TokenType[TokenType["_const"] = _const] = "_const"; // const keyword
const _while = 81936; TokenType[TokenType["_while"] = _while] = "_while"; // while keyword
const _with = 82960; TokenType[TokenType["_with"] = _with] = "_with"; // with keyword
const _new = 84496; TokenType[TokenType["_new"] = _new] = "_new"; // new keyword startsExpr
const _this = 85520; TokenType[TokenType["_this"] = _this] = "_this"; // this keyword startsExpr
const _super = 86544; TokenType[TokenType["_super"] = _super] = "_super"; // super keyword startsExpr
const _class = 87568; TokenType[TokenType["_class"] = _class] = "_class"; // class keyword startsExpr
const _extends = 88080; TokenType[TokenType["_extends"] = _extends] = "_extends"; // extends keyword
const _export = 89104; TokenType[TokenType["_export"] = _export] = "_export"; // export keyword
const _import = 90640; TokenType[TokenType["_import"] = _import] = "_import"; // import keyword startsExpr
const _yield = 91664; TokenType[TokenType["_yield"] = _yield] = "_yield"; // yield keyword startsExpr
const _null = 92688; TokenType[TokenType["_null"] = _null] = "_null"; // null keyword startsExpr
const _true = 93712; TokenType[TokenType["_true"] = _true] = "_true"; // true keyword startsExpr
const _false = 94736; TokenType[TokenType["_false"] = _false] = "_false"; // false keyword startsExpr
const _in = 95256; TokenType[TokenType["_in"] = _in] = "_in"; // in prec:8 keyword
const _instanceof = 96280; TokenType[TokenType["_instanceof"] = _instanceof] = "_instanceof"; // instanceof prec:8 keyword
const _typeof = 97936; TokenType[TokenType["_typeof"] = _typeof] = "_typeof"; // typeof keyword prefix startsExpr
const _void = 98960; TokenType[TokenType["_void"] = _void] = "_void"; // void keyword prefix startsExpr
const _delete = 99984; TokenType[TokenType["_delete"] = _delete] = "_delete"; // delete keyword prefix startsExpr
const _async = 100880; TokenType[TokenType["_async"] = _async] = "_async"; // async keyword startsExpr
const _get = 101904; TokenType[TokenType["_get"] = _get] = "_get"; // get keyword startsExpr
const _set = 102928; TokenType[TokenType["_set"] = _set] = "_set"; // set keyword startsExpr
const _declare = 103952; TokenType[TokenType["_declare"] = _declare] = "_declare"; // declare keyword startsExpr
const _readonly = 104976; TokenType[TokenType["_readonly"] = _readonly] = "_readonly"; // readonly keyword startsExpr
const _abstract = 106000; TokenType[TokenType["_abstract"] = _abstract] = "_abstract"; // abstract keyword startsExpr
const _static = 107024; TokenType[TokenType["_static"] = _static] = "_static"; // static keyword startsExpr
const _public = 107536; TokenType[TokenType["_public"] = _public] = "_public"; // public keyword
const _private = 108560; TokenType[TokenType["_private"] = _private] = "_private"; // private keyword
const _protected = 109584; TokenType[TokenType["_protected"] = _protected] = "_protected"; // protected keyword
const _override = 110608; TokenType[TokenType["_override"] = _override] = "_override"; // override keyword
const _as = 112144; TokenType[TokenType["_as"] = _as] = "_as"; // as keyword startsExpr
const _enum = 113168; TokenType[TokenType["_enum"] = _enum] = "_enum"; // enum keyword startsExpr
const _type = 114192; TokenType[TokenType["_type"] = _type] = "_type"; // type keyword startsExpr
const _implements = 115216; TokenType[TokenType["_implements"] = _implements] = "_implements"; // implements keyword startsExpr
})(TokenType || (TokenType = {}));
export function formatTokenType(tokenType) {
switch (tokenType) {
case TokenType.num:
return "num";
case TokenType.bigint:
return "bigint";
case TokenType.decimal:
return "decimal";
case TokenType.regexp:
return "regexp";
case TokenType.string:
return "string";
case TokenType.name:
return "name";
case TokenType.eof:
return "eof";
case TokenType.bracketL:
return "[";
case TokenType.bracketR:
return "]";
case TokenType.braceL:
return "{";
case TokenType.braceBarL:
return "{|";
case TokenType.braceR:
return "}";
case TokenType.braceBarR:
return "|}";
case TokenType.parenL:
return "(";
case TokenType.parenR:
return ")";
case TokenType.comma:
return ",";
case TokenType.semi:
return ";";
case TokenType.colon:
return ":";
case TokenType.doubleColon:
return "::";
case TokenType.dot:
return ".";
case TokenType.question:
return "?";
case TokenType.questionDot:
return "?.";
case TokenType.arrow:
return "=>";
case TokenType.template:
return "template";
case TokenType.ellipsis:
return "...";
case TokenType.backQuote:
return "`";
case TokenType.dollarBraceL:
return "${";
case TokenType.at:
return "@";
case TokenType.hash:
return "#";
case TokenType.eq:
return "=";
case TokenType.assign:
return "_=";
case TokenType.preIncDec:
return "++/--";
case TokenType.postIncDec:
return "++/--";
case TokenType.bang:
return "!";
case TokenType.tilde:
return "~";
case TokenType.pipeline:
return "|>";
case TokenType.nullishCoalescing:
return "??";
case TokenType.logicalOR:
return "||";
case TokenType.logicalAND:
return "&&";
case TokenType.bitwiseOR:
return "|";
case TokenType.bitwiseXOR:
return "^";
case TokenType.bitwiseAND:
return "&";
case TokenType.equality:
return "==/!=";
case TokenType.lessThan:
return "<";
case TokenType.greaterThan:
return ">";
case TokenType.relationalOrEqual:
return "<=/>=";
case TokenType.bitShiftL:
return "<<";
case TokenType.bitShiftR:
return ">>/>>>";
case TokenType.plus:
return "+";
case TokenType.minus:
return "-";
case TokenType.modulo:
return "%";
case TokenType.star:
return "*";
case TokenType.slash:
return "/";
case TokenType.exponent:
return "**";
case TokenType.jsxName:
return "jsxName";
case TokenType.jsxText:
return "jsxText";
case TokenType.jsxEmptyText:
return "jsxEmptyText";
case TokenType.jsxTagStart:
return "jsxTagStart";
case TokenType.jsxTagEnd:
return "jsxTagEnd";
case TokenType.typeParameterStart:
return "typeParameterStart";
case TokenType.nonNullAssertion:
return "nonNullAssertion";
case TokenType._break:
return "break";
case TokenType._case:
return "case";
case TokenType._catch:
return "catch";
case TokenType._continue:
return "continue";
case TokenType._debugger:
return "debugger";
case TokenType._default:
return "default";
case TokenType._do:
return "do";
case TokenType._else:
return "else";
case TokenType._finally:
return "finally";
case TokenType._for:
return "for";
case TokenType._function:
return "function";
case TokenType._if:
return "if";
case TokenType._return:
return "return";
case TokenType._switch:
return "switch";
case TokenType._throw:
return "throw";
case TokenType._try:
return "try";
case TokenType._var:
return "var";
case TokenType._let:
return "let";
case TokenType._const:
return "const";
case TokenType._while:
return "while";
case TokenType._with:
return "with";
case TokenType._new:
return "new";
case TokenType._this:
return "this";
case TokenType._super:
return "super";
case TokenType._class:
return "class";
case TokenType._extends:
return "extends";
case TokenType._export:
return "export";
case TokenType._import:
return "import";
case TokenType._yield:
return "yield";
case TokenType._null:
return "null";
case TokenType._true:
return "true";
case TokenType._false:
return "false";
case TokenType._in:
return "in";
case TokenType._instanceof:
return "instanceof";
case TokenType._typeof:
return "typeof";
case TokenType._void:
return "void";
case TokenType._delete:
return "delete";
case TokenType._async:
return "async";
case TokenType._get:
return "get";
case TokenType._set:
return "set";
case TokenType._declare:
return "declare";
case TokenType._readonly:
return "readonly";
case TokenType._abstract:
return "abstract";
case TokenType._static:
return "static";
case TokenType._public:
return "public";
case TokenType._private:
return "private";
case TokenType._protected:
return "protected";
case TokenType._override:
return "override";
case TokenType._as:
return "as";
case TokenType._enum:
return "enum";
case TokenType._type:
return "type";
case TokenType._implements:
return "implements";
default:
return "";
}
}
@@ -0,0 +1 @@
{"version":3,"file":"ship.js","sources":["../../../src/icons/ship.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Ship\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTAuMTg5VjE0IiAvPgogIDxwYXRoIGQ9Ik0xMiAydjMiIC8+CiAgPHBhdGggZD0iTTE5IDEzVjdhMiAyIDAgMCAwLTItMkg3YTIgMiAwIDAgMC0yIDJ2NiIgLz4KICA8cGF0aCBkPSJNMTkuMzggMjBBMTEuNiAxMS42IDAgMCAwIDIxIDE0bC04LjE4OC0zLjYzOWEyIDIgMCAwIDAtMS42MjQgMEwzIDE0YTExLjYgMTEuNiAwIDAgMCAyLjgxIDcuNzYiIC8+CiAgPHBhdGggZD0iTTIgMjFjLjYuNSAxLjIgMSAyLjUgMSAyLjUgMCAyLjUtMiA1LTIgMS4zIDAgMS45LjUgMi41IDFzMS4yIDEgMi41IDFjMi41IDAgMi41LTIgNS0yIDEuMyAwIDEuOS41IDIuNSAxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/ship\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 Ship = createLucideIcon('Ship', [\n ['path', { d: 'M12 10.189V14', key: '1p8cqu' }],\n ['path', { d: 'M12 2v3', key: 'qbqxhf' }],\n ['path', { d: 'M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6', key: 'qpkstq' }],\n [\n 'path',\n {\n d: 'M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76',\n key: '7tigtc',\n },\n ],\n [\n 'path',\n {\n d: 'M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1',\n key: '1924j5',\n },\n ],\n]);\n\nexport default Ship;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzE,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,219 @@
import {List, ValueObject} from 'immutable';
import {SassBoolean} from './boolean';
import {SassCalculation} from './calculation';
import {SassColor} from './color';
import {SassFunction} from './function';
import {ListSeparator} from './list';
import {SassMap} from './map';
import {SassMixin} from './mixin';
import {SassNumber} from './number';
import {SassString} from './string';
export {SassArgumentList} from './argument_list';
export {SassBoolean, sassTrue, sassFalse} from './boolean';
export {
SassCalculation,
CalculationValue,
CalculationOperator,
CalculationOperation,
CalculationInterpolation,
} from './calculation';
export {
SassColor,
ColorSpaceHsl,
ChannelNameHsl,
ColorSpaceHwb,
ChannelNameHwb,
ColorSpaceLab,
ChannelNameLab,
ColorSpaceLch,
ChannelNameLch,
ColorSpaceRgb,
ChannelNameRgb,
ColorSpaceXyz,
ChannelNameXyz,
ChannelName,
GamutMapMethod,
KnownColorSpace,
PolarColorSpace,
RectangularColorSpace,
HueInterpolationMethod,
} from './color';
export {SassFunction} from './function';
export {SassList, ListSeparator} from './list';
export {SassMap} from './map';
export {SassMixin} from './mixin';
export {SassNumber} from './number';
export {SassString} from './string';
/**
* Sass's [`null` value](https://sass-lang.com/documentation/values/null).
*
* @category Custom Function
*/
export const sassNull: Value;
/**
* The abstract base class of Sass's value types.
*
* This is passed to and returned by {@link CustomFunction}s, which are passed
* into the Sass implementation using {@link Options.functions}.
*
* @category Custom Function
*/
export abstract class Value implements ValueObject {
protected constructor();
/**
* This value as a list.
*
* All SassScript values can be used as lists. Maps count as lists of pairs,
* and all other values count as single-value lists.
*
* @returns An immutable {@link List} from the [`immutable`
* package](https://immutable-js.com/).
*/
get asList(): List<Value>;
/**
* Whether this value as a list has brackets.
*
* All SassScript values can be used as lists. Maps count as lists of pairs,
* and all other values count as single-value lists.
*/
get hasBrackets(): boolean;
/**
* Whether the value counts as `true` in an `@if` statement and other
* contexts.
*/
get isTruthy(): boolean;
/**
* Returns JavaScript's `null` value if this is {@link sassNull}, and returns
* `this` otherwise.
*/
get realNull(): null | Value;
/**
* The separator for this value as a list.
*
* All SassScript values can be used as lists. Maps count as lists of pairs,
* and all other values count as single-value lists.
*/
get separator(): ListSeparator;
/**
* Converts `sassIndex` into a JavaScript-style index into the list returned
* by {@link asList}.
*
* Sass indexes are one-based, while JavaScript indexes are zero-based. Sass
* indexes may also be negative in order to index from the end of the list.
*
* @param sassIndex - The Sass-style index into this as a list.
* @param name - The name of the function argument `sassIndex` came from
* (without the `$`) if it came from an argument. Used for error reporting.
* @throws `Error` If `sassIndex` isn't a number, if that number isn't an
* integer, or if that integer isn't a valid index for {@link asList}.
*/
sassIndexToListIndex(sassIndex: Value, name?: string): number;
/**
* Returns the value at index `index` in this value as a list, or `undefined`
* if `index` isn't valid for this list.
*
* All SassScript values can be used as lists. Maps count as lists of pairs,
* and all other values count as single-value lists.
*
* This is a shorthand for `this.asList.get(index)`, although it may be more
* efficient in some cases.
*
* **Heads up!** This method uses the same indexing conventions as the
* `immutable` package: unlike Sass the index of the first element is 0, but
* like Sass negative numbers index from the end of the list.
*/
get(index: number): Value | undefined;
/**
* Throws if `this` isn't a {@link SassBoolean}.
*
* **Heads up!** Functions should generally use {@link isTruthy} rather than
* requiring a literal boolean.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertBoolean(name?: string): SassBoolean;
/**
* Throws if `this` isn't a {@link SassCalculation}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertCalculation(name?: string): SassCalculation;
/**
* Throws if `this` isn't a {@link SassColor}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertColor(name?: string): SassColor;
/**
* Throws if `this` isn't a {@link SassFunction}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertFunction(name?: string): SassFunction;
/**
* Throws if `this` isn't a {@link SassMap}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertMap(name?: string): SassMap;
/**
* Throws if `this` isn't a {@link SassMixin}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertMixin(name?: string): SassMixin;
/**
* Throws if `this` isn't a {@link SassNumber}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertNumber(name?: string): SassNumber;
/**
* Throws if `this` isn't a {@link SassString}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertString(name?: string): SassString;
/**
* Returns `this` as a map if it counts as one (empty lists count as empty
* maps) or `null` if it doesn't.
*/
tryMap(): SassMap | null;
/** Returns whether `this` represents the same value as `other`. */
equals(other: Value): boolean;
/** Returns a hash code that can be used to store `this` in a hash map. */
hashCode(): number;
/** @hidden */
toString(): string;
}
@@ -0,0 +1,212 @@
(function (global, factory) {
if (typeof exports === 'object' && typeof module !== 'undefined') {
factory(module, require('@jridgewell/gen-mapping'), require('@jridgewell/trace-mapping'));
module.exports = def(module);
} else if (typeof define === 'function' && define.amd) {
define(['module', '@jridgewell/gen-mapping', '@jridgewell/trace-mapping'], function(mod) {
factory.apply(this, arguments);
mod.exports = def(mod);
});
} else {
const mod = { exports: {} };
factory(mod, global.genMapping, global.traceMapping);
global = typeof globalThis !== 'undefined' ? globalThis : global || self;
global.remapping = def(mod);
}
function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; }
})(this, (function (module, require_genMapping, require_traceMapping) {
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// umd:@jridgewell/trace-mapping
var require_trace_mapping = __commonJS({
"umd:@jridgewell/trace-mapping"(exports, module2) {
module2.exports = require_traceMapping;
}
});
// umd:@jridgewell/gen-mapping
var require_gen_mapping = __commonJS({
"umd:@jridgewell/gen-mapping"(exports, module2) {
module2.exports = require_genMapping;
}
});
// src/remapping.ts
var remapping_exports = {};
__export(remapping_exports, {
default: () => remapping
});
module.exports = __toCommonJS(remapping_exports);
// src/build-source-map-tree.ts
var import_trace_mapping2 = __toESM(require_trace_mapping());
// src/source-map-tree.ts
var import_gen_mapping = __toESM(require_gen_mapping());
var import_trace_mapping = __toESM(require_trace_mapping());
var SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false);
var EMPTY_SOURCES = [];
function SegmentObject(source, line, column, name, content, ignore) {
return { source, line, column, name, content, ignore };
}
function Source(map, sources, source, content, ignore) {
return {
map,
sources,
source,
content,
ignore
};
}
function MapSource(map, sources) {
return Source(map, sources, "", null, false);
}
function OriginalSource(source, content, ignore) {
return Source(null, EMPTY_SOURCES, source, content, ignore);
}
function traceMappings(tree) {
const gen = new import_gen_mapping.GenMapping({ file: tree.map.file });
const { sources: rootSources, map } = tree;
const rootNames = map.names;
const rootMappings = (0, import_trace_mapping.decodedMappings)(map);
for (let i = 0; i < rootMappings.length; i++) {
const segments = rootMappings[i];
for (let j = 0; j < segments.length; j++) {
const segment = segments[j];
const genCol = segment[0];
let traced = SOURCELESS_MAPPING;
if (segment.length !== 1) {
const source2 = rootSources[segment[1]];
traced = originalPositionFor(
source2,
segment[2],
segment[3],
segment.length === 5 ? rootNames[segment[4]] : ""
);
if (traced == null) continue;
}
const { column, line, name, content, source, ignore } = traced;
(0, import_gen_mapping.maybeAddSegment)(gen, i, genCol, source, line, column, name);
if (source && content != null) (0, import_gen_mapping.setSourceContent)(gen, source, content);
if (ignore) (0, import_gen_mapping.setIgnore)(gen, source, true);
}
}
return gen;
}
function originalPositionFor(source, line, column, name) {
if (!source.map) {
return SegmentObject(source.source, line, column, name, source.content, source.ignore);
}
const segment = (0, import_trace_mapping.traceSegment)(source.map, line, column);
if (segment == null) return null;
if (segment.length === 1) return SOURCELESS_MAPPING;
return originalPositionFor(
source.sources[segment[1]],
segment[2],
segment[3],
segment.length === 5 ? source.map.names[segment[4]] : name
);
}
// src/build-source-map-tree.ts
function asArray(value) {
if (Array.isArray(value)) return value;
return [value];
}
function buildSourceMapTree(input, loader) {
const maps = asArray(input).map((m) => new import_trace_mapping2.TraceMap(m, ""));
const map = maps.pop();
for (let i = 0; i < maps.length; i++) {
if (maps[i].sources.length > 1) {
throw new Error(
`Transformation map ${i} must have exactly one source file.
Did you specify these with the most recent transformation maps first?`
);
}
}
let tree = build(map, loader, "", 0);
for (let i = maps.length - 1; i >= 0; i--) {
tree = MapSource(maps[i], [tree]);
}
return tree;
}
function build(map, loader, importer, importerDepth) {
const { resolvedSources, sourcesContent, ignoreList } = map;
const depth = importerDepth + 1;
const children = resolvedSources.map((sourceFile, i) => {
const ctx = {
importer,
depth,
source: sourceFile || "",
content: void 0,
ignore: void 0
};
const sourceMap = loader(ctx.source, ctx);
const { source, content, ignore } = ctx;
if (sourceMap) return build(new import_trace_mapping2.TraceMap(sourceMap, source), loader, source, depth);
const sourceContent = content !== void 0 ? content : sourcesContent ? sourcesContent[i] : null;
const ignored = ignore !== void 0 ? ignore : ignoreList ? ignoreList.includes(i) : false;
return OriginalSource(source, sourceContent, ignored);
});
return MapSource(map, children);
}
// src/source-map.ts
var import_gen_mapping2 = __toESM(require_gen_mapping());
var SourceMap = class {
constructor(map, options) {
const out = options.decodedMappings ? (0, import_gen_mapping2.toDecodedMap)(map) : (0, import_gen_mapping2.toEncodedMap)(map);
this.version = out.version;
this.file = out.file;
this.mappings = out.mappings;
this.names = out.names;
this.ignoreList = out.ignoreList;
this.sourceRoot = out.sourceRoot;
this.sources = out.sources;
if (!options.excludeContent) {
this.sourcesContent = out.sourcesContent;
}
}
toString() {
return JSON.stringify(this);
}
};
// src/remapping.ts
function remapping(input, loader, options) {
const opts = typeof options === "object" ? options : { excludeContent: !!options, decodedMappings: false };
const tree = buildSourceMapTree(input, loader);
return new SourceMap(traceMappings(tree), opts);
}
}));
//# sourceMappingURL=remapping.umd.js.map
@@ -0,0 +1 @@
{"version":3,"file":"custom-event.d.ts","sourceRoot":"","sources":["../../../web/custom-event.ts"],"names":[],"mappings":"AAiBA,QAAA,MAAM,iBAAiB,KA8CrB,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CirclePlus = createLucideIcon("CirclePlus", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M8 12h8", key: "1wcyev" }],
["path", { d: "M12 8v8", key: "napkw2" }]
]);
export { CirclePlus as default };
//# sourceMappingURL=circle-plus.js.map
@@ -0,0 +1 @@
{"version":3,"file":"normalize-unicode.js","sourceRoot":"","sources":["../../src/normalize-unicode.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,+CAA+C;AAC/C,6CAA6C;AAC7C,4CAA4C;AAC5C,MAAM,cAAc,GAA2B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAElE,4DAA4D;AAC5D,MAAM,GAAG,GAAG,KAAK,CAAA;AACjB,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAA;AAC/B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAS,EAAU,EAAE;IACpD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAClB,4CAA4C;QAC5C,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC;aAClB,SAAS,CAAC,KAAK,CAAC;aAChB,iBAAiB,CAAC,IAAI,CAAC;aACvB,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAC5B,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;IACD,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IAEZ,MAAM,GAAG,GAAG,cAAc,CAAC,CAAC,CAAW,CAAA;IAEvC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,GAAG,CAAA;IACxB,yCAAyC;IACzC,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAE,CAAC;QACjB,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACtB,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;YACf,OAAO,cAAc,CAAC,CAAC,CAAC,CAAA;YACxB,IAAI,EAAE,CAAC,IAAI,CAAC;gBAAE,MAAK;QACrB,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA","sourcesContent":["// warning: extremely hot code path.\n// This has been meticulously optimized for use\n// within npm install on large package trees.\n// Do not edit without careful benchmarking.\nconst normalizeCache: Record<string, string> = Object.create(null)\n\n// Limit the size of this. Very low-sophistication LRU cache\nconst MAX = 10000\nconst cache = new Set<string>()\nexport const normalizeUnicode = (s: string): string => {\n if (!cache.has(s)) {\n // shake out identical accents and ligatures\n normalizeCache[s] = s\n .normalize('NFD')\n .toLocaleLowerCase('en')\n .toLocaleUpperCase('en')\n } else {\n cache.delete(s)\n }\n cache.add(s)\n\n const ret = normalizeCache[s] as string\n\n let i = cache.size - MAX\n // only prune when we're 10% over the max\n if (i > MAX / 10) {\n for (const s of cache) {\n cache.delete(s)\n delete normalizeCache[s]\n if (--i <= 0) break\n }\n }\n\n return ret\n}\n"]}
@@ -0,0 +1 @@
module.exports={C:{"65":0.00245,"72":0.01224,"112":0.02936,"115":0.01224,"120":0.09054,"121":0.17374,"126":0.00245,"127":0.02202,"140":0.00979,"143":0.00245,"146":0.00245,"150":0.00245,"151":0.00734,"152":0.01224,"153":0.01713,"154":0.10767,"155":0.26183,"156":0.17863,"157":0.00979,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 66 67 68 69 70 71 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 113 114 116 117 118 119 122 123 124 125 128 129 130 131 132 133 134 135 136 137 138 139 141 142 144 145 147 148 149 158 159 160 3.5 3.6"},D:{"57":0.00489,"58":0.00245,"61":0.00245,"62":0.00245,"64":0.00489,"65":0.00245,"67":0.03181,"69":0.01713,"72":0.00245,"73":0.00245,"75":0.02447,"77":0.00245,"78":0.00245,"79":0.00489,"80":0.00979,"81":0.0416,"83":0.01224,"86":0.01468,"88":0.00245,"91":0.00489,"92":0.01468,"93":0.01713,"94":0.01468,"95":0.00489,"97":0.01713,"98":0.03181,"99":0.00245,"100":0.01224,"101":0.02447,"102":0.00245,"103":0.02936,"104":0.01224,"105":0.02692,"106":0.01468,"107":0.02692,"108":0.02447,"109":0.08075,"110":0.01468,"111":0.04649,"112":0.01224,"114":0.00489,"115":0.00245,"116":0.03181,"117":0.01468,"118":0.3279,"119":0.208,"120":0.25204,"122":0.00979,"123":0.00245,"124":0.01224,"126":0.00979,"127":0.00979,"128":0.00245,"129":0.00245,"130":0.02202,"131":0.07096,"132":0.02447,"133":0.03181,"134":0.04649,"135":0.03915,"136":0.04649,"137":0.02202,"138":0.14682,"139":0.02936,"140":0.02936,"141":0.03426,"142":0.09543,"143":0.02936,"144":0.14437,"145":0.01468,"146":0.09054,"147":0.06362,"148":0.08075,"149":0.0416,"150":0.24225,"151":2.45924,"152":3.07099,"153":2.59382,"154":0.9005,"155":0.00245,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 59 60 63 66 68 70 71 74 76 84 85 87 89 90 96 113 121 125 156 157"},F:{"36":0.00245,"37":0.00245,"42":0.00489,"79":0.03181,"91":0.00245,"95":0.01713,"97":0.00245,"98":0.01468,"101":0.00245,"122":0.01468,"123":0.00245,"124":0.00245,"131":0.00245,"133":0.01224,"134":0.08075,"135":0.54323,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 38 39 40 41 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 85 86 87 88 89 90 92 93 94 96 99 100 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 125 126 127 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"15":0.01958,"17":0.00245,"18":0.04894,"84":0.00245,"89":0.00489,"90":0.01958,"92":0.06607,"100":0.02447,"107":0.00489,"109":0.00245,"114":0.00489,"115":0.00489,"117":0.00245,"119":0.07341,"120":0.10522,"122":0.00489,"131":0.01468,"135":0.00979,"136":0.00489,"139":0.00489,"140":0.00245,"141":0.00245,"143":0.07096,"144":0.00734,"145":0.00245,"146":0.00734,"147":0.00734,"148":0.01713,"149":0.03671,"150":0.05383,"151":0.40131,"152":0.93475,"153":1.5465,"154":0.26183,_:"12 13 14 16 79 80 81 83 85 86 87 88 91 93 94 95 96 97 98 99 101 102 103 104 105 106 108 110 111 112 113 116 118 121 123 124 125 126 127 128 129 130 132 133 134 137 138 142"},E:{"14":0.01713,"27":0.01224,_:"4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.2 17.4 17.5 18.0 18.1 18.2 18.3 18.4 26.0 26.1 26.2 26.3 26.4 27.1 27.2 TP","13.1":0.01713,"14.1":0.01224,"15.1":0.00245,"15.2-15.3":0.01468,"15.4":0.00734,"15.6":0.03181,"16.6":0.01468,"17.1":0.00489,"17.3":0.01224,"17.6":0.00979,"18.5-18.7":0.00734,"26.5":0.04405,"26.6":0.15906},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00061,"5.0-5.1":0.00061,"6.0-6.1":0,"7.0-7.1":0.00122,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00608,"11.0-11.2":0.00061,"11.3-11.4":0.00122,"12.0-12.1":0,"12.2-12.5":0.01581,"13.0-13.1":0,"13.2":0.00304,"13.3":0,"13.4-13.7":0.00061,"14.0-14.4":0.00243,"14.5-14.8":0.00365,"15.0-15.1":0.00365,"15.2-15.3":0.00243,"15.4":0.00304,"15.5":0.00365,"15.6-15.8":0.07904,"16.0":0.00608,"16.1":0.01094,"16.2":0.00608,"16.3":0.01338,"16.4":0.00304,"16.5":0.00486,"16.6-16.7":0.11005,"17.0":0.00426,"17.1":0.00608,"17.2":0.00608,"17.3":0.00912,"17.4":0.01277,"17.5":0.02493,"17.6-17.7":0.06445,"18.0":0.01338,"18.1":0.02675,"18.2":0.03648,"18.3":0.06323,"18.4":0.03952,"18.5-18.7":0.81657,"26.0":0.03952,"26.1":0.04013,"26.2":0.10458,"26.3":0.11309,"26.4":0.08269,"26.5":0.5539,"26.6":3.41766,"27.0":0.26206,"27.1":0,"27.2":0.00669},P:{"21":0.00982,"24":0.00982,"25":0.00982,"26":0.01965,"27":0.03929,"28":0.14735,"29":0.08841,"30":1.2672,_:"4 20 22 23 5.0-5.4 6.2-6.4 10.1 12.0 13.0 14.0 15.0 17.0 18.0 19.0","7.2-7.4":0.04912,"8.2":0.00982,"9.2":0.00982,"11.1-11.2":0.00982,"16.0":0.02947},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":2.03176,_:"10 11 12 11.1 Line truncated
@@ -0,0 +1,15 @@
import type { MinimatchOptions } from './index.js';
/**
* Escape all magic characters in a glob pattern.
*
* If the {@link MinimatchOptions.windowsPathsNoEscape}
* option is used, then characters are escaped by wrapping in `[]`, because
* a magic character wrapped in a character class can only be satisfied by
* that exact character. In this mode, `\` is _not_ escaped, because it is
* not interpreted as a magic character, but instead as a path separator.
*
* If the {@link MinimatchOptions.magicalBraces} option is used,
* then braces (`{` and `}`) will be escaped.
*/
export declare const escape: (s: string, { windowsPathsNoEscape, magicalBraces, }?: Pick<MinimatchOptions, "windowsPathsNoEscape" | "magicalBraces">) => string;
//# sourceMappingURL=escape.d.ts.map
@@ -0,0 +1,314 @@
'use strict'
const { Writable } = require('node:stream')
const { EventEmitter } = require('node:events')
const { assertCacheKey, assertCacheValue } = require('../util/cache.js')
/**
* @typedef {import('../../types/cache-interceptor.d.ts').default.CacheKey} CacheKey
* @typedef {import('../../types/cache-interceptor.d.ts').default.CacheValue} CacheValue
* @typedef {import('../../types/cache-interceptor.d.ts').default.CacheStore} CacheStore
* @typedef {import('../../types/cache-interceptor.d.ts').default.GetResult} GetResult
*/
/**
* @implements {CacheStore}
* @extends {EventEmitter}
*/
class MemoryCacheStore extends EventEmitter {
#maxCount = 1024
#maxSize = 104857600 // 100MB
#maxEntrySize = 5242880 // 5MB
#size = 0
#count = 0
#entries = new Map()
#hasEmittedMaxSizeEvent = false
/**
* @param {import('../../types/cache-interceptor.d.ts').default.MemoryCacheStoreOpts | undefined} [opts]
*/
constructor (opts) {
super()
if (opts) {
if (typeof opts !== 'object') {
throw new TypeError('MemoryCacheStore options must be an object')
}
if (opts.maxCount !== undefined) {
if (
typeof opts.maxCount !== 'number' ||
!Number.isInteger(opts.maxCount) ||
opts.maxCount < 0
) {
throw new TypeError('MemoryCacheStore options.maxCount must be a non-negative integer')
}
this.#maxCount = opts.maxCount
}
if (opts.maxSize !== undefined) {
if (
typeof opts.maxSize !== 'number' ||
!Number.isInteger(opts.maxSize) ||
opts.maxSize < 0
) {
throw new TypeError('MemoryCacheStore options.maxSize must be a non-negative integer')
}
this.#maxSize = opts.maxSize
}
if (opts.maxEntrySize !== undefined) {
if (
typeof opts.maxEntrySize !== 'number' ||
!Number.isInteger(opts.maxEntrySize) ||
opts.maxEntrySize < 0
) {
throw new TypeError('MemoryCacheStore options.maxEntrySize must be a non-negative integer')
}
this.#maxEntrySize = opts.maxEntrySize
}
}
}
/**
* Get the current size of the cache in bytes
* @returns {number} The current size of the cache in bytes
*/
get size () {
return this.#size
}
/**
* Check if the cache is full (either max size or max count reached)
* @returns {boolean} True if the cache is full, false otherwise
*/
isFull () {
return this.#size >= this.#maxSize || this.#count >= this.#maxCount
}
/**
* @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key
* @returns {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined}
*/
get (key) {
assertCacheKey(key)
const topLevelKey = `${key.origin}:${key.path}`
const now = Date.now()
const entries = this.#entries.get(topLevelKey)
const entry = entries ? findEntry(key, entries, now) : null
if (entry != null) {
this.#entries.delete(topLevelKey)
this.#entries.set(topLevelKey, entries)
}
return entry == null
? undefined
: {
statusMessage: entry.statusMessage,
statusCode: entry.statusCode,
headers: entry.headers,
body: entry.body,
vary: entry.vary ? entry.vary : undefined,
etag: entry.etag,
cacheControlDirectives: entry.cacheControlDirectives,
cachedAt: entry.cachedAt,
staleAt: entry.staleAt,
deleteAt: entry.deleteAt
}
}
/**
* @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key
* @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} val
* @returns {Writable | undefined}
*/
createWriteStream (key, val) {
assertCacheKey(key)
assertCacheValue(val)
const topLevelKey = `${key.origin}:${key.path}`
const store = this
const entry = { ...key, ...val, body: [], size: 0 }
return new Writable({
write (chunk, encoding, callback) {
if (typeof chunk === 'string') {
chunk = Buffer.from(chunk, encoding)
}
entry.size += chunk.byteLength
if (entry.size > store.#maxEntrySize) {
this.destroy()
} else {
entry.body.push(chunk)
}
callback(null)
},
final (callback) {
let entries = store.#entries.get(topLevelKey)
if (entries) {
store.#entries.delete(topLevelKey)
} else {
entries = []
}
store.#entries.set(topLevelKey, entries)
const previousEntry = findEntry(key, entries, -Infinity)
if (previousEntry) {
const index = entries.indexOf(previousEntry)
entries.splice(index, 1, entry)
store.#size -= previousEntry.size
} else {
entries.push(entry)
store.#count += 1
}
store.#size += entry.size
// Check if cache is full and emit event if needed
if (store.#size > store.#maxSize || store.#count > store.#maxCount) {
// Emit maxSizeExceeded event if we haven't already
if (!store.#hasEmittedMaxSizeEvent) {
store.emit('maxSizeExceeded', {
size: store.#size,
maxSize: store.#maxSize,
count: store.#count,
maxCount: store.#maxCount
})
store.#hasEmittedMaxSizeEvent = true
}
store.#evict(entry)
// Reset the event flag after eviction
if (store.#size < store.#maxSize && store.#count < store.#maxCount) {
store.#hasEmittedMaxSizeEvent = false
}
}
callback(null)
}
})
}
#evict (keep) {
const targetSize = this.#maxSize / 2
const targetCount = this.#maxCount / 2
for (const [key, entries] of this.#entries) {
for (let i = 0; i < entries.length && (this.#size > targetSize || this.#count > targetCount);) {
const entry = entries[i]
if (entry === keep) {
i++
continue
}
entries.splice(i, 1)
this.#size -= entry.size
this.#count -= 1
}
if (entries.length === 0) {
this.#entries.delete(key)
}
if (this.#size <= targetSize && this.#count <= targetCount) {
return
}
}
if (this.#size > this.#maxSize || this.#count > this.#maxCount) {
const topLevelKey = `${keep.origin}:${keep.path}`
const entries = this.#entries.get(topLevelKey)
entries.splice(entries.indexOf(keep), 1)
this.#size -= keep.size
this.#count -= 1
if (entries.length === 0) {
this.#entries.delete(topLevelKey)
}
}
}
/**
* @param {CacheKey} key
*/
delete (key) {
if (typeof key !== 'object') {
throw new TypeError(`expected key to be object, got ${typeof key}`)
}
const topLevelKey = `${key.origin}:${key.path}`
for (const entry of this.#entries.get(topLevelKey) ?? []) {
this.#size -= entry.size
this.#count -= 1
}
this.#entries.delete(topLevelKey)
}
}
function findEntry (key, entries, now) {
for (let i = 0; i < entries.length; i++) {
const entry = entries[i]
if (
entry.deleteAt > now &&
entry.method === key.method &&
varyMatches(key, entry)
) {
return entry
}
}
}
function varyMatches (key, entry) {
if (entry.vary == null) {
return true
}
for (const headerName in entry.vary) {
if (Object.hasOwn(entry.vary, headerName) && !headerValueEquals(key.headers?.[headerName], entry.vary[headerName])) {
return false
}
}
return true
}
/**
* @param {string|string[]|null|undefined} lhs
* @param {string|string[]|null|undefined} rhs
* @returns {boolean}
*/
function headerValueEquals (lhs, rhs) {
if (lhs == null && rhs == null) {
return true
}
if ((lhs == null && rhs != null) ||
(lhs != null && rhs == null)) {
return false
}
if (Array.isArray(lhs) && Array.isArray(rhs)) {
if (lhs.length !== rhs.length) {
return false
}
for (let i = 0; i < lhs.length; i++) {
if (lhs[i] !== rhs[i]) {
return false
}
}
return true
}
return lhs === rhs
}
module.exports = MemoryCacheStore
@@ -0,0 +1,338 @@
#include <CoreServices/CoreServices.h>
#include <sys/stat.h>
#include <string>
#include <fstream>
#include <unordered_set>
#include "../Event.hh"
#include "../Backend.hh"
#include "./FSEventsBackend.hh"
#include "../Watcher.hh"
#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec)
#define IGNORED_FLAGS (kFSEventStreamEventFlagItemIsHardlink | kFSEventStreamEventFlagItemIsLastHardlink | kFSEventStreamEventFlagItemIsSymlink | kFSEventStreamEventFlagItemIsDir | kFSEventStreamEventFlagItemIsFile)
void stopStream(FSEventStreamRef stream, CFRunLoopRef runLoop) {
FSEventStreamStop(stream);
FSEventStreamUnscheduleFromRunLoop(stream, runLoop, kCFRunLoopDefaultMode);
FSEventStreamInvalidate(stream);
FSEventStreamRelease(stream);
}
// macOS has a case insensitive file system by default. In order to detect
// file renames that only affect case, we need to get the canonical path
// and compare it with the input path to determine if a file was created or deleted.
bool pathExists(char *path) {
int fd = open(path, O_RDONLY | O_SYMLINK);
if (fd == -1) {
return false;
}
char buf[PATH_MAX];
if (fcntl(fd, F_GETPATH, buf) == -1) {
close(fd);
return false;
}
bool res = strncmp(path, buf, PATH_MAX) == 0;
close(fd);
return res;
}
class State: public WatcherState {
public:
FSEventStreamRef stream;
std::shared_ptr<DirTree> tree;
uint64_t since;
};
void FSEventsCallback(
ConstFSEventStreamRef streamRef,
void *clientCallBackInfo,
size_t numEvents,
void *eventPaths,
const FSEventStreamEventFlags eventFlags[],
const FSEventStreamEventId eventIds[]
) {
char **paths = (char **)eventPaths;
std::shared_ptr<Watcher>& watcher = *static_cast<std::shared_ptr<Watcher> *>(clientCallBackInfo);
EventList& list = watcher->mEvents;
if (watcher->state == nullptr) {
return;
}
auto stateGuard = watcher->state;
auto* state = static_cast<State*>(stateGuard.get());
uint64_t since = state->since;
bool deletedRoot = false;
for (size_t i = 0; i < numEvents; ++i) {
bool isCreated = (eventFlags[i] & kFSEventStreamEventFlagItemCreated) == kFSEventStreamEventFlagItemCreated;
bool isRemoved = (eventFlags[i] & kFSEventStreamEventFlagItemRemoved) == kFSEventStreamEventFlagItemRemoved;
bool isModified = (eventFlags[i] & kFSEventStreamEventFlagItemModified) == kFSEventStreamEventFlagItemModified ||
(eventFlags[i] & kFSEventStreamEventFlagItemInodeMetaMod) == kFSEventStreamEventFlagItemInodeMetaMod ||
(eventFlags[i] & kFSEventStreamEventFlagItemFinderInfoMod) == kFSEventStreamEventFlagItemFinderInfoMod ||
(eventFlags[i] & kFSEventStreamEventFlagItemChangeOwner) == kFSEventStreamEventFlagItemChangeOwner ||
(eventFlags[i] & kFSEventStreamEventFlagItemXattrMod) == kFSEventStreamEventFlagItemXattrMod;
bool isRenamed = (eventFlags[i] & kFSEventStreamEventFlagItemRenamed) == kFSEventStreamEventFlagItemRenamed;
bool isDone = (eventFlags[i] & kFSEventStreamEventFlagHistoryDone) == kFSEventStreamEventFlagHistoryDone;
bool isDir = (eventFlags[i] & kFSEventStreamEventFlagItemIsDir) == kFSEventStreamEventFlagItemIsDir;
if (eventFlags[i] & kFSEventStreamEventFlagMustScanSubDirs) {
if (eventFlags[i] & kFSEventStreamEventFlagUserDropped) {
list.error("Events were dropped by the FSEvents client. File system must be re-scanned.");
} else if (eventFlags[i] & kFSEventStreamEventFlagKernelDropped) {
list.error("Events were dropped by the kernel. File system must be re-scanned.");
} else {
list.error("Too many events. File system must be re-scanned.");
}
}
if (isDone) {
watcher->notify();
break;
}
auto ignoredFlags = IGNORED_FLAGS;
if (__builtin_available(macOS 10.13, *)) {
ignoredFlags |= kFSEventStreamEventFlagItemCloned;
}
// If we don't care about any of the flags that are set, ignore this event.
if ((eventFlags[i] & ~ignoredFlags) == 0) {
continue;
}
// FSEvents exclusion paths only apply to files, not directories.
if (watcher->isIgnored(paths[i])) {
continue;
}
// Handle unambiguous events first
if (isCreated && !(isRemoved || isModified || isRenamed)) {
state->tree->add(paths[i], 0, isDir);
list.create(paths[i]);
} else if (isRemoved && !(isCreated || isModified || isRenamed)) {
state->tree->remove(paths[i]);
list.remove(paths[i]);
if (paths[i] == watcher->mDir) {
deletedRoot = true;
}
} else if (isModified && !(isCreated || isRemoved || isRenamed)) {
struct stat file;
if (stat(paths[i], &file)) {
continue;
}
// Ignore if mtime is the same as the last event.
// This prevents duplicate events from being emitted.
// If tv_nsec is zero, the file system probably only has second-level
// granularity so allow the even through in that case.
uint64_t mtime = CONVERT_TIME(file.st_mtimespec);
DirEntry *entry = state->tree->find(paths[i]);
if (entry && mtime == entry->mtime && file.st_mtimespec.tv_nsec != 0) {
continue;
}
if (entry) {
// Update mtime.
entry->mtime = mtime;
} else {
// Add to tree if this path has not been discovered yet.
state->tree->add(paths[i], mtime, S_ISDIR(file.st_mode));
}
list.update(paths[i]);
} else {
// If multiple flags were set, then we need to call `stat` to determine if the file really exists.
// This helps disambiguate creates, updates, and deletes.
struct stat file;
if (stat(paths[i], &file) || !pathExists(paths[i])) {
// File does not exist, so we have to assume it was removed. This is not exact since the
// flags set by fsevents get coalesced together (e.g. created & deleted), so there is no way to
// know whether the create and delete both happened since our snapshot (in which case
// we'd rather ignore this event completely). This will result in some extra delete events
// being emitted for files we don't know about, but that is the best we can do.
state->tree->remove(paths[i]);
list.remove(paths[i]);
if (paths[i] == watcher->mDir) {
deletedRoot = true;
}
continue;
}
// If the file was modified, and existed before, then this is an update, otherwise a create.
uint64_t ctime = CONVERT_TIME(file.st_birthtimespec);
uint64_t mtime = CONVERT_TIME(file.st_mtimespec);
DirEntry *entry = !since ? state->tree->find(paths[i]) : NULL;
if (entry && entry->mtime == mtime && file.st_mtimespec.tv_nsec != 0) {
continue;
}
// Some mounted file systems report a creation time of 0/unix epoch which we special case.
if (isModified && (entry || (ctime <= since && ctime != 0))) {
state->tree->update(paths[i], mtime);
list.update(paths[i]);
} else {
state->tree->add(paths[i], mtime, S_ISDIR(file.st_mode));
list.create(paths[i]);
}
}
}
if (!since) {
watcher->notify();
}
// Stop watching if the root directory was deleted.
if (deletedRoot) {
stopStream((FSEventStreamRef)streamRef, CFRunLoopGetCurrent());
watcher->state = nullptr;
}
}
void checkWatcher(WatcherRef watcher) {
struct stat file;
if (stat(watcher->mDir.c_str(), &file)) {
throw WatcherError(strerror(errno), watcher);
}
if (!S_ISDIR(file.st_mode)) {
throw WatcherError(strerror(ENOTDIR), watcher);
}
}
void FSEventsBackend::startStream(WatcherRef watcher, FSEventStreamEventId id) {
checkWatcher(watcher);
CFAbsoluteTime latency = 0.001;
CFStringRef fileWatchPath = CFStringCreateWithCString(
NULL,
watcher->mDir.c_str(),
kCFStringEncodingUTF8
);
CFArrayRef pathsToWatch = CFArrayCreate(
NULL,
(const void **)&fileWatchPath,
1,
NULL
);
// Make a watcher reference we can pass into the callback. This ensures bumped ref-count.
std::shared_ptr<Watcher>* callbackWatcher = new std::shared_ptr<Watcher> (watcher);
FSEventStreamContext callbackInfo {0, static_cast<void*> (callbackWatcher), nullptr, nullptr, nullptr};
FSEventStreamRef stream = FSEventStreamCreate(
NULL,
&FSEventsCallback,
&callbackInfo,
pathsToWatch,
id,
latency,
kFSEventStreamCreateFlagFileEvents
);
CFMutableArrayRef exclusions = CFArrayCreateMutable(NULL, watcher->mIgnorePaths.size(), NULL);
for (auto it = watcher->mIgnorePaths.begin(); it != watcher->mIgnorePaths.end(); it++) {
CFStringRef path = CFStringCreateWithCString(
NULL,
it->c_str(),
kCFStringEncodingUTF8
);
CFArrayAppendValue(exclusions, (const void *)path);
}
FSEventStreamSetExclusionPaths(stream, exclusions);
FSEventStreamScheduleWithRunLoop(stream, mRunLoop, kCFRunLoopDefaultMode);
bool started = FSEventStreamStart(stream);
CFRelease(pathsToWatch);
CFRelease(fileWatchPath);
if (!started) {
FSEventStreamRelease(stream);
throw WatcherError("Error starting FSEvents stream", watcher);
}
auto stateGuard = watcher->state;
State* s = static_cast<State*>(stateGuard.get());
s->tree = std::make_shared<DirTree>(watcher->mDir);
s->stream = stream;
}
void FSEventsBackend::start() {
mRunLoop = CFRunLoopGetCurrent();
CFRetain(mRunLoop);
// Unlock once run loop has started.
CFRunLoopPerformBlock(mRunLoop, kCFRunLoopDefaultMode, ^ {
notifyStarted();
});
CFRunLoopWakeUp(mRunLoop);
CFRunLoopRun();
}
FSEventsBackend::~FSEventsBackend() {
std::unique_lock<std::mutex> lock(mMutex);
CFRunLoopStop(mRunLoop);
CFRelease(mRunLoop);
}
void FSEventsBackend::writeSnapshot(WatcherRef watcher, std::string *snapshotPath) {
std::unique_lock<std::mutex> lock(mMutex);
checkWatcher(watcher);
FSEventStreamEventId id = FSEventsGetCurrentEventId();
std::ofstream ofs(*snapshotPath);
ofs << id;
ofs << "\n";
struct timespec now;
clock_gettime(CLOCK_REALTIME, &now);
ofs << CONVERT_TIME(now);
}
void FSEventsBackend::getEventsSince(WatcherRef watcher, std::string *snapshotPath) {
std::unique_lock<std::mutex> lock(mMutex);
std::ifstream ifs(*snapshotPath);
if (ifs.fail()) {
return;
}
FSEventStreamEventId id;
uint64_t since;
ifs >> id;
ifs >> since;
auto s = std::make_shared<State>();
s->since = since;
watcher->state = s;
startStream(watcher, id);
watcher->wait();
stopStream(s->stream, mRunLoop);
watcher->state = nullptr;
}
// This function is called by Backend::watch which takes a lock on mMutex
void FSEventsBackend::subscribe(WatcherRef watcher) {
auto s = std::make_shared<State>();
s->since = 0;
watcher->state = s;
startStream(watcher, kFSEventStreamEventIdSinceNow);
}
// This function is called by Backend::unwatch which takes a lock on mMutex
void FSEventsBackend::unsubscribe(WatcherRef watcher) {
auto stateGuard = watcher->state;
State* s = static_cast<State*>(stateGuard.get());
if (s != nullptr) {
stopStream(s->stream, mRunLoop);
watcher->state = nullptr;
}
}
@@ -0,0 +1,315 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
test("valid", () => {
expect(
z
.discriminatedUnion("type", [
z.object({ type: z.literal("a"), a: z.string() }),
z.object({ type: z.literal("b"), b: z.string() }),
])
.parse({ type: "a", a: "abc" })
).toEqual({ type: "a", a: "abc" });
});
test("valid - discriminator value of various primitive types", () => {
const schema = z.discriminatedUnion("type", [
z.object({ type: z.literal("1"), val: z.literal(1) }),
z.object({ type: z.literal(1), val: z.literal(2) }),
z.object({ type: z.literal(BigInt(1)), val: z.literal(3) }),
z.object({ type: z.literal("true"), val: z.literal(4) }),
z.object({ type: z.literal(true), val: z.literal(5) }),
z.object({ type: z.literal("null"), val: z.literal(6) }),
z.object({ type: z.literal(null), val: z.literal(7) }),
z.object({ type: z.literal("undefined"), val: z.literal(8) }),
z.object({ type: z.literal(undefined), val: z.literal(9) }),
z.object({ type: z.literal("transform"), val: z.literal(10) }),
z.object({ type: z.literal("refine"), val: z.literal(11) }),
z.object({ type: z.literal("superRefine"), val: z.literal(12) }),
]);
expect(schema.parse({ type: "1", val: 1 })).toEqual({ type: "1", val: 1 });
expect(schema.parse({ type: 1, val: 2 })).toEqual({ type: 1, val: 2 });
expect(schema.parse({ type: BigInt(1), val: 3 })).toEqual({
type: BigInt(1),
val: 3,
});
expect(schema.parse({ type: "true", val: 4 })).toEqual({
type: "true",
val: 4,
});
expect(schema.parse({ type: true, val: 5 })).toEqual({
type: true,
val: 5,
});
expect(schema.parse({ type: "null", val: 6 })).toEqual({
type: "null",
val: 6,
});
expect(schema.parse({ type: null, val: 7 })).toEqual({
type: null,
val: 7,
});
expect(schema.parse({ type: "undefined", val: 8 })).toEqual({
type: "undefined",
val: 8,
});
expect(schema.parse({ type: undefined, val: 9 })).toEqual({
type: undefined,
val: 9,
});
});
test("invalid - null", () => {
try {
z.discriminatedUnion("type", [
z.object({ type: z.literal("a"), a: z.string() }),
z.object({ type: z.literal("b"), b: z.string() }),
]).parse(null);
throw new Error();
} catch (e: any) {
expect(JSON.parse(e.message)).toEqual([
{
code: z.ZodIssueCode.invalid_type,
expected: z.ZodParsedType.object,
message: "Expected object, received null",
received: z.ZodParsedType.null,
path: [],
},
]);
}
});
test("invalid discriminator value", () => {
try {
z.discriminatedUnion("type", [
z.object({ type: z.literal("a"), a: z.string() }),
z.object({ type: z.literal("b"), b: z.string() }),
]).parse({ type: "x", a: "abc" });
throw new Error();
} catch (e: any) {
expect(JSON.parse(e.message)).toEqual([
{
code: z.ZodIssueCode.invalid_union_discriminator,
options: ["a", "b"],
message: "Invalid discriminator value. Expected 'a' | 'b'",
path: ["type"],
},
]);
}
});
test("valid discriminator value, invalid data", () => {
try {
z.discriminatedUnion("type", [
z.object({ type: z.literal("a"), a: z.string() }),
z.object({ type: z.literal("b"), b: z.string() }),
]).parse({ type: "a", b: "abc" });
throw new Error();
} catch (e: any) {
expect(JSON.parse(e.message)).toEqual([
{
code: z.ZodIssueCode.invalid_type,
expected: z.ZodParsedType.string,
message: "Required",
path: ["a"],
received: z.ZodParsedType.undefined,
},
]);
}
});
test("wrong schema - missing discriminator", () => {
try {
z.discriminatedUnion("type", [
z.object({ type: z.literal("a"), a: z.string() }),
z.object({ b: z.string() }) as any,
]);
throw new Error();
} catch (e: any) {
expect(e.message.includes("could not be extracted")).toBe(true);
}
});
test("wrong schema - duplicate discriminator values", () => {
try {
z.discriminatedUnion("type", [
z.object({ type: z.literal("a"), a: z.string() }),
z.object({ type: z.literal("a"), b: z.string() }),
]);
throw new Error();
} catch (e: any) {
expect(e.message.includes("has duplicate value")).toEqual(true);
}
});
test("async - valid", async () => {
expect(
await z
.discriminatedUnion("type", [
z.object({
type: z.literal("a"),
a: z
.string()
.refine(async () => true)
.transform(async (val) => Number(val)),
}),
z.object({
type: z.literal("b"),
b: z.string(),
}),
])
.parseAsync({ type: "a", a: "1" })
).toEqual({ type: "a", a: 1 });
});
test("async - invalid", async () => {
try {
await z
.discriminatedUnion("type", [
z.object({
type: z.literal("a"),
a: z
.string()
.refine(async () => true)
.transform(async (val) => val),
}),
z.object({
type: z.literal("b"),
b: z.string(),
}),
])
.parseAsync({ type: "a", a: 1 });
throw new Error();
} catch (e: any) {
expect(JSON.parse(e.message)).toEqual([
{
code: "invalid_type",
expected: "string",
received: "number",
path: ["a"],
message: "Expected string, received number",
},
]);
}
});
test("valid - literals with .default or .preprocess", () => {
const schema = z.discriminatedUnion("type", [
z.object({
type: z.literal("foo").default("foo"),
a: z.string(),
}),
z.object({
type: z.literal("custom"),
method: z.string(),
}),
z.object({
type: z.preprocess((val) => String(val), z.literal("bar")),
c: z.string(),
}),
]);
expect(schema.parse({ type: "foo", a: "foo" })).toEqual({
type: "foo",
a: "foo",
});
});
test("enum and nativeEnum", () => {
enum MyEnum {
d = 0,
e = "e",
}
const schema = z.discriminatedUnion("key", [
z.object({
key: z.literal("a"),
// Add other properties specific to this option
}),
z.object({
key: z.enum(["b", "c"]),
// Add other properties specific to this option
}),
z.object({
key: z.nativeEnum(MyEnum),
// Add other properties specific to this option
}),
]);
// type schema = z.infer<typeof schema>;
schema.parse({ key: "a" });
schema.parse({ key: "b" });
schema.parse({ key: "c" });
schema.parse({ key: MyEnum.d });
schema.parse({ key: MyEnum.e });
schema.parse({ key: "e" });
});
test("branded", () => {
const schema = z.discriminatedUnion("key", [
z.object({
key: z.literal("a"),
// Add other properties specific to this option
}),
z.object({
key: z.literal("b").brand("asdfaf"),
// Add other properties specific to this option
}),
]);
// type schema = z.infer<typeof schema>;
schema.parse({ key: "a" });
schema.parse({ key: "b" });
expect(() => {
schema.parse({ key: "c" });
}).toThrow();
});
test("optional and nullable", () => {
const schema = z.discriminatedUnion("key", [
z.object({
key: z.literal("a").optional(),
a: z.literal(true),
}),
z.object({
key: z.literal("b").nullable(),
b: z.literal(true),
// Add other properties specific to this option
}),
]);
type schema = z.infer<typeof schema>;
z.util.assertEqual<schema, { key?: "a" | undefined; a: true } | { key: "b" | null; b: true }>(true);
schema.parse({ key: "a", a: true });
schema.parse({ key: undefined, a: true });
schema.parse({ key: "b", b: true });
schema.parse({ key: null, b: true });
expect(() => {
schema.parse({ key: null, a: true });
}).toThrow();
expect(() => {
schema.parse({ key: "b", a: true });
}).toThrow();
const value = schema.parse({ key: null, b: true });
if (!("key" in value)) value.a;
if (value.key === undefined) value.a;
if (value.key === "a") value.a;
if (value.key === "b") value.b;
if (value.key === null) value.b;
});
test("readonly array of options", () => {
const options = [
z.object({ type: z.literal("x"), val: z.literal(1) }),
z.object({ type: z.literal("y"), val: z.literal(2) }),
] as const;
expect(z.discriminatedUnion("type", options).parse({ type: "x", val: 1 })).toEqual({ type: "x", val: 1 });
});
@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-jsx-dev-runtime.production.js');
} else {
module.exports = require('./cjs/react-jsx-dev-runtime.development.js');
}
@@ -0,0 +1,331 @@
// The worker half of sqlite3.pool() (lib/pool.js). One worker owns one
// connection; the pool routes whole queries here and the connection is
// driven exactly one query at a time, which is what makes cancellation
// precise (the progress-flag slot is per connection) and keeps the
// writer a serializer rather than a race.
//
// Message protocol (parent → worker):
// { kind: 'open', readOnly, readOnlyFile, walMode, busyTimeout,
// integerMode }
// { id, kind: 'query', method: 'all'|'get'|'run'|'exec', sql, params,
// cancel?: SharedArrayBuffer }
// { kind: 'close' }
// (worker → parent):
// { kind: 'ready' } | { kind: 'openError', error }
// { id, kind: 'result', value } | { id, kind: 'error', error }
// { kind: 'closed' }
//
// The 'error' payloads are plain objects, not Errors: structured clone
// drops an Error's own properties (code/errno/primaryCode — verified,
// they arrive undefined), so serializeError/deserializeError in
// lib/pool.js carry them explicitly.
import { parentPort } from 'node:worker_threads';
import sqlite3 from './sqlite3.js';
// Non-null inside a worker thread by construction; the check keeps the
// type honest if this module is ever imported outside one.
if (parentPort === null) {
throw new Error('lib/worker.js must run inside a worker thread');
}
const port = /** @type {import('node:worker_threads').MessagePort} */ (
parentPort
);
// The filename rides the 'open' message, which is handled before any
// query can arrive (queries only start after 'ready').
/** @type {string | null} */
let connectionFilename = null;
// Set once the 'open' message has been handled.
/** @type {import('./sqlite3-binding.js').Database | null} */
let db = null;
// Cancellation flag period (VM instructions between checks) — the same
// default as db.cancellationToken().
const CANCEL_PERIOD = 1000;
// How long a read may keep retrying a shared-cache table lock: the
// connection's busy timeout, since that is the waiting budget the caller
// asked for (SQLite's own busy handler never fires for SQLITE_LOCKED —
// see runWithLockRetry). Replaced by the 'open' message's value.
let lockRetryBudget = 5000;
/**
* Packs a query failure for the trip back: message, stack and the
* SQLite diagnostics the driver attaches, none of which survive
* structured clone on an Error object.
*
* @param {any} err the thrown value.
* @returns {{ name: string, message: string, stack?: string,
* code?: string, errno?: number, primaryCode?: string }} the
* serializable form.
* @private
*/
function serializeError(err) {
/** @type {{ name: string, message: string, stack?: string,
* code?: string, errno?: number, primaryCode?: string }} */
const out = {
name: typeof err?.name === 'string' ? err.name : 'Error',
message: String(err?.message ?? err),
};
if (typeof err?.stack === 'string') out.stack = err.stack;
if (typeof err?.code === 'string') out.code = err.code;
if (typeof err?.errno === 'number') out.errno = err.errno;
if (typeof err?.primaryCode === 'string') {
out.primaryCode = err.primaryCode;
}
return out;
}
/**
* Runs one query on this worker's connection.
*
* With a `cancel` buffer, the shared flag is installed as the
* connection's progress flag first: the pool serializes requests per
* connection, so the connection is idle here and the install is
* immediate (and precise — one query at a time means the slot aborts
* exactly this query). The handler is removed afterwards; a stale
* installed flag would be harmless (each request has its own buffer)
* but the removal keeps the connection clean for the next request.
*
* @param {{ id: number, method: 'all' | 'get' | 'run' | 'exec',
* sql: string, params?: unknown, cancel?: SharedArrayBuffer }} msg
* the request.
* @returns {Promise<void>} resolves once the reply is posted.
* @private
*/
async function runQuery(msg) {
const connection = /** @type {import('./sqlite3-binding.js').Database} */ (
db
);
let installed = false;
if (msg.cancel instanceof SharedArrayBuffer) {
connection._progressFlag(new Int32Array(msg.cancel), CANCEL_PERIOD);
installed = true;
}
try {
const value = await runWithLockRetry(connection, msg);
port.postMessage({ id: msg.id, kind: 'result', value });
} catch (err) {
port.postMessage({
id: msg.id,
kind: 'error',
error: serializeError(err),
});
} finally {
if (installed) connection._progressFlag();
}
}
/**
* Runs one query, retrying a **read** that lost a shared-cache table lock.
*
* In shared-cache mode (`file:…?cache=shared`, the only way pool workers
* can share an in-memory database) a reader that starts while the writer
* holds a table lock fails with `SQLITE_LOCKED_SHAREDCACHE` — and the busy
* timeout does not apply, because SQLite never calls the busy handler for
* a shared-cache table lock: `sqlite3_unlock_notify` is the mechanism
* there, and it needs a compile-time option this build does not carry. The
* lock is held only for the writer's transaction, so the useful behaviour
* is to wait and try again, which is what the caller's busy timeout budget
* means.
*
* Only `all`/`get` are retried. Re-running an `exec` script, or a `run`
* that may have been the second statement of a transaction, could repeat
* work that already landed; a read repeats nothing.
*
* @param {import('./sqlite3-binding.js').Database} connection the connection.
* @param {{ method: 'all' | 'get' | 'run' | 'exec', sql: string,
* params?: unknown, cancel?: SharedArrayBuffer }} msg the request.
* @returns {Promise<unknown>} the query's value.
* @private
*/
async function runWithLockRetry(connection, msg) {
const deadline = Date.now() + lockRetryBudget;
let delay = 1;
for (;;) {
try {
return await runOnce(connection, msg);
} catch (err) {
const locked =
/** @type {any} */ (err)?.primaryCode === 'SQLITE_LOCKED';
const readOnlyQuery = msg.method === 'all' || msg.method === 'get';
if (!locked || !readOnlyQuery || Date.now() >= deadline) throw err;
// A cancellation asked for this query to stop, not to wait.
if (
msg.cancel instanceof SharedArrayBuffer &&
Atomics.load(new Int32Array(msg.cancel), 0) !== 0
) {
throw err;
}
await new Promise((resolve) => setTimeout(resolve, delay));
if (delay < 50) delay *= 2;
}
}
}
/**
* One attempt at the request's query.
*
* @param {import('./sqlite3-binding.js').Database} connection the connection.
* @param {{ method: 'all' | 'get' | 'run' | 'exec', sql: string,
* params?: unknown }} msg the request.
* @returns {Promise<unknown>} the query's value.
* @private
*/
async function runOnce(connection, msg) {
if (msg.method === 'exec') {
await connection.exec(msg.sql);
return undefined;
}
if (msg.method === 'run') {
return await /** @type {(...args: unknown[]) => any} */ (
connection.run
)(msg.sql, msg.params);
}
// get is all + rows[0], deliberately: an all() runs its statement to
// completion, so it can never leave a cursor mid-row holding the
// connection's WAL read snapshot open (a get() that returned a row
// does, until something resets it — stale reads for every later query
// on the reader).
const rows = await /** @type {(...args: unknown[]) => any} */ (
connection.all
)(msg.sql, msg.params);
return msg.method === 'get' ? rows[0] : rows;
}
/**
* Opens the connection and applies the pool configuration.
*
* @param {{ filename: string, readOnly?: boolean, readOnlyFile?: boolean,
* walMode?: boolean, busyTimeout?: number, integerMode?: string }} msg
* the open request.
* @returns {Promise<void>} resolves once 'ready' (or 'openError') is posted.
* @private
*/
async function open(msg) {
// readOnlyFile: the filename is a URI asserting read-only access
// (mode=ro, immutable=1). The writer opens read-only too then — with
// OPEN_CREATE it would *create* a database the caller declared
// immutable, and a missing file would come back as an empty one
// instead of SQLITE_CANTOPEN.
let flags =
msg.readOnly || msg.readOnlyFile
? sqlite3.OPEN_READONLY | sqlite3.OPEN_FULLMUTEX
: sqlite3.OPEN_READWRITE |
sqlite3.OPEN_CREATE |
sqlite3.OPEN_FULLMUTEX;
// SQLite interprets a `file:` filename as a URI only with
// SQLITE_OPEN_URI, and without it treats the whole string as a
// literal path — so `pool('file:/db.sqlite?mode=ro')` used to fail
// every worker with a bare SQLITE_CANTOPEN even though pool() and
// sqlite3.open() both document the URI form. The flag is set for
// exactly the filenames that look like URIs rather than
// unconditionally: with it on, *every* filename becomes URI syntax,
// which would change the meaning of a plain path that happens to
// start with 'file:' (and widens what an untrusted filename can ask
// for). Deliberately the same rule the permission-model check in
// lib/sqlite3.js uses, so both see the same target path.
if (/^file:/i.test(/** @type {string} */ (connectionFilename))) {
flags |= sqlite3.OPEN_URI;
}
try {
db = await new Promise((resolve, reject) => {
const conn = new sqlite3.Database(
/** @type {string} */ (connectionFilename),
flags,
(err) => {
if (err) reject(err);
else resolve(conn);
},
);
});
} catch (err) {
port.postMessage({ kind: 'openError', error: serializeError(err) });
return;
}
// Narrowed for the config block below: db is assigned, not null.
const connection = /** @type {import('./sqlite3-binding.js').Database} */ (
db
);
try {
if (typeof msg.busyTimeout === 'number') {
/** @type {(...args: unknown[]) => unknown} */ (
/** @type {unknown} */ (connection.configure)
)('busyTimeout', msg.busyTimeout);
lockRetryBudget = msg.busyTimeout;
}
if (msg.integerMode !== undefined) {
/** @type {(...args: unknown[]) => unknown} */ (
/** @type {unknown} */ (connection.configure)
)('integerMode', msg.integerMode);
}
// WAL is a persistent property of the file, so only the writer
// needs to set it; readers pick it up from the file. Setting it
// from a read-only connection is refused by SQLite anyway.
if (msg.walMode && !msg.readOnly && !msg.readOnlyFile) {
const mode = await /** @type {(...args: unknown[]) => any} */ (
connection.get
)('PRAGMA journal_mode = WAL');
if (mode?.journal_mode !== 'wal') {
throw new Error(
`could not enable WAL mode (got '${mode?.journal_mode}'); ` +
'the filesystem may not support it',
);
}
}
// Long-lived connections with a stable SQL mix: the statement
// cache is the whole point of keeping workers alive.
connection.cacheStatements();
port.postMessage({ kind: 'ready' });
} catch (err) {
// A config failure (e.g. WAL on a filesystem that refuses it)
// must not leak the connection; close it before reporting.
try {
await /** @type {(...args: unknown[]) => unknown} */ (
connection.close
)();
} catch {
// The config error is the story worth telling.
}
port.postMessage({ kind: 'openError', error: serializeError(err) });
}
}
port.on('message', (/** @type {any} */ msg) => {
if (msg.kind === 'open') {
connectionFilename = msg.filename;
open(msg);
return;
}
if (msg.kind === 'query') {
runQuery(msg);
return;
}
if (msg.kind === 'close') {
if (db === null) {
// The open never completed (or failed); nothing to close.
port.postMessage({ kind: 'closed' });
port.close();
return;
}
const connection =
/** @type {import('./sqlite3-binding.js').Database} */ (db);
// A close that fails (e.g. SQLITE_BUSY from a leaked statement)
// is reported on the 'closed' message. process.exit() here would
// abort the thread from inside the native completion callback —
// a fatal napi error — so the exit is a natural one: closing the
// parent port drops the last handle once the connection (and its
// statement cache) is gone.
connection.close((err) => {
port.postMessage(
err
? { kind: 'closed', error: serializeError(err) }
: { kind: 'closed' },
);
port.close();
});
}
});
@@ -0,0 +1 @@
{"version":3,"file":"toggle-left.js","sources":["../../../src/icons/toggle-left.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ToggleLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTIiIHg9IjIiIHk9IjYiIHJ4PSI2IiByeT0iNiIgLz4KICA8Y2lyY2xlIGN4PSI4IiBjeT0iMTIiIHI9IjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/toggle-left\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 ToggleLeft = createLucideIcon('ToggleLeft', [\n ['rect', { width: '20', height: '12', x: '2', y: '6', rx: '6', ry: '6', key: 'f2vt7d' }],\n ['circle', { cx: '8', cy: '12', r: '2', key: '1nvbw3' }],\n]);\n\nexport default ToggleLeft;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CACvF,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,76 @@
/**
* @fileoverview Define the abstract class about cursors which iterate tokens.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Exports
//------------------------------------------------------------------------------
/**
* The abstract class about cursors which iterate tokens.
*
* This class has 2 abstract methods.
*
* - `current: Token | Comment | null` ... The current token.
* - `moveNext(): boolean` ... Moves this cursor to the next token. If the next token didn't exist, it returns `false`.
*
* This is similar to ES2015 Iterators.
* However, Iterators were slow (at 2017-01), so I created this class as similar to C# IEnumerable.
*
* There are the following known sub classes.
*
* - ForwardTokenCursor .......... The cursor which iterates tokens only.
* - BackwardTokenCursor ......... The cursor which iterates tokens only in reverse.
* - ForwardTokenCommentCursor ... The cursor which iterates tokens and comments.
* - BackwardTokenCommentCursor .. The cursor which iterates tokens and comments in reverse.
* - DecorativeCursor
* - FilterCursor ............ The cursor which ignores the specified tokens.
* - SkipCursor .............. The cursor which ignores the first few tokens.
* - LimitCursor ............. The cursor which limits the count of tokens.
*
*/
module.exports = class Cursor {
/**
* Initializes this cursor.
*/
constructor() {
this.current = null;
}
/**
* Gets the first token.
* This consumes this cursor.
* @returns {Token|Comment} The first token or null.
*/
getOneToken() {
return this.moveNext() ? this.current : null;
}
/**
* Gets the first tokens.
* This consumes this cursor.
* @returns {(Token|Comment)[]} All tokens.
*/
getAllTokens() {
const tokens = [];
while (this.moveNext()) {
tokens.push(this.current);
}
return tokens;
}
/**
* Moves this cursor to the next token.
* @returns {boolean} `true` if the next token exists.
* @abstract
*/
/* c8 ignore next */
// eslint-disable-next-line class-methods-use-this -- Unused
moveNext() {
throw new Error("Not implemented.");
}
};
@@ -0,0 +1 @@
{"version":3,"file":"Asset.cjs","names":[],"sources":["../../src/Asset.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { isServer } from '@tanstack/router-core/isServer'\nimport { useRouter } from './useRouter'\nimport { useHydrated } from './ClientOnly'\nimport type { RouterManagedTag } from '@tanstack/router-core'\n\nconst INLINE_CSS_HYDRATION_ATTR = 'data-tsr-inline-css'\n\ninterface ScriptAttrs {\n [key: string]: string | boolean | undefined\n src?: string\n suppressHydrationWarning?: boolean\n}\n\nexport function Asset(\n asset: RouterManagedTag & { nonce?: string },\n): React.ReactElement | null {\n const { attrs, children, nonce } = asset\n\n switch (asset.tag) {\n case 'title':\n return (\n <title {...attrs} suppressHydrationWarning>\n {children}\n </title>\n )\n case 'meta':\n return <meta {...attrs} suppressHydrationWarning />\n case 'link':\n return (\n <link\n {...attrs}\n precedence={\n attrs?.precedence ??\n (attrs?.rel === 'stylesheet' ? 'default' : undefined)\n }\n nonce={nonce}\n suppressHydrationWarning\n />\n )\n case 'style':\n if (\n asset.inlineCss &&\n (process.env.TSS_INLINE_CSS_ENABLED === 'true' ||\n (process.env.TSS_INLINE_CSS_ENABLED === undefined && isServer))\n ) {\n return (\n <InlineCssStyle attrs={attrs} nonce={nonce}>\n {children}\n </InlineCssStyle>\n )\n }\n\n return (\n <style\n {...attrs}\n dangerouslySetInnerHTML={{ __html: children as string }}\n nonce={nonce}\n />\n )\n case 'script':\n return <Script attrs={attrs}>{children}</Script>\n default:\n return null\n }\n}\n\nfunction InlineCssStyle({\n attrs,\n children,\n nonce,\n}: {\n attrs?: Record<string, any>\n children?: RouterManagedTag['children']\n nonce?: string\n}) {\n const isInlineCssPlaceholder = children === undefined\n const [hydratedInlineCss] = React.useState(() => {\n if (!isInlineCssPlaceholder || typeof document === 'undefined') {\n return undefined\n }\n\n return (\n document.querySelector<HTMLStyleElement>(\n `style[${INLINE_CSS_HYDRATION_ATTR}]`,\n )?.textContent ?? undefined\n )\n })\n const html = isInlineCssPlaceholder\n ? (hydratedInlineCss ?? '')\n : (children ?? '')\n\n return (\n <style\n {...attrs}\n {...{ [INLINE_CSS_HYDRATION_ATTR]: '' }}\n dangerouslySetInnerHTML={{ __html: html }}\n nonce={nonce}\n suppressHydrationWarning\n />\n )\n}\n\nfunction Script({\n attrs,\n children,\n}: {\n attrs?: ScriptAttrs\n children?: string\n}) {\n const router = useRouter()\n const hydrated = useHydrated()\n const dataScript =\n typeof attrs?.type === 'string' &&\n attrs.type !== '' &&\n attrs.type !== 'text/javascript' &&\n attrs.type !== 'module'\n\n if (\n process.env.NODE_ENV !== 'production' &&\n attrs?.src &&\n typeof children === 'string' &&\n children.trim().length\n ) {\n console.warn(\n '[TanStack Router] <Script> received both `src` and `children`. The `children` content will be ignored. Remove `children` or remove `src`.',\n )\n }\n\n React.useEffect(() => {\n if (dataScript) return\n\n if (attrs?.src) {\n const normSrc = (() => {\n try {\n const base = document.baseURI || window.location.href\n return new URL(attrs.src, base).href\n } catch {\n return attrs.src\n }\n })()\n const existingScript = Array.from(\n document.querySelectorAll('script[src]'),\n ).find((el) => (el as HTMLScriptElement).src === normSrc)\n\n if (existingScript) {\n return\n }\n\n const script = document.createElement('script')\n\n for (const [key, value] of Object.entries(attrs)) {\n if (\n key !== 'suppressHydrationWarning' &&\n value !== undefined &&\n value !== false\n ) {\n script.setAttribute(\n key,\n typeof value === 'boolean' ? '' : String(value),\n )\n }\n }\n\n document.head.appendChild(script)\n\n return () => {\n if (script.parentNode) {\n script.parentNode.removeChild(script)\n }\n }\n }\n\n if (typeof children === 'string') {\n const typeAttr =\n typeof attrs?.type === 'string' ? attrs.type : 'text/javascript'\n const nonceAttr =\n typeof attrs?.nonce === 'string' ? attrs.nonce : undefined\n const existingScript = Array.from(\n document.querySelectorAll('script:not([src])'),\n ).find((el) => {\n if (!(el instanceof HTMLScriptElement)) return false\n const sType = el.getAttribute('type') ?? 'text/javascript'\n const sNonce = el.getAttribute('nonce') ?? unLine truncated
@@ -0,0 +1,2 @@
import * as ts from 'typescript';
export declare function checkModifiers(node: ts.Node): void;
@@ -0,0 +1 @@
{"version":3,"file":"app-window-mac.js","sources":["../../../src/icons/app-window-mac.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AppWindowMac\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHg9IjIiIHk9IjQiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik02IDhoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xMCA4aC4wMSIgLz4KICA8cGF0aCBkPSJNMTQgOGguMDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/app-window-mac\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 AppWindowMac = createLucideIcon('AppWindowMac', [\n ['rect', { width: '20', height: '16', x: '2', y: '4', rx: '2', key: '18n3k1' }],\n ['path', { d: 'M6 8h.01', key: 'x9i8wu' }],\n ['path', { d: 'M10 8h.01', key: '1r9ogq' }],\n ['path', { d: 'M14 8h.01', key: '1primd' }],\n]);\n\nexport default AppWindowMac;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,4 @@
exports.getModuleName = () => require("@babel/helper-module-transforms").getModuleName;
0 && 0;
//# sourceMappingURL=babel-7-helpers.cjs.map
@@ -0,0 +1,44 @@
import { warning } from 'motion-utils';
import { isGenerator } from '../generators/utils/is-generator.mjs';
import { isAnimatable } from './is-animatable.mjs';
function hasKeyframesChanged(keyframes) {
const current = keyframes[0];
if (keyframes.length === 1)
return true;
for (let i = 0; i < keyframes.length; i++) {
if (keyframes[i] !== current)
return true;
}
}
function canAnimate(keyframes, name, type, velocity) {
/**
* Check if we're able to animate between the start and end keyframes,
* and throw a warning if we're attempting to animate between one that's
* animatable and another that isn't.
*/
const originKeyframe = keyframes[0];
if (originKeyframe === null) {
return false;
}
/**
* These aren't traditionally animatable but we do support them.
* In future we could look into making this more generic or replacing
* this function with mix() === mixImmediate
*/
if (name === "display" || name === "visibility")
return true;
const targetKeyframe = keyframes[keyframes.length - 1];
const isOriginAnimatable = isAnimatable(originKeyframe, name);
const isTargetAnimatable = isAnimatable(targetKeyframe, name);
warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". "${isOriginAnimatable ? targetKeyframe : originKeyframe}" is not an animatable value.`, "value-not-animatable");
// Always skip if any of these are true
if (!isOriginAnimatable || !isTargetAnimatable) {
return false;
}
return (hasKeyframesChanged(keyframes) ||
((type === "spring" || isGenerator(type)) && velocity));
}
export { canAnimate };
//# sourceMappingURL=can-animate.mjs.map
@@ -0,0 +1,52 @@
import type { ScopeManager } from '@typescript-eslint/scope-manager';
import type { TSESTree } from '@typescript-eslint/utils';
import type { ClassNode, Key, MemberNode } from './types';
export declare class Member {
/**
* The node that declares this member
*/
readonly node: MemberNode;
/**
* The resolved, unique key for this member.
*/
readonly key: Key;
/**
* The member name, as given in the source code.
*/
readonly name: string;
/**
* The node that represents the member name in the source code.
* Used for reporting errors.
*/
readonly nameNode: TSESTree.Node;
/**
* The number of writes to this member.
*/
writeCount: number;
/**
* The number of reads from this member.
*/
readCount: number;
private constructor();
static create(node: MemberNode): Member | null;
isAccessor(): boolean;
isHashPrivate(): boolean;
isPrivate(): boolean;
isStatic(): boolean;
isUsed(): boolean;
}
export interface ClassScopeResult {
/**
* The classes name as given in the source code.
* If this is `null` then the class is an anonymous class.
*/
readonly className: string | null;
/**
* The class's members, keyed by their name
*/
readonly members: {
readonly instance: Map<Key, Member>;
readonly static: Map<Key, Member>;
};
}
export declare function analyzeClassMemberUsage(program: TSESTree.Program, scopeManager: ScopeManager): ReadonlyMap<ClassNode, ClassScopeResult>;
@@ -0,0 +1,15 @@
/**
* Subtracts a specified number of hours from a date.
* 从日期中减去指定数量的小时。
*
* @param date - The date to subtract hours from. (要从日期中减去的小时数。)
* @param hours - The number of hours to subtract. (要减去的小时数。)
* @returns A new date with the subtracted hours. (减去小时后的新日期。)
* @example
* ```ts
* //Subtracting 3 hours from a date (从日期中减去3)
* subHours(new Date(2014, 6, 2, 11, 55), 3);
* //=> Thu Jul 02 2015 08:55:00
* ```
*/
export default function subHours(date: Date, hours: number): Date;
@@ -0,0 +1 @@
{"version":3,"file":"shimsWorkerd.cjs","names":["preloadSchemas"],"sources":["../src/shimsWorkerd.ts"],"sourcesContent":["/**\n * Cloudflare Workers runtime shims for client package\n *\n * This file is selected via package.json export conditions when running in workerd.\n */\nimport { preloadSchemas } from '@modelcontextprotocol/core-internal';\n\nexport { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator } from '@modelcontextprotocol/core-internal/validators/cfWorker';\n\n// Platform asymmetry: isolate platforms like workerd evaluate module scope\n// during deployment/isolate warm-up, outside any request's billed CPU, while\n// lazy construction would land inside the first request each fresh isolate\n// serves. Node and browser shims stay lazy — there, module evaluation is\n// process/page startup and boot latency is the cost that matters.\npreloadSchemas();\n\n/**\n * Whether `fetch()` may throw `TypeError` due to CORS. CORS is a browser-only concept —\n * in Cloudflare Workers, a `TypeError` from `fetch` is always a real network/configuration\n * error, never a CORS error.\n */\nexport const CORS_IS_POSSIBLE = false;\n"],"mappings":";;;;;;;;;AAcAA,4BAAgB;;;;;;AAOhB,MAAa,mBAAmB"}
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SearchX = createLucideIcon("SearchX", [
["path", { d: "m13.5 8.5-5 5", key: "1cs55j" }],
["path", { d: "m8.5 8.5 5 5", key: "a8mexj" }],
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
]);
export { SearchX as default };
//# sourceMappingURL=search-x.js.map
@@ -0,0 +1 @@
{"version":3,"file":"donut.js","sources":["../../../src/icons/donut.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Donut\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAuNSAxMGEyLjUgMi41IDAgMCAxLTIuNC0zSDE4YTIuOTUgMi45NSAwIDAgMS0yLjYtNC40IDEwIDEwIDAgMSAwIDYuMyA3LjFjLS4zLjItLjguMy0xLjIuMyIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/donut\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 Donut = createLucideIcon('Donut', [\n [\n 'path',\n {\n d: 'M20.5 10a2.5 2.5 0 0 1-2.4-3H18a2.95 2.95 0 0 1-2.6-4.4 10 10 0 1 0 6.3 7.1c-.3.2-.8.3-1.2.3',\n key: '19sr3x',\n },\n ],\n ['circle', { cx: '12', cy: '12', r: '3', key: '1v7zrd' }],\n]);\n\nexport default Donut;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,32 @@
'use strict'
const {
kConnected,
kPending,
kRunning,
kSize,
kFree,
kQueued
} = require('../core/symbols')
class ClientStats {
constructor (client) {
this.connected = client[kConnected]
this.pending = client[kPending]
this.running = client[kRunning]
this.size = client[kSize]
}
}
class PoolStats {
constructor (pool) {
this.connected = pool[kConnected]
this.free = pool[kFree]
this.pending = pool[kPending]
this.queued = pool[kQueued]
this.running = pool[kRunning]
this.size = pool[kSize]
}
}
module.exports = { ClientStats, PoolStats }
@@ -0,0 +1,149 @@
/**
* @fileoverview Rule to flag use of alert, confirm, prompt
* @author Nicholas C. Zakas
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const {
getStaticPropertyName: getPropertyName,
getVariableByName,
skipChainExpression,
} = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks if the given name is a prohibited identifier.
* @param {string} name The name to check
* @returns {boolean} Whether or not the name is prohibited.
*/
function isProhibitedIdentifier(name) {
return /^(?:alert|confirm|prompt)$/u.test(name);
}
/**
* Finds the eslint-scope reference in the given scope.
* @param {Object} scope The scope to search.
* @param {ASTNode} node The identifier node.
* @returns {Reference|null} Returns the found reference or null if none were found.
*/
function findReference(scope, node) {
const references = scope.references.filter(
reference =>
reference.identifier.range[0] === node.range[0] &&
reference.identifier.range[1] === node.range[1],
);
if (references.length === 1) {
return references[0];
}
return null;
}
/**
* Checks if the given identifier node is shadowed in the given scope.
* @param {Object} scope The current scope.
* @param {string} node The identifier node to check
* @returns {boolean} Whether or not the name is shadowed.
*/
function isShadowed(scope, node) {
const reference = findReference(scope, node);
return (
reference && reference.resolved && reference.resolved.defs.length > 0
);
}
/**
* Checks if the given identifier node is a ThisExpression in the global scope or the global window property.
* @param {Object} scope The current scope.
* @param {string} node The identifier node to check
* @returns {boolean} Whether or not the node is a reference to the global object.
*/
function isGlobalThisReferenceOrGlobalWindow(scope, node) {
if (scope.type === "global" && node.type === "ThisExpression") {
return true;
}
if (
node.type === "Identifier" &&
(node.name === "window" ||
(node.name === "globalThis" &&
getVariableByName(scope, "globalThis")))
) {
return !isShadowed(scope, node);
}
return false;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow the use of `alert`, `confirm`, and `prompt`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-alert",
},
schema: [],
messages: {
unexpected: "Unexpected {{name}}.",
},
},
create(context) {
const sourceCode = context.sourceCode;
return {
CallExpression(node) {
const callee = skipChainExpression(node.callee),
currentScope = sourceCode.getScope(node);
// without window.
if (callee.type === "Identifier") {
const name = callee.name;
if (
!isShadowed(currentScope, callee) &&
isProhibitedIdentifier(callee.name)
) {
context.report({
node,
messageId: "unexpected",
data: { name },
});
}
} else if (
callee.type === "MemberExpression" &&
isGlobalThisReferenceOrGlobalWindow(
currentScope,
callee.object,
)
) {
const name = getPropertyName(callee);
if (isProhibitedIdentifier(name)) {
context.report({
node,
messageId: "unexpected",
data: { name },
});
}
}
},
};
},
};
@@ -0,0 +1,3 @@
# hermes-estree
Flow types for the Flow-ESTree spec produced by the hermes parser