docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s

This commit is contained in:
TanTan committed 2026-11-13 09:25:58 +08:00
1 parent f954252a34
commit e311ca3275
35554 files changed
+6229626 -4

No files matched your search

@@ -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 @@
{"version":3,"file":"buildMaybeClassElementMetadataFromMaybeClassElementMetadata.js","sourceRoot":"","sources":["../../../../src/metadata/calculations/buildMaybeClassElementMetadataFromMaybeClassElementMetadata.ts"],"names":[],"mappings":";;AAQA,kIAuBC;AA/BD,8EAA2E;AAC3E,sFAAmF;AACnF,iFAA8E;AAI9E,mGAAgG;AAEhG,SAAgB,2DAA2D,CACzE,cAEmE;IAInE,OAAO,CACL,QAA+C,EACiB,EAAE;QAClE,MAAM,eAAe,GACnB,QAAQ,IAAI,IAAA,6EAAqC,GAAE,CAAC;QAEtD,QAAQ,eAAe,CAAC,IAAI,EAAE,CAAC;YAC7B,KAAK,mDAAwB,CAAC,SAAS;gBACrC,MAAM,IAAI,uCAAkB,CAC1B,+CAAsB,CAAC,0BAA0B,EACjD,6HAA6H,CAC9H,CAAC;YACJ;gBACE,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_update.cjs",
"module": "../../esm/_update.js"
}
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,eAAe,CAAC,aAAa,CAAC;AAClD","sources":["packages/@react-aria/breadcrumbs/intl/nl-NL.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Broodkruimels\"\n}\n"],"names":[],"version":3,"file":"nl-NL.module.js.map"}
@@ -0,0 +1,96 @@
'use strict';
var tape = require('tape');
var path = require('../');
var slashRE = /\//g;
var pairs = [
[__filename, '.js'],
['', ''],
['/path/to/file', ''],
['/path/to/file.ext', '.ext'],
['/path.to/file.ext', '.ext'],
['/path.to/file', ''],
['/path.to/.file', ''],
['/path.to/.file.ext', '.ext'],
['/path/to/f.ext', '.ext'],
['/path/to/..ext', '.ext'],
['/path/to/..', ''],
['file', ''],
['file.ext', '.ext'],
['.file', ''],
['.file.ext', '.ext'],
['/file', ''],
['/file.ext', '.ext'],
['/.file', ''],
['/.file.ext', '.ext'],
['.path/file.ext', '.ext'],
['file.ext.ext', '.ext'],
['file.', '.'],
['.', ''],
['./', ''],
['.file.ext', '.ext'],
['.file', ''],
['.file.', '.'],
['.file..', '.'],
['..', ''],
['../', ''],
['..file.ext', '.ext'],
['..file', '.file'],
['..file.', '.'],
['..file..', '.'],
['...', '.'],
['...ext', '.ext'],
['....', '.'],
['file.ext/', '.ext'],
['file.ext//', '.ext'],
['file/', ''],
['file//', ''],
['file./', '.'],
['file.//', '.'] ];
tape('path.posix.extname', function (t) {
pairs.forEach(function (p) {
var input = p[0];
var expected = p[1];
t.strictEqual(expected, path.posix.extname(input));
});
t.end();
});
tape('path.win32.extname', { skip: true }, function (t) {
pairs.forEach(function (p) {
var input = p[0].replace(slashRE, '\\');
var expected = p[1];
t.strictEqual(expected, path.win32.extname(input));
t.strictEqual(expected, path.win32.extname("C:" + input));
});
t.end();
});
tape('path.win32.extname backslash', { skip: true }, function (t) {
// On Windows, backslash is a path separator.
t.strictEqual(path.win32.extname('.\\'), '');
t.strictEqual(path.win32.extname('..\\'), '');
t.strictEqual(path.win32.extname('file.ext\\'), '.ext');
t.strictEqual(path.win32.extname('file.ext\\\\'), '.ext');
t.strictEqual(path.win32.extname('file\\'), '');
t.strictEqual(path.win32.extname('file\\\\'), '');
t.strictEqual(path.win32.extname('file.\\'), '.');
t.strictEqual(path.win32.extname('file.\\\\'), '.');
t.end();
});
tape('path.posix.extname backslash', function (t) {
// On *nix, backslash is a valid name component like any other character.
t.strictEqual(path.posix.extname('.\\'), '');
t.strictEqual(path.posix.extname('..\\'), '.\\');
t.strictEqual(path.posix.extname('file.ext\\'), '.ext\\');
t.strictEqual(path.posix.extname('file.ext\\\\'), '.ext\\\\');
t.strictEqual(path.posix.extname('file\\'), '');
t.strictEqual(path.posix.extname('file\\\\'), '');
t.strictEqual(path.posix.extname('file.\\'), '.\\');
t.strictEqual(path.posix.extname('file.\\\\'), '.\\\\');
t.end();
});
@@ -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,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var prebuild_file_path_1 = require("./prebuild-file-path");
var pty;
try {
pty = require(prebuild_file_path_1.ptyPath || '../build/Release/pty.node');
}
catch (outerError) {
try {
pty = require(prebuild_file_path_1.ptyPath ? '../build/Release/pty.node' : '../build/Debug/pty.node');
}
catch (innerError) {
console.error('innerError', innerError);
// Re-throw the exception from the Release require if the Debug require fails as well
throw outerError;
}
}
exports.default = pty;
//# sourceMappingURL=prebuild-loader.js.map
@@ -0,0 +1,41 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
no_cache: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TString]>>;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
group_all_shut: import("@sinclair/typebox").TNumber;
group_remark: import("@sinclair/typebox").TString;
group_id: import("@sinclair/typebox").TNumber;
group_name: import("@sinclair/typebox").TString;
member_count: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
max_member_count: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
}>>;
type ReturnType = Static<typeof ReturnSchema>;
declare class GetGroupList extends OneBotAction<PayloadType, ReturnType> {
actionName: "get_group_list";
payloadSchema: import("@sinclair/typebox").TObject<{
no_cache: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TString]>>;
}>;
returnSchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
group_all_shut: import("@sinclair/typebox").TNumber;
group_remark: import("@sinclair/typebox").TString;
group_id: import("@sinclair/typebox").TNumber;
group_name: import("@sinclair/typebox").TString;
member_count: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
max_member_count: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
}>>;
actionSummary: string;
actionDescription: string;
actionTags: string[];
payloadExample: {};
returnExample: {
group_id: number;
group_name: string;
member_count: number;
max_member_count: number;
}[];
_handle(payload: PayloadType): Promise<import("index").OB11Group[]>;
}
export default GetGroupList;
@@ -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,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,39 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {FocusableElement} from '@react-types/shared';
import {focusWithoutScrolling, getOwnerDocument, runAfterTransition} from '@react-aria/utils';
import {getInteractionModality} from '@react-aria/interactions';
/**
* A utility function that focuses an element while avoiding undesired side effects such
* as page scrolling and screen reader issues with CSS transitions.
*/
export function focusSafely(element: FocusableElement) {
// If the user is interacting with a virtual cursor, e.g. screen reader, then
// wait until after any animated transitions that are currently occurring on
// the page before shifting focus. This avoids issues with VoiceOver on iOS
// causing the page to scroll when moving focus if the element is transitioning
// from off the screen.
const ownerDocument = getOwnerDocument(element);
if (getInteractionModality() === 'virtual') {
let lastFocusedElement = ownerDocument.activeElement;
runAfterTransition(() => {
// If focus did not move and the element is still in the document, focus it.
if (ownerDocument.activeElement === lastFocusedElement && element.isConnected) {
focusWithoutScrolling(element);
}
});
} else {
focusWithoutScrolling(element);
}
}
@@ -0,0 +1,7 @@
"use client";
import {
useTabs
} from "./chunk-IUT6HU4S.mjs";
export {
useTabs
};
@@ -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,114 @@
// Copyright (c) 2016 Ryan Prichard
//
// 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.
#define STRING_BUILDER_TESTING
#include "StringBuilder.h"
#include <stdio.h>
#include <string.h>
#include <iomanip>
#include <sstream>
void display(const std::string &str) { fprintf(stderr, "%s", str.c_str()); }
void display(const std::wstring &str) { fprintf(stderr, "%ls", str.c_str()); }
#define CHECK_EQ(x, y) \
do { \
const auto xval = (x); \
const auto yval = (y); \
if (xval != yval) { \
fprintf(stderr, "error: %s:%d: %s != %s: ", \
__FILE__, __LINE__, #x, #y); \
display(xval); \
fprintf(stderr, " != "); \
display(yval); \
fprintf(stderr, "\n"); \
} \
} while(0)
template <typename C, typename I>
std::basic_string<C> decOfIntSS(const I value) {
// std::to_string and std::to_wstring are missing in Cygwin as of this
// writing (early 2016).
std::basic_stringstream<C> ss;
ss << +value; // We must promote char to print it as an integer.
return ss.str();
}
template <typename C, bool leadingZeros=false, typename I>
std::basic_string<C> hexOfIntSS(const I value) {
typedef typename std::make_unsigned<I>::type U;
const unsigned long long u64Value = value & static_cast<U>(~0);
std::basic_stringstream<C> ss;
if (leadingZeros) {
ss << std::setfill(static_cast<C>('0')) << std::setw(sizeof(I) * 2);
}
ss << std::hex << u64Value;
return ss.str();
}
template <typename I>
void testValue(I value) {
CHECK_EQ(decOfInt(value).str(), (decOfIntSS<char>(value)));
CHECK_EQ(wdecOfInt(value).str(), (decOfIntSS<wchar_t>(value)));
CHECK_EQ((hexOfInt<false>(value).str()), (hexOfIntSS<char, false>(value)));
CHECK_EQ((hexOfInt<true>(value).str()), (hexOfIntSS<char, true>(value)));
CHECK_EQ((whexOfInt<false>(value).str()), (hexOfIntSS<wchar_t, false>(value)));
CHECK_EQ((whexOfInt<true>(value).str()), (hexOfIntSS<wchar_t, true>(value)));
}
template <typename I>
void testType() {
typedef typename std::make_unsigned<I>::type U;
const U quarter = static_cast<U>(1) << (sizeof(U) * 8 - 2);
for (unsigned quarterIndex = 0; quarterIndex < 4; ++quarterIndex) {
for (int offset = -18; offset <= 18; ++offset) {
const I value = quarter * quarterIndex + static_cast<U>(offset);
testValue(value);
}
}
testValue(static_cast<I>(42));
testValue(static_cast<I>(123456));
testValue(static_cast<I>(0xdeadfacecafebeefull));
}
int main() {
testType<char>();
testType<signed char>();
testType<signed short>();
testType<signed int>();
testType<signed long>();
testType<signed long long>();
testType<unsigned char>();
testType<unsigned short>();
testType<unsigned int>();
testType<unsigned long>();
testType<unsigned long long>();
StringBuilder() << static_cast<const void*>("TEST");
WStringBuilder() << static_cast<const void*>("TEST");
fprintf(stderr, "All tests completed!\n");
}
@@ -0,0 +1,36 @@
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description: "disallow the `Set.prototype.intersection` method.",
category: "ES2025",
proposal: "set-methods",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-set-prototype-intersection.html",
},
fixable: null,
messages: {
forbidden: "ES2025 '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
Set: ["intersection"],
})
},
}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AA6BM,SAAS,0CAA2C,KAA+B;QACd;IAA1E,IAAI,CAAC,aAAa,eAAe,GAAG,CAAA,GAAA,2CAAiB,EAAE,MAAM,WAAW,EAAE,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B,MAAM,MAAM,iBAAiB;IACnI,IAAI,eAAe,CAAA,GAAA,oBAAM,EAAE,IAAM,eAAe,OAAO;YAAC;SAAY,GAAG,EAAE,EAAE;QAAC;KAAY;IACxF,IAAI,cAAC,UAAU,gBAAE,YAAY,oBAAE,gBAAgB,EAAC,GAAG,CAAA,GAAA,sCAAW,EAAE;QAC9D,GAAG,KAAK;QACR,eAAe;QACf,wBAAwB;QACxB,+BAA+B;sBAC/B;QACA,mBAAmB,CAAC;YAClB,uCAAuC;YACvC,IAAI,SAAS,OACX;gBAEQ;YAAV,IAAI,MAAM,CAAA,0BAAA,KAAK,MAAM,GAAG,IAAI,GAAG,KAAK,cAA1B,qCAAA,0BAA8B;YAExC,6DAA6D;YAC7D,oDAAoD;YACpD,IAAI,QAAQ,eAAe,MAAM,iBAAiB,EAChD,MAAM,iBAAiB,CAAC;YAG1B,eAAe;QACjB;IACF;IAEA,IAAI,eAAe,eAAe,OAC9B,WAAW,OAAO,CAAC,eACnB;IAEJ,OAAO;oBACL;sBACA;0BACA;qBACA;wBACA;sBACA;IACF;AACF","sources":["packages/@react-stately/list/src/useSingleSelectListState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CollectionStateBase, Key, Node, Selection, SingleSelection} from '@react-types/shared';\nimport {ListState, useListState} from './useListState';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo} from 'react';\n\nexport interface SingleSelectListProps<T> extends CollectionStateBase<T>, Omit<SingleSelection, 'disallowEmptySelection'> {\n /** Filter function to generate a filtered list of nodes. */\n filter?: (nodes: Iterable<Node<T>>) => Iterable<Node<T>>,\n /** @private */\n suppressTextValueWarning?: boolean\n}\n\nexport interface SingleSelectListState<T> extends ListState<T> {\n /** The key for the currently selected item. */\n readonly selectedKey: Key | null,\n\n /** Sets the selected key. */\n setSelectedKey(key: Key | null): void,\n\n /** The value of the currently selected item. */\n readonly selectedItem: Node<T> | null\n}\n\n/**\n * Provides state management for list-like components with single selection.\n * Handles building a collection of items from props, and manages selection state.\n */\nexport function useSingleSelectListState<T extends object>(props: SingleSelectListProps<T>): SingleSelectListState<T> {\n let [selectedKey, setSelectedKey] = useControlledState(props.selectedKey, props.defaultSelectedKey ?? null, props.onSelectionChange);\n let selectedKeys = useMemo(() => selectedKey != null ? [selectedKey] : [], [selectedKey]);\n let {collection, disabledKeys, selectionManager} = useListState({\n ...props,\n selectionMode: 'single',\n disallowEmptySelection: true,\n allowDuplicateSelectionEvents: true,\n selectedKeys,\n onSelectionChange: (keys: Selection) => {\n // impossible, but TS doesn't know that\n if (keys === 'all') {\n return;\n }\n let key = keys.values().next().value ?? null;\n\n // Always fire onSelectionChange, even if the key is the same\n // as the current key (useControlledState does not).\n if (key === selectedKey && props.onSelectionChange) {\n props.onSelectionChange(key);\n }\n\n setSelectedKey(key);\n }\n });\n\n let selectedItem = selectedKey != null\n ? collection.getItem(selectedKey)\n : null;\n\n return {\n collection,\n disabledKeys,\n selectionManager,\n selectedKey,\n setSelectedKey,\n selectedItem\n };\n}\n"],"names":[],"version":3,"file":"useSingleSelectListState.main.js.map"}
@@ -0,0 +1,21 @@
/**
* A specialized version of `_.forEachRight` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEachRight(array, iteratee) {
var length = array == null ? 0 : array.length;
while (length--) {
if (iteratee(array[length], length, array) === false) {
break;
}
}
return array;
}
export default arrayEachRight;
@@ -0,0 +1,296 @@
import { checkSync } from "recheck";
import { expect, test } from "vitest";
import * as z from "zod/v4";
test("basic datetime parsing", () => {
const datetime = z.string().datetime();
datetime.parse("1970-01-01T00:00:00.000Z");
datetime.parse("2022-10-13T09:52:31.816Z");
datetime.parse("2022-10-13T09:52:31.8162314Z");
datetime.parse("1970-01-01T00:00:00Z");
datetime.parse("2022-10-13T09:52:31Z");
expect(() => datetime.parse("")).toThrow();
expect(() => datetime.parse("foo")).toThrow();
expect(() => datetime.parse("2020-10-14")).toThrow();
expect(() => datetime.parse("T18:45:12.123")).toThrow();
expect(() => datetime.parse("2020-10-14T17:42:29+00:00")).toThrow();
});
test("datetime parsing with precision -1", () => {
const datetimeNoMs = z.string().datetime({ precision: -1, offset: true, local: true });
datetimeNoMs.parse("1970-01-01T00:00Z");
datetimeNoMs.parse("2022-10-13T09:52Z");
datetimeNoMs.parse("2022-10-13T09:52+02:00");
datetimeNoMs.parse("2022-10-13T09:52");
expect(() => datetimeNoMs.parse("tuna")).toThrow();
expect(() => datetimeNoMs.parse("2022-10-13T09:52+02")).toThrow();
expect(() => datetimeNoMs.parse("1970-01-01T00:00:00.000Z")).toThrow();
expect(() => datetimeNoMs.parse("1970-01-01T00:00:00.Z")).toThrow();
expect(() => datetimeNoMs.parse("2022-10-13T09:52:31.816Z")).toThrow();
});
test("datetime parsing with precision 0", () => {
const datetimeNoMs = z.string().datetime({ precision: 0 });
datetimeNoMs.parse("1970-01-01T00:00:00Z");
datetimeNoMs.parse("2022-10-13T09:52:31Z");
expect(() => datetimeNoMs.parse("tuna")).toThrow();
expect(() => datetimeNoMs.parse("1970-01-01T00:00:00.000Z")).toThrow();
expect(() => datetimeNoMs.parse("1970-01-01T00:00:00.Z")).toThrow();
expect(() => datetimeNoMs.parse("2022-10-13T09:52:31.816Z")).toThrow();
});
test("datetime parsing with precision 3", () => {
const datetime3Ms = z.string().datetime({ precision: 3 });
datetime3Ms.parse("1970-01-01T00:00:00.000Z");
datetime3Ms.parse("2022-10-13T09:52:31.123Z");
expect(() => datetime3Ms.parse("tuna")).toThrow();
expect(() => datetime3Ms.parse("1970-01-01T00:00:00.1Z")).toThrow();
expect(() => datetime3Ms.parse("1970-01-01T00:00:00.12Z")).toThrow();
expect(() => datetime3Ms.parse("2022-10-13T09:52:31Z")).toThrow();
});
test("datetime parsing with offset", () => {
const datetimeOffset = z.string().datetime({ offset: true });
datetimeOffset.parse("1970-01-01T00:00:00.000Z");
datetimeOffset.parse("2022-10-13T09:52:31.816234134Z");
datetimeOffset.parse("1970-01-01T00:00:00Z");
datetimeOffset.parse("2022-10-13T09:52:31.4Z");
datetimeOffset.parse("2020-10-14T17:42:29+00:00");
datetimeOffset.parse("2020-10-14T17:42:29+03:15");
expect(() => datetimeOffset.parse("2020-10-14T17:42:29+0315")).toThrow();
expect(() => datetimeOffset.parse("2020-10-14T17:42:29+03")).toThrow();
expect(() => datetimeOffset.parse("tuna")).toThrow();
expect(() => datetimeOffset.parse("2022-10-13T09:52:31.Z")).toThrow();
});
test("datetime parsing with offset and precision 0", () => {
const datetimeOffsetNoMs = z.string().datetime({ offset: true, precision: 0 });
datetimeOffsetNoMs.parse("1970-01-01T00:00:00Z");
datetimeOffsetNoMs.parse("2022-10-13T09:52:31Z");
datetimeOffsetNoMs.parse("2020-10-14T17:42:29+00:00");
expect(() => datetimeOffsetNoMs.parse("2020-10-14T17:42:29+0000")).toThrow();
expect(() => datetimeOffsetNoMs.parse("2020-10-14T17:42:29+00")).toThrow();
expect(() => datetimeOffsetNoMs.parse("tuna")).toThrow();
expect(() => datetimeOffsetNoMs.parse("1970-01-01T00:00:00.000Z")).toThrow();
expect(() => datetimeOffsetNoMs.parse("1970-01-01T00:00:00.Z")).toThrow();
expect(() => datetimeOffsetNoMs.parse("2022-10-13T09:52:31.816Z")).toThrow();
expect(() => datetimeOffsetNoMs.parse("2020-10-14T17:42:29.124+00:00")).toThrow();
});
test("datetime parsing with offset and precision 4", () => {
const datetimeOffset4Ms = z.string().datetime({ offset: true, precision: 4 });
datetimeOffset4Ms.parse("1970-01-01T00:00:00.1234Z");
datetimeOffset4Ms.parse("2020-10-14T17:42:29.1234+00:00");
expect(() => datetimeOffset4Ms.parse("2020-10-14T17:42:29.1234+0000")).toThrow();
expect(() => datetimeOffset4Ms.parse("2020-10-14T17:42:29.1234+00")).toThrow();
expect(() => datetimeOffset4Ms.parse("tuna")).toThrow();
expect(() => datetimeOffset4Ms.parse("1970-01-01T00:00:00.123Z")).toThrow();
expect(() => datetimeOffset4Ms.parse("2020-10-14T17:42:29.124+00:00")).toThrow();
});
test("datetime offset normalization", () => {
const a = z.iso.datetime({ offset: true });
expect(a.safeParse("2020-10-14T17:42:29+02")).toMatchObject({ success: false });
expect(a.safeParse("2020-10-14T17:42:29+0200")).toMatchObject({ success: false });
a.safeParse("2020-10-14T17:42:29+02:00");
});
test("datetime parsing with local option", () => {
const a = z.string().datetime({ local: true });
expect(a.safeParse("1970-01-01T00:00")).toMatchObject({ success: true });
expect(a.safeParse("1970-01-01T00:00:00")).toMatchObject({ success: true });
expect(a.safeParse("2022-10-13T09:52:31.816")).toMatchObject({ success: true });
expect(a.safeParse("1970-01-01T00:00:00.000")).toMatchObject({ success: true });
expect(a.safeParse("1970-01-01T00")).toMatchObject({ success: false });
// Should reject timezone indicators and invalid formats
expect(() => a.parse("2022-10-13T09:52:31+00:00")).toThrow();
expect(() => a.parse("2022-10-13 09:52:31")).toThrow();
expect(() => a.parse("2022-10-13T24:52:31")).toThrow();
expect(() => a.parse("2022-10-13T24:52")).toThrow();
expect(() => a.parse("2022-10-13T24:52Z")).toThrow();
});
test("datetime parsing with local and offset", () => {
const a = z.string().datetime({ local: true, offset: true });
// expect(a.parse("2022-10-13T12:52")).toEqual("2022-10-13T12:52:00");
a.parse("2022-10-13T12:52:00");
a.parse("2022-10-13T12:52:00Z");
a.parse("2022-10-13T12:52Z");
a.parse("2022-10-13T12:52");
a.parse("2022-10-13T12:52+02:00");
expect(() => a.parse("2022-10-13T12:52:00+02")).toThrow();
// expect(() => a.parse("2022-10-13T12:52Z")).toThrow();
// expect(() => a.parse("2022-10-13T12:52+02:00")).toThrow();
});
test("date parsing", () => {
const date = z.string().date();
date.parse("1970-01-01");
date.parse("2022-01-31");
date.parse("2022-03-31");
date.parse("2022-04-30");
date.parse("2022-05-31");
date.parse("2022-06-30");
date.parse("2022-07-31");
date.parse("2022-08-31");
date.parse("2022-09-30");
date.parse("2022-10-31");
date.parse("2022-11-30");
date.parse("2022-12-31");
date.parse("2000-02-29");
date.parse("2400-02-29");
expect(() => date.parse("2022-02-29")).toThrow();
expect(() => date.parse("2100-02-29")).toThrow();
expect(() => date.parse("2200-02-29")).toThrow();
expect(() => date.parse("2300-02-29")).toThrow();
expect(() => date.parse("2500-02-29")).toThrow();
expect(() => date.parse("")).toThrow();
expect(() => date.parse("foo")).toThrow();
expect(() => date.parse("200-01-01")).toThrow();
expect(() => date.parse("20000-01-01")).toThrow();
expect(() => date.parse("2000-0-01")).toThrow();
expect(() => date.parse("2000-011-01")).toThrow();
expect(() => date.parse("2000-01-0")).toThrow();
expect(() => date.parse("2000-01-011")).toThrow();
expect(() => date.parse("2000/01/01")).toThrow();
expect(() => date.parse("01-01-2022")).toThrow();
expect(() => date.parse("01/01/2022")).toThrow();
expect(() => date.parse("2000-01-01 00:00:00Z")).toThrow();
expect(() => date.parse("2020-10-14T17:42:29+00:00")).toThrow();
expect(() => date.parse("2020-10-14T17:42:29Z")).toThrow();
expect(() => date.parse("2020-10-14T17:42:29")).toThrow();
expect(() => date.parse("2020-10-14T17:42:29.123Z")).toThrow();
expect(() => date.parse("2000-00-12")).toThrow();
expect(() => date.parse("2000-12-00")).toThrow();
expect(() => date.parse("2000-01-32")).toThrow();
expect(() => date.parse("2000-13-01")).toThrow();
expect(() => date.parse("2000-21-01")).toThrow();
expect(() => date.parse("2000-02-30")).toThrow();
expect(() => date.parse("2000-02-31")).toThrow();
expect(() => date.parse("2000-04-31")).toThrow();
expect(() => date.parse("2000-06-31")).toThrow();
expect(() => date.parse("2000-09-31")).toThrow();
expect(() => date.parse("2000-11-31")).toThrow();
});
test("time parsing", () => {
const time = z.string().time();
time.parse("00:00:00");
time.parse("23:00:00");
time.parse("00:59:00");
time.parse("00:00:59");
time.parse("23:59:59");
time.parse("09:52:31");
time.parse("23:59:59.9999999");
time.parse("00:00");
expect(() => time.parse("")).toThrow();
expect(() => time.parse("foo")).toThrow();
expect(() => time.parse("00:00:00Z")).toThrow();
expect(() => time.parse("0:00:00")).toThrow();
expect(() => time.parse("00:0:00")).toThrow();
expect(() => time.parse("00:00:0")).toThrow();
expect(() => time.parse("00:00:00.000+00:00")).toThrow();
expect(() => time.parse("24:00:00")).toThrow();
expect(() => time.parse("00:60:00")).toThrow();
expect(() => time.parse("00:00:60")).toThrow();
expect(() => time.parse("24:60:60")).toThrow();
const time2 = z.string().time({ precision: 2 });
time2.parse("00:00:00.00");
time2.parse("09:52:31.12");
time2.parse("23:59:59.99");
expect(() => time2.parse("")).toThrow();
expect(() => time2.parse("foo")).toThrow();
expect(() => time2.parse("00:00:00")).toThrow();
expect(() => time2.parse("00:00:00.00Z")).toThrow();
expect(() => time2.parse("00:00:00.0")).toThrow();
expect(() => time2.parse("00:00:00.000")).toThrow();
expect(() => time2.parse("00:00:00.00+00:00")).toThrow();
const time3 = z.string().time({ precision: z.TimePrecision.Minute });
time3.parse("00:00");
expect(() => time3.parse("00:00:00")).toThrow();
});
test("duration", () => {
const duration = z.string().duration();
const validDurations = [
"P3Y6M4DT12H30M5S",
"P2Y9M3DT12H31M8.001S",
// "+P3Y6M4DT12H30M5S",
// "-PT0.001S",
// "+PT0.001S",
"PT0,001S",
"PT12H30M5S",
// "-P2M1D",
// "P-2M-1D",
// "-P5DT10H",
// "P-5DT-10H",
"P1Y",
"P2MT30M",
"PT6H",
"P5W",
// "P0.5Y",
// "P0,5Y",
// "P42YT7.004M",
];
const invalidDurations = [
"foo bar",
"",
" ",
"P",
"PT",
"P1Y2MT",
"T1H",
"P0.5Y1D",
"P0,5Y6M",
"P1YT",
"P-2M-1D",
"P-5DT-10H",
"P1W2D",
"-P1D",
];
for (const val of validDurations) {
const result = duration.safeParse(val);
if (!result.success) {
throw Error(`Valid duration could not be parsed: ${val}`);
}
}
for (const val of invalidDurations) {
const result = duration.safeParse(val);
if (result.success) {
throw Error(`Invalid duration was successful parsed: ${val}`);
}
expect(result.error.issues[0].message).toEqual("Invalid ISO duration");
}
});
test("redos checker", () => {
const a = z.iso.datetime();
const b = z.string().datetime({ offset: true });
const c = z.string().datetime({ local: true });
const d = z.string().datetime({ local: true, offset: true, precision: 3 });
const e = z.string().date();
const f = z.string().time();
const g = z.string().duration();
for (const schema of [a, b, c, d, e, f, g]) {
const result = checkSync(schema._zod.pattern.source, "");
if (result.status !== "safe") throw Error("ReDoS issue");
}
});
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"K D E F A B","2":"wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","16":"J ZB K D E F A B C L M"},E:{"1":"K D E F A B C L M G 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","16":"J ZB 2C ZC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JD OC","2":"F FD GD HD ID","16":"B NC uC"},G:{"1":"E LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC"},H:{"2":"hD"},I:{"1":"J I lD vC mD nD","2":"iD jD kD","16":"TC"},J:{"1":"D A"},K:{"1":"C H OC","2":"A","16":"B NC uC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","2":"1D"}},B:5,C:"focusin & focusout events",D:true};
@@ -0,0 +1,34 @@
/*
* Copyright 2024 Adobe. All rights reserved.
* This file is licensed to you 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import React, {createContext, ReactNode, useContext} from 'react';
export interface PortalProviderProps {
/* Should return the element where we should portal to. Can clear the context by passing null. */
getContainer?: () => HTMLElement | null
}
export const PortalContext = createContext<PortalProviderProps>({});
export function UNSTABLE_PortalProvider(props: PortalProviderProps & {children: ReactNode}) {
let {getContainer} = props;
let {getContainer: ctxGetContainer} = useUNSTABLE_PortalContext();
return (
<PortalContext.Provider value={{getContainer: getContainer === null ? undefined : getContainer ?? ctxGetContainer}}>
{props.children}
</PortalContext.Provider>
);
}
export function useUNSTABLE_PortalContext() {
return useContext(PortalContext) ?? {};
}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=getDefaultPendingClassMetadataCount.spec.d.ts.map
@@ -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,4 @@
import type { DependencyList, EffectCallback } from 'react';
import type { BasicTarget } from './domTarget';
declare const useDeepCompareEffectWithTarget: (effect: EffectCallback, deps: DependencyList, target: BasicTarget<any> | BasicTarget<any>[]) => void;
export default useDeepCompareEffectWithTarget;
@@ -0,0 +1,62 @@
import { ImgHTMLAttributes } from 'react';
/**
* Part of this code is taken from @chakra-ui/react package ❤️
*/
type NativeImageProps = ImgHTMLAttributes<HTMLImageElement>;
interface UseImageProps {
/**
* The image `src` attribute
*/
src?: string;
/**
* The image `srcset` attribute
*/
srcSet?: string;
/**
* The image `sizes` attribute
*/
sizes?: string;
/**
* A callback for when the image `src` has been loaded
*/
onLoad?: NativeImageProps["onLoad"];
/**
* A callback for when there was an error loading the image `src`
*/
onError?: NativeImageProps["onError"];
/**
* If `true`, opt out of the `fallbackSrc` logic and use as `img`
*/
ignoreFallback?: boolean;
/**
* The key used to set the crossOrigin on the HTMLImageElement into which the image will be loaded.
* This tells the browser to request cross-origin access when trying to download the image data.
*/
crossOrigin?: NativeImageProps["crossOrigin"];
loading?: NativeImageProps["loading"];
}
type Status = "loading" | "failed" | "pending" | "loaded";
type FallbackStrategy = "onError" | "beforeLoadOrError";
/**
* React hook that loads an image in the browser,
* and lets us know the `status` so we can show image
* fallback if it is still `pending`
*
* @returns the status of the image loading progress
*
* @example
*
* ```jsx
* function App(){
* const status = useImage({ src: "image.png" })
* return status === "loaded" ? <img src="image.png" /> : <Placeholder />
* }
* ```
*/
declare function useImage(props?: UseImageProps): Status;
declare const shouldShowFallbackImage: (status: Status, fallbackStrategy: FallbackStrategy) => boolean;
type UseImageReturn = ReturnType<typeof useImage>;
export { FallbackStrategy, UseImageProps, UseImageReturn, shouldShowFallbackImage, useImage };
@@ -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,16 @@
import { GeneralNames, CertificateSerialNumber, UniqueIdentifier } from "@peculiar/asn1-x509";
/**
* ```asn1
* IssuerSerial ::= SEQUENCE {
* issuer GeneralNames,
* serial CertificateSerialNumber,
* issuerUID UniqueIdentifier OPTIONAL
* }
* ```
*/
export declare class IssuerSerial {
issuer: GeneralNames;
serial: CertificateSerialNumber;
issuerUID: UniqueIdentifier;
constructor(params?: Partial<IssuerSerial>);
}
@@ -0,0 +1,43 @@
'use strict';
var name = require('fn.name');
/**
* Wrap callbacks to prevent double execution.
*
* @param {Function} fn Function that should only be called once.
* @returns {Function} A async wrapped callback which prevents multiple executions.
* @public
*/
module.exports = function one(fn) {
var called = 0
, value;
/**
* The function that prevents double execution.
*
* @async
* @public
*/
async function onetime() {
if (called) return value;
called = 1;
value = await fn.apply(this, arguments);
fn = null;
return value;
}
//
// To make debugging more easy we want to use the name of the supplied
// function. So when you look at the functions that are assigned to event
// listeners you don't see a load of `onetime` functions but actually the
// names of the functions that this module will call.
//
// NOTE: We cannot override the `name` property, as that is `readOnly`
// property, so displayName will have to do.
//
onetime.displayName = name(fn);
return onetime;
};
@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var articleRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-posinset': null,
'aria-setsize': null
},
relatedConcepts: [{
concept: {
name: 'article'
},
module: 'HTML'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'document']]
};
var _default = exports.default = articleRole;
@@ -0,0 +1,58 @@
var $cd94b4896dd97759$exports = require("./useOverlayPosition.main.js");
var $82711f9cb668ecdb$exports = require("./useOverlay.main.js");
var $b4878eb6316f670a$exports = require("./useOverlayTrigger.main.js");
var $5c2f5cd01815d369$exports = require("./usePreventScroll.main.js");
var $0775ea8ea6a0565e$exports = require("./useModal.main.js");
var $f69bb3e6457495cc$exports = require("./DismissButton.main.js");
var $08ef1685902b6011$exports = require("./ariaHideOutside.main.js");
var $6c2dfcdee3e15e20$exports = require("./usePopover.main.js");
var $11b7e0b04b421e95$exports = require("./useModalOverlay.main.js");
var $745edbb83ab4296f$exports = require("./Overlay.main.js");
var $d7347c25ab757295$exports = require("./PortalProvider.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useOverlayPosition", () => $cd94b4896dd97759$exports.useOverlayPosition);
$parcel$export(module.exports, "useOverlay", () => $82711f9cb668ecdb$exports.useOverlay);
$parcel$export(module.exports, "useOverlayTrigger", () => $b4878eb6316f670a$exports.useOverlayTrigger);
$parcel$export(module.exports, "usePreventScroll", () => $5c2f5cd01815d369$exports.usePreventScroll);
$parcel$export(module.exports, "ModalProvider", () => $0775ea8ea6a0565e$exports.ModalProvider);
$parcel$export(module.exports, "useModalProvider", () => $0775ea8ea6a0565e$exports.useModalProvider);
$parcel$export(module.exports, "OverlayProvider", () => $0775ea8ea6a0565e$exports.OverlayProvider);
$parcel$export(module.exports, "OverlayContainer", () => $0775ea8ea6a0565e$exports.OverlayContainer);
$parcel$export(module.exports, "useModal", () => $0775ea8ea6a0565e$exports.useModal);
$parcel$export(module.exports, "DismissButton", () => $f69bb3e6457495cc$exports.DismissButton);
$parcel$export(module.exports, "ariaHideOutside", () => $08ef1685902b6011$exports.ariaHideOutside);
$parcel$export(module.exports, "usePopover", () => $6c2dfcdee3e15e20$exports.usePopover);
$parcel$export(module.exports, "useModalOverlay", () => $11b7e0b04b421e95$exports.useModalOverlay);
$parcel$export(module.exports, "Overlay", () => $745edbb83ab4296f$exports.Overlay);
$parcel$export(module.exports, "useOverlayFocusContain", () => $745edbb83ab4296f$exports.useOverlayFocusContain);
$parcel$export(module.exports, "UNSAFE_PortalProvider", () => $d7347c25ab757295$exports.UNSAFE_PortalProvider);
$parcel$export(module.exports, "useUNSAFE_PortalContext", () => $d7347c25ab757295$exports.useUNSAFE_PortalContext);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
//# sourceMappingURL=main.js.map
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=MultipleInjectionResolvedValueElementMetadata.js.map
@@ -0,0 +1,34 @@
{
"name": "lru-cache",
"description": "A cache object that deletes the least-recently-used items.",
"version": "6.0.0",
"author": "Isaac Z. Schlueter <i@izs.me>",
"keywords": [
"mru",
"lru",
"cache"
],
"scripts": {
"test": "tap",
"snap": "tap",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags"
},
"main": "index.js",
"repository": "git://github.com/isaacs/node-lru-cache.git",
"devDependencies": {
"benchmark": "^2.1.4",
"tap": "^14.10.7"
},
"license": "ISC",
"dependencies": {
"yallist": "^4.0.0"
},
"files": [
"index.js"
],
"engines": {
"node": ">=10"
}
}
@@ -0,0 +1,64 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Filesystem = require("../filesystem");
var path = require("path");
describe("filesystem", function () {
var fileThatExists = path.join(__dirname, "../../package.json");
var fileThatNotExists = path.join(__dirname, "../../package2.json");
it("should find file that exists, sync", function () {
var result = Filesystem.fileExistsSync(fileThatExists);
// assert.equal(result, true);
expect(result).toBe(true);
});
it("should not find file that not exists, sync", function () {
var result = Filesystem.fileExistsSync(fileThatNotExists);
// assert.equal(result, false);
expect(result).toBe(false);
});
it("should find file that exists, async", function (done) {
Filesystem.fileExistsAsync(fileThatExists, function (_err, result) {
try {
// assert.equal(result, true);
expect(result).toBe(true);
done();
}
catch (error) {
done(error);
}
});
});
it("should not find file that not exists, async", function (done) {
Filesystem.fileExistsAsync(fileThatNotExists, function (_err, result) {
try {
// assert.equal(result, false);
expect(result).toBe(false);
done();
}
catch (error) {
done(error);
}
});
});
it("should load json, sync", function () {
var result = Filesystem.readJsonFromDiskSync(fileThatExists);
// assert.isOk(result);
expect(result);
// assert.equal(result.main, "lib/index.js");
expect(result.main).toBe("lib/index.js");
});
it("should load json, async", function (done) {
Filesystem.readJsonFromDiskAsync(fileThatExists, function (_err, result) {
try {
// assert.isOk(result); // Asserts that object is truthy.
expect(result).toBeTruthy();
// assert.equal(result.main, "lib/index.js");
expect(result.main).toBe("lib/index.js");
done();
}
catch (error) {
done(error);
}
});
});
});
//# sourceMappingURL=filesystem.test.js.map
@@ -0,0 +1,59 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/linear/search.tsx
var search_exports = {};
__export(search_exports, {
SearchLinearIcon: () => SearchLinearIcon
});
module.exports = __toCommonJS(search_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var SearchLinearIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 2,
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round"
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M22 22L20 20", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })
]
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SearchLinearIcon
});
@@ -0,0 +1 @@
{"name":"https-proxy-agent","version":"5.0.1","requiresBuild":false,"files":{"dist/agent.js":{"checkedAt":1794532121914,"integrity":"sha512-T0YrjiN9M8l+dRlXO11N7pgEKiQguu8DOpQyvlVLUuXMAk+fzi6M9nJUj93Sk1QDBVu5Nf5hfaKu1SLr+OVxsw==","mode":420,"size":7841},"dist/index.js":{"checkedAt":1794532121914,"integrity":"sha512-MZiniOHynb4mkJ5utcs5+wvFAWvrPYlwEUDmo/SlpySuh6A/g/vVpviQZ/hOenoN+O0fTakj1fqz4GcNDoUSuA==","mode":420,"size":579},"dist/parse-proxy-response.js":{"checkedAt":1794532121914,"integrity":"sha512-48szwXJkCPxoxKzcjAL0jgRPD3ambK9PHdaTyfgm6fx1Ok4U6ogsca/m48uMX/pf7s1nTFSH0/PsTOW6uG0PDA==","mode":420,"size":2460},"package.json":{"checkedAt":1794532121915,"integrity":"sha512-WhIQUs2OLocVExaHZwz/q/EO6FgCi25eSmhs4qngW7P4WzNrpN1jjjzR6BE7cw031ePfiNWkxhSrXPF1yk08Rw==","mode":420,"size":1405},"dist/agent.js.map":{"checkedAt":1794532121915,"integrity":"sha512-TTrzDrHwwFwT7XmDM3KDak+XlOO2gy+b3THmTNjzo4hmRLRjLH5liVT7B5kNiSdiIA9d+EjJ73MUmXd3UY+kyQ==","mode":420,"size":4367},"dist/index.js.map":{"checkedAt":1794532121915,"integrity":"sha512-kI5URQxl7vUmWZ8rxn8MMrhhaLTLhZHaGLjMr+mDpWemGjI5S7kmAmcAYgFUyoaBfwIw4jaAZakeJS/XN7IsNA==","mode":420,"size":362},"dist/parse-proxy-response.js.map":{"checkedAt":1794532121915,"integrity":"sha512-HR4WidXew2q/kIdXoNHZ0ypH11gmXnuZzrjjJcUs2GyH1pDITZQYdqyhm0SypmxUBYJ4KRnk7F8RnPP1P0Dt+Q==","mode":420,"size":1904},"README.md":{"checkedAt":1794532121915,"integrity":"sha512-rj36Me8iANinNpc51Asg5svWfpRifI4JaD2LydgkmkgwpZjS5eyxQOf56Ad3Q2rMXfnu6Nv1gHr+BpxN71MAWA==","mode":420,"size":4761},"dist/agent.d.ts":{"checkedAt":1794532121915,"integrity":"sha512-S7FNGuWBZIRfcr85IOfBPiBNNa6w3/K1oa2GlFUU+np+v3WtWMKw9uS+1L7T9Qp/+tJYwFQSeGYqvfa3TdZYaw==","mode":420,"size":1126},"dist/index.d.ts":{"checkedAt":1794532121916,"integrity":"sha512-+0yesGvi8HWtFnRh2+TCIS096InKQkKRpD5AwL6VEpSUDfYCTUe+lZKYsUwrycE2Xa4PGswFUo9HQ/XOW0Zg+w==","mode":420,"size":970},"dist/parse-proxy-response.d.ts":{"checkedAt":1794532121916,"integrity":"sha512-gMLJVmtS7ihH+kwl7nhSkgaSpfc2I/xAlED+Y25V0V+65crCLnlYqNhrttx8K4Q8lNe5si7goV+JNdxEffzFEA==","mode":420,"size":233}}}
@@ -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,6 @@
<svg viewbox="0 0 18 18">
<line class="ql-stroke" x1="7" x2="6" y1="3" y2="15"></line>
<line class="ql-stroke" x1="12" x2="11" y1="3" y2="15"></line>
<line class="ql-stroke" x1="3.75" x2="14.75" y1="7" y2="7"></line>
<line class="ql-stroke" x1="3.25" x2="14.25" y1="11" y2="11"></line>
</svg>

After

Width:  |  Height:  |  Size: 300 B

@@ -0,0 +1,61 @@
/**
* @typedef {import('hast').Element} Element
* @typedef {import('mdast').Table} Table
* @typedef {import('../state.js').State} State
*/
import {pointEnd, pointStart} from 'unist-util-position'
/**
* Turn an mdast `table` node into hast.
*
* @param {State} state
* Info passed around.
* @param {Table} node
* mdast node.
* @returns {Element}
* hast node.
*/
export function table(state, node) {
const rows = state.all(node)
const firstRow = rows.shift()
/** @type {Array<Element>} */
const tableContent = []
if (firstRow) {
/** @type {Element} */
const head = {
type: 'element',
tagName: 'thead',
properties: {},
children: state.wrap([firstRow], true)
}
state.patch(node.children[0], head)
tableContent.push(head)
}
if (rows.length > 0) {
/** @type {Element} */
const body = {
type: 'element',
tagName: 'tbody',
properties: {},
children: state.wrap(rows, true)
}
const start = pointStart(node.children[1])
const end = pointEnd(node.children[node.children.length - 1])
if (start && end) body.position = {start, end}
tableContent.push(body)
}
/** @type {Element} */
const result = {
type: 'element',
tagName: 'table',
properties: {},
children: state.wrap(tableContent, true)
}
state.patch(node, result)
return state.applyData(node, result)
}
@@ -0,0 +1,17 @@
/** Used to match wrap detail comments. */
var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
reSplitDetails = /,? & /;
/**
* Extracts wrapper details from the `source` body comment.
*
* @private
* @param {string} source The source to inspect.
* @returns {Array} Returns the wrapper details.
*/
function getWrapDetails(source) {
var match = source.match(reWrapDetails);
return match ? match[1].split(reSplitDetails) : [];
}
module.exports = getWrapDetails;
@@ -0,0 +1,9 @@
import type { Node } from 'estree';
declare function visit(
node: Node,
keys: { [k in Node['type']]?: (keyof Node)[] },
visitorSpec: { [k in Node['type'] | `${Node['type']}:Exit`]?: Function }
): void;
export default visit;
@@ -0,0 +1,7 @@
"use client";
import {
menu_section_base_default
} from "../chunk-X7MTWOQW.mjs";
export {
menu_section_base_default as default
};
@@ -0,0 +1,105 @@
import { resolveElements, getValueTransition, getAnimationMap, animationMapKey, getComputedStyle, fillWildcards, applyPxDefaults, NativeAnimation } from 'motion-dom';
import { invariant, secondsToMilliseconds } from 'motion-utils';
function animateElements(elementOrSelector, keyframes, options, scope) {
const elements = resolveElements(elementOrSelector, scope);
const numElements = elements.length;
invariant(Boolean(numElements), "No valid elements provided.", "no-valid-elements");
/**
* WAAPI doesn't support interrupting animations.
*
* Therefore, starting animations requires a three-step process:
* 1. Stop existing animations (write styles to DOM)
* 2. Resolve keyframes (read styles from DOM)
* 3. Create new animations (write styles to DOM)
*
* The hybrid `animate()` function uses AsyncAnimation to resolve
* keyframes before creating new animations, which removes style
* thrashing. Here, we have much stricter filesize constraints.
* Therefore we do this in a synchronous way that ensures that
* at least within `animate()` calls there is no style thrashing.
*
* In the motion-native-animate-mini-interrupt benchmark this
* was 80% faster than a single loop.
*/
const animationDefinitions = [];
/**
* Step 1: Build options and stop existing animations (write)
*/
for (let i = 0; i < numElements; i++) {
const element = elements[i];
const elementTransition = { ...options };
/**
* Resolve stagger function if provided.
*/
if (typeof elementTransition.delay === "function") {
elementTransition.delay = elementTransition.delay(i, numElements);
}
for (const valueName in keyframes) {
let valueKeyframes = keyframes[valueName];
if (!Array.isArray(valueKeyframes)) {
valueKeyframes = [valueKeyframes];
}
const valueOptions = {
...getValueTransition(elementTransition, valueName),
};
valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration));
valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay));
/**
* If there's an existing animation playing on this element then stop it
* before creating a new one.
*/
const map = getAnimationMap(element);
const key = animationMapKey(valueName, valueOptions.pseudoElement || "");
const currentAnimation = map.get(key);
currentAnimation && currentAnimation.stop();
animationDefinitions.push({
map,
key,
unresolvedKeyframes: valueKeyframes,
options: {
...valueOptions,
element,
name: valueName,
allowFlatten: !elementTransition.type && !elementTransition.ease,
},
});
}
}
/**
* Step 2: Resolve keyframes (read)
*/
for (let i = 0; i < animationDefinitions.length; i++) {
const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i];
const { element, name, pseudoElement } = animationOptions;
if (!pseudoElement && unresolvedKeyframes[0] === null) {
unresolvedKeyframes[0] = getComputedStyle(element, name);
}
fillWildcards(unresolvedKeyframes);
applyPxDefaults(unresolvedKeyframes, name);
/**
* If we only have one keyframe, explicitly read the initial keyframe
* from the computed style. This is to ensure consistency with WAAPI behaviour
* for restarting animations, for instance .play() after finish, when it
* has one vs two keyframes.
*/
if (!pseudoElement && unresolvedKeyframes.length < 2) {
unresolvedKeyframes.unshift(getComputedStyle(element, name));
}
animationOptions.keyframes = unresolvedKeyframes;
}
/**
* Step 3: Create new animations (write)
*/
const animations = [];
for (let i = 0; i < animationDefinitions.length; i++) {
const { map, key, options: animationOptions } = animationDefinitions[i];
const animation = new NativeAnimation(animationOptions);
map.set(key, animation);
animation.finished.finally(() => map.delete(key));
animations.push(animation);
}
return animations;
}
export { animateElements };
@@ -0,0 +1,16 @@
'use strict';
var $TypeError = require('es-errors/type');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
module.exports = function FromPropertyDescriptor(Desc) {
if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
return fromPropertyDescriptor(Desc);
};
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('keys', require('../keys'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,19 @@
'use strict';
var HoursPerDay = 24;
var MinutesPerHour = 60;
var SecondsPerMinute = 60;
var msPerSecond = 1e3;
var msPerMinute = msPerSecond * SecondsPerMinute;
var msPerHour = msPerMinute * MinutesPerHour;
var msPerDay = 86400000;
module.exports = {
HoursPerDay: HoursPerDay,
MinutesPerHour: MinutesPerHour,
SecondsPerMinute: SecondsPerMinute,
msPerSecond: msPerSecond,
msPerMinute: msPerMinute,
msPerHour: msPerHour,
msPerDay: msPerDay
};
@@ -0,0 +1 @@
{"version":3,"file":"check-rule.d.ts","sourceRoot":"","sources":["check-rule.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,iCAHW,KAAK,GACH,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC,CActD;2BAnBgC,wBAAwB;6BAAxB,wBAAwB"}
@@ -0,0 +1,73 @@
import { SetUnionMany, SetIntersectMany } from '../sets/index.mjs';
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
import { IsIntersect, IsUnion, IsTuple, IsArray, IsObject, IsRecord } from '../guard/kind.mjs';
// prettier-ignore
function FromRest(types) {
const result = [];
for (const L of types)
result.push(KeyOfPropertyKeys(L));
return result;
}
// prettier-ignore
function FromIntersect(types) {
const propertyKeysArray = FromRest(types);
const propertyKeys = SetUnionMany(propertyKeysArray);
return propertyKeys;
}
// prettier-ignore
function FromUnion(types) {
const propertyKeysArray = FromRest(types);
const propertyKeys = SetIntersectMany(propertyKeysArray);
return propertyKeys;
}
// prettier-ignore
function FromTuple(types) {
return types.map((_, indexer) => indexer.toString());
}
// prettier-ignore
function FromArray(_) {
return (['[number]']);
}
// prettier-ignore
function FromProperties(T) {
return (globalThis.Object.getOwnPropertyNames(T));
}
// ------------------------------------------------------------------
// FromPatternProperties
// ------------------------------------------------------------------
// prettier-ignore
function FromPatternProperties(patternProperties) {
if (!includePatternProperties)
return [];
const patternPropertyKeys = globalThis.Object.getOwnPropertyNames(patternProperties);
return patternPropertyKeys.map(key => {
return (key[0] === '^' && key[key.length - 1] === '$')
? key.slice(1, key.length - 1)
: key;
});
}
/** Returns a tuple of PropertyKeys derived from the given TSchema. */
// prettier-ignore
export function KeyOfPropertyKeys(type) {
return (IsIntersect(type) ? FromIntersect(type.allOf) :
IsUnion(type) ? FromUnion(type.anyOf) :
IsTuple(type) ? FromTuple(type.items ?? []) :
IsArray(type) ? FromArray(type.items) :
IsObject(type) ? FromProperties(type.properties) :
IsRecord(type) ? FromPatternProperties(type.patternProperties) :
[]);
}
// ----------------------------------------------------------------
// KeyOfPattern
// ----------------------------------------------------------------
let includePatternProperties = false;
/** Returns a regular expression pattern derived from the given TSchema */
export function KeyOfPattern(schema) {
includePatternProperties = true;
const keys = KeyOfPropertyKeys(schema);
includePatternProperties = false;
const pattern = keys.map((key) => `(${key})`);
return `^(${pattern.join('|')})$`;
}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,uDAPW,MAAM,QAEN,MAAM,GAEJ,MAAM,CA4BlB"}
@@ -0,0 +1,26 @@
export interface BookModel {
id: string
title: string
author?: string
}
export const AClockworkOrange: BookModel = Object.freeze({
id: 'aco',
title: 'A Clockwork Orange',
})
export const AnimalFarm: BookModel = Object.freeze({
id: 'af',
title: 'Animal Farm',
})
export const TheGreatGatsby: BookModel = Object.freeze({
id: 'tgg',
title: 'The Great Gatsby',
})
export const TheHobbit: BookModel = Object.freeze({
id: 'th',
title: 'The Hobbit',
author: 'J. R. R. Tolkien',
})
@@ -0,0 +1,9 @@
import type { Uint8Array_ } from '../types/index.js';
/**
* Go through each expected RP ID and try to find one that matches. Returns the unhashed RP ID
* that matched the hash in the response.
*
* Raises an `UnexpectedRPIDHash` error if no match is found
*/
export declare function matchExpectedRPID(rpIDHash: Uint8Array_, expectedRPIDs: string[]): Promise<string>;
//# sourceMappingURL=matchExpectedRPID.d.ts.map
@@ -0,0 +1,328 @@
export type VisitTraversalStep = $eslintcore.VisitTraversalStep;
export type CallTraversalStep = $eslintcore.CallTraversalStep;
export type TraversalStep = $eslintcore.TraversalStep;
export type SourceLocation = $eslintcore.SourceLocation;
export type SourceLocationWithOffset = $eslintcore.SourceLocationWithOffset;
export type SourceRange = $eslintcore.SourceRange;
export type IDirective = $eslintcore.Directive;
export type DirectiveType = $eslintcore.DirectiveType;
export type SourceCodeBaseTypeOptions = $eslintcore.SourceCodeBaseTypeOptions;
/**
* <Options>
*/
export type TextSourceCode<Options extends SourceCodeBaseTypeOptions = $eslintcore.SourceCodeBaseTypeOptions> = import("@eslint/core").TextSourceCode<Options>;
export type RuleConfig = $eslintcore.RuleConfig;
export type RulesConfig = $eslintcore.RulesConfig;
export type StringConfig = $typests.StringConfig;
export type BooleanConfig = $typests.BooleanConfig;
/**
* A class to represent a step in the traversal process where a
* method is called.
* @implements {CallTraversalStep}
*/
export class CallMethodStep implements CallTraversalStep {
/**
* Creates a new instance.
* @param {Object} options The options for the step.
* @param {string} options.target The target of the step.
* @param {Array<any>} options.args The arguments of the step.
*/
constructor({ target, args }: {
target: string;
args: Array<any>;
});
/**
* The type of the step.
* @type {"call"}
* @readonly
*/
readonly type: "call";
/**
* The kind of the step. Represents the same data as the `type` property
* but it's a number for performance.
* @type {2}
* @readonly
*/
readonly kind: 2;
/**
* The name of the method to call.
* @type {string}
*/
target: string;
/**
* The arguments to pass to the method.
* @type {Array<any>}
*/
args: Array<any>;
}
/**
* Object to parse ESLint configuration comments.
*/
export class ConfigCommentParser {
/**
* Parses a list of "name:string_value" or/and "name" options divided by comma or
* whitespace. Used for "global" comments.
* @param {string} string The string to parse.
* @returns {StringConfig} Result map object of names and string values, or null values if no value was provided.
*/
parseStringConfig(string: string): StringConfig;
/**
* Parses a JSON-like config.
* @param {string} string The string to parse.
* @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object
*/
parseJSONLikeConfig(string: string): ({
ok: true;
config: RulesConfig;
} | {
ok: false;
error: {
message: string;
};
});
/**
* Parses a config of values separated by comma.
* @param {string} string The string to parse.
* @returns {BooleanConfig} Result map of values and true values
*/
parseListConfig(string: string): BooleanConfig;
/**
* Parses a directive comment into directive text and value.
* @param {string} string The string with the directive to be parsed.
* @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid.
*/
parseDirective(string: string): DirectiveComment | undefined;
#private;
}
/**
* A class to represent a directive comment.
* @implements {IDirective}
*/
export class Directive implements IDirective {
/**
* Creates a new instance.
* @param {Object} options The options for the directive.
* @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive.
* @param {unknown} options.node The node representing the directive.
* @param {string} options.value The value of the directive.
* @param {string} options.justification The justification for the directive.
*/
constructor({ type, node, value, justification }: {
type: "disable" | "enable" | "disable-next-line" | "disable-line";
node: unknown;
value: string;
justification: string;
});
/**
* The type of directive.
* @type {DirectiveType}
* @readonly
*/
readonly type: DirectiveType;
/**
* The node representing the directive.
* @type {unknown}
* @readonly
*/
readonly node: unknown;
/**
* Everything after the "eslint-disable" portion of the directive,
* but before the "--" that indicates the justification.
* @type {string}
* @readonly
*/
readonly value: string;
/**
* The justification for the directive.
* @type {string}
* @readonly
*/
readonly justification: string;
}
/**
* Source Code Base Object
* @template {SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}]
* @implements {TextSourceCode<Options>}
*/
export class TextSourceCodeBase<Options extends SourceCodeBaseTypeOptions & {
RootNode: object;
SyntaxElementWithLoc: object;
} = $eslintcore.SourceCodeBaseTypeOptions & {
RootNode: object;
SyntaxElementWithLoc: object;
}> implements TextSourceCode<Options> {
/**
* Creates a new instance.
* @param {Object} options The options for the instance.
* @param {string} options.text The source code text.
* @param {Options['RootNode']} options.ast The root AST node.
* @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code. Defaults to `/\r?\n/u`.
*/
constructor({ text, ast, lineEndingPattern }: {
text: string;
ast: Options["RootNode"];
lineEndingPattern?: RegExp;
});
/**
* The AST of the source code.
* @type {Options['RootNode']}
*/
ast: Options["RootNode"];
/**
* The text of the source code.
* @type {string}
*/
text: string;
/**
* Returns the loc information for the given node or token.
* @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for.
* @returns {SourceLocation} The loc information for the node or token.
* @throws {Error} If the node or token does not have loc information.
*/
getLoc(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceLocation;
/**
* Converts a source text index into a `{ line: number, column: number }` pair.
* @param {number} index The index of a character in a file.
* @throws {TypeError|RangeError} If non-numeric index or index out of range.
* @returns {{line: number, column: number}} A `{ line: number, column: number }` location object with 0 or 1-indexed line and 0 or 1-indexed column based on language.
* @public
*/
public getLocFromIndex(index: number): {
line: number;
column: number;
};
/**
* Converts a `{ line: number, column: number }` pair into a source text index.
* @param {Object} loc A line/column location.
* @param {number} loc.line The line number of the location. (0 or 1-indexed based on language.)
* @param {number} loc.column The column number of the location. (0 or 1-indexed based on language.)
* @throws {TypeError|RangeError} If `loc` is not an object with a numeric
* `line` and `column`, if the `line` is less than or equal to zero or
* the `line` or `column` is out of the expected range.
* @returns {number} The index of the line/column location in a file.
* @public
*/
public getIndexFromLoc(loc: {
line: number;
column: number;
}): number;
/**
* Returns the range information for the given node or token.
* @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for.
* @returns {SourceRange} The range information for the node or token.
* @throws {Error} If the node or token does not have range information.
*/
getRange(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceRange;
/**
* Returns the parent of the given node.
* @param {Options['SyntaxElementWithLoc']} node The node to get the parent of.
* @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node.
* @throws {Error} If the method is not implemented in the subclass.
*/
getParent(node: Options["SyntaxElementWithLoc"]): Options["SyntaxElementWithLoc"] | undefined;
/**
* Gets all the ancestors of a given node
* @param {Options['SyntaxElementWithLoc']} node The node
* @returns {Array<Options['SyntaxElementWithLoc']>} All the ancestor nodes in the AST, not including the provided node, starting
* from the root node at index 0 and going inwards to the parent node.
* @throws {TypeError} When `node` is missing.
*/
getAncestors(node: Options["SyntaxElementWithLoc"]): Array<Options["SyntaxElementWithLoc"]>;
/**
* Gets the source code for the given node.
* @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for.
* @param {number} [beforeCount] The number of characters before the node to retrieve.
* @param {number} [afterCount] The number of characters after the node to retrieve.
* @returns {string} The text representing the AST node.
* @public
*/
public getText(node?: Options["SyntaxElementWithLoc"], beforeCount?: number, afterCount?: number): string;
/**
* Gets the entire source text split into an array of lines.
* @returns {Array<string>} The source text as an array of lines.
* @public
*/
public get lines(): Array<string>;
/**
* Traverse the source code and return the steps that were taken.
* @returns {Iterable<TraversalStep>} The steps that were taken while traversing the source code.
*/
traverse(): Iterable<TraversalStep>;
#private;
}
/**
* A class to represent a step in the traversal process where a node is visited.
* @implements {VisitTraversalStep}
*/
export class VisitNodeStep implements VisitTraversalStep {
/**
* Creates a new instance.
* @param {Object} options The options for the step.
* @param {object} options.target The target of the step.
* @param {1|2} options.phase The phase of the step.
* @param {Array<any>} options.args The arguments of the step.
*/
constructor({ target, phase, args }: {
target: object;
phase: 1 | 2;
args: Array<any>;
});
/**
* The type of the step.
* @type {"visit"}
* @readonly
*/
readonly type: "visit";
/**
* The kind of the step. Represents the same data as the `type` property
* but it's a number for performance.
* @type {1}
* @readonly
*/
readonly kind: 1;
/**
* The target of the step.
* @type {object}
*/
target: object;
/**
* The phase of the step.
* @type {1|2}
*/
phase: 1 | 2;
/**
* The arguments of the step.
* @type {Array<any>}
*/
args: Array<any>;
}
import type * as $eslintcore from "@eslint/core";
import type * as $typests from "./types.ts";
/**
* Represents a directive comment.
*/
declare class DirectiveComment {
/**
* Creates a new directive comment.
* @param {string} label The label of the directive.
* @param {string} value The value of the directive.
* @param {string} justification The justification of the directive.
*/
constructor(label: string, value: string, justification: string);
/**
* The label of the directive, such as "eslint", "eslint-disable", etc.
* @type {string}
*/
label: string;
/**
* The value of the directive (the string after the label).
* @type {string}
*/
value: string;
/**
* The justification of the directive (the string after the --).
* @type {string}
*/
justification: string;
}
export {};
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CertificationRequestInfo = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const asn1_x509_1 = require("@peculiar/asn1-x509");
const attributes_1 = require("./attributes");
class CertificationRequestInfo {
constructor(params = {}) {
this.version = 0;
this.subject = new asn1_x509_1.Name();
this.subjectPKInfo = new asn1_x509_1.SubjectPublicKeyInfo();
this.attributes = new attributes_1.Attributes();
Object.assign(this, params);
}
}
exports.CertificationRequestInfo = CertificationRequestInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], CertificationRequestInfo.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.Name })
], CertificationRequestInfo.prototype, "subject", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.SubjectPublicKeyInfo })
], CertificationRequestInfo.prototype, "subjectPKInfo", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: attributes_1.Attributes, implicit: true, context: 0, optional: true })
], CertificationRequestInfo.prototype, "attributes", void 0);
@@ -0,0 +1,31 @@
import type { TSESLint } from '@typescript-eslint/utils';
export type Options = [
{
/**
* If `true`, allow `default` cases on switch statements with exhaustive
* cases.
*
* @default true
*/
allowDefaultCaseForExhaustiveSwitch?: boolean;
/**
* If `true`, require a `default` clause for switches on non-union types.
*
* @default false
*/
requireDefaultForNonUnion?: boolean;
/**
* Regular expression for a comment that can indicate an intentionally omitted default case.
*/
defaultCaseCommentPattern?: string;
/**
* If `true`, the `default` clause is used to determine whether the switch statement is exhaustive for union types.
*
* @default false
*/
considerDefaultExhaustiveForUnions?: boolean;
}
];
export type MessageIds = 'addMissingCases' | 'dangerousDefaultCase' | 'switchIsNotExhaustive';
declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1,33 @@
/* eslint no-undefined: 0 */
'use strict';
const format = require('./format');
const { MESSAGE } = require('triple-beam');
const jsonStringify = require('safe-stable-stringify');
/*
* function simple (info)
* Returns a new instance of the simple format TransformStream
* which writes a simple representation of logs.
*
* const { level, message, splat, ...rest } = info;
*
* ${level}: ${message} if rest is empty
* ${level}: ${message} ${JSON.stringify(rest)} otherwise
*/
module.exports = format(info => {
const stringifiedRest = jsonStringify(Object.assign({}, info, {
level: undefined,
message: undefined,
splat: undefined
}));
const padding = info.padding && info.padding[info.level] || '';
if (stringifiedRest !== '{}') {
info[MESSAGE] = `${info.level}:${padding} ${info.message} ${stringifiedRest}`;
} else {
info[MESSAGE] = `${info.level}:${padding} ${info.message}`;
}
return info;
});
@@ -0,0 +1,29 @@
var test = require('tape');
var path = require('path');
var resolve = require('../');
test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) {
t.plan(1);
var resolverDir = 'C:\\a\\b\\c\\d';
resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) {
t.equal(!!err, true);
});
});
test('non-existent basedir should not throw when preserveSymlinks is false', function (t) {
t.plan(2);
var opts = {
basedir: path.join(path.sep, 'unreal', 'path', 'that', 'does', 'not', 'exist'),
preserveSymlinks: false
};
var module = './dotdot/abc';
resolve(module, opts, function (err, res) {
t.equal(err.code, 'INVALID_BASEDIR');
t.equal(res, undefined);
});
});
@@ -0,0 +1,102 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = ttf2symbol;
exports.getSymbolId = getSymbolId;
var _string = _interopRequireDefault(require("../common/string"));
var _ttfreader = _interopRequireDefault(require("./ttfreader"));
var _contours2svg = _interopRequireDefault(require("./util/contours2svg"));
var _pathsUtil = _interopRequireDefault(require("../graphics/pathsUtil"));
var _error = _interopRequireDefault(require("./error"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file ttf 转 svg symbol
* @author mengke01(kekee000@gmail.com)
*/
// xml 模板
var XML_TPL = '' + '<svg style="position: absolute; width: 0; height: 0;" width="0" height="0" version="1.1"' + ' xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' + '<defs>${symbolList}</defs>' + '</svg>';
// symbol 模板
var SYMBOL_TPL = '' + '<symbol id="${id}" viewBox="0 ${descent} ${unitsPerEm} ${unitsPerEm}">' + '<path d="${d}"></path>' + '</symbol>';
/**
* 根据 glyf 获取 symbo 名称
* 1. 有 `name` 属性则使用 name 属性
* 2. 有 `unicode` 属性则取 unicode 第一个: 'uni' + unicode
* 3. 使用索引号作为 id: 'symbol' + index
*
* @param {Object} glyf glyf 对象
* @param {number} index glyf 索引
* @return {string}
*/
function getSymbolId(glyf, index) {
if (glyf.name) {
return glyf.name;
}
if (glyf.unicode && glyf.unicode.length) {
return 'uni-' + glyf.unicode[0];
}
return 'symbol-' + index;
}
/**
* ttf数据结构转svg
*
* @param {ttfObject} ttf ttfObject对象
* @param {Object} options 选项
* @param {Object} options.metadata 字体相关的信息
* @return {string} svg字符串
*/
// eslint-disable-next-line no-unused-vars
function ttfobject2symbol(ttf) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var xmlObject = {};
var unitsPerEm = ttf.head.unitsPerEm;
var descent = ttf.hhea.descent;
// glyf 信息
var symbolList = '';
for (var i = 1, l = ttf.glyf.length; i < l; i++) {
var glyf = ttf.glyf[i];
// 筛选简单字形,并且有轮廓,有编码
if (!glyf.compound && glyf.contours) {
var contours = _pathsUtil.default.flip(glyf.contours);
var glyfObject = {
descent: descent,
unitsPerEm: unitsPerEm,
id: getSymbolId(glyf, i),
d: (0, _contours2svg.default)(contours)
};
symbolList += _string.default.format(SYMBOL_TPL, glyfObject);
}
}
xmlObject.symbolList = symbolList;
return _string.default.format(XML_TPL, xmlObject);
}
/**
* ttf格式转换成svg字体格式
*
* @param {ArrayBuffer|ttfObject} ttfBuffer ttf缓冲数组或者ttfObject对象
* @param {Object} options 选项
* @param {Object} options.metadata 字体相关的信息
*
* @return {string} svg字符串
*/
function ttf2symbol(ttfBuffer) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
// 读取ttf二进制流
if (ttfBuffer instanceof ArrayBuffer) {
var reader = new _ttfreader.default();
var ttfObject = reader.read(ttfBuffer);
reader.dispose();
return ttfobject2symbol(ttfObject, options);
}
// 读取ttfObject
else if (ttfBuffer.version && ttfBuffer.glyf) {
return ttfobject2symbol(ttfBuffer, options);
}
_error.default.raise(10112);
}
@@ -0,0 +1,23 @@
import { Static } from '@sinclair/typebox';
import { OneBotAction } from '../../action/OneBotAction';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
count: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString]>;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
type ReturnType = Static<typeof ReturnSchema>;
export declare class FetchCustomFace extends OneBotAction<PayloadType, ReturnType> {
actionName: "fetch_custom_face";
payloadSchema: import("@sinclair/typebox").TObject<{
count: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString]>;
}>;
returnSchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
actionSummary: string;
actionTags: string[];
payloadExample: {
count: number;
};
returnExample: string[];
_handle(payload: PayloadType): Promise<string[]>;
}
export {};
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAwBM,SAAS,0CAAY,KAAoB,EAAE,GAAkC;IAClF,IAAI,aAAC,SAAS,cAAE,UAAU,gBAAE,eAAe,UAAG,KAAK,EAAC,GAAG;IAEvD,iEAAiE;IACjE,IAAI,eAAe,CAAA,GAAA,mBAAK,EAAE;IAC1B,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,IAAI,WAAW,CAAA,GAAA,wBAAU,EAAE;QACzB,IAAI,IAAI,OAAO,IAAI,CAAC,aAAa,OAAO,IAAI,YAAY;YACtD,IAAI,iBAAiB,IAAI,OAAO,CAAC,YAAY,GAAG,IAAI,OAAO,CAAC,SAAS,GAAG,IAAI,OAAO,CAAC,YAAY,GAAG,IAAI,OAAO,CAAC,YAAY,GAAG;YAE9H,IAAI,gBAAgB;gBAClB,aAAa,OAAO,GAAG;gBACvB;YACF;QACF;IACF,GAAG;QAAC;QAAY;QAAK;KAAa;IAElC,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,CAAA,GAAA,yCAAc,EAAE;QACd,6DAA6D;QAC7D,wCAAwC;QACxC,IAAI,UAAU,UAAU,OAAO,EAAE;YAC/B,aAAa,OAAO,GAAG;YACvB,UAAU,OAAO,GAAG;QACtB;QAEA,0HAA0H;QAC1H,4HAA4H;QAC5H,gFAAgF;QAChF,IAAI,iBAAiB,CAAA,gBAAA,0BAAA,IAAK,OAAO,KAC5B,CAAC,aAAa,OAAO,IACrB,cACC,CAAA,CAAC,SAAS,UAAU,UAAU,OAAO,AAAD,KACrC,IAAI,OAAO,CAAC,YAAY,KAAK,IAAI,OAAO,CAAC,YAAY;QAE1D,IAAI,gBAAgB;YAClB,aAAa,OAAO,GAAG;YACvB,uBAAA,iCAAA;QACF;QAEA,UAAU,OAAO,GAAG;IACtB,GAAG;QAAC;QAAW;QAAY;QAAO;QAAK;KAAM;IAE7C,0DAA0D;IAC1D,oEAAoE;IACpE,kHAAkH;IAClH,CAAA,GAAA,kCAAO,EAAE,KAAK,UAAU;AAC1B","sources":["packages/@react-aria/utils/src/useLoadMore.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject, useCallback, useRef} from 'react';\nimport {useEvent} from './useEvent';\n \nimport {useLayoutEffect} from './useLayoutEffect';\n\nexport interface LoadMoreProps {\n /** Whether data is currently being loaded. */\n isLoading?: boolean,\n /** Handler that is called when more items should be loaded, e.g. while scrolling near the bottom. */\n onLoadMore?: () => void,\n /**\n * The amount of offset from the bottom of your scrollable region that should trigger load more.\n * Uses a percentage value relative to the scroll body's client height. Load more is then triggered\n * when your current scroll position's distance from the bottom of the currently loaded list of items is less than\n * or equal to the provided value. (e.g. 1 = 100% of the scroll region's height).\n * @default 1\n */\n scrollOffset?: number,\n /** The data currently loaded. */\n items?: any\n}\n\nexport function useLoadMore(props: LoadMoreProps, ref: RefObject<HTMLElement | null>) {\n let {isLoading, onLoadMore, scrollOffset = 1, items} = props;\n\n // Handle scrolling, and call onLoadMore when nearing the bottom.\n let isLoadingRef = useRef(isLoading);\n let prevProps = useRef(props);\n let onScroll = useCallback(() => {\n if (ref.current && !isLoadingRef.current && onLoadMore) {\n let shouldLoadMore = ref.current.scrollHeight - ref.current.scrollTop - ref.current.clientHeight < ref.current.clientHeight * scrollOffset;\n\n if (shouldLoadMore) {\n isLoadingRef.current = true;\n onLoadMore();\n }\n }\n }, [onLoadMore, ref, scrollOffset]);\n\n let lastItems = useRef(items);\n useLayoutEffect(() => {\n // Only update isLoadingRef if props object actually changed,\n // not if a local state change occurred.\n if (props !== prevProps.current) {\n isLoadingRef.current = isLoading;\n prevProps.current = props;\n }\n\n // TODO: Eventually this hook will move back into RAC during which we will accept the collection as a option to this hook.\n // We will only load more if the collection has changed after the last load to prevent multiple onLoadMore from being called\n // while the data from the last onLoadMore is being processed by RAC collection.\n let shouldLoadMore = ref?.current\n && !isLoadingRef.current\n && onLoadMore\n && (!items || items !== lastItems.current)\n && ref.current.clientHeight === ref.current.scrollHeight;\n\n if (shouldLoadMore) {\n isLoadingRef.current = true;\n onLoadMore?.();\n }\n\n lastItems.current = items;\n }, [isLoading, onLoadMore, props, ref, items]);\n\n // TODO: maybe this should still just return scroll props?\n // Test against case where the ref isn't defined when this is called\n // Think this was a problem when trying to attach to the scrollable body of the table in OnLoadMoreTableBodyScroll\n useEvent(ref, 'scroll', onScroll);\n}\n"],"names":[],"version":3,"file":"useLoadMore.main.js.map"}
@@ -0,0 +1 @@
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["values.js"],"names":[],"mappings":""}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB 0C 1C","132":"oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a"},D:{"1":"0 1 2 3 4 5 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB","260":"yB zB 0B"},E:{"1":"B C L M G NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E 2C ZC 3C 4C 5C","16":"F","132":"A 6C aC"},F:{"1":"0 1 2 3 4 5 oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB FD GD HD ID NC uC JD OC"},G:{"1":"TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD","132":"PD QD RD SD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB pD qD rD sD aC tD uD vD wD xD QC RC SC yD","2":"J oD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"132":"1D 2D"}},B:5,C:"system-ui value for font-family",D:true};
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_wrap_async_generator.cjs",
"module": "../../esm/_wrap_async_generator.js"
}
@@ -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,110 @@
### [5.1.2](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2) (2021-03-06)
### Bug Fixes
* eliminate ReDoS ([#36](https://github.com/gulpjs/glob-parent/issues/36)) ([f923116](https://github.com/gulpjs/glob-parent/commit/f9231168b0041fea3f8f954b3cceb56269fc6366))
### [5.1.1](https://github.com/gulpjs/glob-parent/compare/v5.1.0...v5.1.1) (2021-01-27)
### Bug Fixes
* unescape exclamation mark ([#26](https://github.com/gulpjs/glob-parent/issues/26)) ([a98874f](https://github.com/gulpjs/glob-parent/commit/a98874f1a59e407f4fb1beb0db4efa8392da60bb))
## [5.1.0](https://github.com/gulpjs/glob-parent/compare/v5.0.0...v5.1.0) (2021-01-27)
### Features
* add `flipBackslashes` option to disable auto conversion of slashes (closes [#24](https://github.com/gulpjs/glob-parent/issues/24)) ([#25](https://github.com/gulpjs/glob-parent/issues/25)) ([eecf91d](https://github.com/gulpjs/glob-parent/commit/eecf91d5e3834ed78aee39c4eaaae654d76b87b3))
## [5.0.0](https://github.com/gulpjs/glob-parent/compare/v4.0.0...v5.0.0) (2021-01-27)
### ⚠ BREAKING CHANGES
* Drop support for node <6 & bump dependencies
### Miscellaneous Chores
* Drop support for node <6 & bump dependencies ([896c0c0](https://github.com/gulpjs/glob-parent/commit/896c0c00b4e7362f60b96e7fc295ae929245255a))
## [4.0.0](https://github.com/gulpjs/glob-parent/compare/v3.1.0...v4.0.0) (2021-01-27)
### ⚠ BREAKING CHANGES
* question marks are valid path characters on Windows so avoid flagging as a glob when alone
* Update is-glob dependency
### Features
* hoist regexps and strings for performance gains ([4a80667](https://github.com/gulpjs/glob-parent/commit/4a80667c69355c76a572a5892b0f133c8e1f457e))
* question marks are valid path characters on Windows so avoid flagging as a glob when alone ([2a551dd](https://github.com/gulpjs/glob-parent/commit/2a551dd0dc3235e78bf3c94843d4107072d17841))
* Update is-glob dependency ([e41fcd8](https://github.com/gulpjs/glob-parent/commit/e41fcd895d1f7bc617dba45c9d935a7949b9c281))
## [3.1.0](https://github.com/gulpjs/glob-parent/compare/v3.0.1...v3.1.0) (2021-01-27)
### Features
* allow basic win32 backslash use ([272afa5](https://github.com/gulpjs/glob-parent/commit/272afa5fd070fc0f796386a5993d4ee4a846988b))
* handle extglobs (parentheses) containing separators ([7db1bdb](https://github.com/gulpjs/glob-parent/commit/7db1bdb0756e55fd14619e8ce31aa31b17b117fd))
* new approach to braces/brackets handling ([8269bd8](https://github.com/gulpjs/glob-parent/commit/8269bd89290d99fac9395a354fb56fdcdb80f0be))
* pre-process braces/brackets sections ([9ef8a87](https://github.com/gulpjs/glob-parent/commit/9ef8a87f66b1a43d0591e7a8e4fc5a18415ee388))
* preserve escaped brace/bracket at end of string ([8cfb0ba](https://github.com/gulpjs/glob-parent/commit/8cfb0ba84202d51571340dcbaf61b79d16a26c76))
### Bug Fixes
* trailing escaped square brackets ([99ec9fe](https://github.com/gulpjs/glob-parent/commit/99ec9fecc60ee488ded20a94dd4f18b4f55c4ccf))
### [3.0.1](https://github.com/gulpjs/glob-parent/compare/v3.0.0...v3.0.1) (2021-01-27)
### Features
* use path-dirname ponyfill ([cdbea5f](https://github.com/gulpjs/glob-parent/commit/cdbea5f32a58a54e001a75ddd7c0fccd4776aacc))
### Bug Fixes
* unescape glob-escaped dirnames on output ([598c533](https://github.com/gulpjs/glob-parent/commit/598c533bdf49c1428bc063aa9b8db40c5a86b030))
## [3.0.0](https://github.com/gulpjs/glob-parent/compare/v2.0.0...v3.0.0) (2021-01-27)
### ⚠ BREAKING CHANGES
* update is-glob dependency
### Features
* update is-glob dependency ([5c5f8ef](https://github.com/gulpjs/glob-parent/commit/5c5f8efcee362a8e7638cf8220666acd8784f6bd))
## [2.0.0](https://github.com/gulpjs/glob-parent/compare/v1.3.0...v2.0.0) (2021-01-27)
### Features
* move up to dirname regardless of glob characters ([f97fb83](https://github.com/gulpjs/glob-parent/commit/f97fb83be2e0a9fc8d3b760e789d2ecadd6aa0c2))
## [1.3.0](https://github.com/gulpjs/glob-parent/compare/v1.2.0...v1.3.0) (2021-01-27)
## [1.2.0](https://github.com/gulpjs/glob-parent/compare/v1.1.0...v1.2.0) (2021-01-27)
### Reverts
* feat: make regex test strings smaller ([dc80fa9](https://github.com/gulpjs/glob-parent/commit/dc80fa9658dca20549cfeba44bbd37d5246fcce0))
## [1.1.0](https://github.com/gulpjs/glob-parent/compare/v1.0.0...v1.1.0) (2021-01-27)
### Features
* make regex test strings smaller ([cd83220](https://github.com/gulpjs/glob-parent/commit/cd832208638f45169f986d80fcf66e401f35d233))
## 1.0.0 (2021-01-27)
@@ -0,0 +1 @@
{"mappings":";;;;;;;AAAO,MAAM,4CAAmB,CAAC;QACxB;IAAP,OAAO,CAAA,oBAAA,eAAA,yBAAA,GAAI,aAAa,cAAjB,+BAAA,oBAAqB;AAC9B;AAEO,MAAM,4CAAiB,CAC5B;IAEA,IAAI,MAAM,YAAY,MAAM,GAAG,MAAM,KAAK,IACxC,OAAO;IAGT,MAAM,MAAM,0CAAiB;IAC7B,OAAO,IAAI,WAAW,IAAI;AAC5B","sources":["packages/@react-aria/utils/src/domHelpers.ts"],"sourcesContent":["export const getOwnerDocument = (el: Element | null | undefined): Document => {\n return el?.ownerDocument ?? document;\n};\n\nexport const getOwnerWindow = (\n el: (Window & typeof global) | Element | null | undefined\n): Window & typeof global => {\n if (el && 'window' in el && el.window === el) {\n return el;\n }\n\n const doc = getOwnerDocument(el as Element | null | undefined);\n return doc.defaultView || window;\n};\n"],"names":[],"version":3,"file":"domHelpers.main.js.map"}
@@ -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 @@
{"mappings":";;AAeA,OAAO,MAAM,sBAAsB,aAYlC,CAAC;AAQF,OAAO,MAAM,2BAA2B,gBAIvC,CAAC;AAEF,OAAO,MAAM,uBAAuB,QAAQ,gBAAgB,CAAuC,CAAC;AAEpG,OAAO,MAAM,4BAA4B,MAA6C,CAAC;AAEvF,8BAA8B,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC;IACpD,iBAAiB,CAAC,EAAE,gBAAgB,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;CAChB;AAED;IACE,wEAAwE;IACxE,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,2FAA2F;IAC3F,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,2GAA2G;IAC3G,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjD,oFAAoF;IACpF,eAAe,IAAI,IAAI,CAAC;IACxB,sEAAsE;IACtE,gBAAgB,IAAI,IAAI,CAAA;CACzB;AAED,uCAAuC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,GAAG,mBAAmB,CAS5F;AA+JD,gCAAgC,GAAG,OAAO,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,CAyBhF","sources":["packages/@react-stately/form/src/packages/@react-stately/form/src/useFormValidationState.ts","packages/@react-stately/form/src/packages/@react-stately/form/src/index.ts","packages/@react-stately/form/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {FormValidationContext, useFormValidationState, DEFAULT_VALIDATION_RESULT, VALID_VALIDITY_STATE, privateValidationStateProp, mergeValidation} from './useFormValidationState';\nexport type {FormValidationState} from './useFormValidationState';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -0,0 +1,39 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = useClickAway;
var _useLatest = _interopRequireDefault(require("../useLatest"));
var _domTarget = require("../utils/domTarget");
var _getDocumentOrShadow = _interopRequireDefault(require("../utils/getDocumentOrShadow"));
var _useEffectWithTarget = _interopRequireDefault(require("../utils/useEffectWithTarget"));
function useClickAway(onClickAway, target, eventName) {
if (eventName === void 0) {
eventName = 'click';
}
var onClickAwayRef = (0, _useLatest["default"])(onClickAway);
(0, _useEffectWithTarget["default"])(function () {
var handler = function handler(event) {
var targets = Array.isArray(target) ? target : [target];
if (targets.some(function (item) {
var targetElement = (0, _domTarget.getTargetElement)(item);
return !targetElement || targetElement.contains(event.target);
})) {
return;
}
onClickAwayRef.current(event);
};
var documentOrShadow = (0, _getDocumentOrShadow["default"])(target);
var eventNames = Array.isArray(eventName) ? eventName : [eventName];
eventNames.forEach(function (event) {
return documentOrShadow.addEventListener(event, handler);
});
return function () {
eventNames.forEach(function (event) {
return documentOrShadow.removeEventListener(event, handler);
});
};
}, Array.isArray(eventName) ? eventName : [eventName], target);
}
@@ -0,0 +1,23 @@
/**
* Gets the first element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @alias first
* @category Array
* @param {Array} array The array to query.
* @returns {*} Returns the first element of `array`.
* @example
*
* _.head([1, 2, 3]);
* // => 1
*
* _.head([]);
* // => undefined
*/
function head(array) {
return (array && array.length) ? array[0] : undefined;
}
export default head;
@@ -0,0 +1 @@
export { _ as default } from "../esm/_async_to_generator.js";
@@ -0,0 +1,48 @@
"use strict";
var GeneralSubtrees_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NameConstraints = exports.GeneralSubtrees = exports.GeneralSubtree = exports.id_ce_nameConstraints = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const general_name_1 = require("../general_name");
const object_identifiers_1 = require("../object_identifiers");
exports.id_ce_nameConstraints = `${object_identifiers_1.id_ce}.30`;
class GeneralSubtree {
constructor(params = {}) {
this.base = new general_name_1.GeneralName();
this.minimum = 0;
Object.assign(this, params);
}
}
exports.GeneralSubtree = GeneralSubtree;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: general_name_1.GeneralName })
], GeneralSubtree.prototype, "base", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, context: 0, defaultValue: 0, implicit: true })
], GeneralSubtree.prototype, "minimum", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, context: 1, optional: true, implicit: true })
], GeneralSubtree.prototype, "maximum", void 0);
let GeneralSubtrees = GeneralSubtrees_1 = class GeneralSubtrees extends asn1_schema_1.AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, GeneralSubtrees_1.prototype);
}
};
exports.GeneralSubtrees = GeneralSubtrees;
exports.GeneralSubtrees = GeneralSubtrees = GeneralSubtrees_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence, itemType: GeneralSubtree })
], GeneralSubtrees);
class NameConstraints {
constructor(params = {}) {
Object.assign(this, params);
}
}
exports.NameConstraints = NameConstraints;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: GeneralSubtrees, context: 0, optional: true, implicit: true })
], NameConstraints.prototype, "permittedSubtrees", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: GeneralSubtrees, context: 1, optional: true, implicit: true })
], NameConstraints.prototype, "excludedSubtrees", void 0);
@@ -0,0 +1,279 @@
/**
* The sentinel value returned by producers to replace the draft with undefined.
*/
declare const NOTHING: unique symbol;
/**
* To let Immer treat your class instances as plain immutable objects
* (albeit with a custom prototype), you must define either an instance property
* or a static property on each of your custom classes.
*
* Otherwise, your class instance will never be drafted, which means it won't be
* safe to mutate in a produce callback.
*/
declare const DRAFTABLE: unique symbol;
type AnyFunc = (...args: any[]) => any;
type PrimitiveType = number | string | boolean;
/** Object types that should never be mapped */
type AtomicObject = Function | Promise<any> | Date | RegExp;
/**
* If the lib "ES2015.Collection" is not included in tsconfig.json,
* types like ReadonlyArray, WeakMap etc. fall back to `any` (specified nowhere)
* or `{}` (from the node types), in both cases entering an infinite recursion in
* pattern matching type mappings
* This type can be used to cast these types to `void` in these cases.
*/
type IfAvailable<T, Fallback = void> = true | false extends (T extends never ? true : false) ? Fallback : keyof T extends never ? Fallback : T;
/**
* These should also never be mapped but must be tested after regular Map and
* Set
*/
type WeakReferences = IfAvailable<WeakMap<any, any>> | IfAvailable<WeakSet<any>>;
type WritableDraft<T> = {
-readonly [K in keyof T]: Draft<T[K]>;
};
/** Convert a readonly type into a mutable type, if possible */
type Draft<T> = T extends PrimitiveType ? T : T extends AtomicObject ? T : T extends ReadonlyMap<infer K, infer V> ? Map<Draft<K>, Draft<V>> : T extends ReadonlySet<infer V> ? Set<Draft<V>> : T extends WeakReferences ? T : T extends object ? WritableDraft<T> : T;
/** Convert a mutable type into a readonly type */
type Immutable<T> = T extends PrimitiveType ? T : T extends AtomicObject ? T : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<Immutable<K>, Immutable<V>> : T extends ReadonlySet<infer V> ? ReadonlySet<Immutable<V>> : T extends WeakReferences ? T : T extends object ? {
readonly [K in keyof T]: Immutable<T[K]>;
} : T;
interface Patch {
op: "replace" | "remove" | "add";
path: (string | number)[];
value?: any;
}
type PatchListener = (patches: Patch[], inversePatches: Patch[]) => void;
/**
* Utility types
*/
type PatchesTuple<T> = readonly [T, Patch[], Patch[]];
type ValidRecipeReturnType<State> = State | void | undefined | (State extends undefined ? typeof NOTHING : never);
type ReturnTypeWithPatchesIfNeeded<State, UsePatches extends boolean> = UsePatches extends true ? PatchesTuple<State> : State;
/**
* Core Producer inference
*/
type InferRecipeFromCurried<Curried> = Curried extends (base: infer State, ...rest: infer Args) => any ? ReturnType<Curried> extends State ? (draft: Draft<State>, ...rest: Args) => ValidRecipeReturnType<Draft<State>> : never : never;
type InferInitialStateFromCurried<Curried> = Curried extends (base: infer State, ...rest: any[]) => any ? State : never;
type InferCurriedFromRecipe<Recipe, UsePatches extends boolean> = Recipe extends (draft: infer DraftState, ...args: infer RestArgs) => any ? ReturnType<Recipe> extends ValidRecipeReturnType<DraftState> ? (base: Immutable<DraftState>, ...args: RestArgs) => ReturnTypeWithPatchesIfNeeded<DraftState, UsePatches> : never : never;
type InferCurriedFromInitialStateAndRecipe<State, Recipe, UsePatches extends boolean> = Recipe extends (draft: Draft<State>, ...rest: infer RestArgs) => ValidRecipeReturnType<State> ? (base?: State | undefined, ...args: RestArgs) => ReturnTypeWithPatchesIfNeeded<State, UsePatches> : never;
/**
* The `produce` function takes a value and a "recipe function" (whose
* return value often depends on the base state). The recipe function is
* free to mutate its first argument however it wants. All mutations are
* only ever applied to a __copy__ of the base state.
*
* Pass only a function to create a "curried producer" which relieves you
* from passing the recipe function every time.
*
* Only plain objects and arrays are made mutable. All other objects are
* considered uncopyable.
*
* Note: This function is __bound__ to its `Immer` instance.
*
* @param {any} base - the initial state
* @param {Function} producer - function that receives a proxy of the base state as first argument and which can be freely modified
* @param {Function} patchListener - optional function that will be called with all the patches produced here
* @returns {any} a new state, or the initial state if nothing was modified
*/
interface IProduce {
/** Curried producer that infers the recipe from the curried output function (e.g. when passing to setState) */
<Curried>(recipe: InferRecipeFromCurried<Curried>, initialState?: InferInitialStateFromCurried<Curried>): Curried;
/** Curried producer that infers curried from the recipe */
<Recipe extends AnyFunc>(recipe: Recipe): InferCurriedFromRecipe<Recipe, false>;
/** Curried producer that infers curried from the State generic, which is explicitly passed in. */
<State>(recipe: (state: Draft<State>, initialState: State) => ValidRecipeReturnType<State>): (state?: State) => State;
<State, Args extends any[]>(recipe: (state: Draft<State>, ...args: Args) => ValidRecipeReturnType<State>, initialState: State): (state?: State, ...args: Args) => State;
<State>(recipe: (state: Draft<State>) => ValidRecipeReturnType<State>): (state: State) => State;
<State, Args extends any[]>(recipe: (state: Draft<State>, ...args: Args) => ValidRecipeReturnType<State>): (state: State, ...args: Args) => State;
/** Curried producer with initial state, infers recipe from initial state */
<State, Recipe extends Function>(recipe: Recipe, initialState: State): InferCurriedFromInitialStateAndRecipe<State, Recipe, false>;
/** Normal producer */
<Base, D = Draft<Base>>(// By using a default inferred D, rather than Draft<Base> in the recipe, we can override it.
base: Base, recipe: (draft: D) => ValidRecipeReturnType<D>, listener?: PatchListener): Base;
}
/**
* Like `produce`, but instead of just returning the new state,
* a tuple is returned with [nextState, patches, inversePatches]
*
* Like produce, this function supports currying
*/
interface IProduceWithPatches {
<Recipe extends AnyFunc>(recipe: Recipe): InferCurriedFromRecipe<Recipe, true>;
<State, Recipe extends Function>(recipe: Recipe, initialState: State): InferCurriedFromInitialStateAndRecipe<State, Recipe, true>;
<Base, D = Draft<Base>>(base: Base, recipe: (draft: D) => ValidRecipeReturnType<D>, listener?: PatchListener): PatchesTuple<Base>;
}
/**
* The type for `recipe function`
*/
type Producer<T> = (draft: Draft<T>) => ValidRecipeReturnType<Draft<T>>;
type Objectish = AnyObject | AnyArray | AnyMap | AnySet;
type AnyObject = {
[key: string]: any;
};
type AnyArray = Array<any>;
type AnySet = Set<any>;
type AnyMap = Map<any, any>;
/** Returns true if the given value is an Immer draft */
declare function isDraft(value: any): boolean;
/** Returns true if the given value can be drafted by Immer */
declare function isDraftable(value: any): boolean;
/** Get the underlying object that is represented by the given draft */
declare function original<T>(value: T): T | undefined;
/**
* Freezes draftable objects. Returns the original object.
* By default freezes shallowly, but if the second argument is `true` it will freeze recursively.
*
* @param obj
* @param deep
*/
declare function freeze<T>(obj: T, deep?: boolean): T;
interface ProducersFns {
produce: IProduce;
produceWithPatches: IProduceWithPatches;
}
type StrictMode = boolean | "class_only";
declare class Immer implements ProducersFns {
autoFreeze_: boolean;
useStrictShallowCopy_: StrictMode;
useStrictIteration_: boolean;
constructor(config?: {
autoFreeze?: boolean;
useStrictShallowCopy?: StrictMode;
useStrictIteration?: boolean;
});
/**
* The `produce` function takes a value and a "recipe function" (whose
* return value often depends on the base state). The recipe function is
* free to mutate its first argument however it wants. All mutations are
* only ever applied to a __copy__ of the base state.
*
* Pass only a function to create a "curried producer" which relieves you
* from passing the recipe function every time.
*
* Only plain objects and arrays are made mutable. All other objects are
* considered uncopyable.
*
* Note: This function is __bound__ to its `Immer` instance.
*
* @param {any} base - the initial state
* @param {Function} recipe - function that receives a proxy of the base state as first argument and which can be freely modified
* @param {Function} patchListener - optional function that will be called with all the patches produced here
* @returns {any} a new state, or the initial state if nothing was modified
*/
produce: IProduce;
produceWithPatches: IProduceWithPatches;
createDraft<T extends Objectish>(base: T): Draft<T>;
finishDraft<D extends Draft<any>>(draft: D, patchListener?: PatchListener): D extends Draft<infer T> ? T : never;
/**
* Pass true to automatically freeze all copies created by Immer.
*
* By default, auto-freezing is enabled.
*/
setAutoFreeze(value: boolean): void;
/**
* Pass true to enable strict shallow copy.
*
* By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
*/
setUseStrictShallowCopy(value: StrictMode): void;
/**
* Pass false to use faster iteration that skips non-enumerable properties
* but still handles symbols for compatibility.
*
* By default, strict iteration is enabled (includes all own properties).
*/
setUseStrictIteration(value: boolean): void;
shouldUseStrictIteration(): boolean;
applyPatches<T extends Objectish>(base: T, patches: readonly Patch[]): T;
}
/** Takes a snapshot of the current state of a draft and finalizes it (but without freezing). This is a great utility to print the current state during debugging (no Proxies in the way). The output of current can also be safely leaked outside the producer. */
declare function current<T>(value: T): T;
declare function enablePatches(): void;
declare function enableMapSet(): void;
/**
* The `produce` function takes a value and a "recipe function" (whose
* return value often depends on the base state). The recipe function is
* free to mutate its first argument however it wants. All mutations are
* only ever applied to a __copy__ of the base state.
*
* Pass only a function to create a "curried producer" which relieves you
* from passing the recipe function every time.
*
* Only plain objects and arrays are made mutable. All other objects are
* considered uncopyable.
*
* Note: This function is __bound__ to its `Immer` instance.
*
* @param {any} base - the initial state
* @param {Function} producer - function that receives a proxy of the base state as first argument and which can be freely modified
* @param {Function} patchListener - optional function that will be called with all the patches produced here
* @returns {any} a new state, or the initial state if nothing was modified
*/
declare const produce: IProduce;
/**
* Like `produce`, but `produceWithPatches` always returns a tuple
* [nextState, patches, inversePatches] (instead of just the next state)
*/
declare const produceWithPatches: IProduceWithPatches;
/**
* Pass true to automatically freeze all copies created by Immer.
*
* Always freeze by default, even in production mode
*/
declare const setAutoFreeze: (value: boolean) => void;
/**
* Pass true to enable strict shallow copy.
*
* By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
*/
declare const setUseStrictShallowCopy: (value: StrictMode) => void;
/**
* Pass false to use loose iteration that only processes enumerable string properties.
* This skips symbols and non-enumerable properties for maximum performance.
*
* By default, strict iteration is enabled (includes all own properties).
*/
declare const setUseStrictIteration: (value: boolean) => void;
/**
* Apply an array of Immer patches to the first argument.
*
* This function is a producer, which means copy-on-write is in effect.
*/
declare const applyPatches: <T extends Objectish>(base: T, patches: readonly Patch[]) => T;
/**
* Create an Immer draft from the given base state, which may be a draft itself.
* The draft can be modified until you finalize it with the `finishDraft` function.
*/
declare const createDraft: <T extends Objectish>(base: T) => Draft<T>;
/**
* Finalize an Immer draft from a `createDraft` call, returning the base state
* (if no changes were made) or a modified copy. The draft must *not* be
* mutated afterwards.
*
* Pass a function as the 2nd argument to generate Immer patches based on the
* changes that were made.
*/
declare const finishDraft: <D extends unknown>(draft: D, patchListener?: PatchListener | undefined) => D extends Draft<infer T> ? T : never;
/**
* This function is actually a no-op, but can be used to cast an immutable type
* to an draft type and make TypeScript happy
*
* @param value
*/
declare function castDraft<T>(value: T): Draft<T>;
/**
* This function is actually a no-op, but can be used to cast a mutable type
* to an immutable type and make TypeScript happy
* @param value
*/
declare function castImmutable<T>(value: T): Immutable<T>;
export { Draft, Immer, Immutable, Objectish, Patch, PatchListener, Producer, StrictMode, WritableDraft, applyPatches, castDraft, castImmutable, createDraft, current, enableMapSet, enablePatches, finishDraft, freeze, DRAFTABLE as immerable, isDraft, isDraftable, NOTHING as nothing, original, produce, produceWithPatches, setAutoFreeze, setUseStrictIteration, setUseStrictShallowCopy };
@@ -0,0 +1 @@
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAWM,SAAS,0CAAc,OAAgC,EAAE,GAAyB;IACvF,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,WAAW,QAAQ,GAAG,IAAI,KAAK;YACjC,QAAQ,GAAG,CAAC,OAAO,GAAG,IAAI,OAAO;YACjC,OAAO;gBACL,IAAI,QAAQ,GAAG,EACb,QAAQ,GAAG,CAAC,OAAO,GAAG;YAE1B;QACF;IACF;AACF","sources":["packages/@react-aria/utils/src/useSyncRef.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {MutableRefObject} from 'react';\nimport {RefObject} from '@react-types/shared';\nimport {useLayoutEffect} from './';\n\ninterface ContextValue<T> {\n ref?: MutableRefObject<T | null>\n}\n\n// Syncs ref from context with ref passed to hook\nexport function useSyncRef<T>(context?: ContextValue<T> | null, ref?: RefObject<T | null>): void {\n useLayoutEffect(() => {\n if (context && context.ref && ref) {\n context.ref.current = ref.current;\n return () => {\n if (context.ref) {\n context.ref.current = null;\n }\n };\n }\n });\n}\n"],"names":[],"version":3,"file":"useSyncRef.main.js.map"}
@@ -0,0 +1,26 @@
/**
* Copyright (c) 2013-2015, Christopher Jeffrey, Peter Sunde (MIT License)
* Copyright (c) 2016, Daniel Imms (MIT License).
* Copyright (c) 2018, Microsoft Corporation (MIT License).
*/
#ifndef NODE_PTY_PATH_UTIL_H_
#define NODE_PTY_PATH_UTIL_H_
#define NODE_ADDON_API_DISABLE_DEPRECATED
#include <napi.h>
#include <string>
#define MAX_ENV 65536
namespace path_util {
std::wstring to_wstring(const Napi::String& str);
std::string wstring_to_string(const std::wstring &wide_string);
const char* from_wstring(const wchar_t* wstr);
bool file_exists(std::wstring filename);
std::wstring get_shell_path(std::wstring filename);
} // namespace path_util
#endif // NODE_PTY_PATH_UTIL_H_
@@ -0,0 +1 @@
{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAKM,MAAM;IA2BX,qBAA8B;QAC5B,OAAO,IAAI,CAAC,WAAW,CAAC,gBAAgB;IAC1C;IAEA,iBAAuB;QACrB,IAAI,CAAC,gBAAgB,GAAG;QACxB,IAAI,CAAC,WAAW,CAAC,cAAc;IACjC;IAEA,kBAAwB;QACtB,IAAI,CAAC,WAAW,CAAC,eAAe;QAChC,IAAI,CAAC,oBAAoB,GAAG,IAAM;IACpC;IAEA,uBAAgC;QAC9B,OAAO;IACT;IAEA,UAAU,CAAC;IAhCX,YAAY,IAAY,EAAE,WAAuB,CAAE;QACjD,IAAI,CAAC,WAAW,GAAG;QACnB,IAAI,CAAC,MAAM,GAAG,YAAY,MAAM;QAChC,IAAI,CAAC,aAAa,GAAG,YAAY,aAAa;QAC9C,IAAI,CAAC,aAAa,GAAG,YAAY,aAAa;QAC9C,IAAI,CAAC,OAAO,GAAG,YAAY,OAAO;QAClC,IAAI,CAAC,UAAU,GAAG,YAAY,UAAU;QACxC,IAAI,CAAC,gBAAgB,GAAG,YAAY,gBAAgB;QACpD,IAAI,CAAC,UAAU,GAAG,YAAY,UAAU;QACxC,IAAI,CAAC,SAAS,GAAG,YAAY,SAAS;QACtC,IAAI,CAAC,SAAS,GAAG,YAAY,SAAS;QACtC,IAAI,CAAC,IAAI,GAAG;IACd;AAqBF;AAEO,SAAS,0CAAwC,MAA4C;IAClG,IAAI,WAAW,CAAA,GAAA,aAAK,EAAE;QACpB,WAAW;QACX,UAAU;IACZ;IAEA,mDAAmD;IAEnD,CAAA,GAAA,sBAAc,EAAE;QACd,MAAM,QAAQ,SAAS,OAAO;QAC9B,OAAO;YACL,IAAI,MAAM,QAAQ,EAAE;gBAClB,MAAM,QAAQ,CAAC,UAAU;gBACzB,MAAM,QAAQ,GAAG;YACnB;QACF;IACF,GAAG,EAAE;IAEL,IAAI,eAAe,CAAA,GAAA,qBAAa,EAAE,CAAC;QACjC,mBAAA,6BAAA,OAAS;IACX;IAEA,wDAAwD;IACxD,OAAO,CAAA,GAAA,kBAAU,EAAE,CAAC;QAClB,wGAAwG;QACxG,sGAAsG;QACtG,6FAA6F;QAC7F,qGAAqG;QACrG,IACE,EAAE,MAAM,YAAY,qBACpB,EAAE,MAAM,YAAY,oBACpB,EAAE,MAAM,YAAY,uBACpB,EAAE,MAAM,YAAY,mBACpB;YACA,SAAS,OAAO,CAAC,SAAS,GAAG;YAE7B,IAAI,SAAS,EAAE,MAAM;YACrB,IAAI,gBAA2D,CAAC;gBAC9D,SAAS,OAAO,CAAC,SAAS,GAAG;gBAE7B,IAAI,OAAO,QAAQ,EACjB,uEAAuE;gBACvE,aAAa,IAAI,0CAAoB,QAAQ;gBAG/C,qEAAqE;gBACrE,IAAI,SAAS,OAAO,CAAC,QAAQ,EAAE;oBAC7B,SAAS,OAAO,CAAC,QAAQ,CAAC,UAAU;oBACpC,SAAS,OAAO,CAAC,QAAQ,GAAG;gBAC9B;YACF;YAEA,OAAO,gBAAgB,CAAC,YAAY,eAAe;gBAAC,MAAM;YAAI;YAE9D,SAAS,OAAO,CAAC,QAAQ,GAAG,IAAI,iBAAiB;gBAC/C,IAAI,SAAS,OAAO,CAAC,SAAS,IAAI,OAAO,QAAQ,EAAE;wBACjD;qBAAA,6BAAA,SAAS,OAAO,CAAC,QAAQ,cAAzB,iDAAA,2BAA2B,UAAU;oBACrC,IAAI,kBAAkB,WAAW,SAAS,aAAa,GAAG,OAAO,SAAS,aAAa;oBACvF,OAAO,aAAa,CAAC,IAAI,WAAW,QAAQ;wBAAC,eAAe;oBAAe;oBAC3E,OAAO,aAAa,CAAC,IAAI,WAAW,YAAY;wBAAC,SAAS;wBAAM,eAAe;oBAAe;gBAChG;YACF;YAEA,SAAS,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ;gBAAC,YAAY;gBAAM,iBAAiB;oBAAC;iBAAW;YAAA;QAC5F;IACF,GAAG;QAAC;KAAa;AACnB","sources":["packages/@react-aria/interactions/src/utils.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusEvent as ReactFocusEvent, useCallback, useRef} from 'react';\nimport {useEffectEvent, useLayoutEffect} from '@react-aria/utils';\n\nexport class SyntheticFocusEvent<Target = Element> implements ReactFocusEvent<Target> {\n nativeEvent: FocusEvent;\n target: EventTarget & Target;\n currentTarget: EventTarget & Target;\n relatedTarget: Element;\n bubbles: boolean;\n cancelable: boolean;\n defaultPrevented: boolean;\n eventPhase: number;\n isTrusted: boolean;\n timeStamp: number;\n type: string;\n\n constructor(type: string, nativeEvent: FocusEvent) {\n this.nativeEvent = nativeEvent;\n this.target = nativeEvent.target as EventTarget & Target;\n this.currentTarget = nativeEvent.currentTarget as EventTarget & Target;\n this.relatedTarget = nativeEvent.relatedTarget as Element;\n this.bubbles = nativeEvent.bubbles;\n this.cancelable = nativeEvent.cancelable;\n this.defaultPrevented = nativeEvent.defaultPrevented;\n this.eventPhase = nativeEvent.eventPhase;\n this.isTrusted = nativeEvent.isTrusted;\n this.timeStamp = nativeEvent.timeStamp;\n this.type = type;\n }\n\n isDefaultPrevented(): boolean {\n return this.nativeEvent.defaultPrevented;\n }\n\n preventDefault(): void {\n this.defaultPrevented = true;\n this.nativeEvent.preventDefault();\n }\n\n stopPropagation(): void {\n this.nativeEvent.stopPropagation();\n this.isPropagationStopped = () => true;\n }\n\n isPropagationStopped(): boolean {\n return false;\n }\n\n persist() {}\n}\n\nexport function useSyntheticBlurEvent<Target = Element>(onBlur: (e: ReactFocusEvent<Target>) => void) {\n let stateRef = useRef({\n isFocused: false,\n observer: null as MutationObserver | null\n });\n\n // Clean up MutationObserver on unmount. See below.\n \n useLayoutEffect(() => {\n const state = stateRef.current;\n return () => {\n if (state.observer) {\n state.observer.disconnect();\n state.observer = null;\n }\n };\n }, []);\n\n let dispatchBlur = useEffectEvent((e: SyntheticFocusEvent<Target>) => {\n onBlur?.(e);\n });\n\n // This function is called during a React onFocus event.\n return useCallback((Line truncated
@@ -0,0 +1,82 @@
var $87beb89ab4a308fd$exports = require("./utils.main.js");
var $eCULP$reactariautils = require("@react-aria/utils");
var $eCULP$reactariainteractions = require("@react-aria/interactions");
var $eCULP$reactarialabel = require("@react-aria/label");
var $eCULP$reactariaselection = require("@react-aria/selection");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useListBox", () => $a3ce5bb3074610af$export$50eacbbf140a3141);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $a3ce5bb3074610af$export$50eacbbf140a3141(props, state, ref) {
let domProps = (0, $eCULP$reactariautils.filterDOMProps)(props, {
labelable: true
});
// Use props instead of state here. We don't want this to change due to long press.
let selectionBehavior = props.selectionBehavior || 'toggle';
let linkBehavior = props.linkBehavior || (selectionBehavior === 'replace' ? 'action' : 'override');
if (selectionBehavior === 'toggle' && linkBehavior === 'action') // linkBehavior="action" does not work with selectionBehavior="toggle" because there is no way
// to initiate selection (checkboxes are not allowed inside a listbox). Link items will not be
// selectable in this configuration.
linkBehavior = 'override';
let { listProps: listProps } = (0, $eCULP$reactariaselection.useSelectableList)({
...props,
ref: ref,
selectionManager: state.selectionManager,
collection: state.collection,
disabledKeys: state.disabledKeys,
linkBehavior: linkBehavior
});
let { focusWithinProps: focusWithinProps } = (0, $eCULP$reactariainteractions.useFocusWithin)({
onFocusWithin: props.onFocus,
onBlurWithin: props.onBlur,
onFocusWithinChange: props.onFocusChange
});
// Share list id and some props with child options.
let id = (0, $eCULP$reactariautils.useId)(props.id);
(0, $87beb89ab4a308fd$exports.listData).set(state, {
id: id,
shouldUseVirtualFocus: props.shouldUseVirtualFocus,
shouldSelectOnPressUp: props.shouldSelectOnPressUp,
shouldFocusOnHover: props.shouldFocusOnHover,
isVirtualized: props.isVirtualized,
onAction: props.onAction,
linkBehavior: linkBehavior
});
let { labelProps: labelProps, fieldProps: fieldProps } = (0, $eCULP$reactarialabel.useLabel)({
...props,
id: id,
// listbox is not an HTML input element so it
// shouldn't be labeled by a <label> element.
labelElementType: 'span'
});
return {
labelProps: labelProps,
listBoxProps: (0, $eCULP$reactariautils.mergeProps)(domProps, focusWithinProps, state.selectionManager.selectionMode === 'multiple' ? {
'aria-multiselectable': 'true'
} : {}, {
role: 'listbox',
...(0, $eCULP$reactariautils.mergeProps)(fieldProps, listProps)
})
};
}
//# sourceMappingURL=useListBox.main.js.map
@@ -0,0 +1,33 @@
let Selector = require('../selector')
class Placeholder extends Selector {
/**
* Add old mozilla to possible prefixes
*/
possible() {
return super.possible().concat(['-moz- old', '-ms- old'])
}
/**
* Return different selectors depend on prefix
*/
prefixed(prefix) {
if (prefix === '-webkit-') {
return '::-webkit-input-placeholder'
}
if (prefix === '-ms-') {
return '::-ms-input-placeholder'
}
if (prefix === '-ms- old') {
return ':-ms-input-placeholder'
}
if (prefix === '-moz- old') {
return ':-moz-placeholder'
}
return `::${prefix}placeholder`
}
}
Placeholder.names = ['::placeholder']
module.exports = Placeholder
@@ -0,0 +1,6 @@
module.exports = {
"longPressMessage": `Premere a lungo o premere Alt + Freccia gi\xf9 per aprire il menu`
};
//# sourceMappingURL=it-IT.main.js.map
@@ -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":"minproc.d.ts","sourceRoot":"","sources":["minproc.js"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
# ieee754 [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
[travis-image]: https://img.shields.io/travis/feross/ieee754/master.svg
[travis-url]: https://travis-ci.org/feross/ieee754
[npm-image]: https://img.shields.io/npm/v/ieee754.svg
[npm-url]: https://npmjs.org/package/ieee754
[downloads-image]: https://img.shields.io/npm/dm/ieee754.svg
[downloads-url]: https://npmjs.org/package/ieee754
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
[standard-url]: https://standardjs.com
[![saucelabs][saucelabs-image]][saucelabs-url]
[saucelabs-image]: https://saucelabs.com/browser-matrix/ieee754.svg
[saucelabs-url]: https://saucelabs.com/u/ieee754
### Read/write IEEE754 floating point numbers from/to a Buffer or array-like object.
## install
```
npm install ieee754
```
## methods
`var ieee754 = require('ieee754')`
The `ieee754` object has the following functions:
```
ieee754.read = function (buffer, offset, isLE, mLen, nBytes)
ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes)
```
The arguments mean the following:
- buffer = the buffer
- offset = offset into the buffer
- value = value to set (only for `write`)
- isLe = is little endian?
- mLen = mantissa length
- nBytes = number of bytes
## what is ieee754?
The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation. [Read more](http://en.wikipedia.org/wiki/IEEE_floating_point).
## license
BSD 3 Clause. Copyright (c) 2008, Fair Oaks Labs, Inc.
@@ -0,0 +1,788 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/components/select.ts
var select_exports = {};
__export(select_exports, {
select: () => select
});
module.exports = __toCommonJS(select_exports);
// src/utils/classes.ts
var dataFocusVisibleClasses = [
"outline-none",
"data-[focus-visible=true]:z-10",
"data-[focus-visible=true]:outline-2",
"data-[focus-visible=true]:outline-focus",
"data-[focus-visible=true]:outline-offset-2"
];
// src/utils/tw-merge-config.ts
var COMMON_UNITS = ["small", "medium", "large"];
var twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: COMMON_UNITS,
borderRadius: COMMON_UNITS
},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
};
// src/utils/tv.ts
var import_tailwind_variants = require("tailwind-variants");
var tv = (options, config) => {
var _a, _b, _c;
return (0, import_tailwind_variants.tv)(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
// src/components/select.ts
var select = tv({
slots: {
base: ["group inline-flex flex-col relative"],
label: [
"block",
"absolute",
"z-10",
"origin-top-left",
"rtl:origin-top-right",
"subpixel-antialiased",
"text-small",
"text-foreground-500",
"pointer-events-none"
],
mainWrapper: "w-full flex flex-col",
trigger: "relative px-3 gap-3 w-full inline-flex flex-row items-center shadow-sm outline-none tap-highlight-transparent",
innerWrapper: "inline-flex h-full w-[calc(100%_-_theme(spacing.6))] min-h-4 items-center gap-1.5 box-border",
selectorIcon: "absolute end-3 w-4 h-4",
spinner: "absolute end-3",
value: ["text-foreground-500", "font-normal", "w-full", "text-start"],
listboxWrapper: "scroll-py-6 w-full",
listbox: "",
popoverContent: "w-full p-1 overflow-hidden",
helperWrapper: "p-1 flex relative flex-col gap-1.5",
description: "text-tiny text-foreground-400",
errorMessage: "text-tiny text-danger"
},
variants: {
variant: {
flat: {
trigger: [
"bg-default-100",
"data-[hover=true]:bg-default-200",
"group-data-[focus=true]:bg-default-200"
]
},
faded: {
trigger: [
"bg-default-100",
"border-medium",
"border-default-200",
"data-[hover=true]:border-default-400 data-[focus=true]:border-default-400 data-[open=true]:border-default-400"
],
value: "group-data-[has-value=true]:text-default-foreground"
},
bordered: {
trigger: [
"border-medium",
"border-default-200",
"data-[hover=true]:border-default-400",
"data-[open=true]:border-default-foreground",
"data-[focus=true]:border-default-foreground"
],
value: "group-data-[has-value=true]:text-default-foreground"
},
underlined: {
trigger: [
"!px-1",
"!pb-0",
"!gap-0",
"relative",
"box-border",
"border-b-medium",
"shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]",
"border-default-200",
"!rounded-none",
"hover:border-default-300",
"after:content-['']",
"after:w-0",
"after:origin-center",
"after:bg-default-foreground",
"after:absolute",
"after:left-1/2",
"after:-translate-x-1/2",
"after:-bottom-[2px]",
"after:h-[2px]",
"data-[open=true]:after:w-full",
"data-[focus=true]:after:w-full"
],
value: "group-data-[has-value=true]:text-default-foreground"
}
},
color: {
default: {},
primary: {
selectorIcon: "text-primary"
},
secondary: {
selectorIcon: "text-secondary"
},
success: {
selectorIcon: "text-success"
},
warning: {
selectorIcon: "text-warning"
},
danger: {
selectorIcon: "text-danger"
}
},
size: {
sm: {
label: "text-tiny",
trigger: "h-8 min-h-8 px-2 rounded-small",
value: "text-small"
},
md: {
trigger: "h-10 min-h-10 rounded-medium",
value: "text-small"
},
lg: {
trigger: "h-12 min-h-12 rounded-large",
value: "text-medium"
}
},
radius: {
none: {
trigger: "rounded-none"
},
sm: {
trigger: "rounded-small"
},
md: {
trigger: "rounded-medium"
},
lg: {
trigger: "rounded-large"
},
full: {
trigger: "rounded-full"
}
},
labelPlacement: {
outside: {
base: "flex flex-col"
},
"outside-left": {
base: "flex-row items-center flex-nowrap items-start",
label: "relative pe-2 text-foreground"
},
inside: {
label: "text-tiny cursor-pointer",
trigger: "flex-col items-start justify-center gap-0"
}
},
fullWidth: {
true: {
base: "w-full"
},
false: {
base: "min-w-40"
}
},
isDisabled: {
true: {
base: "opacity-disabled pointer-events-none",
trigger: "pointer-events-none"
}
},
isInvalid: {
true: {
label: "!text-danger",
value: "!text-danger",
selectorIcon: "text-danger"
}
},
isRequired: {
true: {
label: "after:content-['*'] after:text-danger after:ms-0.5"
}
},
isMultiline: {
true: {
label: "relative",
trigger: "!h-auto"
},
false: {
value: "truncate"
}
},
disableAnimation: {
true: {
trigger: "after:transition-none",
base: "transition-none",
label: "transition-none",
selectorIcon: "transition-none"
},
false: {
base: "transition-background motion-reduce:transition-none !duration-150",
label: [
"will-change-auto",
"origin-top-left",
"rtl:origin-top-right",
"!duration-200",
"!ease-out",
"transition-[transform,color,left,opacity]",
"motion-reduce:transition-none"
],
selectorIcon: "transition-transform duration-150 ease motion-reduce:transition-none"
}
},
disableSelectorIconRotation: {
true: {},
false: {
selectorIcon: "data-[open=true]:rotate-180"
}
}
},
defaultVariants: {
variant: "flat",
color: "default",
size: "md",
labelPlacement: "inside",
fullWidth: true,
isDisabled: false,
isMultiline: false,
disableSelectorIconRotation: false
},
compoundVariants: [
{
variant: "flat",
color: "default",
class: {
value: "group-data-[has-value=true]:text-default-foreground",
trigger: ["bg-default-100", "data-[hover=true]:bg-default-200"]
}
},
{
variant: "flat",
color: "primary",
class: {
trigger: [
"bg-primary-100",
"text-primary",
"data-[hover=true]:bg-primary-50",
"group-data-[focus=true]:bg-primary-50"
],
value: "text-primary",
label: "text-primary"
}
},
{
variant: "flat",
color: "secondary",
class: {
trigger: [
"bg-secondary-100",
"text-secondary",
"data-[hover=true]:bg-secondary-50",
"group-data-[focus=true]:bg-secondary-50"
],
value: "text-secondary",
label: "text-secondary"
}
},
{
variant: "flat",
color: "success",
class: {
trigger: [
"bg-success-100",
"text-success-600",
"dark:text-success",
"data-[hover=true]:bg-success-50",
"group-data-[focus=true]:bg-success-50"
],
value: "text-success-600 dark:text-success",
label: "text-success-600 dark:text-success"
}
},
{
variant: "flat",
color: "warning",
class: {
trigger: [
"bg-warning-100",
"text-warning-600",
"dark:text-warning",
"data-[hover=true]:bg-warning-50",
"group-data-[focus=true]:bg-warning-50"
],
value: "text-warning-600 dark:text-warning",
label: "text-warning-600 dark:text-warning"
}
},
{
variant: "flat",
color: "danger",
class: {
trigger: [
"bg-danger-100",
"text-danger",
"dark:text-danger-500",
"data-[hover=true]:bg-danger-50",
"group-data-[focus=true]:bg-danger-50"
],
value: "text-danger dark:text-danger-500",
label: "text-danger dark:text-danger-500"
}
},
{
variant: "faded",
color: "primary",
class: {
trigger: "data-[hover=true]:border-primary data-[focus=true]:border-primary data-[open=true]:border-primary",
label: "text-primary"
}
},
{
variant: "faded",
color: "secondary",
class: {
trigger: "data-[hover=true]:border-secondary data-[focus=true]:border-secondary data-[open=true]:border-secondary",
label: "text-secondary"
}
},
{
variant: "faded",
color: "success",
class: {
trigger: "data-[hover=true]:border-success data-[focus=true]:border-success data-[open=true]:border-success",
label: "text-success"
}
},
{
variant: "faded",
color: "warning",
class: {
trigger: "data-[hover=true]:border-warning data-[focus=true]:border-warning data-[open=true]:border-warning",
label: "text-warning"
}
},
{
variant: "faded",
color: "danger",
class: {
trigger: "data-[hover=true]:border-danger data-[focus=true]:border-danger data-[open=true]:border-danger",
label: "text-danger"
}
},
{
variant: "underlined",
color: "default",
class: {
value: "group-data-[has-value=true]:text-foreground"
}
},
{
variant: "underlined",
color: "primary",
class: {
trigger: "after:bg-primary",
label: "text-primary"
}
},
{
variant: "underlined",
color: "secondary",
class: {
trigger: "after:bg-secondary",
label: "text-secondary"
}
},
{
variant: "underlined",
color: "success",
class: {
trigger: "after:bg-success",
label: "text-success"
}
},
{
variant: "underlined",
color: "warning",
class: {
trigger: "after:bg-warning",
label: "text-warning"
}
},
{
variant: "underlined",
color: "danger",
class: {
trigger: "after:bg-danger",
label: "text-danger"
}
},
{
variant: "bordered",
color: "primary",
class: {
trigger: ["data-[open=true]:border-primary", "data-[focus=true]:border-primary"],
label: "text-primary"
}
},
{
variant: "bordered",
color: "secondary",
class: {
trigger: ["data-[open=true]:border-secondary", "data-[focus=true]:border-secondary"],
label: "text-secondary"
}
},
{
variant: "bordered",
color: "success",
class: {
trigger: ["data-[open=true]:border-success", "data-[focus=true]:border-success"],
label: "text-success"
}
},
{
variant: "bordered",
color: "warning",
class: {
trigger: ["data-[open=true]:border-warning", "data-[focus=true]:border-warning"],
label: "text-warning"
}
},
{
variant: "bordered",
color: "danger",
class: {
trigger: ["data-[open=true]:border-danger", "data-[focus=true]:border-danger"],
label: "text-danger"
}
},
{
labelPlacement: "inside",
color: "default",
class: {
label: "group-data-[filled=true]:text-default-600"
}
},
{
labelPlacement: "outside",
color: "default",
class: {
label: "group-data-[filled=true]:text-foreground"
}
},
{
radius: "full",
size: ["sm"],
class: {
trigger: "px-3"
}
},
{
radius: "full",
size: "md",
class: {
trigger: "px-4"
}
},
{
radius: "full",
size: "lg",
class: {
trigger: "px-5"
}
},
{
disableAnimation: false,
variant: ["faded", "bordered"],
class: {
trigger: "transition-colors motion-reduce:transition-none"
}
},
{
disableAnimation: false,
variant: "underlined",
class: {
trigger: "after:transition-width motion-reduce:after:transition-none"
}
},
{
variant: ["flat", "faded"],
class: {
trigger: [
...dataFocusVisibleClasses
]
}
},
{
isInvalid: true,
variant: "flat",
class: {
trigger: [
"bg-danger-50",
"data-[hover=true]:bg-danger-100",
"group-data-[focus=true]:bg-danger-50"
]
}
},
{
isInvalid: true,
variant: "bordered",
class: {
trigger: "!border-danger group-data-[focus=true]:border-danger"
}
},
{
isInvalid: true,
variant: "underlined",
class: {
trigger: "after:bg-danger"
}
},
{
labelPlacement: "inside",
size: "sm",
class: {
trigger: "h-12 min-h-12 py-1.5 px-3"
}
},
{
labelPlacement: "inside",
size: "md",
class: {
trigger: "h-14 min-h-14 py-2"
}
},
{
labelPlacement: "inside",
size: "lg",
class: {
label: "text-medium",
trigger: "h-16 min-h-16 py-2.5 gap-0"
}
},
{
labelPlacement: "outside",
isMultiline: false,
class: {
base: "group relative justify-end",
label: ["pb-0", "z-20", "top-1/2", "-translate-y-1/2", "group-data-[filled=true]:start-0"]
}
},
{
labelPlacement: ["inside"],
class: {
label: "group-data-[filled=true]:scale-85"
}
},
{
labelPlacement: "inside",
size: ["sm", "md"],
class: {
label: "text-small"
}
},
{
labelPlacement: "inside",
isMultiline: false,
size: "sm",
class: {
label: ["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_8px)]"],
innerWrapper: "group-data-[has-label=true]:pt-4"
}
},
{
labelPlacement: "inside",
isMultiline: false,
size: "md",
class: {
label: [
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px)]"
],
innerWrapper: "group-data-[has-label=true]:pt-4"
}
},
{
labelPlacement: "inside",
isMultiline: false,
size: "lg",
class: {
label: [
"text-medium",
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px)]"
],
innerWrapper: "group-data-[has-label=true]:pt-5"
}
},
{
labelPlacement: "inside",
variant: ["faded", "bordered"],
isMultiline: false,
size: "sm",
class: {
label: [
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_8px_-_theme(borderWidth.medium))]"
]
}
},
{
labelPlacement: "inside",
variant: ["faded", "bordered"],
isMultiline: false,
size: "md",
class: {
label: [
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px_-_theme(borderWidth.medium))]"
]
}
},
{
labelPlacement: "inside",
variant: ["faded", "bordered"],
isMultiline: false,
size: "lg",
class: {
label: [
"text-medium",
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px_-_theme(borderWidth.medium))]"
]
}
},
{
labelPlacement: "inside",
variant: "underlined",
isMultiline: false,
size: "sm",
class: {
label: ["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.tiny)/2_-_5px)]"]
}
},
{
labelPlacement: "inside",
variant: "underlined",
isMultiline: false,
size: "md",
class: {
label: [
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_3.5px)]"
]
}
},
{
labelPlacement: "inside",
variant: "underlined",
isMultiline: false,
size: "lg",
class: {
label: [
"text-medium",
"group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_4px)]"
]
}
},
{
labelPlacement: "outside",
size: "sm",
isMultiline: false,
class: {
label: [
"start-2",
"text-tiny",
"group-data-[filled=true]:-translate-y-[calc(100%_+_theme(fontSize.tiny)/2_+_16px)]"
],
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_8px)]"
}
},
{
labelPlacement: "outside",
isMultiline: false,
size: "md",
class: {
label: [
"start-3",
"text-small",
"group-data-[filled=true]:-translate-y-[calc(100%_+_theme(fontSize.small)/2_+_20px)]"
],
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_10px)]"
}
},
{
labelPlacement: "outside",
isMultiline: false,
size: "lg",
class: {
label: [
"start-3",
"text-medium",
"group-data-[filled=true]:-translate-y-[calc(100%_+_theme(fontSize.small)/2_+_24px)]"
],
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_12px)]"
}
},
{
labelPlacement: "outside",
isMultiline: true,
class: {
label: "pb-1.5"
}
},
{
labelPlacement: ["inside", "outside"],
class: {
label: ["pe-2", "max-w-full", "text-ellipsis", "overflow-hidden"]
}
}
]
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
select
});
@@ -0,0 +1,151 @@
# micromark-util-types
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][bundle-size-badge]][bundle-size]
[![Sponsors][sponsors-badge]][opencollective]
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
[micromark][] utility package with TypeScript types.
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package exposes TypeScript types shared throughout the micromark
ecosystem.
## When should I use this?
This package is useful when you are making your own, typed, micromark
extensions.
## Install
In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-types
```
In Deno with [`esm.sh`][esmsh]:
```js
import type {Point, /* … */} from 'https://esm.sh/micromark-util-types@1'
```
## Use
```js
/**
* @import {Point} from 'micromark-util-types'
*/
```
## API
This module exports no identifiers.
There is no default export.
See [the code][code] for all about the exposed types.
## Types
This package is just [TypeScript][] types.
It exports lots of different types.
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
`micromark-util-types@2`, compatible with Node.js 16.
This package works with `micromark@3`.
## Security
This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
## Contribute
See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organisation, or community you agree to
abide by its terms.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[author]: https://wooorm.com
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[build]: https://github.com/micromark/micromark/actions
[build-badge]: https://github.com/micromark/micromark/workflows/main/badge.svg
[bundle-size]: https://bundlejs.com/?q=micromark-util-encode
[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-encode
[chat]: https://github.com/micromark/micromark/discussions
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[code]: https://github.com/micromark/micromark/blob/main/packages/micromark-util-types/index.d.ts
[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
[coverage]: https://codecov.io/github/micromark/micromark
[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark.svg
[downloads]: https://www.npmjs.com/package/micromark-util-encode
[downloads-badge]: https://img.shields.io/npm/dm/micromark-util-encode.svg
[esmsh]: https://esm.sh
[health]: https://github.com/micromark/.github
[license]: https://github.com/micromark/micromark/blob/main/license
[micromark]: https://github.com/micromark/micromark
[npm]: https://docs.npmjs.com/cli/install
[opencollective]: https://opencollective.com/unified
[securitymd]: https://github.com/micromark/.github/blob/main/security.md
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[support]: https://github.com/micromark/.github/blob/main/support.md
[typescript]: https://www.typescriptlang.org
@@ -0,0 +1 @@
{"name":"for-each","version":"0.3.5","requiresBuild":false,"files":{".editorconfig":{"checkedAt":1794532096744,"integrity":"sha512-E+E+Jt9mMqQ3/p527H7Vvi+iad5ecPWcLdf+X2evqu+kHSBzo+gZ1clKPsY18+EBIxYx0S6rmmGzHTGeLDPW8Q==","mode":420,"size":286},".eslintrc":{"checkedAt":1794532096744,"integrity":"sha512-yUjfqCiOi8YPvkcQHKnfwkZemoWr/Uv3hqKvN1zwQh3CvYIhZD17UFbmXjt2aCL37wYmiZ/97H6DTjTGkasFtA==","mode":420,"size":618},".nycrc":{"checkedAt":1794532096744,"integrity":"sha512-wznegfVCLj51EK6A0WikoVtLVVI/n3v3LJdG8nmWHG85RFOAmzHAT5KcvLHUrUFI1h5Z7PlY9a3HkGqjRG2rEQ==","mode":420,"size":129},"LICENSE":{"checkedAt":1794532096745,"integrity":"sha512-u9u6uuScPROj4LZqoLu47F0tVYSBZOw2HIS58tjWzOq+bVwX9SS0zWNKC4D+UYcSFCsVCQ8CU3lXq1Wkji6XSQ==","mode":420,"size":1075},"index.js":{"checkedAt":1794532096745,"integrity":"sha512-d3UKaqvZZfAszOMssrYVB0rgYXi4UWkdyerN0SFFS+KtjA/fXloVzFsfmUWfBnRRrJccsnZn+dS9EHBsnr/C6A==","mode":420,"size":2374},"test/test.js":{"checkedAt":1794532096745,"integrity":"sha512-db1o+B2Po9Dnrw34EnHXtnn8k+ISTcysqjRGVq9CbPnaXST71tLTfrysGh6l71YsLIAYFjQ2KoxU+W07PQ5FHQ==","mode":420,"size":5947},"package.json":{"checkedAt":1794532096745,"integrity":"sha512-70afQfvmnYQWC2qnJUBbc2xKyEyHTrJlmEOSWewvmMR+ALTrVbnnUOXl2KRnZKR7pXbGuj7JrlWx4hPrcP/BPg==","mode":420,"size":1975},"tsconfig.json":{"checkedAt":1794532096745,"integrity":"sha512-fQwYCzBySTkCHnnMmndJsore3xKyLV90KgDmK7IyXZcVt1e7wzMQqQbBKE8P4i8wM7AN1Qq/Juh9LE12L8rg6Q==","mode":420,"size":94},"CHANGELOG.md":{"checkedAt":1794532096745,"integrity":"sha512-MNNkumYiGJAmxLWNZnbyzyZusD7cVl2DQf4YJMIU8El2Kgu8U5t3mdfWtUFtFAafYEW/5QI9g6HgQpv+7HGcNQ==","mode":420,"size":8896},"README.md":{"checkedAt":1794532096745,"integrity":"sha512-yfWn1Xkgf3twRYNG/A4vC+nIahZSPNLquN1cCki1I1cLLaXbsOvW/Fy2Ww1DVZdV+xm3Chkr3v+InR+BEBRFwg==","mode":420,"size":718},".github/SECURITY.md":{"checkedAt":1794532096746,"integrity":"sha512-snVKwoCFWKOPLXBcd2Z34hAPkUJmhJz5IhRQTIuPIQiJsTEH+++4CUjoxTGdAXAEUO+Bx31WW/vnb0rjSRQMPA==","mode":420,"size":157},"index.d.ts":{"checkedAt":1794532096746,"integrity":"sha512-m9ogixFm/eS9FnhH47jTTPCBFBr7r6YvOlRdC9UfEw2ojC5Kja4wWjHO5tpHgEEM394zfjQScgu2NmCkLVMMWA==","mode":420,"size":1067},".github/FUNDING.yml":{"checkedAt":1794532096746,"integrity":"sha512-C1/jQc/loippgsnJo+Or1WxpsQiqPgZ9JqKbwvtF+otOImsFrEx3WSb3ZX0ANEaMAFPzzoNAiy4yH7i33Kdx5g==","mode":420,"size":579}}}
@@ -0,0 +1,21 @@
export declare const PacketActionsExamples: {
GetPacketStatus: {
payload: {};
response: {
status: string;
};
};
SendPoke: {
payload: {
user_id: string;
};
response: {};
};
SetGroupTodo: {
payload: {
group_id: string;
message_id: string;
};
response: {};
};
};
@@ -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,19 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"id-length": [2, { "min": 1, "max": 35 }],
"max-params": [2, 4],
},
"overrides": [
{
"files": "test/**",
"rules": {
"max-lines-per-function": 0,
},
},
],
}
@@ -0,0 +1,46 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EntrustVersionInfo = exports.EntrustInfo = exports.EntrustInfoFlags = exports.id_entrust_entrustVersInfo = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
exports.id_entrust_entrustVersInfo = "1.2.840.113533.7.65.0";
var EntrustInfoFlags;
(function (EntrustInfoFlags) {
EntrustInfoFlags[EntrustInfoFlags["keyUpdateAllowed"] = 1] = "keyUpdateAllowed";
EntrustInfoFlags[EntrustInfoFlags["newExtensions"] = 2] = "newExtensions";
EntrustInfoFlags[EntrustInfoFlags["pKIXCertificate"] = 4] = "pKIXCertificate";
})(EntrustInfoFlags || (exports.EntrustInfoFlags = EntrustInfoFlags = {}));
class EntrustInfo extends asn1_schema_1.BitString {
toJSON() {
const res = [];
const flags = this.toNumber();
if (flags & EntrustInfoFlags.pKIXCertificate) {
res.push("pKIXCertificate");
}
if (flags & EntrustInfoFlags.newExtensions) {
res.push("newExtensions");
}
if (flags & EntrustInfoFlags.keyUpdateAllowed) {
res.push("keyUpdateAllowed");
}
return res;
}
toString() {
return `[${this.toJSON().join(", ")}]`;
}
}
exports.EntrustInfo = EntrustInfo;
class EntrustVersionInfo {
constructor(params = {}) {
this.entrustVers = "";
this.entrustInfoFlags = new EntrustInfo();
Object.assign(this, params);
}
}
exports.EntrustVersionInfo = EntrustVersionInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.GeneralString })
], EntrustVersionInfo.prototype, "entrustVers", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: EntrustInfo })
], EntrustVersionInfo.prototype, "entrustInfoFlags", void 0);
@@ -0,0 +1,111 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ZodError_js_1 = require("../ZodError.cjs");
const util_js_1 = require("../helpers/util.cjs");
const errorMap = (issue, _ctx) => {
let message;
switch (issue.code) {
case ZodError_js_1.ZodIssueCode.invalid_type:
if (issue.received === util_js_1.ZodParsedType.undefined) {
message = "Required";
}
else {
message = `Expected ${issue.expected}, received ${issue.received}`;
}
break;
case ZodError_js_1.ZodIssueCode.invalid_literal:
message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util_js_1.util.jsonStringifyReplacer)}`;
break;
case ZodError_js_1.ZodIssueCode.unrecognized_keys:
message = `Unrecognized key(s) in object: ${util_js_1.util.joinValues(issue.keys, ", ")}`;
break;
case ZodError_js_1.ZodIssueCode.invalid_union:
message = `Invalid input`;
break;
case ZodError_js_1.ZodIssueCode.invalid_union_discriminator:
message = `Invalid discriminator value. Expected ${util_js_1.util.joinValues(issue.options)}`;
break;
case ZodError_js_1.ZodIssueCode.invalid_enum_value:
message = `Invalid enum value. Expected ${util_js_1.util.joinValues(issue.options)}, received '${issue.received}'`;
break;
case ZodError_js_1.ZodIssueCode.invalid_arguments:
message = `Invalid function arguments`;
break;
case ZodError_js_1.ZodIssueCode.invalid_return_type:
message = `Invalid function return type`;
break;
case ZodError_js_1.ZodIssueCode.invalid_date:
message = `Invalid date`;
break;
case ZodError_js_1.ZodIssueCode.invalid_string:
if (typeof issue.validation === "object") {
if ("includes" in issue.validation) {
message = `Invalid input: must include "${issue.validation.includes}"`;
if (typeof issue.validation.position === "number") {
message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
}
}
else if ("startsWith" in issue.validation) {
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
}
else if ("endsWith" in issue.validation) {
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
}
else {
util_js_1.util.assertNever(issue.validation);
}
}
else if (issue.validation !== "regex") {
message = `Invalid ${issue.validation}`;
}
else {
message = "Invalid";
}
break;
case ZodError_js_1.ZodIssueCode.too_small:
if (issue.type === "array")
message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
else if (issue.type === "string")
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
else if (issue.type === "number")
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
else if (issue.type === "bigint")
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
else if (issue.type === "date")
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
else
message = "Invalid input";
break;
case ZodError_js_1.ZodIssueCode.too_big:
if (issue.type === "array")
message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
else if (issue.type === "string")
message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
else if (issue.type === "number")
message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
else if (issue.type === "bigint")
message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
else if (issue.type === "date")
message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;
else
message = "Invalid input";
break;
case ZodError_js_1.ZodIssueCode.custom:
message = `Invalid input`;
break;
case ZodError_js_1.ZodIssueCode.invalid_intersection_types:
message = `Intersection results could not be merged`;
break;
case ZodError_js_1.ZodIssueCode.not_multiple_of:
message = `Number must be a multiple of ${issue.multipleOf}`;
break;
case ZodError_js_1.ZodIssueCode.not_finite:
message = "Number must be finite";
break;
default:
message = _ctx.defaultError;
util_js_1.util.assertNever(issue);
}
return { message };
};
exports.default = errorMap;
@@ -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,110 @@
import $2kG2F$arAEmodulejs from "./ar-AE.module.js";
import $2kG2F$bgBGmodulejs from "./bg-BG.module.js";
import $2kG2F$csCZmodulejs from "./cs-CZ.module.js";
import $2kG2F$daDKmodulejs from "./da-DK.module.js";
import $2kG2F$deDEmodulejs from "./de-DE.module.js";
import $2kG2F$elGRmodulejs from "./el-GR.module.js";
import $2kG2F$enUSmodulejs from "./en-US.module.js";
import $2kG2F$esESmodulejs from "./es-ES.module.js";
import $2kG2F$etEEmodulejs from "./et-EE.module.js";
import $2kG2F$fiFImodulejs from "./fi-FI.module.js";
import $2kG2F$frFRmodulejs from "./fr-FR.module.js";
import $2kG2F$heILmodulejs from "./he-IL.module.js";
import $2kG2F$hrHRmodulejs from "./hr-HR.module.js";
import $2kG2F$huHUmodulejs from "./hu-HU.module.js";
import $2kG2F$itITmodulejs from "./it-IT.module.js";
import $2kG2F$jaJPmodulejs from "./ja-JP.module.js";
import $2kG2F$koKRmodulejs from "./ko-KR.module.js";
import $2kG2F$ltLTmodulejs from "./lt-LT.module.js";
import $2kG2F$lvLVmodulejs from "./lv-LV.module.js";
import $2kG2F$nbNOmodulejs from "./nb-NO.module.js";
import $2kG2F$nlNLmodulejs from "./nl-NL.module.js";
import $2kG2F$plPLmodulejs from "./pl-PL.module.js";
import $2kG2F$ptBRmodulejs from "./pt-BR.module.js";
import $2kG2F$ptPTmodulejs from "./pt-PT.module.js";
import $2kG2F$roROmodulejs from "./ro-RO.module.js";
import $2kG2F$ruRUmodulejs from "./ru-RU.module.js";
import $2kG2F$skSKmodulejs from "./sk-SK.module.js";
import $2kG2F$slSImodulejs from "./sl-SI.module.js";
import $2kG2F$srSPmodulejs from "./sr-SP.module.js";
import $2kG2F$svSEmodulejs from "./sv-SE.module.js";
import $2kG2F$trTRmodulejs from "./tr-TR.module.js";
import $2kG2F$ukUAmodulejs from "./uk-UA.module.js";
import $2kG2F$zhCNmodulejs from "./zh-CN.module.js";
import $2kG2F$zhTWmodulejs from "./zh-TW.module.js";
var $7476b46781682bf5$exports = {};
$7476b46781682bf5$exports = {
"ar-AE": $2kG2F$arAEmodulejs,
"bg-BG": $2kG2F$bgBGmodulejs,
"cs-CZ": $2kG2F$csCZmodulejs,
"da-DK": $2kG2F$daDKmodulejs,
"de-DE": $2kG2F$deDEmodulejs,
"el-GR": $2kG2F$elGRmodulejs,
"en-US": $2kG2F$enUSmodulejs,
"es-ES": $2kG2F$esESmodulejs,
"et-EE": $2kG2F$etEEmodulejs,
"fi-FI": $2kG2F$fiFImodulejs,
"fr-FR": $2kG2F$frFRmodulejs,
"he-IL": $2kG2F$heILmodulejs,
"hr-HR": $2kG2F$hrHRmodulejs,
"hu-HU": $2kG2F$huHUmodulejs,
"it-IT": $2kG2F$itITmodulejs,
"ja-JP": $2kG2F$jaJPmodulejs,
"ko-KR": $2kG2F$koKRmodulejs,
"lt-LT": $2kG2F$ltLTmodulejs,
"lv-LV": $2kG2F$lvLVmodulejs,
"nb-NO": $2kG2F$nbNOmodulejs,
"nl-NL": $2kG2F$nlNLmodulejs,
"pl-PL": $2kG2F$plPLmodulejs,
"pt-BR": $2kG2F$ptBRmodulejs,
"pt-PT": $2kG2F$ptPTmodulejs,
"ro-RO": $2kG2F$roROmodulejs,
"ru-RU": $2kG2F$ruRUmodulejs,
"sk-SK": $2kG2F$skSKmodulejs,
"sl-SI": $2kG2F$slSImodulejs,
"sr-SP": $2kG2F$srSPmodulejs,
"sv-SE": $2kG2F$svSEmodulejs,
"tr-TR": $2kG2F$trTRmodulejs,
"uk-UA": $2kG2F$ukUAmodulejs,
"zh-CN": $2kG2F$zhCNmodulejs,
"zh-TW": $2kG2F$zhTWmodulejs
};
export {$7476b46781682bf5$exports as default};
//# sourceMappingURL=intlStrings.module.js.map
@@ -0,0 +1,32 @@
If you'd like to use [react without JSX](https://reactjs.org/docs/react-without-jsx.html) you can:
```js harmony
import React, {useCallback, useState} from 'react';
import {useDropzone} from 'react-dropzone';
const e = React.createElement
function Basic () {
const [files, setFiles] = useState([]);
const onDrop = useCallback(files => setFiles(files), [setFiles]);
const {getRootProps, getInputProps} = useDropzone({onDrop});
const fileList = files.map(
file => React.createElement('li', {key: file.name}, `${file.name} - ${file.size} bytes`)
);
return e('section', {className: 'container'}, [
e('div', getRootProps({className: 'dropzone', key: 'dropzone'}), [
e('input', getInputProps({key: 'input'})),
e('p', {key: 'desc'}, "Drag 'n' drop some files here, or click to select files")
]),
e('aside', {key: 'filesContainer'}, [
e('h4', {key: 'title'}, 'Files'),
e('ul', {key: 'fileList'}, fileList)
])
]);
}
Basic()
```
@@ -0,0 +1,47 @@
import { GroupAnimationWithThen } from 'motion-dom';
import { removeItem } from 'motion-utils';
import { animateSequence } from './sequence.mjs';
import { animateSubject } from './subject.mjs';
function isSequence(value) {
return Array.isArray(value) && value.some(Array.isArray);
}
/**
* Creates an animation function that is optionally scoped
* to a specific element.
*/
function createScopedAnimate(scope) {
/**
* Implementation
*/
function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) {
let animations = [];
let animationOnComplete;
if (isSequence(subjectOrSequence)) {
animations = animateSequence(subjectOrSequence, optionsOrKeyframes, scope);
}
else {
// Extract top-level onComplete so it doesn't get applied per-value
const { onComplete, ...rest } = options || {};
if (typeof onComplete === "function") {
animationOnComplete = onComplete;
}
animations = animateSubject(subjectOrSequence, optionsOrKeyframes, rest, scope);
}
const animation = new GroupAnimationWithThen(animations);
if (animationOnComplete) {
animation.finished.then(animationOnComplete);
}
if (scope) {
scope.animations.push(animation);
animation.finished.then(() => {
removeItem(scope.animations, animation);
});
}
return animation;
}
return scopedAnimate;
}
const animate = createScopedAnimate();
export { animate, createScopedAnimate };
@@ -0,0 +1,45 @@
var baseIteratee = require('./_baseIteratee'),
baseWhile = require('./_baseWhile');
/**
* Creates a slice of `array` excluding elements dropped from the end.
* Elements are dropped until `predicate` returns falsey. The predicate is
* invoked with three arguments: (value, index, array).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the slice of `array`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': false }
* ];
*
* _.dropRightWhile(users, function(o) { return !o.active; });
* // => objects for ['barney']
*
* // The `_.matches` iteratee shorthand.
* _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
* // => objects for ['barney', 'fred']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.dropRightWhile(users, ['active', false]);
* // => objects for ['barney']
*
* // The `_.property` iteratee shorthand.
* _.dropRightWhile(users, 'active');
* // => objects for ['barney', 'fred', 'pebbles']
*/
function dropRightWhile(array, predicate) {
return (array && array.length)
? baseWhile(array, baseIteratee(predicate, 3), true, true)
: [];
}
module.exports = dropRightWhile;
@@ -0,0 +1 @@
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAKM,SAAS,0CAAgB,MAAsB,EAAE,YAAmB;IACzE,MAAM,iBAAiB,CAAA,GAAA,mBAAK,EAAE;IAC9B,MAAM,WAAW,CAAA,GAAA,mBAAK,EAAgB;IAEtC,CAAA,GAAA,sBAAQ,EAAE;QACR,eAAe,OAAO,GAAG;QACzB,OAAO;YACL,eAAe,OAAO,GAAG;QAC3B;IACF,GAAG,EAAE;IAEL,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,WAAW,SAAS,OAAO;QAC/B,IAAI,eAAe,OAAO,EACxB,eAAe,OAAO,GAAG;aACpB,IAAI,CAAC,YAAY,aAAa,IAAI,CAAC,CAAC,KAAK,IAAM,CAAC,OAAO,EAAE,CAAC,KAAK,QAAQ,CAAC,EAAE,IAC/E;QAEF,SAAS,OAAO,GAAG;IACnB,uDAAuD;IACzD,GAAG;AACL","sources":["packages/@react-aria/utils/src/useUpdateEffect.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {EffectCallback, useEffect, useRef} from 'react';\n\n// Like useEffect, but only called for updates after the initial render.\nexport function useUpdateEffect(effect: EffectCallback, dependencies: any[]): void {\n const isInitialMount = useRef(true);\n const lastDeps = useRef<any[] | null>(null);\n\n useEffect(() => {\n isInitialMount.current = true;\n return () => {\n isInitialMount.current = false;\n };\n }, []);\n\n useEffect(() => {\n let prevDeps = lastDeps.current;\n if (isInitialMount.current) {\n isInitialMount.current = false;\n } else if (!prevDeps || dependencies.some((dep, i) => !Object.is(dep, prevDeps[i]))) {\n effect();\n }\n lastDeps.current = dependencies;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencies);\n}\n"],"names":[],"version":3,"file":"useUpdateEffect.main.js.map"}
@@ -0,0 +1,19 @@
'use strict';
var identity = require('../../nodes/identity.js');
var YAMLMap = require('../../nodes/YAMLMap.js');
const map = {
collection: 'map',
default: true,
nodeClass: YAMLMap.YAMLMap,
tag: 'tag:yaml.org,2002:map',
resolve(map, onError) {
if (!identity.isMap(map))
onError('Expected a mapping for this tag');
return map;
},
createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)
};
exports.map = map;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more