docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Type Check & Test (push) Waiting to run

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 @@
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAqB,MAAM,gBAAgB,CAAC;AAEhE,UAAU,kBAAkB;IACxB,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,gGAAgG;IAChG,MAAM,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,qBAAsB,SAAQ,kBAAkB;IACtD,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED,oBAAY,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AACpD,oBAAY,SAAS,GACf,IAAI,GACJ,OAAO,GACP,qBAAqB,GACrB,OAAO,GACP,KAAK,GAEL,QAAQ,CAAC;AACf,oBAAY,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAE7C;;;GAGG;AACH,8BAAsB,IAAI;IACtB,4BAA4B;IAC5B,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAEpC,yBAAyB;IACzB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAQ;IAEjC,uBAAuB;IACvB,IAAI,EAAE,SAAS,GAAG,IAAI,CAAQ;IAE9B,mBAAmB;IACnB,IAAI,EAAE,SAAS,GAAG,IAAI,CAAQ;IAE9B,2FAA2F;IAC3F,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEjC,uFAAuF;IACvF,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAI/C;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAInC;;;OAGG;IACH,IAAI,UAAU,IAAI,UAAU,GAAG,IAAI,CAElC;IAED,IAAI,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,EAEvC;IAED;;;OAGG;IACH,IAAI,eAAe,IAAI,SAAS,GAAG,IAAI,CAEtC;IAED,IAAI,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,EAEzC;IAED;;;OAGG;IACH,IAAI,WAAW,IAAI,SAAS,GAAG,IAAI,CAElC;IAED,IAAI,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,EAErC;IAED;;;;;OAKG;IACH,SAAS,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,UAAQ,GAAG,CAAC;CAG3D;AAED;;GAEG;AACH,8BAAsB,QAAS,SAAQ,IAAI;IAIpB,IAAI,EAAE,MAAM;IAH/B;;OAEG;gBACgB,IAAI,EAAE,MAAM;IAI/B;;;OAGG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,SAAS,CAAC,IAAI,EAAE,MAAM,EAEzB;CACJ;AAED;;GAEG;AACH,qBAAa,IAAK,SAAQ,QAAQ;IAC9B,IAAI,EAAE,WAAW,CAAC,IAAI,CAAoB;IAE1C,IAAI,QAAQ,IAAI,CAAC,CAEhB;CACJ;AAED;;GAEG;AACH,qBAAa,OAAQ,SAAQ,QAAQ;IACjC,IAAI,EAAE,WAAW,CAAC,OAAO,CAAuB;IAEhD,IAAI,QAAQ,IAAI,CAAC,CAEhB;CACJ;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,QAAQ;IAG5B,IAAI,EAAE,MAAM;IAF/B,IAAI,EAAE,WAAW,CAAC,SAAS,CAAyB;gBAEjC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAI7C,IAAa,QAAQ,IAAI,CAAC,CAEzB;IAED,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,8BAAsB,gBAAiB,SAAQ,IAAI;IAI5B,QAAQ,EAAE,SAAS,EAAE;IAHxC;;OAEG;gBACgB,QAAQ,EAAE,SAAS,EAAE;IAKxC,+BAA+B;IAC/B,IAAI,UAAU,IAAI,SAAS,GAAG,IAAI,CAEjC;IAED,8BAA8B;IAC9B,IAAI,SAAS,IAAI,SAAS,GAAG,IAAI,CAIhC;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,SAAS,EAAE,CAE5B;IAED,IAAI,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,EAEnC;CACJ;AAED,qBAAa,KAAM,SAAQ,gBAAgB;IACvC,IAAI,EAAE,WAAW,CAAC,KAAK,CAAqB;IAE5C,IAAI,QAAQ,IAAI,CAAC,CAEhB;CACJ;AAED;;GAEG;AACH,qBAAa,QAAS,SAAQ,gBAAgB;IAC1C,IAAI,EAAE,WAAW,CAAC,IAAI,CAAoB;IAE1C,IAAI,QAAQ,IAAI,CAAC,CAEhB;IAED,mGAAmG;IACnG,QAAQ,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,gBAAgB,CAAC;CACxD;AAED;;GAEG;AACH,UAAU,SAAS;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,qBAAa,OAAQ,SAAQ,gBAAgB;IAO9B,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;IAEnC,IAAI,EACL,WAAW,CAAC,GAAG,GACf,WAAW,CAAC,MAAM,GAClB,WAAW,CAAC,KAAK;IAZ3B;;;;OAIG;gBAEQ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,EAC1C,QAAQ,GAAE,SAAS,EAAO,EACnB,IAAI,GACL,WAAW,CAAC,GAAG,GACf,WAAW,CAAC,MAAM,GAClB,WAAW,CAAC,KAIG;IAKzB,IAAI,QAAQ,IAAI,CAAC,CAEhB;IAED;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAIlD;;;OAGG;IACH,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,OAAO,CAAC,IAAI,EAAE,MAAM,EAEvB;IAED,IAAI,UAAU,IAAI,SAAS,EAAE,CAO5B;IAED,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,OAAO,CAEjD;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,KAAK,CAEjD;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,IAAI,CAE/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,OAAO,CAErD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,qBAAqB,CAErE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,QAAQ,CAEvD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,UAAU,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,UAAQ,GAAG,CAAC,CA4DvE"}
@@ -0,0 +1,10 @@
module.exports = function (x, opts) {
/**
* This file is purposefully a passthrough. It's expected that third-party
* environments will override it at runtime in order to inject special logic
* into `resolve` (by manipulating the options). One such example is the PnP
* code path in Yarn.
*/
return opts || {};
};
@@ -0,0 +1,184 @@
import vm from 'node:vm';
import { createRule } from '../utils/index.js';
export default createRule({
name: 'dynamic-import-chunkname',
meta: {
type: 'suggestion',
docs: {
category: 'Style guide',
description: 'Enforce a leading comment with the webpackChunkName for dynamic imports.',
},
hasSuggestions: true,
schema: [
{
type: 'object',
properties: {
importFunctions: {
type: 'array',
uniqueItems: true,
items: {
type: 'string',
},
},
allowEmpty: {
type: 'boolean',
},
webpackChunknameFormat: {
type: 'string',
},
},
},
],
messages: {
leadingComment: 'dynamic imports require a leading comment with the webpack chunkname',
blockComment: 'dynamic imports require a /* foo */ style comment, not a // foo comment',
paddedSpaces: 'dynamic imports require a block comment padded with spaces - /* foo */',
webpackComment: 'dynamic imports require a "webpack" comment with valid syntax',
chunknameFormat: 'dynamic imports require a leading comment in the form /* {{format}} */',
webpackEagerModeNoChunkName: 'dynamic imports using eager mode do not need a webpackChunkName',
webpackRemoveEagerMode: 'Remove webpackMode',
webpackRemoveChunkName: 'Remove webpackChunkName',
},
},
defaultOptions: [],
create(context) {
const { importFunctions = [], allowEmpty = false, webpackChunknameFormat = String.raw `([0-9a-zA-Z-_/.]|\[(request|index)\])+`, } = context.options[0] || {};
const paddedCommentRegex = /^ (\S[\S\s]+\S) $/;
const commentStyleRegex = /^( (((webpackChunkName|webpackFetchPriority): .+)|((webpackPrefetch|webpackPreload): (true|false|-?\d+))|(webpackIgnore: (true|false))|((webpackInclude|webpackExclude): \/.+\/)|(webpackMode: ["'](lazy|lazy-once|eager|weak)["'])|(webpackExports: (["']\w+["']|\[(["']\w+["'], *)+(["']\w+["']*)]))),?)+ $/;
const chunkSubstrFormat = `webpackChunkName: ["']${webpackChunknameFormat}["'],?`;
const chunkSubstrRegex = new RegExp(chunkSubstrFormat);
const eagerModeFormat = `webpackMode: ["']eager["'],?`;
const eagerModeRegex = new RegExp(eagerModeFormat);
function run(node, arg) {
const { sourceCode } = context;
const leadingComments = sourceCode.getCommentsBefore(arg);
if ((!leadingComments || leadingComments.length === 0) && !allowEmpty) {
context.report({
node,
messageId: 'leadingComment',
});
return;
}
let isChunknamePresent = false;
let isEagerModePresent = false;
for (const comment of leadingComments) {
if (comment.type !== 'Block') {
context.report({
node,
messageId: 'blockComment',
});
return;
}
if (!paddedCommentRegex.test(comment.value)) {
context.report({
node,
messageId: 'paddedSpaces',
});
return;
}
try {
vm.runInNewContext(`(function() {return {${comment.value}}})()`);
}
catch {
context.report({
node,
messageId: 'webpackComment',
});
return;
}
if (!commentStyleRegex.test(comment.value)) {
context.report({
node,
messageId: 'webpackComment',
});
return;
}
if (eagerModeRegex.test(comment.value)) {
isEagerModePresent = true;
}
if (chunkSubstrRegex.test(comment.value)) {
isChunknamePresent = true;
}
}
const removeCommentsAndLeadingSpaces = (fixer, comment) => {
const leftToken = sourceCode.getTokenBefore(comment);
const leftComments = sourceCode.getCommentsBefore(comment);
if (leftToken) {
if (leftComments.length > 0) {
return fixer.removeRange([
Math.max(leftToken.range[1], leftComments[leftComments.length - 1].range[1]),
comment.range[1],
]);
}
return fixer.removeRange([leftToken.range[1], comment.range[1]]);
}
return fixer.remove(comment);
};
if (isChunknamePresent && isEagerModePresent) {
context.report({
node,
messageId: 'webpackEagerModeNoChunkName',
suggest: [
{
messageId: 'webpackRemoveChunkName',
fix(fixer) {
for (const comment of leadingComments) {
if (chunkSubstrRegex.test(comment.value)) {
const replacement = comment.value
.replace(chunkSubstrRegex, '')
.trim()
.replace(/,$/, '');
return replacement === ''
? removeCommentsAndLeadingSpaces(fixer, comment)
: fixer.replaceText(comment, `/* ${replacement} */`);
}
}
return null;
},
},
{
messageId: 'webpackRemoveEagerMode',
fix(fixer) {
for (const comment of leadingComments) {
if (eagerModeRegex.test(comment.value)) {
const replacement = comment.value
.replace(eagerModeRegex, '')
.trim()
.replace(/,$/, '');
return replacement === ''
? removeCommentsAndLeadingSpaces(fixer, comment)
: fixer.replaceText(comment, `/* ${replacement} */`);
}
}
return null;
},
},
],
});
}
if (!isChunknamePresent && !allowEmpty && !isEagerModePresent) {
context.report({
node,
messageId: 'chunknameFormat',
data: {
format: chunkSubstrFormat,
},
});
}
}
return {
ImportExpression(node) {
run(node, node.source);
},
CallExpression(node) {
if (node.callee.type !== 'Import' &&
(!('name' in node.callee) ||
!importFunctions.includes(node.callee.name))) {
return;
}
run(node, node.arguments[0]);
},
};
},
});
//# sourceMappingURL=dynamic-import-chunkname.js.map
@@ -0,0 +1,62 @@
{
"name": "to-buffer",
"version": "1.2.2",
"description": "Pass in a string, array, Buffer, Data View, or Uint8Array, and get a Buffer back.",
"main": "index.js",
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"lint": "eslint --ext=js,mjs .",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*'",
"test": "npm run tests-only",
"posttest": "npx npm@\">= 10.2\" audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "https://github.com/browserify/to-buffer.git"
},
"author": "Mathias Buus (@mafintosh)",
"license": "MIT",
"bugs": {
"url": "https://github.com/browserify/to-buffer/issues"
},
"homepage": "https://github.com/browserify/to-buffer",
"dependencies": {
"isarray": "^2.0.5",
"safe-buffer": "^5.2.1",
"typed-array-buffer": "^1.0.3"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.2.0",
"auto-changelog": "^2.5.0",
"available-typed-arrays": "^1.0.7",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"for-each": "^0.3.5",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"tape": "^5.9.0"
},
"engines": {
"node": ">= 0.4"
},
"publishConfig": {
"ignore": [
".github/workflows",
".eslintrc",
".nycrc",
"test"
]
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
}
}
@@ -0,0 +1,9 @@
export default function instanceCachingFactory(factoryFunc) {
var instance;
return function (dependencyContainer) {
if (instance == undefined) {
instance = factoryFunc(dependencyContainer);
}
return instance;
};
}
@@ -0,0 +1,47 @@
{
"name": "base64-js",
"description": "Base64 encoding/decoding in pure JS",
"version": "1.5.1",
"author": "T. Jameson Little <t.jameson.little@gmail.com>",
"typings": "index.d.ts",
"bugs": {
"url": "https://github.com/beatgammit/base64-js/issues"
},
"devDependencies": {
"babel-minify": "^0.5.1",
"benchmark": "^2.1.4",
"browserify": "^16.3.0",
"standard": "*",
"tape": "4.x"
},
"homepage": "https://github.com/beatgammit/base64-js",
"keywords": [
"base64"
],
"license": "MIT",
"main": "index.js",
"repository": {
"type": "git",
"url": "git://github.com/beatgammit/base64-js.git"
},
"scripts": {
"build": "browserify -s base64js -r ./ | minify > base64js.min.js",
"lint": "standard",
"test": "npm run lint && npm run unit",
"unit": "tape test/*.js"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
}
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=no-arrow-function-lifecycle.d.ts.map
@@ -0,0 +1,344 @@
import type {Program} from 'estree-jsx'
import type {Data as HastData, ElementContent, Parent as HastParent} from 'hast'
import type {
BlockContent,
Data as MdastData,
DefinitionContent,
Parent as MdastParent,
PhrasingContent
} from 'mdast'
import type {Data, Node} from 'unist'
import type {Tag} from './lib/index.js'
// Expose JavaScript API.
export {mdxJsxFromMarkdown, mdxJsxToMarkdown} from './lib/index.js'
// Expose options.
export type {ToMarkdownOptions} from './lib/index.js'
// Expose node types.
/**
* MDX JSX attribute value set to an expression.
*
* ```markdown
* > | <a b={c} />
* ^^^
* ```
*/
export interface MdxJsxAttributeValueExpression extends Node {
/**
* Node type.
*/
type: 'mdxJsxAttributeValueExpression'
/**
* Value.
*/
value: string
/**
* Data associated with the mdast MDX JSX attribute value expression.
*/
data?: MdxJsxAttributeValueExpressionData | undefined
}
/**
* Info associated with mdast MDX JSX attribute value expression nodes by the
* ecosystem.
*/
export interface MdxJsxAttributeValueExpressionData extends Data {
/**
* Program node from estree.
*/
estree?: Program | null | undefined
}
/**
* MDX JSX attribute as an expression.
*
* ```markdown
* > | <a {...b} />
* ^^^^^^
* ```
*/
export interface MdxJsxExpressionAttribute extends Node {
/**
* Node type.
*/
type: 'mdxJsxExpressionAttribute'
/**
* Value.
*/
value: string
/**
* Data associated with the mdast MDX JSX expression attributes.
*/
data?: MdxJsxExpressionAttributeData | undefined
}
/**
* Info associated with mdast MDX JSX expression attribute nodes by the
* ecosystem.
*/
export interface MdxJsxExpressionAttributeData extends Data {
/**
* Program node from estree.
*/
estree?: Program | null | undefined
}
/**
* MDX JSX attribute with a key.
*
* ```markdown
* > | <a b="c" />
* ^^^^^
* ```
*/
export interface MdxJsxAttribute extends Node {
/**
* Node type.
*/
type: 'mdxJsxAttribute'
/**
* Attribute name.
*/
name: string
/**
* Attribute value.
*/
value?: MdxJsxAttributeValueExpression | string | null | undefined
/**
* Data associated with the mdast MDX JSX attribute.
*/
data?: MdxJsxAttributeData | undefined
}
/**
* Info associated with mdast MDX JSX attribute nodes by the
* ecosystem.
*/
export interface MdxJsxAttributeData extends Data {}
/**
* MDX JSX element node, occurring in flow (block).
*/
export interface MdxJsxFlowElement extends MdastParent {
/**
* Node type.
*/
type: 'mdxJsxFlowElement'
/**
* MDX JSX element name (`null` for fragments).
*/
name: string | null
/**
* MDX JSX element attributes.
*/
attributes: Array<MdxJsxAttribute | MdxJsxExpressionAttribute>
/**
* Content.
*/
children: Array<BlockContent | DefinitionContent>
/**
* Data associated with the mdast MDX JSX elements (flow).
*/
data?: MdxJsxFlowElementData | undefined
}
/**
* Info associated with mdast MDX JSX element (flow) nodes by the
* ecosystem.
*/
export interface MdxJsxFlowElementData extends MdastData {}
/**
* MDX JSX element node, occurring in text (phrasing).
*/
export interface MdxJsxTextElement extends MdastParent {
/**
* Node type.
*/
type: 'mdxJsxTextElement'
/**
* MDX JSX element name (`null` for fragments).
*/
name: string | null
/**
* MDX JSX element attributes.
*/
attributes: Array<MdxJsxAttribute | MdxJsxExpressionAttribute>
/**
* Content.
*/
children: PhrasingContent[]
/**
* Data associated with the mdast MDX JSX elements (text).
*/
data?: MdxJsxTextElementData | undefined
}
/**
* Info associated with mdast MDX JSX element (text) nodes by the
* ecosystem.
*/
export interface MdxJsxTextElementData extends MdastData {}
/**
* MDX JSX element node, occurring in flow (block), for hast.
*/
export interface MdxJsxFlowElementHast extends HastParent {
/**
* Node type.
*/
type: 'mdxJsxFlowElement'
/**
* MDX JSX element name (`null` for fragments).
*/
name: string | null
/**
* MDX JSX element attributes.
*/
attributes: Array<MdxJsxAttribute | MdxJsxExpressionAttribute>
/**
* Content.
*/
children: ElementContent[]
/**
* Data associated with the hast MDX JSX elements (flow).
*/
data?: MdxJsxFlowElementHastData | undefined
}
/**
* Info associated with hast MDX JSX element (flow) nodes by the
* ecosystem.
*/
export interface MdxJsxFlowElementHastData extends HastData {}
/**
* MDX JSX element node, occurring in text (phrasing), for hast.
*/
export interface MdxJsxTextElementHast extends HastParent {
/**
* Node type.
*/
type: 'mdxJsxTextElement'
/**
* MDX JSX element name (`null` for fragments).
*/
name: string | null
/**
* MDX JSX element attributes.
*/
attributes: Array<MdxJsxAttribute | MdxJsxExpressionAttribute>
/**
* Content.
*/
children: ElementContent[]
/**
* Data associated with the hast MDX JSX elements (text).
*/
data?: MdxJsxTextElementHastData | undefined
}
/**
* Info associated with hast MDX JSX element (text) nodes by the
* ecosystem.
*/
export interface MdxJsxTextElementHastData extends HastData {}
// Add nodes to mdast content.
declare module 'mdast' {
interface BlockContentMap {
/**
* MDX JSX element node, occurring in flow (block).
*/
mdxJsxFlowElement: MdxJsxFlowElement
}
interface PhrasingContentMap {
/**
* MDX JSX element node, occurring in text (phrasing).
*/
mdxJsxTextElement: MdxJsxTextElement
}
interface RootContentMap {
/**
* MDX JSX element node, occurring in flow (block).
*/
mdxJsxFlowElement: MdxJsxFlowElement
/**
* MDX JSX element node, occurring in text (phrasing).
*/
mdxJsxTextElement: MdxJsxTextElement
}
}
// Add nodes to hast content.
declare module 'hast' {
interface ElementContentMap {
/**
* MDX JSX element node, occurring in text (phrasing).
*/
mdxJsxTextElement: MdxJsxTextElementHast
/**
* MDX JSX element node, occurring in flow (block).
*/
mdxJsxFlowElement: MdxJsxFlowElementHast
}
interface RootContentMap {
/**
* MDX JSX element node, occurring in text (phrasing).
*/
mdxJsxTextElement: MdxJsxTextElementHast
/**
* MDX JSX element node, occurring in flow (block).
*/
mdxJsxFlowElement: MdxJsxFlowElementHast
}
}
// Add custom data tracked to turn markdown into a tree.
declare module 'mdast-util-from-markdown' {
interface CompileData {
/**
* Current MDX JSX tag.
*/
mdxJsxTag?: Tag | undefined
/**
* Current stack of open MDX JSX tags.
*/
mdxJsxTagStack?: Tag[] | undefined
}
}
// Add custom data tracked to turn a syntax tree into markdown.
declare module 'mdast-util-to-markdown' {
interface ConstructNameMap {
/**
* Whole JSX element, in flow.
*
* ```markdown
* > | <a />
* ^^^^^
* ```
*/
mdxJsxFlowElement: 'mdxJsxFlowElement'
/**
* Whole JSX element, in text.
*
* ```markdown
* > | a <b />.
* ^^^^^
* ```
*/
mdxJsxTextElement: 'mdxJsxTextElement'
}
}
@@ -0,0 +1,96 @@
/*
* 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';
// This is a polyfill for element.focus({preventScroll: true});
// Currently necessary for Safari and old Edge:
// https://caniuse.com/#feat=mdn-api_htmlelement_focus_preventscroll_option
// See https://bugs.webkit.org/show_bug.cgi?id=178583
//
// Original licensing for the following methods can be found in the
// NOTICE file in the root directory of this source tree.
// See https://github.com/calvellido/focus-options-polyfill
interface ScrollableElement {
element: HTMLElement,
scrollTop: number,
scrollLeft: number
}
export function focusWithoutScrolling(element: FocusableElement): void {
if (supportsPreventScroll()) {
element.focus({preventScroll: true});
} else {
let scrollableElements = getScrollableElements(element);
element.focus();
restoreScrollPosition(scrollableElements);
}
}
let supportsPreventScrollCached: boolean | null = null;
function supportsPreventScroll() {
if (supportsPreventScrollCached == null) {
supportsPreventScrollCached = false;
try {
let focusElem = document.createElement('div');
focusElem.focus({
get preventScroll() {
supportsPreventScrollCached = true;
return true;
}
});
} catch {
// Ignore
}
}
return supportsPreventScrollCached;
}
function getScrollableElements(element: FocusableElement): ScrollableElement[] {
let parent = element.parentNode;
let scrollableElements: ScrollableElement[] = [];
let rootScrollingElement = document.scrollingElement || document.documentElement;
while (parent instanceof HTMLElement && parent !== rootScrollingElement) {
if (
parent.offsetHeight < parent.scrollHeight ||
parent.offsetWidth < parent.scrollWidth
) {
scrollableElements.push({
element: parent,
scrollTop: parent.scrollTop,
scrollLeft: parent.scrollLeft
});
}
parent = parent.parentNode;
}
if (rootScrollingElement instanceof HTMLElement) {
scrollableElements.push({
element: rootScrollingElement,
scrollTop: rootScrollingElement.scrollTop,
scrollLeft: rootScrollingElement.scrollLeft
});
}
return scrollableElements;
}
function restoreScrollPosition(scrollableElements: ScrollableElement[]) {
for (let {element, scrollTop, scrollLeft} of scrollableElements) {
element.scrollTop = scrollTop;
element.scrollLeft = scrollLeft;
}
}
@@ -0,0 +1,7 @@
export interface Options {
allow?: string[];
forbid?: string[];
}
export type MessageId = 'noAllowed';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noAllowed", [(Options | undefined)?], import("../utils/create-rule.ts").ImportXPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,21 @@
{
"name": "@react-types/accordion",
"version": "3.0.0-alpha.26",
"description": "Spectrum UI components in React",
"license": "Apache-2.0",
"types": "src/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@react-types/shared": "^3.27.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},
"publishConfig": {
"access": "public"
},
"gitHead": "09e7f44bebdc9d89122926b2b439a0a38a2814ea"
}
@@ -0,0 +1,102 @@
const {buildOptions,registerCommonValueParsers} = require("./ParserOptionsBuilder");
class OutputBuilder{
constructor(options){
this.options = buildOptions(options);
this.registeredParsers = registerCommonValueParsers(this.options);
}
registerValueParser(name,parserInstance){//existing name will override the parser without warning
this.registeredParsers[name] = parserInstance;
}
getInstance(parserOptions){
return new JsMinArrBuilder(parserOptions, this.options, this.registeredParsers);
}
}
const BaseOutputBuilder = require("./BaseOutputBuilder");
const rootName = '^';
class JsMinArrBuilder extends BaseOutputBuilder{
constructor(parserOptions, options,registeredParsers) {
super();
this.tagsStack = [];
this.parserOptions = parserOptions;
this.options = options;
this.registeredParsers = registeredParsers;
this.root = {[rootName]: []};
this.currentNode = this.root;
this.currentNodeTagName = rootName;
this.attributes = {};
}
addTag(tag){
//when a new tag is added, it should be added as child of current node
//TODO: shift this check to the parser
if(tag.name === "__proto__") tag.name = "#__proto__";
this.tagsStack.push([this.currentNodeTagName,this.currentNode]); //this.currentNode is parent node here
this.currentNodeTagName = tag.name;
this.currentNode = { [tag.name]:[]}
if(Object.keys(this.attributes).length > 0){
this.currentNode[":@"] = this.attributes;
this.attributes = {};
}
}
/**
* Check if the node should be added by checking user's preference
* @param {Node} node
* @returns boolean: true if the node should not be added
*/
closeTag(){
const node = this.currentNode;
const nodeName = this.currentNodeTagName;
const arr = this.tagsStack.pop(); //set parent node in scope
this.currentNodeTagName = arr[0];
this.currentNode = arr[1];
if(this.options.onClose !== undefined){
//TODO TagPathMatcher
const resultTag = this.options.onClose(node,
new TagPathMatcher(this.tagsStack,node));
if(resultTag) return;
}
this.currentNode[this.currentNodeTagName].push(node); //to parent node
}
//Called by parent class methods
_addChild(key, val){
// if(key === "__proto__") tagName = "#__proto__";
this.currentNode.push( {[key]: val });
// this.currentNode.leafType = false;
}
/**
* Add text value child node
* @param {string} text
*/
addValue(text){
this.currentNode[this.currentNodeTagName].push( {[this.options.nameFor.text]: this.parseValue(text, this.options.tags.valueParsers) });
}
addPi(name){
if(!this.options.ignorePiTags){
const node = { [name]:[]}
if(this.attributes){
node[":@"] = this.attributes;
}
this.currentNode.push(node);
}
this.attributes = {};
}
getOutput(){
return this.root[rootName];
}
}
module.exports = OutputBuilder;
@@ -0,0 +1,11 @@
'use strict';
var hasSymbols = require('has-symbols')();
var regexpMatchAll = require('./regexp-matchall');
module.exports = function getRegExpMatchAllPolyfill() {
if (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {
return regexpMatchAll;
}
return RegExp.prototype[Symbol.matchAll];
};
@@ -0,0 +1,172 @@
/**
* @import {
* Effects,
* State,
* TokenizeContext,
* TokenType
* } from 'micromark-util-types'
*/
import {ok as assert} from 'devlop'
import {markdownLineEnding, markdownSpace} from 'micromark-util-character'
import {codes, constants, types} from 'micromark-util-symbol'
/**
* Parse labels.
*
* > 👉 **Note**: labels in markdown are capped at 999 characters in the string.
*
* ###### Examples
*
* ```markdown
* [a]
* [a
* b]
* [a\]b]
* ```
*
* @this {TokenizeContext}
* Tokenize context.
* @param {Effects} effects
* Context.
* @param {State} ok
* State switched to when successful.
* @param {State} nok
* State switched to when unsuccessful.
* @param {TokenType} type
* Type of the whole label (`[a]`).
* @param {TokenType} markerType
* Type for the markers (`[` and `]`).
* @param {TokenType} stringType
* Type for the identifier (`a`).
* @returns {State}
* Start state.
*/
export function factoryLabel(effects, ok, nok, type, markerType, stringType) {
const self = this
let size = 0
/** @type {boolean} */
let seen
return start
/**
* Start of label.
*
* ```markdown
* > | [a]
* ^
* ```
*
* @type {State}
*/
function start(code) {
assert(code === codes.leftSquareBracket, 'expected `[`')
effects.enter(type)
effects.enter(markerType)
effects.consume(code)
effects.exit(markerType)
effects.enter(stringType)
return atBreak
}
/**
* In label, at something, before something else.
*
* ```markdown
* > | [a]
* ^
* ```
*
* @type {State}
*/
function atBreak(code) {
if (
size > constants.linkReferenceSizeMax ||
code === codes.eof ||
code === codes.leftSquareBracket ||
(code === codes.rightSquareBracket && !seen) ||
// To do: remove in the future once we’ve switched from
// `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
// which doesn’t need this.
// Hidden footnotes hook.
/* c8 ignore next 3 */
(code === codes.caret &&
!size &&
'_hiddenFootnoteSupport' in self.parser.constructs)
) {
return nok(code)
}
if (code === codes.rightSquareBracket) {
effects.exit(stringType)
effects.enter(markerType)
effects.consume(code)
effects.exit(markerType)
effects.exit(type)
return ok
}
// To do: indent? Link chunks and EOLs together?
if (markdownLineEnding(code)) {
effects.enter(types.lineEnding)
effects.consume(code)
effects.exit(types.lineEnding)
return atBreak
}
effects.enter(types.chunkString, {contentType: constants.contentTypeString})
return labelInside(code)
}
/**
* In label, in text.
*
* ```markdown
* > | [a]
* ^
* ```
*
* @type {State}
*/
function labelInside(code) {
if (
code === codes.eof ||
code === codes.leftSquareBracket ||
code === codes.rightSquareBracket ||
markdownLineEnding(code) ||
size++ > constants.linkReferenceSizeMax
) {
effects.exit(types.chunkString)
return atBreak(code)
}
effects.consume(code)
if (!seen) seen = !markdownSpace(code)
return code === codes.backslash ? labelEscape : labelInside
}
/**
* After `\`, at a special character.
*
* ```markdown
* > | [a\*a]
* ^
* ```
*
* @type {State}
*/
function labelEscape(code) {
if (
code === codes.leftSquareBracket ||
code === codes.backslash ||
code === codes.rightSquareBracket
) {
effects.consume(code)
size++
return labelInside
}
return labelInside(code)
}
}
@@ -0,0 +1 @@
{"version":3,"file":"stringify.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["stringify.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,OAAO,EAEV,MAAM,YAAY,CAAC;AACpB,OAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGlE;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,EAClC,OAAO,CAAC,EAAE,oBAAoB,GAC/B,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE,oBAAoB,GAC/B,MAAM,CAIR;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,CAMzD;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,CAO7D;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,CAO3D"}
@@ -0,0 +1 @@
{"name":"@types/multer","version":"1.4.13","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532103497,"integrity":"sha512-HQaIQk9pwOcyKutyDk4o2a87WnotwYuLGYFW43emGm4FvIJFKPyg+OYaw5sTegKAKf+C5SKa1ACjzCLivbaHrQ==","mode":420,"size":1141},"README.md":{"checkedAt":1794532103497,"integrity":"sha512-uy6dbsAVK3Iwbim7OzRIOrHnhi9ZH6vBLT4WUuHTnKp08skpujqIhhvpH9FrBwyeu/ix+7+gIkkaVZW1SjleOw==","mode":420,"size":858},"index.d.ts":{"checkedAt":1794532103497,"integrity":"sha512-WcGiEtOr/tIIsH+eHaZdqBKZbo1FnjumIasQB3GHMqniCwmguBAcQOJi9HxpEnVvqakZ6JqIFppU21qF2sMXGQ==","mode":420,"size":12815},"package.json":{"checkedAt":1794532103497,"integrity":"sha512-U8+e3AEyp4Sdj6kzXOwvff35Se6Splw6PizPIWdMaClgNLYMPLLBM9336l7I+KdB1XXnxpWhlOOktsB3/iCO+g==","mode":420,"size":1912}}}
@@ -0,0 +1,16 @@
import { type TUnsafe } from '../type/unsafe/index';
import { TypeBoxError } from '../type/error/index';
export declare class TypeSystemDuplicateTypeKind extends TypeBoxError {
constructor(kind: string);
}
export declare class TypeSystemDuplicateFormat extends TypeBoxError {
constructor(kind: string);
}
export type TypeFactoryFunction<Type, Options = Record<PropertyKey, unknown>> = (options?: Partial<Options>) => TUnsafe<Type>;
/** Creates user defined types and formats and provides overrides for value checking behaviours */
export declare namespace TypeSystem {
/** Creates a new type */
function Type<Type, Options = Record<PropertyKey, unknown>>(kind: string, check: (options: Options, value: unknown) => boolean): TypeFactoryFunction<Type, Options>;
/** Creates a new string format */
function Format<F extends string>(format: F, check: (value: string) => boolean): F;
}
@@ -0,0 +1,5 @@
import assertClassBrand from "./assertClassBrand.js";
function _classCheckPrivateStaticAccess(s, a, r) {
return assertClassBrand(a, s, r);
}
export { _classCheckPrivateStaticAccess as default };
@@ -0,0 +1,144 @@
"use client";
// src/use-dropdown.ts
import { useProviderContext } from "@heroui/system";
import { useMenuTriggerState } from "@react-stately/menu";
import { useMenuTrigger } from "@react-aria/menu";
import { dropdown } from "@heroui/theme";
import { clsx } from "@heroui/shared-utils";
import { mergeRefs } from "@heroui/react-utils";
import { ariaShouldCloseOnInteractOutside } from "@heroui/aria-utils";
import { useMemo, useRef } from "react";
import { mergeProps } from "@react-aria/utils";
var getMenuItem = (props, key) => {
if (props) {
const mergedChildren = Array.isArray(props.children) ? props.children : [...(props == null ? void 0 : props.items) || []];
if (mergedChildren && mergedChildren.length) {
const item = mergedChildren.find((item2) => {
if (item2 && item2.key === key) {
return item2;
}
}) || {};
return item;
}
}
return null;
};
var getCloseOnSelect = (props, key, item) => {
const mergedItem = item || getMenuItem(props, key);
if (mergedItem && mergedItem.props && "closeOnSelect" in mergedItem.props) {
return mergedItem.props.closeOnSelect;
}
return props == null ? void 0 : props.closeOnSelect;
};
function useDropdown(props) {
var _a;
const globalContext = useProviderContext();
const {
as,
triggerRef: triggerRefProp,
isOpen,
defaultOpen,
onOpenChange,
isDisabled,
type = "menu",
trigger = "press",
placement = "bottom",
closeOnSelect = true,
shouldBlockScroll = true,
classNames: classNamesProp,
disableAnimation = (_a = globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _a : false,
onClose,
className,
...otherProps
} = props;
const Component = as || "div";
const triggerRef = useRef(null);
const menuTriggerRef = triggerRefProp || triggerRef;
const menuRef = useRef(null);
const popoverRef = useRef(null);
const state = useMenuTriggerState({
trigger,
isOpen,
defaultOpen,
onOpenChange: (isOpen2) => {
onOpenChange == null ? void 0 : onOpenChange(isOpen2);
if (!isOpen2) {
onClose == null ? void 0 : onClose();
}
}
});
const { menuTriggerProps, menuProps } = useMenuTrigger(
{ type, trigger, isDisabled },
state,
menuTriggerRef
);
const classNames = useMemo(
() => dropdown({
className
}),
[className]
);
const onMenuAction = (menuCloseOnSelect) => {
if (menuCloseOnSelect !== void 0 && !menuCloseOnSelect) {
return;
}
if (closeOnSelect) {
state.close();
}
};
const getPopoverProps = (props2 = {}) => {
const popoverProps = mergeProps(otherProps, props2);
return {
state,
placement,
ref: popoverRef,
disableAnimation,
shouldBlockScroll,
scrollRef: menuRef,
triggerRef: menuTriggerRef,
...popoverProps,
classNames: {
...classNamesProp,
...props2.classNames,
content: clsx(classNames, classNamesProp == null ? void 0 : classNamesProp.content, props2.className)
},
shouldCloseOnInteractOutside: (popoverProps == null ? void 0 : popoverProps.shouldCloseOnInteractOutside) ? popoverProps.shouldCloseOnInteractOutside : (element) => ariaShouldCloseOnInteractOutside(element, triggerRef, state)
};
};
const getMenuTriggerProps = (originalProps = {}) => {
const { onPress, onPressStart, ...otherMenuTriggerProps } = menuTriggerProps;
return mergeProps(otherMenuTriggerProps, { isDisabled }, originalProps);
};
const getMenuProps = (props2, _ref = null) => {
return {
ref: mergeRefs(_ref, menuRef),
menuProps,
closeOnSelect,
...mergeProps(props2, {
onAction: (key, item) => {
const closeOnSelect2 = getCloseOnSelect(props2, key, item);
onMenuAction(closeOnSelect2);
},
onClose: state.close
})
};
};
return {
Component,
menuRef,
menuProps,
classNames,
closeOnSelect,
onClose: state.close,
autoFocus: state.focusStrategy || true,
disableAnimation,
getPopoverProps,
getMenuProps,
getMenuTriggerProps
};
}
export {
useDropdown
};
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,aAAa,CAAC,iBAAW,CAAC;IAC5C,iBAAiB,CAAC,OAAS,CAAC,2BAAqB,EAAE,KAAK,UAAU,CAAC,+BAAsB,CAAC;IAC1F,cAAc,CAAC,OAAS,GAAG,KAAK,KAAK,CAAC,OAAO,CAAC;IAC9C,cAAc,CAAC,oBAAc,CAAC;IAC9B,kBAAkB,CAAC,OAAS,CAAC,2BAAqB,EAAE,KAAK,UAAU,CAAC,kCAAyB,CAAC;IAC9F,sBAAsB,CAAC,+DAAgD,CAAC;IACxE,UAAU,CAAC,SAAS,CAAC;IACrB,aAAa,CAAC,sBAAgB,CAAC;IAC/B,YAAY,CAAC,6BAAiB,CAAC;AACjC","sources":["packages/@react-aria/table/intl/ro-RO.json"],"sourcesContent":["{\n \"ascending\": \"crescătoare\",\n \"ascendingSort\": \"sortate după coloana {columnName} în ordine crescătoare\",\n \"columnSize\": \"{value} pixeli\",\n \"descending\": \"descrescătoare\",\n \"descendingSort\": \"sortate după coloana {columnName} în ordine descrescătoare\",\n \"resizerDescription\": \"Apăsați pe Enter pentru a începe redimensionarea\",\n \"select\": \"Selectare\",\n \"selectAll\": \"Selectare totală\",\n \"sortable\": \"coloană sortabilă\"\n}\n"],"names":[],"version":3,"file":"ro-RO.module.js.map"}
@@ -0,0 +1,46 @@
import baseFindIndex from './_baseFindIndex.js';
import baseIsNaN from './_baseIsNaN.js';
import strictLastIndexOf from './_strictLastIndexOf.js';
import toInteger from './toInteger.js';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
* This method is like `_.indexOf` except that it iterates over elements of
* `array` from right to left.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=array.length-1] The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.lastIndexOf([1, 2, 1, 2], 2);
* // => 3
*
* // Search from the `fromIndex`.
* _.lastIndexOf([1, 2, 1, 2], 2, 2);
* // => 1
*/
function lastIndexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = length;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
}
return value === value
? strictLastIndexOf(array, value, index)
: baseFindIndex(array, baseIsNaN, index, true);
}
export default lastIndexOf;
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cloneResolvedValueBinding = cloneResolvedValueBinding;
const cloneBindingCache_1 = require("./cloneBindingCache");
/**
* Clones a ResolvedValueBinding
*/
function cloneResolvedValueBinding(binding) {
return {
cache: (0, cloneBindingCache_1.cloneBindingCache)(binding.cache),
factory: binding.factory,
id: binding.id,
isSatisfiedBy: binding.isSatisfiedBy,
metadata: binding.metadata,
moduleId: binding.moduleId,
onActivation: binding.onActivation,
onDeactivation: binding.onDeactivation,
scope: binding.scope,
serviceIdentifier: binding.serviceIdentifier,
type: binding.type,
};
}
//# sourceMappingURL=cloneResolvedValueBinding.js.map
@@ -0,0 +1,18 @@
/**
* @fileoverview config for enabling all rules in the plugin.
* @author aladdin-add<weiran.zsd@outlook.com>SS
*/
"use strict"
const { allRulesConfig } = require("./_commons")
const recommendeConfig = require("./recommended")
/**
* https://eslint.org/docs/latest/use/configure/configuration-files-new
* @type {import('eslint').Linter.FlatConfig}
*/
exports.flat = {
name: "node/flat/all",
languageOptions: recommendeConfig.flat.languageOptions ?? {},
rules: allRulesConfig,
}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('flattenDepth', require('../flattenDepth'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,74 @@
// src/animations/index.ts
var animations = {
animation: {
"drip-expand": "drip-expand 420ms linear",
"spinner-ease-spin": "spinner-spin 0.8s ease infinite",
"spinner-linear-spin": "spinner-spin 0.8s linear infinite",
"appearance-in": "appearance-in 250ms ease-out normal both",
"appearance-out": "appearance-out 60ms ease-in normal both",
"indeterminate-bar": "indeterminate-bar 1.5s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite normal none running"
},
keyframes: {
shimmer: {
"100%": {
transform: "translateX(100%)"
}
},
"spinner-spin": {
"0%": {
transform: "rotate(0deg)"
},
"100%": {
transform: "rotate(360deg)"
}
},
"drip-expand": {
"0%": {
opacity: "0.2",
transform: "scale(0)"
},
"100%": {
opacity: "0",
transform: "scale(2)"
}
},
"appearance-in": {
"0%": {
opacity: "0",
transform: "translateZ(0) scale(0.95)"
},
"60%": {
opacity: "0.75",
backfaceVisibility: "hidden",
webkitFontSmoothing: "antialiased",
transform: "translateZ(0) scale(1.05)"
},
"100%": {
opacity: "1",
transform: "translateZ(0) scale(1)"
}
},
"appearance-out": {
"0%": {
opacity: "1",
transform: "scale(1)"
},
"100%": {
opacity: "0",
transform: "scale(0.85)"
}
},
"indeterminate-bar": {
"0%": {
transform: "translateX(-50%) scaleX(0.2)"
},
"100%": {
transform: "translateX(100%) scaleX(1)"
}
}
}
};
export {
animations
};
@@ -0,0 +1,454 @@
import { createSelector } from './createSelectorCreator'
import type { CreateSelectorFunction } from './createSelectorCreator'
import type {
InterruptRecursion,
ObjectValuesToTuple,
OutputSelector,
Selector,
Simplify,
UnknownMemoizer
} from './types'
import { assertIsObject } from './utils'
import type { weakMapMemoize } from './weakMapMemoize'
/**
* Represents a mapping of selectors to their return types.
*
* @template TObject - An object type where each property is a selector function.
*
* @public
*/
export type SelectorResultsMap<TObject extends SelectorsObject> = {
[Key in keyof TObject]: ReturnType<TObject[Key]>
}
/**
* Represents a mapping of selectors for each key in a given root state.
*
* This type is a utility that takes a root state object type and
* generates a corresponding set of selectors. Each selector is associated
* with a key in the root state, allowing for the selection
* of specific parts of the state.
*
* @template RootState - The type of the root state object.
*
* @since 5.0.0
* @public
*/
export type RootStateSelectors<RootState = any> = {
[Key in keyof RootState]: Selector<RootState, RootState[Key], []>
}
/**
* @deprecated Please use {@linkcode StructuredSelectorCreator.withTypes createStructuredSelector.withTypes<RootState>()} instead. This type will be removed in the future.
* @template RootState - The type of the root state object.
*
* @since 5.0.0
* @public
*/
export type TypedStructuredSelectorCreator<RootState = any> =
/**
* A convenience function that simplifies returning an object
* made up of selector results.
*
* @param inputSelectorsObject - A key value pair consisting of input selectors.
* @param selectorCreator - A custom selector creator function. It defaults to `createSelector`.
* @returns A memoized structured selector.
*
* @example
* <caption>Modern Use Case</caption>
* ```ts
* import { createSelector, createStructuredSelector } from 'reselect'
*
* interface RootState {
* todos: {
* id: number
* completed: boolean
* title: string
* description: string
* }[]
* alerts: { id: number; read: boolean }[]
* }
*
* // This:
* const structuredSelector = createStructuredSelector(
* {
* todos: (state: RootState) => state.todos,
* alerts: (state: RootState) => state.alerts,
* todoById: (state: RootState, id: number) => state.todos[id]
* },
* createSelector
* )
*
* // Is essentially the same as this:
* const selector = createSelector(
* [
* (state: RootState) => state.todos,
* (state: RootState) => state.alerts,
* (state: RootState, id: number) => state.todos[id]
* ],
* (todos, alerts, todoById) => {
* return {
* todos,
* alerts,
* todoById
* }
* }
* )
* ```
*
* @example
* <caption>In your component:</caption>
* ```tsx
* import type { RootState } from 'createStructuredSelector/modernUseCase'
* import { structuredSelector } from 'createStructuredSelector/modernUseCase'
* import type { FC } from 'react'
* import { useSelector } from 'react-redux'
*
* interface Props {
* id: number
* }
*
* const MyComponent: FC<Props> = ({ id }) => {
* const { todos, alerts, todoById } = useSelector((state: RootState) =>
* structuredSelector(state, id)
* )
*
* return (
* <div>
* Next to do is:
* <h2>{todoById.title}</h2>
* <p>Description: {todoById.description}</p>
* <ul>
* <h3>All other to dos:</h3>
* {todos.map(todo => (
* <li key={todo.id}>{todo.title}</li>
* ))}
* </ul>
* </div>
* )
* }
* ```
*
* @example
* <caption>Simple Use Case</caption>
* ```ts
* const selectA = state => state.a
* const selectB = state => state.b
*
* // The result function in the following selector
* // is simply building an object from the input selectors
* const structuredSelector = createSelector(selectA, selectB, (a, b) => ({
* a,
* b
* }))
*
* const result = structuredSelector({ a: 1, b: 2 }) // will produce { x: 1, y: 2 }
* ```
*
* @template InputSelectorsObject - The shape of the input selectors object.
* @template MemoizeFunction - The type of the memoize function that is used to create the structured selector. It defaults to `weakMapMemoize`.
* @template ArgsMemoizeFunction - The type of the of the memoize function that is used to memoize the arguments passed into the generated structured selector. It defaults to `weakMapMemoize`.
*
* @see {@link https://reselect.js.org/api/createStructuredSelector `createStructuredSelector`}
*/
<
InputSelectorsObject extends RootStateSelectors<RootState> = RootStateSelectors<RootState>,
MemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize,
ArgsMemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize
>(
inputSelectorsObject: InputSelectorsObject,
selectorCreator?: CreateSelectorFunction<
MemoizeFunction,
ArgsMemoizeFunction
>
) => OutputSelector<
ObjectValuesToTuple<InputSelectorsObject>,
Simplify<SelectorResultsMap<InputSelectorsObject>>,
MemoizeFunction,
ArgsMemoizeFunction
> &
InterruptRecursion
/**
* Represents an object where each property is a selector function.
*
* @template StateType - The type of state that all the selectors operate on.
*
* @public
*/
export type SelectorsObject<StateType = any> = Record<
string,
Selector<StateType>
>
/**
* It provides a way to create structured selectors.
* The structured selector can take multiple input selectors
* and map their output to an object with specific keys.
*
* @template StateType - The type of state that the structured selectors created with this structured selector creator will operate on.
*
* @see {@link https://reselect.js.org/api/createStructuredSelector `createStructuredSelector`}
*
* @public
*/
export interface StructuredSelectorCreator<StateType = any> {
/**
* A convenience function that simplifies returning an object
* made up of selector results.
*
* @param inputSelectorsObject - A key value pair consisting of input selectors.
* @param selectorCreator - A custom selector creator function. It defaults to `createSelector`.
* @returns A memoized structured selector.
*
* @example
* <caption>Modern Use Case</caption>
* ```ts
* import { createSelector, createStructuredSelector } from 'reselect'
*
* interface RootState {
* todos: {
* id: number
* completed: boolean
* title: string
* description: string
* }[]
* alerts: { id: number; read: boolean }[]
* }
*
* // This:
* const structuredSelector = createStructuredSelector(
* {
* todos: (state: RootState) => state.todos,
* alerts: (state: RootState) => state.alerts,
* todoById: (state: RootState, id: number) => state.todos[id]
* },
* createSelector
* )
*
* // Is essentially the same as this:
* const selector = createSelector(
* [
* (state: RootState) => state.todos,
* (state: RootState) => state.alerts,
* (state: RootState, id: number) => state.todos[id]
* ],
* (todos, alerts, todoById) => {
* return {
* todos,
* alerts,
* todoById
* }
* }
* )
* ```
*
* @example
* <caption>In your component:</caption>
* ```tsx
* import type { RootState } from 'createStructuredSelector/modernUseCase'
* import { structuredSelector } from 'createStructuredSelector/modernUseCase'
* import type { FC } from 'react'
* import { useSelector } from 'react-redux'
*
* interface Props {
* id: number
* }
*
* const MyComponent: FC<Props> = ({ id }) => {
* const { todos, alerts, todoById } = useSelector((state: RootState) =>
* structuredSelector(state, id)
* )
*
* return (
* <div>
* Next to do is:
* <h2>{todoById.title}</h2>
* <p>Description: {todoById.description}</p>
* <ul>
* <h3>All other to dos:</h3>
* {todos.map(todo => (
* <li key={todo.id}>{todo.title}</li>
* ))}
* </ul>
* </div>
* )
* }
* ```
*
* @example
* <caption>Simple Use Case</caption>
* ```ts
* const selectA = state => state.a
* const selectB = state => state.b
*
* // The result function in the following selector
* // is simply building an object from the input selectors
* const structuredSelector = createSelector(selectA, selectB, (a, b) => ({
* a,
* b
* }))
*
* const result = structuredSelector({ a: 1, b: 2 }) // will produce { x: 1, y: 2 }
* ```
*
* @template InputSelectorsObject - The shape of the input selectors object.
* @template MemoizeFunction - The type of the memoize function that is used to create the structured selector. It defaults to `weakMapMemoize`.
* @template ArgsMemoizeFunction - The type of the of the memoize function that is used to memoize the arguments passed into the generated structured selector. It defaults to `weakMapMemoize`.
*
* @see {@link https://reselect.js.org/api/createStructuredSelector `createStructuredSelector`}
*/
<
InputSelectorsObject extends SelectorsObject<StateType>,
MemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize,
ArgsMemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize
>(
inputSelectorsObject: InputSelectorsObject,
selectorCreator?: CreateSelectorFunction<
MemoizeFunction,
ArgsMemoizeFunction
>
): OutputSelector<
ObjectValuesToTuple<InputSelectorsObject>,
Simplify<SelectorResultsMap<InputSelectorsObject>>,
MemoizeFunction,
ArgsMemoizeFunction
> &
InterruptRecursion
/**
* Creates a "pre-typed" version of
* {@linkcode createStructuredSelector createStructuredSelector}
* where the `state` type is predefined.
*
* This allows you to set the `state` type once, eliminating the need to
* specify it with every
* {@linkcode createStructuredSelector createStructuredSelector} call.
*
* @returns A pre-typed `createStructuredSelector` with the state type already defined.
*
* @example
* ```ts
* import { createStructuredSelector } from 'reselect'
*
* export interface RootState {
* todos: { id: number; completed: boolean }[]
* alerts: { id: number; read: boolean }[]
* }
*
* export const createStructuredAppSelector =
* createStructuredSelector.withTypes<RootState>()
*
* const structuredAppSelector = createStructuredAppSelector({
* // Type of `state` is set to `RootState`, no need to manually set the type
* todos: state => state.todos,
* alerts: state => state.alerts,
* todoById: (state, id: number) => state.todos[id]
* })
*
* ```
* @template OverrideStateType - The specific type of state used by all structured selectors created with this structured selector creator.
*
* @see {@link https://reselect.js.org/api/createstructuredselector#defining-a-pre-typed-createstructuredselector `createSelector.withTypes`}
*
* @since 5.1.0
*/
withTypes: <
OverrideStateType extends StateType
>() => StructuredSelectorCreator<OverrideStateType>
}
/**
* A convenience function that simplifies returning an object
* made up of selector results.
*
* @param inputSelectorsObject - A key value pair consisting of input selectors.
* @param selectorCreator - A custom selector creator function. It defaults to `createSelector`.
* @returns A memoized structured selector.
*
* @example
* <caption>Modern Use Case</caption>
* ```ts
* import { createSelector, createStructuredSelector } from 'reselect'
*
* interface RootState {
* todos: {
* id: number
* completed: boolean
* title: string
* description: string
* }[]
* alerts: { id: number; read: boolean }[]
* }
*
* // This:
* const structuredSelector = createStructuredSelector(
* {
* todos: (state: RootState) => state.todos,
* alerts: (state: RootState) => state.alerts,
* todoById: (state: RootState, id: number) => state.todos[id]
* },
* createSelector
* )
*
* // Is essentially the same as this:
* const selector = createSelector(
* [
* (state: RootState) => state.todos,
* (state: RootState) => state.alerts,
* (state: RootState, id: number) => state.todos[id]
* ],
* (todos, alerts, todoById) => {
* return {
* todos,
* alerts,
* todoById
* }
* }
* )
* ```
*
* @see {@link https://reselect.js.org/api/createStructuredSelector `createStructuredSelector`}
*
* @public
*/
export const createStructuredSelector: StructuredSelectorCreator =
Object.assign(
<
InputSelectorsObject extends SelectorsObject,
MemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize,
ArgsMemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize
>(
inputSelectorsObject: InputSelectorsObject,
selectorCreator: CreateSelectorFunction<
MemoizeFunction,
ArgsMemoizeFunction
> = createSelector as CreateSelectorFunction<
MemoizeFunction,
ArgsMemoizeFunction
>
) => {
assertIsObject(
inputSelectorsObject,
'createStructuredSelector expects first argument to be an object ' +
`where each property is a selector, instead received a ${typeof inputSelectorsObject}`
)
const inputSelectorKeys = Object.keys(inputSelectorsObject)
const dependencies = inputSelectorKeys.map(
key => inputSelectorsObject[key]
)
const structuredSelector = selectorCreator(
dependencies,
(...inputSelectorResults: any[]) => {
return inputSelectorResults.reduce((composition, value, index) => {
composition[inputSelectorKeys[index]] = value
return composition
}, {})
}
)
return structuredSelector
},
{ withTypes: () => createStructuredSelector }
) as StructuredSelectorCreator
@@ -0,0 +1,93 @@
{
"name": "@typescript-eslint/typescript-estree",
"version": "8.46.4",
"description": "A parser that converts TypeScript source code into an ESTree compatible form",
"files": [
"dist",
"!*.tsbuildinfo",
"README.md",
"LICENSE"
],
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json",
"./use-at-your-own-risk": {
"types": "./dist/use-at-your-own-risk.d.ts",
"default": "./dist/use-at-your-own-risk.js"
}
},
"types": "./dist/index.d.ts",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
"directory": "packages/typescript-estree"
},
"bugs": {
"url": "https://github.com/typescript-eslint/typescript-eslint/issues"
},
"homepage": "https://typescript-eslint.io/packages/typescript-estree",
"license": "MIT",
"keywords": [
"ast",
"estree",
"ecmascript",
"javascript",
"typescript",
"parser",
"syntax"
],
"scripts": {
"build": "yarn run -BT nx build",
"clean": "rimraf dist/ coverage/",
"format": "yarn run -T format",
"lint": "yarn run -BT nx lint",
"test": "yarn run -BT nx test",
"typecheck": "yarn run -BT nx typecheck"
},
"dependencies": {
"@typescript-eslint/project-service": "8.46.4",
"@typescript-eslint/tsconfig-utils": "8.46.4",
"@typescript-eslint/types": "8.46.4",
"@typescript-eslint/visitor-keys": "8.46.4",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
"minimatch": "^9.0.4",
"semver": "^7.6.0",
"ts-api-utils": "^2.1.0"
},
"devDependencies": {
"@types/is-glob": "^4.0.4",
"@vitest/coverage-v8": "^3.1.3",
"eslint": "*",
"glob": "*",
"rimraf": "*",
"typescript": "*",
"vitest": "^3.1.3"
},
"peerDependencies": {
"typescript": ">=4.8.4 <6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"nx": {
"name": "typescript-estree",
"includedScripts": [
"clean"
],
"targets": {
"lint": {
"command": "eslint"
}
}
}
}
@@ -0,0 +1,13 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"func-name-matching": 0,
"id-length": 0,
"new-cap": [2, {
"capIsNewExceptions": ["GetIntrinsic"],
}],
},
}
@@ -0,0 +1,14 @@
# `@peculiar/asn1-ecc`
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/PeculiarVentures/asn1-schema/master/packages/ecc/LICENSE.md)
[![npm version](https://badge.fury.io/js/%40peculiar%2Fasn1-ecc.svg)](https://badge.fury.io/js/%40peculiar%2Fasn1-ecc)
[![NPM](https://nodei.co/npm/@peculiar/asn1-ecc.png)](https://nodei.co/npm/@peculiar/asn1-ecc/)
This module provides ASN.1 schema definitions and parsers for Elliptic Curve Cryptography (ECC) structures. It includes support for various ECC-related standards and specifications, making it easier to work with ECC keys and certificates in JavaScript and TypeScript applications.
| Document | Description |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [RFC 5915](https://tools.ietf.org/html/rfc5915) | Elliptic Curve Private Key Structure |
| [RFC 5480](https://tools.ietf.org/html/rfc5480) | Elliptic Curve Cryptography Subject Public Key Information |
| [RFC 3279](https://datatracker.ietf.org/doc/html/rfc3279#section-2.3.5) | Algorithms and Identifiers for the Internet X.509 Public Key Infrastructure Certificate: ECDSA and ECDH Keys |
@@ -0,0 +1 @@
{"version":3,"file":"AutobindOptions.js","sourceRoot":"","sources":["../../../../src/binding/models/AutobindOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,639 @@
import { TestError, Awaitable } from '@vitest/utils';
interface FixtureItem extends FixtureOptions {
prop: string;
value: any;
scope: "test" | "file" | "worker";
/**
* Indicates whether the fixture is a function
*/
isFn: boolean;
/**
* The dependencies(fixtures) of current fixture function.
*/
deps?: FixtureItem[];
}
type ChainableFunction<
T extends string,
F extends (...args: any) => any,
C = object
> = F & { [x in T] : ChainableFunction<T, F, C> } & {
fn: (this: Record<T, any>, ...args: Parameters<F>) => ReturnType<F>;
} & C;
declare function createChainable<
T extends string,
Args extends any[],
R = any
>(keys: T[], fn: (this: Record<T, any>, ...args: Args) => R): ChainableFunction<T, (...args: Args) => R>;
type RunMode = "run" | "skip" | "only" | "todo" | "queued";
type TaskState = RunMode | "pass" | "fail";
interface TaskBase {
/**
* Unique task identifier. Based on the file id and the position of the task.
* The id of the file task is based on the file path relative to root and project name.
* It will not change between runs.
* @example `1201091390`, `1201091390_0`, `1201091390_0_1`
*/
id: string;
/**
* Task name provided by the user. If no name was provided, it will be an empty string.
*/
name: string;
/**
* Task mode.
* - **skip**: task is skipped
* - **only**: only this task and other tasks with `only` mode will run
* - **todo**: task is marked as a todo, alias for `skip`
* - **run**: task will run or already ran
* - **queued**: task will start running next. It can only exist on the File
*/
mode: RunMode;
/**
* Custom metadata for the task. JSON reporter will save this data.
*/
meta: TaskMeta;
/**
* Whether the task was produced with `.each()` method.
*/
each?: boolean;
/**
* Whether the task should run concurrently with other tasks.
*/
concurrent?: boolean;
/**
* Whether the tasks of the suite run in a random order.
*/
shuffle?: boolean;
/**
* Suite that this task is part of. File task or the global suite will have no parent.
*/
suite?: Suite;
/**
* Result of the task. Suite and file tasks will only have the result if there
* was an error during collection or inside `afterAll`/`beforeAll`.
*/
result?: TaskResult;
/**
* The amount of times the task should be retried if it fails.
* @default 0
*/
retry?: number;
/**
* The amount of times the task should be repeated after the successful run.
* If the task fails, it will not be retried unless `retry` is specified.
* @default 0
*/
repeats?: number;
/**
* Location of the task in the file. This field is populated only if
* `includeTaskLocation` option is set. It is generated by calling `new Error`
* and parsing the stack trace, so the location might differ depending on the runtime.
*/
location?: {
line: number;
column: number;
};
/**
* If the test was collected by parsing the file AST, and the name
* is not a static string, this property will be set to `true`.
* @experimental
*/
dynamic?: boolean;
}
interface TaskPopulated extends TaskBase {
/**
* File task. It's the root task of the file.
*/
file: File;
/**
* Whether the task should succeed if it fails. If the task fails, it will be marked as passed.
*/
fails?: boolean;
/**
* Store promises (from async expects) to wait for them before finishing the test
*/
promises?: Promise<any>[];
}
/**
* Custom metadata that can be used in reporters.
*/
interface TaskMeta {}
/**
* The result of calling a task.
*/
interface TaskResult {
/**
* State of the task. Inherits the `task.mode` during collection.
* When the task has finished, it will be changed to `pass` or `fail`.
* - **pass**: task ran successfully
* - **fail**: task failed
*/
state: TaskState;
/**
* Errors that occurred during the task execution. It is possible to have several errors
* if `expect.soft()` failed multiple times or `retry` was triggered.
*/
errors?: TestError[];
/**
* How long in milliseconds the task took to run.
*/
duration?: number;
/**
* Time in milliseconds when the task started running.
*/
startTime?: number;
/**
* Heap size in bytes after the task finished.
* Only available if `logHeapUsage` option is set and `process.memoryUsage` is defined.
*/
heap?: number;
/**
* State of related to this task hooks. Useful during reporting.
*/
hooks?: Partial<Record<keyof SuiteHooks, TaskState>>;
/**
* The amount of times the task was retried. The task is retried only if it
* failed and `retry` option is set.
*/
retryCount?: number;
/**
* The amount of times the task was repeated. The task is repeated only if
* `repeats` option is set. This number also contains `retryCount`.
*/
repeatCount?: number;
}
/** The time spent importing & executing a non-externalized file. */
interface ImportDuration {
/** The time spent importing & executing the file itself, not counting all non-externalized imports that the file does. */
selfTime: number;
/** The time spent importing & executing the file and all its imports. */
totalTime: number;
}
/**
* The tuple representing a single task update.
* Usually reported after the task finishes.
*/
type TaskResultPack = [id: string, result: TaskResult | undefined, meta: TaskMeta];
interface TaskEventData {
annotation?: TestAnnotation | undefined;
}
type TaskEventPack = [id: string, event: TaskUpdateEvent, data: TaskEventData | undefined];
type TaskUpdateEvent = "test-failed-early" | "suite-failed-early" | "test-prepare" | "test-finished" | "test-retried" | "suite-prepare" | "suite-finished" | "before-hook-start" | "before-hook-end" | "after-hook-start" | "after-hook-end" | "test-annotation";
interface Suite extends TaskBase {
type: "suite";
/**
* File task. It's the root task of the file.
*/
file: File;
/**
* An array of tasks that are part of the suite.
*/
tasks: Task[];
}
interface File extends Suite {
/**
* The name of the pool that the file belongs to.
* @default 'forks'
*/
pool?: string;
/**
* The path to the file in UNIX format.
*/
filepath: string;
/**
* The name of the workspace project the file belongs to.
*/
projectName: string | undefined;
/**
* The time it took to collect all tests in the file.
* This time also includes importing all the file dependencies.
*/
collectDuration?: number;
/**
* The time it took to import the setup file.
*/
setupDuration?: number;
/** The time spent importing every non-externalized dependency that Vitest has processed. */
importDurations?: Record<string, ImportDuration>;
}
interface Test<ExtraContext = object> extends TaskPopulated {
type: "test";
/**
* Test context that will be passed to the test function.
*/
context: TestContext & ExtraContext;
/**
* The test timeout in milliseconds.
*/
timeout: number;
/**
* An array of custom annotations.
*/
annotations: TestAnnotation[];
}
interface TestAttachment {
contentType?: string;
path?: string;
body?: string | Uint8Array;
}
interface TestAnnotationLocation {
line: number;
column: number;
file: string;
}
interface TestAnnotation {
message: string;
type: string;
location?: TestAnnotationLocation;
attachment?: TestAttachment;
}
type Task = Test | Suite | File;
type TestFunction<ExtraContext = object> = (context: TestContext & ExtraContext) => Awaitable<any> | void;
type ExtractEachCallbackArgs<T extends ReadonlyArray<any>> = {
1: [T[0]];
2: [T[0], T[1]];
3: [T[0], T[1], T[2]];
4: [T[0], T[1], T[2], T[3]];
5: [T[0], T[1], T[2], T[3], T[4]];
6: [T[0], T[1], T[2], T[3], T[4], T[5]];
7: [T[0], T[1], T[2], T[3], T[4], T[5], T[6]];
8: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7]];
9: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], T[8]];
10: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], T[8], T[9]];
fallback: Array<T extends ReadonlyArray<infer U> ? U : any>;
}[T extends Readonly<[any]> ? 1 : T extends Readonly<[any, any]> ? 2 : T extends Readonly<[any, any, any]> ? 3 : T extends Readonly<[any, any, any, any]> ? 4 : T extends Readonly<[any, any, any, any, any]> ? 5 : T extends Readonly<[any, any, any, any, any, any]> ? 6 : T extends Readonly<[any, any, any, any, any, any, any]> ? 7 : T extends Readonly<[any, any, any, any, any, any, any, any]> ? 8 : T extends Readonly<[any, any, any, any, any, any, any, any, any]> ? 9 : T extends Readonly<[any, any, any, any, any, any, any, any, any, any]> ? 10 : "fallback"];
interface EachFunctionReturn<T extends any[]> {
(name: string | Function, fn: (...args: T) => Awaitable<void>, options?: number): void;
(name: string | Function, options: TestCollectorOptions, fn: (...args: T) => Awaitable<void>): void;
}
interface TestEachFunction {
<T extends any[] | [any]>(cases: ReadonlyArray<T>): EachFunctionReturn<T>;
<T extends ReadonlyArray<any>>(cases: ReadonlyArray<T>): EachFunctionReturn<ExtractEachCallbackArgs<T>>;
<T>(cases: ReadonlyArray<T>): EachFunctionReturn<T[]>;
(...args: [TemplateStringsArray, ...any]): EachFunctionReturn<any[]>;
}
interface TestForFunctionReturn<
Arg,
Context
> {
(name: string | Function, fn: (arg: Arg, context: Context) => Awaitable<void>): void;
(name: string | Function, options: TestCollectorOptions, fn: (args: Arg, context: Context) => Awaitable<void>): void;
}
interface TestForFunction<ExtraContext> {
<T>(cases: ReadonlyArray<T>): TestForFunctionReturn<T, TestContext & ExtraContext>;
(strings: TemplateStringsArray, ...values: any[]): TestForFunctionReturn<any, TestContext & ExtraContext>;
}
interface SuiteForFunction {
<T>(cases: ReadonlyArray<T>): EachFunctionReturn<[T]>;
(...args: [TemplateStringsArray, ...any]): EachFunctionReturn<any[]>;
}
interface TestCollectorCallable<C = object> {
<ExtraContext extends C>(name: string | Function, fn?: TestFunction<ExtraContext>, options?: number): void;
<ExtraContext extends C>(name: string | Function, options?: TestCollectorOptions, fn?: TestFunction<ExtraContext>): void;
}
type ChainableTestAPI<ExtraContext = object> = ChainableFunction<"concurrent" | "sequential" | "only" | "skip" | "todo" | "fails", TestCollectorCallable<ExtraContext>, {
each: TestEachFunction;
for: TestForFunction<ExtraContext>;
}>;
type TestCollectorOptions = Omit<TestOptions, "shuffle">;
interface TestOptions {
/**
* Test timeout.
*/
timeout?: number;
/**
* Times to retry the test if fails. Useful for making flaky tests more stable.
* When retries is up, the last test error will be thrown.
*
* @default 0
*/
retry?: number;
/**
* How many times the test will run again.
* Only inner tests will repeat if set on `describe()`, nested `describe()` will inherit parent's repeat by default.
*
* @default 0
*/
repeats?: number;
/**
* Whether suites and tests run concurrently.
* Tests inherit `concurrent` from `describe()` and nested `describe()` will inherit from parent's `concurrent`.
*/
concurrent?: boolean;
/**
* Whether tests run sequentially.
* Tests inherit `sequential` from `describe()` and nested `describe()` will inherit from parent's `sequential`.
*/
sequential?: boolean;
/**
* Whether the tasks of the suite run in a random order.
*/
shuffle?: boolean;
/**
* Whether the test should be skipped.
*/
skip?: boolean;
/**
* Should this test be the only one running in a suite.
*/
only?: boolean;
/**
* Whether the test should be skipped and marked as a todo.
*/
todo?: boolean;
/**
* Whether the test is expected to fail. If it does, the test will pass, otherwise it will fail.
*/
fails?: boolean;
}
interface ExtendedAPI<ExtraContext> {
skipIf: (condition: any) => ChainableTestAPI<ExtraContext>;
runIf: (condition: any) => ChainableTestAPI<ExtraContext>;
}
interface Hooks<ExtraContext> {
beforeAll: typeof beforeAll;
afterAll: typeof afterAll;
beforeEach: typeof beforeEach<ExtraContext>;
afterEach: typeof afterEach<ExtraContext>;
}
type TestAPI<ExtraContext = object> = ChainableTestAPI<ExtraContext> & ExtendedAPI<ExtraContext> & Hooks<ExtraContext> & {
extend: <T extends Record<string, any> = object>(fixtures: Fixtures<T, ExtraContext>) => TestAPI<{ [K in keyof T | keyof ExtraContext] : K extends keyof T ? T[K] : K extends keyof ExtraContext ? ExtraContext[K] : never }>;
scoped: (fixtures: Fixtures<Partial<ExtraContext>>) => void;
};
interface FixtureOptions {
/**
* Whether to automatically set up current fixture, even though it's not being used in tests.
* @default false
*/
auto?: boolean;
/**
* Indicated if the injected value from the config should be preferred over the fixture value
*/
injected?: boolean;
/**
* When should the fixture be set up.
* - **test**: fixture will be set up before every test
* - **worker**: fixture will be set up once per worker
* - **file**: fixture will be set up once per file
*
* **Warning:** The `vmThreads` and `vmForks` pools initiate worker fixtures once per test file.
* @default 'test'
*/
scope?: "test" | "worker" | "file";
}
type Use<T> = (value: T) => Promise<void>;
type FixtureFn<
T,
K extends keyof T,
ExtraContext
> = (context: Omit<T, K> & ExtraContext, use: Use<T[K]>) => Promise<void>;
type Fixture<
T,
K extends keyof T,
ExtraContext = object
> = ((...args: any) => any) extends T[K] ? T[K] extends any ? FixtureFn<T, K, Omit<ExtraContext, Exclude<keyof T, K>>> : never : T[K] | (T[K] extends any ? FixtureFn<T, K, Omit<ExtraContext, Exclude<keyof T, K>>> : never);
type Fixtures<
T extends Record<string, any>,
ExtraContext = object
> = { [K in keyof T] : Fixture<T, K, ExtraContext & TestContext> | [Fixture<T, K, ExtraContext & TestContext>, FixtureOptions?] };
type InferFixturesTypes<T> = T extends TestAPI<infer C> ? C : T;
interface SuiteCollectorCallable<ExtraContext = object> {
<OverrideExtraContext extends ExtraContext = ExtraContext>(name: string | Function, fn?: SuiteFactory<OverrideExtraContext>, options?: number): SuiteCollector<OverrideExtraContext>;
<OverrideExtraContext extends ExtraContext = ExtraContext>(name: string | Function, options: TestOptions, fn?: SuiteFactory<OverrideExtraContext>): SuiteCollector<OverrideExtraContext>;
}
type ChainableSuiteAPI<ExtraContext = object> = ChainableFunction<"concurrent" | "sequential" | "only" | "skip" | "todo" | "shuffle", SuiteCollectorCallable<ExtraContext>, {
each: TestEachFunction;
for: SuiteForFunction;
}>;
type SuiteAPI<ExtraContext = object> = ChainableSuiteAPI<ExtraContext> & {
skipIf: (condition: any) => ChainableSuiteAPI<ExtraContext>;
runIf: (condition: any) => ChainableSuiteAPI<ExtraContext>;
};
interface BeforeAllListener {
(suite: Readonly<Suite | File>): Awaitable<unknown>;
}
interface AfterAllListener {
(suite: Readonly<Suite | File>): Awaitable<unknown>;
}
interface BeforeEachListener<ExtraContext = object> {
(context: TestContext & ExtraContext, suite: Readonly<Suite>): Awaitable<unknown>;
}
interface AfterEachListener<ExtraContext = object> {
(context: TestContext & ExtraContext, suite: Readonly<Suite>): Awaitable<unknown>;
}
interface SuiteHooks<ExtraContext = object> {
beforeAll: BeforeAllListener[];
afterAll: AfterAllListener[];
beforeEach: BeforeEachListener<ExtraContext>[];
afterEach: AfterEachListener<ExtraContext>[];
}
interface TaskCustomOptions extends TestOptions {
/**
* Whether the task was produced with `.each()` method.
*/
each?: boolean;
/**
* Custom metadata for the task that will be assigned to `task.meta`.
*/
meta?: Record<string, unknown>;
/**
* Task fixtures.
*/
fixtures?: FixtureItem[];
/**
* Function that will be called when the task is executed.
* If nothing is provided, the runner will try to get the function using `getFn(task)`.
* If the runner cannot find the function, the task will be marked as failed.
*/
handler?: (context: TestContext) => Awaitable<void>;
}
interface SuiteCollector<ExtraContext = object> {
readonly name: string;
readonly mode: RunMode;
options?: TestOptions;
type: "collector";
test: TestAPI<ExtraContext>;
tasks: (Suite | Test<ExtraContext> | SuiteCollector<ExtraContext>)[];
scoped: (fixtures: Fixtures<any, ExtraContext>) => void;
fixtures: () => FixtureItem[] | undefined;
suite?: Suite;
task: (name: string, options?: TaskCustomOptions) => Test<ExtraContext>;
collect: (file: File) => Promise<Suite>;
clear: () => void;
on: <T extends keyof SuiteHooks<ExtraContext>>(name: T, ...fn: SuiteHooks<ExtraContext>[T]) => void;
}
type SuiteFactory<ExtraContext = object> = (test: TestAPI<ExtraContext>) => Awaitable<void>;
interface RuntimeContext {
tasks: (SuiteCollector | Test)[];
currentSuite: SuiteCollector | null;
}
/**
* User's custom test context.
*/
interface TestContext {
/**
* Metadata of the current test
*/
readonly task: Readonly<Test>;
/**
* An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that will be aborted if the test times out or
* the test run was cancelled.
* @see {@link https://vitest.dev/guide/test-context#signal}
*/
readonly signal: AbortSignal;
/**
* Extract hooks on test failed
* @see {@link https://vitest.dev/guide/test-context#ontestfailed}
*/
readonly onTestFailed: (fn: OnTestFailedHandler, timeout?: number) => void;
/**
* Extract hooks on test failed
* @see {@link https://vitest.dev/guide/test-context#ontestfinished}
*/
readonly onTestFinished: (fn: OnTestFinishedHandler, timeout?: number) => void;
/**
* Mark tests as skipped. All execution after this call will be skipped.
* This function throws an error, so make sure you are not catching it accidentally.
* @see {@link https://vitest.dev/guide/test-context#skip}
*/
readonly skip: {
(note?: string): never;
(condition: boolean, note?: string): void;
};
/**
* Add a test annotation that will be displayed by your reporter.
* @see {@link https://vitest.dev/guide/test-context#annotate}
*/
readonly annotate: {
(message: string, type?: string, attachment?: TestAttachment): Promise<TestAnnotation>;
(message: string, attachment?: TestAttachment): Promise<TestAnnotation>;
};
}
type OnTestFailedHandler = (context: TestContext) => Awaitable<void>;
type OnTestFinishedHandler = (context: TestContext) => Awaitable<void>;
interface TaskHook<HookListener> {
(fn: HookListener, timeout?: number): void;
}
type SequenceHooks = "stack" | "list" | "parallel";
type SequenceSetupFiles = "list" | "parallel";
/**
* Registers a callback function to be executed once before all tests within the current suite.
* This hook is useful for scenarios where you need to perform setup operations that are common to all tests in a suite, such as initializing a database connection or setting up a test environment.
*
* **Note:** The `beforeAll` hooks are executed in the order they are defined one after another. You can configure this by changing the `sequence.hooks` option in the config file.
*
* @param {Function} fn - The callback function to be executed before all tests.
* @param {number} [timeout] - Optional timeout in milliseconds for the hook. If not provided, the default hook timeout from the runner's configuration is used.
* @returns {void}
* @example
* ```ts
* // Example of using beforeAll to set up a database connection
* beforeAll(async () => {
* await database.connect();
* });
* ```
*/
declare function beforeAll(fn: BeforeAllListener, timeout?: number): void;
/**
* Registers a callback function to be executed once after all tests within the current suite have completed.
* This hook is useful for scenarios where you need to perform cleanup operations after all tests in a suite have run, such as closing database connections or cleaning up temporary files.
*
* **Note:** The `afterAll` hooks are running in reverse order of their registration. You can configure this by changing the `sequence.hooks` option in the config file.
*
* @param {Function} fn - The callback function to be executed after all tests.
* @param {number} [timeout] - Optional timeout in milliseconds for the hook. If not provided, the default hook timeout from the runner's configuration is used.
* @returns {void}
* @example
* ```ts
* // Example of using afterAll to close a database connection
* afterAll(async () => {
* await database.disconnect();
* });
* ```
*/
declare function afterAll(fn: AfterAllListener, timeout?: number): void;
/**
* Registers a callback function to be executed before each test within the current suite.
* This hook is useful for scenarios where you need to reset or reinitialize the test environment before each test runs, such as resetting database states, clearing caches, or reinitializing variables.
*
* **Note:** The `beforeEach` hooks are executed in the order they are defined one after another. You can configure this by changing the `sequence.hooks` option in the config file.
*
* @param {Function} fn - The callback function to be executed before each test. This function receives an `TestContext` parameter if additional test context is needed.
* @param {number} [timeout] - Optional timeout in milliseconds for the hook. If not provided, the default hook timeout from the runner's configuration is used.
* @returns {void}
* @example
* ```ts
* // Example of using beforeEach to reset a database state
* beforeEach(async () => {
* await database.reset();
* });
* ```
*/
declare function beforeEach<ExtraContext = object>(fn: BeforeEachListener<ExtraContext>, timeout?: number): void;
/**
* Registers a callback function to be executed after each test within the current suite has completed.
* This hook is useful for scenarios where you need to clean up or reset the test environment after each test runs, such as deleting temporary files, clearing test-specific database entries, or resetting mocked functions.
*
* **Note:** The `afterEach` hooks are running in reverse order of their registration. You can configure this by changing the `sequence.hooks` option in the config file.
*
* @param {Function} fn - The callback function to be executed after each test. This function receives an `TestContext` parameter if additional test context is needed.
* @param {number} [timeout] - Optional timeout in milliseconds for the hook. If not provided, the default hook timeout from the runner's configuration is used.
* @returns {void}
* @example
* ```ts
* // Example of using afterEach to delete temporary files created during a test
* afterEach(async () => {
* await fileSystem.deleteTempFiles();
* });
* ```
*/
declare function afterEach<ExtraContext = object>(fn: AfterEachListener<ExtraContext>, timeout?: number): void;
/**
* Registers a callback function to be executed when a test fails within the current suite.
* This function allows for custom actions to be performed in response to test failures, such as logging, cleanup, or additional diagnostics.
*
* **Note:** The `onTestFailed` hooks are running in reverse order of their registration. You can configure this by changing the `sequence.hooks` option in the config file.
*
* @param {Function} fn - The callback function to be executed upon a test failure. The function receives the test result (including errors).
* @param {number} [timeout] - Optional timeout in milliseconds for the hook. If not provided, the default hook timeout from the runner's configuration is used.
* @throws {Error} Throws an error if the function is not called within a test.
* @returns {void}
* @example
* ```ts
* // Example of using onTestFailed to log failure details
* onTestFailed(({ errors }) => {
* console.log(`Test failed: ${test.name}`, errors);
* });
* ```
*/
declare const onTestFailed: TaskHook<OnTestFailedHandler>;
/**
* Registers a callback function to be executed when the current test finishes, regardless of the outcome (pass or fail).
* This function is ideal for performing actions that should occur after every test execution, such as cleanup, logging, or resetting shared resources.
*
* This hook is useful if you have access to a resource in the test itself and you want to clean it up after the test finishes. It is a more compact way to clean up resources than using the combination of `beforeEach` and `afterEach`.
*
* **Note:** The `onTestFinished` hooks are running in reverse order of their registration. You can configure this by changing the `sequence.hooks` option in the config file.
*
* **Note:** The `onTestFinished` hook is not called if the test is canceled with a dynamic `ctx.skip()` call.
*
* @param {Function} fn - The callback function to be executed after a test finishes. The function can receive parameters providing details about the completed test, including its success or failure status.
* @param {number} [timeout] - Optional timeout in milliseconds for the hook. If not provided, the default hook timeout from the runner's configuration is used.
* @throws {Error} Throws an error if the function is not called within a test.
* @returns {void}
* @example
* ```ts
* // Example of using onTestFinished for cleanup
* const db = await connectToDatabase();
* onTestFinished(async () => {
* await db.disconnect();
* });
* ```
*/
declare const onTestFinished: TaskHook<OnTestFinishedHandler>;
export { createChainable as X, afterAll as g, afterEach as h, beforeAll as i, beforeEach as j, onTestFinished as k, onTestFailed as o };
export type { AfterAllListener as A, BeforeAllListener as B, TaskEventPack as C, TaskHook as D, TaskMeta as E, File as F, TaskPopulated as G, TaskResult as H, ImportDuration as I, TaskResultPack as J, TaskState as K, TestAnnotation as L, TestAnnotationLocation as M, TestAttachment as N, OnTestFailedHandler as O, TestContext as P, TestFunction as Q, RunMode as R, Suite as S, Test as T, TestOptions as U, Use as V, ChainableFunction as W, SuiteHooks as a, TaskUpdateEvent as b, Task as c, TestAPI as d, SuiteAPI as e, SuiteCollector as f, AfterEachListener as l, BeforeEachListener as m, Fixture as n, FixtureFn as p, FixtureOptions as q, Fixtures as r, InferFixturesTypes as s, OnTestFinishedHandler as t, RuntimeContext as u, SequenceHooks as v, SequenceSetupFiles as w, SuiteFactory as x, TaskBase as y, TaskCustomOptions as z };
@@ -0,0 +1,21 @@
import baseEach from './_baseEach.js';
/**
* The base implementation of `_.every` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if all elements pass the predicate check,
* else `false`
*/
function baseEvery(collection, predicate) {
var result = true;
baseEach(collection, function(value, index, collection) {
result = !!predicate(value, index, collection);
return result;
});
return result;
}
export default baseEvery;
@@ -0,0 +1,2 @@
export default new WeakMap();
//# sourceMappingURL=instances.js.map
@@ -0,0 +1,110 @@
import $2kG2F$arAEmodulejs from "./ar-AE.mjs";
import $2kG2F$bgBGmodulejs from "./bg-BG.mjs";
import $2kG2F$csCZmodulejs from "./cs-CZ.mjs";
import $2kG2F$daDKmodulejs from "./da-DK.mjs";
import $2kG2F$deDEmodulejs from "./de-DE.mjs";
import $2kG2F$elGRmodulejs from "./el-GR.mjs";
import $2kG2F$enUSmodulejs from "./en-US.mjs";
import $2kG2F$esESmodulejs from "./es-ES.mjs";
import $2kG2F$etEEmodulejs from "./et-EE.mjs";
import $2kG2F$fiFImodulejs from "./fi-FI.mjs";
import $2kG2F$frFRmodulejs from "./fr-FR.mjs";
import $2kG2F$heILmodulejs from "./he-IL.mjs";
import $2kG2F$hrHRmodulejs from "./hr-HR.mjs";
import $2kG2F$huHUmodulejs from "./hu-HU.mjs";
import $2kG2F$itITmodulejs from "./it-IT.mjs";
import $2kG2F$jaJPmodulejs from "./ja-JP.mjs";
import $2kG2F$koKRmodulejs from "./ko-KR.mjs";
import $2kG2F$ltLTmodulejs from "./lt-LT.mjs";
import $2kG2F$lvLVmodulejs from "./lv-LV.mjs";
import $2kG2F$nbNOmodulejs from "./nb-NO.mjs";
import $2kG2F$nlNLmodulejs from "./nl-NL.mjs";
import $2kG2F$plPLmodulejs from "./pl-PL.mjs";
import $2kG2F$ptBRmodulejs from "./pt-BR.mjs";
import $2kG2F$ptPTmodulejs from "./pt-PT.mjs";
import $2kG2F$roROmodulejs from "./ro-RO.mjs";
import $2kG2F$ruRUmodulejs from "./ru-RU.mjs";
import $2kG2F$skSKmodulejs from "./sk-SK.mjs";
import $2kG2F$slSImodulejs from "./sl-SI.mjs";
import $2kG2F$srSPmodulejs from "./sr-SP.mjs";
import $2kG2F$svSEmodulejs from "./sv-SE.mjs";
import $2kG2F$trTRmodulejs from "./tr-TR.mjs";
import $2kG2F$ukUAmodulejs from "./uk-UA.mjs";
import $2kG2F$zhCNmodulejs from "./zh-CN.mjs";
import $2kG2F$zhTWmodulejs from "./zh-TW.mjs";
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,39 @@
import baseFor from './_baseFor.js';
import castFunction from './_castFunction.js';
import keysIn from './keysIn.js';
/**
* Iterates over own and inherited enumerable string keyed properties of an
* object and invokes `iteratee` for each property. The iteratee is invoked
* with three arguments: (value, key, object). Iteratee functions may exit
* iteration early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 0.3.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forInRight
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forIn(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
*/
function forIn(object, iteratee) {
return object == null
? object
: baseFor(object, castFunction(iteratee), keysIn);
}
export default forIn;
@@ -0,0 +1,15 @@
export declare const TYPE: Readonly<{
eslintImplicitGlobalSetting: "readonly";
isTypeVariable: true;
isValueVariable: false;
}>;
export declare const VALUE: Readonly<{
eslintImplicitGlobalSetting: "readonly";
isTypeVariable: false;
isValueVariable: true;
}>;
export declare const TYPE_VALUE: Readonly<{
eslintImplicitGlobalSetting: "readonly";
isTypeVariable: true;
isValueVariable: true;
}>;
@@ -0,0 +1,36 @@
function is(x: unknown, y: unknown) {
if (x === y) {
return x !== 0 || y !== 0 || 1 / x === 1 / y
} else {
return x !== x && y !== y
}
}
export default function shallowEqual(objA: any, objB: any) {
if (is(objA, objB)) return true
if (
typeof objA !== 'object' ||
objA === null ||
typeof objB !== 'object' ||
objB === null
) {
return false
}
const keysA = Object.keys(objA)
const keysB = Object.keys(objB)
if (keysA.length !== keysB.length) return false
for (let i = 0; i < keysA.length; i++) {
if (
!Object.prototype.hasOwnProperty.call(objB, keysA[i]) ||
!is(objA[keysA[i]], objB[keysA[i]])
) {
return false
}
}
return true
}
@@ -0,0 +1,14 @@
var coreJsData = require('./_coreJsData'),
isFunction = require('./isFunction'),
stubFalse = require('./stubFalse');
/**
* Checks if `func` is capable of being masked.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `func` is maskable, else `false`.
*/
var isMaskable = coreJsData ? isFunction : stubFalse;
module.exports = isMaskable;
@@ -0,0 +1,145 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.1.1](https://github.com/inspect-js/is-symbol/compare/v1.1.0...v1.1.1) - 2024-12-12
### Commits
- [actions] re-add finishers [`9b9d06f`](https://github.com/inspect-js/is-symbol/commit/9b9d06f571cf5b8481216b32474b567b02b14ae3)
- [Deps] update `call-bind`, `has-symbols`, `safe-regex-test` [`07f3647`](https://github.com/inspect-js/is-symbol/commit/07f36476b69e98353c09dc58cbcab8891e3ed2b7)
- [Refactor] use `call-bound` directly [`799402d`](https://github.com/inspect-js/is-symbol/commit/799402d3b0f291981b6406ec92c8c45cdad4e75e)
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig` [`4b8b2f9`](https://github.com/inspect-js/is-symbol/commit/4b8b2f9e844ebac93e89cf8e88e08ae0e8f4cc7f)
- [types] remove unneeded DT packages [`398abaa`](https://github.com/inspect-js/is-symbol/commit/398abaaea5a6192cd0eb9fda5f0a3cfb5b1da845)
## [v1.1.0](https://github.com/inspect-js/is-symbol/compare/v1.0.4...v1.1.0) - 2024-12-02
### Commits
- [actions] reuse common workflows [`acf85f0`](https://github.com/inspect-js/is-symbol/commit/acf85f027ec6ea70a7023646c47f9324ff9a5e25)
- [meta] use `npmignore` to autogenerate an npmignore file [`77c818e`](https://github.com/inspect-js/is-symbol/commit/77c818ebf4dc1107d945854185071ca76ef94d31)
- [Tests] use `for-each` and `es-value-fixtures` [`93dfed0`](https://github.com/inspect-js/is-symbol/commit/93dfed0de6c1da2946d83017cc0f44f8f7d15ded)
- [New] add types [`ed6a057`](https://github.com/inspect-js/is-symbol/commit/ed6a057e9595fb14c7d322ed4aba3433386d07bb)
- [actions] split out node 10-20, and 20+ [`7f81ccc`](https://github.com/inspect-js/is-symbol/commit/7f81ccc8bb2c667e6975f278c9dec7310a923749)
- [Robustness] use `call-bind` and `safe-regex-test` [`dc7e142`](https://github.com/inspect-js/is-symbol/commit/dc7e142724e9dce678b1ead151c7fedd02411a03)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`70f87c2`](https://github.com/inspect-js/is-symbol/commit/70f87c2715ad4cc8e66ce0eb4a4d2c4034b8e19c)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`3f02ff4`](https://github.com/inspect-js/is-symbol/commit/3f02ff4459ec96e22be4ef8cda0c966fafb5509a)
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `has-tostringtag`, `npmignore`, `object-inspect`, `tape` [`9588872`](https://github.com/inspect-js/is-symbol/commit/95888727f109c7e9d2fdfe7ed419cc8452505503)
- [actions] update rebase action to use reusable workflow [`59e2f68`](https://github.com/inspect-js/is-symbol/commit/59e2f680992f630eb1d76dd8e009d7fa074e3055)
- [actions] update codecov uploader [`e4759f8`](https://github.com/inspect-js/is-symbol/commit/e4759f8bea3b66d6d70f8b7b2656cc9b987ca874)
- [Dev Deps] update `eslint`, `auto-changelog`, `object-inspect`, `tape` [`33990c0`](https://github.com/inspect-js/is-symbol/commit/33990c0d76db7f44bcf177f7f5b602747b159a35)
- [Tests] use `has-tostringtag` for more robust Symbol.toStringTag detection [`d6154e1`](https://github.com/inspect-js/is-symbol/commit/d6154e10f79b572630fd309543160c446d7e46ef)
- [Tests] replace `aud` with `npm audit` [`3215a60`](https://github.com/inspect-js/is-symbol/commit/3215a60cf4ffce688e3911025cf2ccca95e259d0)
- [Refactor] avoid an expensive check, for primitives [`59f1a42`](https://github.com/inspect-js/is-symbol/commit/59f1a428ae625b59b618493c2454096900451d84)
- [Deps] update `has-symbols` [`06be1a9`](https://github.com/inspect-js/is-symbol/commit/06be1a9d1bf57181e35b1ffe446196243cc8becc)
- [Dev Deps] add missing peer dep [`799b0da`](https://github.com/inspect-js/is-symbol/commit/799b0da1902dfa5b02456fcf32887ead6e332358)
## [v1.0.4](https://github.com/inspect-js/is-symbol/compare/v1.0.3...v1.0.4) - 2021-05-08
### Commits
- [Tests] migrate tests to Github Actions [`997d43c`](https://github.com/inspect-js/is-symbol/commit/997d43c091d1f8d3a2b3d7dfb17a73cdc5a75dde)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`fe0ccb7`](https://github.com/inspect-js/is-symbol/commit/fe0ccb7b7b64e74e095ef782dcc1d24d6c4b0be4)
- [meta] remove unused Makefile and associated utilities [`3ab2748`](https://github.com/inspect-js/is-symbol/commit/3ab2748ab6c2de21fc24f131bb880c68ba0b7b34)
- [meta] do not publish github action workflow files [`f20fafe`](https://github.com/inspect-js/is-symbol/commit/f20fafeb21585c7b4871ea19f104fd7696734fe8)
- [Tests] run `nyc` on all tests [`5c332fc`](https://github.com/inspect-js/is-symbol/commit/5c332fc92cecbed4a2041bc0c52b991b4a593f34)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c5a58a8`](https://github.com/inspect-js/is-symbol/commit/c5a58a8bea390a9b02e1c8c4aac30c223370297b)
- [readme] fix repo URLs; remove travis badge [`bcd9258`](https://github.com/inspect-js/is-symbol/commit/bcd9258d161fe709148fcc47962df3372c544727)
- [actions] add "Allow Edits" workflow [`33ae2d3`](https://github.com/inspect-js/is-symbol/commit/33ae2d3940e9daa6003a84c232874ee558b2fb44)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`e53def0`](https://github.com/inspect-js/is-symbol/commit/e53def0b77c38cbfae87fd8bbfd78953b845ea94)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect` [`ae36504`](https://github.com/inspect-js/is-symbol/commit/ae365048c0c1b13457faa78658b80561f5a0bcd0)
- [readme] add actions and codecov badges [`aae7f09`](https://github.com/inspect-js/is-symbol/commit/aae7f09bd59d36df69d3b66d9b351c39fe072330)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`d993fae`](https://github.com/inspect-js/is-symbol/commit/d993fae6d89856d4ab7818874be597249cb8a8cc)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`51808a5`](https://github.com/inspect-js/is-symbol/commit/51808a55f272023201f40a59b2459ec6305bf73a)
- [Dev Deps] update `auto-changelog`, `tape` [`c90040f`](https://github.com/inspect-js/is-symbol/commit/c90040f0aeded8d0071a78d5cd593b385f8828ee)
- [Dev Deps] update `eslint`, `tape` [`9fee159`](https://github.com/inspect-js/is-symbol/commit/9fee159403d499a5ed2f5cb5db03747d09ab1766)
- [meta] use `prepublishOnly` script for npm 7+ [`b166afc`](https://github.com/inspect-js/is-symbol/commit/b166afc3ae3c6d11721a9558ddb112a28261688d)
- [meta] gitignore coverage output [`4a0fe3a`](https://github.com/inspect-js/is-symbol/commit/4a0fe3aa074b933074fcc231ce739005e1fec195)
- [actions] update workflows [`fbcbc9e`](https://github.com/inspect-js/is-symbol/commit/fbcbc9eb5bfe2cf9a77d5bd86bb1dece8e5f81d0)
- [Dev Deps] update `auto-changelog`; add `aud` [`e66ab98`](https://github.com/inspect-js/is-symbol/commit/e66ab989e48b81b48bd443d35dba0071950c5d7a)
- [Deps] update `has-symbols` [`6ce7de5`](https://github.com/inspect-js/is-symbol/commit/6ce7de53c866c068de2c28d97b3a64cf6d5f6a76)
- [actions] update rebase action to use checkout v2 [`1173c79`](https://github.com/inspect-js/is-symbol/commit/1173c79914076d73aec9aebc22dce4122e7bd3ae)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`94a6348`](https://github.com/inspect-js/is-symbol/commit/94a6348f6274eac9bf4c5a6057b4f6120fc7d1d1)
- [Tests] only audit prod deps [`0692681`](https://github.com/inspect-js/is-symbol/commit/06926811fa029fe0fded5d0af4553a7808c143d1)
- [meta] do not publish .nvmrc file [`ed47833`](https://github.com/inspect-js/is-symbol/commit/ed478333c72384f8dbeb51e5fd501238f52a4972)
## [v1.0.3](https://github.com/inspect-js/is-symbol/compare/v1.0.2...v1.0.3) - 2019-11-20
### Commits
- [Tests] use shared travis-ci configs [`034afdd`](https://github.com/inspect-js/is-symbol/commit/034afdd677c1b72b76751f3e5131acc927a32916)
- [Tests] remove `jscs` [`0c026a0`](https://github.com/inspect-js/is-symbol/commit/0c026a06815e46a33a8a5b4b1be8965d32d38e5c)
- [meta] add `auto-changelog` [`9a1776b`](https://github.com/inspect-js/is-symbol/commit/9a1776bb49f3e6ac12a5b3a447edcc651216891b)
- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`23a6db4`](https://github.com/inspect-js/is-symbol/commit/23a6db49a338d19eab19d876745513820bb6a9dc)
- [Tests] up to `node` `v11.7`, `v10.15`, `v8.15`, `v6.16` [`892d92e`](https://github.com/inspect-js/is-symbol/commit/892d92e7c40f3c0577583a98134106181c38bb7e)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `semver`, `tape` [`c2e6d6a`](https://github.com/inspect-js/is-symbol/commit/c2e6d6a71f839522bbd124b7419f5fc42ffff6d3)
- [readme] fix repo URLs [`655c288`](https://github.com/inspect-js/is-symbol/commit/655c288a815856e647dba4b6049b1743cec3533c)
- [actions] add automatic rebasing / merge commit blocking [`97b1229`](https://github.com/inspect-js/is-symbol/commit/97b12296bf8fa1ce0c6121bf3de56c413da10aae)
- [meta] add FUNDING.yml [`94c64a3`](https://github.com/inspect-js/is-symbol/commit/94c64a367a1c34f960cf6007fc65cfbbcba34ba3)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape`, `semver` [`71ab543`](https://github.com/inspect-js/is-symbol/commit/71ab543e09b820378362f4f66248addd410c6388)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `semver`, `tape` [`c6212f9`](https://github.com/inspect-js/is-symbol/commit/c6212f94e28622c94bb37189ffc241ee88b5b1dd)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `object-inspect` [`91bc802`](https://github.com/inspect-js/is-symbol/commit/91bc802e18e63f4e8230ee0148302ce849e2f733)
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`8cbe69c`](https://github.com/inspect-js/is-symbol/commit/8cbe69c3fafe9cfbe7d27f710c88d02d2d2c6a00)
- [Tests] use `npm audit` instead of `nsp` [`741b51d`](https://github.com/inspect-js/is-symbol/commit/741b51dac868f6b22736c204910d257bcf4d5044)
- [meta] add `funding` field [`65b58d1`](https://github.com/inspect-js/is-symbol/commit/65b58d1e9fc572712d462d615e6b2418627d8fb9)
- [Deps] update `has-symbols` [`9cb5b2a`](https://github.com/inspect-js/is-symbol/commit/9cb5b2a9a3b89e8e0246be8df4fff3f5ceac7309)
## [v1.0.2](https://github.com/inspect-js/is-symbol/compare/v1.0.1...v1.0.2) - 2018-09-20
### Commits
- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`e86aaea`](https://github.com/inspect-js/is-symbol/commit/e86aaea8d81356801ecfc60540523e9b809a55f4)
- [Tests] on all node minors; improve test matrix [`50bc07f`](https://github.com/inspect-js/is-symbol/commit/50bc07f2ff73e5499b02a61f0a00ea48a84ae213)
- [Dev Deps] update `tape`, `jscs`, `nsp`, `semver`, `eslint`, `@ljharb/eslint-config` [`45e17bd`](https://github.com/inspect-js/is-symbol/commit/45e17bdf145846f30122348a94c5e506b90836ba)
- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9`; use `nvm install-latest-npm` [`44402cb`](https://github.com/inspect-js/is-symbol/commit/44402cb82d4499e947b48b31b14667d1ebe7e2b4)
- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`, `v4.8`; improve matrix; old npm breaks on newer nodes [`9047c23`](https://github.com/inspect-js/is-symbol/commit/9047c232857ecb80551a21cc0b1cc4c91d28da1f)
- Update `tape`, `covert`, `jscs`, `semver` [`d57d1ce`](https://github.com/inspect-js/is-symbol/commit/d57d1ce3fc0b740885a1ed5c0738d4a27b29ab07)
- Add `npm run eslint` [`0d75a66`](https://github.com/inspect-js/is-symbol/commit/0d75a6638ad6f7ff7d5bc958531a6328fb13e3fe)
- Update `eslint` [`042fb3a`](https://github.com/inspect-js/is-symbol/commit/042fb3aec590f0c0d205b15812b285ad95cfff6b)
- [Refactor] use `has-symbols` and `object-inspect` [`129bc68`](https://github.com/inspect-js/is-symbol/commit/129bc68dd619b789b9956ac9b63b46257ee1060c)
- [Tests] up to `node` `v10.11`, `v8.12` [`c1822e8`](https://github.com/inspect-js/is-symbol/commit/c1822e84d6cc0cee9f1c2893e91b1aa999ad41db)
- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`089d2cf`](https://github.com/inspect-js/is-symbol/commit/089d2cf7cad87b75aa534769af11524ad2e79080)
- [Tests] up to `node` `v8.4`; newer npm breaks on older node [`05ce701`](https://github.com/inspect-js/is-symbol/commit/05ce701e3c1be8b3266ffac49806832e410491c1)
- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`241e6a6`](https://github.com/inspect-js/is-symbol/commit/241e6a655c0e19e9dcf0ae88e7fddd4cde394c5c)
- Test on latest `node` and `io.js` versions. [`5c8d5de`](https://github.com/inspect-js/is-symbol/commit/5c8d5deb9b7c01a8cdf959082a3d619c19751b0a)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `semver`, `tape` [`06047bf`](https://github.com/inspect-js/is-symbol/commit/06047bf72b20a66c0b455e80856b2d00b1910391)
- [Dev Deps] update `jscs`, `nsp`, `semver`, `eslint`, `@ljharb/eslint-config` [`9d25dd7`](https://github.com/inspect-js/is-symbol/commit/9d25dd79347c89f98207a3bad39f667f1f8a410e)
- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`ce173bd`](https://github.com/inspect-js/is-symbol/commit/ce173bda6e146907e3061a0e70463107d955de35)
- Update `nsp`, `eslint` [`29e5214`](https://github.com/inspect-js/is-symbol/commit/29e52140fac2049b4a32e175787bb3b184a1dd72)
- Update `semver`, `eslint` [`53be884`](https://github.com/inspect-js/is-symbol/commit/53be884c2811f7a4452581003d9cdaf6f9bddd3c)
- [Dev Deps] update `eslint`, `nsp`, `semver`, `tape` [`3bd149c`](https://github.com/inspect-js/is-symbol/commit/3bd149c869c099b07104b06c0692755a01f8298c)
- [Dev Deps] update `jscs` [`69b4231`](https://github.com/inspect-js/is-symbol/commit/69b4231632b170e5ddb350db2f0c59e6cad6f548)
- Test up to `io.js` `v2.1` [`0b61ac7`](https://github.com/inspect-js/is-symbol/commit/0b61ac7ac4de390296aeefb9395549592ea87da4)
- [Dev Deps] update `tape` [`5e1b200`](https://github.com/inspect-js/is-symbol/commit/5e1b2008c910bcdabee299a1ac599143ea07c3f9)
- Only apps should have lockfiles. [`a191ff5`](https://github.com/inspect-js/is-symbol/commit/a191ff5f0320fc16db42fdaa40f0c21d4326255e)
- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`97c87ef`](https://github.com/inspect-js/is-symbol/commit/97c87ef52b966f211e231092a54ef6ed05c99a26)
- Test on `io.js` `v2.2` [`42560e4`](https://github.com/inspect-js/is-symbol/commit/42560e466e17cbbb9fa71c0121f4bbbcf266c887)
- [Dev Deps] Update `tape`, `eslint` [`149b2f2`](https://github.com/inspect-js/is-symbol/commit/149b2f20bde92b2da12ccfeb8988beb2dc95c37c)
- [Tests] fix test messages [`28bd1ed`](https://github.com/inspect-js/is-symbol/commit/28bd1eda310590e13ada19cbd718c85c25d8a0c5)
- Test up to `io.js` `v3.0` [`c0dcc98`](https://github.com/inspect-js/is-symbol/commit/c0dcc98313d17151ec043e5452df306618be865e)
- `node` now supports Symbols now. [`d1853ad`](https://github.com/inspect-js/is-symbol/commit/d1853adf6369ab9d4c4516bdb032c2e42f52f90a)
- [Dev Deps] update `tape` [`f7a6575`](https://github.com/inspect-js/is-symbol/commit/f7a6575fbdef13abcc412c63d22b56943ed85969)
- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`aae9c6a`](https://github.com/inspect-js/is-symbol/commit/aae9c6a724578659976ea74e11ec9fe35608607b)
- Test on `io.js` `v2.4` [`ab8f449`](https://github.com/inspect-js/is-symbol/commit/ab8f4492115270cc00a479915b02ac1bac75dfed)
- Test on `io.js` `v2.3` [`58ce871`](https://github.com/inspect-js/is-symbol/commit/58ce871674e857955b333aa057eeecd68b40e988)
## [v1.0.1](https://github.com/inspect-js/is-symbol/compare/v1.0.0...v1.0.1) - 2015-01-26
### Commits
- Correct package description. [`f4d15b9`](https://github.com/inspect-js/is-symbol/commit/f4d15b928b4b754b097a84f7c3ceac73c486aceb)
## v1.0.0 - 2015-01-24
### Commits
- Dotfiles. [`5d9a744`](https://github.com/inspect-js/is-symbol/commit/5d9a7441f724630070e9bd74a995191cafa1064b)
- Tests. [`8af5663`](https://github.com/inspect-js/is-symbol/commit/8af56631950dcee48b36f517837273193a6ba119)
- `make release` [`6293446`](https://github.com/inspect-js/is-symbol/commit/629344654a72e7fc8059607d6a86c64b002c3e5d)
- package.json [`7d4082c`](https://github.com/inspect-js/is-symbol/commit/7d4082ca9502118e70d24f526704d45a1a7f2067)
- Initial commit [`cbb179f`](https://github.com/inspect-js/is-symbol/commit/cbb179f677bd3dcb56ac5e3f0a7a9af503fd8952)
- Read me. [`099a775`](https://github.com/inspect-js/is-symbol/commit/099a775e7e751706283ae1cab7a8635c094773a9)
- Implementation. [`cb51248`](https://github.com/inspect-js/is-symbol/commit/cb51248eedaf55e0b8ad7dacdab179db2d76e96e)
@@ -0,0 +1,6 @@
[![Test coverage](https://codecov.io/gh/inversify/monorepo/branch/main/graph/badge.svg?flag=%40inversifyjs%2Fcontainer)](https://codecov.io/gh/inversify/monorepo/branch/main/graph/badge.svg?flag=%40inversifyjs%2Fcontainer)
[![npm version](https://img.shields.io/github/package-json/v/inversify/monorepo?filename=packages%2Fcontainer%2Flibraries%2Fcontainer%2Fpackage.json&style=plastic)](https://www.npmjs.com/package/@inversifyjs/container)
# @inversifyjs/container
Inversify monorepo container.
@@ -0,0 +1 @@
module.exports={C:{"48":0.00616,"52":0.28971,"68":0.1541,"78":0.01233,"102":0.00616,"105":0.58558,"115":0.9246,"116":0.00616,"125":0.00616,"127":0.00616,"128":0.00616,"133":0.00616,"134":0.00616,"135":0.01233,"136":0.01849,"137":0.00616,"138":0.01233,"139":0.01849,"140":0.05548,"141":0.02466,"142":0.08013,"143":1.97864,"144":1.8492,"145":0.00616,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 103 104 106 107 108 109 110 111 112 113 114 117 118 119 120 121 122 123 124 126 129 130 131 132 146 147 3.5 3.6"},D:{"38":0.00616,"47":0.00616,"49":0.04931,"53":0.00616,"56":0.00616,"57":0.04315,"68":0.3945,"73":0.00616,"74":0.08013,"75":0.00616,"79":0.06164,"83":0.00616,"87":0.04931,"88":0.38833,"89":0.01233,"91":0.00616,"94":0.00616,"95":0.00616,"100":0.23423,"101":0.01233,"102":0.18492,"103":0.04315,"104":0.01233,"105":0.02466,"107":0.01849,"108":0.03698,"109":4.64766,"110":0.00616,"111":0.00616,"114":0.02466,"115":0.00616,"116":0.08013,"117":0.01849,"118":0.00616,"119":0.01233,"120":0.01849,"121":0.01233,"122":0.0678,"123":0.01233,"124":0.03698,"125":3.35322,"126":0.03082,"127":0.01233,"128":0.07397,"129":0.01233,"130":0.02466,"131":0.04315,"132":0.02466,"133":0.03082,"134":0.03698,"135":0.08013,"136":0.05548,"137":0.06164,"138":0.35751,"139":0.5301,"140":9.01793,"141":22.96706,"142":0.20341,"143":0.00616,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 39 40 41 42 43 44 45 46 48 50 51 52 54 55 58 59 60 61 62 63 64 65 66 67 69 70 71 72 76 77 78 80 81 84 85 86 90 92 93 96 97 98 99 106 112 113 144 145"},F:{"31":0.34518,"36":0.00616,"40":0.50545,"46":0.43148,"91":0.01233,"92":0.02466,"95":0.03698,"114":0.01849,"119":0.01233,"120":0.14794,"121":0.08013,"122":1.06021,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 32 33 34 35 37 38 39 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 115 116 117 118 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"109":0.09246,"126":0.00616,"131":0.00616,"134":0.00616,"135":0.00616,"136":0.00616,"137":0.00616,"138":0.00616,"139":0.01233,"140":0.59791,"141":3.0142,"142":0.00616,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 127 128 129 130 132 133"},E:{"12":0.00616,_:"0 4 5 6 7 8 9 10 11 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 15.1 15.2-15.3 16.0 17.0 26.2","12.1":0.00616,"13.1":0.00616,"14.1":0.01233,"15.4":0.00616,"15.5":0.00616,"15.6":0.07397,"16.1":0.00616,"16.2":0.00616,"16.3":0.01849,"16.4":0.00616,"16.5":0.01849,"16.6":0.08013,"17.1":0.07397,"17.2":0.00616,"17.3":0.00616,"17.4":0.02466,"17.5":0.01849,"17.6":0.12328,"18.0":0.00616,"18.1":0.01233,"18.2":0.01233,"18.3":0.03698,"18.4":0.02466,"18.5-18.6":0.07397,"26.0":0.33286,"26.1":0.00616},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00076,"5.0-5.1":0,"6.0-6.1":0.00302,"7.0-7.1":0.00227,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.0068,"10.0-10.2":0.00076,"10.3":0.01285,"11.0-11.2":0.19048,"11.3-11.4":0.00454,"12.0-12.1":0.00151,"12.2-12.5":0.03704,"13.0-13.1":0,"13.2":0.00378,"13.3":0.00151,"13.4-13.7":0.00605,"14.0-14.4":0.01285,"14.5-14.8":0.01361,"15.0-15.1":0.01285,"15.2-15.3":0.00983,"15.4":0.01134,"15.5":0.01285,"15.6-15.8":0.16781,"16.0":0.02268,"16.1":0.04233,"16.2":0.02192,"16.3":0.03931,"16.4":0.00983,"16.5":0.01739,"16.6-16.7":0.2245,"17.0":0.01587,"17.1":0.02419,"17.2":0.01739,"17.3":0.0257,"17.4":0.04535,"17.5":0.07786,"17.6-17.7":0.19653,"18.0":0.0446,"18.1":0.09222,"18.2":0.04989,"18.3":0.16025,"18.4":0.08239,"18.5-18.6":4.20117,"26.0":0.51929,"26.1":0.0189},P:{"4":0.27491,"21":0.01057,"22":0.01057,"23":0.01057,"24":0.01057,"25":0.01057,"26":0.03172,"27":0.04229,"28":1.33224,"29":0.09516,_:"20 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","5.0-5.4":0.01057,"7.2-7.4":0.03172},I:{"0":0.05361,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00003},K:{"0":0.19559,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.2219,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.33748},Q:{"14.9":0.00384},O:{"0":0.03835},H:{"0":0},L:{"0":30.84616}};
@@ -0,0 +1,7 @@
import type { ValidationRule } from '../types';
declare const _default: (validationData?: ValidationRule) => {
value: string | number | boolean | RegExp | undefined;
message: string;
};
export default _default;
//# sourceMappingURL=getValueAndMessage.d.ts.map
@@ -0,0 +1,27 @@
# camelcase-css [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
> Convert a kebab-cased CSS property into a camelCased DOM property.
## Installation
[Node.js](http://nodejs.org/) `>= 6` is required. Type this at the command line:
```shell
npm install camelcase-css
```
## Usage
```js
const camelCaseCSS = require('camelcase-css');
camelCaseCSS('-webkit-border-radius'); //-> WebkitBorderRadius
camelCaseCSS('-moz-border-radius'); //-> MozBorderRadius
camelCaseCSS('-ms-border-radius'); //-> msBorderRadius
camelCaseCSS('border-radius'); //-> borderRadius
```
[npm-image]: https://img.shields.io/npm/v/camelcase-css.svg
[npm-url]: https://npmjs.org/package/camelcase-css
[travis-image]: https://img.shields.io/travis/stevenvachon/camelcase-css.svg
[travis-url]: https://travis-ci.org/stevenvachon/camelcase-css
@@ -0,0 +1,79 @@
import * as stream from 'stream';
declare const isStream: {
/**
@returns Whether `stream` is a [`Stream`](https://nodejs.org/api/stream.html#stream_stream).
@example
```
import * as fs from 'fs';
import isStream = require('is-stream');
isStream(fs.createReadStream('unicorn.png'));
//=> true
isStream({});
//=> false
```
*/
(stream: unknown): stream is stream.Stream;
/**
@returns Whether `stream` is a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable).
@example
```
import * as fs from 'fs';
import isStream = require('is-stream');
isStream.writable(fs.createWriteStrem('unicorn.txt'));
//=> true
```
*/
writable(stream: unknown): stream is stream.Writable;
/**
@returns Whether `stream` is a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable).
@example
```
import * as fs from 'fs';
import isStream = require('is-stream');
isStream.readable(fs.createReadStream('unicorn.png'));
//=> true
```
*/
readable(stream: unknown): stream is stream.Readable;
/**
@returns Whether `stream` is a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
@example
```
import {Duplex} from 'stream';
import isStream = require('is-stream');
isStream.duplex(new Duplex());
//=> true
```
*/
duplex(stream: unknown): stream is stream.Duplex;
/**
@returns Whether `stream` is a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform).
@example
```
import * as fs from 'fs';
import Stringify = require('streaming-json-stringify');
import isStream = require('is-stream');
isStream.transform(Stringify());
//=> true
```
*/
transform(input: unknown): input is stream.Transform;
};
export = isStream;
@@ -0,0 +1,18 @@
"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("./computed"), exports);
@@ -0,0 +1,4 @@
import type { Config } from './types/config'
import { DefaultTheme } from './types/generated/default-theme'
declare const theme: Config['theme'] & DefaultTheme
export = theme
@@ -0,0 +1,91 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const path = require("path")
const {
CALL,
ReferenceTracker,
getStringIfConstant,
} = require("@eslint-community/eslint-utils")
const { isBuiltin } = require("node:module")
const getResolvePaths = require("./get-resolve-paths")
const getResolverConfig = require("./get-resolver-config")
const getTryExtensions = require("./get-try-extensions")
const ImportTarget = require("./import-target")
const stripImportPathParams = require("./strip-import-path-params")
const { getScope, getFilename } = require("../util/eslint-compat")
/**
* @typedef VisitRequireOptions
* @property {boolean} [includeCore=false] The flag to include core modules.
*/
/**
* Gets a list of `require()` targets.
*
* Core modules of Node.js (e.g. `fs`, `http`) are excluded.
*
* @param {import('eslint').Rule.RuleContext} context - The rule context.
* @param {VisitRequireOptions} options - The flag to include core modules.
* @param {function(ImportTarget[]): void} callback The callback function to get result.
* @returns {import('eslint').Rule.RuleListener} The visitor.
*/
module.exports = function visitRequire(
context,
{ includeCore = false },
callback
) {
/** @type {import('./import-target.js')[]} */
const targets = []
const basedir = path.dirname(path.resolve(getFilename(context)))
const paths = getResolvePaths(context)
const resolverConfig = getResolverConfig(context)
const extensions = getTryExtensions(context)
const options = { basedir, paths, extensions, resolverConfig }
return {
"Program:exit"() {
const tracker = new ReferenceTracker(getScope(context))
const references = tracker.iterateGlobalReferences({
require: {
[CALL]: true,
resolve: { [CALL]: true },
},
})
for (const { node } of references) {
if (node.type !== "CallExpression") {
continue
}
const targetNode = node.arguments[0]
if (targetNode == null) {
continue
}
const rawName = getStringIfConstant(targetNode)
if (typeof rawName !== "string") {
continue
}
const name = stripImportPathParams(rawName)
if (includeCore || !isBuiltin(name)) {
targets.push(
new ImportTarget(
context,
targetNode,
name,
options,
"require"
)
)
}
}
callback(targets)
},
}
}
@@ -0,0 +1,25 @@
Copyright 2017 Kat Marchán
Copyright npm, Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
---
This library is a fork of 'better-json-errors' by Kat Marchán, extended and
distributed under the terms of the MIT license above.
@@ -0,0 +1,43 @@
has-unicode
===========
Try to guess if your terminal supports unicode
```javascript
var hasUnicode = require("has-unicode")
if (hasUnicode()) {
// the terminal probably has unicode support
}
```
```javascript
var hasUnicode = require("has-unicode").tryHarder
hasUnicode(function(unicodeSupported) {
if (unicodeSupported) {
// the terminal probably has unicode support
}
})
```
## Detecting Unicode
What we actually detect is UTF-8 support, as that's what Node itself supports.
If you have a UTF-16 locale then you won't be detected as unicode capable.
### Windows
Since at least Windows 7, `cmd` and `powershell` have been unicode capable,
but unfortunately even then it's not guaranteed. In many localizations it
still uses legacy code pages and there's no facility short of running
programs or linking C++ that will let us detect this. As such, we
report any Windows installation as NOT unicode capable, and recommend
that you encourage your users to override this via config.
### Unix Like Operating Systems
We look at the environment variables `LC_ALL`, `LC_CTYPE`, and `LANG` in
that order. For `LC_ALL` and `LANG`, it looks for `.UTF-8` in the value.
For `LC_CTYPE` it looks to see if the value is `UTF-8`. This is sufficient
for most POSIX systems. While locale data can be put in `/etc/locale.conf`
as well, AFAIK it's always copied into the environment.
@@ -0,0 +1,7 @@
"use client";
import {
ListboxSelectedIcon
} from "./chunk-65JTUBIW.mjs";
export {
ListboxSelectedIcon
};
@@ -0,0 +1,11 @@
'use strict';
const utils = require('../utils');
const GzipFileStream = require('./file_stream');
const GzipUncompressStream = require('./uncompress_stream');
exports.FileStream = GzipFileStream;
exports.UncompressStream = GzipUncompressStream;
exports.compressFile = utils.makeFileProcessFn(GzipFileStream);
exports.uncompress = utils.makeFileProcessFn(GzipUncompressStream);
exports.decompress = utils.makeFileProcessFn(GzipUncompressStream);
@@ -0,0 +1,19 @@
import type { TSESLint } from '@typescript-eslint/utils';
export type Options = [
{
checksConditionals?: boolean;
checksSpreads?: boolean;
checksVoidReturn?: boolean | ChecksVoidReturnOptions;
}
];
export interface ChecksVoidReturnOptions {
arguments?: boolean;
attributes?: boolean;
inheritedMethods?: boolean;
properties?: boolean;
returns?: boolean;
variables?: boolean;
}
export type MessageId = 'conditional' | 'predicate' | 'spread' | 'voidReturnArgument' | 'voidReturnAttribute' | 'voidReturnInheritedMethod' | 'voidReturnProperty' | 'voidReturnReturnValue' | 'voidReturnVariable';
declare const _default: TSESLint.RuleModule<MessageId, Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1,125 @@
const isWindows = process.platform === 'win32' ||
process.env.OSTYPE === 'cygwin' ||
process.env.OSTYPE === 'msys'
const path = require('path')
const COLON = isWindows ? ';' : ':'
const isexe = require('isexe')
const getNotFoundError = (cmd) =>
Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })
const getPathInfo = (cmd, opt) => {
const colon = opt.colon || COLON
// If it has a slash, then we don't bother searching the pathenv.
// just check the file itself, and that's it.
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? ['']
: (
[
// windows always checks the cwd first
...(isWindows ? [process.cwd()] : []),
...(opt.path || process.env.PATH ||
/* istanbul ignore next: very unusual */ '').split(colon),
]
)
const pathExtExe = isWindows
? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'
: ''
const pathExt = isWindows ? pathExtExe.split(colon) : ['']
if (isWindows) {
if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
pathExt.unshift('')
}
return {
pathEnv,
pathExt,
pathExtExe,
}
}
const which = (cmd, opt, cb) => {
if (typeof opt === 'function') {
cb = opt
opt = {}
}
if (!opt)
opt = {}
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)
const found = []
const step = i => new Promise((resolve, reject) => {
if (i === pathEnv.length)
return opt.all && found.length ? resolve(found)
: reject(getNotFoundError(cmd))
const ppRaw = pathEnv[i]
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
const pCmd = path.join(pathPart, cmd)
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
: pCmd
resolve(subStep(p, i, 0))
})
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
if (ii === pathExt.length)
return resolve(step(i + 1))
const ext = pathExt[ii]
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
if (!er && is) {
if (opt.all)
found.push(p + ext)
else
return resolve(p + ext)
}
return resolve(subStep(p, i, ii + 1))
})
})
return cb ? step(0).then(res => cb(null, res), cb) : step(0)
}
const whichSync = (cmd, opt) => {
opt = opt || {}
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)
const found = []
for (let i = 0; i < pathEnv.length; i ++) {
const ppRaw = pathEnv[i]
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
const pCmd = path.join(pathPart, cmd)
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
: pCmd
for (let j = 0; j < pathExt.length; j ++) {
const cur = p + pathExt[j]
try {
const is = isexe.sync(cur, { pathExt: pathExtExe })
if (is) {
if (opt.all)
found.push(cur)
else
return cur
}
} catch (ex) {}
}
}
if (opt.all && found.length)
return found
if (opt.nothrow)
return null
throw getNotFoundError(cmd)
}
module.exports = which
which.sync = whichSync
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = inheritInnerComments;
var _inherit = require("../utils/inherit.js");
function inheritInnerComments(child, parent) {
(0, _inherit.default)("innerComments", child, parent);
}
//# sourceMappingURL=inheritInnerComments.js.map
@@ -0,0 +1,46 @@
<!-- NOTE: README.md is generated from src/README.md -->
# @codemirror/theme-one-dark [![NPM version](https://img.shields.io/npm/v/@codemirror/theme-one-dark.svg)](https://www.npmjs.org/package/@codemirror/theme-one-dark)
[ [**WEBSITE**](https://codemirror.net/) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/theme-one-dark/blob/main/CHANGELOG.md) ]
This package implements the One Dark theme for the
[CodeMirror](https://codemirror.net/) code editor.
The [project page](https://codemirror.net/) has more information, a
number of [examples](https://codemirror.net/examples/) and the
[documentation](https://codemirror.net/docs/).
This code is released under an
[MIT license](https://github.com/codemirror/theme-one-dark/tree/main/LICENSE).
We aim to be an inclusive, welcoming community. To make that explicit,
we have a [code of
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
to communication around the project.
## API Reference
<dl>
<dt id="user-content-onedark">
<code><strong><a href="#user-content-onedark">oneDark</a></strong>: <a href="https://codemirror.net/docs/ref#state.Extension">Extension</a></code></dt>
<dd><p>Extension to enable the One Dark theme (both the editor theme and
the highlight style).</p>
</dd>
<dt id="user-content-onedarktheme">
<code><strong><a href="#user-content-onedarktheme">oneDarkTheme</a></strong>: <a href="https://codemirror.net/docs/ref#state.Extension">Extension</a></code></dt>
<dd><p>The editor theme styles for One Dark.</p>
</dd>
<dt id="user-content-onedarkhighlightstyle">
<code><strong><a href="#user-content-onedarkhighlightstyle">oneDarkHighlightStyle</a></strong>: <a href="https://codemirror.net/docs/ref#language.HighlightStyle">HighlightStyle</a></code></dt>
<dd><p>The highlighting style for code in the One Dark theme.</p>
</dd>
<dt id="user-content-color">
<code><strong><a href="#user-content-color">color</a></strong>: {chalky: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, coral: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, cyan: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, invalid: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, ivory: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, stone: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, malibu: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, sage: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, whiskey: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, violet: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, darkBackground: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, highlightBackground: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, background: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, tooltipBackground: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, selection: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, cursor: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}</code></dt>
<dd><p>The colors used in the theme, as CSS color strings.</p>
</dd>
</dl>
@@ -0,0 +1 @@
{"version":3,"file":"defaultProps.d.ts","sourceRoot":"","sources":["defaultProps.js"],"names":[],"mappings":"AAgBiB;;;;;EA0PhB"}
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.id_authData = exports.id_encryptedData = exports.id_digestedData = exports.id_envelopedData = exports.id_signedData = exports.id_data = exports.id_ct_contentInfo = void 0;
exports.id_ct_contentInfo = "1.2.840.113549.1.9.16.1.6";
exports.id_data = "1.2.840.113549.1.7.1";
exports.id_signedData = "1.2.840.113549.1.7.2";
exports.id_envelopedData = "1.2.840.113549.1.7.3";
exports.id_digestedData = "1.2.840.113549.1.7.5";
exports.id_encryptedData = "1.2.840.113549.1.7.6";
exports.id_authData = "1.2.840.113549.1.9.16.1.2";
@@ -0,0 +1,58 @@
"use strict";
var __rest = this && this.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", {
value: true
});
const util_js_1 = require("../util.cjs");
const pull = offset => str => str.slice(offset);
const push = offset => {
const space = ''.padStart(offset, ' ');
return str => str + space;
};
function indent(pos) {
let shift;
const pad = start => {
if (shift === undefined) {
const offset = pos - start.length;
shift = offset > 0 ? push(offset) : pull(-offset);
}
return shift(start);
};
const update = line => Object.assign(Object.assign({}, line), {
tokens: Object.assign(Object.assign({}, line.tokens), {
start: pad(line.tokens.start)
})
});
return _a => {
var {
source
} = _a,
fields = __rest(_a, ["source"]);
return (0, util_js_1.rewireSource)(Object.assign(Object.assign({}, fields), {
source: source.map(update)
}));
};
}
exports.default = indent;
//# sourceMappingURL=indent.cjs.map
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('toJSON', require('../toJSON'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -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","257":"O P"},C:{"1":"0 1 2 3 4 5 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 xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC 0C 1C","578":"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"},D:{"1":"0 1 2 3 4 5 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","194":"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"},E:{"1":"SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E 2C ZC 3C 4C 5C","33":"F A B C L M G 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"},F:{"1":"0 1 2 3 4 5 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 FD GD HD ID NC uC JD OC","194":"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"},G:{"1":"SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD","33":"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"},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 uD vD wD xD QC RC SC yD","2":"J","194":"oD pD qD rD sD aC tD"},Q:{"2":"zD"},R:{"1":"0D"},S:{"2":"1D 2D"}},B:7,C:"CSS Backdrop Filter",D:true};
@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _domTarget = require("../utils/domTarget");
var checkIfAllInShadow = function checkIfAllInShadow(targets) {
return targets.every(function (item) {
var targetElement = (0, _domTarget.getTargetElement)(item);
if (!targetElement) {
return false;
}
if (targetElement.getRootNode() instanceof ShadowRoot) {
return true;
}
return false;
});
};
var getShadow = function getShadow(node) {
if (!node) {
return document;
}
return node.getRootNode();
};
var getDocumentOrShadow = function getDocumentOrShadow(target) {
if (!target || !document.getRootNode) {
return document;
}
var targets = Array.isArray(target) ? target : [target];
if (checkIfAllInShadow(targets)) {
return getShadow((0, _domTarget.getTargetElement)(targets[0]));
}
return document;
};
var _default = exports["default"] = getDocumentOrShadow;
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-2016, Jon Schlinkert
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,44 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
declare namespace Intl {
interface DateTimeFormatPartTypesRegistry {
day: any;
dayPeriod: any;
era: any;
hour: any;
literal: any;
minute: any;
month: any;
second: any;
timeZoneName: any;
weekday: any;
year: any;
}
type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry;
interface DateTimeFormatPart {
type: DateTimeFormatPartTypes;
value: string;
}
interface DateTimeFormat {
formatToParts(date?: Date | number): DateTimeFormatPart[];
}
}
@@ -0,0 +1,39 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description: "disallow the `Array.prototype.every` method.",
category: "ES5",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-array-prototype-every.html",
},
fixable: null,
messages: {
forbidden: "ES5 '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
Array: ["every"],
})
},
}
@@ -0,0 +1,399 @@
/**
* @import {Node as UnistNode, Parent as UnistParent} from 'unist'
*/
/**
* @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test
* Test from `unist-util-is`.
*
* Note: we have remove and add `undefined`, because otherwise when generating
* automatic `.d.ts` files, TS tries to flatten paths from a local perspective,
* which doesn’t work when publishing on npm.
*/
/**
* @typedef {(
* Fn extends (value: any) => value is infer Thing
* ? Thing
* : Fallback
* )} Predicate
* Get the value of a type guard `Fn`.
* @template Fn
* Value; typically function that is a type guard (such as `(x): x is Y`).
* @template Fallback
* Value to yield if `Fn` is not a type guard.
*/
/**
* @typedef {(
* Check extends null | undefined // No test.
* ? Value
* : Value extends {type: Check} // String (type) test.
* ? Value
* : Value extends Check // Partial test.
* ? Value
* : Check extends Function // Function test.
* ? Predicate<Check, Value> extends Value
* ? Predicate<Check, Value>
* : never
* : never // Some other test?
* )} MatchesOne
* Check whether a node matches a primitive check in the type system.
* @template Value
* Value; typically unist `Node`.
* @template Check
* Value; typically `unist-util-is`-compatible test, but not arrays.
*/
/**
* @typedef {(
* Check extends ReadonlyArray<infer T>
* ? MatchesOne<Value, T>
* : Check extends Array<infer T>
* ? MatchesOne<Value, T>
* : MatchesOne<Value, Check>
* )} Matches
* Check whether a node matches a check in the type system.
* @template Value
* Value; typically unist `Node`.
* @template Check
* Value; typically `unist-util-is`-compatible test.
*/
/**
* @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint
* Number; capped reasonably.
*/
/**
* @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment
* Increment a number in the type system.
* @template {Uint} [I=0]
* Index.
*/
/**
* @typedef {(
* Node extends UnistParent
* ? Node extends {children: Array<infer Children>}
* ? Child extends Children ? Node : never
* : never
* : never
* )} InternalParent
* Collect nodes that can be parents of `Child`.
* @template {UnistNode} Node
* All node types in a tree.
* @template {UnistNode} Child
* Node to search for.
*/
/**
* @typedef {InternalParent<InclusiveDescendant<Tree>, Child>} Parent
* Collect nodes in `Tree` that can be parents of `Child`.
* @template {UnistNode} Tree
* All node types in a tree.
* @template {UnistNode} Child
* Node to search for.
*/
/**
* @typedef {(
* Depth extends Max
* ? never
* :
* | InternalParent<Node, Child>
* | InternalAncestor<Node, InternalParent<Node, Child>, Max, Increment<Depth>>
* )} InternalAncestor
* Collect nodes in `Tree` that can be ancestors of `Child`.
* @template {UnistNode} Node
* All node types in a tree.
* @template {UnistNode} Child
* Node to search for.
* @template {Uint} [Max=10]
* Max; searches up to this depth.
* @template {Uint} [Depth=0]
* Current depth.
*/
/**
* @typedef {InternalAncestor<InclusiveDescendant<Tree>, Child>} Ancestor
* Collect nodes in `Tree` that can be ancestors of `Child`.
* @template {UnistNode} Tree
* All node types in a tree.
* @template {UnistNode} Child
* Node to search for.
*/
/**
* @typedef {(
* Tree extends UnistParent
* ? Depth extends Max
* ? Tree
* : Tree | InclusiveDescendant<Tree['children'][number], Max, Increment<Depth>>
* : Tree
* )} InclusiveDescendant
* Collect all (inclusive) descendants of `Tree`.
*
* > 👉 **Note**: for performance reasons, this seems to be the fastest way to
* > recurse without actually running into an infinite loop, which the
* > previous version did.
* >
* > Practically, a max of `2` is typically enough assuming a `Root` is
* > passed, but it doesn’t improve performance.
* > It gets higher with `List > ListItem > Table > TableRow > TableCell`.
* > Using up to `10` doesn’t hurt or help either.
* @template {UnistNode} Tree
* Tree type.
* @template {Uint} [Max=10]
* Max; searches up to this depth.
* @template {Uint} [Depth=0]
* Current depth.
*/
/**
* @typedef {'skip' | boolean} Action
* Union of the action types.
*
* @typedef {number} Index
* Move to the sibling at `index` next (after node itself is completely
* traversed).
*
* Useful if mutating the tree, such as removing the node the visitor is
* currently on, or any of its previous siblings.
* Results less than 0 or greater than or equal to `children.length` stop
* traversing the parent.
*
* @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple
* List with one or two values, the first an action, the second an index.
*
* @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult
* Any value that can be returned from a visitor.
*/
/**
* @callback Visitor
* Handle a node (matching `test`, if given).
*
* Visitors are free to transform `node`.
* They can also transform the parent of node (the last of `ancestors`).
*
* Replacing `node` itself, if `SKIP` is not returned, still causes its
* descendants to be walked (which is a bug).
*
* When adding or removing previous siblings of `node` (or next siblings, in
* case of reverse), the `Visitor` should return a new `Index` to specify the
* sibling to traverse after `node` is traversed.
* Adding or removing next siblings of `node` (or previous siblings, in case
* of reverse) is handled as expected without needing to return a new `Index`.
*
* Removing the children property of an ancestor still results in them being
* traversed.
* @param {Visited} node
* Found node.
* @param {Array<VisitedParents>} ancestors
* Ancestors of `node`.
* @returns {VisitorResult}
* What to do next.
*
* An `Index` is treated as a tuple of `[CONTINUE, Index]`.
* An `Action` is treated as a tuple of `[Action]`.
*
* Passing a tuple back only makes sense if the `Action` is `SKIP`.
* When the `Action` is `EXIT`, that action can be returned.
* When the `Action` is `CONTINUE`, `Index` can be returned.
* @template {UnistNode} [Visited=UnistNode]
* Visited node type.
* @template {UnistParent} [VisitedParents=UnistParent]
* Ancestor type.
*/
/**
* @typedef {Visitor<Matches<InclusiveDescendant<Tree>, Check>, Ancestor<Tree, Matches<InclusiveDescendant<Tree>, Check>>>} BuildVisitor
* Build a typed `Visitor` function from a tree and a test.
*
* It will infer which values are passed as `node` and which as `parents`.
* @template {UnistNode} [Tree=UnistNode]
* Tree type.
* @template {Test} [Check=Test]
* Test type.
*/
import {convert} from 'unist-util-is'
import {color} from 'unist-util-visit-parents/do-not-use-color'
/** @type {Readonly<ActionTuple>} */
const empty = []
/**
* Continue traversing as normal.
*/
export const CONTINUE = true
/**
* Stop traversing immediately.
*/
export const EXIT = false
/**
* Do not traverse this node’s children.
*/
export const SKIP = 'skip'
/**
* Visit nodes, with ancestral information.
*
* This algorithm performs *depth-first* *tree traversal* in *preorder*
* (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).
*
* You can choose for which nodes `visitor` is called by passing a `test`.
* For complex tests, you should test yourself in `visitor`, as it will be
* faster and will have improved type information.
*
* Walking the tree is an intensive task.
* Make use of the return values of the visitor when possible.
* Instead of walking a tree multiple times, walk it once, use `unist-util-is`
* to check if a node matches, and then perform different operations.
*
* You can change the tree.
* See `Visitor` for more info.
*
* @overload
* @param {Tree} tree
* @param {Check} check
* @param {BuildVisitor<Tree, Check>} visitor
* @param {boolean | null | undefined} [reverse]
* @returns {undefined}
*
* @overload
* @param {Tree} tree
* @param {BuildVisitor<Tree>} visitor
* @param {boolean | null | undefined} [reverse]
* @returns {undefined}
*
* @param {UnistNode} tree
* Tree to traverse.
* @param {Visitor | Test} test
* `unist-util-is`-compatible test
* @param {Visitor | boolean | null | undefined} [visitor]
* Handle each node.
* @param {boolean | null | undefined} [reverse]
* Traverse in reverse preorder (NRL) instead of the default preorder (NLR).
* @returns {undefined}
* Nothing.
*
* @template {UnistNode} Tree
* Node type.
* @template {Test} Check
* `unist-util-is`-compatible test.
*/
export function visitParents(tree, test, visitor, reverse) {
/** @type {Test} */
let check
if (typeof test === 'function' && typeof visitor !== 'function') {
reverse = visitor
// @ts-expect-error no visitor given, so `visitor` is test.
visitor = test
} else {
// @ts-expect-error visitor given, so `test` isn’t a visitor.
check = test
}
const is = convert(check)
const step = reverse ? -1 : 1
factory(tree, undefined, [])()
/**
* @param {UnistNode} node
* @param {number | undefined} index
* @param {Array<UnistParent>} parents
*/
function factory(node, index, parents) {
const value = /** @type {Record<string, unknown>} */ (
node && typeof node === 'object' ? node : {}
)
if (typeof value.type === 'string') {
const name =
// `hast`
typeof value.tagName === 'string'
? value.tagName
: // `xast`
typeof value.name === 'string'
? value.name
: undefined
Object.defineProperty(visit, 'name', {
value:
'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'
})
}
return visit
function visit() {
/** @type {Readonly<ActionTuple>} */
let result = empty
/** @type {Readonly<ActionTuple>} */
let subresult
/** @type {number} */
let offset
/** @type {Array<UnistParent>} */
let grandparents
if (!test || is(node, index, parents[parents.length - 1] || undefined)) {
// @ts-expect-error: `visitor` is now a visitor.
result = toResult(visitor(node, parents))
if (result[0] === EXIT) {
return result
}
}
if ('children' in node && node.children) {
const nodeAsParent = /** @type {UnistParent} */ (node)
if (nodeAsParent.children && result[0] !== SKIP) {
offset = (reverse ? nodeAsParent.children.length : -1) + step
grandparents = parents.concat(nodeAsParent)
while (offset > -1 && offset < nodeAsParent.children.length) {
const child = nodeAsParent.children[offset]
subresult = factory(child, offset, grandparents)()
if (subresult[0] === EXIT) {
return subresult
}
offset =
typeof subresult[1] === 'number' ? subresult[1] : offset + step
}
}
}
return result
}
}
}
/**
* Turn a return value into a clean result.
*
* @param {VisitorResult} value
* Valid return values from visitors.
* @returns {Readonly<ActionTuple>}
* Clean result.
*/
function toResult(value) {
if (Array.isArray(value)) {
return value
}
if (typeof value === 'number') {
return [CONTINUE, value]
}
return value === null || value === undefined ? empty : [value]
}
@@ -0,0 +1,73 @@
{
"name": "is-hexadecimal",
"version": "2.0.1",
"description": "Check if a character is hexadecimal",
"license": "MIT",
"keywords": [
"string",
"character",
"char",
"code",
"hexadecimal"
],
"repository": "wooorm/is-hexadecimal",
"bugs": "https://github.com/wooorm/is-hexadecimal/issues",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.d.ts",
"index.js"
],
"devDependencies": {
"@types/tape": "^4.0.0",
"c8": "^7.0.0",
"prettier": "^2.0.0",
"remark-cli": "^10.0.0",
"remark-preset-wooorm": "^9.0.0",
"rimraf": "^3.0.0",
"tape": "^5.0.0",
"type-coverage": "^2.0.0",
"typescript": "^4.0.0",
"xo": "^0.46.0"
},
"scripts": {
"prepublishOnly": "npm run build && npm run format",
"build": "rimraf \"*.d.ts\" && tsc && type-coverage",
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
"test-api": "node --conditions development test.js",
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"prettier": {
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"bracketSpacing": false,
"semi": false,
"trailingComma": "none"
},
"xo": {
"prettier": true
},
"remarkConfig": {
"plugins": [
"preset-wooorm"
]
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true,
"ignoreCatch": true
}
}
@@ -0,0 +1,66 @@
"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 __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(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/utils/cn.ts
var cn_exports = {};
__export(cn_exports, {
cn: () => cn
});
module.exports = __toCommonJS(cn_exports);
var import_clsx = __toESM(require("clsx"));
var import_tailwind_merge = require("tailwind-merge");
// 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/cn.ts
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({ extend: twMergeConfig });
function cn(...inputs) {
return twMerge((0, import_clsx.default)(inputs));
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
cn
});
@@ -0,0 +1,272 @@
/* eslint-env browser */
/**
* This is the web browser implementation of `debug()`.
*/
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = localstorage();
exports.destroy = (() => {
let warned = false;
return () => {
if (!warned) {
warned = true;
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
}
};
})();
/**
* Colors.
*/
exports.colors = [
'#0000CC',
'#0000FF',
'#0033CC',
'#0033FF',
'#0066CC',
'#0066FF',
'#0099CC',
'#0099FF',
'#00CC00',
'#00CC33',
'#00CC66',
'#00CC99',
'#00CCCC',
'#00CCFF',
'#3300CC',
'#3300FF',
'#3333CC',
'#3333FF',
'#3366CC',
'#3366FF',
'#3399CC',
'#3399FF',
'#33CC00',
'#33CC33',
'#33CC66',
'#33CC99',
'#33CCCC',
'#33CCFF',
'#6600CC',
'#6600FF',
'#6633CC',
'#6633FF',
'#66CC00',
'#66CC33',
'#9900CC',
'#9900FF',
'#9933CC',
'#9933FF',
'#99CC00',
'#99CC33',
'#CC0000',
'#CC0033',
'#CC0066',
'#CC0099',
'#CC00CC',
'#CC00FF',
'#CC3300',
'#CC3333',
'#CC3366',
'#CC3399',
'#CC33CC',
'#CC33FF',
'#CC6600',
'#CC6633',
'#CC9900',
'#CC9933',
'#CCCC00',
'#CCCC33',
'#FF0000',
'#FF0033',
'#FF0066',
'#FF0099',
'#FF00CC',
'#FF00FF',
'#FF3300',
'#FF3333',
'#FF3366',
'#FF3399',
'#FF33CC',
'#FF33FF',
'#FF6600',
'#FF6633',
'#FF9900',
'#FF9933',
'#FFCC00',
'#FFCC33'
];
/**
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
* and the Firebug extension (any Firefox version) are known
* to support "%c" CSS customizations.
*
* TODO: add a `localStorage` variable to explicitly enable/disable colors
*/
// eslint-disable-next-line complexity
function useColors() {
// NB: In an Electron preload script, document will be defined but not fully
// initialized. Since we know we're in Chrome, we'll just detect this case
// explicitly
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
return true;
}
// Internet Explorer and Edge do not support colors.
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
return false;
}
let m;
// Is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
// eslint-disable-next-line no-return-assign
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
// Is firebug? http://stackoverflow.com/a/398120/376773
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
// Is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
// Double check webkit in userAgent just in case we are in a worker
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
}
/**
* Colorize log arguments if enabled.
*
* @api public
*/
function formatArgs(args) {
args[0] = (this.useColors ? '%c' : '') +
this.namespace +
(this.useColors ? ' %c' : ' ') +
args[0] +
(this.useColors ? '%c ' : ' ') +
'+' + module.exports.humanize(this.diff);
if (!this.useColors) {
return;
}
const c = 'color: ' + this.color;
args.splice(1, 0, c, 'color: inherit');
// The final "%c" is somewhat tricky, because there could be other
// arguments passed either before or after the %c, so we need to
// figure out the correct index to insert the CSS into
let index = 0;
let lastC = 0;
args[0].replace(/%[a-zA-Z%]/g, match => {
if (match === '%%') {
return;
}
index++;
if (match === '%c') {
// We only are interested in the *last* %c
// (the user may have provided their own)
lastC = index;
}
});
args.splice(lastC, 0, c);
}
/**
* Invokes `console.debug()` when available.
* No-op when `console.debug` is not a "function".
* If `console.debug` is not available, falls back
* to `console.log`.
*
* @api public
*/
exports.log = console.debug || console.log || (() => {});
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
try {
if (namespaces) {
exports.storage.setItem('debug', namespaces);
} else {
exports.storage.removeItem('debug');
}
} catch (error) {
// Swallow
// XXX (@Qix-) should we be logging these?
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
let r;
try {
r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
} catch (error) {
// Swallow
// XXX (@Qix-) should we be logging these?
}
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
if (!r && typeof process !== 'undefined' && 'env' in process) {
r = process.env.DEBUG;
}
return r;
}
/**
* Localstorage attempts to return the localstorage.
*
* This is necessary because safari throws
* when a user disables cookies/localstorage
* and you attempt to access it.
*
* @return {LocalStorage}
* @api private
*/
function localstorage() {
try {
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
// The Browser also has localStorage in the global context.
return localStorage;
} catch (error) {
// Swallow
// XXX (@Qix-) should we be logging these?
}
}
module.exports = require('./common')(exports);
const {formatters} = module.exports;
/**
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
*/
formatters.j = function (v) {
try {
return JSON.stringify(v);
} catch (error) {
return '[UnexpectedJSONParseError]: ' + error.message;
}
};
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_regexp = void 0;
const base_config_1 = require("./base-config");
exports.esnext_regexp = {
libs: [],
variables: [['RegExp', base_config_1.TYPE]],
};
@@ -0,0 +1,71 @@
// src/delete.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var DeleteIcon = (props) => /* @__PURE__ */ jsxs(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 20 20",
width: "1em",
...props,
children: [
/* @__PURE__ */ jsx(
"path",
{
d: "M17.5 4.98332C14.725 4.70832 11.9333 4.56665 9.15 4.56665C7.5 4.56665 5.85 4.64998 4.2 4.81665L2.5 4.98332",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M7.08331 4.14169L7.26665 3.05002C7.39998 2.25835 7.49998 1.66669 8.90831 1.66669H11.0916C12.5 1.66669 12.6083 2.29169 12.7333 3.05835L12.9166 4.14169",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M15.7084 7.61664L15.1667 16.0083C15.075 17.3166 15 18.3333 12.675 18.3333H7.32502C5.00002 18.3333 4.92502 17.3166 4.83335 16.0083L4.29169 7.61664",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M8.60834 13.75H11.3833",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M7.91669 10.4167H12.0834",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5
}
)
]
}
);
export {
DeleteIcon
};
@@ -0,0 +1,229 @@
'use strict';
const ansiStyles = require('ansi-styles');
const {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');
const {
stringReplaceAll,
stringEncaseCRLFWithFirstIndex
} = require('./util');
const {isArray} = Array;
// `supportsColor.level` → `ansiStyles.color[name]` mapping
const levelMapping = [
'ansi',
'ansi',
'ansi256',
'ansi16m'
];
const styles = Object.create(null);
const applyOptions = (object, options = {}) => {
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
throw new Error('The `level` option should be an integer from 0 to 3');
}
// Detect level if not set manually
const colorLevel = stdoutColor ? stdoutColor.level : 0;
object.level = options.level === undefined ? colorLevel : options.level;
};
class ChalkClass {
constructor(options) {
// eslint-disable-next-line no-constructor-return
return chalkFactory(options);
}
}
const chalkFactory = options => {
const chalk = {};
applyOptions(chalk, options);
chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
Object.setPrototypeOf(chalk, Chalk.prototype);
Object.setPrototypeOf(chalk.template, chalk);
chalk.template.constructor = () => {
throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');
};
chalk.template.Instance = ChalkClass;
return chalk.template;
};
function Chalk(options) {
return chalkFactory(options);
}
for (const [styleName, style] of Object.entries(ansiStyles)) {
styles[styleName] = {
get() {
const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
Object.defineProperty(this, styleName, {value: builder});
return builder;
}
};
}
styles.visible = {
get() {
const builder = createBuilder(this, this._styler, true);
Object.defineProperty(this, 'visible', {value: builder});
return builder;
}
};
const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];
for (const model of usedModels) {
styles[model] = {
get() {
const {level} = this;
return function (...arguments_) {
const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
return createBuilder(this, styler, this._isEmpty);
};
}
};
}
for (const model of usedModels) {
const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
styles[bgModel] = {
get() {
const {level} = this;
return function (...arguments_) {
const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
return createBuilder(this, styler, this._isEmpty);
};
}
};
}
const proto = Object.defineProperties(() => {}, {
...styles,
level: {
enumerable: true,
get() {
return this._generator.level;
},
set(level) {
this._generator.level = level;
}
}
});
const createStyler = (open, close, parent) => {
let openAll;
let closeAll;
if (parent === undefined) {
openAll = open;
closeAll = close;
} else {
openAll = parent.openAll + open;
closeAll = close + parent.closeAll;
}
return {
open,
close,
openAll,
closeAll,
parent
};
};
const createBuilder = (self, _styler, _isEmpty) => {
const builder = (...arguments_) => {
if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
// Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`
return applyStyle(builder, chalkTag(builder, ...arguments_));
}
// Single argument is hot path, implicit coercion is faster than anything
// eslint-disable-next-line no-implicit-coercion
return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
};
// We alter the prototype because we must return a function, but there is
// no way to create a function with a different prototype
Object.setPrototypeOf(builder, proto);
builder._generator = self;
builder._styler = _styler;
builder._isEmpty = _isEmpty;
return builder;
};
const applyStyle = (self, string) => {
if (self.level <= 0 || !string) {
return self._isEmpty ? '' : string;
}
let styler = self._styler;
if (styler === undefined) {
return string;
}
const {openAll, closeAll} = styler;
if (string.indexOf('\u001B') !== -1) {
while (styler !== undefined) {
// Replace any instances already present with a re-opening code
// otherwise only the part of the string until said closing code
// will be colored, and the rest will simply be 'plain'.
string = stringReplaceAll(string, styler.close, styler.open);
styler = styler.parent;
}
}
// We can move both next actions out of loop, because remaining actions in loop won't have
// any/visible effect on parts we add here. Close the styling before a linebreak and reopen
// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
const lfIndex = string.indexOf('\n');
if (lfIndex !== -1) {
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
}
return openAll + string + closeAll;
};
let template;
const chalkTag = (chalk, ...strings) => {
const [firstString] = strings;
if (!isArray(firstString) || !isArray(firstString.raw)) {
// If chalk() was called by itself or with a string,
// return the string itself as a string.
return strings.join(' ');
}
const arguments_ = strings.slice(1);
const parts = [firstString.raw[0]];
for (let i = 1; i < firstString.length; i++) {
parts.push(
String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'),
String(firstString.raw[i])
);
}
if (template === undefined) {
template = require('./templates');
}
return template(chalk, parts.join(''));
};
Object.defineProperties(Chalk.prototype, styles);
const chalk = Chalk(); // eslint-disable-line new-cap
chalk.supportsColor = stdoutColor;
chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap
chalk.stderr.supportsColor = stderrColor;
module.exports = chalk;
@@ -0,0 +1,36 @@
import { createRule, getValue, sourceType } from '../utils/index.js';
export default createRule({
name: 'no-named-export',
meta: {
type: 'suggestion',
docs: {
category: 'Style guide',
description: 'Forbid named exports.',
},
schema: [],
messages: {
noAllowed: 'Named exports are not allowed.',
},
},
defaultOptions: [],
create(context) {
if (sourceType(context) !== 'module') {
return {};
}
return {
ExportAllDeclaration(node) {
context.report({ node, messageId: 'noAllowed' });
},
ExportNamedDeclaration(node) {
if (node.specifiers.length === 0) {
return context.report({ node, messageId: 'noAllowed' });
}
const someNamed = node.specifiers.some(specifier => getValue(specifier.exported) !== 'default');
if (someNamed) {
context.report({ node, messageId: 'noAllowed' });
}
},
};
},
});
//# sourceMappingURL=no-named-export.js.map
@@ -0,0 +1,113 @@
/*
* 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.
*/ // Data from https://github.com/unicode-cldr/cldr-core/blob/master/supplemental/weekData.json
// Locales starting on Sunday have been removed for compression.
const $2fe286d2fb449abb$export$7a5acbd77d414bd9 = {
'001': 1,
AD: 1,
AE: 6,
AF: 6,
AI: 1,
AL: 1,
AM: 1,
AN: 1,
AR: 1,
AT: 1,
AU: 1,
AX: 1,
AZ: 1,
BA: 1,
BE: 1,
BG: 1,
BH: 6,
BM: 1,
BN: 1,
BY: 1,
CH: 1,
CL: 1,
CM: 1,
CN: 1,
CR: 1,
CY: 1,
CZ: 1,
DE: 1,
DJ: 6,
DK: 1,
DZ: 6,
EC: 1,
EE: 1,
EG: 6,
ES: 1,
FI: 1,
FJ: 1,
FO: 1,
FR: 1,
GB: 1,
GE: 1,
GF: 1,
GP: 1,
GR: 1,
HR: 1,
HU: 1,
IE: 1,
IQ: 6,
IR: 6,
IS: 1,
IT: 1,
JO: 6,
KG: 1,
KW: 6,
KZ: 1,
LB: 1,
LI: 1,
LK: 1,
LT: 1,
LU: 1,
LV: 1,
LY: 6,
MC: 1,
MD: 1,
ME: 1,
MK: 1,
MN: 1,
MQ: 1,
MV: 5,
MY: 1,
NL: 1,
NO: 1,
NZ: 1,
OM: 6,
PL: 1,
QA: 6,
RE: 1,
RO: 1,
RS: 1,
RU: 1,
SD: 6,
SE: 1,
SI: 1,
SK: 1,
SM: 1,
SY: 6,
TJ: 1,
TM: 1,
TR: 1,
UA: 1,
UY: 1,
UZ: 1,
VA: 1,
VN: 1,
XK: 1
};
export {$2fe286d2fb449abb$export$7a5acbd77d414bd9 as weekStartData};
//# sourceMappingURL=weekStartData.module.js.map
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=jsx-curly-brace-presence.d.ts.map
@@ -0,0 +1,2 @@
export declare const pendingClassMetadataCountReflectKey: string;
//# sourceMappingURL=pendingClassMetadataCountReflectKey.d.ts.map
@@ -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 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 xB yB zB 0B 1B 2B 3B UC 4B 0C 1C"},D:{"1":"0 1 2 3 4 5 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 yB zB 0B 1B 2B 3B UC","196":"4B VC 5B 6B","324":"7B"},E:{"1":"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 F A B C 2C ZC 3C 4C 5C 6C aC NC","516":"L M G OC 7C 8C 9C bC cC PC AD QC dC eC fC"},F:{"1":"0 1 2 3 4 5 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 oB pB qB rB sB tB uB vB wB FD GD HD ID NC uC JD OC"},G:{"1":"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 PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC"},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:{"2":"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:"Server Timing",D:true};
@@ -0,0 +1,8 @@
test:
@./node_modules/.bin/mocha \
--require should \
--reporter spec \
--bail
.PHONY: test
@@ -0,0 +1 @@
{"name":"file-type","version":"21.1.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532099308,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"core.js":{"checkedAt":1794532099308,"integrity":"sha512-w+COcZ2Tg5n65WPm9h4qs2kpsitcawpcV1FCMRCaXbkZ3E5RESxvHnsKRwE7uUF7grUa8/GADxlRrU9kQApoAw==","mode":420,"size":44278},"index.js":{"checkedAt":1794532099308,"integrity":"sha512-jeJHx0mhOsM+ggpIw7qBEsW+iUiVpljXMetHJ25MCdpBJ6nOQGIkPd2lGITijMTo7C44vgwNhZSsfSIiL9Hv5Q==","mode":420,"size":2450},"supported.js":{"checkedAt":1794532099308,"integrity":"sha512-dnGzZZQP58WftvRELcuCoYLiKDIggxPLQA8UZfC3IHjYjCB4zCts08+1r9OKv15hgabKs8hpmbCxqAwF8087/A==","mode":420,"size":6272},"util.js":{"checkedAt":1794532099308,"integrity":"sha512-+Y2Z+p2B2Cmbtc3iLseOSNU9Gkiwg1b23SNwYT43Qxq9QIUDUVRl6KICXaemGCeaGsfNwYM2mmXfyKWnNw8YUA==","mode":420,"size":1861},"package.json":{"checkedAt":1794532099309,"integrity":"sha512-yg313Q5LHlGBwgpOpyk7a/vVlVwRGaIb585gmuMQUbaHDNOtxWF9pqChbcEiRr1fUWVBgpyWvwsRuPbuXwEbSA==","mode":420,"size":3646},"readme.md":{"checkedAt":1794532099309,"integrity":"sha512-tM6n7S2rwB5JjZD5emJ1tD/1eJ/mvokqrQDOzCEruAFXy/0tJr1YW0ORgzYKRvCwmAHEdZijkmD+6wRWcOwSrw==","mode":420,"size":33490},"core.d.ts":{"checkedAt":1794532099309,"integrity":"sha512-T0lE2vOfVI+n/EBE9RvK/wzjyGSU4joRMjA9hOyjTn6F7VluJaEt8s85l1pt4F27jFilWx7wTWAE0q/Grc288Q==","mode":420,"size":10638},"index.d.ts":{"checkedAt":1794532099309,"integrity":"sha512-vfrKpiqzHcx3mE2iVbtrOth8+0GbYlDpRdlHrwd984bdAyvwK4ekkRbGXa19dUZ3RGtwW0XKmUfgkzlujhLEgA==","mode":420,"size":4932}}}
@@ -0,0 +1,35 @@
import assocIndexOf from './_assocIndexOf.js';
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
export default listCacheDelete;
@@ -0,0 +1,46 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Array.isArray` method.",
category: "ES5",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-array-isarray.html",
},
fixable: null,
messages: {
forbidden: "ES5 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
sourceCode.getScope(program),
)
for (const { node, path } of tracker.iterateGlobalReferences({
Array: {
isArray: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,82 @@
import { AriaTextFieldProps } from "@react-types/textfield";
import { HTMLAttributes, JSX, LabelHTMLAttributes, RefObject } from "react";
import { DOMAttributes, ValidationResult, RefObject as _RefObject1 } from "@react-types/shared";
/**
* A map of HTML element names and their interface types.
* For example `'a'` -> `HTMLAnchorElement`.
*/
type IntrinsicHTMLElements = {
[K in keyof IntrinsicHTMLAttributes]: IntrinsicHTMLAttributes[K] extends HTMLAttributes<infer T> ? T : never;
};
/**
* A map of HTML element names and their attribute interface types.
* For example `'a'` -> `AnchorHTMLAttributes<HTMLAnchorElement>`.
*/
type IntrinsicHTMLAttributes = JSX.IntrinsicElements;
type DefaultElementType = 'input';
/**
* The intrinsic HTML element names that `useTextField` supports; e.g. `input`,
* `textarea`.
*/
type TextFieldIntrinsicElements = keyof Pick<IntrinsicHTMLElements, 'input' | 'textarea'>;
/**
* The HTML element interfaces that `useTextField` supports based on what is
* defined for `TextFieldIntrinsicElements`; e.g. `HTMLInputElement`,
* `HTMLTextAreaElement`.
*/
type TextFieldHTMLElementType = Pick<IntrinsicHTMLElements, TextFieldIntrinsicElements>;
/**
* The HTML attributes interfaces that `useTextField` supports based on what
* is defined for `TextFieldIntrinsicElements`; e.g. `InputHTMLAttributes`,
* `TextareaHTMLAttributes`.
*/
type TextFieldHTMLAttributesType = Pick<IntrinsicHTMLAttributes, TextFieldIntrinsicElements>;
/**
* The type of `inputProps` returned by `useTextField`; e.g. `InputHTMLAttributes`,
* `TextareaHTMLAttributes`.
*/
type TextFieldInputProps<T extends TextFieldIntrinsicElements> = TextFieldHTMLAttributesType[T];
export interface AriaTextFieldOptions<T extends TextFieldIntrinsicElements> extends AriaTextFieldProps<TextFieldHTMLElementType[T]> {
/**
* The HTML element used to render the input, e.g. 'input', or 'textarea'.
* It determines whether certain HTML attributes will be included in `inputProps`.
* For example, [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-type).
* @default 'input'
*/
inputElementType?: T;
/**
* Controls whether inputted text is automatically capitalized and, if so, in what manner.
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize).
*/
autoCapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
}
/**
* The type of `ref` object that can be passed to `useTextField` based on the given
* intrinsic HTML element name; e.g.`RefObject<HTMLInputElement>`,
* `RefObject<HTMLTextAreaElement>`.
*/
type TextFieldRefObject<T extends TextFieldIntrinsicElements> = RefObject<TextFieldHTMLElementType[T] | null>;
export interface TextFieldAria<T extends TextFieldIntrinsicElements = DefaultElementType> extends ValidationResult {
/** Props for the input element. */
inputProps: TextFieldInputProps<T>;
/** Props for the text field's visible label element, if any. */
labelProps: DOMAttributes | LabelHTMLAttributes<HTMLLabelElement>;
/** Props for the text field's description element, if any. */
descriptionProps: DOMAttributes;
/** Props for the text field's error message element, if any. */
errorMessageProps: DOMAttributes;
}
/**
* Provides the behavior and accessibility implementation for a text field.
* @param props - Props for the text field.
* @param ref - Ref to the HTML input or textarea element.
*/
export function useTextField<T extends TextFieldIntrinsicElements = DefaultElementType>(props: AriaTextFieldOptions<T>, ref: TextFieldRefObject<T>): TextFieldAria<T>;
interface FormattedTextFieldState {
validate: (val: string) => boolean;
setInputValue: (val: string) => void;
}
export function useFormattedTextField(props: AriaTextFieldProps, state: FormattedTextFieldState, inputRef: _RefObject1<HTMLInputElement | null>): TextFieldAria;
export type { AriaTextFieldProps } from '@react-types/textfield';
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=InjectFromOptionsLifecycle.js.map
@@ -0,0 +1,86 @@
"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 tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const getForStatementHeadLoc_1 = require("../util/getForStatementHeadLoc");
exports.default = (0, util_1.createRule)({
name: 'no-for-in-array',
meta: {
type: 'problem',
docs: {
description: 'Disallow iterating over an array with a for-in loop',
recommended: 'recommended',
requiresTypeChecking: true,
},
messages: {
forInViolation: 'For-in loops over arrays skips holes, returns indices as strings, and may visit the prototype chain or other enumerable properties. Use a more robust iteration method such as for-of or array.forEach instead.',
},
schema: [],
},
defaultOptions: [],
create(context) {
return {
ForInStatement(node) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
const type = (0, util_1.getConstrainedTypeAtLocation)(services, node.right);
if (isArrayLike(checker, type)) {
context.report({
loc: (0, getForStatementHeadLoc_1.getForStatementHeadLoc)(context.sourceCode, node),
messageId: 'forInViolation',
});
}
},
};
},
});
function isArrayLike(checker, type) {
return isTypeRecurser(type, t => t.getNumberIndexType() != null && hasArrayishLength(checker, t));
}
function hasArrayishLength(checker, type) {
const lengthProperty = type.getProperty('length');
if (lengthProperty == null) {
return false;
}
return tsutils.isTypeFlagSet(checker.getTypeOfSymbol(lengthProperty), ts.TypeFlags.NumberLike);
}
function isTypeRecurser(type, predicate) {
if (type.isUnionOrIntersection()) {
return type.types.some(t => isTypeRecurser(t, predicate));
}
return predicate(type);
}
@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ht=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=n(e),a={name:"ht",weekdays:"dimanch_lendi_madi_mèkredi_jedi_vandredi_samdi".split("_"),months:"janvye_fevriye_mas_avril_me_jen_jiyè_out_septanm_oktòb_novanm_desanm".split("_"),weekdaysShort:"dim._len._mad._mèk._jed._van._sam.".split("_"),monthsShort:"jan._fev._mas_avr._me_jen_jiyè._out_sept._okt._nov._des.".split("_"),weekdaysMin:"di_le_ma_mè_je_va_sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"nan %s",past:"sa gen %s",s:"kèk segond",m:"yon minit",mm:"%d minit",h:"inèdtan",hh:"%d zè",d:"yon jou",dd:"%d jou",M:"yon mwa",MM:"%d mwa",y:"yon ane",yy:"%d ane"}};return d.default.locale(a,null,!0),a}));
@@ -0,0 +1,110 @@
import $k51So$arAEmodulejs from "./ar-AE.mjs";
import $k51So$bgBGmodulejs from "./bg-BG.mjs";
import $k51So$csCZmodulejs from "./cs-CZ.mjs";
import $k51So$daDKmodulejs from "./da-DK.mjs";
import $k51So$deDEmodulejs from "./de-DE.mjs";
import $k51So$elGRmodulejs from "./el-GR.mjs";
import $k51So$enUSmodulejs from "./en-US.mjs";
import $k51So$esESmodulejs from "./es-ES.mjs";
import $k51So$etEEmodulejs from "./et-EE.mjs";
import $k51So$fiFImodulejs from "./fi-FI.mjs";
import $k51So$frFRmodulejs from "./fr-FR.mjs";
import $k51So$heILmodulejs from "./he-IL.mjs";
import $k51So$hrHRmodulejs from "./hr-HR.mjs";
import $k51So$huHUmodulejs from "./hu-HU.mjs";
import $k51So$itITmodulejs from "./it-IT.mjs";
import $k51So$jaJPmodulejs from "./ja-JP.mjs";
import $k51So$koKRmodulejs from "./ko-KR.mjs";
import $k51So$ltLTmodulejs from "./lt-LT.mjs";
import $k51So$lvLVmodulejs from "./lv-LV.mjs";
import $k51So$nbNOmodulejs from "./nb-NO.mjs";
import $k51So$nlNLmodulejs from "./nl-NL.mjs";
import $k51So$plPLmodulejs from "./pl-PL.mjs";
import $k51So$ptBRmodulejs from "./pt-BR.mjs";
import $k51So$ptPTmodulejs from "./pt-PT.mjs";
import $k51So$roROmodulejs from "./ro-RO.mjs";
import $k51So$ruRUmodulejs from "./ru-RU.mjs";
import $k51So$skSKmodulejs from "./sk-SK.mjs";
import $k51So$slSImodulejs from "./sl-SI.mjs";
import $k51So$srSPmodulejs from "./sr-SP.mjs";
import $k51So$svSEmodulejs from "./sv-SE.mjs";
import $k51So$trTRmodulejs from "./tr-TR.mjs";
import $k51So$ukUAmodulejs from "./uk-UA.mjs";
import $k51So$zhCNmodulejs from "./zh-CN.mjs";
import $k51So$zhTWmodulejs from "./zh-TW.mjs";
var $a2f21f5f14f60553$exports = {};
$a2f21f5f14f60553$exports = {
"ar-AE": $k51So$arAEmodulejs,
"bg-BG": $k51So$bgBGmodulejs,
"cs-CZ": $k51So$csCZmodulejs,
"da-DK": $k51So$daDKmodulejs,
"de-DE": $k51So$deDEmodulejs,
"el-GR": $k51So$elGRmodulejs,
"en-US": $k51So$enUSmodulejs,
"es-ES": $k51So$esESmodulejs,
"et-EE": $k51So$etEEmodulejs,
"fi-FI": $k51So$fiFImodulejs,
"fr-FR": $k51So$frFRmodulejs,
"he-IL": $k51So$heILmodulejs,
"hr-HR": $k51So$hrHRmodulejs,
"hu-HU": $k51So$huHUmodulejs,
"it-IT": $k51So$itITmodulejs,
"ja-JP": $k51So$jaJPmodulejs,
"ko-KR": $k51So$koKRmodulejs,
"lt-LT": $k51So$ltLTmodulejs,
"lv-LV": $k51So$lvLVmodulejs,
"nb-NO": $k51So$nbNOmodulejs,
"nl-NL": $k51So$nlNLmodulejs,
"pl-PL": $k51So$plPLmodulejs,
"pt-BR": $k51So$ptBRmodulejs,
"pt-PT": $k51So$ptPTmodulejs,
"ro-RO": $k51So$roROmodulejs,
"ru-RU": $k51So$ruRUmodulejs,
"sk-SK": $k51So$skSKmodulejs,
"sl-SI": $k51So$slSImodulejs,
"sr-SP": $k51So$srSPmodulejs,
"sv-SE": $k51So$svSEmodulejs,
"tr-TR": $k51So$trTRmodulejs,
"uk-UA": $k51So$ukUAmodulejs,
"zh-CN": $k51So$zhCNmodulejs,
"zh-TW": $k51So$zhTWmodulejs
};
export {$a2f21f5f14f60553$exports as default};
//# sourceMappingURL=intlStrings.module.js.map
@@ -0,0 +1,36 @@
var arrayReduceRight = require('./_arrayReduceRight'),
baseEachRight = require('./_baseEachRight'),
baseIteratee = require('./_baseIteratee'),
baseReduce = require('./_baseReduce'),
isArray = require('./isArray');
/**
* This method is like `_.reduce` except that it iterates over elements of
* `collection` from right to left.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @returns {*} Returns the accumulated value.
* @see _.reduce
* @example
*
* var array = [[0, 1], [2, 3], [4, 5]];
*
* _.reduceRight(array, function(flattened, other) {
* return flattened.concat(other);
* }, []);
* // => [4, 5, 2, 3, 0, 1]
*/
function reduceRight(collection, iteratee, accumulator) {
var func = isArray(collection) ? arrayReduceRight : baseReduce,
initAccum = arguments.length < 3;
return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
}
module.exports = reduceRight;
@@ -0,0 +1,100 @@
import Scope from '../scope.js';
import type { Blot, Leaf, Root } from './abstract/blot.js';
import LeafBlot from './abstract/leaf.js';
class TextBlot extends LeafBlot implements Leaf {
public static readonly blotName = 'text';
public static scope = Scope.INLINE_BLOT;
public static create(value: string): Text {
return document.createTextNode(value);
}
public static value(domNode: Text): string {
return domNode.data;
}
public domNode!: Text;
protected text: string;
constructor(scroll: Root, node: Node) {
super(scroll, node);
this.text = this.statics.value(this.domNode);
}
public deleteAt(index: number, length: number): void {
this.domNode.data = this.text =
this.text.slice(0, index) + this.text.slice(index + length);
}
public index(node: Node, offset: number): number {
if (this.domNode === node) {
return offset;
}
return -1;
}
public insertAt(index: number, value: string, def?: any): void {
if (def == null) {
this.text = this.text.slice(0, index) + value + this.text.slice(index);
this.domNode.data = this.text;
} else {
super.insertAt(index, value, def);
}
}
public length(): number {
return this.text.length;
}
public optimize(context: { [key: string]: any }): void {
super.optimize(context);
this.text = this.statics.value(this.domNode);
if (this.text.length === 0) {
this.remove();
} else if (this.next instanceof TextBlot && this.next.prev === this) {
this.insertAt(this.length(), (this.next as TextBlot).value());
this.next.remove();
}
}
public position(index: number, _inclusive = false): [Node, number] {
return [this.domNode, index];
}
public split(index: number, force = false): Blot | null {
if (!force) {
if (index === 0) {
return this;
}
if (index === this.length()) {
return this.next;
}
}
const after = this.scroll.create(this.domNode.splitText(index));
this.parent.insertBefore(after, this.next || undefined);
this.text = this.statics.value(this.domNode);
return after;
}
public update(
mutations: MutationRecord[],
_context: { [key: string]: any },
): void {
if (
mutations.some((mutation) => {
return (
mutation.type === 'characterData' && mutation.target === this.domNode
);
})
) {
this.text = this.statics.value(this.domNode);
}
}
public value(): string {
return this.text;
}
}
export default TextBlot;
@@ -0,0 +1,38 @@
'use strict';
const fs = require('fs');
const zlib = require('zlib');
const utils = require('../utils');
const streamifier = require('streamifier');
class GzipFileStream extends zlib.Gzip {
constructor(opts) {
opts = opts || {};
super(opts.zlib);
const sourceType = utils.sourceType(opts.source);
if (sourceType === 'file') {
const stream = fs.createReadStream(opts.source, opts.fs);
stream.on('error', err => this.emit('error', err));
stream.pipe(this);
return;
}
if (sourceType === 'buffer') {
const stream = streamifier.createReadStream(opts.source, opts.streamifier);
stream.on('error', err => this.emit('error', err));
stream.pipe(this);
return;
}
if (sourceType === 'stream') {
opts.source.on('error', err => this.emit('error', err));
opts.source.pipe(this);
}
// else undefined: do nothing
}
}
module.exports = GzipFileStream;
@@ -0,0 +1,624 @@
flf2a$ 6 5 20 15 11
Letters by Sriram J. Gollapalli, July 10, 1994
o__ +----------------------+ __o
_.>/)_ | Sriram J. Gollapalli | _(\<._
(_) \(_) +----------------------+ (_)/ (_)
<sriram@capaccess.org>
---
Font modified June 17, 2007 (without permission) by patorjk
This was to widen "space" character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
!!!$@
!!!$@
!!!$@
$@
!!!$@
$@@
"""""$@
"""""$@
""" $@
$@
$@
$@@
$@
## ## $@
#######$@
#######$@
## ## $@
$@@
/|-\$@
/ | $@
\-|-\$@
| |$@
\-|-/$@
$@@
%% %%$@
%% %% $@
%% $@
%% %%$@
%% %%$@
$@@
&&& $@
&& && $@
&&&&&&&$@
&&& && $@
&&&&&&&$@
$@@
' $@
'''$@
'' $@
$@
$@
$@@
$@
((($@
((( $@
((( $@
((( $@
((($@@
$@
))) $@
)))$@
)))$@
)))$@
))) $@@
$@
* *$@
*** $@
*** $@
* *$@
$@@
$@
+++ $@
+++++++$@
+++++++$@
+++ $@
$@@
$@
$@
$@
, $@
,,,$@
,, $@@
$@
$@
_____ $@
$@
$@
$@@
$@
$@
$@
...$@
...$@
$@@
//$@
///$@
/// $@
/// $@
/// $@
$@@
00000 $@
00 00$@
00 00$@
00 00$@
00000 $@
$@@
1 $@
111$@
11$@
11$@
111$@
$@@
2222 $@
222222 $@
222$@
2222 $@
2222222$@
$@@
333333 $@
3333$@
3333 $@
333$@
333333 $@
$@@
44 $@
444 $@
44 4 $@
44444444$@
444 $@
$@@
555555 $@
55 $@
555555 $@
5555$@
555555 $@
$@@
666 $@
66 $@
666666 $@
66 66$@
66666 $@
$@@
7777777$@
777$@
777 $@
777 $@
777 $@
$@@
88888 $@
88 88$@
88888 $@
88 88$@
88888 $@
$@@
$@
99999 $@
99 99$@
999999$@
99 $@
999 $@@
$@
$@
:::$@
$@
:::$@
$@@
$@
$@
;;;$@
$@
;;;$@
;; $@@
$@
<<<$@
<<< $@
<<< $@
<<<$@
$@@
$@
$@
=======$@
=======$@
$@
$@@
$@
>>> $@
>>>$@
>>>$@
>>> $@
$@@
??? $@
?? ??$@
??$@
?? $@
?? $@
$@@
@@@@ $@
@ @@ @$@
@ @ @@$@
@ @@@ $@
@@@@@ $@
$@@
AAA $@
AAAAA $@
AA AA$@
AAAAAAA$@
AA AA$@
$@@
BBBBB $@
BB B $@
BBBBBB $@
BB BB$@
BBBBBB $@
$@@
CCCCC $@
CC C$@
CC $@
CC C$@
CCCCC $@
$@@
DDDDD $@
DD DD $@
DD DD$@
DD DD$@
DDDDDD $@
$@@
EEEEEEE$@
EE $@
EEEEE $@
EE $@
EEEEEEE$@
$@@
FFFFFFF$@
FF $@
FFFF $@
FF $@
FF $@
$@@
GGGG $@
GG GG$@
GG $@
GG GG$@
GGGGGG$@
$@@
HH HH$@
HH HH$@
HHHHHHH$@
HH HH$@
HH HH$@
$@@
IIIII$@
III $@
III $@
III $@
IIIII$@
$@@
JJJ$@
JJJ$@
JJJ$@
JJ JJJ$@
JJJJJ $@
$@@
KK KK$@
KK KK $@
KKKK $@
KK KK $@
KK KK$@
$@@
LL $@
LL $@
LL $@
LL $@
LLLLLLL$@
$@@
MM MM$@
MMM MMM$@
MM MM MM$@
MM MM$@
MM MM$@
$@@
NN NN$@
NNN NN$@
NN N NN$@
NN NNN$@
NN NN$@
$@@
OOOOO $@
OO OO$@
OO OO$@
OO OO$@
OOOO0 $@
$@@
PPPPPP $@
PP PP$@
PPPPPP $@
PP $@
PP $@
$@@
QQQQQ $@
QQ QQ$@
QQ QQ$@
QQ QQ $@
QQQQ Q$@
$@@
RRRRRR $@
RR RR$@
RRRRRR $@
RR RR $@
RR RR$@
$@@
SSSSS $@
SS $@
SSSSS $@
SS$@
SSSSS $@
$@@
TTTTTTT$@
TTT $@
TTT $@
TTT $@
TTT $@
$@@
UU UU$@
UU UU$@
UU UU$@
UU UU$@
UUUUU $@
$@@
VV VV$@
VV VV$@
VV VV $@
VV VV $@
VVV $@
$@@
WW WW$@
WW WW$@
WW W WW$@
WW WWW WW$@
WW WW $@
$@@
XX XX$@
XX XX $@
XXXX $@
XX XX $@
XX XX$@
$@@
YY YY$@
YY YY$@
YYYYY $@
YYY $@
YYY $@
$@@
ZZZZZ$@
ZZ$@
ZZ $@
ZZ $@
ZZZZZ$@
$@@
[[[[$@
[[ $@
[[ $@
[[ $@
[[[[$@
$@@
\\ $@
\\ $@
\\ $@
\\ $@
\\$@
$@@
]]]]$@
]]$@
]]$@
]]$@
]]]]$@
$@@
^^ $@
^^^^$@
^ ^$@
$@
$@
$@@
$@
$@
$@
$@
_______$@
$@@
` $@
```$@
``$@
$@
$@
$@@
$@
aa aa$@
aa aaa$@
aa aaa$@
aaa aa$@
$@@
bb $@
bb $@
bbbbbb $@
bb bb$@
bbbbbb $@
$@@
$@
cccc$@
cc $@
cc $@
ccccc$@
$@@
dd$@
dd$@
dddddd$@
dd dd$@
dddddd$@
$@@
$@
eee $@
ee e$@
eeeee $@
eeeee$@
$@@
fff$@
ff $@
ffff$@
ff $@
ff $@
$@@
$@
gggggg$@
gg gg$@
ggggggg$@
gg$@
ggggg $@@
hh $@
hh $@
hhhhhh $@
hh hh$@
hh hh$@
$@@
iii$@
$@
iii$@
iii$@
iii$@
$@@
jjj$@
$@
jjj$@
jjj$@
jjj$@
jjjj $@@
kk $@
kk kk$@
kkkkk $@
kk kk $@
kk kk$@
$@@
lll$@
lll$@
lll$@
lll$@
lll$@
$@@
$@
mm mm mmmm $@
mmm mm mm$@
mmm mm mm$@
mmm mm mm$@
$@@
$@
nn nnn $@
nnn nn$@
nn nn$@
nn nn$@
$@@
$@
oooo $@
oo oo$@
oo oo$@
oooo $@
$@@
$@
pp pp $@
ppp pp$@
pppppp $@
pp $@
pp $@@
$@
qqqqq$@
qq qq$@
qqqqqq$@
qq$@
qq$@@
$@
rr rr $@
rrr r$@
rr $@
rr $@
$@@
$@
sss $@
s $@
sss $@
s$@
sss $@@
tt $@
tt $@
tttt $@
tt $@
tttt$@
$@@
$@
uu uu$@
uu uu$@
uu uu$@
uuuu u$@
$@@
$@
vv vv$@
vv vv $@
vvv $@
v $@
$@@
$@
ww ww$@
ww ww$@
ww ww ww $@
ww ww $@
$@@
$@
xx xx$@
xx $@
xx $@
xx xx$@
$@@
$@
yy yy$@
yy yy$@
yyyyyy$@
yy$@
yyyyy $@@
$@
zzzzz$@
zz $@
zz $@
zzzzz$@
$@@
{{$@
{{ $@
{{{ $@
{{{ $@
{{ $@
{{$@@
$@
||$@
||$@
||$@
||$@
||$@@
}} $@
}} $@
}}}$@
}}}$@
}} $@
}} $@@
$@
~~ ~~$@
~ ~ $@
$@
$@
$@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@@ -0,0 +1,91 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
var yieldStarSpacing = utils.createRule({
name: "yield-star-spacing",
package: "js",
meta: {
type: "layout",
docs: {
description: "Require or disallow spacing around the `*` in `yield*` expressions"
},
fixable: "whitespace",
schema: [
{
oneOf: [
{
type: "string",
enum: ["before", "after", "both", "neither"]
},
{
type: "object",
properties: {
before: { type: "boolean" },
after: { type: "boolean" }
},
additionalProperties: false
}
]
}
],
messages: {
missingBefore: "Missing space before *.",
missingAfter: "Missing space after *.",
unexpectedBefore: "Unexpected space before *.",
unexpectedAfter: "Unexpected space after *."
}
},
create(context) {
const sourceCode = context.sourceCode;
const mode = function(option = "after") {
if (typeof option === "string") {
return {
before: { before: true, after: false },
after: { before: false, after: true },
both: { before: true, after: true },
neither: { before: false, after: false }
}[option];
}
return option;
}(context.options[0]);
function checkSpacing(side, leftToken, rightToken) {
if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken) !== mode[side]) {
const after = leftToken.value === "*";
const spaceRequired = mode[side];
const node = after ? leftToken : rightToken;
const messageId = spaceRequired ? side === "before" ? "missingBefore" : "missingAfter" : side === "before" ? "unexpectedBefore" : "unexpectedAfter";
context.report({
node,
messageId,
fix(fixer) {
if (spaceRequired) {
if (after)
return fixer.insertTextAfter(node, " ");
return fixer.insertTextBefore(node, " ");
}
return fixer.removeRange([leftToken.range[1], rightToken.range[0]]);
}
});
}
}
function checkExpression(node) {
if (!("delegate" in node && node.delegate))
return;
const tokens = sourceCode.getFirstTokens(node, 3);
const yieldToken = tokens[0];
const starToken = tokens[1];
const nextToken = tokens[2];
checkSpacing("before", yieldToken, starToken);
checkSpacing("after", starToken, nextToken);
}
return {
YieldExpression: checkExpression
};
}
});
module.exports = yieldStarSpacing;
@@ -0,0 +1,8 @@
language: node_js
node_js:
- "0.7"
- "0.8"
- "0.9"
- "0.10"
after_script:
- npm run coveralls
@@ -0,0 +1,91 @@
{
"name": "tailwind-merge",
"version": "2.6.0",
"description": "Merge Tailwind CSS classes without style conflicts",
"keywords": [
"tailwindcss",
"tailwind",
"css",
"classes",
"className",
"classList",
"merge",
"conflict",
"override"
],
"homepage": "https://github.com/dcastil/tailwind-merge",
"bugs": {
"url": "https://github.com/dcastil/tailwind-merge/issues"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/dcastil"
},
"license": "MIT",
"author": "Dany Castillo",
"files": [
"dist",
"src"
],
"source": "src/index.ts",
"exports": {
".": {
"types": "./dist/types.d.ts",
"require": "./dist/bundle-cjs.js",
"import": "./dist/bundle-mjs.mjs",
"default": "./dist/bundle-mjs.mjs"
},
"./es5": {
"types": "./dist/types.d.ts",
"require": "./dist/es5/bundle-cjs.js",
"import": "./dist/es5/bundle-mjs.mjs",
"default": "./dist/es5/bundle-mjs.mjs"
}
},
"main": "./dist/bundle-cjs.js",
"types": "./dist/types.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/dcastil/tailwind-merge.git"
},
"sideEffects": false,
"scripts": {
"build": "rollup --config scripts/rollup.config.mjs",
"bench": "vitest bench --config scripts/vitest.config.mts",
"test": "vitest --config scripts/vitest.config.mts --coverage",
"test:watch": "vitest --config scripts/vitest.config.mts",
"test:exports": "node scripts/test-built-package-exports.cjs && node scripts/test-built-package-exports.mjs",
"lint": "eslint --max-warnings 0 '**'",
"preversion": "if [ -n \"$DANYS_MACHINE\" ]; then git checkout main && git pull; fi",
"version": "zx scripts/update-readme.mjs",
"postversion": "if [ -n \"$DANYS_MACHINE\" ]; then git push --follow-tags && open https://github.com/dcastil/tailwind-merge/releases; fi"
},
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@codspeed/vitest-plugin": "^4.0.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-typescript": "^12.1.1",
"@vitest/coverage-v8": "^2.1.8",
"@vitest/eslint-plugin": "^1.1.14",
"babel-plugin-annotate-pure-calls": "^0.4.0",
"babel-plugin-polyfill-regenerator": "^0.6.3",
"eslint": "^9.16.0",
"eslint-plugin-import": "^2.31.0",
"globby": "^11.1.0",
"prettier": "^3.4.2",
"rollup": "^4.28.1",
"rollup-plugin-delete": "^2.1.0",
"rollup-plugin-dts": "^6.1.1",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"typescript-eslint": "^8.17.0",
"vitest": "^2.1.8",
"zx": "^8.2.4"
},
"publishConfig": {
"provenance": true
}
}
@@ -0,0 +1,34 @@
import baseHasIn from './_baseHasIn.js';
import hasPath from './_hasPath.js';
/**
* Checks if `path` is a direct or inherited property of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.hasIn(object, 'a');
* // => true
*
* _.hasIn(object, 'a.b');
* // => true
*
* _.hasIn(object, ['a', 'b']);
* // => true
*
* _.hasIn(object, 'b');
* // => false
*/
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
export default hasIn;
@@ -0,0 +1,54 @@
export type LilconfigResult = null | {
filepath: string;
config: any;
isEmpty?: boolean;
};
interface OptionsBase {
cache?: boolean;
stopDir?: string;
searchPlaces?: string[];
ignoreEmptySearchPlaces?: boolean;
packageProp?: string | string[];
}
export type Transform =
| TransformSync
| ((result: LilconfigResult) => Promise<LilconfigResult>);
export type TransformSync = (result: LilconfigResult) => LilconfigResult;
type LoaderResult = any;
export type LoaderSync = (filepath: string, content: string) => LoaderResult;
export type Loader =
| LoaderSync
| ((filepath: string, content: string) => Promise<LoaderResult>);
export type Loaders = Record<string, Loader>;
export type LoadersSync = Record<string, LoaderSync>;
export interface Options extends OptionsBase {
loaders?: Loaders;
transform?: Transform;
}
export interface OptionsSync extends OptionsBase {
loaders?: LoadersSync;
transform?: TransformSync;
}
export declare const defaultLoadersSync: LoadersSync;
export declare const defaultLoaders: Loaders;
type ClearCaches = {
clearLoadCache: () => void;
clearSearchCache: () => void;
clearCaches: () => void;
};
type AsyncSearcher = {
search(searchFrom?: string): Promise<LilconfigResult>;
load(filepath: string): Promise<LilconfigResult>;
} & ClearCaches;
export declare function lilconfig(
name: string,
options?: Partial<Options>,
): AsyncSearcher;
type SyncSearcher = {
search(searchFrom?: string): LilconfigResult;
load(filepath: string): LilconfigResult;
} & ClearCaches;
export declare function lilconfigSync(
name: string,
options?: OptionsSync,
): SyncSearcher;
@@ -0,0 +1,61 @@
/*
* 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 {PartialNode} from '@react-stately/collections';
import React, {JSX, ReactElement} from 'react';
import {TableBodyProps} from '@react-types/table';
function TableBody<T>(props: TableBodyProps<T>): ReactElement | null { // eslint-disable-line @typescript-eslint/no-unused-vars
return null;
}
TableBody.getCollectionNode = function* getCollectionNode<T>(props: TableBodyProps<T>): Generator<PartialNode<T>> {
let {children, items} = props;
yield {
type: 'body',
hasChildNodes: true,
props,
*childNodes() {
if (typeof children === 'function') {
if (!items) {
throw new Error('props.children was a function but props.items is missing');
}
for (let item of items) {
yield {
type: 'item',
value: item,
renderer: children
};
}
} else {
let items: PartialNode<T>[] = [];
React.Children.forEach(children, item => {
items.push({
type: 'item',
element: item
});
});
yield* items;
}
}
};
};
/**
* A TableBody is a container for the Row elements of a Table. Rows can be statically defined
* as children, or generated dynamically using a function based on the data passed to the `items` prop.
*/
// We don't want getCollectionNode to show up in the type definition
let _TableBody = TableBody as <T>(props: TableBodyProps<T>) => JSX.Element;
export {_TableBody as TableBody};
@@ -0,0 +1,51 @@
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
import type { Static } from '../static/index.mjs';
import type { Evaluate, UnionToTuple } from '../helpers/index.mjs';
import type { TReadonly } from '../readonly/index.mjs';
import type { TOptional } from '../optional/index.mjs';
import { Kind } from '../symbols/index.mjs';
type ReadonlyOptionalPropertyKeys<T extends TProperties> = {
[K in keyof T]: T[K] extends TReadonly<TSchema> ? (T[K] extends TOptional<T[K]> ? K : never) : never;
}[keyof T];
type ReadonlyPropertyKeys<T extends TProperties> = {
[K in keyof T]: T[K] extends TReadonly<TSchema> ? (T[K] extends TOptional<T[K]> ? never : K) : never;
}[keyof T];
type OptionalPropertyKeys<T extends TProperties> = {
[K in keyof T]: T[K] extends TOptional<TSchema> ? (T[K] extends TReadonly<T[K]> ? never : K) : never;
}[keyof T];
type RequiredPropertyKeys<T extends TProperties> = keyof Omit<T, ReadonlyOptionalPropertyKeys<T> | ReadonlyPropertyKeys<T> | OptionalPropertyKeys<T>>;
type ObjectStaticProperties<T extends TProperties, R extends Record<keyof any, unknown>> = Evaluate<(Readonly<Partial<Pick<R, ReadonlyOptionalPropertyKeys<T>>>> & Readonly<Pick<R, ReadonlyPropertyKeys<T>>> & Partial<Pick<R, OptionalPropertyKeys<T>>> & Required<Pick<R, RequiredPropertyKeys<T>>>)>;
type ObjectStatic<T extends TProperties, P extends unknown[]> = ObjectStaticProperties<T, {
[K in keyof T]: Static<T[K], P>;
}>;
export type TPropertyKey = string | number;
export type TProperties = Record<TPropertyKey, TSchema>;
type TIsLiteralString<Type extends string> = ([
Type
] extends [string] ? [string] extends [Type] ? false : true : false);
type IsRequiredArrayLiteralConstant<RequiredTuple extends string[]> = (RequiredTuple extends [infer Left extends string, ...infer _ extends string[]] ? TIsLiteralString<Left> : false);
type TRequiredArray<Properties extends TProperties, RequiredProperties extends TProperties = {
[Key in keyof Properties as Properties[Key] extends TOptional<Properties[Key]> ? never : Key]: Properties[Key];
}, RequiredUnion extends string = Extract<keyof RequiredProperties, string>, RequiredTuple extends string[] = UnionToTuple<RequiredUnion>, Result extends string[] | undefined = (IsRequiredArrayLiteralConstant<RequiredTuple> extends true ? RequiredTuple : string[] | undefined)> = Result;
export type TAdditionalProperties = undefined | TSchema | boolean;
export interface ObjectOptions extends SchemaOptions {
/** Additional property constraints for this object */
additionalProperties?: TAdditionalProperties;
/** The minimum number of properties allowed on this object */
minProperties?: number;
/** The maximum number of properties allowed on this object */
maxProperties?: number;
}
export interface TObject<T extends TProperties = TProperties> extends TSchema, ObjectOptions {
[Kind]: 'Object';
static: ObjectStatic<T, this['params']>;
additionalProperties?: TAdditionalProperties;
type: 'object';
properties: T;
required: TRequiredArray<T>;
}
/** `[Json]` Creates an Object type */
declare function _Object<T extends TProperties>(properties: T, options?: ObjectOptions): TObject<T>;
/** `[Json]` Creates an Object type */
export declare var Object: typeof _Object;
export {};
@@ -0,0 +1,50 @@
'use strict';
const pLimit = require('p-limit');
class EndError extends Error {
constructor(value) {
super();
this.value = value;
}
}
// The input can also be a promise, so we await it
const testElement = async (element, tester) => tester(await element);
// The input can also be a promise, so we `Promise.all()` them both
const finder = async element => {
const values = await Promise.all(element);
if (values[1] === true) {
throw new EndError(values[0]);
}
return false;
};
const pLocate = async (iterable, tester, options) => {
options = {
concurrency: Infinity,
preserveOrder: true,
...options
};
const limit = pLimit(options.concurrency);
// Start all the promises concurrently with optional limit
const items = [...iterable].map(element => [element, limit(testElement, element, tester)]);
// Check the promises either serially or concurrently
const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity);
try {
await Promise.all(items.map(element => checkLimit(finder, element)));
} catch (error) {
if (error instanceof EndError) {
return error.value;
}
throw error;
}
};
module.exports = pLocate;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more