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

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

No files matched your search

@@ -0,0 +1,9 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import { Kind } from '../symbols/index';
export interface TNever extends TSchema {
[Kind]: 'Never';
static: never;
not: {};
}
/** `[Json]` Creates a Never type */
export declare function Never(options?: SchemaOptions): TNever;
@@ -0,0 +1,201 @@
# micromark-util-combine-extensions
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][bundle-size-badge]][bundle-size]
[![Sponsors][sponsors-badge]][opencollective]
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
[micromark][] utility to combine [syntax][] or [html][] extensions.
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`combineExtensions(extensions)`](#combineextensionsextensions)
* [`combineHtmlExtensions(htmlExtensions)`](#combinehtmlextensionshtmlextensions)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package can merge multiple extensions into one.
## When should I use this?
This package might be useful when you are making “presets”, such as
[`micromark-extension-gfm`][micromark-extension-gfm].
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-combine-extensions
```
In Deno with [`esm.sh`][esmsh]:
```js
import {combineExtensions} from 'https://esm.sh/micromark-util-combine-extensions@1'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {combineExtensions} from 'https://esm.sh/micromark-util-combine-extensions@1?bundle'
</script>
```
## Use
```js
import {gfmAutolinkLiteral} from 'micromark-extension-gfm-autolink-literal'
import {gfmStrikethrough} from 'micromark-extension-gfm-strikethrough'
import {gfmTable} from 'micromark-extension-gfm-table'
import {gfmTaskListItem} from 'micromark-extension-gfm-task-list-item'
import {combineExtensions} from 'micromark-util-combine-extensions'
const gfm = combineExtensions([gfmAutolinkLiteral, gfmStrikethrough(), gfmTable, gfmTaskListItem])
```
## API
This module exports the identifiers
[`combineExtensions`][api-combine-extensions] and
[`combineHtmlExtensions`][api-combine-html-extensions].
There is no default export.
### `combineExtensions(extensions)`
Combine multiple syntax extensions into one.
###### Parameters
* `extensions` (`Array<Extension>`)
— list of syntax extensions
###### Returns
A single combined extension (`Extension`).
### `combineHtmlExtensions(htmlExtensions)`
Combine multiple html extensions into one.
###### Parameters
* `htmlExtensions` (`Array<HtmlExtension>`)
— list of HTML extensions
###### Returns
A single combined HTML extension (`HtmlExtension`).
## Types
This package is fully typed with [TypeScript][].
It exports no additional types.
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
`micromark-util-combine-extensions@2`, compatible with Node.js 16.
This package works with `micromark@3`.
## Security
This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
## Contribute
See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organisation, or community you agree to
abide by its terms.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/micromark/micromark/workflows/main/badge.svg
[build]: https://github.com/micromark/micromark/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark.svg
[coverage]: https://codecov.io/github/micromark/micromark
[downloads-badge]: https://img.shields.io/npm/dm/micromark-util-combine-extensions.svg
[downloads]: https://www.npmjs.com/package/micromark-util-combine-extensions
[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-combine-extensions
[bundle-size]: https://bundlejs.com/?q=micromark-util-combine-extensions
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[opencollective]: https://opencollective.com/unified
[npm]: https://docs.npmjs.com/cli/install
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
[license]: https://github.com/micromark/micromark/blob/main/license
[author]: https://wooorm.com
[health]: https://github.com/micromark/.github
[securitymd]: https://github.com/micromark/.github/blob/main/security.md
[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
[support]: https://github.com/micromark/.github/blob/main/support.md
[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[syntax]: https://github.com/micromark/micromark#syntaxextension
[html]: https://github.com/micromark/micromark#htmlextension
[typescript]: https://www.typescriptlang.org
[micromark]: https://github.com/micromark/micromark
[micromark-extension-gfm]: https://github.com/micromark/micromark-extension-gfm
[api-combine-extensions]: #combineextensionsextensions
[api-combine-html-extensions]: #combinehtmlextensionshtmlextensions
@@ -0,0 +1 @@
{"version":3,"file":"isScopedBinding.spec.d.ts","sourceRoot":"","sources":["../../../../src/binding/calculations/isScopedBinding.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC;AA6BM,SAAS,yCAAkB,KAA8B;IAC9D,IAAI,WAAC,OAAO,EAAE,cAAc,SAAS,EAAC,GAAG;IACzC,IAAI,YAAY,CAAA,GAAA,YAAI;IAEpB,OAAO;QACL,WAAW;YACT,MAAM;QACR;QACA,cAAc,UAAU;YACtB,kEAAkE;YAClE,4EAA4E;YAC5E,0DAA0D;YAC1D,IAAI;YACJ,MAAM;QACR,IAAI,CAAC;QACL,YAAY;YACV,MAAM;YACN,cAAc;YACd,mBAAmB,UAAU,YAAY;QAC3C;IACF;AACF","sources":["packages/@react-aria/listbox/src/useListBoxSection.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes} from '@react-types/shared';\nimport {ReactNode} from 'react';\nimport {useId} from '@react-aria/utils';\n\nexport interface AriaListBoxSectionProps {\n /** The heading for the section. */\n heading?: ReactNode,\n /** An accessibility label for the section. Required if `heading` is not present. */\n 'aria-label'?: string\n}\n\nexport interface ListBoxSectionAria {\n /** Props for the wrapper list item. */\n itemProps: DOMAttributes,\n\n /** Props for the heading element, if any. */\n headingProps: DOMAttributes,\n\n /** Props for the group element. */\n groupProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a section in a listbox.\n * See `useListBox` for more details about listboxes.\n * @param props - Props for the section.\n */\nexport function useListBoxSection(props: AriaListBoxSectionProps): ListBoxSectionAria {\n let {heading, 'aria-label': ariaLabel} = props;\n let headingId = useId();\n\n return {\n itemProps: {\n role: 'presentation'\n },\n headingProps: heading ? {\n // Techincally, listbox cannot contain headings according to ARIA.\n // We hide the heading from assistive technology, using role=\"presentation\",\n // and only use it as a visual label for the nested group.\n id: headingId,\n role: 'presentation'\n } : {},\n groupProps: {\n role: 'group',\n 'aria-label': ariaLabel,\n 'aria-labelledby': heading ? headingId : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"useListBoxSection.module.js.map"}
@@ -0,0 +1 @@
{"version":3,"file":"decode-data-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAEA,wBAKE"}
@@ -0,0 +1,965 @@
'use strict';
/*eslint-disable no-use-before-define*/
var common = require('./common');
var YAMLException = require('./exception');
var DEFAULT_SCHEMA = require('./schema/default');
var _toString = Object.prototype.toString;
var _hasOwnProperty = Object.prototype.hasOwnProperty;
var CHAR_BOM = 0xFEFF;
var CHAR_TAB = 0x09; /* Tab */
var CHAR_LINE_FEED = 0x0A; /* LF */
var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */
var CHAR_SPACE = 0x20; /* Space */
var CHAR_EXCLAMATION = 0x21; /* ! */
var CHAR_DOUBLE_QUOTE = 0x22; /* " */
var CHAR_SHARP = 0x23; /* # */
var CHAR_PERCENT = 0x25; /* % */
var CHAR_AMPERSAND = 0x26; /* & */
var CHAR_SINGLE_QUOTE = 0x27; /* ' */
var CHAR_ASTERISK = 0x2A; /* * */
var CHAR_COMMA = 0x2C; /* , */
var CHAR_MINUS = 0x2D; /* - */
var CHAR_COLON = 0x3A; /* : */
var CHAR_EQUALS = 0x3D; /* = */
var CHAR_GREATER_THAN = 0x3E; /* > */
var CHAR_QUESTION = 0x3F; /* ? */
var CHAR_COMMERCIAL_AT = 0x40; /* @ */
var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */
var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */
var CHAR_GRAVE_ACCENT = 0x60; /* ` */
var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */
var CHAR_VERTICAL_LINE = 0x7C; /* | */
var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */
var ESCAPE_SEQUENCES = {};
ESCAPE_SEQUENCES[0x00] = '\\0';
ESCAPE_SEQUENCES[0x07] = '\\a';
ESCAPE_SEQUENCES[0x08] = '\\b';
ESCAPE_SEQUENCES[0x09] = '\\t';
ESCAPE_SEQUENCES[0x0A] = '\\n';
ESCAPE_SEQUENCES[0x0B] = '\\v';
ESCAPE_SEQUENCES[0x0C] = '\\f';
ESCAPE_SEQUENCES[0x0D] = '\\r';
ESCAPE_SEQUENCES[0x1B] = '\\e';
ESCAPE_SEQUENCES[0x22] = '\\"';
ESCAPE_SEQUENCES[0x5C] = '\\\\';
ESCAPE_SEQUENCES[0x85] = '\\N';
ESCAPE_SEQUENCES[0xA0] = '\\_';
ESCAPE_SEQUENCES[0x2028] = '\\L';
ESCAPE_SEQUENCES[0x2029] = '\\P';
var DEPRECATED_BOOLEANS_SYNTAX = [
'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',
'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'
];
var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
function compileStyleMap(schema, map) {
var result, keys, index, length, tag, style, type;
if (map === null) return {};
result = {};
keys = Object.keys(map);
for (index = 0, length = keys.length; index < length; index += 1) {
tag = keys[index];
style = String(map[tag]);
if (tag.slice(0, 2) === '!!') {
tag = 'tag:yaml.org,2002:' + tag.slice(2);
}
type = schema.compiledTypeMap['fallback'][tag];
if (type && _hasOwnProperty.call(type.styleAliases, style)) {
style = type.styleAliases[style];
}
result[tag] = style;
}
return result;
}
function encodeHex(character) {
var string, handle, length;
string = character.toString(16).toUpperCase();
if (character <= 0xFF) {
handle = 'x';
length = 2;
} else if (character <= 0xFFFF) {
handle = 'u';
length = 4;
} else if (character <= 0xFFFFFFFF) {
handle = 'U';
length = 8;
} else {
throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');
}
return '\\' + handle + common.repeat('0', length - string.length) + string;
}
var QUOTING_TYPE_SINGLE = 1,
QUOTING_TYPE_DOUBLE = 2;
function State(options) {
this.schema = options['schema'] || DEFAULT_SCHEMA;
this.indent = Math.max(1, (options['indent'] || 2));
this.noArrayIndent = options['noArrayIndent'] || false;
this.skipInvalid = options['skipInvalid'] || false;
this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);
this.styleMap = compileStyleMap(this.schema, options['styles'] || null);
this.sortKeys = options['sortKeys'] || false;
this.lineWidth = options['lineWidth'] || 80;
this.noRefs = options['noRefs'] || false;
this.noCompatMode = options['noCompatMode'] || false;
this.condenseFlow = options['condenseFlow'] || false;
this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;
this.forceQuotes = options['forceQuotes'] || false;
this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;
this.implicitTypes = this.schema.compiledImplicit;
this.explicitTypes = this.schema.compiledExplicit;
this.tag = null;
this.result = '';
this.duplicates = [];
this.usedDuplicates = null;
}
// Indents every line in a string. Empty lines (\n only) are not indented.
function indentString(string, spaces) {
var ind = common.repeat(' ', spaces),
position = 0,
next = -1,
result = '',
line,
length = string.length;
while (position < length) {
next = string.indexOf('\n', position);
if (next === -1) {
line = string.slice(position);
position = length;
} else {
line = string.slice(position, next + 1);
position = next + 1;
}
if (line.length && line !== '\n') result += ind;
result += line;
}
return result;
}
function generateNextLine(state, level) {
return '\n' + common.repeat(' ', state.indent * level);
}
function testImplicitResolving(state, str) {
var index, length, type;
for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
type = state.implicitTypes[index];
if (type.resolve(str)) {
return true;
}
}
return false;
}
// [33] s-white ::= s-space | s-tab
function isWhitespace(c) {
return c === CHAR_SPACE || c === CHAR_TAB;
}
// Returns true if the character can be printed without escaping.
// From YAML 1.2: "any allowed characters known to be non-printable
// should also be escaped. [However,] This isn’t mandatory"
// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029.
function isPrintable(c) {
return (0x00020 <= c && c <= 0x00007E)
|| ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)
|| ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)
|| (0x10000 <= c && c <= 0x10FFFF);
}
// [34] ns-char ::= nb-char - s-white
// [27] nb-char ::= c-printable - b-char - c-byte-order-mark
// [26] b-char ::= b-line-feed | b-carriage-return
// Including s-white (for some reason, examples doesn't match specs in this aspect)
// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark
function isNsCharOrWhitespace(c) {
return isPrintable(c)
&& c !== CHAR_BOM
// - b-char
&& c !== CHAR_CARRIAGE_RETURN
&& c !== CHAR_LINE_FEED;
}
// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out
// c = flow-in ⇒ ns-plain-safe-in
// c = block-key ⇒ ns-plain-safe-out
// c = flow-key ⇒ ns-plain-safe-in
// [128] ns-plain-safe-out ::= ns-char
// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator
// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )
// | ( /* An ns-char preceding */ “#” )
// | ( “:” /* Followed by an ns-plain-safe(c) */ )
function isPlainSafe(c, prev, inblock) {
var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
return (
// ns-plain-safe
inblock ? // c = flow-in
cIsNsCharOrWhitespace
: cIsNsCharOrWhitespace
// - c-flow-indicator
&& c !== CHAR_COMMA
&& c !== CHAR_LEFT_SQUARE_BRACKET
&& c !== CHAR_RIGHT_SQUARE_BRACKET
&& c !== CHAR_LEFT_CURLY_BRACKET
&& c !== CHAR_RIGHT_CURLY_BRACKET
)
// ns-plain-char
&& c !== CHAR_SHARP // false on '#'
&& !(prev === CHAR_COLON && !cIsNsChar) // false on ': '
|| (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'
|| (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'
}
// Simplified test for values allowed as the first character in plain style.
function isPlainSafeFirst(c) {
// Uses a subset of ns-char - c-indicator
// where ns-char = nb-char - s-white.
// No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part
return isPrintable(c) && c !== CHAR_BOM
&& !isWhitespace(c) // - s-white
// - (c-indicator ::=
// “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”
&& c !== CHAR_MINUS
&& c !== CHAR_QUESTION
&& c !== CHAR_COLON
&& c !== CHAR_COMMA
&& c !== CHAR_LEFT_SQUARE_BRACKET
&& c !== CHAR_RIGHT_SQUARE_BRACKET
&& c !== CHAR_LEFT_CURLY_BRACKET
&& c !== CHAR_RIGHT_CURLY_BRACKET
// | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"”
&& c !== CHAR_SHARP
&& c !== CHAR_AMPERSAND
&& c !== CHAR_ASTERISK
&& c !== CHAR_EXCLAMATION
&& c !== CHAR_VERTICAL_LINE
&& c !== CHAR_EQUALS
&& c !== CHAR_GREATER_THAN
&& c !== CHAR_SINGLE_QUOTE
&& c !== CHAR_DOUBLE_QUOTE
// | “%” | “@” | “`”)
&& c !== CHAR_PERCENT
&& c !== CHAR_COMMERCIAL_AT
&& c !== CHAR_GRAVE_ACCENT;
}
// Simplified test for values allowed as the last character in plain style.
function isPlainSafeLast(c) {
// just not whitespace or colon, it will be checked to be plain character later
return !isWhitespace(c) && c !== CHAR_COLON;
}
// Same as 'string'.codePointAt(pos), but works in older browsers.
function codePointAt(string, pos) {
var first = string.charCodeAt(pos), second;
if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {
second = string.charCodeAt(pos + 1);
if (second >= 0xDC00 && second <= 0xDFFF) {
// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
}
}
return first;
}
// Determines whether block indentation indicator is required.
function needIndentIndicator(string) {
var leadingSpaceRe = /^\n* /;
return leadingSpaceRe.test(string);
}
var STYLE_PLAIN = 1,
STYLE_SINGLE = 2,
STYLE_LITERAL = 3,
STYLE_FOLDED = 4,
STYLE_DOUBLE = 5;
// Determines which scalar styles are possible and returns the preferred style.
// lineWidth = -1 => no limit.
// Pre-conditions: str.length > 0.
// Post-conditions:
// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string.
// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).
// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).
function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,
testAmbiguousType, quotingType, forceQuotes, inblock) {
var i;
var char = 0;
var prevChar = null;
var hasLineBreak = false;
var hasFoldableLine = false; // only checked if shouldTrackWidth
var shouldTrackWidth = lineWidth !== -1;
var previousLineBreak = -1; // count the first line correctly
var plain = isPlainSafeFirst(codePointAt(string, 0))
&& isPlainSafeLast(codePointAt(string, string.length - 1));
if (singleLineOnly || forceQuotes) {
// Case: no block styles.
// Check for disallowed characters to rule out plain and single.
for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
char = codePointAt(string, i);
if (!isPrintable(char)) {
return STYLE_DOUBLE;
}
plain = plain && isPlainSafe(char, prevChar, inblock);
prevChar = char;
}
} else {
// Case: block styles permitted.
for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
char = codePointAt(string, i);
if (char === CHAR_LINE_FEED) {
hasLineBreak = true;
// Check if any line can be folded.
if (shouldTrackWidth) {
hasFoldableLine = hasFoldableLine ||
// Foldable line = too long, and not more-indented.
(i - previousLineBreak - 1 > lineWidth &&
string[previousLineBreak + 1] !== ' ');
previousLineBreak = i;
}
} else if (!isPrintable(char)) {
return STYLE_DOUBLE;
}
plain = plain && isPlainSafe(char, prevChar, inblock);
prevChar = char;
}
// in case the end is missing a \n
hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&
(i - previousLineBreak - 1 > lineWidth &&
string[previousLineBreak + 1] !== ' '));
}
// Although every style can represent \n without escaping, prefer block styles
// for multiline, since they're more readable and they don't add empty lines.
// Also prefer folding a super-long line.
if (!hasLineBreak && !hasFoldableLine) {
// Strings interpretable as another type have to be quoted;
// e.g. the string 'true' vs. the boolean true.
if (plain && !forceQuotes && !testAmbiguousType(string)) {
return STYLE_PLAIN;
}
return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
}
// Edge case: block indentation indicator can only have one digit.
if (indentPerLevel > 9 && needIndentIndicator(string)) {
return STYLE_DOUBLE;
}
// At this point we know block styles are valid.
// Prefer literal style unless we want to fold.
if (!forceQuotes) {
return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
}
return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
}
// Note: line breaking/folding is implemented for only the folded style.
// NB. We drop the last trailing newline (if any) of a returned block scalar
// since the dumper adds its own newline. This always works:
// • No ending newline => unaffected; already using strip "-" chomping.
// • Ending newline => removed then restored.
// Importantly, this keeps the "+" chomp indicator from gaining an extra line.
function writeScalar(state, string, level, iskey, inblock) {
state.dump = (function () {
if (string.length === 0) {
return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
}
if (!state.noCompatMode) {
if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {
return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'");
}
}
var indent = state.indent * Math.max(1, level); // no 0-indent scalars
// As indentation gets deeper, let the width decrease monotonically
// to the lower bound min(state.lineWidth, 40).
// Note that this implies
// state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.
// state.lineWidth > 40 + state.indent: width decreases until the lower bound.
// This behaves better than a constant minimum width which disallows narrower options,
// or an indent threshold which causes the width to suddenly increase.
var lineWidth = state.lineWidth === -1
? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
// Without knowing if keys are implicit/explicit, assume implicit for safety.
var singleLineOnly = iskey
// No block styles in flow mode.
|| (state.flowLevel > -1 && level >= state.flowLevel);
function testAmbiguity(string) {
return testImplicitResolving(state, string);
}
switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,
testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {
case STYLE_PLAIN:
return string;
case STYLE_SINGLE:
return "'" + string.replace(/'/g, "''") + "'";
case STYLE_LITERAL:
return '|' + blockHeader(string, state.indent)
+ dropEndingNewline(indentString(string, indent));
case STYLE_FOLDED:
return '>' + blockHeader(string, state.indent)
+ dropEndingNewline(indentString(foldString(string, lineWidth), indent));
case STYLE_DOUBLE:
return '"' + escapeString(string, lineWidth) + '"';
default:
throw new YAMLException('impossible error: invalid scalar style');
}
}());
}
// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.
function blockHeader(string, indentPerLevel) {
var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';
// note the special case: the string '\n' counts as a "trailing" empty line.
var clip = string[string.length - 1] === '\n';
var keep = clip && (string[string.length - 2] === '\n' || string === '\n');
var chomp = keep ? '+' : (clip ? '' : '-');
return indentIndicator + chomp + '\n';
}
// (See the note for writeScalar.)
function dropEndingNewline(string) {
return string[string.length - 1] === '\n' ? string.slice(0, -1) : string;
}
// Note: a long line without a suitable break point will exceed the width limit.
// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.
function foldString(string, width) {
// In folded style, $k$ consecutive newlines output as $k+1$ newlines—
// unless they're before or after a more-indented line, or at the very
// beginning or end, in which case $k$ maps to $k$.
// Therefore, parse each chunk as newline(s) followed by a content line.
var lineRe = /(\n+)([^\n]*)/g;
// first line (possibly an empty line)
var result = (function () {
var nextLF = string.indexOf('\n');
nextLF = nextLF !== -1 ? nextLF : string.length;
lineRe.lastIndex = nextLF;
return foldLine(string.slice(0, nextLF), width);
}());
// If we haven't reached the first content line yet, don't add an extra \n.
var prevMoreIndented = string[0] === '\n' || string[0] === ' ';
var moreIndented;
// rest of the lines
var match;
while ((match = lineRe.exec(string))) {
var prefix = match[1], line = match[2];
moreIndented = (line[0] === ' ');
result += prefix
+ (!prevMoreIndented && !moreIndented && line !== ''
? '\n' : '')
+ foldLine(line, width);
prevMoreIndented = moreIndented;
}
return result;
}
// Greedy line breaking.
// Picks the longest line under the limit each time,
// otherwise settles for the shortest line over the limit.
// NB. More-indented lines *cannot* be folded, as that would add an extra \n.
function foldLine(line, width) {
if (line === '' || line[0] === ' ') return line;
// Since a more-indented line adds a \n, breaks can't be followed by a space.
var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.
var match;
// start is an inclusive index. end, curr, and next are exclusive.
var start = 0, end, curr = 0, next = 0;
var result = '';
// Invariants: 0 <= start <= length-1.
// 0 <= curr <= next <= max(0, length-2). curr - start <= width.
// Inside the loop:
// A match implies length >= 2, so curr and next are <= length-2.
while ((match = breakRe.exec(line))) {
next = match.index;
// maintain invariant: curr - start <= width
if (next - start > width) {
end = (curr > start) ? curr : next; // derive end <= length-2
result += '\n' + line.slice(start, end);
// skip the space that was output as \n
start = end + 1; // derive start <= length-1
}
curr = next;
}
// By the invariants, start <= length-1, so there is something left over.
// It is either the whole string or a part starting from non-whitespace.
result += '\n';
// Insert a break if the remainder is too long and there is a break available.
if (line.length - start > width && curr > start) {
result += line.slice(start, curr) + '\n' + line.slice(curr + 1);
} else {
result += line.slice(start);
}
return result.slice(1); // drop extra \n joiner
}
// Escapes a double-quoted string.
function escapeString(string) {
var result = '';
var char = 0;
var escapeSeq;
for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
char = codePointAt(string, i);
escapeSeq = ESCAPE_SEQUENCES[char];
if (!escapeSeq && isPrintable(char)) {
result += string[i];
if (char >= 0x10000) result += string[i + 1];
} else {
result += escapeSeq || encodeHex(char);
}
}
return result;
}
function writeFlowSequence(state, level, object) {
var _result = '',
_tag = state.tag,
index,
length,
value;
for (index = 0, length = object.length; index < length; index += 1) {
value = object[index];
if (state.replacer) {
value = state.replacer.call(object, String(index), value);
}
// Write only valid elements, put null instead of invalid elements.
if (writeNode(state, level, value, false, false) ||
(typeof value === 'undefined' &&
writeNode(state, level, null, false, false))) {
if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');
_result += state.dump;
}
}
state.tag = _tag;
state.dump = '[' + _result + ']';
}
function writeBlockSequence(state, level, object, compact) {
var _result = '',
_tag = state.tag,
index,
length,
value;
for (index = 0, length = object.length; index < length; index += 1) {
value = object[index];
if (state.replacer) {
value = state.replacer.call(object, String(index), value);
}
// Write only valid elements, put null instead of invalid elements.
if (writeNode(state, level + 1, value, true, true, false, true) ||
(typeof value === 'undefined' &&
writeNode(state, level + 1, null, true, true, false, true))) {
if (!compact || _result !== '') {
_result += generateNextLine(state, level);
}
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
_result += '-';
} else {
_result += '- ';
}
_result += state.dump;
}
}
state.tag = _tag;
state.dump = _result || '[]'; // Empty sequence if no valid values.
}
function writeFlowMapping(state, level, object) {
var _result = '',
_tag = state.tag,
objectKeyList = Object.keys(object),
index,
length,
objectKey,
objectValue,
pairBuffer;
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
pairBuffer = '';
if (_result !== '') pairBuffer += ', ';
if (state.condenseFlow) pairBuffer += '"';
objectKey = objectKeyList[index];
objectValue = object[objectKey];
if (state.replacer) {
objectValue = state.replacer.call(object, objectKey, objectValue);
}
if (!writeNode(state, level, objectKey, false, false)) {
continue; // Skip this pair because of invalid key;
}
if (state.dump.length > 1024) pairBuffer += '? ';
pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ');
if (!writeNode(state, level, objectValue, false, false)) {
continue; // Skip this pair because of invalid value.
}
pairBuffer += state.dump;
// Both key and value are valid.
_result += pairBuffer;
}
state.tag = _tag;
state.dump = '{' + _result + '}';
}
function writeBlockMapping(state, level, object, compact) {
var _result = '',
_tag = state.tag,
objectKeyList = Object.keys(object),
index,
length,
objectKey,
objectValue,
explicitPair,
pairBuffer;
// Allow sorting keys so that the output file is deterministic
if (state.sortKeys === true) {
// Default sorting
objectKeyList.sort();
} else if (typeof state.sortKeys === 'function') {
// Custom sort function
objectKeyList.sort(state.sortKeys);
} else if (state.sortKeys) {
// Something is wrong
throw new YAMLException('sortKeys must be a boolean or a function');
}
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
pairBuffer = '';
if (!compact || _result !== '') {
pairBuffer += generateNextLine(state, level);
}
objectKey = objectKeyList[index];
objectValue = object[objectKey];
if (state.replacer) {
objectValue = state.replacer.call(object, objectKey, objectValue);
}
if (!writeNode(state, level + 1, objectKey, true, true, true)) {
continue; // Skip this pair because of invalid key.
}
explicitPair = (state.tag !== null && state.tag !== '?') ||
(state.dump && state.dump.length > 1024);
if (explicitPair) {
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
pairBuffer += '?';
} else {
pairBuffer += '? ';
}
}
pairBuffer += state.dump;
if (explicitPair) {
pairBuffer += generateNextLine(state, level);
}
if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
continue; // Skip this pair because of invalid value.
}
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
pairBuffer += ':';
} else {
pairBuffer += ': ';
}
pairBuffer += state.dump;
// Both key and value are valid.
_result += pairBuffer;
}
state.tag = _tag;
state.dump = _result || '{}'; // Empty mapping if no valid pairs.
}
function detectType(state, object, explicit) {
var _result, typeList, index, length, type, style;
typeList = explicit ? state.explicitTypes : state.implicitTypes;
for (index = 0, length = typeList.length; index < length; index += 1) {
type = typeList[index];
if ((type.instanceOf || type.predicate) &&
(!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&
(!type.predicate || type.predicate(object))) {
if (explicit) {
if (type.multi && type.representName) {
state.tag = type.representName(object);
} else {
state.tag = type.tag;
}
} else {
state.tag = '?';
}
if (type.represent) {
style = state.styleMap[type.tag] || type.defaultStyle;
if (_toString.call(type.represent) === '[object Function]') {
_result = type.represent(object, style);
} else if (_hasOwnProperty.call(type.represent, style)) {
_result = type.represent[style](object, style);
} else {
throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style');
}
state.dump = _result;
}
return true;
}
}
return false;
}
// Serializes `object` and writes it to global `result`.
// Returns true on success, or false on invalid object.
//
function writeNode(state, level, object, block, compact, iskey, isblockseq) {
state.tag = null;
state.dump = object;
if (!detectType(state, object, false)) {
detectType(state, object, true);
}
var type = _toString.call(state.dump);
var inblock = block;
var tagStr;
if (block) {
block = (state.flowLevel < 0 || state.flowLevel > level);
}
var objectOrArray = type === '[object Object]' || type === '[object Array]',
duplicateIndex,
duplicate;
if (objectOrArray) {
duplicateIndex = state.duplicates.indexOf(object);
duplicate = duplicateIndex !== -1;
}
if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {
compact = false;
}
if (duplicate && state.usedDuplicates[duplicateIndex]) {
state.dump = '*ref_' + duplicateIndex;
} else {
if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
state.usedDuplicates[duplicateIndex] = true;
}
if (type === '[object Object]') {
if (block && (Object.keys(state.dump).length !== 0)) {
writeBlockMapping(state, level, state.dump, compact);
if (duplicate) {
state.dump = '&ref_' + duplicateIndex + state.dump;
}
} else {
writeFlowMapping(state, level, state.dump);
if (duplicate) {
state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
}
}
} else if (type === '[object Array]') {
if (block && (state.dump.length !== 0)) {
if (state.noArrayIndent && !isblockseq && level > 0) {
writeBlockSequence(state, level - 1, state.dump, compact);
} else {
writeBlockSequence(state, level, state.dump, compact);
}
if (duplicate) {
state.dump = '&ref_' + duplicateIndex + state.dump;
}
} else {
writeFlowSequence(state, level, state.dump);
if (duplicate) {
state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
}
}
} else if (type === '[object String]') {
if (state.tag !== '?') {
writeScalar(state, state.dump, level, iskey, inblock);
}
} else if (type === '[object Undefined]') {
return false;
} else {
if (state.skipInvalid) return false;
throw new YAMLException('unacceptable kind of an object to dump ' + type);
}
if (state.tag !== null && state.tag !== '?') {
// Need to encode all characters except those allowed by the spec:
//
// [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */
// [36] ns-hex-digit ::= ns-dec-digit
// | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */
// [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */
// [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-”
// [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#”
// | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,”
// | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]”
//
// Also need to encode '!' because it has special meaning (end of tag prefix).
//
tagStr = encodeURI(
state.tag[0] === '!' ? state.tag.slice(1) : state.tag
).replace(/!/g, '%21');
if (state.tag[0] === '!') {
tagStr = '!' + tagStr;
} else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {
tagStr = '!!' + tagStr.slice(18);
} else {
tagStr = '!<' + tagStr + '>';
}
state.dump = tagStr + ' ' + state.dump;
}
}
return true;
}
function getDuplicateReferences(object, state) {
var objects = [],
duplicatesIndexes = [],
index,
length;
inspectNode(object, objects, duplicatesIndexes);
for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
state.duplicates.push(objects[duplicatesIndexes[index]]);
}
state.usedDuplicates = new Array(length);
}
function inspectNode(object, objects, duplicatesIndexes) {
var objectKeyList,
index,
length;
if (object !== null && typeof object === 'object') {
index = objects.indexOf(object);
if (index !== -1) {
if (duplicatesIndexes.indexOf(index) === -1) {
duplicatesIndexes.push(index);
}
} else {
objects.push(object);
if (Array.isArray(object)) {
for (index = 0, length = object.length; index < length; index += 1) {
inspectNode(object[index], objects, duplicatesIndexes);
}
} else {
objectKeyList = Object.keys(object);
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
}
}
}
}
}
function dump(input, options) {
options = options || {};
var state = new State(options);
if (!state.noRefs) getDuplicateReferences(input, state);
var value = input;
if (state.replacer) {
value = state.replacer.call({ '': value }, '', value);
}
if (writeNode(state, 0, value, true, true)) return state.dump + '\n';
return '';
}
module.exports.dump = dump;
@@ -0,0 +1 @@
{"version":3,"file":"match-path-sync.js","sourceRoot":"","sources":["../src/match-path-sync.ts"],"names":[],"mappings":";;;AAAA,2BAA6B;AAC7B,yCAA2C;AAC3C,8CAAgD;AAChD,oCAAsC;AActC;;;;;;;GAOG;AACH,SAAgB,eAAe,CAC7B,eAAuB,EACvB,KAAuC,EACvC,UAA+B,EAC/B,WAA2B;IAD3B,2BAAA,EAAA,cAAwB,MAAM,CAAC;IAC/B,4BAAA,EAAA,kBAA2B;IAE3B,IAAM,aAAa,GAAG,YAAY,CAAC,yBAAyB,CAC1D,eAAe,EACf,KAAK,EACL,WAAW,CACZ,CAAC;IAEF,OAAO,UACL,eAAuB,EACvB,QAAkC,EAClC,UAAsC,EACtC,UAA0B;QAE1B,OAAA,sBAAsB,CACpB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,CACX;IAPD,CAOC,CAAC;AACN,CAAC;AA1BD,0CA0BC;AAED;;;;;;;;;GASG;AACH,SAAgB,sBAAsB,CACpC,oBAA8D,EAC9D,eAAuB,EACvB,QAAmE,EACnE,UAAiE,EACjE,UAA2D,EAC3D,UAA+B;IAH/B,yBAAA,EAAA,WAAoC,UAAU,CAAC,oBAAoB;IACnE,2BAAA,EAAA,aAAwC,UAAU,CAAC,cAAc;IACjE,2BAAA,EAAA,aAA4B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3D,2BAAA,EAAA,cAAwB,MAAM,CAAC;IAE/B,IAAM,QAAQ,GAAG,OAAO,CAAC,aAAa,CACpC,UAAU,EACV,oBAAoB,EACpB,eAAe,CAChB,CAAC;IAEF,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AAC3E,CAAC;AAnBD,wDAmBC;AAED,SAAS,oCAAoC,CAC3C,WAAmC,EACnC,UAAoB,EACpB,eAAuB,EACvB,UAAqC;IAErC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QACtD,IAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QACxC,IAAM,gBAAgB,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;QACpD,IAAI,gBAAgB,IAAI,OAAO,gBAAgB,KAAK,QAAQ,EAAE;YAC5D,IAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CACjC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAC7B,gBAAgB,CACjB,CAAC;YACF,IAAI,UAAU,CAAC,iBAAiB,CAAC,EAAE;gBACjC,OAAO,iBAAiB,CAAC;aAC1B;SACF;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,qBAAqB,CAC5B,QAAwC,EACxC,QAAmE,EACnE,UAAqC,EACrC,UAA+B;IAF/B,yBAAA,EAAA,WAAoC,UAAU,CAAC,oBAAoB;IAEnE,2BAAA,EAAA,cAAwB,MAAM,CAAC;IAE/B,KAAsB,UAAQ,EAAR,qBAAQ,EAAR,sBAAQ,EAAR,IAAQ,EAAE;QAA3B,IAAM,OAAO,iBAAA;QAChB,IACE,OAAO,CAAC,IAAI,KAAK,MAAM;YACvB,OAAO,CAAC,IAAI,KAAK,WAAW;YAC5B,OAAO,CAAC,IAAI,KAAK,OAAO,EACxB;YACA,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBAC5B,OAAO,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;aACzC;SACF;aAAM,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE;YACrC,IAAM,WAAW,GAA2B,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACnE,IAAI,WAAW,EAAE;gBACf,IAAM,mBAAmB,GAAG,oCAAoC,CAC9D,WAAW,EACX,UAAU,EACV,OAAO,CAAC,IAAI,EACZ,UAAU,CACX,CAAC;gBACF,IAAI,mBAAmB,EAAE;oBACvB,OAAO,mBAAmB,CAAC;iBAC5B;aACF;SACF;aAAM;YACL,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SAC/C;KACF;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1 @@
export { _ as default } from "../esm/_class_private_field_loose_key.js";
@@ -0,0 +1,146 @@
If you'd like to integrate the dropzone with the [Pintura](https://pqina.nl/pintura/?ref=react-dropzone) image editor, you just need to pass either of the selected images to the `openDefaultEditor()` method exported by Pintura:
```jsx static
import React, { useState, useEffect } from 'react';
// React Dropzone
import { useDropzone } from 'react-dropzone';
// Pintura Image Editor
import 'pintura/pintura.css';
import { openDefaultEditor } from 'pintura';
// Based on the default React Dropzone image thumbnail example
// The `thumbButton` style positions the edit button in the bottom right corner of the thumbnail
const thumbsContainer = {
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
marginTop: 16,
padding: 20,
};
const thumb = {
position: 'relative',
display: 'inline-flex',
borderRadius: 2,
border: '1px solid #eaeaea',
marginBottom: 8,
marginRight: 8,
width: 100,
height: 100,
padding: 4,
boxSizing: 'border-box',
};
const thumbInner = {
display: 'flex',
minWidth: 0,
overflow: 'hidden',
};
const img = {
display: 'block',
width: 'auto',
height: '100%',
};
const thumbButton = {
position: 'absolute',
right: 10,
bottom: 10,
};
// This function is called when the user taps the edit button.
// It opens the editor and returns the modified file when done
const editImage = (image, done) => {
const imageFile = image.pintura ? image.pintura.file : image;
const imageState = image.pintura ? image.pintura.data : {};
const editor = openDefaultEditor({
src: imageFile,
imageState,
});
editor.on('close', () => {
// the user cancelled editing the image
});
editor.on('process', ({ dest, imageState }) => {
Object.assign(dest, {
pintura: { file: imageFile, data: imageState },
});
done(dest);
});
};
function App() {
const [files, setFiles] = useState([]);
const { getRootProps, getInputProps } = useDropzone({
accept: {
'image/*': [],
},
onDrop: (acceptedFiles) => {
setFiles(
acceptedFiles.map((file) =>
Object.assign(file, {
preview: URL.createObjectURL(file),
})
)
);
},
});
const thumbs = files.map((file, index) => (
<div style={thumb} key={file.name}>
<div style={thumbInner}>
<img src={file.preview} style={img} alt="" />
</div>
<button
style={thumbButton}
onClick={() =>
editImage(file, (output) => {
const updatedFiles = [...files];
// replace original image with new image
updatedFiles[index] = output;
// revoke preview URL for old image
if (file.preview) URL.revokeObjectURL(file.preview);
// set new preview URL
Object.assign(output, {
preview: URL.createObjectURL(output),
});
// update view
setFiles(updatedFiles);
})
}
>
Edit
</button>
</div>
));
useEffect(
() => () => {
// Make sure to revoke the Object URL to avoid memory leaks
files.forEach((file) => URL.revokeObjectURL(file.preview));
},
[files]
);
return (
<section className="container">
<div {...getRootProps({ className: 'dropzone' })}>
<input {...getInputProps()} />
<p>Drag 'n' drop some files here, or click to select files</p>
</div>
<aside style={thumbsContainer}>{thumbs}</aside>
</section>
);
}
export default App;
```
@@ -0,0 +1,230 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReflectionTypeCheck = void 0;
const reflection_info_1 = require("./reflection-info");
const oneof_1 = require("./oneof");
// noinspection JSMethodCanBeStatic
class ReflectionTypeCheck {
constructor(info) {
var _a;
this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];
}
prepare() {
if (this.data)
return;
const req = [], known = [], oneofs = [];
for (let field of this.fields) {
if (field.oneof) {
if (!oneofs.includes(field.oneof)) {
oneofs.push(field.oneof);
req.push(field.oneof);
known.push(field.oneof);
}
}
else {
known.push(field.localName);
switch (field.kind) {
case "scalar":
case "enum":
if (!field.opt || field.repeat)
req.push(field.localName);
break;
case "message":
if (field.repeat)
req.push(field.localName);
break;
case "map":
req.push(field.localName);
break;
}
}
}
this.data = { req, known, oneofs: Object.values(oneofs) };
}
/**
* Is the argument a valid message as specified by the
* reflection information?
*
* Checks all field types recursively. The `depth`
* specifies how deep into the structure the check will be.
*
* With a depth of 0, only the presence of fields
* is checked.
*
* With a depth of 1 or more, the field types are checked.
*
* With a depth of 2 or more, the members of map, repeated
* and message fields are checked.
*
* Message fields will be checked recursively with depth - 1.
*
* The number of map entries / repeated values being checked
* is < depth.
*/
is(message, depth, allowExcessProperties = false) {
if (depth < 0)
return true;
if (message === null || message === undefined || typeof message != 'object')
return false;
this.prepare();
let keys = Object.keys(message), data = this.data;
// if a required field is missing in arg, this cannot be a T
if (keys.length < data.req.length || data.req.some(n => !keys.includes(n)))
return false;
if (!allowExcessProperties) {
// if the arg contains a key we dont know, this is not a literal T
if (keys.some(k => !data.known.includes(k)))
return false;
}
// "With a depth of 0, only the presence and absence of fields is checked."
// "With a depth of 1 or more, the field types are checked."
if (depth < 1) {
return true;
}
// check oneof group
for (const name of data.oneofs) {
const group = message[name];
if (!oneof_1.isOneofGroup(group))
return false;
if (group.oneofKind === undefined)
continue;
const field = this.fields.find(f => f.localName === group.oneofKind);
if (!field)
return false; // we found no field, but have a kind, something is wrong
if (!this.field(group[group.oneofKind], field, allowExcessProperties, depth))
return false;
}
// check types
for (const field of this.fields) {
if (field.oneof !== undefined)
continue;
if (!this.field(message[field.localName], field, allowExcessProperties, depth))
return false;
}
return true;
}
field(arg, field, allowExcessProperties, depth) {
let repeated = field.repeat;
switch (field.kind) {
case "scalar":
if (arg === undefined)
return field.opt;
if (repeated)
return this.scalars(arg, field.T, depth, field.L);
return this.scalar(arg, field.T, field.L);
case "enum":
if (arg === undefined)
return field.opt;
if (repeated)
return this.scalars(arg, reflection_info_1.ScalarType.INT32, depth);
return this.scalar(arg, reflection_info_1.ScalarType.INT32);
case "message":
if (arg === undefined)
return true;
if (repeated)
return this.messages(arg, field.T(), allowExcessProperties, depth);
return this.message(arg, field.T(), allowExcessProperties, depth);
case "map":
if (typeof arg != 'object' || arg === null)
return false;
if (depth < 2)
return true;
if (!this.mapKeys(arg, field.K, depth))
return false;
switch (field.V.kind) {
case "scalar":
return this.scalars(Object.values(arg), field.V.T, depth, field.V.L);
case "enum":
return this.scalars(Object.values(arg), reflection_info_1.ScalarType.INT32, depth);
case "message":
return this.messages(Object.values(arg), field.V.T(), allowExcessProperties, depth);
}
break;
}
return true;
}
message(arg, type, allowExcessProperties, depth) {
if (allowExcessProperties) {
return type.isAssignable(arg, depth);
}
return type.is(arg, depth);
}
messages(arg, type, allowExcessProperties, depth) {
if (!Array.isArray(arg))
return false;
if (depth < 2)
return true;
if (allowExcessProperties) {
for (let i = 0; i < arg.length && i < depth; i++)
if (!type.isAssignable(arg[i], depth - 1))
return false;
}
else {
for (let i = 0; i < arg.length && i < depth; i++)
if (!type.is(arg[i], depth - 1))
return false;
}
return true;
}
scalar(arg, type, longType) {
let argType = typeof arg;
switch (type) {
case reflection_info_1.ScalarType.UINT64:
case reflection_info_1.ScalarType.FIXED64:
case reflection_info_1.ScalarType.INT64:
case reflection_info_1.ScalarType.SFIXED64:
case reflection_info_1.ScalarType.SINT64:
switch (longType) {
case reflection_info_1.LongType.BIGINT:
return argType == "bigint";
case reflection_info_1.LongType.NUMBER:
return argType == "number" && !isNaN(arg);
default:
return argType == "string";
}
case reflection_info_1.ScalarType.BOOL:
return argType == 'boolean';
case reflection_info_1.ScalarType.STRING:
return argType == 'string';
case reflection_info_1.ScalarType.BYTES:
return arg instanceof Uint8Array;
case reflection_info_1.ScalarType.DOUBLE:
case reflection_info_1.ScalarType.FLOAT:
return argType == 'number' && !isNaN(arg);
default:
// case ScalarType.UINT32:
// case ScalarType.FIXED32:
// case ScalarType.INT32:
// case ScalarType.SINT32:
// case ScalarType.SFIXED32:
return argType == 'number' && Number.isInteger(arg);
}
}
scalars(arg, type, depth, longType) {
if (!Array.isArray(arg))
return false;
if (depth < 2)
return true;
if (Array.isArray(arg))
for (let i = 0; i < arg.length && i < depth; i++)
if (!this.scalar(arg[i], type, longType))
return false;
return true;
}
mapKeys(map, type, depth) {
let keys = Object.keys(map);
switch (type) {
case reflection_info_1.ScalarType.INT32:
case reflection_info_1.ScalarType.FIXED32:
case reflection_info_1.ScalarType.SFIXED32:
case reflection_info_1.ScalarType.SINT32:
case reflection_info_1.ScalarType.UINT32:
return this.scalars(keys.slice(0, depth).map(k => parseInt(k)), type, depth);
case reflection_info_1.ScalarType.BOOL:
return this.scalars(keys.slice(0, depth).map(k => k == 'true' ? true : k == 'false' ? false : k), type, depth);
default:
return this.scalars(keys, type, depth, reflection_info_1.LongType.STRING);
}
}
}
exports.ReflectionTypeCheck = ReflectionTypeCheck;
@@ -0,0 +1,2 @@
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"forInViolation", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,5 @@
import { Attributor, ClassAttributor, StyleAttributor } from 'parchment';
declare const AlignAttribute: Attributor;
declare const AlignClass: ClassAttributor;
declare const AlignStyle: StyleAttributor;
export { AlignAttribute, AlignClass, AlignStyle };
@@ -0,0 +1,360 @@
/**
* @fileoverview Rule to disallow use of unmodified expressions in loop conditions
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const Traverser = require("../shared/traverser"),
astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const SENTINEL_PATTERN =
/(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/u;
const LOOP_PATTERN = /^(?:DoWhile|For|While)Statement$/u; // for-in/of statements don't have `test` property.
const GROUP_PATTERN = /^(?:BinaryExpression|ConditionalExpression)$/u;
const SKIP_PATTERN = /^(?:ArrowFunction|Class|Function)Expression$/u;
const DYNAMIC_PATTERN = /^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/u;
/**
* @typedef {Object} LoopConditionInfo
* @property {eslint-scope.Reference} reference - The reference.
* @property {ASTNode} group - BinaryExpression or ConditionalExpression nodes
* that the reference is belonging to.
* @property {Function} isInLoop - The predicate which checks a given reference
* is in this loop.
* @property {boolean} modified - The flag that the reference is modified in
* this loop.
*/
/**
* Checks whether or not a given reference is a write reference.
* @param {eslint-scope.Reference} reference A reference to check.
* @returns {boolean} `true` if the reference is a write reference.
*/
function isWriteReference(reference) {
if (reference.init) {
const def = reference.resolved && reference.resolved.defs[0];
if (!def || def.type !== "Variable" || def.parent.kind !== "var") {
return false;
}
}
return reference.isWrite();
}
/**
* Checks whether or not a given loop condition info does not have the modified
* flag.
* @param {LoopConditionInfo} condition A loop condition info to check.
* @returns {boolean} `true` if the loop condition info is "unmodified".
*/
function isUnmodified(condition) {
return !condition.modified;
}
/**
* Checks whether or not a given loop condition info does not have the modified
* flag and does not have the group this condition belongs to.
* @param {LoopConditionInfo} condition A loop condition info to check.
* @returns {boolean} `true` if the loop condition info is "unmodified".
*/
function isUnmodifiedAndNotBelongToGroup(condition) {
return !(condition.modified || condition.group);
}
/**
* Checks whether or not a given reference is inside of a given node.
* @param {ASTNode} node A node to check.
* @param {eslint-scope.Reference} reference A reference to check.
* @returns {boolean} `true` if the reference is inside of the node.
*/
function isInRange(node, reference) {
const or = node.range;
const ir = reference.identifier.range;
return or[0] <= ir[0] && ir[1] <= or[1];
}
/**
* Checks whether or not a given reference is inside of a loop node's condition.
* @param {ASTNode} node A node to check.
* @param {eslint-scope.Reference} reference A reference to check.
* @returns {boolean} `true` if the reference is inside of the loop node's
* condition.
*/
const isInLoop = {
WhileStatement: isInRange,
DoWhileStatement: isInRange,
ForStatement(node, reference) {
return (
isInRange(node, reference) &&
!(node.init && isInRange(node.init, reference))
);
},
};
/**
* Gets the function which encloses a given reference.
* This supports only FunctionDeclaration.
* @param {eslint-scope.Reference} reference A reference to get.
* @returns {ASTNode|null} The function node or null.
*/
function getEncloseFunctionDeclaration(reference) {
let node = reference.identifier;
while (node) {
if (node.type === "FunctionDeclaration") {
return node.id ? node : null;
}
node = node.parent;
}
return null;
}
/**
* Updates the "modified" flags of given loop conditions with given modifiers.
* @param {LoopConditionInfo[]} conditions The loop conditions to be updated.
* @param {eslint-scope.Reference[]} modifiers The references to update.
* @returns {void}
*/
function updateModifiedFlag(conditions, modifiers) {
for (let i = 0; i < conditions.length; ++i) {
const condition = conditions[i];
for (let j = 0; !condition.modified && j < modifiers.length; ++j) {
const modifier = modifiers[j];
let funcNode, funcVar;
/*
* Besides checking for the condition being in the loop, we want to
* check the function that this modifier is belonging to is called
* in the loop.
* FIXME: This should probably be extracted to a function.
*/
const inLoop =
condition.isInLoop(modifier) ||
Boolean(
(funcNode = getEncloseFunctionDeclaration(modifier)) &&
(funcVar = astUtils.getVariableByName(
modifier.from.upper,
funcNode.id.name,
)) &&
funcVar.references.some(condition.isInLoop),
);
condition.modified = inLoop;
}
}
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
docs: {
description: "Disallow unmodified loop conditions",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-unmodified-loop-condition",
},
schema: [],
messages: {
loopConditionNotModified:
"'{{name}}' is not modified in this loop.",
},
},
create(context) {
const sourceCode = context.sourceCode;
let groupMap = null;
/**
* Reports a given condition info.
* @param {LoopConditionInfo} condition A loop condition info to report.
* @returns {void}
*/
function report(condition) {
const node = condition.reference.identifier;
context.report({
node,
messageId: "loopConditionNotModified",
data: node,
});
}
/**
* Registers given conditions to the group the condition belongs to.
* @param {LoopConditionInfo[]} conditions A loop condition info to
* register.
* @returns {void}
*/
function registerConditionsToGroup(conditions) {
for (let i = 0; i < conditions.length; ++i) {
const condition = conditions[i];
if (condition.group) {
let group = groupMap.get(condition.group);
if (!group) {
group = [];
groupMap.set(condition.group, group);
}
group.push(condition);
}
}
}
/**
* Reports references which are inside of unmodified groups.
* @param {LoopConditionInfo[]} conditions A loop condition info to report.
* @returns {void}
*/
function checkConditionsInGroup(conditions) {
if (conditions.every(isUnmodified)) {
conditions.forEach(report);
}
}
/**
* Checks whether or not a given group node has any dynamic elements.
* @param {ASTNode} root A node to check.
* This node is one of BinaryExpression or ConditionalExpression.
* @returns {boolean} `true` if the node is dynamic.
*/
function hasDynamicExpressions(root) {
let retv = false;
Traverser.traverse(root, {
visitorKeys: sourceCode.visitorKeys,
enter(node) {
if (DYNAMIC_PATTERN.test(node.type)) {
retv = true;
this.break();
} else if (SKIP_PATTERN.test(node.type)) {
this.skip();
}
},
});
return retv;
}
/**
* Creates the loop condition information from a given reference.
* @param {eslint-scope.Reference} reference A reference to create.
* @returns {LoopConditionInfo|null} Created loop condition info, or null.
*/
function toLoopCondition(reference) {
if (reference.init) {
return null;
}
let group = null;
let child = reference.identifier;
let node = child.parent;
while (node) {
if (SENTINEL_PATTERN.test(node.type)) {
if (LOOP_PATTERN.test(node.type) && node.test === child) {
// This reference is inside of a loop condition.
return {
reference,
group,
isInLoop: isInLoop[node.type].bind(null, node),
modified: false,
};
}
// This reference is outside of a loop condition.
break;
}
/*
* If it's inside of a group, OK if either operand is modified.
* So stores the group this reference belongs to.
*/
if (GROUP_PATTERN.test(node.type)) {
// If this expression is dynamic, no need to check.
if (hasDynamicExpressions(node)) {
break;
} else {
group = node;
}
}
child = node;
node = node.parent;
}
return null;
}
/**
* Finds unmodified references which are inside of a loop condition.
* Then reports the references which are outside of groups.
* @param {eslint-scope.Variable} variable A variable to report.
* @returns {void}
*/
function checkReferences(variable) {
// Gets references that exist in loop conditions.
const conditions = variable.references
.map(toLoopCondition)
.filter(Boolean);
if (conditions.length === 0) {
return;
}
// Registers the conditions to belonging groups.
registerConditionsToGroup(conditions);
// Check the conditions are modified.
const modifiers = variable.references.filter(isWriteReference);
if (modifiers.length > 0) {
updateModifiedFlag(conditions, modifiers);
}
/*
* Reports the conditions which are not belonging to groups.
* Others will be reported after all variables are done.
*/
conditions.filter(isUnmodifiedAndNotBelongToGroup).forEach(report);
}
return {
"Program:exit"(node) {
const queue = [sourceCode.getScope(node)];
groupMap = new Map();
let scope;
while ((scope = queue.pop())) {
queue.push(...scope.childScopes);
scope.variables.forEach(checkReferences);
}
groupMap.forEach(checkConditionsInGroup);
groupMap = null;
},
};
},
};
@@ -0,0 +1 @@
{"name":"express-rate-limit","version":"7.5.1","requiresBuild":false,"files":{"dist/index.cjs":{"checkedAt":1794532103432,"integrity":"sha512-XLqq3cn/b0BHNVNL+97fO8gYSVZoow1T0Uyl0xMq5+6g8Y4/dhG0HVHKNzJiL/3BAvIxE6/nO7XD+ujzFn/D8A==","mode":420,"size":28625},"dist/index.d.cts":{"checkedAt":1794532103433,"integrity":"sha512-WpkIb1W0XvM76jySONqHA3baKzv1joJoHNcnYbD5hV2UPOMMVBacdWC2gzUYq5NjTxuRZoT7TbZRz6fS7Ajbxw==","mode":420,"size":18314},"package.json":{"checkedAt":1794532103433,"integrity":"sha512-SS+P7iMwuBvYCEhy64Xqs91RXAr58qClnA1Q26DtlCO/BbqXlXlDmcvs9IMk3GH06rUfotAPpbWo4pm4W5EtYQ==","mode":420,"size":3693},"tsconfig.json":{"checkedAt":1794532103433,"integrity":"sha512-iSMXvKsBBjpwpFl/dNrBRiLP3YJAP0lb4F61OV1eHhB8No2ALcGgEPaADdbCdFXeRJ4ObLvJTnjw48KmbAD5LA==","mode":420,"size":150},"license.md":{"checkedAt":1794532103433,"integrity":"sha512-02RZRfuVCw0aJ7z8zHZGoHNuV2fGEPV3/GfOWKg1v1oxRGEQHKkKMHtR/k4hC3NDWpTPSpnufa1TSzIiuQDwUA==","mode":420,"size":1082},"readme.md":{"checkedAt":1794532103433,"integrity":"sha512-w9DcNjw4eTCavGn3qo+uwvyKdu7EH7Ai13AEF85jb9gEVxysYwSN/QRxLvRazRwjaaIE7CI3eJpK77tdAGsOTQ==","mode":420,"size":8653},"dist/index.mjs":{"checkedAt":1794532103433,"integrity":"sha512-uhz5D/aRSTO+iOsxGm80OydqGflKauhcaDX1f+rADyh5xsgEjkTj0njZ1k8gvbWi0bQzHANu+ypx7X3kkvCqfQ==","mode":420,"size":27336},"dist/index.d.mts":{"checkedAt":1794532103433,"integrity":"sha512-WpkIb1W0XvM76jySONqHA3baKzv1joJoHNcnYbD5hV2UPOMMVBacdWC2gzUYq5NjTxuRZoT7TbZRz6fS7Ajbxw==","mode":420,"size":18314},"dist/index.d.ts":{"checkedAt":1794532103433,"integrity":"sha512-WpkIb1W0XvM76jySONqHA3baKzv1joJoHNcnYbD5hV2UPOMMVBacdWC2gzUYq5NjTxuRZoT7TbZRz6fS7Ajbxw==","mode":420,"size":18314}}}
@@ -0,0 +1,7 @@
/*!
* Quill Editor v2.0.3
* https://quilljs.com
* Copyright (c) 2017-2024, Slab
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/
@@ -0,0 +1,17 @@
'use strict';
var define = require('define-properties');
var getPolyfill = require('./polyfill');
module.exports = function shim() {
var polyfill = getPolyfill();
define(
Object,
{ groupBy: polyfill },
{ groupBy: function () { return Object.groupBy !== polyfill; } }
);
return polyfill;
};
@@ -0,0 +1,10 @@
import type { UniqueIdentifier } from '../types';
import type { DroppableContainer } from './types';
declare type Identifier = UniqueIdentifier | null | undefined;
export declare class DroppableContainersMap extends Map<UniqueIdentifier, DroppableContainer> {
get(id: Identifier): DroppableContainer | undefined;
toArray(): DroppableContainer[];
getEnabled(): DroppableContainer[];
getNodeFor(id: Identifier): HTMLElement | undefined;
}
export {};
@@ -0,0 +1 @@
{"version":3,"file":"strip-filename.d.ts","sourceRoot":"","sources":["../src/strip-filename.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAI7E"}
@@ -0,0 +1,9 @@
import type { Coordinates } from '@dnd-kit/utilities';
export type { Coordinates };
export declare type DistanceMeasurement = number | Coordinates | Pick<Coordinates, 'x'> | Pick<Coordinates, 'y'>;
export declare type Translate = Coordinates;
export interface ScrollCoordinates {
initial: Coordinates;
current: Coordinates;
delta: Coordinates;
}
@@ -0,0 +1,4 @@
'use strict';
/** @type {import('./abs')} */
module.exports = Math.abs;
@@ -0,0 +1,29 @@
var toString = require('./toString');
/**
* Replaces matches for `pattern` in `string` with `replacement`.
*
* **Note:** This method is based on
* [`String#replace`](https://mdn.io/String/replace).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to modify.
* @param {RegExp|string} pattern The pattern to replace.
* @param {Function|string} replacement The match replacement.
* @returns {string} Returns the modified string.
* @example
*
* _.replace('Hi Fred', 'Fred', 'Barney');
* // => 'Hi Barney'
*/
function replace() {
var args = arguments,
string = toString(args[0]);
return args.length < 3 ? string : string.replace(args[1], args[2]);
}
module.exports = replace;
@@ -0,0 +1,36 @@
var create = require('../diagnostics');
var tty = require('tty').isatty(1);
/**
* Create a new diagnostics logger.
*
* @param {String} namespace The namespace it should enable.
* @param {Object} options Additional options.
* @returns {Function} The logger.
* @public
*/
var diagnostics = create(function dev(namespace, options) {
options = options || {};
options.colors = 'colors' in options ? options.colors : tty;
options.namespace = namespace;
options.prod = false;
options.dev = true;
if (!dev.enabled(namespace) && !(options.force || dev.force)) {
return dev.nope(options);
}
return dev.yep(options);
});
//
// Configure the logger for the given environment.
//
diagnostics.modify(require('../modifiers/namespace-ansi'));
diagnostics.use(require('../adapters/process.env'));
diagnostics.set(require('../logger/console'));
//
// Expose the diagnostics logger.
//
module.exports = diagnostics;
@@ -0,0 +1,7 @@
var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js");
var assertClassBrand = require("./assertClassBrand.js");
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
function _classStaticPrivateFieldDestructureSet(t, r, s) {
return assertClassBrand(r, t), classCheckPrivateStaticFieldDescriptor(s, "set"), classApplyDescriptorDestructureSet(t, s);
}
module.exports = _classStaticPrivateFieldDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1 @@
{"name":"path-to-regexp","version":"8.3.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532124675,"integrity":"sha512-bYuXCL+h88+itj+QFSy28mlgwrpU+hGhbBPh1aP4X0EhUWaZAltrdZ4FGydlCbHWlRC2RCQUNOb4+Bs9+lqOYw==","mode":420,"size":1103},"dist/index.js":{"checkedAt":1794532124675,"integrity":"sha512-71sRFZZDsHiqqH9gQ5d+munLBNYJIrO8TVI4vQgO9rOecNXraD/qsHtSn0xP2UNfHPi7Vp9OU/DT/IysSt2DFw==","mode":420,"size":12833},"package.json":{"checkedAt":1794532124675,"integrity":"sha512-GqIk7RqNekxzvvi/j9X4HWTvLKFF/ORuDV0AvzTa5b02NyPOSCeAtJfWlqBxlr1mGZdZmMY24YyzQgdVKOHeeg==","mode":420,"size":1399},"dist/index.js.map":{"checkedAt":1794532124675,"integrity":"sha512-1r/mXztLoGwmyMX9MRsQ1avPsjzC2liMf9zy/X7NFJq40hikVh4dxPcLhezT+tFoujP2umVKsRjdSx3ouWkNrg==","mode":420,"size":29156},"Readme.md":{"checkedAt":1794532124675,"integrity":"sha512-umVuKfvtXTABTMhQhxNnt54nmpS0Bha58EJupPICbHxIXQqykfFRu7EW9pra7Gk+IWxY/VczEjCn1jFba8RRKA==","mode":420,"size":7850},"dist/index.d.ts":{"checkedAt":1794532124676,"integrity":"sha512-wfzA/Qe+i7AYCFVSRZ79C3qARN1FzV3j/PX0yxPjYeza7QzT6R4yAYgq7n/eHGLM7cQOstTSo/lQzHr9g2QhoQ==","mode":420,"size":4006}}}
@@ -0,0 +1,40 @@
{
"name": "encodeurl",
"description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences",
"version": "2.0.0",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>"
],
"license": "MIT",
"keywords": [
"encode",
"encodeurl",
"url"
],
"repository": "pillarjs/encodeurl",
"devDependencies": {
"eslint": "5.11.1",
"eslint-config-standard": "12.0.0",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-node": "7.0.1",
"eslint-plugin-promise": "4.0.1",
"eslint-plugin-standard": "4.0.0",
"istanbul": "0.4.5",
"mocha": "2.5.3"
},
"files": [
"LICENSE",
"HISTORY.md",
"README.md",
"index.js"
],
"engines": {
"node": ">= 0.8"
},
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
}
}
@@ -0,0 +1,462 @@
```
___________.___ ________.__ __ __ /\ __
\_ _____/| |/ _____/| | _____/ |_ |__| ______ / / _/ |_ ______
| __) | / \ ___| | _/ __ \ __\ | |/ ___/ / / \ __\/ ___/
| \ | \ \_\ \ |_\ ___/| | | |\___ \ / / | | \___ \
\___ / |___|\______ /____/\___ >__| /\ /\__| /____ > / / |__| /____ >
\/ \/ \/ \/ \______| \/ \/ \/
```
[![NPM Downloads](https://img.shields.io/npm/dt/figlet.svg?style=flat)](https://npmcharts.com/compare/figlet?minimal=true)
This project aims to fully implement the FIGfont spec in TypeScript (compiles to JavaScript). It works in the browser and with Node. You can see it in action here: http://patorjk.com/software/taag/ (this project was written to power that application)
## Quick Start - Node
Install:
```sh
npm install figlet
```
Simple usage:
```js
import figlet from "figlet";
async function doStuff() {
const text = await figlet.text("Hello World!!");
console.log(text);
}
doStuff();
```
Or the classic callback version:
```js
const figlet = require('figlet');
figlet("Hello World!!", function (err, data) {
if (err) {
console.log("Something went wrong...");
console.dir(err);
return;
}
console.log(data);
});
```
These will print out:
```
_ _ _ _ __ __ _ _ _ _
| | | | ___| | | ___ \ \ / /__ _ __| | __| | | |
| |_| |/ _ \ | |/ _ \ \ \ /\ / / _ \| '__| |/ _` | | |
| _ | __/ | | (_) | \ V V / (_) | | | | (_| |_|_|
|_| |_|\___|_|_|\___/ \_/\_/ \___/|_| |_|\__,_(_|_)
```
## Basic Usage - Node
### text
Calling the figlet object as a function is shorthand for calling the text function. This method allows you to create ASCII Art from text. It takes in 3 parameters:
- Input Text - A string of text to turn into ASCII Art.
- Options - Either a string indicating the font name or an options object (description below).
- Callback - Optional function to execute with the generated ASCII Art.
The return value is a **promise** that resolves to the generated ASCII Art.
Example:
```js
figlet.text(
"Boo!",
{
font: "Ghost",
horizontalLayout: "default",
verticalLayout: "default",
width: 80,
whitespaceBreak: true,
},
function (err, data) {
if (err) {
console.log("Something went wrong...");
console.dir(err);
return;
}
console.log(data);
}
);
```
That will print out:
```
.-. .-') ,---.
\ ( OO ) | |
;-----.\ .-'),-----. .-'),-----. | |
| .-. | ( OO' .-. '( OO' .-. '| |
| '-' /_)/ | | | |/ | | | || |
| .-. `. \_) | |\| |\_) | |\| || .'
| | \ | \ | | | | \ | | | |`--'
| '--' / `' '-' ' `' '-' '.--.
`------' `-----' `-----' '--'
```
Similarly, you can use Promise API:
```js
try {
console.log(
await figlet.text("Boo!", {
font: "Ghost",
horizontalLayout: "default",
verticalLayout: "default",
width: 80,
whitespaceBreak: true,
})
);
} catch (err) {
console.log("Something went wrong...");
console.dir(err);
}
```
This will print the same output.
### textSync
This method is the synchronous version of the method above.
- Input Text - A string of text to turn into ASCII Art.
- Font Options - Either a string indicating the font name or an options object (description below).
Example:
```js
console.log(
figlet.textSync("Boo!", {
font: "Ghost",
horizontalLayout: "default",
verticalLayout: "default",
width: 80,
whitespaceBreak: true,
})
);
```
That will print out:
```
.-. .-') ,---.
\ ( OO ) | |
;-----.\ .-'),-----. .-'),-----. | |
| .-. | ( OO' .-. '( OO' .-. '| |
| '-' /_)/ | | | |/ | | | || |
| .-. `. \_) | |\| |\_) | |\| || .'
| | \ | \ | | | | \ | | | |`--'
| '--' / `' '-' ' `' '-' '.--.
`------' `-----' `-----' '--'
```
### Options
The options object has several parameters which you can set:
#### font
Type: `String`
Default value: `'Standard'`
A string value that indicates the FIGlet font to use.
#### horizontalLayout
Type: `String`
Default value: `'default'`
A string value that indicates the horizontal layout to use. 5 possible values for this: "default", "full", "fitted", "controlled smushing", and "universal smushing". "default" does the kerning the way the font designer intended, "full" uses full letter spacing, "fitted" moves the letters together until they almost touch, and "controlled smushing" and "universal smushing" are common FIGlet kerning setups.
#### verticalLayout
Type: `String`
Default value: `'default'`
A string value that indicates the vertical layout to use. 5 possible values for this: "default", "full", "fitted", "controlled smushing", and "universal smushing". "default" does the kerning the way the font designer intended, "full" uses full letter spacing, "fitted" moves the letters together until they almost touch, and "controlled smushing" and "universal smushing" are common FIGlet kerning setups.
#### width
Type: `Number`
Default value: `undefined`
This option allows you to limit the width of the output. For example, if you want your output to be a max of 80 characters wide, you would set this option to 80. [Example](https://github.com/patorjk/figlet.js/blob/master/examples/front-end/index.htm)
#### whitespaceBreak
Type: `Boolean`
Default value: `false`
This option works in conjunction with "width". If this option is set to true, then the library will attempt to break text up on whitespace when limiting the width. [Example](https://github.com/patorjk/figlet.js/blob/master/examples/front-end/index.htm)
### Understanding Kerning
The 2 layout options allow you to override a font's default "kerning". Below you can see how this effects the text. The string "Kerning" was printed using the "Standard" font with horizontal layouts of "default", "fitted" and then "full".
```
_ __ _
| |/ /___ _ __ _ __ (_)_ __ __ _
| ' // _ \ '__| '_ \| | '_ \ / _` |
| . \ __/ | | | | | | | | | (_| |
|_|\_\___|_| |_| |_|_|_| |_|\__, |
|___/
_ __ _
| |/ / ___ _ __ _ __ (_) _ __ __ _
| ' / / _ \| '__|| '_ \ | || '_ \ / _` |
| . \| __/| | | | | || || | | || (_| |
|_|\_\\___||_| |_| |_||_||_| |_| \__, |
|___/
_ __ _
| |/ / ___ _ __ _ __ (_) _ __ __ _
| ' / / _ \ | '__| | '_ \ | | | '_ \ / _` |
| . \ | __/ | | | | | | | | | | | | | (_| |
|_|\_\ \___| |_| |_| |_| |_| |_| |_| \__, |
|___/
```
In most cases you'll either use the default setting or the "fitted" setting. Most fonts don't support vertical kerning, but a hand full of them do (like the "Standard" font).
### metadata
The metadata function allows you to retrieve a font's default options and header comment. Example usage:
```js
figlet.metadata("Standard", function (err, options, headerComment) {
if (err) {
console.log("something went wrong...");
console.dir(err);
return;
}
console.dir(options);
console.log(headerComment);
});
```
The function also return a promise that return an array with two values:
```js
try {
const [options, headerComment] = await figlet.metadata("Standard");
console.dir(options);
console.log(headerComment);
} catch (err) {
console.log("something went wrong...");
console.dir(err);
}
```
### fonts
The fonts function allows you to get a list of all of the available fonts. Example usage:
```js
figlet.fonts(function (err, fonts) {
if (err) {
console.log("something went wrong...");
console.dir(err);
return;
}
console.dir(fonts);
});
```
For Node, it will look in the fonts folder and list all of the fonts there - this folder is configurable in case you want to use your own folder (see the `defaults` method).
When dealing with this code in the browser, it will return a list of all of the fonts that come with this library. If you only want a list of the fonts that have been loaded into memory (ie, fetched and parsed and currently usable), use the `loadedFonts` method (this also returns a list of strings).
### fontsSync
The synchronous version of the fonts method
```js
console.log(figlet.fontsSync());
```
As with `fonts`, when used in the browser this will list all of the fonts that come with this library.
### loadedFonts
When you call `loadFont` or `parseFont`, the font information gets processed and put into an internal array. This method allows you to see all of the fonts that have been loaded. It returns an array of font names.
### clearLoadedFonts
Resets the internal state so that no fonts have been loaded.
### parseFont
Allows you to use a font from another source.
```js
const fs = require("fs");
const path = require("path");
let data = fs.readFileSync(path.join(__dirname, "myfont.flf"), "utf8");
figlet.parseFont("myfont", data);
console.log(figlet.textSync("myfont!", "myfont"));
```
### defaults
Allows you to set a handful of default values for the library. Ex:
```js
figlet.defaults({
font: "Standard", // default font
fontPath: "some-random-place/fonts", // default font path location
fetchFontIfMissing: true, // for the browser, fetch a font if its missing
})
```
## Getting Started - Browser with ES modules
Here's the basic ES module usage:
```js
import figlet from "figlet";
import standard from "figlet/fonts/Standard";
figlet.parseFont("Standard", standard);
async function doStuff() {
const text = await figlet.text("test", { font: "Standard" });
console.log(text);
}
doStuff();
```
In previous versions you imported js files from an importable-fonts folder. This still works, but the new way is slightly cleaner.
If you attempt to access a font that doesn't exist, the library will attempt to fetch it. You can control the fetch location via the `fontPath` property in `defaults`. If you want to disable this behavior (fetching a font if it doesn't exist), set `fetchFontIfMissing` to false (with the `defaults` method).
### textSync
The browser API supports synchronous mode as long as the fonts have been loaded or preloaded.
Example:
```js
figlet.defaults({ fontPath: "assets/fonts" });
figlet.preloadFonts(["Standard", "Ghost"], ready);
function ready() {
console.log(figlet.textSync("ASCII"));
console.log(figlet.textSync("Art", "Ghost"));
}
```
That will print out:
```
_ ____ ____ ___ ___
/ \ / ___| / ___||_ _||_ _|
/ _ \ \___ \ | | | | | |
/ ___ \ ___) || |___ | | | |
/_/ \_\|____/ \____||___||___|
('-. _ .-') .-') _
( OO ).-.( \( -O ) ( OO) )
/ . --. / ,------. / '._
| \-. \ | /`. '|'--...__)
.-'-' | | | / | |'--. .--'
\| |_.' | | |_.' | | |
| .-. | | . '.' | |
| | | | | |\ \ | |
`--' `--' `--' '--' `--'
```
See the examples folder for a more robust front-end example.
## Getting Started - Command Line
To use figlet.js on the command line, install globally:
```sh
npm install -g figlet
```
And then you should be able run from the command line. Example:
```sh
figlet -f "Dancing Font" "Hi"
```
## Contributors
Thanks goes to these people: ([emoji key](https://allcontributors.org/docs/en/emoji-key))
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://patorjk.com/"><img src="https://avatars.githubusercontent.com/u/521224?v=4?s=100" width="100px;" alt="patorjk"/><br /><sub><b>patorjk</b></sub></a><br /><a href="#code-patorjk" title="Code">💻</a> <a href="#doc-patorjk" title="Documentation">📖</a> <a href="#test-patorjk" title="Tests">⚠️</a> <a href="#infra-patorjk" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#example-patorjk" title="Examples">💡</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://jcu.bi"><img src="https://avatars.githubusercontent.com/u/280241?v=4?s=100" width="100px;" alt="Jakub T. Jankiewicz"/><br /><sub><b>Jakub T. Jankiewicz</b></sub></a><br /><a href="#code-jcubic" title="Code">💻</a> <a href="#doc-jcubic" title="Documentation">📖</a> <a href="#test-jcubic" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://tracker1.dev/"><img src="https://avatars.githubusercontent.com/u/444316?v=4?s=100" width="100px;" alt="Michael J. Ryan"/><br /><sub><b>Michael J. Ryan</b></sub></a><br /><a href="#code-tracker1" title="Code">💻</a> <a href="#doc-tracker1" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/seriousManual"><img src="https://avatars.githubusercontent.com/u/1330022?v=4?s=100" width="100px;" alt="Manuel Ernst"/><br /><sub><b>Manuel Ernst</b></sub></a><br /><a href="#code-seriousManual" title="Code">💻</a> <a href="#doc-seriousManual" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/eiriksm"><img src="https://avatars.githubusercontent.com/u/865153?v=4?s=100" width="100px;" alt="Eirik Stanghelle Morland"/><br /><sub><b>Eirik Stanghelle Morland</b></sub></a><br /><a href="#infra-eiriksm" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://und.ooo"><img src="https://avatars.githubusercontent.com/u/46262811?v=4?s=100" width="100px;" alt="George"/><br /><sub><b>George</b></sub></a><br /><a href="#example-Horhik" title="Examples">💡</a> <a href="#doc-Horhik" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://websemantics.ca"><img src="https://avatars.githubusercontent.com/u/2190455?v=4?s=100" width="100px;" alt="Adnan M.Sagar, PhD"/><br /><sub><b>Adnan M.Sagar, PhD</b></sub></a><br /><a href="#code-websemantics" title="Code">💻</a> <a href="#doc-websemantics" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://abhishekchoudhary.com.np"><img src="https://avatars.githubusercontent.com/u/61597896?v=4?s=100" width="100px;" alt="Abhishek Choudhary"/><br /><sub><b>Abhishek Choudhary</b></sub></a><br /><a href="#doc-shreemaan-abhishek" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/JasonGoemaat"><img src="https://avatars.githubusercontent.com/u/114062?v=4?s=100" width="100px;" alt="Jason"/><br /><sub><b>Jason</b></sub></a><br /><a href="#code-JasonGoemaat" title="Code">💻</a> <a href="#doc-JasonGoemaat" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mbodomi"><img src="https://avatars.githubusercontent.com/u/390802?v=4?s=100" width="100px;" alt="mbodomi"/><br /><sub><b>mbodomi</b></sub></a><br /><a href="#design-mbodomi" title="Design">🎨</a> <a href="#code-mbodomi" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://orkhan-huseyn.github.io"><img src="https://avatars.githubusercontent.com/u/21221412?v=4?s=100" width="100px;" alt="Orkhan Huseynli"/><br /><sub><b>Orkhan Huseynli</b></sub></a><br /><a href="#code-orkhan-huseyn" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://melcher.io"><img src="https://avatars.githubusercontent.com/u/35605787?v=4?s=100" width="100px;" alt="Domenic Melcher"/><br /><sub><b>Domenic Melcher</b></sub></a><br /><a href="#doc-LetsMelon" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/a-raccoon"><img src="https://avatars.githubusercontent.com/u/1052090?v=4?s=100" width="100px;" alt="a-raccoon"/><br /><sub><b>a-raccoon</b></sub></a><br /><a href="#doc-a-raccoon" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://about.me/peterdehaan"><img src="https://avatars.githubusercontent.com/u/557895?v=4?s=100" width="100px;" alt="Peter deHaan"/><br /><sub><b>Peter deHaan</b></sub></a><br /><a href="#doc-pdehaan" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://ionicabizau.net"><img src="https://avatars.githubusercontent.com/u/2864371?v=4?s=100" width="100px;" alt="Ionică Bizău (Johnny B.)"/><br /><sub><b>Ionică Bizău (Johnny B.)</b></sub></a><br /><a href="#doc-IonicaBizau" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.t1st3.com/"><img src="https://avatars.githubusercontent.com/u/1469638?v=4?s=100" width="100px;" alt="t1st3"/><br /><sub><b>t1st3</b></sub></a><br /><a href="#code-t1st3" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/timhudson"><img src="https://avatars.githubusercontent.com/u/122594?v=4?s=100" width="100px;" alt="Tim Hudson"/><br /><sub><b>Tim Hudson</b></sub></a><br /><a href="#code-timhudson" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Lev-Shapiro"><img src="https://avatars.githubusercontent.com/u/96536068?v=4?s=100" width="100px;" alt="Lev-Shapiro"/><br /><sub><b>Lev-Shapiro</b></sub></a><br /><a href="#code-Lev-Shapiro" title="Code">💻</a> <a href="#example-Lev-Shapiro" title="Examples">💡</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
## Release History
- 2025.09.17 v1.9.3 Type fix for figlet module base call (when calling figlet as shorthand for figlet.text)
- 2025.09.15 v1.9.2 Type fix for figlet module for TypeScript with Node
- 2025.09.08 v1.9.1 Adjustment for older versions of node: Added if statement around structuredClone operation.
- 2025.09.07 v1.9.0 TypeScript refactor. Added Toilet fonts.
- 2025.07.11 v1.8.2 Added Terrace and Wavescape fonts. Fixed tag validation (https://github.com/patorjk/figlet.js/pull/134) thanks to @deverac
- 2025.04.11 v1.8.1 Added miniwi font.
- 2024.10.08 v1.8.0 Added support for promises for loadFont, preloadedFonts, and metadata methods. 5 fonts added: DiamFont, RubiFont, CosMike2, BlurVision ASCII, and Shaded Blocky.
- 2023.10.01 v1.7.0 Added support for promises for text method.
- 2023.04.08 v1.6.0 Added npx support (ex: npx figlet test).
- 2021.08.11 v1.5.2 Minor bug fixes.
- 2020.07.12 v1.5.1 Fixed with vertical smushing, updated lodash version.
- 2020.07.12 v1.5.0 Added width and whitespaceBreak options.
- 2020.04.26 v1.4.0 Removed jQuery from preloader and examples.
- 2020.02.23 v1.3.0 Added the "ANSI Regular" font and updated the README with info on how to use with Webpack.
- 2018.03.26 v1.2.1 parseFont works in node for adding fonts manually
- 2016.09.27 v1.2.0 jQuery replaced with fetch API / polyfill.
- 2016.04.28 v1.1.2 textSync now works in the browser with font pre-loading.
- 2014.08.15 v1.1.0 Sync functions added.
- 2014.07.31 v1.0.1 Bug fixes.
- 2013.12.28 v1.0.7 README update and minor tweaks.
- 2013.01.02 v1.0.8 Added tests and command line info.
@@ -0,0 +1,36 @@
# jsx-a11y/no-onchange
❌ This rule is deprecated.
<!-- end auto-generated rule header -->
⚠️ **Deprecated:** This rule is based on reports of behavior of [old browsers (eg. IE 10 and below)](https://www.quirksmode.org/dom/events/change.html#t05). In the meantime, this behavior has been corrected, both in newer versions of browsers as well as [in the DOM spec](https://bugzilla.mozilla.org/show_bug.cgi?id=969068#c2).
Enforce usage of `onBlur` over/in parallel with `onChange` on select menu elements for accessibility. `onBlur` **should** be used instead of `onChange`, unless absolutely necessary and it causes no negative consequences for keyboard only or screen reader users. `onBlur` is a more declarative action by the user: for instance in a dropdown, using the arrow keys to toggle between options will trigger the `onChange` event in some browsers. Regardless, when a change of context results from an `onBlur` event or an `onChange` event, the user should be notified of the change unless it occurs below the currently focused element.
## Rule details
This rule takes no arguments.
### Succeed
```jsx
<select onBlur={updateModel}>
<option/>
</select>
<select>
<option onBlur={handleOnBlur} onChange={handleOnChange} />
</select>
```
### Fail
```jsx
<select onChange={updateModel} />
```
## Accessibility guidelines
- [WCAG 3.2.2](https://www.w3.org/WAI/WCAG21/Understanding/on-input)
### Resources
- [onChange Event Accessibility Issues](https://web.archive.org/web/20191207202425/http://cita.disability.uiuc.edu/html-best-practices/auto/onchange.php)
- [onChange Select Menu](https://www.themaninblue.com/writing/perspective/2004/10/19/)
@@ -0,0 +1,29 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
docs: {
description: "disallow `import()` syntax",
category: "ES2020",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-dynamic-import.html",
},
fixable: null,
messages: {
forbidden: "ES2020 'import()' syntax is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
ImportExpression(node) {
context.report({ messageId: "forbidden", node })
},
}
},
}
@@ -0,0 +1,11 @@
import * as _heroui_system from '@heroui/system';
import { UseSkeletonProps } from './use-skeleton.mjs';
import 'tailwind-variants';
import 'react';
import '@heroui/theme';
interface SkeletonProps extends UseSkeletonProps {
}
declare const Skeleton: _heroui_system.InternalForwardRefRenderFunction<"div", SkeletonProps, never>;
export { type SkeletonProps, Skeleton as default };
@@ -0,0 +1 @@
module.exports={A:{A:{"132":"K D E F A B wC"},B:{"1":"4 5 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","292":"0 1 2 3 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"},C:{"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 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 0C 1C","3138":"6B"},D:{"1":"4 5 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","292":"0 1 2 3 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 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},E:{"16":"J ZB 2C ZC","292":"K D E F A B C L M G 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"0 1 2 3 4 5 q r s t u v w x y z","2":"F B C FD GD HD ID NC uC JD OC","292":"6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 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"},G:{"2":"bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","16":"ZC KD vC LD MD","292":"ND","804":"E OD PD QD RD SD TD UD VD WD XD YD ZD aD"},H:{"2":"hD"},I:{"16":"iD jD","292":"TC J I kD lD vC mD nD"},J:{"292":"D A"},K:{"2":"A B C NC uC OC","292":"H"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"292":"PC"},P:{"1":"BB CB DB EB FB","292":"6 7 8 9 J AB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"292":"zD"},R:{"292":"0D"},S:{"2":"1D 2D"}},B:4,C:"CSS scrollbar styling",D:true};
@@ -0,0 +1,110 @@
'use strict'
const gitHosts = require('./git-host-info.js')
class GitHost {
constructor (type, user, auth, project, committish, defaultRepresentation, opts = {}) {
Object.assign(this, gitHosts[type])
this.type = type
this.user = user
this.auth = auth
this.project = project
this.committish = committish
this.default = defaultRepresentation
this.opts = opts
}
hash () {
return this.committish ? `#${this.committish}` : ''
}
ssh (opts) {
return this._fill(this.sshtemplate, opts)
}
_fill (template, opts) {
if (typeof template === 'function') {
const options = { ...this, ...this.opts, ...opts }
// the path should always be set so we don't end up with 'undefined' in urls
if (!options.path) {
options.path = ''
}
// template functions will insert the leading slash themselves
if (options.path.startsWith('/')) {
options.path = options.path.slice(1)
}
if (options.noCommittish) {
options.committish = null
}
const result = template(options)
return options.noGitPlus && result.startsWith('git+') ? result.slice(4) : result
}
return null
}
sshurl (opts) {
return this._fill(this.sshurltemplate, opts)
}
browse (path, fragment, opts) {
// not a string, treat path as opts
if (typeof path !== 'string') {
return this._fill(this.browsetemplate, path)
}
if (typeof fragment !== 'string') {
opts = fragment
fragment = null
}
return this._fill(this.browsefiletemplate, { ...opts, fragment, path })
}
docs (opts) {
return this._fill(this.docstemplate, opts)
}
bugs (opts) {
return this._fill(this.bugstemplate, opts)
}
https (opts) {
return this._fill(this.httpstemplate, opts)
}
git (opts) {
return this._fill(this.gittemplate, opts)
}
shortcut (opts) {
return this._fill(this.shortcuttemplate, opts)
}
path (opts) {
return this._fill(this.pathtemplate, opts)
}
tarball (opts) {
return this._fill(this.tarballtemplate, { ...opts, noCommittish: false })
}
file (path, opts) {
return this._fill(this.filetemplate, { ...opts, path })
}
getDefaultRepresentation () {
return this.default
}
toString (opts) {
if (this.default && typeof this[this.default] === 'function') {
return this[this.default](opts)
}
return this.sshurl(opts)
}
}
module.exports = GitHost
@@ -0,0 +1,133 @@
import CJSImportProcessor from "./CJSImportProcessor";
import computeSourceMap, {} from "./computeSourceMap";
import {HelperManager} from "./HelperManager";
import identifyShadowedGlobals from "./identifyShadowedGlobals";
import NameManager from "./NameManager";
import {validateOptions} from "./Options";
import {parse} from "./parser";
import TokenProcessor from "./TokenProcessor";
import RootTransformer from "./transformers/RootTransformer";
import formatTokens from "./util/formatTokens";
import getTSImportedNames from "./util/getTSImportedNames";
;
export function getVersion() {
/* istanbul ignore next */
return "3.35.0";
}
export function transform(code, options) {
validateOptions(options);
try {
const sucraseContext = getSucraseContext(code, options);
const transformer = new RootTransformer(
sucraseContext,
options.transforms,
Boolean(options.enableLegacyBabel5ModuleInterop),
options,
);
const transformerResult = transformer.transform();
let result = {code: transformerResult.code};
if (options.sourceMapOptions) {
if (!options.filePath) {
throw new Error("filePath must be specified when generating a source map.");
}
result = {
...result,
sourceMap: computeSourceMap(
transformerResult,
options.filePath,
options.sourceMapOptions,
code,
sucraseContext.tokenProcessor.tokens,
),
};
}
return result;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (e) {
if (options.filePath) {
e.message = `Error transforming ${options.filePath}: ${e.message}`;
}
throw e;
}
}
/**
* Return a string representation of the sucrase tokens, mostly useful for
* diagnostic purposes.
*/
export function getFormattedTokens(code, options) {
const tokens = getSucraseContext(code, options).tokenProcessor.tokens;
return formatTokens(code, tokens);
}
/**
* Call into the parser/tokenizer and do some further preprocessing:
* - Come up with a set of used names so that we can assign new names.
* - Preprocess all import/export statements so we know which globals we are interested in.
* - Compute situations where any of those globals are shadowed.
*
* In the future, some of these preprocessing steps can be skipped based on what actual work is
* being done.
*/
function getSucraseContext(code, options) {
const isJSXEnabled = options.transforms.includes("jsx");
const isTypeScriptEnabled = options.transforms.includes("typescript");
const isFlowEnabled = options.transforms.includes("flow");
const disableESTransforms = options.disableESTransforms === true;
const file = parse(code, isJSXEnabled, isTypeScriptEnabled, isFlowEnabled);
const tokens = file.tokens;
const scopes = file.scopes;
const nameManager = new NameManager(code, tokens);
const helperManager = new HelperManager(nameManager);
const tokenProcessor = new TokenProcessor(
code,
tokens,
isFlowEnabled,
disableESTransforms,
helperManager,
);
const enableLegacyTypeScriptModuleInterop = Boolean(options.enableLegacyTypeScriptModuleInterop);
let importProcessor = null;
if (options.transforms.includes("imports")) {
importProcessor = new CJSImportProcessor(
nameManager,
tokenProcessor,
enableLegacyTypeScriptModuleInterop,
options,
options.transforms.includes("typescript"),
Boolean(options.keepUnusedImports),
helperManager,
);
importProcessor.preprocessTokens();
// We need to mark shadowed globals after processing imports so we know that the globals are,
// but before type-only import pruning, since that relies on shadowing information.
identifyShadowedGlobals(tokenProcessor, scopes, importProcessor.getGlobalNames());
if (options.transforms.includes("typescript") && !options.keepUnusedImports) {
importProcessor.pruneTypeOnlyImports();
}
} else if (options.transforms.includes("typescript") && !options.keepUnusedImports) {
// Shadowed global detection is needed for TS implicit elision of imported names.
identifyShadowedGlobals(tokenProcessor, scopes, getTSImportedNames(tokenProcessor));
}
return {tokenProcessor, scopes, nameManager, importProcessor, helperManager};
}
@@ -0,0 +1 @@
module.exports={A:{D:{"1":"0 1 2 3 4 5 iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","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","33":"dB eB fB gB hB"},L:{"1":"I"},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","33":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a 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 0C 1C"},M:{"1":"MC"},A:{"2":"K D E F A wC","33":"B"},F:{"1":"0 1 2 3 4 5 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F B C G N O P FD GD HD ID NC uC JD OC","33":"6 7 8 9 aB"},K:{"1":"H","2":"A B C NC uC OC"},E:{"1":"cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD","2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC ED"},G:{"1":"cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},I:{"1":"I","2":"TC J iD jD kD lD vC","33":"mD nD"}},B:6,C:"CSS ::backdrop pseudo-element",D:undefined};
@@ -0,0 +1 @@
{"name":"@formatjs/icu-messageformat-parser","version":"2.11.4","requiresBuild":false,"files":{"date-time-pattern-generator.js":{"checkedAt":1794532106145,"integrity":"sha512-1VP4l9sszoAv77WOSGIjhA+GsyzcgdATg5XuBVP0asqrXjoL3Z6+sMzSS4wanjxhuGbUT/sGYmH2jnhSo/2r9Q==","mode":420,"size":3153},"lib/date-time-pattern-generator.js":{"checkedAt":1794532106145,"integrity":"sha512-AaFJc0o0Hfgf8COglIWkCyN4DUHkIJ6ZPh1DtoN7xfeFOlK7KbfTRJFf2OjWNdCrGh1NSEbYmDp1ROfacUGp0w==","mode":420,"size":2942},"error.js":{"checkedAt":1794532106145,"integrity":"sha512-ygtjejxjFLb5E4ykfOkPKANyEnWzx61xcL652r9wNl2ORU5gSXpgDkSqi9fkMBT3he6lfEhMgIkm5xiei+DVyg==","mode":420,"size":4583},"lib/error.js":{"checkedAt":1794532106145,"integrity":"sha512-euA10awh95YIpJ5+j9avdxjGAsv0QVLh9rw5aLu5CTTDUJBa4VYSdieQpi2YH14XkHWQ1cn56besudwx7ZCArA==","mode":420,"size":4465},"index.js":{"checkedAt":1794532106146,"integrity":"sha512-9fp57MYskvj0JIsPvhTwJNKu4B97wAQTBUyVxQxAWEH4acWsaRtFJU7xJg5xTvpPj134jWeS+SWkJZTvKXdfFA==","mode":420,"size":2055},"lib/index.js":{"checkedAt":1794532106146,"integrity":"sha512-VbmBcGSsfk/zwvrNqt5fbgZqyizL3shPQbzGfuKBXEBVWRohFwQpWDflPhB2rclorvnVlqYhIzL+hB4gD9Aueg==","mode":420,"size":1743},"lib/manipulator.js":{"checkedAt":1794532106146,"integrity":"sha512-aceRw+T6xVufDOJGWCexHJVUwzmtjq6h/FrIVsGv1RTduOGBLLpIWXHWr1nAQ+7FCp3XvUpaSjY8AsvK++1STA==","mode":420,"size":4828},"manipulator.js":{"checkedAt":1794532106146,"integrity":"sha512-c4PQTu8v8BSysjH+rPPiaLTwpnRtFSEXLMYaGKA2+jDSMQ530x5CyuOwKfcwmQG6WHiAxLTBsPLD2Fn4ClygxQ==","mode":420,"size":5052},"lib/no-parser.js":{"checkedAt":1794532106146,"integrity":"sha512-V2Q6b0Atsxv7V7k8gZLsjMM9pI51dWcXagwZlz/Z9gZF4xABuAzCV2FjeK460kJeq/SsirvJrQKIVzJkWJGHxA==","mode":420,"size":279},"no-parser.js":{"checkedAt":1794532106146,"integrity":"sha512-J0vF6mDUU1RcemOSAcgduiLX8RFZPcwzJbtdYaSBdoomloHbc0MYneHDMZItAxCCA2i/AVnUsLii+HZgfdThsw==","mode":420,"size":615},"lib/parser.js":{"checkedAt":1794532106147,"integrity":"sha512-JIZnWbaTbmXc7J9grXXSCPag/FfGNAWa2tFutyIp846K5Dq7MpR8r9P5jY+3FIwrdhR2mw1kL9z97QviWaI6dg==","mode":420,"size":48781},"parser.js":{"checkedAt":1794532106147,"integrity":"sha512-3cqPA9iyd1K36ON8JTuuCZTM1ACx67vBOWbrAN7EBMatM8zEYsGDkvN6exwttBpSB/wUKAILWG29bgTuAnx3kQ==","mode":420,"size":49361},"lib/printer.js":{"checkedAt":1794532106147,"integrity":"sha512-sMLATTGGAQeEmUh3hTFVuN8uL1kV90vKv0/omlc+JTynMff9WvO3osSGO/Lc33ljgcX5/6Q1UQ8dlNd/2Ksrrw==","mode":420,"size":3728},"printer.js":{"checkedAt":1794532106147,"integrity":"sha512-InD5sQ1SSCbRwd8PVX2MG2FEq46hn1UFRA/vWoJ5ezG+83mlpWTa0QsTlGlj1FZYghA3fwGJc/Qi8tRdtoDfxg==","mode":420,"size":3873},"lib/regex.generated.js":{"checkedAt":1794532106147,"integrity":"sha512-+Guzj6X+Ilo/PcxVxnN3IFZ1KTZmQhsUIhRtG9tp23zIP/pbck1wFEXsbnIXqxw2mk5SbgwZ9iiFthEOjAo70Q==","mode":420,"size":186},"regex.generated.js":{"checkedAt":1794532106148,"integrity":"sha512-GRHm1ZmbDDLaTAlUUAlqPncDPWjwmNFLIAz5hO8mRCDJ3lADyw672Qqe9sLt4fSGmPVZhOZpJzEyDweHiIiumQ==","mode":420,"size":325},"lib/time-data.generated.js":{"checkedAt":1794532106148,"integrity":"sha512-2F1kXORCoegFcwz1R4vRhpSsx4PKcTRbzByXxlaPIMKnEHlGfh4BJ3u/a3C03u5XLrHeQRoIQUCnOHzp3acU0g==","mode":420,"size":16709},"time-data.generated.js":{"checkedAt":1794532106148,"integrity":"sha512-4E+2X7kZQCRuExnyzNQFS6eCydT4z+mnGJZWeZW2VoIbJgsW48/bRIPJ7YLdGn8wOKfsRzMus1y3gb8iFeGh8g==","mode":420,"size":16810},"lib/types.js":{"checkedAt":1794532106148,"integrity":"sha512-+t8DIbsfG8W7pbzlynCoxH64vs2watpUej2U2dkJ0ElnqyNcqB19j9IFw9oO8iNTG1oPWptYwxK9O51I6zn1vg==","mode":420,"size":2367},"types.js":{"checkedAt":1794532106148,"integrity":"sha512-bQNpfC5RZAdHEHBcFvAFFPpphlhQCXUm6qil26x9+DndyYQXW2MuvNDEymfl9OHr0key9WL1w3n10vHmqWBa5Q==","mode":420,"size":3000},"package.json":{"checkedAt":1794532106148,"integrity":"sha512-58nqivwUNKmXAqbmg+4xjz7DtojgOI+bqfMH37wLxCkxIF8JXv6KfTAmJxCdXf01gClMnP/vkVT6UF7OM4tsXw==","mode":420,"size":455},"LICENSE.md":{"checkedAt":1794532106149,"integrity":"sha512-ccP4x15RKluRGK98bepkv531ywxfbjzAORRpvAUP4HZUQ21686RCj2i8Yze08vlAxp0uyVnbIalgS4SBbLEVrA==","mode":420,"size":1065},"README.md":{"checkedAt":1794532106149,"integrity":"sha512-MIaSDj7/YdqMamuUsm6hqXAVWdeHuh7GVPbzGcT6LFc2sR+NyjZCfsRye1WnyFuOtaD5qnKY6MWzAO+cqHwczg==","mode":420,"size":813},"date-time-pattern-generator.d.ts":{"checkedAt":1794532106149,"integrity":"sha512-/qfXV1inDFlWrP5cp48QRqxXJIibDEDn4kncumgEfWV0OK35aUX42F0QP7l4SGeXvTBgl71UZA/KdpMeALEzOw==","mode":420,"size":442},"lib/date-time-pattern-generator.d.ts":{"checkedAt":1794532106149,"integrity":"sha512-/qfXV1inDFlWrP5cp48QRqxXJIibDEDn4kncumgEfWV0OK35aUX42F0QP7l4SGeXvTBgl71UZA/KdpMeALEzOw==","mode":420,"size":442},"error.d.ts":{"checkedAt":1794532106149,"integrity":"sha512-36NKhLk0L5fjfuDa6QrEiihDhSZOknSrSVqtgBKX455B3DNI0xCzR9EDkWZ8qSYTT6SSxp4zub05t8rwSIGq0w==","mode":420,"size":3124},"lib/error.d.ts":{"checkedAt":1794532106149,"integrity":"sha512-36NKhLk0L5fjfuDa6QrEiihDhSZOknSrSVqtgBKX455B3DNI0xCzR9EDkWZ8qSYTT6SSxp4zub05t8rwSIGq0w==","mode":420,"size":3124},"index.d.ts":{"checkedAt":1794532106149Line truncated
@@ -0,0 +1,18 @@
import {SliderState} from '@react-stately/slider';
interface SliderData {
id: string,
'aria-describedby'?: string,
'aria-details'?: string
}
export const sliderData = new WeakMap<SliderState, SliderData>();
export function getSliderThumbId(state: SliderState, index: number) {
let data = sliderData.get(state);
if (!data) {
throw new Error('Unknown slider state');
}
return `${data.id}-${index}`;
}
@@ -0,0 +1,88 @@
/**
* @file otf2ttf
* @author junmer
*/
/* eslint-env node */
var isOtf = require('is-otf');
var through = require('through2');
var otf2ttfobject = require('fonteditor-core').otf2ttfobject;
var TTFWriter = require('fonteditor-core').TTFWriter;
var b2ab = require('b3b').b2ab;
var ab2b = require('b3b').ab2b;
var replaceExt = require('replace-ext');
var _ = require('lodash');
var util = require('../lib/util');
/**
* otf2ttf fontmin plugin
*
* @param {Object} opts opts
* @return {Object} stream.Transform instance
* @api public
*/
module.exports = function (opts) {
opts = _.extend({clone: false, hinting: true}, opts);
// prepare subset
var subsetText = util.getSubsetText(opts);
opts.subset = util.string2unicodes(subsetText);
return through.ctor({
objectMode: true
}, function (file, enc, cb) {
// check null
if (file.isNull()) {
cb(null, file);
return;
}
// check stream
if (file.isStream()) {
cb(new Error('Streaming is not supported'));
return;
}
// check otf
if (!isOtf(file.contents)) {
cb(null, file);
return;
}
// clone
if (opts.clone) {
this.push(file.clone(false));
}
// replace ext
file.path = replaceExt(file.path, '.ttf');
// ttf info
var ttfBuffer;
var ttfObj;
// try otf2ttf
try {
ttfObj = otf2ttfobject(b2ab(file.contents), opts);
ttfBuffer = ab2b(new TTFWriter(opts).write(ttfObj));
}
catch (ex) {
cb(ex);
}
if (ttfBuffer) {
file.contents = ttfBuffer;
file.ttfObject = ttfObj;
cb(null, file);
}
});
};
@@ -0,0 +1,290 @@
declare namespace _exports {
export { NeostandardOptions };
}
declare function _exports(options?: import("./lib/main").NeostandardOptions): import("eslint").Linter.Config[];
declare namespace _exports {
let resolveIgnoresFromGitignore: typeof import("./lib/resolve-gitignore").resolveIgnoresFromGitignore;
let plugins: {
readonly '@stylistic': typeof import("@stylistic/eslint-plugin");
readonly 'import-x': typeof import("eslint-plugin-import-x");
readonly n: import("eslint").ESLint.Plugin & {
configs: import("eslint-plugin-n").Configs;
};
readonly promise: any;
readonly react: {
deprecatedRules: Partial<{
'boolean-prop-naming': import("eslint").Rule.RuleModule;
'button-has-type': import("eslint").Rule.RuleModule;
'checked-requires-onchange-or-readonly': import("eslint").Rule.RuleModule;
'default-props-match-prop-types': import("eslint").Rule.RuleModule;
'destructuring-assignment': import("eslint").Rule.RuleModule;
'display-name': import("eslint").Rule.RuleModule;
'forbid-component-props': import("eslint").Rule.RuleModule;
'forbid-dom-props': import("eslint").Rule.RuleModule;
'forbid-elements': import("eslint").Rule.RuleModule;
'forbid-foreign-prop-types': import("eslint").Rule.RuleModule;
'forbid-prop-types': import("eslint").Rule.RuleModule;
'forward-ref-uses-ref': import("eslint").Rule.RuleModule;
'function-component-definition': import("eslint").Rule.RuleModule;
'hook-use-state': import("eslint").Rule.RuleModule;
'iframe-missing-sandbox': import("eslint").Rule.RuleModule;
'jsx-boolean-value': import("eslint").Rule.RuleModule;
'jsx-child-element-spacing': import("eslint").Rule.RuleModule;
'jsx-closing-bracket-location': import("eslint").Rule.RuleModule;
'jsx-closing-tag-location': import("eslint").Rule.RuleModule;
'jsx-curly-spacing': import("eslint").Rule.RuleModule;
'jsx-curly-newline': import("eslint").Rule.RuleModule;
'jsx-equals-spacing': import("eslint").Rule.RuleModule;
'jsx-filename-extension': import("eslint").Rule.RuleModule;
'jsx-first-prop-new-line': import("eslint").Rule.RuleModule;
'jsx-handler-names': import("eslint").Rule.RuleModule;
'jsx-indent': import("eslint").Rule.RuleModule;
'jsx-indent-props': import("eslint").Rule.RuleModule;
'jsx-key': import("eslint").Rule.RuleModule;
'jsx-max-depth': import("eslint").Rule.RuleModule;
'jsx-max-props-per-line': import("eslint").Rule.RuleModule;
'jsx-newline': import("eslint").Rule.RuleModule;
'jsx-no-bind': import("eslint").Rule.RuleModule;
'jsx-no-comment-textnodes': import("eslint").Rule.RuleModule;
'jsx-no-constructed-context-values': import("eslint").Rule.RuleModule;
'jsx-no-duplicate-props': import("eslint").Rule.RuleModule;
'jsx-no-leaked-render': import("eslint").Rule.RuleModule;
'jsx-no-literals': import("eslint").Rule.RuleModule;
'jsx-no-script-url': import("eslint").Rule.RuleModule;
'jsx-no-target-blank': import("eslint").Rule.RuleModule;
'jsx-no-useless-fragment': import("eslint").Rule.RuleModule;
'jsx-one-expression-per-line': import("eslint").Rule.RuleModule;
'jsx-no-undef': import("eslint").Rule.RuleModule;
'jsx-curly-brace-presence': import("eslint").Rule.RuleModule;
'jsx-pascal-case': import("eslint").Rule.RuleModule;
'jsx-fragments': import("eslint").Rule.RuleModule;
'jsx-props-no-multi-spaces': import("eslint").Rule.RuleModule;
'jsx-props-no-spreading': import("eslint").Rule.RuleModule;
'jsx-props-no-spread-multi': import("eslint").Rule.RuleModule;
'jsx-sort-default-props': import("eslint").Rule.RuleModule;
'jsx-sort-props': import("eslint").Rule.RuleModule;
'jsx-space-before-closing': import("eslint").Rule.RuleModule;
'jsx-tag-spacing': import("eslint").Rule.RuleModule;
'jsx-uses-react': import("eslint").Rule.RuleModule;
'jsx-uses-vars': import("eslint").Rule.RuleModule;
'jsx-wrap-multilines': import("eslint").Rule.RuleModule;
'no-invalid-html-attribute': import("eslint").Rule.RuleModule;
'no-access-state-in-setstate': import("eslint").Rule.RuleModule;
'no-adjacent-inline-elements': import("eslint").Rule.RuleModule;
'no-array-index-key': import("eslint").Rule.RuleModule;
'no-arrow-function-lifecycle': import("eslint").Rule.RuleModule;
'no-children-prop': import("eslint").Rule.RuleModule;
'no-danger': import("eslint").Rule.RuleModule;
'no-danger-with-children': import("eslint").Rule.RuleModule;
'no-deprecated': import("eslint").Rule.RuleModule;
'no-did-mount-set-state': import("eslint").Rule.RuleModule;
'no-did-update-set-state': import("eslint").Rule.RuleModule;
'no-direct-mutation-state': import("eslint").Rule.RuleModule;
'no-find-dom-node': import("eslint").Rule.RuleModule;
'no-is-mounted': import("eslint").Rule.RuleModule;
'no-multi-comp': import("eslint").Rule.RuleModule;
'no-namespace': import("eslint").Rule.RuleModule;
'no-set-state': import("eslint").Rule.RuleModule;
'no-string-refs': import("eslint").Rule.RuleModule;
'no-redundant-should-component-update': import("eslint").Rule.RuleModule;
'no-render-return-value': import("eslint").Rule.RuleModule;
'no-this-in-sfc': import("eslint").Rule.RuleModule;
'no-typos': import("eslint").Rule.RuleModule;
'no-unescaped-entities': import("eslint").Rule.RuleModule;
'no-unknown-property': import("eslint").Rule.RuleModule;
'no-unsafe': import("eslint").Rule.RuleModule;
'no-unstable-nested-components': import("eslint").Rule.RuleModule;
'no-unused-class-component-methods': import("eslint").Rule.RuleModule;
'no-unused-prop-types': import("eslint").Rule.RuleModule;
'no-unused-state': import("eslint").Rule.RuleModule;
'no-object-type-as-default-prop': import("eslint").Rule.RuleModule;
'no-will-update-set-state': import("eslint").Rule.RuleModule;
'prefer-es6-class': import("eslint").Rule.RuleModule;
'prefer-exact-props': import("eslint").Rule.RuleModule;
'prefer-read-only-props': import("eslint").Rule.RuleModule;
'prefer-stateless-function': import("eslint").Rule.RuleModule;
'prop-types': import("eslint").Rule.RuleModule;
'react-in-jsx-scope': import("eslint").Rule.RuleModule;
'require-default-props': import("eslint").Rule.RuleModule;
'require-optimization': import("eslint").Rule.RuleModule;
'require-render-return': import("eslint").Rule.RuleModule;
'self-closing-comp': import("eslint").Rule.RuleModule;
'sort-comp': import("eslint").Rule.RuleModule;
'sort-default-props': import("eslint").Rule.RuleModule;
'sort-prop-types': import("eslint").Rule.RuleModule;
'state-in-constructor': import("eslint").Rule.RuleModule;
'static-property-placement': import("eslint").Rule.RuleModule;
'style-prop-object': import("eslint").Rule.RuleModule;
'void-dom-elements-no-children': import("eslint").Rule.RuleModule;
}>;
rules: {
'boolean-prop-naming': import("eslint").Rule.RuleModule;
'button-has-type': import("eslint").Rule.RuleModule;
'checked-requires-onchange-or-readonly': import("eslint").Rule.RuleModule;
'default-props-match-prop-types': import("eslint").Rule.RuleModule;
'destructuring-assignment': import("eslint").Rule.RuleModule;
'display-name': import("eslint").Rule.RuleModule;
'forbid-component-props': import("eslint").Rule.RuleModule;
'forbid-dom-props': import("eslint").Rule.RuleModule;
'forbid-elements': import("eslint").Rule.RuleModule;
'forbid-foreign-prop-types': import("eslint").Rule.RuleModule;
'forbid-prop-types': import("eslint").Rule.RuleModule;
'forward-ref-uses-ref': import("eslint").Rule.RuleModule;
'function-component-definition': import("eslint").Rule.RuleModule;
'hook-use-state': import("eslint").Rule.RuleModule;
'iframe-missing-sandbox': import("eslint").Rule.RuleModule;
'jsx-boolean-value': import("eslint").Rule.RuleModule;
'jsx-child-element-spacing': import("eslint").Rule.RuleModule;
'jsx-closing-bracket-location': import("eslint").Rule.RuleModule;
'jsx-closing-tag-location': import("eslint").Rule.RuleModule;
'jsx-curly-spacing': import("eslint").Rule.RuleModule;
'jsx-curly-newline': import("eslint").Rule.RuleModule;
'jsx-equals-spacing': import("eslint").Rule.RuleModule;
'jsx-filename-extension': import("eslint").Rule.RuleModule;
'jsx-first-prop-new-line': import("eslint").Rule.RuleModule;
'jsx-handler-names': import("eslint").Rule.RuleModule;
'jsx-indent': import("eslint").Rule.RuleModule;
'jsx-indent-props': import("eslint").Rule.RuleModule;
'jsx-key': import("eslint").Rule.RuleModule;
'jsx-max-depth': import("eslint").Rule.RuleModule;
'jsx-max-props-per-line': import("eslint").Rule.RuleModule;
'jsx-newline': import("eslint").Rule.RuleModule;
'jsx-no-bind': import("eslint").Rule.RuleModule;
'jsx-no-comment-textnodes': import("eslint").Rule.RuleModule;
'jsx-no-constructed-context-values': import("eslint").Rule.RuleModule;
'jsx-no-duplicate-props': import("eslint").Rule.RuleModule;
'jsx-no-leaked-render': import("eslint").Rule.RuleModule;
'jsx-no-literals': import("eslint").Rule.RuleModule;
'jsx-no-script-url': import("eslint").Rule.RuleModule;
'jsx-no-target-blank': import("eslint").Rule.RuleModule;
'jsx-no-useless-fragment': import("eslint").Rule.RuleModule;
'jsx-one-expression-per-line': import("eslint").Rule.RuleModule;
'jsx-no-undef': import("eslint").Rule.RuleModule;
'jsx-curly-brace-presence': import("eslint").Rule.RuleModule;
'jsx-pascal-case': import("eslint").Rule.RuleModule;
'jsx-fragments': import("eslint").Rule.RuleModule;
'jsx-props-no-multi-spaces': import("eslint").Rule.RuleModule;
'jsx-props-no-spreading': import("eslint").Rule.RuleModule;
'jsx-props-no-spread-multi': import("eslint").Rule.RuleModule;
'jsx-sort-default-props': import("eslint").Rule.RuleModule;
'jsx-sort-props': import("eslint").Rule.RuleModule;
'jsx-space-before-closing': import("eslint").Rule.RuleModule;
'jsx-tag-spacing': import("eslint").Rule.RuleModule;
'jsx-uses-react': import("eslint").Rule.RuleModule;
'jsx-uses-vars': import("eslint").Rule.RuleModule;
'jsx-wrap-multilines': import("eslint").Rule.RuleModule;
'no-invalid-html-attribute': import("eslint").Rule.RuleModule;
'no-access-state-in-setstate': import("eslint").Rule.RuleModule;
'no-adjacent-inline-elements': import("eslint").Rule.RuleModule;
'no-array-index-key': import("eslint").Rule.RuleModule;
'no-arrow-function-lifecycle': import("eslint").Rule.RuleModule;
'no-children-prop': import("eslint").Rule.RuleModule;
'no-danger': import("eslint").Rule.RuleModule;
'no-danger-with-children': import("eslint").Rule.RuleModule;
'no-deprecated': import("eslint").Rule.RuleModule;
'no-did-mount-set-state': import("eslint").Rule.RuleModule;
'no-did-update-set-state': import("eslint").Rule.RuleModule;
'no-direct-mutation-state': import("eslint").Rule.RuleModule;
'no-find-dom-node': import("eslint").Rule.RuleModule;
'no-is-mounted': import("eslint").Rule.RuleModule;
'no-multi-comp': import("eslint").Rule.RuleModule;
'no-namespace': import("eslint").Rule.RuleModule;
'no-set-state': import("eslint").Rule.RuleModule;
'no-string-refs': import("eslint").Rule.RuleModule;
'no-redundant-should-component-update': import("eslint").Rule.RuleModule;
'no-render-return-value': import("eslint").Rule.RuleModule;
'no-this-in-sfc': import("eslint").Rule.RuleModule;
'no-typos': import("eslint").Rule.RuleModule;
'no-unescaped-entities': import("eslint").Rule.RuleModule;
'no-unknown-property': import("eslint").Rule.RuleModule;
'no-unsafe': import("eslint").Rule.RuleModule;
'no-unstable-nested-components': import("eslint").Rule.RuleModule;
'no-unused-class-component-methods': import("eslint").Rule.RuleModule;
'no-unused-prop-types': import("eslint").Rule.RuleModule;
'no-unused-state': import("eslint").Rule.RuleModule;
'no-object-type-as-default-prop': import("eslint").Rule.RuleModule;
'no-will-update-set-state': import("eslint").Rule.RuleModule;
'prefer-es6-class': import("eslint").Rule.RuleModule;
'prefer-exact-props': import("eslint").Rule.RuleModule;
'prefer-read-only-props': import("eslint").Rule.RuleModule;
'prefer-stateless-function': import("eslint").Rule.RuleModule;
'prop-types': import("eslint").Rule.RuleModule;
'react-in-jsx-scope': import("eslint").Rule.RuleModule;
'require-default-props': import("eslint").Rule.RuleModule;
'require-optimization': import("eslint").Rule.RuleModule;
'require-render-return': import("eslint").Rule.RuleModule;
'self-closing-comp': import("eslint").Rule.RuleModule;
'sort-comp': import("eslint").Rule.RuleModule;
'sort-default-props': import("eslint").Rule.RuleModule;
'sort-prop-types': import("eslint").Rule.RuleModule;
'state-in-constructor': import("eslint").Rule.RuleModule;
'static-property-placement': import("eslint").Rule.RuleModule;
'style-prop-object': import("eslint").Rule.RuleModule;
'void-dom-elements-no-children': import("eslint").Rule.RuleModule;
};
configs: {
recommended: {
plugins: ["react"];
parserOptions: {
ecmaFeatures: {
jsx: boolean;
};
};
rules: {
"react/display-name": 2;
"react/jsx-key": 2;
"react/jsx-no-comment-textnodes": 2;
"react/jsx-no-duplicate-props": 2;
"react/jsx-no-target-blank": 2;
"react/jsx-no-undef": 2;
"react/jsx-uses-react": 2;
"react/jsx-uses-vars": 2;
"react/no-children-prop": 2;
"react/no-danger-with-children": 2;
"react/no-deprecated": 2;
"react/no-direct-mutation-state": 2;
"react/no-find-dom-node": 2;
"react/no-is-mounted": 2;
"react/no-render-return-value": 2;
"react/no-string-refs": 2;
"react/no-unescaped-entities": 2;
"react/no-unknown-property": 2;
"react/no-unsafe": 0;
"react/prop-types": 2;
"react/react-in-jsx-scope": 2;
"react/require-render-return": 2;
};
};
all: {
plugins: ["react"];
parserOptions: {
ecmaFeatures: {
jsx: boolean;
};
};
rules: Record<"boolean-prop-naming" | "button-has-type" | "checked-requires-onchange-or-readonly" | "default-props-match-prop-types" | "destructuring-assignment" | "display-name" | "forbid-component-props" | "forbid-dom-props" | "forbid-elements" | "forbid-foreign-prop-types" | "forbid-prop-types" | "prop-types" | "forward-ref-uses-ref" | "function-component-definition" | "hook-use-state" | "iframe-missing-sandbox" | "jsx-boolean-value" | "jsx-child-element-spacing" | "jsx-closing-bracket-location" | "jsx-closing-tag-location" | "jsx-curly-spacing" | "jsx-curly-newline" | "jsx-equals-spacing" | "jsx-filename-extension" | "jsx-first-prop-new-line" | "jsx-handler-names" | "jsx-indent" | "jsx-indent-props" | "jsx-key" | "jsx-max-depth" | "jsx-max-props-per-line" | "jsx-newline" | "jsx-no-bind" | "jsx-no-comment-textnodes" | "jsx-no-constructed-context-values" | "jsx-no-duplicate-props" | "jsx-no-leaked-render" | "jsx-no-literals" | "jsx-no-script-url" | "jsx-no-target-blank" | "jsx-no-useless-fragment" | "jsx-one-expression-per-line" | "jsx-no-undef" | "jsx-curly-brace-presence" | "jsx-pascal-case" | "jsx-fragments" | "jsx-props-no-multi-spaces" | "jsx-props-no-spreading" | "jsx-props-no-spread-multi" | "sort-default-props" | "jsx-sort-default-props" | "jsx-sort-props" | "jsx-tag-spacing" | "jsx-space-before-closing" | "jsx-uses-react" | "jsx-uses-vars" | "jsx-wrap-multilines" | "no-invalid-html-attribute" | "no-access-state-in-setstate" | "no-adjacent-inline-elements" | "no-array-index-key" | "no-arrow-function-lifecycle" | "no-children-prop" | "no-danger" | "no-danger-with-children" | "no-deprecated" | "no-direct-mutation-state" | "no-find-dom-node" | "no-is-mounted" | "no-multi-comp" | "no-namespace" | "no-set-state" | "no-string-refs" | "no-redundant-should-component-update" | "no-render-return-value" | "no-this-in-sfc" | "no-typos" | "no-unescaped-entities" | "no-unknown-property" | "no-unsafe" | "no-unstable-nested-components" | "no-unused-class-component-methods" | "no-unused-prop-types" | "no-unused-state" | "no-object-type-as-default-prop" | "prefer-es6-class" | "prefer-exact-props" | "prefer-read-only-props" | "prefer-stateless-function" | "react-in-jsx-scope" | "require-default-props" | "require-optimization" | "require-render-return" | "self-closing-comp" | "sort-comp" | "sort-prop-types" | "state-in-constructor" | "static-property-placement" | "style-prop-object" | "void-dom-elements-no-children" | "no-did-mount-set-state" | "no-did-update-set-state" | "no-will-update-set-state", 2 | "error">;
};
'jsx-runtime': {
plugins: ["react"];
parserOptions: {
ecmaFeatures: {
jsx: boolean;
};
jsxPragma: any;
};
rules: {
"react/react-in-jsx-scope": 0;
"react/jsx-uses-react": 0;
};
};
flat: Record<string, import("eslint-plugin-react").ReactFlatConfig>;
} & {
flat: Record<string, import("eslint-plugin-react").ReactFlatConfig>;
};
};
readonly 'typescript-eslint': typeof import("typescript-eslint");
};
}
export = _exports;
type NeostandardOptions = import("./lib/main").NeostandardOptions;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/shallowEqual.ts","../src/index-rsc.ts"],"sourcesContent":["function is(x: unknown, y: unknown) {\r\n if (x === y) {\r\n return x !== 0 || y !== 0 || 1 / x === 1 / y\r\n } else {\r\n return x !== x && y !== y\r\n }\r\n}\r\n\r\nexport default function shallowEqual(objA: any, objB: any) {\r\n if (is(objA, objB)) return true\r\n\r\n if (\r\n typeof objA !== 'object' ||\r\n objA === null ||\r\n typeof objB !== 'object' ||\r\n objB === null\r\n ) {\r\n return false\r\n }\r\n\r\n const keysA = Object.keys(objA)\r\n const keysB = Object.keys(objB)\r\n\r\n if (keysA.length !== keysB.length) return false\r\n\r\n for (let i = 0; i < keysA.length; i++) {\r\n if (\r\n !Object.prototype.hasOwnProperty.call(objB, keysA[i]) ||\r\n !is(objA[keysA[i]], objB[keysA[i]])\r\n ) {\r\n return false\r\n }\r\n }\r\n\r\n return true\r\n}\r\n","import type * as normal from './index'\nimport type * as rsc from './index-rsc'\n\n// checks to make sure we didn't forgot to replicate any exports\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst _check: typeof normal = {} as typeof rsc\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst _check2: typeof rsc = {} as typeof normal\n\n// -------------------------------------------------------------------------------------\n\nconst throwNotSupportedError = ((\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ...args: any[]\n): any => {\n throw new Error(\n 'This function is not supported in React Server Components. Please only use this export in a Client Component.',\n )\n}) as any\n\nexport {\n throwNotSupportedError as Provider,\n throwNotSupportedError as batch,\n throwNotSupportedError as connect,\n throwNotSupportedError as createDispatchHook,\n throwNotSupportedError as createSelectorHook,\n throwNotSupportedError as createStoreHook,\n throwNotSupportedError as useDispatch,\n throwNotSupportedError as useSelector,\n throwNotSupportedError as useStore,\n}\nexport const ReactReduxContext = {} as any\nexport { default as shallowEqual } from './utils/shallowEqual'\n"],"mappings":";AAAA,SAAS,GAAG,GAAY,GAAY;AAClC,MAAI,MAAM,GAAG;AACX,WAAO,MAAM,KAAK,MAAM,KAAK,IAAI,MAAM,IAAI;AAAA,EAC7C,OAAO;AACL,WAAO,MAAM,KAAK,MAAM;AAAA,EAC1B;AACF;AAEe,SAAR,aAA8B,MAAW,MAAW;AACzD,MAAI,GAAG,MAAM,IAAI,EAAG,QAAO;AAE3B,MACE,OAAO,SAAS,YAChB,SAAS,QACT,OAAO,SAAS,YAChB,SAAS,MACT;AACA,WAAO;AAAA,EACT;AAEA,QAAM,QAAQ,OAAO,KAAK,IAAI;AAC9B,QAAM,QAAQ,OAAO,KAAK,IAAI;AAE9B,MAAI,MAAM,WAAW,MAAM,OAAQ,QAAO;AAE1C,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QACE,CAAC,OAAO,UAAU,eAAe,KAAK,MAAM,MAAM,CAAC,CAAC,KACpD,CAAC,GAAG,KAAK,MAAM,CAAC,CAAC,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,GAClC;AACA,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;;;ACvBA,IAAM,yBAA0B,IAE3B,SACK;AACR,QAAM,IAAI;AAAA,IACR;AAAA,EACF;AACF;AAaO,IAAM,oBAAoB,CAAC;","names":[]}
@@ -0,0 +1,81 @@
import { expect, test } from "vitest";
import * as z from "zod/v4";
test("string to number pipe", () => {
const schema = z.string().transform(Number).pipe(z.number());
expect(schema.parse("1234")).toEqual(1234);
});
test("string to number pipe async", async () => {
const schema = z
.string()
.transform(async (val) => Number(val))
.pipe(z.number());
expect(await schema.parseAsync("1234")).toEqual(1234);
});
test("string with default fallback", () => {
const stringWithDefault = z
.pipe(
z.transform((v) => (v === "none" ? undefined : v)),
z.string()
)
.catch("default");
expect(stringWithDefault.parse("ok")).toBe("ok");
expect(stringWithDefault.parse(undefined)).toBe("default");
expect(stringWithDefault.parse("none")).toBe("default");
expect(stringWithDefault.parse(15)).toBe("default");
});
test("continue on non-fatal errors", () => {
const schema = z
.string()
.refine((c) => c === "1234", "A")
.transform((val) => Number(val))
.refine((c) => c === 1234, "B");
schema.parse("1234");
expect(schema.safeParse("4321")).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "custom",
"path": [],
"message": "A"
},
{
"code": "custom",
"path": [],
"message": "B"
}
]],
"success": false,
}
`);
});
test("break on fatal errors", () => {
const schema = z
.string()
.refine((c) => c === "1234", { message: "A", abort: true })
.transform((val) => Number(val))
.refine((c) => c === 1234, "B");
schema.parse("1234");
expect(schema.safeParse("4321")).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "custom",
"path": [],
"message": "A"
}
]],
"success": false,
}
`);
});
@@ -0,0 +1,70 @@
'use strict';
const assert = require('assert');
const StreamSearch = require('../lib/sbmh.js');
[
{
needle: '\r\n',
chunks: [
'foo',
' bar',
'\r',
'\n',
'baz, hello\r',
'\n world.',
'\r\n Node.JS rules!!\r\n\r\n',
],
expect: [
[false, 'foo'],
[false, ' bar'],
[ true, null],
[false, 'baz, hello'],
[ true, null],
[false, ' world.'],
[ true, null],
[ true, ' Node.JS rules!!'],
[ true, ''],
],
},
{
needle: '---foobarbaz',
chunks: [
'---foobarbaz',
'asdf',
'\r\n',
'---foobarba',
'---foobar',
'ba',
'\r\n---foobarbaz--\r\n',
],
expect: [
[ true, null],
[false, 'asdf'],
[false, '\r\n'],
[false, '---foobarba'],
[false, '---foobarba'],
[ true, '\r\n'],
[false, '--\r\n'],
],
},
].forEach((test, i) => {
console.log(`Running test #${i + 1}`);
const { needle, chunks, expect } = test;
const results = [];
const ss = new StreamSearch(Buffer.from(needle),
(isMatch, data, start, end) => {
if (data)
data = data.toString('latin1', start, end);
else
data = null;
results.push([isMatch, data]);
});
for (const chunk of chunks)
ss.push(Buffer.from(chunk));
assert.deepStrictEqual(results, expect);
});
@@ -0,0 +1,24 @@
# @heroui/theme
NextUI theme primitives, here you can find the TailwindCSS `plugin`, `colors`, `layout`, `spacing`, `typography` and some other utilities.
Please refer to the [documentation](https://heroui.com/theme) for more information.
## Installation
```sh
yarn add @heroui/theme
# or
npm i @heroui/theme
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/frontio-ai/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/frontio-ai/heroui/blob/master/LICENSE).
@@ -0,0 +1 @@
module.exports={C:{"52":0.00537,"77":0.03759,"88":0.00537,"106":0.01611,"115":0.38664,"121":0.00537,"125":0.01074,"127":0.00537,"128":0.03759,"129":0.01074,"132":0.01611,"133":0.00537,"134":0.02685,"135":0.02148,"136":0.01074,"137":0.00537,"138":0.00537,"139":0.02685,"140":0.11277,"141":0.04833,"142":0.06981,"143":1.93857,"144":1.54656,"145":0.01074,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 78 79 80 81 82 83 84 85 86 87 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 107 108 109 110 111 112 113 114 116 117 118 119 120 122 123 124 126 130 131 146 147 3.5 3.6"},D:{"39":0.04833,"40":0.04833,"41":0.04833,"42":0.04833,"43":0.04833,"44":0.04833,"45":0.04833,"46":0.04833,"47":0.04833,"48":0.04833,"49":0.0537,"50":0.04833,"51":0.04833,"52":0.04833,"53":0.04833,"54":0.04833,"55":0.04833,"56":0.04833,"57":0.04833,"58":0.04833,"59":0.04833,"60":0.04833,"79":0.04296,"81":0.00537,"83":0.00537,"85":0.02685,"86":0.00537,"87":0.02148,"88":0.67662,"90":0.01074,"91":0.00537,"92":0.00537,"98":0.0537,"101":0.01074,"102":0.00537,"103":0.02685,"104":0.04296,"105":0.00537,"106":0.04833,"107":0.00537,"108":0.04833,"109":0.95049,"110":0.00537,"111":0.00537,"112":0.01074,"113":0.02685,"114":0.09666,"115":0.09666,"116":0.15036,"117":0.01074,"118":0.01611,"119":0.03222,"120":0.28998,"121":0.04296,"122":0.31146,"123":0.01611,"124":0.04296,"125":1.74525,"126":0.03222,"127":0.01074,"128":0.05907,"129":0.16647,"130":0.04296,"131":0.38664,"132":0.04296,"133":0.07518,"134":0.07518,"135":0.08055,"136":0.1074,"137":0.16647,"138":0.30072,"139":2.07819,"140":6.69102,"141":16.92624,"142":0.22554,"143":0.00537,_:"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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 84 89 93 94 95 96 97 99 100 144 145"},F:{"79":0.00537,"84":0.00537,"86":0.00537,"87":0.00537,"91":0.01074,"92":0.03759,"95":0.04833,"102":0.00537,"114":0.00537,"119":0.00537,"120":0.51015,"121":0.27387,"122":3.1146,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 85 88 89 90 93 94 96 97 98 99 100 101 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:{"18":0.01074,"92":0.01074,"108":0.00537,"109":0.04296,"114":0.00537,"120":0.01074,"122":0.00537,"123":0.00537,"124":0.00537,"126":0.00537,"127":0.00537,"131":0.04296,"132":0.00537,"133":0.00537,"134":0.02685,"135":0.00537,"136":0.01074,"137":0.01611,"138":0.0537,"139":0.04296,"140":0.8055,"141":3.88251,"142":0.00537,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 110 111 112 113 115 116 117 118 119 121 125 128 129 130"},E:{"10":0.00537,"11":0.01074,"14":0.00537,_:"0 4 5 6 7 8 9 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 11.1 12.1 15.1 15.2-15.3 16.0 26.2","10.1":0.01074,"13.1":0.01611,"14.1":0.01074,"15.4":0.01611,"15.5":0.01074,"15.6":0.0537,"16.1":0.00537,"16.2":0.00537,"16.3":0.01074,"16.4":0.01611,"16.5":0.01074,"16.6":0.07518,"17.0":0.00537,"17.1":0.03759,"17.2":0.01074,"17.3":0.02685,"17.4":0.03759,"17.5":0.03222,"17.6":0.18258,"18.0":0.01611,"18.1":0.04833,"18.2":0.01611,"18.3":0.04833,"18.4":0.02148,"18.5-18.6":0.16647,"26.0":0.46182,"26.1":0.01074},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00102,"5.0-5.1":0,"6.0-6.1":0.00408,"7.0-7.1":0.00306,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00919,"10.0-10.2":0.00102,"10.3":0.01736,"11.0-11.2":0.25733,"11.3-11.4":0.00613,"12.0-12.1":0.00204,"12.2-12.5":0.05004,"13.0-13.1":0,"13.2":0.00511,"13.3":0.00204,"13.4-13.7":0.00817,"14.0-14.4":0.01736,"14.5-14.8":0.01838,"15.0-15.1":0.01736,"15.2-15.3":0.01327,"15.4":0.01532,"15.5":0.01736,"15.6-15.8":0.22669,"16.0":0.03063,"16.1":0.05718,"16.2":0.02961,"16.3":0.0531,"16.4":0.01327,"16.5":0.02349,"16.6-16.7":0.30328,"17.0":0.02144,"17.1":0.03268,"17.2":0.02349,"17.3":0.03472,"17.4":0.06127,"17.5":0.10518,"17.6-17.7":0.2655,"18.0":0.06025,"18.1":0.12458,"18.2":0.06739,"18.3":0.21648,"18.4":0.1113,"18.5-18.6":5.67547,"26.0":0.70152,"26.1":0.02553},P:{"4":0.04155,"22":0.04155,"23":0.01039,"24":0.03116,"25":0.02077,"26":0.06232,"27":0.05194,"28":2.11904,"29":0.15581,_:"20 21 6.2-6.4 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.01039,"7.2-7.4":0.05194,"8.2":0.01039},I:{"0":0.01387,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.45384,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.01611,_:"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.4029},Q:{"14.9":0.00463},O:{"0":0.05094},H:{"0":0},L:{"0":33.28724}};
@@ -0,0 +1 @@
{"version":3,"file":"resolveServiceDeactivations.spec.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveServiceDeactivations.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var polyfill = getPolyfill();
var shim = require('./shim');
var bound = callBind(polyfill, Object);
define(bound, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = bound;
@@ -0,0 +1,14 @@
"use client";
// src/navbar-context.ts
import { createContext } from "@heroui/react-utils";
var [NavbarProvider, useNavbarContext] = createContext({
name: "NavbarContext",
strict: true,
errorMessage: "useNavbarContext: `context` is undefined. Seems you forgot to wrap component within <Navbar />"
});
export {
NavbarProvider,
useNavbarContext
};
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=LeafBindingNode.js.map
@@ -0,0 +1,8 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { ScopeManager } from '../ScopeManager';
import type { Scope } from './Scope';
import { ScopeBase } from './ScopeBase';
import { ScopeType } from './ScopeType';
export declare class ClassScope extends ScopeBase<ScopeType.class, TSESTree.ClassDeclaration | TSESTree.ClassExpression, Scope> {
constructor(scopeManager: ScopeManager, upperScope: ClassScope['upper'], block: ClassScope['block']);
}
@@ -0,0 +1,57 @@
/**
* A list of all valid MotionProps.
*
* @privateRemarks
* This doesn't throw if a `MotionProp` name is missing - it should.
*/
const validMotionProps = new Set([
"animate",
"exit",
"variants",
"initial",
"style",
"values",
"variants",
"transition",
"transformTemplate",
"custom",
"inherit",
"onBeforeLayoutMeasure",
"onAnimationStart",
"onAnimationComplete",
"onUpdate",
"onDragStart",
"onDrag",
"onDragEnd",
"onMeasureDragConstraints",
"onDirectionLock",
"onDragTransitionEnd",
"_dragX",
"_dragY",
"onHoverStart",
"onHoverEnd",
"onViewportEnter",
"onViewportLeave",
"globalTapTarget",
"ignoreStrict",
"viewport",
]);
/**
* Check whether a prop name is a valid `MotionProp` key.
*
* @param key - Name of the property to check
* @returns `true` is key is a valid `MotionProp`.
*
* @public
*/
function isValidMotionProp(key) {
return (key.startsWith("while") ||
(key.startsWith("drag") && key !== "draggable") ||
key.startsWith("layout") ||
key.startsWith("onTap") ||
key.startsWith("onPan") ||
key.startsWith("onLayout") ||
validMotionProps.has(key));
}
export { isValidMotionProp };
@@ -0,0 +1,24 @@
'use strict';
var $TypeError = require('es-errors/type');
var SLOT = require('internal-slot');
// https://262.ecma-international.org/16.0/#sec-generatorvalidate
module.exports = function GeneratorValidate(generator, generatorBrand) {
SLOT.assert(generator, '[[GeneratorState]]'); // step 1
SLOT.assert(generator, '[[GeneratorBrand]]'); // step 2
var brand = SLOT.get(generator, '[[GeneratorBrand]]');
if (brand !== generatorBrand) {
throw new $TypeError('Assertion failed: generator brand is unexpected: ' + brand);
}
SLOT.assert(generator, '[[GeneratorContext]]'); // step 4
var state = SLOT.get(generator, '[[GeneratorState]]'); // step 5
if (state === 'EXECUTING') {
throw new $TypeError('generator is executing');
}
return state; // step 7
};
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,sCAIC;AAWD,4BAEC;AAQD,oDAWC;AASD,0CAOC;AA0BD,8BAKC;AAhHD,2CAAyD;AAEzD,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AAEf,2CAMoB;AAEpB,yCAKoB;AAJhB,wGAAA,UAAU,OAAA;AACV,0BAA0B;AAC1B,4GAAA,UAAU,OAAkB;AAMhC,iBAAiB;AAEjB;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,IAAY,EAAE,OAAiB;IACzD,MAAM,OAAO,GAAG,IAAI,uBAAU,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnD,IAAI,kBAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC;AACxB,CAAC;AACD;;;;;;;;;GASG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAiB;IACpD,OAAO,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC;AACjD,CAAC;AACD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAChC,QAA2D,EAC3D,OAAiB,EACjB,eAA4C;IAE5C,MAAM,OAAO,GAAe,IAAI,uBAAU,CACtC,CAAC,KAAmB,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,EACtD,OAAO,EACP,eAAe,CAClB,CAAC;IACF,OAAO,IAAI,kBAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AACD;;;;;;;GAOG;AACH,SAAgB,eAAe,CAC3B,QAAyD,EACzD,OAAiB,EACjB,eAA4C;IAE5C,MAAM,OAAO,GAAG,IAAI,uBAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;IACnE,OAAO,IAAI,kBAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED,+CAIwB;AAHpB,0HAAA,OAAO,OAAa;AAEpB,yGAAA,SAAS,OAAA;AAGb;;;GAGG;AACH,8DAA8C;AAE9C,uCAA8C;AAE9C,qCAA8C;AAArC,mGAAA,OAAO,OAAA;AAEhB,MAAM,uBAAuB,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAElD;;;;;GAKG;AACH,SAAgB,SAAS,CACrB,IAAY,EACZ,UAAmB,uBAAuB;IAE1C,OAAO,IAAA,kBAAO,EAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,qDAAqC"}
@@ -0,0 +1,96 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
var _arrayPrototype = _interopRequireDefault(require("array.prototype.flatmap"));
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview <audio> and <video> elements must have a <track> for captions.
* @author Ethan Cohen
*
*/
// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
var errorMessage = 'Media elements such as <audio> and <video> must have a <track> for captions.';
var MEDIA_TYPES = ['audio', 'video'];
var schema = (0, _schemas.generateObjSchema)({
audio: _schemas.arraySchema,
video: _schemas.arraySchema,
track: _schemas.arraySchema
});
var isMediaType = function isMediaType(context, type) {
var options = context.options[0] || {};
return MEDIA_TYPES.concat((0, _arrayPrototype["default"])(MEDIA_TYPES, function (mediaType) {
return options[mediaType];
})).some(function (typeToCheck) {
return typeToCheck === type;
});
};
var isTrackType = function isTrackType(context, type) {
var options = context.options[0] || {};
return ['track'].concat(options.track || []).some(function (typeToCheck) {
return typeToCheck === type;
});
};
var _default = exports["default"] = {
meta: {
docs: {
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/media-has-caption.md',
description: 'Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions.'
},
schema: [schema]
},
create: function create(context) {
var elementType = (0, _getElementType["default"])(context);
return {
JSXElement: function JSXElement(node) {
var element = node.openingElement;
var type = elementType(element);
if (!isMediaType(context, type)) {
return;
}
var mutedProp = (0, _jsxAstUtils.getProp)(element.attributes, 'muted');
var mutedPropVal = (0, _jsxAstUtils.getLiteralPropValue)(mutedProp);
if (mutedPropVal === true) {
return;
}
// $FlowFixMe https://github.com/facebook/flow/issues/1414
var trackChildren = node.children.filter(function (child) {
if (child.type !== 'JSXElement') {
return false;
}
// $FlowFixMe https://github.com/facebook/flow/issues/1414
return isTrackType(context, elementType(child.openingElement));
});
if (trackChildren.length === 0) {
context.report({
node: element,
message: errorMessage
});
return;
}
var hasCaption = trackChildren.some(function (track) {
var kindProp = (0, _jsxAstUtils.getProp)(track.openingElement.attributes, 'kind');
var kindPropValue = (0, _jsxAstUtils.getLiteralPropValue)(kindProp) || '';
return kindPropValue.toLowerCase() === 'captions';
});
if (!hasCaption) {
context.report({
node: element,
message: errorMessage
});
}
}
};
}
};
module.exports = exports.default;
@@ -0,0 +1,87 @@
import { PathCache, TrieNode } from './utils';
export interface ITSCAliasConfig {
replacers?: ReplacerOptions;
resolveFullPaths?: boolean;
verbose?: boolean;
fileExtensions?: Partial<FileExtensions>;
}
export type PathLike = {
[key: string]: string[];
};
export type StringReplacer = (importStatement: string) => string;
export interface FileExtensions {
inputGlob: string;
outputCheck: string[];
}
export interface ITSConfig {
baseUrl?: string;
outDir?: string;
declarationDir?: string;
paths?: PathLike;
replacers?: ReplacerOptions;
resolveFullPaths?: boolean;
verbose?: boolean;
fileExtensions?: Partial<FileExtensions>;
}
export interface IProjectConfig {
configFile: string;
baseUrl: string;
outDir: string;
configDir: string;
outPath: string;
confDirParentFolderName: string;
hasExtraModule: boolean;
configDirInOutPath: string;
relConfDirPathInOutPath: string;
pathCache: PathCache;
inputGlob: string;
}
export interface IConfig extends IProjectConfig {
output: IOutput;
aliasTrie: TrieNode<Alias>;
replacers: AliasReplacer[];
}
export interface ReplaceTscAliasPathsOptions {
configFile?: string;
outDir?: string;
declarationDir?: string;
watch?: boolean;
verbose?: boolean;
debug?: boolean;
resolveFullPaths?: boolean;
resolveFullExtension?: '.js' | '.mjs' | '.cjs';
replacers?: string[];
output?: IOutput;
aliasTrie?: TrieNode<Alias>;
fileExtensions?: Partial<FileExtensions>;
}
export interface Alias {
shouldPrefixMatchWildly: boolean;
prefix: string;
paths: AliasPath[];
}
export interface AliasPath {
basePath: string;
path: string;
isExtra: boolean;
}
export interface AliasReplacerArguments {
orig: string;
file: string;
config: IConfig;
}
export type AliasReplacer = (args: AliasReplacerArguments) => string;
export interface ReplacerOptions {
[key: string]: {
enabled: boolean;
file?: string;
};
}
export interface IOutput {
verbose: boolean;
debug: (message: string, obj?: unknown) => void;
info(message: string): void;
error(message: string, exitProcess?: boolean): void;
clear(): void;
assert(claim: unknown, message: string): void;
}
@@ -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 `Object.defineProperties` method.",
category: "ES5",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-object-defineproperties.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({
Object: {
defineProperties: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,50 @@
var seed = Math.random();
var n = 'rc'+ seed;
var N = 'RC'+ seed;
var assert = require('assert')
// Basic usage
process.env[n+'_someOpt__a'] = 42
process.env[n+'_someOpt__x__'] = 99
process.env[n+'_someOpt__a__b'] = 186
process.env[n+'_someOpt__a__b__c'] = 243
process.env[n+'_someOpt__x__y'] = 1862
process.env[n+'_someOpt__z'] = 186577
// Should ignore empty strings from orphaned '__'
process.env[n+'_someOpt__z__x__'] = 18629
process.env[n+'_someOpt__w__w__'] = 18629
// Leading '__' should ignore everything up to 'z'
process.env[n+'___z__i__'] = 9999
// should ignore case for config name section.
process.env[N+'_test_upperCase'] = 187
function testPrefix(prefix) {
var config = require('../')(prefix, {
option: true
})
console.log('\n\n------ nested-env-vars ------\n',{prefix: prefix}, '\n', config);
assert.equal(config.option, true)
assert.equal(config.someOpt.a, 42)
assert.equal(config.someOpt.x, 99)
// Should not override `a` once it's been set
assert.equal(config.someOpt.a/*.b*/, 42)
// Should not override `x` once it's been set
assert.equal(config.someOpt.x/*.y*/, 99)
assert.equal(config.someOpt.z, 186577)
// Should not override `z` once it's been set
assert.equal(config.someOpt.z/*.x*/, 186577)
assert.equal(config.someOpt.w.w, 18629)
assert.equal(config.z.i, 9999)
assert.equal(config.test_upperCase, 187)
}
testPrefix(n);
testPrefix(N);
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","2":"K D E F wC","289":"A"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB 0C 1C","194":"FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB","1025":"xB yB zB 0B 1B"},D:{"1":"0 1 2 3 4 5 hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","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"},E:{"2050":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"0 1 2 3 4 5 9 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 F B C G N O P aB FD GD HD ID NC uC JD OC"},G:{"1":"XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD","516":"QD RD SD TD UD VD WD"},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:{"1":"B","289":"A"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","194":"1D"}},B:2,C:"CSS touch-action property",D:true};
@@ -0,0 +1,43 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("eslint-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `String.fromCodePoint` method.",
category: "ES2015",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-string-fromcodepoint.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"() {
const tracker = new ReferenceTracker(context.getScope())
for (const { node, path } of tracker.iterateGlobalReferences({
String: {
fromCodePoint: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isBinding;
var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers.js");
function isBinding(node, parent, grandparent) {
if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
return false;
}
const keys = _getBindingIdentifiers.default.keys[parent.type];
if (keys) {
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const val = parent[key];
if (Array.isArray(val)) {
if (val.includes(node)) return true;
} else {
if (val === node) return true;
}
}
}
return false;
}
//# sourceMappingURL=isBinding.js.map
@@ -0,0 +1,2 @@
export { HydratedRouter, RouterProvider, RouterProviderProps } from 'react-router/dom';
export * from 'react-router';
@@ -0,0 +1,54 @@
import {filterDOMProps as $ieN2F$filterDOMProps, mergeProps as $ieN2F$mergeProps} from "@react-aria/utils";
import {useSelectableList as $ieN2F$useSelectableList} from "@react-aria/selection";
/*
* 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.
*/
const $d5336fe17ce95402$export$6f49b4016bfc8d56 = new WeakMap();
function $d5336fe17ce95402$export$38eaa17faae8f579(props, state, ref) {
let { shouldFocusWrap: shouldFocusWrap = true, onKeyDown: onKeyDown, onKeyUp: onKeyUp, ...otherProps } = props;
if (!props['aria-label'] && !props['aria-labelledby']) console.warn('An aria-label or aria-labelledby prop is required for accessibility.');
let domProps = (0, $ieN2F$filterDOMProps)(props, {
labelable: true
});
let { listProps: listProps } = (0, $ieN2F$useSelectableList)({
...otherProps,
ref: ref,
selectionManager: state.selectionManager,
collection: state.collection,
disabledKeys: state.disabledKeys,
shouldFocusWrap: shouldFocusWrap,
linkBehavior: 'override'
});
$d5336fe17ce95402$export$6f49b4016bfc8d56.set(state, {
onClose: props.onClose,
onAction: props.onAction
});
return {
menuProps: (0, $ieN2F$mergeProps)(domProps, {
onKeyDown: onKeyDown,
onKeyUp: onKeyUp
}, {
role: 'menu',
...listProps,
onKeyDown: (e)=>{
var _listProps_onKeyDown;
// don't clear the menu selected keys if the user is presses escape since escape closes the menu
if (e.key !== 'Escape') (_listProps_onKeyDown = listProps.onKeyDown) === null || _listProps_onKeyDown === void 0 ? void 0 : _listProps_onKeyDown.call(listProps, e);
}
})
};
}
export {$d5336fe17ce95402$export$6f49b4016bfc8d56 as menuData, $d5336fe17ce95402$export$38eaa17faae8f579 as useMenu};
//# sourceMappingURL=useMenu.module.js.map
@@ -0,0 +1,13 @@
import {
table
} from "../chunk-C3HKPBNA.mjs";
import "../chunk-CWYZ2GEH.mjs";
import "../chunk-GQT3YUX3.mjs";
import "../chunk-46U6G7UJ.mjs";
import "../chunk-DGTYPKBN.mjs";
import "../chunk-UWE6H66T.mjs";
import "../chunk-GIXI35A3.mjs";
import "../chunk-GH5E4FQB.mjs";
export {
table
};
@@ -0,0 +1 @@
{"name":"intersection-observer","version":"0.12.2","requiresBuild":false,"files":{".eslintrc":{"checkedAt":1794532111111,"integrity":"sha512-BXOzA60Eep/spA1KPdvbtRQ/fX2VJfX0PTuIlWubh44nmQYHB2tycyzeT4y0c74P7stpbVjX6Dq7M2wkxtnDYQ==","mode":420,"size":1105},"intersection-observer-test.html":{"checkedAt":1794532111112,"integrity":"sha512-p4vgNIsgOu/tXDpf+ON0isW7Oay5A8GyuDHVgaMUoCUi6S4jRi005e5WvVpd7aTjFQiDOB07ZRrvpAXziMhpHA==","mode":420,"size":1992},"intersection-observer-test.js":{"checkedAt":1794532111112,"integrity":"sha512-IBx4i0rhiGc3M9nLyA0tqzZtTdg9OyTZiTu2orj7Nzi3iHo3EvMCcDpZolOcjXkw58bWLb+88fJKgcUGOvX1Hw==","mode":420,"size":119137},"intersection-observer.js":{"checkedAt":1794532111112,"integrity":"sha512-DL4cbjc4mC1sTD3cKmECH1Kpydznrr9acZJf45Plj/OcSKRswnYtb9UJcoP9StcIBihIjhRKdAI9zNVS+3+9Mw==","mode":420,"size":30559},"package.json":{"checkedAt":1794532111112,"integrity":"sha512-nv62iHHmXvAWT7aAwnbl3P2aqSByfNh1BHNX6L3arF+AWG/MWVTgE2adOvZxgD80Xvbg0w3hyzjHKQs76KHZBw==","mode":420,"size":575},"README.md":{"checkedAt":1794532111113,"integrity":"sha512-VqPgOToLnGHbH+bB7tvvA1RQ1+83un73q8uUcxroumJ4zEFlC0SICUK/X0L3d6CmsVQTejKhFOdOuTp0bu44fw==","mode":420,"size":8288}}}
@@ -0,0 +1,12 @@
import * as _heroui_system_rsc from '@heroui/system-rsc';
import { UseDividerProps } from './use-divider.mjs';
import '@heroui/theme';
import 'react';
import './use-separator.mjs';
import '@react-types/shared';
interface DividerProps extends Omit<UseDividerProps, "children"> {
}
declare const Divider: _heroui_system_rsc.InternalForwardRefRenderFunction<"div", DividerProps, never>;
export { type DividerProps, Divider as default };
@@ -0,0 +1,15 @@
/**
* Return the content of a reference without definition as plain text.
*
* @param {State} state
* Info passed around.
* @param {Extract<Nodes, Reference>} node
* Reference node (image, link).
* @returns {Array<ElementContent>}
* hast content.
*/
export function revert(state: State, node: Extract<Nodes, Reference>): Array<ElementContent>;
export type ElementContent = import("hast").ElementContent;
export type Nodes = import("mdast").Nodes;
export type Reference = import("mdast").Reference;
export type State = import("./state.js").State;
@@ -0,0 +1,253 @@
# serve-static
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![CI][github-actions-ci-image]][github-actions-ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
## Install
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh
$ npm install serve-static
```
## API
```js
var serveStatic = require('serve-static')
```
### serveStatic(root, options)
Create a new middleware function to serve files from within a given root
directory. The file to serve will be determined by combining `req.url`
with the provided root directory. When a file is not found, instead of
sending a 404 response, this module will instead call `next()` to move on
to the next middleware, allowing for stacking and fall-backs.
#### Options
##### acceptRanges
Enable or disable accepting ranged requests, defaults to true.
Disabling this will not send `Accept-Ranges` and ignore the contents
of the `Range` request header.
##### cacheControl
Enable or disable setting `Cache-Control` response header, defaults to
true. Disabling this will ignore the `immutable` and `maxAge` options.
##### dotfiles
Set how "dotfiles" are treated when encountered. A dotfile is a file
or directory that begins with a dot ("."). Note this check is done on
the path itself without checking if the path actually exists on the
disk. If `root` is specified, only the dotfiles above the root are
checked (i.e. the root itself can be within a dotfile when set
to "deny").
- `'allow'` No special treatment for dotfiles.
- `'deny'` Deny a request for a dotfile and 403/`next()`.
- `'ignore'` Pretend like the dotfile does not exist and 404/`next()`.
The default value is `'ignore'`.
##### etag
Enable or disable etag generation, defaults to true.
##### extensions
Set file extension fallbacks. When set, if a file is not found, the given
extensions will be added to the file name and search for. The first that
exists will be served. Example: `['html', 'htm']`.
The default value is `false`.
##### fallthrough
Set the middleware to have client errors fall-through as just unhandled
requests, otherwise forward a client error. The difference is that client
errors like a bad request or a request to a non-existent file will cause
this middleware to simply `next()` to your next middleware when this value
is `true`. When this value is `false`, these errors (even 404s), will invoke
`next(err)`.
Typically `true` is desired such that multiple physical directories can be
mapped to the same web address or for routes to fill in non-existent files.
The value `false` can be used if this middleware is mounted at a path that
is designed to be strictly a single file system directory, which allows for
short-circuiting 404s for less overhead. This middleware will also reply to
all methods.
The default value is `true`.
##### immutable
Enable or disable the `immutable` directive in the `Cache-Control` response
header, defaults to `false`. If set to `true`, the `maxAge` option should
also be specified to enable caching. The `immutable` directive will prevent
supported clients from making conditional requests during the life of the
`maxAge` option to check if the file has changed.
##### index
By default this module will send "index.html" files in response to a request
on a directory. To disable this set `false` or to supply a new index pass a
string or an array in preferred order.
##### lastModified
Enable or disable `Last-Modified` header, defaults to true. Uses the file
system's last modified value.
##### maxAge
Provide a max-age in milliseconds for http caching, defaults to 0. This
can also be a string accepted by the [ms](https://www.npmjs.org/package/ms#readme)
module.
##### redirect
Redirect to trailing "/" when the pathname is a dir. Defaults to `true`.
##### setHeaders
Function to set custom headers on response. Alterations to the headers need to
occur synchronously. The function is called as `fn(res, path, stat)`, where
the arguments are:
- `res` the response object
- `path` the file path that is being sent
- `stat` the stat object of the file that is being sent
## Examples
### Serve files with vanilla node.js http server
```js
var finalhandler = require('finalhandler')
var http = require('http')
var serveStatic = require('serve-static')
// Serve up public/ftp folder
var serve = serveStatic('public/ftp', { index: ['index.html', 'index.htm'] })
// Create server
var server = http.createServer(function onRequest (req, res) {
serve(req, res, finalhandler(req, res))
})
// Listen
server.listen(3000)
```
### Serve all files as downloads
```js
var contentDisposition = require('content-disposition')
var finalhandler = require('finalhandler')
var http = require('http')
var serveStatic = require('serve-static')
// Serve up public/ftp folder
var serve = serveStatic('public/ftp', {
index: false,
setHeaders: setHeaders
})
// Set header to force download
function setHeaders (res, path) {
res.setHeader('Content-Disposition', contentDisposition(path))
}
// Create server
var server = http.createServer(function onRequest (req, res) {
serve(req, res, finalhandler(req, res))
})
// Listen
server.listen(3000)
```
### Serving using express
#### Simple
This is a simple example of using Express.
```js
var express = require('express')
var serveStatic = require('serve-static')
var app = express()
app.use(serveStatic('public/ftp', { index: ['default.html', 'default.htm'] }))
app.listen(3000)
```
#### Multiple roots
This example shows a simple way to search through multiple directories.
Files are searched for in `public-optimized/` first, then `public/` second
as a fallback.
```js
var express = require('express')
var path = require('path')
var serveStatic = require('serve-static')
var app = express()
app.use(serveStatic(path.join(__dirname, 'public-optimized')))
app.use(serveStatic(path.join(__dirname, 'public')))
app.listen(3000)
```
#### Different settings for paths
This example shows how to set a different max age depending on the served
file. In this example, HTML files are not cached, while everything else
is for 1 day.
```js
var express = require('express')
var path = require('path')
var serveStatic = require('serve-static')
var app = express()
app.use(serveStatic(path.join(__dirname, 'public'), {
maxAge: '1d',
setHeaders: setCustomCacheControl
}))
app.listen(3000)
function setCustomCacheControl (res, file) {
if (path.extname(file) === '.html') {
// Custom Cache-Control for HTML files
res.setHeader('Cache-Control', 'public, max-age=0')
}
}
```
## License
[MIT](LICENSE)
[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/serve-static/master
[coveralls-url]: https://coveralls.io/r/expressjs/serve-static?branch=master
[github-actions-ci-image]: https://badgen.net/github/checks/expressjs/serve-static/master?label=linux
[github-actions-ci-url]: https://github.com/expressjs/serve-static/actions/workflows/ci.yml
[node-image]: https://badgen.net/npm/node/serve-static
[node-url]: https://nodejs.org/en/download/
[npm-downloads-image]: https://badgen.net/npm/dm/serve-static
[npm-url]: https://npmjs.org/package/serve-static
[npm-version-image]: https://badgen.net/npm/v/serve-static
@@ -0,0 +1,31 @@
import {getChildNodes as $c5a24bc478652b5f$export$1005530eda016c13} from "./getChildNodes.mjs";
/*
* 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.
*/
const $453cc9f0df89c0a5$var$cache = new WeakMap();
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
let count = $453cc9f0df89c0a5$var$cache.get(collection);
if (count != null) return count;
// TS isn't smart enough to know we've ensured count is a number, so use a new variable
let counter = 0;
let countItems = (items)=>{
for (let item of items)if (item.type === 'section') countItems((0, $c5a24bc478652b5f$export$1005530eda016c13)(item, collection));
else counter++;
};
countItems(collection);
$453cc9f0df89c0a5$var$cache.set(collection, counter);
return counter;
}
export {$453cc9f0df89c0a5$export$77d5aafae4e095b2 as getItemCount};
//# sourceMappingURL=getItemCount.module.js.map
@@ -0,0 +1,27 @@
import { Context } from "react";
import { Validation, ValidationErrors, ValidationResult } from "@react-types/shared";
export const VALID_VALIDITY_STATE: ValidityState;
export const DEFAULT_VALIDATION_RESULT: ValidationResult;
export const FormValidationContext: Context<ValidationErrors>;
export const privateValidationStateProp: string;
interface FormValidationProps<T> extends Validation<T> {
builtinValidation?: ValidationResult;
name?: string | string[];
value: T | null;
}
export interface FormValidationState {
/** Realtime validation results, updated as the user edits the value. */
realtimeValidation: ValidationResult;
/** Currently displayed validation results, updated when the user commits their changes. */
displayValidation: ValidationResult;
/** Updates the current validation result. Not displayed to the user until `commitValidation` is called. */
updateValidation(result: ValidationResult): void;
/** Resets the displayed validation state to valid when the user resets the form. */
resetValidation(): void;
/** Commits the realtime validation so it is displayed to the user. */
commitValidation(): void;
}
export function useFormValidationState<T>(props: FormValidationProps<T>): FormValidationState;
export function mergeValidation(...results: ValidationResult[]): ValidationResult;
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,61 @@
# path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key)
> Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform
It's usually `PATH`, but on Windows it can be any casing like `Path`...
## Install
```
$ npm install path-key
```
## Usage
```js
const pathKey = require('path-key');
const key = pathKey();
//=> 'PATH'
const PATH = process.env[key];
//=> '/usr/local/bin:/usr/bin:/bin'
```
## API
### pathKey(options?)
#### options
Type: `object`
##### env
Type: `object`<br>
Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env)
Use a custom environment variables object.
#### platform
Type: `string`<br>
Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform)
Get the PATH key for a specific platform.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-path-key?utm_source=npm-path-key&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
@@ -0,0 +1 @@
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["html.js"],"names":[],"mappings":"AAeA;;;;;;;GAOG;AACH,gCAJa,aAAa,CAsHzB;mCAxI+B,sBAAsB"}
@@ -0,0 +1,18 @@
'use strict';
var define = require('define-properties');
var getPolyfill = require('./polyfill');
var $IteratorPrototype = require('../Iterator.prototype/implementation');
module.exports = function shimIteratorPrototypeSome() {
var polyfill = getPolyfill();
define(
$IteratorPrototype,
{ some: polyfill },
{ some: function () { return $IteratorPrototype.some !== polyfill; } }
);
return polyfill;
};
@@ -0,0 +1,75 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const fs = require("fs")
const path = require("path")
const Cache = require("./cache")
const cache = new Cache()
/**
* Reads the `package.json` data in a given path.
*
* Don't cache the data.
*
* @param {string} dir - The path to a directory to read.
* @returns {object|null} The read `package.json` data, or null.
*/
function readPackageJson(dir) {
const filePath = path.join(dir, "package.json")
try {
const text = fs.readFileSync(filePath, "utf8")
const data = JSON.parse(text)
if (typeof data === "object" && data !== null) {
data.filePath = filePath
return data
}
} catch (_err) {
// do nothing.
}
return null
}
/**
* Gets a `package.json` data.
* The data is cached if found, then it's used after.
*
* @param {string} [startPath] - A file path to lookup.
* @returns {object|null} A found `package.json` data or `null`.
* This object have additional property `filePath`.
*/
module.exports = function getPackageJson(startPath = "a.js") {
const startDir = path.dirname(path.resolve(startPath))
let dir = startDir
let prevDir = ""
let data = null
do {
data = cache.get(dir)
if (data) {
if (dir !== startDir) {
cache.set(startDir, data)
}
return data
}
data = readPackageJson(dir)
if (data) {
cache.set(dir, data)
cache.set(startDir, data)
return data
}
// Go to next.
prevDir = dir
dir = path.resolve(dir, "..")
} while (dir !== prevDir)
cache.set(startDir, null)
return null
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 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 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"},C:{"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 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 0C 1C","194":"0 1 2 3 4 5 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"},D:{"1":"0 1 2 3 4 5 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 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w"},E:{"2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"0 1 2 3 4 5 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 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 FD GD HD ID NC uC JD OC"},G:{"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 gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"9 AB BB CB DB EB FB","2":"6 7 8 J oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"16":"zD"},R:{"16":"0D"},S:{"2":"1D","16":"2D"}},B:5,C:"WebAssembly Relaxed SIMD",D:false};
@@ -0,0 +1,14 @@
/**
* https://tc39.es/ecma402/#sec-getoptionsobject
* @param options
* @returns
*/
export function GetOptionsObject(options) {
if (typeof options === 'undefined') {
return Object.create(null);
}
if (typeof options === 'object') {
return options;
}
throw new TypeError('Options must be an object');
}
@@ -0,0 +1,8 @@
export interface NodeIKernelUixConvertService {
getUin(uid: string[]): Promise<{
uinInfo: Map<string, string>;
}>;
getUid(uin: string[]): Promise<{
uidInfo: Map<string, string>;
}>;
}
@@ -0,0 +1 @@
{"name":"@typescript-eslint/typescript-estree","version":"8.46.4","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532095404,"integrity":"sha512-t0z/UCQ+RY4AylIo7v6ZCtzCdS9pMnC0+yB0VQa2A+1S+oV4noJtM9o2SOJfDVq7GqTVK4GsuGR2QO4Nb/K7kw==","mode":420,"size":1097},"dist/ast-converter.js":{"checkedAt":1794532095404,"integrity":"sha512-XtklD1pmOhNbQhIHMCHdbz2SFHE9irW5QDvvhbX3M3hkUU+ZY+E2XjoiCUbUwuue5WU3CTqE00vTUvjMsiDmTg==","mode":420,"size":2364},"dist/parseSettings/candidateTSConfigRootDirs.js":{"checkedAt":1794532095404,"integrity":"sha512-ZAQo2TwtgSF/Ky4fs/0fBbvBqh+ImRoCycgeHupoVJ5HAA4YwzyIfU+sXVp/sNtMhDSZLuSWGHX5UxGnXH4+Mg==","mode":420,"size":1150},"dist/check-modifiers.js":{"checkedAt":1794532095404,"integrity":"sha512-afBliWeAM5eRi2Hp7KDCTm+WPV8E/2eGYxHbwUNaGKXVj8Wwfrwmhb8fEK0J3dIWPFPyty58eDhPHdjepNXCPg==","mode":420,"size":12898},"dist/clear-caches.js":{"checkedAt":1794532095404,"integrity":"sha512-0x4xhXd1Yepk/Ys/t8Vbs0LZVCyRM9/8z3NbrpUia4g+2zOA5Uu5qZoj+KlwAbexs+5tx+y7QIay7Twv7NbsGw==","mode":420,"size":1298},"dist/convert-comments.js":{"checkedAt":1794532095405,"integrity":"sha512-WLo26wxrUTVUjUskzaLfdoUM8hJH9TbofnzZtElBcKCDNfGHeAcpOHmvmWCZ0a47xvGmnAfyI/QdBQGuisDh6g==","mode":420,"size":2758},"dist/convert.js":{"checkedAt":1794532095405,"integrity":"sha512-PG3RifBNVuIWvPgaHnwSvgCggsIGsQy52yY3JV4xrMDD+6uzT9FDtB66DiZ4DNtG/kTxBKcxx94oo3bls0ohag==","mode":420,"size":134185},"dist/create-program/createIsolatedProgram.js":{"checkedAt":1794532095405,"integrity":"sha512-AhSZJ4y0Nqy5NQRrCPSVdJfNEmXrhVPBDkK72WRNvz8hkpgug6eTWOkTyhaTTSOzvI4KvfYZQR7HPvvz1feQcA==","mode":420,"size":3690},"dist/createParserServices.js":{"checkedAt":1794532095405,"integrity":"sha512-2tM0Lnhe/3czDLA8SkDrCrz8QzwQhC13olY4wbiYiQK9B4JVn8mZ9wYP2Qjr4/+Dm2G2nnD1wX0rDNdhkYQgZw==","mode":420,"size":1281},"dist/parseSettings/createParseSettings.js":{"checkedAt":1794532095405,"integrity":"sha512-XS+m0kAE12c4tpdzboSGydpNB2QHm062TVMuLJg/GBSPBBaB4tOg3yyVRlvj90WMn8IDGxJZgIBy2iUw0AxMxg==","mode":420,"size":12823},"dist/create-program/createProjectProgram.js":{"checkedAt":1794532095406,"integrity":"sha512-TewIOrLZFUEggzlt73XJLkleMgnSA6aqWzueOFBCzCpibiABo0lwJRugmagabr5aGQIARtryo9dsGQ7ybMeq/w==","mode":420,"size":1251},"dist/create-program/createProjectProgramError.js":{"checkedAt":1794532095406,"integrity":"sha512-kv7Y/ZXrATrmqK1DG1ocMpzfXEXzDJd3MTHvB1V8ezO0zXWSlLjYMMRqrTkDip0SJH1j95mktn01GjuL3IR+mA==","mode":420,"size":4262},"dist/create-program/createSourceFile.js":{"checkedAt":1794532095406,"integrity":"sha512-5HlktgYpQs58K8iYwxdfs/TT8TGR/Fq8dsuW7RtVejVfwWHHC3jBxnjtRIORFdM9eBmMFxk7sSisfoeYMqi7og==","mode":420,"size":2775},"dist/create-program/describeFilePath.js":{"checkedAt":1794532095406,"integrity":"sha512-Mb8kiJaS+41jJMe2tEsR7gQ3KsN3WT4xp2JjZxeuJa9R3tK/avH7oz++Xc6bVAmkKFa/a5nkZC1QrMDThkOazg==","mode":420,"size":1469},"dist/ts-estree/estree-to-ts-node-types.js":{"checkedAt":1794532090301,"integrity":"sha512-f2XGQDoj2T+xSOglmwEtZVKrO/8Xj0p9ap2c7A9gQp/BiZ45tLyozAivx12afHv9sT/DcspjyF6yKwNV601gAA==","mode":420,"size":77},"dist/parseSettings/ExpiringCache.js":{"checkedAt":1794532095406,"integrity":"sha512-3z2pXS0E5/0BNWZASuCU6e65bpuzsGCVlyQ+SwNe5tq6Xlg1iWtPG7qMYBeA6dgOTu4cY35NanHqXE+xUCTRUA==","mode":420,"size":1471},"dist/getModifiers.js":{"checkedAt":1794532095406,"integrity":"sha512-SjAqeH6q6xXqUO26d/FTSmXUtnkSV43gNKIGzffZ2Qm8v4E+KsFsI+ctddk1j9BTNm0O1gyqCov+O8b87c8ovA==","mode":420,"size":3097},"dist/parseSettings/getProjectConfigFiles.js":{"checkedAt":1794532095407,"integrity":"sha512-b/LUSGkHDe1vmHZhnx3kjIbJY9Po01EOgd/LuCiL1jf406tqZy46Xv/M1YxpDNg1ORKD7CCvp9d34VHZQbBkeg==","mode":420,"size":3589},"dist/create-program/getScriptKind.js":{"checkedAt":1794532095407,"integrity":"sha512-fNid0olwy283tcC7acSBE5hu880poI0GJtKfd44Bpd90tM2wX3zYMZhEV1qvxqBy7AuxodGmi+RsxGug2F6cKw==","mode":420,"size":3349},"dist/create-program/getWatchProgramsForProjects.js":{"checkedAt":1794532095407,"integrity":"sha512-YBj0bgSX4E2ZKbxIVUPUNTlg9foQXYrz6KkpIMaKmepM4kklhyztAD4obFO36N7XoLFnJF5/ladDWw8n+r5amw==","mode":420,"size":17743},"dist/index.js":{"checkedAt":1794532095407,"integrity":"sha512-gf4qUJ/gR0lWZ1MYDbbaZrBKnAXlGxhYtowblSh+8aaOrpuY7Ym909GxvUaLICaPN3SEU4N1PaeIk2DvAs9rzA==","mode":420,"size":3400},"dist/parseSettings/index.js":{"checkedAt":1794532090301,"integrity":"sha512-f2XGQDoj2T+xSOglmwEtZVKrO/8Xj0p9ap2c7A9gQp/BiZ45tLyozAivx12afHv9sT/DcspjyF6yKwNV601gAA==","mode":420,"size":77},"dist/ts-estree/index.js":{"checkedAt":1794532095407,"integrity":"sha512-SP6BiFLm0AOWjKT8J6MwxoFr6dGRK1ApduFA0yw9s6K/5L5DeVFY0yjkyD8rQpISALvYrTr6gcdVV8ZDxat/GQ==","mode":420,"size":1404},"dist/parseSettings/inferSingleRun.js":{"checkedAt":1794532095407,"integrity":"sha512-YvXvWsDix6+4/rDYQPTwBm/8a9rjZ1L/oAjYJM1pm1xQAFVKLrl/ZRED6T9caJ2ffMAQ5xOnsAZRlruo803xUw==","mode":420,"size":3170},"dist/node-utils.js":{"checkedAt":1794532095408,"integrity":"sha512-tKT8KD84IxxEPuxEvGh826WkCPhZlxVi/XK7tk0tFoyZioz6nhyFpMeryXhLCGt/Px5RWHdtUXyISyq1lHCHQQ==","mode":420,"size":22505},"dist/parser-optionLine truncated
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('cloneWith', require('../cloneWith'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,3 @@
import type { DependencyList } from 'react';
declare const useCreation: <T>(factory: () => T, deps: DependencyList) => T;
export default useCreation;
@@ -0,0 +1,46 @@
import * as core from "../core/index.cjs";
import type { ZodType } from "./schemas.cjs";
export type {
/** @deprecated Use `z.output<T>` instead. */
output as TypeOf,
/** @deprecated Use `z.output<T>` instead. */
output as Infer,
/** @deprecated Use `z.core.$$ZodFirstPartyTypes` instead */
$ZodTypes as ZodFirstPartySchemaTypes, } from "../core/index.cjs";
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
export declare const ZodIssueCode: {
readonly invalid_type: "invalid_type";
readonly too_big: "too_big";
readonly too_small: "too_small";
readonly invalid_format: "invalid_format";
readonly not_multiple_of: "not_multiple_of";
readonly unrecognized_keys: "unrecognized_keys";
readonly invalid_union: "invalid_union";
readonly invalid_key: "invalid_key";
readonly invalid_element: "invalid_element";
readonly invalid_value: "invalid_value";
readonly custom: "custom";
};
/** @deprecated Use `z.$ZodFlattenedError` */
export type inferFlattenedErrors<T extends core.$ZodType, U = string> = core.$ZodFlattenedError<core.output<T>, U>;
/** @deprecated Use `z.$ZodFormattedError` */
export type inferFormattedError<T extends core.$ZodType<any, any>, U = string> = core.$ZodFormattedError<core.output<T>, U>;
/** Use `z.$brand` instead */
export type BRAND<T extends string | number | symbol = string | number | symbol> = {
[core.$brand]: {
[k in T]: true;
};
};
export { $brand, config } from "../core/index.cjs";
/** @deprecated Use `z.config(params)` instead. */
export declare function setErrorMap(map: core.$ZodErrorMap): void;
/** @deprecated Use `z.config()` instead. */
export declare function getErrorMap(): core.$ZodErrorMap<core.$ZodIssue> | undefined;
export type {
/** @deprecated Use z.ZodType (without generics) instead. */
ZodType as ZodTypeAny,
/** @deprecated Use `z.ZodType` */
ZodType as ZodSchema,
/** @deprecated Use `z.ZodType` */
ZodType as Schema, };
export type ZodRawShape = core.$ZodShape;
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Object = void 0;
const type_1 = require("../create/type");
const index_1 = require("../symbols/index");
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
const kind_1 = require("../guard/kind");
function RequiredKeys(properties) {
const keys = [];
for (let key in properties) {
if (!(0, kind_1.IsOptional)(properties[key]))
keys.push(key);
}
return keys;
}
/** `[Json]` Creates an Object type */
function _Object(properties, options) {
const required = RequiredKeys(properties);
const schematic = required.length > 0 ? { [index_1.Kind]: 'Object', type: 'object', properties, required } : { [index_1.Kind]: 'Object', type: 'object', properties };
return (0, type_1.CreateType)(schematic, options);
}
/** `[Json]` Creates an Object type */
exports.Object = _Object;
@@ -0,0 +1,87 @@
'use strict';
var identity = require('../nodes/identity.js');
var stringify = require('./stringify.js');
var stringifyComment = require('./stringifyComment.js');
function stringifyDocument(doc, options) {
const lines = [];
let hasDirectives = options.directives === true;
if (options.directives !== false && doc.directives) {
const dir = doc.directives.toString(doc);
if (dir) {
lines.push(dir);
hasDirectives = true;
}
else if (doc.directives.docStart)
hasDirectives = true;
}
if (hasDirectives)
lines.push('---');
const ctx = stringify.createStringifyContext(doc, options);
const { commentString } = ctx.options;
if (doc.commentBefore) {
if (lines.length !== 1)
lines.unshift('');
const cs = commentString(doc.commentBefore);
lines.unshift(stringifyComment.indentComment(cs, ''));
}
let chompKeep = false;
let contentComment = null;
if (doc.contents) {
if (identity.isNode(doc.contents)) {
if (doc.contents.spaceBefore && hasDirectives)
lines.push('');
if (doc.contents.commentBefore) {
const cs = commentString(doc.contents.commentBefore);
lines.push(stringifyComment.indentComment(cs, ''));
}
// top-level block scalars need to be indented if followed by a comment
ctx.forceBlockIndent = !!doc.comment;
contentComment = doc.contents.comment;
}
const onChompKeep = contentComment ? undefined : () => (chompKeep = true);
let body = stringify.stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep);
if (contentComment)
body += stringifyComment.lineComment(body, '', commentString(contentComment));
if ((body[0] === '|' || body[0] === '>') &&
lines[lines.length - 1] === '---') {
// Top-level block scalars with a preceding doc marker ought to use the
// same line for their header.
lines[lines.length - 1] = `--- ${body}`;
}
else
lines.push(body);
}
else {
lines.push(stringify.stringify(doc.contents, ctx));
}
if (doc.directives?.docEnd) {
if (doc.comment) {
const cs = commentString(doc.comment);
if (cs.includes('\n')) {
lines.push('...');
lines.push(stringifyComment.indentComment(cs, ''));
}
else {
lines.push(`... ${cs}`);
}
}
else {
lines.push('...');
}
}
else {
let dc = doc.comment;
if (dc && chompKeep)
dc = dc.replace(/^\n+/, '');
if (dc) {
if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '')
lines.push('');
lines.push(stringifyComment.indentComment(commentString(dc), ''));
}
}
return lines.join('\n') + '\n';
}
exports.stringifyDocument = stringifyDocument;
@@ -0,0 +1 @@
{"version":3,"names":["_file","require","_buildExternalHelpers","resolvers","_environment","_types","data","Object","defineProperty","exports","enumerable","get","_parser","_traverse","_template","_index2","_transform","_transformFile","_transformAst","_parse","version","resolvePlugin","name","dirname","filepath","resolvePreset","DEFAULT_EXTENSIONS","freeze","OptionManager","init","opts","loadOptionsSync","Plugin","alias","Error","types","traverse","tokTypes","template"],"sources":["../src/index.ts"],"sourcesContent":["if (!process.env.IS_PUBLISH && !USE_ESM && process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"BABEL_8_BREAKING is only supported in ESM. Please run `make use-esm`.\",\n );\n}\n\nexport const version = PACKAGE_JSON.version;\n\nexport { default as File } from \"./transformation/file/file.ts\";\nexport type { default as PluginPass } from \"./transformation/plugin-pass.ts\";\nexport { default as buildExternalHelpers } from \"./tools/build-external-helpers.ts\";\n\nimport * as resolvers from \"./config/files/index.ts\";\n// For backwards-compatibility, we expose the resolvers\n// with the old API.\nexport const resolvePlugin = (name: string, dirname: string) =>\n resolvers.resolvePlugin(name, dirname, false).filepath;\nexport const resolvePreset = (name: string, dirname: string) =>\n resolvers.resolvePreset(name, dirname, false).filepath;\n\nexport { getEnv } from \"./config/helpers/environment.ts\";\n\n// NOTE: Lazy re-exports aren't detected by the Node.js CJS-ESM interop.\n// These are handled by pluginInjectNodeReexportsHints in our babel.config.js\n// so that they can work well.\nexport * as types from \"@babel/types\";\nexport { tokTypes } from \"@babel/parser\";\nexport { default as traverse } from \"@babel/traverse\";\nexport { default as template } from \"@babel/template\";\n\n// rollup-plugin-dts assumes that all re-exported types are also valid values\n// Visitor is only a type, so we need to use this workaround to prevent\n// rollup-plugin-dts from breaking it.\n// TODO: Figure out how to fix this upstream.\nexport type { NodePath, Scope } from \"@babel/traverse\";\nexport type Visitor<S = unknown> = import(\"@babel/traverse\").Visitor<S>;\n\nexport {\n createConfigItem,\n createConfigItemAsync,\n createConfigItemSync,\n} from \"./config/index.ts\";\n\nexport {\n loadOptions,\n loadOptionsAsync,\n loadPartialConfig,\n loadPartialConfigAsync,\n loadPartialConfigSync,\n} from \"./config/index.ts\";\nimport { loadOptionsSync } from \"./config/index.ts\";\nimport type {\n ConfigApplicableTest,\n PluginItem,\n} from \"./config/validation/options.ts\";\nexport { loadOptionsSync };\nexport type { PluginItem };\n\nexport type PresetObject = {\n overrides?: PresetObject[];\n test?: ConfigApplicableTest;\n plugins?: PluginItem[];\n};\n\nexport type {\n CallerMetadata,\n ConfigAPI,\n ConfigItem,\n InputOptions,\n NormalizedOptions,\n PartialConfig,\n PluginAPI,\n PluginObject,\n PresetAPI,\n} from \"./config/index.ts\";\n\nexport {\n type FileResult,\n transform,\n transformAsync,\n transformSync,\n} from \"./transform.ts\";\nexport {\n transformFile,\n transformFileAsync,\n transformFileSync,\n} from \"./transform-file.ts\";\nexport {\n transformFromAst,\n transformFromAstAsync,\n transformFromAstSync,\n} from \"./transform-ast.ts\";\nexport { parse, parseAsync, parseSync } from \"./parse.ts\";\n\n/**\n * Recommended set of compilable extensions. Not used in @babel/core directly, but meant as\n * as an easy source for tooling making use of @babel/core.\n */\nexport const DEFAULT_EXTENSIONS = Object.freeze([\n \".js\",\n \".jsx\",\n \".es6\",\n \".es\",\n \".mjs\",\n \".cjs\",\n] as const);\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // For easier backward-compatibility, provide an API like the one we exposed in Babel 6.\n // eslint-disable-next-line no-restricted-globals\n exports.OptionManager = class OptionManager {\n init(opts: any) {\n return loadOptionsSync(opts);\n }\n };\n\n // eslint-disable-next-line no-restricted-globals\n exports.Plugin = function Plugin(alias: string) {\n throw new Error(\n `The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`,\n );\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAQA,IAAAG,YAAA,GAAAH,OAAA;AAAyD,SAAAI,OAAA;EAAA,MAAAC,IAAA,GAAAL,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAAC,MAAA,CAAAC,cAAA,KAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,MAAA;EAAA;AAAA;AAMzD,SAAAO,QAAA;EAAA,MAAAN,IAAA,GAAAL,OAAA;EAAAW,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,UAAA;EAAA,MAAAP,IAAA,GAAAL,OAAA;EAAAY,SAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,UAAA;ELine truncated
@@ -0,0 +1,7 @@
import { URISchemeHandler, URIComponents } from "../uri";
export interface WSComponents extends URIComponents {
resourceName?: string;
secure?: boolean;
}
declare const handler: URISchemeHandler;
export default handler;
@@ -0,0 +1,193 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const { rsort } = require("semver")
const { ReferenceTracker } = require("@eslint-community/eslint-utils")
const getConfiguredNodeVersion = require("./get-configured-node-version")
const getSemverRange = require("./get-semver-range")
const unprefixNodeColon = require("./unprefix-node-colon")
const semverRangeSubset = require("semver/ranges/subset")
const { getScope } = require("../util/eslint-compat")
const {
iterateProcessGetBuiltinModuleReferences,
} = require("./iterate-process-get-builtin-module-references")
/**
* Parses the options.
* @param {import('eslint').Rule.RuleContext} context The rule context.
* @returns {Readonly<{
* version: import('semver').Range;
* ignores: Set<string>;
* allowExperimental: boolean;
* }>} Parsed value.
*/
function parseOptions(context) {
const raw = /** @type {{
* ignores?: string[];
* allowExperimental?: boolean;
* }} */ (context.options[0] || {})
const version = getConfiguredNodeVersion(context)
const ignores = new Set(raw.ignores || [])
const allowExperimental = raw.allowExperimental ?? false
return Object.freeze({ version, ignores, allowExperimental })
}
/**
* Check if it has been supported.
* @param {string[] | undefined} featureRange The target features supported range
* @param {import('semver').Range} requestedRange The configured version range.
* @returns {boolean}
*/
function isInRange(featureRange, requestedRange) {
if (featureRange == null || featureRange.length === 0) {
return false
}
const [latest] = rsort(featureRange)
const range = getSemverRange(
[...featureRange.map(version => `^${version}`), `>= ${latest}`].join(
"||"
)
)
if (range == null) {
return false
}
return semverRangeSubset(requestedRange, range)
}
/**
* Get the formatted text of a given supported version.
* @param {string[] | undefined} versions The support info.
* @returns {string | undefined}
*/
function versionsToString(versions) {
if (versions == null) {
return
}
const [latest, ...backported] = rsort(versions)
if (backported.length === 0) {
return latest
}
const backportString = backported.map(version => `^${version}`).join(", ")
return `${latest} (backported: ${backportString})`
}
/**
* Verify the code to report unsupported API references.
* @param {import('eslint').Rule.RuleContext} context The rule context.
* @param {import("@eslint-community/eslint-utils").Reference<import("../unsupported-features/types.js").SupportInfo>[]} references The references for APIs to report.
* @returns {void}
*/
function checkUnsupportedBuiltinReferences(context, references) {
const options = parseOptions(context)
for (const { node, path, info } of references) {
const name = unprefixNodeColon(path.join("."))
if (options.ignores.has(name)) {
continue
}
if (options.allowExperimental) {
if (isInRange(info.experimental, options.version)) {
continue
}
const experimentalVersion = versionsToString(info.experimental)
if (experimentalVersion) {
context.report({
node,
messageId: "not-experimental-till",
data: {
name: name,
experimental: experimentalVersion,
version: options.version.raw,
},
})
continue
}
}
if (isInRange(info.supported, options.version)) {
continue
}
const supportedVersion = versionsToString(info.supported)
if (supportedVersion) {
context.report({
node,
messageId: "not-supported-till",
data: {
name: name,
supported: supportedVersion,
version: options.version.raw,
},
})
continue
}
context.report({
node,
messageId: "not-supported-yet",
data: {
name: name,
version: options.version.raw,
},
})
}
}
/**
* Verify the code to report unsupported APIs.
* @param {import('eslint').Rule.RuleContext} context The rule context.
* @param {import('../unsupported-features/types.js').SupportVersionBuiltins} traceMap The map for APIs to report.
* @returns {void}
*/
module.exports.checkUnsupportedBuiltins = function checkUnsupportedBuiltins(
context,
traceMap
) {
const scope = getScope(context)
const tracker = new ReferenceTracker(scope, { mode: "legacy" })
const references = [
...tracker.iterateCjsReferences(traceMap.modules ?? {}),
...iterateProcessGetBuiltinModuleReferences(
tracker,
traceMap.modules ?? {}
),
...tracker.iterateEsmReferences(traceMap.modules ?? {}),
...tracker.iterateGlobalReferences(traceMap.globals ?? {}),
]
checkUnsupportedBuiltinReferences(context, references)
}
module.exports.checkUnsupportedBuiltinReferences =
checkUnsupportedBuiltinReferences
exports.messages = {
"not-experimental-till": [
"The '{{name}}' is not an experimental feature",
"until Node.js {{experimental}}.",
"The configured version range is '{{version}}'.",
].join(" "),
"not-supported-till": [
"The '{{name}}' is still an experimental feature",
"and is not supported until Node.js {{supported}}.",
"The configured version range is '{{version}}'.",
].join(" "),
"not-supported-yet": [
"The '{{name}}' is still an experimental feature",
"The configured version range is '{{version}}'.",
].join(" "),
}
@@ -0,0 +1,288 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports.default = extract;
exports.extractLiteral = extractLiteral;
var _Literal = require('../Literal');
var _Literal2 = _interopRequireDefault(_Literal);
var _JSXElement = require('../JSXElement');
var _JSXElement2 = _interopRequireDefault(_JSXElement);
var _JSXFragment = require('../JSXFragment');
var _JSXFragment2 = _interopRequireDefault(_JSXFragment);
var _JSXText = require('../JSXText');
var _JSXText2 = _interopRequireDefault(_JSXText);
var _Identifier = require('./Identifier');
var _Identifier2 = _interopRequireDefault(_Identifier);
var _TaggedTemplateExpression = require('./TaggedTemplateExpression');
var _TaggedTemplateExpression2 = _interopRequireDefault(_TaggedTemplateExpression);
var _TemplateLiteral = require('./TemplateLiteral');
var _TemplateLiteral2 = _interopRequireDefault(_TemplateLiteral);
var _FunctionExpression = require('./FunctionExpression');
var _FunctionExpression2 = _interopRequireDefault(_FunctionExpression);
var _LogicalExpression = require('./LogicalExpression');
var _LogicalExpression2 = _interopRequireDefault(_LogicalExpression);
var _MemberExpression = require('./MemberExpression');
var _MemberExpression2 = _interopRequireDefault(_MemberExpression);
var _ChainExpression = require('./ChainExpression');
var _ChainExpression2 = _interopRequireDefault(_ChainExpression);
var _OptionalCallExpression = require('./OptionalCallExpression');
var _OptionalCallExpression2 = _interopRequireDefault(_OptionalCallExpression);
var _OptionalMemberExpression = require('./OptionalMemberExpression');
var _OptionalMemberExpression2 = _interopRequireDefault(_OptionalMemberExpression);
var _CallExpression = require('./CallExpression');
var _CallExpression2 = _interopRequireDefault(_CallExpression);
var _UnaryExpression = require('./UnaryExpression');
var _UnaryExpression2 = _interopRequireDefault(_UnaryExpression);
var _ThisExpression = require('./ThisExpression');
var _ThisExpression2 = _interopRequireDefault(_ThisExpression);
var _ConditionalExpression = require('./ConditionalExpression');
var _ConditionalExpression2 = _interopRequireDefault(_ConditionalExpression);
var _BinaryExpression = require('./BinaryExpression');
var _BinaryExpression2 = _interopRequireDefault(_BinaryExpression);
var _ObjectExpression = require('./ObjectExpression');
var _ObjectExpression2 = _interopRequireDefault(_ObjectExpression);
var _NewExpression = require('./NewExpression');
var _NewExpression2 = _interopRequireDefault(_NewExpression);
var _UpdateExpression = require('./UpdateExpression');
var _UpdateExpression2 = _interopRequireDefault(_UpdateExpression);
var _ArrayExpression = require('./ArrayExpression');
var _ArrayExpression2 = _interopRequireDefault(_ArrayExpression);
var _BindExpression = require('./BindExpression');
var _BindExpression2 = _interopRequireDefault(_BindExpression);
var _SpreadElement = require('./SpreadElement');
var _SpreadElement2 = _interopRequireDefault(_SpreadElement);
var _TypeCastExpression = require('./TypeCastExpression');
var _TypeCastExpression2 = _interopRequireDefault(_TypeCastExpression);
var _SequenceExpression = require('./SequenceExpression');
var _SequenceExpression2 = _interopRequireDefault(_SequenceExpression);
var _TSNonNullExpression = require('./TSNonNullExpression');
var _TSNonNullExpression2 = _interopRequireDefault(_TSNonNullExpression);
var _AssignmentExpression = require('./AssignmentExpression');
var _AssignmentExpression2 = _interopRequireDefault(_AssignmentExpression);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// Composition map of types to their extractor functions.
var TYPES = {
Identifier: _Identifier2.default,
Literal: _Literal2.default,
JSXElement: _JSXElement2.default,
JSXFragment: _JSXFragment2.default,
JSXText: _JSXText2.default,
TaggedTemplateExpression: _TaggedTemplateExpression2.default,
TemplateLiteral: _TemplateLiteral2.default,
ArrowFunctionExpression: _FunctionExpression2.default,
FunctionExpression: _FunctionExpression2.default,
LogicalExpression: _LogicalExpression2.default,
MemberExpression: _MemberExpression2.default,
ChainExpression: _ChainExpression2.default,
OptionalCallExpression: _OptionalCallExpression2.default,
OptionalMemberExpression: _OptionalMemberExpression2.default,
CallExpression: _CallExpression2.default,
UnaryExpression: _UnaryExpression2.default,
ThisExpression: _ThisExpression2.default,
ConditionalExpression: _ConditionalExpression2.default,
BinaryExpression: _BinaryExpression2.default,
ObjectExpression: _ObjectExpression2.default,
NewExpression: _NewExpression2.default,
UpdateExpression: _UpdateExpression2.default,
ArrayExpression: _ArrayExpression2.default,
BindExpression: _BindExpression2.default,
SpreadElement: _SpreadElement2.default,
TypeCastExpression: _TypeCastExpression2.default,
SequenceExpression: _SequenceExpression2.default,
TSNonNullExpression: _TSNonNullExpression2.default,
AssignmentExpression: _AssignmentExpression2.default
};
var noop = function noop() {
return null;
};
var errorMessage = function errorMessage(expression) {
return 'The prop value with an expression type of ' + expression + ' could not be resolved. Please file an issue ( https://github.com/jsx-eslint/jsx-ast-utils/issues/new ) to get this fixed immediately.';
};
/**
* This function maps an AST value node
* to its correct extractor function for its
* given type.
*
* This will map correctly for *all* possible expression types.
*
* @param - value - AST Value object with type `JSXExpressionContainer`
* @returns The extracted value.
*/
function extract(value) {
// Value will not have the expression property when we recurse.
// The type for expression on ArrowFunctionExpression is a boolean.
var expression = void 0;
if (typeof value.expression !== 'boolean' && value.expression) {
expression = value.expression; // eslint-disable-line prefer-destructuring
} else {
expression = value;
}
var _expression = expression,
type = _expression.type;
// Typescript NonNull Expression is wrapped & it would end up in the wrong extractor
if (expression.object && expression.object.type === 'TSNonNullExpression') {
type = 'TSNonNullExpression';
}
while (type === 'TSAsExpression') {
var _expression2 = expression;
type = _expression2.type;
if (expression.expression) {
var _expression3 = expression;
expression = _expression3.expression;
}
}
if (TYPES[type] === undefined) {
// eslint-disable-next-line no-console
console.error(errorMessage(type));
return null;
}
return TYPES[type](expression);
}
// Composition map of types to their extractor functions to handle literals.
var LITERAL_TYPES = _extends({}, TYPES, {
Literal: function Literal(value) {
var extractedVal = TYPES.Literal.call(undefined, value);
var isNull = extractedVal === null;
// This will be convention for attributes that have null
// value explicitly defined (<div prop={null} /> maps to 'null').
return isNull ? 'null' : extractedVal;
},
Identifier: function Identifier(value) {
var isUndefined = TYPES.Identifier.call(undefined, value) === undefined;
return isUndefined ? undefined : null;
},
JSXElement: noop,
JSXFragment: noop,
JSXText: noop,
ArrowFunctionExpression: noop,
FunctionExpression: noop,
LogicalExpression: noop,
MemberExpression: noop,
OptionalCallExpression: noop,
OptionalMemberExpression: noop,
CallExpression: noop,
UnaryExpression: function UnaryExpression(value) {
var extractedVal = TYPES.UnaryExpression.call(undefined, value);
return extractedVal === undefined ? null : extractedVal;
},
UpdateExpression: function UpdateExpression(value) {
var extractedVal = TYPES.UpdateExpression.call(undefined, value);
return extractedVal === undefined ? null : extractedVal;
},
ThisExpression: noop,
ConditionalExpression: noop,
BinaryExpression: noop,
ObjectExpression: noop,
NewExpression: noop,
ArrayExpression: function ArrayExpression(value) {
var extractedVal = TYPES.ArrayExpression.call(undefined, value);
return extractedVal.filter(function (val) {
return val !== null;
});
},
BindExpression: noop,
SpreadElement: noop,
TSNonNullExpression: noop,
TSAsExpression: noop,
TypeCastExpression: noop,
SequenceExpression: noop,
ChainExpression: noop
});
/**
* This function maps an AST value node
* to its correct extractor function for its
* given type.
*
* This will map correctly for *some* possible types that map to literals.
*
* @param - value - AST Value object with type `JSXExpressionContainer`
* @returns The extracted value.
*/
function extractLiteral(value) {
// Value will not have the expression property when we recurse.
var expression = value.expression || value;
var type = expression.type;
if (LITERAL_TYPES[type] === undefined) {
// eslint-disable-next-line no-console
console.error(errorMessage(type));
return null;
}
return LITERAL_TYPES[type](expression);
}
@@ -0,0 +1,28 @@
var createCtor = require('./_createCtor'),
root = require('./_root');
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG = 1;
/**
* Creates a function that wraps `func` to invoke it with the optional `this`
* binding of `thisArg`.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {*} [thisArg] The `this` binding of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createBind(func, bitmask, thisArg) {
var isBind = bitmask & WRAP_BIND_FLAG,
Ctor = createCtor(func);
function wrapper() {
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
return fn.apply(isBind ? thisArg : this, arguments);
}
return wrapper;
}
module.exports = createBind;
@@ -0,0 +1,37 @@
var copyObject = require('./_copyObject'),
createAssigner = require('./_createAssigner'),
keys = require('./keys');
/**
* This method is like `_.assign` except that it accepts `customizer`
* which is invoked to produce the assigned values. If `customizer` returns
* `undefined`, assignment is handled by the method instead. The `customizer`
* is invoked with five arguments: (objValue, srcValue, key, object, source).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @see _.assignInWith
* @example
*
* function customizer(objValue, srcValue) {
* return _.isUndefined(objValue) ? srcValue : objValue;
* }
*
* var defaults = _.partialRight(_.assignWith, customizer);
*
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
copyObject(source, keys(source), object, customizer);
});
module.exports = assignWith;
@@ -0,0 +1,5 @@
'use strict';
module.exports = function isLeadingSurrogate(charCode) {
return typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;
};
@@ -0,0 +1,18 @@
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"), require("./cipher-core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core", "./cipher-core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
return CryptoJS.pad.Pkcs7;
}));
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,oBAAoB,CAAC,iZAAuE,CAAC;AACjH","sources":["packages/@react-aria/menu/intl/el-GR.json"],"sourcesContent":["{\n \"longPressMessage\": \"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού\"\n}\n"],"names":[],"version":3,"file":"el-GR.main.js.map"}
@@ -0,0 +1,68 @@
# color-convert
[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert)
Color-convert is a color conversion library for JavaScript and node.
It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest):
```js
var convert = require('color-convert');
convert.rgb.hsl(140, 200, 100); // [96, 48, 59]
convert.keyword.rgb('blue'); // [0, 0, 255]
var rgbChannels = convert.rgb.channels; // 3
var cmykChannels = convert.cmyk.channels; // 4
var ansiChannels = convert.ansi16.channels; // 1
```
# Install
```console
$ npm install color-convert
```
# API
Simply get the property of the _from_ and _to_ conversion that you're looking for.
All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function.
All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha).
```js
var convert = require('color-convert');
// Hex to LAB
convert.hex.lab('DEADBF'); // [ 76, 21, -2 ]
convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ]
// RGB to CMYK
convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ]
convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ]
```
### Arrays
All functions that accept multiple arguments also support passing an array.
Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.)
```js
var convert = require('color-convert');
convert.rgb.hex(123, 45, 67); // '7B2D43'
convert.rgb.hex([123, 45, 67]); // '7B2D43'
```
## Routing
Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex).
Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js).
# Contribute
If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request.
# License
Copyright &copy; 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE).
@@ -0,0 +1,25 @@
var defineProperty = require('./_defineProperty');
/**
* The base implementation of `assignValue` and `assignMergeValue` without
* value checks.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function baseAssignValue(object, key, value) {
if (key == '__proto__' && defineProperty) {
defineProperty(object, key, {
'configurable': true,
'enumerable': true,
'value': value,
'writable': true
});
} else {
object[key] = value;
}
}
module.exports = baseAssignValue;
@@ -0,0 +1,4 @@
interface ImportMeta {
url: string
readonly vitest?: typeof import('vitest')
}
@@ -0,0 +1 @@
{"name":"uri-js","version":"4.4.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532093074,"integrity":"sha512-cRrf1BARiocYCJn5DOYZUqvB3wZMcpVVMahszB9W3TliY/+z8u6OcFoBcEZJ2vz4HdipDxLmWJhABbBXv6ONNQ==","mode":511,"size":1452},"dist/esnext/schemes/http.js":{"checkedAt":1794532093074,"integrity":"sha512-cmAMvqY/NKclBBGrpVIi5QaCy4pLYYR1fxckZ3N5U71d5nU4EPwAKhNAtZ5+BijumfD2kYBgpErl+1+IfwDG3A==","mode":511,"size":959},"dist/esnext/schemes/https.js":{"checkedAt":1794532093075,"integrity":"sha512-DbhOGgZWMIJMqT6+2siRfJHp2auboGm3Oz7YygQewdA1zyPpjeeJFbY+sRUfjURbaAz892Ohvusbtc0B5gRhww==","mode":511,"size":212},"dist/esnext/index.js":{"checkedAt":1794532093075,"integrity":"sha512-yxHpRjDarsunnLYFfbKBCEaORSEUzjmGLjpY13yWIqMcOFp7lzXMfifsNwsrozsHlx8ozHl3op7fwD8L6ATQCQ==","mode":511,"size":537},"dist/esnext/schemes/mailto.js":{"checkedAt":1794532093075,"integrity":"sha512-83wBssjoZlfZ4354gYyy6WqrRmoM1OGHVBgfaoqBU8u++02UhFoBqWKOZwJNAxPFFRkMXhTBapyu2cMdn74DQw==","mode":511,"size":7746},"dist/esnext/regexps-iri.js":{"checkedAt":1794532093075,"integrity":"sha512-EP/m4Bwz1PLKHxIcxDQ/1084yZoydmE2qsTzgwJrGmPXXjEUj9NpZgP8OrITiUI+PZHDjp9fuopLFOfJYPV4DQ==","mode":511,"size":114},"dist/esnext/regexps-uri.js":{"checkedAt":1794532093075,"integrity":"sha512-Z/m/g2p1L/4uwQ6N2YRXxClhGzikowED4whV6DILN9g4lypnLYS1rjnQiLF6loZ3OieeSRwutbI4rD83mdjJ2A==","mode":511,"size":7813},"dist/es5/uri.all.js":{"checkedAt":1794532093075,"integrity":"sha512-ghyBfrsDxIyqp3cDaH5c+p4uvhGGhxyeoQGBBVzlebnSdZJgyS1KOuzYrnNgRe/DGChpzGK1Y/7TcwoxyZKOcg==","mode":511,"size":57304},"dist/es5/uri.all.min.js":{"checkedAt":1794532093075,"integrity":"sha512-odC916pqsZHjbSHtJi6ojx17l6H90+hSMc0Ox1FRKHzNzvsNGKZ7FJ7EhI4xKcKj29gjpOJ4mlQbqlFvxp7VPQ==","mode":511,"size":17200},"dist/esnext/uri.js":{"checkedAt":1794532093076,"integrity":"sha512-G8oUYHQOGGn9o9+nGgY2mDdmSe4uiKrhxNzzjNtBt1PcABU/zLmVDoPjIAJyLcxCq7l7XLnKhVrOWf1ogexVBg==","mode":511,"size":20153},"dist/esnext/schemes/urn-uuid.js":{"checkedAt":1794532093076,"integrity":"sha512-HuXpVylozVqfKORz/E1QN/sUIlcIJ+0nTA0C9WoZ65h3J4XKb9ya0Gzq3EdeClLGOOQKMuUuECgJ+XhsWhS9Kw==","mode":511,"size":868},"dist/esnext/schemes/urn.js":{"checkedAt":1794532093076,"integrity":"sha512-5EdnwDqSuRXp8qyjrAY1PTH8ctlRMOtR1cwaY9Rjyg74g4O4hnYTgYTCT1LQFPWTTx8SKZlbeqNOflMTQjjGzw==","mode":511,"size":2050},"dist/esnext/util.js":{"checkedAt":1794532093076,"integrity":"sha512-e8nT7HHMKPSTOGOoJcjh2Yw4SnR7uXV1ulvSK7ThGM0oobiNPQxDtvABus/BDO55ummTOSA+iFrlPRvZUrc05Q==","mode":511,"size":1114},"dist/esnext/schemes/ws.js":{"checkedAt":1794532093076,"integrity":"sha512-hCcTLemo+eEhdR0B+V3brajsP5kf4zLzMkF1BOYArJCXPtgLv+LSR0l4XDxNHvWpDRb2mvB5Im/RodyW6z0eIw==","mode":511,"size":1659},"dist/esnext/schemes/wss.js":{"checkedAt":1794532093076,"integrity":"sha512-s6r4Lcwtqor5N8YKp2usMo0fVEiD9coFBXNX3YjDTBkwTEiQsK3MGWLZYG4d5nRXeTRNFqbgf/ty7vAYVhBAeA==","mode":511,"size":198},"package.json":{"checkedAt":1794532093076,"integrity":"sha512-rTtXTezOVqv+ZKXaRQUZgYw9SDT3x//xH4/qtbbPRoWdDPu95VI7rzEwz1uJskWAejT5ATtCGUngCjhH2qIuig==","mode":511,"size":2172},"yarn.lock":{"checkedAt":1794532093077,"integrity":"sha512-2y6iaa5L80+ws9tjcWh+y64UwpEqnuqHoFl77UPuH7RxR0UqDjhdIUzqMvB6oP/+5uCPgqTczHNiZ76TTGgB2A==","mode":511,"size":103956},"dist/esnext/schemes/http.js.map":{"checkedAt":1794532093077,"integrity":"sha512-wIMe8hvcm+9QIkrLi+I/wzAdBftbDZFt/7MDbbjPjnNvHvovHyXVD/VdGBSF4sgWpT/nCRHR0/bQYv49uhEVmw==","mode":511,"size":841},"dist/esnext/schemes/https.js.map":{"checkedAt":1794532093077,"integrity":"sha512-rPl99Sltx9aYcFETfZRQKAcDhJOYAFuEPSn3DHRdSNH1r96b1uKNc6tEuDKJ6mNmh9kccG1NPajzmnAVp3TvlA==","mode":511,"size":312},"dist/esnext/index.js.map":{"checkedAt":1794532093077,"integrity":"sha512-r/MA+LxHg4wXgl2S87NxQrwzs1S/Q08PfeTZQ/OyR81ngTBBe1+xcqShp3u7PLzkKKsGdXbsCxBeG7SWZDigwg==","mode":511,"size":747},"dist/esnext/schemes/mailto.js.map":{"checkedAt":1794532093077,"integrity":"sha512-EP63gCUFfI9jczkUxJVIUoAK01sadXf35Vm8bd3heRI0dwFDI2IP81plyfqwEkhXLVmgevC6N3hEVUrch4+DpA==","mode":511,"size":7209},"dist/esnext/regexps-iri.js.map":{"checkedAt":1794532093077,"integrity":"sha512-q6/2vr4QqHPK4kCqIkCsQfXbiQNuN5galClMVhDoKzZkgeSuJhFi0tVwbCkTiRJ7nB2XHpI7bfLGc+wxjtoEzw==","mode":511,"size":192},"dist/esnext/regexps-uri.js.map":{"checkedAt":1794532093078,"integrity":"sha512-ape7jTpq4A23guts62UEY+wPBtm6o5TA2Fym3TbFZ8bu53fBKupA94WED1WXbkreGBivX4RFy7ddpU+hNZ+y9Q==","mode":511,"size":8283},"dist/es5/uri.all.js.map":{"checkedAt":1794532093078,"integrity":"sha512-vj4+d/AqTazvy8QjPDwz2X64CGmMb6hntG7cKTWsXJ6kgSJsfPhjDz1W0bcJvUrH9b4Wrv1nPMptQzTvRlfxzw==","mode":511,"size":102192},"dist/es5/uri.all.min.js.map":{"checkedAt":1794532093078,"integrity":"sha512-VvTanivdcSEYHaaQU/v8hddHhcJyLQtA0a7VHicGHz7p5UwigCHlhJJzgsoYkokr59NrN0t0T6m8179xaEMmig==","mode":511,"size":83083},"dist/esnext/uri.js.map":{"checkedAt":1794532093078,"integrity":"sha512-iCdnwB0ErvGYQQGc31OPw6XS6TVcOacnA9L+0QyW/DuyPLUzJMMJ8Oo9+NqHLlCD5l3hne0+NTTAx31wOQlbBQ==","mode":511,"size":19219},"dist/esnext/schemes/urn-uuid.js.map":{"checkedLine truncated
@@ -0,0 +1,72 @@
import type { NestedValue } from './form';
export type Noop = () => void;
interface File extends Blob {
readonly lastModified: number;
readonly name: string;
}
interface FileList {
readonly length: number;
item(index: number): File | null;
[index: number]: File;
}
export type Primitive = null | undefined | string | number | boolean | symbol | bigint;
export type BrowserNativeObject = Date | FileList | File;
export type EmptyObject = {
[K in string | number]: never;
};
export type NonUndefined<T> = T extends undefined ? never : T;
export type LiteralUnion<T extends U, U extends Primitive> = T | (U & {
_?: never;
});
export type ExtractObjects<T> = T extends infer U ? U extends object ? U : never : never;
export type DeepPartial<T> = T extends BrowserNativeObject | NestedValue ? T : {
[K in keyof T]?: ExtractObjects<T[K]> extends never ? T[K] : DeepPartial<T[K]>;
};
export type DeepPartialSkipArrayKey<T> = T extends BrowserNativeObject | NestedValue ? T : T extends ReadonlyArray<any> ? {
[K in keyof T]: DeepPartialSkipArrayKey<T[K]>;
} : {
[K in keyof T]?: DeepPartialSkipArrayKey<T[K]>;
};
/**
* Checks whether the type is any
* See {@link https://stackoverflow.com/a/49928360/3406963}
* @typeParam T - type which may be any
* ```
* IsAny<any> = true
* IsAny<string> = false
* ```
*/
export type IsAny<T> = 0 extends 1 & T ? true : false;
/**
* Checks whether the type is never
* @typeParam T - type which may be never
* ```
* IsAny<never> = true
* IsAny<string> = false
* ```
*/
export type IsNever<T> = [T] extends [never] ? true : false;
/**
* Checks whether T1 can be exactly (mutually) assigned to T2
* @typeParam T1 - type to check
* @typeParam T2 - type to check against
* ```
* IsEqual<string, string> = true
* IsEqual<'foo', 'foo'> = true
* IsEqual<string, number> = false
* IsEqual<string, number> = false
* IsEqual<string, 'foo'> = false
* IsEqual<'foo', string> = false
* IsEqual<'foo' | 'bar', 'foo'> = boolean // 'foo' is assignable, but 'bar' is not (true | false) -> boolean
* ```
*/
export type IsEqual<T1, T2> = T1 extends T2 ? (<G>() => G extends T1 ? 1 : 2) extends <G>() => G extends T2 ? 1 : 2 ? true : false : false;
export type DeepMap<T, TValue> = IsAny<T> extends true ? any : T extends BrowserNativeObject | NestedValue ? TValue : T extends object ? {
[K in keyof T]: DeepMap<NonUndefined<T[K]>, TValue>;
} : TValue;
export type IsFlatObject<T extends object> = Extract<Exclude<T[keyof T], NestedValue | Date | FileList>, any[] | object> extends never ? true : false;
export type Merge<A, B> = {
[K in keyof A | keyof B]?: K extends keyof A & keyof B ? [A[K], B[K]] extends [object, object] ? Merge<A[K], B[K]> : B[K] : K extends keyof A ? A[K] : K extends keyof B ? B[K] : never;
};
export {};
//# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
{"name":"@react-aria/slider","version":"3.7.14","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/main.js":{"checkedAt":1794532109115,"integrity":"sha512-vfJrhGe71moIZr4xTgiGylFpdM9+WcQSleUZZVLaPPUEFQ3DNN+byQKQcIAlgRTsvoBFRa2AwdyLWgAX4Mqm4w==","mode":420,"size":1106},"dist/module.js":{"checkedAt":1794532109116,"integrity":"sha512-DLrY9xKL4dorH+57kbJdK8l8gMGKR7rBJaIdsgYTNAdyNPie+9BIVCNT+9o58/fdl+bMTFb4seCaC3Bi92q6jA==","mode":420,"size":980},"dist/useSlider.main.js":{"checkedAt":1794532109116,"integrity":"sha512-8HJgpK68zxMxUXAUOxAJYFwEhw6mPvqWBpuZhy8uCWrVR2ysW2KGGOjYhF+NveDpoCtaKs6wKslE2NeGwpqREg==","mode":420,"size":9522},"dist/useSlider.module.js":{"checkedAt":1794532109116,"integrity":"sha512-wYAGcMJ6O4ayzijQMZErpnlkvOeTORbrQQNiQ5r8lC05Pv92yglKOJs2FdKFVBpYyEcArFx6lqt4AqLwn3ChMw==","mode":420,"size":9484},"dist/useSliderThumb.main.js":{"checkedAt":1794532109116,"integrity":"sha512-Am/tH0T2mKK/rwrhJK+FSwCUoL+NIdp3XOTsnJtgYtAsI5vbkioMK9kdgp2iX8qDRvpMxaXAk4UjxgZw6pLAAg==","mode":420,"size":9136},"dist/useSliderThumb.module.js":{"checkedAt":1794532109116,"integrity":"sha512-jkNS08b0WTMcTWpOEiBjgHNkmnZ/7uF+zIFi9kMsxXWq4R9qsw0dbjFNvZc6t0SRZq3tjqc8pFfAD4X8bwmGcA==","mode":420,"size":9167},"dist/utils.main.js":{"checkedAt":1794532109116,"integrity":"sha512-lwOVcPIrUtl1UJe3fuavvppBazleoUy7TflX9zDo5v3FgihDqybR/c32grmMcdJ2ohPHFdEcd47E4c04wtBXrw==","mode":420,"size":659},"dist/utils.module.js":{"checkedAt":1794532109117,"integrity":"sha512-CDTXow8AqFCxBWhJvM/6bcmI5j8Kmkkxe7kEb8g/UYvmLb93FHRPHHrH86WVYCx7KD+uSm3j35shdexMN9ULKQ==","mode":420,"size":465},"package.json":{"checkedAt":1794532109117,"integrity":"sha512-mMZ+eGvCu9b/QHWtWjSIdQzjBvI96j/E7i2c5kOWcUFitxSWEmkaiUHUnrUKekTLeYrhNU+k8ynJJeuyeSrfDQ==","mode":420,"size":1061},"dist/main.js.map":{"checkedAt":1794532109117,"integrity":"sha512-+msMySu8XsV8HKmYFoPFDizyd2stjfNE07lnyUsi8j/hRHT6SdTECs2J2+Q6yCP1KuCTRp638T/UOMvPP8ItUg==","mode":420,"size":1193},"dist/module.js.map":{"checkedAt":1794532109117,"integrity":"sha512-8yFOtKKt0I2uXmHXRzSGcWK2qUntTtlQkt2PONTPkvGpH4r67Qel6Kcj4QS8QhY4T6IWoOTibeTX+3I3DDA5rQ==","mode":420,"size":1188},"dist/types.d.ts.map":{"checkedAt":1794532109117,"integrity":"sha512-2lQQVUzNdfaphUdeLwWKbUtmPClKcPguJQVvlXaI0AnLW+DAYpgnrR0op+jIBolyt2sKsVeOwD0m6emPn0qkzg==","mode":420,"size":2506},"dist/useSlider.main.js.map":{"checkedAt":1794532109117,"integrity":"sha512-pwIU6c+9pnwcmBNZEKmontgMED791YJU9AL9IbLmveNIpg16Vm9txvvVBQicp0/yQb+N+bOBq7mH4RhiXyVr4A==","mode":420,"size":13629},"dist/useSlider.module.js.map":{"checkedAt":1794532109117,"integrity":"sha512-pFneLLjYYFOOXk37xK59qELsPBb5UgU8KeuYh647daU7a7mhJPL5G0qSb+PYo+USGR/4L//qw+9wncCkMOvBKA==","mode":420,"size":13619},"dist/useSliderThumb.main.js.map":{"checkedAt":1794532109118,"integrity":"sha512-csomTxI2PUjOdTnVaEfrPwjhzkEMvtJT7D6+uQ8dzmh3AXpZxWhTU4bVoboFvJV99YLh0+ktN9Z50xeZ5alNkQ==","mode":420,"size":13164},"dist/useSliderThumb.module.js.map":{"checkedAt":1794532109118,"integrity":"sha512-RttrS38W0ZW8Niw4Y+w+S6IyG6G0NDeQlwSF9M1UXBwEBd5ZioJ6vsoiqgudptGdTUoOxrpgvmAtp70n/DtVRw==","mode":420,"size":13155},"dist/utils.main.js.map":{"checkedAt":1794532109118,"integrity":"sha512-vlGI/Z8s/1MTE9tHJ1fbuUOxTiGNOijaEs3V8n5+UanMD8sof9rYuaglKu2EIDfGYO//DIuB1ubboWP3hkyDYA==","mode":420,"size":762},"dist/utils.module.js.map":{"checkedAt":1794532109118,"integrity":"sha512-eDL7ICoOWzfmVJYvbGJW2oXBIJQoXDnUNmEKqxLt3hJUzLMzJ3VdFsjWAMm2428B0WGRWznmdFn8JWGvGNGimw==","mode":420,"size":757},"README.md":{"checkedAt":1794532109118,"integrity":"sha512-L1hAhaZ/+RfEQ1I8NDS3RehG075VvOJ9Ddp8aNRE4VIl5TbdT1McgSPgR42gRm5vNWUHEZuyMFzJixdSBt+3GA==","mode":420,"size":135},"dist/import.mjs":{"checkedAt":1794532109118,"integrity":"sha512-+dBoPI4wHMIgPaZXb9QWpaNMe15T4OaqOrO9BPS2HUJLwnA3Ke7fNG6S5whLaDiY4DD6yN4H+BDMQR8B4dvf2g==","mode":420,"size":968},"dist/useSlider.mjs":{"checkedAt":1794532109118,"integrity":"sha512-8c7+9kGvhUF/u/C6HvTlFIwMrPDsBY9FIOZV6KuUr+rxbLPin1+XX2DljbHdhPj6SRxyEL0oAfDbJ1dqMdBI0A==","mode":420,"size":9478},"dist/useSliderThumb.mjs":{"checkedAt":1794532109118,"integrity":"sha512-hqdoeI8ZHwbH9qiwZDW0B8E/BWl9ZCPDuGprV8OOhgHjGDwSoQCNsGytbSKzPb7woJKfcqXwE84TiwV3cw4Fag==","mode":420,"size":9161},"dist/utils.mjs":{"checkedAt":1794532109117,"integrity":"sha512-CDTXow8AqFCxBWhJvM/6bcmI5j8Kmkkxe7kEb8g/UYvmLb93FHRPHHrH86WVYCx7KD+uSm3j35shdexMN9ULKQ==","mode":420,"size":465},"src/index.ts":{"checkedAt":1794532109119,"integrity":"sha512-Jp9kHViXssectlScsaMq46r8idwkGJdZ2Cygh1/F62OTuzlypbts8aWBga4tnGMDcBbQwP+HjSyHToC0H0NVcw==","mode":420,"size":1007},"dist/types.d.ts":{"checkedAt":1794532109119,"integrity":"sha512-qzvsZvlh/EOnlDfue6hIYUQVlJdWIer+/YZNFizXCdtJI/mZ+XbToX+2uj40jdtQ/x3GD+w0AnE/t2u/A+MISg==","mode":420,"size":2781},"src/useSlider.ts":{"checkedAt":1794532109119,"integrity":"sha512-ypcaJ27ERT6QZY5YhPfGeoxGBdlebyr130swpc3hkThr9i9hAGvL1G/aB8nLBQnck5fYJFkmTeWVivL55VMueLine truncated
@@ -0,0 +1,35 @@
/*
* 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.
*/ class $ee1bfa90a957fb8a$export$cb6da89c6af1a8ec {
/**
* Returns a copy of this size.
*/ copy() {
return new $ee1bfa90a957fb8a$export$cb6da89c6af1a8ec(this.width, this.height);
}
/**
* Returns whether this size is equal to another one.
*/ equals(other) {
return this.width === other.width && this.height === other.height;
}
/**
* The total area of the Size.
*/ get area() {
return this.width * this.height;
}
constructor(width = 0, height = 0){
this.width = Math.max(width, 0);
this.height = Math.max(height, 0);
}
}
export {$ee1bfa90a957fb8a$export$cb6da89c6af1a8ec as Size};
//# sourceMappingURL=Size.module.js.map
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Either.js.map
@@ -0,0 +1 @@
{"mappings":";;;AAkBA;IACE;;OAEG;IACH,YAAY,EAAE,aAAa,CAAA;CAC5B;AAED;;GAEG;AACH,2BAA2B,KAAK,EAAE,gBAAgB,EAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,WAAW,CAa5F;ACrBD;IACE;;OAEG;IACH,YAAY,EAAE,aAAa,CAAC;IAE5B;;OAEG;IACH,YAAY,EAAE,aAAa,CAAA;CAC5B;AAED;;;GAGG;AACH,kCAAkC,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GAAI,kBAAkB,CAiHtJ;ACxID,YAAY,EAAC,gBAAgB,EAAE,mBAAmB,EAAC,MAAM,sBAAsB,CAAC","sources":["packages/@react-aria/tooltip/src/packages/@react-aria/tooltip/src/useTooltip.ts","packages/@react-aria/tooltip/src/packages/@react-aria/tooltip/src/useTooltipTrigger.ts","packages/@react-aria/tooltip/src/packages/@react-aria/tooltip/src/index.ts","packages/@react-aria/tooltip/src/index.ts"],"sourcesContent":[null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useTooltip} from './useTooltip';\nexport {useTooltipTrigger} from './useTooltipTrigger';\nexport type {AriaTooltipProps, TooltipTriggerProps} from '@react-types/tooltip';\nexport type {TooltipAria} from './useTooltip';\nexport type {TooltipTriggerAria} from './useTooltipTrigger';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -0,0 +1,7 @@
import { HTMLHeroUIProps } from '@heroui/system';
import { TableHeaderProps as TableHeaderProps$1 } from '@react-types/table';
type TableHeaderProps<T> = TableHeaderProps$1<T> & Omit<HTMLHeroUIProps<"thead">, keyof TableHeaderProps$1<T>>;
declare const TableHeader: <T>(props: TableHeaderProps<T>) => JSX.Element;
export { type TableHeaderProps, TableHeader as default };
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more