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,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetOption = GetOption;
var _262_1 = require("./262");
/**
* https://tc39.es/ecma402/#sec-getoption
* @param opts
* @param prop
* @param type
* @param values
* @param fallback
*/
function GetOption(opts, prop, type, values, fallback) {
if (typeof opts !== 'object') {
throw new TypeError('Options must be an object');
}
var value = opts[prop];
if (value !== undefined) {
if (type !== 'boolean' && type !== 'string') {
throw new TypeError('invalid type');
}
if (type === 'boolean') {
value = Boolean(value);
}
if (type === 'string') {
value = (0, _262_1.ToString)(value);
}
if (values !== undefined && !values.filter(function (val) { return val == value; }).length) {
throw new RangeError("".concat(value, " is not within ").concat(values.join(', ')));
}
return value;
}
return fallback;
}
@@ -0,0 +1,10 @@
import Module from '../core/module.js';
import Quill from '../core/quill.js';
declare class Input extends Module {
constructor(quill: Quill, options: Record<string, never>);
private deleteRange;
private replaceText;
private handleBeforeInput;
private handleCompositionStart;
}
export default Input;
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,kBAAkB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,qBAAkB,CAAC;IAC9E,qBAAqB,CAAC,iDAA2C,CAAC;IAClE,UAAU,CAAC,YAAS,CAAC;IACrB,eAAe,CAAC,4BAAyB,CAAC;IAC1C,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,4BAAyB,CAAC;YAAE,KAAK,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,sBAAmB,CAAC;YAAE,OAAO,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,uBAAoB,CAAC;QAAA,GAAG,CAAC,CAAC;IAClP,gBAAgB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,eAAY,CAAC;AACtD","sources":["packages/@react-aria/grid/intl/de-DE.json"],"sourcesContent":["{\n \"deselectedItem\": \"{item} nicht ausgewählt.\",\n \"longPressToSelect\": \"Gedrückt halten, um Auswahlmodus zu öffnen.\",\n \"select\": \"Auswählen\",\n \"selectedAll\": \"Alle Elemente ausgewählt.\",\n \"selectedCount\": \"{count, plural, =0 {Keine Elemente ausgewählt} one {# Element ausgewählt} other {# Elemente ausgewählt}}.\",\n \"selectedItem\": \"{item} ausgewählt.\"\n}\n"],"names":[],"version":3,"file":"de-DE.module.js.map"}
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _writeOnlyError;
function _writeOnlyError(name) {
throw new TypeError('"' + name + '" is write-only');
}
//# sourceMappingURL=writeOnlyError.js.map
@@ -0,0 +1,54 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.resultAdapter = exports.fieldAdapter = void 0;
var _tslib = require("tslib");
var fieldAdapter = exports.fieldAdapter = function fieldAdapter(field) {
return {
getFieldInstance: function getFieldInstance(name) {
return field.getNames().includes(name);
},
setFieldsValue: field.setValues,
getFieldsValue: field.getValues,
resetFields: field.resetToDefault,
validateFields: function validateFields(fields, callback) {
field.validate(fields, callback);
}
};
};
var resultAdapter = exports.resultAdapter = function resultAdapter(result) {
var tableProps = {
dataSource: result.tableProps.dataSource,
loading: result.tableProps.loading,
onSort: function onSort(dataIndex, order) {
var _a;
result.tableProps.onChange({
current: result.pagination.current,
pageSize: result.pagination.pageSize
}, (_a = result.params[0]) === null || _a === void 0 ? void 0 : _a.filters, {
field: dataIndex,
order: order
});
},
onFilter: function onFilter(filterParams) {
var _a;
result.tableProps.onChange({
current: result.pagination.current,
pageSize: result.pagination.pageSize
}, filterParams, (_a = result.params[0]) === null || _a === void 0 ? void 0 : _a.sorter);
}
};
var paginationProps = {
onChange: result.pagination.changeCurrent,
onPageSizeChange: result.pagination.changePageSize,
current: result.pagination.current,
pageSize: result.pagination.pageSize,
total: result.pagination.total
};
return (0, _tslib.__assign)((0, _tslib.__assign)({}, result), {
tableProps: tableProps,
paginationProps: paginationProps
});
};
@@ -0,0 +1,27 @@
import Delta from 'quill-delta';
import type { Op } from 'quill-delta';
import Module from '../core/module.js';
export type CellData = {
content?: Delta['ops'];
attributes?: Record<string, unknown>;
};
export type TableRowColumnOp = Omit<Op, 'insert'> & {
insert?: {
id: string;
};
};
export interface TableData {
rows?: Delta['ops'];
columns?: Delta['ops'];
cells?: Record<string, CellData>;
}
export declare const composePosition: (delta: Delta, index: number) => number | null;
export declare const tableHandler: {
compose(a: TableData, b: TableData, keepNull?: boolean): TableData;
transform(a: TableData, b: TableData, priority: boolean): TableData;
invert(change: TableData, base: TableData): TableData;
};
declare class TableEmbed extends Module {
static register(): void;
}
export default TableEmbed;
@@ -0,0 +1 @@
{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAa,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;GAEG;AACH,qBAAa,cAAc;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;gBACnB,KAAK,GAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;IAGvD,IAAI;IAGJ,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAGxC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;CAM3C;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAY;IACpC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO;IAMnD,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;CAOtC;AAED;;;GAGG;AACH,qBAAa,QAAQ;IACnB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAY;IACvC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAWlC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,EAAE;IAS5B,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE;IAG9B,IAAI,IAAI,IAAI,EAAE;CAGf;AAED;;;;;GAKG;AACH,qBAAa,SAAS;IACpB,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,cAAoB;IAC3B,QAAQ,WAAiB;IACzB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,cAAc,CAAA;gBAER,IAAI,EAAE,cAAc,EAAE,cAAc,CAAC,EAAE,cAAc;IAQjE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;IAmGjD,cAAc,IAAI,IAAI,EAAE;IAIxB,KAAK;IAQL,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS;IAqBvD,YAAY,CACV,CAAC,EAAE,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IA8CnB,UAAU,CACR,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,QAAQ,EACX,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IAUnB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO;CASvE"}
@@ -0,0 +1,17 @@
/*
* 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 type {ListProps, ListState} from './useListState';
export type {SingleSelectListProps, SingleSelectListState} from './useSingleSelectListState';
export {useListState} from './useListState';
export {useSingleSelectListState} from './useSingleSelectListState';
export {ListCollection} from './ListCollection';
@@ -0,0 +1,26 @@
module.exports = function (opts) {
var sep = opts ? opts.sep : '{}'
var len = sep.length
var whitespace = '\\s*'
var left = escape(sep.substring(0, len / 2)) + whitespace
var right = whitespace + escape(sep.substring(len / 2, len))
return function (template, values) {
Object.keys(values).forEach(function (key) {
var value = String(values[key]).replace(/\$/g, '$$$$')
template = template.replace(regExp(key), value)
})
return template
}
function escape (s) {
return [].map.call(s, function (char) {
return '\\' + char
}).join('')
}
function regExp (key) {
return new RegExp(left + key + right, 'g')
}
}
@@ -0,0 +1,954 @@
'use strict';
module.exports = {
IsPropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op
abs: {
url: 'https://262.ecma-international.org/8.0/#eqn-abs'
},
'Abstract Equality Comparison': {
url: 'https://262.ecma-international.org/8.0/#sec-abstract-equality-comparison'
},
'Abstract Relational Comparison': {
url: 'https://262.ecma-international.org/8.0/#sec-abstract-relational-comparison'
},
AddRestrictedFunctionProperties: {
url: 'https://262.ecma-international.org/8.0/#sec-addrestrictedfunctionproperties'
},
AddWaiter: {
url: 'https://262.ecma-international.org/8.0/#sec-addwaiter'
},
AdvanceStringIndex: {
url: 'https://262.ecma-international.org/8.0/#sec-advancestringindex'
},
'agent-order': {
url: 'https://262.ecma-international.org/8.0/#sec-agent-order'
},
AgentCanSuspend: {
url: 'https://262.ecma-international.org/8.0/#sec-agentcansuspend'
},
AgentSignifier: {
url: 'https://262.ecma-international.org/8.0/#sec-agentsignifier'
},
AllocateArrayBuffer: {
url: 'https://262.ecma-international.org/8.0/#sec-allocatearraybuffer'
},
AllocateSharedArrayBuffer: {
url: 'https://262.ecma-international.org/8.0/#sec-allocatesharedarraybuffer'
},
AllocateTypedArray: {
url: 'https://262.ecma-international.org/8.0/#sec-allocatetypedarray'
},
AllocateTypedArrayBuffer: {
url: 'https://262.ecma-international.org/8.0/#sec-allocatetypedarraybuffer'
},
ArrayCreate: {
url: 'https://262.ecma-international.org/8.0/#sec-arraycreate'
},
ArraySetLength: {
url: 'https://262.ecma-international.org/8.0/#sec-arraysetlength'
},
ArraySpeciesCreate: {
url: 'https://262.ecma-international.org/8.0/#sec-arrayspeciescreate'
},
AsyncFunctionAwait: {
url: 'https://262.ecma-international.org/8.0/#sec-async-functions-abstract-operations-async-function-await'
},
AsyncFunctionCreate: {
url: 'https://262.ecma-international.org/8.0/#sec-async-functions-abstract-operations-async-function-create'
},
AsyncFunctionStart: {
url: 'https://262.ecma-international.org/8.0/#sec-async-functions-abstract-operations-async-function-start'
},
AtomicLoad: {
url: 'https://262.ecma-international.org/8.0/#sec-atomicload'
},
AtomicReadModifyWrite: {
url: 'https://262.ecma-international.org/8.0/#sec-atomicreadmodifywrite'
},
BlockDeclarationInstantiation: {
url: 'https://262.ecma-international.org/8.0/#sec-blockdeclarationinstantiation'
},
BoundFunctionCreate: {
url: 'https://262.ecma-international.org/8.0/#sec-boundfunctioncreate'
},
Call: {
url: 'https://262.ecma-international.org/8.0/#sec-call'
},
Canonicalize: {
url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-canonicalize-ch'
},
CanonicalNumericIndexString: {
url: 'https://262.ecma-international.org/8.0/#sec-canonicalnumericindexstring'
},
CharacterRange: {
url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-characterrange-abstract-operation'
},
CharacterRangeOrUnion: {
url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation'
},
CharacterSetMatcher: {
url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation'
},
CloneArrayBuffer: {
url: 'https://262.ecma-international.org/8.0/#sec-clonearraybuffer'
},
CompletePropertyDescriptor: {
url: 'https://262.ecma-international.org/8.0/#sec-completepropertydescriptor'
},
Completion: {
url: 'https://262.ecma-international.org/8.0/#sec-completion-record-specification-type'
},
CompletionRecord: {
url: 'https://262.ecma-international.org/8.0/#sec-completion-record-specification-type'
},
ComposeWriteEventBytes: {
url: 'https://262.ecma-international.org/8.0/#sec-composewriteeventbytes'
},
Construct: {
url: 'https://262.ecma-international.org/8.0/#sec-construct'
},
CopyDataBlockBytes: {
url: 'https://262.ecma-international.org/8.0/#sec-copydatablockbytes'
},
CreateArrayFromList: {
url: 'https://262.ecma-international.org/8.0/#sec-createarrayfromlist'
},
CreateArrayIterator: {
url: 'https://262.ecma-international.org/8.0/#sec-createarrayiterator'
},
CreateBuiltinFunction: {
url: 'https://262.ecma-international.org/8.0/#sec-createbuiltinfunction'
},
CreateByteDataBlock: {
url: 'https://262.ecma-international.org/8.0/#sec-createbytedatablock'
},
CreateDataProperty: {
url: 'https://262.ecma-international.org/8.0/#sec-createdataproperty'
},
CreateDataPropertyOrThrow: {
url: 'https://262.ecma-international.org/8.0/#sec-createdatapropertyorthrow'
},
CreateDynamicFunction: {
url: 'https://262.ecma-international.org/8.0/#sec-createdynamicfunction'
},
CreateHTML: {
url: 'https://262.ecma-international.org/8.0/#sec-createhtml'
},
CreateIntrinsics: {
url: 'https://262.ecma-international.org/8.0/#sec-createintrinsics'
},
CreateIterResultObject: {
url: 'https://262.ecma-international.org/8.0/#sec-createiterresultobject'
},
CreateListFromArrayLike: {
url: 'https://262.ecma-international.org/8.0/#sec-createlistfromarraylike'
},
CreateListIterator: {
url: 'https://262.ecma-international.org/8.0/#sec-createlistiterator'
},
CreateMapIterator: {
url: 'https://262.ecma-international.org/8.0/#sec-createmapiterator'
},
CreateMappedArgumentsObject: {
url: 'https://262.ecma-international.org/8.0/#sec-createmappedargumentsobject'
},
CreateMethodProperty: {
url: 'https://262.ecma-international.org/8.0/#sec-createmethodproperty'
},
CreatePerIterationEnvironment: {
url: 'https://262.ecma-international.org/8.0/#sec-createperiterationenvironment'
},
CreateRealm: {
url: 'https://262.ecma-international.org/8.0/#sec-createrealm'
},
CreateResolvingFunctions: {
url: 'https://262.ecma-international.org/8.0/#sec-createresolvingfunctions'
},
CreateSetIterator: {
url: 'https://262.ecma-international.org/8.0/#sec-createsetiterator'
},
CreateSharedByteDataBlock: {
url: 'https://262.ecma-international.org/8.0/#sec-createsharedbytedatablock'
},
CreateStringIterator: {
url: 'https://262.ecma-international.org/8.0/#sec-createstringiterator'
},
CreateUnmappedArgumentsObject: {
url: 'https://262.ecma-international.org/8.0/#sec-createunmappedargumentsobject'
},
DateFromTime: {
url: 'https://262.ecma-international.org/8.0/#sec-date-number'
},
Day: {
url: 'https://262.ecma-international.org/8.0/#eqn-Day'
},
DayFromYear: {
url: 'https://262.ecma-international.org/8.0/#eqn-DaysFromYear'
},
DaylightSavingTA: {
url: 'https://262.ecma-international.org/8.0/#sec-daylight-saving-time-adjustment'
},
DaysInYear: {
url: 'https://262.ecma-international.org/8.0/#eqn-DaysInYear'
},
DayWithinYear: {
url: 'https://262.ecma-international.org/8.0/#eqn-DayWithinYear'
},
Decode: {
url: 'https://262.ecma-international.org/8.0/#sec-decode'
},
DefinePropertyOrThrow: {
url: 'https://262.ecma-international.org/8.0/#sec-definepropertyorthrow'
},
DeletePropertyOrThrow: {
url: 'https://262.ecma-international.org/8.0/#sec-deletepropertyorthrow'
},
DetachArrayBuffer: {
url: 'https://262.ecma-international.org/8.0/#sec-detacharraybuffer'
},
Encode: {
url: 'https://262.ecma-international.org/8.0/#sec-encode'
},
EnqueueJob: {
url: 'https://262.ecma-international.org/8.0/#sec-enqueuejob'
},
EnterCriticalSection: {
url: 'https://262.ecma-international.org/8.0/#sec-entercriticalsection'
},
EnumerableOwnProperties: {
url: 'https://262.ecma-international.org/8.0/#sec-enumerableownproperties'
},
EnumerateObjectProperties: {
url: 'https://262.ecma-international.org/8.0/#sec-enumerate-object-properties'
},
EscapeRegExpPattern: {
url: 'https://262.ecma-international.org/8.0/#sec-escaperegexppattern'
},
EvalDeclarationInstantiation: {
url: 'https://262.ecma-international.org/8.0/#sec-evaldeclarationinstantiation'
},
EvaluateCall: {
url: 'https://262.ecma-international.org/8.0/#sec-evaluatecall'
},
EvaluateDirectCall: {
url: 'https://262.ecma-international.org/8.0/#sec-evaluatedirectcall'
},
EvaluateNew: {
url: 'https://262.ecma-international.org/8.0/#sec-evaluatenew'
},
EventSet: {
url: 'https://262.ecma-international.org/8.0/#sec-event-set'
},
floor: {
url: 'https://262.ecma-international.org/8.0/#eqn-floor'
},
ForBodyEvaluation: {
url: 'https://262.ecma-international.org/8.0/#sec-forbodyevaluation'
},
'ForIn/OfBodyEvaluation': {
url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset'
},
'ForIn/OfHeadEvaluation': {
url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind'
},
FromPropertyDescriptor: {
url: 'https://262.ecma-international.org/8.0/#sec-frompropertydescriptor'
},
FulfillPromise: {
url: 'https://262.ecma-international.org/8.0/#sec-fulfillpromise'
},
FunctionAllocate: {
url: 'https://262.ecma-international.org/8.0/#sec-functionallocate'
},
FunctionCreate: {
url: 'https://262.ecma-international.org/8.0/#sec-functioncreate'
},
FunctionDeclarationInstantiation: {
url: 'https://262.ecma-international.org/8.0/#sec-functiondeclarationinstantiation'
},
FunctionInitialize: {
url: 'https://262.ecma-international.org/8.0/#sec-functioninitialize'
},
GeneratorFunctionCreate: {
url: 'https://262.ecma-international.org/8.0/#sec-generatorfunctioncreate'
},
GeneratorResume: {
url: 'https://262.ecma-international.org/8.0/#sec-generatorresume'
},
GeneratorResumeAbrupt: {
url: 'https://262.ecma-international.org/8.0/#sec-generatorresumeabrupt'
},
GeneratorStart: {
url: 'https://262.ecma-international.org/8.0/#sec-generatorstart'
},
GeneratorValidate: {
url: 'https://262.ecma-international.org/8.0/#sec-generatorvalidate'
},
GeneratorYield: {
url: 'https://262.ecma-international.org/8.0/#sec-generatoryield'
},
Get: {
url: 'https://262.ecma-international.org/8.0/#sec-get-o-p'
},
GetActiveScriptOrModule: {
url: 'https://262.ecma-international.org/8.0/#sec-getactivescriptormodule'
},
GetBase: {
url: 'https://262.ecma-international.org/8.0/#ao-getbase'
},
GetFunctionRealm: {
url: 'https://262.ecma-international.org/8.0/#sec-getfunctionrealm'
},
GetGlobalObject: {
url: 'https://262.ecma-international.org/8.0/#sec-getglobalobject'
},
GetIdentifierReference: {
url: 'https://262.ecma-international.org/8.0/#sec-getidentifierreference'
},
GetIterator: {
url: 'https://262.ecma-international.org/8.0/#sec-getiterator'
},
GetMethod: {
url: 'https://262.ecma-international.org/8.0/#sec-getmethod'
},
GetModifySetValueInBuffer: {
url: 'https://262.ecma-international.org/8.0/#sec-getmodifysetvalueinbuffer'
},
GetModuleNamespace: {
url: 'https://262.ecma-international.org/8.0/#sec-getmodulenamespace'
},
GetNewTarget: {
url: 'https://262.ecma-international.org/8.0/#sec-getnewtarget'
},
GetOwnPropertyKeys: {
url: 'https://262.ecma-international.org/8.0/#sec-getownpropertykeys'
},
GetPrototypeFromConstructor: {
url: 'https://262.ecma-international.org/8.0/#sec-getprototypefromconstructor'
},
GetReferencedName: {
url: 'https://262.ecma-international.org/8.0/#ao-getreferencedname'
},
GetSubstitution: {
url: 'https://262.ecma-international.org/8.0/#sec-getsubstitution'
},
GetSuperConstructor: {
url: 'https://262.ecma-international.org/8.0/#sec-getsuperconstructor'
},
GetTemplateObject: {
url: 'https://262.ecma-international.org/8.0/#sec-gettemplateobject'
},
GetThisEnvironment: {
url: 'https://262.ecma-international.org/8.0/#sec-getthisenvironment'
},
GetThisValue: {
url: 'https://262.ecma-international.org/8.0/#sec-getthisvalue'
},
GetV: {
url: 'https://262.ecma-international.org/8.0/#sec-getv'
},
GetValue: {
url: 'https://262.ecma-international.org/8.0/#sec-getvalue'
},
GetValueFromBuffer: {
url: 'https://262.ecma-international.org/8.0/#sec-getvaluefrombuffer'
},
GetViewValue: {
url: 'https://262.ecma-international.org/8.0/#sec-getviewvalue'
},
GetWaiterList: {
url: 'https://262.ecma-international.org/8.0/#sec-getwaiterlist'
},
GlobalDeclarationInstantiation: {
url: 'https://262.ecma-international.org/8.0/#sec-globaldeclarationinstantiation'
},
'happens-before': {
url: 'https://262.ecma-international.org/8.0/#sec-happens-before'
},
HasOwnProperty: {
url: 'https://262.ecma-international.org/8.0/#sec-hasownproperty'
},
HasPrimitiveBase: {
url: 'https://262.ecma-international.org/8.0/#ao-hasprimitivebase'
},
HasProperty: {
url: 'https://262.ecma-international.org/8.0/#sec-hasproperty'
},
'host-synchronizes-with': {
url: 'https://262.ecma-international.org/8.0/#sec-host-synchronizes-with'
},
HostEventSet: {
url: 'https://262.ecma-international.org/8.0/#sec-hosteventset'
},
HourFromTime: {
url: 'https://262.ecma-international.org/8.0/#eqn-HourFromTime'
},
IfAbruptRejectPromise: {
url: 'https://262.ecma-international.org/8.0/#sec-ifabruptrejectpromise'
},
ImportedLocalNames: {
url: 'https://262.ecma-international.org/8.0/#sec-importedlocalnames'
},
InitializeBoundName: {
url: 'https://262.ecma-international.org/8.0/#sec-initializeboundname'
},
InitializeHostDefinedRealm: {
url: 'https://262.ecma-international.org/8.0/#sec-initializehostdefinedrealm'
},
InitializeReferencedBinding: {
url: 'https://262.ecma-international.org/8.0/#sec-initializereferencedbinding'
},
InLeapYear: {
url: 'https://262.ecma-international.org/8.0/#eqn-InLeapYear'
},
InstanceofOperator: {
url: 'https://262.ecma-international.org/8.0/#sec-instanceofoperator'
},
IntegerIndexedElementGet: {
url: 'https://262.ecma-international.org/8.0/#sec-integerindexedelementget'
},
IntegerIndexedElementSet: {
url: 'https://262.ecma-international.org/8.0/#sec-integerindexedelementset'
},
IntegerIndexedObjectCreate: {
url: 'https://262.ecma-international.org/8.0/#sec-integerindexedobjectcreate'
},
InternalizeJSONProperty: {
url: 'https://262.ecma-international.org/8.0/#sec-internalizejsonproperty'
},
Invoke: {
url: 'https://262.ecma-international.org/8.0/#sec-invoke'
},
IsAccessorDescriptor: {
url: 'https://262.ecma-international.org/8.0/#sec-isaccessordescriptor'
},
IsAnonymousFunctionDefinition: {
url: 'https://262.ecma-international.org/8.0/#sec-isanonymousfunctiondefinition'
},
IsArray: {
url: 'https://262.ecma-international.org/8.0/#sec-isarray'
},
IsCallable: {
url: 'https://262.ecma-international.org/8.0/#sec-iscallable'
},
IsCompatiblePropertyDescriptor: {
url: 'https://262.ecma-international.org/8.0/#sec-iscompatiblepropertydescriptor'
},
IsConcatSpreadable: {
url: 'https://262.ecma-international.org/8.0/#sec-isconcatspreadable'
},
IsConstructor: {
url: 'https://262.ecma-international.org/8.0/#sec-isconstructor'
},
IsDataDescriptor: {
url: 'https://262.ecma-international.org/8.0/#sec-isdatadescriptor'
},
IsDetachedBuffer: {
url: 'https://262.ecma-international.org/8.0/#sec-isdetachedbuffer'
},
IsExtensible: {
url: 'https://262.ecma-international.org/8.0/#sec-isextensible-o'
},
IsGenericDescriptor: {
url: 'https://262.ecma-international.org/8.0/#sec-isgenericdescriptor'
},
IsInTailPosition: {
url: 'https://262.ecma-international.org/8.0/#sec-isintailposition'
},
IsInteger: {
url: 'https://262.ecma-international.org/8.0/#sec-isinteger'
},
IsLabelledFunction: {
url: 'https://262.ecma-international.org/8.0/#sec-islabelledfunction'
},
IsPromise: {
url: 'https://262.ecma-international.org/8.0/#sec-ispromise'
},
IsPropertyKey: {
url: 'https://262.ecma-international.org/8.0/#sec-ispropertykey'
},
IsPropertyReference: {
url: 'https://262.ecma-international.org/8.0/#ao-ispropertyreference'
},
IsRegExp: {
url: 'https://262.ecma-international.org/8.0/#sec-isregexp'
},
IsSharedArrayBuffer: {
url: 'https://262.ecma-international.org/8.0/#sec-issharedarraybuffer'
},
IsStrictReference: {
url: 'https://262.ecma-international.org/8.0/#ao-isstrictreference'
},
IsSuperReference: {
url: 'https://262.ecma-international.org/8.0/#ao-issuperreference'
},
IsUnresolvableReference: {
url: 'https://262.ecma-international.org/8.0/#ao-isunresolvablereference'
},
IsWordChar: {
url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation'
},
IterableToList: {
url: 'https://262.ecma-international.org/8.0/#sec-iterabletolist'
},
IteratorClose: {
url: 'https://262.ecma-international.org/8.0/#sec-iteratorclose'
},
IteratorComplete: {
url: 'https://262.ecma-international.org/8.0/#sec-iteratorcomplete'
},
IteratorNext: {
url: 'https://262.ecma-international.org/8.0/#sec-iteratornext'
},
IteratorStep: {
url: 'https://262.ecma-international.org/8.0/#sec-iteratorstep'
},
IteratorValue: {
url: 'https://262.ecma-international.org/8.0/#sec-iteratorvalue'
},
LeaveCriticalSection: {
url: 'https://262.ecma-international.org/8.0/#sec-leavecriticalsection'
},
LocalTime: {
url: 'https://262.ecma-international.org/8.0/#sec-localtime'
},
LoopContinues: {
url: 'https://262.ecma-international.org/8.0/#sec-loopcontinues'
},
MakeArgGetter: {
url: 'https://262.ecma-international.org/8.0/#sec-makearggetter'
},
MakeArgSetter: {
url: 'https://262.ecma-international.org/8.0/#sec-makeargsetter'
},
MakeClassConstructor: {
url: 'https://262.ecma-international.org/8.0/#sec-makeclassconstructor'
},
MakeConstructor: {
url: 'https://262.ecma-international.org/8.0/#sec-makeconstructor'
},
MakeDate: {
url: 'https://262.ecma-international.org/8.0/#sec-makedate'
},
MakeDay: {
url: 'https://262.ecma-international.org/8.0/#sec-makeday'
},
MakeMethod: {
url: 'https://262.ecma-international.org/8.0/#sec-makemethod'
},
MakeSuperPropertyReference: {
url: 'https://262.ecma-international.org/8.0/#sec-makesuperpropertyreference'
},
MakeTime: {
url: 'https://262.ecma-international.org/8.0/#sec-maketime'
},
max: {
url: 'https://262.ecma-international.org/8.0/#eqn-max'
},
'memory-order': {
url: 'https://262.ecma-international.org/8.0/#sec-memory-order'
},
min: {
url: 'https://262.ecma-international.org/8.0/#eqn-min'
},
MinFromTime: {
url: 'https://262.ecma-international.org/8.0/#eqn-MinFromTime'
},
ModuleNamespaceCreate: {
url: 'https://262.ecma-international.org/8.0/#sec-modulenamespacecreate'
},
modulo: {
url: 'https://262.ecma-international.org/8.0/#eqn-modulo'
},
MonthFromTime: {
url: 'https://262.ecma-international.org/8.0/#eqn-MonthFromTime'
},
msFromTime: {
url: 'https://262.ecma-international.org/8.0/#eqn-msFromTime'
},
NewDeclarativeEnvironment: {
url: 'https://262.ecma-international.org/8.0/#sec-newdeclarativeenvironment'
},
NewFunctionEnvironment: {
url: 'https://262.ecma-international.org/8.0/#sec-newfunctionenvironment'
},
NewGlobalEnvironment: {
url: 'https://262.ecma-international.org/8.0/#sec-newglobalenvironment'
},
NewModuleEnvironment: {
url: 'https://262.ecma-international.org/8.0/#sec-newmoduleenvironment'
},
NewObjectEnvironment: {
url: 'https://262.ecma-international.org/8.0/#sec-newobjectenvironment'
},
NewPromiseCapability: {
url: 'https://262.ecma-international.org/8.0/#sec-newpromisecapability'
},
NormalCompletion: {
url: 'https://262.ecma-international.org/8.0/#sec-normalcompletion'
},
NumberToRawBytes: {
url: 'https://262.ecma-international.org/8.0/#sec-numbertorawbytes'
},
ObjectCreate: {
url: 'https://262.ecma-international.org/8.0/#sec-objectcreate'
},
ObjectDefineProperties: {
url: 'https://262.ecma-international.org/8.0/#sec-objectdefineproperties'
},
OrdinaryCallBindThis: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinarycallbindthis'
},
OrdinaryCallEvaluateBody: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinarycallevaluatebody'
},
OrdinaryCreateFromConstructor: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinarycreatefromconstructor'
},
OrdinaryDefineOwnProperty: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinarydefineownproperty'
},
OrdinaryDelete: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinarydelete'
},
OrdinaryGet: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinaryget'
},
OrdinaryGetOwnProperty: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinarygetownproperty'
},
OrdinaryGetPrototypeOf: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinarygetprototypeof'
},
OrdinaryHasInstance: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinaryhasinstance'
},
OrdinaryHasProperty: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinaryhasproperty'
},
OrdinaryIsExtensible: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinaryisextensible'
},
OrdinaryOwnPropertyKeys: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinaryownpropertykeys'
},
OrdinaryPreventExtensions: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinarypreventextensions'
},
OrdinarySet: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinaryset'
},
OrdinarySetPrototypeOf: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinarysetprototypeof'
},
OrdinaryToPrimitive: {
url: 'https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive'
},
ParseModule: {
url: 'https://262.ecma-international.org/8.0/#sec-parsemodule'
},
ParseScript: {
url: 'https://262.ecma-international.org/8.0/#sec-parse-script'
},
PerformEval: {
url: 'https://262.ecma-international.org/8.0/#sec-performeval'
},
PerformPromiseAll: {
url: 'https://262.ecma-international.org/8.0/#sec-performpromiseall'
},
PerformPromiseRace: {
url: 'https://262.ecma-international.org/8.0/#sec-performpromiserace'
},
PerformPromiseThen: {
url: 'https://262.ecma-international.org/8.0/#sec-performpromisethen'
},
PrepareForOrdinaryCall: {
url: 'https://262.ecma-international.org/8.0/#sec-prepareforordinarycall'
},
PrepareForTailCall: {
url: 'https://262.ecma-international.org/8.0/#sec-preparefortailcall'
},
PromiseReactionJob: {
url: 'https://262.ecma-international.org/8.0/#sec-promisereactionjob'
},
PromiseResolveThenableJob: {
url: 'https://262.ecma-international.org/8.0/#sec-promiseresolvethenablejob'
},
ProxyCreate: {
url: 'https://262.ecma-international.org/8.0/#sec-proxycreate'
},
PutValue: {
url: 'https://262.ecma-international.org/8.0/#sec-putvalue'
},
QuoteJSONString: {
url: 'https://262.ecma-international.org/8.0/#sec-quotejsonstring'
},
RawBytesToNumber: {
url: 'https://262.ecma-international.org/8.0/#sec-rawbytestonumber'
},
'reads-bytes-from': {
url: 'https://262.ecma-international.org/8.0/#sec-reads-bytes-from'
},
'reads-from': {
url: 'https://262.ecma-international.org/8.0/#sec-reads-from'
},
RegExpAlloc: {
url: 'https://262.ecma-international.org/8.0/#sec-regexpalloc'
},
RegExpBuiltinExec: {
url: 'https://262.ecma-international.org/8.0/#sec-regexpbuiltinexec'
},
RegExpCreate: {
url: 'https://262.ecma-international.org/8.0/#sec-regexpcreate'
},
RegExpExec: {
url: 'https://262.ecma-international.org/8.0/#sec-regexpexec'
},
RegExpInitialize: {
url: 'https://262.ecma-international.org/8.0/#sec-regexpinitialize'
},
RejectPromise: {
url: 'https://262.ecma-international.org/8.0/#sec-rejectpromise'
},
RemoveWaiter: {
url: 'https://262.ecma-international.org/8.0/#sec-removewaiter'
},
RemoveWaiters: {
url: 'https://262.ecma-international.org/8.0/#sec-removewaiters'
},
RepeatMatcher: {
url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-repeatmatcher-abstract-operation'
},
RequireObjectCoercible: {
url: 'https://262.ecma-international.org/8.0/#sec-requireobjectcoercible'
},
ResolveBinding: {
url: 'https://262.ecma-international.org/8.0/#sec-resolvebinding'
},
ResolveThisBinding: {
url: 'https://262.ecma-international.org/8.0/#sec-resolvethisbinding'
},
ReturnIfAbrupt: {
url: 'https://262.ecma-international.org/8.0/#sec-returnifabrupt'
},
RunJobs: {
url: 'https://262.ecma-international.org/8.0/#sec-runjobs'
},
SameValue: {
url: 'https://262.ecma-international.org/8.0/#sec-samevalue'
},
SameValueNonNumber: {
url: 'https://262.ecma-international.org/8.0/#sec-samevaluenonnumber'
},
SameValueZero: {
url: 'https://262.ecma-international.org/8.0/#sec-samevaluezero'
},
ScriptEvaluation: {
url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-scriptevaluation'
},
ScriptEvaluationJob: {
url: 'https://262.ecma-international.org/8.0/#sec-scriptevaluationjob'
},
SecFromTime: {
url: 'https://262.ecma-international.org/8.0/#eqn-SecFromTime'
},
SerializeJSONArray: {
url: 'https://262.ecma-international.org/8.0/#sec-serializejsonarray'
},
SerializeJSONObject: {
url: 'https://262.ecma-international.org/8.0/#sec-serializejsonobject'
},
SerializeJSONProperty: {
url: 'https://262.ecma-international.org/8.0/#sec-serializejsonproperty'
},
Set: {
url: 'https://262.ecma-international.org/8.0/#sec-set-o-p-v-throw'
},
SetDefaultGlobalBindings: {
url: 'https://262.ecma-international.org/8.0/#sec-setdefaultglobalbindings'
},
SetFunctionName: {
url: 'https://262.ecma-international.org/8.0/#sec-setfunctionname'
},
SetImmutablePrototype: {
url: 'https://262.ecma-international.org/8.0/#sec-set-immutable-prototype'
},
SetIntegrityLevel: {
url: 'https://262.ecma-international.org/8.0/#sec-setintegritylevel'
},
SetRealmGlobalObject: {
url: 'https://262.ecma-international.org/8.0/#sec-setrealmglobalobject'
},
SetValueInBuffer: {
url: 'https://262.ecma-international.org/8.0/#sec-setvalueinbuffer'
},
SetViewValue: {
url: 'https://262.ecma-international.org/8.0/#sec-setviewvalue'
},
SharedDataBlockEventSet: {
url: 'https://262.ecma-international.org/8.0/#sec-sharedatablockeventset'
},
SortCompare: {
url: 'https://262.ecma-international.org/8.0/#sec-sortcompare'
},
SpeciesConstructor: {
url: 'https://262.ecma-international.org/8.0/#sec-speciesconstructor'
},
SplitMatch: {
url: 'https://262.ecma-international.org/8.0/#sec-splitmatch'
},
'Strict Equality Comparison': {
url: 'https://262.ecma-international.org/8.0/#sec-strict-equality-comparison'
},
StringCreate: {
url: 'https://262.ecma-international.org/8.0/#sec-stringcreate'
},
StringGetOwnProperty: {
url: 'https://262.ecma-international.org/8.0/#sec-stringgetownproperty'
},
Suspend: {
url: 'https://262.ecma-international.org/8.0/#sec-suspend'
},
SymbolDescriptiveString: {
url: 'https://262.ecma-international.org/8.0/#sec-symboldescriptivestring'
},
'synchronizes-with': {
url: 'https://262.ecma-international.org/8.0/#sec-synchronizes-with'
},
TestIntegrityLevel: {
url: 'https://262.ecma-international.org/8.0/#sec-testintegritylevel'
},
thisBooleanValue: {
url: 'https://262.ecma-international.org/8.0/#sec-thisbooleanvalue'
},
thisNumberValue: {
url: 'https://262.ecma-international.org/8.0/#sec-thisnumbervalue'
},
thisStringValue: {
url: 'https://262.ecma-international.org/8.0/#sec-thisstringvalue'
},
thisTimeValue: {
url: 'https://262.ecma-international.org/8.0/#sec-thistimevalue'
},
TimeClip: {
url: 'https://262.ecma-international.org/8.0/#sec-timeclip'
},
TimeFromYear: {
url: 'https://262.ecma-international.org/8.0/#eqn-TimeFromYear'
},
TimeWithinDay: {
url: 'https://262.ecma-international.org/8.0/#eqn-TimeWithinDay'
},
ToBoolean: {
url: 'https://262.ecma-international.org/8.0/#sec-toboolean'
},
ToDateString: {
url: 'https://262.ecma-international.org/8.0/#sec-todatestring'
},
ToIndex: {
url: 'https://262.ecma-international.org/8.0/#sec-toindex'
},
ToInt16: {
url: 'https://262.ecma-international.org/8.0/#sec-toint16'
},
ToInt32: {
url: 'https://262.ecma-international.org/8.0/#sec-toint32'
},
ToInt8: {
url: 'https://262.ecma-international.org/8.0/#sec-toint8'
},
ToInteger: {
url: 'https://262.ecma-international.org/8.0/#sec-tointeger'
},
ToLength: {
url: 'https://262.ecma-international.org/8.0/#sec-tolength'
},
ToNumber: {
url: 'https://262.ecma-international.org/8.0/#sec-tonumber'
},
ToObject: {
url: 'https://262.ecma-international.org/8.0/#sec-toobject'
},
TopLevelModuleEvaluationJob: {
url: 'https://262.ecma-international.org/8.0/#sec-toplevelmoduleevaluationjob'
},
ToPrimitive: {
url: 'https://262.ecma-international.org/8.0/#sec-toprimitive'
},
ToPropertyDescriptor: {
url: 'https://262.ecma-international.org/8.0/#sec-topropertydescriptor'
},
ToPropertyKey: {
url: 'https://262.ecma-international.org/8.0/#sec-topropertykey'
},
ToString: {
url: 'https://262.ecma-international.org/8.0/#sec-tostring'
},
'ToString Applied to the Number Type': {
url: 'https://262.ecma-international.org/8.0/#sec-tostring-applied-to-the-number-type'
},
ToUint16: {
url: 'https://262.ecma-international.org/8.0/#sec-touint16'
},
ToUint32: {
url: 'https://262.ecma-international.org/8.0/#sec-touint32'
},
ToUint8: {
url: 'https://262.ecma-international.org/8.0/#sec-touint8'
},
ToUint8Clamp: {
url: 'https://262.ecma-international.org/8.0/#sec-touint8clamp'
},
TriggerPromiseReactions: {
url: 'https://262.ecma-international.org/8.0/#sec-triggerpromisereactions'
},
Type: {
url: 'https://262.ecma-international.org/8.0/#sec-ecmascript-data-types-and-values'
},
TypedArrayCreate: {
url: 'https://262.ecma-international.org/8.0/#typedarray-create'
},
TypedArraySpeciesCreate: {
url: 'https://262.ecma-international.org/8.0/#typedarray-species-create'
},
UpdateEmpty: {
url: 'https://262.ecma-international.org/8.0/#sec-updateempty'
},
UTC: {
url: 'https://262.ecma-international.org/8.0/#sec-utc-t'
},
UTF16Decode: {
url: 'https://262.ecma-international.org/8.0/#sec-utf16decode'
},
UTF16Encoding: {
url: 'https://262.ecma-international.org/8.0/#sec-utf16encoding'
},
ValidateAndApplyPropertyDescriptor: {
url: 'https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor'
},
ValidateAtomicAccess: {
url: 'https://262.ecma-international.org/8.0/#sec-validateatomicaccess'
},
ValidateSharedIntegerTypedArray: {
url: 'https://262.ecma-international.org/8.0/#sec-validatesharedintegertypedarray'
},
ValidateTypedArray: {
url: 'https://262.ecma-international.org/8.0/#sec-validatetypedarray'
},
ValueOfReadEvent: {
url: 'https://262.ecma-international.org/8.0/#sec-valueofreadevent'
},
WakeWaiter: {
url: 'https://262.ecma-international.org/8.0/#sec-wakewaiter'
},
WeekDay: {
url: 'https://262.ecma-international.org/8.0/#sec-week-day'
},
WordCharacters: {
url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation'
},
YearFromTime: {
url: 'https://262.ecma-international.org/8.0/#eqn-YearFromTime'
}
};
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CatchScope = void 0;
const ScopeBase_1 = require("./ScopeBase");
const ScopeType_1 = require("./ScopeType");
class CatchScope extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.catch, upperScope, block, false);
}
}
exports.CatchScope = CatchScope;
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=getExtendedLifecycle.spec.d.ts.map
@@ -0,0 +1,45 @@
import crypto from 'crypto'
import { urlAlphabet } from './url-alphabet/index.js'
const POOL_SIZE_MULTIPLIER = 128
let pool, poolOffset
let fillPool = bytes => {
if (!pool || pool.length < bytes) {
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)
crypto.randomFillSync(pool)
poolOffset = 0
} else if (poolOffset + bytes > pool.length) {
crypto.randomFillSync(pool)
poolOffset = 0
}
poolOffset += bytes
}
let random = bytes => {
fillPool((bytes |= 0))
return pool.subarray(poolOffset - bytes, poolOffset)
}
let customRandom = (alphabet, defaultSize, getRandom) => {
let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
return (size = defaultSize) => {
let id = ''
while (true) {
let bytes = getRandom(step)
let i = step
while (i--) {
id += alphabet[bytes[i] & mask] || ''
if (id.length === size) return id
}
}
}
}
let customAlphabet = (alphabet, size = 21) =>
customRandom(alphabet, size, random)
let nanoid = (size = 21) => {
fillPool((size |= 0))
let id = ''
for (let i = poolOffset - size; i < poolOffset; i++) {
id += urlAlphabet[pool[i] & 63]
}
return id
}
export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var ListMarkerRole = {
relatedConcepts: [],
type: 'structure'
};
var _default = ListMarkerRole;
exports.default = _default;
@@ -0,0 +1,7 @@
'use strict';
export default {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
};
@@ -0,0 +1,27 @@
import apply from './_apply.js';
import arrayMap from './_arrayMap.js';
import baseIteratee from './_baseIteratee.js';
import baseRest from './_baseRest.js';
import baseUnary from './_baseUnary.js';
import flatRest from './_flatRest.js';
/**
* Creates a function like `_.over`.
*
* @private
* @param {Function} arrayFunc The function to iterate over iteratees.
* @returns {Function} Returns the new over function.
*/
function createOver(arrayFunc) {
return flatRest(function(iteratees) {
iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
return baseRest(function(args) {
var thisArg = this;
return arrayFunc(iteratees, function(iteratee) {
return apply(iteratee, thisArg, args);
});
});
});
}
export default createOver;
@@ -0,0 +1,5 @@
import { Factory } from '../../binding/models/Factory';
import { FactoryBinding } from '../../binding/models/FactoryBinding';
import { ResolutionParams } from '../models/ResolutionParams';
export declare function resolveFactoryBindingCallback<TActivated extends Factory<unknown>>(params: ResolutionParams, binding: FactoryBinding<TActivated>): TActivated | Promise<TActivated>;
//# sourceMappingURL=resolveFactoryBindingCallback.d.ts.map
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var InlineTextBoxRole = {
relatedConcepts: [{
module: 'HTML',
concept: {
name: 'input'
}
}],
type: 'widget'
};
var _default = InlineTextBoxRole;
exports.default = _default;
@@ -0,0 +1 @@
{"name":"pumpify","version":"1.5.1","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532123176,"integrity":"sha512-JO7Ea4yEUTrEH9QWtrb8jKysCKnQT208FLl2FR/XFr0b82P9WL9HLQAwBHVqxP9U6a0KSGKMiRnHgZ+T+pPQYA==","mode":420,"size":779},".travis.yml":{"checkedAt":1794532123176,"integrity":"sha512-bIEj6g2gjKo78NL10fVPZQJaYmovIjC3aj+xU7S5RKg2VuC8W5K51djRLslV8uwMKHtGde+tEb+5p4KRIbiSrw==","mode":420,"size":68},"index.js":{"checkedAt":1794532123176,"integrity":"sha512-OMW05GbCj5MF7vFrgPwBif1mLIQc8hW9KJtpU4IpXBSz8mlqIkmJfAZOz3C7VUpWRw3b+vaNfZ8oBm2qUffSUQ==","mode":420,"size":1758},"LICENSE":{"checkedAt":1794532123176,"integrity":"sha512-tSuhQwQoEtbdEDGhKUav3bbo+Ou8cWnFnBONFqr8XiYarpL+ax6pSj2A450kFcSyGXEO9Gk5ot8TXbJKDPcS+w==","mode":420,"size":1078},"README.md":{"checkedAt":1794532123177,"integrity":"sha512-Ts2MfuxPzIf76oDn3BXholSPfk2z8nMPydOfH1jNoICSCxOg4nJXSorm2JMwLMGljbAJrGem8J7aoT5e7we97Q==","mode":420,"size":1904},"test.js":{"checkedAt":1794532123177,"integrity":"sha512-0XbnxiNCDln9kijeS0ju/LuUq9/o8bKDEMCnaIgQ4Vr1yELsVulSl+VOtCB8xXSZTuyhDO1iAXflm6iroKOnMA==","mode":420,"size":4568}}}
@@ -0,0 +1,39 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description: "disallow the `Array.prototype.forEach` method.",
category: "ES5",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-array-prototype-foreach.html",
},
fixable: null,
messages: {
forbidden: "ES5 '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
Array: ["forEach"],
})
},
}
@@ -0,0 +1,7 @@
module.exports = {
'cap': false,
'curry': false,
'fixed': false,
'immutable': false,
'rearg': false
};
@@ -0,0 +1,40 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description:
"disallow the `String.prototype.{padStart,padEnd}` methods.",
category: "ES2017",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-string-prototype-padstart-padend.html",
},
fixable: null,
messages: {
forbidden: "ES2017 '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
String: ["padEnd", "padStart"],
})
},
}
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,aAAa,CAAC,UAAU,CAAC;IAC3C,iBAAiB,CAAC,OAAS,CAAC,qBAAqB,EAAE,KAAK,UAAU,CAAC,sBAAsB,CAAC;IAC1F,cAAc,CAAC,OAAS,GAAG,KAAK,KAAK,CAAC,WAAQ,CAAC;IAC/C,cAAc,CAAC,WAAW,CAAC;IAC3B,kBAAkB,CAAC,OAAS,CAAC,qBAAqB,EAAE,KAAK,UAAU,CAAC,qBAAqB,CAAC;IAC1F,sBAAsB,CAAC,wCAAwC,CAAC;IAChE,UAAU,CAAC,WAAW,CAAC;IACvB,aAAa,CAAC,iBAAiB,CAAC;IAChC,YAAY,CAAC,iBAAiB,CAAC;AACjC","sources":["packages/@react-aria/table/intl/es-ES.json"],"sourcesContent":["{\n \"ascending\": \"ascendente\",\n \"ascendingSort\": \"ordenado por columna {columnName} en sentido ascendente\",\n \"columnSize\": \"{value} píxeles\",\n \"descending\": \"descendente\",\n \"descendingSort\": \"ordenado por columna {columnName} en orden descendente\",\n \"resizerDescription\": \"Pulse Intro para empezar a redimensionar\",\n \"select\": \"Seleccionar\",\n \"selectAll\": \"Seleccionar todos\",\n \"sortable\": \"columna ordenable\"\n}\n"],"names":[],"version":3,"file":"es-ES.module.js.map"}
@@ -0,0 +1,12 @@
declare namespace SLOT {
type InternalSlot = string; // `[[${string}]]`; // TODO: restrict this to require the brackets
}
declare const SLOT: {
assert(O: object, slot: SLOT.InternalSlot): void;
get(O: object, slot: SLOT.InternalSlot): unknown;
set(O: object, slot: SLOT.InternalSlot, value?: unknown): void;
has(O: object, slot: SLOT.InternalSlot): boolean;
}
export = SLOT;
@@ -0,0 +1,69 @@
// Generated by LiveScript 1.6.0
var apply, curry, flip, fix, over, memoize, toString$ = {}.toString;
apply = curry$(function(f, list){
return f.apply(null, list);
});
curry = function(f){
return curry$(f);
};
flip = curry$(function(f, x, y){
return f(y, x);
});
fix = function(f){
return function(g){
return function(){
return f(g(g)).apply(null, arguments);
};
}(function(g){
return function(){
return f(g(g)).apply(null, arguments);
};
});
};
over = curry$(function(f, g, x, y){
return f(g(x), g(y));
});
memoize = function(f){
var memo;
memo = {};
return function(){
var args, res$, i$, to$, key, arg;
res$ = [];
for (i$ = 0, to$ = arguments.length; i$ < to$; ++i$) {
res$.push(arguments[i$]);
}
args = res$;
key = (function(){
var i$, ref$, len$, results$ = [];
for (i$ = 0, len$ = (ref$ = args).length; i$ < len$; ++i$) {
arg = ref$[i$];
results$.push(arg + toString$.call(arg).slice(8, -1));
}
return results$;
}()).join('');
return memo[key] = key in memo
? memo[key]
: f.apply(null, args);
};
};
module.exports = {
curry: curry,
flip: flip,
fix: fix,
apply: apply,
over: over,
memoize: memoize
};
function curry$(f, bound){
var context,
_curry = function(args) {
return f.length > 1 ? function(){
var params = args ? args.concat() : [];
context = bound ? context || this : this;
return params.push.apply(params, arguments) <
f.length && arguments.length ?
_curry.call(context, params) : f.apply(context, params);
} : f;
};
return _curry();
}
@@ -0,0 +1,3 @@
export declare function calculateSha1(filePath: string): Promise<Buffer>;
export declare function computeMd5AndLengthWithLimit(filePath: string, limit?: number): Promise<Buffer>;
export declare function calculateSha1StreamBytes(filePath: string): Promise<Buffer[]>;
@@ -0,0 +1,28 @@
/**
* Represents any possible JSON value:
* - number
* - string
* - boolean
* - null
* - object (with any JSON value as property)
* - array (with any JSON value as element)
*/
export declare type JsonValue = number | string | boolean | null | JsonObject | JsonArray;
/**
* Represents a JSON object.
*/
export declare type JsonObject = {
[k: string]: JsonValue;
};
interface JsonArray extends Array<JsonValue> {
}
/**
* Get the type of a JSON value.
* Distinguishes between array, null and object.
*/
export declare function typeofJsonValue(value: JsonValue | undefined): 'string' | 'number' | 'object' | 'array' | 'null' | 'boolean' | 'undefined';
/**
* Is this a JSON object (instead of an array or null)?
*/
export declare function isJsonObject(value: JsonValue): value is JsonObject;
export {};
@@ -0,0 +1 @@
export declare function escapeRegExp(string?: string): string;
@@ -0,0 +1 @@
{"version":3,"file":"issue_549.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/test/bugs/issue_549.int.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_symbol = void 0;
const base_config_1 = require("./base-config");
exports.esnext_symbol = {
libs: [],
variables: [['Symbol', base_config_1.TYPE]],
};
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('now', require('../now'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"version":3,"file":"updateMaybeClassMetadataProperty.d.ts","sourceRoot":"","sources":["../../../../src/metadata/actions/updateMaybeClassMetadataProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,wBAAgB,gCAAgC,CAC9C,cAAc,EAAE,CACd,oBAAoB,EAAE,yBAAyB,GAAG,SAAS,KACxD,yBAAyB,EAC9B,WAAW,EAAE,MAAM,GAAG,MAAM,GAC3B,CAAC,aAAa,EAAE,kBAAkB,KAAK,kBAAkB,CAS3D"}
@@ -0,0 +1,67 @@
import { toHash } from './to-hash';
import { update } from './update';
import { astish } from './astish';
import { parse } from './parse';
/**
* In-memory cache.
*/
let cache = {};
/**
* Stringifies a object structure
* @param {Object} data
* @returns {String}
*/
let stringify = (data) => {
if (typeof data == 'object') {
let out = '';
for (let p in data) out += p + stringify(data[p]);
return out;
} else {
return data;
}
};
/**
* Generates the needed className
* @param {String|Object} compiled
* @param {Object} sheet StyleSheet target
* @param {Object} global Global flag
* @param {Boolean} append Append or not
* @param {Boolean} keyframes Keyframes mode. The input is the keyframes body that needs to be wrapped.
* @returns {String}
*/
export let hash = (compiled, sheet, global, append, keyframes) => {
// Get a string representation of the object or the value that is called 'compiled'
let stringifiedCompiled = stringify(compiled);
// Retrieve the className from cache or hash it in place
let className =
cache[stringifiedCompiled] || (cache[stringifiedCompiled] = toHash(stringifiedCompiled));
// If there's no entry for the current className
if (!cache[className]) {
// Build the _ast_-ish structure if needed
let ast = stringifiedCompiled !== compiled ? compiled : astish(compiled);
// Parse it
cache[className] = parse(
// For keyframes
keyframes ? { ['@keyframes ' + className]: ast } : ast,
global ? '' : '.' + className
);
}
// If the global flag is set, save the current stringified and compiled CSS to `cache.g`
// to allow replacing styles in <style /> instead of appending them.
// This is required for using `createGlobalStyles` with themes
let cssToReplace = global && cache.g ? cache.g : null;
if (global) cache.g = cache[className];
// add or update
update(cache[className], sheet, append, cssToReplace);
// return hash
return className;
};
@@ -0,0 +1,8 @@
'use strict';
// eslint-disable-next-line no-extra-parens, no-empty-function
const cached = /** @type {GeneratorFunctionConstructor} */ (function* () {}.constructor);
/** @type {import('.')} */
module.exports = () => cached;
@@ -0,0 +1,163 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServiceResolutionManager = void 0;
const common_1 = require("@inversifyjs/common");
const core_1 = require("@inversifyjs/core");
const InversifyContainerError_1 = require("../../error/models/InversifyContainerError");
const InversifyContainerErrorKind_1 = require("../../error/models/InversifyContainerErrorKind");
class ServiceResolutionManager {
#autobind;
#defaultScope;
#getActivationsResolutionParam;
#resolutionContext;
#onPlanHandlers;
#planParamsOperationsManager;
#serviceReferenceManager;
constructor(planParamsOperationsManager, serviceReferenceManager, autobind, defaultScope) {
this.#planParamsOperationsManager = planParamsOperationsManager;
this.#serviceReferenceManager = serviceReferenceManager;
this.#resolutionContext = this.#buildResolutionContext();
this.#autobind = autobind;
this.#defaultScope = defaultScope;
this.#getActivationsResolutionParam = (serviceIdentifier) => this.#serviceReferenceManager.activationService.get(serviceIdentifier);
this.#onPlanHandlers = [];
this.#serviceReferenceManager.onReset(() => {
this.#resetComputedProperties();
});
}
get(serviceIdentifier, options) {
const planResult = this.#buildPlanResult(false, serviceIdentifier, options);
const resolvedValue = this.#getFromPlanResult(planResult);
if ((0, common_1.isPromise)(resolvedValue)) {
throw new InversifyContainerError_1.InversifyContainerError(InversifyContainerErrorKind_1.InversifyContainerErrorKind.invalidOperation, `Unexpected asynchronous service when resolving service "${(0, common_1.stringifyServiceIdentifier)(serviceIdentifier)}"`);
}
return resolvedValue;
}
getAll(serviceIdentifier, options) {
const planResult = this.#buildPlanResult(true, serviceIdentifier, options);
const resolvedValue = this.#getFromPlanResult(planResult);
if ((0, common_1.isPromise)(resolvedValue)) {
throw new InversifyContainerError_1.InversifyContainerError(InversifyContainerErrorKind_1.InversifyContainerErrorKind.invalidOperation, `Unexpected asynchronous service when resolving service "${(0, common_1.stringifyServiceIdentifier)(serviceIdentifier)}"`);
}
return resolvedValue;
}
async getAllAsync(serviceIdentifier, options) {
const planResult = this.#buildPlanResult(true, serviceIdentifier, options);
return this.#getFromPlanResult(planResult);
}
async getAsync(serviceIdentifier, options) {
const planResult = this.#buildPlanResult(false, serviceIdentifier, options);
return this.#getFromPlanResult(planResult);
}
onPlan(handler) {
this.#onPlanHandlers.push(handler);
}
#resetComputedProperties() {
this.#resolutionContext = this.#buildResolutionContext();
}
#buildGetPlanOptions(isMultiple, serviceIdentifier, options) {
const name = options?.name;
const optional = options?.optional ?? false;
const tag = options?.tag;
if (isMultiple) {
return {
chained: options?.chained ?? false,
isMultiple,
name,
optional,
serviceIdentifier,
tag,
};
}
else {
return {
isMultiple,
name,
optional,
serviceIdentifier,
tag,
};
}
}
#buildPlanParams(serviceIdentifier, isMultiple, options) {
const planParams = {
autobindOptions: (options?.autobind ?? this.#autobind)
? {
scope: this.#defaultScope,
}
: undefined,
operations: this.#planParamsOperationsManager.planParamsOperations,
rootConstraints: this.#buildPlanParamsConstraints(serviceIdentifier, isMultiple, options),
servicesBranch: [],
};
this.#handlePlanParamsRootConstraints(planParams, options);
return planParams;
}
#buildPlanParamsConstraints(serviceIdentifier, isMultiple, options) {
if (isMultiple) {
return {
chained: options?.chained ?? false,
isMultiple,
serviceIdentifier,
};
}
else {
return {
isMultiple,
serviceIdentifier,
};
}
}
#buildPlanResult(isMultiple, serviceIdentifier, options) {
const getPlanOptions = this.#buildGetPlanOptions(isMultiple, serviceIdentifier, options);
const planResultFromCache = this.#serviceReferenceManager.planResultCacheService.get(getPlanOptions);
if (planResultFromCache !== undefined) {
return planResultFromCache;
}
const planResult = (0, core_1.plan)(this.#buildPlanParams(serviceIdentifier, isMultiple, options));
for (const handler of this.#onPlanHandlers) {
handler(getPlanOptions, planResult);
}
return planResult;
}
#buildResolutionContext() {
return {
get: this.get.bind(this),
getAll: this.getAll.bind(this),
getAllAsync: this.getAllAsync.bind(this),
getAsync: this.getAsync.bind(this),
};
}
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
#getFromPlanResult(planResult) {
return (0, core_1.resolve)({
context: this.#resolutionContext,
getActivations: this.#getActivationsResolutionParam,
planResult,
requestScopeCache: new Map(),
});
}
#handlePlanParamsRootConstraints(planParams, options) {
if (options === undefined) {
return;
}
if (options.name !== undefined) {
planParams.rootConstraints.name = options.name;
}
if (options.optional === true) {
planParams.rootConstraints.isOptional = true;
}
if (options.tag !== undefined) {
planParams.rootConstraints.tag = {
key: options.tag.key,
value: options.tag.value,
};
}
if (planParams.rootConstraints.isMultiple) {
planParams.rootConstraints.chained =
options?.chained ?? false;
}
}
}
exports.ServiceResolutionManager = ServiceResolutionManager;
//# sourceMappingURL=ServiceResolutionManager.js.map
@@ -0,0 +1,2 @@
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).pako={})}(this,(function(t){"use strict";function e(t){let e=t.length;for(;--e>=0;)t[e]=0}const a=256,s=286,n=30,r=15,i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),_=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);e(o);const d=new Array(60);e(d);const u=new Array(512);e(u);const f=new Array(256);e(f);const c=new Array(29);e(c);const p=new Array(n);function g(t,e,a,s,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=s,this.max_length=n,this.has_stree=t&&t.length}let w,m,b;function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(p);const v=t=>t<256?u[t]:u[256+(t>>>7)],z=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},k=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,z(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},x=(t,e,a)=>{k(t,a[2*e],a[2*e+1])},A=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=(t,e,a)=>{const s=new Array(16);let n,i,_=0;for(n=1;n<=r;n++)_=_+a[n-1]<<1,s[n]=_;for(i=0;i<=e;i++){let e=t[2*i+1];0!==e&&(t[2*i]=A(s[e]++,e))}},Z=t=>{let e;for(e=0;e<s;e++)t.dyn_ltree[2*e]=0;for(e=0;e<n;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},U=t=>{t.bi_valid>8?z(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},R=(t,e,a,s)=>{const n=2*e,r=2*a;return t[n]<t[r]||t[n]===t[r]&&s[e]<=s[a]},S=(t,e,a)=>{const s=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&R(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!R(e,s,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=s},T=(t,e,s)=>{let n,r,l,h,o=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+o++],n+=(255&t.pending_buf[t.sym_buf+o++])<<8,r=t.pending_buf[t.sym_buf+o++],0===n?x(t,r,e):(l=f[r],x(t,l+a+1,e),h=i[l],0!==h&&(r-=c[l],k(t,r,h)),n--,l=v(n),x(t,l,s),h=_[l],0!==h&&(n-=p[l],k(t,n,h)))}while(o<t.sym_next);x(t,256,e)},L=(t,e)=>{const a=e.dyn_tree,s=e.stat_desc.static_tree,n=e.stat_desc.has_stree,i=e.stat_desc.elems;let _,l,h,o=-1;for(t.heap_len=0,t.heap_max=573,_=0;_<i;_++)0!==a[2*_]?(t.heap[++t.heap_len]=o=_,t.depth[_]=0):a[2*_+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=o<2?++o:0,a[2*h]=1,t.depth[h]=0,t.opt_len--,n&&(t.static_len-=s[2*h+1]);for(e.max_code=o,_=t.heap_len>>1;_>=1;_--)S(t,a,_);h=i;do{_=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S(t,a,1),l=t.heap[1],t.heap[--t.heap_max]=_,t.heap[--t.heap_max]=l,a[2*h]=a[2*_]+a[2*l],t.depth[h]=(t.depth[_]>=t.depth[l]?t.depth[_]:t.depth[l])+1,a[2*_+1]=a[2*l+1]=h,t.heap[1]=h++,S(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,s=e.max_code,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,_=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,h=e.stat_desc.max_length;let o,d,u,f,c,p,g=0;for(f=0;f<=r;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;o<573;o++)d=t.heap[o],f=a[2*a[2*d+1]+1]+1,f>h&&(f=h,g++),a[2*d+1]=f,d>s||(t.bl_count[f]++,c=0,d>=l&&(c=_[d-l]),p=a[2*d],t.opt_len+=p*(f+c),i&&(t.static_len+=p*(n[2*d+1]+c)));if(0!==g){do{for(f=h-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[h]--,g-=2}while(g>0);for(f=h;0!==f;f--)for(d=t.bl_count[f];0!==d;)u=t.heap[--o],u>s||(a[2*u+1]!==f&&(t.opt_len+=(f-a[2*u+1])*a[2*u],a[2*u+1]=f),d--)}})(t,e),E(a,o,t.bl_count)},F=(t,e,a)=>{let s,n,r=-1,i=e[1],_=0,l=7,h=4;for(0===i&&(l=138,h=3),e[2*(a+1)+1]=65535,s=0;s<=a;s++)n=i,i=e[2*(s+1)+1],++_<l&&n===i||(_<h?t.bl_tree[2*n]+=_:0!==n?(n!==r&&t.bl_tree[2*n]++,t.bl_tree[32]++):_<=10?t.bl_tree[34]++:t.bl_tree[36]++,_=0,r=n,0===i?(l=138,h=3):n===i?(l=6,h=3):(l=7,h=4))},O=(t,e,a)=>{let s,n,r=-1,i=e[1],_=0,l=7,h=4;for(0===i&&(l=138,h=3),s=0;s<=a;s++)if(n=i,i=e[2*(s+1)+1],!(++_<l&&n===i)){if(_<h)do{x(t,n,t.bl_tree)}while(0!=--_);else 0!==n?(n!==r&&(x(t,n,t.bl_tree),_--),x(t,16,t.bl_tree),k(t,_-3,2)):_<=10?(x(t,17,t.bl_tree),k(t,_-3,3)):(x(t,18,t.bl_tree),k(t,_-11,7));_=0,r=n,0===i?(l=138,h=3):n===i?(l=6,h=3):(l=7,h=4)}};let D=!1;const N=(t,e,a,s)=>{k(t,0+(s?1:0),3),U(t),z(t,a),z(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var I=(t,e,s,n)=>{let r,i,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,s=4093624447;for(e=0;e<=31;e++,s>>>=1)if(1&s&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),L(t,t.l_desc),L(t,t.d_desc),_=(t=>{let e;for(F(t,t.dyn_ltree,t.l_desc.max_code),F(t,t.dyn_dtree,t.d_desc.max_code),L(t,t.bl_desc),e=18;e>=3&&0===t.blLine truncated
@@ -0,0 +1,18 @@
import { deepMerge, isObjectNotArray } from './deep-merge.js';
export function applyDefault(defaultOptions, userOptions) {
const options = structuredClone(defaultOptions);
if (userOptions == null) {
return options;
}
for (const [i, opt] of options.entries()) {
if (userOptions[i] !== undefined) {
const userOpt = userOptions[i];
options[i] =
isObjectNotArray(userOpt) && isObjectNotArray(opt)
? deepMerge(opt, userOpt)
: userOpt;
}
}
return options;
}
//# sourceMappingURL=apply-default.js.map
@@ -0,0 +1,2 @@
import type { ClientRect } from '../../types';
export declare function getRelativeTransformOrigin(event: MouseEvent | TouchEvent | KeyboardEvent, rect: ClientRect): string;
@@ -0,0 +1,51 @@
// src/info.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var InfoIcon = (props) => /* @__PURE__ */ jsxs(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ jsx(
"path",
{
d: "M12 22C17.5 22 22 17.5 22 12C22 6.5 17.5 2 12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22Z",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5"
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M12 8V13",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5"
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M11.9945 16H12.0035",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "2"
}
)
]
}
);
export {
InfoIcon
};
@@ -0,0 +1,14 @@
module.exports = {
"ascending": `stigende`,
"ascendingSort": (args)=>`sorteret efter kolonne ${args.columnName} i stigende r\xe6kkef\xf8lge`,
"columnSize": (args)=>`${args.value} pixels`,
"descending": `faldende`,
"descendingSort": (args)=>`sorteret efter kolonne ${args.columnName} i faldende r\xe6kkef\xf8lge`,
"resizerDescription": `Tryk p\xe5 Enter for at \xe6ndre st\xf8rrelse`,
"select": `V\xe6lg`,
"selectAll": `V\xe6lg alle`,
"sortable": `sorterbar kolonne`
};
//# sourceMappingURL=da-DK.main.js.map
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.options = void 0;
var minimist = require("minimist");
var argv = minimist(process.argv.slice(2), {
string: ["project"],
alias: {
project: ["P"],
},
});
var project = argv && argv.project;
exports.options = {
cwd: project || process.cwd(),
};
//# sourceMappingURL=options.js.map
@@ -0,0 +1,31 @@
'use strict';
var test = require('tape');
if (typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol') {
test('has native Symbol.toStringTag support', function (t) {
t.equal(typeof Symbol, 'function');
t.equal(typeof Symbol.toStringTag, 'symbol');
t.end();
});
// @ts-expect-error CJS has top-level return
return;
}
var hasSymbolToStringTag = require('../../shams');
test('polyfilled Symbols', function (t) {
/* eslint-disable global-require */
t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling');
// @ts-expect-error no types defined
require('core-js/fn/symbol');
// @ts-expect-error no types defined
require('core-js/fn/symbol/to-string-tag');
require('../tests')(t);
var hasToStringTagAfter = hasSymbolToStringTag();
t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling');
/* eslint-enable global-require */
t.end();
});
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB K D E F"},E:{"1":"K D E F A B C L M G 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J 2C ZC","16":"ZB"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC","2":"F"},G:{"1":"E LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC"},H:{"1":"hD"},I:{"1":"TC J I lD vC mD nD","2":"iD jD kD"},J:{"1":"D A"},K:{"1":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"Form attribute",D:true};
@@ -0,0 +1,71 @@
import { noop } from '@internal/listenerMiddleware/utils'
import { AClockworkOrange } from './fixtures/book'
describe('Entity utils', () => {
describe(`selectIdValue()`, () => {
const consoleWarnSpy = vi.spyOn(console, 'warn').mockImplementation(noop)
beforeEach(() => {
vi.resetModules() // this is important - it clears the cache
vi.stubEnv('NODE_ENV', 'development')
})
afterEach(() => {
vi.unstubAllEnvs()
vi.clearAllMocks()
})
afterAll(() => {
vi.restoreAllMocks()
})
it('should not warn when key does exist', async () => {
const { selectIdValue } = await import('../utils')
selectIdValue(AClockworkOrange, (book: any) => book.id)
expect(consoleWarnSpy).not.toHaveBeenCalled()
})
it('should warn when key does not exist in dev mode', async () => {
const { selectIdValue } = await import('../utils')
expect(process.env.NODE_ENV).toBe('development')
selectIdValue(AClockworkOrange, (book: any) => book.foo)
expect(consoleWarnSpy).toHaveBeenCalledOnce()
})
it('should warn when key is undefined in dev mode', async () => {
const { selectIdValue } = await import('../utils')
expect(process.env.NODE_ENV).toBe('development')
const undefinedAClockworkOrange = { ...AClockworkOrange, id: undefined }
selectIdValue(undefinedAClockworkOrange, (book: any) => book.id)
expect(consoleWarnSpy).toHaveBeenCalledOnce()
})
it('should not warn when key does not exist in prod mode', async () => {
vi.stubEnv('NODE_ENV', 'production')
const { selectIdValue } = await import('../utils')
selectIdValue(AClockworkOrange, (book: any) => book.foo)
expect(consoleWarnSpy).not.toHaveBeenCalled()
})
it('should not warn when key is undefined in prod mode', async () => {
vi.stubEnv('NODE_ENV', 'production')
const { selectIdValue } = await import('../utils')
const undefinedAClockworkOrange = { ...AClockworkOrange, id: undefined }
selectIdValue(undefinedAClockworkOrange, (book: any) => book.id)
expect(consoleWarnSpy).not.toHaveBeenCalled()
})
})
})
@@ -0,0 +1,793 @@
/*
Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import estraverse from "estraverse";
import Reference from "./reference.js";
import Variable from "./variable.js";
import { Definition } from "./definition.js";
import { assert } from "./assert.js";
const { Syntax } = estraverse;
/**
* Test if scope is struct
* @param {Scope} scope scope
* @param {Block} block block
* @param {boolean} isMethodDefinition is method definition
* @returns {boolean} is strict scope
*/
function isStrictScope(scope, block, isMethodDefinition) {
let body;
// When upper scope is exists and strict, inner scope is also strict.
if (scope.upper && scope.upper.isStrict) {
return true;
}
if (isMethodDefinition) {
return true;
}
if (scope.type === "class" || scope.type === "module") {
return true;
}
if (scope.type === "block" || scope.type === "switch") {
return false;
}
if (scope.type === "function") {
if (block.type === Syntax.ArrowFunctionExpression && block.body.type !== Syntax.BlockStatement) {
return false;
}
if (block.type === Syntax.Program) {
body = block;
} else {
body = block.body;
}
if (!body) {
return false;
}
} else if (scope.type === "global") {
body = block;
} else {
return false;
}
// Search for a 'use strict' directive.
for (let i = 0, iz = body.body.length; i < iz; ++i) {
const stmt = body.body[i];
/*
* Check if the current statement is a directive.
* If it isn't, then we're past the directive prologue
* so stop the search because directives cannot
* appear after this point.
*
* Some parsers set `directive:null` on non-directive
* statements, so the `typeof` check is safer than
* checking for property existence.
*/
if (typeof stmt.directive !== "string") {
break;
}
if (stmt.directive === "use strict") {
return true;
}
}
return false;
}
/**
* Register scope
* @param {ScopeManager} scopeManager scope manager
* @param {Scope} scope scope
* @returns {void}
*/
function registerScope(scopeManager, scope) {
scopeManager.scopes.push(scope);
const scopes = scopeManager.__nodeToScope.get(scope.block);
if (scopes) {
scopes.push(scope);
} else {
scopeManager.__nodeToScope.set(scope.block, [scope]);
}
}
/**
* Should be statically
* @param {Object} def def
* @returns {boolean} should be statically
*/
function shouldBeStatically(def) {
return (
(def.type === Variable.ClassName) ||
(def.type === Variable.Variable && def.parent.kind !== "var")
);
}
/**
* @constructor Scope
*/
class Scope {
constructor(scopeManager, type, upperScope, block, isMethodDefinition) {
/**
* One of "global", "module", "function", "function-expression-name", "block", "switch", "catch", "with", "for",
* "class", "class-field-initializer", "class-static-block".
* @member {string} Scope#type
*/
this.type = type;
/**
* The scoped {@link Variable}s of this scope, as <code>{ Variable.name
* : Variable }</code>.
* @member {Map} Scope#set
*/
this.set = new Map();
/**
* The tainted variables of this scope, as <code>{ Variable.name :
* boolean }</code>.
* @member {Map} Scope#taints
*/
this.taints = new Map();
/**
* Generally, through the lexical scoping of JS you can always know
* which variable an identifier in the source code refers to. There are
* a few exceptions to this rule. With 'global' and 'with' scopes you
* can only decide at runtime which variable a reference refers to.
* Moreover, if 'eval()' is used in a scope, it might introduce new
* bindings in this or its parent scopes.
* All those scopes are considered 'dynamic'.
* @member {boolean} Scope#dynamic
*/
this.dynamic = this.type === "global" || this.type === "with";
/**
* A reference to the scope-defining syntax node.
* @member {espree.Node} Scope#block
*/
this.block = block;
/**
* The {@link Reference|references} that are not resolved with this scope.
* @member {Reference[]} Scope#through
*/
this.through = [];
/**
* The scoped {@link Variable}s of this scope. In the case of a
* 'function' scope this includes the automatic argument <em>arguments</em> as
* its first element, as well as all further formal arguments.
* @member {Variable[]} Scope#variables
*/
this.variables = [];
/**
* Any variable {@link Reference|reference} found in this scope. This
* includes occurrences of local variables as well as variables from
* parent scopes (including the global scope). For local variables
* this also includes defining occurrences (like in a 'var' statement).
* In a 'function' scope this does not include the occurrences of the
* formal parameter in the parameter list.
* @member {Reference[]} Scope#references
*/
this.references = [];
/**
* For 'global' and 'function' scopes, this is a self-reference. For
* other scope types this is the <em>variableScope</em> value of the
* parent scope.
* @member {Scope} Scope#variableScope
*/
this.variableScope =
this.type === "global" ||
this.type === "module" ||
this.type === "function" ||
this.type === "class-field-initializer" ||
this.type === "class-static-block"
? this
: upperScope.variableScope;
/**
* Whether this scope is created by a FunctionExpression.
* @member {boolean} Scope#functionExpressionScope
*/
this.functionExpressionScope = false;
/**
* Whether this is a scope that contains an 'eval()' invocation.
* @member {boolean} Scope#directCallToEvalScope
*/
this.directCallToEvalScope = false;
/**
* @member {boolean} Scope#thisFound
*/
this.thisFound = false;
this.__left = [];
/**
* Reference to the parent {@link Scope|scope}.
* @member {Scope} Scope#upper
*/
this.upper = upperScope;
/**
* Whether 'use strict' is in effect in this scope.
* @member {boolean} Scope#isStrict
*/
this.isStrict = scopeManager.isStrictModeSupported()
? isStrictScope(this, block, isMethodDefinition)
: false;
/**
* List of nested {@link Scope}s.
* @member {Scope[]} Scope#childScopes
*/
this.childScopes = [];
if (this.upper) {
this.upper.childScopes.push(this);
}
this.__declaredVariables = scopeManager.__declaredVariables;
registerScope(scopeManager, this);
}
__shouldStaticallyClose(scopeManager) {
return (!this.dynamic || scopeManager.__isOptimistic());
}
__shouldStaticallyCloseForGlobal(ref) {
// On global scope, let/const/class declarations should be resolved statically.
const name = ref.identifier.name;
if (!this.set.has(name)) {
return false;
}
const variable = this.set.get(name);
const defs = variable.defs;
return defs.length > 0 && defs.every(shouldBeStatically);
}
__staticCloseRef(ref) {
if (!this.__resolve(ref)) {
this.__delegateToUpperScope(ref);
}
}
__dynamicCloseRef(ref) {
// notify all names are through to global
let current = this;
do {
current.through.push(ref);
current = current.upper;
} while (current);
}
__globalCloseRef(ref) {
// let/const/class declarations should be resolved statically.
// others should be resolved dynamically.
if (this.__shouldStaticallyCloseForGlobal(ref)) {
this.__staticCloseRef(ref);
} else {
this.__dynamicCloseRef(ref);
}
}
__close(scopeManager) {
let closeRef;
if (this.__shouldStaticallyClose(scopeManager)) {
closeRef = this.__staticCloseRef;
} else if (this.type !== "global") {
closeRef = this.__dynamicCloseRef;
} else {
closeRef = this.__globalCloseRef;
}
// Try Resolving all references in this scope.
for (let i = 0, iz = this.__left.length; i < iz; ++i) {
const ref = this.__left[i];
closeRef.call(this, ref);
}
this.__left = null;
return this.upper;
}
// To override by function scopes.
// References in default parameters isn't resolved to variables which are in their function body.
__isValidResolution(ref, variable) { // eslint-disable-line class-methods-use-this, no-unused-vars -- Desired as instance method with signature
return true;
}
__resolve(ref) {
const name = ref.identifier.name;
if (!this.set.has(name)) {
return false;
}
const variable = this.set.get(name);
if (!this.__isValidResolution(ref, variable)) {
return false;
}
variable.references.push(ref);
variable.stack = variable.stack && ref.from.variableScope === this.variableScope;
if (ref.tainted) {
variable.tainted = true;
this.taints.set(variable.name, true);
}
ref.resolved = variable;
return true;
}
__delegateToUpperScope(ref) {
if (this.upper) {
this.upper.__left.push(ref);
}
this.through.push(ref);
}
__addDeclaredVariablesOfNode(variable, node) {
if (node === null || node === void 0) {
return;
}
let variables = this.__declaredVariables.get(node);
if (variables === null || variables === void 0) {
variables = [];
this.__declaredVariables.set(node, variables);
}
if (!variables.includes(variable)) {
variables.push(variable);
}
}
__defineGeneric(name, set, variables, node, def) {
let variable;
variable = set.get(name);
if (!variable) {
variable = new Variable(name, this);
set.set(name, variable);
variables.push(variable);
}
if (def) {
variable.defs.push(def);
this.__addDeclaredVariablesOfNode(variable, def.node);
this.__addDeclaredVariablesOfNode(variable, def.parent);
}
if (node) {
variable.identifiers.push(node);
}
}
__define(node, def) {
if (node && node.type === Syntax.Identifier) {
this.__defineGeneric(
node.name,
this.set,
this.variables,
node,
def
);
}
}
__referencing(node, assign, writeExpr, maybeImplicitGlobal, partial, init) {
// because Array element may be null
if (!node || (node.type !== Syntax.Identifier && node.type !== "JSXIdentifier")) {
return;
}
// Specially handle like `this`.
if (node.name === "super") {
return;
}
const ref = new Reference(node, this, assign || Reference.READ, writeExpr, maybeImplicitGlobal, !!partial, !!init);
this.references.push(ref);
this.__left.push(ref);
}
__detectEval() {
let current = this;
this.directCallToEvalScope = true;
do {
current.dynamic = true;
current = current.upper;
} while (current);
}
__detectThis() {
this.thisFound = true;
}
__isClosed() {
return this.__left === null;
}
/**
* returns resolved {Reference}
* @function Scope#resolve
* @param {Espree.Identifier} ident identifier to be resolved.
* @returns {Reference} reference
*/
resolve(ident) {
let ref, i, iz;
assert(this.__isClosed(), "Scope should be closed.");
assert(ident.type === Syntax.Identifier, "Target should be identifier.");
for (i = 0, iz = this.references.length; i < iz; ++i) {
ref = this.references[i];
if (ref.identifier === ident) {
return ref;
}
}
return null;
}
/**
* returns this scope is static
* @function Scope#isStatic
* @returns {boolean} static
*/
isStatic() {
return !this.dynamic;
}
/**
* returns this scope has materialized arguments
* @function Scope#isArgumentsMaterialized
* @returns {boolean} arguemnts materialized
*/
isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this -- Desired as instance method
return true;
}
/**
* returns this scope has materialized `this` reference
* @function Scope#isThisMaterialized
* @returns {boolean} this materialized
*/
isThisMaterialized() { // eslint-disable-line class-methods-use-this -- Desired as instance method
return true;
}
isUsedName(name) {
if (this.set.has(name)) {
return true;
}
for (let i = 0, iz = this.through.length; i < iz; ++i) {
if (this.through[i].identifier.name === name) {
return true;
}
}
return false;
}
}
/**
* Global scope.
*/
class GlobalScope extends Scope {
constructor(scopeManager, block) {
super(scopeManager, "global", null, block, false);
this.implicit = {
set: new Map(),
variables: [],
/**
* List of {@link Reference}s that are left to be resolved (i.e. which
* need to be linked to the variable they refer to).
* @member {Reference[]} Scope#implicit#left
*/
left: []
};
}
__close(scopeManager) {
const implicit = [];
for (let i = 0, iz = this.__left.length; i < iz; ++i) {
const ref = this.__left[i];
if (ref.__maybeImplicitGlobal && !this.set.has(ref.identifier.name)) {
implicit.push(ref.__maybeImplicitGlobal);
}
}
// create an implicit global variable from assignment expression
for (let i = 0, iz = implicit.length; i < iz; ++i) {
const info = implicit[i];
this.__defineImplicit(info.pattern,
new Definition(
Variable.ImplicitGlobalVariable,
info.pattern,
info.node,
null,
null,
null
));
}
this.implicit.left = this.__left;
return super.__close(scopeManager);
}
__defineImplicit(node, def) {
if (node && node.type === Syntax.Identifier) {
this.__defineGeneric(
node.name,
this.implicit.set,
this.implicit.variables,
node,
def
);
}
}
}
/**
* Module scope.
*/
class ModuleScope extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "module", upperScope, block, false);
}
}
/**
* Function expression name scope.
*/
class FunctionExpressionNameScope extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "function-expression-name", upperScope, block, false);
this.__define(block.id,
new Definition(
Variable.FunctionName,
block.id,
block,
null,
null,
null
));
this.functionExpressionScope = true;
}
}
/**
* Catch scope.
*/
class CatchScope extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "catch", upperScope, block, false);
}
}
/**
* With statement scope.
*/
class WithScope extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "with", upperScope, block, false);
}
__close(scopeManager) {
if (this.__shouldStaticallyClose(scopeManager)) {
return super.__close(scopeManager);
}
for (let i = 0, iz = this.__left.length; i < iz; ++i) {
const ref = this.__left[i];
ref.tainted = true;
this.__delegateToUpperScope(ref);
}
this.__left = null;
return this.upper;
}
}
/**
* Block scope.
*/
class BlockScope extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "block", upperScope, block, false);
}
}
/**
* Switch scope.
*/
class SwitchScope extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "switch", upperScope, block, false);
}
}
/**
* Function scope.
*/
class FunctionScope extends Scope {
constructor(scopeManager, upperScope, block, isMethodDefinition) {
super(scopeManager, "function", upperScope, block, isMethodDefinition);
// section 9.2.13, FunctionDeclarationInstantiation.
// NOTE Arrow functions never have an arguments objects.
if (this.block.type !== Syntax.ArrowFunctionExpression) {
this.__defineArguments();
}
}
isArgumentsMaterialized() {
// TODO(Constellation)
// We can more aggressive on this condition like this.
//
// function t() {
// // arguments of t is always hidden.
// function arguments() {
// }
// }
if (this.block.type === Syntax.ArrowFunctionExpression) {
return false;
}
if (!this.isStatic()) {
return true;
}
const variable = this.set.get("arguments");
assert(variable, "Always have arguments variable.");
return variable.tainted || variable.references.length !== 0;
}
isThisMaterialized() {
if (!this.isStatic()) {
return true;
}
return this.thisFound;
}
__defineArguments() {
this.__defineGeneric(
"arguments",
this.set,
this.variables,
null,
null
);
this.taints.set("arguments", true);
}
// References in default parameters isn't resolved to variables which are in their function body.
// const x = 1
// function f(a = x) { // This `x` is resolved to the `x` in the outer scope.
// const x = 2
// console.log(a)
// }
__isValidResolution(ref, variable) {
// If `options.nodejsScope` is true, `this.block` becomes a Program node.
if (this.block.type === "Program") {
return true;
}
const bodyStart = this.block.body.range[0];
// It's invalid resolution in the following case:
return !(
variable.scope === this &&
ref.identifier.range[0] < bodyStart && // the reference is in the parameter part.
variable.defs.every(d => d.name.range[0] >= bodyStart) // the variable is in the body.
);
}
}
/**
* Scope of for, for-in, and for-of statements.
*/
class ForScope extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "for", upperScope, block, false);
}
}
/**
* Class scope.
*/
class ClassScope extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "class", upperScope, block, false);
}
}
/**
* Class field initializer scope.
*/
class ClassFieldInitializerScope extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "class-field-initializer", upperScope, block, true);
}
}
/**
* Class static block scope.
*/
class ClassStaticBlockScope extends Scope {
constructor(scopeManager, upperScope, block) {
super(scopeManager, "class-static-block", upperScope, block, true);
}
}
export {
Scope,
GlobalScope,
ModuleScope,
FunctionExpressionNameScope,
CatchScope,
WithScope,
BlockScope,
SwitchScope,
FunctionScope,
ForScope,
ClassScope,
ClassFieldInitializerScope,
ClassStaticBlockScope
};
/* vim: set sw=4 ts=4 et tw=80 : */
@@ -0,0 +1,15 @@
'use strict';
var implementation = require('./implementation');
module.exports = function getPolyfill() {
if (typeof Iterator === 'function' && typeof Iterator.prototype.filter === 'function') {
try {
// https://issues.chromium.org/issues/336839115
Iterator.prototype.filter.call({ next: null }, function () {}).next();
} catch (e) {
return Iterator.prototype.filter;
}
}
return implementation;
};
@@ -0,0 +1,14 @@
import type { TSESLint } from '@typescript-eslint/utils';
type Types = Record<string, boolean | string | {
fixWith?: string;
message: string;
suggest?: readonly string[];
} | null>;
export type Options = [
{
types?: Types;
}
];
export type MessageIds = 'bannedTypeMessage' | 'bannedTypeReplacement';
declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1 @@
{"name":"@nodelib/fs.walk","version":"1.2.8","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532095513,"integrity":"sha512-klyzttd362E9inpFU2X0jkZ+kaWZ+PhDEXJfMgfuWDKwC4dCmwlGbdsDCsQjWPUstsuss2EizcqjeZNZs2Qp9A==","mode":436,"size":1079},"out/providers/async.js":{"checkedAt":1794532095513,"integrity":"sha512-+W5Vt9NvIdehfLBx3slCmkja6GMA0zglsOkpsJqoBS1IlHK8kttsmRVOutYQc9vAoO2I99LoteG5Z+KYgk0AZQ==","mode":436,"size":895},"out/readers/async.js":{"checkedAt":1794532095513,"integrity":"sha512-Sk6NVLuKxCq/QhZdxXxHqn5wlpXPaaxtvtDNAzjmiB/QizRbwrfW5OGCNnwv2Q83YURioeDKOGhThTZnwf6WGw==","mode":436,"size":3157},"out/readers/common.js":{"checkedAt":1794532095513,"integrity":"sha512-UF2HjQnRwnpefmcg0P6Jeksthf08nuRYv8H5i/lWYcVaV72A00UoVbx9CA9/HhdAEyan6to6H1f6MntB3+M/2w==","mode":436,"size":1052},"out/index.js":{"checkedAt":1794532095513,"integrity":"sha512-Bc+R+Q50dDHJ+nRHPG92Uru0XsR+D3hG8aYkDzYF80ENWCXwluH+13AGYo+Et3slYcl+qzcNAuTB9mp6O/rbhQ==","mode":436,"size":1390},"out/providers/index.js":{"checkedAt":1794532095513,"integrity":"sha512-afQ2Rk5M8k31k0StY+kQpnxDL3Z9odVuiYtuBlSm2g3UdUTqBCSH3A8Tcg8luJvEFPQTy39s4UCn19f8bjG1Eg==","mode":436,"size":388},"out/types/index.js":{"checkedAt":1794532095513,"integrity":"sha512-f2XGQDoj2T+xSOglmwEtZVKrO/8Xj0p9ap2c7A9gQp/BiZ45tLyozAivx12afHv9sT/DcspjyF6yKwNV601gAA==","mode":436,"size":77},"out/readers/reader.js":{"checkedAt":1794532095513,"integrity":"sha512-fU1l5qqzuv77L6jb71XV/rRRxj/meQk3rsGhNnB2E+sdn2ETY1Z+HMaNI7gJpKlBQyNRUwYtuqQLKPCShVRuvQ==","mode":436,"size":358},"out/settings.js":{"checkedAt":1794532095513,"integrity":"sha512-Q7aqjE9Q5aELJD57IAInlaT9RjsNyhYkBY/imiU0q4Ajp5JosIpL5lLQywuqcLAarhkRE1sci0QKf5sT/JROXg==","mode":436,"size":1250},"out/providers/stream.js":{"checkedAt":1794532095514,"integrity":"sha512-Y7a9nN7Uy04VDmjGQBDQJs1KV+AphR/J1GRWvWq+36RIwTK19faeRcpwt6TTQUjyGWafczCY6J50lxalj5sKoA==","mode":436,"size":1021},"out/providers/sync.js":{"checkedAt":1794532095514,"integrity":"sha512-23mD4aVeAB4bAPeXJVLZx/GCc7mc1+qYq/A3vPgu+i+ePXHbd4BYdPwEqxUw6MT5PucLjaV8mE+iBnEAmL3WPg==","mode":436,"size":407},"out/readers/sync.js":{"checkedAt":1794532095514,"integrity":"sha512-wVyFLYFU3XpRzRISRRHA4ErmpLVkMVUHwwCJg2tkBuJIbih0NSJcYgZ8dFHA76pYTcv7POj4gsO36D9MLujQ5Q==","mode":436,"size":1911},"package.json":{"checkedAt":1794532095514,"integrity":"sha512-piWCuUCg8kwsbFubT4ZxLXTpOLVeXVflHNXMfYS8jw9GbDuSXnbgFoPZdYnQeJcmG6b+JE3ooMMDRpgrCAdwIw==","mode":436,"size":1138},"README.md":{"checkedAt":1794532095514,"integrity":"sha512-j8ogIsjqpcj0C8/x7t1bRoGNnm0Av7HlNUaitS08jMNqy+qCcDnms1nN1I5UHROiE2M8/13tYOxx0ym/WZMMog==","mode":436,"size":6139},"out/providers/async.d.ts":{"checkedAt":1794532095514,"integrity":"sha512-XJ5fhvrVB2TwhKdxJ9YKSqPm2+HtLyXjzfvQldV69q2ARaxGS6BBThVLywxs7QqgKZLM+xVnmfsZ1EsejCWUzw==","mode":436,"size":478},"out/readers/async.d.ts":{"checkedAt":1794532095514,"integrity":"sha512-4B3NTq3g/qqZMXJveOHFGlUfMqmxC3UKIoY07pyR48SF2UyUmjs4tvDE8hAu7yPGSCTcydjEClOmTiXuh4WsuA==","mode":436,"size":1091},"out/readers/common.d.ts":{"checkedAt":1794532095514,"integrity":"sha512-R3ls0llwv4RLm3L6qKd8+C2ilNE5h0eUlYU2EZGKJOVlZ0rNtcyQhD2w0RL7tkT7kqIO8jVEOjWfpdiN/8ltog==","mode":436,"size":498},"out/index.d.ts":{"checkedAt":1794532095514,"integrity":"sha512-pbxYZF2UqYbC05v9CoLlL8N5+j2s8O7Ln+lMrFjR+zMEJl6ZpDGhuTtWQvIlqFPzp3bjAa2W9+S40Do63cyp7A==","mode":436,"size":1019},"out/providers/index.d.ts":{"checkedAt":1794532095515,"integrity":"sha512-0c732jQdPWtv5otF0Nl+6YGufwg0vZmlspa4QU94RBcz3pSwKIiJYz5Oyk8MeTk7gOSnE951dh9ekoGtax3tEg==","mode":436,"size":167},"out/types/index.d.ts":{"checkedAt":1794532095515,"integrity":"sha512-vwTyGFiiKtd7d2Qm+NE9zZoMcOTxcqtsQKwpdxk9Owu/SqcNObJPfoTtLFEe+CxE+y2pW4kRXsbgQi1d9GsCng==","mode":436,"size":251},"out/readers/reader.d.ts":{"checkedAt":1794532095515,"integrity":"sha512-8AcjAwe7OJb4VP8xlaXKhwCIX+0cP8gTngvu43m5SX4U24lWrOXCfSCfWzFov84epVtnxfLz9f1UwcIREkEBaQ==","mode":436,"size":208},"out/settings.d.ts":{"checkedAt":1794532095515,"integrity":"sha512-UWdWnBIoM6g+GyQEXYeAA7rldj8nI1W3YtBCv0/N1PSuuB19T5hyBpJULPgpJUTQ1wgkkD+omPFwXkGDi5IgRg==","mode":436,"size":1175},"out/providers/stream.d.ts":{"checkedAt":1794532095515,"integrity":"sha512-5koza8bgHEY6raALhTbI/jnHvDXDdtMf8dEzRxJFT8iVpLNtd9FFQX/bepKph2gkkSNI70gR8YaH/plt+6dm7A==","mode":436,"size":413},"out/providers/sync.d.ts":{"checkedAt":1794532095515,"integrity":"sha512-K2dMgaX3P5CpBFx9EVRTkEhWP4dHLFd0DZbLZSHcHLcVWyn60XyJ3FyJQrrvApoAzHLLbWqxPDMcfThggSxVsw==","mode":436,"size":338},"out/readers/sync.d.ts":{"checkedAt":1794532095515,"integrity":"sha512-JNKuNj7hdh3gOQIZTtVeTIoEDdcFCDOLVwkUyXaZoEeIchAjVYpOjdIthzxJ7vBYT4RpcrR/q5XMo+fqK+Ssvw==","mode":436,"size":477}}}
@@ -0,0 +1,313 @@
import { NapCatCore } from '../../../napcat-core';
import { NapCatOneBot11Adapter, OB11Message } from '../../index';
import { ActionMap } from '../../action';
import { OB11EmitEventContent } from '../../network/index';
import { NetworkAdapterConfig } from '../../config/config';
export interface PluginPackageJson {
name?: string;
plugin?: string;
version?: string;
main?: string;
description?: string;
author?: string;
}
export interface PluginConfigItem {
key: string;
type: 'string' | 'number' | 'boolean' | 'select' | 'multi-select' | 'html' | 'text';
label: string;
description?: string;
default?: unknown;
options?: {
label: string;
value: string | number;
}[];
placeholder?: string;
/** 标记此字段为响应式:值变化时触发 schema 刷新 */
reactive?: boolean;
/** 是否隐藏此字段 */
hidden?: boolean;
}
export type PluginConfigSchema = PluginConfigItem[];
/** NapCatConfig 类的静态方法接口(用于 typeof NapCatConfig) */
export interface INapCatConfigStatic {
text(key: string, label: string, defaultValue?: string, description?: string, reactive?: boolean): PluginConfigItem;
number(key: string, label: string, defaultValue?: number, description?: string, reactive?: boolean): PluginConfigItem;
boolean(key: string, label: string, defaultValue?: boolean, description?: string, reactive?: boolean): PluginConfigItem;
select(key: string, label: string, options: {
label: string;
value: string | number;
}[], defaultValue?: string | number, description?: string, reactive?: boolean): PluginConfigItem;
multiSelect(key: string, label: string, options: {
label: string;
value: string | number;
}[], defaultValue?: (string | number)[], description?: string, reactive?: boolean): PluginConfigItem;
html(content: string): PluginConfigItem;
plainText(content: string): PluginConfigItem;
combine(...items: PluginConfigItem[]): PluginConfigSchema;
}
/** NapCatConfig 类型(包含静态方法) */
export type NapCatConfigClass = INapCatConfigStatic;
/** HTTP 请求对象(包装类型) */
export interface PluginHttpRequest {
/** 请求路径 */
path: string;
/** 请求方法 */
method: string;
/** 查询参数 */
query: Record<string, string | string[] | undefined>;
/** 请求体 */
body: unknown;
/** 请求头 */
headers: Record<string, string | string[] | undefined>;
/** 路由参数 */
params: Record<string, string>;
/** 原始请求对象(用于高级用法) */
raw: unknown;
}
/** HTTP 响应对象(包装类型) */
export interface PluginHttpResponse {
/** 设置状态码 */
status(code: number): PluginHttpResponse;
/** 发送 JSON 响应 */
json(data: unknown): void;
/** 发送文本响应 */
send(data: string | Buffer): void;
/** 设置响应头 */
setHeader(name: string, value: string): PluginHttpResponse;
/** 发送文件 */
sendFile(filePath: string): void;
/** 重定向 */
redirect(url: string): void;
/** 原始响应对象(用于高级用法) */
raw: unknown;
}
/** 下一步函数类型 */
export type PluginNextFunction = (err?: unknown) => void;
/** 插件请求处理器类型 */
export type PluginRequestHandler = (req: PluginHttpRequest, res: PluginHttpResponse, next: PluginNextFunction) => void | Promise<void>;
/** HTTP 方法类型 */
export type HttpMethod = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'all';
/** 插件 API 路由定义 */
export interface PluginApiRouteDefinition {
/** HTTP 方法 */
method: HttpMethod;
/** 路由路径(相对于插件路由前缀) */
path: string;
/** 请求处理器 */
handler: PluginRequestHandler;
}
/** 插件页面定义 */
export interface PluginPageDefinition {
/** 页面路径(用于路由,如 'settings') */
path: string;
/** 页面标题(显示在 Tab 上) */
title: string;
/** 页面图标(可选,支持 emoji 或图标名) */
icon?: string;
/** 页面 HTML 文件路径(相对于插件目录) */
htmlFile: string;
/** 页面描述 */
description?: string;
}
/** 内存文件生成器 - 用于动态生成静态文件内容 */
export type MemoryFileGenerator = () => string | Buffer | Promise<string | Buffer>;
/** 内存静态文件定义 */
export interface MemoryStaticFile {
/** 文件路径(相对于 urlPath) */
path: string;
/** 文件内容或生成器 */
content: string | Buffer | MemoryFileGenerator;
/** 可选的 MIME 类型 */
contentType?: string;
}
/** 插件路由注册器 */
export interface PluginRouterRegistry {
/**
* 注册单个 API 路由(需要认证,挂载到 /api/Plugin/ext/{pluginId}/)
* @param method HTTP 方法
* @param path 路由路径
* @param handler 请求处理器
*/
api(method: HttpMethod, path: string, handler: PluginRequestHandler): void;
/** 注册 GET API(需要认证) */
get(path: string, handler: PluginRequestHandler): void;
/** 注册 POST API(需要认证) */
post(path: string, handler: PluginRequestHandler): void;
/** 注册 PUT API(需要认证) */
put(path: string, handler: PluginRequestHandler): void;
/** 注册 DELETE API(需要认证) */
delete(path: string, handler: PluginRequestHandler): void;
/**
* 注册单个无认证 API 路由(挂载到 /plugin/{pluginId}/api/)
* @param method HTTP 方法
* @param path 路由路径
* @param handler 请求处理器
*/
apiNoAuth(method: HttpMethod, path: string, handler: PluginRequestHandler): void;
/** 注册 GET API(无认证) */
getNoAuth(path: string, handler: PluginRequestHandler): void;
/** 注册 POST API(无认证) */
postNoAuth(path: string, handler: PluginRequestHandler): void;
/** 注册 PUT API(无认证) */
putNoAuth(path: string, handler: PluginRequestHandler): void;
/** 注册 DELETE API(无认证) */
deleteNoAuth(path: string, handler: PluginRequestHandler): void;
/**
* 注册插件页面
* @param page 页面定义
*/
page(page: PluginPageDefinition): void;
/**
* 注册多个插件页面
* @param pages 页面定义数组
*/
pages(pages: PluginPageDefinition[]): void;
/**
* 提供静态文件服务
* @param urlPath URL 路径
* @param localPath 本地文件夹路径(相对于插件目录或绝对路径)
*/
static(urlPath: string, localPath: string): void;
/**
* 提供内存生成的静态文件服务
* @param urlPath URL 路径
* @param files 内存文件列表
*/
staticOnMem(urlPath: string, files: MemoryStaticFile[]): void;
}
/** 插件管理器公共接口 */
export interface IPluginManager {
readonly config: NetworkAdapterConfig;
getPluginPath(): string;
getPluginConfig(): PluginStatusConfig;
getAllPlugins(): PluginEntry[];
getLoadedPlugins(): PluginEntry[];
getPluginInfo(pluginId: string): PluginEntry | undefined;
setPluginStatus(pluginId: string, enable: boolean): Promise<void>;
loadPluginById(pluginId: string): Promise<boolean>;
unregisterPlugin(pluginId: string): Promise<void>;
uninstallPlugin(pluginId: string, cleanData?: boolean): Promise<void>;
reloadPlugin(pluginId: string): Promise<boolean>;
loadDirectoryPlugin(dirname: string): Promise<void>;
getPluginDataPath(pluginId: string): string;
getPluginConfigPath(pluginId: string): string;
}
/** 插件配置 UI 控制器 - 用于动态控制配置界面 */
export interface PluginConfigUIController {
/** 更新整个 schema */
updateSchema: (schema: PluginConfigSchema) => void;
/** 更新单个字段 */
updateField: (key: string, field: Partial<PluginConfigItem>) => void;
/** 移除字段 */
removeField: (key: string) => void;
/** 添加字段 */
addField: (field: PluginConfigItem, afterKey?: string) => void;
/** 显示字段 */
showField: (key: string) => void;
/** 隐藏字段 */
hideField: (key: string) => void;
/** 获取当前配置值 */
getCurrentConfig: () => Record<string, unknown>;
}
/**
* 插件日志接口 - 简化的日志 API
*/
export interface PluginLogger {
/** 普通日志 */
log(...args: unknown[]): void;
/** 调试日志 */
debug(...args: unknown[]): void;
/** 信息日志 */
info(...args: unknown[]): void;
/** 警告日志 */
warn(...args: unknown[]): void;
/** 错误日志 */
error(...args: unknown[]): void;
}
export interface NapCatPluginContext {
core: NapCatCore;
oneBot: NapCatOneBot11Adapter;
actions: ActionMap;
pluginName: string;
pluginPath: string;
configPath: string;
dataPath: string;
/** NapCatConfig 配置构建器 */
NapCatConfig: NapCatConfigClass;
adapterName: string;
/** 插件管理器实例 */
pluginManager: IPluginManager;
/** 插件日志器 - 自动添加插件名称前缀 */
logger: PluginLogger;
/**
* WebUI 路由注册器
* 用于注册插件的 HTTP API 路由,路由将挂载到 /api/Plugin/ext/{pluginId}/
* 静态资源将挂载到 /plugin/{pluginId}/files/{urlPath}/
*/
router: PluginRouterRegistry;
/**
* 获取其他插件的导出模块
* @param pluginId 目标插件 ID
* @returns 插件导出的模块,如果插件未加载则返回 undefined
*/
getPluginExports: <T = PluginModule>(pluginId: string) => T | undefined;
}
export interface PluginModule<T extends OB11EmitEventContent = OB11EmitEventContent, C = unknown> {
plugin_init: (ctx: NapCatPluginContext) => void | Promise<void>;
plugin_onmessage?: (ctx: NapCatPluginContext, event: OB11Message) => void | Promise<void>;
plugin_onevent?: (ctx: NapCatPluginContext, event: T) => void | Promise<void>;
plugin_cleanup?: (ctx: NapCatPluginContext) => void | Promise<void>;
plugin_config_schema?: PluginConfigSchema;
plugin_config_ui?: PluginConfigSchema;
plugin_get_config?: (ctx: NapCatPluginContext) => C | Promise<C>;
plugin_set_config?: (ctx: NapCatPluginContext, config: C) => void | Promise<void>;
/**
* 配置界面控制器 - 当配置界面打开时调用
* 返回清理函数,在界面关闭时调用
*/
plugin_config_controller?: (ctx: NapCatPluginContext, ui: PluginConfigUIController, initialConfig: Record<string, unknown>) => void | (() => void) | Promise<void | (() => void)>;
/**
* 响应式字段变化回调 - 当标记为 reactive 的字段值变化时调用
*/
plugin_on_config_change?: (ctx: NapCatPluginContext, ui: PluginConfigUIController, key: string, value: unknown, currentConfig: Record<string, unknown>) => void | Promise<void>;
}
export type PluginRuntimeStatus = 'loaded' | 'error' | 'unloaded';
export interface PluginRuntime {
/** 运行时状态 */
status: PluginRuntimeStatus;
/** 错误信息(当 status 为 'error' 时) */
error?: string;
/** 插件模块(当 status 为 'loaded' 时) */
module?: PluginModule;
/** 插件上下文(当 status 为 'loaded' 时) */
context?: NapCatPluginContext;
}
export interface PluginEntry {
/** 插件 ID(包名或目录名) */
id: string;
/** 文件系统目录名 */
fileId: string;
/** 显示名称 */
name?: string;
/** 版本号 */
version?: string;
/** 描述 */
description?: string;
/** 作者 */
author?: string;
/** 插件目录路径 */
pluginPath: string;
/** 入口文件路径 */
entryPath?: string;
/** package.json 内容 */
packageJson?: PluginPackageJson;
/** 是否启用(用户配置) */
enable: boolean;
/** 运行时是否已加载 */
loaded: boolean;
/** 运行时信息 */
runtime: PluginRuntime;
}
export interface PluginStatusConfig {
[key: string]: boolean;
}
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = contours2svg;
var _contour2svg = _interopRequireDefault(require("./contour2svg"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file 将ttf字形转换为svg路径`d`
* @author mengke01(kekee000@gmail.com)
*/
/**
* contours轮廓转svgpath
*
* @param {Array} contours 轮廓list
* @param {number} precision 精确度
* @return {string} path字符串
*/
function contours2svg(contours, precision) {
if (!contours.length) {
return '';
}
return contours.map(function (contour) {
return (0, _contour2svg.default)(contour, precision);
}).join('');
}
@@ -0,0 +1,381 @@
import type { Linter } from '../Linter';
import type { RuleMetaData } from '../Rule';
export declare class ESLintBase<Config extends Linter.ConfigType, Options extends ESLintOptions<Config>> {
/**
* Creates a new instance of the main ESLint API.
* @param options The options for this instance.
*/
constructor(options?: Options);
/**
* This method calculates the configuration for a given file, which can be useful for debugging purposes.
* - It resolves and merges extends and overrides settings into the top level configuration.
* - It resolves the parser setting to absolute paths.
* - It normalizes the plugins setting to align short names. (e.g., eslint-plugin-foo → foo)
* - It adds the processor setting if a legacy file extension processor is matched.
* - It doesn't interpret the env setting to the globals and parserOptions settings, so the result object contains
* the env setting as is.
* @param filePath The path to the file whose configuration you would like to calculate. Directory paths are forbidden
* because ESLint cannot handle the overrides setting.
* @returns The promise that will be fulfilled with a configuration object.
*/
calculateConfigForFile(filePath: string): Promise<Config>;
getRulesMetaForResults(results: LintResult[]): Record<string, RuleMetaData<string, Record<string, unknown>>>;
/**
* This method checks if a given file is ignored by your configuration.
* @param filePath The path to the file you want to check.
* @returns The promise that will be fulfilled with whether the file is ignored or not. If the file is ignored, then
* it will return true.
*/
isPathIgnored(filePath: string): Promise<boolean>;
/**
* This method lints the files that match the glob patterns and then returns the results.
* @param patterns The lint target files. This can contain any of file paths, directory paths, and glob patterns.
* @returns The promise that will be fulfilled with an array of LintResult objects.
*/
lintFiles(patterns: string | string[]): Promise<LintResult[]>;
/**
* This method lints the given source code text and then returns the results.
*
* By default, this method uses the configuration that applies to files in the current working directory (the cwd
* constructor option). If you want to use a different configuration, pass options.filePath, and ESLint will load the
* same configuration that eslint.lintFiles() would use for a file at options.filePath.
*
* If the options.filePath value is configured to be ignored, this method returns an empty array. If the
* options.warnIgnored option is set along with the options.filePath option, this method returns a LintResult object.
* In that case, the result may contain a warning that indicates the file was ignored.
* @param code The source code text to check.
* @returns The promise that will be fulfilled with an array of LintResult objects. This is an array (despite there
* being only one lint result) in order to keep the interfaces between this and the eslint.lintFiles()
* method similar.
*/
lintText(code: string, options?: LintTextOptions): Promise<LintResult[]>;
/**
* This method loads a formatter. Formatters convert lint results to a human- or machine-readable string.
* @param name TThe path to the file you want to check.
* The following values are allowed:
* - undefined. In this case, loads the "stylish" built-in formatter.
* - A name of built-in formatters.
* - A name of third-party formatters. For examples:
* -- `foo` will load eslint-formatter-foo.
* -- `@foo` will load `@foo/eslint-formatter`.
* -- `@foo/bar` will load `@foo/eslint-formatter-bar`.
* - A path to the file that defines a formatter. The path must contain one or more path separators (/) in order to distinguish if it's a path or not. For example, start with ./.
* @returns The promise that will be fulfilled with a Formatter object.
*/
loadFormatter(name?: string): Promise<Formatter>;
/**
* This method copies the given results and removes warnings. The returned value contains only errors.
* @param results The LintResult objects to filter.
* @returns The filtered LintResult objects.
*/
static getErrorResults(results: LintResult): LintResult;
/**
* This method writes code modified by ESLint's autofix feature into its respective file. If any of the modified
* files don't exist, this method does nothing.
* @param results The LintResult objects to write.
* @returns The promise that will be fulfilled after all files are written.
*/
static outputFixes(results: LintResult[]): Promise<void>;
/**
* The version text.
*/
static readonly version: string;
/**
* The type of configuration used by this class.
*/
static readonly configType: Linter.ConfigTypeSpecifier;
}
export interface ESLintOptions<Config extends Linter.ConfigType> {
/**
* If false is present, ESLint suppresses comment directives in source code.
* If this option is false, it overrides the noInlineConfig setting in your configurations.
* @default true
*/
allowInlineConfig?: boolean;
/**
* Configuration object, extended by all configurations used with this instance.
* You can use this option to define the default settings that will be used if your configuration files don't
* configure it.
* @default null
*/
baseConfig?: Config | null;
/**
* If `true` is present, the `eslint.lintFiles()` method caches lint results and uses it if each target file is not
* changed. Please mind that ESLint doesn't clear the cache when you upgrade ESLint plugins. In that case, you have
* to remove the cache file manually. The `eslint.lintText()` method doesn't use caches even if you pass the
* options.filePath to the method.
* @default false
*/
cache?: boolean;
/**
* The eslint.lintFiles() method writes caches into this file.
* @default '.eslintcache'
*/
cacheLocation?: string;
/**
* Strategy for the cache to use for detecting changed files.
* @default 'metadata'
*/
cacheStrategy?: 'content' | 'metadata';
/**
* The working directory. This must be an absolute path.
* @default process.cwd()
*/
cwd?: string;
/**
* Unless set to false, the `eslint.lintFiles()` method will throw an error when no target files are found.
* @default true
*/
errorOnUnmatchedPattern?: boolean;
/**
* If `true` is present, the `eslint.lintFiles()` and `eslint.lintText()` methods work in autofix mode.
* If a predicate function is present, the methods pass each lint message to the function, then use only the
* lint messages for which the function returned true.
* @default false
*/
fix?: boolean | ((message: LintMessage) => boolean);
/**
* The types of the rules that the `eslint.lintFiles()` and `eslint.lintText()` methods use for autofix.
* @default null
*/
fixTypes?: ('directive' | 'problem' | 'suggestion')[] | null;
/**
* If false is present, the `eslint.lintFiles()` method doesn't interpret glob patterns.
* @default true
*/
globInputPaths?: boolean;
/**
* Configuration object, overrides all configurations used with this instance.
* You can use this option to define the settings that will be used even if your configuration files configure it.
* @default null
*/
overrideConfig?: Config | null;
/**
* When set to true, missing patterns cause the linting operation to short circuit and not report any failures.
* @default false
*/
passOnNoPatterns?: boolean;
/**
* The plugin implementations that ESLint uses for the plugins setting of your configuration.
* This is a map-like object. Those keys are plugin IDs and each value is implementation.
* @default null
*/
plugins?: Record<string, Linter.Plugin> | null;
}
export interface DeprecatedRuleInfo {
/**
* The rule IDs that replace this deprecated rule.
*/
replacedBy: string[];
/**
* The rule ID.
*/
ruleId: string;
}
/**
* The LintResult value is the information of the linting result of each file.
*/
export interface LintResult {
/**
* The number of errors. This includes fixable errors.
*/
errorCount: number;
/**
* The number of fatal errors.
*/
fatalErrorCount: number;
/**
* The absolute path to the file of this result. This is the string "<text>" if the file path is unknown (when you
* didn't pass the options.filePath option to the eslint.lintText() method).
*/
filePath: string;
/**
* The number of errors that can be fixed automatically by the fix constructor option.
*/
fixableErrorCount: number;
/**
* The number of warnings that can be fixed automatically by the fix constructor option.
*/
fixableWarningCount: number;
/**
* The array of LintMessage objects.
*/
messages: LintMessage[];
/**
* The source code of the file that was linted, with as many fixes applied as possible.
*/
output?: string;
/**
* The original source code text. This property is undefined if any messages didn't exist or the output
* property exists.
*/
source?: string;
/**
* Timing information of the lint run.
* This exists if and only if the `--stats` CLI flag was added or the `stats: true`
* option was passed to the ESLint class
* @since 9.0.0
*/
stats?: LintStats;
/**
* The array of SuppressedLintMessage objects.
*/
suppressedMessages: SuppressedLintMessage[];
/**
* The information about the deprecated rules that were used to check this file.
*/
usedDeprecatedRules: DeprecatedRuleInfo[];
/**
* The number of warnings. This includes fixable warnings.
*/
warningCount: number;
}
export interface LintStats {
/**
* The number of times ESLint has applied at least one fix after linting.
*/
fixPasses: number;
/**
* The times spent on (parsing, fixing, linting) a file, where the linting refers to the timing information for each rule.
*/
times: {
passes: LintStatsTimePass[];
};
}
export interface LintStatsTimePass {
/**
* The total time that is spent on applying fixes to the code.
*/
fix: LintStatsFixTime;
/**
* The total time that is spent when parsing a file.
*/
parse: LintStatsParseTime;
/**
* The total time that is spent on a rule.
*/
rules?: Record<string, LintStatsRuleTime>;
/**
* The cumulative total
*/
total: number;
}
export interface LintStatsParseTime {
total: number;
}
export interface LintStatsRuleTime {
total: number;
}
export interface LintStatsFixTime {
total: number;
}
export interface LintTextOptions {
/**
* The path to the file of the source code text. If omitted, the result.filePath becomes the string "<text>".
*/
filePath?: string;
/**
* If true is present and the options.filePath is a file ESLint should ignore, this method returns a lint result
* contains a warning message.
*/
warnIgnored?: boolean;
}
/**
* The LintMessage value is the information of each linting error.
*/
export interface LintMessage {
/**
* The 1-based column number of the begin point of this message.
*/
column: number | undefined;
/**
* The 1-based column number of the end point of this message. This property is undefined if this message
* is not a range.
*/
endColumn: number | undefined;
/**
* The 1-based line number of the end point of this message. This property is undefined if this
* message is not a range.
*/
endLine: number | undefined;
/**
* `true` if this is a fatal error unrelated to a rule, like a parsing error.
*/
fatal?: boolean | undefined;
/**
* The EditInfo object of autofix. This property is undefined if this message is not fixable.
*/
fix: EditInfo | undefined;
/**
* The 1-based line number of the begin point of this message.
*/
line: number | undefined;
/**
* The error message
*/
message: string;
/**
* The rule name that generates this lint message. If this message is generated by the ESLint core rather than
* rules, this is null.
*/
ruleId: string | null;
/**
* The severity of this message. 1 means warning and 2 means error.
*/
severity: 1 | 2;
/**
* The list of suggestions. Each suggestion is the pair of a description and an EditInfo object to fix code. API
* users such as editor integrations can choose one of them to fix the problem of this message. This property is
* undefined if this message doesn't have any suggestions.
*/
suggestions: {
desc: string;
fix: EditInfo;
}[] | undefined;
}
/**
* The SuppressedLintMessage value is the information of each suppressed linting error.
*/
export interface SuppressedLintMessage extends LintMessage {
/**
* The list of suppressions.
*/
suppressions?: {
/**
* The free text description added after the `--` in the comment
*/
justification: string;
/**
* Right now, this is always `directive`
*/
kind: string;
}[];
}
/**
* The EditInfo value is information to edit text.
*
* This edit information means replacing the range of the range property by the text property value. It's like
* sourceCodeText.slice(0, edit.range[0]) + edit.text + sourceCodeText.slice(edit.range[1]). Therefore, it's an add
* if the range[0] and range[1] property values are the same value, and it's removal if the text property value is
* empty string.
*/
export interface EditInfo {
/**
* The pair of 0-based indices in source code text to remove.
*/
range: [number, number];
/**
* The text to add.
*/
text: string;
}
/**
* The Formatter value is the object to convert the LintResult objects to text.
*/
export interface Formatter {
/**
* The method to convert the LintResult objects to text.
* Promise return supported since 8.4.0
*/
format(results: LintResult[]): string | Promise<string>;
}
@@ -0,0 +1,56 @@
import { createRule, makeOptionsSchema, moduleVisitor, CASE_SENSITIVE_FS, fileExistsWithCaseSync, resolve, ModuleCache, } from '../utils/index.js';
export default createRule({
name: 'no-unresolved',
meta: {
type: 'problem',
docs: {
category: 'Static analysis',
description: 'Ensure imports point to a file/module that can be resolved.',
},
schema: [
makeOptionsSchema({
caseSensitive: { type: 'boolean', default: true },
caseSensitiveStrict: { type: 'boolean' },
}),
],
messages: {
unresolved: "Unable to resolve path to module '{{module}}'.",
casingMismatch: 'Casing of {{module}} does not match the underlying filesystem.',
},
},
defaultOptions: [],
create(context) {
const options = context.options[0] || {};
return moduleVisitor(function checkSourceValue(source, node) {
if (('importKind' in node && node.importKind === 'type') ||
('exportKind' in node && node.exportKind === 'type')) {
return;
}
const caseSensitive = !CASE_SENSITIVE_FS && options.caseSensitive !== false;
const caseSensitiveStrict = !CASE_SENSITIVE_FS && options.caseSensitiveStrict;
const resolvedPath = resolve(source.value, context);
if (resolvedPath === undefined) {
context.report({
node: source,
messageId: 'unresolved',
data: {
module: source.value,
},
});
}
else if (caseSensitive || caseSensitiveStrict) {
const cacheSettings = ModuleCache.getSettings(context.settings);
if (!fileExistsWithCaseSync(resolvedPath, cacheSettings, caseSensitiveStrict)) {
context.report({
node: source,
messageId: 'casingMismatch',
data: {
module: source.value,
},
});
}
}
}, options);
},
});
//# sourceMappingURL=no-unresolved.js.map
@@ -0,0 +1 @@
{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":";AAAA,wEAAwE;AACxE,wCAAwC;;;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAA0D;IAC1E,WAAW,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC;IAC7C,WAAW,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,uBAAuB,EAAE,IAAI,CAAC;IAC5C,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,UAAU,EAAE,CAAC,6BAA6B,EAAE,IAAI,CAAC;IACjD,YAAY,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC;CACnC,CAAA;AAED,+DAA+D;AAC/D,mBAAmB;AACnB,MAAM,WAAW,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;AACjE,qCAAqC;AACrC,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,EAAE,CACjC,CAAC,CAAC,OAAO,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAA;AAE/C,4DAA4D;AAC5D,MAAM,cAAc,GAAG,CAAC,MAAgB,EAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AASpE,+DAA+D;AAC/D,kEAAkE;AAClE,mEAAmE;AACnE,yCAAyC;AACzC,iEAAiE;AACjE,6BAA6B;AACtB,MAAM,UAAU,GAAG,CACxB,IAAY,EACZ,QAAgB,EACE,EAAE;IACpB,MAAM,GAAG,GAAG,QAAQ,CAAA;IACpB,qBAAqB;IACrB,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;KAC7C;IACD,oBAAoB;IACpB,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,MAAM,IAAI,GAAa,EAAE,CAAA;IAEzB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,CAAA;IACf,IAAI,QAAQ,GAAG,KAAK,CAAA;IACpB,IAAI,KAAK,GAAG,KAAK,CAAA;IACjB,IAAI,QAAQ,GAAG,KAAK,CAAA;IACpB,IAAI,MAAM,GAAG,KAAK,CAAA;IAClB,IAAI,MAAM,GAAG,GAAG,CAAA;IAChB,IAAI,UAAU,GAAG,EAAE,CAAA;IACnB,KAAK,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE;QAC7B,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACxB,IAAI,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,EAAE;YAC7C,MAAM,GAAG,IAAI,CAAA;YACb,CAAC,EAAE,CAAA;YACH,SAAQ;SACT;QAED,IAAI,CAAC,KAAK,GAAG,IAAI,QAAQ,IAAI,CAAC,QAAQ,EAAE;YACtC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAA;YACd,MAAK;SACN;QAED,QAAQ,GAAG,IAAI,CAAA;QACf,IAAI,CAAC,KAAK,IAAI,EAAE;YACd,IAAI,CAAC,QAAQ,EAAE;gBACb,QAAQ,GAAG,IAAI,CAAA;gBACf,CAAC,EAAE,CAAA;gBACH,SAAQ;aACT;YACD,0DAA0D;SAC3D;QACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE;YAC1B,4DAA4D;YAC5D,KAAK,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;gBAChE,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE;oBAC3B,+CAA+C;oBAC/C,IAAI,UAAU,EAAE;wBACd,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;qBAC9C;oBACD,CAAC,IAAI,GAAG,CAAC,MAAM,CAAA;oBACf,IAAI,GAAG;wBAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;;wBACnB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;oBACtB,KAAK,GAAG,KAAK,IAAI,CAAC,CAAA;oBAClB,SAAS,KAAK,CAAA;iBACf;aACF;SACF;QAED,gDAAgD;QAChD,QAAQ,GAAG,KAAK,CAAA;QAChB,IAAI,UAAU,EAAE;YACd,sDAAsD;YACtD,mBAAmB;YACnB,IAAI,CAAC,GAAG,UAAU,EAAE;gBAClB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;aAC5D;iBAAM,IAAI,CAAC,KAAK,UAAU,EAAE;gBAC3B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;aAC5B;YACD,UAAU,GAAG,EAAE,CAAA;YACf,CAAC,EAAE,CAAA;YACH,SAAQ;SACT;QAED,qCAAqC;QACrC,8DAA8D;QAC9D,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;YAChC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAA;YACjC,CAAC,IAAI,CAAC,CAAA;YACN,SAAQ;SACT;QACD,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;YAC/B,UAAU,GAAG,CAAC,CAAA;YACd,CAAC,IAAI,CAAC,CAAA;YACN,SAAQ;SACT;QAED,oDAAoD;QACpD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;QAC3B,CAAC,EAAE,CAAA;KACJ;IAED,IAAI,MAAM,GAAG,CAAC,EAAE;QACd,sDAAsD;QACtD,+CAA+C;QAC/C,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAA;KAC7B;IAED,gEAAgE;IAChE,kEAAkE;IAClE,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QAClC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;KAC9C;IAED,yEAAyE;IACzE,sEAAsE;IACtE,yEAAyE;IACzE,sEAAsE;IACtE,IACE,IAAI,CAAC,MAAM,KAAK,CAAC;QACjB,MAAM,CAAC,MAAM,KAAK,CAAC;QACnB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC,MAAM,EACP;QACA,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QAClE,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,KAAK,CAAC,CAAA;KACrD;IAED,MAAM,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;IACxE,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACpE,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QAC1B,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QACnC,CAAC,CAAC,MAAM,CAAC,MAAM;YACf,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,CAAA;IAEX,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA;AAhIY,QAAA,UAAU,cAgItB","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across allLine truncated
@@ -0,0 +1,61 @@
/**
* @fileoverview Prevent usage of isMounted
* @author Joe Lencioni
*/
'use strict';
const docsUrl = require('../util/docsUrl');
const getAncestors = require('../util/eslint').getAncestors;
const report = require('../util/report');
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
noIsMounted: 'Do not use isMounted',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Disallow usage of isMounted',
category: 'Best Practices',
recommended: true,
url: docsUrl('no-is-mounted'),
},
messages,
schema: [],
},
create(context) {
return {
CallExpression(node) {
const callee = node.callee;
if (callee.type !== 'MemberExpression') {
return;
}
if (
callee.object.type !== 'ThisExpression'
|| !('name' in callee.property)
|| callee.property.name !== 'isMounted'
) {
return;
}
const ancestors = getAncestors(context, node);
for (let i = 0, j = ancestors.length; i < j; i++) {
if (ancestors[i].type === 'Property' || ancestors[i].type === 'MethodDefinition') {
report(context, messages.noIsMounted, 'noIsMounted', {
node: callee,
});
break;
}
}
},
};
},
};
@@ -0,0 +1,13 @@
function _defaults(obj, defaults) {
var keys = Object.getOwnPropertyNames(defaults);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var value = Object.getOwnPropertyDescriptor(defaults, key);
if (value && value.configurable && obj[key] === undefined) Object.defineProperty(obj, key, value);
}
return obj;
}
export { _defaults as _ };
@@ -0,0 +1,66 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/utils.ts
var utils_exports = {};
__export(utils_exports, {
spacing: () => spacing
});
module.exports = __toCommonJS(utils_exports);
var spacing = {
px: "1px",
0: "0px",
0.5: "0.125rem",
1: "0.25rem",
1.5: "0.375rem",
2: "0.5rem",
2.5: "0.625rem",
3: "0.75rem",
3.5: "0.875rem",
4: "1rem",
5: "1.25rem",
6: "1.5rem",
7: "1.75rem",
8: "2rem",
9: "2.25rem",
10: "2.5rem",
11: "2.75rem",
12: "3rem",
14: "3.5rem",
16: "4rem",
20: "5rem",
24: "6rem",
28: "7rem",
32: "8rem",
36: "9rem",
40: "10rem",
44: "11rem",
48: "12rem",
52: "13rem",
56: "14rem",
60: "15rem",
64: "16rem",
72: "18rem",
80: "20rem",
96: "24rem"
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
spacing
});
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_field_set.cjs",
"module": "../../esm/_class_private_field_set.js"
}
@@ -0,0 +1,125 @@
export type ObjectDefinition = $typests.ObjectDefinition;
export type PropertyDefinition = $typests.PropertyDefinition;
/**
* @fileoverview Merge Strategy
*/
/**
* Container class for several different merge strategies.
*/
export class MergeStrategy {
/**
* Merges two keys by overwriting the first with the second.
* @param {*} value1 The value from the first object key.
* @param {*} value2 The value from the second object key.
* @returns {*} The second value.
*/
static overwrite(value1: any, value2: any): any;
/**
* Merges two keys by replacing the first with the second only if the
* second is defined.
* @param {*} value1 The value from the first object key.
* @param {*} value2 The value from the second object key.
* @returns {*} The second value if it is defined.
*/
static replace(value1: any, value2: any): any;
/**
* Merges two properties by assigning properties from the second to the first.
* @param {*} value1 The value from the first object key.
* @param {*} value2 The value from the second object key.
* @returns {*} A new object containing properties from both value1 and
* value2.
*/
static assign(value1: any, value2: any): any;
}
/**
* Represents an object validation/merging schema.
*/
export class ObjectSchema {
/**
* Creates a new instance.
* @param {ObjectDefinition} definitions The schema definitions.
* @throws {Error} When the definitions are missing or invalid.
*/
constructor(definitions: ObjectDefinition);
/**
* Determines if a strategy has been registered for the given object key.
* @param {string} key The object key to find a strategy for.
* @returns {boolean} True if the key has a strategy registered, false if not.
*/
hasKey(key: string): boolean;
/**
* Merges objects together to create a new object comprised of the keys
* of the all objects. Keys are merged based on the each key's merge
* strategy.
* @param {...Object} objects The objects to merge.
* @returns {Object} A new object with a mix of all objects' keys.
* @throws {TypeError} If any object is invalid.
*/
merge(...objects: any[]): any;
/**
* Validates an object's keys based on the validate strategy for each key.
* @param {Object} object The object to validate.
* @returns {void}
* @throws {Error} When the object is invalid.
*/
validate(object: any): void;
#private;
}
/**
* @fileoverview Validation Strategy
*/
/**
* Container class for several different validation strategies.
*/
export class ValidationStrategy {
/**
* Validates that a value is an array.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static array(value: any): void;
/**
* Validates that a value is a boolean.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static boolean(value: any): void;
/**
* Validates that a value is a number.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static number(value: any): void;
/**
* Validates that a value is a object.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static object(value: any): void;
/**
* Validates that a value is a object or null.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static "object?"(value: any): void;
/**
* Validates that a value is a string.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static string(value: any): void;
/**
* Validates that a value is a non-empty string.
* @param {*} value The value to validate.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
static "string!"(value: any): void;
}
import type * as $typests from "./types.ts";
@@ -0,0 +1,12 @@
"use client";
import {
menu_default
} from "./chunk-4XEXWJC7.mjs";
import "./chunk-SYFLXYW3.mjs";
import "./chunk-6GUQKX6L.mjs";
import "./chunk-7C7K3AST.mjs";
import "./chunk-DQ5FVIN3.mjs";
import "./chunk-O3ZSXC63.mjs";
export {
menu_default as default
};
@@ -0,0 +1 @@
{"version":3,"names":["addComments","node","type","comments","key","concat","push"],"sources":["../../src/comments/addComments.ts"],"sourcesContent":["import type * as t from \"../index.ts\";\n\n/**\n * Add comments of certain type to a node.\n */\nexport default function addComments<T extends t.Node>(\n node: T,\n type: t.CommentTypeShorthand,\n comments: Array<t.Comment>,\n): T {\n if (!comments || !node) return node;\n\n const key = `${type}Comments` as const;\n\n if (node[key]) {\n if (type === \"leading\") {\n node[key] = comments.concat(node[key]);\n } else {\n node[key].push(...comments);\n }\n } else {\n node[key] = comments;\n }\n\n return node;\n}\n"],"mappings":";;;;;;AAKe,SAASA,WAAWA,CACjCC,IAAO,EACPC,IAA4B,EAC5BC,QAA0B,EACvB;EACH,IAAI,CAACA,QAAQ,IAAI,CAACF,IAAI,EAAE,OAAOA,IAAI;EAEnC,MAAMG,GAAG,GAAG,GAAGF,IAAI,UAAmB;EAEtC,IAAID,IAAI,CAACG,GAAG,CAAC,EAAE;IACb,IAAIF,IAAI,KAAK,SAAS,EAAE;MACtBD,IAAI,CAACG,GAAG,CAAC,GAAGD,QAAQ,CAACE,MAAM,CAACJ,IAAI,CAACG,GAAG,CAAC,CAAC;IACxC,CAAC,MAAM;MACLH,IAAI,CAACG,GAAG,CAAC,CAACE,IAAI,CAAC,GAAGH,QAAQ,CAAC;IAC7B;EACF,CAAC,MAAM;IACLF,IAAI,CAACG,GAAG,CAAC,GAAGD,QAAQ;EACtB;EAEA,OAAOF,IAAI;AACb","ignoreList":[]}
@@ -0,0 +1,19 @@
import { MotionValue, transformProps, acceleratedValues } from 'motion-dom';
class WillChangeMotionValue extends MotionValue {
constructor() {
super(...arguments);
this.isEnabled = false;
}
add(name) {
if (transformProps.has(name) || acceleratedValues.has(name)) {
this.isEnabled = true;
this.update();
}
}
update() {
this.set(this.isEnabled ? "transform" : "auto");
}
}
export { WillChangeMotionValue };
@@ -0,0 +1,78 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util = __importStar(require("../util"));
exports.default = util.createRule({
name: 'no-unsafe-unary-minus',
meta: {
type: 'problem',
docs: {
description: 'Require unary negation to take a number',
recommended: 'recommended',
requiresTypeChecking: true,
},
messages: {
unaryMinus: 'Argument of unary negation should be assignable to number | bigint but is {{type}} instead.',
},
schema: [],
},
defaultOptions: [],
create(context) {
return {
UnaryExpression(node) {
if (node.operator !== '-') {
return;
}
const services = util.getParserServices(context);
const argType = util.getConstrainedTypeAtLocation(services, node.argument);
const checker = services.program.getTypeChecker();
if (tsutils
.unionConstituents(argType)
.some(type => !tsutils.isTypeFlagSet(type, ts.TypeFlags.Any |
ts.TypeFlags.Never |
ts.TypeFlags.BigIntLike |
ts.TypeFlags.NumberLike))) {
context.report({
node,
messageId: 'unaryMinus',
data: { type: checker.typeToString(argType) },
});
}
},
};
},
});
@@ -0,0 +1,125 @@
<div align="center">
<a href="https://react-hook-form.com" title="React Hook Form - Simple React forms validation">
<img src="https://raw.githubusercontent.com/react-hook-form/react-hook-form/master/docs/logo.png" alt="React Hook Form Logo - React hook custom hook for form validation" />
</a>
</div>
<div align="center">
[![npm downloads](https://img.shields.io/npm/dm/react-hook-form.svg?style=for-the-badge)](https://www.npmjs.com/package/react-hook-form)
[![npm](https://img.shields.io/npm/dt/react-hook-form.svg?style=for-the-badge)](https://www.npmjs.com/package/react-hook-form)
[![npm](https://img.shields.io/npm/l/react-hook-form?style=for-the-badge)](https://github.com/react-hook-form/react-hook-form/blob/master/LICENSE)
[![Discord](https://img.shields.io/discord/754891658327359538.svg?style=for-the-badge&label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/yYv7GZ8)
</div>
<p align="center">
<a href="https://react-hook-form.com/get-started">Get started</a> |
<a href="https://react-hook-form.com/docs">API</a> |
<a href="https://react-hook-form.com/form-builder">Form Builder</a> |
<a href="https://react-hook-form.com/faqs">FAQs</a> |
<a href="https://github.com/react-hook-form/react-hook-form/tree/master/examples">Examples</a>
</p>
### Features
- Built with performance, UX and DX in mind
- Embraces native HTML form [validation](https://react-hook-form.com/get-started#Applyvalidation)
- Out of the box integration with [UI libraries](https://codesandbox.io/s/react-hook-form-v7-controller-5h1q5)
- [Small size](https://bundlephobia.com/result?p=react-hook-form@latest) and no [dependencies](./package.json)
- Support [Yup](https://github.com/jquense/yup), [Zod](https://github.com/colinhacks/zod), [AJV](https://github.com/ajv-validator/ajv), [Superstruct](https://github.com/ianstormtaylor/superstruct), [Joi](https://github.com/hapijs/joi) and [others](https://github.com/react-hook-form/resolvers)
### Install
npm install react-hook-form
### Quickstart
```jsx
import { useForm } from 'react-hook-form';
function App() {
const {
register,
handleSubmit,
formState: { errors },
} = useForm();
return (
<form onSubmit={handleSubmit((data) => console.log(data))}>
<input {...register('firstName')} />
<input {...register('lastName', { required: true })} />
{errors.lastName && <p>Last name is required.</p>}
<input {...register('age', { pattern: /\d+/ })} />
{errors.age && <p>Please enter number for age.</p>}
<input type="submit" />
</form>
);
}
```
### Sponsors
We’re incredibly grateful to these kind and generous sponsors for their support!
<a target="_blank" href="https://www.follower24.de/"><img width="120" src="https://images.opencollective.com/follower24/00297f8/avatar/256.png?height=256" /></a>
<a target="_blank" href='https://workleap.com/'><img width="120" src="https://images.opencollective.com/workleap/db82f38/logo/256.png?height=256" /></a>
<a target="_blank" href="https://kinsta.com/"><img width="120" src="https://images.opencollective.com/kinsta/55912d7/logo/256.png?height=256" /></a>
<a target="_blank" href='https://www.sent.dm'><img width="120" src="https://avatars.githubusercontent.com/u/153308555?s=200&v=4" /></a>
<a target="_blank" href='https://niche.com'><img width="120" src="https://avatars.githubusercontent.com/u/8988784?s=200&v=4" /></a>
<a target="_blank" href='https://toss.im'><img width="120" src="https://images.opencollective.com/toss/3ed69b3/logo/256.png" /></a>
<a target="_blank" href='https://principal.com/about-us'><img width="120" src="https://images.opencollective.com/principal/431e690/logo/256.png?height=256" /></a>
<a target="_blank" href="https://hygraph.com"><img width="120" src="https://avatars.githubusercontent.com/u/31031438" /></a>
<a target="_blank" href="https://kanamekey.com"><img width="120" src="https://images.opencollective.com/kaname/d15fd98/logo/256.png" /></a>
### Past Sponsors
Thank you to our previous sponsors for your generous support!
<a target="_blank" href="https://www.beekai.com/"><img width="24" src="https://www.beekai.com/marketing/logo/logo.svg" /></a>
<a target="_blank" href='https://route4me.com/'><img width="24" src="https://images.opencollective.com/route4me/71fb6fa/avatar/256.png?height=256" /></a>
<a target="_blank" href='https://www.sgkb.ch/'><img width="24" src="https://images.opencollective.com/st-galler-kantonalbank-ag/bfdd17f/logo/256.png?height=256" /></a>
<a target="_blank" href='https://www.sanity.io/'><img width="24" height="24" src="https://images.opencollective.com/sanity_io/558f87f/logo/256.png?height=256" /></a>
<a target="_blank" href='https://twicsy.com/'><img width="24" height="24" src="https://images.opencollective.com/buy-instagram-followers-twicsy/b4c5d7f/logo/256.png?height=256" /></a>
<a href="https://www.leniolabs.com/" target="_blank"><img src="https://www.leniolabs.com/images/leniolabs-isologo-example.jpg" width="24" height="24" /></a>
<a target="_blank" href="https://underbelly.is"><img width="24" src="https://images.opencollective.com/underbelly/989a4a6/logo/256.png" /></a>
<a target="_blank" href="https://feathery.io"><img width="24" src="https://images.opencollective.com/feathery1/c29b0a1/logo/256.png" /></a>
<a target="_blank" href="https://getform.io"><img width="24" src="https://images.opencollective.com/getformio2/3c978c8/avatar/256.png" /></a>
<a href="https://marmelab.com/" target="_blank"><img src="https://images.opencollective.com/marmelab/d7fd82f/logo/256.png" width="24" height="24" /></a>
<a target="_blank" href="https://formcarry.com/"><img width="24" src="https://images.opencollective.com/formcarry/a40a4ea/logo/256.png" /></a>
<a target="_blank" href="https://fabform.io"><img width="24" src="https://images.opencollective.com/fabform/2834037/logo/256.png" /></a>
<a target="_blank" href="https://www.thinkmill.com.au/"><img width="24" src="https://images.opencollective.com/thinkmill/28910ec/logo/256.png" /></a>
<a target="_blank" href="https://kwork.studio/"><img width="24" src="https://images.opencollective.com/knowledge-work/f91b72d/logo/256.png" /></a>
<a target="_blank" href="https://fiberplane.com/"><img width="24" src="https://avatars.githubusercontent.com/u/61152955?s=200&v=4" /></a>
<a target="_blank" href="https://www.jetbrains.com/"><img width="24" src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" /></a>
<a target="_blank" href="https://www.mirakl.com/"><img width="24" src="https://images.opencollective.com/mirakl/0b191f0/logo/256.png" /></a>
<a target="_blank" href='https://wantedlyinc.com'><img width="24" src="https://images.opencollective.com/wantedly/d94e44e/logo/256.png" /></a>
<a target="_blank" href="https://www.casinoreviews.net/"><img width="24" src="https://images.opencollective.com/casinoreviews/f0877d1/logo/256.png" /></a>
### Backers
Thanks go to all our backers! [[Become a backer](https://opencollective.com/react-hook-form#backer)].
<a href="https://opencollective.com/react-hook-form#backers">
<img src="https://opencollective.com/react-hook-form/backers.svg?width=820" />
</a>
### Contributors
Thanks go to these wonderful people! [[Become a contributor](CONTRIBUTING.md)].
<a href="https://github.com/react-hook-form/react-hook-form/graphs/contributors">
<img src="https://opencollective.com/react-hook-form/contributors.svg?width=820" />
</a>
<br />
<br />
<a href="https://ui.dev/bytes/?r=bill">
<img src="https://raw.githubusercontent.com/react-hook-form/react-hook-form/master/docs/ads-1.jpeg" />
</a>
<br />
<br />
<p align="center">Documentation website supported and backed by <a href="https://vercel.com"><b>Vercel</b></a></p>
@@ -0,0 +1,40 @@
{
"name": "imurmurhash",
"version": "0.1.4",
"description": "An incremental implementation of MurmurHash3",
"homepage": "https://github.com/jensyt/imurmurhash-js",
"main": "imurmurhash.js",
"files": [
"imurmurhash.js",
"imurmurhash.min.js",
"package.json",
"README.md"
],
"repository": {
"type": "git",
"url": "https://github.com/jensyt/imurmurhash-js"
},
"bugs": {
"url": "https://github.com/jensyt/imurmurhash-js/issues"
},
"keywords": [
"murmur",
"murmurhash",
"murmurhash3",
"hash",
"incremental"
],
"author": {
"name": "Jens Taylor",
"email": "jensyt@gmail.com",
"url": "https://github.com/homebrewing"
},
"license": "MIT",
"dependencies": {
},
"devDependencies": {
},
"engines": {
"node": ">=0.8.19"
}
}
@@ -0,0 +1,61 @@
{
"name": "@heroui/system-rsc",
"version": "2.3.6",
"description": "HeroUI system primitives compatibles with RSC imports",
"keywords": [
"system-rsc"
],
"author": "Junior Garcia <jrgarciadev@gmail.com>",
"homepage": "https://heroui.com",
"license": "MIT",
"main": "dist/index.js",
"sideEffects": false,
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/heroui-inc/heroui.git",
"directory": "packages/core/system-rsc"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0",
"@heroui/theme": ">=2.4.0"
},
"dependencies": {
"@react-types/shared": "3.26.0",
"clsx": "^1.2.1"
},
"clean-package": "../../../clean-package.config.json",
"tsup": {
"clean": true,
"target": "es2019",
"format": [
"cjs",
"esm"
]
},
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsup src --dts",
"build:fast": "tsup src",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit"
}
}
@@ -0,0 +1,98 @@
import conversions from './conversions.js';
/*
This function routes a model to all other models.
all functions that are routed have a property `.conversion` attached
to the returned synthetic function. This property is an array
of strings, each with the steps in between the 'from' and 'to'
color models (inclusive).
conversions that are not possible simply are not included.
*/
function buildGraph() {
const graph = {};
// https://jsperf.com/object-keys-vs-for-in-with-closure/3
const models = Object.keys(conversions);
for (let {length} = models, i = 0; i < length; i++) {
graph[models[i]] = {
// http://jsperf.com/1-vs-infinity
// micro-opt, but this is simple.
distance: -1,
parent: null,
};
}
return graph;
}
// https://en.wikipedia.org/wiki/Breadth-first_search
function deriveBFS(fromModel) {
const graph = buildGraph();
const queue = [fromModel]; // Unshift -> queue -> pop
graph[fromModel].distance = 0;
while (queue.length > 0) {
const current = queue.pop();
const adjacents = Object.keys(conversions[current]);
for (let {length} = adjacents, i = 0; i < length; i++) {
const adjacent = adjacents[i];
const node = graph[adjacent];
if (node.distance === -1) {
node.distance = graph[current].distance + 1;
node.parent = current;
queue.unshift(adjacent);
}
}
}
return graph;
}
function link(from, to) {
return function (args) {
return to(from(args));
};
}
function wrapConversion(toModel, graph) {
const path = [graph[toModel].parent, toModel];
let fn = conversions[graph[toModel].parent][toModel];
let cur = graph[toModel].parent;
while (graph[cur].parent) {
path.unshift(graph[cur].parent);
fn = link(conversions[graph[cur].parent][cur], fn);
cur = graph[cur].parent;
}
fn.conversion = path;
return fn;
}
function route(fromModel) {
const graph = deriveBFS(fromModel);
const conversion = {};
const models = Object.keys(graph);
for (let {length} = models, i = 0; i < length; i++) {
const toModel = models[i];
const node = graph[toModel];
if (node.parent === null) {
// No possible conversion, or this node is the source model.
continue;
}
conversion[toModel] = wrapConversion(toModel, graph);
}
return conversion;
}
export default route;
@@ -0,0 +1 @@
{"version":3,"file":"buildGetPlanOptionsFromPlanParams.d.ts","sourceRoot":"","sources":["../../../../src/planning/calculations/buildGetPlanOptionsFromPlanParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,UAAU,GACjB,cAAc,CAmBhB"}
@@ -0,0 +1,3 @@
export * from './union-evaluated';
export * from './union-type';
export * from './union';
@@ -0,0 +1,92 @@
import {TokenType as tt} from "../parser/tokenizer/types";
/**
* Determine information about this named import or named export specifier.
*
* This syntax is the `a` from statements like these:
* import {A} from "./foo";
* export {A};
* export {A} from "./foo";
*
* As it turns out, we can exactly characterize the syntax meaning by simply
* counting the number of tokens, which can be from 1 to 4:
* {A}
* {type A}
* {A as B}
* {type A as B}
*
* In the type case, we never actually need the names in practice, so don't get
* them.
*
* TODO: There's some redundancy with the type detection here and the isType
* flag that's already present on tokens in TS mode. This function could
* potentially be simplified and/or pushed to the call sites to avoid the object
* allocation.
*/
export default function getImportExportSpecifierInfo(
tokens,
index = tokens.currentIndex(),
) {
let endIndex = index + 1;
if (isSpecifierEnd(tokens, endIndex)) {
// import {A}
const name = tokens.identifierNameAtIndex(index);
return {
isType: false,
leftName: name,
rightName: name,
endIndex,
};
}
endIndex++;
if (isSpecifierEnd(tokens, endIndex)) {
// import {type A}
return {
isType: true,
leftName: null,
rightName: null,
endIndex,
};
}
endIndex++;
if (isSpecifierEnd(tokens, endIndex)) {
// import {A as B}
return {
isType: false,
leftName: tokens.identifierNameAtIndex(index),
rightName: tokens.identifierNameAtIndex(index + 2),
endIndex,
};
}
endIndex++;
if (isSpecifierEnd(tokens, endIndex)) {
// import {type A as B}
return {
isType: true,
leftName: null,
rightName: null,
endIndex,
};
}
throw new Error(`Unexpected import/export specifier at ${index}`);
}
function isSpecifierEnd(tokens, index) {
const token = tokens.tokens[index];
return token.type === tt.braceR || token.type === tt.comma;
}
@@ -0,0 +1 @@
{"name":"postcss-js","version":"4.1.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532104930,"integrity":"sha512-plt46lmwcpyMiXabPHXlLn+QHJq66BCJLCsXaxESFP6xLqgchHXFJfqZT5mbHEKSfWTgQdevUxkkyNLo4f19yA==","mode":420,"size":1095},"async.js":{"checkedAt":1794532104930,"integrity":"sha512-9ZNjx7kZiZCgpW7wQT9K2czTvztWwGGnB74gqSr7cydp8AeqrUE49NyTwN2+S/iZQ6WAW08LqZKiwkWrFUE+UQ==","mode":420,"size":358},"index.js":{"checkedAt":1794532104930,"integrity":"sha512-428m9QD7UeBhgTg5DvyQ1Oz1Gc7hOTtocM6gG/9QRZ7MAltecQFaEXjvg0RCiMydDB8x6ja6n2uZaXhoFfLU5g==","mode":420,"size":193},"objectifier.js":{"checkedAt":1794532104930,"integrity":"sha512-uaA1ayHDUDR6b7gqTftcZSKZFGuh9jTX5HskTwzQ3M/EA9p8T5F09X5dFxs45yq89zcVZxWu5T/ue6iYFV4jtQ==","mode":420,"size":2351},"parser.js":{"checkedAt":1794532104930,"integrity":"sha512-L8CSsocn++bYq5QuOvw3GPKv0WM4a6e1VOv2e4eXXXSNEoS4B5tezERaRb69ngSOnsAN2XJ+xCx3tLcIXr1vRA==","mode":420,"size":2295},"process-result.js":{"checkedAt":1794532104931,"integrity":"sha512-HcsHmpwhFTLvjr+FpDeJEjUC0QGsDvd4FYwPWLYoODtvAfsO2XoFpXERdLeSzV53HZRFIz0GNZTTfQiZA+YxSA==","mode":420,"size":300},"sync.js":{"checkedAt":1794532104931,"integrity":"sha512-iTHmnMnz1RMt13ZVFFCkXbJ/LMt9ZENJkv6tOQ89xdXZsO+dA+SORGOgnrZ7WfiEyRqFTUqrafsZNmFr7p8srQ==","mode":420,"size":325},"package.json":{"checkedAt":1794532104931,"integrity":"sha512-nLuaENenzAAWWfK/5rCI6xoFOIAoKGH85CmEpNEvaE3h0/HuQcsX2R+8aPuYI1oNJ1657dQRB7EqUbc1W/5HfA==","mode":420,"size":1016},"README.md":{"checkedAt":1794532104931,"integrity":"sha512-WR+cpEiAND0MQ6rID7/wmuaaIeFWNXVTiyBtbKWw8iHNXQ6H4Yd9NSPIIM+AAH/M24t0P7OR73KGOoBvXT/8BQ==","mode":420,"size":724},"index.mjs":{"checkedAt":1794532104931,"integrity":"sha512-9c9O/ya2IR7rz69PNyphY71c5BjtCZUpHBU/LPSMYBfPLLiXKJAHczwJd0IObh0ozat4F0g4xD4M377uE7zVgQ==","mode":420,"size":192}}}
@@ -0,0 +1,21 @@
import Inline from '../blots/inline.js';
class Script extends Inline {
static blotName = 'script';
static tagName = ['SUB', 'SUP'];
static create(value) {
if (value === 'super') {
return document.createElement('sup');
}
if (value === 'sub') {
return document.createElement('sub');
}
return super.create(value);
}
static formats(domNode) {
if (domNode.tagName === 'SUB') return 'sub';
if (domNode.tagName === 'SUP') return 'super';
return undefined;
}
}
export default Script;
//# sourceMappingURL=script.js.map
@@ -0,0 +1,23 @@
/**
* @file cmap 表
* @author mengke01(kekee000@gmail.com)
*
* @see
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6cmap.html
*/
import table from './table';
import parse from './cmap/parse';
import write from './cmap/write';
import sizeof from './cmap/sizeof';
export default table.create(
'cmap',
[],
{
write,
read: parse,
size: sizeof
}
);
@@ -0,0 +1 @@
{"name":"deep-is","version":"0.1.4","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532094954,"integrity":"sha512-Y/3DaTdKZmy+ITAbdaEUL7/efFl/1a/SAEvKMNXwUDdSkjWKp6dAz2f6tTvaRKK05zguzZDlIoPfzzxP3//sSQ==","mode":420,"size":1237},"example/cmp.js":{"checkedAt":1794532094954,"integrity":"sha512-q1iZdWwhTKDrHZXU9WZ7O+cO9HljZ1VCEQJC/5XfFf9i9Tv92UHlLIioWnNuoXc0Rso/k7Bct+qiTZM2/9AB4w==","mode":420,"size":207},"test/cmp.js":{"checkedAt":1794532094954,"integrity":"sha512-AyNwXPmJ0TncA5ErxfcpBadWlI0mPLjuHkUdAIIc7wfML1qTmbsUn7IinaFz3EmYo6Q+KFk5zoeZ01in2PI4dg==","mode":420,"size":446},"index.js":{"checkedAt":1794532094954,"integrity":"sha512-rfEa6i/j3UOAm/HXilKwjcTx8WT3OFyKQPHsw5TgKIuSbfjFOihL8TatTrBRW3W9UHDbTYJ1cS/RWzTyE+i/Zw==","mode":420,"size":3104},"test/NaN.js":{"checkedAt":1794532094954,"integrity":"sha512-NoZCZeFWjK8zp8aRGf3hdJr2W999x6nvHYGip0Uen6dsWGgqSzj1M80FvGYJJfbOgO2suG8F+kzv/Z94Xv3SBQ==","mode":420,"size":329},"test/neg-vs-pos-0.js":{"checkedAt":1794532094954,"integrity":"sha512-m/vEPvnHaGiiOWvY17Ci5M1uufBfoD8Qb/iI9Cs83dsx82qmqC7bNOdxWHpLJysQLKYZQcMzwzGlI21yiOlvSQ==","mode":420,"size":343},"package.json":{"checkedAt":1794532094955,"integrity":"sha512-LgNReco0UnL0S9GqOm5SkWl1jEOBRgk72Z3i2ZV0e4HzBp7TPZ8a9Vv+wOzClMfVBrq59qDdFcQXBEyk0Uxg4w==","mode":420,"size":953},"README.markdown":{"checkedAt":1794532094955,"integrity":"sha512-XtivGXvlGtbQ2wF6pf+gSzPvtBggIW4YMqaUgeoAeB+A6N81bFFCdRwZ8Tpq6fhnHvnJJXgDwSQESKm5Pbpm9w==","mode":420,"size":1443},".travis.yml":{"checkedAt":1794532094955,"integrity":"sha512-bhogr1+NYi9MaUcpDVoItziNur2K/BOU7RmPq1SSogayAZtzpDitEF/Z8VBqamWK1JB6WK2UqPeXJqaGUl7Ajw==","mode":420,"size":52}}}
@@ -0,0 +1,4 @@
function _class_call_check(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
export { _class_call_check as _ };
@@ -0,0 +1,2 @@
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.angular=e()}})(function(){"use strict";var dt=Object.defineProperty;var qs=Object.getOwnPropertyDescriptor;var js=Object.getOwnPropertyNames;var zs=Object.prototype.hasOwnProperty;var tn=t=>{throw TypeError(t)};var nn=(t,e)=>{for(var n in e)dt(t,n,{get:e[n],enumerable:!0})},Gs=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of js(e))!zs.call(t,r)&&r!==n&&dt(t,r,{get:()=>e[r],enumerable:!(s=qs(e,r))||s.enumerable});return t};var Xs=t=>Gs(dt({},"__esModule",{value:!0}),t);var mt=(t,e,n)=>e.has(t)||tn("Cannot "+n);var L=(t,e,n)=>(mt(t,e,"read from private field"),n?n.call(t):e.get(t)),V=(t,e,n)=>e.has(t)?tn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),te=(t,e,n,s)=>(mt(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),c=(t,e,n)=>(mt(t,e,"access private method"),n);var si={};nn(si,{parsers:()=>Zt});var Zt={};nn(Zt,{__ng_action:()=>Zr,__ng_binding:()=>ei,__ng_directive:()=>ni,__ng_interpolation:()=>ti});var ii=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var sn;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(sn||(sn={}));var rn;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(rn||(rn={}));var on;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(on||(on={}));var D;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(D||(D={}));var an;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(an||(an={}));var ln;(function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"})(ln||(ln={}));var cn;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(cn||(cn={}));var un;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(un||(un={}));var pn;(function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"})(pn||(pn={}));var hn;(function(t){t[t.None=0]="None",t[t.Const=1]="Const"})(hn||(hn={}));var fn;(function(t){t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function",t[t.Inferred=6]="Inferred",t[t.None=7]="None"})(fn||(fn={}));var Js=void 0;var dn;(function(t){t[t.Minus=0]="Minus",t[t.Plus=1]="Plus"})(dn||(dn={}));var _;(function(t){t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Identical=2]="Identical",t[t.NotIdentical=3]="NotIdentical",t[t.Minus=4]="Minus",t[t.Plus=5]="Plus",t[t.Divide=6]="Divide",t[t.Multiply=7]="Multiply",t[t.Modulo=8]="Modulo",t[t.And=9]="And",t[t.Or=10]="Or",t[t.BitwiseOr=11]="BitwiseOr",t[t.BitwiseAnd=12]="BitwiseAnd",t[t.Lower=13]="Lower",t[t.LowerEquals=14]="LowerEquals",t[t.Bigger=15]="Bigger",t[t.BiggerEquals=16]="BiggerEquals",t[t.NullishCoalesce=17]="NullishCoalesce",t[t.Exponentiation=18]="Exponentiation",t[t.In=19]="In"})(_||(_={}));function Ys(t,e){return t==null||e==null?t==e:t.isEquivalent(e)}function Qs(t,e,n){let s=t.length;if(s!==e.length)return!1;for(let r=0;r<s;r++)if(!n(t[r],e[r]))return!1;return!0}function ct(t,e){return Qs(t,e,(n,s)=>n.isEquivalent(s))}var b=class{type;sourceSpan;constructor(e,n){this.type=e||null,this.sourceSpan=n||null}prop(e,n){return new Ct(this,e,null,n)}key(e,n,s){return new Tt(this,e,n,s)}callFn(e,n,s){return new St(this,e,null,n,s)}instantiate(e,n,s){return new Et(this,e,n,s)}conditional(e,n=null,s){return new _t(this,e,n,null,s)}equals(e,n){return new C(_.Equals,this,e,null,n)}notEquals(e,n){return new C(_.NotEquals,this,e,null,n)}identical(e,n){return new C(_.Identical,this,e,null,n)}notIdentical(e,n){return new C(_.NotIdentical,this,e,null,n)}minus(e,n){return new C(_.Minus,this,e,null,n)}plus(e,n){return new C(_.Plus,this,e,null,n)}divide(e,n){return new C(_.Divide,this,e,null,n)}multiply(e,n){return new C(_.Multiply,this,e,null,n)}modulo(e,n){return new C(_.Modulo,this,e,null,n)}power(e,n){return new C(_.Exponentiation,this,e,null,n)}and(e,n){return new C(_.And,this,e,null,n)}bitwiseOr(e,n){return new C(_.BitwiseOr,this,e,null,n)}bitwiseAnd(e,n){return new C(_.BitwiseAnd,this,e,null,n)}or(e,n){return new C(_.Or,this,e,null,n)}lower(e,n){return new C(_.Lower,this,e,null,n)}lowerEquals(e,n){return new C(_.LowerEquals,this,e,null,n)}bigger(e,n){return new C(_.Bigger,this,e,null,n)}biggerEquals(e,n){return new C(_.BiggerEquals,this,e,null,n)}isBlank(e){return this.equals(TYPED_NLine truncated
\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,ki=new RegExp(`[^${ds}]`),bi=new RegExp(`[${ds}]{2,}`,"g");var m;(function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.PrivateIdentifier=2]="PrivateIdentifier",t[t.Keyword=3]="Keyword",t[t.String=4]="String",t[t.Operator=5]="Operator",t[t.Number=6]="Number",t[t.Error=7]="Error"})(m||(m={}));var q;(function(t){t[t.Plain=0]="Plain",t[t.TemplateLiteralPart=1]="TemplateLiteralPart",t[t.TemplateLiteralEnd=2]="TemplateLiteralEnd"})(q||(q={}));var Lr=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in"],qe=class{tokenize(e){return new Bt(e).scan()}},M=class{index;end;type;numValue;strValue;constructor(e,n,s,r,i){this.index=e,this.end=n,this.type=s,this.numValue=r,this.strValue=i}isCharacter(e){return this.type===m.Character&&this.numValue===e}isNumber(){return this.type===m.Number}isString(){return this.type===m.String}isOperator(e){return this.type===m.Operator&&this.strValue===e}isIdentifier(){return this.type===m.Identifier}isPrivateIdentifier(){return this.type===m.PrivateIdentifier}isKeyword(){return this.type===m.Keyword}isKeywordLet(){return this.type===m.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===m.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===m.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===m.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===m.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===m.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===m.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===m.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===m.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===m.Keyword&&this.strValue==="in"}isError(){return this.type===m.Error}toNumber(){return this.type===m.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===q.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===q.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}isTemplateLiteralInterpolationEnd(){return this.isOperator("}")}toString(){switch(this.type){case m.Character:case m.Identifier:case m.Keyword:case m.Operator:case m.PrivateIdentifier:case m.String:case m.Error:return this.strValue;case m.Number:return this.numValue.toString();default:return null}}},Ie=class extends M{kind;constructor(e,n,s,r){super(e,n,m.String,0,s),this.kind=r}};function Ze(t,e,n){return new M(t,e,m.Character,n,String.fromCharCode(n))}function Mr(t,e,n){return new M(t,e,m.Identifier,0,n)}function $r(t,e,n){return new M(t,e,m.PrivateIdentifier,0,n)}function Rr(t,e,n){return new M(t,e,m.Keyword,0,n)}function _e(t,e,n){return new M(t,e,m.Operator,0,n)}function Dr(t,e,n){return new M(t,e,m.Number,n,"")}function Br(t,e,n){return new M(t,e,m.Error,0,n)}var et=new M(-1,-1,m.Character,0,""),Bt=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(e){this.input=e,this.length=e.length,this.advance()}scan(){let e=this.scanToken();for(;e!==null;)this.tokens.push(e),e=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?Qe:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,n=this.length,s=this.peek,r=this.index;for(;s<=Zn;)if(++r>=n){s=Qe;break}else s=e.charCodeAt(r);if(this.peek=s,this.index=r,r>=n)return null;if(zn(s))return this.scanIdentifier();if(z(s))return this.scanNumber(r);let i=r;switch(s){case re:return this.advance(),z(this.peek)?this.scanNumber(i):Ze(i,this.index,re);case tt:case se:case nt:case ke:case Ce:case ie:case Te:return this.scanCharacter(i,s);case ot:return this.scanOpenBrace(i,s);case be:return this.scanCloseBrace(i,s);case ts:case es:return this.scanString();case Rt:return this.advance(),this.scanTemplateLiteralPart(i);case or:return this.scanPrivateIdentifier();case ns:case ss:case $t:case ar:case fr:return this.scanOperator(i,String.fromCharCode(s));case En:return this.scanComplexOperator(i,"*",En,"*");case yn:return this.scanQuestion(i);case lr:case cr:return this.scanComplexOperator(i,String.fromCharCode(s),Ke,"=");case ir:case Ke:return this.scanComplexOperator(i,String.fromCharCode(s),Ke,"=",Ke,"=");case Sn:return this.scanComplexOperator(i,"&",Sn,"&");case Cn:return this.scanComplexOperator(i,"|",Cn,"|");case ls:for(;Er(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,n){return this.advance(),Ze(e,this.index,n)}scanOperator(e,n){return this.advance(),_e(e,this.index,n)}scanOpenBrace(e,n){return this.braceStack.push("expression"),this.advance(),Ze(e,this.index,n)}scanCloseBrace(e,n){return this.advance(),this.braceStack.pop()==="interpolation"?(this.tokens.push(_e(e,this.index,"}")),this.scanTemplateLiteralPart(this.index)):Ze(e,this.index,n)}scanComplexOperator(e,n,s,Line truncated
@@ -0,0 +1,60 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.removeServiceNodeBindingIfContextFree = removeServiceNodeBindingIfContextFree;
const BindingConstraintsImplementation_1 = require("../../binding/models/BindingConstraintsImplementation");
const InversifyCoreError_1 = require("../../error/models/InversifyCoreError");
const InversifyCoreErrorKind_1 = require("../../error/models/InversifyCoreErrorKind");
const LazyPlanServiceNode_1 = require("../models/LazyPlanServiceNode");
/**
* Detach a binding to the root service node if it is context-free.
* @param serviceNode The service node to attach the binding to.
* @param binding The binding to attach.
* @param bindingConstraintsList The list of binding constraints.
* @param optionalBindings Whether the bindings are optional.
* @returns True if the binding requires ancestor metadata, false otherwise.
*/
function removeServiceNodeBindingIfContextFree(serviceNode, binding, bindingConstraintsList, optionalBindings) {
if (LazyPlanServiceNode_1.LazyPlanServiceNode.is(serviceNode) && !serviceNode.isExpanded()) {
return {
bindingNodeRemoved: undefined,
isContextFreeBinding: true,
};
}
const bindingConstraints = new BindingConstraintsImplementation_1.BindingConstraintsImplementation(bindingConstraintsList.last);
if (!binding.isSatisfiedBy(bindingConstraints) ||
bindingConstraintsList.last.elem.getAncestorsCalled) {
return {
bindingNodeRemoved: undefined,
isContextFreeBinding: !bindingConstraintsList.last.elem.getAncestorsCalled,
};
}
let bindingNodeRemoved;
if (Array.isArray(serviceNode.bindings)) {
serviceNode.bindings = serviceNode.bindings.filter((bindingNode) => {
if (bindingNode.binding === binding) {
bindingNodeRemoved = bindingNode;
return false;
}
return true;
});
}
else {
if (serviceNode.bindings?.binding === binding) {
bindingNodeRemoved = serviceNode.bindings;
if (optionalBindings) {
serviceNode.bindings = undefined;
}
else {
if (!LazyPlanServiceNode_1.LazyPlanServiceNode.is(serviceNode)) {
throw new InversifyCoreError_1.InversifyCoreError(InversifyCoreErrorKind_1.InversifyCoreErrorKind.planning, 'Unexpected non-lazy plan service node. This is likely a bug in the planning logic. Please, report this issue');
}
serviceNode.invalidate();
}
}
}
return {
bindingNodeRemoved: bindingNodeRemoved,
isContextFreeBinding: true,
};
}
//# sourceMappingURL=removeServiceNodeBindingIfContextFree.js.map
@@ -0,0 +1 @@
{"version":3,"file":"MetadataTag.js","sourceRoot":"","sources":["../../../../src/metadata/models/MetadataTag.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
import type { TSchema } from '../../type/schema/index';
/** Returns true if this schema contains a transform codec */
export declare function HasTransform(schema: TSchema, references: TSchema[]): boolean;
@@ -0,0 +1,355 @@
import * as tailwind_variants from 'tailwind-variants';
import { VariantProps } from 'tailwind-variants';
import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
/**
* Image wrapper **Tailwind Variants** component
*
* const {img, wrapper, blurredImg, zoomedWrapper} = image({...})
*
* @example
* <div className={wrapper()}>
* <img alt="image" className={img())} src="https://..." />
* // wrap the image if you want to zoom it
* <div className={zoomedWrapper()}>
* <img alt="image" className={img())} src="https://..." />
* </div>
* // duplicate it for the blur effect
* <img alt="image" className={blurredImg())} src="https://..." />
* </div>
*/
declare const image: tailwind_variants.TVReturnType<{
radius: {
none: {};
sm: {};
md: {};
lg: {};
full: {};
};
shadow: {
none: {
wrapper: string;
img: string;
};
sm: {
wrapper: string;
img: string;
};
md: {
wrapper: string;
img: string;
};
lg: {
wrapper: string;
img: string;
};
};
isZoomed: {
true: {
img: string[];
};
};
showSkeleton: {
true: {
wrapper: string[];
img: string;
};
};
disableAnimation: {
true: {
img: string;
};
false: {
img: string;
};
};
}, {
wrapper: string;
zoomedWrapper: string;
img: string;
blurredImg: string[];
}, undefined, tailwind_variants_dist_config.TVConfig<{
radius: {
none: {};
sm: {};
md: {};
lg: {};
full: {};
};
shadow: {
none: {
wrapper: string;
img: string;
};
sm: {
wrapper: string;
img: string;
};
md: {
wrapper: string;
img: string;
};
lg: {
wrapper: string;
img: string;
};
};
isZoomed: {
true: {
img: string[];
};
};
showSkeleton: {
true: {
wrapper: string[];
img: string;
};
};
disableAnimation: {
true: {
img: string;
};
false: {
img: string;
};
};
}, {
radius: {
none: {};
sm: {};
md: {};
lg: {};
full: {};
};
shadow: {
none: {
wrapper: string;
img: string;
};
sm: {
wrapper: string;
img: string;
};
md: {
wrapper: string;
img: string;
};
lg: {
wrapper: string;
img: string;
};
};
isZoomed: {
true: {
img: string[];
};
};
showSkeleton: {
true: {
wrapper: string[];
img: string;
};
};
disableAnimation: {
true: {
img: string;
};
false: {
img: string;
};
};
}>, {
radius: {
none: {};
sm: {};
md: {};
lg: {};
full: {};
};
shadow: {
none: {
wrapper: string;
img: string;
};
sm: {
wrapper: string;
img: string;
};
md: {
wrapper: string;
img: string;
};
lg: {
wrapper: string;
img: string;
};
};
isZoomed: {
true: {
img: string[];
};
};
showSkeleton: {
true: {
wrapper: string[];
img: string;
};
};
disableAnimation: {
true: {
img: string;
};
false: {
img: string;
};
};
}, {
wrapper: string;
zoomedWrapper: string;
img: string;
blurredImg: string[];
}, tailwind_variants.TVReturnType<{
radius: {
none: {};
sm: {};
md: {};
lg: {};
full: {};
};
shadow: {
none: {
wrapper: string;
img: string;
};
sm: {
wrapper: string;
img: string;
};
md: {
wrapper: string;
img: string;
};
lg: {
wrapper: string;
img: string;
};
};
isZoomed: {
true: {
img: string[];
};
};
showSkeleton: {
true: {
wrapper: string[];
img: string;
};
};
disableAnimation: {
true: {
img: string;
};
false: {
img: string;
};
};
}, {
wrapper: string;
zoomedWrapper: string;
img: string;
blurredImg: string[];
}, undefined, tailwind_variants_dist_config.TVConfig<{
radius: {
none: {};
sm: {};
md: {};
lg: {};
full: {};
};
shadow: {
none: {
wrapper: string;
img: string;
};
sm: {
wrapper: string;
img: string;
};
md: {
wrapper: string;
img: string;
};
lg: {
wrapper: string;
img: string;
};
};
isZoomed: {
true: {
img: string[];
};
};
showSkeleton: {
true: {
wrapper: string[];
img: string;
};
};
disableAnimation: {
true: {
img: string;
};
false: {
img: string;
};
};
}, {
radius: {
none: {};
sm: {};
md: {};
lg: {};
full: {};
};
shadow: {
none: {
wrapper: string;
img: string;
};
sm: {
wrapper: string;
img: string;
};
md: {
wrapper: string;
img: string;
};
lg: {
wrapper: string;
img: string;
};
};
isZoomed: {
true: {
img: string[];
};
};
showSkeleton: {
true: {
wrapper: string[];
img: string;
};
};
disableAnimation: {
true: {
img: string;
};
false: {
img: string;
};
};
}>, unknown, unknown, undefined>>;
type ImageVariantProps = VariantProps<typeof image>;
type ImageSlots = keyof ReturnType<typeof image>;
export { ImageSlots, ImageVariantProps, image };
@@ -0,0 +1,53 @@
'use strict';
const ALIAS = Symbol.for('yaml.alias');
const DOC = Symbol.for('yaml.document');
const MAP = Symbol.for('yaml.map');
const PAIR = Symbol.for('yaml.pair');
const SCALAR = Symbol.for('yaml.scalar');
const SEQ = Symbol.for('yaml.seq');
const NODE_TYPE = Symbol.for('yaml.node.type');
const isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS;
const isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC;
const isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP;
const isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR;
const isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR;
const isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ;
function isCollection(node) {
if (node && typeof node === 'object')
switch (node[NODE_TYPE]) {
case MAP:
case SEQ:
return true;
}
return false;
}
function isNode(node) {
if (node && typeof node === 'object')
switch (node[NODE_TYPE]) {
case ALIAS:
case MAP:
case SCALAR:
case SEQ:
return true;
}
return false;
}
const hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
exports.ALIAS = ALIAS;
exports.DOC = DOC;
exports.MAP = MAP;
exports.NODE_TYPE = NODE_TYPE;
exports.PAIR = PAIR;
exports.SCALAR = SCALAR;
exports.SEQ = SEQ;
exports.hasAnchor = hasAnchor;
exports.isAlias = isAlias;
exports.isCollection = isCollection;
exports.isDocument = isDocument;
exports.isMap = isMap;
exports.isNode = isNode;
exports.isPair = isPair;
exports.isScalar = isScalar;
exports.isSeq = isSeq;
@@ -0,0 +1 @@
{"version":3,"file":"getRandomValues.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/getRandomValues.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAM9E"}
@@ -0,0 +1,456 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _tokenizer = require('./parser/tokenizer');
var _keywords = require('./parser/tokenizer/keywords');
var _types = require('./parser/tokenizer/types');
var _getImportExportSpecifierInfo = require('./util/getImportExportSpecifierInfo'); var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
var _getNonTypeIdentifiers = require('./util/getNonTypeIdentifiers');
/**
* Class responsible for preprocessing and bookkeeping import and export declarations within the
* file.
*
* TypeScript uses a simpler mechanism that does not use functions like interopRequireDefault and
* interopRequireWildcard, so we also allow that mode for compatibility.
*/
class CJSImportProcessor {
__init() {this.nonTypeIdentifiers = new Set()}
__init2() {this.importInfoByPath = new Map()}
__init3() {this.importsToReplace = new Map()}
__init4() {this.identifierReplacements = new Map()}
__init5() {this.exportBindingsByLocalName = new Map()}
constructor(
nameManager,
tokens,
enableLegacyTypeScriptModuleInterop,
options,
isTypeScriptTransformEnabled,
keepUnusedImports,
helperManager,
) {;this.nameManager = nameManager;this.tokens = tokens;this.enableLegacyTypeScriptModuleInterop = enableLegacyTypeScriptModuleInterop;this.options = options;this.isTypeScriptTransformEnabled = isTypeScriptTransformEnabled;this.keepUnusedImports = keepUnusedImports;this.helperManager = helperManager;CJSImportProcessor.prototype.__init.call(this);CJSImportProcessor.prototype.__init2.call(this);CJSImportProcessor.prototype.__init3.call(this);CJSImportProcessor.prototype.__init4.call(this);CJSImportProcessor.prototype.__init5.call(this);}
preprocessTokens() {
for (let i = 0; i < this.tokens.tokens.length; i++) {
if (
this.tokens.matches1AtIndex(i, _types.TokenType._import) &&
!this.tokens.matches3AtIndex(i, _types.TokenType._import, _types.TokenType.name, _types.TokenType.eq)
) {
this.preprocessImportAtIndex(i);
}
if (
this.tokens.matches1AtIndex(i, _types.TokenType._export) &&
!this.tokens.matches2AtIndex(i, _types.TokenType._export, _types.TokenType.eq)
) {
this.preprocessExportAtIndex(i);
}
}
this.generateImportReplacements();
}
/**
* In TypeScript, import statements that only import types should be removed.
* This includes `import {} from 'foo';`, but not `import 'foo';`.
*/
pruneTypeOnlyImports() {
this.nonTypeIdentifiers = _getNonTypeIdentifiers.getNonTypeIdentifiers.call(void 0, this.tokens, this.options);
for (const [path, importInfo] of this.importInfoByPath.entries()) {
if (
importInfo.hasBareImport ||
importInfo.hasStarExport ||
importInfo.exportStarNames.length > 0 ||
importInfo.namedExports.length > 0
) {
continue;
}
const names = [
...importInfo.defaultNames,
...importInfo.wildcardNames,
...importInfo.namedImports.map(({localName}) => localName),
];
if (names.every((name) => this.shouldAutomaticallyElideImportedName(name))) {
this.importsToReplace.set(path, "");
}
}
}
shouldAutomaticallyElideImportedName(name) {
return (
this.isTypeScriptTransformEnabled &&
!this.keepUnusedImports &&
!this.nonTypeIdentifiers.has(name)
);
}
generateImportReplacements() {
for (const [path, importInfo] of this.importInfoByPath.entries()) {
const {
defaultNames,
wildcardNames,
namedImports,
namedExports,
exportStarNames,
hasStarExport,
} = importInfo;
if (
defaultNames.length === 0 &&
wildcardNames.length === 0 &&
namedImports.length === 0 &&
namedExports.length === 0 &&
exportStarNames.length === 0 &&
!hasStarExport
) {
// Import is never used, so don't even assign a name.
this.importsToReplace.set(path, `require('${path}');`);
continue;
}
const primaryImportName = this.getFreeIdentifierForPath(path);
let secondaryImportName;
if (this.enableLegacyTypeScriptModuleInterop) {
secondaryImportName = primaryImportName;
} else {
secondaryImportName =
wildcardNames.length > 0 ? wildcardNames[0] : this.getFreeIdentifierForPath(path);
}
let requireCode = `var ${primaryImportName} = require('${path}');`;
if (wildcardNames.length > 0) {
for (const wildcardName of wildcardNames) {
const moduleExpr = this.enableLegacyTypeScriptModuleInterop
? primaryImportName
: `${this.helperManager.getHelperName("interopRequireWildcard")}(${primaryImportName})`;
requireCode += ` var ${wildcardName} = ${moduleExpr};`;
}
} else if (exportStarNames.length > 0 && secondaryImportName !== primaryImportName) {
requireCode += ` var ${secondaryImportName} = ${this.helperManager.getHelperName(
"interopRequireWildcard",
)}(${primaryImportName});`;
} else if (defaultNames.length > 0 && secondaryImportName !== primaryImportName) {
requireCode += ` var ${secondaryImportName} = ${this.helperManager.getHelperName(
"interopRequireDefault",
)}(${primaryImportName});`;
}
for (const {importedName, localName} of namedExports) {
requireCode += ` ${this.helperManager.getHelperName(
"createNamedExportFrom",
)}(${primaryImportName}, '${localName}', '${importedName}');`;
}
for (const exportStarName of exportStarNames) {
requireCode += ` exports.${exportStarName} = ${secondaryImportName};`;
}
if (hasStarExport) {
requireCode += ` ${this.helperManager.getHelperName(
"createStarExport",
)}(${primaryImportName});`;
}
this.importsToReplace.set(path, requireCode);
for (const defaultName of defaultNames) {
this.identifierReplacements.set(defaultName, `${secondaryImportName}.default`);
}
for (const {importedName, localName} of namedImports) {
this.identifierReplacements.set(localName, `${primaryImportName}.${importedName}`);
}
}
}
getFreeIdentifierForPath(path) {
const components = path.split("/");
const lastComponent = components[components.length - 1];
const baseName = lastComponent.replace(/\W/g, "");
return this.nameManager.claimFreeName(`_${baseName}`);
}
preprocessImportAtIndex(index) {
const defaultNames = [];
const wildcardNames = [];
const namedImports = [];
index++;
if (
(this.tokens.matchesContextualAtIndex(index, _keywords.ContextualKeyword._type) ||
this.tokens.matches1AtIndex(index, _types.TokenType._typeof)) &&
!this.tokens.matches1AtIndex(index + 1, _types.TokenType.comma) &&
!this.tokens.matchesContextualAtIndex(index + 1, _keywords.ContextualKeyword._from)
) {
// import type declaration, so no need to process anything.
return;
}
if (this.tokens.matches1AtIndex(index, _types.TokenType.parenL)) {
// Dynamic import, so nothing to do
return;
}
if (this.tokens.matches1AtIndex(index, _types.TokenType.name)) {
defaultNames.push(this.tokens.identifierNameAtIndex(index));
index++;
if (this.tokens.matches1AtIndex(index, _types.TokenType.comma)) {
index++;
}
}
if (this.tokens.matches1AtIndex(index, _types.TokenType.star)) {
// * as
index += 2;
wildcardNames.push(this.tokens.identifierNameAtIndex(index));
index++;
}
if (this.tokens.matches1AtIndex(index, _types.TokenType.braceL)) {
const result = this.getNamedImports(index + 1);
index = result.newIndex;
for (const namedImport of result.namedImports) {
// Treat {default as X} as a default import to ensure usage of require interop helper
if (namedImport.importedName === "default") {
defaultNames.push(namedImport.localName);
} else {
namedImports.push(namedImport);
}
}
}
if (this.tokens.matchesContextualAtIndex(index, _keywords.ContextualKeyword._from)) {
index++;
}
if (!this.tokens.matches1AtIndex(index, _types.TokenType.string)) {
throw new Error("Expected string token at the end of import statement.");
}
const path = this.tokens.stringValueAtIndex(index);
const importInfo = this.getImportInfo(path);
importInfo.defaultNames.push(...defaultNames);
importInfo.wildcardNames.push(...wildcardNames);
importInfo.namedImports.push(...namedImports);
if (defaultNames.length === 0 && wildcardNames.length === 0 && namedImports.length === 0) {
importInfo.hasBareImport = true;
}
}
preprocessExportAtIndex(index) {
if (
this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType._var) ||
this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType._let) ||
this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType._const)
) {
this.preprocessVarExportAtIndex(index);
} else if (
this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType._function) ||
this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType._class)
) {
const exportName = this.tokens.identifierNameAtIndex(index + 2);
this.addExportBinding(exportName, exportName);
} else if (this.tokens.matches3AtIndex(index, _types.TokenType._export, _types.TokenType.name, _types.TokenType._function)) {
const exportName = this.tokens.identifierNameAtIndex(index + 3);
this.addExportBinding(exportName, exportName);
} else if (this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType.braceL)) {
this.preprocessNamedExportAtIndex(index);
} else if (this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType.star)) {
this.preprocessExportStarAtIndex(index);
}
}
preprocessVarExportAtIndex(index) {
let depth = 0;
// Handle cases like `export let {x} = y;`, starting at the open-brace in that case.
for (let i = index + 2; ; i++) {
if (
this.tokens.matches1AtIndex(i, _types.TokenType.braceL) ||
this.tokens.matches1AtIndex(i, _types.TokenType.dollarBraceL) ||
this.tokens.matches1AtIndex(i, _types.TokenType.bracketL)
) {
depth++;
} else if (
this.tokens.matches1AtIndex(i, _types.TokenType.braceR) ||
this.tokens.matches1AtIndex(i, _types.TokenType.bracketR)
) {
depth--;
} else if (depth === 0 && !this.tokens.matches1AtIndex(i, _types.TokenType.name)) {
break;
} else if (this.tokens.matches1AtIndex(1, _types.TokenType.eq)) {
const endIndex = this.tokens.currentToken().rhsEndIndex;
if (endIndex == null) {
throw new Error("Expected = token with an end index.");
}
i = endIndex - 1;
} else {
const token = this.tokens.tokens[i];
if (_tokenizer.isDeclaration.call(void 0, token)) {
const exportName = this.tokens.identifierNameAtIndex(i);
this.identifierReplacements.set(exportName, `exports.${exportName}`);
}
}
}
}
/**
* Walk this export statement just in case it's an export...from statement.
* If it is, combine it into the import info for that path. Otherwise, just
* bail out; it'll be handled later.
*/
preprocessNamedExportAtIndex(index) {
// export {
index += 2;
const {newIndex, namedImports} = this.getNamedImports(index);
index = newIndex;
if (this.tokens.matchesContextualAtIndex(index, _keywords.ContextualKeyword._from)) {
index++;
} else {
// Reinterpret "a as b" to be local/exported rather than imported/local.
for (const {importedName: localName, localName: exportedName} of namedImports) {
this.addExportBinding(localName, exportedName);
}
return;
}
if (!this.tokens.matches1AtIndex(index, _types.TokenType.string)) {
throw new Error("Expected string token at the end of import statement.");
}
const path = this.tokens.stringValueAtIndex(index);
const importInfo = this.getImportInfo(path);
importInfo.namedExports.push(...namedImports);
}
preprocessExportStarAtIndex(index) {
let exportedName = null;
if (this.tokens.matches3AtIndex(index, _types.TokenType._export, _types.TokenType.star, _types.TokenType._as)) {
// export * as
index += 3;
exportedName = this.tokens.identifierNameAtIndex(index);
// foo from
index += 2;
} else {
// export * from
index += 3;
}
if (!this.tokens.matches1AtIndex(index, _types.TokenType.string)) {
throw new Error("Expected string token at the end of star export statement.");
}
const path = this.tokens.stringValueAtIndex(index);
const importInfo = this.getImportInfo(path);
if (exportedName !== null) {
importInfo.exportStarNames.push(exportedName);
} else {
importInfo.hasStarExport = true;
}
}
getNamedImports(index) {
const namedImports = [];
while (true) {
if (this.tokens.matches1AtIndex(index, _types.TokenType.braceR)) {
index++;
break;
}
const specifierInfo = _getImportExportSpecifierInfo2.default.call(void 0, this.tokens, index);
index = specifierInfo.endIndex;
if (!specifierInfo.isType) {
namedImports.push({
importedName: specifierInfo.leftName,
localName: specifierInfo.rightName,
});
}
if (this.tokens.matches2AtIndex(index, _types.TokenType.comma, _types.TokenType.braceR)) {
index += 2;
break;
} else if (this.tokens.matches1AtIndex(index, _types.TokenType.braceR)) {
index++;
break;
} else if (this.tokens.matches1AtIndex(index, _types.TokenType.comma)) {
index++;
} else {
throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[index])}`);
}
}
return {newIndex: index, namedImports};
}
/**
* Get a mutable import info object for this path, creating one if it doesn't
* exist yet.
*/
getImportInfo(path) {
const existingInfo = this.importInfoByPath.get(path);
if (existingInfo) {
return existingInfo;
}
const newInfo = {
defaultNames: [],
wildcardNames: [],
namedImports: [],
namedExports: [],
hasBareImport: false,
exportStarNames: [],
hasStarExport: false,
};
this.importInfoByPath.set(path, newInfo);
return newInfo;
}
addExportBinding(localName, exportedName) {
if (!this.exportBindingsByLocalName.has(localName)) {
this.exportBindingsByLocalName.set(localName, []);
}
this.exportBindingsByLocalName.get(localName).push(exportedName);
}
/**
* Return the code to use for the import for this path, or the empty string if
* the code has already been "claimed" by a previous import.
*/
claimImportCode(importPath) {
const result = this.importsToReplace.get(importPath);
this.importsToReplace.set(importPath, "");
return result || "";
}
getIdentifierReplacement(identifierName) {
return this.identifierReplacements.get(identifierName) || null;
}
/**
* Return a string like `exports.foo = exports.bar`.
*/
resolveExportBinding(assignedName) {
const exportedNames = this.exportBindingsByLocalName.get(assignedName);
if (!exportedNames || exportedNames.length === 0) {
return null;
}
return exportedNames.map((exportedName) => `exports.${exportedName}`).join(" = ");
}
/**
* Return all imported/exported names where we might be interested in whether usages of those
* names are shadowed.
*/
getGlobalNames() {
return new Set([
...this.identifierReplacements.keys(),
...this.exportBindingsByLocalName.keys(),
]);
}
} exports.default = CJSImportProcessor;
@@ -0,0 +1,47 @@
{
"name": "type-is",
"description": "Infer the content-type of a request.",
"version": "2.0.1",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
],
"license": "MIT",
"repository": "jshttp/type-is",
"dependencies": {
"content-type": "^1.0.5",
"media-typer": "^1.1.0",
"mime-types": "^3.0.0"
},
"devDependencies": {
"eslint": "7.32.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-markdown": "2.2.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.2.0",
"eslint-plugin-standard": "4.1.0",
"mocha": "9.2.1",
"nyc": "15.1.0"
},
"engines": {
"node": ">= 0.6"
},
"files": [
"LICENSE",
"HISTORY.md",
"index.js"
],
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --check-leaks --bail test/",
"test:debug": "mocha --reporter spec --check-leaks --inspect --inspect-brk test/",
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
},
"keywords": [
"content",
"type",
"checking"
]
}
@@ -0,0 +1,9 @@
import { Parser } from './postcss.js'
interface Parse extends Parser {
default: Parse
}
declare const parse: Parse
export = parse
@@ -0,0 +1 @@
{"name":"tslib","version":"2.8.1","requiresBuild":false,"files":{"tslib.es6.html":{"checkedAt":1794532095471,"integrity":"sha512-aoAR2zaxE9UtcXO4kE9FbPBgIZEVk7u3Z+nEPmDo6rwcYth07KxrVZejVEdy2XmKvkkcb8O/XM9UK3bPc1iMPw==","mode":420,"size":36},"tslib.html":{"checkedAt":1794532095471,"integrity":"sha512-4dCvZ5WYJpcbIJY4RPUhOBbFud1156Rr7RphuR12/+mXKUeIpCxol2/uWL4WDFNNlSH909M2AY4fiLWJo8+fTw==","mode":420,"size":32},"modules/index.js":{"checkedAt":1794532095471,"integrity":"sha512-DqWTtBt/Q47Jm4z8VzCLSiG/2R+Mwqy8uB60ithBWyofDYamF5C4icYdqbq/NP2IE/TefCT/03uAwA5mujzR7A==","mode":420,"size":1416},"tslib.es6.js":{"checkedAt":1794532095472,"integrity":"sha512-FugydTgfIjlaQrbH9gaIh59iXw8keW2311ILz3FBWn1IHLwPcmWte+ZE8UeXXGTQRc2E8NhQSCzYA6/zX36+7w==","mode":420,"size":19215},"tslib.js":{"checkedAt":1794532095472,"integrity":"sha512-7Gj/3vlZdba9iZH2H2up34pBk5UfN1tWQl3/TjsHzw3Oipw/stl6nko8k4jk+MeDeLPJE3rKz3VoQG5XmgwSmg==","mode":420,"size":23382},"modules/package.json":{"checkedAt":1794532095472,"integrity":"sha512-vm8hQn5MuoMkjJYvBBHTAtsdrcuXmVrKZwL3FEq32oGiKFhY562FoUQTbXv24wk0rwJVpgribUCOIU98IaS9Mg==","mode":420,"size":26},"package.json":{"checkedAt":1794532095472,"integrity":"sha512-72peSY+xgEHIo+YSpUbUl6qsExQ5ZlgeiDVDAiy4QdVmmBkK7RAB/07CCX3gg0SyvvQVJiGgAD36ub3rgE4QCg==","mode":420,"size":1219},"README.md":{"checkedAt":1794532095472,"integrity":"sha512-kCH2ENYjhlxwI7ae89ymMIP2tZeNcJJOcqnfifnmHQiHeK4mWnGc4w8ygoiUIpG1qyaurZkRSrYtwHCEIMNhbA==","mode":420,"size":4033},"SECURITY.md":{"checkedAt":1794532095472,"integrity":"sha512-ix30VBNb4RQLa5M2jgfD6IJ9+1XKmeREKrOYv7rDoWGZCin0605vEx3tTAVb5kNvteCwZwBC+nEGfQ4jHLg9Fw==","mode":420,"size":2757},"tslib.es6.mjs":{"checkedAt":1794532095473,"integrity":"sha512-q8VhXPTjmn6KDh3j6Ewn0V3siY1zNdvXvIUNN36llJUtO5cDafldf1Y2zzToBAbgOdh2pjFks7lFDRzZ/LZnDw==","mode":420,"size":17648},"modules/index.d.ts":{"checkedAt":1794532095473,"integrity":"sha512-XcNprVMjDjhbWmH3OTNZV91Uh9sDaCs8oZa3J7g5wMUHsdMJRENmv4XQ/8yqMlTUxKopv8uiztELREI7cw8BDg==","mode":420,"size":801},"tslib.d.ts":{"checkedAt":1794532095473,"integrity":"sha512-kqzM5TLHelP5iJBElSYyBRocQd2XmWsGIzOG6+Mv+CB7KhoZ6BoFioWM3RR2OCm1p96bbSCGnfHo2rozV/WJYQ==","mode":420,"size":18317},"CopyrightNotice.txt":{"checkedAt":1794532095473,"integrity":"sha512-C0myUddnUhhpZ/UcD9yZyMWodQV4fT2wxcfqb/ToD0Z98nB9WfWBl6koNVWJ+8jzeGWP6wQjz9zdX7Unua0/SQ==","mode":420,"size":822},"LICENSE.txt":{"checkedAt":1794532095473,"integrity":"sha512-9cs1Im06/fLAPBpXOY8fHMD2LgUM3kREaKlOX7S6fLWwbG5G+UqlUrqdkTKloRPeDghECezxOiUfzvW6lnEjDg==","mode":420,"size":655}}}
@@ -0,0 +1,166 @@
/**
* @fileoverview Prevent void elements (e.g. <img />, <br />) from receiving
* children
* @author Joe Lencioni
*/
'use strict';
const has = require('hasown');
const docsUrl = require('../util/docsUrl');
const isCreateElement = require('../util/isCreateElement');
const report = require('../util/report');
// ------------------------------------------------------------------------------
// Helpers
// ------------------------------------------------------------------------------
// Using an object here to avoid array scan. We should switch to Set once
// support is good enough.
const VOID_DOM_ELEMENTS = {
area: true,
base: true,
br: true,
col: true,
embed: true,
hr: true,
img: true,
input: true,
keygen: true,
link: true,
menuitem: true,
meta: true,
param: true,
source: true,
track: true,
wbr: true,
};
function isVoidDOMElement(elementName) {
return has(VOID_DOM_ELEMENTS, elementName);
}
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const noChildrenInVoidEl = 'Void DOM element <{{element}} /> cannot receive children.';
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Disallow void DOM elements (e.g. `<img />`, `<br />`) from receiving children',
category: 'Best Practices',
recommended: false,
url: docsUrl('void-dom-elements-no-children'),
},
messages: {
noChildrenInVoidEl,
},
schema: [],
},
create: (context) => ({
JSXElement(node) {
const elementName = node.openingElement.name.name;
if (!isVoidDOMElement(elementName)) {
// e.g. <div />
return;
}
if (node.children.length > 0) {
// e.g. <br>Foo</br>
report(context, noChildrenInVoidEl, 'noChildrenInVoidEl', {
node,
data: {
element: elementName,
},
});
}
const attributes = node.openingElement.attributes;
const hasChildrenAttributeOrDanger = attributes.some((attribute) => {
if (!attribute.name) {
return false;
}
return attribute.name.name === 'children' || attribute.name.name === 'dangerouslySetInnerHTML';
});
if (hasChildrenAttributeOrDanger) {
// e.g. <br children="Foo" />
report(context, noChildrenInVoidEl, 'noChildrenInVoidEl', {
node,
data: {
element: elementName,
},
});
}
},
CallExpression(node) {
if (node.callee.type !== 'MemberExpression' && node.callee.type !== 'Identifier') {
return;
}
if (!isCreateElement(context, node)) {
return;
}
const args = node.arguments;
if (args.length < 1) {
// React.createElement() should not crash linter
return;
}
const elementName = 'value' in args[0] ? args[0].value : undefined;
if (!isVoidDOMElement(elementName)) {
// e.g. React.createElement('div');
return;
}
if (args.length < 2 || args[1].type !== 'ObjectExpression') {
return;
}
const firstChild = args[2];
if (firstChild) {
// e.g. React.createElement('br', undefined, 'Foo')
report(context, noChildrenInVoidEl, 'noChildrenInVoidEl', {
node,
data: {
element: elementName,
},
});
}
const props = args[1].properties;
const hasChildrenPropOrDanger = props.some((prop) => {
if (!('key' in prop) || !prop.key || !('name' in prop.key)) {
return false;
}
return prop.key.name === 'children' || prop.key.name === 'dangerouslySetInnerHTML';
});
if (hasChildrenPropOrDanger) {
// e.g. React.createElement('br', { children: 'Foo' })
report(context, noChildrenInVoidEl, 'noChildrenInVoidEl', {
node,
data: {
element: elementName,
},
});
}
},
}),
};
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
/**
* Returns boolean indicating that the aria-hidden prop
* is present or the value is true. Will also return true if
* there is an input with type='hidden'.
*
* <div aria-hidden /> is equivalent to the DOM as <div aria-hidden=true />.
*/
var isHiddenFromScreenReader = function isHiddenFromScreenReader(type, attributes) {
if (type.toUpperCase() === 'INPUT') {
var hidden = (0, _jsxAstUtils.getLiteralPropValue)((0, _jsxAstUtils.getProp)(attributes, 'type'));
if (hidden && hidden.toUpperCase() === 'HIDDEN') {
return true;
}
}
var ariaHidden = (0, _jsxAstUtils.getPropValue)((0, _jsxAstUtils.getProp)(attributes, 'aria-hidden'));
return ariaHidden === true;
};
var _default = exports["default"] = isHiddenFromScreenReader;
module.exports = exports.default;
@@ -0,0 +1,17 @@
import * as proto from '../../../packet/transformer/proto';
import { OidbPacket, PacketTransformer } from '../../../packet/transformer/base';
import { AIVoiceChatType } from '../../../packet/entities/aiChat';
declare class FetchAiVoiceList extends PacketTransformer<typeof proto.OidbSvcTrpcTcp0X929D_0Resp> {
build(groupUin: number, chatType: AIVoiceChatType): OidbPacket;
parse(data: Buffer): import("napcat-protobuf").any {
category: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
voices: import("napcat-protobuf").MessageProtoFieldType<() => {
voiceId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
voiceDisplayName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
voiceExampleUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, false, true>;
}, false, true>;
}>;
}
declare const _default: FetchAiVoiceList;
export default _default;
@@ -0,0 +1,43 @@
# escape-html
Escape string for use in HTML
## Example
```js
var escape = require('escape-html');
var html = escape('foo & bar');
// -> foo &amp; bar
```
## Benchmark
```
$ npm run-script bench
> escape-html@1.0.3 bench nodejs-escape-html
> node benchmark/index.js
http_parser@1.0
node@0.10.33
v8@3.14.5.9
ares@1.9.0-DEV
uv@0.10.29
zlib@1.2.3
modules@11
openssl@1.0.1j
1 test completed.
2 tests completed.
3 tests completed.
no special characters x 19,435,271 ops/sec ±0.85% (187 runs sampled)
single special character x 6,132,421 ops/sec ±0.67% (194 runs sampled)
many special characters x 3,175,826 ops/sec ±0.65% (193 runs sampled)
```
## License
MIT
@@ -0,0 +1,963 @@
/* eslint-env mocha */
/* eslint no-template-curly-in-string: 0 */
import assert from 'assert';
import {
extractProp,
changePlugins,
describeIfNotBabylon,
setParserName,
} from '../helper';
import getPropValue from '../../src/getPropValue';
describe('getPropValue', () => {
beforeEach(() => {
setParserName('flow');
});
it('should export a function', () => {
const expected = 'function';
const actual = typeof getPropValue;
assert.equal(actual, expected);
});
it('should return undefined when not provided with a JSXAttribute', () => {
const expected = undefined;
const actual = getPropValue(1);
assert.equal(actual, expected);
});
it('should throw not error when trying to get value from unknown node type', () => {
const prop = {
type: 'JSXAttribute',
value: {
type: 'JSXExpressionContainer',
},
};
let counter = 0;
// eslint-disable-next-line no-console
const errorOrig = console.error;
// eslint-disable-next-line no-console
console.error = () => {
counter += 1;
};
let value;
assert.doesNotThrow(() => {
value = getPropValue(prop);
}, Error);
assert.equal(null, value);
assert.equal(counter, 1);
// eslint-disable-next-line no-console
console.error = errorOrig;
});
describe('Null', () => {
it('should return true when no value is given', () => {
const prop = extractProp('<div foo />');
const expected = true;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Literal', () => {
it('should return correct string if value is a string', () => {
const prop = extractProp('<div foo="bar" />');
const expected = 'bar';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return correct string if value is a string expression', () => {
const prop = extractProp('<div foo={"bar"} />');
const expected = 'bar';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return correct integer if value is a integer expression', () => {
const prop = extractProp('<div foo={1} />');
const expected = 1;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should convert "true" to boolean type', () => {
const prop = extractProp('<div foo="true" />');
const expected = true;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should convert "false" to boolean type', () => {
const prop = extractProp('<div foo="false" />');
const expected = false;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('JSXElement', () => {
it('should return correct representation of JSX element as a string', () => {
const prop = extractProp('<div foo={<bar />} />');
const expected = '<bar />';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Identifier', () => {
it('should return string representation of variable identifier', () => {
const prop = extractProp('<div foo={bar} />');
const expected = 'bar';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return undefined when identifier is literally `undefined`', () => {
const prop = extractProp('<div foo={undefined} />');
const expected = undefined;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return String object when using a reserved JavaScript object', () => {
const prop = extractProp('<div foo={String} />');
const expected = String;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return Array object when using a reserved JavaScript object', () => {
const prop = extractProp('<div foo={Array} />');
const expected = Array;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return Date object when using a reserved JavaScript object', () => {
const prop = extractProp('<div foo={Date} />');
const expected = Date;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return Infinity object when using a reserved JavaScript object', () => {
const prop = extractProp('<div foo={Infinity} />');
const expected = Infinity;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return Math object when using a reserved JavaScript object', () => {
const prop = extractProp('<div foo={Math} />');
const expected = Math;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return Number object when using a reserved JavaScript object', () => {
const prop = extractProp('<div foo={Number} />');
const expected = Number;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return Object object when using a reserved JavaScript object', () => {
const prop = extractProp('<div foo={Object} />');
const expected = Object;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Template literal', () => {
it('should return template literal with vars wrapped in curly braces', () => {
const prop = extractProp('<div foo={`bar ${baz}`} />');
const expected = 'bar {baz}';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return string "undefined" for expressions that evaluate to undefined', () => {
const prop = extractProp('<div foo={`bar ${undefined}`} />');
const expected = 'bar undefined';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return template literal with expression type wrapped in curly braces', () => {
const prop = extractProp('<div foo={`bar ${baz()}`} />');
const expected = 'bar {CallExpression}';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should ignore non-expressions in the template literal', () => {
const prop = extractProp('<div foo={`bar ${<baz />}`} />');
const expected = 'bar ';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Tagged Template literal', () => {
it('should return template literal with vars wrapped in curly braces', () => {
const prop = extractProp('<div foo={noop`bar ${baz}`} />');
const expected = 'bar {baz}';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return string "undefined" for expressions that evaluate to undefined', () => {
const prop = extractProp('<div foo={noop`bar ${undefined}`} />');
const expected = 'bar undefined';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return template literal with expression type wrapped in curly braces', () => {
const prop = extractProp('<div foo={noop`bar ${baz()}`} />');
const expected = 'bar {CallExpression}';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should ignore non-expressions in the template literal', () => {
const prop = extractProp('<div foo={noop`bar ${<baz />}`} />');
const expected = 'bar ';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Arrow function expression', () => {
it('should return a function', () => {
const prop = extractProp('<div foo={ () => { return "bar"; }} />');
const expected = 'function';
const actual = getPropValue(prop);
assert.equal(expected, typeof actual);
// For code coverage ¯\_(ツ)_/¯
actual();
});
it('should handle ArrowFunctionExpression as conditional consequent', () => {
const prop = extractProp('<div foo={ (true) ? () => null : () => ({})} />');
const expected = 'function';
const actual = getPropValue(prop);
assert.equal(expected, typeof actual);
// For code coverage ¯\_(ツ)_/¯
actual();
});
});
describe('Function expression', () => {
it('should return a function', () => {
const prop = extractProp('<div foo={ function() { return "bar"; } } />');
const expected = 'function';
const actual = getPropValue(prop);
assert.equal(expected, typeof actual);
// For code coverage ¯\_(ツ)_/¯
actual();
});
});
describe('Logical expression', () => {
it('should correctly infer result of && logical expression based on derived values', () => {
const prop = extractProp('<div foo={bar && baz} />');
const expected = 'baz';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return undefined when evaluating `undefined && undefined` ', () => {
const prop = extractProp('<div foo={undefined && undefined} />');
const expected = undefined;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should correctly infer result of || logical expression based on derived values', () => {
const prop = extractProp('<div foo={bar || baz} />');
const expected = 'bar';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should correctly infer result of || logical expression based on derived values', () => {
const prop = extractProp('<div foo={undefined || baz} />');
const expected = 'baz';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return undefined when evaluating `undefined || undefined` ', () => {
const prop = extractProp('<div foo={undefined || undefined} />');
const expected = undefined;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Member expression', () => {
it('should return string representation of form `object.property`', () => {
const prop = extractProp('<div foo={bar.baz} />');
const expected = 'bar.baz';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate to a correct representation of member expression with a nullable member', () => {
const prop = extractProp('<div foo={bar?.baz} />');
const expected = 'bar?.baz';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Call expression', () => {
it('should return string representation of callee', () => {
const prop = extractProp('<div foo={bar()} />');
const expected = 'bar()';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return string representation of callee', () => {
const prop = extractProp('<div foo={bar.call()} />');
const expected = 'bar.call()';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Unary expression', () => {
it('should correctly evaluate an expression that prefixes with -', () => {
const prop = extractProp('<div foo={-bar} />');
// -"bar" => NaN
const expected = true;
const actual = Number.isNaN(getPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with -', () => {
const prop = extractProp('<div foo={-42} />');
const expected = -42;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with +', () => {
const prop = extractProp('<div foo={+bar} />');
// +"bar" => NaN
const expected = true;
const actual = Number.isNaN(getPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with +', () => {
const prop = extractProp('<div foo={+42} />');
const expected = 42;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with !', () => {
const prop = extractProp('<div foo={!bar} />');
const expected = false; // !"bar" === false
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with ~', () => {
const prop = extractProp('<div foo={~bar} />');
const expected = -1; // ~"bar" === -1
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return true when evaluating `delete foo`', () => {
const prop = extractProp('<div foo={delete x} />');
const expected = true;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return undefined when evaluating `void foo`', () => {
const prop = extractProp('<div foo={void x} />');
const expected = undefined;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
// TODO: We should fix this to check to see if we can evaluate it.
it('should return undefined when evaluating `typeof foo`', () => {
const prop = extractProp('<div foo={typeof x} />');
const expected = undefined;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Update expression', () => {
it('should correctly evaluate an expression that prefixes with ++', () => {
const prop = extractProp('<div foo={++bar} />');
// ++"bar" => NaN
const expected = true;
const actual = Number.isNaN(getPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with --', () => {
const prop = extractProp('<div foo={--bar} />');
const expected = true;
const actual = Number.isNaN(getPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that suffixes with ++', () => {
const prop = extractProp('<div foo={bar++} />');
// "bar"++ => NaN
const expected = true;
const actual = Number.isNaN(getPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that suffixes with --', () => {
const prop = extractProp('<div foo={bar--} />');
const expected = true;
const actual = Number.isNaN(getPropValue(prop));
assert.equal(actual, expected);
});
});
describe('This expression', () => {
it('should return string value `this`', () => {
const prop = extractProp('<div foo={this} />');
const expected = 'this';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Conditional expression', () => {
it('should evaluate the conditional based on the derived values correctly', () => {
const prop = extractProp('<div foo={bar ? baz : bam} />');
const expected = 'baz';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the conditional based on the derived values correctly', () => {
const prop = extractProp('<div foo={undefined ? baz : bam} />');
const expected = 'bam';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the conditional based on the derived values correctly', () => {
const prop = extractProp('<div foo={(1 > 2) ? baz : bam} />');
const expected = 'bam';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Binary expression', () => {
it('should evaluate the `==` operator correctly', () => {
const trueProp = extractProp('<div foo={1 == "1"} />');
const falseProp = extractProp('<div foo={1 == bar} />');
const trueVal = getPropValue(trueProp);
const falseVal = getPropValue(falseProp);
assert.equal(true, trueVal);
assert.equal(false, falseVal);
});
it('should evaluate the `!=` operator correctly', () => {
const trueProp = extractProp('<div foo={1 != "2"} />');
const falseProp = extractProp('<div foo={1 != "1"} />');
const trueVal = getPropValue(trueProp);
const falseVal = getPropValue(falseProp);
assert.equal(true, trueVal);
assert.equal(false, falseVal);
});
it('should evaluate the `===` operator correctly', () => {
const trueProp = extractProp('<div foo={1 === 1} />');
const falseProp = extractProp('<div foo={1 === "1"} />');
const trueVal = getPropValue(trueProp);
const falseVal = getPropValue(falseProp);
assert.equal(true, trueVal);
assert.equal(false, falseVal);
});
it('should evaluate the `!==` operator correctly', () => {
const trueProp = extractProp('<div foo={1 !== "1"} />');
const falseProp = extractProp('<div foo={1 !== 1} />');
const trueVal = getPropValue(trueProp);
const falseVal = getPropValue(falseProp);
assert.equal(true, trueVal);
assert.equal(false, falseVal);
});
it('should evaluate the `<` operator correctly', () => {
const trueProp = extractProp('<div foo={1 < 2} />');
const falseProp = extractProp('<div foo={1 < 0} />');
const trueVal = getPropValue(trueProp);
const falseVal = getPropValue(falseProp);
assert.equal(true, trueVal);
assert.equal(false, falseVal);
});
it('should evaluate the `>` operator correctly', () => {
const trueProp = extractProp('<div foo={1 > 0} />');
const falseProp = extractProp('<div foo={1 > 2} />');
const trueVal = getPropValue(trueProp);
const falseVal = getPropValue(falseProp);
assert.equal(true, trueVal);
assert.equal(false, falseVal);
});
it('should evaluate the `<=` operator correctly', () => {
const trueProp = extractProp('<div foo={1 <= 1} />');
const falseProp = extractProp('<div foo={1 <= 0} />');
const trueVal = getPropValue(trueProp);
const falseVal = getPropValue(falseProp);
assert.equal(true, trueVal);
assert.equal(false, falseVal);
});
it('should evaluate the `>=` operator correctly', () => {
const trueProp = extractProp('<div foo={1 >= 1} />');
const falseProp = extractProp('<div foo={1 >= 2} />');
const trueVal = getPropValue(trueProp);
const falseVal = getPropValue(falseProp);
assert.equal(true, trueVal);
assert.equal(false, falseVal);
});
it('should evaluate the `<<` operator correctly', () => {
const prop = extractProp('<div foo={1 << 2} />');
const expected = 4;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `>>` operator correctly', () => {
const prop = extractProp('<div foo={1 >> 2} />');
const expected = 0;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `>>>` operator correctly', () => {
const prop = extractProp('<div foo={2 >>> 1} />');
const expected = 1;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `+` operator correctly', () => {
const prop = extractProp('<div foo={1 + 1} />');
const expected = 2;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `-` operator correctly', () => {
const prop = extractProp('<div foo={1 - 1} />');
const expected = 0;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `*` operator correctly', () => {
const prop = extractProp('<div foo={10 * 10} />');
const expected = 100;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `/` operator correctly', () => {
const prop = extractProp('<div foo={10 / 2} />');
const expected = 5;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `%` operator correctly', () => {
const prop = extractProp('<div foo={10 % 3} />');
const expected = 1;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `|` operator correctly', () => {
const prop = extractProp('<div foo={10 | 1} />');
const expected = 11;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `^` operator correctly', () => {
const prop = extractProp('<div foo={10 ^ 1} />');
const expected = 11;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `&` operator correctly', () => {
const prop = extractProp('<div foo={10 & 1} />');
const expected = 0;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `in` operator correctly', () => {
const prop = extractProp('<div foo={foo in bar} />');
const expected = false;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `instanceof` operator correctly', () => {
const prop = extractProp('<div foo={{} instanceof Object} />');
const expected = true;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should evaluate the `instanceof` operator when right side is not a function', () => {
const prop = extractProp('<div foo={"bar" instanceof Baz} />');
const expected = false;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Object expression', () => {
it('should evaluate to a correct representation of the object in props', () => {
const prop = extractProp('<div foo={ { bar: "baz" } } />');
const expected = { bar: 'baz' };
const actual = getPropValue(prop);
assert.deepEqual(actual, expected);
});
it('should evaluate to a correct representation of the object, ignore spread properties', () => {
const prop = extractProp('<div foo={{bar: "baz", ...{baz: "bar", foo: {...{bar: "meh"}}}}} />');
const expected = { bar: 'baz', baz: 'bar', foo: { bar: 'meh' } };
const actual = getPropValue(prop);
assert.deepEqual(actual, expected);
});
it('should evaluate to a correct representation of the object, ignore spread properties', () => {
const prop = extractProp('<div foo={{ pathname: manageRoute, state: {...data}}} />');
const expected = { pathname: 'manageRoute', state: {} };
const actual = getPropValue(prop);
assert.deepEqual(actual, expected);
});
});
describe('New expression', () => {
it('should return a new empty object', () => {
const prop = extractProp('<div foo={new Bar()} />');
const expected = {};
const actual = getPropValue(prop);
assert.deepEqual(actual, expected);
});
});
describe('Sequence array expression', () => {
it('should evaluate to correct representation of the the array in props', () => {
const prop = extractProp('<div foo={[{"type":"Literal","start":821,"end":827}]} />');
const expected = [{
type: 'Literal',
start: 821,
end: 827,
}];
const actual = getPropValue(prop);
assert.deepEqual(actual, expected);
});
});
describe('Array expression', () => {
it('should evaluate to correct representation of the the array in props', () => {
const prop = extractProp('<div foo={["bar", 42, null]} />');
const expected = ['bar', 42, null];
const actual = getPropValue(prop);
assert.deepEqual(actual, expected);
});
it('should evaluate to a correct representation of an array with spread elements', () => {
const prop = extractProp('<div foo={[...this.props.params, bar]} />');
const expected = [undefined, 'bar'];
const actual = getPropValue(prop);
assert.deepEqual(actual, expected);
});
});
it('should return an empty array provided an empty array in props', () => {
const prop = extractProp('<div foo={[]} />');
const expected = [];
const actual = getPropValue(prop);
assert.deepEqual(actual, expected);
});
describe('Bind expression', () => {
it('should return string representation of bind function call when object is null', () => {
const prop = extractProp('<div foo={::this.handleClick} />');
const expected = null;
const actual = getPropValue(prop);
assert.deepEqual(actual, expected);
});
it('should return string representation of bind function call when object is not null', () => {
const prop = extractProp('<div foo={foo::bar} />');
const expected = 'foo';
const actual = getPropValue(prop);
assert.deepEqual(actual, expected);
});
it('should return string representation of bind function call when binding to object properties', () => {
const prop = extractProp('<div foo={a.b::c} />');
const otherProp = extractProp('<div foo={::a.b.c} />');
const expected = 'a.b';
const actual = getPropValue(prop);
const otherExpected = null;
const otherActual = getPropValue(otherProp);
assert.deepEqual(actual, expected);
assert.deepEqual(otherActual, otherExpected);
});
});
describe('Type Cast Expression', () => {
it('should return the expression from a type cast', () => {
const prop = extractProp('<div foo={(this.handleClick: (event: MouseEvent) => void))} />');
const expected = 'this.handleClick';
const actual = getPropValue(prop);
assert.deepEqual(actual, expected);
});
});
describeIfNotBabylon('Typescript', () => {
beforeEach(() => {
changePlugins((pls) => [...pls, 'typescript']);
});
it('should return string representation of variable identifier wrapped in a Typescript non-null assertion', () => {
const prop = extractProp('<div foo={bar!} />');
const expected = 'bar';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return string representation of variable identifier wrapped in a deep Typescript non-null assertion', () => {
const prop = extractProp('<div foo={(bar!)!} />');
const expected = 'bar';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
it('should return string representation of variable identifier wrapped in a Typescript type coercion', () => {
changePlugins((pls) => [...pls, 'typescript']);
const prop = extractProp('<div foo={bar as any} />');
const expected = 'bar';
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
describe('JSX empty expression', () => {
it('should work with an empty expression', () => {
const prop = extractProp('<div>\n{/* Hello there */}\n</div>', 'children');
const expected = undefined;
const actual = getPropValue(prop);
assert.equal(actual, expected);
});
});
});
@@ -0,0 +1,59 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/checkbox-icon.tsx
var checkbox_icon_exports = {};
__export(checkbox_icon_exports, {
CheckboxIcon: () => CheckboxIcon
});
module.exports = __toCommonJS(checkbox_icon_exports);
var import_jsx_runtime = require("react/jsx-runtime");
function CheckIcon(props) {
const { isSelected, disableAnimation, ...otherProps } = props;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { "aria-hidden": "true", role: "presentation", viewBox: "0 0 17 18", ...otherProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"polyline",
{
fill: "none",
points: "1 9 7 14 15 4",
stroke: "currentColor",
strokeDasharray: 22,
strokeDashoffset: isSelected ? 44 : 66,
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 2,
style: !disableAnimation && isSelected ? {
transition: "stroke-dashoffset 250ms linear 0.2s"
} : {}
}
) });
}
function IndeterminateIcon(props) {
const { isSelected, disableAnimation, ...otherProps } = props;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { stroke: "currentColor", strokeWidth: 3, viewBox: "0 0 24 24", ...otherProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "21", x2: "3", y1: "12", y2: "12" }) });
}
function CheckboxIcon(props) {
const { isIndeterminate, ...otherProps } = props;
const BaseIcon = isIndeterminate ? IndeterminateIcon : CheckIcon;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseIcon, { ...otherProps });
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
CheckboxIcon
});
@@ -0,0 +1,108 @@
var $429891642bf97c51$exports = require("./ar-AE.main.js");
var $40d90b799072e111$exports = require("./bg-BG.main.js");
var $587b89d60e4f3e24$exports = require("./cs-CZ.main.js");
var $79eb8045886465e9$exports = require("./da-DK.main.js");
var $9c6faa2088d34bf1$exports = require("./de-DE.main.js");
var $ee6e1292c61a8135$exports = require("./el-GR.main.js");
var $f479187898d153cc$exports = require("./en-US.main.js");
var $1e6a91f77efbb11f$exports = require("./es-ES.main.js");
var $f2fb75e964082636$exports = require("./et-EE.main.js");
var $75cc65c4b616fac1$exports = require("./fi-FI.main.js");
var $82a179939aabd1ee$exports = require("./fr-FR.main.js");
var $40aa37345f1f8748$exports = require("./he-IL.main.js");
var $c00088e5c377e2c5$exports = require("./hr-HR.main.js");
var $51f736a409b7d295$exports = require("./hu-HU.main.js");
var $65bb74747bd8f2fb$exports = require("./it-IT.main.js");
var $1bc11da108727c27$exports = require("./ja-JP.main.js");
var $118d77e4be898c17$exports = require("./ko-KR.main.js");
var $4db9ebadbf792309$exports = require("./lt-LT.main.js");
var $51288b53bc93ac3d$exports = require("./lv-LV.main.js");
var $1a4b31206cd66e98$exports = require("./nb-NO.main.js");
var $21e944c6af0b8453$exports = require("./nl-NL.main.js");
var $20509ccafe6fe6aa$exports = require("./pl-PL.main.js");
var $8006eac1d5d4665b$exports = require("./pt-BR.main.js");
var $4875d1b529941a0a$exports = require("./pt-PT.main.js");
var $37939d04a40a865b$exports = require("./ro-RO.main.js");
var $fd1c8a4521d30c69$exports = require("./ru-RU.main.js");
var $2940d0a4ba6cbd64$exports = require("./sk-SK.main.js");
var $cb481a56d5c8fa56$exports = require("./sl-SI.main.js");
var $ecbdeaa2c85d1b32$exports = require("./sr-SP.main.js");
var $aeca4735c8d1bab6$exports = require("./sv-SE.main.js");
var $68243426be5c9f01$exports = require("./tr-TR.main.js");
var $bde63de8df74e87d$exports = require("./uk-UA.main.js");
var $2d16ab23cbf254d4$exports = require("./zh-CN.main.js");
var $bd9ff3a1da9d944a$exports = require("./zh-TW.main.js");
module.exports = {
"ar-AE": $429891642bf97c51$exports,
"bg-BG": $40d90b799072e111$exports,
"cs-CZ": $587b89d60e4f3e24$exports,
"da-DK": $79eb8045886465e9$exports,
"de-DE": $9c6faa2088d34bf1$exports,
"el-GR": $ee6e1292c61a8135$exports,
"en-US": $f479187898d153cc$exports,
"es-ES": $1e6a91f77efbb11f$exports,
"et-EE": $f2fb75e964082636$exports,
"fi-FI": $75cc65c4b616fac1$exports,
"fr-FR": $82a179939aabd1ee$exports,
"he-IL": $40aa37345f1f8748$exports,
"hr-HR": $c00088e5c377e2c5$exports,
"hu-HU": $51f736a409b7d295$exports,
"it-IT": $65bb74747bd8f2fb$exports,
"ja-JP": $1bc11da108727c27$exports,
"ko-KR": $118d77e4be898c17$exports,
"lt-LT": $4db9ebadbf792309$exports,
"lv-LV": $51288b53bc93ac3d$exports,
"nb-NO": $1a4b31206cd66e98$exports,
"nl-NL": $21e944c6af0b8453$exports,
"pl-PL": $20509ccafe6fe6aa$exports,
"pt-BR": $8006eac1d5d4665b$exports,
"pt-PT": $4875d1b529941a0a$exports,
"ro-RO": $37939d04a40a865b$exports,
"ru-RU": $fd1c8a4521d30c69$exports,
"sk-SK": $2940d0a4ba6cbd64$exports,
"sl-SI": $cb481a56d5c8fa56$exports,
"sr-SP": $ecbdeaa2c85d1b32$exports,
"sv-SE": $aeca4735c8d1bab6$exports,
"tr-TR": $68243426be5c9f01$exports,
"uk-UA": $bde63de8df74e87d$exports,
"zh-CN": $2d16ab23cbf254d4$exports,
"zh-TW": $bd9ff3a1da9d944a$exports
};
//# sourceMappingURL=intlStrings.main.js.map
@@ -0,0 +1,63 @@
{
"name": "tsyringe",
"version": "4.10.0",
"description": "Lightweight dependency injection container for JavaScript/TypeScript",
"main": "dist/cjs/index.js",
"module": "./dist/esm5/index.js",
"es2015": "./dist/esm2015/index.js",
"typings": "./dist/typings/index.d.ts",
"scripts": {
"build": "yarn clean && yarn build:cjs && yarn build:es5 && yarn build:es2015 && yarn build:types",
"build:cjs": "tsc",
"build:es5": "tsc -p ./typescript/tsconfig.esm5.json",
"build:es2015": "tsc -p ./typescript/tsconfig.esm2015.json",
"build:types": "tsc -p ./typescript/tsconfig.types.json",
"clean": "rimraf ./dist",
"test": "yarn lint && jest --config test/jest.config.js",
"test:inspect": "yarn lint && node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --config test/jest.config.js",
"test:coverage": "jest --config test/jest.config.js --coverage",
"lint": "eslint --ext \".js,.jsx,.ts,.tsx\" \"./src\"",
"lint:fix": "eslint --fix --ext \".js,.jsx,.ts,.tsx\" \"./src\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/Microsoft/tsyringe.git"
},
"keywords": [
"dependency injection",
"dependency",
"injection",
"ioc",
"container",
"javascript",
"typescript"
],
"engines": {
"node": ">= 6.0.0"
},
"author": "Steven Hobson-Campbell",
"license": "MIT",
"bugs": {
"url": "https://github.com/Microsoft/tsyringe/issues"
},
"homepage": "https://github.com/Microsoft/tsyringe#readme",
"dependencies": {
"tslib": "^1.9.3"
},
"devDependencies": {
"@types/jest": "^24.0.21",
"@types/node": "^8.10.16",
"@typescript-eslint/eslint-plugin": "^2.6.0",
"@typescript-eslint/parser": "^2.6.0",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-prettier": "^3.1.1",
"husky": "^3.0.0",
"jest": "^24.7.1",
"prettier": "1.18.2",
"reflect-metadata": "^0.1.12",
"rimraf": "^3.0.0",
"ts-jest": "^24.0.2",
"typescript": "^3.1.6"
}
}
@@ -0,0 +1,15 @@
/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
var type = typeof value;
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
? (value !== '__proto__')
: (value === null);
}
module.exports = isKeyable;
@@ -0,0 +1,4 @@
import { ServiceIdentifier } from '@inversifyjs/common';
import { BindingConstraints } from '@inversifyjs/core';
export declare function isNoAncestorBindingConstraintsWithServiceId(serviceId: ServiceIdentifier): (constraints: BindingConstraints) => boolean;
//# sourceMappingURL=isNoAncestorBindingConstraintsWithServiceId.d.ts.map
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=jsx-tag-spacing.d.ts.map
@@ -0,0 +1,7 @@
import type { Active, Data, DroppableContainer, DraggableNode, Over } from '@dnd-kit/core';
import type { SortableData } from './data';
export declare function hasSortableData<T extends Active | Over | DraggableNode | DroppableContainer>(entry: T | null | undefined): entry is T & {
data: {
current: Data<SortableData>;
};
};
@@ -0,0 +1,42 @@
var test = require('tape');
var stringify = require('../');
test('nested', function (t) {
t.plan(1);
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}');
});
test('cyclic (default)', function (t) {
t.plan(1);
var one = { a: 1 };
var two = { a: 2, one: one };
one.two = two;
try {
stringify(one);
} catch (ex) {
t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON');
}
});
test('cyclic (specifically allowed)', function (t) {
t.plan(1);
var one = { a: 1 };
var two = { a: 2, one: one };
one.two = two;
t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}');
});
test('repeated non-cyclic value', function(t) {
t.plan(1);
var one = { x: 1 };
var two = { a: one, b: one };
t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}');
});
test('acyclic but with reused obj-property pointers', function (t) {
t.plan(1);
var x = { a: 1 }
var y = { b: x, c: x }
t.equal(stringify(y), '{"b":{"a":1},"c":{"a":1}}');
});
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more