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

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

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"no-render-return-value.d.ts","sourceRoot":"","sources":["no-render-return-value.js"],"names":[],"mappings":"wBAmBW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveResolvedValueBindingParams = resolveResolvedValueBindingParams;
const common_1 = require("@inversifyjs/common");
function resolveResolvedValueBindingParams(resolveServiceNode) {
return (params, node) => {
const paramsResolvedValues = [];
for (const param of node.params) {
paramsResolvedValues.push(resolveServiceNode(params, param));
}
return paramsResolvedValues.some(common_1.isPromise)
? Promise.all(paramsResolvedValues)
: paramsResolvedValues;
};
}
//# sourceMappingURL=resolveResolvedValueBindingParams.js.map
@@ -0,0 +1 @@
export { _ as default } from "../esm/_async_generator_delegate.js";
@@ -0,0 +1,67 @@
/**
* @file loca表
* @author mengke01(kekee000@gmail.com)
*/
import table from './table';
import struct from './struct';
export default table.create(
'loca',
[],
{
read(reader, ttf) {
let offset = this.offset;
const indexToLocFormat = ttf.head.indexToLocFormat;
// indexToLocFormat有2字节和4字节的区别
const type = struct.names[(indexToLocFormat === 0) ? struct.Uint16 : struct.Uint32];
const size = (indexToLocFormat === 0) ? 2 : 4; // 字节大小
const sizeRatio = (indexToLocFormat === 0) ? 2 : 1; // 真实地址偏移
const wordOffset = [];
reader.seek(offset);
const numGlyphs = ttf.maxp.numGlyphs;
for (let i = 0; i < numGlyphs; ++i) {
wordOffset.push(reader.read(type, offset, false) * sizeRatio);
offset += size;
}
return wordOffset;
},
write(writer, ttf) {
const glyfSupport = ttf.support.glyf;
let offset = ttf.support.glyf.offset || 0;
const indexToLocFormat = ttf.head.indexToLocFormat;
const sizeRatio = (indexToLocFormat === 0) ? 0.5 : 1;
const numGlyphs = ttf.glyf.length;
for (let i = 0; i < numGlyphs; ++i) {
if (indexToLocFormat) {
writer.writeUint32(offset);
}
else {
writer.writeUint16(offset);
}
offset += glyfSupport[i].size * sizeRatio;
}
// write extra
if (indexToLocFormat) {
writer.writeUint32(offset);
}
else {
writer.writeUint16(offset);
}
return writer;
},
size(ttf) {
const locaCount = ttf.glyf.length + 1;
return ttf.head.indexToLocFormat ? locaCount * 4 : locaCount * 2;
}
}
);
@@ -0,0 +1,16 @@
import * as proto from '../../../packet/transformer/proto';
import { OidbPacket, PacketTransformer } from '../../../packet/transformer/base';
declare class FetchRkey extends PacketTransformer<typeof proto.OidbSvcTrpcTcp0X9067_202_Rsp_Body> {
build(): OidbPacket;
parse(data: Buffer): import("napcat-protobuf").any {
rkeyList: import("napcat-protobuf").MessageProtoFieldType<() => {
rkey: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
ttl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
time: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
type: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, true>;
}, false, false>;
}>;
}
declare const _default: FetchRkey;
export default _default;
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAIM,MAAM;IAiDX,CAAC,CAAC,OAAO,QAAQ,CAAC,GAAG;QACnB,OAAO,IAAI,CAAC,QAAQ;IACtB;IAEA,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI;IACzB;IAEA,UAAU;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI;IACzB;I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AE;YACnC,IAAI,MAAM;gBACR,KAAK,OAAO,GAAG;gBACf,KAAK,OAAO,GAAG,KAAK,GAAG;YACzB,OAAO;gBACL,IAAI,CAAC,QAAQ,GAAG;gBAChB,KAAK,OAAO,GAAG;YACjB;YAEA,IAAI,KAAK,IAAI,KAAK,QAChB,KAAK,KAAK,GAAG;YAGf,OAAO;YAEP,6DAA6D;YAC7D,iFAAiF;YACjF,KAAK,OAAO,GAAG;QACjB;YAEe;QAAf,IAAI,CAAC,OAAO,GAAG,CAAA,YAAA,iBAAA,2BAAA,KAAM,GAAG,cAAT,uBAAA,YAAa;IAC9B;AAwCF","sources":["packages/@react-stately/tree/src/TreeCollection.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, Key, Node} from '@react-types/shared';\n\nexport class TreeCollection<T> implements Collection<Node<T>> {\n private keyMap: Map<Key, Node<T>> = new Map();\n private iterable: Iterable<Node<T>>;\n private firstKey: Key | null = null;\n private lastKey: Key | null = null;\n\n constructor(nodes: Iterable<Node<T>>, {expandedKeys}: {expandedKeys?: Set<Key>} = {}) {\n this.iterable = nodes;\n expandedKeys = expandedKeys || new Set();\n\n let visit = (node: Node<T>) => {\n this.keyMap.set(node.key, node);\n\n if (node.childNodes && (node.type === 'section' || expandedKeys.has(node.key))) {\n for (let child of node.childNodes) {\n visit(child);\n }\n }\n };\n\n for (let node of nodes) {\n visit(node);\n }\n\n let last: Node<T> | null = null;\n let index = 0;\n for (let [key, node] of this.keyMap) {\n if (last) {\n last.nextKey = key;\n node.prevKey = last.key;\n } else {\n this.firstKey = key;\n node.prevKey = undefined;\n }\n\n if (node.type === 'item') {\n node.index = index++;\n }\n\n last = node;\n\n // Set nextKey as undefined since this might be the last node\n // If it isn't the last node, last.nextKey will properly set at start of new loop\n last.nextKey = undefined;\n }\n\n this.lastKey = last?.key ?? null;\n }\n\n *[Symbol.iterator]() {\n yield* this.iterable;\n }\n\n get size() {\n return this.keyMap.size;\n }\n\n getKeys() {\n return this.keyMap.keys();\n }\n\n getKeyBefore(key: Key) {\n let node = this.keyMap.get(key);\n return node ? node.prevKey ?? null : null;\n }\n\n getKeyAfter(key: Key) {\n let node = this.keyMap.get(key);\n return node ? node.nextKey ?? null : null;\n }\n\n getFirstKey() {\n return this.firstKey;\n }\n\n getLastKey() {\n return this.lastKey;\n }\n\n getItem(key: Key) {\n return this.keyMap.get(key) ?? null;\n }\n\n at(idx: number) {\n const keys = [...this.getKeys()];\n return this.getItem(keys[idx]);\n }\n}\n"],"names":[],"version":3,"file":"TreeCollection.module.js.map"}
@@ -0,0 +1 @@
{"version":3,"file":"DecoratorInfoKind.js","sourceRoot":"","sources":["../../../../src/decorator/models/DecoratorInfoKind.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,6DAAM,CAAA;IACN,mEAAS,CAAA;IACT,iEAAQ,CAAA;AACV,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B"}
@@ -0,0 +1,12 @@
import type * as ts from 'typescript';
interface DirectoryStructureHost {
readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
}
interface CachedDirectoryStructureHost extends DirectoryStructureHost {
readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
}
export interface WatchCompilerHostOfConfigFile<T extends ts.BuilderProgram> extends ts.WatchCompilerHostOfConfigFile<T> {
extraFileExtensions?: readonly ts.FileExtensionInfo[];
onCachedDirectoryStructureHostCreate(host: CachedDirectoryStructureHost): void;
}
export {};
@@ -0,0 +1,334 @@
'use strict'
// A linked list to keep track of recently-used-ness
const Yallist = require('yallist')
const MAX = Symbol('max')
const LENGTH = Symbol('length')
const LENGTH_CALCULATOR = Symbol('lengthCalculator')
const ALLOW_STALE = Symbol('allowStale')
const MAX_AGE = Symbol('maxAge')
const DISPOSE = Symbol('dispose')
const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')
const LRU_LIST = Symbol('lruList')
const CACHE = Symbol('cache')
const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')
const naiveLength = () => 1
// lruList is a yallist where the head is the youngest
// item, and the tail is the oldest. the list contains the Hit
// objects as the entries.
// Each Hit object has a reference to its Yallist.Node. This
// never changes.
//
// cache is a Map (or PseudoMap) that matches the keys to
// the Yallist.Node object.
class LRUCache {
constructor (options) {
if (typeof options === 'number')
options = { max: options }
if (!options)
options = {}
if (options.max && (typeof options.max !== 'number' || options.max < 0))
throw new TypeError('max must be a non-negative number')
// Kind of weird to have a default max of Infinity, but oh well.
const max = this[MAX] = options.max || Infinity
const lc = options.length || naiveLength
this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc
this[ALLOW_STALE] = options.stale || false
if (options.maxAge && typeof options.maxAge !== 'number')
throw new TypeError('maxAge must be a number')
this[MAX_AGE] = options.maxAge || 0
this[DISPOSE] = options.dispose
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false
this.reset()
}
// resize the cache when the max changes.
set max (mL) {
if (typeof mL !== 'number' || mL < 0)
throw new TypeError('max must be a non-negative number')
this[MAX] = mL || Infinity
trim(this)
}
get max () {
return this[MAX]
}
set allowStale (allowStale) {
this[ALLOW_STALE] = !!allowStale
}
get allowStale () {
return this[ALLOW_STALE]
}
set maxAge (mA) {
if (typeof mA !== 'number')
throw new TypeError('maxAge must be a non-negative number')
this[MAX_AGE] = mA
trim(this)
}
get maxAge () {
return this[MAX_AGE]
}
// resize the cache when the lengthCalculator changes.
set lengthCalculator (lC) {
if (typeof lC !== 'function')
lC = naiveLength
if (lC !== this[LENGTH_CALCULATOR]) {
this[LENGTH_CALCULATOR] = lC
this[LENGTH] = 0
this[LRU_LIST].forEach(hit => {
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)
this[LENGTH] += hit.length
})
}
trim(this)
}
get lengthCalculator () { return this[LENGTH_CALCULATOR] }
get length () { return this[LENGTH] }
get itemCount () { return this[LRU_LIST].length }
rforEach (fn, thisp) {
thisp = thisp || this
for (let walker = this[LRU_LIST].tail; walker !== null;) {
const prev = walker.prev
forEachStep(this, fn, walker, thisp)
walker = prev
}
}
forEach (fn, thisp) {
thisp = thisp || this
for (let walker = this[LRU_LIST].head; walker !== null;) {
const next = walker.next
forEachStep(this, fn, walker, thisp)
walker = next
}
}
keys () {
return this[LRU_LIST].toArray().map(k => k.key)
}
values () {
return this[LRU_LIST].toArray().map(k => k.value)
}
reset () {
if (this[DISPOSE] &&
this[LRU_LIST] &&
this[LRU_LIST].length) {
this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))
}
this[CACHE] = new Map() // hash of items by key
this[LRU_LIST] = new Yallist() // list of items in order of use recency
this[LENGTH] = 0 // length of items in the list
}
dump () {
return this[LRU_LIST].map(hit =>
isStale(this, hit) ? false : {
k: hit.key,
v: hit.value,
e: hit.now + (hit.maxAge || 0)
}).toArray().filter(h => h)
}
dumpLru () {
return this[LRU_LIST]
}
set (key, value, maxAge) {
maxAge = maxAge || this[MAX_AGE]
if (maxAge && typeof maxAge !== 'number')
throw new TypeError('maxAge must be a number')
const now = maxAge ? Date.now() : 0
const len = this[LENGTH_CALCULATOR](value, key)
if (this[CACHE].has(key)) {
if (len > this[MAX]) {
del(this, this[CACHE].get(key))
return false
}
const node = this[CACHE].get(key)
const item = node.value
// dispose of the old one before overwriting
// split out into 2 ifs for better coverage tracking
if (this[DISPOSE]) {
if (!this[NO_DISPOSE_ON_SET])
this[DISPOSE](key, item.value)
}
item.now = now
item.maxAge = maxAge
item.value = value
this[LENGTH] += len - item.length
item.length = len
this.get(key)
trim(this)
return true
}
const hit = new Entry(key, value, len, now, maxAge)
// oversized objects fall out of cache automatically.
if (hit.length > this[MAX]) {
if (this[DISPOSE])
this[DISPOSE](key, value)
return false
}
this[LENGTH] += hit.length
this[LRU_LIST].unshift(hit)
this[CACHE].set(key, this[LRU_LIST].head)
trim(this)
return true
}
has (key) {
if (!this[CACHE].has(key)) return false
const hit = this[CACHE].get(key).value
return !isStale(this, hit)
}
get (key) {
return get(this, key, true)
}
peek (key) {
return get(this, key, false)
}
pop () {
const node = this[LRU_LIST].tail
if (!node)
return null
del(this, node)
return node.value
}
del (key) {
del(this, this[CACHE].get(key))
}
load (arr) {
// reset the cache
this.reset()
const now = Date.now()
// A previous serialized cache has the most recent items first
for (let l = arr.length - 1; l >= 0; l--) {
const hit = arr[l]
const expiresAt = hit.e || 0
if (expiresAt === 0)
// the item was created without expiration in a non aged cache
this.set(hit.k, hit.v)
else {
const maxAge = expiresAt - now
// dont add already expired items
if (maxAge > 0) {
this.set(hit.k, hit.v, maxAge)
}
}
}
}
prune () {
this[CACHE].forEach((value, key) => get(this, key, false))
}
}
const get = (self, key, doUse) => {
const node = self[CACHE].get(key)
if (node) {
const hit = node.value
if (isStale(self, hit)) {
del(self, node)
if (!self[ALLOW_STALE])
return undefined
} else {
if (doUse) {
if (self[UPDATE_AGE_ON_GET])
node.value.now = Date.now()
self[LRU_LIST].unshiftNode(node)
}
}
return hit.value
}
}
const isStale = (self, hit) => {
if (!hit || (!hit.maxAge && !self[MAX_AGE]))
return false
const diff = Date.now() - hit.now
return hit.maxAge ? diff > hit.maxAge
: self[MAX_AGE] && (diff > self[MAX_AGE])
}
const trim = self => {
if (self[LENGTH] > self[MAX]) {
for (let walker = self[LRU_LIST].tail;
self[LENGTH] > self[MAX] && walker !== null;) {
// We know that we're about to delete this one, and also
// what the next least recently used key will be, so just
// go ahead and set it now.
const prev = walker.prev
del(self, walker)
walker = prev
}
}
}
const del = (self, node) => {
if (node) {
const hit = node.value
if (self[DISPOSE])
self[DISPOSE](hit.key, hit.value)
self[LENGTH] -= hit.length
self[CACHE].delete(hit.key)
self[LRU_LIST].removeNode(node)
}
}
class Entry {
constructor (key, value, length, now, maxAge) {
this.key = key
this.value = value
this.length = length
this.now = now
this.maxAge = maxAge || 0
}
}
const forEachStep = (self, fn, node, thisp) => {
let hit = node.value
if (isStale(self, hit)) {
del(self, node)
if (!self[ALLOW_STALE])
hit = undefined
}
if (hit)
fn.call(thisp, hit.value, hit.key, self)
}
module.exports = LRUCache
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,kBAAkB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,uBAAiB,CAAC;IAC7E,qBAAqB,CAAC,uEAA8D,CAAC;IACrF,UAAU,CAAC,eAAY,CAAC;IACxB,eAAe,CAAC,2CAA+B,CAAC;IAChD,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,qCAAyB,CAAC;YAAE,KAAK,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,gCAAoB,CAAC;YAAE,OAAO,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,kCAAsB,CAAC;QAAA,GAAG,CAAC,CAAC;IACrP,gBAAgB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,mBAAa,CAAC;AACvD","sources":["packages/@react-aria/grid/intl/fr-FR.json"],"sourcesContent":["{\n \"deselectedItem\": \"{item} non sélectionné.\",\n \"longPressToSelect\": \"Appuyez de manière prolongée pour passer en mode de sélection.\",\n \"select\": \"Sélectionner\",\n \"selectedAll\": \"Tous les éléments sélectionnés.\",\n \"selectedCount\": \"{count, plural, =0 {Aucun élément sélectionné} one {# élément sélectionné} other {# éléments sélectionnés}}.\",\n \"selectedItem\": \"{item} sélectionné.\"\n}\n"],"names":[],"version":3,"file":"fr-FR.module.js.map"}
@@ -0,0 +1,37 @@
import baseClamp from './_baseClamp.js';
import toInteger from './toInteger.js';
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Converts `value` to a safe integer. A safe integer can be compared and
* represented correctly.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toSafeInteger(3.2);
* // => 3
*
* _.toSafeInteger(Number.MIN_VALUE);
* // => 0
*
* _.toSafeInteger(Infinity);
* // => 9007199254740991
*
* _.toSafeInteger('3.2');
* // => 3
*/
function toSafeInteger(value) {
return value
? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
: (value === 0 ? value : 0);
}
export default toSafeInteger;
@@ -0,0 +1 @@
{"version":3,"file":"resolveBindingServiceDeactivations.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveBindingServiceDeactivations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAgB,MAAM,oBAAoB,CAAC;AAE5D,wBAAgB,kCAAkC,CAAC,UAAU,EAC3D,MAAM,EAAE,kBAAkB,EAC1B,iBAAiB,EAAE,iBAAiB,CAAC,UAAU,CAAC,EAChD,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,GAC1B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBtB"}
@@ -0,0 +1,92 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@babel/core");
var prettier_1 = require("prettier");
var extract_ast_nodes_1 = require("../extract-ast-nodes");
var get_code_from_ast_1 = require("../get-code-from-ast");
var get_experimental_parser_plugins_1 = require("../get-experimental-parser-plugins");
var get_import_nodes_1 = require("../get-import-nodes");
var get_sorted_nodes_1 = require("../get-sorted-nodes");
test('it sorts imports correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
var code, importNodes, sortedNodes, formatted, _a;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
code = "// first comment\n// second comment\nimport z from 'z';\nimport c from 'c';\nimport g from 'g';\nimport t from 't';\nimport k from 'k';\nimport a from 'a';\n";
importNodes = (0, get_import_nodes_1.getImportNodes)(code);
sortedNodes = (0, get_sorted_nodes_1.getSortedNodes)(importNodes, {
importOrder: [],
importOrderCaseInsensitive: false,
importOrderSeparation: false,
importOrderGroupNamespaceSpecifiers: false,
importOrderSortSpecifiers: false,
importOrderSideEffects: true,
});
formatted = (0, get_code_from_ast_1.getCodeFromAst)(sortedNodes, [], code, null);
_a = expect;
return [4 /*yield*/, (0, prettier_1.format)(formatted, { parser: 'babel' })];
case 1:
_a.apply(void 0, [_b.sent()]).toEqual("// first comment\n// second comment\nimport a from \"a\";\nimport c from \"c\";\nimport g from \"g\";\nimport k from \"k\";\nimport t from \"t\";\nimport z from \"z\";\n");
return [2 /*return*/];
}
});
}); });
test('it renders directives correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
var code, parserOptions, ast, _a, directives, importNodes, formatted, _b;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
code = "\n \"use client\";\n// first comment\nimport b from 'b';\nimport a from 'a';";
parserOptions = {
sourceType: 'module',
plugins: (0, get_experimental_parser_plugins_1.getExperimentalParserPlugins)([]),
};
ast = (0, core_1.parse)(code, parserOptions);
if (!ast)
throw new Error('ast is null');
_a = (0, extract_ast_nodes_1.extractASTNodes)(ast), directives = _a.directives, importNodes = _a.importNodes;
formatted = (0, get_code_from_ast_1.getCodeFromAst)(importNodes, directives, code, null);
_b = expect;
return [4 /*yield*/, (0, prettier_1.format)(formatted, { parser: 'babel' })];
case 1:
_b.apply(void 0, [_c.sent()]).toEqual("\"use client\";\n\n// first comment\nimport b from \"b\";\nimport a from \"a\";\n");
return [2 /*return*/];
}
});
}); });
@@ -0,0 +1,3 @@
export * from './exclude-from-mapped-result';
export * from './exclude-from-template-literal';
export * from './exclude';
@@ -0,0 +1,84 @@
"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/index.ts
var src_exports = {};
__export(src_exports, {
useDisclosure: () => useDisclosure
});
module.exports = __toCommonJS(src_exports);
var import_utils = require("@react-aria/utils");
var import_utils2 = require("@react-stately/utils");
var import_use_callback_ref = require("@heroui/use-callback-ref");
var import_react = require("react");
function useDisclosure(props = {}) {
const {
id: idProp,
defaultOpen,
isOpen: isOpenProp,
onClose: onCloseProp,
onOpen: onOpenProp,
onChange = () => {
}
} = props;
const onOpenPropCallbackRef = (0, import_use_callback_ref.useCallbackRef)(onOpenProp);
const onClosePropCallbackRef = (0, import_use_callback_ref.useCallbackRef)(onCloseProp);
const [isOpen, setIsOpen] = (0, import_utils2.useControlledState)(isOpenProp, defaultOpen || false, onChange);
const reactId = (0, import_react.useId)();
const id = idProp || reactId;
const isControlled = isOpenProp !== void 0;
const onClose = (0, import_react.useCallback)(() => {
if (!isControlled) {
setIsOpen(false);
}
onClosePropCallbackRef == null ? void 0 : onClosePropCallbackRef();
}, [isControlled, onClosePropCallbackRef]);
const onOpen = (0, import_react.useCallback)(() => {
if (!isControlled) {
setIsOpen(true);
}
onOpenPropCallbackRef == null ? void 0 : onOpenPropCallbackRef();
}, [isControlled, onOpenPropCallbackRef]);
const onOpenChange = (0, import_react.useCallback)(() => {
const action = isOpen ? onClose : onOpen;
action();
}, [isOpen, onOpen, onClose]);
return {
isOpen: !!isOpen,
onOpen,
onClose,
onOpenChange,
isControlled,
getButtonProps: (props2 = {}) => ({
...props2,
"aria-expanded": isOpen,
"aria-controls": id,
onClick: (0, import_utils.chain)(props2.onClick, onOpenChange)
}),
getDisclosureProps: (props2 = {}) => ({
...props2,
hidden: !isOpen,
id
})
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
useDisclosure
});
@@ -0,0 +1,211 @@
# escalade [![CI](https://github.com/lukeed/escalade/workflows/CI/badge.svg)](https://github.com/lukeed/escalade/actions) [![licenses](https://licenses.dev/b/npm/escalade)](https://licenses.dev/npm/escalade) [![codecov](https://badgen.now.sh/codecov/c/github/lukeed/escalade)](https://codecov.io/gh/lukeed/escalade)
> A tiny (183B to 210B) and [fast](#benchmarks) utility to ascend parent directories
With [escalade](https://en.wikipedia.org/wiki/Escalade), you can scale parent directories until you've found what you're looking for.<br>Given an input file or directory, `escalade` will continue executing your callback function until either:
1) the callback returns a truthy value
2) `escalade` has reached the system root directory (eg, `/`)
> **Important:**<br>Please note that `escalade` only deals with direct ancestry – it will not dive into parents' sibling directories.
---
**Notice:** As of v3.1.0, `escalade` now includes [Deno support](http://deno.land/x/escalade)! Please see [Deno Usage](#deno) below.
---
## Install
```
$ npm install --save escalade
```
## Modes
There are two "versions" of `escalade` available:
#### "async"
> **Node.js:** >= 8.x<br>
> **Size (gzip):** 210 bytes<br>
> **Availability:** [CommonJS](https://unpkg.com/escalade/dist/index.js), [ES Module](https://unpkg.com/escalade/dist/index.mjs)
This is the primary/default mode. It makes use of `async`/`await` and [`util.promisify`](https://nodejs.org/api/util.html#util_util_promisify_original).
#### "sync"
> **Node.js:** >= 6.x<br>
> **Size (gzip):** 183 bytes<br>
> **Availability:** [CommonJS](https://unpkg.com/escalade/sync/index.js), [ES Module](https://unpkg.com/escalade/sync/index.mjs)
This is the opt-in mode, ideal for scenarios where `async` usage cannot be supported.
## Usage
***Example Structure***
```
/Users/lukeed
└── oss
├── license
└── escalade
├── package.json
└── test
└── fixtures
├── index.js
└── foobar
└── demo.js
```
***Example Usage***
```js
//~> demo.js
import { join } from 'path';
import escalade from 'escalade';
const input = join(__dirname, 'demo.js');
// or: const input = __dirname;
const pkg = await escalade(input, (dir, names) => {
console.log('~> dir:', dir);
console.log('~> names:', names);
console.log('---');
if (names.includes('package.json')) {
// will be resolved into absolute
return 'package.json';
}
});
//~> dir: /Users/lukeed/oss/escalade/test/fixtures/foobar
//~> names: ['demo.js']
//---
//~> dir: /Users/lukeed/oss/escalade/test/fixtures
//~> names: ['index.js', 'foobar']
//---
//~> dir: /Users/lukeed/oss/escalade/test
//~> names: ['fixtures']
//---
//~> dir: /Users/lukeed/oss/escalade
//~> names: ['package.json', 'test']
//---
console.log(pkg);
//=> /Users/lukeed/oss/escalade/package.json
// Now search for "missing123.txt"
// (Assume it doesn't exist anywhere!)
const missing = await escalade(input, (dir, names) => {
console.log('~> dir:', dir);
return names.includes('missing123.txt') && 'missing123.txt';
});
//~> dir: /Users/lukeed/oss/escalade/test/fixtures/foobar
//~> dir: /Users/lukeed/oss/escalade/test/fixtures
//~> dir: /Users/lukeed/oss/escalade/test
//~> dir: /Users/lukeed/oss/escalade
//~> dir: /Users/lukeed/oss
//~> dir: /Users/lukeed
//~> dir: /Users
//~> dir: /
console.log(missing);
//=> undefined
```
> **Note:** To run the above example with "sync" mode, import from `escalade/sync` and remove the `await` keyword.
## API
### escalade(input, callback)
Returns: `string|void` or `Promise<string|void>`
When your `callback` locates a file, `escalade` will resolve/return with an absolute path.<br>
If your `callback` was never satisfied, then `escalade` will resolve/return with nothing (undefined).
> **Important:**<br>The `sync` and `async` versions share the same API.<br>The **only** difference is that `sync` is not Promise-based.
#### input
Type: `string`
The path from which to start ascending.
This may be a file or a directory path.<br>However, when `input` is a file, `escalade` will begin with its parent directory.
> **Important:** Unless given an absolute path, `input` will be resolved from `process.cwd()` location.
#### callback
Type: `Function`
The callback to execute for each ancestry level. It always is given two arguments:
1) `dir` - an absolute path of the current parent directory
2) `names` - a list (`string[]`) of contents _relative to_ the `dir` parent
> **Note:** The `names` list can contain names of files _and_ directories.
When your callback returns a _falsey_ value, then `escalade` will continue with `dir`'s parent directory, re-invoking your callback with new argument values.
When your callback returns a string, then `escalade` stops iteration immediately.<br>
If the string is an absolute path, then it's left as is. Otherwise, the string is resolved into an absolute path _from_ the `dir` that housed the satisfying condition.
> **Important:** Your `callback` can be a `Promise/AsyncFunction` when using the "async" version of `escalade`.
## Benchmarks
> Running on Node.js v10.13.0
```
# Load Time
find-up 3.891ms
escalade 0.485ms
escalade/sync 0.309ms
# Levels: 6 (target = "foo.txt"):
find-up x 24,856 ops/sec ±6.46% (55 runs sampled)
escalade x 73,084 ops/sec ±4.23% (73 runs sampled)
find-up.sync x 3,663 ops/sec ±1.12% (83 runs sampled)
escalade/sync x 9,360 ops/sec ±0.62% (88 runs sampled)
# Levels: 12 (target = "package.json"):
find-up x 29,300 ops/sec ±10.68% (70 runs sampled)
escalade x 73,685 ops/sec ± 5.66% (66 runs sampled)
find-up.sync x 1,707 ops/sec ± 0.58% (91 runs sampled)
escalade/sync x 4,667 ops/sec ± 0.68% (94 runs sampled)
# Levels: 18 (target = "missing123.txt"):
find-up x 21,818 ops/sec ±17.37% (14 runs sampled)
escalade x 67,101 ops/sec ±21.60% (20 runs sampled)
find-up.sync x 1,037 ops/sec ± 2.86% (88 runs sampled)
escalade/sync x 1,248 ops/sec ± 0.50% (93 runs sampled)
```
## Deno
As of v3.1.0, `escalade` is available on the Deno registry.
Please note that the [API](#api) is identical and that there are still [two modes](#modes) from which to choose:
```ts
// Choose "async" mode
import escalade from 'https://deno.land/escalade/async.ts';
// Choose "sync" mode
import escalade from 'https://deno.land/escalade/sync.ts';
```
> **Important:** The `allow-read` permission is required!
## Related
- [premove](https://github.com/lukeed/premove) - A tiny (247B) utility to remove items recursively
- [totalist](https://github.com/lukeed/totalist) - A tiny (195B to 224B) utility to recursively list all (total) files in a directory
- [mk-dirs](https://github.com/lukeed/mk-dirs) - A tiny (420B) utility to make a directory and its parents, recursively
## License
MIT © [Luke Edwards](https://lukeed.com)
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
"description": "Meta-schema for $data reference (JSON Schema extension proposal)",
"type": "object",
"required": [ "$data" ],
"properties": {
"$data": {
"type": "string",
"anyOf": [
{ "format": "relative-json-pointer" },
{ "format": "json-pointer" }
]
}
},
"additionalProperties": false
}
@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/mime`
# Summary
This package contains type definitions for mime (https://github.com/broofa/node-mime).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime/v1.
### Additional Details
* Last updated: Tue, 07 Nov 2023 20:08:00 GMT
* Dependencies: none
# Credits
These definitions were written by [Jeff Goddard](https://github.com/jedigo), and [Daniel Hritzkiv](https://github.com/dhritzkiv).
@@ -0,0 +1,111 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
const fish = z.object({
name: z.string(),
age: z.number(),
nested: z.object({}),
});
test("pick type inference", () => {
const nameonlyFish = fish.pick({ name: true });
type nameonlyFish = z.infer<typeof nameonlyFish>;
util.assertEqual<nameonlyFish, { name: string }>(true);
});
test("pick parse - success", () => {
const nameonlyFish = fish.pick({ name: true });
nameonlyFish.parse({ name: "bob" });
// @ts-expect-error checking runtime picks `name` only.
const anotherNameonlyFish = fish.pick({ name: true, age: false });
anotherNameonlyFish.parse({ name: "bob" });
});
test("pick parse - fail", () => {
fish.pick({ name: true }).parse({ name: "12" } as any);
fish.pick({ name: true }).parse({ name: "bob", age: 12 } as any);
fish.pick({ age: true }).parse({ age: 12 } as any);
const nameonlyFish = fish.pick({ name: true }).strict();
const bad1 = () => nameonlyFish.parse({ name: 12 } as any);
const bad2 = () => nameonlyFish.parse({ name: "bob", age: 12 } as any);
const bad3 = () => nameonlyFish.parse({ age: 12 } as any);
// @ts-expect-error checking runtime picks `name` only.
const anotherNameonlyFish = fish.pick({ name: true, age: false }).strict();
const bad4 = () => anotherNameonlyFish.parse({ name: "bob", age: 12 } as any);
expect(bad1).toThrow();
expect(bad2).toThrow();
expect(bad3).toThrow();
expect(bad4).toThrow();
});
test("omit type inference", () => {
const nonameFish = fish.omit({ name: true });
type nonameFish = z.infer<typeof nonameFish>;
util.assertEqual<nonameFish, { age: number; nested: {} }>(true);
});
test("omit parse - success", () => {
const nonameFish = fish.omit({ name: true });
nonameFish.parse({ age: 12, nested: {} });
// @ts-expect-error checking runtime omits `name` only.
const anotherNonameFish = fish.omit({ name: true, age: false });
anotherNonameFish.parse({ age: 12, nested: {} });
});
test("omit parse - fail", () => {
const nonameFish = fish.omit({ name: true });
const bad1 = () => nonameFish.parse({ name: 12 } as any);
const bad2 = () => nonameFish.parse({ age: 12 } as any);
const bad3 = () => nonameFish.parse({} as any);
// @ts-expect-error checking runtime omits `name` only.
const anotherNonameFish = fish.omit({ name: true, age: false });
const bad4 = () => anotherNonameFish.parse({ nested: {} } as any);
expect(bad1).toThrow();
expect(bad2).toThrow();
expect(bad3).toThrow();
expect(bad4).toThrow();
});
test("nonstrict inference", () => {
const laxfish = fish.pick({ name: true }).catchall(z.any());
type laxfish = z.infer<typeof laxfish>;
util.assertEqual<laxfish, { name: string } & { [k: string]: any }>(true);
});
test("nonstrict parsing - pass", () => {
const laxfish = fish.passthrough().pick({ name: true });
laxfish.parse({ name: "asdf", whatever: "asdf" });
laxfish.parse({ name: "asdf", age: 12, nested: {} });
});
test("nonstrict parsing - fail", () => {
const laxfish = fish.passthrough().pick({ name: true });
const bad = () => laxfish.parse({ whatever: "asdf" } as any);
expect(bad).toThrow();
});
test("pick/omit/required/partial - do not allow unknown keys", () => {
const schema = z.object({
name: z.string(),
age: z.number(),
});
// @ts-expect-error
schema.pick({ $unknown: true });
// @ts-expect-error
schema.omit({ $unknown: true });
// @ts-expect-error
schema.required({ $unknown: true });
// @ts-expect-error
schema.partial({ $unknown: true });
});
@@ -0,0 +1,23 @@
var baseAt = require('./_baseAt'),
flatRest = require('./_flatRest');
/**
* Creates an array of values corresponding to `paths` of `object`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {...(string|string[])} [paths] The property paths to pick.
* @returns {Array} Returns the picked values.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
*
* _.at(object, ['a[0].b.c', 'a[1]']);
* // => [3, 4]
*/
var at = flatRest(baseAt);
module.exports = at;
@@ -0,0 +1,22 @@
import baseEach from './_baseEach.js';
/**
* The base implementation of `_.some` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
*/
function baseSome(collection, predicate) {
var result;
baseEach(collection, function(value, index, collection) {
result = predicate(value, index, collection);
return !result;
});
return !!result;
}
export default baseSome;
@@ -0,0 +1,98 @@
{
"name": "express",
"description": "Fast, unopinionated, minimalist web framework",
"version": "5.1.0",
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
"Aaron Heckmann <aaron.heckmann+github@gmail.com>",
"Ciaran Jessup <ciaranj@gmail.com>",
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"Guillermo Rauch <rauchg@gmail.com>",
"Jonathan Ong <me@jongleberry.com>",
"Roman Shtylman <shtylman+expressjs@gmail.com>",
"Young Jae Sim <hanul@hanul.me>"
],
"license": "MIT",
"repository": "expressjs/express",
"homepage": "https://expressjs.com/",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
},
"keywords": [
"express",
"framework",
"sinatra",
"web",
"http",
"rest",
"restful",
"router",
"app",
"api"
],
"dependencies": {
"accepts": "^2.0.0",
"body-parser": "^2.2.0",
"content-disposition": "^1.0.0",
"content-type": "^1.0.5",
"cookie": "^0.7.1",
"cookie-signature": "^1.2.1",
"debug": "^4.4.0",
"encodeurl": "^2.0.0",
"escape-html": "^1.0.3",
"etag": "^1.8.1",
"finalhandler": "^2.1.0",
"fresh": "^2.0.0",
"http-errors": "^2.0.0",
"merge-descriptors": "^2.0.0",
"mime-types": "^3.0.0",
"on-finished": "^2.4.1",
"once": "^1.4.0",
"parseurl": "^1.3.3",
"proxy-addr": "^2.0.7",
"qs": "^6.14.0",
"range-parser": "^1.2.1",
"router": "^2.2.0",
"send": "^1.1.0",
"serve-static": "^2.2.0",
"statuses": "^2.0.1",
"type-is": "^2.0.1",
"vary": "^1.1.2"
},
"devDependencies": {
"after": "0.8.2",
"connect-redis": "^8.0.1",
"cookie-parser": "1.4.7",
"cookie-session": "2.1.0",
"ejs": "^3.1.10",
"eslint": "8.47.0",
"express-session": "^1.18.1",
"hbs": "4.2.0",
"marked": "^15.0.3",
"method-override": "3.0.0",
"mocha": "^10.7.3",
"morgan": "1.10.0",
"nyc": "^17.1.0",
"pbkdf2-password": "1.2.1",
"supertest": "^6.3.0",
"vhost": "~3.0.2"
},
"engines": {
"node": ">= 18"
},
"files": [
"LICENSE",
"History.md",
"Readme.md",
"index.js",
"lib/"
],
"scripts": {
"lint": "eslint .",
"test": "mocha --require test/support/env --reporter spec --check-leaks test/ test/acceptance/",
"test-ci": "nyc --exclude examples --exclude test --exclude benchmarks --reporter=lcovonly --reporter=text npm test",
"test-cov": "nyc --exclude examples --exclude test --exclude benchmarks --reporter=html --reporter=text npm test",
"test-tap": "mocha --require test/support/env --reporter tap --check-leaks test/ test/acceptance/"
}
}
@@ -0,0 +1,6 @@
export * from "./cert_bag";
export * from "./crl_bag";
export * from "./key_bag";
export * from "./pkcs8_shrouded_key_bag";
export * from "./secret_bag";
export * from "./types";
@@ -0,0 +1,28 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
export declare const SetFriendRemarkPayloadSchema: import("@sinclair/typebox").TObject<{
user_id: import("@sinclair/typebox").TString;
remark: import("@sinclair/typebox").TString;
}>;
export type SetFriendRemarkPayload = Static<typeof SetFriendRemarkPayloadSchema>;
export default class SetFriendRemark extends OneBotAction<SetFriendRemarkPayload, void> {
actionName: "set_friend_remark";
payloadSchema: import("@sinclair/typebox").TObject<{
user_id: import("@sinclair/typebox").TString;
remark: import("@sinclair/typebox").TString;
}>;
returnSchema: import("@sinclair/typebox").TNull;
actionSummary: string;
actionDescription: string;
actionTags: string[];
payloadExample: {
user_id: string;
remark: string;
};
returnExample: null;
errorExamples: {
code: number;
description: string;
}[];
_handle(payload: SetFriendRemarkPayload): Promise<void>;
}
@@ -0,0 +1 @@
{"version":3,"file":"react-error-boundary.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
@@ -0,0 +1,96 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var isInteger = require('math-intrinsics/isInteger');
var callBound = require('call-bound');
var $slice = callBound('Array.prototype.slice');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var RawBytesToNumeric = require('./RawBytesToNumeric');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var safeConcat = require('safe-array-concat');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
// https://262.ecma-international.org/11.0/#sec-getvaluefrombuffer
module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string' || typeof tableTAO.size['$' + type] !== 'number') {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (order !== 'SeqCst' && order !== 'Unordered') {
throw new $TypeError('Assertion failed: `order` must be either `SeqCst` or `Unordered`');
}
if (arguments.length > 5 && typeof arguments[5] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Let block be arrayBuffer.[[ArrayBufferData]].
var elementSize = tableTAO.size['$' + type]; // step 5
if (!elementSize) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
var rawValue;
if (isSAB) { // step 6
/*
a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier().
c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false.
d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values.
e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency.
f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }.
g. Append readEvent to eventList.
h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]].
*/
throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation');
} else {
// 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
}
// 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation.
var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8
var bytes = isLittleEndian
? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize)
: $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize);
return RawBytesToNumeric(type, bytes, isLittleEndian);
};
@@ -0,0 +1 @@
{"version":3,"file":"npm-client.js","sourceRoot":"","sources":["../../src/utils/npm-client.ts"],"names":[],"mappings":"AAEA,MAAM,GAAG,GAAG,KAAK,CAAA;AAEjB,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IACjC,GAAG;IACH,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;CACE,CAAC,CAAA;AAIX,IAAI,SAAgC,CAAA;AAEpC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAc,EAAE;IAC1C,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IAE/D,SAAS,GAAG,MAAM,IAAI,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAE,MAAoB,CAAC,CAAC,CAAC,GAAG,CAAA;IAE3E,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,WAAmB,EAAE,EAAE,CAC1D,GAAG,YAAY,EAAE,IAAI,SAAS,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,EAAE,CAAA"}
@@ -0,0 +1,4 @@
var x=String;
var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};
module.exports=create();
module.exports.createColors = create;
@@ -0,0 +1 @@
{"version":3,"file":"ipv6.js","sourceRoot":"","sources":["../src/ipv6.ts"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,iDAAmC;AACnC,2DAA6C;AAC7C,2DAA6C;AAC7C,sDAAwC;AACxC,iCAAkC;AAClC,kEAIkC;AAClC,mDAA+C;AAC/C,qCAAmC;AAEnC,SAAS,MAAM,CAAC,SAAc;IAC5B,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACvC,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,MAAc;IAC/B,MAAM,CAAC,GAAG,cAAc,CAAC;IAEzB,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACtB,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,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AAC;YACN,IAAI,GAAG,GAAG,CAAC;QACb,CAAC;QAED,6CAA6C;QAC7C,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAE1B,6BAA6B;YAC7B,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;gBAC7B,IAAI,GAAG,IAAI,CAAC;YACd,CAAC;QACH,CAAC;aAAM,CALine truncated
@@ -0,0 +1,25 @@
let Declaration = require('../declaration')
const BASIC = [
'none',
'underline',
'overline',
'line-through',
'blink',
'inherit',
'initial',
'unset'
]
class TextDecoration extends Declaration {
/**
* Do not add prefixes for basic values.
*/
check(decl) {
return decl.value.split(/\s+/).some(i => !BASIC.includes(i))
}
}
TextDecoration.names = ['text-decoration']
module.exports = TextDecoration
@@ -0,0 +1,76 @@
### Simple numerics
```javascript
>>> ['10',9,2,'1','4'].sort(naturalSort)
['1',2,'4',9,'10']
```
### Floats
```javascript
>>> ['10.0401',10.022,10.042,'10.021999'].sort(naturalSort)
['10.021999',10.022,'10.0401',10.042]
```
### Float & decimal notation
```javascript
>>> ['10.04f','10.039F','10.038d','10.037D'].sort(naturalSort)
['10.037D','10.038d','10.039F','10.04f']
```
### Scientific notation
```javascript
>>> ['1.528535047e5','1.528535047e7','1.528535047e3'].sort(naturalSort)
['1.528535047e3','1.528535047e5','1.528535047e7']
```
### IP addresses
```javascript
>>> ['192.168.0.100','192.168.0.1','192.168.1.1'].sort(naturalSort)
['192.168.0.1','192.168.0.100','192.168.1.1']
```
### Filenames
```javascript
>>> ['car.mov','01alpha.sgi','001alpha.sgi','my.string_41299.tif'].sort(naturalSort)
['001alpha.sgi','01alpha.sgi','car.mov','my.string_41299.tif'
```
### Dates
```javascript
>>> ['10/12/2008','10/11/2008','10/11/2007','10/12/2007'].sort(naturalSort)
['10/11/2007', '10/12/2007', '10/11/2008', '10/12/2008']
```
### Money
```javascript
>>> ['$10002.00','$10001.02','$10001.01'].sort(naturalSort)
['$10001.01','$10001.02','$10002.00']
```
### Movie Titles
```javascript
>>> ['1 Title - The Big Lebowski','1 Title - Gattaca','1 Title - Last Picture Show'].sort(naturalSort)
['1 Title - Gattaca','1 Title - Last Picture Show','1 Title - The Big Lebowski']
```
### By default - case-sensitive sorting
```javascript
>>> ['a', 'B'].sort(naturalSort);
['B', 'a']
```
### To enable case-insensitive sorting
```javascript
>>> naturalSort.insensitive = true;
>>> ['a', 'B'].sort(naturalSort);
['a', 'B']
```
@@ -0,0 +1,3 @@
"use strict";var c=Object.defineProperty;var s=(e,r)=>c(e,"name",{value:r,configurable:!0});var l=require("node:repl"),u=require("./package-Dxt5kIHw.cjs"),q=require("./index-gckBtVBf.cjs");require("node:url"),require("esbuild"),require("node:crypto"),require("node:fs"),require("node:path"),require("node:os"),require("./temporary-directory-B83uKxJF.cjs"),console.log(`Welcome to tsx v${u.version} (Node.js ${process.version}).
Type ".help" for more information.`);const t=l.start(),{eval:p}=t,v=s(async function(e,r,o,i){const a=await q.transform(e,o,{loader:"ts",tsconfigRaw:{compilerOptions:{preserveValueImports:!0}},define:{require:"global.require"}}).catch(n=>(console.log(n.message),{code:`
`}));return p.call(this,a.code,r,o,i)},"preEval");t.eval=v;
@@ -0,0 +1,17 @@
var baseIsNative = require('./_baseIsNative'),
getValue = require('./_getValue');
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;
@@ -0,0 +1,457 @@
flf2a$ 4 4 17 -1 48 0 0 0
Author : LG Beard
Date : 2003/9/10 10:37:00
Version: 1.3
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
Ran upon a few sig`s created by sanne jabs awhile ago. Five sig`s
all that were found. One articile stating that there was a hieroglyphic
font, never found it. From those an some reading about how to use an
write with hieroglyphs this file came about. Hopefully these are read-
able, tried to keep them as close as possible to the real thing. If
they are not then i blew it real bad.
Thanks sanne for the spark.
Some upper case keys used for some alt symbols
C = ch
G = fancy jar
H = alt h
M = alt m
P = fancy door
T = alt T
X = sh
Y = alt y
The symbol below stands for writing or scribe to my understanding
2 ink spots on pallette, a jar for ink or water, his writing implement,
and a string or rope that is slung over the shoulder to carry the
tools of the trade.
,-~.
| \ \|/
_|_ |=-|)
| o |(_) |
|_o_| |
This file is simply just for fun, write your name, wrap in a cartouche.
_____ .
(_____)| a tiny one
'
but most of all, enjoy.
$ #
$ #
$ #
$ ##
!#
#
#
##
"#
#
#
##
##
#
#
##
$#
#
#
##
%#
#
#
##
&#
#
#
##
'#
#
#
##
(#
#
#
##
)#
#
#
##
*#
#
#
##
+#
#
#
##
,#
#
#
##
-#
#
#
##
.#
#
#
##
/#
#
#
##
0#
#
#
##
1#
#
#
##
2#
#
#
##
3#
#
#
##
4#
#
#
##
5#
#
#
##
6#
#
#
##
7#
#
#
##
8#
#
#
##
9#
#
#
##
:#
#
#
##
;#
#
#
##
<#
#
#
##
=#
#
#
##
>#
#
#
##
?#
#
#
##
@#
#
#
##
,-~~\ #
( \ #
|\. \ #
_]_]`\\ ##
|| #
|| #
|| #
.-'_| ##
.-===-., #
`.___.' #
_______ #
|_______| ##
_ #
__,(: `,_,. #
(.-_- __ | #
`----' -' ##
#
|| #
.... || #
`=.`''===.' ##
#
\/ #
`-'_ #
`---. ##
______ #
'-.--.-' #
/::::\ #
)_/\_( ##
() #
() #
() #
/\ ##
;. #
; | #
`.| #
| ##
_ #
`-) #
_/,' #
(___) ##
#
#
.-===-., #
`.___.' ##
,-. ,-.#
<,- \_____/ `#
/ ___. \ #
,_(__/ ,_(__\ ##
#
#
_____ #
/_____ ##
#
#
#
^^^^^^^ ##
#
.-. #
_|_ \ #
(_) ##
|||[]||| #
|_|[]|_| #
|=|[]|=| #
|||[]||| ##
#
#
.'| #
/__| ##
#
#
.---. #
'.___.' ##
,-. #
| | #
| ' #
| ##
#
#
()----. #
()----' ##
<~)_ #
( v~\ #
\_/' #
/\ ##
<~)_ #
( v~\ #
\_/' #
/\ ##
.''. #
'.' ) #
/ #
.' ##
#
... #
( X-==== #
''' ##
;. ;. #
; | ; | #
`.| `.| #
| | ##
#
#
#
---<|>--- ##
[#
#
#
##
\#
#
#
##
]#
#
#
##
^#
#
#
##
_#
#
#
##
`#
#
#
##
,-~~\ #
( \ #
|\. \ #
_]_]`\\ ##
|| #
|| #
|| #
.-'_| ##
#
#
.-===-., #
`.___.' ##
_ #
__,(: `,_,. #
(.-_- __ | #
`----' -' ##
#
|| #
.... || #
`=.`''===.' ##
#
\/ #
`-'_ #
`---. ##
#
____ #
/ \ #
/_/\_\ ##
#
___ #
| | #
| |_| ##
;. #
; | #
`.| #
| ##
_ #
`-) #
_/,' #
(___) ##
#
#
.-===-., #
`.___.' ##
,-. ,-.#
<,- \_____/ `#
/ ___. \ #
,_(__/ ,_(__\ ##
,-==. #
( (\ #
|\.\\ #
_]_]`\\ ##
#
#
#
^^^^^^^ ##
#
.-. #
_|_ \ #
(_) ##
#
#
__ #
|__| ##
#
#
.'| #
/__| ##
#
#
.---. #
'.___.' ##
,-. #
| | #
| ' #
| ##
#
#
.-==-. #
/______\ ##
<~)_ #
( v~\ #
\_/' #
/\ ##
<~)_ #
( v~\ #
\_/' #
/\ ##
.''. #
'.' ) #
/ #
.' ##
.-===-., #
`.___.' #
#
---<|>--- ##
\\ \\ #
\\ \\ #
\\ \\ #
\\ \\ ##
#
#
#
---<|>--- ##
{#
#
#
##
|#
#
#
##
}#
#
#
##
~#
#
#
##
,-~~\ #
( \ #
|\. \ #
_]_]`\\ ##
#
.-. #
_|_ \ #
(_) ##
<~)_ #
( v~\ #
\_/' #
/\ ##
,-~~\ #
( \ #
|\. \ #
_]_]`\\ ##
#
.-. #
_|_ \ #
(_) ##
<~)_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AAC,KAAK,sCAAgB,CAAA,IAAK,EAAE,UAAU,CAAC,IAAI,MAAM;QAG1G,IAAI,CAAC,iDAA2B;YAC9B,kDAA4B,IAAI,YAAY,0CAAoB,4CAAsB;YAEtF,IAAI,YAAY;YAChB,IAAK,IAAI,OAAO,2CAAqB,QAAQ,yCAAmB,OAAQ;gBACtE,+CAAyB,CAAC,OAAO,0CAAoB,GAAG;gBACxD,IAAK,IAAI,IAAI,GAAG,KAAK,IAAI,IACvB,aAAa,0CAAoB,MAAM;YAE3C;QACF;IACF;AA0DF","sources":["packages/@internationalized/date/src/calendars/IslamicCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, Calendar} from '../types';\nimport {CalendarDate} from '../CalendarDate';\n\nconst CIVIL_EPOC = 1948440; // CE 622 July 16 Friday (Julian calendar) / CE 622 July 19 (Gregorian calendar)\nconst ASTRONOMICAL_EPOC = 1948439; // CE 622 July 15 Thursday (Julian calendar)\nconst UMALQURA_YEAR_START = 1300;\nconst UMALQURA_YEAR_END = 1600;\nconst UMALQURA_START_DAYS = 460322;\n\nfunction islamicToJulianDay(epoch: number, year: number, month: number, day: number): number {\n return day +\n Math.ceil(29.5 * (month - 1)) +\n (year - 1) * 354 +\n Math.floor((3 + 11 * year) / 30) +\n epoch - 1;\n}\n\nfunction julianDayToIslamic(calendar: Calendar, epoch: number, jd: number) Line truncated
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
var presentationRoles = new Set(['presentation', 'none']);
var isPresentationRole = function isPresentationRole(tagName, attributes) {
return presentationRoles.has((0, _jsxAstUtils.getLiteralPropValue)((0, _jsxAstUtils.getProp)(attributes, 'role')));
};
var _default = exports["default"] = isPresentationRole;
module.exports = exports.default;
@@ -0,0 +1,13 @@
/**
* Extractor function for a ChainExpression type value node.
* A member expression is accessing a property on an object `obj.property`.
*
* @param - value - AST Value object with type `ChainExpression`
* @returns - The extracted value converted to correct type
* and maintaing `obj?.property` convention.
*/
export default function extractValueFromChainExpression(value) {
// eslint-disable-next-line global-require
const getValue = require('.').default;
return getValue(value.expression || value);
}
@@ -0,0 +1,5 @@
import type { IndividualAndMetaSelectorsString, MetaSelectorsString, Selectors, SelectorsString } from './enums';
import { MetaSelectors } from './enums';
export declare function selectorTypeToMessageString(selectorType: SelectorsString): string;
export declare function isMetaSelector(selector: IndividualAndMetaSelectorsString | MetaSelectors | Selectors): selector is MetaSelectorsString;
export declare function isMethodOrPropertySelector(selector: IndividualAndMetaSelectorsString | MetaSelectors | Selectors): boolean;
@@ -0,0 +1,5 @@
export declare const BITS = 32;
export declare const GROUPS = 4;
export declare const RE_ADDRESS: RegExp;
export declare const RE_SUBNET_STRING: RegExp;
//# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1,39 @@
import apply from './_apply.js';
import arrayMap from './_arrayMap.js';
import unzip from './unzip.js';
/**
* This method is like `_.unzip` except that it accepts `iteratee` to specify
* how regrouped values should be combined. The iteratee is invoked with the
* elements of each group: (...group).
*
* @static
* @memberOf _
* @since 3.8.0
* @category Array
* @param {Array} array The array of grouped elements to process.
* @param {Function} [iteratee=_.identity] The function to combine
* regrouped values.
* @returns {Array} Returns the new array of regrouped elements.
* @example
*
* var zipped = _.zip([1, 2], [10, 20], [100, 200]);
* // => [[1, 10, 100], [2, 20, 200]]
*
* _.unzipWith(zipped, _.add);
* // => [3, 30, 300]
*/
function unzipWith(array, iteratee) {
if (!(array && array.length)) {
return [];
}
var result = unzip(array);
if (iteratee == null) {
return result;
}
return arrayMap(result, function(group) {
return apply(iteratee, undefined, group);
});
}
export default unzipWith;
@@ -0,0 +1,2 @@
import { domAnimation } from 'framer-motion';
export { domAnimation as default } from 'framer-motion';
@@ -0,0 +1 @@
{"version":3,"file":"convertToArrayPayload.d.ts","sourceRoot":"","sources":["../../src/utils/convertToArrayPayload.ts"],"names":[],"mappings":"yBAAgB,CAAC,EAAE,OAAO,CAAC;AAA3B,wBAAyE"}
@@ -0,0 +1,58 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PluginManager = void 0;
const plugin_1 = require("@inversifyjs/plugin");
const InversifyContainerError_1 = require("../../error/models/InversifyContainerError");
const InversifyContainerErrorKind_1 = require("../../error/models/InversifyContainerErrorKind");
class PluginManager {
#pluginApi;
#pluginContext;
#serviceResolutionManager;
#serviceReferenceManager;
constructor(container, serviceReferenceManager, serviceResolutionManager) {
this.#serviceReferenceManager = serviceReferenceManager;
this.#serviceResolutionManager = serviceResolutionManager;
this.#pluginApi = this.#buildPluginApi(container);
this.#pluginContext = this.#buildPluginContext();
}
register(container, pluginConstructor) {
const pluginInstance = new pluginConstructor(container, this.#pluginContext);
if (pluginInstance[plugin_1.isPlugin] !== true) {
throw new InversifyContainerError_1.InversifyContainerError(InversifyContainerErrorKind_1.InversifyContainerErrorKind.invalidOperation, 'Invalid plugin. The plugin must extend the Plugin class');
}
pluginInstance.load(this.#pluginApi);
}
#buildPluginApi(container) {
return {
define: (name,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
method) => {
if (Object.prototype.hasOwnProperty.call(container, name)) {
throw new InversifyContainerError_1.InversifyContainerError(InversifyContainerErrorKind_1.InversifyContainerErrorKind.invalidOperation, `Container already has a method named "${String(name)}"`);
}
container[name] =
method;
},
onPlan: this.#serviceResolutionManager.onPlan.bind(this.#serviceResolutionManager),
};
}
#buildPluginContext() {
const serviceReferenceManager = this.#serviceReferenceManager;
return {
get activationService() {
return serviceReferenceManager.activationService;
},
get bindingService() {
return serviceReferenceManager.bindingService;
},
get deactivationService() {
return serviceReferenceManager.deactivationService;
},
get planResultCacheService() {
return serviceReferenceManager.planResultCacheService;
},
};
}
}
exports.PluginManager = PluginManager;
//# sourceMappingURL=PluginManager.js.map
@@ -0,0 +1,73 @@
import { css } from './css';
import { parse } from './core/parse';
let h, useTheme, fwdProp;
function setup(pragma, prefix, theme, forwardProps) {
// This one needs to stay in here, so we won't have cyclic dependencies
parse.p = prefix;
// These are scope to this context
h = pragma;
useTheme = theme;
fwdProp = forwardProps;
}
/**
* styled function
* @param {string} tag
* @param {function} forwardRef
*/
function styled(tag, forwardRef) {
let _ctx = this || {};
return function wrapper() {
let _args = arguments;
function Styled(props, ref) {
// Grab a shallow copy of the props
let _props = Object.assign({}, props);
// Keep a local reference to the previous className
let _previousClassName = _props.className || Styled.className;
// _ctx.p: is the props sent to the context
_ctx.p = Object.assign({ theme: useTheme && useTheme() }, _props);
// Set a flag if the current components had a previous className
// similar to goober. This is the append/prepend flag
// The _empty_ space compresses better than `\s`
_ctx.o = / *go\d+/.test(_previousClassName);
_props.className =
// Define the new className
css.apply(_ctx, _args) + (_previousClassName ? ' ' + _previousClassName : '');
// If the forwardRef fun is defined we have the ref
if (forwardRef) {
_props.ref = ref;
}
// Assign the _as with the provided `tag` value
let _as = tag;
// If this is a string -- checking that is has a first valid char
if (tag[0]) {
// Try to assign the _as with the given _as value if any
_as = _props.as || tag;
// And remove it
delete _props.as;
}
// Handle the forward props filter if defined and _as is a string
if (fwdProp && _as[0]) {
fwdProp(_props);
}
return h(_as, _props);
}
return forwardRef ? forwardRef(Styled) : Styled;
};
}
export { styled, setup };
@@ -0,0 +1,193 @@
/**
* @fileoverview The main file for the hfs package.
* @author Nicholas C. Zakas
*/
/** @typedef{import("@humanfs/types").HfsImpl} HfsImpl */
/** @typedef{import("@humanfs/types").HfsDirectoryEntry} HfsDirectoryEntry */
/**
* Error to represent when a method is missing on an impl.
*/
export class NoSuchMethodError extends Error {
/**
* Creates a new instance.
* @param {string} methodName The name of the method that was missing.
*/
constructor(methodName: string);
}
/**
* Error to represent when an impl is already set.
*/
export class ImplAlreadySetError extends Error {
/**
* Creates a new instance.
*/
constructor();
}
/**
* A class representing a log entry.
*/
export class LogEntry {
/**
* Creates a new instance.
* @param {string} type The type of log entry.
* @param {any} [data] The data associated with the log entry.
*/
constructor(type: string, data?: any);
/**
* The time at which the log entry was created.
* @type {number}
*/
timestamp: number;
methodName: string;
data: any;
#private;
}
/**
* A class representing a file system utility library.
* @implements {HfsImpl}
*/
export class Hfs implements HfsImpl {
/**
* Creates a new instance.
* @param {object} options The options for the instance.
* @param {HfsImpl} options.impl The implementation to use.
*/
constructor({ impl }: {
impl: HfsImpl;
});
/**
* Starts a new log with the given name.
* @param {string} name The name of the log to start;
* @returns {void}
* @throws {Error} When the log already exists.
* @throws {TypeError} When the name is not a non-empty string.
*/
logStart(name: string): void;
/**
* Ends a log with the given name and returns the entries.
* @param {string} name The name of the log to end.
* @returns {Array<LogEntry>} The entries in the log.
* @throws {Error} When the log does not exist.
*/
logEnd(name: string): Array<LogEntry>;
/**
* Determines if the current implementation is the base implementation.
* @returns {boolean} True if the current implementation is the base implementation.
*/
isBaseImpl(): boolean;
/**
* Sets the implementation for this instance.
* @param {object} impl The implementation to use.
* @returns {void}
*/
setImpl(impl: object): void;
/**
* Resets the implementation for this instance back to its original.
* @returns {void}
*/
resetImpl(): void;
/**
* Reads the given file and returns the contents as text. Assumes UTF-8 encoding.
* @param {string} filePath The file to read.
* @returns {Promise<string|undefined>} The contents of the file.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
*/
text(filePath: string): Promise<string | undefined>;
/**
* Reads the given file and returns the contents as JSON. Assumes UTF-8 encoding.
* @param {string} filePath The file to read.
* @returns {Promise<any|undefined>} The contents of the file as JSON.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {SyntaxError} When the file contents are not valid JSON.
* @throws {TypeError} When the file path is not a non-empty string.
*/
json(filePath: string): Promise<any | undefined>;
/**
* Reads the given file and returns the contents as an ArrayBuffer.
* @param {string} filePath The file to read.
* @returns {Promise<ArrayBuffer|undefined>} The contents of the file as an ArrayBuffer.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
* @deprecated Use bytes() instead.
*/
arrayBuffer(filePath: string): Promise<ArrayBuffer | undefined>;
/**
* Reads the given file and returns the contents as an Uint8Array.
* @param {string} filePath The file to read.
* @returns {Promise<Uint8Array|undefined>} The contents of the file as an Uint8Array.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
*/
bytes(filePath: string): Promise<Uint8Array | undefined>;
/**
* Writes the given data to the given file. Creates any necessary directories along the way.
* If the data is a string, UTF-8 encoding is used.
* @param {string} filePath The file to write.
* @param {any} contents The data to write.
* @returns {Promise<void>} A promise that resolves when the file is written.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
*/
write(filePath: string, contents: any): Promise<void>;
/**
* Determines if the given file exists.
* @param {string} filePath The file to check.
* @returns {Promise<boolean>} True if the file exists.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
*/
isFile(filePath: string): Promise<boolean>;
/**
* Determines if the given directory exists.
* @param {string} dirPath The directory to check.
* @returns {Promise<boolean>} True if the directory exists.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the directory path is not a non-empty string.
*/
isDirectory(dirPath: string): Promise<boolean>;
/**
* Creates the given directory.
* @param {string} dirPath The directory to create.
* @returns {Promise<void>} A promise that resolves when the directory is created.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the directory path is not a non-empty string.
*/
createDirectory(dirPath: string): Promise<void>;
/**
* Deletes the given file.
* @param {string} filePath The file to delete.
* @returns {Promise<void>} A promise that resolves when the file is deleted.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
*/
delete(filePath: string): Promise<void>;
/**
* Deletes the given directory.
* @param {string} dirPath The directory to delete.
* @returns {Promise<void>} A promise that resolves when the directory is deleted.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the directory path is not a non-empty string.
*/
deleteAll(dirPath: string): Promise<void>;
/**
* Returns a list of directory entries for the given path.
* @param {string} dirPath The path to the directory to read.
* @returns {AsyncIterable<HfsDirectoryEntry>} A promise that resolves with the
* directory entries.
* @throws {TypeError} If the directory path is not a string.
* @throws {Error} If the directory cannot be read.
*/
list(dirPath: string): AsyncIterable<HfsDirectoryEntry>;
/**
* Returns the size of the given file.
* @param {string} filePath The path to the file to read.
* @returns {Promise<number>} A promise that resolves with the size of the file.
* @throws {TypeError} If the file path is not a string.
* @throws {Error} If the file cannot be read.
*/
size(filePath: string): Promise<number>;
#private;
}
export type HfsImpl = import("@humanfs/types").HfsImpl;
export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry;
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,IAAI,CAAC;AACrC","sources":["packages/@react-aria/overlays/intl/nb-NO.json"],"sourcesContent":["{\n \"dismiss\": \"Lukk\"\n}\n"],"names":[],"version":3,"file":"nb-NO.module.js.map"}
@@ -0,0 +1,7 @@
/// <reference types="node" />
import { EventEmitter } from 'events';
import { EventNames, EventListenerParameters, AbortSignal } from './types';
export interface OnceOptions {
signal?: AbortSignal;
}
export default function once<Emitter extends EventEmitter, Event extends EventNames<Emitter>>(emitter: Emitter, name: Event, { signal }?: OnceOptions): Promise<EventListenerParameters<Emitter, Event>>;
@@ -0,0 +1,23 @@
import { FormatXMLElementFn, PrimitiveType } from "intl-messageformat/src/formatters";
export type LocalizedStrings = {
[lang: string]: {
[key: string]: string;
};
};
/**
* Stores a mapping of localized strings. Can be used to find the
* closest available string for a given locale.
*/
export class MessageDictionary {
constructor(messages: LocalizedStrings, defaultLocale?: string);
getStringForLocale(key: string, locale: string): string;
}
/**
* Formats ICU Message strings to create localized strings from a MessageDictionary.
*/
export class MessageFormatter {
constructor(locale: string, messages: MessageDictionary);
format<T = void>(key: string, variables: Record<string, PrimitiveType | T | FormatXMLElementFn<T, string | T | (string | T)[]>> | undefined): string | T | (string | T)[];
}
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,64 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSortedNodes = void 0;
var constants_1 = require("../constants");
var adjust_comments_on_sorted_nodes_1 = require("./adjust-comments-on-sorted-nodes");
var get_sorted_nodes_by_import_order_1 = require("./get-sorted-nodes-by-import-order");
/**
* This function returns the given nodes, sorted in the order as indicated by
* the importOrder array. The plugin considers these import nodes as local
* import declarations
*
* In addition, this method preserves the relative order of side effect imports
* and non side effect imports. A side effect import is an ImportDeclaration
* without any import specifiers. It does this by splitting the import nodes at
* each side effect node, then sorting only the non side effect import nodes
* between the side effect nodes according to the given options.
* @param nodes All import nodes that should be sorted.
* @param options Options to influence the behavior of the sorting algorithm.
*/
var getSortedNodes = function (nodes, options) {
var importOrderSeparation = options.importOrderSeparation, importOrderSideEffects = options.importOrderSideEffects;
// Split nodes at each boundary between a side-effect node and a
// non-side-effect node, keeping both types of nodes together.
var splitBySideEffectNodes = nodes.reduce(function (chunks, node) {
var isChunkEffectNode = node.specifiers.length === 0 &&
importOrderSideEffects === false;
var type = isChunkEffectNode
? constants_1.chunkSideEffectNode
: constants_1.chunkSideOtherNode;
var last = chunks[chunks.length - 1];
if (last === undefined || last.type !== type) {
chunks.push({ type: type, nodes: [node] });
}
else {
last.nodes.push(node);
}
return chunks;
}, []);
var finalNodes = [];
// Sort each chunk of side-effect and non-side-effect nodes, and insert new
// lines according the importOrderSeparation option.
for (var _i = 0, splitBySideEffectNodes_1 = splitBySideEffectNodes; _i < splitBySideEffectNodes_1.length; _i++) {
var chunk = splitBySideEffectNodes_1[_i];
if (chunk.type === constants_1.chunkSideEffectNode) {
// do not sort side effect nodes
finalNodes.push.apply(finalNodes, chunk.nodes);
}
else {
// sort non-side effect nodes
var sorted = (0, get_sorted_nodes_by_import_order_1.getSortedNodesByImportOrder)(chunk.nodes, options);
finalNodes.push.apply(finalNodes, sorted);
}
if (importOrderSeparation) {
finalNodes.push(constants_1.newLineNode);
}
}
if (finalNodes.length > 0 && !importOrderSeparation) {
finalNodes.push(constants_1.newLineNode);
}
// Adjust the comments on the sorted nodes to match the original comments
(0, adjust_comments_on_sorted_nodes_1.adjustCommentsOnSortedNodes)(nodes, finalNodes);
return finalNodes;
};
exports.getSortedNodes = getSortedNodes;
@@ -0,0 +1,21 @@
MIT License
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,8 @@
"use strict";
/* eslint-disable @typescript-eslint/no-namespace, no-restricted-syntax */
Object.defineProperty(exports, "__esModule", { value: true });
exports.SourceCode = void 0;
const eslint_1 = require("eslint");
class SourceCode extends eslint_1.SourceCode {
}
exports.SourceCode = SourceCode;
@@ -0,0 +1 @@
{"version":3,"file":"fillEmptyArray.d.ts","sourceRoot":"","sources":["../../src/utils/fillEmptyArray.ts"],"names":[],"mappings":"yBAAgB,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,KAAG,SAAS,EAAE,GAAG,SAAS;AAA3D,wBACgE"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"Q H R S T U V W X Y Z","2":"C L M G","194":"N O P","513":"0 1 2 3 4 5 a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 0C 1C","194":"2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC","450":"HC IC JC KC LC","513":"0 1 2 3 4 5 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"},D:{"1":"BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC","194":"4B VC 5B 6B 7B 8B 9B AC","513":"0 1 2 3 4 5 a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"2":"J ZB K D E F A 2C ZC 3C 4C 5C 6C","194":"B C L M G aC NC OC 7C 8C 9C","513":"bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB FD GD HD ID NC uC JD OC","194":"sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B","513":"0 1 2 3 4 5 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"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD","194":"SD TD UD VD WD XD YD ZD aD bD cD dD","513":"bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C NC uC OC","513":"H"},L:{"513":"I"},M:{"513":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"2":"J oD pD qD rD sD aC tD uD vD wD","513":"6 7 8 9 AB BB CB DB EB FB xD QC RC SC yD"},Q:{"2":"zD"},R:{"513":"0D"},S:{"2":"1D","513":"2D"}},B:6,C:"Shared Array Buffer",D:true};
@@ -0,0 +1 @@
{"mappings":";AAYA;IACE,qCAAqC;IACrC,CAAC,EAAE,MAAM,CAAC;IAEV,qCAAqC;IACrC,CAAC,EAAE,MAAM,CAAC;gBAEE,CAAC,SAAI,EAAE,CAAC,SAAI;IAKxB;;OAEG;IACH,IAAI,IAAI,KAAK;IAIb;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAI7B;;OAEG;IACH,QAAQ,IAAI,OAAO;CAGpB;AChCD;IACE,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;gBAEH,KAAK,SAAI,EAAE,MAAM,SAAI;IAKjC;;OAEG;IACH,IAAI,IAAI,IAAI;IAIZ;;OAEG;IACH,MAAM,CAAC,KAAK,EA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,CAAC,GAAG,OAAO;IAIpE;;;;;OAKG;IACH,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC,GAAG,IAAI;IAEzD;;OAEG;IACH,cAAc,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO;IAE9C;;OAEG;IACH,uBAAuB,CAAC,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU;IAE5D,eAAe;IACf,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI;IAIlC,eAAe;IACf,cAAc,IAAI,IAAI;CAGvB;ACpFD,qCAAqC,CAAC,GAAG,GAAG;IAC1C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAALine truncated
@@ -0,0 +1,46 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Number.parseInt` method.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-number-parseint.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
sourceCode.getScope(program),
)
for (const { node, path } of tracker.iterateGlobalReferences({
Number: {
parseInt: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_default","exports","default","createTypeAnnotationBasedOnTypeof","type","stringTypeAnnotation","numberTypeAnnotation","voidTypeAnnotation","booleanTypeAnnotation","genericTypeAnnotation","identifier","anyTypeAnnotation","Error"],"sources":["../../../src/builders/flow/createTypeAnnotationBasedOnTypeof.ts"],"sourcesContent":["import {\n anyTypeAnnotation,\n stringTypeAnnotation,\n numberTypeAnnotation,\n voidTypeAnnotation,\n booleanTypeAnnotation,\n genericTypeAnnotation,\n identifier,\n} from \"../generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\nexport default createTypeAnnotationBasedOnTypeof as {\n (type: \"string\"): t.StringTypeAnnotation;\n (type: \"number\"): t.NumberTypeAnnotation;\n (type: \"undefined\"): t.VoidTypeAnnotation;\n (type: \"boolean\"): t.BooleanTypeAnnotation;\n (type: \"function\"): t.GenericTypeAnnotation;\n (type: \"object\"): t.GenericTypeAnnotation;\n (type: \"symbol\"): t.GenericTypeAnnotation;\n (type: \"bigint\"): t.AnyTypeAnnotation;\n};\n\n/**\n * Create a type annotation based on typeof expression.\n */\nfunction createTypeAnnotationBasedOnTypeof(type: string): t.FlowType {\n switch (type) {\n case \"string\":\n return stringTypeAnnotation();\n case \"number\":\n return numberTypeAnnotation();\n case \"undefined\":\n return voidTypeAnnotation();\n case \"boolean\":\n return booleanTypeAnnotation();\n case \"function\":\n return genericTypeAnnotation(identifier(\"Function\"));\n case \"object\":\n return genericTypeAnnotation(identifier(\"Object\"));\n case \"symbol\":\n return genericTypeAnnotation(identifier(\"Symbol\"));\n case \"bigint\":\n // todo: use BigInt annotation when Flow supports BigInt\n // https://github.com/facebook/flow/issues/6639\n return anyTypeAnnotation();\n }\n throw new Error(\"Invalid typeof value: \" + type);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQ+B,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAGhBC,iCAAiC;AAchD,SAASA,iCAAiCA,CAACC,IAAY,EAAc;EACnE,QAAQA,IAAI;IACV,KAAK,QAAQ;MACX,OAAO,IAAAC,2BAAoB,EAAC,CAAC;IAC/B,KAAK,QAAQ;MACX,OAAO,IAAAC,2BAAoB,EAAC,CAAC;IAC/B,KAAK,WAAW;MACd,OAAO,IAAAC,yBAAkB,EAAC,CAAC;IAC7B,KAAK,SAAS;MACZ,OAAO,IAAAC,4BAAqB,EAAC,CAAC;IAChC,KAAK,UAAU;MACb,OAAO,IAAAC,4BAAqB,EAAC,IAAAC,iBAAU,EAAC,UAAU,CAAC,CAAC;IACtD,KAAK,QAAQ;MACX,OAAO,IAAAD,4BAAqB,EAAC,IAAAC,iBAAU,EAAC,QAAQ,CAAC,CAAC;IACpD,KAAK,QAAQ;MACX,OAAO,IAAAD,4BAAqB,EAAC,IAAAC,iBAAU,EAAC,QAAQ,CAAC,CAAC;IACpD,KAAK,QAAQ;MAGX,OAAO,IAAAC,wBAAiB,EAAC,CAAC;EAC9B;EACA,MAAM,IAAIC,KAAK,CAAC,wBAAwB,GAAGR,IAAI,CAAC;AAClD","ignoreList":[]}
@@ -0,0 +1 @@
module.exports={C:{"141":0.00569,"142":0.02274,"143":0.88118,"144":1.02899,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 145 146 147 3.5 3.6"},D:{"39":0.01706,"40":0.01137,"41":0.01706,"42":0.01706,"43":0.02274,"44":0.00569,"45":0.02274,"46":0.01706,"47":0.02843,"48":0.02274,"49":0.04548,"50":0.01137,"51":0.01706,"52":0.02274,"53":0.01706,"54":0.02274,"55":0.01137,"56":0.01137,"57":0.02274,"58":0.04548,"59":0.01706,"60":0.02274,"74":0.00569,"78":0.00569,"79":0.01706,"85":0.17055,"87":0.00569,"91":0.00569,"95":0.00569,"102":0.04548,"103":0.0398,"105":0.00569,"108":0.00569,"109":0.16487,"110":0.00569,"116":0.07391,"119":0.01137,"122":0.02274,"123":0.00569,"125":17.85659,"126":0.02843,"128":0.10802,"129":0.02843,"131":0.01706,"132":0.00569,"133":0.03411,"135":0.02843,"136":0.03411,"137":0.34679,"138":0.27857,"139":0.29562,"140":3.82032,"141":9.40868,"142":0.24446,"143":0.02843,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 66 67 68 69 70 71 72 73 75 76 77 80 81 83 84 86 88 89 90 92 93 94 96 97 98 99 100 101 104 106 107 111 112 113 114 115 117 118 120 121 124 127 130 134 144 145"},F:{"63":0.00569,"92":0.01706,"120":0.05117,"121":0.07391,"122":2.17167,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00569,"100":0.00569,"109":0.00569,"114":0.03411,"131":0.01706,"134":0.00569,"137":0.00569,"138":0.01137,"139":0.08528,"140":0.78453,"141":4.34334,"142":0.00569,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 132 133 135 136"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 13.1 14.1 15.1 15.4 15.5 16.0 16.3 16.5 17.0 17.3 18.2 26.2","12.1":0.00569,"15.2-15.3":0.00569,"15.6":5.24157,"16.1":0.00569,"16.2":0.0398,"16.4":0.00569,"16.6":0.04548,"17.1":0.05685,"17.2":0.00569,"17.4":0.01137,"17.5":0.01706,"17.6":0.23309,"18.0":0.00569,"18.1":0.01137,"18.3":0.13076,"18.4":0.00569,"18.5-18.6":0.36384,"26.0":0.70494,"26.1":0.01137},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00081,"5.0-5.1":0,"6.0-6.1":0.00324,"7.0-7.1":0.00243,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00729,"10.0-10.2":0.00081,"10.3":0.01376,"11.0-11.2":0.20399,"11.3-11.4":0.00486,"12.0-12.1":0.00162,"12.2-12.5":0.03967,"13.0-13.1":0,"13.2":0.00405,"13.3":0.00162,"13.4-13.7":0.00648,"14.0-14.4":0.01376,"14.5-14.8":0.01457,"15.0-15.1":0.01376,"15.2-15.3":0.01052,"15.4":0.01214,"15.5":0.01376,"15.6-15.8":0.17971,"16.0":0.02428,"16.1":0.04533,"16.2":0.02348,"16.3":0.04209,"16.4":0.01052,"16.5":0.01862,"16.6-16.7":0.24042,"17.0":0.017,"17.1":0.0259,"17.2":0.01862,"17.3":0.02752,"17.4":0.04857,"17.5":0.08338,"17.6-17.7":0.21047,"18.0":0.04776,"18.1":0.09876,"18.2":0.05343,"18.3":0.17161,"18.4":0.08823,"18.5-18.6":4.49917,"26.0":0.55612,"26.1":0.02024},P:{"4":0.05389,"22":0.02156,"25":0.04311,"26":0.01078,"27":0.01078,"28":2.05851,"29":0.11855,_:"20 21 23 24 5.0-5.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","6.2-6.4":0.01078,"7.2-7.4":0.01078},I:{"0":0.02585,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.26753,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.00569,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.02589},Q:{_:"14.9"},O:{"0":0.00432},H:{"0":0},L:{"0":37.10195}};
@@ -0,0 +1,50 @@
"use client";
import {
AvatarIcon
} from "./chunk-25E6VDTZ.mjs";
import {
useAvatar
} from "./chunk-LTC67JRI.mjs";
// src/avatar.tsx
import { useMemo } from "react";
import { forwardRef } from "@heroui/system";
import { jsx, jsxs } from "react/jsx-runtime";
var Avatar = forwardRef((props, ref) => {
const {
Component,
ImgComponent,
src,
icon = /* @__PURE__ */ jsx(AvatarIcon, {}),
alt,
classNames,
slots,
name,
showFallback,
fallback: fallbackComponent,
getInitials,
getAvatarProps,
getImageProps
} = useAvatar({
...props,
ref
});
const fallback = useMemo(() => {
if (!showFallback && src)
return null;
if (fallbackComponent) {
return /* @__PURE__ */ jsx("div", { "aria-label": alt, className: slots.fallback({ class: classNames == null ? void 0 : classNames.fallback }), role: "img", children: fallbackComponent });
}
return name ? /* @__PURE__ */ jsx("span", { "aria-label": alt, className: slots.name({ class: classNames == null ? void 0 : classNames.name }), role: "img", children: getInitials(name) }) : /* @__PURE__ */ jsx("span", { "aria-label": alt, className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }), role: "img", children: icon });
}, [showFallback, src, fallbackComponent, name, classNames]);
return /* @__PURE__ */ jsxs(Component, { ...getAvatarProps(), children: [
src && /* @__PURE__ */ jsx(ImgComponent, { ...getImageProps(), alt }),
fallback
] });
});
Avatar.displayName = "HeroUI.Avatar";
var avatar_default = Avatar;
export {
avatar_default
};
@@ -0,0 +1,270 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
formatVariantSelector: function() {
return formatVariantSelector;
},
eliminateIrrelevantSelectors: function() {
return eliminateIrrelevantSelectors;
},
finalizeSelector: function() {
return finalizeSelector;
},
handleMergePseudo: function() {
return handleMergePseudo;
}
});
const _postcssselectorparser = /*#__PURE__*/ _interop_require_default(require("postcss-selector-parser"));
const _unesc = /*#__PURE__*/ _interop_require_default(require("postcss-selector-parser/dist/util/unesc"));
const _escapeClassName = /*#__PURE__*/ _interop_require_default(require("../util/escapeClassName"));
const _prefixSelector = /*#__PURE__*/ _interop_require_default(require("../util/prefixSelector"));
const _pseudoElements = require("./pseudoElements");
const _splitAtTopLevelOnly = require("./splitAtTopLevelOnly");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
/** @typedef {import('postcss-selector-parser').Root} Root */ /** @typedef {import('postcss-selector-parser').Selector} Selector */ /** @typedef {import('postcss-selector-parser').Pseudo} Pseudo */ /** @typedef {import('postcss-selector-parser').Node} Node */ /** @typedef {{format: string, respectPrefix: boolean}[]} RawFormats */ /** @typedef {import('postcss-selector-parser').Root} ParsedFormats */ /** @typedef {RawFormats | ParsedFormats} AcceptedFormats */ let MERGE = ":merge";
function formatVariantSelector(formats, { context , candidate }) {
var _context_tailwindConfig_prefix;
let prefix = (_context_tailwindConfig_prefix = context === null || context === void 0 ? void 0 : context.tailwindConfig.prefix) !== null && _context_tailwindConfig_prefix !== void 0 ? _context_tailwindConfig_prefix : "";
// Parse the format selector into an AST
let parsedFormats = formats.map((format)=>{
let ast = (0, _postcssselectorparser.default)().astSync(format.format);
return {
...format,
ast: format.respectPrefix ? (0, _prefixSelector.default)(prefix, ast) : ast
};
});
// We start with the candidate selector
let formatAst = _postcssselectorparser.default.root({
nodes: [
_postcssselectorparser.default.selector({
nodes: [
_postcssselectorparser.default.className({
value: (0, _escapeClassName.default)(candidate)
})
]
})
]
});
// And iteratively merge each format selector into the candidate selector
for (let { ast } of parsedFormats){
[formatAst, ast] = handleMergePseudo(formatAst, ast);
// 2. Merge the format selector into the current selector AST
ast.walkNesting((nesting)=>nesting.replaceWith(...formatAst.nodes[0].nodes));
// 3. Keep going!
formatAst = ast;
}
return formatAst;
}
/**
* Given any node in a selector this gets the "simple" selector it's a part of
* A simple selector is just a list of nodes without any combinators
* Technically :is(), :not(), :has(), etc… can have combinators but those are nested
* inside the relevant node and won't be picked up so they're fine to ignore
*
* @param {Node} node
* @returns {Node[]}
**/ function simpleSelectorForNode(node) {
/** @type {Node[]} */ let nodes = [];
// Walk backwards until we hit a combinator node (or the start)
while(node.prev() && node.prev().type !== "combinator"){
node = node.prev();
}
// Now record all non-combinator nodes until we hit one (or the end)
while(node && node.type !== "combinator"){
nodes.push(node);
node = node.next();
}
return nodes;
}
/**
* Resorts the nodes in a selector to ensure they're in the correct order
* Tags go before classes, and pseudo classes go after classes
*
* @param {Selector} sel
* @returns {Selector}
**/ function resortSelector(sel) {
sel.sort((a, b)=>{
if (a.type === "tag" && b.type === "class") {
return -1;
} else if (a.type === "class" && b.type === "tag") {
return 1;
} else if (a.type === "class" && b.type === "pseudo" && b.value.startsWith("::")) {
return -1;
} else if (a.type === "pseudo" && a.value.startsWith("::") && b.type === "class") {
return 1;
}
return sel.index(a) - sel.index(b);
});
return sel;
}
function eliminateIrrelevantSelectors(sel, base) {
let hasClassesMatchingCandidate = false;
sel.walk((child)=>{
if (child.type === "class" && child.value === base) {
hasClassesMatchingCandidate = true;
return false // Stop walking
;
}
});
if (!hasClassesMatchingCandidate) {
sel.remove();
}
// We do NOT recursively eliminate sub selectors that don't have the base class
// as this is NOT a safe operation. For example, if we have:
// `.space-x-2 > :not([hidden]) ~ :not([hidden])`
// We cannot remove the [hidden] from the :not() because it would change the
// meaning of the selector.
// TODO: Can we do this for :matches, :is, and :where?
}
function finalizeSelector(current, formats, { context , candidate , base }) {
var _context_tailwindConfig;
var _context_tailwindConfig_separator;
let separator = (_context_tailwindConfig_separator = context === null || context === void 0 ? void 0 : (_context_tailwindConfig = context.tailwindConfig) === null || _context_tailwindConfig === void 0 ? void 0 : _context_tailwindConfig.separator) !== null && _context_tailwindConfig_separator !== void 0 ? _context_tailwindConfig_separator : ":";
// Split by the separator, but ignore the separator inside square brackets:
//
// E.g.: dark:lg:hover:[paint-order:markers]
// ┬ ┬ ┬ ┬
// │ │ │ ╰── We will not split here
// ╰──┴─────┴─────────────── We will split here
//
base = base !== null && base !== void 0 ? base : (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(candidate, separator).pop();
// Parse the selector into an AST
let selector = (0, _postcssselectorparser.default)().astSync(current);
// Normalize escaped classes, e.g.:
//
// The idea would be to replace the escaped `base` in the selector with the
// `format`. However, in css you can escape the same selector in a few
// different ways. This would result in different strings and therefore we
// can't replace it properly.
//
// base: bg-[rgb(255,0,0)]
// base in selector: bg-\\[rgb\\(255\\,0\\,0\\)\\]
// escaped base: bg-\\[rgb\\(255\\2c 0\\2c 0\\)\\]
//
selector.walkClasses((node)=>{
if (node.raws && node.value.includes(base)) {
node.raws.value = (0, _escapeClassName.default)((0, _unesc.default)(node.raws.value));
}
});
// Remove extraneous selectors that do not include the base candidate
selector.each((sel)=>eliminateIrrelevantSelectors(sel, base));
// If ffter eliminating irrelevant selectors, we end up with nothing
// Then the whole "rule" this is associated with does not need to exist
// We use `null` as a marker value for that case
if (selector.length === 0) {
return null;
}
// If there are no formats that means there were no variants added to the candidate
// so we can just return the selector as-is
let formatAst = Array.isArray(formats) ? formatVariantSelector(formats, {
context,
candidate
}) : formats;
if (formatAst === null) {
return selector.toString();
}
let simpleStart = _postcssselectorparser.default.comment({
value: "/*__simple__*/"
});
let simpleEnd = _postcssselectorparser.default.comment({
value: "/*__simple__*/"
});
// We can safely replace the escaped base now, since the `base` section is
// now in a normalized escaped value.
selector.walkClasses((node)=>{
if (node.value !== base) {
return;
}
let parent = node.parent;
let formatNodes = formatAst.nodes[0].nodes;
// Perf optimization: if the parent is a single class we can just replace it and be done
if (parent.nodes.length === 1) {
node.replaceWith(...formatNodes);
return;
}
let simpleSelector = simpleSelectorForNode(node);
parent.insertBefore(simpleSelector[0], simpleStart);
parent.insertAfter(simpleSelector[simpleSelector.length - 1], simpleEnd);
for (let child of formatNodes){
parent.insertBefore(simpleSelector[0], child.clone());
}
node.remove();
// Re-sort the simple selector to ensure it's in the correct order
simpleSelector = simpleSelectorForNode(simpleStart);
let firstNode = parent.index(simpleStart);
parent.nodes.splice(firstNode, simpleSelector.length, ...resortSelector(_postcssselectorparser.default.selector({
nodes: simpleSelector
})).nodes);
simpleStart.remove();
simpleEnd.remove();
});
// Remove unnecessary pseudo selectors that we used as placeholders
selector.walkPseudos((p)=>{
if (p.value === MERGE) {
p.replaceWith(p.nodes);
}
});
// Move pseudo elements to the end of the selector (if necessary)
selector.each((sel)=>(0, _pseudoElements.movePseudos)(sel));
return selector.toString();
}
function handleMergePseudo(selector, format) {
/** @type {{pseudo: Pseudo, value: string}[]} */ let merges = [];
// Find all :merge() pseudo-classes in `selector`
selector.walkPseudos((pseudo)=>{
if (pseudo.value === MERGE) {
merges.push({
pseudo,
value: pseudo.nodes[0].toString()
});
}
});
// Find all :merge() "attachments" in `format` and attach them to the matching selector in `selector`
format.walkPseudos((pseudo)=>{
if (pseudo.value !== MERGE) {
return;
}
let value = pseudo.nodes[0].toString();
// Does `selector` contain a :merge() pseudo-class with the same value?
let existing = merges.find((merge)=>merge.value === value);
// Nope so there's nothing to do
if (!existing) {
return;
}
// Everything after `:merge()` up to the next combinator is what is attached to the merged selector
let attachments = [];
let next = pseudo.next();
while(next && next.type !== "combinator"){
attachments.push(next);
next = next.next();
}
let combinator = next;
existing.pseudo.parent.insertAfter(existing.pseudo, _postcssselectorparser.default.selector({
nodes: attachments.map((node)=>node.clone())
}));
pseudo.remove();
attachments.forEach((node)=>node.remove());
// What about this case:
// :merge(.group):focus > &
// :merge(.group):hover &
if (combinator && combinator.type === "combinator") {
combinator.remove();
}
});
return [
selector,
format
];
}
@@ -0,0 +1,69 @@
"use client";
import {
menu_section_default
} from "./chunk-SYFLXYW3.mjs";
import {
menu_item_default
} from "./chunk-6GUQKX6L.mjs";
import {
useMenu
} from "./chunk-O3ZSXC63.mjs";
// src/menu.tsx
import { forwardRef } from "@heroui/system";
import { mergeClasses } from "@heroui/theme";
import { jsx, jsxs } from "react/jsx-runtime";
var Menu = forwardRef(function Menu2(props, ref) {
const {
Component,
state,
closeOnSelect,
color,
disableAnimation,
hideSelectedIcon,
hideEmptyContent,
variant,
onClose,
topContent,
bottomContent,
itemClasses,
getBaseProps,
getListProps,
getEmptyContentProps
} = useMenu({ ...props, ref });
const content = /* @__PURE__ */ jsxs(Component, { ...getListProps(), children: [
!state.collection.size && !hideEmptyContent && /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("div", { ...getEmptyContentProps() }) }),
[...state.collection].map((item) => {
const itemProps = {
closeOnSelect,
color,
disableAnimation,
item,
state,
variant,
onClose,
hideSelectedIcon,
...item.props
};
const mergedItemClasses = mergeClasses(itemClasses, itemProps == null ? void 0 : itemProps.classNames);
if (item.type === "section") {
return /* @__PURE__ */ jsx(menu_section_default, { ...itemProps, itemClasses: mergedItemClasses }, item.key);
}
let menuItem = /* @__PURE__ */ jsx(menu_item_default, { ...itemProps, classNames: mergedItemClasses }, item.key);
if (item.wrapper) {
menuItem = item.wrapper(menuItem);
}
return menuItem;
})
] });
return /* @__PURE__ */ jsxs("div", { ...getBaseProps(), children: [
topContent,
content,
bottomContent
] });
});
var menu_default = Menu;
export {
menu_default
};
@@ -0,0 +1 @@
{"0.20":"39","0.21":"41","0.22":"41","0.23":"41","0.24":"41","0.25":"42","0.26":"42","0.27":"43","0.28":"43","0.29":"43","0.30":"44","0.31":"45","0.32":"45","0.33":"45","0.34":"45","0.35":"45","0.36":"47","0.37":"49","1.0":"49","1.1":"50","1.2":"51","1.3":"52","1.4":"53","1.5":"54","1.6":"56","1.7":"58","1.8":"59","2.0":"61","2.1":"61","3.0":"66","3.1":"66","4.0":"69","4.1":"69","4.2":"69","5.0":"73","6.0":"76","6.1":"76","7.0":"78","7.1":"78","7.2":"78","7.3":"78","8.0":"80","8.1":"80","8.2":"80","8.3":"80","8.4":"80","8.5":"80","9.0":"83","9.1":"83","9.2":"83","9.3":"83","9.4":"83","10.0":"85","10.1":"85","10.2":"85","10.3":"85","10.4":"85","11.0":"87","11.1":"87","11.2":"87","11.3":"87","11.4":"87","11.5":"87","12.0":"89","12.1":"89","12.2":"89","13.0":"91","13.1":"91","13.2":"91","13.3":"91","13.4":"91","13.5":"91","13.6":"91","14.0":"93","14.1":"93","14.2":"93","15.0":"94","15.1":"94","15.2":"94","15.3":"94","15.4":"94","15.5":"94","16.0":"96","16.1":"96","16.2":"96","17.0":"98","17.1":"98","17.2":"98","17.3":"98","17.4":"98","18.0":"100","18.1":"100","18.2":"100","18.3":"100","19.0":"102","19.1":"102","20.0":"104","20.1":"104","20.2":"104","20.3":"104","21.0":"106","21.1":"106","21.2":"106","21.3":"106","21.4":"106","22.0":"108","22.1":"108","22.2":"108","22.3":"108","23.0":"110","23.1":"110","23.2":"110","23.3":"110","24.0":"112","24.1":"112","24.2":"112","24.3":"112","24.4":"112","24.5":"112","24.6":"112","24.7":"112","24.8":"112","25.0":"114","25.1":"114","25.2":"114","25.3":"114","25.4":"114","25.5":"114","25.6":"114","25.7":"114","25.8":"114","25.9":"114","26.0":"116","26.1":"116","26.2":"116","26.3":"116","26.4":"116","26.5":"116","26.6":"116","27.0":"118","27.1":"118","27.2":"118","27.3":"118","28.0":"120","28.1":"120","28.2":"120","28.3":"120","29.0":"122","29.1":"122","29.2":"122","29.3":"122","29.4":"122","30.0":"124","30.1":"124","30.2":"124","30.3":"124","30.4":"124","30.5":"124","31.0":"126","31.1":"126","31.2":"126","31.3":"126","31.4":"126","31.5":"126","31.6":"126","31.7":"126","32.0":"128","32.1":"128","32.2":"128","32.3":"128","33.0":"130","33.1":"130","33.2":"130","33.3":"130","33.4":"130","34.0":"132","34.1":"132","34.2":"132","34.3":"132","34.4":"132","34.5":"132","35.0":"134","35.1":"134","35.2":"134","35.3":"134","35.4":"134","35.5":"134","35.6":"134","35.7":"134","36.0":"136","36.1":"136","36.2":"136","36.3":"136","36.4":"136","36.5":"136","36.6":"136","36.7":"136","36.8":"136","36.9":"136","37.0":"138","37.1":"138","37.2":"138","37.3":"138","37.4":"138","37.5":"138","37.6":"138","37.7":"138","37.8":"138","37.9":"138","38.0":"140","38.1":"140","38.2":"140","38.3":"140","38.4":"140","38.5":"140","38.6":"140","39.0":"142","39.1":"142","40.0":"144"}
@@ -0,0 +1,2 @@
export const mimes: Record<string, string>;
export function lookup(extension: string): string | undefined;
@@ -0,0 +1,785 @@
<h1>
<img src="https://raw.githubusercontent.com/vfile/vfile/fc8164b/logo.svg?sanitize=true" alt="vfile" />
</h1>
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
**vfile** is a small and browser friendly virtual file format that tracks
metadata about files (such as its `path` and `value`) and lint
[messages][api-vfile-messages].
## Contents
* [unified](#unified)
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`VFile(options?)`](#vfileoptions)
* [`file.cwd`](#filecwd)
* [`file.data`](#filedata)
* [`file.history`](#filehistory)
* [`file.messages`](#filemessages)
* [`file.value`](#filevalue)
* [`file.basename`](#filebasename)
* [`file.dirname`](#filedirname)
* [`file.extname`](#fileextname)
* [`file.path`](#filepath)
* [`file.stem`](#filestem)
* [`VFile#fail(reason[, options])`](#vfilefailreason-options)
* [`VFile#info(reason[, options])`](#vfileinforeason-options)
* [`VFile#message(reason[, options])`](#vfilemessagereason-options)
* [`VFile#toString(encoding?)`](#vfiletostringencoding)
* [`Compatible`](#compatible)
* [`Data`](#data)
* [`DataMap`](#datamap)
* [`Map`](#map)
* [`MessageOptions`](#messageoptions)
* [`Options`](#options)
* [`Reporter`](#reporter)
* [`ReporterSettings`](#reportersettings)
* [`Value`](#value)
* [Well-known](#well-known)
* [List of utilities](#list-of-utilities)
* [Reporters](#reporters)
* [Types](#types)
* [Compatibility](#compatibility)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [Acknowledgments](#acknowledgments)
* [License](#license)
## unified
**vfile** is part of the unified collective.
* for more about us, see [`unifiedjs.com`][site]
* for how the collective is governed, see [`unifiedjs/collective`][governance]
* for updates, see [@unifiedjs][twitter] on Twitter
## What is this?
This package provides a virtual file format.
It exposes an API to access the file value, path, metadata about the file, and
specifically supports attaching lint messages and errors to certain places in
these files.
## When should I use this?
The virtual file format is useful when dealing with the concept of files in
places where you might not be able to access the file system.
The message API is particularly useful when making things that check files (as
in, linting).
vfile is made for [unified][], which amongst other things checks files.
However, vfile can be used in other projects that deal with parsing,
transforming, and serializing data, to build linters, compilers, static site
generators, and other build tools.
This is different from the excellent [`vinyl`][vinyl] in that vfile has a
smaller API, a smaller size, and focuses on messages.
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install vfile
```
In Deno with [`esm.sh`][esmsh]:
```js
import {VFile} from 'https://esm.sh/vfile@6'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {VFile} from 'https://esm.sh/vfile@6?bundle'
</script>
```
## Use
```js
import {VFile} from 'vfile'
const file = new VFile({
path: '~/example.txt',
value: 'Alpha *braavo* charlie.'
})
console.log(file.path) // => '~/example.txt'
console.log(file.dirname) // => '~'
file.extname = '.md'
console.log(file.basename) // => 'example.md'
file.basename = 'index.text'
console.log(file.history) // => ['~/example.txt', '~/example.md', '~/index.text']
file.message('Unexpected unknown word `braavo`, did you mean `bravo`?', {
place: {line: 1, column: 8},
source: 'spell',
ruleId: 'typo'
})
console.log(file.messages)
```
Yields:
```txt
[
[~/index.text:1:8: Unexpected unknown word `braavo`, did you mean `bravo`?] {
ancestors: undefined,
cause: undefined,
column: 8,
fatal: false,
line: 1,
place: { line: 1, column: 8 },
reason: 'Unexpected unknown word `braavo`, did you mean `bravo`?',
ruleId: 'typo',
source: 'spell',
file: '~/index.text'
}
]
```
## API
This package exports the identifier [`VFile`][api-vfile].
There is no default export.
### `VFile(options?)`
Create a new virtual file.
`options` is treated as:
* `string` or [`Uint8Array`][mdn-uint8-array] — `{value: options}`
* `URL` — `{path: options}`
* `VFile` — shallow copies its data over to the new file
* `object` — all fields are shallow copied over to the new file
Path related fields are set in the following order (least specific to
most specific): `history`, `path`, `basename`, `stem`, `extname`,
`dirname`.
You cannot set `dirname` or `extname` without setting either `history`,
`path`, `basename`, or `stem` too.
###### Parameters
* `options` ([`Compatible`][api-compatible], optional)
— file value
###### Returns
New instance (`VFile`).
###### Example
```js
new VFile()
new VFile('console.log("alpha");')
new VFile(new Uint8Array([0x65, 0x78, 0x69, 0x74, 0x20, 0x31]))
new VFile({path: path.join('path', 'to', 'readme.md')})
new VFile({stem: 'readme', extname: '.md', dirname: path.join('path', 'to')})
new VFile({other: 'properties', are: 'copied', ov: {e: 'r'}})
```
### `file.cwd`
Base of `path` (`string`, default: `process.cwd()` or `'/'` in browsers).
### `file.data`
Place to store custom info (`Record<string, unknown>`, default: `{}`).
It’s OK to store custom data directly on the file but moving it to `data` is
recommended.
### `file.history`
List of file paths the file moved between (`Array<string>`).
The first is the original path and the last is the current path.
### `file.messages`
List of messages associated with the file
([`Array<VFileMessage>`][api-vfile-message]).
### `file.value`
Raw value ([`Uint8Array`][mdn-uint8-array], `string`, `undefined`).
### `file.basename`
Get or set the basename (including extname) (`string?`, example: `'index.min.js'`).
Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'` on
windows).
Cannot be nullified (use `file.path = file.dirname` instead).
### `file.dirname`
Get or set the parent path (`string?`, example: `'~'`).
Cannot be set if there’s no `path` yet.
### `file.extname`
Get or set the extname (including dot) (`string?`, example: `'.js'`).
Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'` on
windows).
Cannot be set if there’s no `path` yet.
### `file.path`
Get or set the full path (`string?`, example: `'~/index.min.js'`).
Cannot be nullified.
You can set a file URL (a `URL` object with a `file:` protocol) which will be
turned into a path with [`url.fileURLToPath`][file-url-to-path].
### `file.stem`
Get or set the stem (basename w/o extname) (`string?`, example: `'index.min'`).
Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'` on
windows).
Cannot be nullified.
### `VFile#fail(reason[, options])`
Create a fatal message for `reason` associated with the file.
The `fatal` field of the message is set to `true` (error; file not usable) and
the `file` field is set to the current file path.
The message is added to the `messages` field on `file`.
> 🪦 **Note**: also has obsolete signatures.
###### Parameters
* `reason` (`string`)
— reason for message, should use markdown
* `options` ([`MessageOptions`][api-message-options], optional)
— configuration
###### Returns
Nothing (`never`).
###### Throws
Message ([`VFileMessage`][vmessage]).
### `VFile#info(reason[, options])`
Create an info message for `reason` associated with the file.
The `fatal` field of the message is set to `undefined` (info; change likely not
needed) and the `file` field is set to the current file path.
The message is added to the `messages` field on `file`.
> 🪦 **Note**: also has obsolete signatures.
###### Parameters
* `reason` (`string`)
— reason for message, should use markdown
* `options` ([`MessageOptions`][api-message-options], optional)
— configuration
###### Returns
Message ([`VFileMessage`][vmessage]).
### `VFile#message(reason[, options])`
Create a message for `reason` associated with the file.
The `fatal` field of the message is set to `false` (warning; change may be
needed) and the `file` field is set to the current file path.
The message is added to the `messages` field on `file`.
> 🪦 **Note**: also has obsolete signatures.
###### Parameters
* `reason` (`string`)
— reason for message, should use markdown
* `options` ([`MessageOptions`][api-message-options], optional)
— configuration
###### Returns
Message ([`VFileMessage`][vmessage]).
### `VFile#toString(encoding?)`
Serialize the file.
> **Note**: which encodings are supported depends on the engine.
> For info on Node.js, see:
> <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
###### Parameters
* `encoding` (`string`, default: `'utf8'`)
— character encoding to understand `value` as when it’s a
[`Uint8Array`][mdn-uint8-array]
###### Returns
Serialized file (`string`).
### `Compatible`
Things that can be passed to the constructor (TypeScript type).
###### Type
```ts
type Compatible = Options | URL | VFile | Value
```
### `Data`
Custom info (TypeScript type).
Known attributes can be added to [`DataMap`][api-data-map].
###### Type
```ts
type Data = Record<string, unknown> & Partial<DataMap>
```
### `DataMap`
This map registers the type of the `data` key of a `VFile` (TypeScript type).
This type can be augmented to register custom `data` types.
###### Type
```ts
interface DataMap {}
```
###### Example
```ts
declare module 'vfile' {
interface DataMap {
// `file.data.name` is typed as `string`
name: string
}
}
```
### `Map`
Raw source map (TypeScript type).
See [`source-map`][source-map].
###### Fields
* `version` (`number`)
— which version of the source map spec this map is following
* `sources` (`Array<string>`)
— an array of URLs to the original source files
* `names` (`Array<string>`)
— an array of identifiers which can be referenced by individual mappings
* `sourceRoot` (`string`, optional)
— the URL root from which all sources are relative
* `sourcesContent` (`Array<string>`, optional)
— an array of contents of the original source files
* `mappings` (`string`)
— a string of base64 VLQs which contain the actual mappings
* `file` (`string`)
— the generated file this source map is associated with
### `MessageOptions`
Options to create messages (TypeScript type).
See [`Options` in `vfile-message`][vfile-message-options].
### `Options`
An object with arbitrary fields and the following known fields (TypeScript
type).
###### Fields
* `basename` (`string`, optional)
— set `basename` (name)
* `cwd` (`string`, optional)
— set `cwd` (working directory)
* `data` ([`Data`][api-data], optional)
— set `data` (associated info)
* `dirname` (`string`, optional)
— set `dirname` (path w/o basename)
* `extname` (`string`, optional)
— set `extname` (extension with dot)
* `history` (`Array<string>`, optional)
— set `history` (paths the file moved between)
* `path` (`URL | string`, optional)
— set `path` (current path)
* `stem` (`string`, optional)
— set `stem` (name without extension)
* `value` ([`Value`][api-value], optional)
— set `value` (the contents of the file)
### `Reporter`
Type for a reporter (TypeScript type).
###### Type
```ts
type Reporter<Settings = ReporterSettings> = (
files: Array<VFile>,
options: Settings
) => string
```
### `ReporterSettings`
Configuration for reporters (TypeScript type).
###### Type
```ts
type ReporterSettings = Record<string, unknown>
```
### `Value`
Contents of the file (TypeScript type).
Can either be text or a [`Uint8Array`][mdn-uint8-array] structure.
###### Type
```ts
type Value = Uint8Array | string
```
### Well-known
The following fields are considered “non-standard”, but they are allowed, and
some utilities use them:
* `map` ([`Map`][api-map])
— source map; this type is equivalent to the `RawSourceMap` type from the
`source-map` module
* `result` (`unknown`)
— custom, non-string, compiled, representation; this is used by unified to
store non-string results; one example is when turning markdown into React
nodes
* `stored` (`boolean`)
— whether a file was saved to disk; this is used by vfile reporters
There are also well-known fields on messages, see
[them in a similar section of
`vfile-message`](https://github.com/vfile/vfile-message#well-known).
<a name="utilities"></a>
## List of utilities
* [`convert-vinyl-to-vfile`](https://github.com/dustinspecker/convert-vinyl-to-vfile)
— transform from [Vinyl][]
* [`to-vfile`](https://github.com/vfile/to-vfile)
— create a file from a file path and read and write to the file system
* [`vfile-find-down`](https://github.com/vfile/vfile-find-down)
— find files by searching the file system downwards
* [`vfile-find-up`](https://github.com/vfile/vfile-find-up)
— find files by searching the file system upwards
* [`vfile-glob`](https://github.com/shinnn/vfile-glob)
— find files by glob patterns
* [`vfile-is`](https://github.com/vfile/vfile-is)
— check if a file passes a test
* [`vfile-location`](https://github.com/vfile/vfile-location)
— convert between positional and offset locations
* [`vfile-matter`](https://github.com/vfile/vfile-matter)
— parse the YAML front matter
* [`vfile-message`](https://github.com/vfile/vfile-message)
— create a file message
* [`vfile-messages-to-vscode-diagnostics`](https://github.com/shinnn/vfile-messages-to-vscode-diagnostics)
— transform file messages to VS Code diagnostics
* [`vfile-mkdirp`](https://github.com/vfile/vfile-mkdirp)
— make sure the directory of a file exists on the file system
* [`vfile-rename`](https://github.com/vfile/vfile-rename)
— rename the path parts of a file
* [`vfile-sort`](https://github.com/vfile/vfile-sort)
— sort messages by line/column
* [`vfile-statistics`](https://github.com/vfile/vfile-statistics)
— count messages per category: failures, warnings, etc
* [`vfile-to-eslint`](https://github.com/vfile/vfile-to-eslint)
— convert to ESLint formatter compatible output
> 👉 **Note**: see [unist][] for projects that work with nodes.
## Reporters
* [`vfile-reporter`][reporter]
— create a report
* [`vfile-reporter-json`](https://github.com/vfile/vfile-reporter-json)
— create a JSON report
* [`vfile-reporter-folder-json`](https://github.com/vfile/vfile-reporter-folder-json)
— create a JSON representation of vfiles
* [`vfile-reporter-pretty`](https://github.com/vfile/vfile-reporter-pretty)
— create a pretty report
* [`vfile-reporter-junit`](https://github.com/kellyselden/vfile-reporter-junit)
— create a jUnit report
* [`vfile-reporter-position`](https://github.com/Hocdoc/vfile-reporter-position)
— create a report with content excerpts
> 👉 **Note**: want to make your own reporter?
> Reporters *must* accept `Array<VFile>` as their first argument, and return
> `string`.
> Reporters *may* accept other values too, in which case it’s suggested to stick
> to `vfile-reporter`s interface.
## Types
This package is fully typed with [TypeScript][].
It exports the additional types
[`Compatible`][api-compatible],
[`Data`][api-data],
[`DataMap`][api-data-map],
[`Map`][api-map],
[`MessageOptions`][api-message-options],
[`Options`][api-options],
[`Reporter`][api-reporter],
[`ReporterSettings`][api-reporter-settings], and
[`Value`][api-value].
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, `vfile@^6`,
compatible with Node.js 16.
## Contribute
See [`contributing.md`][contributing] in [`vfile/.github`][health] for ways to
get started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.
## Sponsor
Support this effort and give back by sponsoring on [OpenCollective][collective]!
<table>
<tr valign="middle">
<td width="20%" align="center" rowspan="2" colspan="2">
<a href="https://vercel.com">Vercel</a><br><br>
<a href="https://vercel.com"><img src="https://avatars1.githubusercontent.com/u/14985020?s=256&v=4" width="128"></a>
</td>
<td width="20%" align="center" rowspan="2" colspan="2">
<a href="https://motif.land">Motif</a><br><br>
<a href="https://motif.land"><img src="https://avatars1.githubusercontent.com/u/74457950?s=256&v=4" width="128"></a>
</td>
<td width="20%" align="center" rowspan="2" colspan="2">
<a href="https://www.hashicorp.com">HashiCorp</a><br><br>
<a href="https://www.hashicorp.com"><img src="https://avatars1.githubusercontent.com/u/761456?s=256&v=4" width="128"></a>
</td>
<td width="20%" align="center" rowspan="2" colspan="2">
<a href="https://www.gitbook.com">GitBook</a><br><br>
<a href="https://www.gitbook.com"><img src="https://avatars1.githubusercontent.com/u/7111340?s=256&v=4" width="128"></a>
</td>
<td width="20%" align="center" rowspan="2" colspan="2">
<a href="https://www.gatsbyjs.org">Gatsby</a><br><br>
<a href="https://www.gatsbyjs.org"><img src="https://avatars1.githubusercontent.com/u/12551863?s=256&v=4" width="128"></a>
</td>
</tr>
<tr valign="middle">
</tr>
<tr valign="middle">
<td width="20%" align="center" rowspan="2" colspan="2">
<a href="https://www.netlify.com">Netlify</a><br><br>
<!--OC has a sharper image-->
<a href="https://www.netlify.com"><img src="https://images.opencollective.com/netlify/4087de2/logo/256.png" width="128"></a>
</td>
<td width="10%" align="center">
<a href="https://www.coinbase.com">Coinbase</a><br><br>
<a href="https://www.coinbase.com"><img src="https://avatars1.githubusercontent.com/u/1885080?s=256&v=4" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://themeisle.com">ThemeIsle</a><br><br>
<a href="https://themeisle.com"><img src="https://avatars1.githubusercontent.com/u/58979018?s=128&v=4" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://expo.io">Expo</a><br><br>
<a href="https://expo.io"><img src="https://avatars1.githubusercontent.com/u/12504344?s=128&v=4" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://boostnote.io">Boost Note</a><br><br>
<a href="https://boostnote.io"><img src="https://images.opencollective.com/boosthub/6318083/logo/128.png" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://markdown.space">Markdown Space</a><br><br>
<a href="https://markdown.space"><img src="https://images.opencollective.com/markdown-space/e1038ed/logo/128.png" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://www.holloway.com">Holloway</a><br><br>
<a href="https://www.holloway.com"><img src="https://avatars1.githubusercontent.com/u/35904294?s=128&v=4" width="64"></a>
</td>
<td width="10%"></td>
<td width="10%"></td>
</tr>
<tr valign="middle">
<td width="100%" align="center" colspan="8">
<br>
<a href="https://opencollective.com/unified"><strong>You?</strong></a>
<br><br>
</td>
</tr>
</table>
## Acknowledgments
The initial release of this project was authored by
[**@wooorm**](https://github.com/wooorm).
Thanks to [**@contra**](https://github.com/contra),
[**@phated**](https://github.com/phated), and others for their work on
[Vinyl][], which was a huge inspiration.
Thanks to
[**@brendo**](https://github.com/brendo),
[**@shinnn**](https://github.com/shinnn),
[**@KyleAMathews**](https://github.com/KyleAMathews),
[**@sindresorhus**](https://github.com/sindresorhus), and
[**@denysdovhan**](https://github.com/denysdovhan)
for contributing commits since!
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/vfile/vfile/workflows/main/badge.svg
[build]: https://github.com/vfile/vfile/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/vfile/vfile.svg
[coverage]: https://codecov.io/github/vfile/vfile
[downloads-badge]: https://img.shields.io/npm/dm/vfile.svg
[downloads]: https://www.npmjs.com/package/vfile
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=vfile
[size]: https://bundlejs.com/?q=vfile
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[collective]: https://opencollective.com/unified
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/vfile/vfile/discussions
[npm]: https://docs.npmjs.com/cli/install
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
[typescript]: https://www.typescriptlang.org
[health]: https://github.com/vfile/.github
[contributing]: https://github.com/vfile/.github/blob/main/contributing.md
[support]: https://github.com/vfile/.github/blob/main/support.md
[coc]: https://github.com/vfile/.github/blob/main/code-of-conduct.md
[license]: license
[author]: https://wooorm.com
[unified]: https://github.com/unifiedjs/unified
[vinyl]: https://github.com/gulpjs/vinyl
[site]: https://unifiedjs.com
[twitter]: https://twitter.com/unifiedjs
[unist]: https://github.com/syntax-tree/unist#list-of-utilities
[reporter]: https://github.com/vfile/vfile-reporter
[vmessage]: https://github.com/vfile/vfile-message
[vfile-message-options]: https://github.com/vfile/vfile-message#options
[mdn-uint8-array]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
[source-map]: https://github.com/mozilla/source-map/blob/58819f0/source-map.d.ts#L15-L23
[file-url-to-path]: https://nodejs.org/api/url.html#url_url_fileurltopath_url
[governance]: https://github.com/unifiedjs/collective
[api-vfile-messages]: #filemessages
[api-vfile-message]: #vfilemessagereason-options
[api-vfile]: #vfileoptions
[api-compatible]: #compatible
[api-data]: #data
[api-data-map]: #datamap
[api-map]: #map
[api-message-options]: #messageoptions
[api-options]: #options
[api-reporter]: #reporter
[api-reporter-settings]: #reportersettings
[api-value]: #value
@@ -0,0 +1,73 @@
# 🛣️ pathe
> Universal filesystem path utils
[![version][npm-v-src]][npm-v-href]
[![downloads][npm-d-src]][npm-d-href]
[![size][size-src]][size-href]
## ❓ Why
For [historical reasons](https://docs.microsoft.com/en-us/archive/blogs/larryosterman/why-is-the-dos-path-character), windows followed MS-DOS and used backslash for separating paths rather than slash used for macOS, Linux, and other Posix operating systems. Nowadays, [Windows](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN) supports both Slash and Backslash for paths. [Node.js's built-in `path` module](https://nodejs.org/api/path.html) in the default operation of the path module varies based on the operating system on which a Node.js application is running. Specifically, when running on a Windows operating system, the path module will assume that Windows-style paths are being used. **This makes inconsistent code behavior between Windows and POSIX.**
Compared to popular [upath](https://github.com/anodynos/upath), pathe provides **identical exports** of Node.js with normalization on **all operations** and is written in modern **ESM/TypeScript** and has **no dependency on Node.js**!
This package is a drop-in replacement of the Node.js's [path module](https://nodejs.org/api/path.html) module and ensures paths are normalized with slash `/` and work in environments including Node.js.
## 💿 Usage
Install using npm or yarn:
```bash
# npm
npm i pathe
# yarn
yarn add pathe
# pnpm
pnpm i pathe
```
Import:
```js
// ESM / Typescript
import { resolve, matchesGlob } from "pathe";
// CommonJS
const { resolve, matchesGlob } = require("pathe");
```
Read more about path utils from [Node.js documentation](https://nodejs.org/api/path.html) and rest assured behavior is consistently like POSIX regardless of your input paths format and running platform (the only exception is `delimiter` constant export, it will be set to `;` on windows platform).
### Extra utilities
Pathe exports some extra utilities that do not exist in standard Node.js [path module](https://nodejs.org/api/path.html).
In order to use them, you can import from `pathe/utils` subpath:
```js
import {
filename,
normalizeAliases,
resolveAlias,
reverseResolveAlias,
} from "pathe/utils";
```
## License
Made with 💛 Published under the [MIT](./LICENSE) license.
Some code was used from the Node.js project. Glob supported is powered by [zeptomatch](https://github.com/fabiospampinato/zeptomatch).
<!-- Refs -->
[npm-v-src]: https://img.shields.io/npm/v/pathe?style=flat-square
[npm-v-href]: https://npmjs.com/package/pathe
[npm-d-src]: https://img.shields.io/npm/dm/pathe?style=flat-square
[npm-d-href]: https://npmjs.com/package/pathe
[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/pathe/ci/main?style=flat-square
[github-actions-href]: https://github.com/unjs/pathe/actions?query=workflow%3Aci
[size-src]: https://packagephobia.now.sh/badge?p=pathe
[size-href]: https://packagephobia.now.sh/result?p=pathe
@@ -0,0 +1 @@
{"name":"smart-buffer","version":"4.2.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532122247,"integrity":"sha512-g9D+XSq0Aucg7GqK8AFwN6ZTOfRbmPrAom0Hl9OMH8VFfVe0CCxaKcrUWP3QIwgmtFEsHm54h7B3vDfCi0/kSg==","mode":420,"size":1087},"build/smartbuffer.js":{"checkedAt":1794532122247,"integrity":"sha512-lZhlgEf8tOSbdXKZY7FsyJrLNXiYN0xl5reZ1aoK6FkIU88OJ1gc6YkYl4VhjlWYA01Ghaq+0O2AjaKW6g6qlg==","mode":420,"size":44500},"build/utils.js":{"checkedAt":1794532122247,"integrity":"sha512-xs4pbNYSxYjVEiEsNcbqUwT1939qz3IZ/wth8wzTYzZtUgvfu+cT6djBsaYEGrBeOK7OsQSnjI5+6X86GZRdgw==","mode":420,"size":4273},"package.json":{"checkedAt":1794532122247,"integrity":"sha512-cYb1ogcpm9u683fOddfivYCAsUo4qSY3Dg2vTN7q27aEPdthLdLu6CI+/+Er6dkEohVp8MSBt2VFESNA45Ykfg==","mode":420,"size":1969},"build/smartbuffer.js.map":{"checkedAt":1794532122247,"integrity":"sha512-vb3ja3GSFcgi/lRG0OqfkLM1Wpm9AjaQ7nD/ZxjJdvVzOQWJ2Pi2PooZdR8xweX2EcbukMtUHZhxllPbYM3mdQ==","mode":420,"size":20978},"build/utils.js.map":{"checkedAt":1794532122247,"integrity":"sha512-zwOoS9d6VOaKlF/W1nDl4v7pAvsp4H5zJsTQHZ3rxEppEmRGjxFvKiXc9B4T+vIyOr+zYkyyWbvvNaAGCzkqag==","mode":420,"size":2024},"docs/CHANGELOG.md":{"checkedAt":1794532122248,"integrity":"sha512-qFSMtso9HIGu5nEH0Gw4P3sd4vmPzQHlIUpvVuEkzadU5fZadtx//Qg3ObNdjSFXPuj5eV8YbqbL4ffO8HdiTw==","mode":420,"size":2298},"docs/README_v3.md":{"checkedAt":1794532122248,"integrity":"sha512-U+4tWefmOiXeoAapRl1P2rCUgjyWkmAEJO/448861G/7zy3G1n79mfe1eaqpVO07Uu9UWpYrJhzuqBRPCFstKQ==","mode":420,"size":12570},"README.md":{"checkedAt":1794532122248,"integrity":"sha512-y/CFLt4d+BwNNd6FAKakCb086v3Wf1hdixrWxC9zbGTqZimmLWm+GoNUgve1EVixz5EjXT9ryx1CL/CPWT/GyA==","mode":420,"size":18782},"docs/ROADMAP.md":{"checkedAt":1794532122248,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"typings/smartbuffer.d.ts":{"checkedAt":1794532122248,"integrity":"sha512-EiQ1zmTy3AAQdqx8raDBZOoTOf/Rgiz66SvW04J0KlR+ta/YixqSDiQ5woupnTKxm93matGMLbE+5yRBOV75qA==","mode":420,"size":26868},"typings/utils.d.ts":{"checkedAt":1794532122248,"integrity":"sha512-7ulqjTrBcHRx8OSb+EobIVpUlULi5vAz20ftEZx0DcFVPolTFIvzmuHKm3WueyoHat4v48TdiWgHJxi2pYhoHg==","mode":420,"size":2442},".prettierrc.yaml":{"checkedAt":1794532122249,"integrity":"sha512-YLHIyIF2MXSrhe/k/thrPJDc7gJazM/RbKiVya3Vq1sLg36dMaDQmTCug+iCDtIjyDJM5kwdBhxNyuKtcNoxMQ==","mode":420,"size":84},".travis.yml":{"checkedAt":1794532122249,"integrity":"sha512-2UxnbYFB0JclwoXqrxjpBYlbBkBCIdH/dAYUiIlFfM/eIvfuvsaBpcGe6iQSrDhJRbMwJcditRrD0Ond4M/N7w==","mode":420,"size":152}}}
@@ -0,0 +1,7 @@
# ECMA402 Abstract
Implementation for various ECMAScript 402 abstract operations.
[![npm Version](https://img.shields.io/npm/v/@formatjs/ecma402-abstract.svg?style=flat-square)](https://www.npmjs.org/package/@formatjs/ecma402-abstract)
**IMPORTANT: This does not follow semver so please pin the version to the exact one that you need.**
@@ -0,0 +1,22 @@
"use client";
import {
useContextProps
} from "./chunk-BSTJ7ZCN.mjs";
// src/base-form.tsx
import { FormValidationContext } from "@react-stately/form";
import { createContext, forwardRef, useMemo } from "react";
import { form } from "@heroui/theme";
import { jsx } from "react/jsx-runtime";
var FormContext = createContext(null);
var Form = forwardRef(function Form2(props, ref) {
[props, ref] = useContextProps(props, ref, FormContext);
let { validationErrors, validationBehavior = "native", children, className, ...domProps } = props;
const styles = useMemo(() => form({ className }), [className]);
return /* @__PURE__ */ jsx("form", { noValidate: validationBehavior !== "native", ...domProps, ref, className: styles, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: { ...props, validationBehavior }, children: /* @__PURE__ */ jsx(FormValidationContext.Provider, { value: validationErrors != null ? validationErrors : {}, children }) }) });
});
export {
FormContext,
Form
};
@@ -0,0 +1 @@
{"version":3,"file":"transitive_bindings.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/test/features/transitive_bindings.int.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,99 @@
import { Block, Tokens, Spec, Line } from './primitives.js';
export function isSpace(source: string): boolean {
return /^\s+$/.test(source);
}
export function hasCR(source: string): boolean {
return /\r$/.test(source);
}
export function splitCR(source: string): [string, string] {
const matches = source.match(/\r+$/);
return matches == null
? ['', source]
: [source.slice(-matches[0].length), source.slice(0, -matches[0].length)];
}
export function splitSpace(source: string): [string, string] {
const matches = source.match(/^\s+/);
return matches == null
? ['', source]
: [source.slice(0, matches[0].length), source.slice(matches[0].length)];
}
export function splitLines(source: string): string[] {
return source.split(/\n/);
}
export function seedBlock(block: Partial<Block> = {}): Block {
return {
description: '',
tags: [],
source: [],
problems: [],
...block,
};
}
export function seedSpec(spec: Partial<Spec> = {}): Spec {
return {
tag: '',
name: '',
type: '',
optional: false,
description: '',
problems: [],
source: [],
...spec,
};
}
export function seedTokens(tokens: Partial<Tokens> = {}): Tokens {
return {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '',
end: '',
lineEnd: '',
...tokens,
};
}
/**
* Assures Block.tags[].source contains references to the Block.source items,
* using Block.source as a source of truth. This is a counterpart of rewireSpecs
* @param block parsed coments block
*/
export function rewireSource(block: Block): Block {
const source = block.source.reduce(
(acc, line) => acc.set(line.number, line),
new Map<number, Line>()
);
for (const spec of block.tags) {
spec.source = spec.source.map((line) => source.get(line.number));
}
return block;
}
/**
* Assures Block.source contains references to the Block.tags[].source items,
* using Block.tags[].source as a source of truth. This is a counterpart of rewireSource
* @param block parsed coments block
*/
export function rewireSpecs(block: Block): Block {
const source = block.tags.reduce(
(acc, spec) =>
spec.source.reduce((acc, line) => acc.set(line.number, line), acc),
new Map<number, Line>()
);
block.source = block.source.map((line) => source.get(line.number) || line);
return block;
}
@@ -0,0 +1,78 @@
'use strict';
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Buffer = require('safe-buffer').Buffer;
var util = require('util');
function copyBuffer(src, target, offset) {
src.copy(target, offset);
}
module.exports = function () {
function BufferList() {
_classCallCheck(this, BufferList);
this.head = null;
this.tail = null;
this.length = 0;
}
BufferList.prototype.push = function push(v) {
var entry = { data: v, next: null };
if (this.length > 0) this.tail.next = entry;else this.head = entry;
this.tail = entry;
++this.length;
};
BufferList.prototype.unshift = function unshift(v) {
var entry = { data: v, next: this.head };
if (this.length === 0) this.tail = entry;
this.head = entry;
++this.length;
};
BufferList.prototype.shift = function shift() {
if (this.length === 0) return;
var ret = this.head.data;
if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
--this.length;
return ret;
};
BufferList.prototype.clear = function clear() {
this.head = this.tail = null;
this.length = 0;
};
BufferList.prototype.join = function join(s) {
if (this.length === 0) return '';
var p = this.head;
var ret = '' + p.data;
while (p = p.next) {
ret += s + p.data;
}return ret;
};
BufferList.prototype.concat = function concat(n) {
if (this.length === 0) return Buffer.alloc(0);
var ret = Buffer.allocUnsafe(n >>> 0);
var p = this.head;
var i = 0;
while (p) {
copyBuffer(p.data, ret, i);
i += p.data.length;
p = p.next;
}
return ret;
};
return BufferList;
}();
if (util && util.inspect && util.inspect.custom) {
module.exports.prototype[util.inspect.custom] = function () {
var obj = util.inspect({ length: this.length });
return this.constructor.name + ' ' + obj;
};
}
@@ -0,0 +1,108 @@
# 1.2.1
- fix version
# 1.2.0
- add `List.remove`
- build with LiveScript 1.6.0
- update dependencies
- remove coverage calculation
# 1.1.2
- add `Func.memoize`
- fix `zip-all` and `zip-with-all` corner case (no input)
- build with LiveScript 1.4.0
# 1.1.1
- curry `unique-by`, `minimum-by`
# 1.1.0
- added `List` functions: `maximum-by`, `minimum-by`, `unique-by`
- added `List` functions: `at`, `elem-index`, `elem-indices`, `find-index`, `find-indices`
- added `Str` functions: `capitalize`, `camelize`, `dasherize`
- added `Func` function: `over` - eg. ``same-length = (==) `over` (.length)``
- exported `Str.repeat` through main `prelude` object
- fixed definition of `foldr` and `foldr1`, the new correct definition is backwards incompatible with the old, incorrect one
- fixed issue with `fix`
- improved code coverage
# 1.0.3
- build browser versions
# 1.0.2
- bug fix for `flatten` - slight change with bug fix, flattens arrays only, not array-like objects
# 1.0.1
- bug fixes for `drop-while` and `take-while`
# 1.0.0
* massive update - separated functions into separate modules
* functions do not accept multiple types anymore - use different versions in their respective modules in some cases (eg. `Obj.map`), or use `chars` or `values` in other cases to transform into a list
* objects are no longer transformed into functions, simply use `(obj.)` in LiveScript to do that
* browser version now using browserify - use `prelude = require('prelude-ls')`
* added `compact`, `split`, `flatten`, `difference`, `intersection`, `union`, `count-by`, `group-by`, `chars`, `unchars`, `apply`
* added `lists-to-obj` which takes a list of keys and list of values and zips them up into an object, and the converse `obj-to-lists`
* added `pairs-to-obj` which takes a list of pairs (2 element lists) and creates an object, and the converse `obj-to-pairs`
* removed `cons`, `append` - use the concat operator
* removed `compose` - use the compose operator
* removed `obj-to-func` - use partially applied access (eg. `(obj.)`)
* removed `length` - use `(.length)`
* `sort-by` renamed to `sort-with`
* added new `sort-by`
* removed `compare` - just use the new `sort-by`
* `break-it` renamed `break-list`, (`Str.break-str` for the string version)
* added `Str.repeat` which creates a new string by repeating the input n times
* `unfold` as alias to `unfoldr` is no longer used
* fixed up style and compiled with LiveScript 1.1.1
* use Make instead of Slake
* greatly improved tests
# 0.6.0
* fixed various bugs
* added `fix`, a fixpoint (Y combinator) for anonymous recursive functions
* added `unfoldr` (alias `unfold`)
* calling `replicate` with a string now returns a list of strings
* removed `partial`, just use native partial application in LiveScript using the `_` placeholder, or currying
* added `sort`, `sortBy`, and `compare`
# 0.5.0
* removed `lookup` - use (.prop)
* removed `call` - use (.func arg1, arg2)
* removed `pluck` - use map (.prop), xs
* fixed buys wtih `head` and `last`
* added non-minifed browser version, as `prelude-browser.js`
* renamed `prelude-min.js` to `prelude-browser-min.js`
* renamed `zip` to `zipAll`
* renamed `zipWith` to `zipAllWith`
* added `zip`, a curried zip that takes only two arguments
* added `zipWith`, a curried zipWith that takes only two arguments
# 0.4.0
* added `parition` function
* added `curry` function
* removed `elem` function (use `in`)
* removed `notElem` function (use `not in`)
# 0.3.0
* added `listToObject`
* added `unique`
* added `objToFunc`
* added support for using strings in map and the like
* added support for using objects in map and the like
* added ability to use objects instead of functions in certain cases
* removed `error` (just use throw)
* added `tau` constant
* added `join`
* added `values`
* added `keys`
* added `partial`
* renamed `log` to `ln`
* added alias to `head`: `first`
* added `installPrelude` helper
# 0.2.0
* removed functions that simply warp operators as you can now use operators as functions in LiveScript
* `min/max` are now curried and take only 2 arguments
* added `call`
# 0.1.0
* initial public release
@@ -0,0 +1,77 @@
var cloneArrayBuffer = require('./_cloneArrayBuffer'),
cloneDataView = require('./_cloneDataView'),
cloneRegExp = require('./_cloneRegExp'),
cloneSymbol = require('./_cloneSymbol'),
cloneTypedArray = require('./_cloneTypedArray');
/** `Object#toString` result references. */
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
mapTag = '[object Map]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/**
* Initializes an object clone based on its `toStringTag`.
*
* **Note:** This function only supports cloning values with tags of
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
*
* @private
* @param {Object} object The object to clone.
* @param {string} tag The `toStringTag` of the object to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneByTag(object, tag, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
return cloneArrayBuffer(object);
case boolTag:
case dateTag:
return new Ctor(+object);
case dataViewTag:
return cloneDataView(object, isDeep);
case float32Tag: case float64Tag:
case int8Tag: case int16Tag: case int32Tag:
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
return cloneTypedArray(object, isDeep);
case mapTag:
return new Ctor;
case numberTag:
case stringTag:
return new Ctor(object);
case regexpTag:
return cloneRegExp(object);
case setTag:
return new Ctor;
case symbolTag:
return cloneSymbol(object);
}
}
module.exports = initCloneByTag;
@@ -0,0 +1,55 @@
import baseFindIndex from './_baseFindIndex.js';
import baseIteratee from './_baseIteratee.js';
import toInteger from './toInteger.js';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* This method is like `_.find` except that it returns the index of the first
* element `predicate` returns truthy for instead of the element itself.
*
* @static
* @memberOf _
* @since 1.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=0] The index to search from.
* @returns {number} Returns the index of the found element, else `-1`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': false },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
* _.findIndex(users, function(o) { return o.user == 'barney'; });
* // => 0
*
* // The `_.matches` iteratee shorthand.
* _.findIndex(users, { 'user': 'fred', 'active': false });
* // => 1
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findIndex(users, ['active', false]);
* // => 0
*
* // The `_.property` iteratee shorthand.
* _.findIndex(users, 'active');
* // => 2
*/
function findIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseFindIndex(array, baseIteratee(predicate, 3), index);
}
export default findIndex;
@@ -0,0 +1,14 @@
import * as proto from '../../../packet/transformer/proto';
import { OidbPacket, PacketTransformer } from '../../../packet/transformer/base';
declare class SetSpecialTitle extends PacketTransformer<typeof proto.OidbSvcTrpcTcpBase> {
build(groupCode: number, uid: string, title: string): OidbPacket;
parse(data: Buffer): import("napcat-protobuf").any;
subCommand: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
errorCode: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
body: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
errorMsg: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
isReserved: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}>;
}
declare const _default: SetSpecialTitle;
export default _default;
@@ -0,0 +1,21 @@
/*
* Copyright 2024 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) {
if (!node) return false;
let style = window.getComputedStyle(node);
let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
return isScrollable;
}
export {$cc38e7bd3fc7b213$export$2bb74740c4e19def as isScrollable};
//# sourceMappingURL=isScrollable.module.js.map
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,16 @@
var $6db19998ba4427da$exports = {};
$6db19998ba4427da$exports = {
"ascending": `stigande`,
"ascendingSort": (args)=>`sorterat p\xe5 kolumn ${args.columnName} i stigande ordning`,
"columnSize": (args)=>`${args.value} pixlar`,
"descending": `fallande`,
"descendingSort": (args)=>`sorterat p\xe5 kolumn ${args.columnName} i fallande ordning`,
"resizerDescription": `Tryck p\xe5 Retur f\xf6r att b\xf6rja \xe4ndra storlek`,
"select": `Markera`,
"selectAll": `Markera allt`,
"sortable": `sorterbar kolumn`
};
export {$6db19998ba4427da$exports as default};
//# sourceMappingURL=sv-SE.module.js.map
@@ -0,0 +1 @@
{"version":3,"file":"isPromise.spec.d.ts","sourceRoot":"","sources":["../../../../src/common/calculations/isPromise.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('getOr', require('../get'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,29 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
interface ObjectConstructor {
/**
* Groups members of an iterable according to the return value of the passed callback.
* @param items An iterable.
* @param keySelector A callback which will be invoked for each item in items.
*/
groupBy<K extends PropertyKey, T>(
items: Iterable<T>,
keySelector: (item: T, index: number) => K,
): Partial<Record<K, T[]>>;
}
@@ -0,0 +1,54 @@
{
"name": "graphemer",
"version": "1.4.0",
"description": "A JavaScript library that breaks strings into their individual user-perceived characters (including emojis!)",
"homepage": "https://github.com/flmnt/graphemer",
"author": "Matt Davies <matt@filament.so> (https://github.com/mattpauldavies)",
"contributors": [
"Orlin Georgiev (https://github.com/orling)",
"Huáng Jùnliàng (https://github.com/JLHwung)"
],
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"files": [
"lib"
],
"license": "MIT",
"keywords": [
"utf-8",
"strings",
"emoji",
"split"
],
"scripts": {
"prepublishOnly": "npm run build",
"build": "tsc --project tsconfig.json",
"pretest": "npm run build",
"test": "ts-node node_modules/tape/bin/tape tests/**.ts",
"prettier:check": "prettier --check .",
"prettier:fix": "prettier --write ."
},
"repository": {
"type": "git",
"url": "https://github.com/flmnt/graphemer.git"
},
"bugs": "https://github.com/flmnt/graphemer/issues",
"devDependencies": {
"@types/tape": "^4.13.0",
"husky": "^4.3.0",
"lint-staged": "^10.3.0",
"prettier": "^2.1.1",
"tape": "^4.6.3",
"ts-node": "^9.0.0",
"typescript": "^4.0.2"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"pre-push": "npm test"
}
},
"lint-staged": {
"*.{js,ts,md,json}": "prettier --write"
}
}
@@ -0,0 +1,116 @@
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"), require("./cipher-core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core", "./cipher-core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/
CryptoJS.mode.CTRGladman = (function () {
var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();
function incWord(word)
{
if (((word >> 24) & 0xff) === 0xff) { //overflow
var b1 = (word >> 16)&0xff;
var b2 = (word >> 8)&0xff;
var b3 = word & 0xff;
if (b1 === 0xff) // overflow b1
{
b1 = 0;
if (b2 === 0xff)
{
b2 = 0;
if (b3 === 0xff)
{
b3 = 0;
}
else
{
++b3;
}
}
else
{
++b2;
}
}
else
{
++b1;
}
word = 0;
word += (b1 << 16);
word += (b2 << 8);
word += b3;
}
else
{
word += (0x01 << 24);
}
return word;
}
function incCounter(counter)
{
if ((counter[0] = incWord(counter[0])) === 0)
{
// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8
counter[1] = incWord(counter[1]);
}
return counter;
}
var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({
processBlock: function (words, offset) {
// Shortcuts
var cipher = this._cipher
var blockSize = cipher.blockSize;
var iv = this._iv;
var counter = this._counter;
// Generate keystream
if (iv) {
counter = this._counter = iv.slice(0);
// Remove IV for subsequent blocks
this._iv = undefined;
}
incCounter(counter);
var keystream = counter.slice(0);
cipher.encryptBlock(keystream, 0);
// Encrypt
for (var i = 0; i < blockSize; i++) {
words[offset + i] ^= keystream[i];
}
}
});
CTRGladman.Decryptor = Encryptor;
return CTRGladman;
}());
return CryptoJS.mode.CTRGladman;
}));
@@ -0,0 +1 @@
module.exports={A:{A:{"132":"K D E F A B wC"},B:{"132":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"132":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C"},D:{"132":"0 1 2 3 4 5 J ZB 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","388":"6 7 8 9 K D E F A B C L M G N O P aB AB BB CB DB EB FB bB"},E:{"132":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"132":"0 1 2 3 4 5 6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC"},G:{"132":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"132":"hD"},I:{"132":"TC J I iD jD kD lD vC mD nD"},J:{"132":"D A"},K:{"132":"A B C H NC uC OC"},L:{"132":"I"},M:{"132":"MC"},N:{"132":"A B"},O:{"132":"PC"},P:{"132":"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:{"132":"zD"},R:{"132":"0D"},S:{"132":"1D 2D"}},B:6,C:"DNSSEC and DANE",D:true};
@@ -0,0 +1,8 @@
import {
form
} from "../chunk-E257OVH3.mjs";
import "../chunk-UWE6H66T.mjs";
import "../chunk-GIXI35A3.mjs";
export {
form
};
@@ -0,0 +1,21 @@
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['strong'], null | undefined>}
*/
export function checkStrong(state) {
const marker = state.options.strong || '*'
if (marker !== '*' && marker !== '_') {
throw new Error(
'Cannot serialize strong with `' +
marker +
'` for `options.strong`, expected `*`, or `_`'
)
}
return marker
}
@@ -0,0 +1,74 @@
## Threat Model for resolve (module path resolution library)
### 1. Library Overview
- **Library Name:** resolve
- **Brief Description:** Implements Node.js `require.resolve()` algorithm for synchronous and asynchronous file path resolution. Used to locate modules and files in Node.js projects.
- **Key Public APIs/Functions:** `resolve.sync()` / `resolve/sync`, `resolve()` / `resolve/async`
### 2. Define Scope
This threat model focuses on the core path resolution algorithm, including filesystem interaction, option handling, and cache management.
### 3. Conceptual System Diagram
```
Caller Application → resolve(id, options) → Resolution Algorithm → File System
│
└→ Options Handling
└→ Cache System
```
**Trust Boundaries:**
- **Input module IDs:** May come from untrusted sources (user input, configuration)
- **Filesystem access:** The library interacts with the filesystem to resolve paths
- **Options:** Provided by the caller
- **Cache:** Used to improve performance, but could be a vector for tampering or information disclosure if not handled securely
### 4. Identify Assets
- **Integrity of resolution output:** Ensure correct and safe file path matching.
- **Confidentiality of configuration:** Prevent sensitive path information from being leaked.
- **Availability/performance for host application:** Prevent crashes or resource exhaustion.
- **Security of host application:** Prevent path traversal or unintended filesystem access.
- **Reputation of library:** Maintain trust by avoiding supply chain attacks and vulnerabilities[1][3][4].
### 5. Identify Threats
| Component / API / Interaction | S | T | R | I | D | E |
|-----------------------------------------------------|----|----|----|----|----|----|
| Public API Call (`resolve/async`, `resolve/sync`) | ✓ | ✓ | – | ✓ | – | – |
| Filesystem Access | – | ✓ | – | ✓ | ✓ | – |
| Options Handling | ✓ | ✓ | – | ✓ | – | – |
| Cache System | – | ✓ | – | ✓ | – | – |
**Key Threats:**
- **Spoofing:** Malicious module IDs mimicking legitimate packages, or spoofing configuration options[1].
- **Tampering:** Caller-provided paths altering resolution order, or cache tampering leading to incorrect results[1][4].
- **Information Disclosure:** Error messages revealing filesystem structure or sensitive paths[1].
- **Denial of Service:** Recursive or excessive resolution exhausting filesystem handles or causing application crashes[1].
- **Path Traversal:** Malicious input allowing access to files outside the intended directory[4].
### 6. Mitigation/Countermeasures
| Threat Identified | Proposed Mitigation |
|--------------------------------------------|---------------------|
| Spoofing (malicious module IDs/config) | Sanitize input IDs; validate against known patterns; restrict `basedir` to app-controlled paths[1][4]. |
| Tampering (path traversal, cache) | Validate input IDs for directory escapes; secure cache reads/writes; restrict cache to trusted sources[1][4]. |
| Information Disclosure (error messages) | Generic "not found" errors without internal paths; avoid exposing sensitive configuration in errors[1]. |
| Denial of Service (resource exhaustion) | Limit recursive resolution depth; implement timeout; monitor for excessive filesystem operations[1]. |
### 7. Risk Ranking
- **High:** Path traversal via malicious IDs (if not properly mitigated)
- **Medium:** Cache tampering or spoofing (if cache is not secured)
- **Low:** Information disclosure in errors (if error handling is generic)
### 8. Next Steps & Review
1. **Implement input sanitization for module IDs and configuration.**
2. **Add resolution depth limiting and timeout.**
3. **Audit cache handling for race conditions and tampering.**
4. **Regularly review dependencies for vulnerabilities.**
5. **Keep documentation and threat model up to date.**
6. **Monitor for new threats as the ecosystem and library evolve[1][3].**
@@ -0,0 +1,89 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HasPropertyKey = HasPropertyKey;
exports.IsAsyncIterator = IsAsyncIterator;
exports.IsArray = IsArray;
exports.IsBigInt = IsBigInt;
exports.IsBoolean = IsBoolean;
exports.IsDate = IsDate;
exports.IsFunction = IsFunction;
exports.IsIterator = IsIterator;
exports.IsNull = IsNull;
exports.IsNumber = IsNumber;
exports.IsObject = IsObject;
exports.IsRegExp = IsRegExp;
exports.IsString = IsString;
exports.IsSymbol = IsSymbol;
exports.IsUint8Array = IsUint8Array;
exports.IsUndefined = IsUndefined;
// --------------------------------------------------------------------------
// PropertyKey
// --------------------------------------------------------------------------
/** Returns true if this value has this property key */
function HasPropertyKey(value, key) {
return key in value;
}
// --------------------------------------------------------------------------
// Object Instances
// --------------------------------------------------------------------------
/** Returns true if this value is an async iterator */
function IsAsyncIterator(value) {
return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.asyncIterator in value;
}
/** Returns true if this value is an array */
function IsArray(value) {
return Array.isArray(value);
}
/** Returns true if this value is bigint */
function IsBigInt(value) {
return typeof value === 'bigint';
}
/** Returns true if this value is a boolean */
function IsBoolean(value) {
return typeof value === 'boolean';
}
/** Returns true if this value is a Date object */
function IsDate(value) {
return value instanceof globalThis.Date;
}
/** Returns true if this value is a function */
function IsFunction(value) {
return typeof value === 'function';
}
/** Returns true if this value is an iterator */
function IsIterator(value) {
return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.iterator in value;
}
/** Returns true if this value is null */
function IsNull(value) {
return value === null;
}
/** Returns true if this value is number */
function IsNumber(value) {
return typeof value === 'number';
}
/** Returns true if this value is an object */
function IsObject(value) {
return typeof value === 'object' && value !== null;
}
/** Returns true if this value is RegExp */
function IsRegExp(value) {
return value instanceof globalThis.RegExp;
}
/** Returns true if this value is string */
function IsString(value) {
return typeof value === 'string';
}
/** Returns true if this value is symbol */
function IsSymbol(value) {
return typeof value === 'symbol';
}
/** Returns true if this value is a Uint8Array */
function IsUint8Array(value) {
return value instanceof globalThis.Uint8Array;
}
/** Returns true if this value is undefined */
function IsUndefined(value) {
return value === undefined;
}
@@ -0,0 +1,2 @@
export * from './readonly-from-mapped-result';
export * from './readonly';
@@ -0,0 +1 @@
{"version":3,"names":["_classApplyDescriptorDestructureSet","receiver","descriptor","set","__destrObj","value","v","call","writable","TypeError"],"sources":["../../src/helpers/classApplyDescriptorDestructureSet.js"],"sourcesContent":["/* @minVersion 7.13.10 */\n/* @onlyBabel7 */\n\nexport default function _classApplyDescriptorDestructureSet(\n receiver,\n descriptor,\n) {\n if (descriptor.set) {\n if (!(\"__destrObj\" in descriptor)) {\n descriptor.__destrObj = {\n set value(v) {\n descriptor.set.call(receiver, v);\n },\n };\n }\n return descriptor.__destrObj;\n } else {\n if (!descriptor.writable) {\n // This should only throw in strict mode, but class bodies are\n // always strict and private fields can only be used inside\n // class bodies.\n throw new TypeError(\"attempted to set read only private field\");\n }\n\n return descriptor;\n }\n}\n"],"mappings":";;;;;;AAGe,SAASA,mCAAmCA,CACzDC,QAAQ,EACRC,UAAU,EACV;EACA,IAAIA,UAAU,CAACC,GAAG,EAAE;IAClB,IAAI,EAAE,YAAY,IAAID,UAAU,CAAC,EAAE;MACjCA,UAAU,CAACE,UAAU,GAAG;QACtB,IAAIC,KAAKA,CAACC,CAAC,EAAE;UACXJ,UAAU,CAACC,GAAG,CAACI,IAAI,CAACN,QAAQ,EAAEK,CAAC,CAAC;QAClC;MACF,CAAC;IACH;IACA,OAAOJ,UAAU,CAACE,UAAU;EAC9B,CAAC,MAAM;IACL,IAAI,CAACF,UAAU,CAACM,QAAQ,EAAE;MAIxB,MAAM,IAAIC,SAAS,CAAC,0CAA0C,CAAC;IACjE;IAEA,OAAOP,UAAU;EACnB;AACF","ignoreList":[]}
@@ -0,0 +1,81 @@
{
"name": "@trivago/prettier-plugin-sort-imports",
"version": "5.2.2",
"description": "A prettier plugins to sort imports in provided RegEx order",
"main": "lib/src/index.js",
"types": "types/index.d.ts",
"repository": {
"url": "https://github.com/trivago/prettier-plugin-sort-imports",
"type": "git"
},
"homepage": "https://github.com/trivago/prettier-plugin-sort-imports#readme",
"scripts": {
"prepare": "yarn run compile",
"compile": "tsc",
"preexample": "yarn run compile",
"example": "prettier --config ./examples/.prettierrc --plugin lib/src/index.js",
"test": "yarn node --experimental-vm-modules $(yarn bin jest)",
"type-check": "tsc --noEmit",
"prepublishOnly": "npm run compile && npm run test"
},
"keywords": [
"prettier",
"plugin",
"sort",
"import",
"typescript",
"javascript"
],
"author": {
"name": "Ayush Sharma",
"email": "ayush.sharma@trivago.com",
"url": "https://github.com/ayusharma"
},
"license": "Apache-2.0",
"dependencies": {
"@babel/generator": "^7.26.5",
"@babel/parser": "^7.26.7",
"@babel/traverse": "^7.26.7",
"@babel/types": "^7.26.7",
"javascript-natural-sort": "^0.7.1",
"lodash": "^4.17.21"
},
"devDependencies": {
"@babel/core": "^7.26.7",
"@types/chai": "^5.0.1",
"@types/jest": "^29.5.14",
"@types/lodash": "^4.17.14",
"@types/node": "^22.10.10",
"@vue/compiler-sfc": "^3.5.13",
"jest": "^29.7.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"svelte": "^4.2.19",
"ts-jest": "^29.2.5",
"typescript": "^5.7.3"
},
"peerDependencies": {
"@vue/compiler-sfc": "3.x",
"prettier": "2.x - 3.x",
"prettier-plugin-svelte": "3.x",
"svelte": "4.x || 5.x"
},
"engines": {
"node": ">18.12"
},
"peerDependenciesMeta": {
"@vue/compiler-sfc": {
"optional": true
},
"prettier-plugin-svelte": {
"optional": true
},
"svelte": {
"optional": true
}
},
"resolutions": {
"@types/babel__generator": "7.6.8",
"@babel/types": "7.26.7"
}
}
@@ -0,0 +1,163 @@
# detect-libc
Node.js module to detect details of the C standard library (libc)
implementation provided by a given Linux system.
Currently supports detection of GNU glibc and MUSL libc.
Provides asychronous and synchronous functions for the
family (e.g. `glibc`, `musl`) and version (e.g. `1.23`, `1.2.3`).
The version numbers of libc implementations
are not guaranteed to be semver-compliant.
For previous v1.x releases, please see the
[v1](https://github.com/lovell/detect-libc/tree/v1) branch.
## Install
```sh
npm install detect-libc
```
## API
### GLIBC
```ts
const GLIBC: string = 'glibc';
```
A String constant containing the value `glibc`.
### MUSL
```ts
const MUSL: string = 'musl';
```
A String constant containing the value `musl`.
### family
```ts
function family(): Promise<string | null>;
```
Resolves asychronously with:
* `glibc` or `musl` when the libc family can be determined
* `null` when the libc family cannot be determined
* `null` when run on a non-Linux platform
```js
const { family, GLIBC, MUSL } = require('detect-libc');
switch (await family()) {
case GLIBC: ...
case MUSL: ...
case null: ...
}
```
### familySync
```ts
function familySync(): string | null;
```
Synchronous version of `family()`.
```js
const { familySync, GLIBC, MUSL } = require('detect-libc');
switch (familySync()) {
case GLIBC: ...
case MUSL: ...
case null: ...
}
```
### version
```ts
function version(): Promise<string | null>;
```
Resolves asychronously with:
* The version when it can be determined
* `null` when the libc family cannot be determined
* `null` when run on a non-Linux platform
```js
const { version } = require('detect-libc');
const v = await version();
if (v) {
const [major, minor, patch] = v.split('.');
}
```
### versionSync
```ts
function versionSync(): string | null;
```
Synchronous version of `version()`.
```js
const { versionSync } = require('detect-libc');
const v = versionSync();
if (v) {
const [major, minor, patch] = v.split('.');
}
```
### isNonGlibcLinux
```ts
function isNonGlibcLinux(): Promise<boolean>;
```
Resolves asychronously with:
* `false` when the libc family is `glibc`
* `true` when the libc family is not `glibc`
* `false` when run on a non-Linux platform
```js
const { isNonGlibcLinux } = require('detect-libc');
if (await isNonGlibcLinux()) { ... }
```
### isNonGlibcLinuxSync
```ts
function isNonGlibcLinuxSync(): boolean;
```
Synchronous version of `isNonGlibcLinux()`.
```js
const { isNonGlibcLinuxSync } = require('detect-libc');
if (isNonGlibcLinuxSync()) { ... }
```
## Licensing
Copyright 2017 Lovell Fuller and others.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -0,0 +1,266 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = ttf2woff;
var _reader = _interopRequireDefault(require("./reader"));
var _writer = _interopRequireDefault(require("./writer"));
var _string = _interopRequireDefault(require("../common/string"));
var _string2 = _interopRequireDefault(require("./util/string"));
var _error = _interopRequireDefault(require("./error"));
var _default = _interopRequireDefault(require("./data/default"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file ttf转换为woff
* @author mengke01(kekee000@gmail.com)
*
* woff format:
* http://www.w3.org/TR/2012/REC-WOFF-20121213/
*
* references:
* https://github.com/fontello/ttf2woff
* https://github.com/nodeca/pako
*/
/* eslint-disable no-multi-spaces */
/**
* metadata 转换成XML
*
* @param {Object} metadata metadata
*
* @example
* metadata json:
*
* {
* "uniqueid": "",
* "vendor": {
* "name": "",
* "url": ""
* },
* "credit": [
* {
* "name": "",
* "url": "",
* "role": ""
* }
* ],
* "description": "",
* "license": {
* "id": "",
* "url": "",
* "text": ""
* },
* "copyright": "",
* "trademark": "",
* "licensee": ""
* }
*
* @return {string} xml字符串
*/
function metadata2xml(metadata) {
var xml = '' + '<?xml version="1.0" encoding="UTF-8"?>' + '<metadata version="1.0">';
metadata.uniqueid = metadata.uniqueid || _default.default.fontId + '.' + Date.now();
xml += '<uniqueid id="' + _string.default.encodeHTML(metadata.uniqueid) + '" />';
if (metadata.vendor) {
xml += '<vendor name="' + _string.default.encodeHTML(metadata.vendor.name) + '"' + ' url="' + _string.default.encodeHTML(metadata.vendor.url) + '" />';
}
if (metadata.credit) {
xml += '<credits>';
var credits = metadata.credit instanceof Array ? metadata.credit : [metadata.credit];
credits.forEach(function (credit) {
xml += '<credit name="' + _string.default.encodeHTML(credit.name) + '"' + ' url="' + _string.default.encodeHTML(credit.url) + '"' + ' role="' + _string.default.encodeHTML(credit.role || 'Contributor') + '" />';
});
xml += '</credits>';
}
if (metadata.description) {
xml += '<description><text xml:lang="en">' + _string.default.encodeHTML(metadata.description) + '</text></description>';
}
if (metadata.license) {
xml += '<license url="' + _string.default.encodeHTML(metadata.license.url) + '"' + ' id="' + _string.default.encodeHTML(metadata.license.id) + '"><text xml:lang="en">';
xml += _string.default.encodeHTML(metadata.license.text);
xml += '</text></license>';
}
if (metadata.copyright) {
xml += '<copyright><text xml:lang="en">';
xml += _string.default.encodeHTML(metadata.copyright);
xml += '</text></copyright>';
}
if (metadata.trademark) {
xml += '<trademark><text xml:lang="en">' + _string.default.encodeHTML(metadata.trademark) + '</text></trademark>';
}
if (metadata.licensee) {
xml += '<licensee name="' + _string.default.encodeHTML(metadata.licensee) + '"/>';
}
xml += '</metadata>';
return xml;
}
/**
* ttf格式转换成woff字体格式
*
* @param {ArrayBuffer} ttfBuffer ttf缓冲数组
* @param {Object} options 选项
* @param {Object} options.metadata 字体相关的信息
* @param {Object} options.deflate 压缩相关函数
*
* @return {ArrayBuffer} woff格式byte流
*/
function ttf2woff(ttfBuffer) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
// woff 头部结构
var woffHeader = {
signature: 0x774F4646,
// for woff
flavor: 0x10000,
// for ttf
length: 0,
numTables: 0,
reserved: 0,
totalSfntSize: 0,
majorVersion: 0,
minorVersion: 0,
metaOffset: 0,
metaLength: 0,
metaOrigLength: 0,
privOffset: 0,
privLength: 0
};
var ttfReader = new _reader.default(ttfBuffer);
var tableEntries = [];
var numTables = ttfReader.readUint16(4); // 读取ttf表个数
var tableEntry;
var deflatedData;
var i;
var l;
if (numTables <= 0 || numTables > 100) {
_error.default.raise(10101);
}
// 读取ttf表索引信息
ttfReader.seek(12);
for (i = 0; i < numTables; ++i) {
tableEntry = {
tag: ttfReader.readString(ttfReader.offset, 4),
checkSum: ttfReader.readUint32(),
offset: ttfReader.readUint32(),
length: ttfReader.readUint32()
};
var entryOffset = ttfReader.offset;
if (tableEntry.tag === 'head') {
// 读取font revision
woffHeader.majorVersion = ttfReader.readUint16(tableEntry.offset + 4);
woffHeader.minorVersion = ttfReader.readUint16(tableEntry.offset + 6);
}
// ttf 表数据
var sfntData = ttfReader.readBytes(tableEntry.offset, tableEntry.length);
// 对数据进行压缩
if (options.deflate) {
deflatedData = options.deflate(sfntData);
// 这里需要判断是否压缩后数据小于原始数据
if (deflatedData.length < sfntData.length) {
tableEntry.data = deflatedData;
tableEntry.deflated = true;
} else {
tableEntry.data = sfntData;
}
} else {
tableEntry.data = sfntData;
}
tableEntry.compLength = tableEntry.data.length;
tableEntries.push(tableEntry);
ttfReader.seek(entryOffset);
}
if (!tableEntries.length) {
_error.default.raise(10204);
}
// 对table进行排序
tableEntries = tableEntries.sort(function (a, b) {
return a.tag === b.tag ? 0 : a.tag < b.tag ? -1 : 1;
});
// 计算offset和 woff size
var woffSize = 44 + 20 * numTables; // header size + table entries
var ttfSize = 12 + 16 * numTables;
for (i = 0, l = tableEntries.length; i < l; ++i) {
tableEntry = tableEntries[i];
tableEntry.offset = woffSize;
// 4字节对齐
woffSize += tableEntry.compLength + (tableEntry.compLength % 4 ? 4 - tableEntry.compLength % 4 : 0);
ttfSize += tableEntry.length + (tableEntry.length % 4 ? 4 - tableEntry.length % 4 : 0);
}
// 计算metaData
var metadata = null;
if (options.metadata) {
var xml = _string2.default.toUTF8Bytes(metadata2xml(options.metadata));
if (options.deflate) {
deflatedData = options.deflate(xml);
if (deflatedData.length < xml.length) {
metadata = deflatedData;
} else {
metadata = xml;
}
} else {
metadata = xml;
}
woffHeader.metaLength = metadata.length;
woffHeader.metaOrigLength = xml.length;
woffHeader.metaOffset = woffSize;
// metadata header + length
woffSize += woffHeader.metaLength + (woffHeader.metaLength % 4 ? 4 - woffHeader.metaLength % 4 : 0);
}
woffHeader.numTables = tableEntries.length;
woffHeader.length = woffSize;
woffHeader.totalSfntSize = ttfSize;
// 写woff数据
var woffWriter = new _writer.default(new ArrayBuffer(woffSize));
// 写woff头部
woffWriter.writeUint32(woffHeader.signature);
woffWriter.writeUint32(woffHeader.flavor);
woffWriter.writeUint32(woffHeader.length);
woffWriter.writeUint16(woffHeader.numTables);
woffWriter.writeUint16(woffHeader.reserved);
woffWriter.writeUint32(woffHeader.totalSfntSize);
woffWriter.writeUint16(woffHeader.majorVersion);
woffWriter.writeUint16(woffHeader.minorVersion);
woffWriter.writeUint32(woffHeader.metaOffset);
woffWriter.writeUint32(woffHeader.metaLength);
woffWriter.writeUint32(woffHeader.metaOrigLength);
woffWriter.writeUint32(woffHeader.privOffset);
woffWriter.writeUint32(woffHeader.privLength);
// 写woff表索引
for (i = 0, l = tableEntries.length; i < l; ++i) {
tableEntry = tableEntries[i];
woffWriter.writeString(tableEntry.tag);
woffWriter.writeUint32(tableEntry.offset);
woffWriter.writeUint32(tableEntry.compLength);
woffWriter.writeUint32(tableEntry.length);
woffWriter.writeUint32(tableEntry.checkSum);
}
// 写表数据
for (i = 0, l = tableEntries.length; i < l; ++i) {
tableEntry = tableEntries[i];
woffWriter.writeBytes(tableEntry.data);
if (tableEntry.compLength % 4) {
woffWriter.writeEmpty(4 - tableEntry.compLength % 4);
}
}
// 写metadata
if (metadata) {
woffWriter.writeBytes(metadata);
if (woffHeader.metaLength % 4) {
woffWriter.writeEmpty(4 - woffHeader.metaLength % 4);
}
}
return woffWriter.getBuffer();
}
@@ -0,0 +1 @@
{"version":3,"file":"mdsTypes.d.ts","sourceRoot":"","sources":["../../src/metadata/mdsTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;GAGG;AAEH,MAAM;AACN,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,eAAe,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,wBAAwB,EAAE,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oCAAoC,CAAC,EAAE,MAAM,EAAE,CAAC;IAChD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,sBAAsB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACjD,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,Q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AoB,CAAC;CAC7C,CAAC;AAEF;;GAEG;AAEH;;;GAGG;AACH,MAAM,MAAM,UAAU,GAClB,mBAAmB,GACnB,sBAAsB,GACtB,mBAAmB,GACnB,qBAAqB,GACrB,oBAAoB,GACpB,mBAAmB,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,oBAAoB,GACpB,mBAAmB,GACnB,kBAAkB,GAClB,MAAM,GACN,KAAK,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7C,QAAA,MAAM,OAAO,wZAeH,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,MAAM,GACd,cAAc,GACd,cAAc,GACd,cAAc,GACd,cAAc,GACd,MAAM,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,iBAAiB,GACjB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,MAAM,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,UAAU,GACV,KAAK,GACL,gBAAgB,GAChB,eAAe,CAAC;AAEpB;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,KAAK,GAAG,SAAS,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,UAAU,GACV,OAAO,GACP,UAAU,GACV,KAAK,GACL,WAAW,GACX,SAAS,GACT,OAAO,GACP,aAAa,CAAC;AAElB;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GACtC,KAAK,GACL,qBAAqB,GACrB,KAAK,GACL,UAAU,GACV,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAACLine truncated
@@ -0,0 +1,40 @@
{
"name": "update-browserslist-db",
"version": "1.1.4",
"description": "CLI tool to update caniuse-lite to refresh target browsers from Browserslist config",
"keywords": [
"caniuse",
"browsers",
"target"
],
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/browserslist"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"author": "Andrey Sitnik <andrey@sitnik.ru>",
"license": "MIT",
"repository": "browserslist/update-db",
"types": "./index.d.ts",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"dependencies": {
"escalade": "^3.2.0",
"picocolors": "^1.1.1"
},
"peerDependencies": {
"browserslist": ">= 4.21.0"
},
"bin": "cli.js"
}
@@ -0,0 +1,28 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = require("react");
var _useMemoizedFn = _interopRequireDefault(require("../useMemoizedFn"));
var _utils = require("../utils");
var useTimeout = function useTimeout(fn, delay) {
var timerCallback = (0, _useMemoizedFn["default"])(fn);
var timerRef = (0, _react.useRef)(null);
var clear = (0, _react.useCallback)(function () {
if (timerRef.current) {
clearTimeout(timerRef.current);
}
}, []);
(0, _react.useEffect)(function () {
if (!(0, _utils.isNumber)(delay) || delay < 0) {
return;
}
timerRef.current = setTimeout(timerCallback, delay);
return clear;
}, [delay]);
return clear;
};
var _default = exports["default"] = useTimeout;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more