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,21 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import type { UnionToTuple, AssertRest, AssertType } from '../helpers/index';
import type { TMappedResult } from '../mapped/index';
import { type TTemplateLiteral } from '../template-literal/index';
import { type TUnion } from '../union/index';
import { type TNever } from '../never/index';
import { type Static } from '../static/index';
import { type TUnionEvaluated } from '../union/index';
import { type TExcludeFromMappedResult } from './exclude-from-mapped-result';
import { type TExcludeFromTemplateLiteral } from './exclude-from-template-literal';
type TExcludeRest<L extends TSchema[], R extends TSchema> = AssertRest<UnionToTuple<{
[K in keyof L]: Static<AssertType<L[K]>> extends Static<R> ? never : L[K];
}[number]>> extends infer R extends TSchema[] ? TUnionEvaluated<R> : never;
export type TExclude<L extends TSchema, R extends TSchema> = (L extends TUnion<infer S> ? TExcludeRest<S, R> : L extends R ? TNever : L);
/** `[Json]` Constructs a type by excluding from unionType all union members that are assignable to excludedMembers */
export declare function Exclude<L extends TMappedResult, R extends TSchema>(unionType: L, excludedMembers: R, options?: SchemaOptions): TExcludeFromMappedResult<L, R>;
/** `[Json]` Constructs a type by excluding from unionType all union members that are assignable to excludedMembers */
export declare function Exclude<L extends TTemplateLiteral, R extends TSchema>(unionType: L, excludedMembers: R, options?: SchemaOptions): TExcludeFromTemplateLiteral<L, R>;
/** `[Json]` Constructs a type by excluding from unionType all union members that are assignable to excludedMembers */
export declare function Exclude<L extends TSchema, R extends TSchema>(unionType: L, excludedMembers: R, options?: SchemaOptions): TExclude<L, R>;
export {};
@@ -0,0 +1,31 @@
import { AbstractTokenizer } from './AbstractTokenizer.js';
import { type IStreamReader } from './stream/index.js';
import type { IFileInfo, IReadChunkOptions, ITokenizerOptions } from './types.js';
export declare class ReadStreamTokenizer extends AbstractTokenizer {
private streamReader;
fileInfo: IFileInfo;
/**
* Constructor
* @param streamReader stream-reader to read from
* @param options Tokenizer options
*/
constructor(streamReader: IStreamReader, options?: ITokenizerOptions);
/**
* Read buffer from tokenizer
* @param uint8Array - Target Uint8Array to fill with data read from the tokenizer-stream
* @param options - Read behaviour options
* @returns Promise with number of bytes read
*/
readBuffer(uint8Array: Uint8Array, options?: IReadChunkOptions): Promise<number>;
/**
* Peek (read ahead) buffer from tokenizer
* @param uint8Array - Uint8Array (or Buffer) to write data to
* @param options - Read behaviour options
* @returns Promise with number of bytes peeked
*/
peekBuffer(uint8Array: Uint8Array, options?: IReadChunkOptions): Promise<number>;
ignore(length: number): Promise<number>;
abort(): Promise<void>;
close(): Promise<void>;
supportsRandomAccess(): boolean;
}
@@ -0,0 +1,4 @@
export { useSortable } from './useSortable';
export type { Arguments as UseSortableArguments } from './useSortable';
export { defaultAnimateLayoutChanges, defaultNewIndexGetter } from './defaults';
export type { AnimateLayoutChanges, NewIndexGetter } from './types';
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.finalize = finalize;
exports.flattenToSet = flattenToSet;
function finalize(deepArr) {
return Object.freeze(deepArr);
}
function flattenToSet(arr) {
const result = new Set();
const stack = [arr];
while (stack.length > 0) {
for (const el of stack.pop()) {
if (Array.isArray(el)) stack.push(el);else result.add(el);
}
}
return result;
}
0 && 0;
//# sourceMappingURL=deep-array.js.map
@@ -0,0 +1,19 @@
import {useGridState as $62967d126f3aa823$export$4007ac09ff9c68ed} from "./useGridState.mjs";
import {GridCollection as $16805b1b18093c5f$export$de3fdf6493c353d} from "./GridCollection.mjs";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export {$62967d126f3aa823$export$4007ac09ff9c68ed as useGridState, $16805b1b18093c5f$export$de3fdf6493c353d as GridCollection};
//# sourceMappingURL=module.js.map
@@ -0,0 +1,24 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (worker, concurrency) {
var _worker = (0, _wrapAsync2.default)(worker);
return (0, _queue2.default)((items, cb) => {
_worker(items[0], cb);
}, concurrency, 1);
};
var _queue = require('./internal/queue.js');
var _queue2 = _interopRequireDefault(_queue);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = exports.default;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E wC","164":"F A","260":"B"},B:{"1":"0 1 2 3 4 5 O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","260":"C L M G N"},C:{"1":"0 1 2 3 4 5 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","2":"xC TC J ZB K D E 0C 1C","516":"6 7 8 9 F A B C L M G N O P aB AB BB CB DB EB FB bB cB"},D:{"1":"0 1 2 3 4 5 9 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 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 J ZB K D E F A B C L M G N O P aB"},E:{"1":"K A B C 3C 6C aC NC","2":"J ZB L M G 2C ZC 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","1028":"D E F 4C 5C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z OC","2":"F B FD GD HD ID NC uC JD"},G:{"1":"PD QD RD SD TD UD VD","2":"ZC KD vC LD MD 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","1028":"E ND OD"},H:{"1":"hD"},I:{"1":"I mD nD","2":"TC J iD jD kD lD vC"},J:{"16":"D","1028":"A"},K:{"1":"H OC","16":"A B C NC uC"},L:{"1":"I"},M:{"1":"MC"},N:{"164":"A","260":"B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:7,C:"Do Not Track API",D:true};
@@ -0,0 +1,80 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
var prettier_1 = require("prettier");
var get_all_comments_from_nodes_1 = require("../get-all-comments-from-nodes");
var get_import_nodes_1 = require("../get-import-nodes");
var get_sorted_nodes_1 = require("../get-sorted-nodes");
var remove_nodes_from_original_code_1 = require("../remove-nodes-from-original-code");
var code = "// first comment\n// second comment\nimport z from 'z';\nimport c from 'c';\nimport g from 'g';\nimport t from 't';\nimport k from 'k';\n// import a from 'a';\n // import a from 'a';\nimport a from 'a';\n";
test('it should remove nodes from the original code', function () { return __awaiter(void 0, void 0, void 0, function () {
var importNodes, sortedNodes, allCommentsFromImports, commentAndImportsToRemoveFromCode, codeWithoutImportDeclarations, result;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
importNodes = (0, get_import_nodes_1.getImportNodes)(code);
sortedNodes = (0, get_sorted_nodes_1.getSortedNodes)(importNodes, {
importOrder: [],
importOrderCaseInsensitive: false,
importOrderSeparation: false,
importOrderGroupNamespaceSpecifiers: false,
importOrderSortSpecifiers: false,
importOrderSideEffects: true,
});
allCommentsFromImports = (0, get_all_comments_from_nodes_1.getAllCommentsFromNodes)(sortedNodes);
commentAndImportsToRemoveFromCode = __spreadArray(__spreadArray([], sortedNodes, true), allCommentsFromImports, true);
codeWithoutImportDeclarations = (0, remove_nodes_from_original_code_1.removeNodesFromOriginalCode)(code, commentAndImportsToRemoveFromCode);
return [4 /*yield*/, (0, prettier_1.format)(codeWithoutImportDeclarations, {
parser: 'babel',
})];
case 1:
result = _a.sent();
expect(result).toEqual('');
return [2 /*return*/];
}
});
}); });
@@ -0,0 +1,16 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring
module.exports = function BigIntToString(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` must be a BigInt');
}
return $String(x);
};
@@ -0,0 +1,57 @@
import {getFocusableTreeWalker as $9bf71ea28793e738$export$2d6ec8fc375ceafa} from "./FocusScope.mjs";
import {useLayoutEffect as $hGAaG$useLayoutEffect} from "@react-aria/utils";
import {useState as $hGAaG$useState} from "react";
/*
* Copyright 2022 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 $83013635b024ae3d$export$eac1895992b9f3d6(ref, options) {
let isDisabled = options === null || options === void 0 ? void 0 : options.isDisabled;
let [hasTabbableChild, setHasTabbableChild] = (0, $hGAaG$useState)(false);
(0, $hGAaG$useLayoutEffect)(()=>{
if ((ref === null || ref === void 0 ? void 0 : ref.current) && !isDisabled) {
let update = ()=>{
if (ref.current) {
let walker = (0, $9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current, {
tabbable: true
});
setHasTabbableChild(!!walker.nextNode());
}
};
update();
// Update when new elements are inserted, or the tabIndex/disabled attribute updates.
let observer = new MutationObserver(update);
observer.observe(ref.current, {
subtree: true,
childList: true,
attributes: true,
attributeFilter: [
'tabIndex',
'disabled'
]
});
return ()=>{
// Disconnect mutation observer when a React update occurs on the top-level component
// so we update synchronously after re-rendering. Otherwise React will emit act warnings
// in tests since mutation observers fire asynchronously. The mutation observer is necessary
// so we also update if a child component re-renders and adds/removes something tabbable.
observer.disconnect();
};
}
});
return isDisabled ? false : hasTabbableChild;
}
export {$83013635b024ae3d$export$eac1895992b9f3d6 as useHasTabbableChild};
//# sourceMappingURL=useHasTabbableChild.module.js.map
@@ -0,0 +1,55 @@
/*
* 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 {BuddhistCalendar} from './calendars/BuddhistCalendar';
import {Calendar, CalendarIdentifier} from './types';
import {CopticCalendar, EthiopicAmeteAlemCalendar, EthiopicCalendar} from './calendars/EthiopicCalendar';
import {GregorianCalendar} from './calendars/GregorianCalendar';
import {HebrewCalendar} from './calendars/HebrewCalendar';
import {IndianCalendar} from './calendars/IndianCalendar';
import {IslamicCivilCalendar, IslamicTabularCalendar, IslamicUmalquraCalendar} from './calendars/IslamicCalendar';
import {JapaneseCalendar} from './calendars/JapaneseCalendar';
import {PersianCalendar} from './calendars/PersianCalendar';
import {TaiwanCalendar} from './calendars/TaiwanCalendar';
/** Creates a `Calendar` instance from a Unicode calendar identifier string. */
export function createCalendar(name: CalendarIdentifier): Calendar {
switch (name) {
case 'buddhist':
return new BuddhistCalendar();
case 'ethiopic':
return new EthiopicCalendar();
case 'ethioaa':
return new EthiopicAmeteAlemCalendar();
case 'coptic':
return new CopticCalendar();
case 'hebrew':
return new HebrewCalendar();
case 'indian':
return new IndianCalendar();
case 'islamic-civil':
return new IslamicCivilCalendar();
case 'islamic-tbla':
return new IslamicTabularCalendar();
case 'islamic-umalqura':
return new IslamicUmalquraCalendar();
case 'japanese':
return new JapaneseCalendar();
case 'persian':
return new PersianCalendar();
case 'roc':
return new TaiwanCalendar();
case 'gregory':
default:
return new GregorianCalendar();
}
}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/utils/src/index.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 */\nexport {useId, mergeIds, useSlotId} from './useId';\nexport {chain} from './chain';\nexport {getOwnerDocument, getOwnerWindow} from './domHelpers';\nexport {mergeProps} from './mergeProps';\nexport {mergeRefs} from './mergeRefs';\nexport {filterDOMProps} from './filterDOMProps';\nexport {focusWithoutScrolling} from './focusWithoutScrolling';\nexport {getOffset} from './getOffset';\nexport {openLink, getSyntheticLinkProps, useSyntheticLinkProps, RouterProvider, shouldClientNavigate, useRouter, useLinkProps} from './openLink';\nexport {runAfterTransition} from './runAfterTransition';\nexport {useDrag1D} from './useDrag1D';\nexport {useGlobalListeners} from './useGlobalListeners';\nexport {useLabels} from './useLabels';\nexport {useObjectRef} from './useObjectRef';\nexport {useUpdateEffect} from './useUpdateEffect';\nexport {useLayoutEffect} from './useLayoutEffect';\nexport {useResizeObserver} from './useResizeObserver';\nexport {useSyncRef} from './useSyncRef';\nexport {getScrollParent} from './getScrollParent';\nexport {getScrollParents} from './getScrollParents';\nexport {isScrollable} from './isScrollable';\nexport {useViewportSize} from './useViewportSize';\nexport {useDescription} from './useDescription';\nexport {isMac, isIPhone, isIPad, isIOS, isAppleDevice, isWebKit, isChrome, isAndroid, isFirefox} from './platform';\nexport {useEvent} from './useEvent';\nexport {useValueEffect} from './useValueEffect';\nexport {scrollIntoView, scrollIntoViewport} from './scrollIntoView';\nexport {clamp, snapValueToStep} from '@react-stately/utils';\nexport {isVirtualClick, isVirtualPointerEvent} from './isVirtualEvent';\nexport {useEffectEvent} from './useEffectEvent';\nexport {useDeepMemo} from './useDeepMemo';\nexport {useFormReset} from './useFormReset';\nexport {useLoadMore} from './useLoadMore';\n"],"names":[],"version":3,"file":"main.js.map"}
@@ -0,0 +1 @@
{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAmCM,SAAS,0CAAY,KAAwB,EAAE,KAAkB,EAAE,QAA4C;IACpH,+FAA+F;IAC/F,IAAI,kBAAkB,CAAA,GAAA,6BAAqB,EAAE;QAAC,GAAG,KAAK;QAAE,OAAO,MAAM,UAAU;IAAA;IAC/E,IAAI,aAAC,SAAS,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,gBAAgB,iBAAiB;IACxF,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,aAAE,SAAS,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,gBAAQ,EAAE;QACtF,GAAG,KAAK;mBACR;IACF,GAAG,OAAO;IAEV,CAAA,GAAA,wBAAgB,EAAE,OAAO,iBAAiB;IAE1C,IAAI,mBAAC,eAAe,cAAE,UAAU,sBAAE,qBAAqB,QAAO,GAAG;IACjE,CAAA,GAAA,gBAAQ,EAAE;QACR,qEAAqE;QACrE,mDAAmD;QACnD,IAAI,SAAS,OAAO,EAClB,SAAS,OAAO,CAAC,aAAa,GAAG,CAAC,CAAC;IAEvC;IAEA,0EAA0E;IAC1E,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;QAC1B,YAAY,cAAc;QAC1B;YACE,mBAAmB;YACnB,IAAI,EAAC,CAAC,CAAA,GAAA,iCAAyB,EAAE,EAAE,oBAAoB,EAAC,GAAG;YAE3D,IAAI,oBAAC,gBAAgB,EAAC,GAAG,uBACvB,uBACA;YAEF;QACF;IACF;IAEA,OAAO;QACL,YAAY,CAAA,GAAA,iBAAS,EAAE,YAAY;QACnC,YAAY;YACV,GAAG,UAAU;YACb,SAAS;YACT,iBAAiB,AAAC,cAAc,uBAAuB,UAAW;YAClE,UAAU,cAAc,uBAAuB;QACjD;oBACA;mBACA;oBACA;oBACA;mBACA;0BACA;2BACA;IACF;AACF","sources":["packages/@react-aria/checkbox/src/useCheckbox.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 {AriaCheckboxProps} from '@react-types/checkbox';\nimport {InputHTMLAttributes, LabelHTMLAttributes, useEffect} from 'react';\nimport {mergeProps} from '@react-aria/utils';\nimport {privateValidationStateProp, useFormValidationState} from '@react-stately/form';\nimport {RefObject, ValidationResult} from '@react-types/shared';\nimport {ToggleState} from '@react-stately/toggle';\nimport {useFormValidation} from '@react-aria/form';\nimport {usePress} from '@react-aria/interactions';\nimport {useToggle} from '@react-aria/toggle';\n\nexport interface CheckboxAria extends ValidationResult {\n /** Props for the label wrapper element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props for the input element. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Whether the checkbox is selected. */\n isSelected: boolean,\n /** Whether the checkbox is in a pressed state. */\n isPressed: boolean,\n /** Whether the checkbox is disabled. */\n isDisabled: boolean,\n /** Whether the checkbox is read only. */\n isReadOnly: boolean\n}\n\n/**\n * Provides the behavior and accessibility implementation for a checkbox component.\n * Checkboxes allow users to select multiple items from a list of individual items, or\n * to mark one individual item as selected.\n * @param props - Props for the checkbox.\n * @param state - State for the checkbox, as returned by `useToggleState`.\n * @param inputRef - A ref for the HTML input element.\n */\nexport function useCheckbox(props: AriaCheckboxProps, state: ToggleState, inputRef: RefObject<HTMLInputElement | null>): CheckboxAria {\n // Create validation state here because it doesn't make sense to add to general useToggleState.\n let validationState = useFormValidationState({...props, value: state.isSelected});\n let {isInvalid, validationErrors, validationDetails} = validationState.displayValidation;\n let {labelProps, inputProps, isSelected, isPressed, isDisabled, isReadOnly} = useToggle({\n ...props,\n isInvalid\n }, state, inputRef);\n\n useFormValidation(props, validationState, inputRef);\n\n let {isIndeterminate, isRequired, validationBehavior = 'aria'} = props;\n useEffect(() => {\n // indeterminate is a property, but it can only be set via javascript\n // https://css-tricks.com/indeterminate-checkboxes/\n if (inputRef.current) {\n inputRef.current.indeterminate = !!isIndeterminate;\n }\n });\n\n // Reset validation state on label press for checkbox with a hidden input.\n let {pressProps} = usePress({\n isDisabled: isDisabled || isReadOnly,\n onPress() {\n // @ts-expect-error\n let {[privateValidationStateProp]: groupValidationState} = props;\n \n let {commitValidation} = groupValidationState\n ? groupValidationState\n : validationState;\n \n commitValidation();\n }\n });\n\n return {\n labelProps: mergeProps(labelProps, pressProps),\n inputProps: {\n ...inputProps,\n checked: isSelected,\n 'aria-required': (isRequired && validationBehavior === 'aria') || undefined,\n required: isRequired && validationBehavior === 'native'\n },\n isSelected,\n isPressed,\n isDisabled,\n isReadOnly,\n isInvalid,\n valiLine truncated
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="clone node_modules" level="project" />
</component>
</module>
@@ -0,0 +1,20 @@
var arrayPush = require('./_arrayPush'),
isArray = require('./isArray');
/**
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Function} keysFunc The function to get the keys of `object`.
* @param {Function} symbolsFunc The function to get the symbols of `object`.
* @returns {Array} Returns the array of property names and symbols.
*/
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}
module.exports = baseGetAllKeys;
@@ -0,0 +1,7 @@
import { OB11BaseNoticeEvent } from './OB11BaseNoticeEvent';
import { NapCatCore } from '../../../napcat-core';
export declare class OB11FriendAddNoticeEvent extends OB11BaseNoticeEvent {
notice_type: string;
user_id: number;
constructor(core: NapCatCore, userId: number);
}
@@ -0,0 +1,6 @@
function _assert_this_initialized(self) {
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return self;
}
export { _assert_this_initialized as _ };
@@ -0,0 +1,65 @@
import { LogWrapper } from '../../helper/log';
export interface NativePacketExportType {
initHook?: (send: string, recv: string, callback: (type: PacketType, uin: string, cmd: string, seq: number, hex_data: string) => void, o3_hook: boolean) => boolean;
}
export type PacketType = 0 | 1;
export type PacketCallback = (data: {
type: PacketType;
uin: string;
cmd: string;
seq: number;
hex_data: string;
}) => void;
export declare class NativePacketHandler {
private readonly supportedPlatforms;
private readonly MoeHooExport;
protected readonly logger: LogWrapper;
private loaded;
private readonly listeners;
constructor({ logger }: {
logger: LogWrapper;
});
/**
* 添加监听器的通用方法
*/
private addListener;
/**
* 移除监听器的通用方法
*/
private removeListener;
/** 监听所有数据包 */
onAll(callback: PacketCallback): () => void;
/** 监听特定类型的数据包 (0: send, 1: recv) */
onType(type: PacketType, callback: PacketCallback): () => void;
/** 监听所有发送的数据包 */
onSend(callback: PacketCallback): () => void;
/** 监听所有接收的数据包 */
onRecv(callback: PacketCallback): () => void;
/** 监听特定cmd的数据包(不限type) */
onCmd(cmd: string, callback: PacketCallback): () => void;
/** 监听特定type和cmd的数据包(精确匹配) */
onExact(type: PacketType, cmd: string, callback: PacketCallback): () => void;
/** 一次性监听所有数据包 */
onceAll(callback: PacketCallback): () => void;
/** 一次性监听特定类型的数据包 */
onceType(type: PacketType, callback: PacketCallback): () => void;
/** 一次性监听所有发送的数据包 */
onceSend(callback: PacketCallback): () => void;
/** 一次性监听所有接收的数据包 */
onceRecv(callback: PacketCallback): () => void;
/** 一次性监听特定cmd的数据包 */
onceCmd(cmd: string, callback: PacketCallback): () => void;
/** 一次性监听特定type和cmd的数据包 */
onceExact(type: PacketType, cmd: string, callback: PacketCallback): () => void;
/** 移除特定的全局监听器 */
off(key: string, callback: PacketCallback): boolean;
/** 移除特定key下的所有监听器 */
offAll(key: string): void;
/** 移除所有监听器 */
removeAllListeners(): void;
/**
* 触发监听器 - 按优先级触发: 精确匹配 > cmd匹配 > type匹配 > 全局
*/
private emitPacket;
init(version: string): Promise<boolean>;
}
@@ -0,0 +1 @@
{"version":3,"file":"buildManagedMetadataFromMaybeClassElementMetadata.js","sourceRoot":"","sources":["../../../../src/metadata/calculations/buildManagedMetadataFromMaybeClassElementMetadata.ts"],"names":[],"mappings":";;;AAMA,qIAAkI;AAClI,+EAA4E;AAC5E,iHAA8G;AAEjG,QAAA,iDAAiD,GAa5D,IAAA,+GAAsD,EAYpD,yDAA2B,EAAE,2FAA4C,CAAC,CAAC"}
@@ -0,0 +1 @@
{"mappings":";;;;;;ACiBA;IACE,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,SAAS,EAAE,SAAS,CAAA;CACrB;ACND;IACE,oDAAoD;IACpD,QAAQ,EAAE,SAAS,CAAC;IACpB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAID;;GAEG;AACH,6BAA6B,KAAK,EAAE,iBAAiB,qBAoBpD;AAED;;GAEG;AACH,6BAA6B,MAAM,CAIlC;ACzCD,4BAA4B,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,KAAK,MAAM,CAAC;AAatF;;;;;GAKG;AACH,oCAAoC,OAAO,EAAE,gBAAgB,GAAG,aAAa,CAK5E;ACbD;;GAEG;AACH,6CAA6C,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,eAAe,GAAG,MAAM,EAAE,OAAO,EAAE,mBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,0BAA0B,CAAC,EAAE,CAAC,CAAC,CAElM;AAED;;;;GAIG;AACH,4CAA4C,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,eAAe,GAAG,MAAM,EAAE,OAAO,EAAE,mBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,yBAAyB,CAAC,EAAE,CAAC,CAAC,CAIhM;AC5BD;;;;GAIG;AACH,iCAAiC,OAAO,GAAE,KAAK,iBAAsB,GAAG,KAAK,UAAU,CAGtF;ACND,qCAAsC,SAAQ,IAAI,CAAC,qBAAqB;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;GAIG;AACH,iCAAiC,OAAO,CAAC,EAAE,oBAAoB,GAAG,aAAa,CAK9E;ACfD;;;;GAIG;AACH,mCAAmC,OAAO,GAAE,mBAAwB,GAAG,KAAK,YAAY,CAGvF;ACRD;;;;GAIG;AACH,4BAA4B,OAAO,CAAC,EAAE,KAAK,eAAe,GAAG,KAAK,QAAQ,CAWzE;ACjBD;IACE,8DAA8D;IAC9D,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACvD,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACrD,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAA;CACrD;AAED;;;GAGG;AACH,0BAA0B,OAAO,CAAC,EAAE,KAAK,eAAe,GAAG,MAAM,CAsDhE;AC5DD,YAAY,EAAC,wBAAwB,EAAC,MAAM,2BAA2B,CAAC;AAGxE,YAAY,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AAEjE,YAAY,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC","sources":["packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/utils.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useDefaultLocale.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/context.tsx","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useMessageFormatter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useLocalizedStringFormatter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useListFormatter.tsx","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useDateFormatter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useNumberFormatter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useCollator.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/useFilter.ts","packages/@react-aria/i18n/src/packages/@react-aria/i18n/src/index.ts","packages/@react-aria/i18n/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {I18nProvider, useLocale} from './context';\nexport {useMessageFormatter} from './useMessageFormatter';\nexport {useLocalizedStringFormatter, useLocalizedStringDictionary} from './useLocalizedStringFormatter';\nexport {useListFormatter} from './useListFormatter';\nexport {useDateFormatter} from './useDateFormatter';\nexport {useNumberFormatter} from './useNumberFormatter';\nexport {useCollator} from './useCollator';\nexport {useFilter} from './useFilter';\n\nexport type {FormatMessage} from './useMessageFormatter';\nexport type {LocalizedStringFormatter} from '@internationalized/string';\nexport type {I18nProviderProps} from './context';\nexport type {Locale} from './useDefaultLocale';\nexport type {LocalizedStrings} from '@internationalized/message';\nexport type {DateFormatterOptions} from './useDateFormatter';\nexport type {DateFormatter} from '@internationalized/date';\nexport type {Filter} from './useFilter';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -0,0 +1,40 @@
# is-core-module <sup>[![Version Badge][2]][1]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][11]][1]
Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version.
## Example
```js
var isCore = require('is-core-module');
var assert = require('assert');
assert(isCore('fs'));
assert(!isCore('butts'));
```
## Tests
Clone the repo, `npm install`, and run `npm test`
[1]: https://npmjs.org/package/is-core-module
[2]: https://versionbadg.es/inspect-js/is-core-module.svg
[5]: https://david-dm.org/inspect-js/is-core-module.svg
[6]: https://david-dm.org/inspect-js/is-core-module
[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg
[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies
[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/is-core-module.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module
[codecov-image]: https://codecov.io/gh/inspect-js/is-core-module/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-core-module/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-core-module
[actions-url]: https://github.com/inspect-js/is-core-module/actions
@@ -0,0 +1,494 @@
import { S as SerializedTestSpecification } from './chunks/browser.d.DnU_kh8a.js';
export { B as BrowserTesterOptions } from './chunks/browser.d.DnU_kh8a.js';
import './chunks/global.d.BQDgW9Pr.js';
import { File, TestAnnotation, TaskResultPack, TaskEventPack, TaskPopulated } from '@vitest/runner';
export { CancelReason, ImportDuration, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Task as RunnerTask, TaskBase as RunnerTaskBase, TaskEventPack as RunnerTaskEventPack, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SuiteAPI, SuiteCollector, SuiteFactory, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestAnnotation, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
import { Awaitable } from '@vitest/utils';
export { ParsedStack, SerializedError, TestError } from '@vitest/utils';
import { U as UserConsoleLog, L as LabelColor, M as ModuleGraphData, b as BirpcReturn, P as ProvidedContext } from './chunks/worker.d.ZGohxCEd.js';
export { A as AfterSuiteRunMeta, C as ContextRPC, d as ContextTestEnvironment, c as RunnerRPC, R as RuntimeRPC, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.ZGohxCEd.js';
import { S as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.BTfZNUu9.js';
export { b as RuntimeConfig, a as SerializedCoverageConfig } from './chunks/config.d.BTfZNUu9.js';
import { ExpectStatic } from '@vitest/expect';
export { Assertion, AsymmetricMatchersContaining, DeeplyAllowMatchers, ExpectPollOptions, ExpectStatic, JestAssertion, Matchers, chai } from '@vitest/expect';
import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
export { Mock, MockContext, MockInstance, MockResult, MockResultIncomplete, MockResultReturn, MockResultThrow, MockSettledResult, MockSettledResultFulfilled, MockSettledResultIncomplete, MockSettledResultRejected, Mocked, MockedClass, MockedFunction, MockedObject } from '@vitest/spy';
import { M as MockFactoryWithHelper, a as MockOptions } from './chunks/mocker.d.BE_2ls6u.js';
export { b as bench } from './chunks/suite.d.BJWk38HB.js';
import { EvaluatedModules } from 'vite/module-runner';
export { a as BenchFunction, b as Benchmark, c as BenchmarkAPI, B as BenchmarkResult } from './chunks/benchmark.d.DAaHLpsq.js';
export { ExpectTypeOf, expectTypeOf } from 'expect-type';
export { SnapshotData, SnapshotMatchOptions, SnapshotResult, SnapshotSerializer, SnapshotStateOptions, SnapshotSummary, SnapshotUpdateState, UncheckedSnapshot } from '@vitest/snapshot';
export { DiffOptions } from '@vitest/utils/diff';
export { Bench as BenchFactory, Options as BenchOptions, Task as BenchTask, TaskResult as BenchTaskResult } from 'tinybench';
import '@vitest/pretty-format';
import './chunks/environment.d.CrsxCzP1.js';
import '@vitest/mocker';
import '@vitest/runner/utils';
interface SourceMap {
file: string;
mappings: string;
names: string[];
sources: string[];
sourcesContent?: string[];
version: number;
toString: () => string;
toUrl: () => string;
}
interface TransformResultWithSource {
code: string;
map: SourceMap | {
mappings: "";
} | null;
etag?: string;
deps?: string[];
dynamicDeps?: string[];
source?: string;
}
interface WebSocketHandlers {
onTaskUpdate: (packs: TaskResultPack[], events: TaskEventPack[]) => void;
getFiles: () => File[];
getTestFiles: () => Promise<SerializedTestSpecification[]>;
getPaths: () => string[];
getConfig: () => SerializedConfig;
getResolvedProjectLabels: () => {
name: string;
color?: LabelColor;
}[];
getModuleGraph: (projectName: string, id: string, browser?: boolean) => Promise<ModuleGraphData>;
getTransformResult: (projectName: string, id: string, browser?: boolean) => Promise<TransformResultWithSource | undefined>;
readTestFile: (id: string) => Promise<string | null>;
saveTestFile: (id: string, content: string) => Promise<void>;
rerun: (files: string[], resetTestNamePattern?: boolean) => Promise<void>;
rerunTask: (id: string) => Promise<void>;
updateSnapshot: (file?: File) => Promise<void>;
getUnhandledErrors: () => unknown[];
}
interface WebSocketEvents {
onCollected?: (files?: File[]) => Awaitable<void>;
onFinished?: (files: File[], errors: unknown[], coverage?: unknown) => Awaitable<void>;
onTestAnnotate?: (testId: string, annotation: TestAnnotation) => Awaitable<void>;
onTaskUpdate?: (packs: TaskResultPack[], events: TaskEventPack[]) => Awaitable<void>;
onUserConsoleLog?: (log: UserConsoleLog) => Awaitable<void>;
onPathsCollected?: (paths?: string[]) => Awaitable<void>;
onSpecsCollected?: (specs?: SerializedTestSpecification[]) => Awaitable<void>;
onFinishedReportCoverage: () => void;
}
type WebSocketRPC = BirpcReturn<WebSocketEvents, WebSocketHandlers>;
declare function createExpect(test?: TaskPopulated): ExpectStatic;
declare const globalExpect: ExpectStatic;
declare const assert: Chai.Assert;
declare const should: () => Chai.Should;
/**
* Gives access to injected context provided from the main thread.
* This usually returns a value provided by `globalSetup` or an external library.
*/
declare function inject<T extends keyof ProvidedContext & string>(key: T): ProvidedContext[T];
type WaitForCallback<T> = () => T | Promise<T>;
interface WaitForOptions {
/**
* @description Time in ms between each check callback
* @default 50ms
*/
interval?: number;
/**
* @description Time in ms after which the throw a timeout error
* @default 1000ms
*/
timeout?: number;
}
declare function waitFor<T>(callback: WaitForCallback<T>, options?: number | WaitForOptions): Promise<T>;
type WaitUntilCallback<T> = () => T | Promise<T>;
interface WaitUntilOptions extends Pick<WaitForOptions, "interval" | "timeout"> {}
type Truthy<T> = T extends false | "" | 0 | null | undefined ? never : T;
declare function waitUntil<T>(callback: WaitUntilCallback<T>, options?: number | WaitUntilOptions): Promise<Truthy<T>>;
type ESModuleExports = Record<string, unknown>;
interface VitestUtils {
/**
* Checks if fake timers are enabled.
*/
isFakeTimers: () => boolean;
/**
* This method wraps all further calls to timers until [`vi.useRealTimers()`](https://vitest.dev/api/vi#vi-userealtimers) is called.
*/
useFakeTimers: (config?: FakeTimerInstallOpts) => VitestUtils;
/**
* Restores mocked timers to their original implementations. All timers that were scheduled before will be discarded.
*/
useRealTimers: () => VitestUtils;
/**
* This method will call every timer that was initiated after [`vi.useFakeTimers`](https://vitest.dev/api/vi#vi-usefaketimers) call.
* It will not fire any timer that was initiated during its call.
*/
runOnlyPendingTimers: () => VitestUtils;
/**
* This method will asynchronously call every timer that was initiated after [`vi.useFakeTimers`](https://vitest.dev/api/vi#vi-usefaketimers) call, even asynchronous ones.
* It will not fire any timer that was initiated during its call.
*/
runOnlyPendingTimersAsync: () => Promise<VitestUtils>;
/**
* This method will invoke every initiated timer until the timer queue is empty. It means that every timer called during `runAllTimers` will be fired.
* If you have an infinite interval, it will throw after 10,000 tries (can be configured with [`fakeTimers.loopLimit`](https://vitest.dev/config/#faketimers-looplimit)).
*/
runAllTimers: () => VitestUtils;
/**
* This method will asynchronously invoke every initiated timer until the timer queue is empty. It means that every timer called during `runAllTimersAsync` will be fired even asynchronous timers.
* If you have an infinite interval, it will throw after 10 000 tries (can be configured with [`fakeTimers.loopLimit`](https://vitest.dev/config/#faketimers-looplimit)).
*/
runAllTimersAsync: () => Promise<VitestUtils>;
/**
* Calls every microtask that was queued by `process.nextTick`. This will also run all microtasks scheduled by themselves.
*/
runAllTicks: () => VitestUtils;
/**
* This method will invoke every initiated timer until the specified number of milliseconds is passed or the queue is empty - whatever comes first.
*/
advanceTimersByTime: (ms: number) => VitestUtils;
/**
* This method will invoke every initiated timer until the specified number of milliseconds is passed or the queue is empty - whatever comes first. This will include and await asynchronously set timers.
*/
advanceTimersByTimeAsync: (ms: number) => Promise<VitestUtils>;
/**
* Will call next available timer. Useful to make assertions between each timer call. You can chain call it to manage timers by yourself.
*/
advanceTimersToNextTimer: () => VitestUtils;
/**
* Will call next available timer and wait until it's resolved if it was set asynchronously. Useful to make assertions between each timer call.
*/
advanceTimersToNextTimerAsync: () => Promise<VitestUtils>;
/**
* Similar to [`vi.advanceTimersByTime`](https://vitest.dev/api/vi#vi-advancetimersbytime), but will advance timers by the milliseconds needed to execute callbacks currently scheduled with `requestAnimationFrame`.
*/
advanceTimersToNextFrame: () => VitestUtils;
/**
* Get the number of waiting timers.
*/
getTimerCount: () => number;
/**
* If fake timers are enabled, this method simulates a user changing the system clock (will affect date related API like `hrtime`, `performance.now` or `new Date()`) - however, it will not fire any timers.
* If fake timers are not enabled, this method will only mock `Date.*` and `new Date()` calls.
*/
setSystemTime: (time: number | string | Date) => VitestUtils;
/**
* Returns mocked current date. If date is not mocked the method will return `null`.
*/
getMockedSystemTime: () => Date | null;
/**
* When using `vi.useFakeTimers`, `Date.now` calls are mocked. If you need to get real time in milliseconds, you can call this function.
*/
getRealSystemTime: () => number;
/**
* Removes all timers that are scheduled to run. These timers will never run in the future.
*/
clearAllTimers: () => VitestUtils;
/**
* Creates a spy on a method or getter/setter of an object similar to [`vi.fn()`](https://vitest.dev/api/vi#vi-fn). It returns a [mock function](https://vitest.dev/api/mock).
* @example
* ```ts
* const cart = {
* getApples: () => 42
* }
*
* const spy = vi.spyOn(cart, 'getApples').mockReturnValue(10)
*
* expect(cart.getApples()).toBe(10)
* expect(spy).toHaveBeenCalled()
* expect(spy).toHaveReturnedWith(10)
* ```
*/
spyOn: typeof spyOn;
/**
* Creates a spy on a function, though can be initiated without one. Every time a function is invoked, it stores its call arguments, returns, and instances. Also, you can manipulate its behavior with [methods](https://vitest.dev/api/mock).
*
* If no function is given, mock will return `undefined`, when invoked.
* @example
* ```ts
* const getApples = vi.fn(() => 0)
*
* getApples()
*
* expect(getApples).toHaveBeenCalled()
* expect(getApples).toHaveReturnedWith(0)
*
* getApples.mockReturnValueOnce(5)
*
* expect(getApples()).toBe(5)
* expect(getApples).toHaveNthReturnedWith(2, 5)
* ```
*/
fn: typeof fn;
/**
* Wait for the callback to execute successfully. If the callback throws an error or returns a rejected promise it will continue to wait until it succeeds or times out.
*
* This is very useful when you need to wait for some asynchronous action to complete, for example, when you start a server and need to wait for it to start.
* @example
* ```ts
* const server = createServer()
*
* await vi.waitFor(
* () => {
* if (!server.isReady)
* throw new Error('Server not started')
*
* console.log('Server started')
* }, {
* timeout: 500, // default is 1000
* interval: 20, // default is 50
* }
* )
* ```
*/
waitFor: typeof waitFor;
/**
* This is similar to [`vi.waitFor`](https://vitest.dev/api/vi#vi-waitfor), but if the callback throws any errors, execution is immediately interrupted and an error message is received.
*
* If the callback returns a falsy value, the next check will continue until a truthy value is returned. This is useful when you need to wait for something to exist before taking the next step.
* @example
* ```ts
* const element = await vi.waitUntil(
* () => document.querySelector('.element'),
* {
* timeout: 500, // default is 1000
* interval: 20, // default is 50
* }
* )
*
* // do something with the element
* expect(element.querySelector('.element-child')).toBeTruthy()
* ```
*/
waitUntil: typeof waitUntil;
/**
* Run the factory before imports are evaluated. You can return a value from the factory
* to reuse it inside your [`vi.mock`](https://vitest.dev/api/vi#vi-mock) factory and tests.
*
* If used with [`vi.mock`](https://vitest.dev/api/vi#vi-mock), both will be hoisted in the order they are defined in.
*/
hoisted: <T>(factory: () => T) => T;
/**
* Mocks every import call to the module even if it was already statically imported.
*
* The call to `vi.mock` is hoisted to the top of the file, so you don't have access to variables declared in the global file scope
* unless they are defined with [`vi.hoisted`](https://vitest.dev/api/vi#vi-hoisted) before this call.
*
* Mocking algorithm is described in [documentation](https://vitest.dev/guide/mocking/modules).
* @param path Path to the module. Can be aliased, if your Vitest config supports it
* @param factory Mocked module factory. The result of this function will be an exports object
*/
mock(path: string, factory?: MockFactoryWithHelper | MockOptions): void;
mock<T>(module: Promise<T>, factory?: MockFactoryWithHelper<T> | MockOptions): void;
/**
* Removes module from mocked registry. All calls to import will return the original module even if it was mocked before.
*
* This call is hoisted to the top of the file, so it will only unmock modules that were defined in `setupFiles`, for example.
* @param path Path to the module. Can be aliased, if your Vitest config supports it
*/
unmock(path: string): void;
unmock(module: Promise<unknown>): void;
/**
* Mocks every subsequent [dynamic import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) call.
*
* Unlike [`vi.mock`](https://vitest.dev/api/vi#vi-mock), this method will not mock statically imported modules because it is not hoisted to the top of the file.
*
* Mocking algorithm is described in [documentation](https://vitest.dev/guide/mocking/modules).
* @param path Path to the module. Can be aliased, if your Vitest config supports it
* @param factory Mocked module factory. The result of this function will be an exports object
*/
doMock(path: string, factory?: MockFactoryWithHelper | MockOptions): void;
doMock<T>(module: Promise<T>, factory?: MockFactoryWithHelper<T> | MockOptions): void;
/**
* Removes module from mocked registry. All subsequent calls to import will return original module.
*
* Unlike [`vi.unmock`](https://vitest.dev/api/vi#vi-unmock), this method is not hoisted to the top of the file.
* @param path Path to the module. Can be aliased, if your Vitest config supports it
*/
doUnmock(path: string): void;
doUnmock(module: Promise<unknown>): void;
/**
* Imports module, bypassing all checks if it should be mocked.
* Can be useful if you want to mock module partially.
* @example
* ```ts
* vi.mock('./example.js', async () => {
* const axios = await vi.importActual<typeof import('./example.js')>('./example.js')
*
* return { ...axios, get: vi.fn() }
* })
* ```
* @param path Path to the module. Can be aliased, if your config supports it
*/
importActual: <T = ESModuleExports>(path: string) => Promise<T>;
/**
* Imports a module with all of its properties and nested properties mocked.
*
* Mocking algorithm is described in [documentation](https://vitest.dev/guide/mocking/modules).
* @example
* ```ts
* const example = await vi.importMock<typeof import('./example.js')>('./example.js')
* example.calc.mockReturnValue(10)
* expect(example.calc()).toBe(10)
* ```
* @param path Path to the module. Can be aliased, if your config supports it
* @returns Fully mocked module
*/
importMock: <T = ESModuleExports>(path: string) => Promise<MaybeMockedDeep<T>>;
/**
* Deeply mocks properties and methods of a given object
* in the same way as `vi.mock()` mocks module exports.
*
* @example
* ```ts
* const original = {
* simple: () => 'value',
* nested: {
* method: () => 'real'
* },
* prop: 'foo',
* }
*
* const mocked = vi.mockObject(original)
* expect(mocked.simple()).toBe(undefined)
* expect(mocked.nested.method()).toBe(undefined)
* expect(mocked.prop).toBe('foo')
*
* mocked.simple.mockReturnValue('mocked')
* mocked.nested.method.mockReturnValue('mocked nested')
*
* expect(mocked.simple()).toBe('mocked')
* expect(mocked.nested.method()).toBe('mocked nested')
*
* const spied = vi.mockObject(original, { spy: true })
* expect(spied.simple()).toBe('value')
* expect(spied.simple).toHaveBeenCalled()
* expect(spied.simple.mock.results[0]).toEqual({ type: 'return', value: 'value' })
* ```
*
* @param value - The object to be mocked
* @returns A deeply mocked version of the input object
*/
mockObject: <T>(value: T, options?: MockOptions) => MaybeMockedDeep<T>;
/**
* Type helper for TypeScript. Just returns the object that was passed.
*
* When `partial` is `true` it will expect a `Partial<T>` as a return value. By default, this will only make TypeScript believe that
* the first level values are mocked. You can pass down `{ deep: true }` as a second argument to tell TypeScript that the whole object is mocked, if it actually is.
* @example
* ```ts
* import example from './example.js'
* vi.mock('./example.js')
*
* test('1 + 1 equals 10' async () => {
* vi.mocked(example.calc).mockReturnValue(10)
* expect(example.calc(1, '+', 1)).toBe(10)
* })
* ```
* @param item Anything that can be mocked
* @param deep If the object is deeply mocked
* @param options If the object is partially or deeply mocked
*/
mocked: (<T>(item: T, deep?: false) => MaybeMocked<T>) & (<T>(item: T, deep: true) => MaybeMockedDeep<T>) & (<T>(item: T, options: {
partial?: false;
deep?: false;
}) => MaybeMocked<T>) & (<T>(item: T, options: {
partial?: false;
deep: true;
}) => MaybeMockedDeep<T>) & (<T>(item: T, options: {
partial: true;
deep?: false;
}) => MaybePartiallyMocked<T>) & (<T>(item: T, options: {
partial: true;
deep: true;
}) => MaybePartiallyMockedDeep<T>) & (<T>(item: T) => MaybeMocked<T>);
/**
* Checks that a given parameter is a mock function. If you are using TypeScript, it will also narrow down its type.
*/
isMockFunction: (fn: any) => fn is MockInstance;
/**
* Calls [`.mockClear()`](https://vitest.dev/api/mock#mockclear) on every mocked function.
*
* This will only empty `.mock` state, it will not affect mock implementations.
*
* This is useful if you need to clean up mocks between different assertions within a test.
*/
clearAllMocks: () => VitestUtils;
/**
* Calls [`.mockReset()`](https://vitest.dev/api/mock#mockreset) on every mocked function.
*
* This will empty `.mock` state, reset "once" implementations, and reset each mock's base implementation to its original.
*
* This is useful when you want to reset all mocks to their original states.
*/
resetAllMocks: () => VitestUtils;
/**
* Calls [`.mockRestore()`](https://vitest.dev/api/mock#mockrestore) on every mocked function.
*
* This will empty `.mock` state, restore all original mock implementations, and restore original descriptors of spied-on objects.
*
* This is useful for inter-test cleanup and/or removing mocks created by [`vi.spyOn(...)`](https://vitest.dev/api/vi#vi-spyon).
*/
restoreAllMocks: () => VitestUtils;
/**
* Makes value available on global namespace.
* Useful, if you want to have global variables available, like `IntersectionObserver`.
* You can return it back to original value with `vi.unstubAllGlobals`, or by enabling `unstubGlobals` config option.
*/
stubGlobal: (name: string | symbol | number, value: unknown) => VitestUtils;
/**
* Changes the value of `import.meta.env` and `process.env`.
* You can return it back to original value with `vi.unstubAllEnvs`, or by enabling `unstubEnvs` config option.
*/
stubEnv: <T extends string>(name: T, value: T extends "PROD" | "DEV" | "SSR" ? boolean : string | undefined) => VitestUtils;
/**
* Reset the value to original value that was available before first `vi.stubGlobal` was called.
*/
unstubAllGlobals: () => VitestUtils;
/**
* Reset environmental variables to the ones that were available before first `vi.stubEnv` was called.
*/
unstubAllEnvs: () => VitestUtils;
/**
* Resets modules registry by clearing the cache of all modules. This allows modules to be reevaluated when reimported.
* Top-level imports cannot be re-evaluated. Might be useful to isolate modules where local state conflicts between tests.
*
* This method does not reset mocks registry. To clear mocks registry, use [`vi.unmock`](https://vitest.dev/api/vi#vi-unmock) or [`vi.doUnmock`](https://vitest.dev/api/vi#vi-dounmock).
*/
resetModules: () => VitestUtils;
/**
* Wait for all imports to load. Useful, if you have a synchronous call that starts
* importing a module that you cannot await otherwise.
* Will also wait for new imports, started during the wait.
*/
dynamicImportSettled: () => Promise<void>;
/**
* Updates runtime config. You can only change values that are used when executing tests.
*/
setConfig: (config: RuntimeOptions) => void;
/**
* If config was changed with `vi.setConfig`, this will reset it to the original state().
*/
resetConfig: () => void;
}
declare const vitest: VitestUtils;
declare const vi: VitestUtils;
declare class VitestEvaluatedModules extends EvaluatedModules {
getModuleSourceMapById(id: string): any;
}
interface AssertType {
<T>(value: T): void;
}
declare const assertType: AssertType;
interface BrowserUI {
setCurrentFileId: (fileId: string) => void;
setIframeViewport: (width: number, height: number) => Promise<void>;
}
export { VitestEvaluatedModules as EvaluatedModules, LabelColor, ModuleGraphData, ProvidedContext, SerializedConfig, SerializedTestSpecification, UserConsoleLog, assert, assertType, createExpect, globalExpect as expect, inject, should, vi, vitest };
export type { AssertType, BrowserUI, TransformResultWithSource, VitestUtils, WebSocketEvents, WebSocketHandlers, WebSocketRPC };
@@ -0,0 +1,53 @@
{
"name": "nopt",
"version": "6.0.0",
"description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.",
"author": "GitHub Inc.",
"main": "lib/nopt.js",
"scripts": {
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"test": "tap",
"lint": "eslint \"**/*.js\"",
"postlint": "template-oss-check",
"template-oss-apply": "template-oss-apply --force",
"lintfix": "npm run lint -- --fix",
"snap": "tap",
"posttest": "npm run lint"
},
"repository": {
"type": "git",
"url": "https://github.com/npm/nopt.git"
},
"bin": {
"nopt": "bin/nopt.js"
},
"license": "ISC",
"dependencies": {
"abbrev": "^1.0.0"
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "3.5.0",
"tap": "^16.3.0"
},
"tap": {
"lines": 87,
"functions": 91,
"branches": 81,
"statements": 87
},
"files": [
"bin/",
"lib/"
],
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"windowsCI": false,
"version": "3.5.0"
}
}
@@ -0,0 +1,16 @@
/**
* @file 字体宽度度量
* @author mengke01(kekee000@gmail.com)
*/
export default {
1: 'Ultra-condensed',
2: 'Extra-condensed',
3: 'Condensed',
4: 'Semi-condensed',
5: 'Medium (normal)',
6: 'Semi-expanded',
7: 'Expanded',
8: 'Extra-expanded',
9: 'Ultra-expanded'
};
@@ -0,0 +1,4 @@
export interface Disabled {
draggable?: boolean;
droppable?: boolean;
}
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MessageDigest = exports.id_messageDigest = void 0;
const asn1_schema_1 = require("@peculiar/asn1-schema");
exports.id_messageDigest = "1.2.840.113549.1.9.4";
class MessageDigest extends asn1_schema_1.OctetString {
}
exports.MessageDigest = MessageDigest;
@@ -0,0 +1,20 @@
var baseFindIndex = require('./_baseFindIndex'),
baseIsNaN = require('./_baseIsNaN'),
strictIndexOf = require('./_strictIndexOf');
/**
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
return value === value
? strictIndexOf(array, value, fromIndex)
: baseFindIndex(array, baseIsNaN, fromIndex);
}
module.exports = baseIndexOf;
@@ -0,0 +1,38 @@
/**
* @file ttf基本数据结构
* @author mengke01(kekee000@gmail.com)
*
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html
*/
const struct = {
Int8: 1,
Uint8: 2,
Int16: 3,
Uint16: 4,
Int32: 5,
Uint32: 6,
Fixed: 7, // 32-bit signed fixed-point number (16.16)
FUnit: 8, // Smallest measurable distance in the em space
// 16-bit signed fixed number with the low 14 bits of fraction
F2Dot14: 11,
// The long internal format of a date in seconds since 12:00 midnight,
// January 1, 1904. It is represented as a signed 64-bit integer.
LongDateTime: 12,
// extend data type
Char: 13,
String: 14,
Bytes: 15,
Uint24: 20
};
// 反转名字查找
const names = {};
Object.keys(struct).forEach((key) => {
names[struct[key]] = key;
});
struct.names = names;
export default struct;
@@ -0,0 +1 @@
{"version":3,"names":["_defineAccessor","type","obj","key","fn","desc","configurable","enumerable","Object","defineProperty"],"sources":["../../src/helpers/defineAccessor.ts"],"sourcesContent":["/* @minVersion 7.20.7 */\n\nexport default function _defineAccessor<Type extends \"get\" | \"set\">(\n type: Type,\n obj: any,\n key: string | symbol,\n fn: PropertyDescriptor[Type],\n) {\n var desc: PropertyDescriptor = { configurable: true, enumerable: true };\n desc[type] = fn;\n return Object.defineProperty(obj, key, desc);\n}\n"],"mappings":";;;;;;AAEe,SAASA,eAAeA,CACrCC,IAAU,EACVC,GAAQ,EACRC,GAAoB,EACpBC,EAA4B,EAC5B;EACA,IAAIC,IAAwB,GAAG;IAAEC,YAAY,EAAE,IAAI;IAAEC,UAAU,EAAE;EAAK,CAAC;EACvEF,IAAI,CAACJ,IAAI,CAAC,GAAGG,EAAE;EACf,OAAOI,MAAM,CAACC,cAAc,CAACP,GAAG,EAAEC,GAAG,EAAEE,IAAI,CAAC;AAC9C","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"names":["_classApplyDescriptorSet","require","_classPrivateFieldGet","_classPrivateFieldSet","receiver","privateMap","value","descriptor","classPrivateFieldGet2","classApplyDescriptorSet"],"sources":["../../src/helpers/classPrivateFieldSet.js"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n/* @onlyBabel7 */\n\nimport classApplyDescriptorSet from \"classApplyDescriptorSet\";\nimport classPrivateFieldGet2 from \"classPrivateFieldGet2\";\nexport default function _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = classPrivateFieldGet2(privateMap, receiver);\n classApplyDescriptorSet(receiver, descriptor, value);\n return value;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AACe,SAASE,qBAAqBA,CAACC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAE;EACzE,IAAIC,UAAU,GAAGC,qBAAqB,CAACH,UAAU,EAAED,QAAQ,CAAC;EAC5DK,wBAAuB,CAACL,QAAQ,EAAEG,UAAU,EAAED,KAAK,CAAC;EACpD,OAAOA,KAAK;AACd","ignoreList":[]}
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 Toru Nagashima
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,67 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = require("react");
var _useLatest = _interopRequireDefault(require("../useLatest"));
var _utils = require("../utils");
var setRafInterval = function setRafInterval(callback, delay) {
if (delay === void 0) {
delay = 0;
}
if (typeof requestAnimationFrame === 'undefined') {
return {
id: setInterval(callback, delay)
};
}
var start = Date.now();
var handle = {
id: 0
};
var _loop = function loop() {
var current = Date.now();
if (current - start >= delay) {
callback();
start = Date.now();
}
handle.id = requestAnimationFrame(_loop);
};
handle.id = requestAnimationFrame(_loop);
return handle;
};
var cancelAnimationFrameIsNotDefined = function cancelAnimationFrameIsNotDefined(t) {
return typeof cancelAnimationFrame === 'undefined';
};
var clearRafInterval = function clearRafInterval(handle) {
if (cancelAnimationFrameIsNotDefined(handle.id)) {
return clearInterval(handle.id);
}
cancelAnimationFrame(handle.id);
};
function useRafInterval(fn, delay, options) {
var immediate = options === null || options === void 0 ? void 0 : options.immediate;
var fnRef = (0, _useLatest["default"])(fn);
var timerRef = (0, _react.useRef)(undefined);
var clear = (0, _react.useCallback)(function () {
if (timerRef.current) {
clearRafInterval(timerRef.current);
}
}, []);
(0, _react.useEffect)(function () {
if (!(0, _utils.isNumber)(delay) || delay < 0) {
return;
}
if (immediate) {
fnRef.current();
}
timerRef.current = setRafInterval(function () {
fnRef.current();
}, delay);
return clear;
}, [delay]);
return clear;
}
var _default = exports["default"] = useRafInterval;
@@ -0,0 +1,60 @@
{
"name": "ts-interface-checker",
"version": "0.1.13",
"description": "Runtime library to validate data against TypeScript interfaces",
"main": "dist/index",
"typings": "dist/index",
"scripts": {
"build": "tsc",
"watch": "tsc -w",
"test": "tsc && nyc mocha -R list test/",
"bench": "tsc && node test/bench/bench.js",
"preversion": "npm test",
"version": "npm run build"
},
"keywords": [
"typescript",
"ts",
"interface",
"type",
"validate",
"validator",
"check"
],
"files": [
"dist"
],
"author": "Dmitry S, Grist Labs",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/gristlabs/ts-interface-checker"
},
"bugs": {
"url": "https://github.com/gristlabs/ts-interface-checker/issues"
},
"nyc": {
"extension": [
".ts"
],
"exclude": [
"**/*.d.ts"
]
},
"dependencies": {},
"devDependencies": {
"@types/benchmark": "^1.0.31",
"@types/chai": "~4.0.8",
"@types/mocha": "^8.0.1",
"@types/node": "^8.0.57",
"benchmark": "^2.1.4",
"chai": "^4.1.2",
"coveralls": "^3.0.0",
"mocha": "^7.1.2",
"nyc": "^15.0.1",
"protobufjs": "^6.8.3",
"source-map-support": "^0.5.0",
"ts-node": "^8.10.2",
"typescript": "^3.9.7"
}
}
@@ -0,0 +1 @@
{"version":3,"names":["_checkPrivateRedeclaration","obj","privateCollection","has","TypeError"],"sources":["../../src/helpers/checkPrivateRedeclaration.ts"],"sourcesContent":["/* @minVersion 7.14.1 */\n\nexport default function _checkPrivateRedeclaration(\n obj: object,\n privateCollection: WeakMap<object, unknown> | WeakSet<object>,\n) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\n \"Cannot initialize the same private elements twice on an object\",\n );\n }\n}\n"],"mappings":";;;;;;AAEe,SAASA,0BAA0BA,CAChDC,GAAW,EACXC,iBAA6D,EAC7D;EACA,IAAIA,iBAAiB,CAACC,GAAG,CAACF,GAAG,CAAC,EAAE;IAC9B,MAAM,IAAIG,SAAS,CACjB,gEACF,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2020 Vercel, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,17 @@
/*! https://mths.be/includes v2.0.0 by @mathias */
'use strict';
var define = require('define-properties');
var getPolyfill = require('./polyfill');
module.exports = function shimIncludes() {
var polyfill = getPolyfill();
if (String.prototype.includes !== polyfill) {
define(String.prototype, { includes: polyfill });
}
return polyfill;
};
@@ -0,0 +1,49 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
// https://262.ecma-international.org/6.0/#sec-iteratorclose
module.exports = function IteratorClose(iterator, completion) {
if (!isObject(iterator)) {
throw new $TypeError('Assertion failed: Type(iterator) is not Object');
}
if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) {
throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
}
var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
var iteratorReturn = GetMethod(iterator, 'return');
if (typeof iteratorReturn === 'undefined') {
return completionThunk();
}
var completionRecord;
try {
var innerResult = Call(iteratorReturn, iterator, []);
} catch (e) {
// if we hit here, then "e" is the innerResult completion that needs re-throwing
// if the completion is of type "throw", this will throw.
completionThunk();
completionThunk = null; // ensure it's not called twice.
// if not, then return the innerResult completion
throw e;
}
completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
completionThunk = null; // ensure it's not called twice.
if (!isObject(innerResult)) {
throw new $TypeError('iterator .return must return an object');
}
return completionRecord;
};
@@ -0,0 +1,6 @@
import type { CollisionDetection } from './types';
/**
* Returns the closest rectangles from an array of rectangles to the corners of
* another rectangle.
*/
export declare const closestCorners: CollisionDetection;
@@ -0,0 +1,6 @@
'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./react-redux.production.min.cjs')
} else {
module.exports = require('./react-redux.development.cjs')
}
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isBindingConstraintsWithNoNameNorTags = isBindingConstraintsWithNoNameNorTags;
function isBindingConstraintsWithNoNameNorTags(constraints) {
return constraints.name === undefined && constraints.tags.size === 0;
}
//# sourceMappingURL=isBindingConstraintsWithNoNameNorTags.js.map
@@ -0,0 +1 @@
{"name":"@react-aria/breadcrumbs","version":"3.5.19","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/ar-AE.main.js":{"checkedAt":1794532107278,"integrity":"sha512-YjxfE2AoY02N3Ms1Ep5DhgXdF5upPvn4xTm6MXw+Kk4KxDcToHuLlf0o24u5yQda0JsNMAaDy9hTnnGKQ9t16Q==","mode":420,"size":170},"dist/ar-AE.module.js":{"checkedAt":1794532107279,"integrity":"sha512-8jUc+wEcjLxTPP1oX8kBZcDvolyFnFKF275E8MBsCdYwqqEQWtwwgdPcQ4uHMQtSlpSqIqfPCrbfDd1rVbfrPQ==","mode":420,"size":266},"dist/bg-BG.main.js":{"checkedAt":1794532107279,"integrity":"sha512-3GzmcWzdtfby4LXh4y3CNmW9MnQ/g8Nh/JhPJzQDjgW4EiGPjjqJc28iN2XR7BOTNE0rLS8Jk5hV3gBkf4ZA5A==","mode":420,"size":149},"dist/bg-BG.module.js":{"checkedAt":1794532107279,"integrity":"sha512-GQcQ0K26x/N/ytIUVOYpT3V+MQkoMixVEU5y/hx+fv5grJk7NgGxbqK71flZ9IA1okk1inbRPKg7YFebJba/aw==","mode":420,"size":245},"dist/cs-CZ.main.js":{"checkedAt":1794532107279,"integrity":"sha512-qQibAS/RWxfrLGlZvFqU+S9HX3xso4MZH+pLTQCx8e1pzRpFQhlLskYjfYEJlktLBdE+WnPYtR/Fu+NgAIFLjQ==","mode":420,"size":96},"dist/cs-CZ.module.js":{"checkedAt":1794532107279,"integrity":"sha512-eWV9Bzx06obM1Mb1a/Fm9ISpu/dbZ/tWFMuDWU+KI6E8DuXMscJqsPyn3dWQTmTcza5L5krrSH1XGnIaUed91g==","mode":420,"size":192},"dist/da-DK.main.js":{"checkedAt":1794532107279,"integrity":"sha512-10LK+xLyz+xq18fZb2CXauzuKbCF6OKV8gq664M7c8nK7xEHmBsKzvQZ4UcFf090RT20ziTG3B8lh0+rZqJN6Q==","mode":420,"size":99},"dist/da-DK.module.js":{"checkedAt":1794532107279,"integrity":"sha512-qdM5Kn2FqAfyELTBD5PrSkpTLrTsZfIY+HTDge/9T1+f9J//1/CLPgKpZMINrsPRgdZp//9H9qoIGQmR11DCNA==","mode":420,"size":195},"dist/de-DE.main.js":{"checkedAt":1794532107280,"integrity":"sha512-b8QeOv6AbI9xbP8lFg8Xai2yTr0ZdwLFY8HpWaxMzr6GVXM/DKXZzw0JU7iZfb2gK40xjTMLwJGsdq/RYHPC5Q==","mode":420,"size":96},"dist/de-DE.module.js":{"checkedAt":1794532107280,"integrity":"sha512-ycEpw3cmTmulVI6QHUgDT0o1/vWONx9pbzabhCee8BriDyNnOmHQza46hqHcH0b+Y6Dwar4KATU4OoHLx8KAuw==","mode":420,"size":192},"dist/el-GR.main.js":{"checkedAt":1794532107280,"integrity":"sha512-9+cxfPWCLmfecnH38qjBpRcTEs0UOpJgWNi8yRQj9G9n45cNRrByyrwGXjm8i0LUihfzZJwccP2kLHFv6gIrYQ==","mode":420,"size":166},"dist/el-GR.module.js":{"checkedAt":1794532107280,"integrity":"sha512-qi1+e43D5yYKT1x92BwuN69UKL8MHI/wL9CobSNv1qwqgDx2lGo6zxd8h0CCohfTGPpY+yaBfTnHmdFIUrGYgw==","mode":420,"size":262},"dist/en-US.main.js":{"checkedAt":1794532107280,"integrity":"sha512-XPuWLwMSdj7hjG01mT7LMwPy2TO54W54Fbd6aMt2HO2TmIHmtHPdzUhEN8YZGGLce+BUJ7RM+DJ6FMCkCVy8/g==","mode":420,"size":96},"dist/en-US.module.js":{"checkedAt":1794532107280,"integrity":"sha512-kK70LN9chATpNvSWlnJET4K11nUb1ZtyHulWXmlxgHaECK9OobmvxbjPS6n2W7jnN8F7tisqdfu+rrV/AI/O9Q==","mode":420,"size":192},"dist/es-ES.main.js":{"checkedAt":1794532107280,"integrity":"sha512-jx250hkEW6Q021zdVLO2fs+XDTmw8Oqn6+12m+5/H/QYHdpltoUy+0wt2qfrIu022Yi8bXVxTwtEEJ8U46X0+A==","mode":420,"size":97},"dist/es-ES.module.js":{"checkedAt":1794532107280,"integrity":"sha512-l2AaSe5JQYJLT+z+9EofB5ZsVbGTwRdpKebkEJ95HW4R/C+CCWlIh/AhTfku/SPbZlXAprDNy4K7Tj7y2ZJsgw==","mode":420,"size":193},"dist/et-EE.main.js":{"checkedAt":1794532107281,"integrity":"sha512-3hx0/PeOy379z6T+wE5GnAkQUjkX4VcAkQdSN+5qVHN6julCZuGYIiTQx1J1bj3iFIppTMSmEKKhN31i+uAArQ==","mode":420,"size":94},"dist/et-EE.module.js":{"checkedAt":1794532107281,"integrity":"sha512-Croj4LTblPIZ/2VQjDPJANttKcb9HLo2X1VPA+hYULjen5GXgcASbaUB0d5AI9ArkbO1P6abWvMbXJ0E8Wmklw==","mode":420,"size":190},"dist/fi-FI.main.js":{"checkedAt":1794532107281,"integrity":"sha512-G9s5Yfk5xw1hhCwaqsh+xdez/l74eoqEER13VVw6DVzVnrK6yAhoqYrx1N1S6SG72MW1i9SME+x6NjK7sgB9HQ==","mode":420,"size":101},"dist/fi-FI.module.js":{"checkedAt":1794532107281,"integrity":"sha512-0GjqzEGcwP/XcccAhuLZ5cifwSf0GHqZorBhQdLHPzIbsJnWdHc9wa8fAIl/YLKywK1O+IBH0yfk9pB3nijvtw==","mode":420,"size":197},"dist/fr-FR.main.js":{"checkedAt":1794532107281,"integrity":"sha512-xQVpnaxmt1mxtX6sDAat+GurdYkXlCYcaC9zmFeOeKnd2S7ov54wuoAPxvmCUo4TappWbpKLIRDHHeNB1OMfEQ==","mode":420,"size":105},"dist/fr-FR.module.js":{"checkedAt":1794532107281,"integrity":"sha512-qPKmrZohalj9AWJNugEeptj6DgKcpnHq3+ataPiE3NBf7oyoNBiGKNaDyzeIZxDPRP5wcm0j4euEBqIrzb69Jg==","mode":420,"size":201},"dist/he-IL.main.js":{"checkedAt":1794532107281,"integrity":"sha512-nIsVYOqOM8hpMhdggr+D6BDfeGPbUneeg4/CwJqr56rlklleNARmk1fw2YAx2pzZU7JCLiBng9PiPtU2Ui6NcQ==","mode":420,"size":156},"dist/he-IL.module.js":{"checkedAt":1794532107281,"integrity":"sha512-jsvsbyP39LwE/yPGDoWNkVaTBlH/A/nqvgLKcYx9ghutECbUH15w6DZCcKY/IoC73z4uh0SN7tFoGyNk/sMKnQ==","mode":420,"size":252},"dist/hr-HR.main.js":{"checkedAt":1794532107282,"integrity":"sha512-C6bWXjjqhWNGcf3IW5cN1h9TrEVh/XLzydIFsFgp0sYPsiFdKLZCGbPo+w2QsQBb2l6Q3Py8+Y0ML2xmlp2GBA==","mode":420,"size":104},"dist/hr-HR.module.js":{"checkedAt":1794532107282,"integrity":"sha512-TDaFiph6Z7lNrhHTB9NGT5ZiWtCJvUFdU0A1KqnXg2k0GFL3jsiqn+PZrDz7NAh4Eqq+MF5caVMhuSlSKbmkkg==","mode":420,"size":200},"dist/hu-HU.main.Line truncated
@@ -0,0 +1,19 @@
import arrayFilter from './_arrayFilter.js';
import isFunction from './isFunction.js';
/**
* The base implementation of `_.functions` which creates an array of
* `object` function property names filtered from `props`.
*
* @private
* @param {Object} object The object to inspect.
* @param {Array} props The property names to filter.
* @returns {Array} Returns the function names.
*/
function baseFunctions(object, props) {
return arrayFilter(props, function(key) {
return isFunction(object[key]);
});
}
export default baseFunctions;
@@ -0,0 +1,14 @@
'use strict'
/* eslint-disable no-var */
var queue = require('./')(worker, 1)
queue.push(42, function (err, result) {
if (err) { throw err }
console.log('the result is', result)
})
function worker (arg, cb) {
cb(null, 42 * 2)
}
@@ -0,0 +1,46 @@
var createRange = require('./_createRange');
/**
* Creates an array of numbers (positive and/or negative) progressing from
* `start` up to, but not including, `end`. A step of `-1` is used if a negative
* `start` is specified without an `end` or `step`. If `end` is not specified,
* it's set to `start` with `start` then set to `0`.
*
* **Note:** JavaScript follows the IEEE-754 standard for resolving
* floating-point values which can produce unexpected results.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {number} [start=0] The start of the range.
* @param {number} end The end of the range.
* @param {number} [step=1] The value to increment or decrement by.
* @returns {Array} Returns the range of numbers.
* @see _.inRange, _.rangeRight
* @example
*
* _.range(4);
* // => [0, 1, 2, 3]
*
* _.range(-4);
* // => [0, -1, -2, -3]
*
* _.range(1, 5);
* // => [1, 2, 3, 4]
*
* _.range(0, 20, 5);
* // => [0, 5, 10, 15]
*
* _.range(0, -4, -1);
* // => [0, -1, -2, -3]
*
* _.range(1, 4, 0);
* // => [1, 1, 1]
*
* _.range(0);
* // => []
*/
var range = createRange();
module.exports = range;
@@ -0,0 +1,123 @@
# convert-source-map [![Build Status][ci-image]][ci-url]
Converts a source-map from/to different formats and allows adding/changing properties.
```js
var convert = require('convert-source-map');
var json = convert
.fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
.toJSON();
var modified = convert
.fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
.setProperty('sources', [ 'SRC/FOO.JS' ])
.toJSON();
console.log(json);
console.log(modified);
```
```json
{"version":3,"file":"build/foo.min.js","sources":["src/foo.js"],"names":[],"mappings":"AAAA","sourceRoot":"/"}
{"version":3,"file":"build/foo.min.js","sources":["SRC/FOO.JS"],"names":[],"mappings":"AAAA","sourceRoot":"/"}
```
## API
### fromObject(obj)
Returns source map converter from given object.
### fromJSON(json)
Returns source map converter from given json string.
### fromBase64(base64)
Returns source map converter from given base64 encoded json string.
### fromComment(comment)
Returns source map converter from given base64 encoded json string prefixed with `//# sourceMappingURL=...`.
### fromMapFileComment(comment, mapFileDir)
Returns source map converter from given `filename` by parsing `//# sourceMappingURL=filename`.
`filename` must point to a file that is found inside the `mapFileDir`. Most tools store this file right next to the
generated file, i.e. the one containing the source map.
### fromSource(source)
Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found.
### fromMapFileSource(source, mapFileDir)
Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was
found.
The sourcemap will be read from the map file found by parsing `# sourceMappingURL=file` comment. For more info see
fromMapFileComment.
### toObject()
Returns a copy of the underlying source map.
### toJSON([space])
Converts source map to json string. If `space` is given (optional), this will be passed to
[JSON.stringify](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify) when the
JSON string is generated.
### toBase64()
Converts source map to base64 encoded json string.
### toComment([options])
Converts source map to an inline comment that can be appended to the source-file.
By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would
normally see in a JS source file.
When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file.
### addProperty(key, value)
Adds given property to the source map. Throws an error if property already exists.
### setProperty(key, value)
Sets given property to the source map. If property doesn't exist it is added, otherwise its value is updated.
### getProperty(key)
Gets given property of the source map.
### removeComments(src)
Returns `src` with all source map comments removed
### removeMapFileComments(src)
Returns `src` with all source map comments pointing to map files removed.
### commentRegex
Provides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments.
### mapFileCommentRegex
Provides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments pointing to map files.
### generateMapFileComment(file, [options])
Returns a comment that links to an external source map via `file`.
By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would normally see in a JS source file.
When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file.
[ci-url]: https://github.com/thlorenz/convert-source-map/actions?query=workflow:ci
[ci-image]: https://img.shields.io/github/workflow/status/thlorenz/convert-source-map/CI?style=flat-square
@@ -0,0 +1,53 @@
/**
* @author Matt DuVall<http://mattduvall.com/>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "disallow synchronous methods",
category: "Stylistic Issues",
recommended: false,
url:
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-sync.md",
},
fixable: null,
schema: [
{
type: "object",
properties: {
allowAtRootLevel: {
type: "boolean",
default: false,
},
},
additionalProperties: false,
},
],
messages: {
noSync: "Unexpected sync method: '{{propertyName}}'.",
},
},
create(context) {
const selector =
context.options[0] && context.options[0].allowAtRootLevel
? ":function MemberExpression[property.name=/.*Sync$/]"
: "MemberExpression[property.name=/.*Sync$/]"
return {
[selector](node) {
context.report({
node,
messageId: "noSync",
data: {
propertyName: node.property.name,
},
})
},
}
},
}
@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var docGlossrefRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author', 'contents'],
prohibitedProps: [],
props: {
'aria-errormessage': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'glossref [EPUB-SSV]'
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'widget', 'command', 'link']]
};
var _default = exports.default = docGlossrefRole;
@@ -0,0 +1,360 @@
const assert = require("assert")
const path = require("path")
const fs = require("fs")
let glob = undefined
try {
glob = require("glob")
} catch (_err) {
// treat glob as optional.
}
const defaultGlobOpts = {
nosort: true,
silent: true
}
// for EMFILE handling
let timeout = 0
const isWindows = (process.platform === "win32")
const defaults = options => {
const methods = [
'unlink',
'chmod',
'stat',
'lstat',
'rmdir',
'readdir'
]
methods.forEach(m => {
options[m] = options[m] || fs[m]
m = m + 'Sync'
options[m] = options[m] || fs[m]
})
options.maxBusyTries = options.maxBusyTries || 3
options.emfileWait = options.emfileWait || 1000
if (options.glob === false) {
options.disableGlob = true
}
if (options.disableGlob !== true && glob === undefined) {
throw Error('glob dependency not found, set `options.disableGlob = true` if intentional')
}
options.disableGlob = options.disableGlob || false
options.glob = options.glob || defaultGlobOpts
}
const rimraf = (p, options, cb) => {
if (typeof options === 'function') {
cb = options
options = {}
}
assert(p, 'rimraf: missing path')
assert.equal(typeof p, 'string', 'rimraf: path should be a string')
assert.equal(typeof cb, 'function', 'rimraf: callback function required')
assert(options, 'rimraf: invalid options argument provided')
assert.equal(typeof options, 'object', 'rimraf: options should be object')
defaults(options)
let busyTries = 0
let errState = null
let n = 0
const next = (er) => {
errState = errState || er
if (--n === 0)
cb(errState)
}
const afterGlob = (er, results) => {
if (er)
return cb(er)
n = results.length
if (n === 0)
return cb()
results.forEach(p => {
const CB = (er) => {
if (er) {
if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") &&
busyTries < options.maxBusyTries) {
busyTries ++
// try again, with the same exact callback as this one.
return setTimeout(() => rimraf_(p, options, CB), busyTries * 100)
}
// this one won't happen if graceful-fs is used.
if (er.code === "EMFILE" && timeout < options.emfileWait) {
return setTimeout(() => rimraf_(p, options, CB), timeout ++)
}
// already gone
if (er.code === "ENOENT") er = null
}
timeout = 0
next(er)
}
rimraf_(p, options, CB)
})
}
if (options.disableGlob || !glob.hasMagic(p))
return afterGlob(null, [p])
options.lstat(p, (er, stat) => {
if (!er)
return afterGlob(null, [p])
glob(p, options.glob, afterGlob)
})
}
// Two possible strategies.
// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
//
// Both result in an extra syscall when you guess wrong. However, there
// are likely far more normal files in the world than directories. This
// is based on the assumption that a the average number of files per
// directory is >= 1.
//
// If anyone ever complains about this, then I guess the strategy could
// be made configurable somehow. But until then, YAGNI.
const rimraf_ = (p, options, cb) => {
assert(p)
assert(options)
assert(typeof cb === 'function')
// sunos lets the root user unlink directories, which is... weird.
// so we have to lstat here and make sure it's not a dir.
options.lstat(p, (er, st) => {
if (er && er.code === "ENOENT")
return cb(null)
// Windows can EPERM on stat. Life is suffering.
if (er && er.code === "EPERM" && isWindows)
fixWinEPERM(p, options, er, cb)
if (st && st.isDirectory())
return rmdir(p, options, er, cb)
options.unlink(p, er => {
if (er) {
if (er.code === "ENOENT")
return cb(null)
if (er.code === "EPERM")
return (isWindows)
? fixWinEPERM(p, options, er, cb)
: rmdir(p, options, er, cb)
if (er.code === "EISDIR")
return rmdir(p, options, er, cb)
}
return cb(er)
})
})
}
const fixWinEPERM = (p, options, er, cb) => {
assert(p)
assert(options)
assert(typeof cb === 'function')
options.chmod(p, 0o666, er2 => {
if (er2)
cb(er2.code === "ENOENT" ? null : er)
else
options.stat(p, (er3, stats) => {
if (er3)
cb(er3.code === "ENOENT" ? null : er)
else if (stats.isDirectory())
rmdir(p, options, er, cb)
else
options.unlink(p, cb)
})
})
}
const fixWinEPERMSync = (p, options, er) => {
assert(p)
assert(options)
try {
options.chmodSync(p, 0o666)
} catch (er2) {
if (er2.code === "ENOENT")
return
else
throw er
}
let stats
try {
stats = options.statSync(p)
} catch (er3) {
if (er3.code === "ENOENT")
return
else
throw er
}
if (stats.isDirectory())
rmdirSync(p, options, er)
else
options.unlinkSync(p)
}
const rmdir = (p, options, originalEr, cb) => {
assert(p)
assert(options)
assert(typeof cb === 'function')
// try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
// if we guessed wrong, and it's not a directory, then
// raise the original error.
options.rmdir(p, er => {
if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
rmkids(p, options, cb)
else if (er && er.code === "ENOTDIR")
cb(originalEr)
else
cb(er)
})
}
const rmkids = (p, options, cb) => {
assert(p)
assert(options)
assert(typeof cb === 'function')
options.readdir(p, (er, files) => {
if (er)
return cb(er)
let n = files.length
if (n === 0)
return options.rmdir(p, cb)
let errState
files.forEach(f => {
rimraf(path.join(p, f), options, er => {
if (errState)
return
if (er)
return cb(errState = er)
if (--n === 0)
options.rmdir(p, cb)
})
})
})
}
// this looks simpler, and is strictly *faster*, but will
// tie up the JavaScript thread and fail on excessively
// deep directory trees.
const rimrafSync = (p, options) => {
options = options || {}
defaults(options)
assert(p, 'rimraf: missing path')
assert.equal(typeof p, 'string', 'rimraf: path should be a string')
assert(options, 'rimraf: missing options')
assert.equal(typeof options, 'object', 'rimraf: options should be object')
let results
if (options.disableGlob || !glob.hasMagic(p)) {
results = [p]
} else {
try {
options.lstatSync(p)
results = [p]
} catch (er) {
results = glob.sync(p, options.glob)
}
}
if (!results.length)
return
for (let i = 0; i < results.length; i++) {
const p = results[i]
let st
try {
st = options.lstatSync(p)
} catch (er) {
if (er.code === "ENOENT")
return
// Windows can EPERM on stat. Life is suffering.
if (er.code === "EPERM" && isWindows)
fixWinEPERMSync(p, options, er)
}
try {
// sunos lets the root user unlink directories, which is... weird.
if (st && st.isDirectory())
rmdirSync(p, options, null)
else
options.unlinkSync(p)
} catch (er) {
if (er.code === "ENOENT")
return
if (er.code === "EPERM")
return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
if (er.code !== "EISDIR")
throw er
rmdirSync(p, options, er)
}
}
}
const rmdirSync = (p, options, originalEr) => {
assert(p)
assert(options)
try {
options.rmdirSync(p)
} catch (er) {
if (er.code === "ENOENT")
return
if (er.code === "ENOTDIR")
throw originalEr
if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
rmkidsSync(p, options)
}
}
const rmkidsSync = (p, options) => {
assert(p)
assert(options)
options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
// We only end up here once we got ENOTEMPTY at least once, and
// at this point, we are guaranteed to have removed all the kids.
// So, we know that it won't be ENOENT or ENOTDIR or anything else.
// try really hard to delete stuff on windows, because it has a
// PROFOUNDLY annoying habit of not closing handles promptly when
// files are deleted, resulting in spurious ENOTEMPTY errors.
const retries = isWindows ? 100 : 1
let i = 0
do {
let threw = true
try {
const ret = options.rmdirSync(p, options)
threw = false
return ret
} finally {
if (++i < retries && threw)
continue
}
} while (true)
}
module.exports = rimraf
rimraf.sync = rimrafSync
@@ -0,0 +1,58 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce scope prop is only used on <th> elements.
* @author Ethan Cohen
*/
// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
var errorMessage = 'The scope prop can only be used on <th> elements.';
var schema = (0, _schemas.generateObjSchema)();
var _default = exports["default"] = {
meta: {
docs: {
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md',
description: 'Enforce `scope` prop is only used on `<th>` elements.'
},
schema: [schema]
},
create: function create(context) {
var elementType = (0, _getElementType["default"])(context);
return {
JSXAttribute: function JSXAttribute(node) {
var name = (0, _jsxAstUtils.propName)(node);
if (name && name.toUpperCase() !== 'SCOPE') {
return;
}
var parent = node.parent;
var tagName = elementType(parent);
// Do not test higher level JSX components, as we do not know what
// low-level DOM element this maps to.
if (!_ariaQuery.dom.has(tagName)) {
return;
}
if (tagName && tagName.toUpperCase() === 'TH') {
return;
}
context.report({
node,
message: errorMessage
});
}
};
}
};
module.exports = exports.default;
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=SnapshotManager.spec.d.ts.map
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,kBAAkB,CAAC,OAAS,CAAC,eAAe,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;IAC5E,qBAAqB,CAAC,oEAAkD,CAAC;IACzE,UAAU,CAAC,OAAO,CAAC;IACnB,eAAe,CAAC,8BAA8B,CAAC;IAC/C,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,yCAAgC,CAAC;YAAE,KAAK,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,mBAAmB,CAAC;YAAE,OAAO,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,0BAAuB,CAAC;QAAA,GAAG,CAAC,CAAC;IAC5P,gBAAgB,CAAC,OAAS,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;AACtD","sources":["packages/@react-aria/grid/intl/pl-PL.json"],"sourcesContent":["{\n \"deselectedItem\": \"Nie zaznaczono {item}.\",\n \"longPressToSelect\": \"Naciśnij i przytrzymaj, aby wejść do trybu wyboru.\",\n \"select\": \"Zaznacz\",\n \"selectedAll\": \"Wszystkie zaznaczone elementy.\",\n \"selectedCount\": \"{count, plural, =0 {Nie zaznaczono żadnych elementów} one {# zaznaczony element} other {# zaznaczonych elementów}}.\",\n \"selectedItem\": \"Zaznaczono {item}.\"\n}\n"],"names":[],"version":3,"file":"pl-PL.module.js.map"}
@@ -0,0 +1,57 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
test("function parsing", () => {
const schema = z.union([z.string().refine(() => false), z.number().refine(() => false)]);
const result = schema.safeParse("asdf");
expect(result.success).toEqual(false);
});
test("union 2", () => {
const result = z.union([z.number(), z.string().refine(() => false)]).safeParse("a");
expect(result.success).toEqual(false);
});
test("return valid over invalid", () => {
const schema = z.union([
z.object({
email: z.string().email(),
}),
z.string(),
]);
expect(schema.parse("asdf")).toEqual("asdf");
expect(schema.parse({ email: "asdlkjf@lkajsdf.com" })).toEqual({
email: "asdlkjf@lkajsdf.com",
});
});
test("return dirty result over aborted", () => {
const result = z.union([z.number(), z.string().refine(() => false)]).safeParse("a");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues).toEqual([
{
code: "custom",
message: "Invalid input",
path: [],
},
]);
}
});
test("options getter", async () => {
const union = z.union([z.string(), z.number()]);
union.options[0].parse("asdf");
union.options[1].parse(1234);
await union.options[0].parseAsync("asdf");
await union.options[1].parseAsync(1234);
});
test("readonly union", async () => {
const options = [z.string(), z.number()] as const;
const union = z.union(options);
union.parse("asdf");
union.parse(12);
});
@@ -0,0 +1,17 @@
import {IncomingMessage} from 'http';
/**
Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
Makes `toStream` include the properties from `fromStream`.
@param fromStream - The stream to copy the properties from.
@param toStream - The stream to copy the properties to.
@return The same object as `toStream`.
*/
declare function mimicResponse<T extends NodeJS.ReadableStream>(
fromStream: IncomingMessage, // eslint-disable-line @typescript-eslint/prefer-readonly-parameter-types
toStream: T,
): T & IncomingMessage;
export = mimicResponse;
@@ -0,0 +1,259 @@
# minimatch
A minimal matching utility.
[![Build Status](https://travis-ci.org/isaacs/minimatch.svg?branch=master)](http://travis-ci.org/isaacs/minimatch)
This is the matching library used internally by npm.
It works by converting glob expressions into JavaScript `RegExp`
objects.
## Usage
```javascript
var minimatch = require("minimatch")
minimatch("bar.foo", "*.foo") // true!
minimatch("bar.foo", "*.bar") // false!
minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
```
## Features
Supports these glob features:
* Brace Expansion
* Extended glob matching
* "Globstar" `**` matching
See:
* `man sh`
* `man bash`
* `man 3 fnmatch`
* `man 5 gitignore`
## Windows
**Please only use forward-slashes in glob expressions.**
Though windows uses either `/` or `\` as its path separator, only `/`
characters are used by this glob implementation. You must use
forward-slashes **only** in glob expressions. Back-slashes in patterns
will always be interpreted as escape characters, not path separators.
Note that `\` or `/` _will_ be interpreted as path separators in paths on
Windows, and will match against `/` in glob expressions.
So just always use `/` in patterns.
## Minimatch Class
Create a minimatch object by instantiating the `minimatch.Minimatch` class.
```javascript
var Minimatch = require("minimatch").Minimatch
var mm = new Minimatch(pattern, options)
```
### Properties
* `pattern` The original pattern the minimatch object represents.
* `options` The options supplied to the constructor.
* `set` A 2-dimensional array of regexp or string expressions.
Each row in the
array corresponds to a brace-expanded pattern. Each item in the row
corresponds to a single path-part. For example, the pattern
`{a,b/c}/d` would expand to a set of patterns like:
[ [ a, d ]
, [ b, c, d ] ]
If a portion of the pattern doesn't have any "magic" in it
(that is, it's something like `"foo"` rather than `fo*o?`), then it
will be left as a string rather than converted to a regular
expression.
* `regexp` Created by the `makeRe` method. A single regular expression
expressing the entire pattern. This is useful in cases where you wish
to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
* `negate` True if the pattern is negated.
* `comment` True if the pattern is a comment.
* `empty` True if the pattern is `""`.
### Methods
* `makeRe` Generate the `regexp` member if necessary, and return it.
Will return `false` if the pattern is invalid.
* `match(fname)` Return true if the filename matches the pattern, or
false otherwise.
* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
filename, and match it against a single row in the `regExpSet`. This
method is mainly for internal use, but is exposed so that it can be
used by a glob-walker that needs to avoid excessive filesystem calls.
All other methods are internal, and will be called as necessary.
### minimatch(path, pattern, options)
Main export. Tests a path against the pattern using the options.
```javascript
var isJS = minimatch(file, "*.js", { matchBase: true })
```
### minimatch.filter(pattern, options)
Returns a function that tests its
supplied argument, suitable for use with `Array.filter`. Example:
```javascript
var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
```
### minimatch.match(list, pattern, options)
Match against the list of
files, in the style of fnmatch or glob. If nothing is matched, and
options.nonull is set, then return a list containing the pattern itself.
```javascript
var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})
```
### minimatch.makeRe(pattern, options)
Make a regular expression object from the pattern.
## Options
All options are `false` by default.
### debug
Dump a ton of stuff to stderr.
### nobrace
Do not expand `{a,b}` and `{1..3}` brace sets.
### noglobstar
Disable `**` matching against multiple folder names.
### dot
Allow patterns to match filenames starting with a period, even if
the pattern does not explicitly have a period in that spot.
Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
is set.
### noext
Disable "extglob" style patterns like `+(a|b)`.
### nocase
Perform a case-insensitive match.
### nonull
When a match is not found by `minimatch.match`, return a list containing
the pattern itself if this option is set. When not set, an empty list
is returned if there are no matches.
### matchBase
If set, then patterns without slashes will be matched
against the basename of the path if it contains slashes. For example,
`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
### nocomment
Suppress the behavior of treating `#` at the start of a pattern as a
comment.
### nonegate
Suppress the behavior of treating a leading `!` character as negation.
### flipNegate
Returns from negate expressions the same as if they were not negated.
(Ie, true on a hit, false on a miss.)
### partial
Compare a partial path to a pattern. As long as the parts of the path that
are present are not contradicted by the pattern, it will be treated as a
match. This is useful in applications where you're walking through a
folder structure, and don't yet have the full path, but want to ensure that
you do not walk down paths that can never be a match.
For example,
```js
minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d
minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d
minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a
```
### windowsPathsNoEscape
Use `\\` as a path separator _only_, and _never_ as an escape
character. If set, all `\\` characters are replaced with `/` in
the pattern. Note that this makes it **impossible** to match
against paths containing literal glob pattern characters, but
allows matching with patterns constructed using `path.join()` and
`path.resolve()` on Windows platforms, mimicking the (buggy!)
behavior of earlier versions on Windows. Please use with
caution, and be mindful of [the caveat about Windows
paths](#windows).
For legacy reasons, this is also set if
`options.allowWindowsEscape` is set to the exact value `false`.
## Comparisons to other fnmatch/glob implementations
While strict compliance with the existing standards is a worthwhile
goal, some discrepancies exist between minimatch and other
implementations, and are intentional.
If the pattern starts with a `!` character, then it is negated. Set the
`nonegate` flag to suppress this behavior, and treat leading `!`
characters normally. This is perhaps relevant if you wish to start the
pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
characters at the start of a pattern will negate the pattern multiple
times.
If a pattern starts with `#`, then it is treated as a comment, and
will not match anything. Use `\#` to match a literal `#` at the
start of a line, or set the `nocomment` flag to suppress this behavior.
The double-star character `**` is supported by default, unless the
`noglobstar` flag is set. This is supported in the manner of bsdglob
and bash 4.1, where `**` only has special significance if it is the only
thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
`a/**b` will not.
If an escaped pattern has no matches, and the `nonull` flag is set,
then minimatch.match returns the pattern as-provided, rather than
interpreting the character escapes. For example,
`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
`"*a?"`. This is akin to setting the `nullglob` option in bash, except
that it does not resolve escaped pattern characters.
If brace expansion is not disabled, then it is performed before any
other interpretation of the glob pattern. Thus, a pattern like
`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
checked for validity. Since those two are valid, matching proceeds.
Note that `fnmatch(3)` in libc is an extremely naive string comparison
matcher, which does not do anything special for slashes. This library is
designed to be used in glob searching and file walkers, and so it does do
special things with `/`. Thus, `foo*` will not match `foo/bar` in this
library, even though it would in `fnmatch(3)`.
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from '../types.mjs';
import 'react';
declare const SendFilledIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { SendFilledIcon };
@@ -0,0 +1,564 @@
import * as tailwind_variants from 'tailwind-variants';
import { VariantProps } from 'tailwind-variants';
import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
/**
* Spinner wrapper **Tailwind Variants** component
*
* const {base, circle1, circle2, label } = spinner({...})
*
* @example
* <div className={base())}>
* <i className={circle1()}/>
* <i className={circle2()}/>
* <span className={label()}/>
* </div>
*/
declare const spinner: tailwind_variants.TVReturnType<{
size: {
sm: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
md: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
lg: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
};
color: {
current: {
circle1: string;
circle2: string;
};
white: {
circle1: string;
circle2: string;
};
default: {
circle1: string;
circle2: string;
};
primary: {
circle1: string;
circle2: string;
};
secondary: {
circle1: string;
circle2: string;
};
success: {
circle1: string;
circle2: string;
};
warning: {
circle1: string;
circle2: string;
};
danger: {
circle1: string;
circle2: string;
};
};
labelColor: {
foreground: {
label: string;
};
primary: {
label: string;
};
secondary: {
label: string;
};
success: {
label: string;
};
warning: {
label: string;
};
danger: {
label: string;
};
};
}, {
base: string;
wrapper: string;
circle1: string[];
circle2: string[];
label: string;
}, undefined, tailwind_variants_dist_config.TVConfig<{
size: {
sm: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
md: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
lg: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
};
color: {
current: {
circle1: string;
circle2: string;
};
white: {
circle1: string;
circle2: string;
};
default: {
circle1: string;
circle2: string;
};
primary: {
circle1: string;
circle2: string;
};
secondary: {
circle1: string;
circle2: string;
};
success: {
circle1: string;
circle2: string;
};
warning: {
circle1: string;
circle2: string;
};
danger: {
circle1: string;
circle2: string;
};
};
labelColor: {
foreground: {
label: string;
};
primary: {
label: string;
};
secondary: {
label: string;
};
success: {
label: string;
};
warning: {
label: string;
};
danger: {
label: string;
};
};
}, {
size: {
sm: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
md: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
lg: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
};
color: {
current: {
circle1: string;
circle2: string;
};
white: {
circle1: string;
circle2: string;
};
default: {
circle1: string;
circle2: string;
};
primary: {
circle1: string;
circle2: string;
};
secondary: {
circle1: string;
circle2: string;
};
success: {
circle1: string;
circle2: string;
};
warning: {
circle1: string;
circle2: string;
};
danger: {
circle1: string;
circle2: string;
};
};
labelColor: {
foreground: {
label: string;
};
primary: {
label: string;
};
secondary: {
label: string;
};
success: {
label: string;
};
warning: {
label: string;
};
danger: {
label: string;
};
};
}>, {
size: {
sm: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
md: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
lg: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
};
color: {
current: {
circle1: string;
circle2: string;
};
white: {
circle1: string;
circle2: string;
};
default: {
circle1: string;
circle2: string;
};
primary: {
circle1: string;
circle2: string;
};
secondary: {
circle1: string;
circle2: string;
};
success: {
circle1: string;
circle2: string;
};
warning: {
circle1: string;
circle2: string;
};
danger: {
circle1: string;
circle2: string;
};
};
labelColor: {
foreground: {
label: string;
};
primary: {
label: string;
};
secondary: {
label: string;
};
success: {
label: string;
};
warning: {
label: string;
};
danger: {
label: string;
};
};
}, {
base: string;
wrapper: string;
circle1: string[];
circle2: string[];
label: string;
}, tailwind_variants.TVReturnType<{
size: {
sm: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
md: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
lg: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
};
color: {
current: {
circle1: string;
circle2: string;
};
white: {
circle1: string;
circle2: string;
};
default: {
circle1: string;
circle2: string;
};
primary: {
circle1: string;
circle2: string;
};
secondary: {
circle1: string;
circle2: string;
};
success: {
circle1: string;
circle2: string;
};
warning: {
circle1: string;
circle2: string;
};
danger: {
circle1: string;
circle2: string;
};
};
labelColor: {
foreground: {
label: string;
};
primary: {
label: string;
};
secondary: {
label: string;
};
success: {
label: string;
};
warning: {
label: string;
};
danger: {
label: string;
};
};
}, {
base: string;
wrapper: string;
circle1: string[];
circle2: string[];
label: string;
}, undefined, tailwind_variants_dist_config.TVConfig<{
size: {
sm: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
md: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
lg: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
};
color: {
current: {
circle1: string;
circle2: string;
};
white: {
circle1: string;
circle2: string;
};
default: {
circle1: string;
circle2: string;
};
primary: {
circle1: string;
circle2: string;
};
secondary: {
circle1: string;
circle2: string;
};
success: {
circle1: string;
circle2: string;
};
warning: {
circle1: string;
circle2: string;
};
danger: {
circle1: string;
circle2: string;
};
};
labelColor: {
foreground: {
label: string;
};
primary: {
label: string;
};
secondary: {
label: string;
};
success: {
label: string;
};
warning: {
label: string;
};
danger: {
label: string;
};
};
}, {
size: {
sm: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
md: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
lg: {
wrapper: string;
circle1: string;
circle2: string;
label: string;
};
};
color: {
current: {
circle1: string;
circle2: string;
};
white: {
circle1: string;
circle2: string;
};
default: {
circle1: string;
circle2: string;
};
primary: {
circle1: string;
circle2: string;
};
secondary: {
circle1: string;
circle2: string;
};
success: {
circle1: string;
circle2: string;
};
warning: {
circle1: string;
circle2: string;
};
danger: {
circle1: string;
circle2: string;
};
};
labelColor: {
foreground: {
label: string;
};
primary: {
label: string;
};
secondary: {
label: string;
};
success: {
label: string;
};
warning: {
label: string;
};
danger: {
label: string;
};
};
}>, unknown, unknown, undefined>>;
type SpinnerVariantProps = VariantProps<typeof spinner>;
type SpinnerSlots = keyof ReturnType<typeof spinner>;
export { SpinnerSlots, SpinnerVariantProps, spinner };
@@ -0,0 +1 @@
module.exports={C:{"4":0.0045,"48":0.0045,"52":0.0135,"54":0.02699,"59":0.009,"78":0.0135,"109":0.0045,"113":0.0045,"115":0.16196,"127":0.0045,"128":0.018,"132":0.0045,"133":0.0045,"134":0.0045,"135":0.0135,"136":0.0225,"137":0.009,"138":0.018,"139":0.009,"140":0.06749,"141":0.0135,"142":0.04049,"143":0.9133,"144":0.79632,"145":0.0045,_:"2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 53 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 114 116 117 118 119 120 121 122 123 124 125 126 129 130 131 146 147 3.5 3.6"},D:{"38":0.0045,"39":0.0045,"40":0.0045,"41":0.0045,"42":0.0045,"43":0.0045,"44":0.0045,"45":0.0045,"46":0.0045,"47":0.0045,"48":0.0045,"49":0.018,"50":0.0045,"51":0.0045,"52":0.0045,"53":0.0045,"54":0.0045,"55":0.0045,"56":0.0045,"57":0.0045,"58":0.0045,"59":0.0045,"60":0.0045,"65":0.0045,"66":0.04499,"73":0.0045,"75":0.04049,"79":0.018,"80":0.0045,"83":0.0045,"87":0.02699,"88":0.0045,"91":0.0045,"96":0.0045,"97":0.0045,"99":0.0045,"100":0.0045,"102":0.0045,"103":0.04499,"104":0.0135,"105":0.0045,"106":0.0045,"107":0.0045,"108":0.0135,"109":0.93579,"110":0.0045,"111":0.009,"112":0.009,"113":0.0045,"114":0.0135,"115":0.0045,"116":0.09898,"117":0.0045,"118":0.009,"119":0.0135,"120":0.03149,"121":0.0135,"122":0.06749,"123":0.0225,"124":0.02699,"125":0.77833,"126":0.05849,"127":0.03599,"128":0.08548,"129":0.018,"130":0.05399,"131":0.09448,"132":0.05849,"133":0.07198,"134":0.06749,"135":0.08548,"136":0.11248,"137":0.19346,"138":0.38242,"139":0.67035,"140":7.75628,"141":15.13914,"142":0.13947,"143":0.0045,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 61 62 63 64 67 68 69 70 71 72 74 76 77 78 81 84 85 86 89 90 92 93 94 95 98 101 144 145"},F:{"91":0.0135,"92":0.03599,"95":0.0135,"114":0.0045,"119":0.0045,"120":0.16646,"121":0.22045,"122":1.46667,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 115 116 117 118 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"17":0.0045,"92":0.0045,"109":0.05849,"114":0.0045,"120":0.0045,"121":0.0045,"122":0.0225,"124":0.0045,"126":0.0045,"128":0.0045,"129":0.0045,"130":0.009,"131":0.009,"132":0.0045,"133":0.009,"134":0.018,"135":0.0135,"136":0.0135,"137":0.0135,"138":0.0225,"139":0.03149,"140":0.63436,"141":3.02783,"142":0.0045,_:"12 13 14 15 16 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 123 125 127"},E:{"13":0.0045,"14":0.009,"15":0.0045,_:"0 4 5 6 7 8 9 10 11 12 3.1 3.2 5.1 6.1 7.1 9.1 10.1 15.1 26.2","11.1":0.009,"12.1":0.0045,"13.1":0.03599,"14.1":0.0225,"15.2-15.3":0.0045,"15.4":0.0045,"15.5":0.009,"15.6":0.12147,"16.0":0.0045,"16.1":0.009,"16.2":0.0135,"16.3":0.0225,"16.4":0.009,"16.5":0.0135,"16.6":0.15747,"17.0":0.009,"17.1":0.10348,"17.2":0.0135,"17.3":0.018,"17.4":0.0225,"17.5":0.04949,"17.6":0.15297,"18.0":0.0225,"18.1":0.02699,"18.2":0.0135,"18.3":0.05849,"18.4":0.03599,"18.5-18.6":0.16646,"26.0":0.4589,"26.1":0.0135},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00123,"5.0-5.1":0,"6.0-6.1":0.00493,"7.0-7.1":0.0037,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01109,"10.0-10.2":0.00123,"10.3":0.02096,"11.0-11.2":0.31066,"11.3-11.4":0.0074,"12.0-12.1":0.00247,"12.2-12.5":0.06041,"13.0-13.1":0,"13.2":0.00616,"13.3":0.00247,"13.4-13.7":0.00986,"14.0-14.4":0.02096,"14.5-14.8":0.02219,"15.0-15.1":0.02096,"15.2-15.3":0.01603,"15.4":0.01849,"15.5":0.02096,"15.6-15.8":0.27368,"16.0":0.03698,"16.1":0.06904,"16.2":0.03575,"16.3":0.0641,"16.4":0.01603,"16.5":0.02835,"16.6-16.7":0.36613,"17.0":0.02589,"17.1":0.03945,"17.2":0.02835,"17.3":0.04191,"17.4":0.07397,"17.5":0.12698,"17.6-17.7":0.32052,"18.0":0.07273,"18.1":0.1504,"18.2":0.08136,"18.3":0.26135,"18.4":0.13437,"18.5-18.6":6.85176,"26.0":0.84692,"26.1":0.03082},P:{"4":0.0209,"21":0.0209,"22":0.01045,"23":0.0209,"24":0.0209,"25":0.0209,"26":0.05225,"27":0.07315,"28":2.07947,"29":0.15674,_:"20 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0","7.2-7.4":0.01045,"19.0":0.01045},I:{"0":0.02197,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.33006,_:"10 11 12 11.1 11.5 12.1"},A:{"8":0.00519,"11":0.06229,_:"6 7 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.39607},Q:{_:"14.9"},O:{"0":0.022},H:{"0":0},L:{"0":44.93319}};
@@ -0,0 +1 @@
{"version":3,"file":"uiNode.js","names":["ParentBlot","Module","Quill","isMac","test","navigator","platform","TTL_FOR_VALID_SELECTION_CHANGE","canMoveCaretBeforeUINode","event","key","ctrlKey","UINode","isListening","selectionChangeDeadline","constructor","quill","options","handleArrowKeys","handleNavigationShortcuts","keyboard","addBinding","offset","shiftKey","handler","range","_ref","line","uiNode","isRTL","getComputedStyle","domNode","setSelection","index","length","sources","USER","root","addEventListener","defaultPrevented","ensureListeningToSelectionChange","Date","now","listener","handleSelectionChange","document","once","selection","getSelection","getRangeAt","collapsed","startOffset","scroll","find","startContainer","newRange","createRange","setStartAfter","setEndAfter","removeAllRanges","addRange"],"sources":["../../src/modules/uiNode.ts"],"sourcesContent":["import { ParentBlot } from 'parchment';\nimport Module from '../core/module.js';\nimport Quill from '../core/quill.js';\n\nconst isMac = /Mac/i.test(navigator.platform);\n\n// Export for testing\nexport const TTL_FOR_VALID_SELECTION_CHANGE = 100;\n\n// A loose check to determine if the shortcut can move the caret before a UI node:\n// <ANY_PARENT>[CARET]<div class=\"ql-ui\"></div>[CONTENT]</ANY_PARENT>\nconst canMoveCaretBeforeUINode = (event: KeyboardEvent) => {\n if (\n event.key === 'ArrowLeft' ||\n event.key === 'ArrowRight' || // RTL scripts or moving from the end of the previous line\n event.key === 'ArrowUp' ||\n event.key === 'ArrowDown' ||\n event.key === 'Home'\n ) {\n return true;\n }\n\n if (isMac && event.key === 'a' && event.ctrlKey === true) {\n return true;\n }\n\n return false;\n};\n\nclass UINode extends Module {\n isListening = false;\n selectionChangeDeadline = 0;\n\n constructor(quill: Quill, options: Record<string, never>) {\n super(quill, options);\n\n this.handleArrowKeys();\n this.handleNavigationShortcuts();\n }\n\n private handleArrowKeys() {\n this.quill.keyboard.addBinding({\n key: ['ArrowLeft', 'ArrowRight'],\n offset: 0,\n shiftKey: null,\n handler(range, { line, event }) {\n if (!(line instanceof ParentBlot) || !line.uiNode) {\n return true;\n }\n\n const isRTL = getComputedStyle(line.domNode)['direction'] === 'rtl';\n if (\n (isRTL && event.key !== 'ArrowRight') ||\n (!isRTL && event.key !== 'ArrowLeft')\n ) {\n return true;\n }\n\n this.quill.setSelection(\n range.index - 1,\n range.length + (event.shiftKey ? 1 : 0),\n Quill.sources.USER,\n );\n return false;\n },\n });\n }\n\n private handleNavigationShortcuts() {\n this.quill.root.addEventListener('keydown', (event) => {\n if (!event.defaultPrevented && canMoveCaretBeforeUINode(event)) {\n this.ensureListeningToSelectionChange();\n }\n });\n }\n\n /**\n * We only listen to the `selectionchange` event when\n * there is an intention of moving the caret to the beginning using shortcuts.\n * This is primarily implemented to prevent infinite loops, as we are changing\n * the selection within the handler of a `selectionchange` event.\n */\n private ensureListeningToSelectionChange() {\n this.selectionChangeDeadline = Date.now() + TTL_FOR_VALID_SELECTION_CHANGE;\n\n if (this.isListening) return;\n this.isListening = true;\n\n const listener = () => {\n this.isListening = false;\n\n if (Date.now() <= this.selectionChangeDeadline) {\n this.handleSelectionChange();\n }\n };\n\n document.addEventListener('selectionchange', listener, {\n once: true,\n });\n }\n\n private handleSelectionChange() {\n const selection = document.getSelection();\n if (!selection) return;\n const range = selection.getRangeAt(0);\n if (range.collapsed !== true || range.startOffset !== 0) return;\n\n const line = this.quill.scroll.find(range.startContainer);\n if (!(line instanceof ParentBlot) || !line.uiNode) return;\n\n const newRange = document.createRange();\n newRange.setStartAfter(line.uiNode);\n newRange.setEndAfter(line.uiNode);\n selection.removeAllRanges();\n selection.addRange(newRange);\n }\n}\n\nexport default UINode;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,WAAW;AACtC,OAAOC,MAAM,MAAM,mBAAmB;AACtC,OAAOC,KAAK,MAAM,kBAAkB;AAEpC,MAAMC,KAAK,GAAG,MAAM,CAACC,IAAI,CAACC,SAAS,CAACC,QAAQ,CAAC;;AAE7C;AACA,OAAO,MAAMC,8BAA8B,GAAG,GAAG;;AAEjD;AACA;AACA,MAAMC,wBAAwB,GAAIC,KAAoB,IAAK;EACzD,IACEA,KAAK,CAACC,GAAG,KAAK,WAAW,IACzBD,KAAK,CAACC,GAAG,KAAK,YAAY;EAAI;EAC9BD,KAAK,CAACC,GAAG,KAAK,SAAS,IACvBD,KAAK,CAACC,GAAG,KAAK,WAAW,IACzBD,KAAK,CAACC,GAAG,KAAK,MAAM,EACpB;IACA,OAAO,IAAI;EACb;EAEA,IAAIP,KAAK,IAAIM,KAAK,CAACC,GAAG,KAAK,GAAG,IAAID,KAAK,CAACE,OAAO,KAAK,IAAI,EAAE;IACxD,OAAO,IAAI;EACb;EAEA,OAAO,KAAK;AACd,CAAC;AAED,MAAMC,MAAM,SAASX,MAAM,CAAC;EAC1BY,WAAW,GAAG,KAAK;EACnBC,uBAAuB,GAAG,CAALine truncated
@@ -0,0 +1,9 @@
import { GeneralCallResult } from './common';
export interface NodeIKernelNodeMiscService {
writeVersionToRegistry(version: string): void;
getMiniAppPath(): unknown;
setMiniAppVersion(version: string): unknown;
wantWinScreenOCR(imagepath: string): Promise<GeneralCallResult>;
SendMiniAppMsg(arg1: string, arg2: string, arg3: string): unknown;
startNewMiniApp(appfile: string, params: string): unknown;
}
@@ -0,0 +1,8 @@
declare const _default: {
parser: string;
parserOptions: {
sourceType: "module";
};
plugins: string[];
};
export = _default;
@@ -0,0 +1,8 @@
import { ServiceReferenceManager } from './ServiceReferenceManager';
export declare class SnapshotManager {
#private;
constructor(serviceReferenceManager: ServiceReferenceManager);
restore(): void;
snapshot(): void;
}
//# sourceMappingURL=SnapshotManager.d.ts.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB 0C 1C","194":"rB sB tB uB vB wB xB yB zB 0B 1B 2B"},D:{"1":"0 1 2 3 4 5 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB","66":"uB vB wB xB yB zB 0B 1B 2B 3B UC"},E:{"1":"C L M G NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B 2C ZC 3C 4C 5C 6C aC"},F:{"1":"0 1 2 3 4 5 sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB FD GD HD ID NC uC JD OC","66":"hB iB jB kB lB mB nB oB pB qB rB"},G:{"1":"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 PD QD RD SD TD"},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","66":"oD pD qD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","194":"1D"}},B:5,C:"CSS font-display",D:true};
@@ -0,0 +1,157 @@
"use client";
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/tab.tsx
var tab_exports = {};
__export(tab_exports, {
default: () => tab_default
});
module.exports = __toCommonJS(tab_exports);
var import_system = require("@heroui/system");
var import_react_utils = require("@heroui/react-utils");
var import_shared_utils = require("@heroui/shared-utils");
var import_utils = require("@react-aria/utils");
var import_scroll_into_view_if_needed = __toESM(require("scroll-into-view-if-needed"));
var import_focus = require("@react-aria/focus");
var import_tabs = require("@react-aria/tabs");
var import_interactions = require("@react-aria/interactions");
var import_framer_motion = require("framer-motion");
var import_use_is_mounted = require("@heroui/use-is-mounted");
var import_jsx_runtime = require("react/jsx-runtime");
var Tab = (0, import_system.forwardRef)((props, ref) => {
var _a;
const {
className,
as,
item,
state,
classNames,
isDisabled: isDisabledProp,
listRef,
slots,
motionProps,
disableAnimation,
disableCursorAnimation,
shouldSelectOnPressUp,
onClick,
tabRef,
...otherProps
} = props;
const { key } = item;
const domRef = (0, import_react_utils.useDOMRef)(ref);
const Component = as || (props.href ? "a" : "button");
const shouldFilterDOMProps = typeof Component === "string";
const {
tabProps,
isSelected,
isDisabled: isDisabledItem,
isPressed
} = (0, import_tabs.useTab)({ key, isDisabled: isDisabledProp, shouldSelectOnPressUp }, state, domRef);
if (props.children == null) {
delete tabProps["aria-controls"];
}
const isDisabled = isDisabledProp || isDisabledItem;
const { focusProps, isFocused, isFocusVisible } = (0, import_focus.useFocusRing)();
const { hoverProps, isHovered } = (0, import_interactions.useHover)({
isDisabled
});
const tabStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.tab, className);
const [, isMounted] = (0, import_use_is_mounted.useIsMounted)({
rerender: true
});
const handleClick = () => {
(0, import_utils.chain)(onClick, tabProps.onClick);
if (!(domRef == null ? void 0 : domRef.current) || !(listRef == null ? void 0 : listRef.current))
return;
(0, import_scroll_into_view_if_needed.default)(domRef.current, {
scrollMode: "if-needed",
behavior: "smooth",
block: "end",
inline: "end",
boundary: listRef == null ? void 0 : listRef.current
});
};
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
Component,
{
ref: (0, import_react_utils.mergeRefs)(domRef, tabRef),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabledItem),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
"data-hover": (0, import_shared_utils.dataAttr)(isHovered),
"data-hover-unselected": (0, import_shared_utils.dataAttr)((isHovered || isPressed) && !isSelected),
"data-pressed": (0, import_shared_utils.dataAttr)(isPressed),
"data-selected": (0, import_shared_utils.dataAttr)(isSelected),
"data-slot": "tab",
...(0, import_utils.mergeProps)(
tabProps,
!isDisabled ? {
...focusProps,
...hoverProps
} : {},
(0, import_react_utils.filterDOMProps)(otherProps, {
enabled: shouldFilterDOMProps,
omitPropNames: /* @__PURE__ */ new Set(["title"])
}),
{ onClick: handleClick }
),
className: (_a = slots.tab) == null ? void 0 : _a.call(slots, { class: tabStyles }),
title: otherProps == null ? void 0 : otherProps.titleValue,
type: Component === "button" ? "button" : void 0,
children: [
isSelected && !disableAnimation && !disableCursorAnimation && isMounted ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.LazyMotion, { features: import_framer_motion.domMax, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_framer_motion.m.span,
{
className: slots.cursor({ class: classNames == null ? void 0 : classNames.cursor }),
"data-slot": "cursor",
layoutDependency: false,
layoutId: "cursor",
transition: {
type: "spring",
bounce: 0.15,
duration: 0.5
},
...motionProps
}
) }) : null,
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"div",
{
className: slots.tabContent({
class: classNames == null ? void 0 : classNames.tabContent
}),
"data-slot": "tabContent",
children: item.rendered
}
)
]
}
);
});
Tab.displayName = "HeroUI.Tab";
var tab_default = Tab;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1,147 @@
/* eslint-disable node/no-deprecated-api */
'use strict'
const semver = require('semver')
const url = require('url')
const path = require('path')
const log = require('npmlog')
// versions where -headers.tar.gz started shipping
const headersTarballRange = '>= 3.0.0 || ~0.12.10 || ~0.10.42'
const bitsre = /\/win-(x86|x64|arm64)\//
const bitsreV3 = /\/win-(x86|ia32|x64)\// // io.js v3.x.x shipped with "ia32" but should
// have been "x86"
// Captures all the logic required to determine download URLs, local directory and
// file names. Inputs come from command-line switches (--target, --dist-url),
// `process.version` and `process.release` where it exists.
function processRelease (argv, gyp, defaultVersion, defaultRelease) {
var version = (semver.valid(argv[0]) && argv[0]) || gyp.opts.target || defaultVersion
var versionSemver = semver.parse(version)
var overrideDistUrl = gyp.opts['dist-url'] || gyp.opts.disturl
var isDefaultVersion
var isNamedForLegacyIojs
var name
var distBaseUrl
var baseUrl
var libUrl32
var libUrl64
var libUrlArm64
var tarballUrl
var canGetHeaders
if (!versionSemver) {
// not a valid semver string, nothing we can do
return { version: version }
}
// flatten version into String
version = versionSemver.version
// defaultVersion should come from process.version so ought to be valid semver
isDefaultVersion = version === semver.parse(defaultVersion).version
// can't use process.release if we're using --target=x.y.z
if (!isDefaultVersion) {
defaultRelease = null
}
if (defaultRelease) {
// v3 onward, has process.release
name = defaultRelease.name.replace(/io\.js/, 'iojs') // remove the '.' for directory naming purposes
} else {
// old node or alternative --target=
// semver.satisfies() doesn't like prerelease tags so test major directly
isNamedForLegacyIojs = versionSemver.major >= 1 && versionSemver.major < 4
// isNamedForLegacyIojs is required to support Electron < 4 (in particular Electron 3)
// as previously this logic was used to ensure "iojs" was used to download iojs releases
// and "node" for node releases. Unfortunately the logic was broad enough that electron@3
// published release assets as "iojs" so that the node-gyp logic worked. Once Electron@3 has
// been EOL for a while (late 2019) we should remove this hack.
name = isNamedForLegacyIojs ? 'iojs' : 'node'
}
// check for the nvm.sh standard mirror env variables
if (!overrideDistUrl && process.env.NODEJS_ORG_MIRROR) {
overrideDistUrl = process.env.NODEJS_ORG_MIRROR
}
if (overrideDistUrl) {
log.verbose('download', 'using dist-url', overrideDistUrl)
}
if (overrideDistUrl) {
distBaseUrl = overrideDistUrl.replace(/\/+$/, '')
} else {
distBaseUrl = 'https://nodejs.org/dist'
}
distBaseUrl += '/v' + version + '/'
// new style, based on process.release so we have a lot of the data we need
if (defaultRelease && defaultRelease.headersUrl && !overrideDistUrl) {
baseUrl = url.resolve(defaultRelease.headersUrl, './')
libUrl32 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x86', versionSemver.major)
libUrl64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x64', versionSemver.major)
libUrlArm64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'arm64', versionSemver.major)
tarballUrl = defaultRelease.headersUrl
} else {
// older versions without process.release are captured here and we have to make
// a lot of assumptions, additionally if you --target=x.y.z then we can't use the
// current process.release
baseUrl = distBaseUrl
libUrl32 = resolveLibUrl(name, baseUrl, 'x86', versionSemver.major)
libUrl64 = resolveLibUrl(name, baseUrl, 'x64', versionSemver.major)
libUrlArm64 = resolveLibUrl(name, baseUrl, 'arm64', versionSemver.major)
// making the bold assumption that anything with a version number >3.0.0 will
// have a *-headers.tar.gz file in its dist location, even some frankenstein
// custom version
canGetHeaders = semver.satisfies(versionSemver, headersTarballRange)
tarballUrl = url.resolve(baseUrl, name + '-v' + version + (canGetHeaders ? '-headers' : '') + '.tar.gz')
}
return {
version: version,
semver: versionSemver,
name: name,
baseUrl: baseUrl,
tarballUrl: tarballUrl,
shasumsUrl: url.resolve(baseUrl, 'SHASUMS256.txt'),
versionDir: (name !== 'node' ? name + '-' : '') + version,
ia32: {
libUrl: libUrl32,
libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl32).path))
},
x64: {
libUrl: libUrl64,
libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl64).path))
},
arm64: {
libUrl: libUrlArm64,
libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrlArm64).path))
}
}
}
function normalizePath (p) {
return path.normalize(p).replace(/\\/g, '/')
}
function resolveLibUrl (name, defaultUrl, arch, versionMajor) {
var base = url.resolve(defaultUrl, './')
var hasLibUrl = bitsre.test(defaultUrl) || (versionMajor === 3 && bitsreV3.test(defaultUrl))
if (!hasLibUrl) {
// let's assume it's a baseUrl then
if (versionMajor >= 1) {
return url.resolve(base, 'win-' + arch + '/' + name + '.lib')
}
// prior to io.js@1.0.0 32-bit node.lib lives in /, 64-bit lives in /x64/
return url.resolve(base, (arch === 'x86' ? '' : arch + '/') + name + '.lib')
}
// else we have a proper url to a .lib, just make sure it's the right arch
return defaultUrl.replace(versionMajor === 3 ? bitsreV3 : bitsre, '/win-' + arch + '/')
}
module.exports = processRelease
@@ -0,0 +1,27 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_disposable = void 0;
const base_config_1 = require("./base-config");
const es2015_iterable_1 = require("./es2015.iterable");
const es2015_symbol_1 = require("./es2015.symbol");
const es2018_asynciterable_1 = require("./es2018.asynciterable");
exports.esnext_disposable = {
libs: [es2015_symbol_1.es2015_symbol, es2015_iterable_1.es2015_iterable, es2018_asynciterable_1.es2018_asynciterable],
variables: [
['SymbolConstructor', base_config_1.TYPE],
['Disposable', base_config_1.TYPE],
['AsyncDisposable', base_config_1.TYPE],
['SuppressedError', base_config_1.TYPE_VALUE],
['SuppressedErrorConstructor', base_config_1.TYPE],
['DisposableStack', base_config_1.TYPE_VALUE],
['DisposableStackConstructor', base_config_1.TYPE],
['AsyncDisposableStack', base_config_1.TYPE_VALUE],
['AsyncDisposableStackConstructor', base_config_1.TYPE],
['IteratorObject', base_config_1.TYPE],
['AsyncIteratorObject', base_config_1.TYPE],
],
};
@@ -0,0 +1,23 @@
export const id_ecPublicKey = "1.2.840.10045.2.1";
export const id_ecDH = "1.3.132.1.12";
export const id_ecMQV = "1.3.132.1.13";
export const id_ecdsaWithSHA1 = "1.2.840.10045.4.1";
export const id_ecdsaWithSHA224 = "1.2.840.10045.4.3.1";
export const id_ecdsaWithSHA256 = "1.2.840.10045.4.3.2";
export const id_ecdsaWithSHA384 = "1.2.840.10045.4.3.3";
export const id_ecdsaWithSHA512 = "1.2.840.10045.4.3.4";
export const id_secp192r1 = "1.2.840.10045.3.1.1";
export const id_sect163k1 = "1.3.132.0.1";
export const id_sect163r2 = "1.3.132.0.15";
export const id_secp224r1 = "1.3.132.0.33";
export const id_sect233k1 = "1.3.132.0.26";
export const id_sect233r1 = "1.3.132.0.27";
export const id_secp256r1 = "1.2.840.10045.3.1.7";
export const id_sect283k1 = "1.3.132.0.16";
export const id_sect283r1 = "1.3.132.0.17";
export const id_secp384r1 = "1.3.132.0.34";
export const id_sect409k1 = "1.3.132.0.36";
export const id_sect409r1 = "1.3.132.0.37";
export const id_secp521r1 = "1.3.132.0.35";
export const id_sect571k1 = "1.3.132.0.38";
export const id_sect571r1 = "1.3.132.0.39";
@@ -0,0 +1,672 @@
## JavaScript-accessible methods
A _template_ is a blueprint for JavaScript functions and objects in a context. You can use a template to wrap C++ functions and data structures within JavaScript objects so that they can be manipulated from JavaScript. See the V8 Embedders Guide section on [Templates](https://github.com/v8/v8/wiki/Embedder%27s-Guide#templates) for further information.
In order to expose functionality to JavaScript via a template, you must provide it to V8 in a form that it understands. Across the versions of V8 supported by NAN, JavaScript-accessible method signatures vary widely, NAN fully abstracts method declaration and provides you with an interface that is similar to the most recent V8 API but is backward-compatible with older versions that still use the now-deceased `v8::Argument` type.
* **Method argument types**
- <a href="#api_nan_function_callback_info"><b><code>Nan::FunctionCallbackInfo</code></b></a>
- <a href="#api_nan_property_callback_info"><b><code>Nan::PropertyCallbackInfo</code></b></a>
- <a href="#api_nan_return_value"><b><code>Nan::ReturnValue</code></b></a>
* **Method declarations**
- <a href="#api_nan_method"><b>Method declaration</b></a>
- <a href="#api_nan_getter"><b>Getter declaration</b></a>
- <a href="#api_nan_setter"><b>Setter declaration</b></a>
- <a href="#api_nan_property_getter"><b>Property getter declaration</b></a>
- <a href="#api_nan_property_setter"><b>Property setter declaration</b></a>
- <a href="#api_nan_property_enumerator"><b>Property enumerator declaration</b></a>
- <a href="#api_nan_property_deleter"><b>Property deleter declaration</b></a>
- <a href="#api_nan_property_query"><b>Property query declaration</b></a>
- <a href="#api_nan_index_getter"><b>Index getter declaration</b></a>
- <a href="#api_nan_index_setter"><b>Index setter declaration</b></a>
- <a href="#api_nan_index_enumerator"><b>Index enumerator declaration</b></a>
- <a href="#api_nan_index_deleter"><b>Index deleter declaration</b></a>
- <a href="#api_nan_index_query"><b>Index query declaration</b></a>
* Method and template helpers
- <a href="#api_nan_set_method"><b><code>Nan::SetMethod()</code></b></a>
- <a href="#api_nan_set_prototype_method"><b><code>Nan::SetPrototypeMethod()</code></b></a>
- <a href="#api_nan_set_accessor"><b><code>Nan::SetAccessor()</code></b></a>
- <a href="#api_nan_set_named_property_handler"><b><code>Nan::SetNamedPropertyHandler()</code></b></a>
- <a href="#api_nan_set_indexed_property_handler"><b><code>Nan::SetIndexedPropertyHandler()</code></b></a>
- <a href="#api_nan_set_template"><b><code>Nan::SetTemplate()</code></b></a>
- <a href="#api_nan_set_prototype_template"><b><code>Nan::SetPrototypeTemplate()</code></b></a>
- <a href="#api_nan_set_instance_template"><b><code>Nan::SetInstanceTemplate()</code></b></a>
- <a href="#api_nan_set_call_handler"><b><code>Nan::SetCallHandler()</code></b></a>
- <a href="#api_nan_set_call_as_function_handler"><b><code>Nan::SetCallAsFunctionHandler()</code></b></a>
<a name="api_nan_function_callback_info"></a>
### Nan::FunctionCallbackInfo
`Nan::FunctionCallbackInfo` should be used in place of [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/node-8.16/dd/d0d/classv8_1_1_function_callback_info.html), even with older versions of Node where `v8::FunctionCallbackInfo` does not exist.
Definition:
```c++
template<typename T> class FunctionCallbackInfo {
public:
ReturnValue<T> GetReturnValue() const;
v8::Local<v8::Function> Callee(); // NOTE: Not available in NodeJS >= 10.0.0
v8::Local<v8::Value> Data();
v8::Local<v8::Object> Holder();
bool IsConstructCall();
int Length() const;
v8::Local<v8::Value> operator[](int i) const;
v8::Local<v8::Object> This() const;
v8::Isolate *GetIsolate() const;
};
```
See the [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/node-8.16/dd/d0d/classv8_1_1_function_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from methods.
**Note:** `FunctionCallbackInfo::Callee` is removed in Node.js after `10.0.0` because it is was deprecated in V8. Consider using `info.Data()` to pass any information you need.
<a name="api_nan_property_callback_info"></a>
### Nan::PropertyCallbackInfo
`Nan::PropertyCallbackInfo` should be used in place of [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/node-8.16/d7/dc5/classv8_1_1_property_callback_info.html), even with older versions of Node where `v8::PropertyCallbackInfo` does not exist.
Definition:
```c++
template<typename T> class PropertyCallbackInfo : public PropertyCallbackInfoBase<T> {
public:
ReturnValue<T> GetReturnValue() const;
v8::Isolate* GetIsolate() const;
v8::Local<v8::Value> Data() const;
v8::Local<v8::Object> This() const;
v8::Local<v8::Object> Holder() const;
};
```
See the [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/node-8.16/d7/dc5/classv8_1_1_property_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from property accessor methods.
<a name="api_nan_return_value"></a>
### Nan::ReturnValue
`Nan::ReturnValue` is used in place of [`v8::ReturnValue`](https://v8docs.nodesource.com/node-8.16/da/da7/classv8_1_1_return_value.html) on both [`Nan::FunctionCallbackInfo`](#api_nan_function_callback_info) and [`Nan::PropertyCallbackInfo`](#api_nan_property_callback_info) as the return type of `GetReturnValue()`.
Example usage:
```c++
void EmptyArray(const Nan::FunctionCallbackInfo<v8::Value>& info) {
info.GetReturnValue().Set(Nan::New<v8::Array>());
}
```
Definition:
```c++
template<typename T> class ReturnValue {
public:
// Handle setters
template <typename S> void Set(const v8::Local<S> &handle);
template <typename S> void Set(const Nan::Global<S> &handle);
// Fast primitive setters
void Set(bool value);
void Set(double i);
void Set(int32_t i);
void Set(uint32_t i);
// Fast JS primitive setters
void SetNull();
void SetUndefined();
void SetEmptyString();
// Convenience getter for isolate
v8::Isolate *GetIsolate() const;
};
```
See the documentation on [`v8::ReturnValue`](https://v8docs.nodesource.com/node-8.16/da/da7/classv8_1_1_return_value.html) for further information on this.
<a name="api_nan_method"></a>
### Method declaration
JavaScript-accessible methods should be declared with the following signature to form a `Nan::FunctionCallback`:
```c++
typedef void(*FunctionCallback)(const FunctionCallbackInfo<v8::Value>&);
```
Example:
```c++
void MethodName(const Nan::FunctionCallbackInfo<v8::Value>& info) {
...
}
```
You do not need to declare a new `HandleScope` within a method as one is implicitly created for you.
**Example usage**
```c++
// .h:
class Foo : public Nan::ObjectWrap {
...
static void Bar(const Nan::FunctionCallbackInfo<v8::Value>& info);
static void Baz(const Nan::FunctionCallbackInfo<v8::Value>& info);
}
// .cc:
void Foo::Bar(const Nan::FunctionCallbackInfo<v8::Value>& info) {
...
}
void Foo::Baz(const Nan::FunctionCallbackInfo<v8::Value>& info) {
...
}
```
A helper macro `NAN_METHOD(methodname)` exists, compatible with NAN v1 method declarations.
**Example usage with `NAN_METHOD(methodname)`**
```c++
// .h:
class Foo : public Nan::ObjectWrap {
...
static NAN_METHOD(Bar);
static NAN_METHOD(Baz);
}
// .cc:
NAN_METHOD(Foo::Bar) {
...
}
NAN_METHOD(Foo::Baz) {
...
}
```
Use [`Nan::SetPrototypeMethod`](#api_nan_set_prototype_method) to attach a method to a JavaScript function prototype or [`Nan::SetMethod`](#api_nan_set_method) to attach a method directly on a JavaScript object.
<a name="api_nan_getter"></a>
### Getter declaration
JavaScript-accessible getters should be declared with the following signature to form a `Nan::GetterCallback`:
```c++
typedef void(*GetterCallback)(v8::Local<v8::String>,
const PropertyCallbackInfo<v8::Value>&);
```
Example:
```c++
void GetterName(v8::Local<v8::String> property,
const Nan::PropertyCallbackInfo<v8::Value>& info) {
...
}
```
You do not need to declare a new `HandleScope` within a getter as one is implicitly created for you.
A helper macro `NAN_GETTER(methodname)` exists, compatible with NAN v1 method declarations.
Also see the V8 Embedders Guide documentation on [Accessors](https://v8.dev/docs/embed#accessors).
<a name="api_nan_setter"></a>
### Setter declaration
JavaScript-accessible setters should be declared with the following signature to form a <b><code>Nan::SetterCallback</code></b>:
```c++
typedef void(*SetterCallback)(v8::Local<v8::String>,
v8::Local<v8::Value>,
const PropertyCallbackInfo<void>&);
```
Example:
```c++
void SetterName(v8::Local<v8::String> property,
v8::Local<v8::Value> value,
const Nan::PropertyCallbackInfo<void>& info) {
...
}
```
You do not need to declare a new `HandleScope` within a setter as one is implicitly created for you.
A helper macro `NAN_SETTER(methodname)` exists, compatible with NAN v1 method declarations.
Also see the V8 Embedders Guide documentation on [Accessors](https://v8.dev/docs/embed#accessors).
<a name="api_nan_property_getter"></a>
### Property getter declaration
JavaScript-accessible property getters should be declared with the following signature to form a <b><code>Nan::PropertyGetterCallback</code></b>:
```c++
typedef void(*PropertyGetterCallback)(v8::Local<v8::String>,
const PropertyCallbackInfo<v8::Value>&);
```
Example:
```c++
void PropertyGetterName(v8::Local<v8::String> property,
const Nan::PropertyCallbackInfo<v8::Value>& info) {
...
}
```
You do not need to declare a new `HandleScope` within a property getter as one is implicitly created for you.
A helper macro `NAN_PROPERTY_GETTER(methodname)` exists, compatible with NAN v1 method declarations.
Also see the V8 Embedders Guide documentation on named property [Interceptors](https://v8.dev/docs/embed#interceptors).
<a name="api_nan_property_setter"></a>
### Property setter declaration
JavaScript-accessible property setters should be declared with the following signature to form a <b><code>Nan::PropertySetterCallback</code></b>:
```c++
typedef void(*PropertySetterCallback)(v8::Local<v8::String>,
v8::Local<v8::Value>,
const PropertyCallbackInfo<v8::Value>&);
```
Example:
```c++
void PropertySetterName(v8::Local<v8::String> property,
v8::Local<v8::Value> value,
const Nan::PropertyCallbackInfo<v8::Value>& info);
```
You do not need to declare a new `HandleScope` within a property setter as one is implicitly created for you.
A helper macro `NAN_PROPERTY_SETTER(methodname)` exists, compatible with NAN v1 method declarations.
Also see the V8 Embedders Guide documentation on named property [Interceptors](https://v8.dev/docs/embed#interceptors).
<a name="api_nan_property_enumerator"></a>
### Property enumerator declaration
JavaScript-accessible property enumerators should be declared with the following signature to form a <b><code>Nan::PropertyEnumeratorCallback</code></b>:
```c++
typedef void(*PropertyEnumeratorCallback)(const PropertyCallbackInfo<v8::Array>&);
```
Example:
```c++
void PropertyEnumeratorName(const Nan::PropertyCallbackInfo<v8::Array>& info);
```
You do not need to declare a new `HandleScope` within a property enumerator as one is implicitly created for you.
A helper macro `NAN_PROPERTY_ENUMERATOR(methodname)` exists, compatible with NAN v1 method declarations.
Also see the V8 Embedders Guide documentation on named property [Interceptors](https://v8.dev/docs/embed#interceptors).
<a name="api_nan_property_deleter"></a>
### Property deleter declaration
JavaScript-accessible property deleters should be declared with the following signature to form a <b><code>Nan::PropertyDeleterCallback</code></b>:
```c++
typedef void(*PropertyDeleterCallback)(v8::Local<v8::String>,
const PropertyCallbackInfo<v8::Boolean>&);
```
Example:
```c++
void PropertyDeleterName(v8::Local<v8::String> property,
const Nan::PropertyCallbackInfo<v8::Boolean>& info);
```
You do not need to declare a new `HandleScope` within a property deleter as one is implicitly created for you.
A helper macro `NAN_PROPERTY_DELETER(methodname)` exists, compatible with NAN v1 method declarations.
Also see the V8 Embedders Guide documentation on named property [Interceptors](https://v8.dev/docs/embed#interceptors).
<a name="api_nan_property_query"></a>
### Property query declaration
JavaScript-accessible property query methods should be declared with the following signature to form a <b><code>Nan::PropertyQueryCallback</code></b>:
```c++
typedef void(*PropertyQueryCallback)(v8::Local<v8::String>,
const PropertyCallbackInfo<v8::Integer>&);
```
Example:
```c++
void PropertyQueryName(v8::Local<v8::String> property,
const Nan::PropertyCallbackInfo<v8::Integer>& info);
```
You do not need to declare a new `HandleScope` within a property query method as one is implicitly created for you.
A helper macro `NAN_PROPERTY_QUERY(methodname)` exists, compatible with NAN v1 method declarations.
Also see the V8 Embedders Guide documentation on named property [Interceptors](https://v8.dev/docs/embed#interceptors).
<a name="api_nan_index_getter"></a>
### Index getter declaration
JavaScript-accessible index getter methods should be declared with the following signature to form a <b><code>Nan::IndexGetterCallback</code></b>:
```c++
typedef void(*IndexGetterCallback)(uint32_t,
const PropertyCallbackInfo<v8::Value>&);
```
Example:
```c++
void IndexGetterName(uint32_t index, const PropertyCallbackInfo<v8::Value>& info);
```
You do not need to declare a new `HandleScope` within a index getter as one is implicitly created for you.
A helper macro `NAN_INDEX_GETTER(methodname)` exists, compatible with NAN v1 method declarations.
Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://v8.dev/docs/embed#interceptors).
<a name="api_nan_index_setter"></a>
### Index setter declaration
JavaScript-accessible index setter methods should be declared with the following signature to form a <b><code>Nan::IndexSetterCallback</code></b>:
```c++
typedef void(*IndexSetterCallback)(uint32_t,
v8::Local<v8::Value>,
const PropertyCallbackInfo<v8::Value>&);
```
Example:
```c++
void IndexSetterName(uint32_t index,
v8::Local<v8::Value> value,
const PropertyCallbackInfo<v8::Value>& info);
```
You do not need to declare a new `HandleScope` within a index setter as one is implicitly created for you.
A helper macro `NAN_INDEX_SETTER(methodname)` exists, compatible with NAN v1 method declarations.
Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://v8.dev/docs/embed#interceptors).
<a name="api_nan_index_enumerator"></a>
### Index enumerator declaration
JavaScript-accessible index enumerator methods should be declared with the following signature to form a <b><code>Nan::IndexEnumeratorCallback</code></b>:
```c++
typedef void(*IndexEnumeratorCallback)(const PropertyCallbackInfo<v8::Array>&);
```
Example:
```c++
void IndexEnumeratorName(const PropertyCallbackInfo<v8::Array>& info);
```
You do not need to declare a new `HandleScope` within a index enumerator as one is implicitly created for you.
A helper macro `NAN_INDEX_ENUMERATOR(methodname)` exists, compatible with NAN v1 method declarations.
Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://v8.dev/docs/embed#interceptors).
<a name="api_nan_index_deleter"></a>
### Index deleter declaration
JavaScript-accessible index deleter methods should be declared with the following signature to form a <b><code>Nan::IndexDeleterCallback</code></b>:
```c++
typedef void(*IndexDeleterCallback)(uint32_t,
const PropertyCallbackInfo<v8::Boolean>&);
```
Example:
```c++
void IndexDeleterName(uint32_t index, const PropertyCallbackInfo<v8::Boolean>& info);
```
You do not need to declare a new `HandleScope` within a index deleter as one is implicitly created for you.
A helper macro `NAN_INDEX_DELETER(methodname)` exists, compatible with NAN v1 method declarations.
Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://v8.dev/docs/embed#interceptors).
<a name="api_nan_index_query"></a>
### Index query declaration
JavaScript-accessible index query methods should be declared with the following signature to form a <b><code>Nan::IndexQueryCallback</code></b>:
```c++
typedef void(*IndexQueryCallback)(uint32_t,
const PropertyCallbackInfo<v8::Integer>&);
```
Example:
```c++
void IndexQueryName(uint32_t index, const PropertyCallbackInfo<v8::Integer>& info);
```
You do not need to declare a new `HandleScope` within a index query method as one is implicitly created for you.
A helper macro `NAN_INDEX_QUERY(methodname)` exists, compatible with NAN v1 method declarations.
Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://v8.dev/docs/embed#interceptors).
<a name="api_nan_set_method"></a>
### Nan::SetMethod()
Sets a method with a given name directly on a JavaScript object where the method has the `Nan::FunctionCallback` signature (see <a href="#api_nan_method">Method declaration</a>).
Signature:
```c++
void Nan::SetMethod(v8::Local<v8::Object> recv,
const char *name,
Nan::FunctionCallback callback,
v8::Local<v8::Value> data = v8::Local<v8::Value>())
void Nan::SetMethod(v8::Local<v8::Template> templ,
const char *name,
Nan::FunctionCallback callback,
v8::Local<v8::Value> data = v8::Local<v8::Value>())
```
<a name="api_nan_set_prototype_method"></a>
### Nan::SetPrototypeMethod()
Sets a method with a given name on a `FunctionTemplate`'s prototype where the method has the `Nan::FunctionCallback` signature (see <a href="#api_nan_method">Method declaration</a>).
Signature:
```c++
void Nan::SetPrototypeMethod(v8::Local<v8::FunctionTemplate> recv,
const char* name,
Nan::FunctionCallback callback,
v8::Local<v8::Value> data = v8::Local<v8::Value>())
```
<a name="api_nan_set_accessor"></a>
### Nan::SetAccessor()
Sets getters and setters for a property with a given name on an `ObjectTemplate` or a plain `Object`. Accepts getters with the `Nan::GetterCallback` signature (see <a href="#api_nan_getter">Getter declaration</a>) and setters with the `Nan::SetterCallback` signature (see <a href="#api_nan_setter">Setter declaration</a>).
Signature:
```c++
// The signature parameter was deprecated in Node 16 and subsequently removed
NAN_DEPRECATED void SetAccessor(v8::Local<v8::ObjectTemplate> tpl,
v8::Local<v8::String> name,
Nan::GetterCallback getter,
Nan::SetterCallback setter = 0,
v8::Local<v8::Value> data = v8::Local<v8::Value>(),
v8::AccessControl settings = v8::DEFAULT,
v8::PropertyAttribute attribute = v8::None,
imp::Sig signature = imp::Sig());
void SetAccessor(v8::Local<v8::ObjectTemplate> tpl,
v8::Local<v8::String> name,
Nan::GetterCallback getter,
Nan::SetterCallback setter = 0,
v8::Local<v8::Value> data = v8::Local<v8::Value>(),
v8::AccessControl settings = v8::DEFAULT,
v8::PropertyAttribute attribute = v8::None);
bool SetAccessor(v8::Local<v8::Object> obj,
v8::Local<v8::String> name,
Nan::GetterCallback getter,
Nan::SetterCallback setter = 0,
v8::Local<v8::Value> data = v8::Local<v8::Value>(),
v8::AccessControl settings = v8::DEFAULT,
v8::PropertyAttribute attribute = v8::None)
```
See the V8 [`ObjectTemplate#SetAccessor()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#aca0ed196f8a9adb1f68b1aadb6c9cd77) and [`Object#SetAccessor()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#ae91b3b56b357f285288c89fbddc46d1b) for further information about how to use `Nan::SetAccessor()`.
<a name="api_nan_set_named_property_handler"></a>
### Nan::SetNamedPropertyHandler()
Sets named property getters, setters, query, deleter and enumerator methods on an `ObjectTemplate`. Accepts:
* Property getters with the `Nan::PropertyGetterCallback` signature (see <a href="#api_nan_property_getter">Property getter declaration</a>)
* Property setters with the `Nan::PropertySetterCallback` signature (see <a href="#api_nan_property_setter">Property setter declaration</a>)
* Property query methods with the `Nan::PropertyQueryCallback` signature (see <a href="#api_nan_property_query">Property query declaration</a>)
* Property deleters with the `Nan::PropertyDeleterCallback` signature (see <a href="#api_nan_property_deleter">Property deleter declaration</a>)
* Property enumerators with the `Nan::PropertyEnumeratorCallback` signature (see <a href="#api_nan_property_enumerator">Property enumerator declaration</a>)
Signature:
```c++
void SetNamedPropertyHandler(v8::Local<v8::ObjectTemplate> tpl,
Nan::PropertyGetterCallback getter,
Nan::PropertySetterCallback setter = 0,
Nan::PropertyQueryCallback query = 0,
Nan::PropertyDeleterCallback deleter = 0,
Nan::PropertyEnumeratorCallback enumerator = 0,
v8::Local<v8::Value> data = v8::Local<v8::Value>())
```
See the V8 [`ObjectTemplate#SetNamedPropertyHandler()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#a33b3ebd7de641f6cc6414b7de01fc1c7) for further information about how to use `Nan::SetNamedPropertyHandler()`.
<a name="api_nan_set_indexed_property_handler"></a>
### Nan::SetIndexedPropertyHandler()
Sets indexed property getters, setters, query, deleter and enumerator methods on an `ObjectTemplate`. Accepts:
* Indexed property getters with the `Nan::IndexGetterCallback` signature (see <a href="#api_nan_index_getter">Index getter declaration</a>)
* Indexed property setters with the `Nan::IndexSetterCallback` signature (see <a href="#api_nan_index_setter">Index setter declaration</a>)
* Indexed property query methods with the `Nan::IndexQueryCallback` signature (see <a href="#api_nan_index_query">Index query declaration</a>)
* Indexed property deleters with the `Nan::IndexDeleterCallback` signature (see <a href="#api_nan_index_deleter">Index deleter declaration</a>)
* Indexed property enumerators with the `Nan::IndexEnumeratorCallback` signature (see <a href="#api_nan_index_enumerator">Index enumerator declaration</a>)
Signature:
```c++
void SetIndexedPropertyHandler(v8::Local<v8::ObjectTemplate> tpl,
Nan::IndexGetterCallback getter,
Nan::IndexSetterCallback setter = 0,
Nan::IndexQueryCallback query = 0,
Nan::IndexDeleterCallback deleter = 0,
Nan::IndexEnumeratorCallback enumerator = 0,
v8::Local<v8::Value> data = v8::Local<v8::Value>())
```
See the V8 [`ObjectTemplate#SetIndexedPropertyHandler()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#ac89f06d634add0e890452033f7d17ff1) for further information about how to use `Nan::SetIndexedPropertyHandler()`.
<a name="api_nan_set_template"></a>
### Nan::SetTemplate()
Adds properties on an `Object`'s or `Function`'s template.
Signature:
```c++
void Nan::SetTemplate(v8::Local<v8::Template> templ,
const char *name,
v8::Local<v8::Data> value);
void Nan::SetTemplate(v8::Local<v8::Template> templ,
v8::Local<v8::String> name,
v8::Local<v8::Data> value,
v8::PropertyAttribute attributes)
```
Calls the `Template`'s [`Set()`](https://v8docs.nodesource.com/node-8.16/db/df7/classv8_1_1_template.html#ae3fbaff137557aa6a0233bc7e52214ac).
<a name="api_nan_set_prototype_template"></a>
### Nan::SetPrototypeTemplate()
Adds properties on an `Object`'s or `Function`'s prototype template.
Signature:
```c++
void Nan::SetPrototypeTemplate(v8::Local<v8::FunctionTemplate> templ,
const char *name,
v8::Local<v8::Data> value);
void Nan::SetPrototypeTemplate(v8::Local<v8::FunctionTemplate> templ,
v8::Local<v8::String> name,
v8::Local<v8::Data> value,
v8::PropertyAttribute attributes)
```
Calls the `FunctionTemplate`'s _PrototypeTemplate's_ [`Set()`](https://v8docs.nodesource.com/node-8.16/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf).
<a name="api_nan_set_instance_template"></a>
### Nan::SetInstanceTemplate()
Use to add instance properties on `FunctionTemplate`'s.
Signature:
```c++
void Nan::SetInstanceTemplate(v8::Local<v8::FunctionTemplate> templ,
const char *name,
v8::Local<v8::Data> value);
void Nan::SetInstanceTemplate(v8::Local<v8::FunctionTemplate> templ,
v8::Local<v8::String> name,
v8::Local<v8::Data> value,
v8::PropertyAttribute attributes)
```
Calls the `FunctionTemplate`'s _InstanceTemplate's_ [`Set()`](https://v8docs.nodesource.com/node-8.16/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf).
<a name="api_nan_set_call_handler"></a>
### Nan::SetCallHandler()
Set the call-handler callback for a `v8::FunctionTemplate`.
This callback is called whenever the function created from this FunctionTemplate is called.
Signature:
```c++
void Nan::SetCallHandler(v8::Local<v8::FunctionTemplate> templ, Nan::FunctionCallback callback, v8::Local<v8::Value> data = v8::Local<v8::Value>())
```
Calls the `FunctionTemplate`'s [`SetCallHandler()`](https://v8docs.nodesource.com/node-8.16/d8/d83/classv8_1_1_function_template.html#ab7574b298db3c27fbc2ed465c08ea2f8).
<a name="api_nan_set_call_as_function_handler"></a>
### Nan::SetCallAsFunctionHandler()
Sets the callback to be used when calling instances created from the `v8::ObjectTemplate` as a function.
If no callback is set, instances behave like normal JavaScript objects that cannot be called as a function.
Signature:
```c++
void Nan::SetCallAsFunctionHandler(v8::Local<v8::ObjectTemplate> templ, Nan::FunctionCallback callback, v8::Local<v8::Value> data = v8::Local<v8::Value>())
```
Calls the `ObjectTemplate`'s [`SetCallAsFunctionHandler()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#a5e9612fc80bf6db8f2da199b9b0bd04e).
@@ -0,0 +1 @@
{"name":"figlet","version":"1.9.3","requiresBuild":false,"files":{"dist/figlet.cjs":{"checkedAt":1794532099365,"integrity":"sha512-PKDWgbzVmUZ91pJEcBRJfVcmu7Fxc2OV1gCZzLxDcJkhYyohsFpq/+MWET48mhWjXWxC+/KVd25zoCHi6yAmoQ==","mode":420,"size":36511},"dist/node-figlet.cjs":{"checkedAt":1794532099365,"integrity":"sha512-JQegMhpP3YgWxCsvY+Im9gTwClCWGKudIdtWkWfCKHlHo43B0e/XEMlsGtjYbFjLMB4Du0uZpUX7+eiMfpbnOg==","mode":420,"size":3307},"dist/types/cjs/figlet.d.cts":{"checkedAt":1794532099365,"integrity":"sha512-jipW64BkyQI7fPFIbY1o8ltdb4zxNnvsqXxqdosJ533fsc3TYe3gbj2vcZj/3N0qMhvMMfD6rcWtPzAqVrznCg==","mode":420,"size":3030},"dist/types/cjs/node-figlet.d.cts":{"checkedAt":1794532099365,"integrity":"sha512-W5fp/Ae6nG1Irx6V67QtbhyU5eHJYxWPbiC/0WqJks6oUTFy1uQnS1hqIOdyRHHsEaZeJS6EKAcOXwC7HhQURw==","mode":420,"size":3042},"fonts/1Row.flf":{"checkedAt":1794532099366,"integrity":"sha512-KLPpI6wqczzHCOHOwo2+TOkNiAvniRpvNK+Z0mshSVCVt4oi8rvX/cXJb0DXZj+1afvkHQwaSZp2hZ6ps8uQUg==","mode":420,"size":1514},"fonts/3-D.flf":{"checkedAt":1794532099366,"integrity":"sha512-myjkCLs3g/fd+47GJ5TJoc4yOb/AZ7o8XqdkgFvjt99GurgEq/X59kmeEXSW6xQQp/eFirGB71H01i829/75IQ==","mode":420,"size":8762},"fonts/3D Diagonal.flf":{"checkedAt":1794532099366,"integrity":"sha512-2tvyaJBp+fZpVZyJGOYXMo7yiJA5F/4M+VaiVWoL2GwdqEqChNDOdp7avWhf+blMZ7cGk+8ga0ZZh/byf6T3Ug==","mode":420,"size":25475},"fonts/3D-ASCII.flf":{"checkedAt":1794532099366,"integrity":"sha512-Pc5jp8Y04RqNkYD8lH32sQM2uWc5+OJVUv1yYu14Qgw+S70AjmaqC77QDWZoOC0YmTE9m+098UuQRWsaUS0Wgw==","mode":420,"size":13134},"fonts/3x5.flf":{"checkedAt":1794532099367,"integrity":"sha512-XnPyBkL4O7AmfyWvQvg/mVVnowwLAqpSRYTg6pe15O2A6FmpXmTNO5LgEBYjh4J8240Taw/dEbhW/rnhqoQHAg==","mode":420,"size":4566},"fonts/4Max.flf":{"checkedAt":1794532099367,"integrity":"sha512-c7p57X4w1Br1QGwb8/gofgOPc0fv7rQ2pniuiL3hvyM/eO+ThKL27UfH9rP3C4jZ1A0wQu/X3+GDDIQDk5MGYw==","mode":420,"size":4374},"fonts/5 Line Oblique.flf":{"checkedAt":1794532099367,"integrity":"sha512-aBxJrRyROQrtGN6B37NSLugDMyI8rpkggCPxI9jx0/tEJofcrU0EzaTpNQoEkApF67PH6papz/Gm2RDvuySuyQ==","mode":420,"size":8310},"fonts/Acrobatic.flf":{"checkedAt":1794532099367,"integrity":"sha512-570yZtuLJVFfPXH1dVsuPpGron5N02WmHjMWJuNZRoImo0Kkbwfq6rKpzFOh9ZQxz14AxxBaOuhGslp1wA4O0Q==","mode":420,"size":18316},"fonts/Alligator.flf":{"checkedAt":1794532099367,"integrity":"sha512-VmglTkwSbm1yEQnrJXb7YIIJZCmYT4rW/3JUyWSRWnvQKEDscoA5Zudw/QXF2VCqXkwswEPkeh82q7/oo3qZZw==","mode":420,"size":12024},"fonts/Alligator2.flf":{"checkedAt":1794532099368,"integrity":"sha512-GIQTjRmw580RMRZG7DEboAukByWikyi2wRkdGGEuT+oOT/3ly9LTwdt6zvvSYheG7xkdgr8QsXpQCY/3r8/G8Q==","mode":420,"size":9550},"fonts/Alpha.flf":{"checkedAt":1794532099368,"integrity":"sha512-e9fi5wmLo+G2flK70Ay77zzqlguzMZ3n3hCQggPQ6dT2/MhTdAgG5hQFB43NL8BlQi4huX2EJLbK3kAbJb2fsg==","mode":420,"size":36258},"fonts/Alphabet.flf":{"checkedAt":1794532099368,"integrity":"sha512-S5oP8usalRJDi5RZnBm7OnX6gj4uB5/qY5cRJE9dEHj/EBR5rYvla+odibzTTZD56/kKFq68eA4XPBJQSR9jAw==","mode":420,"size":6457},"fonts/AMC 3 Line.flf":{"checkedAt":1794532099368,"integrity":"sha512-5qPPGOgNZWOHXZ5TKdj44J2d7bacTJq2/Aw7wmDfgdv5xhdjbxPockgMkDv0f3BeBhBZt+w/9zolfh98Iu+Fzg==","mode":420,"size":3149},"fonts/AMC 3 Liv1.flf":{"checkedAt":1794532099368,"integrity":"sha512-EDtGX/TzUslsYSBTtXPrCIHeTycaB+N/0FSnPIrIdmj2lzxJ1Fqpx0N9afaqjnTbsCi6F5ubly+22tqxgOUe5Q==","mode":420,"size":4038},"fonts/AMC AAA01.flf":{"checkedAt":1794532099368,"integrity":"sha512-JVVeG3gw4agL2tEK9Yisn5KpI5cu23P2oB/RxXz4ve35chbW67vFuhnCovgPL04/TgCx+0sTT9oJhdtgE187Tg==","mode":420,"size":14156},"fonts/AMC Neko.flf":{"checkedAt":1794532099369,"integrity":"sha512-IU0ASvvmUSHjYTPMfLWJrqkzDti4eyuh6iaSBG0Dw03antAAQz0exhI6QtqSd0Z3/x1J0q6CUhA5PIQjEds7FQ==","mode":420,"size":12405},"fonts/AMC Razor.flf":{"checkedAt":1794532099369,"integrity":"sha512-8cb6FzW0JOkTdqWiCzHuTKsM+i/aknQLEP67SWZuNYRma0r6i4uKqpvLzH9phaiJlwuUaAscgORb9TAYwpLI1g==","mode":420,"size":8111},"fonts/AMC Razor2.flf":{"checkedAt":1794532099369,"integrity":"sha512-XGso3IQH9/6E5Ck36FPMtoeK4HdcdPdzZ6h2oPFJgAd568E5uArUkqF2ADfZCwoRQbiOpA1x5epnn8GYIUD2/g==","mode":420,"size":9333},"fonts/AMC Slash.flf":{"checkedAt":1794532099369,"integrity":"sha512-GTUHYxwYZ36SHgRXz78lcGBOm1fzdmLnXAJQHi/STuQjK0ezJ8y3sHvsl4uh0dMU70mOBDSNTH+9HLfxi1EZKQ==","mode":420,"size":8818},"fonts/AMC Slider.flf":{"checkedAt":1794532099369,"integrity":"sha512-h/vRO8p2OpwH9KdNLpg+JOt72mhdR3zyToQ/JyAfA/FD9LxtCCndVF6LkF8hcMYMOYtmSmQn8fQEjQT9e+xqgA==","mode":420,"size":6635},"fonts/AMC Thin.flf":{"checkedAt":1794532099369,"integrity":"sha512-bV+JbskcyWkqIHzZkWmrU0bcgwBmY6CeikAmljL+KS4UvSgZ9naTouF5mreM2KmBFipVEZfHvV6O5GRBUvFZjw==","mode":420,"size":7808},"fonts/AMC Tubes.flf":{"checkedAt":1794532099370,"integrity":"sha512-PkdrKe64PgWIJ9a/E25x7wLsYvdHRKCkV9m3rtb0Gnu0xqoYEuvzPhQ37wcCMd0fuZA/tBOSXuyOOKiQmhEwcw==","mode":420,"size":6514},"fonts/AMC Untitled.flf":{"checkedAt":1794532099370,"integrity":"sha512-x6/R5VHp9uaV8ak6uR/owyLujEpi5jGeammfCwEuQF2bO/W2QuQL/YvhOhzPxXtOfVUL4p4OFtEwIZ0y9ch+vA==","modeLine truncated
@@ -0,0 +1,9 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import { Kind } from '../symbols/index';
export interface TNull extends TSchema {
[Kind]: 'Null';
static: null;
type: 'null';
}
/** `[Json]` Creates a Null type */
export declare function Null(options?: SchemaOptions): TNull;
@@ -0,0 +1,23 @@
import * as _heroui_system from '@heroui/system';
import { ReactNode } from 'react';
import { UsePopoverProps } from './use-popover.js';
import '@heroui/theme';
import 'framer-motion';
import '@heroui/react-utils';
import '@react-stately/overlays';
import '@react-types/overlays';
import '@react-aria/dialog';
import './use-aria-popover.js';
import '@react-aria/overlays';
import '@heroui/aria-utils';
interface PopoverProps extends UsePopoverProps {
/**
* The content of the popover. It is usually the `PopoverTrigger`,
* and `PopoverContent`
*/
children: ReactNode[];
}
declare const Popover: _heroui_system.InternalForwardRefRenderFunction<"div", PopoverProps, never>;
export { PopoverProps, Popover as default };
@@ -0,0 +1,26 @@
import { PluginFunc, ConfigType, QUnitType, OpUnitType } from 'dayjs/esm'
declare const plugin: PluginFunc
export = plugin
declare module 'dayjs/esm' {
interface Dayjs {
quarter(): number
quarter(quarter: number): Dayjs
add(value: number, unit: QUnitType): Dayjs
subtract(value: number, unit: QUnitType): Dayjs
startOf(unit: QUnitType | OpUnitType): Dayjs
endOf(unit: QUnitType | OpUnitType): Dayjs
isSame(date?: ConfigType, unit?: QUnitType): boolean
isBefore(date?: ConfigType, unit?: QUnitType): boolean
isAfter(date?: ConfigType, unit?: QUnitType): boolean
}
}
@@ -0,0 +1 @@
{"version":3,"file":"SingleImmutableLinkedList.js","sourceRoot":"","sources":["../../../../src/common/models/SingleImmutableLinkedList.ts"],"names":[],"mappings":";;;AAKA,MAAa,yBAAyB;IACR;IAA5B,YAA4B,IAAsC;QAAtC,SAAI,GAAJ,IAAI,CAAkC;IAAG,CAAC;IAE/D,MAAM,CAAC,IAAO;QACnB,OAAO,IAAI,yBAAyB,CAAC;YACnC,IAAI;YACJ,QAAQ,EAAE,IAAI,CAAC,IAAI;SACpB,CAAC,CAAC;IACL,CAAC;IAEM,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtB,IAAI,IAAI,GAAiD,IAAI,CAAC,IAAI,CAAC;QAEnE,OAAO;YACL,IAAI,EAAE,GAAsB,EAAE;gBAC5B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;oBACvB,OAAO;wBACL,IAAI,EAAE,IAAI;wBACV,KAAK,EAAE,SAAS;qBACjB,CAAC;gBACJ,CAAC;gBAED,MAAM,IAAI,GAAM,IAAI,CAAC,IAAI,CAAC;gBAC1B,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;gBAErB,OAAO;oBACL,IAAI,EAAE,KAAK;oBACX,KAAK,EAAE,IAAI;iBACZ,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;CACF;AAhCD,8DAgCC"}
@@ -0,0 +1,16 @@
import commander from './index.js';
// wrapper to provide named exports for ESM.
export const {
program,
createCommand,
createArgument,
createOption,
CommanderError,
InvalidArgumentError,
InvalidOptionArgumentError, // deprecated old name
Command,
Argument,
Option,
Help
} = commander;
@@ -0,0 +1,834 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Tokenizer > should correctly mark attributes > for double quotes attribute 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onattribname",
5,
8,
],
[
"onattribdata",
10,
11,
],
[
"onattribend",
3,
12,
],
[
"onopentagend",
13,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should correctly mark attributes > for no quotes attribute 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onattribname",
5,
8,
],
[
"onattribdata",
9,
12,
],
[
"onattribend",
1,
12,
],
[
"onopentagend",
13,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should correctly mark attributes > for no value attribute 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onattribname",
5,
12,
],
[
"onattribend",
0,
12,
],
[
"onopentagend",
13,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should correctly mark attributes > for single quotes attribute 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onattribname",
5,
8,
],
[
"onattribdata",
10,
11,
],
[
"onattribend",
2,
12,
],
[
"onopentagend",
13,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should handle entities > for XML entities 1`] = `
[
[
"ontextentity",
38,
5,
],
[
"ontextentity",
62,
9,
],
[
"ontext",
9,
13,
],
[
"ontextentity",
60,
17,
],
[
"ontext",
17,
23,
],
[
"ontextentity",
97,
29,
],
[
"ontext",
29,
34,
],
[
"ontextentity",
99,
39,
],
[
"ontext",
39,
49,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should handle entities > for entities in attributes (#276) 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onattribname",
5,
8,
],
[
"onattribdata",
10,
24,
],
[
"onattribentity",
8465,
],
[
"onattribdata",
31,
41,
],
[
"onattribend",
3,
42,
],
[
"onselfclosingtag",
43,
],
[
"ontext",
44,
58,
],
[
"ontextentity",
8465,
65,
],
[
"ontext",
65,
75,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should handle entities > for multi-byte entities 1`] = `
[
[
"ontextentity",
8807,
21,
],
[
"ontextentity",
824,
21,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should handle entities > for trailing legacy entity 1`] = `
[
[
"ontextentity",
10801,
10,
],
[
"ontextentity",
215,
16,
],
[
"ontext",
16,
19,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should not break after special tag followed by an entity > for normal special tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onopentagend",
6,
],
[
"ontext",
7,
10,
],
[
"onclosetag",
12,
17,
],
[
"ontextentity",
39,
24,
],
[
"onopentagname",
25,
27,
],
[
"onselfclosingtag",
28,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should not break after special tag followed by an entity > for self-closing special tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onselfclosingtag",
8,
],
[
"ontextentity",
39,
15,
],
[
"onopentagname",
16,
18,
],
[
"onselfclosingtag",
19,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should not lose data when pausing 1`] = `
[
[
"ontextentity",
38,
5,
],
[
"ontext",
5,
12,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support self-closing special tags > for self-closing script tag 1`] = `
[
[
"onopentagname",
1,
7,
],
[
"onselfclosingtag",
9,
],
[
"onopentagname",
11,
14,
],
[
"onopentagend",
14,
],
[
"onclosetag",
17,
20,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support self-closing special tags > for self-closing style tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onselfclosingtag",
8,
],
[
"onopentagname",
10,
13,
],
[
"onopentagend",
13,
],
[
"onclosetag",
16,
19,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support self-closing special tags > for self-closing textarea tag 1`] = `
[
[
"onopentagname",
1,
9,
],
[
"onselfclosingtag",
11,
],
[
"onopentagname",
13,
16,
],
[
"onopentagend",
16,
],
[
"onclosetag",
19,
22,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support self-closing special tags > for self-closing title tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onselfclosingtag",
8,
],
[
"onopentagname",
10,
13,
],
[
"onopentagend",
13,
],
[
"onclosetag",
16,
19,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support self-closing special tags > for self-closing xmp tag 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onselfclosingtag",
6,
],
[
"onopentagname",
8,
11,
],
[
"onopentagend",
11,
],
[
"onclosetag",
14,
17,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support standard special tags > for normal script tag 1`] = `
[
[
"onopentagname",
1,
7,
],
[
"onopentagend",
7,
],
[
"onclosetag",
10,
16,
],
[
"onopentagname",
18,
21,
],
[
"onopentagend",
21,
],
[
"onclosetag",
24,
27,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support standard special tags > for normal sitle tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onopentagend",
6,
],
[
"onclosetag",
9,
14,
],
[
"onopentagname",
16,
19,
],
[
"onopentagend",
19,
],
[
"onclosetag",
22,
25,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support standard special tags > for normal style tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onopentagend",
6,
],
[
"onclosetag",
9,
14,
],
[
"onopentagname",
16,
19,
],
[
"onopentagend",
19,
],
[
"onclosetag",
22,
25,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support standard special tags > for normal textarea tag 1`] = `
[
[
"onopentagname",
1,
9,
],
[
"onopentagend",
9,
],
[
"onclosetag",
12,
20,
],
[
"onopentagname",
22,
25,
],
[
"onopentagend",
25,
],
[
"onclosetag",
28,
31,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should support standard special tags > for normal xmp tag 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onopentagend",
4,
],
[
"onclosetag",
7,
10,
],
[
"onopentagname",
12,
15,
],
[
"onopentagend",
15,
],
[
"onclosetag",
18,
21,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should treat html inside special tags as text > for div inside script tag 1`] = `
[
[
"onopentagname",
1,
7,
],
[
"onopentagend",
7,
],
[
"ontext",
8,
19,
],
[
"onclosetag",
21,
27,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should treat html inside special tags as text > for div inside style tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onopentagend",
6,
],
[
"ontext",
7,
18,
],
[
"onclosetag",
20,
25,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should treat html inside special tags as text > for div inside textarea tag 1`] = `
[
[
"onopentagname",
1,
9,
],
[
"onopentagend",
9,
],
[
"ontext",
10,
21,
],
[
"onclosetag",
23,
31,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should treat html inside special tags as text > for div inside title tag 1`] = `
[
[
"onopentagname",
1,
6,
],
[
"onopentagend",
6,
],
[
"ontext",
7,
18,
],
[
"onclosetag",
20,
25,
],
[
"onend",
],
]
`;
exports[`Tokenizer > should treat html inside special tags as text > for div inside xmp tag 1`] = `
[
[
"onopentagname",
1,
4,
],
[
"onopentagend",
4,
],
[
"ontext",
5,
16,
],
[
"onclosetag",
18,
21,
],
[
"onend",
],
]
`;
@@ -0,0 +1,73 @@
get-ready
=====
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![npm download][download-image]][download-url]
[npm-image]: https://img.shields.io/npm/v/get-ready.svg?style=flat-square
[npm-url]: https://npmjs.org/package/get-ready
[travis-image]: https://img.shields.io/travis/node-modules/ready.svg?style=flat-square
[travis-url]: https://travis-ci.org/node-modules/ready
[codecov-image]: https://codecov.io/github/node-modules/ready/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/node-modules/ready?branch=master
[david-image]: https://img.shields.io/david/node-modules/ready.svg?style=flat-square
[david-url]: https://david-dm.org/node-modules/ready
[download-image]: https://img.shields.io/npm/dm/get-ready.svg?style=flat-square
[download-url]: https://npmjs.org/package/get-ready
**Fork from [supershabam/ready](https://github.com/supershabam/ready)**
NodeJS mixin to add one-time ready event
## Purpose
Events are great. You should use events, but not for signaling ready! Ready implies state, and once you are ready, you stay ready.
This is a module for everyone who has bound an event handler.on('ready', function() {}) that doesn't execute because you added the handler after the 'ready' event already fired.
## Warning
If you use this mixin, you must have 'ready', '_ready', and '_readyCallbacks' available on your class. Ready will stomp on these variables if you're trying to use them in your class.
## Example
```javascript
var ready = require('ready');
// example class that uses Ready
function MyClass() {
this.someProperty = 'some value';
}
ready.mixin(MyClass.prototype);
// Normal class prototype functions
MyClass.prototype.doSomeWork = function() {};
// Create a new class that uses ready mixin
var myClass = new MyClass();
// Add callback for when myClass is ready
myClass.ready(function() {
console.log('I am now ready');
});
myClass.doSomeWork();
// We are now ready, fire callbacks!
myClass.ready(true);
// Adding a new callback once we're already ready gets executed immediately
myClass.ready(function() {
console.log('I came late to the party, but I will still execute.');
});
// Ok, you can set the ready state to false now as well... for whatever reason
myClass.ready(false);
myClass.ready(function() {
console.log('I will not fire until you set ready to true again.');
});
```
## License
[MIT](LICENSE)
@@ -0,0 +1,281 @@
/**
* @fileoverview Rule to control spacing within function calls
* @author Matt DuVall <http://www.mattduvall.com>
* @deprecated in ESLint v8.53.0
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "function-call-spacing",
url: "https://eslint.style/rules/function-call-spacing",
},
},
],
},
type: "layout",
docs: {
description:
"Require or disallow spacing between function identifiers and their invocations",
recommended: false,
url: "https://eslint.org/docs/latest/rules/func-call-spacing",
},
fixable: "whitespace",
schema: {
anyOf: [
{
type: "array",
items: [
{
enum: ["never"],
},
],
minItems: 0,
maxItems: 1,
},
{
type: "array",
items: [
{
enum: ["always"],
},
{
type: "object",
properties: {
allowNewlines: {
type: "boolean",
},
},
additionalProperties: false,
},
],
minItems: 0,
maxItems: 2,
},
],
},
messages: {
unexpectedWhitespace:
"Unexpected whitespace between function name and paren.",
unexpectedNewline:
"Unexpected newline between function name and paren.",
missing: "Missing space between function name and paren.",
},
},
create(context) {
const never = context.options[0] !== "always";
const allowNewlines =
!never && context.options[1] && context.options[1].allowNewlines;
const sourceCode = context.sourceCode;
const text = sourceCode.getText();
/**
* Check if open space is present in a function name
* @param {ASTNode} node node to evaluate
* @param {Token} leftToken The last token of the callee. This may be the closing parenthesis that encloses the callee.
* @param {Token} rightToken The first token of the arguments. this is the opening parenthesis that encloses the arguments.
* @returns {void}
* @private
*/
function checkSpacing(node, leftToken, rightToken) {
const textBetweenTokens = text
.slice(leftToken.range[1], rightToken.range[0])
.replace(/\/\*.*?\*\//gu, "");
const hasWhitespace = /\s/u.test(textBetweenTokens);
const hasNewline =
hasWhitespace &&
astUtils.LINEBREAK_MATCHER.test(textBetweenTokens);
/*
* never allowNewlines hasWhitespace hasNewline message
* F F F F Missing space between function name and paren.
* F F F T (Invalid `!hasWhitespace && hasNewline`)
* F F T T Unexpected newline between function name and paren.
* F F T F (OK)
* F T T F (OK)
* F T T T (OK)
* F T F T (Invalid `!hasWhitespace && hasNewline`)
* F T F F Missing space between function name and paren.
* T T F F (Invalid `never && allowNewlines`)
* T T F T (Invalid `!hasWhitespace && hasNewline`)
* T T T T (Invalid `never && allowNewlines`)
* T T T F (Invalid `never && allowNewlines`)
* T F T F Unexpected space between function name and paren.
* T F T T Unexpected space between function name and paren.
* T F F T (Invalid `!hasWhitespace && hasNewline`)
* T F F F (OK)
*
* T T Unexpected space between function name and paren.
* F F Missing space between function name and paren.
* F F T Unexpected newline between function name and paren.
*/
if (never && hasWhitespace) {
context.report({
node,
loc: {
start: leftToken.loc.end,
end: {
line: rightToken.loc.start.line,
column: rightToken.loc.start.column - 1,
},
},
messageId: "unexpectedWhitespace",
fix(fixer) {
// Don't remove comments.
if (
sourceCode.commentsExistBetween(
leftToken,
rightToken,
)
) {
return null;
}
// If `?.` exists, it doesn't hide no-unexpected-multiline errors
if (node.optional) {
return fixer.replaceTextRange(
[leftToken.range[1], rightToken.range[0]],
"?.",
);
}
/*
* Only autofix if there is no newline
* https://github.com/eslint/eslint/issues/7787
*/
if (hasNewline) {
return null;
}
return fixer.removeRange([
leftToken.range[1],
rightToken.range[0],
]);
},
});
} else if (!never && !hasWhitespace) {
context.report({
node,
loc: {
start: {
line: leftToken.loc.end.line,
column: leftToken.loc.end.column - 1,
},
end: rightToken.loc.start,
},
messageId: "missing",
fix(fixer) {
if (node.optional) {
return null; // Not sure if inserting a space to either before/after `?.` token.
}
return fixer.insertTextBefore(rightToken, " ");
},
});
} else if (!never && !allowNewlines && hasNewline) {
context.report({
node,
loc: {
start: leftToken.loc.end,
end: rightToken.loc.start,
},
messageId: "unexpectedNewline",
fix(fixer) {
/*
* Only autofix if there is no newline
* https://github.com/eslint/eslint/issues/7787
* But if `?.` exists, it doesn't hide no-unexpected-multiline errors
*/
if (!node.optional) {
return null;
}
// Don't remove comments.
if (
sourceCode.commentsExistBetween(
leftToken,
rightToken,
)
) {
return null;
}
const range = [leftToken.range[1], rightToken.range[0]];
const qdToken = sourceCode.getTokenAfter(leftToken);
if (qdToken.range[0] === leftToken.range[1]) {
return fixer.replaceTextRange(range, "?. ");
}
if (qdToken.range[1] === rightToken.range[0]) {
return fixer.replaceTextRange(range, " ?.");
}
return fixer.replaceTextRange(range, " ?. ");
},
});
}
}
return {
"CallExpression, NewExpression"(node) {
const lastToken = sourceCode.getLastToken(node);
const lastCalleeToken = sourceCode.getLastToken(node.callee);
const parenToken = sourceCode.getFirstTokenBetween(
lastCalleeToken,
lastToken,
astUtils.isOpeningParenToken,
);
const prevToken =
parenToken &&
sourceCode.getTokenBefore(
parenToken,
astUtils.isNotQuestionDotToken,
);
// Parens in NewExpression are optional
if (!(parenToken && parenToken.range[1] < node.range[1])) {
return;
}
checkSpacing(node, prevToken, parenToken);
},
ImportExpression(node) {
const leftToken = sourceCode.getFirstToken(node);
const rightToken = sourceCode.getTokenAfter(leftToken);
checkSpacing(node, leftToken, rightToken);
},
};
},
};
@@ -0,0 +1,60 @@
{
"name": "micromark-util-subtokenize",
"version": "2.1.0",
"description": "micromark utility to tokenize subtokens",
"license": "MIT",
"keywords": [
"micromark",
"util",
"utility",
"tokenize"
],
"repository": "https://github.com/micromark/micromark/tree/main/packages/micromark-util-subtokenize",
"bugs": "https://github.com/micromark/micromark/issues",
"funding": [
{
"type": "GitHub Sponsors",
"url": "https://github.com/sponsors/unifiedjs"
},
{
"type": "OpenCollective",
"url": "https://opencollective.com/unified"
}
],
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"sideEffects": false,
"type": "module",
"files": [
"dev/",
"lib/",
"index.d.ts.map",
"index.d.ts",
"index.js"
],
"exports": {
"development": "./dev/index.js",
"default": "./index.js"
},
"dependencies": {
"devlop": "^1.0.0",
"micromark-util-chunked": "^2.0.0",
"micromark-util-symbol": "^2.0.0",
"micromark-util-types": "^2.0.0"
},
"scripts": {
"build": "micromark-build"
},
"xo": {
"envs": [
"shared-node-browser"
],
"prettier": true,
"rules": {
"max-depth": "off",
"unicorn/prefer-code-point": "off"
}
}
}
@@ -0,0 +1 @@
{"version":3,"names":["_defineProperty","require","_objectSpread","target","i","arguments","length","source","Object","ownKeys","keys","getOwnPropertySymbols","push","apply","filter","sym","getOwnPropertyDescriptor","enumerable","forEach","key","defineProperty"],"sources":["../../src/helpers/objectSpread.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n/* @onlyBabel7 */\n\nimport defineProperty from \"./defineProperty.ts\";\n\ntype Intersection<R extends any[]> = R extends [infer H, ...infer S]\n ? H & Intersection<S>\n : unknown;\n\nexport default function _objectSpread<T extends object, U extends unknown[]>(\n target: T,\n ...sources: U\n): T & Intersection<U>;\nexport default function _objectSpread(target: object) {\n for (var i = 1; i < arguments.length; i++) {\n var source: object = arguments[i] != null ? Object(arguments[i]) : {};\n var ownKeys: PropertyKey[] = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys.push.apply(\n ownKeys,\n Object.getOwnPropertySymbols(source).filter(function (sym) {\n // sym already comes from `Object.getOwnPropertySymbols`, so getOwnPropertyDescriptor should always be defined\n return Object.getOwnPropertyDescriptor(source, sym)!.enumerable;\n }),\n );\n }\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key as keyof typeof source]);\n });\n }\n return target;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,eAAA,GAAAC,OAAA;AAUe,SAASC,aAAaA,CAACC,MAAc,EAAE;EACpD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,SAAS,CAACC,MAAM,EAAEF,CAAC,EAAE,EAAE;IACzC,IAAIG,MAAc,GAAGF,SAAS,CAACD,CAAC,CAAC,IAAI,IAAI,GAAGI,MAAM,CAACH,SAAS,CAACD,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACrE,IAAIK,OAAsB,GAAGD,MAAM,CAACE,IAAI,CAACH,MAAM,CAAC;IAChD,IAAI,OAAOC,MAAM,CAACG,qBAAqB,KAAK,UAAU,EAAE;MACtDF,OAAO,CAACG,IAAI,CAACC,KAAK,CAChBJ,OAAO,EACPD,MAAM,CAACG,qBAAqB,CAACJ,MAAM,CAAC,CAACO,MAAM,CAAC,UAAUC,GAAG,EAAE;QAEzD,OAAOP,MAAM,CAACQ,wBAAwB,CAACT,MAAM,EAAEQ,GAAG,CAAC,CAAEE,UAAU;MACjE,CAAC,CACH,CAAC;IACH;IACAR,OAAO,CAACS,OAAO,CAAC,UAAUC,GAAG,EAAE;MAC7B,IAAAC,uBAAc,EAACjB,MAAM,EAAEgB,GAAG,EAAEZ,MAAM,CAACY,GAAG,CAAwB,CAAC;IACjE,CAAC,CAAC;EACJ;EACA,OAAOhB,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1,4 @@
/** Used to match template delimiters. */
var reEvaluate = /<%([\s\S]+?)%>/g;
module.exports = reEvaluate;
@@ -0,0 +1,14 @@
import { AbstractStreamReader } from "./AbstractStreamReader.js";
export declare abstract class WebStreamReader extends AbstractStreamReader {
protected reader: ReadableStreamDefaultReader | ReadableStreamBYOBReader;
constructor(reader: ReadableStreamDefaultReader | ReadableStreamBYOBReader);
/**
* Read from stream
* @param buffer - Target Uint8Array (or Buffer) to store data read from stream in
* @param mayBeLess - If true, may fill the buffer partially
* @protected Bytes read
*/
protected abstract readFromStream(buffer: Uint8Array, mayBeLess: boolean): Promise<number>;
abort(): Promise<void>;
close(): Promise<void>;
}
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "es2015",
"module": "commonjs",
"moduleResolution": "node16",
"declaration": true,
"outDir": "./lib",
"lib": ["es2016", "es5"]
},
"include": ["src"],
"exclude": ["node_modules"]
}
@@ -0,0 +1,64 @@
{
"name": "@dabh/diagnostics",
"version": "2.0.8",
"description": "Tools for debugging your node.js modules and event loop",
"main": "./node",
"browser": "./browser",
"scripts": {
"test:basic": "mocha --require test/mock.js test/*.test.js",
"test:node": "mocha --require test/mock test/node.js",
"test:browser": "mocha --require test/mock test/browser.js",
"test:runner": "npm run test:basic && npm run test:node && npm run test:browser",
"webpack:node:prod": "webpack --mode=production node/index.js -o /dev/null --json | webpack-bundle-size-analyzer",
"webpack:node:dev": "webpack --mode=development node/index.js -o /dev/null --json | webpack-bundle-size-analyzer",
"webpack:browser:prod": "webpack --mode=production browser/index.js -o /dev/null --json | webpack-bundle-size-analyzer",
"webpack:browser:dev": "webpack --mode=development browser/index.js -o /dev/null --json | webpack-bundle-size-analyzer",
"test": "nyc --reporter=text --reporter=lcov npm run test:runner"
},
"repository": {
"type": "git",
"url": "git://github.com/DABH/diagnostics.git"
},
"keywords": [
"debug",
"debugger",
"debugging",
"diagnostic",
"diagnostics",
"event",
"loop",
"metrics",
"stats"
],
"author": "Arnout Kazemier",
"license": "MIT",
"bugs": {
"url": "https://github.com/DABH/diagnostics/issues"
},
"homepage": "https://github.com/DABH/diagnostics",
"devDependencies": {
"assume": "2.3.x",
"asyncstorageapi": "^1.0.2",
"mocha": "^11.7.2",
"nyc": "^17.1.0",
"objstorage": "^1.0.0",
"pre-commit": "github:metcalfc/pre-commit#b36c649fd5348d7604a86b7b2f3429c780d1478f",
"require-poisoning": "^2.0.0",
"webpack": "5.x",
"webpack-bundle-size-analyzer": "^3.0.0",
"webpack-cli": "6.x"
},
"dependencies": {
"@so-ric/colorspace": "^1.1.6",
"enabled": "2.0.x",
"kuler": "^2.0.0"
},
"contributors": [
"Martijn Swaagman (https://github.com/swaagie)",
"Jarrett Cruger (https://github.com/jcrugzz)",
"Sevastos (https://github.com/sevastos)"
],
"directories": {
"test": "test"
}
}
@@ -0,0 +1,268 @@
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2018 NAN contributors
*
* MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
********************************************************************/
#ifndef NAN_MAYBE_PRE_43_INL_H_
#define NAN_MAYBE_PRE_43_INL_H_
template<typename T>
class MaybeLocal {
public:
inline MaybeLocal() : val_(v8::Local<T>()) {}
template<typename S>
# if NODE_MODULE_VERSION >= NODE_0_12_MODULE_VERSION
inline
MaybeLocal(v8::Local<S> that) : val_(that) {} // NOLINT(runtime/explicit)
# else
inline
MaybeLocal(v8::Local<S> that) : // NOLINT(runtime/explicit)
val_(*reinterpret_cast<v8::Local<T>*>(&that)) {}
# endif
inline bool IsEmpty() const { return val_.IsEmpty(); }
template<typename S>
inline bool ToLocal(v8::Local<S> *out) const {
*out = val_;
return !IsEmpty();
}
inline v8::Local<T> ToLocalChecked() const {
#if defined(V8_ENABLE_CHECKS)
assert(!IsEmpty() && "ToLocalChecked is Empty");
#endif // V8_ENABLE_CHECKS
return val_;
}
template<typename S>
inline v8::Local<S> FromMaybe(v8::Local<S> default_value) const {
return IsEmpty() ? default_value : v8::Local<S>(val_);
}
private:
v8::Local<T> val_;
};
inline
MaybeLocal<v8::String> ToDetailString(v8::Handle<v8::Value> val) {
return MaybeLocal<v8::String>(val->ToDetailString());
}
inline
MaybeLocal<v8::Uint32> ToArrayIndex(v8::Handle<v8::Value> val) {
return MaybeLocal<v8::Uint32>(val->ToArrayIndex());
}
inline
Maybe<bool> Equals(v8::Handle<v8::Value> a, v8::Handle<v8::Value>(b)) {
return Just<bool>(a->Equals(b));
}
inline
MaybeLocal<v8::Object> NewInstance(v8::Handle<v8::Function> h) {
return MaybeLocal<v8::Object>(h->NewInstance());
}
inline
MaybeLocal<v8::Object> NewInstance(
v8::Local<v8::Function> h
, int argc
, v8::Local<v8::Value> argv[]) {
return MaybeLocal<v8::Object>(h->NewInstance(argc, argv));
}
inline
MaybeLocal<v8::Object> NewInstance(v8::Handle<v8::ObjectTemplate> h) {
return MaybeLocal<v8::Object>(h->NewInstance());
}
inline
MaybeLocal<v8::Function> GetFunction(v8::Handle<v8::FunctionTemplate> t) {
return MaybeLocal<v8::Function>(t->GetFunction());
}
inline Maybe<bool> Set(
v8::Handle<v8::Object> obj
, v8::Handle<v8::Value> key
, v8::Handle<v8::Value> value) {
return Just<bool>(obj->Set(key, value));
}
inline Maybe<bool> Set(
v8::Handle<v8::Object> obj
, uint32_t index
, v8::Handle<v8::Value> value) {
return Just<bool>(obj->Set(index, value));
}
#include "nan_define_own_property_helper.h" // NOLINT(build/include_subdir)
inline Maybe<bool> DefineOwnProperty(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key
, v8::Handle<v8::Value> value
, v8::PropertyAttribute attribs = v8::None) {
v8::PropertyAttribute current = obj->GetPropertyAttributes(key);
return imp::DefineOwnPropertyHelper(current, obj, key, value, attribs);
}
NAN_DEPRECATED inline Maybe<bool> ForceSet(
v8::Handle<v8::Object> obj
, v8::Handle<v8::Value> key
, v8::Handle<v8::Value> value
, v8::PropertyAttribute attribs = v8::None) {
return Just<bool>(obj->ForceSet(key, value, attribs));
}
inline MaybeLocal<v8::Value> Get(
v8::Handle<v8::Object> obj
, v8::Handle<v8::Value> key) {
return MaybeLocal<v8::Value>(obj->Get(key));
}
inline MaybeLocal<v8::Value> Get(
v8::Handle<v8::Object> obj
, uint32_t index) {
return MaybeLocal<v8::Value>(obj->Get(index));
}
inline Maybe<v8::PropertyAttribute> GetPropertyAttributes(
v8::Handle<v8::Object> obj
, v8::Handle<v8::Value> key) {
return Just<v8::PropertyAttribute>(obj->GetPropertyAttributes(key));
}
inline Maybe<bool> Has(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return Just<bool>(obj->Has(key));
}
inline Maybe<bool> Has(
v8::Handle<v8::Object> obj
, uint32_t index) {
return Just<bool>(obj->Has(index));
}
inline Maybe<bool> Delete(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return Just<bool>(obj->Delete(key));
}
inline Maybe<bool> Delete(
v8::Handle<v8::Object> obj
, uint32_t index) {
return Just<bool>(obj->Delete(index));
}
inline
MaybeLocal<v8::Array> GetPropertyNames(v8::Handle<v8::Object> obj) {
return MaybeLocal<v8::Array>(obj->GetPropertyNames());
}
inline
MaybeLocal<v8::Array> GetOwnPropertyNames(v8::Handle<v8::Object> obj) {
return MaybeLocal<v8::Array>(obj->GetOwnPropertyNames());
}
inline Maybe<bool> SetPrototype(
v8::Handle<v8::Object> obj
, v8::Handle<v8::Value> prototype) {
return Just<bool>(obj->SetPrototype(prototype));
}
inline MaybeLocal<v8::String> ObjectProtoToString(
v8::Handle<v8::Object> obj) {
return MaybeLocal<v8::String>(obj->ObjectProtoToString());
}
inline Maybe<bool> HasOwnProperty(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return Just<bool>(obj->HasOwnProperty(key));
}
inline Maybe<bool> HasRealNamedProperty(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return Just<bool>(obj->HasRealNamedProperty(key));
}
inline Maybe<bool> HasRealIndexedProperty(
v8::Handle<v8::Object> obj
, uint32_t index) {
return Just<bool>(obj->HasRealIndexedProperty(index));
}
inline Maybe<bool> HasRealNamedCallbackProperty(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return Just<bool>(obj->HasRealNamedCallbackProperty(key));
}
inline MaybeLocal<v8::Value> GetRealNamedPropertyInPrototypeChain(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return MaybeLocal<v8::Value>(
obj->GetRealNamedPropertyInPrototypeChain(key));
}
inline MaybeLocal<v8::Value> GetRealNamedProperty(
v8::Handle<v8::Object> obj
, v8::Handle<v8::String> key) {
return MaybeLocal<v8::Value>(obj->GetRealNamedProperty(key));
}
inline MaybeLocal<v8::Value> CallAsFunction(
v8::Handle<v8::Object> obj
, v8::Handle<v8::Object> recv
, int argc
, v8::Handle<v8::Value> argv[]) {
return MaybeLocal<v8::Value>(obj->CallAsFunction(recv, argc, argv));
}
inline MaybeLocal<v8::Value> CallAsConstructor(
v8::Handle<v8::Object> obj
, int argc
, v8::Local<v8::Value> argv[]) {
return MaybeLocal<v8::Value>(obj->CallAsConstructor(argc, argv));
}
inline
MaybeLocal<v8::String> GetSourceLine(v8::Handle<v8::Message> msg) {
return MaybeLocal<v8::String>(msg->GetSourceLine());
}
inline Maybe<int> GetLineNumber(v8::Handle<v8::Message> msg) {
return Just<int>(msg->GetLineNumber());
}
inline Maybe<int> GetStartColumn(v8::Handle<v8::Message> msg) {
return Just<int>(msg->GetStartColumn());
}
inline Maybe<int> GetEndColumn(v8::Handle<v8::Message> msg) {
return Just<int>(msg->GetEndColumn());
}
inline MaybeLocal<v8::Object> CloneElementAt(
v8::Handle<v8::Array> array
, uint32_t index) {
return MaybeLocal<v8::Object>(array->CloneElementAt(index));
}
inline MaybeLocal<v8::Value> Call(
v8::Local<v8::Function> fun
, v8::Local<v8::Object> recv
, int argc
, v8::Local<v8::Value> argv[]) {
return MaybeLocal<v8::Value>(fun->Call(recv, argc, argv));
}
#endif // NAN_MAYBE_PRE_43_INL_H_
@@ -0,0 +1,24 @@
/**
* Extractor function for a LogicalExpression type value node.
* A logical expression is `a && b` or `a || b`, so we evaluate both sides
* and return the extracted value of the expression.
*
* @param - value - AST Value object with type `LogicalExpression`
* @returns - The extracted value converted to correct type.
*/
export default function extractValueFromLogicalExpression(value) {
// eslint-disable-next-line global-require
const getValue = require('.').default;
const { operator, left, right } = value;
const leftVal = getValue(left);
const rightVal = getValue(right);
if (operator === '&&') {
return leftVal && rightVal;
}
if (operator === '??') {
// return leftVal ?? rightVal; // TODO: update to babel 7
return (leftVal === null || typeof leftVal === 'undefined') ? rightVal : leftVal;
}
return leftVal || rightVal;
}
@@ -0,0 +1,55 @@
{
"name": "@types/unist",
"version": "2.0.11",
"description": "TypeScript definitions for unist",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist",
"license": "MIT",
"contributors": [
{
"name": "bizen241",
"githubUsername": "bizen241",
"url": "https://github.com/bizen241"
},
{
"name": "Jun Lu",
"githubUsername": "lujun2",
"url": "https://github.com/lujun2"
},
{
"name": "Hernan Rajchert",
"githubUsername": "hrajchert",
"url": "https://github.com/hrajchert"
},
{
"name": "Titus Wormer",
"githubUsername": "wooorm",
"url": "https://github.com/wooorm"
},
{
"name": "Junyoung Choi",
"githubUsername": "rokt33r",
"url": "https://github.com/rokt33r"
},
{
"name": "Ben Moon",
"githubUsername": "GuiltyDolphin",
"url": "https://github.com/GuiltyDolphin"
},
{
"name": "JounQin",
"githubUsername": "JounQin",
"url": "https://github.com/JounQin"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/unist"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "6e36525a6db49ae5517fe0751796ca8f6c65099098415046d4f1ad6c2ef1a33c",
"typeScriptVersion": "4.8"
}
@@ -0,0 +1,16 @@
The ISC License
Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice
appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const esnext_string: LibDefinition;
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=buildArrayMetadataWithArray.spec.d.ts.map
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2021_string = void 0;
const base_config_1 = require("./base-config");
exports.es2021_string = {
libs: [],
variables: [['String', base_config_1.TYPE]],
};
@@ -0,0 +1,12 @@
import * as _heroui_system from '@heroui/system';
import { HTMLHeroUIProps } from '@heroui/system';
interface PaginationCursorProps extends HTMLHeroUIProps<"span"> {
/**
* The current active page.
*/
activePage?: number;
}
declare const PaginationCursor: _heroui_system.InternalForwardRefRenderFunction<"span", PaginationCursorProps, never>;
export { type PaginationCursorProps, PaginationCursor as default };
@@ -0,0 +1,7 @@
Copyright (c) 2015-20 [these people](https://github.com/Rich-Harris/estree-walker/graphs/contributors)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=isUserlandEmittedType.spec.d.ts.map
@@ -0,0 +1,37 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
docs: {
description:
"disallow template literals with invalid escape sequences.",
category: "ES2018",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-malformed-template-literals.html",
},
fixable: null,
messages: {
forbidden:
"ES2018 template literals with invalid escape sequences are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
const reported = new Set()
return {
"TemplateElement[value.cooked=null]"(elementNode) {
const node = elementNode.parent
if (!reported.has(node)) {
reported.add(node)
context.report({ node, messageId: "forbidden" })
}
},
}
},
}
@@ -0,0 +1 @@
{"version":3,"file":"SnapshotManager.js","sourceRoot":"","sources":["../../../../src/container/services/SnapshotManager.ts"],"names":[],"mappings":";;;AAAA,wFAAqF;AACrF,gGAA6F;AAI7F,MAAa,eAAe;IACjB,wBAAwB,CAA0B;IAClD,UAAU,CAAa;IAEhC,YAAY,uBAAgD;QAC1D,IAAI,CAAC,wBAAwB,GAAG,uBAAuB,CAAC;QACxD,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;IACvB,CAAC;IAEM,OAAO;QACZ,MAAM,QAAQ,GAAyB,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;QAE7D,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,iDAAuB,CAC/B,yDAA2B,CAAC,gBAAgB,EAC5C,kCAAkC,CACnC,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,wBAAwB,CAAC,KAAK,CACjC,QAAQ,CAAC,iBAAiB,EAC1B,QAAQ,CAAC,cAAc,EACvB,QAAQ,CAAC,mBAAmB,CAC7B,CAAC;IACJ,CAAC;IAEM,QAAQ;QACb,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YACnB,iBAAiB,EACf,IAAI,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,KAAK,EAAE;YACzD,cAAc,EAAE,IAAI,CAAC,wBAAwB,CAAC,cAAc,CAAC,KAAK,EAAE;YACpE,mBAAmB,EACjB,IAAI,CAAC,wBAAwB,CAAC,mBAAmB,CAAC,KAAK,EAAE;SAC5D,CAAC,CAAC;IACL,CAAC;CACF;AAnCD,0CAmCC"}
@@ -0,0 +1 @@
{"version":3,"file":"resolveProviderBinding.js","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveProviderBinding.ts"],"names":[],"mappings":";;;AAGA,mGAAgG;AAGhG,mFAAgF;AAEnE,QAAA,sBAAsB,GAGP,IAAA,6DAA6B,EAMvD,+DAA8B,CAAC,CAAC"}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more