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

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

No files matched your search

@@ -0,0 +1,16 @@
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "sliderData", () => $28db8d634be2fa58$export$d6c8d9636a3dc49c);
$parcel$export(module.exports, "getSliderThumbId", () => $28db8d634be2fa58$export$68e648cbec363a18);
const $28db8d634be2fa58$export$d6c8d9636a3dc49c = new WeakMap();
function $28db8d634be2fa58$export$68e648cbec363a18(state, index) {
let data = $28db8d634be2fa58$export$d6c8d9636a3dc49c.get(state);
if (!data) throw new Error('Unknown slider state');
return `${data.id}-${index}`;
}
//# sourceMappingURL=utils.main.js.map
@@ -0,0 +1,13 @@
export { Dict, __DEV__, __TEST__, dataAttr, isArray, isEmpty, isEmptyArray, isEmptyObject, isFunction, isNumeric, isObject } from './assertion.js';
export { clsx } from './clsx.js';
export { MergeObject, arrayToObject, cleanObject, cleanObjectKeys, compact, copyObject, getKeyValue, getProp, omitObject, renameProp } from './object.js';
export { safeAriaLabel, safeInitials, safeText } from './text.js';
export { getMargin } from './dimensions.js';
export { callAll, callAllHandlers, capitalize, debounce, extractProperty, get, getUniqueID, intersectionBy, kebabCase, mapKeys, objectToDeps, omit, removeEvents, uniqBy } from './functions.js';
export { clamp, clampPercentage, range } from './numbers.js';
export { warn } from './console.js';
export { Timer } from './types.js';
export { getGregorianYearOffset } from './dates.js';
export { isPatternNumeric } from './regex.js';
export { chain, idsUpdaterMap, mergeIds, mergeProps, mergeRefs } from './ra.js';
import 'react';
@@ -0,0 +1,48 @@
import { __extends } from "tslib";
export var ErrorCode;
(function (ErrorCode) {
// When we have a placeholder but no value to format
ErrorCode["MISSING_VALUE"] = "MISSING_VALUE";
// When value supplied is invalid
ErrorCode["INVALID_VALUE"] = "INVALID_VALUE";
// When we need specific Intl API but it's not available
ErrorCode["MISSING_INTL_API"] = "MISSING_INTL_API";
})(ErrorCode || (ErrorCode = {}));
var FormatError = /** @class */ (function (_super) {
__extends(FormatError, _super);
function FormatError(msg, code, originalMessage) {
var _this = _super.call(this, msg) || this;
_this.code = code;
_this.originalMessage = originalMessage;
return _this;
}
FormatError.prototype.toString = function () {
return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
};
return FormatError;
}(Error));
export { FormatError };
var InvalidValueError = /** @class */ (function (_super) {
__extends(InvalidValueError, _super);
function InvalidValueError(variableId, value, options, originalMessage) {
return _super.call(this, "Invalid values for \"".concat(variableId, "\": \"").concat(value, "\". Options are \"").concat(Object.keys(options).join('", "'), "\""), ErrorCode.INVALID_VALUE, originalMessage) || this;
}
return InvalidValueError;
}(FormatError));
export { InvalidValueError };
var InvalidValueTypeError = /** @class */ (function (_super) {
__extends(InvalidValueTypeError, _super);
function InvalidValueTypeError(value, type, originalMessage) {
return _super.call(this, "Value for \"".concat(value, "\" must be of type ").concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;
}
return InvalidValueTypeError;
}(FormatError));
export { InvalidValueTypeError };
var MissingValueError = /** @class */ (function (_super) {
__extends(MissingValueError, _super);
function MissingValueError(variableId, originalMessage) {
return _super.call(this, "The intl string context variable \"".concat(variableId, "\" was not provided to the string \"").concat(originalMessage, "\""), ErrorCode.MISSING_VALUE, originalMessage) || this;
}
return MissingValueError;
}(FormatError));
export { MissingValueError };
@@ -0,0 +1,825 @@
export default `flf2a$ 8 7 20 -1 7
MARQUEE by Ron Fritz 8/94
Figlet Release 2.0
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
.::@
.::@
.::@
.: @
.: @
@
.::@
@@
.: .:@
.: .:@
@
@
@
@
@
@@
@
.:: .:: @
.:::::::.::::@
.:: .:: @
.:: .:: @
.:::::::.::::@
.:: .:: @
@@
.:: @
.: .:: @
.:: @
.:: @
.:: @
.:: .:: @
.:: @
@@
@
.:: .::@
.:: @
.:: @
.:: @
.:: @
.:: .:: @
@@
.: @
.:: .::@
.:: @
.::: @
.:: @
.:: .::@
.: @
@@
.::@
.:@
@
@
@
@
@
@@
.::@
.:: @
.:: @
.:: @
.:: @
.:: @
.::@
@@
.:: @
.:: @
.::@
.::@
.::@
.:: @
.:: @
@@
.:: @
.:: .:: .::@
.: .: .:: @
.:::: .:::::::@
.: .: .:: @
.:: .:: .::@
.:: @
@@
@
.:: @
.:: @
.:::.:::::@
.:: @
.:: @
@
@@
@
@
@
@
@
@
.::@
.:@@
@
@
@
.:::::@
@
@
@
@@
@
@
@
@
@
@
.::@
@@
.::@
.:: @
.:: @
.:: @
.:: @
.:: @
.:: @
@@
@
.:: @
.:: .:: @
.:: .:: @
.:: .::@
.:: .:: @
.::: @
@@
@
.:: @
.:: @
.:: @
.:: @
.:: @
.::::@
@@
@
.:::.: @
.: .:@
.:: @
.:: @
.:: @
.:::::::@
@@
@
.:: .:: @
.:: @
.:: @
::. @
:::.@
.:::::: @
@@
@
.:: @
. .:: @
.: .:: @
.:: .:: @
.:::: .: .::@
.:: @
@@
@
.:: .::: @
.:: @
.::: @
.:: @
.::@
.::: .:: @
@@
@
.:: @
.:: @
.:: @
.: .:: @
.:: .:: @
.:: .:: @
@@
@
.::::: .::@
.:: @
.:: @
.:: @
.:: @
.:: @
@@
@
.: @
.:: .:: @
.:: .: @
.:: .: @
.:: .::@
.:::: @
@@
@
.: .:: @
.:: .::@
.: .::@
.: .:: @
.:: @
.:: @
@@
@
@
@
@
.::@
@
.::@
@@
@
@
@
@
.::@
@
.::@
.:@@
.::@
.:: @
.:: @
.:: @
.:: @
.:: @
.::@
@@
@
@
.::::::@
@
.::::::@
@
@
@@
.:: @
.:: @
.:: @
.::@
.:: @
.:: @
.:: @
@@
.::: @
.:: @
.::@
.:: @
.:: @
@
.:: @
@@
@
.::: @
.: .:: @
.: .:: .::@
.:: .::. .::@
.:: \`\`\` @
.:: @
@@
.: @
.: :: @
.: .:: @
.:: .:: @
.:::::: .:: @
.:: .:: @
.:: .::@
@@
.:: .:: @
.: .:: @
.: .::@
.::: .: @
.: .::@
.: .:@
.:::: .:: @
@@
.:: @
.:: .::@
.:: @
.:: @
.:: @
.:: .::@
.:::: @
@@
.::::: @
.:: .:: @
.:: .::@
.:: .::@
.:: .::@
.:: .:: @
.::::: @
@@
.::::::::@
.:: @
.:: @
.:::::: @
.:: @
.:: @
.::::::::@
@@
.::::::::@
.:: @
.:: @
.:::::: @
.:: @
.:: @
.:: @
@@
.:::: @
.: .:: @
.:: @
.:: @
.:: .::::@
.:: .: @
.::::: @
@@
.:: .::@
.:: .::@
.:: .::@
.:::::: .::@
.:: .::@
.:: .::@
.:: .::@
@@
.::@
.::@
.::@
.::@
.::@
.::@
.::@
@@
.::@
.::@
.::@
.::@
.::@
.: .::@
.:::: @
@@
.:: .:: @
.:: .:: @
.:: .:: @
.: .: @
.:: .:: @
.:: .:: @
.:: .::@
@@
.:: @
.:: @
.:: @
.:: @
.:: @
.:: @
.::::::::@
@@
.:: .::@
.: .:: .:::@
.:: .:: . .::@
.:: .:: .::@
.:: .: .::@
.:: .::@
.:: .::@
@@
.::: .::@
.: .:: .::@
.:: .:: .::@
.:: .:: .::@
.:: .: .::@
.:: .: ::@
.:: .::@
@@
.:::: @
.:: .:: @
.:: .::@
.:: .::@
.:: .::@
.:: .:: @
.:::: @
@@
.::::::: @
.:: .::@
.:: .::@
.::::::: @
.:: @
.:: @
.:: @
@@
.:::: @
.:: .:: @
.:: .::@
.:: .::@
.:: .::@
.:: .: .:: @
.:: :: @
.: @@
.::::::: @
.:: .:: @
.:: .:: @
.: .:: @
.:: .:: @
.:: .:: @
.:: .::@
@@
.:: :: @
.:: .::@
.:: @
.:: @
.:: @
.:: .::@
.:: :: @
@@
.::: .::::::@
.:: @
.:: @
.:: @
.:: @
.:: @
.:: @
@@
.:: .::@
.:: .::@
.:: .::@
.:: .::@
.:: .::@
.:: .::@
.::::: @
@@
.:: .::@
.:: .:: @
.:: .:: @
.:: .:: @
.:: .:: @
.:::: @
.:: @
@@
.:: .::@
.:: .::@
.:: .: .::@
.:: .:: .::@
.:: .: .:: .::@
.: .: .::::@
.:: .::@
@@
.:: .::@
.:: .:: @
.:: .:: @
.:: @
.:: .:: @
.:: .:: @
.:: .::@
@@
.:: .::@
.:: .:: @
.:: .:: @
.:: @
.:: @
.:: @
.:: @
@@
.::::::: .::@
.:: @
.:: @
.:: @
.:: @
.:: @
.:::::::::::@
@@
.::::@
.:: @
.:: @
.:: @
.:: @
.:: @
.::::@
@@
.:: @
.:: @
.:: @
.:: @
.:: @
.:: @
.::@
@@
.::::@
.::@
.::@
.::@
.::@
.::@
.::::@
@@
.:: @
.:: .:: @
.:: .::@
@
@
@
@
@@
@
@
@
@
@
@
@
.:::::@@
.::@
.: @
@
@
@
@
@
@@
@
@
.:: @
.:: .:: @
.:: .:: @
.:: .:: @
.:: .:::@
@@
.:: @
.:: @
.:: @
.:: .:: @
.:: .::@
.:: .::@
.:: .:: @
@@
@
@
.:::@
.:: @
.:: @
.:: @
.:::@
@@
.::@
.::@
.::@
.:: .::@
.: .::@
.: .::@
.:: .::@
@@
@
@
.:: @
.: .:: @
.::::: .::@
.: @
.:::: @
@@
.::@
.: @
.:.: .:@
.:: @
.:: @
.:: @
.:: @
@@
@
@
.:: @
.:: .::@
.:: .::@
.:: .::@
.:: @
.:: @@
@
.:: @
.:: @
.: .: @
.:: .::@
.: .::@
.:: .::@
@@
@
.:@
@
.::@
.::@
.::@
.::@
@@
@
.::@
@
.::@
.::@
.::@
.::@
.::: @@
.:: @
.:: @
.:: .::@
.:: .:: @
.:.:: @
.:: .:: @
.:: .::@
@@
.::@
.::@
.::@
.::@
.::@
.::@
.:::@
@@
@
@
.::: .:: .:: @
.:: .: .::@
.:: .: .::@
.:: .: .::@
.::: .: .::@
@@
@
@
.:: .:: @
.:: .::@
.:: .::@
.:: .::@
.::: .::@
@@
@
@
.:: @
.:: .:: @
.:: .::@
.:: .:: @
.:: @
@@
@
@
.: .:: @
.: .:: @
.: .::@
.:: .:: @
.:: @
.:: @@
@
@
.:: @
.: .:: @
.: .:: @
.::.:: @
.:: @
.:::@@
@
@
.: .:::@
.:: @
.:: @
.:: @
.::: @
@@
@
@
.:::: @
.:: @
.::: @
.::@
.:: .::@
@@
.:: @
.:: @
.:.: .:@
.:: @
.:: @
.:: @
.:: @
@@
@
@
.:: .::@
.:: .::@
.:: .::@
.:: .::@
.::.::@
@@
@
@
.:: .::@
.:: .:: @
.:: .:: @
.:.:: @
.:: @
@@
@
@
.:: .:::@
.:: : .::@
.:: .: .::@
.: .: .:.::@
.::: .:::@
@@
@
@
.:: .::@
.: .:: @
.: @
.: .:: @
.:: .::@
@@
@
@
.:: .::@
.:: .:: @
.::: @
.:: @
.:: @
.:: @@
@
@
.:::: .::@
.:: @
.:: @
.:: @
.::::::::@
@@
.::@
.:: @
.:: @
.:: @
.:: @
.:: @
.::@
@@
.:@
.:@
.:@
@
.:@
.:@
.:@
@@
.:: @
.:: @
.:: @
.::@
.:: @
.:: @
.:: @
@@
.:: .: @
.: .::@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,134 @@
import { createRule } from '../utils/index.js';
const { hasOwnProperty } = Object.prototype;
const hasOwn = (object, key) => hasOwnProperty.call(object, key);
const defs = {
ArrayExpression: {
option: 'allowArray',
description: 'If `false`, will report default export of an array',
messageId: 'assign',
data: {
type: 'array',
},
},
ArrowFunctionExpression: {
option: 'allowArrowFunction',
description: 'If `false`, will report default export of an arrow function',
messageId: 'assign',
data: {
type: 'arrow function',
},
},
CallExpression: {
option: 'allowCallExpression',
description: 'If `false`, will report default export of a function call',
messageId: 'assign',
data: {
type: 'call result',
},
default: true,
},
ClassDeclaration: {
option: 'allowAnonymousClass',
description: 'If `false`, will report default export of an anonymous class',
messageId: 'anonymous',
data: {
type: 'class',
},
forbid: (node) => !('id' in node.declaration) || !node.declaration.id,
},
FunctionDeclaration: {
option: 'allowAnonymousFunction',
description: 'If `false`, will report default export of an anonymous function',
messageId: 'anonymous',
data: {
type: 'function',
},
forbid: (node) => !('id' in node.declaration) || !node.declaration.id,
},
Literal: {
option: 'allowLiteral',
description: 'If `false`, will report default export of a literal',
messageId: 'assign',
data: {
type: 'literal',
},
},
ObjectExpression: {
option: 'allowObject',
description: 'If `false`, will report default export of an object expression',
messageId: 'assign',
data: {
type: 'object',
},
},
TemplateLiteral: {
option: 'allowLiteral',
description: 'If `false`, will report default export of a literal',
messageId: 'assign',
data: {
type: 'literal',
},
},
NewExpression: {
option: 'allowNew',
description: 'If `false`, will report default export of a class instantiation',
messageId: 'assign',
data: {
type: 'instance',
},
},
};
const schemaProperties = Object.fromEntries(Object.values(defs).map(def => [
def.option,
{
description: def.description,
type: 'boolean',
},
]));
const defaults = Object.fromEntries(Object.values(defs).map(def => [
def.option,
hasOwn(def, 'default') ? def.default : false,
]));
export default createRule({
name: 'no-anonymous-default-export',
meta: {
type: 'suggestion',
docs: {
category: 'Style guide',
description: 'Forbid anonymous values as default exports.',
},
schema: [
{
type: 'object',
properties: schemaProperties,
additionalProperties: false,
},
],
messages: {
assign: 'Assign {{type}} to a variable before exporting as module default',
anonymous: 'Unexpected default export of anonymous {{type}}',
},
},
defaultOptions: [],
create(context) {
const options = { ...defaults, ...context.options[0] };
return {
ExportDefaultDeclaration(node) {
const type = node.declaration
.type;
if (!(type in defs)) {
return;
}
const def = defs[type];
if (!options[def.option] && (!('forbid' in def) || def.forbid(node))) {
context.report({
node,
messageId: def.messageId,
data: def.data,
});
}
},
};
},
});
//# sourceMappingURL=no-anonymous-default-export.js.map
@@ -0,0 +1,18 @@
import isBrowser from '../../../utils/isBrowser';
import isDocumentVisible from './isDocumentVisible';
var listeners = new Set();
function subscribe(listener) {
listeners.add(listener);
return function unsubscribe() {
listeners.has(listener) && listeners.delete(listener);
};
}
if (isBrowser) {
var revalidate = function () {
if (!isDocumentVisible())
return;
listeners.forEach(function (listener) { return listener(); });
};
window.addEventListener('visibilitychange', revalidate, false);
}
export default subscribe;
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var FooterRole = {
relatedConcepts: [{
module: 'HTML',
concept: {
name: 'footer'
}
}],
type: 'structure'
};
var _default = FooterRole;
exports.default = _default;
@@ -0,0 +1,40 @@
import type { Readable } from 'node:stream';
import { type AnyWebByteStream } from './stream/index.js';
import { ReadStreamTokenizer } from './ReadStreamTokenizer.js';
import { BufferTokenizer } from './BufferTokenizer.js';
import type { ITokenizerOptions } from './types.js';
import { BlobTokenizer } from './BlobTokenizer.js';
export { EndOfStreamError, AbortError, type AnyWebByteStream } from './stream/index.js';
export type { ITokenizer, IRandomAccessTokenizer, IFileInfo, IRandomAccessFileInfo, ITokenizerOptions, IReadChunkOptions, OnClose } from './types.js';
export type { IToken, IGetToken } from '@tokenizer/token';
export { AbstractTokenizer } from './AbstractTokenizer.js';
/**
* Construct ReadStreamTokenizer from given Stream.
* Will set fileSize, if provided given Stream has set the .path property/
* @param stream - Read from Node.js Stream.Readable
* @param options - Tokenizer options
* @returns ReadStreamTokenizer
*/
export declare function fromStream(stream: Readable, options?: ITokenizerOptions): ReadStreamTokenizer;
/**
* Construct ReadStreamTokenizer from given ReadableStream (WebStream API).
* Will set fileSize, if provided given Stream has set the .path property/
* @param webStream - Read from Node.js Stream.Readable (must be a byte stream)
* @param options - Tokenizer options
* @returns ReadStreamTokenizer
*/
export declare function fromWebStream(webStream: AnyWebByteStream, options?: ITokenizerOptions): ReadStreamTokenizer;
/**
* Construct ReadStreamTokenizer from given Buffer.
* @param uint8Array - Uint8Array to tokenize
* @param options - Tokenizer options
* @returns BufferTokenizer
*/
export declare function fromBuffer(uint8Array: Uint8Array, options?: ITokenizerOptions): BufferTokenizer;
/**
* Construct ReadStreamTokenizer from given Blob.
* @param blob - Uint8Array to tokenize
* @param options - Tokenizer options
* @returns BufferTokenizer
*/
export declare function fromBlob(blob: Blob, options?: ITokenizerOptions): BlobTokenizer;
@@ -0,0 +1 @@
{"version":3,"file":"edit-map.d.ts","sourceRoot":"","sources":["edit-map.js"],"names":[],"mappings":"AAAA;;GAEG;AAeH;;;GAGG;AAEH;;GAEG;AACH;IAKI;;;;OAIG;IACH,KAFU,KAAK,CAAC,MAAM,CAAC,CAEV;IAGf;;;;;;;OAOG;IACH,WALW,MAAM,UACN,MAAM,OACN,KAAK,CAAC,KAAK,CAAC,GACV,SAAS,CAIrB;IAeD;;;;;OAKG;IACH,gBAHW,KAAK,CAAC,KAAK,CAAC,GACV,SAAS,CA2DrB;CACF;qBA7GY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;mBAC9B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;2BAlBb,sBAAsB"}
@@ -0,0 +1,51 @@
'use strict';
var $TypeError = require('es-errors/type');
var floor = require('./floor');
var IsFixedLengthArrayBuffer = require('./IsFixedLengthArrayBuffer');
var IsTypedArrayOutOfBounds = require('./IsTypedArrayOutOfBounds');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var isTypedArrayWithBufferWitnessRecord = require('../helpers/records/typed-array-with-buffer-witness-record');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var typedArrayLength = require('typed-array-length');
// https://www.ecma-international.org/ecma-262/15.0/#sec-typedarraylength
module.exports = function TypedArrayLength(taRecord) {
if (!isTypedArrayWithBufferWitnessRecord(taRecord)) {
throw new $TypeError('Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record');
}
if (IsTypedArrayOutOfBounds(taRecord)) {
throw new $TypeError('Assertion failed: `taRecord` is out of bounds'); // step 1
}
var O = taRecord['[[Object]]']; // step 2
var isFixed = IsFixedLengthArrayBuffer(typedArrayBuffer(O));
var length = isFixed ? typedArrayLength(O) : 'AUTO';
if (length !== 'AUTO') {
return length; // step 3
}
if (isFixed) {
throw new $TypeError('Assertion failed: array buffer is not fixed length'); // step 4
}
var byteOffset = typedArrayByteOffset(O); // step 5
var elementSize = TypedArrayElementSize(O); // step 6
var byteLength = taRecord['[[CachedBufferByteLength]]']; // step 7
if (byteLength === 'DETACHED') {
throw new $TypeError('Assertion failed: typed array is detached'); // step 8
}
return floor((byteLength - byteOffset) / elementSize); // step 9
};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F wC","292":"A B"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 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":"xC TC 0C 1C","164":"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"},D:{"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 S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB"},E:{"1":"F A B C L M G 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E 2C ZC 3C 4C 5C"},F:{"1":"0 1 2 3 4 5 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 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB FD GD HD ID NC uC JD OC"},G:{"1":"PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD","2":"J"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","164":"1D"}},B:5,C:":placeholder-shown CSS pseudo-class",D:true};
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC;AAgBM,MAAM;IAYX,yHAAyH,GACzH,0CAA0C,OAA2B,EAAkD;QACrH,OAAO,QAAQ,MAAM,CAAC,CAAC,KAAK;YAC1B,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,MACrB,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE;iBAEpB,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE;YAEtB,OAAO;QACT,GAAG;YAAC,IAAI;YAAO,IAAI;SAAM;IAC3B;IAEA,+EAA+E,GAC/E,iBAAiB,OAA2B,EAAE,kBAAwC,EAAE,mBAA0C,EAAE,iBAAwC,EAAwB;QAClM,OAAO,IAAI,IAAI,QAAQ,GAAG,CAAC,CAAA;YACzB,IAAI,oBAAoB,GAAG,CAAC,IAAI,GAAG,GACjC,OAAO;gBAAC,IAAI,GAAG;gBAAE,mBAAmB,GAAG,CAAC,IAAI,GAAG;aAAE;iBAEjD,OAAO;gBAAC,IAAI,GAAG;gBAAE,kBAAkB,GAAG,CAAC,IAAI,GAAG,EAAG,KAAK,CAAC,KAAK;aAAC;QAEjE;IACF;IAEA,oFAAoF,GACpF,6BAA6B,mBAA0C,EAAwB;QAC7F,OAAO,IAAI,IAAI,MAAM,IAAI,CAAC,qBAAqB,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI;gBAC5B,uBAAA;gBAA1B,yBAAA;mBAAN;gBAAC;gBAAK,CAAA,OAAA,CAAA,0BAAA,IAAI,KAAK,CAAC,YAAY,cAAtB,qCAAA,2BAA0B,wBAAA,CAAA,QAAA,IAAI,EAAC,eAAe,cAApB,4CAAA,2BAAA,OAAuB,kBAAjD,kBAAA,OAAyD;aAAM;;IAEzE;IAEA,eAAe,GAAQ,EAAU;YACxB;QAAP,OAAO,CAAA,yBAAA,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,kBAAtB,oCAAA,yBAA8B;IACvC;IAEA,kBAAkB,GAAQ,EAAU;YAC3B;QAAP,OAAO,CAAA,4BAAA,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,kBAAzB,uCAAA,4BAAiC;IAC1C;IAEA,kBAAkB,GAAQ,EAAU;YAC3B;QAAP,OAAO,CAAA,4BAAA,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,kBAAzB,uCAAA,4BAAiC;IAC1C;IAEA,kBAAkB,UAA8B,EAAE,kBAAwC,EAAE,GAAQ,EAAE,KAAa,EAAwB;QACzI,IAAI,mBAAmB,IAAI,CAAC,YAAY;QACxC,IAAI,SAAS;QACb,IAAI,YAAY,IAAI;QAEpB,QAAQ,KAAK,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,KAAK,KAAK,CAAC;QAE/F,WAAW,OAAO,CAAC,OAAO,CAAC,CAAA;gBAMG,uBAEA;YAP5B,IAAI,OAAO,GAAG,KAAK,KAAK;gBACtB,UAAU,GAAG,CAAC,OAAO,GAAG,EAAE;gBAC1B,SAAS;YACX,OAAO,IAAI,QACT,2DAA2D;YAC3D,UAAU,GAAG,CAAC,OAAO,GAAG,EAAE,CAAA,wBAAA,iBAAiB,GAAG,CAAC,OAAO,GAAG,eAA/B,mCAAA,wBAAoC;iBAE9D,UAAU,GAAG,CAAC,OAAO,GAAG,EAAE,CAAA,sBAAA,OAAO,KAAK,CAAC,KAAK,cAAlB,iCAAA,sBAAsB,mBAAmB,GAAG,CAAC,OAAO,GAAG;QAErF;QAEA,OAAO;IACT;IAEA,kBAAkB,UAAkB,EAAE,UAA8B,EAAE,MAA4B,EAAoB;QACpH,IAAI,CAAC,YAAY,GAAG,IAAI;QACxB,IAAI,CAAC,eAAe,GAAG,IAAI;QAC3B,IAAI,CAAC,eAAe,GAAG,IAAI;QAE3B,0CAA0C;QAC1C,IAAI,eAAe,CAAA,GAAA,yCAAmB,EACpC,YACA,WAAW,OAAO,CAAC,GAAG,CAAC,CAAA,MAAQ,CAAA;gBAAC,GAAG,IAAI,KAAK;gBAAE,KAAK,IAAI,GAAG;YAAA,CAAA,IAC1D,QACA,CAAC,IAAM,IAAI,CAAC,eAAe,CAAC,WAAW,OAAO,CAAC,EAAE,GACjD,CAAC,IAAM,IAAI,CAAC,kBAAkB,CAAC,WAAW,OAAO,CAAC,EAAE;QAGtD,oEAAoE;QACpE,aAAa,OAAO,CAAC,CAAC,OAAO;YAC3B,IAAI,MAAM,WAAW,OAAO,CAAC,MAAM,CAAC,GAAG;YACvC,IAAI,SAAS,WAAW,OAAO,CAAC,MAAM;YACtC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK;gBACe;YAA1C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAA,GAAA,yCAAU,EAAE,CAAA,yBAAA,OAAO,KAAK,CAAC,QAAQ,cAArB,oCAAA,yBAAyB,IAAI,CAAC,kBAAkB,CAAC,SAAS;YACpG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAA,GAAA,yCAAU,EAAE,OAAO,KAAK,CAAC,QAAQ,EAAE;QACnE;QACA,OAAO,IAAI,CAAC,YAAY;IAC1B;IA5FA,YAAY,OAAoC,CAAE;aAJlD,eAAiC,IAAI;aACrC,kBAAoC,IAAI;aACxC,kBAAoC,IAAI;YAGf;QAAvB,IAAI,CAAC,eAAe,GAAG,CAAA,2BAAA,oBAAA,8BAAA,QAAS,eAAe,cAAxB,sCAAA,2BAA6B,IAAM;YAChC;QAA1B,IAAI,CAAC,kBAAkB,GAAG,CAAA,8BAAA,oBAAA,8BAAA,QAAS,kBAAkB,cAA3B,yCAAA,8BAAgC,IAAM;IAClE;AA0FF","sources":["packages/@react-stately/table/src/TableColumnLayout.ts"],"sourcesContent":["/*\n * Copyright 2022 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 {\n calculateColumnSizes,\n getMaxWidth,\n getMinWidth\n} from './TableUtils';\nimport {ColumnSize, TableCollection} from '@react-types/table';\nimport {GridNode} from '@react-types/grid';\nimport {Key} from '@react-types/shared';\n\nexport interface TableColumnLayoutOptions<T> {\n getDefaultWidth?: (column: GridNode<T>) => ColumnSize | null | undefined,\n getDefaultMinWidth?: (column: GridNode<T>) => ColumnSize | null | undefined\n}\n\nexport class TableColumnLayout<T> {\n getDefaultWidth: (column: GridNode<T>) => ColumnSize | null | undefined;\n getDefaultMinWidth: (column: GridNode<T>) => ColumnSize | null | undefined;\n columnWidths: Map<Key, number> = new Map();\n columnMinWidths: Map<Key, number> = new Map();\n columnMaxWidths: Map<Key, number> = new Map();\n\n constructor(options: TableColumnLayoutOptions<T>) {\n this.getDefaultWidth = options?.getDefaultWidth ?? (() => '1fr');\n this.getDefaultMinWidth = options?.getDefaultMinWidth ?? (() => 75);\n }\n\n /** Takes an array of columns and splits it into 2 maps of columns with controlled and columns with uncontrolled widths. */\n splitColumnsIntoControlledAndUncontrolled(columns: Array<GridNode<T>>): [Map<Key, GridNode<T>>, Map<Key, GridNode<T>>] {\n return columns.reduce((acc, col) => {\n if (coLine truncated
@@ -0,0 +1,2 @@
declare const useMountedRef: () => import("react").MutableRefObject<boolean>;
export default useMountedRef;
@@ -0,0 +1,18 @@
import { M as MS_IN_DAY } from "./constants-BuFquuHl.mjs";
import { d as daysOfYear } from "./daysOfYear-tJ4F7T8N.mjs";
function dayOfYear(date, val) {
const monthDays = daysOfYear(date.getFullYear());
const currentMonth = date.getMonth();
let dayCount = date.getDate();
for (let i = 0; i < currentMonth; i++) {
dayCount += monthDays[i];
}
if (val === void 0) {
return dayCount;
}
date.setTime(+date + (val - dayCount) * MS_IN_DAY);
return date;
}
export {
dayOfYear as default
};
@@ -0,0 +1,28 @@
import { c as createCLI } from './chunks/cac.B_NTJoIH.js';
import '@vitest/utils/helpers';
import 'events';
import 'pathe';
import 'tinyrainbow';
import './chunks/constants.D_Q9UYh-.js';
import './chunks/index.kotH7DY7.js';
import 'node:fs';
import 'node:fs/promises';
import 'node:perf_hooks';
import '@vitest/runner/utils';
import '@vitest/utils/source-map';
import './chunks/env.D4Lgay0q.js';
import 'std-env';
import 'node:util';
import 'node:console';
import 'node:stream';
import '@vitest/utils/display';
import 'node:os';
import 'tinyexec';
import './path.js';
import 'node:path';
import 'node:url';
import 'vite';
import '@vitest/utils/offset';
import 'node:module';
createCLI().parse();
@@ -0,0 +1,28 @@
'use strict';
var $TypeError = require('es-errors/type');
var $byteLength = require('array-buffer-byte-length');
var availableTypedArrays = require('available-typed-arrays')();
var callBound = require('call-bound');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
// https://262.ecma-international.org/8.0/#sec-isdetachedbuffer
module.exports = function IsDetachedBuffer(arrayBuffer) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
}
if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) {
try {
new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new
} catch (error) {
return !!error && error.name === 'TypeError';
}
}
return false;
};
@@ -0,0 +1 @@
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAID,IAAI,8BAAQ,IAAI;AAOT,SAAS,0CAAY,OAA8B;IACxD,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,mCAAQ;IAEvB,IAAI,WAAW,SAAU,CAAA,UAAU,OAAO,OAAO,CAAC,SAAS,IAAI,CAAC,CAAC,GAAG,IAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,GAAG,IAAI,KAAK,EAAC;IAC1G,IAAI,4BAAM,GAAG,CAAC,WACZ,OAAO,4BAAM,GAAG,CAAC;IAGnB,IAAI,YAAY,IAAI,KAAK,QAAQ,CAAC,QAAQ;IAC1C,4BAAM,GAAG,CAAC,UAAU;IACpB,OAAO;AACT","sources":["packages/@react-aria/i18n/src/useCollator.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 {useLocale} from './context';\n\nlet cache = new Map<string, Intl.Collator>();\n\n/**\n * Provides localized string collation for the current locale. Automatically updates when the locale changes,\n * and handles caching of the collator for performance.\n * @param options - Collator options.\n */\nexport function useCollator(options?: Intl.CollatorOptions): Intl.Collator {\n let {locale} = useLocale();\n\n let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : '');\n if (cache.has(cacheKey)) {\n return cache.get(cacheKey)!;\n }\n\n let formatter = new Intl.Collator(locale, options);\n cache.set(cacheKey, formatter);\n return formatter;\n}\n"],"names":[],"version":3,"file":"useCollator.main.js.map"}
@@ -0,0 +1,15 @@
const checkStringStartsWith = (token) => (key) => typeof key === "string" && key.startsWith(token);
const isCSSVariableName =
/*@__PURE__*/ checkStringStartsWith("--");
const startsAsVariableToken =
/*@__PURE__*/ checkStringStartsWith("var(--");
const isCSSVariableToken = (value) => {
const startsWithToken = startsAsVariableToken(value);
if (!startsWithToken)
return false;
// Ensure any comments are stripped from the value as this can harm performance of the regex.
return singleCssVariableRegex.test(value.split("/*")[0].trim());
};
const singleCssVariableRegex = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
export { isCSSVariableName, isCSSVariableToken };
@@ -0,0 +1,143 @@
'use strict';
function createMultipartBuffers(boundary, sizes) {
const bufs = [];
for (let i = 0; i < sizes.length; ++i) {
const mb = sizes[i] * 1024 * 1024;
bufs.push(Buffer.from([
`--${boundary}`,
`content-disposition: form-data; name="field${i + 1}"`,
'',
'0'.repeat(mb),
'',
].join('\r\n')));
}
bufs.push(Buffer.from([
`--${boundary}--`,
'',
].join('\r\n')));
return bufs;
}
const boundary = '-----------------------------168072824752491622650073';
const buffers = createMultipartBuffers(boundary, (new Array(100)).fill(1));
const calls = {
partBegin: 0,
headerField: 0,
headerValue: 0,
headerEnd: 0,
headersEnd: 0,
partData: 0,
partEnd: 0,
end: 0,
};
const moduleName = process.argv[2];
switch (moduleName) {
case 'busboy': {
const busboy = require('busboy');
const parser = busboy({
limits: {
fieldSizeLimit: Infinity,
},
headers: {
'content-type': `multipart/form-data; boundary=${boundary}`,
},
});
parser.on('field', (name, val, info) => {
++calls.partBegin;
++calls.partData;
++calls.partEnd;
}).on('close', () => {
++calls.end;
console.timeEnd(moduleName);
});
console.time(moduleName);
for (const buf of buffers)
parser.write(buf);
break;
}
case 'formidable': {
const { MultipartParser } = require('formidable');
const parser = new MultipartParser();
parser.initWithBoundary(boundary);
parser.on('data', ({ name }) => {
++calls[name];
if (name === 'end')
console.timeEnd(moduleName);
});
console.time(moduleName);
for (const buf of buffers)
parser.write(buf);
break;
}
case 'multiparty': {
const { Readable } = require('stream');
const { Form } = require('multiparty');
const form = new Form({
maxFieldsSize: Infinity,
maxFields: Infinity,
maxFilesSize: Infinity,
autoFields: false,
autoFiles: false,
});
const req = new Readable({ read: () => {} });
req.headers = {
'content-type': `multipart/form-data; boundary=${boundary}`,
};
function hijack(name, fn) {
const oldFn = form[name];
form[name] = function() {
fn();
return oldFn.apply(this, arguments);
};
}
hijack('onParseHeaderField', () => {
++calls.headerField;
});
hijack('onParseHeaderValue', () => {
++calls.headerValue;
});
hijack('onParsePartBegin', () => {
++calls.partBegin;
});
hijack('onParsePartData', () => {
++calls.partData;
});
hijack('onParsePartEnd', () => {
++calls.partEnd;
});
form.on('close', () => {
++calls.end;
console.timeEnd(moduleName);
}).on('part', (p) => p.resume());
console.time(moduleName);
form.parse(req);
for (const buf of buffers)
req.push(buf);
req.push(null);
break;
}
default:
if (moduleName === undefined)
console.error('Missing parser module name');
else
console.error(`Invalid parser module name: ${moduleName}`);
process.exit(1);
}
@@ -0,0 +1,97 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {DOMAttributes, FocusableElement} from '@react-types/shared';
import {getOwnerWindow, isFocusable, mergeProps, mergeRefs, useObjectRef} from '@react-aria/utils';
import {PressProps, usePress} from './usePress';
import React, {ForwardedRef, ReactElement, useEffect} from 'react';
import {useFocusable} from './useFocusable';
interface PressableProps extends PressProps {
children: ReactElement<DOMAttributes, string>
}
export const Pressable:
React.ForwardRefExoticComponent<PressableProps & React.RefAttributes<FocusableElement>> =
React.forwardRef(({children, ...props}: PressableProps, ref: ForwardedRef<FocusableElement>) => {
ref = useObjectRef(ref);
let {pressProps} = usePress({...props, ref});
let {focusableProps} = useFocusable(props, ref);
let child = React.Children.only(children);
useEffect(() => {
if (process.env.NODE_ENV === 'production') {
return;
}
let el = ref.current;
if (!el || !(el instanceof getOwnerWindow(el).Element)) {
console.error('<Pressable> child must forward its ref to a DOM element.');
return;
}
if (!props.isDisabled && !isFocusable(el)) {
console.warn('<Pressable> child must be focusable. Please ensure the tabIndex prop is passed through.');
return;
}
if (
el.localName !== 'button' &&
el.localName !== 'input' &&
el.localName !== 'select' &&
el.localName !== 'textarea' &&
el.localName !== 'a' &&
el.localName !== 'area' &&
el.localName !== 'summary'
) {
let role = el.getAttribute('role');
if (!role) {
console.warn('<Pressable> child must have an interactive ARIA role.');
} else if (
// https://w3c.github.io/aria/#widget_roles
role !== 'application' &&
role !== 'button' &&
role !== 'checkbox' &&
role !== 'combobox' &&
role !== 'gridcell' &&
role !== 'link' &&
role !== 'menuitem' &&
role !== 'menuitemcheckbox' &&
role !== 'menuitemradio' &&
role !== 'option' &&
role !== 'radio' &&
role !== 'searchbox' &&
role !== 'separator' &&
role !== 'slider' &&
role !== 'spinbutton' &&
role !== 'switch' &&
role !== 'tab' &&
role !== 'textbox' &&
role !== 'treeitem'
) {
console.warn(`<Pressable> child must have an interactive ARIA role. Got "${role}".`);
}
}
}, [ref, props.isDisabled]);
// @ts-ignore
let childRef = parseInt(React.version, 10) < 19 ? child.ref : child.props.ref;
return React.cloneElement(
child,
{
...mergeProps(pressProps, focusableProps, child.props),
// @ts-ignore
ref: mergeRefs(childRef, ref)
}
);
});
@@ -0,0 +1,36 @@
import {useEffectEvent as $8ae05eaa5c114e9c$export$7f54fc3180508a52} from "./useEffectEvent.module.js";
import {useRef as $8rM3G$useRef, useEffect as $8rM3G$useEffect} from "react";
/*
* Copyright 2023 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
let resetValue = (0, $8rM3G$useRef)(initialValue);
let handleReset = (0, $8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
if (onReset) onReset(resetValue.current);
});
(0, $8rM3G$useEffect)(()=>{
var _ref_current;
let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;
form === null || form === void 0 ? void 0 : form.addEventListener('reset', handleReset);
return ()=>{
form === null || form === void 0 ? void 0 : form.removeEventListener('reset', handleReset);
};
}, [
ref,
handleReset
]);
}
export {$99facab73266f662$export$5add1d006293d136 as useFormReset};
//# sourceMappingURL=useFormReset.module.js.map
@@ -0,0 +1,37 @@
import { hasAnchor } from './identity.js';
/**
* Recursively convert any node or its contents to native JavaScript
*
* @param value - The input value
* @param arg - If `value` defines a `toJSON()` method, use this
* as its first argument
* @param ctx - Conversion context, originally set in Document#toJS(). If
* `{ keep: true }` is not set, output should be suitable for JSON
* stringification.
*/
function toJS(value, arg, ctx) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
if (Array.isArray(value))
return value.map((v, i) => toJS(v, String(i), ctx));
if (value && typeof value.toJSON === 'function') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
if (!ctx || !hasAnchor(value))
return value.toJSON(arg, ctx);
const data = { aliasCount: 0, count: 1, res: undefined };
ctx.anchors.set(value, data);
ctx.onCreate = res => {
data.res = res;
delete ctx.onCreate;
};
const res = value.toJSON(arg, ctx);
if (ctx.onCreate)
ctx.onCreate(res);
return res;
}
if (typeof value === 'bigint' && !ctx?.keep)
return Number(value);
return value;
}
export { toJS };
@@ -0,0 +1,99 @@
{
"name": "call-bound",
"version": "1.0.4",
"description": "Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=auto",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"prelint": "evalmd README.md",
"lint": "eslint --ext=.js,.mjs .",
"postlint": "tsc -p . && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/call-bound.git"
},
"keywords": [
"javascript",
"ecmascript",
"es",
"js",
"callbind",
"callbound",
"call",
"bind",
"bound",
"call-bind",
"call-bound",
"function",
"es-abstract"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/ljharb/call-bound/issues"
},
"homepage": "https://github.com/ljharb/call-bound#readme",
"dependencies": {
"call-bind-apply-helpers": "^1.0.2",
"get-intrinsic": "^1.3.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.3.0",
"@types/call-bind": "^1.0.5",
"@types/get-intrinsic": "^1.2.3",
"@types/tape": "^5.8.1",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.7.1",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"for-each": "^0.3.5",
"gopd": "^1.2.0",
"has-strict-mode": "^1.1.0",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.4",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"testling": {
"files": "test/index.js"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1 @@
{"name":"loose-envify","version":"1.4.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532098671,"integrity":"sha512-crvgXTtM5z8Sv5hDkX8gUKWnyHDEHzwE2zphbwKqb3O5XwJ9iSFNaLM+0KmiWdbeY/pCkdy/dI+4GMRhWf0NUg==","mode":420,"size":809},"cli.js":{"checkedAt":1794532098671,"integrity":"sha512-9ZkQjMbChAEFF7qAxtWD4OCGEVTn2Fx9g8uwVS2JNZAWUMmX6LmlypEi85MKfrsPQXXVN1rBD4KXHT7XlDsm8w==","mode":493,"size":356},"custom.js":{"checkedAt":1794532098671,"integrity":"sha512-sW93SfsuP/UFPvabKJQ9EzyUxr33aNqCae2adNAze7YXVnt2HLGn0CC3ezNAr/YIy/xYpWlQk3sW0r2LRAtztA==","mode":420,"size":83},"index.js":{"checkedAt":1794532098671,"integrity":"sha512-jvu1qCw7qum0FbokONShC7jcJDFUkm+9W+AaDVnOAsKylY9aRoHEbJacyGR9wJKR4taVZZd5R1UIudVKeZ4bYw==","mode":420,"size":72},"LICENSE":{"checkedAt":1794532098671,"integrity":"sha512-P0ujVqvDtXqVSAS2jr4EXHQOAsytRzS58zoHZiLHNIhxAmluamoS+anglfyc+c/VyESRChd5wY9JB5d37JbuoA==","mode":420,"size":1100},"loose-envify.js":{"checkedAt":1794532098672,"integrity":"sha512-+KmNflsgkvP5b0kANLQdaMhn0eN59CsAdYG+V0kz52+YIeyAQsnbq68LNWeO1Sz+SReNae4cbshSW/nkm6OAwA==","mode":420,"size":791},"README.md":{"checkedAt":1794532098672,"integrity":"sha512-5vgqS3eO7jqjpltXysxhc3pLHsBAcjAC7TylSBmGe3I0FI4OwQnydTyCLGUIsvI0LckRGaRlRaETKBODDvRczA==","mode":420,"size":1071},"replace.js":{"checkedAt":1794532098672,"integrity":"sha512-2SRGQPcTwbh/oJMJY6+6ct9auTV+yEmjxr7/VecZMoNDNqPnr3MbIq2JbAppOzakZFs7/zFp+7rD4o78VseVzg==","mode":420,"size":1532}}}
@@ -0,0 +1,45 @@
// src/bulk/delete-document.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var DeleteDocumentBulkIcon = (props) => /* @__PURE__ */ jsxs(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ jsx(
"path",
{
d: "M21.07 5.23c-1.61-.16-3.22-.28-4.84-.37v-.01l-.22-1.3c-.15-.92-.37-2.3-2.71-2.3h-2.62c-2.33 0-2.55 1.32-2.71 2.29l-.21 1.28c-.93.06-1.86.12-2.79.21l-2.04.2c-.42.04-.72.41-.68.82.04.41.4.71.82.67l2.04-.2c5.24-.52 10.52-.32 15.82.21h.08c.38 0 .71-.29.75-.68a.766.766 0 0 0-.69-.82Z",
fill: "currentColor"
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M19.23 8.14c-.24-.25-.57-.39-.91-.39H5.68c-.34 0-.68.14-.91.39-.23.25-.36.59-.34.94l.62 10.26c.11 1.52.25 3.42 3.74 3.42h6.42c3.49 0 3.63-1.89 3.74-3.42l.62-10.25c.02-.36-.11-.7-.34-.95Z",
fill: "currentColor",
opacity: 0.399
}
),
/* @__PURE__ */ jsx(
"path",
{
clipRule: "evenodd",
d: "M9.58 17a.75.75 0 0 1 .75-.75h3.33a.75.75 0 0 1 0 1.5h-3.33a.75.75 0 0 1-.75-.75ZM8.75 13a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75Z",
fill: "currentColor",
fillRule: "evenodd"
}
)
]
}
);
export {
DeleteDocumentBulkIcon
};
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = ttf2base64;
var _bytes2base = _interopRequireDefault(require("./util/bytes2base64"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file otf转bse64字体
* @author mengke01(kekee000@gmail.com)
*/
/**
* ttf 二进制转base64编码
*
* @param {Array} arrayBuffer ArrayBuffer对象
* @return {string} base64编码
*/
function ttf2base64(arrayBuffer) {
return 'data:font/otf;charset=utf-8;base64,' + (0, _bytes2base.default)(arrayBuffer);
}
@@ -0,0 +1,3 @@
export * from './mapped-key.mjs';
export * from './mapped-result.mjs';
export * from './mapped.mjs';
@@ -0,0 +1,41 @@
var $fhpU6$reactariautils = require("@react-aria/utils");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "isElementVisible", () => $d5156037ad898a4d$export$e989c0fffaa6b27a);
/*
* Copyright 2021 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $d5156037ad898a4d$var$isStyleVisible(element) {
const windowObject = (0, $fhpU6$reactariautils.getOwnerWindow)(element);
if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement)) return false;
let { display: display, visibility: visibility } = element.style;
let isVisible = display !== 'none' && visibility !== 'hidden' && visibility !== 'collapse';
if (isVisible) {
const { getComputedStyle: getComputedStyle } = element.ownerDocument.defaultView;
let { display: computedDisplay, visibility: computedVisibility } = getComputedStyle(element);
isVisible = computedDisplay !== 'none' && computedVisibility !== 'hidden' && computedVisibility !== 'collapse';
}
return isVisible;
}
function $d5156037ad898a4d$var$isAttributeVisible(element, childElement) {
return !element.hasAttribute('hidden') && // Ignore HiddenSelect when tree walking.
!element.hasAttribute('data-react-aria-prevent-focus') && (element.nodeName === 'DETAILS' && childElement && childElement.nodeName !== 'SUMMARY' ? element.hasAttribute('open') : true);
}
function $d5156037ad898a4d$export$e989c0fffaa6b27a(element, childElement) {
return element.nodeName !== '#comment' && $d5156037ad898a4d$var$isStyleVisible(element) && $d5156037ad898a4d$var$isAttributeVisible(element, childElement) && (!element.parentElement || $d5156037ad898a4d$export$e989c0fffaa6b27a(element.parentElement, element));
}
//# sourceMappingURL=isElementVisible.main.js.map
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAsCM,SAAS,0CAAU,KAAqC,EAAE,GAAmB;IAClF,IAAI,eACF,cAAc,sBACd,UAAU,WACV,OAAO,gBACP,YAAY,cACZ,UAAU,aACV,SAAS,iBACT,aAAa,uBACb,mBAAmB,0BACnB,4BAA4B;IAC5B,sBAAsB,EACtB,aAAa;IACb,SAAS,iBAAiB,QAC1B,IAAI,UACJ,MAAM,OACN,GAAG,QACH,OAAO,UACR,GAAG;IACJ,IAAI;IACJ,IAAI,gBAAgB,UAClB,kBAAkB;cAChB;QACA,UAAU;IACZ;SAEA,kBAAkB;QAChB,MAAM;QACN,UAAU,aAAa,YAAY;QACnC,MAAM,gBAAgB,OAAO,CAAC,aAAa,OAAO;QAClD,QAAQ,gBAAgB,MAAM,SAAS;QACvC,MAAM,gBAAgB,UAAU,OAAO;QACvC,UAAU,gBAAgB,UAAU,aAAa;QACjD,iBAAiB,CAAC,cAAc,gBAAgB,UAAU,YAAY;QACtE,KAAK,gBAAgB,MAAM,MAAM;IACnC;IAGF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;sBACrC;oBACA;uBACA;iBACA;mBACA;oBACA;6BACA;aACA;IACF;IAEA,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,kCAAW,EAAE,OAAO;IAC3C,IAAI,wBACF,eAAe,QAAQ,GAAG,aAAa,KAAK,eAAe,QAAQ;IAErE,IAAI,cAAc,CAAA,GAAA,gCAAS,EAAE,gBAAgB,YAAY,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAE/F,OAAO;mBACL;QACA,aAAa,CAAA,GAAA,gCAAS,EAAE,iBAAiB,aAAa;YACpD,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,gBAAgB,KAAK,CAAC,eAAe;YACrC,SAAS,CAAC;gBACR,IAAI,mBAAmB;oBACrB,kBAAkB;oBAClB,QAAQ,IAAI,CAAC;gBACf;YACF;QACF;IACF;AACF","sources":["packages/@react-aria/button/src/useButton.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 {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n HTMLAttributes,\n InputHTMLAttributes,\n RefObject\n} from 'react';\nimport {AriaButtonProps} from '@react-types/button';\nimport {DOMAttributes} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {useFocusable} from '@react-aria/focus';\nimport {usePress} from '@react-aria/interactions';\n\nexport interface AriaButtonOptions<E extends ElementType> extends Omit<AriaButtonProps<E>, 'children'> {}\n\nexport interface ButtonAria<T> {\n /** Props for the button element. */\n buttonProps: T,\n /** Whether the button is currently pressed. */\n isPressed: boolean\n}\n\n// Order with overrides is important: 'button' should be default\nexport function useButton(props: AriaButtonOptions<'button'>, ref: RefObject<HTMLButtonElement | null>): ButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;\nexport function useButton(props: AriaButtonOptions<'a'>, ref: RefObject<HTMLAnchorElement | null>): ButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;\nexport function useButton(props: AriaButtonOptions<'div'>, ref: RefObject<HTMLDivElement | null>): ButtonAria<HTMLAttributes<HTMLDivElement>>;\nexport function useButton(props: AriaButtonOptions<'input'>, ref: RefObject<HTMLInputElement | null>): ButtonAria<InputHTMLAttributes<HTMLInputElement>>;\nexport function useButton(props: AriaButtonOptions<'span'>, ref: RefObject<HTMLSpanElement | null>): ButtonAria<HTMLAttributes<HTMLSpanElement>>;\nexport function useButton(props: AriaButtonOptions<ElementType>, ref: RefObject<Element | null>): ButtonAria<DOMAttributes>;\n/**\n * Provides the behavior and accessibility implementation for a button component. Handles mouse, keyboard, and touch interactions,\n * focus behavior, and ARIA props for both native button elements and custom element types.\n * @param props - Props to be applied to the button.\n * @param ref - A ref to a DOM element for the button.\n */\nexport function useButton(props: AriaButtonOptions<ElementType>, ref: RefObject<any>): ButtonAria<HTMLAttributes<any>> {\n let {\n elementType = 'button',\n isDisabled,\n onPress,\n onPressStart,\n onPressEnd,\n onPressUp,\n onPressChange,\n preventFocusOnPress,\n // @ts-ignore - undocumented\n allowFocusWhenDisabled,\n // @ts-ignore\n onClick: deprecatedOnClick,\n href,\n target,\n rel,\n type = 'button'\n } = props;\n let additionalProps;\n if (elementType === 'button') {\n additionalProps = {\n type,\n disabled: isDisabled\n };\n } else {\n additionalProps = {\n role: 'button',\n tabIndex: isDisabled ? undefined : 0,\n href: elementType === 'a' && !isDisabled ? href : undefined,\n target: elementType === 'a' ? target : undefined,\n type: elementType === 'input' ? type : undefined,\n disabled: elementType === 'input' ? isDisabled : undefined,\n 'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,\n rel: elementType === 'a' ? rel : undefined\n };\n }\n\n leLine truncated
@@ -0,0 +1,16 @@
import copyObject from './_copyObject.js';
import getSymbols from './_getSymbols.js';
/**
* Copies own symbols of `source` to `object`.
*
* @private
* @param {Object} source The object to copy symbols from.
* @param {Object} [object={}] The object to copy symbols to.
* @returns {Object} Returns `object`.
*/
function copySymbols(source, object) {
return copyObject(source, getSymbols(source), object);
}
export default copySymbols;
@@ -0,0 +1,882 @@
/// <reference types="react" />
import * as motion_dom from 'motion-dom';
import { TransformProperties, MotionNodeOptions, MotionValue, SVGPathProperties, Transition, JSAnimation, ValueTransition, TargetAndTransition, AnyResolvedKeyframe, KeyframeResolver, AnimationDefinition, Batcher } from 'motion-dom';
import { TransformPoint, Box, Delta, Point, Axis } from 'motion-utils';
import * as React$1 from 'react';
import { CSSProperties, PropsWithoutRef, RefAttributes, JSX, SVGAttributes } from 'react';
/**
* Either a string, or array of strings, that reference variants defined via the `variants` prop.
* @public
*/
type VariantLabels = string | string[];
type MotionValueString = MotionValue<string>;
type MotionValueNumber = MotionValue<number>;
type MotionValueAny = MotionValue<any>;
type AnyMotionValue = MotionValueNumber | MotionValueString | MotionValueAny;
type MotionValueHelper<T> = T | AnyMotionValue;
type MakeMotionHelper<T> = {
[K in keyof T]: MotionValueHelper<T[K]>;
};
type MakeCustomValueTypeHelper<T> = MakeMotionHelper<T>;
type MakeMotion<T> = MakeCustomValueTypeHelper<T>;
type MotionCSS = MakeMotion<Omit<CSSProperties, "rotate" | "scale" | "perspective">>;
/**
* @public
*/
type MotionTransform = MakeMotion<TransformProperties>;
type MotionSVGProps = MakeMotion<SVGPathProperties>;
/**
* @public
*/
interface MotionStyle extends MotionCSS, MotionTransform, MotionSVGProps {
}
/**
* Props for `motion` components.
*
* @public
*/
interface MotionProps extends MotionNodeOptions {
/**
*
* The React DOM `style` prop, enhanced with support for `MotionValue`s and separate `transform` values.
*
* ```jsx
* export const MyComponent = () => {
* const x = useMotionValue(0)
*
* return <motion.div style={{ x, opacity: 1, scale: 0.5 }} />
* }
* ```
*/
style?: MotionStyle;
children?: React.ReactNode | MotionValueNumber | MotionValueString;
}
type ReducedMotionConfig = "always" | "never" | "user";
/**
* @public
*/
interface MotionConfigContext {
/**
* Internal, exported only for usage in Framer
*/
transformPagePoint: TransformPoint;
/**
* Internal. Determines whether this is a static context ie the Framer canvas. If so,
* it'll disable all dynamic functionality.
*/
isStatic: boolean;
/**
* Defines a new default transition for the entire tree.
*
* @public
*/
transition?: Transition;
/**
* If true, will respect the device prefersReducedMotion setting by switching
* transform animations off.
*
* @public
*/
reducedMotion?: ReducedMotionConfig;
/**
* A custom `nonce` attribute used when wanting to enforce a Content Security Policy (CSP).
* For more details see:
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles
*
* @public
*/
nonce?: string;
}
/**
* @public
*/
declare const MotionConfigContext: React$1.Context<MotionConfigContext>;
/**
* @public
*/
interface PresenceContextProps {
id: string;
isPresent: boolean;
register: (id: string | number) => () => void;
onExitComplete?: (id: string | number) => void;
initial?: false | VariantLabels;
custom?: any;
}
/**
* @public
*/
declare const PresenceContext: React$1.Context<PresenceContextProps | null>;
interface VisualState<Instance, RenderState> {
renderState: RenderState;
latestValues: ResolvedValues;
onMount?: (instance: Instance) => void;
}
type UseVisualState<Instance, RenderState> = (props: MotionProps, isStatic: boolean) => VisualState<Instance, RenderState>;
interface UseVisualStateConfig<RenderState> {
scrapeMotionValuesFromProps: ScrapeMotionValuesFromProps;
createRenderState: () => RenderState;
}
declare const makeUseVisualState: <I, RS>(config: UseVisualStateConfig<RS>) => UseVisualState<I, RS>;
interface HTMLElements {
a: HTMLAnchorElement;
abbr: HTMLElement;
address: HTMLElement;
area: HTMLAreaElement;
article: HTMLElement;
aside: HTMLElement;
audio: HTMLAudioElement;
b: HTMLElement;
base: HTMLBaseElement;
bdi: HTMLElement;
bdo: HTMLElement;
big: HTMLElement;
blockquote: HTMLQuoteElement;
body: HTMLBodyElement;
br: HTMLBRElement;
button: HTMLButtonElement;
canvas: HTMLCanvasElement;
caption: HTMLElement;
center: HTMLElement;
cite: HTMLElement;
code: HTMLElement;
col: HTMLTableColElement;
colgroup: HTMLTableColElement;
data: HTMLDataElement;
datalist: HTMLDataListElement;
dd: HTMLElement;
del: HTMLModElement;
details: HTMLDetailsElement;
dfn: HTMLElement;
dialog: HTMLDialogElement;
div: HTMLDivElement;
dl: HTMLDListElement;
dt: HTMLElement;
em: HTMLElement;
embed: HTMLEmbedElement;
fieldset: HTMLFieldSetElement;
figcaption: HTMLElement;
figure: HTMLElement;
footer: HTMLElement;
form: HTMLFormElement;
h1: HTMLHeadingElement;
h2: HTMLHeadingElement;
h3: HTMLHeadingElement;
h4: HTMLHeadingElement;
h5: HTMLHeadingElement;
h6: HTMLHeadingElement;
head: HTMLHeadElement;
header: HTMLElement;
hgroup: HTMLElement;
hr: HTMLHRElement;
html: HTMLHtmlElement;
i: HTMLElement;
iframe: HTMLIFrameElement;
img: HTMLImageElement;
input: HTMLInputElement;
ins: HTMLModElement;
kbd: HTMLElement;
keygen: HTMLElement;
label: HTMLLabelElement;
legend: HTMLLegendElement;
li: HTMLLIElement;
link: HTMLLinkElement;
main: HTMLElement;
map: HTMLMapElement;
mark: HTMLElement;
menu: HTMLElement;
menuitem: HTMLElement;
meta: HTMLMetaElement;
meter: HTMLMeterElement;
nav: HTMLElement;
noindex: HTMLElement;
noscript: HTMLElement;
object: HTMLObjectElement;
ol: HTMLOListElement;
optgroup: HTMLOptGroupElement;
option: HTMLOptionElement;
output: HTMLOutputElement;
p: HTMLParagraphElement;
param: HTMLParamElement;
picture: HTMLElement;
pre: HTMLPreElement;
progress: HTMLProgressElement;
q: HTMLQuoteElement;
rp: HTMLElement;
rt: HTMLElement;
ruby: HTMLElement;
s: HTMLElement;
samp: HTMLElement;
search: HTMLElement;
slot: HTMLSlotElement;
script: HTMLScriptElement;
section: HTMLElement;
select: HTMLSelectElement;
small: HTMLElement;
source: HTMLSourceElement;
span: HTMLSpanElement;
strong: HTMLElement;
style: HTMLStyleElement;
sub: HTMLElement;
summary: HTMLElement;
sup: HTMLElement;
table: HTMLTableElement;
template: HTMLTemplateElement;
tbody: HTMLTableSectionElement;
td: HTMLTableDataCellElement;
textarea: HTMLTextAreaElement;
tfoot: HTMLTableSectionElement;
th: HTMLTableHeaderCellElement;
thead: HTMLTableSectionElement;
time: HTMLTimeElement;
title: HTMLTitleElement;
tr: HTMLTableRowElement;
track: HTMLTrackElement;
u: HTMLElement;
ul: HTMLUListElement;
var: HTMLElement;
video: HTMLVideoElement;
wbr: HTMLElement;
webview: HTMLWebViewElement;
}
interface TransformOrigin {
originX?: number | string;
originY?: number | string;
originZ?: number | string;
}
interface HTMLRenderState {
/**
* A mutable record of transforms we want to apply directly to the rendered Element
* every frame. We use a mutable data structure to reduce GC during animations.
*/
transform: ResolvedValues;
/**
* A mutable record of transform origins we want to apply directly to the rendered Element
* every frame. We use a mutable data structure to reduce GC during animations.
*/
transformOrigin: TransformOrigin;
/**
* A mutable record of styles we want to apply directly to the rendered Element
* every frame. We use a mutable data structure to reduce GC during animations.
*/
style: ResolvedValues;
/**
* A mutable record of CSS variables we want to apply directly to the rendered Element
* every frame. We use a mutable data structure to reduce GC during animations.
*/
vars: ResolvedValues;
}
/**
* @public
*/
type ForwardRefComponent<T, P> = {
readonly $$typeof: symbol;
} & ((props: PropsWithoutRef<P> & RefAttributes<T>) => JSX.Element);
type AttributesWithoutMotionProps<Attributes> = {
[K in Exclude<keyof Attributes, keyof MotionProps>]?: Attributes[K];
};
/**
* @public
*/
type HTMLMotionProps<Tag extends keyof HTMLElements> = AttributesWithoutMotionProps<JSX.IntrinsicElements[Tag]> & MotionProps;
/**
* Motion-optimised versions of React's HTML components.
*
* @public
*/
type HTMLMotionComponents = {
[K in keyof HTMLElements]: ForwardRefComponent<HTMLElements[K], HTMLMotionProps<K>>;
};
type UnionStringArray<T extends Readonly<string[]>> = T[number];
declare const svgElements: readonly ["animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "svg", "switch", "symbol", "text", "tspan", "use", "view", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "linearGradient", "radialGradient", "textPath"];
type SVGElements = UnionStringArray<typeof svgElements>;
interface SVGAttributesWithoutMotionProps<T> extends Pick<SVGAttributes<T>, Exclude<keyof SVGAttributes<T>, keyof MotionProps>> {
}
/**
* Blanket-accept any SVG attribute as a `MotionValue`
* @public
*/
type SVGAttributesAsMotionValues<T> = MakeMotion<SVGAttributesWithoutMotionProps<T>>;
type UnwrapSVGFactoryElement<F> = F extends React.SVGProps<infer P> ? P : never;
/**
* @public
*/
interface SVGMotionProps<T> extends SVGAttributesAsMotionValues<T>, MotionProps {
}
/**
* Motion-optimised versions of React's SVG components.
*
* @public
*/
type SVGMotionComponents = {
[K in SVGElements]: ForwardRefComponent<UnwrapSVGFactoryElement<JSX.IntrinsicElements[K]>, SVGMotionProps<UnwrapSVGFactoryElement<JSX.IntrinsicElements[K]>>>;
};
type DOMMotionComponents = HTMLMotionComponents & SVGMotionComponents;
interface SwitchLayoutGroup {
register?: (member: IProjectionNode) => void;
deregister?: (member: IProjectionNode) => void;
}
type InitialPromotionConfig = {
/**
* The initial transition to use when the elements in this group mount (and automatically promoted).
* Subsequent updates should provide a transition in the promote method.
*/
transition?: Transition;
/**
* If the follow tree should preserve its opacity when the lead is promoted on mount
*/
shouldPreserveFollowOpacity?: (member: IProjectionNode) => boolean;
};
type SwitchLayoutGroupContext = SwitchLayoutGroup & InitialPromotionConfig;
/**
* Internal, exported only for usage in Framer
*/
declare const SwitchLayoutGroupContext: React$1.Context<SwitchLayoutGroupContext>;
interface WithDepth {
depth: number;
}
declare class FlatTree {
private children;
private isDirty;
add(child: WithDepth): void;
remove(child: WithDepth): void;
forEach(callback: (child: WithDepth) => void): void;
}
declare class NodeStack {
lead?: IProjectionNode;
prevLead?: IProjectionNode;
members: IProjectionNode[];
add(node: IProjectionNode): void;
remove(node: IProjectionNode): void;
relegate(node: IProjectionNode): boolean;
promote(node: IProjectionNode, preserveFollowOpacity?: boolean): void;
exitAnimationComplete(): void;
scheduleRender(): void;
/**
* Clear any leads that have been removed this render to prevent them from being
* used in future animations and to prevent memory leaks
*/
removeLeadSnapshot(): void;
}
interface Measurements {
animationId: number;
measuredBox: Box;
layoutBox: Box;
latestValues: ResolvedValues;
source: number;
}
type Phase = "snapshot" | "measure";
interface ScrollMeasurements {
animationId: number;
phase: Phase;
offset: Point;
isRoot: boolean;
wasRoot: boolean;
}
type LayoutEvents = "willUpdate" | "didUpdate" | "beforeMeasure" | "measure" | "projectionUpdate" | "animationStart" | "animationComplete";
interface IProjectionNode<I = unknown> {
id: number;
animationId: number;
animationCommitId: number;
parent?: IProjectionNode;
relativeParent?: IProjectionNode;
root?: IProjectionNode;
children: Set<IProjectionNode>;
path: IProjectionNode[];
nodes?: FlatTree;
depth: number;
instance: I | undefined;
mount: (node: I, isLayoutDirty?: boolean) => void;
unmount: () => void;
options: ProjectionNodeOptions;
setOptions(options: ProjectionNodeOptions): void;
layout?: Measurements;
snapshot?: Measurements;
target?: Box;
relativeTarget?: Box;
relativeTargetOrigin?: Box;
targetDelta?: Delta;
targetWithTransforms?: Box;
scroll?: ScrollMeasurements;
treeScale?: Point;
projectionDelta?: Delta;
projectionDeltaWithTransform?: Delta;
latestValues: ResolvedValues;
isLayoutDirty: boolean;
isProjectionDirty: boolean;
isSharedProjectionDirty: boolean;
isTransformDirty: boolean;
resolvedRelativeTargetAt?: number;
shouldResetTransform: boolean;
prevTransformTemplateValue: string | undefined;
isUpdateBlocked(): boolean;
updateManuallyBlocked: boolean;
updateBlockedByResize: boolean;
blockUpdate(): void;
unblockUpdate(): void;
isUpdating: boolean;
needsReset: boolean;
startUpdate(): void;
willUpdate(notifyListeners?: boolean): void;
didUpdate(): void;
measure(removeTransform?: boolean): Measurements;
measurePageBox(): Box;
updateLayout(): void;
updateSnapshot(): void;
clearSnapshot(): void;
updateScroll(phase?: Phase): void;
scheduleUpdateProjection(): void;
scheduleCheckAfterUnmount(): void;
checkUpdateFailed(): void;
sharedNodes: Map<string, NodeStack>;
registerSharedNode(id: string, node: IProjectionNode): void;
getStack(): NodeStack | undefined;
isVisible: boolean;
hide(): void;
show(): void;
scheduleRender(notifyAll?: boolean): void;
getClosestProjectingParent(): IProjectionNode | undefined;
setTargetDelta(delta: Delta): void;
resetTransform(): void;
resetSkewAndRotation(): void;
applyTransform(box: Box, transformOnly?: boolean): Box;
resolveTargetDelta(force?: boolean): void;
calcProjection(): void;
applyProjectionStyles(targetStyle: CSSStyleDeclaration, styleProp?: MotionStyle): void;
clearMeasurements(): void;
resetTree(): void;
isProjecting(): boolean;
animationValues?: ResolvedValues;
currentAnimation?: JSAnimation<number>;
isTreeAnimating?: boolean;
isAnimationBlocked?: boolean;
isTreeAnimationBlocked: () => boolean;
setAnimationOrigin(delta: Delta): void;
startAnimation(transition: ValueTransition): void;
finishAnimation(): void;
hasCheckedOptimisedAppear: boolean;
isLead(): boolean;
promote(options?: {
needsReset?: boolean;
transition?: Transition;
preserveFollowOpacity?: boolean;
}): void;
relegate(): boolean;
resumeFrom?: IProjectionNode;
resumingFrom?: IProjectionNode;
isPresent?: boolean;
addEventListener(name: LayoutEvents, handler: any): VoidFunction;
notifyListeners(name: LayoutEvents, ...args: any): void;
hasListeners(name: LayoutEvents): boolean;
hasTreeAnimated: boolean;
preserveOpacity?: boolean;
}
interface ProjectionNodeOptions {
animate?: boolean;
layoutScroll?: boolean;
layoutRoot?: boolean;
alwaysMeasureLayout?: boolean;
onExitComplete?: VoidFunction;
animationType?: "size" | "position" | "both" | "preserve-aspect";
layoutId?: string;
layout?: boolean | string;
visualElement?: VisualElement;
crossfade?: boolean;
transition?: Transition;
initialPromotionConfig?: InitialPromotionConfig;
}
type AnimationType = "animate" | "whileHover" | "whileTap" | "whileDrag" | "whileFocus" | "whileInView" | "exit";
type VisualElementAnimationOptions = {
delay?: number;
transitionOverride?: Transition;
custom?: any;
type?: AnimationType;
};
interface AnimationState {
animateChanges: (type?: AnimationType) => Promise<any>;
setActive: (type: AnimationType, isActive: boolean, options?: VisualElementAnimationOptions) => Promise<any>;
setAnimateFunction: (fn: any) => void;
getState: () => {
[key: string]: AnimationTypeState;
};
reset: () => void;
}
interface AnimationTypeState {
isActive: boolean;
protectedKeys: {
[key: string]: true;
};
needsAnimating: {
[key: string]: boolean;
};
prevResolvedValues: {
[key: string]: any;
};
prevProp?: VariantLabels | TargetAndTransition;
}
/**
* A VisualElement is an imperative abstraction around UI elements such as
* HTMLElement, SVGElement, Three.Object3D etc.
*/
declare abstract class VisualElement<Instance = unknown, RenderState = unknown, Options extends {} = {}> {
/**
* VisualElements are arranged in trees mirroring that of the React tree.
* Each type of VisualElement has a unique name, to detect when we're crossing
* type boundaries within that tree.
*/
abstract type: string;
/**
* An `Array.sort` compatible function that will compare two Instances and
* compare their respective positions within the tree.
*/
abstract sortInstanceNodePosition(a: Instance, b: Instance): number;
/**
* Measure the viewport-relative bounding box of the Instance.
*/
abstract measureInstanceViewportBox(instance: Instance, props: MotionProps & Partial<MotionConfigContext>): Box;
/**
* When a value has been removed from all animation props we need to
* pick a target to animate back to. For instance, for HTMLElements
* we can look in the style prop.
*/
abstract getBaseTargetFromProps(props: MotionProps, key: string): AnyResolvedKeyframe | undefined | MotionValue;
/**
* When we first animate to a value we need to animate it *from* a value.
* Often this have been specified via the initial prop but it might be
* that the value needs to be read from the Instance.
*/
abstract readValueFromInstance(instance: Instance, key: string, options: Options): AnyResolvedKeyframe | null | undefined;
/**
* When a value has been removed from the VisualElement we use this to remove
* it from the inherting class' unique render state.
*/
abstract removeValueFromRenderState(key: string, renderState: RenderState): void;
/**
* Run before a React or VisualElement render, builds the latest motion
* values into an Instance-specific format. For example, HTMLVisualElement
* will use this step to build `style` and `var` values.
*/
abstract build(renderState: RenderState, latestValues: ResolvedValues, props: MotionProps): void;
/**
* Apply the built values to the Instance. For example, HTMLElements will have
* styles applied via `setProperty` and the style attribute, whereas SVGElements
* will have values applied to attributes.
*/
abstract renderInstance(instance: Instance, renderState: RenderState, styleProp?: MotionStyle, projection?: IProjectionNode): void;
/**
* This method is called when a transform property is bound to a motion value.
* It's currently used to measure SVG elements when a new transform property is bound.
*/
onBindTransform?(): void;
/**
* If the component child is provided as a motion value, handle subscriptions
* with the renderer-specific VisualElement.
*/
handleChildMotionValue?(): void;
/**
* This method takes React props and returns found MotionValues. For example, HTML
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
*
* This isn't an abstract method as it needs calling in the constructor, but it is
* intended to be one.
*/
scrapeMotionValuesFromProps(_props: MotionProps, _prevProps: MotionProps, _visualElement: VisualElement): {
[key: string]: MotionValue | AnyResolvedKeyframe;
};
/**
* A reference to the current underlying Instance, e.g. a HTMLElement
* or Three.Mesh etc.
*/
current: Instance | null;
/**
* A reference to the parent VisualElement (if exists).
*/
parent: VisualElement | undefined;
/**
* A set containing references to this VisualElement's children.
*/
children: Set<VisualElement<unknown, unknown, {}>>;
/**
* A set containing the latest children of this VisualElement. This is flushed
* at the start of every commit. We use it to calculate the stagger delay
* for newly-added children.
*/
enteringChildren?: Set<VisualElement>;
/**
* The depth of this VisualElement within the overall VisualElement tree.
*/
depth: number;
/**
* The current render state of this VisualElement. Defined by inherting VisualElements.
*/
renderState: RenderState;
/**
* An object containing the latest static values for each of this VisualElement's
* MotionValues.
*/
latestValues: ResolvedValues;
/**
* Determine what role this visual element should take in the variant tree.
*/
isVariantNode: boolean;
isControllingVariants: boolean;
/**
* If this component is part of the variant tree, it should track
* any children that are also part of the tree. This is essentially
* a shadow tree to simplify logic around how to stagger over children.
*/
variantChildren?: Set<VisualElement>;
/**
* Decides whether this VisualElement should animate in reduced motion
* mode.
*
* TODO: This is currently set on every individual VisualElement but feels
* like it could be set globally.
*/
shouldReduceMotion: boolean | null;
/**
* Normally, if a component is controlled by a parent's variants, it can
* rely on that ancestor to trigger animations further down the tree.
* However, if a component is created after its parent is mounted, the parent
* won't trigger that mount animation so the child needs to.
*
* TODO: This might be better replaced with a method isParentMounted
*/
manuallyAnimateOnMount: boolean;
/**
* This can be set by AnimatePresence to force components that mount
* at the same time as it to mount as if they have initial={false} set.
*/
blockInitialAnimation: boolean;
/**
* A reference to this VisualElement's projection node, used in layout animations.
*/
projection?: IProjectionNode;
/**
* A map of all motion values attached to this visual element. Motion
* values are source of truth for any given animated value. A motion
* value might be provided externally by the component via props.
*/
values: Map<string, MotionValue<any>>;
/**
* The AnimationState, this is hydrated by the animation Feature.
*/
animationState?: AnimationState;
KeyframeResolver: typeof KeyframeResolver;
/**
* The options used to create this VisualElement. The Options type is defined
* by the inheriting VisualElement and is passed straight through to the render functions.
*/
readonly options: Options;
/**
* A reference to the latest props provided to the VisualElement's host React component.
*/
props: MotionProps;
prevProps?: MotionProps;
presenceContext: PresenceContextProps | null;
prevPresenceContext?: PresenceContextProps | null;
/**
* Cleanup functions for active features (hover/tap/exit etc)
*/
private features;
/**
* A map of every subscription that binds the provided or generated
* motion values onChange listeners to this visual element.
*/
private valueSubscriptions;
/**
* A reference to the ReducedMotionConfig passed to the VisualElement's host React component.
*/
private reducedMotionConfig;
/**
* On mount, this will be hydrated with a callback to disconnect
* this visual element from its parent on unmount.
*/
private removeFromVariantTree;
/**
* A reference to the previously-provided motion values as returned
* from scrapeMotionValuesFromProps. We use the keys in here to determine
* if any motion values need to be removed after props are updated.
*/
private prevMotionValues;
/**
* When values are removed from all animation props we need to search
* for a fallback value to animate to. These values are tracked in baseTarget.
*/
private baseTarget;
/**
* Create an object of the values we initially animated from (if initial prop present).
*/
private initialValues;
/**
* An object containing a SubscriptionManager for each active event.
*/
private events;
/**
* An object containing an unsubscribe function for each prop event subscription.
* For example, every "Update" event can have multiple subscribers via
* VisualElement.on(), but only one of those can be defined via the onUpdate prop.
*/
private propEventSubscriptions;
constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState, }: VisualElementOptions<Instance, RenderState>, options?: Options);
mount(instance: Instance): void;
unmount(): void;
addChild(child: VisualElement): void;
removeChild(child: VisualElement): void;
private bindToMotionValue;
sortNodePosition(other: VisualElement<Instance>): number;
updateFeatures(): void;
notifyUpdate: () => void;
triggerBuild(): void;
render: () => void;
private renderScheduledAt;
scheduleRender: () => void;
/**
* Measure the current viewport box with or without transforms.
* Only measures axis-aligned boxes, rotate and skew must be manually
* removed with a re-render to work.
*/
measureViewportBox(): Box;
getStaticValue(key: string): AnyResolvedKeyframe;
setStaticValue(key: string, value: AnyResolvedKeyframe): void;
/**
* Update the provided props. Ensure any newly-added motion values are
* added to our map, old ones removed, and listeners updated.
*/
update(props: MotionProps, presenceContext: PresenceContextProps | null): void;
getProps(): MotionProps;
/**
* Returns the variant definition with a given name.
*/
getVariant(name: string): motion_dom.Variant | undefined;
/**
* Returns the defined default transition on this component.
*/
getDefaultTransition(): motion_dom.Transition<any> | undefined;
getTransformPagePoint(): any;
getClosestVariantNode(): VisualElement | undefined;
/**
* Add a child visual element to our set of children.
*/
addVariantChild(child: VisualElement): (() => boolean) | undefined;
/**
* Add a motion value and bind it to this visual element.
*/
addValue(key: string, value: MotionValue): void;
/**
* Remove a motion value and unbind any active subscriptions.
*/
removeValue(key: string): void;
/**
* Check whether we have a motion value for this key
*/
hasValue(key: string): boolean;
/**
* Get a motion value for this key. If called with a default
* value, we'll create one if none exists.
*/
getValue(key: string): MotionValue | undefined;
getValue(key: string, defaultValue: AnyResolvedKeyframe | null): MotionValue;
/**
* If we're trying to animate to a previously unencountered value,
* we need to check for it in our state and as a last resort read it
* directly from the instance (which might have performance implications).
*/
readValue(key: string, target?: AnyResolvedKeyframe | null): any;
/**
* Set the base target to later animate back to. This is currently
* only hydrated on creation and when we first read a value.
*/
setBaseTarget(key: string, value: AnyResolvedKeyframe): void;
/**
* Find the base target for a value thats been removed from all animation
* props.
*/
getBaseTarget(key: string): ResolvedValues[string] | undefined | null;
on<EventName extends keyof VisualElementEventCallbacks>(eventName: EventName, callback: VisualElementEventCallbacks[EventName]): VoidFunction;
notify<EventName extends keyof VisualElementEventCallbacks>(eventName: EventName, ...args: any): void;
scheduleRenderMicrotask(): void;
}
type ScrapeMotionValuesFromProps = (props: MotionProps, prevProps: MotionProps, visualElement?: VisualElement) => {
[key: string]: MotionValue | AnyResolvedKeyframe;
};
interface VisualElementOptions<Instance, RenderState = any> {
visualState: VisualState<Instance, RenderState>;
parent?: VisualElement<unknown>;
variantParent?: VisualElement<unknown>;
presenceContext: PresenceContextProps | null;
props: MotionProps;
blockInitialAnimation?: boolean;
reducedMotionConfig?: ReducedMotionConfig;
}
/**
* A generic set of string/number values
*/
interface ResolvedValues {
[key: string]: AnyResolvedKeyframe;
}
interface VisualElementEventCallbacks {
BeforeLayoutMeasure: () => void;
LayoutMeasure: (layout: Box, prevLayout?: Box) => void;
LayoutUpdate: (layout: Axis, prevLayout: Axis) => void;
Update: (latest: ResolvedValues) => void;
AnimationStart: (definition: AnimationDefinition) => void;
AnimationComplete: (definition: AnimationDefinition) => void;
LayoutAnimationStart: () => void;
LayoutAnimationComplete: () => void;
SetAxisTarget: () => void;
Unmount: () => void;
}
type CreateVisualElement<Props = {}, TagName extends keyof DOMMotionComponents | string = "div"> = (Component: TagName | string | React.ComponentType<Props>, options: VisualElementOptions<HTMLElement | SVGElement>) => VisualElement<HTMLElement | SVGElement>;
declare const optimizedAppearDataAttribute: "data-framer-appear-id";
/**
* Expose only the needed part of the VisualElement interface to
* ensure React types don't end up in the generic DOM bundle.
*/
interface WithAppearProps {
props: {
[optimizedAppearDataAttribute]?: string;
values?: {
[key: string]: MotionValue<number> | MotionValue<string>;
};
};
}
type HandoffFunction = (storeId: string, valueName: string, frame: Batcher) => number | null;
/**
* The window global object acts as a bridge between our inline script
* triggering the optimized appear animations, and Motion.
*/
declare global {
interface Window {
MotionHandoffAnimation?: HandoffFunction;
MotionHandoffMarkAsComplete?: (elementId: string) => void;
MotionHandoffIsComplete?: (elementId: string) => boolean;
MotionHasOptimisedAnimation?: (elementId?: string, valueName?: string) => boolean;
MotionCancelOptimisedAnimation?: (elementId?: string, valueName?: string, frame?: Batcher, canResume?: boolean) => void;
MotionCheckAppearSync?: (visualElement: WithAppearProps, valueName: string, value: MotionValue) => VoidFunction | void;
MotionIsMounted?: boolean;
}
}
export { type AnimationType as A, type CreateVisualElement as C, type DOMMotionComponents as D, type ForwardRefComponent as F, type HTMLElements as H, type IProjectionNode as I, type MotionProps as M, PresenceContext as P, type ResolvedValues as R, type SVGMotionComponents as S, type VariantLabels as V, VisualElement as a, MotionConfigContext as b, type HTMLMotionProps as c, type HTMLMotionComponents as d, type VisualElementAnimationOptions as e, type HTMLRenderState as f, type ScrapeMotionValuesFromProps as g, type VisualState as h, SwitchLayoutGroupContext as i, type MotionStyle as j, type MotionTransform as k, type SVGAttributesAsMotionValues as l, makeUseVisualState as m, type SVGMotionProps as n, optimizedAppearDataAttribute as o, FlatTree as p };
@@ -0,0 +1,462 @@
import {ContextualKeyword} from "../parser/tokenizer/keywords";
import {TokenType as tt} from "../parser/tokenizer/types";
import getClassInfo, {} from "../util/getClassInfo";
import CJSImportTransformer from "./CJSImportTransformer";
import ESMImportTransformer from "./ESMImportTransformer";
import FlowTransformer from "./FlowTransformer";
import JestHoistTransformer from "./JestHoistTransformer";
import JSXTransformer from "./JSXTransformer";
import NumericSeparatorTransformer from "./NumericSeparatorTransformer";
import OptionalCatchBindingTransformer from "./OptionalCatchBindingTransformer";
import OptionalChainingNullishTransformer from "./OptionalChainingNullishTransformer";
import ReactDisplayNameTransformer from "./ReactDisplayNameTransformer";
import ReactHotLoaderTransformer from "./ReactHotLoaderTransformer";
import TypeScriptTransformer from "./TypeScriptTransformer";
export default class RootTransformer {
__init() {this.transformers = []}
__init2() {this.generatedVariables = []}
constructor(
sucraseContext,
transforms,
enableLegacyBabel5ModuleInterop,
options,
) {;RootTransformer.prototype.__init.call(this);RootTransformer.prototype.__init2.call(this);
this.nameManager = sucraseContext.nameManager;
this.helperManager = sucraseContext.helperManager;
const {tokenProcessor, importProcessor} = sucraseContext;
this.tokens = tokenProcessor;
this.isImportsTransformEnabled = transforms.includes("imports");
this.isReactHotLoaderTransformEnabled = transforms.includes("react-hot-loader");
this.disableESTransforms = Boolean(options.disableESTransforms);
if (!options.disableESTransforms) {
this.transformers.push(
new OptionalChainingNullishTransformer(tokenProcessor, this.nameManager),
);
this.transformers.push(new NumericSeparatorTransformer(tokenProcessor));
this.transformers.push(new OptionalCatchBindingTransformer(tokenProcessor, this.nameManager));
}
if (transforms.includes("jsx")) {
if (options.jsxRuntime !== "preserve") {
this.transformers.push(
new JSXTransformer(this, tokenProcessor, importProcessor, this.nameManager, options),
);
}
this.transformers.push(
new ReactDisplayNameTransformer(this, tokenProcessor, importProcessor, options),
);
}
let reactHotLoaderTransformer = null;
if (transforms.includes("react-hot-loader")) {
if (!options.filePath) {
throw new Error("filePath is required when using the react-hot-loader transform.");
}
reactHotLoaderTransformer = new ReactHotLoaderTransformer(tokenProcessor, options.filePath);
this.transformers.push(reactHotLoaderTransformer);
}
// Note that we always want to enable the imports transformer, even when the import transform
// itself isn't enabled, since we need to do type-only import pruning for both Flow and
// TypeScript.
if (transforms.includes("imports")) {
if (importProcessor === null) {
throw new Error("Expected non-null importProcessor with imports transform enabled.");
}
this.transformers.push(
new CJSImportTransformer(
this,
tokenProcessor,
importProcessor,
this.nameManager,
this.helperManager,
reactHotLoaderTransformer,
enableLegacyBabel5ModuleInterop,
Boolean(options.enableLegacyTypeScriptModuleInterop),
transforms.includes("typescript"),
transforms.includes("flow"),
Boolean(options.preserveDynamicImport),
Boolean(options.keepUnusedImports),
),
);
} else {
this.transformers.push(
new ESMImportTransformer(
tokenProcessor,
this.nameManager,
this.helperManager,
reactHotLoaderTransformer,
transforms.includes("typescript"),
transforms.includes("flow"),
Boolean(options.keepUnusedImports),
options,
),
);
}
if (transforms.includes("flow")) {
this.transformers.push(
new FlowTransformer(this, tokenProcessor, transforms.includes("imports")),
);
}
if (transforms.includes("typescript")) {
this.transformers.push(
new TypeScriptTransformer(this, tokenProcessor, transforms.includes("imports")),
);
}
if (transforms.includes("jest")) {
this.transformers.push(
new JestHoistTransformer(this, tokenProcessor, this.nameManager, importProcessor),
);
}
}
transform() {
this.tokens.reset();
this.processBalancedCode();
const shouldAddUseStrict = this.isImportsTransformEnabled;
// "use strict" always needs to be first, so override the normal transformer order.
let prefix = shouldAddUseStrict ? '"use strict";' : "";
for (const transformer of this.transformers) {
prefix += transformer.getPrefixCode();
}
prefix += this.helperManager.emitHelpers();
prefix += this.generatedVariables.map((v) => ` var ${v};`).join("");
for (const transformer of this.transformers) {
prefix += transformer.getHoistedCode();
}
let suffix = "";
for (const transformer of this.transformers) {
suffix += transformer.getSuffixCode();
}
const result = this.tokens.finish();
let {code} = result;
if (code.startsWith("#!")) {
let newlineIndex = code.indexOf("\n");
if (newlineIndex === -1) {
newlineIndex = code.length;
code += "\n";
}
return {
code: code.slice(0, newlineIndex + 1) + prefix + code.slice(newlineIndex + 1) + suffix,
// The hashbang line has no tokens, so shifting the tokens to account
// for prefix can happen normally.
mappings: this.shiftMappings(result.mappings, prefix.length),
};
} else {
return {
code: prefix + code + suffix,
mappings: this.shiftMappings(result.mappings, prefix.length),
};
}
}
processBalancedCode() {
let braceDepth = 0;
let parenDepth = 0;
while (!this.tokens.isAtEnd()) {
if (this.tokens.matches1(tt.braceL) || this.tokens.matches1(tt.dollarBraceL)) {
braceDepth++;
} else if (this.tokens.matches1(tt.braceR)) {
if (braceDepth === 0) {
return;
}
braceDepth--;
}
if (this.tokens.matches1(tt.parenL)) {
parenDepth++;
} else if (this.tokens.matches1(tt.parenR)) {
if (parenDepth === 0) {
return;
}
parenDepth--;
}
this.processToken();
}
}
processToken() {
if (this.tokens.matches1(tt._class)) {
this.processClass();
return;
}
for (const transformer of this.transformers) {
const wasProcessed = transformer.process();
if (wasProcessed) {
return;
}
}
this.tokens.copyToken();
}
/**
* Skip past a class with a name and return that name.
*/
processNamedClass() {
if (!this.tokens.matches2(tt._class, tt.name)) {
throw new Error("Expected identifier for exported class name.");
}
const name = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
this.processClass();
return name;
}
processClass() {
const classInfo = getClassInfo(this, this.tokens, this.nameManager, this.disableESTransforms);
// Both static and instance initializers need a class name to use to invoke the initializer, so
// assign to one if necessary.
const needsCommaExpression =
(classInfo.headerInfo.isExpression || !classInfo.headerInfo.className) &&
classInfo.staticInitializerNames.length + classInfo.instanceInitializerNames.length > 0;
let className = classInfo.headerInfo.className;
if (needsCommaExpression) {
className = this.nameManager.claimFreeName("_class");
this.generatedVariables.push(className);
this.tokens.appendCode(` (${className} =`);
}
const classToken = this.tokens.currentToken();
const contextId = classToken.contextId;
if (contextId == null) {
throw new Error("Expected class to have a context ID.");
}
this.tokens.copyExpectedToken(tt._class);
while (!this.tokens.matchesContextIdAndLabel(tt.braceL, contextId)) {
this.processToken();
}
this.processClassBody(classInfo, className);
const staticInitializerStatements = classInfo.staticInitializerNames.map(
(name) => `${className}.${name}()`,
);
if (needsCommaExpression) {
this.tokens.appendCode(
`, ${staticInitializerStatements.map((s) => `${s}, `).join("")}${className})`,
);
} else if (classInfo.staticInitializerNames.length > 0) {
this.tokens.appendCode(` ${staticInitializerStatements.map((s) => `${s};`).join(" ")}`);
}
}
/**
* We want to just handle class fields in all contexts, since TypeScript supports them. Later,
* when some JS implementations support class fields, this should be made optional.
*/
processClassBody(classInfo, className) {
const {
headerInfo,
constructorInsertPos,
constructorInitializerStatements,
fields,
instanceInitializerNames,
rangesToRemove,
} = classInfo;
let fieldIndex = 0;
let rangeToRemoveIndex = 0;
const classContextId = this.tokens.currentToken().contextId;
if (classContextId == null) {
throw new Error("Expected non-null context ID on class.");
}
this.tokens.copyExpectedToken(tt.braceL);
if (this.isReactHotLoaderTransformEnabled) {
this.tokens.appendCode(
"__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}",
);
}
const needsConstructorInit =
constructorInitializerStatements.length + instanceInitializerNames.length > 0;
if (constructorInsertPos === null && needsConstructorInit) {
const constructorInitializersCode = this.makeConstructorInitCode(
constructorInitializerStatements,
instanceInitializerNames,
className,
);
if (headerInfo.hasSuperclass) {
const argsName = this.nameManager.claimFreeName("args");
this.tokens.appendCode(
`constructor(...${argsName}) { super(...${argsName}); ${constructorInitializersCode}; }`,
);
} else {
this.tokens.appendCode(`constructor() { ${constructorInitializersCode}; }`);
}
}
while (!this.tokens.matchesContextIdAndLabel(tt.braceR, classContextId)) {
if (fieldIndex < fields.length && this.tokens.currentIndex() === fields[fieldIndex].start) {
let needsCloseBrace = false;
if (this.tokens.matches1(tt.bracketL)) {
this.tokens.copyTokenWithPrefix(`${fields[fieldIndex].initializerName}() {this`);
} else if (this.tokens.matches1(tt.string) || this.tokens.matches1(tt.num)) {
this.tokens.copyTokenWithPrefix(`${fields[fieldIndex].initializerName}() {this[`);
needsCloseBrace = true;
} else {
this.tokens.copyTokenWithPrefix(`${fields[fieldIndex].initializerName}() {this.`);
}
while (this.tokens.currentIndex() < fields[fieldIndex].end) {
if (needsCloseBrace && this.tokens.currentIndex() === fields[fieldIndex].equalsIndex) {
this.tokens.appendCode("]");
}
this.processToken();
}
this.tokens.appendCode("}");
fieldIndex++;
} else if (
rangeToRemoveIndex < rangesToRemove.length &&
this.tokens.currentIndex() >= rangesToRemove[rangeToRemoveIndex].start
) {
if (this.tokens.currentIndex() < rangesToRemove[rangeToRemoveIndex].end) {
this.tokens.removeInitialToken();
}
while (this.tokens.currentIndex() < rangesToRemove[rangeToRemoveIndex].end) {
this.tokens.removeToken();
}
rangeToRemoveIndex++;
} else if (this.tokens.currentIndex() === constructorInsertPos) {
this.tokens.copyToken();
if (needsConstructorInit) {
this.tokens.appendCode(
`;${this.makeConstructorInitCode(
constructorInitializerStatements,
instanceInitializerNames,
className,
)};`,
);
}
this.processToken();
} else {
this.processToken();
}
}
this.tokens.copyExpectedToken(tt.braceR);
}
makeConstructorInitCode(
constructorInitializerStatements,
instanceInitializerNames,
className,
) {
return [
...constructorInitializerStatements,
...instanceInitializerNames.map((name) => `${className}.prototype.${name}.call(this)`),
].join(";");
}
/**
* Normally it's ok to simply remove type tokens, but we need to be more careful when dealing with
* arrow function return types since they can confuse the parser. In that case, we want to move
* the close-paren to the same line as the arrow.
*
* See https://github.com/alangpierce/sucrase/issues/391 for more details.
*/
processPossibleArrowParamEnd() {
if (this.tokens.matches2(tt.parenR, tt.colon) && this.tokens.tokenAtRelativeIndex(1).isType) {
let nextNonTypeIndex = this.tokens.currentIndex() + 1;
// Look ahead to see if this is an arrow function or something else.
while (this.tokens.tokens[nextNonTypeIndex].isType) {
nextNonTypeIndex++;
}
if (this.tokens.matches1AtIndex(nextNonTypeIndex, tt.arrow)) {
this.tokens.removeInitialToken();
while (this.tokens.currentIndex() < nextNonTypeIndex) {
this.tokens.removeToken();
}
this.tokens.replaceTokenTrimmingLeftWhitespace(") =>");
return true;
}
}
return false;
}
/**
* An async arrow function might be of the form:
*
* async <
* T
* >() => {}
*
* in which case, removing the type parameters will cause a syntax error. Detect this case and
* move the open-paren earlier.
*/
processPossibleAsyncArrowWithTypeParams() {
if (
!this.tokens.matchesContextual(ContextualKeyword._async) &&
!this.tokens.matches1(tt._async)
) {
return false;
}
const nextToken = this.tokens.tokenAtRelativeIndex(1);
if (nextToken.type !== tt.lessThan || !nextToken.isType) {
return false;
}
let nextNonTypeIndex = this.tokens.currentIndex() + 1;
// Look ahead to see if this is an arrow function or something else.
while (this.tokens.tokens[nextNonTypeIndex].isType) {
nextNonTypeIndex++;
}
if (this.tokens.matches1AtIndex(nextNonTypeIndex, tt.parenL)) {
this.tokens.replaceToken("async (");
this.tokens.removeInitialToken();
while (this.tokens.currentIndex() < nextNonTypeIndex) {
this.tokens.removeToken();
}
this.tokens.removeToken();
// We ate a ( token, so we need to process the tokens in between and then the ) token so that
// we remain balanced.
this.processBalancedCode();
this.processToken();
return true;
}
return false;
}
processPossibleTypeRange() {
if (this.tokens.currentToken().isType) {
this.tokens.removeInitialToken();
while (this.tokens.currentToken().isType) {
this.tokens.removeToken();
}
return true;
}
return false;
}
shiftMappings(
mappings,
prefixLength,
) {
for (let i = 0; i < mappings.length; i++) {
const mapping = mappings[i];
if (mapping !== undefined) {
mappings[i] = mapping + prefixLength;
}
}
return mappings;
}
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"L M G N O P","2":"0 1 2 3 4 5 C 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:{"2":"0 1 2 3 4 5 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 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 0C 1C"},D:{"2":"0 1 2 3 4 5 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 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},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:{"2":"0 1 2 3 4 5 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 j k l m n o p q r s t u v w x y z 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:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C H NC uC OC"},L:{"2":"I"},M:{"2":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"2":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"2":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:6,C:"Object RTC (ORTC) API for WebRTC",D:true};
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var OutlineRole = {
relatedConcepts: [],
type: 'structure'
};
var _default = OutlineRole;
exports.default = _default;
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAgGM,SAAS,0CAAwB,OAAwC;IAC9E,IAAI,EACF,kBAAkB,OAAO,EACzB,kBAAkB,QAAQ,OAC1B,GAAG,aACH,YAAY,wBACZ,kBAAkB,+BAClB,yBAAyB,0BACzB,oBAAoB,0BACpB,oBAAoB,iCACpB,gBAAgB,QAAQ,iBAAiB,KAAK,8BAC9C,oBAAoB,8BACpB,qBAAqB,uBACrB,sBAAsB,sBACtB,aAAa,aACb,kFAAkF;IAClF,YAAY,mBACZ,eAAe,UAChB,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,SAAS,CAAA,GAAA,+BAAQ;IAErB,IAAI,YAAY,CAAC;YAQV;QAPL,6GAA6G;QAC7G,IAAI,EAAE,MAAM,IAAI,EAAE,GAAG,KAAK,OACxB,EAAE,cAAc;QAGlB,uEAAuE;QACvE,oDAAoD;QACpD,IAAI,GAAC,eAAA,IAAI,OAAO,cAAX,mCAAA,aAAa,QAAQ,CAAC,EAAE,MAAM,IACjC;QAGF,MAAM,gBAAgB,CAAC,KAAsB;YAC3C,IAAI,OAAO,MAAM;gBACf,IAAI,QAAQ,MAAM,CAAC,QAAQ,iBAAiB,eAAe,iBAAiB,CAAC,CAAA,GAAA,0DAA+B,EAAE,IAAI;oBAChH,iFAAiF;oBACjF,CAAA,GAAA,yBAAQ,EAAE;wBACR,QAAQ,aAAa,CAAC,KAAK;oBAC7B;oBAEA,IAAI,OAAO,CAAA,GAAA,wCAAa,EAAE,KAAK;oBAC/B,IAAI,YAAY,QAAQ,YAAY,CAAC;oBACrC,IAAI,MACF,OAAO,IAAI,CAAC,MAAM,GAAG,UAAU,IAAI,EAAE,UAAU,aAAa;oBAG9D;gBACF;gBAEA,QAAQ,aAAa,CAAC,KAAK;gBAE3B,IAAI,QAAQ,MAAM,CAAC,QAAQ,iBAAiB,YAC1C;gBAGF,IAAI,EAAE,QAAQ,IAAI,QAAQ,aAAa,KAAK,YAC1C,QAAQ,eAAe,CAAC;qBACnB,IAAI,iBAAiB,CAAC,CAAA,GAAA,0DAA+B,EAAE,IAC5D,QAAQ,gBAAgB,CAAC;YAE7B;QACF;QAEA,OAAQ,EAAE,GAAG;YACX,KAAK;gBACH,IAAI,SAAS,WAAW,EAAE;wBAElB,uBACA,uBAEM;oBAJZ,IAAI,UAAU,QAAQ,UAAU,IAAI,QAC9B,wBAAA,SAAS,WAAW,cAApB,4CAAA,2BAAA,UAAuB,QAAQ,UAAU,KACzC,wBAAA,SAAS,WAAW,cAApB,4CAAA,2BAAA;oBACN,IAAI,WAAW,QAAQ,iBACrB,WAAU,yBAAA,SAAS,WAAW,cAApB,6CAAA,4BAAA,UAAuB,QAAQ,UAAU;oBAErD,IAAI,WAAW,MAAM;wBACnB,EAAE,cAAc;wBAChB,cAAc;oBAChB;gBACF;gBACA;YAEF,KAAK;gBACH,IAAI,SAAS,WAAW,EAAE;wBAElB,uBACA,sBAEM;oBAJZ,IAAI,UAAU,QAAQ,UAAU,IAAI,QAC9B,wBAAA,SAAS,WAAW,cAApB,4CAAA,2BAAA,UAAuB,QAAQ,UAAU,KACzC,uBAAA,SAAS,UAAU,cAAnB,2CAAA,0BAAA;oBACN,IAAI,WAAW,QAAQ,iBACrB,WAAU,wBAAA,SAAS,UAAU,cAAnB,4CAAA,2BAAA,UAAsB,QAAQ,UAAU;oBAEpD,IAAI,WAAW,MAAM;wBACnB,EAAE,cAAc;wBAChB,cAAc;oBAChB;gBACF;gBACA;YAEF,KAAK;gBACH,IAAI,SAAS,YAAY,EAAE;wBAC0C,wBAEjC,wBAA6C;oBAF/E,IAAI,UAAkC,QAAQ,UAAU,IAAI,QAAO,yBAAA,SAAS,YAAY,cAArB,6CAAA,4BAAA,UAAwB,QAAQ,UAAU,IAAI;oBACjH,IAAI,WAAW,QAAQ,iBACrB,UAAU,cAAc,SAAQ,yBAAA,SAAS,WAAW,cAApB,6CAAA,4BAAA,UAAuB,QAAQ,UAAU,KAAI,wBAAA,SAAS,UAAU,cAAnB,4CAAA,2BAAA,UAAsB,QAAQ,UAAU;oBAEvH,IAAI,WAAW,MAAM;wBACnB,EAAE,cAAc;wBAChB,cAAc,SAAS,cAAc,QAAQ,UAAU;oBACzD;gBACF;gBACA;YAEF,KAAK;gBACH,IAAI,SAAS,aAAa,EAAE;wBACyC,yBAEjC,uBAA4C;oBAF9E,IAAI,UAAkC,QAAQ,UAAU,IAAI,QAAO,0BAAA,SAAS,aAAa,cAAtB,8CAAA,6BAAA,UAAyB,QAAQ,UAAU,IAAI;oBAClH,IAAI,WAAW,QAAQ,iBACrB,UAAU,cAAc,SAAQ,wBAAA,SAAS,UAAU,cAAnB,4CAAA,2BAAA,UAAsB,QAAQ,UAAU,KAAI,yBAAA,SAAS,WAAW,cAApB,6CAAA,4BAAA,UAAuB,QAAQ,UAAU;oBAEvH,IAAI,WAAW,MAAM;wBACnB,EAAE,cAAc;wBAChB,cAAc,SAAS,cAAc,QAAQ,SAAS;oBACxD;gBACF;gBACA;YAEF,KAAK;gBACH,IAAI,SAAS,WAAW,EAAE;oBACxB,IAAI,QAAQ,UAAU,KAAK,QAAQ,EAAE,QAAQ,EAC3C;oBAEF,EAAE,cAAc;oBAChB,IAAI,WAAuB,SAAS,WAAW,CAAC,QAAQ,UAAU,EAAE,CAAA,GAAA,sCAAe,EAAE;oBACrF,QAAQ,aAAa,CAAC;oBACtB,IAAI,YAAY,MAAM;wBACpB,IAAI,CAAA,GAAA,sCAAe,EAAE,MAAM,EAAE,QAAQ,IAAI,QAAQ,aAAa,KAAK,YACjE,QAAQ,eAAe,CAAC;6BACnB,IAAI,eACT,QAAQ,gBAAgB,CAAC;oBAE7B;gBACF;gBACA;YACF,KAAK;gBACH,IAAI,SAAS,UAAU,EAAE;oBACvB,IAAI,QAAQ,UAAU,KAAK,QAAQ,EAAE,QAAQ,EAC3C;oBAEF,EAAE,cAAc;oBAChB,IAAI,UAAU,SAAS,UAAU,CAAC,QAAQ,UAAU,EAAE,CAAA,GAAA,sCAAe,EAAE;oBACvE,QAAQ,aAAa,CAAC;oBACtB,IAAI,WAAW,MAAM;wBACnB,IAAI,CAAA,GAAA,sCAAe,EAAE,MAAM,EAAE,QAAQ,IAAI,QAAQ,aAAa,KAAK,YACjE,QAAQ,eAAe,CAAC;6BACnB,IAAI,eACT,QAAQ,gBAAgB,CAAC;oBAE7B;gBACF;gBACA;YACF,KAAK;gBACH,IAAI,SAAS,eAAe,IAAI,QAAQ,UAAU,IAAI,MAAM;oBAC1D,IAAI,UAAU,SAAS,eAAe,CAAC,QAAQ,UAAU;oBACzD,IAAI,WAAW,MAAM;wBACnB,EAAE,cAAc;wBAChB,cAAc;oBAChB;gBACF;gBACA;YACF,KAAK;gBACH,IAAI,SAAS,eAAe,IAAI,QAAQ,UAAU,IAAI,MAAM;oBAC1D,IAAI,UAAU,SAAS,eAAe,CAAC,QAAQ,UAAU;oBACzD,IAAI,WAAW,MAAM;wBACnB,EAAE,cAAc;wBAChB,cAAc;oBAChB;gBACF;gBACA;YACF,KAAK;gBACH,IAAI,CAAA,GAAA,sCAAe,EAAE,MAAM,QAAQ,aAAa,KAAK,cAAc,sBAAsB,MAAM;oBAC7F,EAAE,cAAc;oBAChB,QAAQ,SAAS;gBACnB;gBACA;YACF,KAAK;gBACH,IAAI,sBAAsB,oBAAoB,CAAC,0BAA0B,QAAQ,YAAY,CAAC,IAAI,KAAK,GAAG;oBACxG,EAAE,eAAe;oBACjB,EAAE,cAAc;oBAChB,QAAQ,cAAc;gBACxB;gBACA;YACF,KAAK;gBACH,IAAI,CAAC,qBAAqB;oBACxB,uFAAuF;oBACvF,qGAAqG;oBACrG,iGAAiG;oBACjG,6FAA6F;oBAC7F,gGAAgG;oBAChG,yCAAyC;oBACzC,IAAI,EAAE,QAAQ,EACZ,IAAI,OAAO,CAAC,KAAK;yBACZ;wBACL,IAAI,SAAS,CAAA,GAAA,4CAAqB,EAAE,IAAI,OAAO,EAAE;4BAAC,UAAU;wBAAI;wBAChE,IAAI,OAAqC;wBACzC,IAAI;wBACJ,GAAG;4BACD,OAAO,OAAO,SAAS;4BACvB,IAAI,MACF,OAAO;wBAEX,QAAS,MAAM;wBAEf,IAAI,QAAQ,CAAC,KAAK,QAAQ,CAAC,SAAS,aAAa,GAC/C,CAAA,GAAA,2CAAoB,EAAE;oBAE1B;oBACA;gBACF;QAEJ;IACF;IAEA,wDAAwD;IACxD,2CAA2C;IAC3C,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;QAAC,KAAK;QAAG,MAAM;IAAC;IACvC,CAAA,GAAA,8BAAO,EAAE,WAAW,UAAU,gBAAgB,YAAY;YAEjD,oBACC;YADD,8BACC;QAFR,UAAU,OAAO,GAAG;YAClB,KAAK,CAAA,gCAAA,qBAAA,UAAU,OAAO,cAAjB,yCAAA,mBAAmB,SAAS,cAA5B,0CAAA,+BAAgC;YACrC,MAAM,CAAA,iCAAA,sBAAA,UAAU,OAAO,cAAjB,0CAAA,oBAAmB,UAAU,cAA7B,2CAAA,gCAAiC;QACzC;IACF;IAEA,IAAI,UAAU,CAAC;QACb,IAAI,QAAQ,SAAS,EAAE;YACrB,gEAAgE;YAChE,IAAI,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,EAAE,MAAM,GACpC,QAAQ,UAAU,CAAC;YAGrB;QACF;QAEA,gEAAgE;QAChE,IAAI,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,EAAE,MAAM,GACpC;QAGF,QAAQ,UAAU,CAAC;QACnB,IAAI,QAAQ,UAALine truncated
@@ -0,0 +1 @@
{"name":"@react-aria/dialog","version":"3.5.20","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/main.js":{"checkedAt":1794532108311,"integrity":"sha512-2vsjCximyvoOZHVt3XawjcM27WvzXj1oCNd4Nm+PS32ooa0QlHxM2R/tqk0KMDcxj1lKR+i40DBgXJA2K3aeWA==","mode":420,"size":938},"dist/module.js":{"checkedAt":1794532108311,"integrity":"sha512-8A7p9FMVMf0Or03+am941E4gn5y7Qmb28QctK9pKpYXtuO+NTVMB8Mo6JHlro+HPHfIbcYt9b32mbLDNeR9Cuw==","mode":420,"size":818},"dist/useDialog.main.js":{"checkedAt":1794532108311,"integrity":"sha512-RJXeh+QaIvLKANt0NLy1Dien8GVjIeDqjBXZqlV94nDxfKoqVYSHbLFpkKLDYa8v0I2xOUN3LbHpUQkG78TmmQ==","mode":420,"size":3584},"dist/useDialog.module.js":{"checkedAt":1794532108312,"integrity":"sha512-trsFQQk2JiLpK4NKkY6t95Nd1+htiyoikt+IXFqrM6TAB64LA0mubUPC5Rl3mH15/X5+of3aJrtHtBbEse1LxA==","mode":420,"size":3468},"package.json":{"checkedAt":1794532108312,"integrity":"sha512-u9vdWcOC5HSvDuYO9zWv0fOKeN7qEorIYRjBxQrKZ8RUCGn/rlQYHMkbJaRRNqmbfghUgfo4sNTveORKomlmFw==","mode":420,"size":1044},"dist/main.js.map":{"checkedAt":1794532108312,"integrity":"sha512-nqgcCsaBwyHEzh0dMTg+2WHQyU3Ng+2lSM89Uq+v5FNA0Dc9g7ZTHbSk+Fy1Hay8ZvzrDknwgQpbqNgFHXzJLQ==","mode":420,"size":942},"dist/module.js.map":{"checkedAt":1794532108312,"integrity":"sha512-7O9biZmD9kf85JE/yHFJxDsmFNfxxSXUp+BUNT5BZcgnJBFWBbCp83dTsYSuJVjZNDSPpy30xKZjUmR16VMYGg==","mode":420,"size":938},"dist/types.d.ts.map":{"checkedAt":1794532108312,"integrity":"sha512-kWwoNWYih9IkjadlT9S34n9QJMojUvqII+7ML4E96CmvDY2tL7z04PFUnpLkYSKny4acJl8Qim0BooYdJEoWzw==","mode":420,"size":1314},"dist/useDialog.main.js.map":{"checkedAt":1794532108312,"integrity":"sha512-KW9U48GA2LyalLg+jX3hNKvYW+33x4gLYIRmqptTC9MgjTlr0kpx9P7nfwUR9VRAXM9TCTM+PS3Uha6lqaqb3w==","mode":420,"size":4649},"dist/useDialog.module.js.map":{"checkedAt":1794532108312,"integrity":"sha512-aPS97WcWfu/FyDHM5PSBCMA0Kf0WCwTJaAqFanFskKdDxUo4daQivFvIcN+gs7i6f5hVe3AOdMhSQ1QPWTCGBQ==","mode":420,"size":4644},"README.md":{"checkedAt":1794532108313,"integrity":"sha512-4bJdKVZAuK7+GMprCUXRolqlPuMjK8IPUg0VHR334i89UTXWOEwAmR+iyFFdCs6qguhTteTZm50qZJ7snUCv5A==","mode":420,"size":136},"dist/import.mjs":{"checkedAt":1794532108313,"integrity":"sha512-+TN+rQnrz/LhqKv7+dLcxkt4/SQzM8YMEK3HiD47U3moiY3P/vv1wVYdRrPYsVp+4Heq3tx+kFZTyVaqV2e4QA==","mode":420,"size":812},"dist/useDialog.mjs":{"checkedAt":1794532108312,"integrity":"sha512-trsFQQk2JiLpK4NKkY6t95Nd1+htiyoikt+IXFqrM6TAB64LA0mubUPC5Rl3mH15/X5+of3aJrtHtBbEse1LxA==","mode":420,"size":3468},"src/index.ts":{"checkedAt":1794532108313,"integrity":"sha512-r1EKdLP5eiLpOgaOxSsJI3t+NHYkgbmzYNiK8+JuV8M9/s6inYRC/quUwO21sPqknX9/MZdk5KIsFeWBJEJa+Q==","mode":420,"size":762},"dist/types.d.ts":{"checkedAt":1794532108313,"integrity":"sha512-cJs3RWgsSFheIw+siNmJvTZWm3T/ER3XgmILokCHpL00GHKvrACiJ5H42uUAc1e0qL5Bd+2r79tDuqHbUZhIvA==","mode":420,"size":692},"src/useDialog.ts":{"checkedAt":1794532108313,"integrity":"sha512-Dtm4mWuT+58KMMmeg4wPBj4REXBhFpHfXjhN+WAuSUyoYB1R2nESzfc7AdyP1TfHnXep07g8UYnn1uSL+928TA==","mode":420,"size":3390}}}
@@ -0,0 +1,81 @@
{
"name": "es-define-property",
"version": "1.0.1",
"description": "`Object.defineProperty`, but not IE 8's broken one.",
"main": "index.js",
"types": "./index.d.ts",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p .",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/es-define-property.git"
},
"keywords": [
"javascript",
"ecmascript",
"object",
"define",
"property",
"defineProperty",
"Object.defineProperty"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/ljharb/es-define-property/issues"
},
"homepage": "https://github.com/ljharb/es-define-property#readme",
"devDependencies": {
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.2",
"@types/gopd": "^1.0.3",
"@types/tape": "^5.6.5",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"eslint": "^8.8.0",
"evalmd": "^0.0.19",
"gopd": "^1.2.0",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"testling": {
"files": "test/index.js"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}
@@ -0,0 +1,17 @@
import { __read } from "tslib";
import { useRef, useState } from 'react';
import { isFunction } from '../utils';
import useMemoizedFn from '../useMemoizedFn';
import useCreation from '../useCreation';
var useResetState = function (initialState) {
var initialStateRef = useRef(initialState);
var initialStateMemo = useCreation(function () {
return isFunction(initialStateRef.current) ? initialStateRef.current() : initialStateRef.current;
}, []);
var _a = __read(useState(initialStateMemo), 2), state = _a[0], setState = _a[1];
var resetState = useMemoizedFn(function () {
setState(initialStateMemo);
});
return [state, setState, resetState];
};
export default useResetState;
@@ -0,0 +1,371 @@
# Change Log
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
## [3.15.0] - 2023-12-14
### Added
- Add support for extends as array of strings to v3 (backport of #245). See PR #260. Thanks to [@domdomegg](https://github.com/domdomegg) for this PR!
## [3.14.1] - 2022-03-22
### Fixed
- Use minimist 1.2.6 for all depencencies becuase of pollution vulnerability. See PR [#197](https://github.com/dividab/tsconfig-paths/pull/197). Thanks to [@gopijaganthan](https://github.com/gopijaganthan) for this fix!
## [3.14.0] - 2022-03-13
### Added
- Support for path mapping starting with `/`. See PR [#180](https://github.com/dividab/tsconfig-paths/pull/180), issue [#113](https://github.com/dividab/tsconfig-paths/issues/113), and issue [#128](https://github.com/dividab/tsconfig-paths/issues/128). Thanks to [@benevbright](https://github.com/benevbright) for this fix!
## [3.13.0] - 2022-03-03
### Added
- Include file extension in paths resolved from package.json "main" field. See PR [#135](https://github.com/dividab/tsconfig-paths/pull/135) and issue [#133](https://github.com/dividab/tsconfig-paths/issues/133). Thanks to [@katywings](https://github.com/katywings) for this fix!
## [3.12.0] - 2021-08-24
- Add support for baseUrl override using TS_NODE_BASEURL env var #185 and #114. Thanks to @ejhayes and @information-security for these PRs!
## [3.11.0] - 2021-08-24
- Reverted upgrade of json5 due to being a breaking change. See PR #173.
## [3.10.1] - 2021-07-06
### Fixed
- Add register.js to published files
## [3.10.0] - 2021-07-06
### Added
- feat(tsconfig-loader): extends config from node_modules (#106). Thanks to @zorji for this PR!
### Fixed
- Update CHANGELOG.md (#96). Thanks to @OliverJAsh for this PR!
- Fix "bootstraping" typo (#111). Thanks to @KRMisha for this PR!
- Update Readme fixes #116 (#123). Thanks to @benwinding for this PR!
- Fixed typo (#144). Thanks to @mprinc for this PR!
- [TYPO] src/mapping-entry.ts (#145). Thanks to @mprinc for this PR!
- docs(README): fix typos (#156). Thanks to @PiDelport for this PR!
- deps: bump json5 to use type definition provided officially (#158). Thanks to @koba04 for this PR!
- Update tsconfig-loader.ts (#161). Thanks to @fecqs for this PR!
- fix typo (#165). Thanks to @wonda-tea-coffee for this PR!
- Add file extenstion to typings property value (#151). Thanks to @dangrussell for this PR!
## [3.9.0] - 2019-09-12
### Added
- Make extension config override instead of deep merge. See PR [#95](https://github.com/dividab/tsconfig-paths/pull/95) and issue [#94](https://github.com/dividab/tsconfig-paths/issues/94). Thanks to [@OliverJAsh](https://github.com/OliverJAsh) for this addition!
## [3.8.0] - 2019-02-05
### Added
- Add option to avoid adding a match-all rule. See PR [#73](https://github.com/dividab/tsconfig-paths/pull/73) and issue [72](https://github.com/dividab/tsconfig-paths/issues/72). Thanks to [@Swatinem](https://github.com/Swatinem) for this addition!
## [3.7.0] - 2018-11-11
### Added
- Allow cleanup of register(). See PR [#64](https://github.com/dividab/tsconfig-paths/pull/64) and issue [63](https://github.com/dividab/tsconfig-paths/issues/63). Thanks to [@TylorS](https://github.com/TylorS) for this addition!
## [3.6.0] - 2018-09-10
### Added
- Prefer Node's core modules over file modules. See PR [#60](https://github.com/dividab/tsconfig-paths/pull/60) and issue [56](https://github.com/dividab/tsconfig-paths/issues/56). Thanks to @ljani for this addition!
## [3.5.0] - 2018-07-28
### Added
- Add support for trailing commas in tsconfig.json (use JSON5 to parse). See issue [#48](https://github.com/dividab/tsconfig-paths/issues/48), and PR [#58](https://github.com/dividab/tsconfig-paths/pull/58). Thanks to [@jshado1](https://github.com/jshado1) for this addition!
## [3.4.2] - 2018-06-30
### Fixed
- Do not resolve directories, only files, sse issue [#51](https://github.com/dividab/tsconfig-paths/issues/51).
## [3.4.1] - 2018-06-24
### Fixed
- Ignore field name mappings in package.json files that are not paths of existing files [#46](https://github.com/dividab/tsconfig-paths/pull/45). Thanks to [@christoffer](https://github.com/christoffer) for this fix!
## [3.4.0] - 2018-06-12
### Added
- Add support for providing a list of field names to try instead of just using "main", [#45](https://github.com/dividab/tsconfig-paths/pull/45). Thanks to [@christoffer-dropbox](https://github.com/christoffer-dropbox) for this addition!
## [3.3.2] - 2018-05-07
### Fixed
- Adding json file extension to extends property, [#40](https://github.com/dividab/tsconfig-paths/pull/40). Thanks to [@cwhite-connectfirst](https://github.com/cwhite-connectfirst) for this fixing this!
## [3.3.1] - 2018-04-17
### Fixed
- Fix project undefined error when calling register, [#37](https://github.com/dividab/tsconfig-paths/issues/37). Thanks to [@natedanner](https://github.com/natedanner) for this fixing this!
## [3.3.0] - 2018-04-14
### Added
- Add possibility to indicate explicitly tsconfig location, [#35](https://github.com/dividab/tsconfig-paths/issues/35). Thanks to [@procopenco](https://github.com/procopenco) for this adding this!
## [3.2.0] - 2018-03-31
### Added
- Added support for passing a filename as cwd, see issue [#31](https://github.com/dividab/tsconfig-paths/issues/31) and PR [#32](https://github.com/dividab/tsconfig-paths/pull/32). Thanks to [@amodm](https://github.com/amodm) for this adding this!
## [3.1.3] - 2018-03-14
### Fixed
- Fix async recursion, see [#30](https://github.com/dividab/tsconfig-paths/pull/30). Thanks to [@Nayni](https://github.com/Nayni) for this fix!
## [3.1.2] - 2018-03-13
### Fixed
- Fix a forgotten return when doneCallback is invoked, see [#29](https://github.com/dividab/tsconfig-paths/pull/29). Thanks to [@Nayni](https://github.com/Nayni) for this fix!
## [3.1.1] - 2018-01-13
### Fixed
- Fix read json async when it does not exist
## [3.1.0] - 2018-01-13
### Added
- Implement default async json reader function.
## [3.0.0] - 2018-01-13
### Changed
- Remove parameter `absoluteSourceFileName` from the `MatchPath` and `matchFromAbsolutePaths` functions. It was not used internally.
- `matchFromAbsolutePaths` now accepts a pre-sorted array of `MappingEntry`s instead of a dictionary. This was done so the sorting could be done once which should give better performance.
### Added
- `createMatchPathAsync`, creates an async version of the `MatchPath` function. Can be used for example by webpack plugins.
- `matchFromAbsolutePathsAsync`, async version of `matchFromAbsolutePaths`.
## [2.7.3]
### Fixed
- Only resolve path if tsconfig present [#25](https://github.com/dividab/tsconfig-paths/pull/25). Thanks to @nicoschoenmaker for the PR.
## [2.7.2]
### Fixed
- Return absolute path to tsconfig.json.
## [2.7.1]
### Fixed
- Remove left over console.log.
## [2.7.0]
### Added
- Support `baseUrl` to exist in base tsconfig.json when using `extends`, see [#23](https://github.com/dividab/tsconfig-paths/issues/23).
## [2.6.0]
### Added
- Add `baseUrl` and `configFileAbsolutePath` to the result of `loadConfig`.
## [2.5.0]
### Added
- New function in Programmatic API `loadConfig`.
## [2.4.3]
### Fixed
- Export MatchPth typing.
## [2.4.2]
### Fixed
- Add missing types field in package.json.
## [2.4.1]
### Fixed
- Include declaration files. Fixes [#22](https://github.com/dividab/tsconfig-paths/issues/22).
## [2.4.0]
### Changed
- Removed dependency for package `tsconfig`.
### Fixed
- Support for config inheritance with `extends`. Fixes [#17](https://github.com/dividab/tsconfig-paths/issues/17).
## [2.2.0]
### Fixed
- Fixed issue [#7](https://github.com/dividab/tsconfig-paths/issues/7).
## [2.1.2]
### Fixed
- Fixed issue [#6](https://github.com/dividab/tsconfig-paths/issues/6).
## [2.1.1]
### Fixed
- Fixed issue [#4](https://github.com/dividab/tsconfig-paths/issues/4)
## [2.1.0]
### Fixed
- Fixed issue [#3](https://github.com/dividab/tsconfig-paths/issues/3)
## [2.0.0]
### Added
- We now look at `process.env.TS_NODE_PROJECT`
- Functionality to bootstrap tsconfig-paths. Documentation in [README](https://github.com/dividab/tsconfig-paths/blob/master/README.md)
### Changed
- Changed signature for `createMatchPath`. Now only takes absoluteUrl and paths.
## [1.1.0]
### Added
- More explanation to readme.
- Match all extensions in require.extensions.
- Match longest pattern prefix first as typesript does.
- Match file in main field of package.json.
- Check for index files explicitly.
## [1.0.0] - 2016-12-30
- First stable release.
## [0.4.0] - 2016-12-30
### Changed
- Renamed project to `tsocnfig-paths`.
## [0.3.0] - 2016-12-30
### Added
- API documentation.
- `createMatchPath` function.
- `matchFromAbsolutePaths` function.
### Removed
- `findPath` function.
## [0.2.1] - 2016-12-29
### Fixed
- `tsconfig-paths/register` was not available.
## [0.2.0] - 2016-12-29
### Fixed
- Paths for files in sub-dirs.
### Added
- Programmatic use.
## [0.1.2] - 2016-12-28
### Fixed
- Fixed wrong name of the package in README.
- Add missing files on publish.
## [0.1.1] - 2016-12-28
### Added
- Loading of tsconfig.
- Example.
- Publish scripts.
## [0.1.0] - 2016-12-28
- Initial version.
[unreleased]: https://github.com/dividab/tsconfig-paths/compare/v3.9.0...master
[3.9.0]: https://github.com/dividab/tsconfig-paths/compare/v3.8.0...v3.9.0
[3.8.0]: https://github.com/dividab/tsconfig-paths/compare/3.7.0...3.8.0
[3.7.0]: https://github.com/dividab/tsconfig-paths/compare/3.6.0...3.7.0
[3.6.0]: https://github.com/dividab/tsconfig-paths/compare/3.5.0...3.6.0
[3.5.0]: https://github.com/dividab/tsconfig-paths/compare/3.4.2...3.5.0
[3.4.2]: https://github.com/dividab/tsconfig-paths/compare/3.4.1...3.4.2
[3.4.1]: https://github.com/dividab/tsconfig-paths/compare/3.4.0...3.4.1
[3.4.0]: https://github.com/dividab/tsconfig-paths/compare/3.3.2...3.4.0
[3.3.2]: https://github.com/dividab/tsconfig-paths/compare/3.3.1...3.3.2
[3.3.1]: https://github.com/dividab/tsconfig-paths/compare/3.3.0...3.3.1
[3.3.0]: https://github.com/dividab/tsconfig-paths/compare/3.2.0...3.3.0
[3.2.0]: https://github.com/dividab/tsconfig-paths/compare/3.1.3...3.2.0
[3.1.3]: https://github.com/dividab/tsconfig-paths/compare/3.1.2...3.1.3
[3.1.2]: https://github.com/dividab/tsconfig-paths/compare/3.1.1...3.1.2
[3.1.1]: https://github.com/dividab/tsconfig-paths/compare/3.1.0...3.1.1
[3.1.0]: https://github.com/dividab/tsconfig-paths/compare/3.0.0...3.1.0
[3.0.0]: https://github.com/dividab/tsconfig-paths/compare/2.7.3...3.0.0
[2.7.3]: https://github.com/dividab/tsconfig-paths/compare/2.7.2...2.7.3
[2.7.2]: https://github.com/dividab/tsconfig-paths/compare/2.7.1...2.7.2
[2.7.1]: https://github.com/dividab/tsconfig-paths/compare/2.7.0...2.7.1
[2.7.0]: https://github.com/dividab/tsconfig-paths/compare/2.6.0...2.7.0
[2.6.0]: https://github.com/dividab/tsconfig-paths/compare/2.5.0...2.6.0
[2.5.0]: https://github.com/dividab/tsconfig-paths/compare/2.4.3...2.5.0
[2.4.3]: https://github.com/dividab/tsconfig-paths/compare/2.4.2...2.4.3
[2.4.2]: https://github.com/dividab/tsconfig-paths/compare/2.4.1...2.4.2
[2.4.1]: https://github.com/dividab/tsconfig-paths/compare/2.4.0...2.4.1
[2.4.0]: https://github.com/dividab/tsconfig-paths/compare/2.2.0...2.4.0
[2.2.0]: https://github.com/dividab/tsconfig-paths/compare/2.1.2...2.2.0
[2.1.2]: https://github.com/dividab/tsconfig-paths/compare/2.1.1...2.1.2
[2.1.1]: https://github.com/dividab/tsconfig-paths/compare/2.1.0...2.1.1
@@ -0,0 +1 @@
{"name":"@marijn/find-cluster-break","version":"1.0.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532103634,"integrity":"sha512-EMxVl3msL4asnJ+WbXdxC4//zYQbyhEGXKk4nk0Cu08MBhXtZV7HOLcB+aEbnusFMtxbpteBxMhspgUFtFcQdg==","mode":420,"size":1102},"dist/index.cjs":{"checkedAt":1794532103634,"integrity":"sha512-9GEgh1QoRLCi8Q471QYFsHBLS3L7C/8ntrcBfZYIK/bMy2ZY/RJGzi7da6Ps9Ovh/nQ5vpxGuvNZ0+/hRwuRwQ==","mode":420,"size":4204},"dist/index.d.cts":{"checkedAt":1794532103634,"integrity":"sha512-7I6aPKpw3El6fPmeB8gz7VHTKQeUTDoTMUIhZWPQuWfoU/jN7JA8U5lYj+h/ppwddWUm2yQAU+JRZeuk4nKkig==","mode":420,"size":658},"src/index.js":{"checkedAt":1794532103634,"integrity":"sha512-LiUhp/pcrkzOkGv4YPzpsPcydOvFVR9dElF1VSzTWRdF7D6tAXbo7bRzHLxtmD+qiD7fk/wDy2nIF0NOkbFbqg==","mode":420,"size":4241},"rollup.config.js":{"checkedAt":1794532103634,"integrity":"sha512-Qlc/yY+ync+t2T8NHDDU0p1EDhueZQLOwr9nInoazHz0H6kTgpylt12LJMDBS7ytGtjLWE5XJfL1lW4XLS0opw==","mode":420,"size":106},"test/test-cluster.js":{"checkedAt":1794532103634,"integrity":"sha512-laxaJrHgEXs0Wamq24/4sneDbaDoTn6AalwFYF2MGsp0l0vJOU+6xiA/ZNgWnO+F16nrbHIzUPs94MyyNWezQw==","mode":420,"size":783},"package.json":{"checkedAt":1794532103634,"integrity":"sha512-jxLFj4QVRlMhrzTVAxEic5q+Yb3gsyg8hiaCC9T7QXx8g1rCGCVtMGbtNGM6cAg0LDMBVpTH2OSy7Q5wCKkpbg==","mode":420,"size":847},"README.md":{"checkedAt":1794532103635,"integrity":"sha512-ixx9BcSINeWqg7MMURuDZywf32IsNusTUyz0g4Z25ZkPMXPQrl4FCNXIjwrontn7Vx5dUaOWU/qABPFaHgROcw==","mode":420,"size":952},"src/index.d.ts":{"checkedAt":1794532103634,"integrity":"sha512-7I6aPKpw3El6fPmeB8gz7VHTKQeUTDoTMUIhZWPQuWfoU/jN7JA8U5lYj+h/ppwddWUm2yQAU+JRZeuk4nKkig==","mode":420,"size":658}}}
@@ -0,0 +1,75 @@
/**
* @import {Info, Map, State} from 'mdast-util-to-markdown'
* @import {Code, Parents} from 'mdast'
*/
import {longestStreak} from 'longest-streak'
import {formatCodeAsIndented} from '../util/format-code-as-indented.js'
import {checkFence} from '../util/check-fence.js'
/**
* @param {Code} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
export function code(node, _, state, info) {
const marker = checkFence(state)
const raw = node.value || ''
const suffix = marker === '`' ? 'GraveAccent' : 'Tilde'
if (formatCodeAsIndented(node, state)) {
const exit = state.enter('codeIndented')
const value = state.indentLines(raw, map)
exit()
return value
}
const tracker = state.createTracker(info)
const sequence = marker.repeat(Math.max(longestStreak(raw, marker) + 1, 3))
const exit = state.enter('codeFenced')
let value = tracker.move(sequence)
if (node.lang) {
const subexit = state.enter(`codeFencedLang${suffix}`)
value += tracker.move(
state.safe(node.lang, {
before: value,
after: ' ',
encode: ['`'],
...tracker.current()
})
)
subexit()
}
if (node.lang && node.meta) {
const subexit = state.enter(`codeFencedMeta${suffix}`)
value += tracker.move(' ')
value += tracker.move(
state.safe(node.meta, {
before: value,
after: '\n',
encode: ['`'],
...tracker.current()
})
)
subexit()
}
value += tracker.move('\n')
if (raw) {
value += tracker.move(raw + '\n')
}
value += tracker.move(sequence)
exit()
return value
}
/** @type {Map} */
function map(line, _, blank) {
return (blank ? '' : ' ') + line
}
@@ -0,0 +1,83 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
declare namespace Intl {
// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories
type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other";
type PluralRuleType = "cardinal" | "ordinal";
interface PluralRulesOptions {
localeMatcher?: "lookup" | "best fit" | undefined;
type?: PluralRuleType | undefined;
minimumIntegerDigits?: number | undefined;
minimumFractionDigits?: number | undefined;
maximumFractionDigits?: number | undefined;
minimumSignificantDigits?: number | undefined;
maximumSignificantDigits?: number | undefined;
}
interface ResolvedPluralRulesOptions {
locale: string;
pluralCategories: LDMLPluralRule[];
type: PluralRuleType;
minimumIntegerDigits: number;
minimumFractionDigits: number;
maximumFractionDigits: number;
minimumSignificantDigits?: number;
maximumSignificantDigits?: number;
}
interface PluralRules {
resolvedOptions(): ResolvedPluralRulesOptions;
select(n: number): LDMLPluralRule;
}
interface PluralRulesConstructor {
new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules;
(locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules;
supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[];
}
const PluralRules: PluralRulesConstructor;
interface NumberFormatPartTypeRegistry {
literal: never;
nan: never;
infinity: never;
percent: never;
integer: never;
group: never;
decimal: never;
fraction: never;
plusSign: never;
minusSign: never;
percentSign: never;
currency: never;
}
type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry;
interface NumberFormatPart {
type: NumberFormatPartTypes;
value: string;
}
interface NumberFormat {
formatToParts(number?: number | bigint): NumberFormatPart[];
}
}
@@ -0,0 +1,10 @@
language: node_js
node_js:
- "10"
- "8"
- "6"
- "4"
script:
- "npm run test-travis"
after_script:
- "npm install coveralls@2.11.x && cat coverage/lcov.info | coveralls"
@@ -0,0 +1,4 @@
'use strict';
import url from 'url';
export default url.URLSearchParams;
@@ -0,0 +1,69 @@
# blf-colorful-appender
[![npm package](https://nodei.co/npm/blf-colorful-appender.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/blf-colorful-appender)
[![NPM version](https://img.shields.io/npm/v/blf-colorful-appender.svg?style=flat)](https://npmjs.org/package/blf-colorful-appender)
[![NPM Downloads](https://img.shields.io/npm/dm/blf-colorful-appender.svg?style=flat)](https://npmjs.org/package/blf-colorful-appender)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![TypeScript](https://img.shields.io/badge/lang-TypeScript-007ACC.svg)](https://www.typescriptlang.org/)
> 🚀 A ColorfulAppender for `base-log-factory`.
---
## 📅 Documentation
For detailed usage instructions and API references, please visit the official documentation:
👉 [View Full Documentation](https://fengxinming.github.io/base-log-factory/)
---
## 🚀 Quick Start
### 1. Installation
```bash
npm install base-log-factory blf-colorful-appender
```
### 2. Basic Usage
```typescript
// factory.ts
import { LogFactory } from 'base-log-factory';
import { ColorfulAppender } from 'blf-colorful-appender';
export default new LogFactory({
appenders: [new ColorfulAppender()]
});
// main.ts
import logFactory from './factory';
const logger = logFactory.getLogger('app');
logger.info('Server started successfully');
```
---
## 📝 Contribution Guide
1. **Development Setup**
```bash
npm install
```
2. **Testing**
```bash
npm test # Run unit tests
```
3. **Before Submitting PRs**
- Ensure ESLint is configured (VSCode plugin recommended)
- Add test cases for new features
- Update documentation
---
## 📄 License
[MIT License](../../LICENSE)
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,YAAS,CAAC;AAC1C","sources":["packages/@react-aria/overlays/intl/de-DE.json"],"sourcesContent":["{\n \"dismiss\": \"Schließen\"\n}\n"],"names":[],"version":3,"file":"de-DE.module.js.map"}
@@ -0,0 +1,10 @@
"use client";
import {
popover_default
} from "./chunk-2QQAR2RD.mjs";
import "./chunk-CGIRYUEE.mjs";
import "./chunk-L4NZQNWQ.mjs";
import "./chunk-C6TMY7KY.mjs";
export {
popover_default as default
};
@@ -0,0 +1,11 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import { Kind } from '../symbols/index';
export interface UnsafeOptions extends SchemaOptions {
[Kind]?: string;
}
export interface TUnsafe<T> extends TSchema {
[Kind]: string;
static: T;
}
/** `[Json]` Creates a Unsafe type that will infers as the generic argument T */
export declare function Unsafe<T>(options?: UnsafeOptions): TUnsafe<T>;
@@ -0,0 +1,62 @@
/**
* @file 转换复合字形的contours,以便于显示
* @author mengke01(kekee000@gmail.com)
*/
import pathCeil from '../../graphics/pathCeil';
import pathTransform from '../../graphics/pathTransform';
import {clone} from '../../common/lang';
/**
* 转换复合字形轮廓,结果保存在contoursList中,并返回当前glyf的轮廓
*
* @param {Object} glyf glyf对象
* @param {Object} ttf ttfObject对象
* @param {Object=} contoursList 保存转换中间生成的contours
* @param {number} glyfIndex glyf对象当前的index
* @return {Array} 转换后的轮廓
*/
export default function transformGlyfContours(glyf, ttf, contoursList = {}, glyfIndex) {
if (!glyf.glyfs) {
return glyf;
}
const compoundContours = [];
glyf.glyfs.forEach(g => {
const glyph = ttf.glyf[g.glyphIndex];
if (!glyph || glyph === glyf) {
return;
}
// 递归转换contours
if (glyph.compound && !contoursList[g.glyphIndex]) {
transformGlyfContours(glyph, ttf, contoursList, g.glyphIndex);
}
// 这里需要进行matrix变换,需要复制一份
const contours = clone(glyph.compound ? (contoursList[g.glyphIndex] || []) : glyph.contours);
const transform = g.transform;
for (let i = 0, l = contours.length; i < l; i++) {
pathTransform(
contours[i],
transform.a,
transform.b,
transform.c,
transform.d,
transform.e,
transform.f
);
compoundContours.push(pathCeil(contours[i]));
}
});
// eslint-disable-next-line eqeqeq
if (null != glyfIndex) {
contoursList[glyfIndex] = compoundContours;
}
return compoundContours;
}
@@ -0,0 +1,721 @@
/**
* The `node:sqlite` module facilitates working with SQLite databases.
* To access it:
*
* ```js
* import sqlite from 'node:sqlite';
* ```
*
* This module is only available under the `node:` scheme. The following will not
* work:
*
* ```js
* import sqlite from 'sqlite';
* ```
*
* The following example shows the basic usage of the `node:sqlite` module to open
* an in-memory database, write data to the database, and then read the data back.
*
* ```js
* import { DatabaseSync } from 'node:sqlite';
* const database = new DatabaseSync(':memory:');
*
* // Execute SQL statements from strings.
* database.exec(`
* CREATE TABLE data(
* key INTEGER PRIMARY KEY,
* value TEXT
* ) STRICT
* `);
* // Create a prepared statement to insert data into the database.
* const insert = database.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
* // Execute the prepared statement with bound values.
* insert.run(1, 'hello');
* insert.run(2, 'world');
* // Create a prepared statement to read data from the database.
* const query = database.prepare('SELECT * FROM data ORDER BY key');
* // Execute the prepared statement and log the result set.
* console.log(query.all());
* // Prints: [ { key: 1, value: 'hello' }, { key: 2, value: 'world' } ]
* ```
* @since v22.5.0
* @experimental
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/sqlite.js)
*/
declare module "node:sqlite" {
import { PathLike } from "node:fs";
type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView;
type SQLOutputValue = null | number | bigint | string | NodeJS.NonSharedUint8Array;
interface DatabaseSyncOptions {
/**
* If `true`, the database is opened by the constructor. When
* this value is `false`, the database must be opened via the `open()` method.
* @since v22.5.0
* @default true
*/
open?: boolean | undefined;
/**
* If `true`, foreign key constraints
* are enabled. This is recommended but can be disabled for compatibility with
* legacy database schemas. The enforcement of foreign key constraints can be
* enabled and disabled after opening the database using
* [`PRAGMA foreign_keys`](https://www.sqlite.org/pragma.html#pragma_foreign_keys).
* @since v22.10.0
* @default true
*/
enableForeignKeyConstraints?: boolean | undefined;
/**
* If `true`, SQLite will accept
* [double-quoted string literals](https://www.sqlite.org/quirks.html#dblquote).
* This is not recommended but can be
* enabled for compatibility with legacy database schemas.
* @since v22.10.0
* @default false
*/
enableDoubleQuotedStringLiterals?: boolean | undefined;
/**
* If `true`, the database is opened in read-only mode.
* If the database does not exist, opening it will fail.
* @since v22.12.0
* @default false
*/
readOnly?: boolean | undefined;
/**
* If `true`, the `loadExtension` SQL function
* and the `loadExtension()` method are enabled.
* You can call `enableLoadExtension(false)` later to disable this feature.
* @since v22.13.0
* @default false
*/
allowExtension?: boolean | undefined;
/**
* The [busy timeout](https://sqlite.org/c3ref/busy_timeout.html) in milliseconds. This is the maximum amount of
* time that SQLite will wait for a database lock to be released before
* returning an error.
* @since v22.16.0
* @default 0
*/
timeout?: number | undefined;
/**
* If `true`, integer fields are read as JavaScript `BigInt` values. If `false`,
* integer fields are read as JavaScript numbers.
* @since v22.18.0
* @default false
*/
readBigInts?: boolean | undefined;
/**
* If `true`, query results are returned as arrays instead of objects.
* @since v22.18.0
* @default false
*/
returnArrays?: boolean | undefined;
/**
* If `true`, allows binding named parameters without the prefix
* character (e.g., `foo` instead of `:foo`).
* @since v22.18.0
* @default true
*/
allowBareNamedParameters?: boolean | undefined;
/**
* If `true`, unknown named parameters are ignored when binding.
* If `false`, an exception is thrown for unknown named parameters.
* @since v22.18.0
* @default false
*/
allowUnknownNamedParameters?: boolean | undefined;
}
interface CreateSessionOptions {
/**
* A specific table to track changes for. By default, changes to all tables are tracked.
* @since v22.12.0
*/
table?: string | undefined;
/**
* Name of the database to track. This is useful when multiple databases have been added using
* [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html).
* @since v22.12.0
* @default 'main'
*/
db?: string | undefined;
}
interface ApplyChangesetOptions {
/**
* Skip changes that, when targeted table name is supplied to this function, return a truthy value.
* By default, all changes are attempted.
* @since v22.12.0
*/
filter?: ((tableName: string) => boolean) | undefined;
/**
* A function that determines how to handle conflicts. The function receives one argument,
* which can be one of the following values:
*
* * `SQLITE_CHANGESET_DATA`: A `DELETE` or `UPDATE` change does not contain the expected "before" values.
* * `SQLITE_CHANGESET_NOTFOUND`: A row matching the primary key of the `DELETE` or `UPDATE` change does not exist.
* * `SQLITE_CHANGESET_CONFLICT`: An `INSERT` change results in a duplicate primary key.
* * `SQLITE_CHANGESET_FOREIGN_KEY`: Applying a change would result in a foreign key violation.
* * `SQLITE_CHANGESET_CONSTRAINT`: Applying a change results in a `UNIQUE`, `CHECK`, or `NOT NULL` constraint
* violation.
*
* The function should return one of the following values:
*
* * `SQLITE_CHANGESET_OMIT`: Omit conflicting changes.
* * `SQLITE_CHANGESET_REPLACE`: Replace existing values with conflicting changes (only valid with
`SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT` conflicts).
* * `SQLITE_CHANGESET_ABORT`: Abort on conflict and roll back the database.
*
* When an error is thrown in the conflict handler or when any other value is returned from the handler,
* applying the changeset is aborted and the database is rolled back.
*
* **Default**: A function that returns `SQLITE_CHANGESET_ABORT`.
* @since v22.12.0
*/
onConflict?: ((conflictType: number) => number) | undefined;
}
interface FunctionOptions {
/**
* If `true`, the [`SQLITE_DETERMINISTIC`](https://www.sqlite.org/c3ref/c_deterministic.html) flag is
* set on the created function.
* @default false
*/
deterministic?: boolean | undefined;
/**
* If `true`, the [`SQLITE_DIRECTONLY`](https://www.sqlite.org/c3ref/c_directonly.html) flag is set on
* the created function.
* @default false
*/
directOnly?: boolean | undefined;
/**
* If `true`, integer arguments to `function`
* are converted to `BigInt`s. If `false`, integer arguments are passed as
* JavaScript numbers.
* @default false
*/
useBigIntArguments?: boolean | undefined;
/**
* If `true`, `function` may be invoked with any number of
* arguments (between zero and
* [`SQLITE_MAX_FUNCTION_ARG`](https://www.sqlite.org/limits.html#max_function_arg)). If `false`,
* `function` must be invoked with exactly `function.length` arguments.
* @default false
*/
varargs?: boolean | undefined;
}
interface AggregateOptions<T extends SQLInputValue = SQLInputValue> extends FunctionOptions {
/**
* The identity value for the aggregation function. This value is used when the aggregation
* function is initialized. When a `Function` is passed the identity will be its return value.
*/
start: T | (() => T);
/**
* The function to call for each row in the aggregation. The
* function receives the current state and the row value. The return value of
* this function should be the new state.
*/
step: (accumulator: T, ...args: SQLOutputValue[]) => T;
/**
* The function to call to get the result of the
* aggregation. The function receives the final state and should return the
* result of the aggregation.
*/
result?: ((accumulator: T) => SQLInputValue) | undefined;
/**
* When this function is provided, the `aggregate` method will work as a window function.
* The function receives the current state and the dropped row value. The return value of this function should be the
* new state.
*/
inverse?: ((accumulator: T, ...args: SQLOutputValue[]) => T) | undefined;
}
/**
* This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs
* exposed by this class execute synchronously.
* @since v22.5.0
*/
class DatabaseSync implements Disposable {
/**
* Constructs a new `DatabaseSync` instance.
* @param path The path of the database.
* A SQLite database can be stored in a file or completely [in memory](https://www.sqlite.org/inmemorydb.html).
* To use a file-backed database, the path should be a file path.
* To use an in-memory database, the path should be the special name `':memory:'`.
* @param options Configuration options for the database connection.
*/
constructor(path: PathLike, options?: DatabaseSyncOptions);
/**
* Registers a new aggregate function with the SQLite database. This method is a wrapper around
* [`sqlite3_create_window_function()`](https://www.sqlite.org/c3ref/create_function.html).
*
* When used as a window function, the `result` function will be called multiple times.
*
* ```js
* import { DatabaseSync } from 'node:sqlite';
*
* const db = new DatabaseSync(':memory:');
* db.exec(`
* CREATE TABLE t3(x, y);
* INSERT INTO t3 VALUES ('a', 4),
* ('b', 5),
* ('c', 3),
* ('d', 8),
* ('e', 1);
* `);
*
* db.aggregate('sumint', {
* start: 0,
* step: (acc, value) => acc + value,
* });
*
* db.prepare('SELECT sumint(y) as total FROM t3').get(); // { total: 21 }
* ```
* @since v22.16.0
* @param name The name of the SQLite function to create.
* @param options Function configuration settings.
*/
aggregate(name: string, options: AggregateOptions): void;
aggregate<T extends SQLInputValue>(name: string, options: AggregateOptions<T>): void;
/**
* Closes the database connection. An exception is thrown if the database is not
* open. This method is a wrapper around [`sqlite3_close_v2()`](https://www.sqlite.org/c3ref/close.html).
* @since v22.5.0
*/
close(): void;
/**
* Loads a shared library into the database connection. This method is a wrapper
* around [`sqlite3_load_extension()`](https://www.sqlite.org/c3ref/load_extension.html). It is required to enable the
* `allowExtension` option when constructing the `DatabaseSync` instance.
* @since v22.13.0
* @param path The path to the shared library to load.
*/
loadExtension(path: string): void;
/**
* Enables or disables the `loadExtension` SQL function, and the `loadExtension()`
* method. When `allowExtension` is `false` when constructing, you cannot enable
* loading extensions for security reasons.
* @since v22.13.0
* @param allow Whether to allow loading extensions.
*/
enableLoadExtension(allow: boolean): void;
/**
* This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html)
* @since v22.16.0
* @param dbName Name of the database. This can be `'main'` (the default primary database) or any other
* database that has been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) **Default:** `'main'`.
* @returns The location of the database file. When using an in-memory database,
* this method returns null.
*/
location(dbName?: string): string | null;
/**
* This method allows one or more SQL statements to be executed without returning
* any results. This method is useful when executing SQL statements read from a
* file. This method is a wrapper around [`sqlite3_exec()`](https://www.sqlite.org/c3ref/exec.html).
* @since v22.5.0
* @param sql A SQL string to execute.
*/
exec(sql: string): void;
/**
* This method is used to create SQLite user-defined functions. This method is a
* wrapper around [`sqlite3_create_function_v2()`](https://www.sqlite.org/c3ref/create_function.html).
* @since v22.13.0
* @param name The name of the SQLite function to create.
* @param options Optional configuration settings for the function.
* @param func The JavaScript function to call when the SQLite
* function is invoked. The return value of this function should be a valid
* SQLite data type: see
* [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v22.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite).
* The result defaults to `NULL` if the return value is `undefined`.
*/
function(
name: string,
options: FunctionOptions,
func: (...args: SQLOutputValue[]) => SQLInputValue,
): void;
function(name: string, func: (...args: SQLOutputValue[]) => SQLInputValue): void;
/**
* Whether the database is currently open or not.
* @since v22.15.0
*/
readonly isOpen: boolean;
/**
* Whether the database is currently within a transaction. This method
* is a wrapper around [`sqlite3_get_autocommit()`](https://sqlite.org/c3ref/get_autocommit.html).
* @since v22.16.0
*/
readonly isTransaction: boolean;
/**
* Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via
* the constructor. An exception is thrown if the database is already open.
* @since v22.5.0
*/
open(): void;
/**
* Compiles a SQL statement into a [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This method is a wrapper
* around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html).
* @since v22.5.0
* @param sql A SQL string to compile to a prepared statement.
* @return The prepared statement.
*/
prepare(sql: string): StatementSync;
/**
* Creates and attaches a session to the database. This method is a wrapper around
* [`sqlite3session_create()`](https://www.sqlite.org/session/sqlite3session_create.html) and
* [`sqlite3session_attach()`](https://www.sqlite.org/session/sqlite3session_attach.html).
* @param options The configuration options for the session.
* @returns A session handle.
* @since v22.12.0
*/
createSession(options?: CreateSessionOptions): Session;
/**
* An exception is thrown if the database is not
* open. This method is a wrapper around
* [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html).
*
* ```js
* const sourceDb = new DatabaseSync(':memory:');
* const targetDb = new DatabaseSync(':memory:');
*
* sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
* targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
*
* const session = sourceDb.createSession();
*
* const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
* insert.run(1, 'hello');
* insert.run(2, 'world');
*
* const changeset = session.changeset();
* targetDb.applyChangeset(changeset);
* // Now that the changeset has been applied, targetDb contains the same data as sourceDb.
* ```
* @param changeset A binary changeset or patchset.
* @param options The configuration options for how the changes will be applied.
* @returns Whether the changeset was applied successfully without being aborted.
* @since v22.12.0
*/
applyChangeset(changeset: Uint8Array, options?: ApplyChangesetOptions): boolean;
/**
* Closes the database connection. If the database connection is already closed
* then this is a no-op.
* @since v22.15.0
* @experimental
*/
[Symbol.dispose](): void;
}
/**
* @since v22.12.0
*/
interface Session {
/**
* Retrieves a changeset containing all changes since the changeset was created. Can be called multiple times.
* An exception is thrown if the database or the session is not open. This method is a wrapper around
* [`sqlite3session_changeset()`](https://www.sqlite.org/session/sqlite3session_changeset.html).
* @returns Binary changeset that can be applied to other databases.
* @since v22.12.0
*/
changeset(): NodeJS.NonSharedUint8Array;
/**
* Similar to the method above, but generates a more compact patchset. See
* [Changesets and Patchsets](https://www.sqlite.org/sessionintro.html#changesets_and_patchsets)
* in the documentation of SQLite. An exception is thrown if the database or the session is not open. This method is a
* wrapper around
* [`sqlite3session_patchset()`](https://www.sqlite.org/session/sqlite3session_patchset.html).
* @returns Binary patchset that can be applied to other databases.
* @since v22.12.0
*/
patchset(): NodeJS.NonSharedUint8Array;
/**
* Closes the session. An exception is thrown if the database or the session is not open. This method is a
* wrapper around
* [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html).
*/
close(): void;
}
interface StatementColumnMetadata {
/**
* The unaliased name of the column in the origin
* table, or `null` if the column is the result of an expression or subquery.
* This property is the result of [`sqlite3_column_origin_name()`](https://www.sqlite.org/c3ref/column_database_name.html).
*/
column: string | null;
/**
* The unaliased name of the origin database, or
* `null` if the column is the result of an expression or subquery. This
* property is the result of [`sqlite3_column_database_name()`](https://www.sqlite.org/c3ref/column_database_name.html).
*/
database: string | null;
/**
* The name assigned to the column in the result set of a
* `SELECT` statement. This property is the result of
* [`sqlite3_column_name()`](https://www.sqlite.org/c3ref/column_name.html).
*/
name: string;
/**
* The unaliased name of the origin table, or `null` if
* the column is the result of an expression or subquery. This property is the
* result of [`sqlite3_column_table_name()`](https://www.sqlite.org/c3ref/column_database_name.html).
*/
table: string | null;
/**
* The declared data type of the column, or `null` if the
* column is the result of an expression or subquery. This property is the
* result of [`sqlite3_column_decltype()`](https://www.sqlite.org/c3ref/column_decltype.html).
*/
type: string | null;
}
interface StatementResultingChanges {
/**
* The number of rows modified, inserted, or deleted by the most recently completed `INSERT`, `UPDATE`, or `DELETE` statement.
* This field is either a number or a `BigInt` depending on the prepared statement's configuration.
* This property is the result of [`sqlite3_changes64()`](https://www.sqlite.org/c3ref/changes.html).
*/
changes: number | bigint;
/**
* The most recently inserted rowid.
* This field is either a number or a `BigInt` depending on the prepared statement's configuration.
* This property is the result of [`sqlite3_last_insert_rowid()`](https://www.sqlite.org/c3ref/last_insert_rowid.html).
*/
lastInsertRowid: number | bigint;
}
/**
* This class represents a single [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This class cannot be
* instantiated via its constructor. Instead, instances are created via the`database.prepare()` method. All APIs exposed by this class execute
* synchronously.
*
* A prepared statement is an efficient binary representation of the SQL used to
* create it. Prepared statements are parameterizable, and can be invoked multiple
* times with different bound values. Parameters also offer protection against [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) attacks. For these reasons, prepared statements are
* preferred
* over hand-crafted SQL strings when handling user input.
* @since v22.5.0
*/
class StatementSync {
private constructor();
/**
* This method executes a prepared statement and returns all results as an array of
* objects. If the prepared statement does not return any results, this method
* returns an empty array. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using
* the values in `namedParameters` and `anonymousParameters`.
* @since v22.5.0
* @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping.
* @param anonymousParameters Zero or more values to bind to anonymous parameters.
* @return An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of
* the row.
*/
all(...anonymousParameters: SQLInputValue[]): Record<string, SQLOutputValue>[];
all(
namedParameters: Record<string, SQLInputValue>,
...anonymousParameters: SQLInputValue[]
): Record<string, SQLOutputValue>[];
/**
* This method is used to retrieve information about the columns returned by the
* prepared statement.
* @since v22.16.0
* @returns An array of objects. Each object corresponds to a column
* in the prepared statement, and contains the following properties:
*/
columns(): StatementColumnMetadata[];
/**
* The source SQL text of the prepared statement with parameter
* placeholders replaced by the values that were used during the most recent
* execution of this prepared statement. This property is a wrapper around
* [`sqlite3_expanded_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html).
* @since v22.5.0
*/
readonly expandedSQL: string;
/**
* This method executes a prepared statement and returns the first result as an
* object. If the prepared statement does not return any results, this method
* returns `undefined`. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the
* values in `namedParameters` and `anonymousParameters`.
* @since v22.5.0
* @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping.
* @param anonymousParameters Zero or more values to bind to anonymous parameters.
* @return An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no
* rows were returned from the database then this method returns `undefined`.
*/
get(...anonymousParameters: SQLInputValue[]): Record<string, SQLOutputValue> | undefined;
get(
namedParameters: Record<string, SQLInputValue>,
...anonymousParameters: SQLInputValue[]
): Record<string, SQLOutputValue> | undefined;
/**
* This method executes a prepared statement and returns an iterator of
* objects. If the prepared statement does not return any results, this method
* returns an empty iterator. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using
* the values in `namedParameters` and `anonymousParameters`.
* @since v22.13.0
* @param namedParameters An optional object used to bind named parameters.
* The keys of this object are used to configure the mapping.
* @param anonymousParameters Zero or more values to bind to anonymous parameters.
* @returns An iterable iterator of objects. Each object corresponds to a row
* returned by executing the prepared statement. The keys and values of each
* object correspond to the column names and values of the row.
*/
iterate(...anonymousParameters: SQLInputValue[]): NodeJS.Iterator<Record<string, SQLOutputValue>>;
iterate(
namedParameters: Record<string, SQLInputValue>,
...anonymousParameters: SQLInputValue[]
): NodeJS.Iterator<Record<string, SQLOutputValue>>;
/**
* This method executes a prepared statement and returns an object summarizing the
* resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the
* values in `namedParameters` and `anonymousParameters`.
* @since v22.5.0
* @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping.
* @param anonymousParameters Zero or more values to bind to anonymous parameters.
*/
run(...anonymousParameters: SQLInputValue[]): StatementResultingChanges;
run(
namedParameters: Record<string, SQLInputValue>,
...anonymousParameters: SQLInputValue[]
): StatementResultingChanges;
/**
* The names of SQLite parameters begin with a prefix character. By default,`node:sqlite` requires that this prefix character is present when binding
* parameters. However, with the exception of dollar sign character, these
* prefix characters also require extra quoting when used in object keys.
*
* To improve ergonomics, this method can be used to also allow bare named
* parameters, which do not require the prefix character in JavaScript code. There
* are several caveats to be aware of when enabling bare named parameters:
*
* * The prefix character is still required in SQL.
* * The prefix character is still allowed in JavaScript. In fact, prefixed names
* will have slightly better binding performance.
* * Using ambiguous named parameters, such as `$k` and `@k`, in the same prepared
* statement will result in an exception as it cannot be determined how to bind
* a bare name.
* @since v22.5.0
* @param enabled Enables or disables support for binding named parameters without the prefix character.
*/
setAllowBareNamedParameters(enabled: boolean): void;
/**
* By default, if an unknown name is encountered while binding parameters, an
* exception is thrown. This method allows unknown named parameters to be ignored.
* @since v22.15.0
* @param enabled Enables or disables support for unknown named parameters.
*/
setAllowUnknownNamedParameters(enabled: boolean): void;
/**
* When enabled, query results returned by the `all()`, `get()`, and `iterate()` methods will be returned as arrays instead
* of objects.
* @since v22.16.0
* @param enabled Enables or disables the return of query results as arrays.
*/
setReturnArrays(enabled: boolean): void;
/**
* When reading from the database, SQLite `INTEGER`s are mapped to JavaScript
* numbers by default. However, SQLite `INTEGER`s can store values larger than
* JavaScript numbers are capable of representing. In such cases, this method can
* be used to read `INTEGER` data using JavaScript `BigInt`s. This method has no
* impact on database write operations where numbers and `BigInt`s are both
* supported at all times.
* @since v22.5.0
* @param enabled Enables or disables the use of `BigInt`s when reading `INTEGER` fields from the database.
*/
setReadBigInts(enabled: boolean): void;
/**
* The source SQL text of the prepared statement. This property is a
* wrapper around [`sqlite3_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html).
* @since v22.5.0
*/
readonly sourceSQL: string;
}
interface BackupOptions {
/**
* Name of the source database. This can be `'main'` (the default primary database) or any other
* database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html)
* @default 'main'
*/
source?: string | undefined;
/**
* Name of the target database. This can be `'main'` (the default primary database) or any other
* database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html)
* @default 'main'
*/
target?: string | undefined;
/**
* Number of pages to be transmitted in each batch of the backup.
* @default 100
*/
rate?: number | undefined;
/**
* Callback function that will be called with the number of pages copied and the total number of
* pages.
*/
progress?: ((progressInfo: BackupProgressInfo) => void) | undefined;
}
interface BackupProgressInfo {
totalPages: number;
remainingPages: number;
}
/**
* This method makes a database backup. This method abstracts the
* [`sqlite3_backup_init()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupinit),
* [`sqlite3_backup_step()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupstep)
* and [`sqlite3_backup_finish()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish) functions.
*
* The backed-up database can be used normally during the backup process. Mutations coming from the same connection - same
* `DatabaseSync` - object will be reflected in the backup right away. However, mutations from other connections will cause
* the backup process to restart.
*
* ```js
* import { backup, DatabaseSync } from 'node:sqlite';
*
* const sourceDb = new DatabaseSync('source.db');
* const totalPagesTransferred = await backup(sourceDb, 'backup.db', {
* rate: 1, // Copy one page at a time.
* progress: ({ totalPages, remainingPages }) => {
* console.log('Backup in progress', { totalPages, remainingPages });
* },
* });
*
* console.log('Backup completed', totalPagesTransferred);
* ```
* @since v22.16.0
* @param sourceDb The database to backup. The source database must be open.
* @param path The path where the backup will be created. If the file already exists,
* the contents will be overwritten.
* @param options Optional configuration for the backup. The
* following properties are supported:
* @returns A promise that resolves when the backup is completed and rejects if an error occurs.
*/
function backup(sourceDb: DatabaseSync, path: PathLike, options?: BackupOptions): Promise<void>;
/**
* @since v22.13.0
*/
namespace constants {
/**
* The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is present in the database, but one or more other (non primary-key) fields modified by the update do not contain the expected "before" values.
* @since v22.14.0
*/
const SQLITE_CHANGESET_DATA: number;
/**
* The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is not present in the database.
* @since v22.14.0
*/
const SQLITE_CHANGESET_NOTFOUND: number;
/**
* This constant is passed to the conflict handler while processing an INSERT change if the operation would result in duplicate primary key values.
* @since v22.14.0
*/
const SQLITE_CHANGESET_CONFLICT: number;
/**
* If foreign key handling is enabled, and applying a changeset leaves the database in a state containing foreign key violations, the conflict handler is invoked with this constant exactly once before the changeset is committed. If the conflict handler returns `SQLITE_CHANGESET_OMIT`, the changes, including those that caused the foreign key constraint violation, are committed. Or, if it returns `SQLITE_CHANGESET_ABORT`, the changeset is rolled back.
* @since v22.14.0
*/
const SQLITE_CHANGESET_FOREIGN_KEY: number;
/**
* Conflicting changes are omitted.
* @since v22.12.0
*/
const SQLITE_CHANGESET_OMIT: number;
/**
* Conflicting changes replace existing values. Note that this value can only be returned when the type of conflict is either `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT`.
* @since v22.12.0
*/
const SQLITE_CHANGESET_REPLACE: number;
/**
* Abort when a change encounters a conflict and roll back database.
* @since v22.12.0
*/
const SQLITE_CHANGESET_ABORT: number;
}
}
@@ -0,0 +1,154 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$id": "http://json-schema.org/draft-06/schema#",
"title": "Core schema meta-schema",
"definitions": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#" }
},
"nonNegativeInteger": {
"type": "integer",
"minimum": 0
},
"nonNegativeIntegerDefault0": {
"allOf": [
{ "$ref": "#/definitions/nonNegativeInteger" },
{ "default": 0 }
]
},
"simpleTypes": {
"enum": [
"array",
"boolean",
"integer",
"null",
"number",
"object",
"string"
]
},
"stringArray": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true,
"default": []
}
},
"type": ["object", "boolean"],
"properties": {
"$id": {
"type": "string",
"format": "uri-reference"
},
"$schema": {
"type": "string",
"format": "uri"
},
"$ref": {
"type": "string",
"format": "uri-reference"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"default": {},
"examples": {
"type": "array",
"items": {}
},
"multipleOf": {
"type": "number",
"exclusiveMinimum": 0
},
"maximum": {
"type": "number"
},
"exclusiveMaximum": {
"type": "number"
},
"minimum": {
"type": "number"
},
"exclusiveMinimum": {
"type": "number"
},
"maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
"minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
"pattern": {
"type": "string",
"format": "regex"
},
"additionalItems": { "$ref": "#" },
"items": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/schemaArray" }
],
"default": {}
},
"maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
"minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
"uniqueItems": {
"type": "boolean",
"default": false
},
"contains": { "$ref": "#" },
"maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
"minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
"required": { "$ref": "#/definitions/stringArray" },
"additionalProperties": { "$ref": "#" },
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"properties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"patternProperties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"dependencies": {
"type": "object",
"additionalProperties": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/stringArray" }
]
}
},
"propertyNames": { "$ref": "#" },
"const": {},
"enum": {
"type": "array",
"minItems": 1,
"uniqueItems": true
},
"type": {
"anyOf": [
{ "$ref": "#/definitions/simpleTypes" },
{
"type": "array",
"items": { "$ref": "#/definitions/simpleTypes" },
"minItems": 1,
"uniqueItems": true
}
]
},
"format": { "type": "string" },
"allOf": { "$ref": "#/definitions/schemaArray" },
"anyOf": { "$ref": "#/definitions/schemaArray" },
"oneOf": { "$ref": "#/definitions/schemaArray" },
"not": { "$ref": "#" }
},
"default": {}
}
@@ -0,0 +1,104 @@
# why-is-node-running
Node is running but you don't know why? `why-is-node-running` is here to help you.
## Installation
Node 8 and above:
```bash
npm i why-is-node-running -g
```
Earlier Node versions (no longer supported):
```bash
npm i why-is-node-running@v1.x -g
```
## Usage
```js
const log = require('why-is-node-running') // should be your first require
const net = require('net')
function createServer () {
const server = net.createServer()
setInterval(function () {}, 1000)
server.listen(0)
}
createServer()
createServer()
setTimeout(function () {
log() // logs out active handles that are keeping node running
}, 100)
```
Save the file as `example.js`, then execute:
```bash
node ./example.js
```
Here's the output:
```
There are 5 handle(s) keeping the process running
# Timeout
/home/maf/dev/node_modules/why-is-node-running/example.js:6 - setInterval(function () {}, 1000)
/home/maf/dev/node_modules/why-is-node-running/example.js:10 - createServer()
# TCPSERVERWRAP
/home/maf/dev/node_modules/why-is-node-running/example.js:7 - server.listen(0)
/home/maf/dev/node_modules/why-is-node-running/example.js:10 - createServer()
# Timeout
/home/maf/dev/node_modules/why-is-node-running/example.js:6 - setInterval(function () {}, 1000)
/home/maf/dev/node_modules/why-is-node-running/example.js:11 - createServer()
# TCPSERVERWRAP
/home/maf/dev/node_modules/why-is-node-running/example.js:7 - server.listen(0)
/home/maf/dev/node_modules/why-is-node-running/example.js:11 - createServer()
# Timeout
/home/maf/dev/node_modules/why-is-node-running/example.js:13 - setTimeout(function () {
```
**Important Note!**
`unref`ed timers do not prevent the Node process from exiting. If you are running with Node v11.0.0 and above, `unref`ed timers will not be listed in the above list. Unfortunately, this is not supported in node versions below v11.0.0.
## CLI
You can also run `why-is-node-running` as a standalone if you don't want to include it inside your code. Sending `SIGUSR1`/`SIGINFO` signal to the process will produce the log. (`Ctrl + T` on macOS and BSD systems)
```bash
why-is-node-running /path/to/some/file.js
```
```
probing module /path/to/some/file.js
kill -SIGUSR1 31115 for logging
```
To trigger the log:
```
kill -SIGUSR1 31115
```
## Require CLI Option
You can also use the node `-r` option to include `why-is-node-running`:
```bash
node -r why-is-node-running/include /path/to/some/file.js
```
The steps are otherwise the same as the above CLI section
## License
MIT
@@ -0,0 +1,15 @@
import createBaseFor from './_createBaseFor.js';
/**
* This function is like `baseFor` except that it iterates over properties
* in the opposite order.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseForRight = createBaseFor(true);
export default baseForRight;
@@ -0,0 +1,8 @@
var $f467c0ee7bfb0950$exports = {};
$f467c0ee7bfb0950$exports = {
"breadcrumbs": `Migas de pan`
};
export {$f467c0ee7bfb0950$exports as default};
//# sourceMappingURL=es-ES.module.js.map
@@ -0,0 +1,22 @@
import type { ScopeManager } from '@typescript-eslint/scope-manager';
import type { ParserOptions, TSESTree } from '@typescript-eslint/types';
import type { AST, ParserServices } from '@typescript-eslint/typescript-estree';
import type { VisitorKeys } from '@typescript-eslint/visitor-keys';
import type * as ts from 'typescript';
interface ESLintProgram extends AST<{
comment: true;
tokens: true;
}> {
comments: TSESTree.Comment[];
range: [number, number];
tokens: TSESTree.Token[];
}
interface ParseForESLintResult {
ast: ESLintProgram;
scopeManager: ScopeManager;
services: ParserServices;
visitorKeys: VisitorKeys;
}
export declare function parse(code: string | ts.SourceFile, options?: ParserOptions): ParseForESLintResult['ast'];
export declare function parseForESLint(code: string | ts.SourceFile, parserOptions?: ParserOptions | null): ParseForESLintResult;
export type { ParserOptions } from '@typescript-eslint/types';
@@ -0,0 +1,52 @@
# import/no-named-as-default-member
⚠️ This rule _warns_ in the following configs: ☑️ `recommended`, 🚸 `warnings`.
<!-- end auto-generated rule header -->
Reports use of an exported name as a property on the default export.
Rationale: Accessing a property that has a name that is shared by an exported
name from the same module is likely to be a mistake.
Named import syntax looks very similar to destructuring assignment. It's easy to
make the (incorrect) assumption that named exports are also accessible as
properties of the default export.
Furthermore, [in Babel 5 this is actually how things worked][blog]. This was
fixed in Babel 6. Before upgrading an existing codebase to Babel 6, it can be
useful to run this lint rule.
[blog]: https://kentcdodds.com/blog/misunderstanding-es6-modules-upgrading-babel-tears-and-a-solution
## Rule Details
Given:
```js
// foo.js
export default 'foo';
export const bar = 'baz';
```
...this would be valid:
```js
import foo, {bar} from './foo.js';
```
...and the following would be reported:
```js
// Caution: `foo` also has a named export `bar`.
// Check if you meant to write `import {bar} from './foo.js'` instead.
import foo from './foo.js';
const bar = foo.bar;
```
```js
// Caution: `foo` also has a named export `bar`.
// Check if you meant to write `import {bar} from './foo.js'` instead.
import foo from './foo.js';
const {bar} = foo;
```
@@ -0,0 +1,72 @@
import { createRule } from '../utils/index.js';
function isRequire(node) {
return (node.callee?.type === 'Identifier' &&
node.callee.name === 'require' &&
node.arguments.length > 0);
}
function isDynamicImport(node) {
return (node?.callee &&
node.callee.type === 'Import');
}
function isStaticValue(node) {
return (node.type === 'Literal' ||
(node.type === 'TemplateLiteral' && node.expressions.length === 0));
}
export default createRule({
name: 'no-dynamic-require',
meta: {
type: 'suggestion',
docs: {
category: 'Static analysis',
description: 'Forbid `require()` calls with expressions.',
},
schema: [
{
type: 'object',
properties: {
esmodule: {
type: 'boolean',
},
},
additionalProperties: false,
},
],
messages: {
import: 'Calls to import() should use string literals',
require: 'Calls to require() should use string literals',
},
},
defaultOptions: [],
create(context) {
const options = context.options[0] || {};
return {
CallExpression(node) {
if (!node.arguments[0] || isStaticValue(node.arguments[0])) {
return;
}
if (isRequire(node)) {
return context.report({
node,
messageId: 'require',
});
}
if (options.esmodule && isDynamicImport(node)) {
return context.report({
node,
messageId: 'import',
});
}
},
ImportExpression(node) {
if (!options.esmodule || isStaticValue(node.source)) {
return;
}
return context.report({
node,
messageId: 'import',
});
},
};
},
});
//# sourceMappingURL=no-dynamic-require.js.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const esnext_object: LibDefinition;
@@ -0,0 +1,209 @@
import * as common from './common';
/**
* Represents an IPv4 address
* @class Address4
* @param {string} address - An IPv4 address string
*/
export declare class Address4 {
address: string;
addressMinusSuffix?: string;
groups: number;
parsedAddress: string[];
parsedSubnet: string;
subnet: string;
subnetMask: number;
v4: boolean;
constructor(address: string);
static isValid(address: string): boolean;
parse(address: string): string[];
/**
* Returns the correct form of an address
* @memberof Address4
* @instance
* @returns {String}
*/
correctForm(): string;
/**
* Returns true if the address is correct, false otherwise
* @memberof Address4
* @instance
* @returns {Boolean}
*/
isCorrect: (this: Address4 | import("./ipv6").Address6) => boolean;
/**
* Converts a hex string to an IPv4 address object
* @memberof Address4
* @static
* @param {string} hex - a hex string to convert
* @returns {Address4}
*/
static fromHex(hex: string): Address4;
/**
* Converts an integer into a IPv4 address object
* @memberof Address4
* @static
* @param {integer} integer - a number to convert
* @returns {Address4}
*/
static fromInteger(integer: number): Address4;
/**
* Return an address from in-addr.arpa form
* @memberof Address4
* @static
* @param {string} arpaFormAddress - an 'in-addr.arpa' form ipv4 address
* @returns {Adress4}
* @example
* var address = Address4.fromArpa(42.2.0.192.in-addr.arpa.)
* address.correctForm(); // '192.0.2.42'
*/
static fromArpa(arpaFormAddress: string): Address4;
/**
* Converts an IPv4 address object to a hex string
* @memberof Address4
* @instance
* @returns {String}
*/
toHex(): string;
/**
* Converts an IPv4 address object to an array of bytes
* @memberof Address4
* @instance
* @returns {Array}
*/
toArray(): number[];
/**
* Converts an IPv4 address object to an IPv6 address group
* @memberof Address4
* @instance
* @returns {String}
*/
toGroup6(): string;
/**
* Returns the address as a `bigint`
* @memberof Address4
* @instance
* @returns {bigint}
*/
bigInt(): bigint;
/**
* Helper function getting start address.
* @memberof Address4
* @instance
* @returns {bigint}
*/
_startAddress(): bigint;
/**
* The first address in the range given by this address' subnet.
* Often referred to as the Network Address.
* @memberof Address4
* @instance
* @returns {Address4}
*/
startAddress(): Address4;
/**
* The first host address in the range given by this address's subnet ie
* the first address after the Network Address
* @memberof Address4
* @instance
* @returns {Address4}
*/
startAddressExclusive(): Address4;
/**
* Helper function getting end address.
* @memberof Address4
* @instance
* @returns {bigint}
*/
_endAddress(): bigint;
/**
* The last address in the range given by this address' subnet
* Often referred to as the Broadcast
* @memberof Address4
* @instance
* @returns {Address4}
*/
endAddress(): Address4;
/**
* The last host address in the range given by this address's subnet ie
* the last address prior to the Broadcast Address
* @memberof Address4
* @instance
* @returns {Address4}
*/
endAddressExclusive(): Address4;
/**
* Converts a BigInt to a v4 address object
* @memberof Address4
* @static
* @param {bigint} bigInt - a BigInt to convert
* @returns {Address4}
*/
static fromBigInt(bigInt: bigint): Address4;
/**
* Convert a byte array to an Address4 object
* @memberof Address4
* @static
* @param {Array<number>} bytes - an array of 4 bytes (0-255)
* @returns {Address4}
*/
static fromByteArray(bytes: Array<number>): Address4;
/**
* Convert an unsigned byte array to an Address4 object
* @memberof Address4
* @static
* @param {Array<number>} bytes - an array of 4 unsigned bytes (0-255)
* @returns {Address4}
*/
static fromUnsignedByteArray(bytes: Array<number>): Address4;
/**
* Returns the first n bits of the address, defaulting to the
* subnet mask
* @memberof Address4
* @instance
* @returns {String}
*/
mask(mask?: number): string;
/**
* Returns the bits in the given range as a base-2 string
* @memberof Address4
* @instance
* @returns {string}
*/
getBitsBase2(start: number, end: number): string;
/**
* Return the reversed ip6.arpa form of the address
* @memberof Address4
* @param {Object} options
* @param {boolean} options.omitSuffix - omit the "in-addr.arpa" suffix
* @instance
* @returns {String}
*/
reverseForm(options?: common.ReverseFormOptions): string;
/**
* Returns true if the given address is in the subnet of the current address
* @memberof Address4
* @instance
* @returns {boolean}
*/
isInSubnet: typeof common.isInSubnet;
/**
* Returns true if the given address is a multicast address
* @memberof Address4
* @instance
* @returns {boolean}
*/
isMulticast(): boolean;
/**
* Returns a zero-padded base-2 string representation of the address
* @memberof Address4
* @instance
* @returns {string}
*/
binaryZeroPad(): string;
/**
* Groups an IPv4 address for inclusion at the end of an IPv6 address
* @returns {String}
*/
groupForV6(): string;
}
//# sourceMappingURL=ipv4.d.ts.map
@@ -0,0 +1,8 @@
var $2b2734393847c884$exports = {};
$2b2734393847c884$exports = {
"dismiss": `\u{95DC}\u{9589}`
};
export {$2b2734393847c884$exports as default};
//# sourceMappingURL=zh-TW.module.js.map
@@ -0,0 +1,84 @@
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var CompletionRecord = require('es-abstract/2024/CompletionRecord');
var CreateIteratorFromClosure = require('../aos/CreateIteratorFromClosure');
var GetIteratorDirect = require('../aos/GetIteratorDirect');
var IteratorClose = require('es-abstract/2024/IteratorClose');
var IteratorStepValue = require('es-abstract/2024/IteratorStepValue');
var NormalCompletion = require('es-abstract/2024/NormalCompletion');
var ToIntegerOrInfinity = require('es-abstract/2024/ToIntegerOrInfinity');
var ToNumber = require('es-abstract/2024/ToNumber');
var Type = require('es-abstract/2024/Type');
var iterHelperProto = require('../IteratorHelperPrototype');
var isNaN = require('es-abstract/helpers/isNaN');
var SLOT = require('internal-slot');
module.exports = function take(limit) {
if (this instanceof take) {
throw new $TypeError('`take` is not a constructor');
}
var O = this; // step 1
if (Type(O) !== 'Object') {
throw new $TypeError('`this` value must be an Object'); // step 2
}
var numLimit = ToNumber(limit); // step 2
if (isNaN(numLimit)) {
throw new $RangeError('`limit` must be a non-NaN number'); // step 3
}
var iterated = GetIteratorDirect(O); // step 4
var integerLimit = ToIntegerOrInfinity(numLimit); // step 7
if (integerLimit < 0) {
throw new $RangeError('`limit` must be a >= 0'); // step 8
}
var closeIfAbrupt = function (abruptCompletion) {
if (!(abruptCompletion instanceof CompletionRecord)) {
throw new $TypeError('`abruptCompletion` must be a Completion Record');
}
IteratorClose(
iterated,
abruptCompletion
);
};
var sentinel = {};
var remaining = integerLimit; // step 9.a
var closure = function () { // step 9
// while (true) { // step 9.b
if (remaining === 0) { // step 9.b.i
return IteratorClose( // step 9.b.i.1
iterated,
NormalCompletion(sentinel)
);
}
if (remaining !== Infinity) { // step 9.b.ii
remaining -= 1; // step 9.b.ii.1
}
var value = IteratorStepValue(iterated); // step 6.b.i
if (iterated['[[Done]]']) {
return sentinel; // step 6.b.ii
}
return value; // step 9.b.iv
// }
};
SLOT.set(closure, '[[Sentinel]]', sentinel); // for the userland implementation
SLOT.set(closure, '[[CloseIfAbrupt]]', closeIfAbrupt); // for the userland implementation
var result = CreateIteratorFromClosure(closure, 'Iterator Helper', iterHelperProto, ['[[UnderlyingIterators]]']); // step 7
SLOT.set(result, '[[UnderlyingIterators]]', [iterated]); // step 8
return result; // step 9
};
@@ -0,0 +1,81 @@
type Pathname = string
interface IgnoreRule {
pattern: string
mark?: string
negative: boolean
}
interface TestResult {
ignored: boolean
unignored: boolean
rule?: IgnoreRule
}
interface PatternParams {
pattern: string
mark?: string
}
/**
* Creates new ignore manager.
*/
declare function ignore(options?: ignore.Options): ignore.Ignore
declare namespace ignore {
interface Ignore {
/**
* Adds one or several rules to the current manager.
* @param {string[]} patterns
* @returns IgnoreBase
*/
add(
patterns: string | Ignore | readonly (string | Ignore)[] | PatternParams
): this
/**
* Filters the given array of pathnames, and returns the filtered array.
* NOTICE that each path here should be a relative path to the root of your repository.
* @param paths the array of paths to be filtered.
* @returns The filtered array of paths
*/
filter(pathnames: readonly Pathname[]): Pathname[]
/**
* Creates a filter function which could filter
* an array of paths with Array.prototype.filter.
*/
createFilter(): (pathname: Pathname) => boolean
/**
* Returns Boolean whether pathname should be ignored.
* @param {string} pathname a path to check
* @returns boolean
*/
ignores(pathname: Pathname): boolean
/**
* Returns whether pathname should be ignored or unignored
* @param {string} pathname a path to check
* @returns TestResult
*/
test(pathname: Pathname): TestResult
/**
* Debugs ignore rules and returns the checking result, which is
* equivalent to `git check-ignore -v`.
* @returns TestResult
*/
checkIgnore(pathname: Pathname): TestResult
}
interface Options {
ignorecase?: boolean
// For compatibility
ignoreCase?: boolean
allowRelativePaths?: boolean
}
function isPathValid(pathname: string): boolean
}
export = ignore
@@ -0,0 +1,48 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _setupTrackingContext = /*#__PURE__*/ _interop_require_default(require("./lib/setupTrackingContext"));
const _processTailwindFeatures = /*#__PURE__*/ _interop_require_default(require("./processTailwindFeatures"));
const _sharedState = require("./lib/sharedState");
const _findAtConfigPath = require("./lib/findAtConfigPath");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
module.exports = function tailwindcss(configOrPath) {
return {
postcssPlugin: "tailwindcss",
plugins: [
_sharedState.env.DEBUG && function(root) {
console.log("\n");
console.time("JIT TOTAL");
return root;
},
async function(root, result) {
var _findAtConfigPath1;
// Use the path for the `@config` directive if it exists, otherwise use the
// path for the file being processed
configOrPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : configOrPath;
let context = (0, _setupTrackingContext.default)(configOrPath);
if (root.type === "document") {
let roots = root.nodes.filter((node)=>node.type === "root");
for (const root of roots){
if (root.type === "root") {
await (0, _processTailwindFeatures.default)(context)(root, result);
}
}
return;
}
await (0, _processTailwindFeatures.default)(context)(root, result);
},
_sharedState.env.DEBUG && function(root) {
console.timeEnd("JIT TOTAL");
console.log("\n");
return root;
}
].filter(Boolean)
};
};
module.exports.postcss = true;
@@ -0,0 +1,9 @@
import type NameManager from "../NameManager";
import type TokenProcessor from "../TokenProcessor";
import Transformer from "./Transformer";
export default class OptionalCatchBindingTransformer extends Transformer {
readonly tokens: TokenProcessor;
readonly nameManager: NameManager;
constructor(tokens: TokenProcessor, nameManager: NameManager);
process(): boolean;
}
@@ -0,0 +1,5 @@
'use strict';
// TODO: remove, semver-major
module.exports = require('safe-regex-test');
@@ -0,0 +1,51 @@
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var forEach = require('../helpers/forEach');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $strSplit = callBound('String.prototype.split');
var UnicodeEscape = require('./UnicodeEscape');
var UTF16Encoding = require('./UTF16Encoding');
var hasOwn = require('hasown');
// https://262.ecma-international.org/10.0/#sec-quotejsonstring
var escapes = {
'\u0008': '\\b',
'\u0009': '\\t',
'\u000A': '\\n',
'\u000C': '\\f',
'\u000D': '\\r',
'\u0022': '\\"',
'\u005c': '\\\\'
};
module.exports = function QuoteJSONString(value) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `value` must be a String');
}
var product = '"';
if (value) {
forEach($strSplit(value, ''), function (C) {
if (hasOwn(escapes, C)) {
product += escapes[C];
} else {
var cCharCode = $charCodeAt(C, 0);
if (cCharCode < 0x20 || isLeadingSurrogate(cCharCode) || isTrailingSurrogate(cCharCode)) {
product += UnicodeEscape(C);
} else {
product += UTF16Encoding(cCharCode);
}
}
});
}
product += '"';
return product;
};
@@ -0,0 +1,799 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { AsyncSeriesBailHook, AsyncSeriesHook, SyncHook } = require("tapable");
const createInnerContext = require("./createInnerContext");
const { parseIdentifier } = require("./util/identifier");
const {
PathType,
cachedJoin: join,
getType,
normalize,
} = require("./util/path");
/** @typedef {import("./ResolverFactory").ResolveOptions} ResolveOptions */
/** @typedef {Error & { details?: string }} ErrorWithDetail */
/** @typedef {(err: ErrorWithDetail | null, res?: string | false, req?: ResolveRequest) => void} ResolveCallback */
/**
* @typedef {object} PossibleFileSystemError
* @property {string=} code code
* @property {number=} errno number
* @property {string=} path path
* @property {string=} syscall syscall
*/
/**
* @template T
* @callback FileSystemCallback
* @param {PossibleFileSystemError & Error | null} err
* @param {T=} result
*/
/**
* @typedef {string | Buffer | URL} PathLike
*/
/**
* @typedef {PathLike | number} PathOrFileDescriptor
*/
/**
* @typedef {object} ObjectEncodingOptions
* @property {BufferEncoding | null | undefined=} encoding encoding
*/
/**
* @typedef {ObjectEncodingOptions | BufferEncoding | undefined | null} EncodingOption
*/
/** @typedef {(err: NodeJS.ErrnoException | null, result?: string) => void} StringCallback */
/** @typedef {(err: NodeJS.ErrnoException | null, result?: Buffer) => void} BufferCallback */
/** @typedef {(err: NodeJS.ErrnoException | null, result?: (string | Buffer)) => void} StringOrBufferCallback */
/** @typedef {(err: NodeJS.ErrnoException | null, result?: IStats) => void} StatsCallback */
/** @typedef {(err: NodeJS.ErrnoException | null, result?: IBigIntStats) => void} BigIntStatsCallback */
/** @typedef {(err: NodeJS.ErrnoException | null, result?: (IStats | IBigIntStats)) => void} StatsOrBigIntStatsCallback */
/** @typedef {(err: NodeJS.ErrnoException | Error | null, result?: JsonObject) => void} ReadJsonCallback */
/**
* @template T
* @typedef {object} IStatsBase
* @property {() => boolean} isFile is file
* @property {() => boolean} isDirectory is directory
* @property {() => boolean} isBlockDevice is block device
* @property {() => boolean} isCharacterDevice is character device
* @property {() => boolean} isSymbolicLink is symbolic link
* @property {() => boolean} isFIFO is FIFO
* @property {() => boolean} isSocket is socket
* @property {T} dev dev
* @property {T} ino ino
* @property {T} mode mode
* @property {T} nlink nlink
* @property {T} uid uid
* @property {T} gid gid
* @property {T} rdev rdev
* @property {T} size size
* @property {T} blksize blksize
* @property {T} blocks blocks
* @property {T} atimeMs atime ms
* @property {T} mtimeMs mtime ms
* @property {T} ctimeMs ctime ms
* @property {T} birthtimeMs birthtime ms
* @property {Date} atime atime
* @property {Date} mtime mtime
* @property {Date} ctime ctime
* @property {Date} birthtime birthtime
*/
/**
* @typedef {IStatsBase<number>} IStats
*/
/**
* @typedef {IStatsBase<bigint> & { atimeNs: bigint, mtimeNs: bigint, ctimeNs: bigint, birthtimeNs: bigint }} IBigIntStats
*/
/**
* @template {string | Buffer} [T=string]
* @typedef {object} Dirent
* @property {() => boolean} isFile true when is file, otherwise false
* @property {() => boolean} isDirectory true when is directory, otherwise false
* @property {() => boolean} isBlockDevice true when is block device, otherwise false
* @property {() => boolean} isCharacterDevice true when is character device, otherwise false
* @property {() => boolean} isSymbolicLink true when is symbolic link, otherwise false
* @property {() => boolean} isFIFO true when is FIFO, otherwise false
* @property {() => boolean} isSocket true when is socket, otherwise false
* @property {T} name name
* @property {string} parentPath path
* @property {string=} path path
*/
/**
* @typedef {object} StatOptions
* @property {(boolean | undefined)=} bigint need bigint values
*/
/**
* @typedef {object} StatSyncOptions
* @property {(boolean | undefined)=} bigint need bigint values
* @property {(boolean | undefined)=} throwIfNoEntry throw if no entry
*/
/**
* @typedef {{
* (path: PathOrFileDescriptor, options: ({ encoding?: null | undefined, flag?: string | undefined } & import("events").Abortable) | undefined | null, callback: BufferCallback): void;
* (path: PathOrFileDescriptor, options: ({ encoding: BufferEncoding, flag?: string | undefined } & import("events").Abortable) | BufferEncoding, callback: StringCallback): void;
* (path: PathOrFileDescriptor, options: (ObjectEncodingOptions & { flag?: string | undefined } & import("events").Abortable) | BufferEncoding | undefined | null, callback: StringOrBufferCallback): void;
* (path: PathOrFileDescriptor, callback: BufferCallback): void;
* }} ReadFile
*/
/**
* @typedef {'buffer'| { encoding: 'buffer' }} BufferEncodingOption
*/
/**
* @typedef {{
* (path: PathOrFileDescriptor, options?: { encoding?: null | undefined, flag?: string | undefined } | null): Buffer;
* (path: PathOrFileDescriptor, options: { encoding: BufferEncoding, flag?: string | undefined } | BufferEncoding): string;
* (path: PathOrFileDescriptor, options?: (ObjectEncodingOptions & { flag?: string | undefined }) | BufferEncoding | null): string | Buffer;
* }} ReadFileSync
*/
/**
* @typedef {{
* (path: PathLike, options: { encoding: BufferEncoding | null, withFileTypes?: false | undefined, recursive?: boolean | undefined } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, files?: string[]) => void): void;
* (path: PathLike, options: { encoding: 'buffer', withFileTypes?: false | undefined, recursive?: boolean | undefined } | 'buffer', callback: (err: NodeJS.ErrnoException | null, files?: Buffer[]) => void): void;
* (path: PathLike, options: (ObjectEncodingOptions & { withFileTypes?: false | undefined, recursive?: boolean | undefined }) | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, files?: string[] | Buffer[]) => void): void;
* (path: PathLike, callback: (err: NodeJS.ErrnoException | null, files?: string[]) => void): void;
* (path: PathLike, options: ObjectEncodingOptions & { withFileTypes: true, recursive?: boolean | undefined }, callback: (err: NodeJS.ErrnoException | null, files?: Dirent<string>[]) => void): void;
* (path: PathLike, options: { encoding: 'buffer', withFileTypes: true, recursive?: boolean | undefined }, callback: (err: NodeJS.ErrnoException | null, files: Dirent<Buffer>[]) => void): void;
* }} Readdir
*/
/**
* @typedef {{
* (path: PathLike, options?: { encoding: BufferEncoding | null, withFileTypes?: false | undefined, recursive?: boolean | undefined; } | BufferEncoding | null): string[];
* (path: PathLike, options: { encoding: 'buffer', withFileTypes?: false | undefined, recursive?: boolean | undefined } | 'buffer'): Buffer[];
* (path: PathLike, options?: (ObjectEncodingOptions & { withFileTypes?: false | undefined, recursive?: boolean | undefined }) | BufferEncoding | null): string[] | Buffer[];
* (path: PathLike, options: ObjectEncodingOptions & { withFileTypes: true, recursive?: boolean | undefined }): Dirent[];
* (path: PathLike, options: { encoding: "buffer", withFileTypes: true, recursive?: boolean | undefined }): Dirent<Buffer>[];
* }} ReaddirSync
*/
/**
* @typedef {(pathOrFileDescription: PathOrFileDescriptor, callback: ReadJsonCallback) => void} ReadJson
*/
/**
* @typedef {(pathOrFileDescription: PathOrFileDescriptor) => JsonObject} ReadJsonSync
*/
/**
* @typedef {{
* (path: PathLike, options: EncodingOption, callback: StringCallback): void;
* (path: PathLike, options: BufferEncodingOption, callback: BufferCallback): void;
* (path: PathLike, options: EncodingOption, callback: StringOrBufferCallback): void;
* (path: PathLike, callback: StringCallback): void;
* }} Readlink
*/
/**
* @typedef {{
* (path: PathLike, options?: EncodingOption): string;
* (path: PathLike, options: BufferEncodingOption): Buffer;
* (path: PathLike, options?: EncodingOption): string | Buffer;
* }} ReadlinkSync
*/
/**
* @typedef {{
* (path: PathLike, callback: StatsCallback): void;
* (path: PathLike, options: (StatOptions & { bigint?: false | undefined }) | undefined, callback: StatsCallback): void;
* (path: PathLike, options: StatOptions & { bigint: true }, callback: BigIntStatsCallback): void;
* (path: PathLike, options: StatOptions | undefined, callback: StatsOrBigIntStatsCallback): void;
* }} LStat
*/
/**
* @typedef {{
* (path: PathLike, options?: undefined): IStats;
* (path: PathLike, options?: StatSyncOptions & { bigint?: false | undefined, throwIfNoEntry: false }): IStats | undefined;
* (path: PathLike, options: StatSyncOptions & { bigint: true, throwIfNoEntry: false }): IBigIntStats | undefined;
* (path: PathLike, options?: StatSyncOptions & { bigint?: false | undefined }): IStats;
* (path: PathLike, options: StatSyncOptions & { bigint: true }): IBigIntStats;
* (path: PathLike, options: StatSyncOptions & { bigint: boolean, throwIfNoEntry?: false | undefined }): IStats | IBigIntStats;
* (path: PathLike, options?: StatSyncOptions): IStats | IBigIntStats | undefined;
* }} LStatSync
*/
/**
* @typedef {{
* (path: PathLike, callback: StatsCallback): void;
* (path: PathLike, options: (StatOptions & { bigint?: false | undefined }) | undefined, callback: StatsCallback): void;
* (path: PathLike, options: StatOptions & { bigint: true }, callback: BigIntStatsCallback): void;
* (path: PathLike, options: StatOptions | undefined, callback: StatsOrBigIntStatsCallback): void;
* }} Stat
*/
/**
* @typedef {{
* (path: PathLike, options?: undefined): IStats;
* (path: PathLike, options?: StatSyncOptions & { bigint?: false | undefined, throwIfNoEntry: false }): IStats | undefined;
* (path: PathLike, options: StatSyncOptions & { bigint: true, throwIfNoEntry: false }): IBigIntStats | undefined;
* (path: PathLike, options?: StatSyncOptions & { bigint?: false | undefined }): IStats;
* (path: PathLike, options: StatSyncOptions & { bigint: true }): IBigIntStats;
* (path: PathLike, options: StatSyncOptions & { bigint: boolean, throwIfNoEntry?: false | undefined }): IStats | IBigIntStats;
* (path: PathLike, options?: StatSyncOptions): IStats | IBigIntStats | undefined;
* }} StatSync
*/
/**
* @typedef {{
* (path: PathLike, options: EncodingOption, callback: StringCallback): void;
* (path: PathLike, options: BufferEncodingOption, callback: BufferCallback): void;
* (path: PathLike, options: EncodingOption, callback: StringOrBufferCallback): void;
* (path: PathLike, callback: StringCallback): void;
* }} RealPath
*/
/**
* @typedef {{
* (path: PathLike, options?: EncodingOption): string;
* (path: PathLike, options: BufferEncodingOption): Buffer;
* (path: PathLike, options?: EncodingOption): string | Buffer;
* }} RealPathSync
*/
/**
* @typedef {object} FileSystem
* @property {ReadFile} readFile read file method
* @property {Readdir} readdir readdir method
* @property {ReadJson=} readJson read json method
* @property {Readlink} readlink read link method
* @property {LStat=} lstat lstat method
* @property {Stat} stat stat method
* @property {RealPath=} realpath realpath method
*/
/**
* @typedef {object} SyncFileSystem
* @property {ReadFileSync} readFileSync read file sync method
* @property {ReaddirSync} readdirSync read dir sync method
* @property {ReadJsonSync=} readJsonSync read json sync method
* @property {ReadlinkSync} readlinkSync read link sync method
* @property {LStatSync=} lstatSync lstat sync method
* @property {StatSync} statSync stat sync method
* @property {RealPathSync=} realpathSync real path sync method
*/
/**
* @typedef {object} ParsedIdentifier
* @property {string} request request
* @property {string} query query
* @property {string} fragment fragment
* @property {boolean} directory is directory
* @property {boolean} module is module
* @property {boolean} file is file
* @property {boolean} internal is internal
*/
/** @typedef {string | number | boolean | null} JsonPrimitive */
/** @typedef {JsonValue[]} JsonArray */
/** @typedef {JsonPrimitive | JsonObject | JsonArray} JsonValue */
/** @typedef {{ [Key in string]?: JsonValue | undefined }} JsonObject */
// eslint-disable-next-line jsdoc/require-property
/** @typedef {object} Context */
/**
* @typedef {object} BaseResolveRequest
* @property {string | false} path path
* @property {Context=} context content
* @property {string=} descriptionFilePath description file path
* @property {string=} descriptionFileRoot description file root
* @property {JsonObject=} descriptionFileData description file data
* @property {string=} relativePath relative path
* @property {boolean=} ignoreSymlinks true when need to ignore symlinks, otherwise false
* @property {boolean=} fullySpecified true when full specified, otherwise false
* @property {string=} __innerRequest inner request for internal usage
* @property {string=} __innerRequest_request inner request for internal usage
* @property {string=} __innerRequest_relativePath inner relative path for internal usage
*/
/** @typedef {BaseResolveRequest & Partial<ParsedIdentifier>} ResolveRequest */
/**
* String with special formatting
* @typedef {string} StackEntry
*/
/**
* @template T
* @typedef {{ add: (item: T) => void }} WriteOnlySet
*/
/** @typedef {(request: ResolveRequest) => void} ResolveContextYield */
/**
* Resolve context
* @typedef {object} ResolveContext
* @property {WriteOnlySet<string>=} contextDependencies directories that was found on file system
* @property {WriteOnlySet<string>=} fileDependencies files that was found on file system
* @property {WriteOnlySet<string>=} missingDependencies dependencies that was not found on file system
* @property {Set<StackEntry>=} stack set of hooks' calls. For instance, `resolve → parsedResolve → describedResolve`,
* @property {((str: string) => void)=} log log function
* @property {ResolveContextYield=} yield yield result, if provided plugins can return several results
*/
/** @typedef {AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null>} ResolveStepHook */
/**
* @typedef {object} KnownHooks
* @property {SyncHook<[ResolveStepHook, ResolveRequest], void>} resolveStep resolve step hook
* @property {SyncHook<[ResolveRequest, Error]>} noResolve no resolve hook
* @property {ResolveStepHook} resolve resolve hook
* @property {AsyncSeriesHook<[ResolveRequest, ResolveContext]>} result result hook
*/
/**
* @typedef {{[key: string]: ResolveStepHook}} EnsuredHooks
*/
/**
* @param {string} str input string
* @returns {string} in camel case
*/
function toCamelCase(str) {
return str.replace(/-([a-z])/g, (str) => str.slice(1).toUpperCase());
}
class Resolver {
/**
* @param {ResolveStepHook} hook hook
* @param {ResolveRequest} request request
* @returns {StackEntry} stack entry
*/
static createStackEntry(hook, request) {
return `${hook.name}: (${request.path}) ${request.request || ""}${
request.query || ""
}${request.fragment || ""}${request.directory ? " directory" : ""}${
request.module ? " module" : ""
}`;
}
/**
* @param {FileSystem} fileSystem a filesystem
* @param {ResolveOptions} options options
*/
constructor(fileSystem, options) {
this.fileSystem = fileSystem;
this.options = options;
/** @type {KnownHooks} */
this.hooks = {
resolveStep: new SyncHook(["hook", "request"], "resolveStep"),
noResolve: new SyncHook(["request", "error"], "noResolve"),
resolve: new AsyncSeriesBailHook(
["request", "resolveContext"],
"resolve",
),
result: new AsyncSeriesHook(["result", "resolveContext"], "result"),
};
}
/**
* @param {string | ResolveStepHook} name hook name or hook itself
* @returns {ResolveStepHook} the hook
*/
ensureHook(name) {
if (typeof name !== "string") {
return name;
}
name = toCamelCase(name);
if (name.startsWith("before")) {
return /** @type {ResolveStepHook} */ (
this.ensureHook(name[6].toLowerCase() + name.slice(7)).withOptions({
stage: -10,
})
);
}
if (name.startsWith("after")) {
return /** @type {ResolveStepHook} */ (
this.ensureHook(name[5].toLowerCase() + name.slice(6)).withOptions({
stage: 10,
})
);
}
/** @type {ResolveStepHook} */
const hook = /** @type {KnownHooks & EnsuredHooks} */ (this.hooks)[name];
if (!hook) {
/** @type {KnownHooks & EnsuredHooks} */
(this.hooks)[name] = new AsyncSeriesBailHook(
["request", "resolveContext"],
name,
);
return /** @type {KnownHooks & EnsuredHooks} */ (this.hooks)[name];
}
return hook;
}
/**
* @param {string | ResolveStepHook} name hook name or hook itself
* @returns {ResolveStepHook} the hook
*/
getHook(name) {
if (typeof name !== "string") {
return name;
}
name = toCamelCase(name);
if (name.startsWith("before")) {
return /** @type {ResolveStepHook} */ (
this.getHook(name[6].toLowerCase() + name.slice(7)).withOptions({
stage: -10,
})
);
}
if (name.startsWith("after")) {
return /** @type {ResolveStepHook} */ (
this.getHook(name[5].toLowerCase() + name.slice(6)).withOptions({
stage: 10,
})
);
}
/** @type {ResolveStepHook} */
const hook = /** @type {KnownHooks & EnsuredHooks} */ (this.hooks)[name];
if (!hook) {
throw new Error(`Hook ${name} doesn't exist`);
}
return hook;
}
/**
* @param {object} context context information object
* @param {string} path context path
* @param {string} request request string
* @returns {string | false} result
*/
resolveSync(context, path, request) {
/** @type {Error | null | undefined} */
let err;
/** @type {string | false | undefined} */
let result;
let sync = false;
this.resolve(context, path, request, {}, (_err, r) => {
err = _err;
result = r;
sync = true;
});
if (!sync) {
throw new Error(
"Cannot 'resolveSync' because the fileSystem is not sync. Use 'resolve'!",
);
}
if (err) throw err;
if (result === undefined) throw new Error("No result");
return result;
}
/**
* @param {object} context context information object
* @param {string} path context path
* @param {string} request request string
* @param {ResolveContext} resolveContext resolve context
* @param {ResolveCallback} callback callback function
* @returns {void}
*/
resolve(context, path, request, resolveContext, callback) {
if (!context || typeof context !== "object") {
return callback(new Error("context argument is not an object"));
}
if (typeof path !== "string") {
return callback(new Error("path argument is not a string"));
}
if (typeof request !== "string") {
return callback(new Error("request argument is not a string"));
}
if (!resolveContext) {
return callback(new Error("resolveContext argument is not set"));
}
/** @type {ResolveRequest} */
const obj = {
context,
path,
request,
};
/** @type {ResolveContextYield | undefined} */
let yield_;
let yieldCalled = false;
/** @type {ResolveContextYield | undefined} */
let finishYield;
if (typeof resolveContext.yield === "function") {
const old = resolveContext.yield;
/**
* @param {ResolveRequest} obj object
*/
yield_ = (obj) => {
old(obj);
yieldCalled = true;
};
/**
* @param {ResolveRequest} result result
* @returns {void}
*/
finishYield = (result) => {
if (result) {
/** @type {ResolveContextYield} */ (yield_)(result);
}
callback(null);
};
}
const message = `resolve '${request}' in '${path}'`;
/**
* @param {ResolveRequest} result result
* @returns {void}
*/
const finishResolved = (result) =>
callback(
null,
result.path === false
? false
: `${result.path.replace(/#/g, "\0#")}${
result.query ? result.query.replace(/#/g, "\0#") : ""
}${result.fragment || ""}`,
result,
);
/**
* @param {string[]} log logs
* @returns {void}
*/
const finishWithoutResolve = (log) => {
/**
* @type {ErrorWithDetail}
*/
const error = new Error(`Can't ${message}`);
error.details = log.join("\n");
this.hooks.noResolve.call(obj, error);
return callback(error);
};
if (resolveContext.log) {
// We need log anyway to capture it in case of an error
const parentLog = resolveContext.log;
/** @type {string[]} */
const log = [];
return this.doResolve(
this.hooks.resolve,
obj,
message,
{
log: (msg) => {
parentLog(msg);
log.push(msg);
},
yield: yield_,
fileDependencies: resolveContext.fileDependencies,
contextDependencies: resolveContext.contextDependencies,
missingDependencies: resolveContext.missingDependencies,
stack: resolveContext.stack,
},
(err, result) => {
if (err) return callback(err);
if (yieldCalled || (result && yield_)) {
return /** @type {ResolveContextYield} */ (finishYield)(
/** @type {ResolveRequest} */ (result),
);
}
if (result) return finishResolved(result);
return finishWithoutResolve(log);
},
);
}
// Try to resolve assuming there is no error
// We don't log stuff in this case
return this.doResolve(
this.hooks.resolve,
obj,
message,
{
log: undefined,
yield: yield_,
fileDependencies: resolveContext.fileDependencies,
contextDependencies: resolveContext.contextDependencies,
missingDependencies: resolveContext.missingDependencies,
stack: resolveContext.stack,
},
(err, result) => {
if (err) return callback(err);
if (yieldCalled || (result && yield_)) {
return /** @type {ResolveContextYield} */ (finishYield)(
/** @type {ResolveRequest} */ (result),
);
}
if (result) return finishResolved(result);
// log is missing for the error details
// so we redo the resolving for the log info
// this is more expensive to the success case
// is assumed by default
/** @type {string[]} */
const log = [];
return this.doResolve(
this.hooks.resolve,
obj,
message,
{
log: (msg) => log.push(msg),
yield: yield_,
stack: resolveContext.stack,
},
(err, result) => {
if (err) return callback(err);
// In a case that there is a race condition and yield will be called
if (yieldCalled || (result && yield_)) {
return /** @type {ResolveContextYield} */ (finishYield)(
/** @type {ResolveRequest} */ (result),
);
}
return finishWithoutResolve(log);
},
);
},
);
}
/**
* @param {ResolveStepHook} hook hook
* @param {ResolveRequest} request request
* @param {null|string} message string
* @param {ResolveContext} resolveContext resolver context
* @param {(err?: null|Error, result?: ResolveRequest) => void} callback callback
* @returns {void}
*/
doResolve(hook, request, message, resolveContext, callback) {
const stackEntry = Resolver.createStackEntry(hook, request);
/** @type {Set<string> | undefined} */
let newStack;
if (resolveContext.stack) {
newStack = new Set(resolveContext.stack);
if (resolveContext.stack.has(stackEntry)) {
/**
* Prevent recursion
* @type {Error & {recursion?: boolean}}
*/
const recursionError = new Error(
`Recursion in resolving\nStack:\n ${[...newStack].join("\n ")}`,
);
recursionError.recursion = true;
if (resolveContext.log) {
resolveContext.log("abort resolving because of recursion");
}
return callback(recursionError);
}
newStack.add(stackEntry);
} else {
// creating a set with new Set([item])
// allocates a new array that has to be garbage collected
// this is an EXTREMELY hot path, so let's avoid it
newStack = new Set();
newStack.add(stackEntry);
}
this.hooks.resolveStep.call(hook, request);
if (hook.isUsed()) {
const innerContext = createInnerContext(
{
log: resolveContext.log,
yield: resolveContext.yield,
fileDependencies: resolveContext.fileDependencies,
contextDependencies: resolveContext.contextDependencies,
missingDependencies: resolveContext.missingDependencies,
stack: newStack,
},
message,
);
return hook.callAsync(request, innerContext, (err, result) => {
if (err) return callback(err);
if (result) return callback(null, result);
callback();
});
}
callback();
}
/**
* @param {string} identifier identifier
* @returns {ParsedIdentifier} parsed identifier
*/
parse(identifier) {
const part = {
request: "",
query: "",
fragment: "",
module: false,
directory: false,
file: false,
internal: false,
};
const parsedIdentifier = parseIdentifier(identifier);
if (!parsedIdentifier) return part;
[part.request, part.query, part.fragment] = parsedIdentifier;
if (part.request.length > 0) {
part.internal = this.isPrivate(identifier);
part.module = this.isModule(part.request);
part.directory = this.isDirectory(part.request);
if (part.directory) {
part.request = part.request.slice(0, -1);
}
}
return part;
}
/**
* @param {string} path path
* @returns {boolean} true, if the path is a module
*/
isModule(path) {
return getType(path) === PathType.Normal;
}
/**
* @param {string} path path
* @returns {boolean} true, if the path is private
*/
isPrivate(path) {
return getType(path) === PathType.Internal;
}
/**
* @param {string} path a path
* @returns {boolean} true, if the path is a directory path
*/
isDirectory(path) {
return path.endsWith("/");
}
/**
* @param {string} path path
* @param {string} request request
* @returns {string} joined path
*/
join(path, request) {
return join(path, request);
}
/**
* @param {string} path path
* @returns {string} normalized path
*/
normalize(path) {
return normalize(path);
}
}
module.exports = Resolver;
@@ -0,0 +1,10 @@
export declare const UNICODE_EXTENSION_SEQUENCE_REGEX: RegExp;
export declare function invariant(condition: boolean, message: string, Err?: any): asserts condition;
export declare function findMatchingDistance(desired: string, supported: string): number;
interface LocaleMatchingResult {
distances: Record<string, Record<string, number>>;
matchedSupportedLocale?: string;
matchedDesiredLocale?: string;
}
export declare function findBestMatch(requestedLocales: readonly string[], supportedLocales: readonly string[], threshold?: number): LocaleMatchingResult;
export {};
@@ -0,0 +1,12 @@
/**
* Create an HTML extension for `micromark` to support GitHubs weird and
* useless tagfilter when serializing to HTML.
*
* @returns {HtmlExtension}
* Extension for `micromark` that can be passed in `htmlExtensions` to support
* GitHubs weird and useless tagfilter when serializing to HTML.
*/
export function gfmTagfilterHtml(): HtmlExtension
export type CompileContext = import('micromark-util-types').CompileContext
export type HtmlExtension = import('micromark-util-types').HtmlExtension
export type Token = import('micromark-util-types').Token
@@ -0,0 +1,23 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2020_bigint = void 0;
const base_config_1 = require("./base-config");
const es2020_intl_1 = require("./es2020.intl");
exports.es2020_bigint = {
libs: [es2020_intl_1.es2020_intl],
variables: [
['BigIntToLocaleStringOptions', base_config_1.TYPE],
['BigInt', base_config_1.TYPE_VALUE],
['BigIntConstructor', base_config_1.TYPE],
['BigInt64Array', base_config_1.TYPE_VALUE],
['BigInt64ArrayConstructor', base_config_1.TYPE],
['BigUint64Array', base_config_1.TYPE_VALUE],
['BigUint64ArrayConstructor', base_config_1.TYPE],
['DataView', base_config_1.TYPE],
['Intl', base_config_1.TYPE_VALUE],
],
};
@@ -0,0 +1,51 @@
var $1e2191638e54f613$exports = require("./chain.main.js");
var $8c61827343eed941$exports = require("./useId.main.js");
var $eVrjB$clsx = require("clsx");
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "mergeProps", () => $f847cd1382ea7cd4$export$9d1611c77c2fe928);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $f847cd1382ea7cd4$export$9d1611c77c2fe928(...args) {
// Start with a base clone of the first argument. This is a lot faster than starting
// with an empty object and adding properties as we go.
let result = {
...args[0]
};
for(let i = 1; i < args.length; i++){
let props = args[i];
for(let key in props){
let a = result[key];
let b = props[key];
// Chain events
if (typeof a === 'function' && typeof b === 'function' && // This is a lot faster than a regex.
key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $1e2191638e54f613$exports.chain)(a, b);
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (0, ($parcel$interopDefault($eVrjB$clsx)))(a, b);
else if (key === 'id' && a && b) result.id = (0, $8c61827343eed941$exports.mergeIds)(a, b);
else result[key] = b !== undefined ? b : a;
}
}
return result;
}
//# sourceMappingURL=mergeProps.main.js.map
@@ -0,0 +1,7 @@
import Inline from '../blots/inline.js';
class Underline extends Inline {
static blotName = 'underline';
static tagName = 'U';
}
export default Underline;
//# sourceMappingURL=underline.js.map
@@ -0,0 +1,70 @@
{
"name": "@heroui/modal",
"version": "2.2.8",
"description": "Displays a dialog with a custom content that requires attention or provides additional information.",
"keywords": [
"modal"
],
"author": "Junior Garcia <jrgarciadev@gmail.com>",
"homepage": "https://heroui.com",
"license": "MIT",
"main": "dist/index.js",
"sideEffects": false,
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/heroui-inc/heroui.git",
"directory": "packages/components/modal"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"@heroui/theme": ">=2.4.0",
"@heroui/system": ">=2.4.0"
},
"dependencies": {
"@react-aria/dialog": "3.5.20",
"@react-aria/focus": "3.19.0",
"@react-aria/interactions": "3.22.5",
"@react-aria/overlays": "3.24.0",
"@react-aria/utils": "3.26.0",
"@react-stately/overlays": "3.6.12",
"@react-types/overlays": "3.8.11",
"@heroui/use-disclosure": "2.2.3",
"@heroui/use-draggable": "2.1.3",
"@heroui/use-aria-button": "2.2.5",
"@heroui/framer-utils": "2.1.7",
"@heroui/shared-utils": "2.1.3",
"@heroui/react-utils": "2.1.4",
"@heroui/shared-icons": "2.1.2",
"@heroui/use-aria-modal-overlay": "2.2.4",
"@heroui/dom-animation": "2.1.2"
},
"clean-package": "../../../clean-package.config.json",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsup src --dts",
"build:fast": "tsup src",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit"
}
}
@@ -0,0 +1,20 @@
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isInteger = require('math-intrinsics/isInteger');
var $numberToString = callBound('Number.prototype.toString');
// https://262.ecma-international.org/14.0/#sec-numeric-types-number-tostring
module.exports = function NumberToString(x, radix) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` must be a Number');
}
if (!isInteger(radix) || radix < 2 || radix > 36) {
throw new $TypeError('Assertion failed: `radix` must be an integer >= 2 and <= 36');
}
return $numberToString(x, radix); // steps 1 - 12
};
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('valueOf', require('../valueOf'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"version":3,"file":"no-typos.d.ts","sourceRoot":"","sources":["no-typos.js"],"names":[],"mappings":"wBA+BW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,56 @@
// src/bold/pet.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var PetBoldIcon = (props) => /* @__PURE__ */ jsxs(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ jsx(
"path",
{
d: "M19.0803 15.7203C18.4903 12.1903 15.1003 9.32031 11.5203 9.32031C7.63028 9.32031 4.21028 12.4703 3.88028 16.3503C3.75028 17.8503 4.23028 19.2703 5.22028 20.3403C6.20028 21.4103 7.58028 22.0003 9.08028 22.0003H13.7603C15.4503 22.0003 16.9303 21.3403 17.9403 20.1503C18.9503 18.9603 19.3503 17.3803 19.0803 15.7203Z",
fill: "currentColor"
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M10.2796 7.86C11.8978 7.86 13.2096 6.54819 13.2096 4.93C13.2096 3.31181 11.8978 2 10.2796 2C8.66141 2 7.34961 3.31181 7.34961 4.93C7.34961 6.54819 8.66141 7.86 10.2796 7.86Z",
fill: "currentColor"
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M16.94 9.02844C18.2876 9.02844 19.38 7.93601 19.38 6.58844C19.38 5.24086 18.2876 4.14844 16.94 4.14844C15.5924 4.14844 14.5 5.24086 14.5 6.58844C14.5 7.93601 15.5924 9.02844 16.94 9.02844Z",
fill: "currentColor"
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M20.5496 12.9313C21.6266 12.9313 22.4996 12.0582 22.4996 10.9812C22.4996 9.90429 21.6266 9.03125 20.5496 9.03125C19.4727 9.03125 18.5996 9.90429 18.5996 10.9812C18.5996 12.0582 19.4727 12.9313 20.5496 12.9313Z",
fill: "currentColor"
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M3.94 10.9816C5.28757 10.9816 6.38 9.88914 6.38 8.54156C6.38 7.19399 5.28757 6.10156 3.94 6.10156C2.59243 6.10156 1.5 7.19399 1.5 8.54156C1.5 9.88914 2.59243 10.9816 3.94 10.9816Z",
fill: "currentColor"
}
)
]
}
);
export {
PetBoldIcon
};
@@ -0,0 +1 @@
{"version":3,"file":"currySubplan.spec.d.ts","sourceRoot":"","sources":["../../../../src/planning/actions/currySubplan.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,44 @@
import {useEffect as $dRVb8$useEffect} from "react";
/*
* 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 $dd149f63282afbbf$export$f6211563215e3b37 = new WeakMap();
function $dd149f63282afbbf$export$18fc8428861184da(opts) {
let { triggerRef: triggerRef, isOpen: isOpen, onClose: onClose } = opts;
(0, $dRVb8$useEffect)(()=>{
if (!isOpen || onClose === null) return;
let onScroll = (e)=>{
// Ignore if scrolling an scrollable region outside the trigger's tree.
let target = e.target;
// window is not a Node and doesn't have contain, but window contains everything
if (!triggerRef.current || target instanceof Node && !target.contains(triggerRef.current)) return;
// Ignore scroll events on any input or textarea as the cursor position can cause it to scroll
// such as in a combobox. Clicking the dropdown button places focus on the input, and if the
// text inside the input extends beyond the 'end', then it will scroll so the cursor is visible at the end.
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
let onCloseHandler = onClose || $dd149f63282afbbf$export$f6211563215e3b37.get(triggerRef.current);
if (onCloseHandler) onCloseHandler();
};
window.addEventListener('scroll', onScroll, true);
return ()=>{
window.removeEventListener('scroll', onScroll, true);
};
}, [
isOpen,
onClose,
triggerRef
]);
}
export {$dd149f63282afbbf$export$f6211563215e3b37 as onCloseMap, $dd149f63282afbbf$export$18fc8428861184da as useCloseOnScroll};
//# sourceMappingURL=useCloseOnScroll.module.js.map
@@ -0,0 +1,224 @@
{
"adlm": 8516,
"afak": 8517,
"aghb": 8518,
"ahom": 8519,
"arab": 8520,
"aran": 8521,
"armi": 8522,
"armn": 8523,
"avst": 8524,
"bali": 8525,
"bamu": 8526,
"bass": 8527,
"batk": 8528,
"beng": 8529,
"bhks": 8530,
"blis": 8531,
"bopo": 8532,
"brah": 8533,
"brai": 8534,
"bugi": 8535,
"buhd": 8536,
"cakm": 8537,
"cans": 8538,
"cari": 8539,
"cham": 8540,
"cher": 8541,
"chis": 8542,
"chrs": 8543,
"cirt": 8544,
"copt": 8545,
"cpmn": 8546,
"cprt": 8547,
"cyrl": 8548,
"cyrs": 8549,
"deva": 8550,
"diak": 8551,
"dogr": 8552,
"dsrt": 8553,
"dupl": 8554,
"egyd": 8555,
"egyh": 8556,
"egyp": 8557,
"elba": 8558,
"elym": 8559,
"ethi": 8560,
"gara": 8561,
"geok": 8562,
"geor": 8563,
"glag": 8564,
"gong": 8565,
"gonm": 8566,
"goth": 8567,
"gran": 8568,
"grek": 8569,
"gujr": 8570,
"gukh": 8571,
"guru": 8572,
"hanb": 8573,
"hang": 8574,
"hani": 8575,
"hano": 8576,
"hans": 8577,
"hant": 8578,
"hatr": 8579,
"hebr": 8580,
"hira": 8581,
"hluw": 8582,
"hmng": 8583,
"hmnp": 8584,
"hrkt": 8585,
"hung": 8586,
"inds": 8587,
"ital": 8588,
"jamo": 8589,
"java": 8590,
"jpan": 8591,
"jurc": 8592,
"kali": 8593,
"kana": 8594,
"kawi": 8595,
"khar": 8596,
"khmr": 8597,
"khoj": 8598,
"kitl": 8599,
"kits": 8600,
"knda": 8601,
"kore": 8602,
"kpel": 8603,
"krai": 8604,
"kthi": 8605,
"lana": 8606,
"laoo": 8607,
"latf": 8608,
"latg": 8609,
"latn": 8610,
"leke": 8611,
"lepc": 8612,
"limb": 8613,
"lina": 8614,
"linb": 8615,
"lisu": 8616,
"loma": 8617,
"lyci": 8618,
"lydi": 8619,
"mahj": 8620,
"maka": 8621,
"mand": 8622,
"mani": 8623,
"marc": 8624,
"maya": 8625,
"medf": 8626,
"mend": 8627,
"merc": 8628,
"mero": 8629,
"mlym": 8630,
"modi": 8631,
"mong": 8632,
"moon": 8633,
"mroo": 8634,
"mtei": 8635,
"mult": 8636,
"mymr": 8637,
"nagm": 8638,
"nand": 8639,
"narb": 8640,
"nbat": 8641,
"newa": 8642,
"nkdb": 8643,
"nkgb": 8644,
"nkoo": 8645,
"nshu": 8646,
"ogam": 8647,
"olck": 8648,
"onao": 8649,
"orkh": 8650,
"orya": 8651,
"osge": 8652,
"osma": 8653,
"ougr": 8654,
"palm": 8655,
"pauc": 8656,
"pcun": 8657,
"pelm": 8658,
"perm": 8659,
"phag": 8660,
"phli": 8661,
"phlp": 8662,
"phlv": 8663,
"phnx": 8664,
"piqd": 8665,
"plrd": 8666,
"prti": 8667,
"psin": 8668,
"qaaa..qabx": 8669,
"ranj": 8670,
"rjng": 8671,
"rohg": 8672,
"roro": 8673,
"runr": 8674,
"samr": 8675,
"sara": 8676,
"sarb": 8677,
"saur": 8678,
"sgnw": 8679,
"shaw": 8680,
"shrd": 8681,
"shui": 8682,
"sidd": 8683,
"sidt": 8684,
"sind": 8685,
"sinh": 8686,
"sogd": 8687,
"sogo": 8688,
"sora": 8689,
"soyo": 8690,
"sund": 8691,
"sunu": 8692,
"sylo": 8693,
"syrc": 8694,
"syre": 8695,
"syrj": 8696,
"syrn": 8697,
"tagb": 8698,
"takr": 8699,
"tale": 8700,
"talu": 8701,
"taml": 8702,
"tang": 8703,
"tavt": 8704,
"tayo": 8705,
"telu": 8706,
"teng": 8707,
"tfng": 8708,
"tglg": 8709,
"thaa": 8710,
"thai": 8711,
"tibt": 8712,
"tirh": 8713,
"tnsa": 8714,
"todr": 8715,
"tols": 8716,
"toto": 8717,
"tutg": 8718,
"ugar": 8719,
"vaii": 8720,
"visp": 8721,
"vith": 8722,
"wara": 8723,
"wcho": 8724,
"wole": 8725,
"xpeo": 8726,
"xsux": 8727,
"yezi": 8728,
"yiii": 8729,
"zanb": 8730,
"zinh": 8731,
"zmth": 8732,
"zsye": 8733,
"zsym": 8734,
"zxxx": 8735,
"zyyy": 8736,
"zzzz": 8737
}
@@ -0,0 +1 @@
{"name":"wrappy","version":"1.0.2","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532089748,"integrity":"sha512-3moA9kl0cQsSwPXDn7RyCvApJSfjgFlOqpRGeQViQSp3Eh9pRTFc/sXjYJGd2UrU5sQ1mAGPDUNSez1jT9CVTQ==","mode":420,"size":606},"README.md":{"checkedAt":1794532089749,"integrity":"sha512-8+XbZlwNiAJJx025bh0DaGgcn2qXAMmavSaRe8/gXqSCYqJ5rXNwzq1nPLmoGTfKNWkH6S0H2JUajY6AKMKocQ==","mode":420,"size":685},"LICENSE":{"checkedAt":1794532089714,"integrity":"sha512-P6dI5Z+zrwxSk1MIRPqpYG2ScYNkidLIATQXd50QzBgBh/XmcEd/nsd9NB4O9k6rfc+4dsY5DwJ7xvhpoS0PRg==","mode":420,"size":765},"wrappy.js":{"checkedAt":1794532089749,"integrity":"sha512-YhiV3LV3nDgnrSnCFq+BbQyZaGsfGO5FroRNpnvhkJriTh+9EaCb7yf2+BQ/zTnb900oOaMMhx38mOLJBd/0aw==","mode":420,"size":905}}}
@@ -0,0 +1,106 @@
export namespace types {
let data: "data";
let whitespace: "whitespace";
let lineEnding: "lineEnding";
let lineEndingBlank: "lineEndingBlank";
let linePrefix: "linePrefix";
let lineSuffix: "lineSuffix";
let atxHeading: "atxHeading";
let atxHeadingSequence: "atxHeadingSequence";
let atxHeadingText: "atxHeadingText";
let autolink: "autolink";
let autolinkEmail: "autolinkEmail";
let autolinkMarker: "autolinkMarker";
let autolinkProtocol: "autolinkProtocol";
let characterEscape: "characterEscape";
let characterEscapeValue: "characterEscapeValue";
let characterReference: "characterReference";
let characterReferenceMarker: "characterReferenceMarker";
let characterReferenceMarkerNumeric: "characterReferenceMarkerNumeric";
let characterReferenceMarkerHexadecimal: "characterReferenceMarkerHexadecimal";
let characterReferenceValue: "characterReferenceValue";
let codeFenced: "codeFenced";
let codeFencedFence: "codeFencedFence";
let codeFencedFenceSequence: "codeFencedFenceSequence";
let codeFencedFenceInfo: "codeFencedFenceInfo";
let codeFencedFenceMeta: "codeFencedFenceMeta";
let codeFlowValue: "codeFlowValue";
let codeIndented: "codeIndented";
let codeText: "codeText";
let codeTextData: "codeTextData";
let codeTextPadding: "codeTextPadding";
let codeTextSequence: "codeTextSequence";
let content: "content";
let definition: "definition";
let definitionDestination: "definitionDestination";
let definitionDestinationLiteral: "definitionDestinationLiteral";
let definitionDestinationLiteralMarker: "definitionDestinationLiteralMarker";
let definitionDestinationRaw: "definitionDestinationRaw";
let definitionDestinationString: "definitionDestinationString";
let definitionLabel: "definitionLabel";
let definitionLabelMarker: "definitionLabelMarker";
let definitionLabelString: "definitionLabelString";
let definitionMarker: "definitionMarker";
let definitionTitle: "definitionTitle";
let definitionTitleMarker: "definitionTitleMarker";
let definitionTitleString: "definitionTitleString";
let emphasis: "emphasis";
let emphasisSequence: "emphasisSequence";
let emphasisText: "emphasisText";
let escapeMarker: "escapeMarker";
let hardBreakEscape: "hardBreakEscape";
let hardBreakTrailing: "hardBreakTrailing";
let htmlFlow: "htmlFlow";
let htmlFlowData: "htmlFlowData";
let htmlText: "htmlText";
let htmlTextData: "htmlTextData";
let image: "image";
let label: "label";
let labelText: "labelText";
let labelLink: "labelLink";
let labelImage: "labelImage";
let labelMarker: "labelMarker";
let labelImageMarker: "labelImageMarker";
let labelEnd: "labelEnd";
let link: "link";
let paragraph: "paragraph";
let reference: "reference";
let referenceMarker: "referenceMarker";
let referenceString: "referenceString";
let resource: "resource";
let resourceDestination: "resourceDestination";
let resourceDestinationLiteral: "resourceDestinationLiteral";
let resourceDestinationLiteralMarker: "resourceDestinationLiteralMarker";
let resourceDestinationRaw: "resourceDestinationRaw";
let resourceDestinationString: "resourceDestinationString";
let resourceMarker: "resourceMarker";
let resourceTitle: "resourceTitle";
let resourceTitleMarker: "resourceTitleMarker";
let resourceTitleString: "resourceTitleString";
let setextHeading: "setextHeading";
let setextHeadingText: "setextHeadingText";
let setextHeadingLine: "setextHeadingLine";
let setextHeadingLineSequence: "setextHeadingLineSequence";
let strong: "strong";
let strongSequence: "strongSequence";
let strongText: "strongText";
let thematicBreak: "thematicBreak";
let thematicBreakSequence: "thematicBreakSequence";
let blockQuote: "blockQuote";
let blockQuotePrefix: "blockQuotePrefix";
let blockQuoteMarker: "blockQuoteMarker";
let blockQuotePrefixWhitespace: "blockQuotePrefixWhitespace";
let listOrdered: "listOrdered";
let listUnordered: "listUnordered";
let listItemIndent: "listItemIndent";
let listItemMarker: "listItemMarker";
let listItemPrefix: "listItemPrefix";
let listItemPrefixWhitespace: "listItemPrefixWhitespace";
let listItemValue: "listItemValue";
let chunkDocument: "chunkDocument";
let chunkContent: "chunkContent";
let chunkFlow: "chunkFlow";
let chunkText: "chunkText";
let chunkString: "chunkString";
}
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,8 @@
"use strict";
function _overload_yield(value, /** 0: await 1: delegate */ kind) {
this.v = value;
this.k = kind;
}
exports._ = _overload_yield;
@@ -0,0 +1,7 @@
import { ConfigBase } from '../../napcat-core/helper/config-base';
import type { NapCatCore } from '../../napcat-core';
import { OneBotConfig } from './config';
export * from './config';
export declare class OB11ConfigLoader extends ConfigBase<OneBotConfig> {
constructor(core: NapCatCore, configPath: string, schema: any);
}
@@ -0,0 +1,29 @@
/// <reference types="node" />
/**
* This is not the set of all possible signals.
*
* It IS, however, the set of all signals that trigger
* an exit on either Linux or BSD systems. Linux is a
* superset of the signal names supported on BSD, and
* the unknown signals just fail to register, so we can
* catch that easily enough.
*
* Windows signals are a different set, since there are
* signals that terminate Windows processes, but don't
* terminate (or don't even exist) on Posix systems.
*
* Don't bother with SIGKILL. It's uncatchable, which
* means that we can't fire any callbacks anyway.
*
* If a user does happen to register a handler on a non-
* fatal signal like SIGWINCH or something, and then
* exit, it'll end up firing `process.emit('exit')`, so
* the handler will be fired anyway.
*
* SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
* artificially, inherently leave the process in a
* state from which it is not safe to try and enter JS
* listeners.
*/
export declare const signals: NodeJS.Signals[];
//# sourceMappingURL=signals.d.ts.map
@@ -0,0 +1,25 @@
{
"name": "picocolors",
"version": "1.1.1",
"main": "./picocolors.js",
"types": "./picocolors.d.ts",
"browser": {
"./picocolors.js": "./picocolors.browser.js"
},
"sideEffects": false,
"description": "The tiniest and the fastest library for terminal output formatting with ANSI colors",
"files": [
"picocolors.*",
"types.d.ts"
],
"keywords": [
"terminal",
"colors",
"formatting",
"cli",
"console"
],
"author": "Alexey Raspopov",
"repository": "alexeyraspopov/picocolors",
"license": "ISC"
}
@@ -0,0 +1,28 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"env": {
"es6": true,
"browser": true
},
"plugins": [
"import",
"prettier",
"react",
"react-hooks",
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
}
@@ -0,0 +1,116 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "caractères", verb: "avoir" },
file: { unit: "octets", verb: "avoir" },
array: { unit: "éléments", verb: "avoir" },
set: { unit: "éléments", verb: "avoir" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "nombre";
}
case "object": {
if (Array.isArray(data)) {
return "tableau";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "entrée",
email: "adresse e-mail",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "date et heure ISO",
date: "date ISO",
time: "heure ISO",
duration: "durée ISO",
ipv4: "adresse IPv4",
ipv6: "adresse IPv6",
cidrv4: "plage IPv4",
cidrv6: "plage IPv6",
base64: "chaîne encodée en base64",
base64url: "chaîne encodée en base64url",
json_string: "chaîne JSON",
e164: "numéro E.164",
jwt: "JWT",
template_literal: "entrée",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Entrée invalide : ${issue.expected} attendu, ${parsedType(issue.input)} reçu`;
case "invalid_value":
if (issue.values.length === 1)
return `Entrée invalide : ${util.stringifyPrimitive(issue.values[0])} attendu`;
return `Option invalide : une valeur parmi ${util.joinValues(issue.values, "|")} attendue`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Trop grand : ${issue.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
return `Trop grand : ${issue.origin ?? "valeur"} doit être ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Trop petit : ${issue.origin} doit ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Trop petit : ${issue.origin} doit être ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Chaîne invalide : doit commencer par "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Chaîne invalide : doit se terminer par "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Chaîne invalide : doit inclure "${_issue.includes}"`;
if (_issue.format === "regex")
return `Chaîne invalide : doit correspondre au modèle ${_issue.pattern}`;
return `${Nouns[_issue.format] ?? issue.format} invalide`;
}
case "not_multiple_of":
return `Nombre invalide : doit être un multiple de ${issue.divisor}`;
case "unrecognized_keys":
return `Clé${issue.keys.length > 1 ? "s" : ""} non reconnue${issue.keys.length > 1 ? "s" : ""} : ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Clé invalide dans ${issue.origin}`;
case "invalid_union":
return "Entrée invalide";
case "invalid_element":
return `Valeur invalide dans ${issue.origin}`;
default:
return `Entrée invalide`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,139 @@
var test = require('tape');
var hasSymbols = require('has-symbols/shams')();
var utilInspect = require('../util.inspect');
var repeat = require('string.prototype.repeat');
var inspect = require('..');
test('inspect', function (t) {
t.plan(5);
var obj = [{ inspect: function xyzInspect() { return '!XYZ¡'; } }, []];
var stringResult = '[ !XYZ¡, [] ]';
var falseResult = '[ { inspect: [Function: xyzInspect] }, [] ]';
t.equal(inspect(obj), stringResult);
t.equal(inspect(obj, { customInspect: true }), stringResult);
t.equal(inspect(obj, { customInspect: 'symbol' }), falseResult);
t.equal(inspect(obj, { customInspect: false }), falseResult);
t['throws'](
function () { inspect(obj, { customInspect: 'not a boolean or "symbol"' }); },
TypeError,
'`customInspect` must be a boolean or the string "symbol"'
);
});
test('inspect custom symbol', { skip: !hasSymbols || !utilInspect || !utilInspect.custom }, function (t) {
t.plan(4);
var obj = { inspect: function stringInspect() { return 'string'; } };
obj[utilInspect.custom] = function custom() { return 'symbol'; };
var symbolResult = '[ symbol, [] ]';
var stringResult = '[ string, [] ]';
var falseResult = '[ { inspect: [Function: stringInspect]' + (utilInspect.custom ? ', [' + inspect(utilInspect.custom) + ']: [Function: custom]' : '') + ' }, [] ]';
var symbolStringFallback = utilInspect.custom ? symbolResult : stringResult;
var symbolFalseFallback = utilInspect.custom ? symbolResult : falseResult;
t.equal(inspect([obj, []]), symbolStringFallback);
t.equal(inspect([obj, []], { customInspect: true }), symbolStringFallback);
t.equal(inspect([obj, []], { customInspect: 'symbol' }), symbolFalseFallback);
t.equal(inspect([obj, []], { customInspect: false }), falseResult);
});
test('symbols', { skip: !hasSymbols }, function (t) {
t.plan(2);
var obj = { a: 1 };
obj[Symbol('test')] = 2;
obj[Symbol.iterator] = 3;
Object.defineProperty(obj, Symbol('non-enum'), {
enumerable: false,
value: 4
});
if (typeof Symbol.iterator === 'symbol') {
t.equal(inspect(obj), '{ a: 1, [Symbol(test)]: 2, [Symbol(Symbol.iterator)]: 3 }', 'object with symbols');
t.equal(inspect([obj, []]), '[ { a: 1, [Symbol(test)]: 2, [Symbol(Symbol.iterator)]: 3 }, [] ]', 'object with symbols in array');
} else {
// symbol sham key ordering is unreliable
t.match(
inspect(obj),
/^(?:{ a: 1, \[Symbol\(test\)\]: 2, \[Symbol\(Symbol.iterator\)\]: 3 }|{ a: 1, \[Symbol\(Symbol.iterator\)\]: 3, \[Symbol\(test\)\]: 2 })$/,
'object with symbols (nondeterministic symbol sham key ordering)'
);
t.match(
inspect([obj, []]),
/^\[ (?:{ a: 1, \[Symbol\(test\)\]: 2, \[Symbol\(Symbol.iterator\)\]: 3 }|{ a: 1, \[Symbol\(Symbol.iterator\)\]: 3, \[Symbol\(test\)\]: 2 }), \[\] \]$/,
'object with symbols in array (nondeterministic symbol sham key ordering)'
);
}
});
test('maxStringLength', function (t) {
t['throws'](
function () { inspect('', { maxStringLength: -1 }); },
TypeError,
'maxStringLength must be >= 0, or Infinity, not negative'
);
var str = repeat('a', 1e8);
t.equal(
inspect([str], { maxStringLength: 10 }),
'[ \'aaaaaaaaaa\'... 99999990 more characters ]',
'maxStringLength option limits output'
);
t.equal(
inspect(['f'], { maxStringLength: null }),
'[ \'\'... 1 more character ]',
'maxStringLength option accepts `null`'
);
t.equal(
inspect([str], { maxStringLength: Infinity }),
'[ \'' + str + '\' ]',
'maxStringLength option accepts ∞'
);
t.end();
});
test('inspect options', { skip: !utilInspect.custom }, function (t) {
var obj = {};
obj[utilInspect.custom] = function () {
return JSON.stringify(arguments);
};
t.equal(
inspect(obj),
utilInspect(obj, { depth: 5 }),
'custom symbols will use node\'s inspect'
);
t.equal(
inspect(obj, { depth: 2 }),
utilInspect(obj, { depth: 2 }),
'a reduced depth will be passed to node\'s inspect'
);
t.equal(
inspect({ d1: obj }, { depth: 3 }),
'{ d1: ' + utilInspect(obj, { depth: 2 }) + ' }',
'deep objects will receive a reduced depth'
);
t.equal(
inspect({ d1: obj }, { depth: 1 }),
'{ d1: [Object] }',
'unlike nodejs inspect, customInspect will not be used once the depth is exceeded.'
);
t.end();
});
test('inspect URL', { skip: typeof URL === 'undefined' }, function (t) {
t.match(
inspect(new URL('https://nodejs.org')),
/nodejs\.org/, // Different environments stringify it differently
'url can be inspected'
);
t.end();
});
@@ -0,0 +1,321 @@
# meow
> CLI app helper
![](meow.gif)
*I would recommend reading this [guide](https://clig.dev) on how to make user-friendly command-line tools.*
## Features
- Parses arguments
- Converts flags to [camelCase](https://github.com/sindresorhus/camelcase)
- Negates flags when using the `--no-` prefix
- Outputs version when `--version`
- Outputs description and supplied help text when `--help`
- Makes unhandled rejected promises [fail hard](https://github.com/sindresorhus/hard-rejection) instead of the default silent fail
- Sets the process title to the binary name defined in package.json
## Install
```
$ npm install meow
```
## Usage
```
$ ./foo-app.js unicorns --rainbow
```
```js
#!/usr/bin/env node
import meow from 'meow';
import foo from './lib/index.js';
const cli = meow(`
Usage
$ foo <input>
Options
--rainbow, -r Include a rainbow
Examples
$ foo unicorns --rainbow
🌈 unicorns 🌈
`, {
importMeta: import.meta,
flags: {
rainbow: {
type: 'boolean',
alias: 'r'
}
}
});
/*
{
input: ['unicorns'],
flags: {rainbow: true},
...
}
*/
foo(cli.input[0], cli.flags);
```
## API
### meow(helpText, options?)
### meow(options)
Returns an `object` with:
- `input` *(Array)* - Non-flag arguments
- `flags` *(Object)* - Flags converted to camelCase excluding aliases
- `unnormalizedFlags` *(Object)* - Flags converted to camelCase including aliases
- `pkg` *(Object)* - The `package.json` object
- `help` *(string)* - The help text used with `--help`
- `showHelp([exitCode=2])` *(Function)* - Show the help text and exit with `exitCode`
- `showVersion()` *(Function)* - Show the version text and exit
#### helpText
Type: `string`
Shortcut for the `help` option.
#### options
Type: `object`
##### importMeta
Type: `object`
Pass in [`import.meta`](https://nodejs.org/dist/latest/docs/api/esm.html#esm_import_meta). This is used to find the correct package.json file.
##### flags
Type: `object`
Define argument flags.
The key is the flag name in camel-case and the value is an object with any of:
- `type`: Type of value. (Possible values: `string` `boolean` `number`)
- `alias`: Usually used to define a short flag alias.
- `default`: Default value when the flag is not specified.
- `isRequired`: Determine if the flag is required. (Default: false)
- If it's only known at runtime whether the flag is required or not, you can pass a `Function` instead of a `boolean`, which based on the given flags and other non-flag arguments, should decide if the flag is required. Two arguments are passed to the function:
- The first argument is the **flags** object, which contains the flags converted to camel-case excluding aliases.
- The second argument is the **input** string array, which contains the non-flag arguments.
- The function should return a `boolean`, true if the flag is required, otherwise false.
- `isMultiple`: Indicates a flag can be set multiple times. Values are turned into an array. (Default: false)
- Multiple values are provided by specifying the flag multiple times, for example, `$ foo -u rainbow -u cat`. Space- or comma-separated values are [currently *not* supported](https://github.com/sindresorhus/meow/issues/164).
Note that flags are always defined using a camel-case key (`myKey`), but will match arguments in kebab-case (`--my-key`).
Example:
```js
flags: {
unicorn: {
type: 'string',
alias: 'u',
default: ['rainbow', 'cat'],
isMultiple: true,
isRequired: (flags, input) => {
if (flags.otherFlag) {
return true;
}
return false;
}
}
}
```
##### description
Type: `string | boolean`\
Default: The package.json `"description"` property
Description to show above the help text.
Set it to `false` to disable it altogether.
##### help
Type: `string | boolean`
The help text you want shown.
The input is reindented and starting/ending newlines are trimmed which means you can use a [template literal](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/template_strings) without having to care about using the correct amount of indent.
The description will be shown above your help text automatically.
##### version
Type: `string | boolean`\
Default: The package.json `"version"` property
Set a custom version output.
##### autoHelp
Type: `boolean`\
Default: `true`
Automatically show the help text when the `--help` flag is present. Useful to set this value to `false` when a CLI manages child CLIs with their own help text.
This option is only considered when there is only one argument in `process.argv`.
##### autoVersion
Type: `boolean`\
Default: `true`
Automatically show the version text when the `--version` flag is present. Useful to set this value to `false` when a CLI manages child CLIs with their own version text.
This option is only considered when there is only one argument in `process.argv`.
##### pkg
Type: `object`\
Default: Closest package.json upwards
package.json as an `object`.
*You most likely don't need this option.*
##### argv
Type: `string[]`\
Default: `process.argv.slice(2)`
Custom arguments object.
##### inferType
Type: `boolean`\
Default: `false`
Infer the argument type.
By default, the argument `5` in `$ foo 5` becomes a string. Enabling this would infer it as a number.
##### booleanDefault
Type: `boolean | null | undefined`\
Default: `false`
Value of `boolean` flags not defined in `argv`.
If set to `undefined`, the flags not defined in `argv` will be excluded from the result.
The `default` value set in `boolean` flags take precedence over `booleanDefault`.
_Note: If used in conjunction with `isMultiple`, the default flag value is set to `[]`._
__Caution: Explicitly specifying `undefined` for `booleanDefault` has different meaning from omitting key itself.__
Example:
```js
import meow from 'meow';
const cli = meow(`
Usage
$ foo
Options
--rainbow, -r Include a rainbow
--unicorn, -u Include a unicorn
--no-sparkles Exclude sparkles
Examples
$ foo
🌈 unicorns✨🌈
`, {
importMeta: import.meta,
booleanDefault: undefined,
flags: {
rainbow: {
type: 'boolean',
default: true,
alias: 'r'
},
unicorn: {
type: 'boolean',
default: false,
alias: 'u'
},
cake: {
type: 'boolean',
alias: 'c'
},
sparkles: {
type: 'boolean',
default: true
}
}
});
/*
{
flags: {
rainbow: true,
unicorn: false,
sparkles: true
},
unnormalizedFlags: {
rainbow: true,
r: true,
unicorn: false,
u: false,
sparkles: true
},
…
}
*/
```
##### hardRejection
Type: `boolean`\
Default: `true`
Whether to use [`hard-rejection`](https://github.com/sindresorhus/hard-rejection) or not. Disabling this can be useful if you need to handle `process.on('unhandledRejection')` yourself.
##### allowUnknownFlags
Type `boolean`\
Default: `true`
Whether to allow unknown flags or not.
## Promises
Meow will make unhandled rejected promises [fail hard](https://github.com/sindresorhus/hard-rejection) instead of the default silent fail. Meaning you don't have to manually `.catch()` promises used in your CLI.
## Tips
See [`chalk`](https://github.com/chalk/chalk) if you want to colorize the terminal output.
See [`get-stdin`](https://github.com/sindresorhus/get-stdin) if you want to accept input from stdin.
See [`conf`](https://github.com/sindresorhus/conf) if you need to persist some data.
See [`update-notifier`](https://github.com/yeoman/update-notifier) if you want update notifications.
[More useful CLI utilities…](https://github.com/sindresorhus/awesome-nodejs#command-line-utilities)
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-meow?utm_source=npm-meow&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,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var DateTimeRole = {
relatedConcepts: [{
module: 'HTML',
concept: {
name: 'input',
attributes: [{
name: 'type',
value: 'datetime'
}]
}
}],
type: 'widget'
};
var _default = DateTimeRole;
exports.default = _default;
@@ -0,0 +1,110 @@
import $ftaEG$arAEmodulejs from "./ar-AE.mjs";
import $ftaEG$bgBGmodulejs from "./bg-BG.mjs";
import $ftaEG$csCZmodulejs from "./cs-CZ.mjs";
import $ftaEG$daDKmodulejs from "./da-DK.mjs";
import $ftaEG$deDEmodulejs from "./de-DE.mjs";
import $ftaEG$elGRmodulejs from "./el-GR.mjs";
import $ftaEG$enUSmodulejs from "./en-US.mjs";
import $ftaEG$esESmodulejs from "./es-ES.mjs";
import $ftaEG$etEEmodulejs from "./et-EE.mjs";
import $ftaEG$fiFImodulejs from "./fi-FI.mjs";
import $ftaEG$frFRmodulejs from "./fr-FR.mjs";
import $ftaEG$heILmodulejs from "./he-IL.mjs";
import $ftaEG$hrHRmodulejs from "./hr-HR.mjs";
import $ftaEG$huHUmodulejs from "./hu-HU.mjs";
import $ftaEG$itITmodulejs from "./it-IT.mjs";
import $ftaEG$jaJPmodulejs from "./ja-JP.mjs";
import $ftaEG$koKRmodulejs from "./ko-KR.mjs";
import $ftaEG$ltLTmodulejs from "./lt-LT.mjs";
import $ftaEG$lvLVmodulejs from "./lv-LV.mjs";
import $ftaEG$nbNOmodulejs from "./nb-NO.mjs";
import $ftaEG$nlNLmodulejs from "./nl-NL.mjs";
import $ftaEG$plPLmodulejs from "./pl-PL.mjs";
import $ftaEG$ptBRmodulejs from "./pt-BR.mjs";
import $ftaEG$ptPTmodulejs from "./pt-PT.mjs";
import $ftaEG$roROmodulejs from "./ro-RO.mjs";
import $ftaEG$ruRUmodulejs from "./ru-RU.mjs";
import $ftaEG$skSKmodulejs from "./sk-SK.mjs";
import $ftaEG$slSImodulejs from "./sl-SI.mjs";
import $ftaEG$srSPmodulejs from "./sr-SP.mjs";
import $ftaEG$svSEmodulejs from "./sv-SE.mjs";
import $ftaEG$trTRmodulejs from "./tr-TR.mjs";
import $ftaEG$ukUAmodulejs from "./uk-UA.mjs";
import $ftaEG$zhCNmodulejs from "./zh-CN.mjs";
import $ftaEG$zhTWmodulejs from "./zh-TW.mjs";
var $835c96616a7cb4f9$exports = {};
$835c96616a7cb4f9$exports = {
"ar-AE": $ftaEG$arAEmodulejs,
"bg-BG": $ftaEG$bgBGmodulejs,
"cs-CZ": $ftaEG$csCZmodulejs,
"da-DK": $ftaEG$daDKmodulejs,
"de-DE": $ftaEG$deDEmodulejs,
"el-GR": $ftaEG$elGRmodulejs,
"en-US": $ftaEG$enUSmodulejs,
"es-ES": $ftaEG$esESmodulejs,
"et-EE": $ftaEG$etEEmodulejs,
"fi-FI": $ftaEG$fiFImodulejs,
"fr-FR": $ftaEG$frFRmodulejs,
"he-IL": $ftaEG$heILmodulejs,
"hr-HR": $ftaEG$hrHRmodulejs,
"hu-HU": $ftaEG$huHUmodulejs,
"it-IT": $ftaEG$itITmodulejs,
"ja-JP": $ftaEG$jaJPmodulejs,
"ko-KR": $ftaEG$koKRmodulejs,
"lt-LT": $ftaEG$ltLTmodulejs,
"lv-LV": $ftaEG$lvLVmodulejs,
"nb-NO": $ftaEG$nbNOmodulejs,
"nl-NL": $ftaEG$nlNLmodulejs,
"pl-PL": $ftaEG$plPLmodulejs,
"pt-BR": $ftaEG$ptBRmodulejs,
"pt-PT": $ftaEG$ptPTmodulejs,
"ro-RO": $ftaEG$roROmodulejs,
"ru-RU": $ftaEG$ruRUmodulejs,
"sk-SK": $ftaEG$skSKmodulejs,
"sl-SI": $ftaEG$slSImodulejs,
"sr-SP": $ftaEG$srSPmodulejs,
"sv-SE": $ftaEG$svSEmodulejs,
"tr-TR": $ftaEG$trTRmodulejs,
"uk-UA": $ftaEG$ukUAmodulejs,
"zh-CN": $ftaEG$zhCNmodulejs,
"zh-TW": $ftaEG$zhTWmodulejs
};
export {$835c96616a7cb4f9$exports as default};
//# sourceMappingURL=intlStrings.module.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 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 0C 1C","194":"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","1218":"H R WC S T U V W X Y Z a b c d e f g"},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","322":"dB eB fB gB hB"},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 ED","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"},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","578":"6 7 8 9 aB"},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"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 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:{"2":"1D 2D"}},B:1,C:"Dialog element",D:true};
@@ -0,0 +1,19 @@
# @babel/plugin-transform-react-jsx-self
> Add a __self prop to all JSX Elements
See our website [@babel/plugin-transform-react-jsx-self](https://babeljs.io/docs/babel-plugin-transform-react-jsx-self) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/plugin-transform-react-jsx-self
```
or using yarn:
```sh
yarn add @babel/plugin-transform-react-jsx-self --dev
```
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 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 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 0C 1C"},D:{"1":"0 1 2 3 4 5 VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B"},E:{"1":"M G 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F 2C ZC 3C 4C 5C 6C","132":"A B C L aC NC OC 7C"},F:{"1":"0 1 2 3 4 5 tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB FD GD HD ID NC uC JD OC"},G:{"1":"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 QD","132":"RD SD TD UD VD WD XD YD ZD aD bD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB rD sD aC tD uD vD wD xD QC RC SC yD","2":"J oD pD qD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:5,C:"Scroll methods on elements (scroll, scrollTo, scrollBy)",D:true};
@@ -0,0 +1,40 @@
/**
* Checks if the given code point can start an identifier.
*
* @param {number | undefined} code
* Code point to check.
* @returns {boolean}
* Whether `code` can start an identifier.
*/
export function start(code: number | undefined): boolean;
/**
* Checks if the given code point can continue an identifier.
*
* @param {number | undefined} code
* Code point to check.
* @param {Options | null | undefined} [options]
* Configuration (optional).
* @returns {boolean}
* Whether `code` can continue an identifier.
*/
export function cont(code: number | undefined, options?: Options | null | undefined): boolean;
/**
* Checks if the given value is a valid identifier name.
*
* @param {string} name
* Identifier to check.
* @param {Options | null | undefined} [options]
* Configuration (optional).
* @returns {boolean}
* Whether `name` can be an identifier.
*/
export function name(name: string, options?: Options | null | undefined): boolean;
/**
* Configuration.
*/
export type Options = {
/**
* Support JSX identifiers (default: `false`).
*/
jsx?: boolean | null | undefined;
};
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more