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 @@
{"name":"to-through","version":"2.0.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532123758,"integrity":"sha512-53MS4nE5tT8EZELQNdsA15vrxNBNy38cA3b3+U6dwfrG3iYzGTQsk3YQdAS/mxNxkf2KMYf5q+Q8BQgsAtl+Xw==","mode":420,"size":1088},"README.md":{"checkedAt":1794532123758,"integrity":"sha512-QBe8whm3pV40KI2idWAbXcbsfifWshJQMg7182UKJ5o4XycJkAsprUHHnoFYbim607Db9Ir6VNCMffNbghpKKg==","mode":420,"size":1991},"LICENSE":{"checkedAt":1794532123682,"integrity":"sha512-1eXjnKHlcQI7jFq5BiVfafSp0IhjaBlZX8/qj5MN4P0MwqGyo1WQFf/19KyVw5blF503KVYf6zXFEh9u+oGDvQ==","mode":420,"size":1164},"index.js":{"checkedAt":1794532123758,"integrity":"sha512-+WDOo0o1/Q/eqdxPrU5EZ7jZIotiuvQ17VF7sxeLEBjDN2cvbjNPeL2tKZBG2Gx1QXVi5JHnie8Y9qDa/UE9rw==","mode":420,"size":1254}}}
@@ -0,0 +1,17 @@
var $f1316b1074463583$exports = {};
$f1316b1074463583$exports = {
"deselectedItem": (args)=>`\u{672A}\u{9009}\u{62E9} ${args.item}\u{3002}`,
"longPressToSelect": `\u{957F}\u{6309}\u{4EE5}\u{8FDB}\u{5165}\u{9009}\u{62E9}\u{6A21}\u{5F0F}\u{3002}`,
"select": `\u{9009}\u{62E9}`,
"selectedAll": `\u{5DF2}\u{9009}\u{62E9}\u{6240}\u{6709}\u{9879}\u{76EE}\u{3002}`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `\u{672A}\u{9009}\u{62E9}\u{9879}\u{76EE}`,
one: ()=>`\u{5DF2}\u{9009}\u{62E9} ${formatter.number(args.count)} \u{4E2A}\u{9879}\u{76EE}`,
other: ()=>`\u{5DF2}\u{9009}\u{62E9} ${formatter.number(args.count)} \u{4E2A}\u{9879}\u{76EE}`
})}\u{3002}`,
"selectedItem": (args)=>`\u{5DF2}\u{9009}\u{62E9} ${args.item}\u{3002}`
};
export {$f1316b1074463583$exports as default};
//# sourceMappingURL=zh-CN.module.js.map
@@ -0,0 +1,113 @@
// Generated by LiveScript 1.6.0
(function(){
var reject, special, tokenRegex;
reject = require('prelude-ls').reject;
function consumeOp(tokens, op){
if (tokens[0] === op) {
return tokens.shift();
} else {
throw new Error("Expected '" + op + "', but got '" + tokens[0] + "' instead in " + JSON.stringify(tokens) + ".");
}
}
function maybeConsumeOp(tokens, op){
if (tokens[0] === op) {
return tokens.shift();
}
}
function consumeList(tokens, arg$, hasDelimiters){
var open, close, result, untilTest;
open = arg$[0], close = arg$[1];
if (hasDelimiters) {
consumeOp(tokens, open);
}
result = [];
untilTest = "," + (hasDelimiters ? close : '');
while (tokens.length && (hasDelimiters && tokens[0] !== close)) {
result.push(consumeElement(tokens, untilTest));
maybeConsumeOp(tokens, ',');
}
if (hasDelimiters) {
consumeOp(tokens, close);
}
return result;
}
function consumeArray(tokens, hasDelimiters){
return consumeList(tokens, ['[', ']'], hasDelimiters);
}
function consumeTuple(tokens, hasDelimiters){
return consumeList(tokens, ['(', ')'], hasDelimiters);
}
function consumeFields(tokens, hasDelimiters){
var result, untilTest, key;
if (hasDelimiters) {
consumeOp(tokens, '{');
}
result = {};
untilTest = "," + (hasDelimiters ? '}' : '');
while (tokens.length && (!hasDelimiters || tokens[0] !== '}')) {
key = consumeValue(tokens, ':');
consumeOp(tokens, ':');
result[key] = consumeElement(tokens, untilTest);
maybeConsumeOp(tokens, ',');
}
if (hasDelimiters) {
consumeOp(tokens, '}');
}
return result;
}
function consumeValue(tokens, untilTest){
var out;
untilTest == null && (untilTest = '');
out = '';
while (tokens.length && -1 === untilTest.indexOf(tokens[0])) {
out += tokens.shift();
}
return out;
}
function consumeElement(tokens, untilTest){
switch (tokens[0]) {
case '[':
return consumeArray(tokens, true);
case '(':
return consumeTuple(tokens, true);
case '{':
return consumeFields(tokens, true);
default:
return consumeValue(tokens, untilTest);
}
}
function consumeTopLevel(tokens, types, options){
var ref$, type, structure, origTokens, result, finalResult, x$, y$;
ref$ = types[0], type = ref$.type, structure = ref$.structure;
origTokens = tokens.concat();
if (!options.explicit && types.length === 1 && ((!type && structure) || (type === 'Array' || type === 'Object'))) {
result = structure === 'array' || type === 'Array'
? consumeArray(tokens, tokens[0] === '[')
: structure === 'tuple'
? consumeTuple(tokens, tokens[0] === '(')
: consumeFields(tokens, tokens[0] === '{');
finalResult = tokens.length ? consumeElement(structure === 'array' || type === 'Array'
? (x$ = origTokens, x$.unshift('['), x$.push(']'), x$)
: (y$ = origTokens, y$.unshift('('), y$.push(')'), y$)) : result;
} else {
finalResult = consumeElement(tokens);
}
return finalResult;
}
special = /\[\]\(\)}{:,/.source;
tokenRegex = RegExp('("(?:\\\\"|[^"])*")|(\'(?:\\\\\'|[^\'])*\')|(/(?:\\\\/|[^/])*/[a-zA-Z]*)|(#.*#)|([' + special + '])|([^\\s' + special + '](?:\\s*[^\\s' + special + ']+)*)|\\s*');
module.exports = function(types, string, options){
var tokens, node;
options == null && (options = {});
if (!options.explicit && types.length === 1 && types[0].type === 'String') {
return string;
}
tokens = reject(not$, string.split(tokenRegex));
node = consumeTopLevel(tokens, types, options);
if (!node) {
throw new Error("Error parsing '" + string + "'.");
}
return node;
};
function not$(x){ return !x; }
}).call(this);
@@ -0,0 +1,6 @@
module.exports = {
"dismiss": `\u{5D4}\u{5EA}\u{5E2}\u{5DC}\u{5DD}`
};
//# sourceMappingURL=he-IL.main.js.map
@@ -0,0 +1 @@
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["color.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,yBAHW,MAAM,GACJ,MAAM,CAIlB"}
@@ -0,0 +1,33 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
docs: {
description: "disallow rest/spread properties.",
category: "ES2018",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-rest-spread-properties.html",
},
fixable: null,
messages: {
forbidden: "ES2018 rest/spread properties are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"ObjectPattern > RestElement"(node) {
context.report({ node, messageId: "forbidden" })
},
"ObjectExpression > SpreadElement"(node) {
context.report({ node, messageId: "forbidden" })
},
}
},
}
@@ -0,0 +1,121 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "simvol", verb: "olmalıdır" },
file: { unit: "bayt", verb: "olmalıdır" },
array: { unit: "element", verb: "olmalıdır" },
set: { unit: "element", verb: "olmalıdır" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "input",
email: "email address",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO datetime",
date: "ISO date",
time: "ISO time",
duration: "ISO duration",
ipv4: "IPv4 address",
ipv6: "IPv6 address",
cidrv4: "IPv4 range",
cidrv6: "IPv6 range",
base64: "base64-encoded string",
base64url: "base64url-encoded string",
json_string: "JSON string",
e164: "E.164 number",
jwt: "JWT",
template_literal: "input",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Yanlış dəyər: gözlənilən ${issue.expected}, daxil olan ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `Yanlış dəyər: gözlənilən ${util.stringifyPrimitive(issue.values[0])}`;
return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Çox böyük: gözlənilən ${issue.origin ?? "dəyər"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "element"}`;
return `Çox böyük: gözlənilən ${issue.origin ?? "dəyər"} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) return `Çox kiçik: gözlənilən ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
return `Çox kiçik: gözlənilən ${issue.origin} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Yanlış mətn: "${_issue.prefix}" ilə başlamalıdır`;
if (_issue.format === "ends_with") return `Yanlış mətn: "${_issue.suffix}" ilə bitməlidir`;
if (_issue.format === "includes") return `Yanlış mətn: "${_issue.includes}" daxil olmalıdır`;
if (_issue.format === "regex") return `Yanlış mətn: ${_issue.pattern} şablonuna uyğun olmalıdır`;
return `Yanlış ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Yanlış ədəd: ${issue.divisor} ilə bölünə bilən olmalıdır`;
case "unrecognized_keys":
return `Tanınmayan açar${issue.keys.length > 1 ? "lar" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} daxilində yanlış açar`;
case "invalid_union":
return "Yanlış dəyər";
case "invalid_element":
return `${issue.origin} daxilində yanlış dəyər`;
default:
return `Yanlış dəyər`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"C L M G N O P","129":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB 0C 1C"},D:{"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","129":"0 1 2 3 4 5 VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","450":"mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B"},E:{"1":"cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L 2C ZC 3C 4C 5C 6C aC NC OC 7C","578":"M G 8C 9C bC"},F:{"2":"6 7 8 9 F B C G N O P aB AB BB CB DB FD GD HD ID NC uC JD OC","129":"0 1 2 3 4 5 tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","450":"EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB"},G:{"1":"cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD","578":"cD dD bC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"129":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB rD sD aC tD uD vD wD xD QC RC SC yD","2":"J oD pD qD"},Q:{"129":"zD"},R:{"1":"0D"},S:{"1":"2D","2":"1D"}},B:5,C:"CSS Scroll-behavior",D:true};
@@ -0,0 +1,21 @@
import { useCallback, useEffect, useRef } from 'react';
import useMemoizedFn from '../useMemoizedFn';
import { isNumber } from '../utils';
var useTimeout = function (fn, delay) {
var timerCallback = useMemoizedFn(fn);
var timerRef = useRef(null);
var clear = useCallback(function () {
if (timerRef.current) {
clearTimeout(timerRef.current);
}
}, []);
useEffect(function () {
if (!isNumber(delay) || delay < 0) {
return;
}
timerRef.current = setTimeout(timerCallback, delay);
return clear;
}, [delay]);
return clear;
};
export default useTimeout;
@@ -0,0 +1,62 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const vitest_1 = require("vitest");
const index_1 = require("../../index");
(0, vitest_1.describe)('Issue 1190', () => {
(0, vitest_1.it)('should inject a katana as default weapon to ninja', () => {
// eslint-disable-next-line @typescript-eslint/typedef
const TYPES = {
Weapon: 'Weapon',
};
// eslint-disable-next-line @typescript-eslint/typedef
const TAG = {
throwable: 'throwable',
};
let Katana = class Katana {
name;
constructor() {
this.name = 'Katana';
}
};
Katana = tslib_1.__decorate([
(0, index_1.injectable)(),
tslib_1.__metadata("design:paramtypes", [])
], Katana);
let Shuriken = class Shuriken {
name;
constructor() {
this.name = 'Shuriken';
}
};
Shuriken = tslib_1.__decorate([
(0, index_1.injectable)(),
tslib_1.__metadata("design:paramtypes", [])
], Shuriken);
let Ninja = class Ninja {
name;
katana;
shuriken;
constructor(katana, shuriken) {
this.name = 'Ninja';
this.katana = katana;
this.shuriken = shuriken;
}
};
Ninja = tslib_1.__decorate([
(0, index_1.injectable)(),
tslib_1.__param(0, (0, index_1.inject)(TYPES.Weapon)),
tslib_1.__param(0, (0, index_1.optional)()),
tslib_1.__param(1, (0, index_1.inject)(TYPES.Weapon)),
tslib_1.__param(1, (0, index_1.named)(TAG.throwable)),
tslib_1.__metadata("design:paramtypes", [Object, Object])
], Ninja);
const container = new index_1.Container();
container.bind(TYPES.Weapon).to(Katana).whenDefault();
container.bind(TYPES.Weapon).to(Shuriken).whenNamed(TAG.throwable);
container.bind('Ninja').to(Ninja);
const ninja = container.get('Ninja');
(0, vitest_1.expect)(ninja.katana).toStrictEqual(new Katana());
});
});
//# sourceMappingURL=issue_1190.test.js.map
@@ -0,0 +1,10 @@
import InjectionToken from "../providers/injection-token";
/**
* Parameter decorator factory that allows for interface information to be stored in the constructor's metadata
*
* @return {Function} The parameter decorator
*/
declare function inject(token: InjectionToken<any>, options?: {
isOptional?: boolean;
}): (target: any, propertyKey: string | symbol | undefined, parameterIndex: number) => any;
export default inject;
@@ -0,0 +1,139 @@
"use strict";
/**
* Copyright (c) 2017, Daniel Imms (MIT License).
* Copyright (c) 2018, Microsoft Corporation (MIT License).
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var assert = require("assert");
var windowsTerminal_1 = require("./windowsTerminal");
var unixTerminal_1 = require("./unixTerminal");
var terminal_1 = require("./terminal");
var terminalConstructor = (process.platform === 'win32') ? windowsTerminal_1.WindowsTerminal : unixTerminal_1.UnixTerminal;
var SHELL = (process.platform === 'win32') ? 'cmd.exe' : '/bin/bash';
var terminalCtor;
if (process.platform === 'win32') {
terminalCtor = require('./windowsTerminal');
}
else {
terminalCtor = require('./unixTerminal');
}
var TestTerminal = /** @class */ (function (_super) {
__extends(TestTerminal, _super);
function TestTerminal() {
return _super !== null && _super.apply(this, arguments) || this;
}
TestTerminal.prototype.checkType = function (name, value, type, allowArray) {
if (allowArray === void 0) { allowArray = false; }
this._checkType(name, value, type, allowArray);
};
TestTerminal.prototype._write = function (data) {
throw new Error('Method not implemented.');
};
TestTerminal.prototype.resize = function (cols, rows) {
throw new Error('Method not implemented.');
};
TestTerminal.prototype.clear = function () {
throw new Error('Method not implemented.');
};
TestTerminal.prototype.destroy = function () {
throw new Error('Method not implemented.');
};
TestTerminal.prototype.kill = function (signal) {
throw new Error('Method not implemented.');
};
Object.defineProperty(TestTerminal.prototype, "process", {
get: function () {
throw new Error('Method not implemented.');
},
enumerable: false,
configurable: true
});
Object.defineProperty(TestTerminal.prototype, "master", {
get: function () {
throw new Error('Method not implemented.');
},
enumerable: false,
configurable: true
});
Object.defineProperty(TestTerminal.prototype, "slave", {
get: function () {
throw new Error('Method not implemented.');
},
enumerable: false,
configurable: true
});
return TestTerminal;
}(terminal_1.Terminal));
describe('Terminal', function () {
describe('constructor', function () {
it('should do basic type checks', function () {
assert.throws(function () { return new terminalCtor('a', 'b', { 'name': {} }); }, 'name must be a string (not a object)');
});
});
describe('checkType', function () {
it('should throw for the wrong type', function () {
var t = new TestTerminal();
assert.doesNotThrow(function () { return t.checkType('foo', 'test', 'string'); });
assert.doesNotThrow(function () { return t.checkType('foo', 1, 'number'); });
assert.doesNotThrow(function () { return t.checkType('foo', {}, 'object'); });
assert.throws(function () { return t.checkType('foo', 'test', 'number'); });
assert.throws(function () { return t.checkType('foo', 1, 'object'); });
assert.throws(function () { return t.checkType('foo', {}, 'string'); });
});
it('should throw for wrong types within arrays', function () {
var t = new TestTerminal();
assert.doesNotThrow(function () { return t.checkType('foo', ['test'], 'string', true); });
assert.doesNotThrow(function () { return t.checkType('foo', [1], 'number', true); });
assert.doesNotThrow(function () { return t.checkType('foo', [{}], 'object', true); });
assert.throws(function () { return t.checkType('foo', ['test'], 'number', true); });
assert.throws(function () { return t.checkType('foo', [1], 'object', true); });
assert.throws(function () { return t.checkType('foo', [{}], 'string', true); });
});
});
describe('automatic flow control', function () {
it('should respect ctor flow control options', function () {
var pty = new terminalConstructor(SHELL, [], { handleFlowControl: true, flowControlPause: 'abc', flowControlResume: '123' });
assert.equal(pty.handleFlowControl, true);
assert.equal(pty._flowControlPause, 'abc');
assert.equal(pty._flowControlResume, '123');
});
// TODO: I don't think this test ever worked due to pollUntil being used incorrectly
// it('should do flow control automatically', async function(): Promise<void> {
// // Flow control doesn't work on Windows
// if (process.platform === 'win32') {
// return;
// }
// this.timeout(10000);
// const pty = new terminalConstructor(SHELL, [], {handleFlowControl: true, flowControlPause: 'PAUSE', flowControlResume: 'RESUME'});
// let read: string = '';
// pty.on('data', data => read += data);
// pty.on('pause', () => read += 'paused');
// pty.on('resume', () => read += 'resumed');
// pty.write('1');
// pty.write('PAUSE');
// pty.write('2');
// pty.write('RESUME');
// pty.write('3');
// await pollUntil(() => {
// return stripEscapeSequences(read).endsWith('1pausedresumed23');
// }, 100, 10);
// });
});
});
function stripEscapeSequences(data) {
return data.replace(/\u001b\[0K/, '');
}
//# sourceMappingURL=terminal.test.js.map
@@ -0,0 +1,5 @@
import { PartitionNumberPattern } from './PartitionNumberPattern';
export function FormatNumeric(internalSlots, x) {
var parts = PartitionNumberPattern(internalSlots, x);
return parts.map(function (p) { return p.value; }).join('');
}
@@ -0,0 +1,143 @@
export type Schema =
| ObjectSchema
| ArraySchema
| StringSchema
| NumberSchema
| IntegerSchema
| BooleanSchema
| NullSchema;
// export type JsonType = "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
// export interface JSONSchema {
// type?: string ;
// $id?: string ;
// id?: string ;
// $schema?: string ;
// $ref?: string ;
// $anchor?: string ;
// $defs?: { [key: string]: JSONSchema } ;
// definitions?: { [key: string]: JSONSchema } ;
// $comment?: string ;
// title?: string ;
// description?: string ;
// default?: unknown ;
// examples?: unknown[] ;
// readOnly?: boolean ;
// writeOnly?: boolean ;
// deprecated?: boolean ;
// allOf?: JSONSchema[] ;
// anyOf?: JSONSchema[] ;
// oneOf?: JSONSchema[] ;
// not?: JSONSchema ;
// if?: JSONSchema ;
// then?: JSONSchema ;
// else?: JSONSchema ;
// enum?: Array<string | number | boolean | null> ;
// const?: string | number | boolean | null ;
// [k: string]: unknown;
// /** A special key used as an intermediate representation of extends-style relationships. Omitted as a $ref with additional properties. */
// // _ref?: JSONSchema;
// _prefault?: unknown ;
// }
export type _JSONSchema = boolean | JSONSchema;
export type JSONSchema = {
[k: string]: unknown;
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#";
$id?: string;
$anchor?: string;
$ref?: string;
$dynamicRef?: string;
$dynamicAnchor?: string;
$vocabulary?: Record<string, boolean>;
$comment?: string;
$defs?: Record<string, JSONSchema>;
type?: "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
additionalItems?: _JSONSchema;
unevaluatedItems?: _JSONSchema;
prefixItems?: _JSONSchema[];
items?: _JSONSchema | _JSONSchema[];
contains?: _JSONSchema;
additionalProperties?: _JSONSchema;
unevaluatedProperties?: _JSONSchema;
properties?: Record<string, _JSONSchema>;
patternProperties?: Record<string, _JSONSchema>;
dependentSchemas?: Record<string, _JSONSchema>;
propertyNames?: _JSONSchema;
if?: _JSONSchema;
then?: _JSONSchema;
else?: _JSONSchema;
allOf?: JSONSchema[];
anyOf?: JSONSchema[];
oneOf?: JSONSchema[];
not?: _JSONSchema;
multipleOf?: number;
maximum?: number;
exclusiveMaximum?: number;
minimum?: number;
exclusiveMinimum?: number;
maxLength?: number;
minLength?: number;
pattern?: string;
maxItems?: number;
minItems?: number;
uniqueItems?: boolean;
maxContains?: number;
minContains?: number;
maxProperties?: number;
minProperties?: number;
required?: string[];
dependentRequired?: Record<string, string[]>;
enum?: Array<string | number | boolean | null>;
const?: string | number | boolean | null;
// metadata
id?: string;
title?: string;
description?: string;
default?: unknown;
deprecated?: boolean;
readOnly?: boolean;
writeOnly?: boolean;
examples?: unknown[];
format?: string;
contentMediaType?: string;
contentEncoding?: string;
contentSchema?: JSONSchema;
// internal
_prefault?: unknown;
};
// for backwards compatibility
export type BaseSchema = JSONSchema;
export interface ObjectSchema extends JSONSchema {
type: "object";
}
export interface ArraySchema extends JSONSchema {
type: "array";
}
export interface StringSchema extends JSONSchema {
type: "string";
}
export interface NumberSchema extends JSONSchema {
type: "number";
}
export interface IntegerSchema extends JSONSchema {
type: "integer";
}
export interface BooleanSchema extends JSONSchema {
type: "boolean";
}
export interface NullSchema extends JSONSchema {
type: "null";
}
@@ -0,0 +1,734 @@
export default `flf2a$ 7 7 18 -1 18
smisome1.flf
Downsized version of isometric1.flf - M. Lindsey (mglindse@nyx.cs.du.edu)
February 24, 1996
---
isometric1.flf
Figlet conversion by Kent Nassen (kentn@cyberspace.org), 8-10-94, based
on the fonts posted by Lennert Stock:
From: stock@fwi.uva.nl (Lennert Stock)
Date: 15 Jul 1994 00:04:25 GMT
Here are some fonts. Non-figlet I'm afraid, if you wanna convert them, be
my guest. I posted the isometric fonts before.
------------------------------------------------------------------------------
--------- L e n n e r t S t o c k
stock@fwi.uva.nl --------
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
___ @
/\\ \\ @
/::\\ \\ @
/::\\:\\__\\@
\\/\\::/ /@
/:/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/::\\:\\__\\@
\\:\\::/ /@
\\::/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/:/\\:\\__\\@
\\:\\ \\/__/@
\\:\\__\\ @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/:/\\:\\__\\@
\\:\\/:/ /@
\\::/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/::\\:\\__\\@
\\:\\:\\/ /@
\\:\\/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/::\\:\\__\\@
\\/\\:\\/__/@
\\/__/ @
@@
___ @
/\\ \\ @
/::\\ \\ @
/:/\\:\\__\\@
\\:\\:\\/__/@
\\::/ / @
\\/__/ @@
___ @
/\\__\\ @
/:/__/_ @
/::\\/\\__\\@
\\/\\::/ /@
/:/ / @
\\/__/ @@
___ @
/\\ \\ @
_\\:\\ \\ @
/\\/::\\__\\@
\\::/\\/__/@
\\:\\__\\ @
\\/__/ @@
___ @
/\\ \\ @
_\\:\\ \\ @
/\\/::\\__\\@
\\::/\\/__/@
\\/__/ @
@@
___ @
/\\__\\ @
/:/ _/_ @
/::-"\\__\\@
\\;:;-",-"@
|:| | @
\\|__| @@
___ @
/\\__\\ @
/:/ / @
/:/__/ @
\\:\\ \\ @
\\:\\__\\ @
\\/__/ @@
___ @
/\\__\\ @
/::L_L_ @
/:/L:\\__\\@
\\/_/:/ /@
/:/ / @
\\/__/ @@
___ @
/\\__\\ @
/:| _|_ @
/::|/\\__\\@
\\/|::/ /@
|:/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/:/\\:\\__\\@
\\:\\/:/ /@
\\::/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/::\\:\\__\\@
\\/\\::/ /@
\\/__/ @
@@
___ @
/\\ \\ @
/::\\ \\ @
\\:\\:\\__\\@
\\::/ /@
/:/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/::\\:\\__\\@
\\;:::/ /@
|:\\/__/ @
\\|__| @@
___ @
/\\ \\ @
/::\\ \\ @
/\\:\\:\\__\\@
\\:\\:\\/__/@
\\::/ / @
\\/__/ @@
___ @
/\\ \\ @
\\:\\ \\ @
/::\\__\\@
/:/\\/__/@
\\/__/ @
@@
___ @
/\\__\\ @
/:/ _/_ @
/:/_/\\__\\@
\\:\\/:/ /@
\\::/ / @
\\/__/ @@
___ @
/\\__\\ @
/:/ _/_ @
|::L/\\__\\@
|::::/ /@
L;;/__/ @
@@
___ @
/\\__\\ @
/:/\\__\\ @
/:/:/\\__\\@
\\::/:/ /@
\\::/ / @
\\/__/ @@
___ @
/\\__\\ @
|::L__L @
/::::\\__\\@
\\;::;/__/@
|::|__| @
\\/__/ @@
___ @
/\\__\\ @
|::L__L @
|:::\\__\\@
/:;;/__/@
\\/__/ @
@@
___ @
/\\ \\ @
_\\:\\ \\ @
/::::\\__\\@
\\::;;/__/@
\\:\\__\\ @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/:LS:\\__\\@
\\1994/ /@
\\::/ / @
\\/__/ @@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
___ @
/\\ \\ @
/::\\ \\ @
/::\\:\\__\\@
\\/\\::/ /@
/:/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/::\\:\\__\\@
\\:\\::/ /@
\\::/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/:/\\:\\__\\@
\\:\\ \\/__/@
\\:\\__\\ @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/:/\\:\\__\\@
\\:\\/:/ /@
\\::/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/::\\:\\__\\@
\\:\\:\\/ /@
\\:\\/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/::\\:\\__\\@
\\/\\:\\/__/@
\\/__/ @
@@
___ @
/\\ \\ @
/::\\ \\ @
/:/\\:\\__\\@
\\:\\:\\/__/@
\\::/ / @
\\/__/ @@
___ @
/\\__\\ @
/:/__/_ @
/::\\/\\__\\@
\\/\\::/ /@
/:/ / @
\\/__/ @@
___ @
/\\ \\ @
_\\:\\ \\ @
/\\/::\\__\\@
\\::/\\/__/@
\\:\\__\\ @
\\/__/ @@
___ @
/\\ \\ @
_\\:\\ \\ @
/\\/::\\__\\@
\\::/\\/__/@
\\/__/ @
@@
___ @
/\\__\\ @
/:/ _/_ @
/::-"\\__\\@
\\;:;-",-"@
|:| | @
\\|__| @@
___ @
/\\__\\ @
/:/ / @
/:/__/ @
\\:\\ \\ @
\\:\\__\\ @
\\/__/ @@
___ @
/\\__\\ @
/::L_L_ @
/:/L:\\__\\@
\\/_/:/ /@
/:/ / @
\\/__/ @@
___ @
/\\__\\ @
/:| _|_ @
/::|/\\__\\@
\\/|::/ /@
|:/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/:/\\:\\__\\@
\\:\\/:/ /@
\\::/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/::\\:\\__\\@
\\/\\::/ /@
\\/__/ @
@@
___ @
/\\ \\ @
/::\\ \\ @
\\:\\:\\__\\@
\\::/ /@
/:/ / @
\\/__/ @@
___ @
/\\ \\ @
/::\\ \\ @
/::\\:\\__\\@
\\;:::/ /@
|:\\/__/ @
\\|__| @@
___ @
/\\ \\ @
/::\\ \\ @
/\\:\\:\\__\\@
\\:\\:\\/__/@
\\::/ / @
\\/__/ @@
___ @
/\\ \\ @
\\:\\ \\ @
/::\\__\\@
/:/\\/__/@
\\/__/ @
@@
___ @
/\\__\\ @
/:/ _/_ @
/:/_/\\__\\@
\\:\\/:/ /@
\\::/ / @
\\/__/ @@
___ @
/\\__\\ @
/:/ _/_ @
|::L/\\__\\@
|::::/ /@
L;;/__/ @
@@
___ @
/\\__\\ @
/:/\\__\\ @
/:/:/\\__\\@
\\::/:/ /@
\\::/ / @
\\/__/ @@
___ @
/\\__\\ @
|::L__L @
/::::\\__\\@
\\;::;/__/@
|::|__| @
\\/__/ @@
___ @
/\\__\\ @
|::L__L @
|:::\\__\\@
/:;;/__/@
\\/__/ @
@@
___ @
/\\ \\ @
_\\:\\ \\ @
/::::\\__\\@
\\::;;/__/@
\\:\\__\\ @
\\/__/ @@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,5 @@
'use strict';
// https://262.ecma-international.org/6.0/#sec-algorithm-conventions
module.exports = require('math-intrinsics/max');
@@ -0,0 +1,5 @@
import { ConstantValueBinding } from '../../binding/models/ConstantValueBinding';
import { ResolutionParams } from '../models/ResolutionParams';
import { Resolved } from '../models/Resolved';
export declare const resolveConstantValueBinding: <TActivated>(params: ResolutionParams, binding: ConstantValueBinding<TActivated>) => Resolved<TActivated>;
//# sourceMappingURL=resolveConstantValueBinding.d.ts.map
@@ -0,0 +1,3 @@
export function byteLength(b64: string): number;
export function toByteArray(b64: string): Uint8Array;
export function fromByteArray(uint8: Uint8Array): string;
@@ -0,0 +1 @@
{"name":"react-window","version":"1.8.11","requiresBuild":false,"files":{"dist/index.cjs.js.flow":{"checkedAt":1794532115846,"integrity":"sha512-VoiVGuiY8xEUBEvcvasAo3KoBXpcM3Ki2wSk9Magg7YWmi6PQvEi4mItltEUU4x0CC7pSRw4U1Q0E7JkEY9tzQ==","mode":420,"size":34},"dist/index.esm.js.flow":{"checkedAt":1794532115846,"integrity":"sha512-VoiVGuiY8xEUBEvcvasAo3KoBXpcM3Ki2wSk9Magg7YWmi6PQvEi4mItltEUU4x0CC7pSRw4U1Q0E7JkEY9tzQ==","mode":420,"size":34},"src/areEqual.js":{"checkedAt":1794532115846,"integrity":"sha512-PNMGLV/swEwxeFwNU4Terv70E0XwQgMLc+TqpImh1B/ykdZHIoe+vhhoxEnPz3kMDFpos+D1tp9CFgy70QRdZg==","mode":420,"size":538},"src/createGridComponent.js":{"checkedAt":1794532115847,"integrity":"sha512-xYEf57I/yZB4/QBv6wlxvhlnSONovdAvK9U5X+frCkcjZqwZFNFWjPhXHwIsMS35Hqpe0cFz2SEu2N15VRJDQQ==","mode":420,"size":27736},"src/createListComponent.js":{"checkedAt":1794532115847,"integrity":"sha512-0xGkllkWk0DKnngYvJDDaho87JOqLCbt1n1eSVUIETYpMfU9rVL/0dRcSMuNGJs1gngT4Z2BEFQoBvOyzeuqPg==","mode":420,"size":23044},"src/domHelpers.js":{"checkedAt":1794532115847,"integrity":"sha512-towf0SFM2LntDW8RHW3h5byDDxw6/PSSb1hZa3C0Hke9eRNYV3DQYu51HU+WG+g/8/cQqwIGFjMlaz3JHztLKA==","mode":420,"size":2262},"src/FixedSizeGrid.js":{"checkedAt":1794532115847,"integrity":"sha512-hhtPdtplWmdatrdBKIcuzXqXTiwyqrDw0o1Q78y3/vi/iRvhb2jLMcnS3ZzHdzG6gzsqWKC4bb8rVdiqcDFtSQ==","mode":420,"size":7135},"src/FixedSizeList.js":{"checkedAt":1794532115847,"integrity":"sha512-rT8cT9YjPhdMu2raKdEn2l8f1N6SUcD0BSnOWS8anwAqe79Rb601F5bnbdOpbvpyBJ8/YYml6bNXgspCuw3wjQ==","mode":420,"size":3941},"dist/index-dev.umd.js":{"checkedAt":1794532115848,"integrity":"sha512-KkzbeK85fqonJ+YFYDTgtY/5mWkmILUVk8kEfC70tGNTVu5mrMh3U01FN9c+A+GIPjU6UV/1f+IWtsdO3rzJxQ==","mode":420,"size":28897},"dist/index-prod.umd.js":{"checkedAt":1794532115848,"integrity":"sha512-FQXPTs0NgTFib3wKcmWRFMQg1puAhjzgO7GkSwZR1WTV/LbqLJKo9q9lgqt9xkUQNN7ruycUdm+T1qegZSQUCg==","mode":420,"size":25049},"dist/index.cjs.js":{"checkedAt":1794532115848,"integrity":"sha512-uSUaB4RQGa4hwQIgEFKY5qlh9bwAaG62HHrq4eQOzoASYBDe+5q5sGYoL3l0tsYTAvmEthBEETGQxRCgey1Xvw==","mode":420,"size":83002},"dist/index.esm.js":{"checkedAt":1794532115849,"integrity":"sha512-zHfYfshhpEuXYEV0It5pnZqWUwzvarB8Ii6s7hrjxVdLyw4q+xZB/4Oyb5s1KgY4WAm+SlUECZRE1SHpuk3YPw==","mode":420,"size":82557},"src/index.js":{"checkedAt":1794532115849,"integrity":"sha512-K+OWxacCku5CWIKcvIcHhnj0c6yLjCIkHx1xQLBXIVp1UYFEjhLgjjPiDShLtRgO8jxc38rK7X8aG8lZuegGIQ==","mode":420,"size":389},"src/shallowDiffers.js":{"checkedAt":1794532115849,"integrity":"sha512-KnL4FyIgcxYQX3cPdvHXZbA9zV/0Zko3sGX8zTmv9ZKxRcU7IYIwuxOr5ZESrFnpCLllQ+E5DCnXyfu08eUBDg==","mode":420,"size":445},"src/shouldComponentUpdate.js":{"checkedAt":1794532115849,"integrity":"sha512-U2NDgX9jQcTcEC1vubjqRipsGXKLs9fCTkdBhycunoLtWjNwOYvBgqpnBdRjn5fklmfimkF3Xp61R9umP4TZ2Q==","mode":420,"size":496},"src/timer.js":{"checkedAt":1794532115849,"integrity":"sha512-IN0GNulJLC8tUTvs273cvT3LpQ5+ntSWcrTRx/MnoXROklWy1CtR3+OIF6lDeKKCAYvsEOuEntbhU9uZfZFAsw==","mode":420,"size":863},"src/VariableSizeGrid.js":{"checkedAt":1794532115849,"integrity":"sha512-SravbaYiaPIhXzWoPD1N1cq+eU36dGLiInCjCT2r2bHwrUD7/urU35Ke4QAdAzRASxlsaALrY3RCxg3uwBg3lQ==","mode":420,"size":13682},"src/VariableSizeList.js":{"checkedAt":1794532115850,"integrity":"sha512-bNUYLkp0kiJHWDBfA4SBfH9sc7K9NNMLvtQQwwFXdHGW5Sf6jqdTCeAIsWmVqD3T7P4vzdF8snGTAQH3Am1tQA==","mode":420,"size":8599},"package.json":{"checkedAt":1794532115850,"integrity":"sha512-+Py0C5pPXUydpXeorPN4hCYYiAdVRRrhcjvHZ+viW5fFEapEONeY64JM26a/fdi8HJOyYNMb3NRan6xdP//I5Q==","mode":420,"size":3536},"dist/index-dev.umd.js.map":{"checkedAt":1794532115850,"integrity":"sha512-puEFuYzftxX4OUQUl9Gt1TAjf/07LaRjt3/rHYa1vYcRzdzD2rHKXjtuE5rQIDv7n61s9mhL2kTVfoKSpnP6vQ==","mode":420,"size":127017},"dist/index-prod.umd.js.map":{"checkedAt":1794532115851,"integrity":"sha512-a9KuAhaeZxWRKBjqAGta8CuR04EiOloF0eGkppR/TUhoHSe53EkYVflAyRFe04/JaCJiMOmvVuNWsgdtx6oUkg==","mode":420,"size":125183},"dist/index.cjs.js.map":{"checkedAt":1794532115851,"integrity":"sha512-GvtC/RHUMh/J+YAeEPOYOofB4IEdp5cwpfcv11OaTWPQSyOg+Qahi4vSgAk8sW7zzvnPSLKn7Ea2DJ+FWYXrDw==","mode":420,"size":157421},"dist/index.esm.js.map":{"checkedAt":1794532115852,"integrity":"sha512-Thc15dBSTZmjbpL2sqE7sszFWtvGudKZP6rtokqZSXLycKEiLqo0+7t3MZWiL5RUSOwQqjX9r2rESzXDXrUOhA==","mode":420,"size":157402},"LICENSE.md":{"checkedAt":1794532115852,"integrity":"sha512-m1pJYktq3ZF1eN0vWaXGV8OnM9ENAvj0DlnbNuZnSN6FYS1wpV50/hpXPH0YD6APyL23t0JnUr6UvpXOFMFJRw==","mode":420,"size":1079},"README.md":{"checkedAt":1794532115852,"integrity":"sha512-RDpiNBl2BnZGuz/yF8p7xUeRlv/Vk1hkUlarTC+2rNAwPEbjfCGMoevBHJ5z2I+bu2vCwvTjOb7LIlrQ1xDOwQ==","mode":420,"size":15478}}}
@@ -0,0 +1,159 @@
var $1117b6c0d4c4c164$exports = require("./focusWithoutScrolling.main.js");
var $9e20cff0af27e8cc$exports = require("./platform.main.js");
var $6kLG7$react = require("react");
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "RouterProvider", () => $4068a0fae83b6d84$export$323e4fc2fa4753fb);
$parcel$export(module.exports, "shouldClientNavigate", () => $4068a0fae83b6d84$export$efa8c9099e530235);
$parcel$export(module.exports, "openLink", () => $4068a0fae83b6d84$export$95185d699e05d4d7);
$parcel$export(module.exports, "useRouter", () => $4068a0fae83b6d84$export$9a302a45f65d0572);
$parcel$export(module.exports, "useSyntheticLinkProps", () => $4068a0fae83b6d84$export$bdc77b0c0a3a85d6);
$parcel$export(module.exports, "getSyntheticLinkProps", () => $4068a0fae83b6d84$export$51437d503373d223);
$parcel$export(module.exports, "useLinkProps", () => $4068a0fae83b6d84$export$7e924b3091a3bd18);
/*
* Copyright 2023 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $4068a0fae83b6d84$var$RouterContext = /*#__PURE__*/ (0, $6kLG7$react.createContext)({
isNative: true,
open: $4068a0fae83b6d84$var$openSyntheticLink,
useHref: (href)=>href
});
function $4068a0fae83b6d84$export$323e4fc2fa4753fb(props) {
let { children: children, navigate: navigate, useHref: useHref } = props;
let ctx = (0, $6kLG7$react.useMemo)(()=>({
isNative: false,
open: (target, modifiers, href, routerOptions)=>{
$4068a0fae83b6d84$var$getSyntheticLink(target, (link)=>{
if ($4068a0fae83b6d84$export$efa8c9099e530235(link, modifiers)) navigate(href, routerOptions);
else $4068a0fae83b6d84$export$95185d699e05d4d7(link, modifiers);
});
},
useHref: useHref || ((href)=>href)
}), [
navigate,
useHref
]);
return /*#__PURE__*/ (0, ($parcel$interopDefault($6kLG7$react))).createElement($4068a0fae83b6d84$var$RouterContext.Provider, {
value: ctx
}, children);
}
function $4068a0fae83b6d84$export$9a302a45f65d0572() {
return (0, $6kLG7$react.useContext)($4068a0fae83b6d84$var$RouterContext);
}
function $4068a0fae83b6d84$export$efa8c9099e530235(link, modifiers) {
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
let target = link.getAttribute('target');
return (!target || target === '_self') && link.origin === location.origin && !link.hasAttribute('download') && !modifiers.metaKey && // open in new tab (mac)
!modifiers.ctrlKey && // open in new tab (windows)
!modifiers.altKey && // download
!modifiers.shiftKey;
}
function $4068a0fae83b6d84$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
var _window_event_type, _window_event;
let { metaKey: metaKey, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey } = modifiers;
// Firefox does not recognize keyboard events as a user action by default, and the popup blocker
// will prevent links with target="_blank" from opening. However, it does allow the event if the
// Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
if ((0, $9e20cff0af27e8cc$exports.isFirefox)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith('key')) && target.target === '_blank') {
if ((0, $9e20cff0af27e8cc$exports.isMac)()) metaKey = true;
else ctrlKey = true;
}
// WebKit does not support firing click events with modifier keys, but does support keyboard events.
// https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
let event = (0, $9e20cff0af27e8cc$exports.isWebKit)() && (0, $9e20cff0af27e8cc$exports.isMac)() && !(0, $9e20cff0af27e8cc$exports.isIPad)() && true ? new KeyboardEvent('keydown', {
keyIdentifier: 'Enter',
metaKey: metaKey,
ctrlKey: ctrlKey,
altKey: altKey,
shiftKey: shiftKey
}) : new MouseEvent('click', {
metaKey: metaKey,
ctrlKey: ctrlKey,
altKey: altKey,
shiftKey: shiftKey,
bubbles: true,
cancelable: true
});
$4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = setOpening;
(0, $1117b6c0d4c4c164$exports.focusWithoutScrolling)(target);
target.dispatchEvent(event);
$4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = false;
}
// https://github.com/parcel-bundler/parcel/issues/8724
$4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = false;
function $4068a0fae83b6d84$var$getSyntheticLink(target, open) {
if (target instanceof HTMLAnchorElement) open(target);
else if (target.hasAttribute('data-href')) {
let link = document.createElement('a');
link.href = target.getAttribute('data-href');
if (target.hasAttribute('data-target')) link.target = target.getAttribute('data-target');
if (target.hasAttribute('data-rel')) link.rel = target.getAttribute('data-rel');
if (target.hasAttribute('data-download')) link.download = target.getAttribute('data-download');
if (target.hasAttribute('data-ping')) link.ping = target.getAttribute('data-ping');
if (target.hasAttribute('data-referrer-policy')) link.referrerPolicy = target.getAttribute('data-referrer-policy');
target.appendChild(link);
open(link);
target.removeChild(link);
}
}
function $4068a0fae83b6d84$var$openSyntheticLink(target, modifiers) {
$4068a0fae83b6d84$var$getSyntheticLink(target, (link)=>$4068a0fae83b6d84$export$95185d699e05d4d7(link, modifiers));
}
function $4068a0fae83b6d84$export$bdc77b0c0a3a85d6(props) {
let router = $4068a0fae83b6d84$export$9a302a45f65d0572();
var _props_href;
const href = router.useHref((_props_href = props.href) !== null && _props_href !== void 0 ? _props_href : '');
return {
'data-href': props.href ? href : undefined,
'data-target': props.target,
'data-rel': props.rel,
'data-download': props.download,
'data-ping': props.ping,
'data-referrer-policy': props.referrerPolicy
};
}
function $4068a0fae83b6d84$export$51437d503373d223(props) {
return {
'data-href': props.href,
'data-target': props.target,
'data-rel': props.rel,
'data-download': props.download,
'data-ping': props.ping,
'data-referrer-policy': props.referrerPolicy
};
}
function $4068a0fae83b6d84$export$7e924b3091a3bd18(props) {
let router = $4068a0fae83b6d84$export$9a302a45f65d0572();
var _props_href;
const href = router.useHref((_props_href = props === null || props === void 0 ? void 0 : props.href) !== null && _props_href !== void 0 ? _props_href : '');
return {
href: (props === null || props === void 0 ? void 0 : props.href) ? href : undefined,
target: props === null || props === void 0 ? void 0 : props.target,
rel: props === null || props === void 0 ? void 0 : props.rel,
download: props === null || props === void 0 ? void 0 : props.download,
ping: props === null || props === void 0 ? void 0 : props.ping,
referrerPolicy: props === null || props === void 0 ? void 0 : props.referrerPolicy
};
}
//# sourceMappingURL=openLink.main.js.map
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=ClassMetadataLifecycle.js.map
@@ -0,0 +1,17 @@
import {useDialog as $40df3f8667284809$export$d55e7ee900f34e93} from "./useDialog.mjs";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export {$40df3f8667284809$export$d55e7ee900f34e93 as useDialog};
//# sourceMappingURL=module.js.map
@@ -0,0 +1,73 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
var templateTagSpacing = utils.createRule({
name: "template-tag-spacing",
package: "js",
meta: {
type: "layout",
docs: {
description: "Require or disallow spacing between template tags and their literals"
},
fixable: "whitespace",
schema: [
{
type: "string",
enum: ["always", "never"]
}
],
messages: {
unexpected: "Unexpected space between template tag and template literal.",
missing: "Missing space between template tag and template literal."
}
},
create(context) {
const never = context.options[0] !== "always";
const sourceCode = context.sourceCode;
function checkSpacing(node) {
const tagToken = sourceCode.getTokenBefore(node.quasi);
const literalToken = sourceCode.getFirstToken(node.quasi);
const hasWhitespace = sourceCode.isSpaceBetweenTokens(tagToken, literalToken);
if (never && hasWhitespace) {
context.report({
node,
loc: {
start: tagToken.loc.end,
end: literalToken.loc.start
},
messageId: "unexpected",
fix(fixer) {
const comments = sourceCode.getCommentsBefore(node.quasi);
if (comments.some((comment) => comment.type === "Line"))
return null;
return fixer.replaceTextRange(
[tagToken.range[1], literalToken.range[0]],
comments.reduce((text, comment) => text + sourceCode.getText(comment), "")
);
}
});
} else if (!never && !hasWhitespace) {
context.report({
node,
loc: {
start: node.loc.start,
end: literalToken.loc.start
},
messageId: "missing",
fix(fixer) {
return fixer.insertTextAfter(tagToken, " ");
}
});
}
}
return {
TaggedTemplateExpression: checkSpacing
};
}
});
module.exports = templateTagSpacing;
@@ -0,0 +1,23 @@
let Declaration = require('../declaration')
let utils = require('../utils')
class Appearance extends Declaration {
constructor(name, prefixes, all) {
super(name, prefixes, all)
if (this.prefixes) {
this.prefixes = utils.uniq(
this.prefixes.map(i => {
if (i === '-ms-') {
return '-webkit-'
}
return i
})
)
}
}
}
Appearance.names = ['appearance']
module.exports = Appearance
@@ -0,0 +1,13 @@
import {
code
} from "../chunk-JE6SPRGQ.mjs";
import "../chunk-CWYZ2GEH.mjs";
import "../chunk-GQT3YUX3.mjs";
import "../chunk-46U6G7UJ.mjs";
import "../chunk-DGTYPKBN.mjs";
import "../chunk-UWE6H66T.mjs";
import "../chunk-GIXI35A3.mjs";
import "../chunk-GH5E4FQB.mjs";
export {
code
};
@@ -0,0 +1,69 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createTemplateBuilder;
var _options = require("./options.js");
var _string = require("./string.js");
var _literal = require("./literal.js");
const NO_PLACEHOLDER = (0, _options.validate)({
placeholderPattern: false
});
function createTemplateBuilder(formatter, defaultOpts) {
const templateFnCache = new WeakMap();
const templateAstCache = new WeakMap();
const cachedOpts = defaultOpts || (0, _options.validate)(null);
return Object.assign((tpl, ...args) => {
if (typeof tpl === "string") {
if (args.length > 1) throw new Error("Unexpected extra params.");
return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0]))));
} else if (Array.isArray(tpl)) {
let builder = templateFnCache.get(tpl);
if (!builder) {
builder = (0, _literal.default)(formatter, tpl, cachedOpts);
templateFnCache.set(tpl, builder);
}
return extendedTrace(builder(args));
} else if (typeof tpl === "object" && tpl) {
if (args.length > 0) throw new Error("Unexpected extra params.");
return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl)));
}
throw new Error(`Unexpected template param ${typeof tpl}`);
}, {
ast: (tpl, ...args) => {
if (typeof tpl === "string") {
if (args.length > 1) throw new Error("Unexpected extra params.");
return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))();
} else if (Array.isArray(tpl)) {
let builder = templateAstCache.get(tpl);
if (!builder) {
builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER));
templateAstCache.set(tpl, builder);
}
return builder(args)();
}
throw new Error(`Unexpected template param ${typeof tpl}`);
}
});
}
function extendedTrace(fn) {
let rootStack = "";
try {
throw new Error();
} catch (error) {
if (error.stack) {
rootStack = error.stack.split("\n").slice(3).join("\n");
}
}
return arg => {
try {
return fn(arg);
} catch (err) {
err.stack += `\n =============\n${rootStack}`;
throw err;
}
};
}
//# sourceMappingURL=builder.js.map
@@ -0,0 +1,11 @@
export { Item as BaseItem } from '@react-stately/collections';
import { ItemProps as ItemProps$1 } from '@react-types/shared';
import { As, HTMLHeroUIProps } from '@heroui/system';
/**
* A modified version of the ItemProps from @react-types/shared, with the addition of the HeroUI props.
*
*/
type ItemProps<Type extends As = "div", T extends object = {}> = ItemProps$1<T> & HTMLHeroUIProps<Type>;
export type { ItemProps };
@@ -0,0 +1,24 @@
// src/chevron-down.tsx
import { jsx } from "react/jsx-runtime";
var ChevronDownIcon = ({ strokeWidth = 1.5, ...props }) => /* @__PURE__ */ jsx(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth,
viewBox: "0 0 24 24",
width: "1em",
...props,
children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
}
);
export {
ChevronDownIcon
};
@@ -0,0 +1,131 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-unsafe-call',
meta: {
type: 'problem',
docs: {
description: 'Disallow calling a value with type `any`',
recommended: 'recommended',
requiresTypeChecking: true,
},
messages: {
unsafeCall: 'Unsafe call of a(n) {{type}} typed value.',
unsafeCallThis: [
'Unsafe call of a(n) {{type}} typed value. `this` is typed as {{type}}.',
'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.',
].join('\n'),
unsafeNew: 'Unsafe construction of a(n) {{type}} typed value.',
unsafeTemplateTag: 'Unsafe use of a(n) {{type}} typed template tag.',
},
schema: [],
},
defaultOptions: [],
create(context) {
const services = (0, util_1.getParserServices)(context);
const compilerOptions = services.program.getCompilerOptions();
const isNoImplicitThis = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'noImplicitThis');
function checkCall(node, reportingNode, messageId) {
const type = (0, util_1.getConstrainedTypeAtLocation)(services, node);
if ((0, util_1.isTypeAnyType)(type)) {
if (!isNoImplicitThis) {
// `this()` or `this.foo()` or `this.foo[bar]()`
const thisExpression = (0, util_1.getThisExpression)(node);
if (thisExpression &&
(0, util_1.isTypeAnyType)((0, util_1.getConstrainedTypeAtLocation)(services, thisExpression))) {
messageId = 'unsafeCallThis';
}
}
const isErrorType = tsutils.isIntrinsicErrorType(type);
context.report({
node: reportingNode,
messageId,
data: {
type: isErrorType ? '`error` type' : '`any`',
},
});
return;
}
if ((0, util_1.isBuiltinSymbolLike)(services.program, type, 'Function')) {
// this also matches subtypes of `Function`, like `interface Foo extends Function {}`.
//
// For weird TS reasons that I don't understand, these are
//
// safe to construct if:
// - they have at least one call signature _that is not void-returning_,
// - OR they have at least one construct signature.
//
// safe to call (including as template) if:
// - they have at least one call signature
// - OR they have at least one construct signature.
const constructSignatures = type.getConstructSignatures();
if (constructSignatures.length > 0) {
return;
}
const callSignatures = type.getCallSignatures();
if (messageId === 'unsafeNew') {
if (callSignatures.some(signature => !tsutils.isIntrinsicVoidType(signature.getReturnType()))) {
return;
}
}
else if (callSignatures.length > 0) {
return;
}
context.report({
node: reportingNode,
messageId,
data: {
type: '`Function`',
},
});
return;
}
}
return {
'CallExpression > *.callee'(node) {
checkCall(node, node, 'unsafeCall');
},
NewExpression(node) {
checkCall(node.callee, node, 'unsafeNew');
},
'TaggedTemplateExpression > *.tag'(node) {
checkCall(node, node, 'unsafeTemplateTag');
},
};
},
});
@@ -0,0 +1,5 @@
var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
function _classPrivateMethodInitSpec(e, a) {
checkPrivateRedeclaration(e, a), a.add(e);
}
module.exports = _classPrivateMethodInitSpec, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,30 @@
import { color } from '../color/index.mjs';
import { filter } from '../complex/filter.mjs';
import { numberValueTypes } from './number.mjs';
/**
* A map of default value types for common values
*/
const defaultValueTypes = {
...numberValueTypes,
// Color props
color,
backgroundColor: color,
outlineColor: color,
fill: color,
stroke: color,
// Border props
borderColor: color,
borderTopColor: color,
borderRightColor: color,
borderBottomColor: color,
borderLeftColor: color,
filter,
WebkitFilter: filter,
};
/**
* Gets the default ValueType for the provided value key
*/
const getDefaultValueType = (key) => defaultValueTypes[key];
export { defaultValueTypes, getDefaultValueType };
@@ -0,0 +1,3 @@
import { useLayoutEffect } from 'react';
declare const _default: typeof useLayoutEffect;
export default _default;
@@ -0,0 +1,47 @@
"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/linear/clock-circle-linear.tsx
var clock_circle_linear_exports = {};
__export(clock_circle_linear_exports, {
ClockCircleLinearIcon: () => ClockCircleLinearIcon
});
module.exports = __toCommonJS(clock_circle_linear_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var ClockCircleLinearIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 8v4l2.5 2.5", strokeLinecap: "round", strokeLinejoin: "round" })
] })
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ClockCircleLinearIcon
});
@@ -0,0 +1 @@
{"version":3,"file":"injectFrom.js","sourceRoot":"","sources":["../../../../src/metadata/decorators/injectFrom.ts"],"names":[],"mappings":";;AAWA,gCAcC;AAzBD,gFAA+E;AAE/E,gGAA6F;AAC7F,uEAAoE;AACpE,qFAAkF;AAClF,qGAAkG;AAClG,+EAA4E;AAC5E,iFAA8E;AAI9E,SAAgB,UAAU,CAAC,OAA0B;IACnD,sEAAsE;IACtE,MAAM,SAAS,GAAmB,CAAC,MAAgB,EAAQ,EAAE;QAC3D,MAAM,qBAAqB,GAAkB,IAAA,mCAAgB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAE5E,IAAA,iDAAwB,EACtB,MAAM,EACN,iDAAuB,EACvB,iDAAuB,EACvB,oCAAoC,CAAC,OAAO,EAAE,qBAAqB,CAAC,CACrE,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,oCAAoC,CAC3C,OAA0B,EAC1B,qBAAoC;IAEpC,MAAM,QAAQ,GAA+C,CAC3D,YAA2B,EACZ,EAAE,CAAC,CAAC;QACnB,oBAAoB,EAAE,IAAA,iEAA+B,EACnD,OAAO,EACP,qBAAqB,EACrB,YAAY,CACb;QACD,SAAS,EAAE,IAAA,2CAAoB,EAC7B,OAAO,EACP,qBAAqB,EACrB,YAAY,CACb;QACD,UAAU,EAAE,IAAA,6CAAqB,EAC/B,OAAO,EACP,qBAAqB,EACrB,YAAY,CACb;QACD,KAAK,EAAE,YAAY,CAAC,KAAK;KAC1B,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,156 @@
#!/usr/bin/env python3
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Pretty-prints the contents of a GYP file."""
import sys
import re
# Regex to remove comments when we're counting braces.
COMMENT_RE = re.compile(r"\s*#.*")
# Regex to remove quoted strings when we're counting braces.
# It takes into account quoted quotes, and makes sure that the quotes match.
# NOTE: It does not handle quotes that span more than one line, or
# cases where an escaped quote is preceded by an escaped backslash.
QUOTE_RE_STR = r'(?P<q>[\'"])(.*?)(?<![^\\][\\])(?P=q)'
QUOTE_RE = re.compile(QUOTE_RE_STR)
def comment_replace(matchobj):
return matchobj.group(1) + matchobj.group(2) + "#" * len(matchobj.group(3))
def mask_comments(input):
"""Mask the quoted strings so we skip braces inside quoted strings."""
search_re = re.compile(r"(.*?)(#)(.*)")
return [search_re.sub(comment_replace, line) for line in input]
def quote_replace(matchobj):
return "{}{}{}{}".format(
matchobj.group(1),
matchobj.group(2),
"x" * len(matchobj.group(3)),
matchobj.group(2),
)
def mask_quotes(input):
"""Mask the quoted strings so we skip braces inside quoted strings."""
search_re = re.compile(r"(.*?)" + QUOTE_RE_STR)
return [search_re.sub(quote_replace, line) for line in input]
def do_split(input, masked_input, search_re):
output = []
mask_output = []
for (line, masked_line) in zip(input, masked_input):
m = search_re.match(masked_line)
while m:
split = len(m.group(1))
line = line[:split] + r"\n" + line[split:]
masked_line = masked_line[:split] + r"\n" + masked_line[split:]
m = search_re.match(masked_line)
output.extend(line.split(r"\n"))
mask_output.extend(masked_line.split(r"\n"))
return (output, mask_output)
def split_double_braces(input):
"""Masks out the quotes and comments, and then splits appropriate
lines (lines that matche the double_*_brace re's above) before
indenting them below.
These are used to split lines which have multiple braces on them, so
that the indentation looks prettier when all laid out (e.g. closing
braces make a nice diagonal line).
"""
double_open_brace_re = re.compile(r"(.*?[\[\{\(,])(\s*)([\[\{\(])")
double_close_brace_re = re.compile(r"(.*?[\]\}\)],?)(\s*)([\]\}\)])")
masked_input = mask_quotes(input)
masked_input = mask_comments(masked_input)
(output, mask_output) = do_split(input, masked_input, double_open_brace_re)
(output, mask_output) = do_split(output, mask_output, double_close_brace_re)
return output
def count_braces(line):
"""keeps track of the number of braces on a given line and returns the result.
It starts at zero and subtracts for closed braces, and adds for open braces.
"""
open_braces = ["[", "(", "{"]
close_braces = ["]", ")", "}"]
closing_prefix_re = re.compile(r"[^\s\]\}\)]\s*[\]\}\)]+,?\s*$")
cnt = 0
stripline = COMMENT_RE.sub(r"", line)
stripline = QUOTE_RE.sub(r"''", stripline)
for char in stripline:
for brace in open_braces:
if char == brace:
cnt += 1
for brace in close_braces:
if char == brace:
cnt -= 1
after = False
if cnt > 0:
after = True
# This catches the special case of a closing brace having something
# other than just whitespace ahead of it -- we don't want to
# unindent that until after this line is printed so it stays with
# the previous indentation level.
if cnt < 0 and closing_prefix_re.match(stripline):
after = True
return (cnt, after)
def prettyprint_input(lines):
"""Does the main work of indenting the input based on the brace counts."""
indent = 0
basic_offset = 2
for line in lines:
if COMMENT_RE.match(line):
print(line)
else:
line = line.strip("\r\n\t ") # Otherwise doesn't strip \r on Unix.
if len(line) > 0:
(brace_diff, after) = count_braces(line)
if brace_diff != 0:
if after:
print(" " * (basic_offset * indent) + line)
indent += brace_diff
else:
indent += brace_diff
print(" " * (basic_offset * indent) + line)
else:
print(" " * (basic_offset * indent) + line)
else:
print("")
def main():
if len(sys.argv) > 1:
data = open(sys.argv[1]).read().splitlines()
else:
data = sys.stdin.read().splitlines()
# Split up the double braces.
lines = split_double_braces(data)
# Indent and print the output.
prettyprint_input(lines)
return 0
if __name__ == "__main__":
sys.exit(main())
@@ -0,0 +1,71 @@
{
"name": "source-map-js",
"description": "Generates and consumes source maps",
"version": "1.2.1",
"homepage": "https://github.com/7rulnik/source-map-js",
"author": "Valentin 7rulnik Semirulnik <v7rulnik@gmail.com>",
"contributors": [
"Nick Fitzgerald <nfitzgerald@mozilla.com>",
"Tobias Koppers <tobias.koppers@googlemail.com>",
"Duncan Beevers <duncan@dweebd.com>",
"Stephen Crane <scrane@mozilla.com>",
"Ryan Seddon <seddon.ryan@gmail.com>",
"Miles Elam <miles.elam@deem.com>",
"Mihai Bazon <mihai.bazon@gmail.com>",
"Michael Ficarra <github.public.email@michael.ficarra.me>",
"Todd Wolfson <todd@twolfson.com>",
"Alexander Solovyov <alexander@solovyov.net>",
"Felix Gnass <fgnass@gmail.com>",
"Conrad Irwin <conrad.irwin@gmail.com>",
"usrbincc <usrbincc@yahoo.com>",
"David Glasser <glasser@davidglasser.net>",
"Chase Douglas <chase@newrelic.com>",
"Evan Wallace <evan.exe@gmail.com>",
"Heather Arthur <fayearthur@gmail.com>",
"Hugh Kennedy <hughskennedy@gmail.com>",
"David Glasser <glasser@davidglasser.net>",
"Simon Lydell <simon.lydell@gmail.com>",
"Jmeas Smith <jellyes2@gmail.com>",
"Michael Z Goddard <mzgoddard@gmail.com>",
"azu <azu@users.noreply.github.com>",
"John Gozde <john@gozde.ca>",
"Adam Kirkton <akirkton@truefitinnovation.com>",
"Chris Montgomery <christopher.montgomery@dowjones.com>",
"J. Ryan Stinnett <jryans@gmail.com>",
"Jack Herrington <jherrington@walmartlabs.com>",
"Chris Truter <jeffpalentine@gmail.com>",
"Daniel Espeset <daniel@danielespeset.com>",
"Jamie Wong <jamie.lf.wong@gmail.com>",
"Eddy Bruël <ejpbruel@mozilla.com>",
"Hawken Rives <hawkrives@gmail.com>",
"Gilad Peleg <giladp007@gmail.com>",
"djchie <djchie.dev@gmail.com>",
"Gary Ye <garysye@gmail.com>",
"Nicolas Lalevée <nicolas.lalevee@hibnet.org>"
],
"repository": "7rulnik/source-map-js",
"main": "./source-map.js",
"files": [
"source-map.js",
"source-map.d.ts",
"lib/"
],
"engines": {
"node": ">=0.10.0"
},
"license": "BSD-3-Clause",
"scripts": {
"test": "npm run build && node test/run-tests.js",
"build": "webpack --color",
"toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md"
},
"devDependencies": {
"clean-publish": "^3.1.0",
"doctoc": "^0.15.0",
"webpack": "^1.12.0"
},
"clean-publish": {
"cleanDocs": true
},
"typings": "source-map.d.ts"
}
@@ -0,0 +1,18 @@
var baseConvert = require('./_baseConvert');
/**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
* version with conversion `options` applied.
*
* @param {Function} lodash The lodash function to convert.
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/
function browserConvert(lodash, options) {
return baseConvert(lodash, lodash, options);
}
if (typeof _ == 'function' && typeof _.runInContext == 'function') {
_ = browserConvert(_.runInContext());
}
module.exports = browserConvert;
@@ -0,0 +1,3 @@
/* ajv 6.12.6: Another JSON Schema Validator */
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Ajv=e()}(function(){return function o(i,n,l){function c(r,e){if(!n[r]){if(!i[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(u)return u(r,!0);var a=new Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}var s=n[r]={exports:{}};i[r][0].call(s.exports,function(e){return c(i[r][1][e]||e)},s,s.exports,o,i,n,l)}return n[r].exports}for(var u="function"==typeof require&&require,e=0;e<l.length;e++)c(l[e]);return c}({1:[function(e,r,t){"use strict";var a=r.exports=function(){this._cache={}};a.prototype.put=function(e,r){this._cache[e]=r},a.prototype.get=function(e){return this._cache[e]},a.prototype.del=function(e){delete this._cache[e]},a.prototype.clear=function(){this._cache={}}},{}],2:[function(e,r,t){"use strict";var a=e("./error_classes").MissingRef;function s(r,n,t){var l=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof n&&(t=n,n=void 0);var e=c(r).then(function(){var e=l._addSchema(r,void 0,n);return e.validate||function o(i){try{return l._compile(i)}catch(e){if(e instanceof a)return r(e);throw e}function r(e){var r=e.missingSchema;if(s(r))throw new Error("Schema "+r+" is loaded but "+e.missingRef+" cannot be resolved");var t=l._loadingSchemas[r];return t||(t=l._loadingSchemas[r]=l._opts.loadSchema(r)).then(a,a),t.then(function(e){if(!s(r))return c(e).then(function(){s(r)||l.addSchema(e,r,void 0,n)})}).then(function(){return o(i)});function a(){delete l._loadingSchemas[r]}function s(e){return l._refs[e]||l._schemas[e]}}}(e)});return t&&e.then(function(e){t(null,e)},t),e;function c(e){var r=e.$schema;return r&&!l.getSchema(r)?s.call(l,{$ref:r},!0):Promise.resolve()}}r.exports=s},{"./error_classes":3}],3:[function(e,r,t){"use strict";var a=e("./resolve");function s(e,r,t){this.message=t||s.message(e,r),this.missingRef=a.url(e,r),this.missingSchema=a.normalizeId(a.fullPath(this.missingRef))}function o(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e}r.exports={Validation:o(function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}),MissingRef:o(s)},s.message=function(e,r){return"can't resolve reference "+r+" from id "+e}},{"./resolve":6}],4:[function(e,r,t){"use strict";var a=e("./util"),o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31],n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,s=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FFLine truncated
//# sourceMappingURL=ajv.min.js.map
@@ -0,0 +1,60 @@
'use strict';
var through = require('through2');
function forward(chunk, enc, cb) {
cb(null, chunk);
}
function toThrough(readable) {
var opts = {
objectMode: readable._readableState.objectMode,
highWaterMark: readable._readableState.highWaterMark,
};
function flush(cb) {
var self = this;
readable.on('readable', onReadable);
readable.on('end', cb);
function onReadable() {
var chunk;
while (chunk = readable.read()) {
self.push(chunk);
}
}
}
var wrapper = through(opts, forward, flush);
var shouldFlow = true;
wrapper.once('pipe', onPipe);
wrapper.on('newListener', onListener);
readable.on('error', wrapper.emit.bind(wrapper, 'error'));
function onListener(event) {
// Once we've seen the data or readable event, check if we need to flow
if (event === 'data' || event === 'readable') {
maybeFlow();
this.removeListener('newListener', onListener);
}
}
function onPipe() {
// If the wrapper is piped, disable flow
shouldFlow = false;
}
function maybeFlow() {
// If we need to flow, end the stream which triggers flush
if (shouldFlow) {
wrapper.end();
}
}
return wrapper;
}
module.exports = toThrough;
@@ -0,0 +1,140 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
function getNormalizedOption(context) {
const rawOption = context.options[0] || "consistent";
if (rawOption === "consistent") {
return {
multiline: "consistent",
singleline: "consistent"
};
}
if (rawOption === "never") {
return {
multiline: "forbid",
singleline: "forbid"
};
}
return {
multiline: rawOption.multiline || "consistent",
singleline: rawOption.singleline || "consistent"
};
}
const messages = {
expectedBefore: "Expected newline before '}'.",
expectedAfter: "Expected newline after '{'.",
unexpectedBefore: "Unexpected newline before '}'.",
unexpectedAfter: "Unexpected newline after '{'."
};
var jsxCurlyNewline = utils.createRule({
name: "jsx-curly-newline",
package: "jsx",
meta: {
type: "layout",
docs: {
description: "Enforce consistent linebreaks in curly braces in JSX attributes and expressions"
},
fixable: "whitespace",
schema: [
{
anyOf: [
{
type: "string",
enum: ["consistent", "never"]
},
{
type: "object",
properties: {
singleline: {
type: "string",
enum: ["consistent", "require", "forbid"]
},
multiline: {
type: "string",
enum: ["consistent", "require", "forbid"]
}
},
additionalProperties: false
}
]
}
],
messages
},
create(context) {
const sourceCode = context.sourceCode;
const option = getNormalizedOption(context);
function isTokenOnSameLine(left, right) {
return left.loc.end.line === right.loc.start.line;
}
function shouldHaveNewlines(expression, hasLeftNewline) {
const isMultiline = expression.loc.start.line !== expression.loc.end.line;
switch (isMultiline ? option.multiline : option.singleline) {
case "forbid":
return false;
case "require":
return true;
case "consistent":
default:
return hasLeftNewline;
}
}
function validateCurlys(curlys, expression) {
const leftCurly = curlys.leftCurly;
const rightCurly = curlys.rightCurly;
const tokenAfterLeftCurly = sourceCode.getTokenAfter(leftCurly);
const tokenBeforeRightCurly = sourceCode.getTokenBefore(rightCurly);
const hasLeftNewline = !isTokenOnSameLine(leftCurly, tokenAfterLeftCurly);
const hasRightNewline = !isTokenOnSameLine(tokenBeforeRightCurly, rightCurly);
const needsNewlines = shouldHaveNewlines(expression, hasLeftNewline);
if (hasLeftNewline && !needsNewlines) {
context.report({
node: leftCurly,
messageId: "unexpectedAfter",
fix(fixer) {
return sourceCode.getText().slice(leftCurly.range[1], tokenAfterLeftCurly?.range[0]).trim() ? null : fixer.removeRange([leftCurly.range[1], tokenAfterLeftCurly.range[0]]);
}
});
} else if (!hasLeftNewline && needsNewlines) {
context.report({
node: leftCurly,
messageId: "expectedAfter",
fix: (fixer) => fixer.insertTextAfter(leftCurly, "\n")
});
}
if (hasRightNewline && !needsNewlines) {
context.report({
node: rightCurly,
messageId: "unexpectedBefore",
fix(fixer) {
return sourceCode.getText().slice(tokenBeforeRightCurly.range[1], rightCurly.range[0]).trim() ? null : fixer.removeRange([
tokenBeforeRightCurly.range[1],
rightCurly.range[0]
]);
}
});
} else if (!hasRightNewline && needsNewlines) {
context.report({
node: rightCurly,
messageId: "expectedBefore",
fix: (fixer) => fixer.insertTextBefore(rightCurly, "\n")
});
}
}
return {
JSXExpressionContainer(node) {
const curlyTokens = {
leftCurly: sourceCode.getFirstToken(node),
rightCurly: sourceCode.getLastToken(node)
};
validateCurlys(curlyTokens, node.expression);
}
};
}
});
module.exports = jsxCurlyNewline;
@@ -0,0 +1 @@
{"version":3,"names":["_toPropertyKey","require","_defineProperty","obj","key","value","toPropertyKey","Object","defineProperty","enumerable","configurable","writable"],"sources":["../../src/helpers/defineProperty.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\nimport toPropertyKey from \"./toPropertyKey.ts\";\n\nexport default function _defineProperty<T extends object>(\n obj: T,\n key: PropertyKey,\n value: any,\n) {\n key = toPropertyKey(key);\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true,\n });\n } else {\n // @ts-expect-error - Explicitly assigning to generic type key\n obj[key] = value;\n }\n return obj;\n}\n"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AAEe,SAASC,eAAeA,CACrCC,GAAM,EACNC,GAAgB,EAChBC,KAAU,EACV;EACAD,GAAG,GAAG,IAAAE,sBAAa,EAACF,GAAG,CAAC;EAMxB,IAAIA,GAAG,IAAID,GAAG,EAAE;IACdI,MAAM,CAACC,cAAc,CAACL,GAAG,EAAEC,GAAG,EAAE;MAC9BC,KAAK,EAAEA,KAAK;MACZI,UAAU,EAAE,IAAI;MAChBC,YAAY,EAAE,IAAI;MAClBC,QAAQ,EAAE;IACZ,CAAC,CAAC;EACJ,CAAC,MAAM;IAELR,GAAG,CAACC,GAAG,CAAC,GAAGC,KAAK;EAClB;EACA,OAAOF,GAAG;AACZ","ignoreList":[]}
@@ -0,0 +1 @@
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAaD,MAAM,oDAAgB,CAAA,GAAA,oBAAY,EAAU;IAC1C,UAAU;IACV,MAAM;IACN,SAAS,CAAC,OAAS;AACrB;AAYO,SAAS,0CAAe,KAA0B;IACvD,IAAI,YAAC,QAAQ,YAAE,QAAQ,WAAE,OAAO,EAAC,GAAG;IAEpC,IAAI,MAAM,CAAA,GAAA,cAAM,EAAE,IAAO,CAAA;YACvB,UAAU;YACV,MAAM,CAAC,QAAiB,WAAsB,MAAY;gBACxD,uCAAiB,QAAQ,CAAA;oBACvB,IAAI,0CAAqB,MAAM,YAC7B,SAAS,MAAM;yBAEf,0CAAS,MAAM;gBAEnB;YACF;YACA,SAAS,WAAY,CAAA,CAAC,OAAS,IAAG;QACpC,CAAA,GAAI;QAAC;QAAU;KAAQ;IAEvB,qBACE,gCAAC,oCAAc,QAAQ;QAAC,OAAO;OAC5B;AAGP;AAEO,SAAS;IACd,OAAO,CAAA,GAAA,iBAAS,EAAE;AACpB;AASO,SAAS,0CAAqB,IAAuB,EAAE,SAAoB;IAChF,qHAAqH;IACrH,IAAI,SAAS,KAAK,YAAY,CAAC;IAC/B,OACE,AAAC,CAAA,CAAC,UAAU,WAAW,OAAM,KAC7B,KAAK,MAAM,KAAK,SAAS,MAAM,IAC/B,CAAC,KAAK,YAAY,CAAC,eACnB,CAAC,UAAU,OAAO,IAAI,wBAAwB;IAC9C,CAAC,UAAU,OAAO,IAAI,4BAA4B;IAClD,CAAC,UAAU,MAAM,IAAI,WAAW;IAChC,CAAC,UAAU,QAAQ;AAEvB;AAEO,SAAS,0CAAS,MAAyB,EAAE,SAAoB,EAAE,aAAa,IAAI;QAOtE,oBAAA;IANnB,IAAI,WAAC,OAAO,WAAE,OAAO,UAAE,MAAM,YAAE,QAAQ,EAAC,GAAG;IAE3C,gGAAgG;IAChG,gGAAgG;IAChG,6GAA6G;IAC7G,mHAAmH;IACnH,IAAI,CAAA,GAAA,yCAAQ,SAAO,gBAAA,OAAO,KAAK,cAAZ,qCAAA,qBAAA,cAAc,IAAI,cAAlB,yCAAA,mBAAoB,UAAU,CAAC,WAAU,OAAO,MAAM,KAAK;QAC5E,IAAI,CAAA,GAAA,yCAAI,KACN,UAAU;aAEV,UAAU;;IAId,oGAAoG;IACpG,gIAAgI;IAChI,IAAI,QAAQ,CAAA,GAAA,yCAAO,OAAO,CAAA,GAAA,yCAAI,OAAO,CAAC,CAAA,GAAA,yCAAK,OAAO,OAE9C,IAAI,cAAc,WAAW;QAAC,eAAe;iBAAS;iBAAS;gBAAS;kBAAQ;IAAQ,KACxF,IAAI,WAAW,SAAS;iBAAC;iBAAS;gBAAS;kBAAQ;QAAU,SAAS;QAAM,YAAY;IAAI;IAC/F,0CAAiB,SAAS,GAAG;IAC9B,CAAA,GAAA,yCAAoB,EAAE;IACtB,OAAO,aAAa,CAAC;IACpB,0CAAiB,SAAS,GAAG;AAChC;AACA,uDAAuD;AACtD,0CAAiB,SAAS,GAAG;AAE9B,SAAS,uCAAiB,MAAe,EAAE,IAAuC;IAChF,IAAI,kBAAkB,mBACpB,KAAK;SACA,IAAI,OAAO,YAAY,CAAC,cAAc;QAC3C,IAAI,OAAO,SAAS,aAAa,CAAC;QAClC,KAAK,IAAI,GAAG,OAAO,YAAY,CAAC;QAChC,IAAI,OAAO,YAAY,CAAC,gBACtB,KAAK,MAAM,GAAG,OAAO,YAAY,CAAC;QAEpC,IAAI,OAAO,YAAY,CAAC,aACtB,KAAK,GAAG,GAAG,OAAO,YAAY,CAAC;QAEjC,IAAI,OAAO,YAAY,CAAC,kBACtB,KAAK,QAAQ,GAAG,OAAO,YAAY,CAAC;QAEtC,IAAI,OAAO,YAAY,CAAC,cACtB,KAAK,IAAI,GAAG,OAAO,YAAY,CAAC;QAElC,IAAI,OAAO,YAAY,CAAC,yBACtB,KAAK,cAAc,GAAG,OAAO,YAAY,CAAC;QAE5C,OAAO,WAAW,CAAC;QACnB,KAAK;QACL,OAAO,WAAW,CAAC;IACrB;AACF;AAEA,SAAS,wCAAkB,MAAe,EAAE,SAAoB;IAC9D,uCAAiB,QAAQ,CAAA,OAAQ,0CAAS,MAAM;AAClD;AAEO,SAAS,0CAAsB,KAAmB;IACvD,IAAI,SAAS;QACe;IAA5B,MAAM,OAAO,OAAO,OAAO,CAAC,CAAA,cAAA,MAAM,IAAI,cAAV,yBAAA,cAAc;IAC1C,OAAO;QACL,aAAa,MAAM,IAAI,GAAG,OAAO;QACjC,eAAe,MAAM,MAAM;QAC3B,YAAY,MAAM,GAAG;QACrB,iBAAiB,MAAM,QAAQ;QAC/B,aAAa,MAAM,IAAI;QACvB,wBAAwB,MAAM,cAAc;IAC9C;AACF;AAGO,SAAS,0CAAsB,KAAmB;IACvD,OAAO;QACL,aAAa,MAAM,IAAI;QACvB,eAAe,MAAM,MAAM;QAC3B,YAAY,MAAM,GAAG;QACrB,iBAAiB,MAAM,QAAQ;QAC/B,aAAa,MAAM,IAAI;QACvB,wBAAwB,MAAM,cAAc;IAC9C;AACF;AAEO,SAAS,0CAAa,KAAoB;IAC/C,IAAI,SAAS;QACe;IAA5B,MAAM,OAAO,OAAO,OAAO,CAAC,CAAA,cAAA,kBAAA,4BAAA,MAAO,IAAI,cAAX,yBAAA,cAAe;IAC3C,OAAO;QACL,MAAM,CAAA,kBAAA,4BAAA,MAAO,IAAI,IAAG,OAAO;QAC3B,MAAM,EAAE,kBAAA,4BAAA,MAAO,MAAM;QACrB,GAAG,EAAE,kBAAA,4BAAA,MAAO,GAAG;QACf,QAAQ,EAAE,kBAAA,4BAAA,MAAO,QAAQ;QACzB,IAAI,EAAE,kBAAA,4BAAA,MAAO,IAAI;QACjB,cAAc,EAAE,kBAAA,4BAAA,MAAO,cAAc;IACvC;AACF","sources":["packages/@react-aria/utils/src/openLink.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 {focusWithoutScrolling, isMac, isWebKit} from './index';\nimport {Href, LinkDOMProps, RouterOptions} from '@react-types/shared';\nimport {isFirefox, isIPad} from './platform';\nimport React, {createContext, ReactNode, useContext, useMemo} from 'react';\n\ninterface Router {\n isNative: boolean,\n open: (target: Element, modifiers: Modifiers, href: Href, routerOptions: RouterOptions | undefined) => void,\n useHref: (href: Href) => string\n}\n\nconst RouterContext = createContext<Router>({\n isNative: true,\n open: openSyntheticLink,\n useHref: (href) => href\n});\n\ninterface RouterProviderProps {\n navigate: (path: Href, routerOptions: RouterOptions | undefined) => void,\n useHref?: (href: Href) => string,\n children: ReactNode\n}\n\n/**\n * A RouterProvider accepts a `navigate` function from a framework or client side router,\n * and provides it to all nested React Aria links to enable client side navigation.\n */\nexport function RouterProvider(props: RouterProviderProps) {\n let {children, navigate, useHref} = props;\n\n let ctx = useMemo(() => ({\n isNative: false,\n open: (target: Element, modifiers: Modifiers, href: Href, routerOptions: RouterOptions | undefined) => {\n getSyntheticLink(target, link => {\n if (shouldClieLine truncated
@@ -0,0 +1,230 @@
"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/components/card.ts
var card_exports = {};
__export(card_exports, {
card: () => card
});
module.exports = __toCommonJS(card_exports);
// src/utils/tv.ts
var import_tailwind_variants = require("tailwind-variants");
// src/utils/tw-merge-config.ts
var COMMON_UNITS = ["small", "medium", "large"];
var twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: COMMON_UNITS,
borderRadius: COMMON_UNITS
},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
};
// src/utils/tv.ts
var tv = (options, config) => {
var _a, _b, _c;
return (0, import_tailwind_variants.tv)(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
// src/utils/classes.ts
var dataFocusVisibleClasses = [
"outline-none",
"data-[focus-visible=true]:z-10",
"data-[focus-visible=true]:outline-2",
"data-[focus-visible=true]:outline-focus",
"data-[focus-visible=true]:outline-offset-2"
];
// src/components/card.ts
var card = tv({
slots: {
base: [
"flex",
"flex-col",
"relative",
"overflow-hidden",
"h-auto",
"outline-none",
"text-foreground",
"box-border",
"bg-content1",
...dataFocusVisibleClasses
],
header: [
"flex",
"p-3",
"z-10",
"w-full",
"justify-start",
"items-center",
"shrink-0",
"overflow-inherit",
"color-inherit",
"subpixel-antialiased"
],
body: [
"relative",
"flex",
"flex-1",
"w-full",
"p-3",
"flex-auto",
"flex-col",
"place-content-inherit",
"align-items-inherit",
"h-auto",
"break-words",
"text-left",
"overflow-y-auto",
"subpixel-antialiased"
],
footer: [
"p-3",
"h-auto",
"flex",
"w-full",
"items-center",
"overflow-hidden",
"color-inherit",
"subpixel-antialiased"
]
},
variants: {
shadow: {
none: {
base: "shadow-none"
},
sm: {
base: "shadow-small"
},
md: {
base: "shadow-medium"
},
lg: {
base: "shadow-large"
}
},
radius: {
none: {
base: "rounded-none",
header: "rounded-none",
footer: "rounded-none"
},
sm: {
base: "rounded-small",
header: "rounded-t-small",
footer: "rounded-b-small"
},
md: {
base: "rounded-medium",
header: "rounded-t-medium",
footer: "rounded-b-medium"
},
lg: {
base: "rounded-large",
header: "rounded-t-large",
footer: "rounded-b-large"
}
},
fullWidth: {
true: {
base: "w-full"
}
},
isHoverable: {
true: {
base: "data-[hover=true]:bg-content2 dark:data-[hover=true]:bg-content2"
}
},
isPressable: {
true: { base: "cursor-pointer" }
},
isBlurred: {
true: {
base: [
"bg-background/80",
"dark:bg-background/20",
"backdrop-blur-md",
"backdrop-saturate-150"
]
}
},
isFooterBlurred: {
true: {
footer: ["bg-background/10", "backdrop-blur", "backdrop-saturate-150"]
}
},
isDisabled: {
true: {
base: "opacity-disabled cursor-not-allowed"
}
},
disableAnimation: {
true: "",
false: { base: "transition-transform-background motion-reduce:transition-none" }
}
},
compoundVariants: [
{
isPressable: true,
class: "data-[pressed=true]:scale-[0.97] tap-highlight-transparent"
}
],
defaultVariants: {
radius: "lg",
shadow: "md",
fullWidth: false,
isHoverable: false,
isPressable: false,
isDisabled: false,
isFooterBlurred: false
}
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
card
});
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Michel Weststrate
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,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ParameterDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class ParameterDefinition extends DefinitionBase_1.DefinitionBase {
/**
* Whether the parameter definition is a part of a rest parameter.
*/
isTypeDefinition = false;
isVariableDefinition = true;
rest;
constructor(name, node, rest) {
super(DefinitionType_1.DefinitionType.Parameter, name, node, null);
this.rest = rest;
}
}
exports.ParameterDefinition = ParameterDefinition;
@@ -0,0 +1,7 @@
declare function ToObject<T extends object>(value: number): Number;
declare function ToObject<T extends object>(value: boolean): Boolean;
declare function ToObject<T extends object>(value: string): String;
declare function ToObject<T extends object>(value: bigint): BigInt;
declare function ToObject<T extends object>(value: T): T;
export = ToObject;
@@ -0,0 +1,949 @@
flf2a$ 9 8 15 0 20 0 16255 0
Author : myflix
Date : 2004/9/26 12:46:52
Version: 1.0
-------------------------------------------------
-------------------------------------------------
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.
---
Font modified June 17, 2007 by patorjk
- Widened the space character.
Font modified May 26, 2012 by patorjk
- Switched the _ and - character (which were swapped).
- Added the 0xCA0 character
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $##
,---. #
| | #
| | #
| | #
| | #
| .' #
`--' #
.--. #
'--' ##
#
,--.,--. #
\ |\ | #
`-' `-' #
#
#
#
#
##
#
,-. ,-. #
| | | | #
,--| |-| |--.#
'--| |-| |--'#
'--| |-| |--'#
| | | | #
`-' `-' #
##
,-. #
.-| |-. #
| | |_/ #
\ | |. #
'-| | '. #
.- | | | #
| `| | / #
`-| |'` #
`-' ##
,-. #
,--. / / #
'--'/ / #
/ / #
/ / #
/ / #
/ / ,--. #
/ / '--' #
`-' ##
#
.-----. #
/ .-. \ #
| \_.' / #
/ .-. ',-. #
| | | . /_ #
\ '-' _.__)#
`----'' #
##
#
,--. #
\ | #
`-' #
#
#
#
#
##
,-. #
/ | #
' .' #
| | #
| | #
| | #
' '. #
\ | #
`-' ##
,-. #
| \ #
'. ' #
| | #
| | #
| | #
.' ' #
| / #
`-' ##
#
.-. #
.-,| |,-. #
_\ ' ' /_ #
(__ __) #
/ . . \ #
`-'| |`-' #
`-' #
##
#
#
,-. #
| | #
,---| |---. #
'---| |---' #
| | #
`-' #
##
#
#
#
#
#
#
#
.-. #
',/ ##
#
#
#
.-') #
_( OO) #
(,------. #
'------' #
#
##
#
#
#
#
#
#
#
.-. #
`-' ##
,-. #
/ / #
/ / #
/ / #
/ / #
/ / #
/ / #
/ / #
`-' ##
#
#
.----. #
/ .. \ #
. / \ . #
| | ' | #
' \ / ' #
\ `' / #
`---'' ##
#
#
.---. #
/_ | #
| | #
| | #
| | #
| | #
`---' ##
#
#
.-----. #
/ ,-. \ #
'-' | | #
.' / #
.' /__ #
| | #
`-------' ##
#
#
.-----. #
/ -. \ #
'-' _' | #
|_ < #
.-. | | #
\ `-' / #
`----'' ##
#
#
.---. #
/ . | #
/ /| | #
/ / | |_ #
/ '-' | #
`----| |-' #
`--' ##
#
#
.------. #
| ___| #
| '--. #
`---. '. #
.- | | #
| `-' / #
`----'' ##
#
#
,--. #
/ .' #
. / -. #
| .-. ' #
' \ | | #
\ `' / #
`----' ##
#
#
.--------. #
| __ ' #
`--' . / #
/ / #
. / #
/ / #
`--' ##
#
#
.-----. #
/ .-. \ #
| \_.' / #
/ .-. '. #
| | | | #
\ '-' / #
`----'' ##
#
#
.----. #
/ ,. \ #
| | \ | #
' `-' ' #
`- / ' #
,' / #
`---' ##
#
#
.-. #
`-' #
#
.-. #
`-' #
#
##
#
#
.-. #
'-' #
#
.-. #
',/ #
#
##
#
,-. #
/ / #
/ / #
/ / #
\ \ #
\ \ #
\ \ #
`-' ##
#
#
,-----. #
'-----' #
#
,-----. #
'-----' #
#
##
#
,-. #
\ \ #
\ \ #
\ \ #
/ / #
/ / #
/ / #
`-' ##
,------. #
' .--. ' #
| | | | #
'--' | | #
__. | #
| .' #
|___| #
.---. #
'---' ##
#
#
____ #
.' __ \ #
/ .' \ | #
| | (_/ | #
\ `.__.'\ #
`.___ .' #
##
('-. #
( OO ).-. #
/ . --. / #
| \-. \ #
.-'-' | | #
\| |_.' | #
| .-. | #
| | | | #
`--' `--' ##
.-. .-') #
\ ( OO ) #
;-----.\ #
| .-. | #
| '-' /_) #
| .-. `. #
| | \ | #
| '--' / #
`------' ##
#
#
.-----. #
' .--./ #
| |('-. #
/_) |OO ) #
|| |`-'| #
(_' '--'\ #
`-----' ##
_ .-') _ #
( ( OO) ) #
\ .'_ #
,`'--..._) #
| | \ ' #
| | ' | #
| | / : #
| '--' / #
`-------' ##
('-. #
_( OO) #
(,------. #
| .---' #
| | #
(| '--. #
| .--' #
| `---. #
`------' ##
#
#
,------. #
('-| _.---' #
(OO|(_\ #
/ | '--. #
\_)| .--' #
\| |_) #
`--' ##
#
#
,----. #
' .-./-') #
| |_( O- ) #
| | .--, \ #
(| | '. (_/ #
| '--' | #
`------' ##
('-. .-. #
( OO ) / #
,--. ,--. #
| | | | #
| .| | #
| | #
| .-. | #
| | | | #
`--' `--' ##
#
#
,-.-') #
| |OO) #
| | \ #
| |(_/ #
,| |_.' #
(_| | #
`--' ##
#
#
,--. #
.-')| ,| #
( OO |(_| #
| `-'| | #
,--. | | #
| '-' / #
`-----' ##
.-. .-') #
\ ( OO ) #
,--. ,--. #
| .' / #
| /, #
| ' _) #
| . \ #
| |\ \ #
`--' '--' ##
#
#
,--. #
| |.-') #
| | OO ) #
| |`-' | #
(| '---.' #
| | #
`------' ##
_ .-') #
( '.( OO )_ #
,--. ,--.)#
| `.' | #
| | #
| |'.'| | #
| | | | #
| | | | #
`--' `--' ##
.-') _ #
( OO ) ) #
,--./ ,--,' #
| \ | |\ #
| \| | ) #
| . |/ #
| |\ | #
| | \ | #
`--' `--' ##
#
#
.-'),-----. #
( OO' .-. '#
/ | | | |#
\_) | |\| |#
\ | | | |#
`' '-' '#
`-----' ##
_ (`-. #
( (OO ) #
_.` \ #
(__...--'' #
| / | | #
| |_.' | #
| .___.' #
| | #
`--' ##
.-') #
.( OO) #
(_)---\_) #
' .-. ' #
,| | | | #
(_| | | | #
| | | | #
' '-' '-.#
`-----'--'##
_ .-') #
( \( -O ) #
,------. #
| /`. ' #
| / | | #
| |_.' | #
| . '.' #
| |\ \ #
`--' '--' ##
.-') #
( OO ). #
(_)---\_) #
/ _ | #
\ :` `. #
'..`''.) #
.-._) \ #
\ / #
`-----' ##
.-') _ #
( OO) ) #
/ '._ #
|'--...__) #
'--. .--' #
| | #
| | #
| | #
`--' ##
#
#
,--. ,--. #
| | | | #
| | | .-') #
| |_|( OO )#
| | | `-' /#
(' '-'(_.-' #
`-----' ##
(`-. #
_(OO )_ #
,--(_/ ,. \#
\ \ /(__/#
\ \ / / #
\ ' /, #
\ /__)#
\ / #
`-' ##
(`\ .-') /`#
`.( OO ),'#
,--./ .--. #
| | | #
| | | |, #
| |.'.| |_)#
| | #
| ,'. | #
'--' '--' ##
) (`-. #
( OO ). #
(_/. \_)-. #
\ `.' / #
\ /\ #
\ \ | #
.' \_) #
/ .'. \ #
'--' '--' ##
#
#
,--. ,--.#
\ `.' / #
.-') / #
(OO \ / #
| / /\_ #
`-./ /.__) #
`--' ##
.-') _ #
( OO) ) #
,(_)----. #
| | #
'--. / #
(_/ / #
/ /___ #
| | #
`--------' ##
,----. #
| | #
| .-' #
| | #
| | #
| | #
| '-. #
| | #
`----' ##
,-. #
\ \ #
\ \ #
\ \ #
\ \ #
\ \ #
\ \ #
\ \ #
`-' ##
,----. #
| | #
`-. | #
| | #
| | #
| | #
.-' | #
| | #
`----' ##
#
#
,---. #
/ \ \ #
`--' `--' #
#
#
#
##
#
#
#
#
#
(`-. #
(OO )_ #
,------.) #
`------' ##
#
#
,--. #
'. \ #
`--' #
#
#
#
##
('-. #
( OO ).-. #
/ . --. / #
| \-. \ #
.-'-' | | #
\| |_.' | #
| .-. | #
| | | | #
`--' `--' ##
.-. .-') #
\ ( OO ) #
;-----.\ #
| .-. | #
| '-' /_) #
| .-. `. #
| | \ | #
| '--' / #
`------' ##
#
#
.-----. #
' .--./ #
| |('-. #
/_) |OO ) #
|| |`-'| #
(_' '--'\ #
`-----' ##
_ .-') _ #
( ( OO) ) #
\ .'_ #
,`'--..._) #
| | \ ' #
| | ' | #
| | / : #
| '--' / #
`-------' ##
('-. #
_( OO) #
(,------. #
| .---' #
| | #
(| '--. #
| .--' #
| `---. #
`------' ##
#
#
,------. #
('-| _.---' #
(OO|(_\ #
/ | '--. #
\_)| .--' #
\| |_) #
`--' ##
#
#
,----. #
' .-./-') #
| |_( O- ) #
| | .--, \ #
(| | '. (_/ #
| '--' | #
`------' ##
('-. .-. #
( OO ) / #
,--. ,--. #
| | | | #
| .| | #
| | #
| .-. | #
| | | | #
`--' `--' ##
#
#
,-.-') #
| |OO) #
| | \ #
| |(_/ #
,| |_.' #
(_| | #
`--' ##
#
#
,--. #
.-')| ,| #
( OO |(_| #
| `-'| | #
,--. | | #
| '-' / #
`-----' ##
.-. .-') #
\ ( OO ) #
,--. ,--. #
| .' / #
| /, #
| ' _) #
| . \ #
| |\ \ #
`--' '--' ##
#
#
,--. #
| |.-') #
| | OO ) #
| |`-' | #
(| '---.' #
| | #
`------' ##
_ .-') #
( '.( OO )_ #
,--. ,--.)#
| `.' | #
| | #
| |'.'| | #
| | | | #
| | | | #
`--' `--' ##
.-') _ #
( OO ) ) #
,--./ ,--,' #
| \ | |\ #
| \| | ) #
| . |/ #
| |\ | #
| | \ | #
`--' `--' ##
#
#
.-'),-----. #
( OO' .-. '#
/ | | | |#
\_) | |\| |#
\ | | | |#
`' '-' '#
`-----' ##
_ (`-. #
( (OO ) #
_.` \ #
(__...--'' #
| / | | #
| |_.' | #
| .___.' #
| | #
`--' ##
.-') #
.( OO) #
(_)---\_) #
' .-. ' #
,| | | | #
(_| | | | #
| | | | #
' '-' '-.#
`-----'--'##
_ .-') #
( \( -O ) #
,------. #
| /`. ' #
| / | | #
| |_.' | #
| . '.' #
| |\ \ #
`--' '--' ##
.-') #
( OO ). #
(_)---\_) #
/ _ | #
\ :` `. #
'..`''.) #
.-._) \ #
\ / #
`-----' ##
.-') _ #
( OO) ) #
/ '._ #
|'--...__) #
'--. .--' #
| | #
| | #
| | #
`--' ##
#
#
,--. ,--. #
| | | | #
| | | .-') #
| |_|( OO )#
| | | `-' /#
(' '-'(_.-' #
`-----' ##
(`-. #
_(OO )_ #
,--(_/ ,. \#
\ \ /(__/#
\ \ / / #
\ ' /, #
\ /__)#
\ / #
`-' ##
(`\ .-') /`#
`.( OO ),'#
,--./ .--. #
| | | #
| | | |, #
| |.'.| |_)#
| | #
| ,'. | #
'--' '--' ##
) (`-. #
( OO ). #
(_/. \_)-. #
\ `.' / #
\ /\ #
\ \ | #
.' \_) #
/ .'. \ #
'--' '--' ##
#
#
,--. ,--.#
\ `.' / #
.-') / #
(OO \ / #
| / /\_ #
`-./ /.__) #
`--' ##
.-') _ #
( OO) ) #
,(_)----. #
| | #
'--. / #
(_/ / #
/ /___ #
| | #
`--------' ##
,--. #
| | #
| .' #
.' / #
< < #
`. \ #
| '. #
| | #
`--' ##
,-. #
| | #
| | #
| | #
| | #
| | #
| | #
| | #
`-' ##
,--. #
| | #
'. | #
\ ` #
> > #
/ . #
.' | #
| | #
`--' ##
#
.--, #
.--' / #
/ ---` #
`--' #
#
#
#
##
('-. #
( OO ).-. #
/ . --. / #
| \-. \ #
.-'-' | | #
\| |_.' | #
| .-. | #
| | | | #
`--' `--' ##
#
#
.-'),-----. #
( OO' .-. '#
/ | | | |#
\_) | |\| |#
\ | | | |#
`' '-' '#
`-----' ##
#
#
,--. ,--. #
| | | | #
| | | .-') #
| |_|( OO )#
| | | `-' /#
(' '-'(_.-' #
`-----' ##
('-. #
( OO ).-. #
/ . --. / #
| \-. \ #
.-'-' | | #
\| |_.' | #
| .-. | #
| | | | #
`--' `--' ##
#
#
.-'),-----. #
( OO' .-. '#
/ | | | |#
\_) | |\| |#
\ | | | |#
`' '-' '#
`-----' ##
#
#
,--. ,--. #
| | | | #
| | | .-') #
| |_|( OO )#
| | | `-' /#
(' '-'(_.-' #
`-----' ##
ß#
#
#
#
#
#
#
#
##
0xCA0 KANNADA LETTER TTHA
#
#
_ _ _ _)#
|______/ #
,-----. #
' .-. ' #
| | | | #
' '-' ' #
`-----' ##
@@ -0,0 +1,878 @@
import type {
Action,
Dispatch,
Middleware,
MiddlewareAPI,
UnknownAction,
} from 'redux'
import type { ThunkDispatch } from 'redux-thunk'
import type { BaseActionCreator, PayloadAction } from '../createAction'
import type { TypedActionCreator } from '../mapBuilders'
import type { TaskAbortError } from './exceptions'
/**
* @internal
* At the time of writing `lib.dom.ts` does not provide `abortSignal.reason`.
*/
export type AbortSignalWithReason<T> = AbortSignal & { reason?: T }
/**
* Types copied from RTK
*/
/** @internal */
type TypedActionCreatorWithMatchFunction<Type extends string> =
TypedActionCreator<Type> & {
match: MatchFunction<any>
}
/** @internal */
export type AnyListenerPredicate<State> = (
action: UnknownAction,
currentState: State,
originalState: State,
) => boolean
/** @public */
export type ListenerPredicate<ActionType extends Action, State> = (
action: UnknownAction,
currentState: State,
originalState: State,
) => action is ActionType
/** @public */
export interface ConditionFunction<State> {
(predicate: AnyListenerPredicate<State>, timeout?: number): Promise<boolean>
(predicate: AnyListenerPredicate<State>, timeout?: number): Promise<boolean>
(predicate: () => boolean, timeout?: number): Promise<boolean>
}
/** @internal */
export type MatchFunction<T> = (v: any) => v is T
/** @public */
export interface ForkedTaskAPI {
/**
* Returns a promise that resolves when `waitFor` resolves or
* rejects if the task or the parent listener has been cancelled or is completed.
*/
pause<W>(waitFor: Promise<W>): Promise<W>
/**
* Returns a promise that resolves after `timeoutMs` or
* rejects if the task or the parent listener has been cancelled or is completed.
* @param timeoutMs
*/
delay(timeoutMs: number): Promise<void>
/**
* An abort signal whose `aborted` property is set to `true`
* if the task execution is either aborted or completed.
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
*/
signal: AbortSignal
}
/** @public */
export interface AsyncTaskExecutor<T> {
(forkApi: ForkedTaskAPI): Promise<T>
}
/** @public */
export interface SyncTaskExecutor<T> {
(forkApi: ForkedTaskAPI): T
}
/** @public */
export type ForkedTaskExecutor<T> = AsyncTaskExecutor<T> | SyncTaskExecutor<T>
/** @public */
export type TaskResolved<T> = {
readonly status: 'ok'
readonly value: T
}
/** @public */
export type TaskRejected = {
readonly status: 'rejected'
readonly error: unknown
}
/** @public */
export type TaskCancelled = {
readonly status: 'cancelled'
readonly error: TaskAbortError
}
/** @public */
export type TaskResult<Value> =
| TaskResolved<Value>
| TaskRejected
| TaskCancelled
/** @public */
export interface ForkedTask<T> {
/**
* A promise that resolves when the task is either completed or cancelled or rejects
* if parent listener execution is cancelled or completed.
*
* ### Example
* ```ts
* const result = await fork(async (forkApi) => Promise.resolve(4)).result
*
* if(result.status === 'ok') {
* console.log(result.value) // logs 4
* }}
* ```
*/
result: Promise<TaskResult<T>>
/**
* Cancel task if it is in progress or not yet started,
* it is noop otherwise.
*/
cancel(): void
}
/** @public */
export interface ForkOptions {
/**
* If true, causes the parent task to not be marked as complete until
* all autoJoined forks have completed or failed.
*/
autoJoin: boolean
}
/** @public */
export interface ListenerEffectAPI<
State,
DispatchType extends Dispatch,
ExtraArgument = unknown,
> extends MiddlewareAPI<DispatchType, State> {
/**
* Returns the store state as it existed when the action was originally dispatched, _before_ the reducers ran.
*
* ### Synchronous invocation
*
* This function can **only** be invoked **synchronously**, it throws error otherwise.
*
* @example
*
* ```ts
* middleware.startListening({
* predicate: () => true,
* async effect(_, { getOriginalState }) {
* getOriginalState(); // sync: OK!
*
* setTimeout(getOriginalState, 0); // async: throws Error
*
* await Promise().resolve();
*
* getOriginalState() // async: throws Error
* }
* })
* ```
*/
getOriginalState: () => State
/**
* Removes the listener entry from the middleware and prevent future instances of the listener from running.
*
* It does **not** cancel any active instances.
*/
unsubscribe(): void
/**
* It will subscribe a listener if it was previously removed, noop otherwise.
*/
subscribe(): void
/**
* Returns a promise that resolves when the input predicate returns `true` or
* rejects if the listener has been cancelled or is completed.
*
* The return value is `true` if the predicate succeeds or `false` if a timeout is provided and expires first.
*
* ### Example
*
* ```ts
* const updateBy = createAction<number>('counter/updateBy');
*
* middleware.startListening({
* actionCreator: updateBy,
* async effect(_, { condition }) {
* // wait at most 3s for `updateBy` actions.
* if(await condition(updateBy.match, 3_000)) {
* // `updateBy` has been dispatched twice in less than 3s.
* }
* }
* })
* ```
*/
condition: ConditionFunction<State>
/**
* Returns a promise that resolves when the input predicate returns `true` or
* rejects if the listener has been cancelled or is completed.
*
* The return value is the `[action, currentState, previousState]` combination that the predicate saw as arguments.
*
* The promise resolves to null if a timeout is provided and expires first,
*
* ### Example
*
* ```ts
* const updateBy = createAction<number>('counter/updateBy');
*
* middleware.startListening({
* actionCreator: updateBy,
* async effect(_, { take }) {
* const [{ payload }] = await take(updateBy.match);
* console.log(payload); // logs 5;
* }
* })
*
* store.dispatch(updateBy(5));
* ```
*/
take: TakePattern<State>
/**
* Cancels all other running instances of this same listener except for the one that made this call.
*/
cancelActiveListeners: () => void
/**
* Cancels the instance of this listener that made this call.
*/
cancel: () => void
/**
* Throws a `TaskAbortError` if this listener has been cancelled
*/
throwIfCancelled: () => void
/**
* An abort signal whose `aborted` property is set to `true`
* if the listener execution is either aborted or completed.
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
*/
signal: AbortSignal
/**
* Returns a promise that resolves after `timeoutMs` or
* rejects if the listener has been cancelled or is completed.
*/
delay(timeoutMs: number): Promise<void>
/**
* Queues in the next microtask the execution of a task.
* @param executor
* @param options
*/
fork<T>(executor: ForkedTaskExecutor<T>, options?: ForkOptions): ForkedTask<T>
/**
* Returns a promise that resolves when `waitFor` resolves or
* rejects if the listener has been cancelled or is completed.
* @param promise
*/
pause<M>(promise: Promise<M>): Promise<M>
extra: ExtraArgument
}
/** @public */
export type ListenerEffect<
ActionType extends Action,
State,
DispatchType extends Dispatch,
ExtraArgument = unknown,
> = (
action: ActionType,
api: ListenerEffectAPI<State, DispatchType, ExtraArgument>,
) => void | Promise<void>
/**
* @public
* Additional infos regarding the error raised.
*/
export interface ListenerErrorInfo {
/**
* Which function has generated the exception.
*/
raisedBy: 'effect' | 'predicate'
}
/**
* @public
* Gets notified with synchronous and asynchronous errors raised by `listeners` or `predicates`.
* @param error The thrown error.
* @param errorInfo Additional information regarding the thrown error.
*/
export interface ListenerErrorHandler {
(error: unknown, errorInfo: ListenerErrorInfo): void
}
/** @public */
export interface CreateListenerMiddlewareOptions<ExtraArgument = unknown> {
extra?: ExtraArgument
/**
* Receives synchronous errors that are raised by `listener` and `listenerOption.predicate`.
*/
onError?: ListenerErrorHandler
}
/** @public */
export type ListenerMiddleware<
State = unknown,
DispatchType extends ThunkDispatch<State, unknown, Action> = ThunkDispatch<
State,
unknown,
UnknownAction
>,
ExtraArgument = unknown,
> = Middleware<
{
(action: Action<'listenerMiddleware/add'>): UnsubscribeListener
},
State,
DispatchType
>
/** @public */
export interface ListenerMiddlewareInstance<
StateType = unknown,
DispatchType extends ThunkDispatch<
StateType,
unknown,
Action
> = ThunkDispatch<StateType, unknown, UnknownAction>,
ExtraArgument = unknown,
> {
middleware: ListenerMiddleware<StateType, DispatchType, ExtraArgument>
startListening: AddListenerOverloads<
UnsubscribeListener,
StateType,
DispatchType,
ExtraArgument
> &
TypedStartListening<StateType, DispatchType, ExtraArgument>
stopListening: RemoveListenerOverloads<StateType, DispatchType> &
TypedStopListening<StateType, DispatchType>
/**
* Unsubscribes all listeners, cancels running listeners and tasks.
*/
clearListeners: () => void
}
/**
* API Function Overloads
*/
/** @public */
export type TakePatternOutputWithoutTimeout<
State,
Predicate extends AnyListenerPredicate<State>,
> =
Predicate extends MatchFunction<infer ActionType>
? Promise<[ActionType, State, State]>
: Promise<[UnknownAction, State, State]>
/** @public */
export type TakePatternOutputWithTimeout<
State,
Predicate extends AnyListenerPredicate<State>,
> =
Predicate extends MatchFunction<infer ActionType>
? Promise<[ActionType, State, State] | null>
: Promise<[UnknownAction, State, State] | null>
/** @public */
export interface TakePattern<State> {
<Predicate extends AnyListenerPredicate<State>>(
predicate: Predicate,
): TakePatternOutputWithoutTimeout<State, Predicate>
<Predicate extends AnyListenerPredicate<State>>(
predicate: Predicate,
timeout: number,
): TakePatternOutputWithTimeout<State, Predicate>
<Predicate extends AnyListenerPredicate<State>>(
predicate: Predicate,
timeout?: number | undefined,
): TakePatternOutputWithTimeout<State, Predicate>
}
/** @public */
export interface UnsubscribeListenerOptions {
cancelActive?: true
}
/** @public */
export type UnsubscribeListener = (
unsubscribeOptions?: UnsubscribeListenerOptions,
) => void
/**
* @public
* The possible overloads and options for defining a listener. The return type of each function is specified as a generic arg, so the overloads can be reused for multiple different functions
*/
export type AddListenerOverloads<
Return,
StateType = unknown,
DispatchType extends Dispatch = ThunkDispatch<
StateType,
unknown,
UnknownAction
>,
ExtraArgument = unknown,
AdditionalOptions = unknown,
> = {
/** Accepts a "listener predicate" that is also a TS type predicate for the action*/
<
MiddlewareActionType extends UnknownAction,
ListenerPredicateType extends ListenerPredicate<
MiddlewareActionType,
StateType
>,
>(
options: {
actionCreator?: never
type?: never
matcher?: never
predicate: ListenerPredicateType
effect: ListenerEffect<
ListenerPredicateGuardedActionType<ListenerPredicateType>,
StateType,
DispatchType,
ExtraArgument
>
} & AdditionalOptions,
): Return
/** Accepts an RTK action creator, like `incrementByAmount` */
<ActionCreatorType extends TypedActionCreatorWithMatchFunction<any>>(
options: {
actionCreator: ActionCreatorType
type?: never
matcher?: never
predicate?: never
effect: ListenerEffect<
ReturnType<ActionCreatorType>,
StateType,
DispatchType,
ExtraArgument
>
} & AdditionalOptions,
): Return
/** Accepts a specific action type string */
<T extends string>(
options: {
actionCreator?: never
type: T
matcher?: never
predicate?: never
effect: ListenerEffect<Action<T>, StateType, DispatchType, ExtraArgument>
} & AdditionalOptions,
): Return
/** Accepts an RTK matcher function, such as `incrementByAmount.match` */
<MatchFunctionType extends MatchFunction<UnknownAction>>(
options: {
actionCreator?: never
type?: never
matcher: MatchFunctionType
predicate?: never
effect: ListenerEffect<
GuardedType<MatchFunctionType>,
StateType,
DispatchType,
ExtraArgument
>
} & AdditionalOptions,
): Return
/** Accepts a "listener predicate" that just returns a boolean, no type assertion */
<ListenerPredicateType extends AnyListenerPredicate<StateType>>(
options: {
actionCreator?: never
type?: never
matcher?: never
predicate: ListenerPredicateType
effect: ListenerEffect<
UnknownAction,
StateType,
DispatchType,
ExtraArgument
>
} & AdditionalOptions,
): Return
}
/** @public */
export type RemoveListenerOverloads<
StateType = unknown,
DispatchType extends Dispatch = ThunkDispatch<
StateType,
unknown,
UnknownAction
>,
ExtraArgument = unknown,
> = AddListenerOverloads<
boolean,
StateType,
DispatchType,
ExtraArgument,
UnsubscribeListenerOptions
>
/** @public */
export interface RemoveListenerAction<
ActionType extends UnknownAction,
State,
DispatchType extends Dispatch,
> {
type: 'listenerMiddleware/remove'
payload: {
type: string
listener: ListenerEffect<ActionType, State, DispatchType>
}
}
/**
* A "pre-typed" version of `addListenerAction`, so the listener args are well-typed
*
* @public
*/
export type TypedAddListener<
StateType,
DispatchType extends Dispatch = ThunkDispatch<
StateType,
unknown,
UnknownAction
>,
ExtraArgument = unknown,
Payload = ListenerEntry<StateType, DispatchType>,
T extends string = 'listenerMiddleware/add',
> = BaseActionCreator<Payload, T> &
AddListenerOverloads<
PayloadAction<Payload, T>,
StateType,
DispatchType,
ExtraArgument
> & {
/**
* Creates a "pre-typed" version of `addListener`
* where the `state`, `dispatch` and `extra` types are predefined.
*
* This allows you to set the `state`, `dispatch` and `extra` types once,
* eliminating the need to specify them with every `addListener` call.
*
* @returns A pre-typed `addListener` with the state, dispatch and extra types already defined.
*
* @example
* ```ts
* import { addListener } from '@reduxjs/toolkit'
*
* export const addAppListener = addListener.withTypes<RootState, AppDispatch, ExtraArguments>()
* ```
*
* @template OverrideStateType - The specific type of state the middleware listener operates on.
* @template OverrideDispatchType - The specific type of the dispatch function.
* @template OverrideExtraArgument - The specific type of the extra object.
*
* @since 2.1.0
*/
withTypes: <
OverrideStateType extends StateType,
OverrideDispatchType extends Dispatch = ThunkDispatch<
OverrideStateType,
unknown,
UnknownAction
>,
OverrideExtraArgument = unknown,
>() => TypedAddListener<
OverrideStateType,
OverrideDispatchType,
OverrideExtraArgument
>
}
/**
* A "pre-typed" version of `removeListenerAction`, so the listener args are well-typed
*
* @public
*/
export type TypedRemoveListener<
StateType,
DispatchType extends Dispatch = ThunkDispatch<
StateType,
unknown,
UnknownAction
>,
ExtraArgument = unknown,
Payload = ListenerEntry<StateType, DispatchType>,
T extends string = 'listenerMiddleware/remove',
> = BaseActionCreator<Payload, T> &
AddListenerOverloads<
PayloadAction<Payload, T>,
StateType,
DispatchType,
ExtraArgument,
UnsubscribeListenerOptions
> & {
/**
* Creates a "pre-typed" version of `removeListener`
* where the `state`, `dispatch` and `extra` types are predefined.
*
* This allows you to set the `state`, `dispatch` and `extra` types once,
* eliminating the need to specify them with every `removeListener` call.
*
* @returns A pre-typed `removeListener` with the state, dispatch and extra
* types already defined.
*
* @example
* ```ts
* import { removeListener } from '@reduxjs/toolkit'
*
* export const removeAppListener = removeListener.withTypes<
* RootState,
* AppDispatch,
* ExtraArguments
* >()
* ```
*
* @template OverrideStateType - The specific type of state the middleware listener operates on.
* @template OverrideDispatchType - The specific type of the dispatch function.
* @template OverrideExtraArgument - The specific type of the extra object.
*
* @since 2.1.0
*/
withTypes: <
OverrideStateType extends StateType,
OverrideDispatchType extends Dispatch = ThunkDispatch<
OverrideStateType,
unknown,
UnknownAction
>,
OverrideExtraArgument = unknown,
>() => TypedRemoveListener<
OverrideStateType,
OverrideDispatchType,
OverrideExtraArgument
>
}
/**
* A "pre-typed" version of `middleware.startListening`, so the listener args are well-typed
*
* @public
*/
export type TypedStartListening<
StateType,
DispatchType extends Dispatch = ThunkDispatch<
StateType,
unknown,
UnknownAction
>,
ExtraArgument = unknown,
> = AddListenerOverloads<
UnsubscribeListener,
StateType,
DispatchType,
ExtraArgument
> & {
/**
* Creates a "pre-typed" version of
* {@linkcode ListenerMiddlewareInstance.startListening startListening}
* where the `state`, `dispatch` and `extra` types are predefined.
*
* This allows you to set the `state`, `dispatch` and `extra` types once,
* eliminating the need to specify them with every
* {@linkcode ListenerMiddlewareInstance.startListening startListening} call.
*
* @returns A pre-typed `startListening` with the state, dispatch and extra types already defined.
*
* @example
* ```ts
* import { createListenerMiddleware } from '@reduxjs/toolkit'
*
* const listenerMiddleware = createListenerMiddleware()
*
* export const startAppListening = listenerMiddleware.startListening.withTypes<
* RootState,
* AppDispatch,
* ExtraArguments
* >()
* ```
*
* @template OverrideStateType - The specific type of state the middleware listener operates on.
* @template OverrideDispatchType - The specific type of the dispatch function.
* @template OverrideExtraArgument - The specific type of the extra object.
*
* @since 2.1.0
*/
withTypes: <
OverrideStateType extends StateType,
OverrideDispatchType extends Dispatch = ThunkDispatch<
OverrideStateType,
unknown,
UnknownAction
>,
OverrideExtraArgument = unknown,
>() => TypedStartListening<
OverrideStateType,
OverrideDispatchType,
OverrideExtraArgument
>
}
/**
* A "pre-typed" version of `middleware.stopListening`, so the listener args are well-typed
*
* @public
*/
export type TypedStopListening<
StateType,
DispatchType extends Dispatch = ThunkDispatch<
StateType,
unknown,
UnknownAction
>,
ExtraArgument = unknown,
> = RemoveListenerOverloads<StateType, DispatchType, ExtraArgument> & {
/**
* Creates a "pre-typed" version of
* {@linkcode ListenerMiddlewareInstance.stopListening stopListening}
* where the `state`, `dispatch` and `extra` types are predefined.
*
* This allows you to set the `state`, `dispatch` and `extra` types once,
* eliminating the need to specify them with every
* {@linkcode ListenerMiddlewareInstance.stopListening stopListening} call.
*
* @returns A pre-typed `stopListening` with the state, dispatch and extra types already defined.
*
* @example
* ```ts
* import { createListenerMiddleware } from '@reduxjs/toolkit'
*
* const listenerMiddleware = createListenerMiddleware()
*
* export const stopAppListening = listenerMiddleware.stopListening.withTypes<
* RootState,
* AppDispatch,
* ExtraArguments
* >()
* ```
*
* @template OverrideStateType - The specific type of state the middleware listener operates on.
* @template OverrideDispatchType - The specific type of the dispatch function.
* @template OverrideExtraArgument - The specific type of the extra object.
*
* @since 2.1.0
*/
withTypes: <
OverrideStateType extends StateType,
OverrideDispatchType extends Dispatch = ThunkDispatch<
OverrideStateType,
unknown,
UnknownAction
>,
OverrideExtraArgument = unknown,
>() => TypedStopListening<
OverrideStateType,
OverrideDispatchType,
OverrideExtraArgument
>
}
/**
* A "pre-typed" version of `createListenerEntry`, so the listener args are well-typed
*
* @public
*/
export type TypedCreateListenerEntry<
StateType,
DispatchType extends Dispatch = ThunkDispatch<
StateType,
unknown,
UnknownAction
>,
ExtraArgument = unknown,
> = AddListenerOverloads<
ListenerEntry<StateType, DispatchType>,
StateType,
DispatchType,
ExtraArgument
> & {
/**
* Creates a "pre-typed" version of `createListenerEntry`
* where the `state`, `dispatch` and `extra` types are predefined.
*
* This allows you to set the `state`, `dispatch` and `extra` types once, eliminating
* the need to specify them with every `createListenerEntry` call.
*
* @returns A pre-typed `createListenerEntry` with the state, dispatch and extra
* types already defined.
*
* @example
* ```ts
* import { createListenerEntry } from '@reduxjs/toolkit'
*
* export const createAppListenerEntry = createListenerEntry.withTypes<
* RootState,
* AppDispatch,
* ExtraArguments
* >()
* ```
*
* @template OverrideStateType - The specific type of state the middleware listener operates on.
* @template OverrideDispatchType - The specific type of the dispatch function.
* @template OverrideExtraArgument - The specific type of the extra object.
*
* @since 2.1.0
*/
withTypes: <
OverrideStateType extends StateType,
OverrideDispatchType extends Dispatch = ThunkDispatch<
OverrideStateType,
unknown,
UnknownAction
>,
OverrideExtraArgument = unknown,
>() => TypedStopListening<
OverrideStateType,
OverrideDispatchType,
OverrideExtraArgument
>
}
/**
* Internal Types
*/
/** @internal An single listener entry */
export type ListenerEntry<
State = unknown,
DispatchType extends Dispatch = Dispatch,
> = {
id: string
effect: ListenerEffect<any, State, DispatchType>
unsubscribe: () => void
pending: Set<AbortController>
type?: string
predicate: ListenerPredicate<UnknownAction, State>
}
/**
* @internal
* A shorthand form of the accepted args, solely so that `createListenerEntry` has validly-typed conditional logic when checking the options contents
*/
export type FallbackAddListenerOptions = {
actionCreator?: TypedActionCreatorWithMatchFunction<string>
type?: string
matcher?: MatchFunction<any>
predicate?: ListenerPredicate<any, any>
} & { effect: ListenerEffect<any, any, any> }
/**
* Utility Types
*/
/** @public */
export type GuardedType<T> = T extends (x: any, ...args: any[]) => x is infer T
? T
: never
/** @public */
export type ListenerPredicateGuardedActionType<T> =
T extends ListenerPredicate<infer ActionType, any> ? ActionType : never
@@ -0,0 +1,85 @@
{
"name": "call-bind-apply-helpers",
"version": "1.0.2",
"description": "Helper functions around Function call/apply/bind, for use in `call-bind`",
"main": "index.js",
"exports": {
".": "./index.js",
"./actualApply": "./actualApply.js",
"./applyBind": "./applyBind.js",
"./functionApply": "./functionApply.js",
"./functionCall": "./functionCall.js",
"./reflectApply": "./reflectApply.js",
"./package.json": "./package.json"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=auto",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"prelint": "evalmd README.md",
"lint": "eslint --ext=.js,.mjs .",
"postlint": "tsc -p . && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/call-bind-apply-helpers.git"
},
"author": "Jordan Harband <ljharb@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/ljharb/call-bind-apply-helpers/issues"
},
"homepage": "https://github.com/ljharb/call-bind-apply-helpers#readme",
"dependencies": {
"es-errors": "^1.3.0",
"function-bind": "^1.1.2"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.3",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.3",
"@types/for-each": "^0.3.3",
"@types/function-bind": "^1.1.10",
"@types/object-inspect": "^1.13.0",
"@types/tape": "^5.8.1",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.7.1",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"for-each": "^0.3.5",
"has-strict-mode": "^1.1.0",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.4",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"testling": {
"files": "test/index.js"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1,34 @@
import type * as normal from './index'
import type * as rsc from './index-rsc'
// checks to make sure we didn't forgot to replicate any exports
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _check: typeof normal = {} as typeof rsc
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _check2: typeof rsc = {} as typeof normal
// -------------------------------------------------------------------------------------
const throwNotSupportedError = ((
// eslint-disable-next-line @typescript-eslint/no-unused-vars
...args: any[]
): any => {
throw new Error(
'This function is not supported in React Server Components. Please only use this export in a Client Component.',
)
}) as any
export {
throwNotSupportedError as Provider,
throwNotSupportedError as batch,
throwNotSupportedError as connect,
throwNotSupportedError as createDispatchHook,
throwNotSupportedError as createSelectorHook,
throwNotSupportedError as createStoreHook,
throwNotSupportedError as useDispatch,
throwNotSupportedError as useSelector,
throwNotSupportedError as useStore,
}
export const ReactReduxContext = {} as any
export { default as shallowEqual } from './utils/shallowEqual'
@@ -0,0 +1,16 @@
var SubjectDirectoryAttributes_1;
import { __decorate } from "tslib";
import { AsnArray, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { Attribute } from "../attribute";
import { id_ce } from "../object_identifiers";
export const id_ce_subjectDirectoryAttributes = `${id_ce}.9`;
let SubjectDirectoryAttributes = SubjectDirectoryAttributes_1 = class SubjectDirectoryAttributes extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, SubjectDirectoryAttributes_1.prototype);
}
};
SubjectDirectoryAttributes = SubjectDirectoryAttributes_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: Attribute })
], SubjectDirectoryAttributes);
export { SubjectDirectoryAttributes };
@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const async_1 = require("../readers/async");
class AsyncProvider {
constructor(_root, _settings) {
this._root = _root;
this._settings = _settings;
this._reader = new async_1.default(this._root, this._settings);
this._storage = [];
}
read(callback) {
this._reader.onError((error) => {
callFailureCallback(callback, error);
});
this._reader.onEntry((entry) => {
this._storage.push(entry);
});
this._reader.onEnd(() => {
callSuccessCallback(callback, this._storage);
});
this._reader.read();
}
}
exports.default = AsyncProvider;
function callFailureCallback(callback, error) {
callback(error);
}
function callSuccessCallback(callback, entries) {
callback(null, entries);
}
@@ -0,0 +1 @@
{"name":"@babel/helper-globals","version":"7.28.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532116597,"integrity":"sha512-KYRMN3MVTuiy5XkFDHd5PnQmHaQnt3z16nsBDePxZ9YNmq7IFlslpBBlR3UI+zvlbEemzowOYeKil9a0ZkOYxQ==","mode":420,"size":1106},"README.md":{"checkedAt":1794532116597,"integrity":"sha512-nsiQcqBCcCcbURsAMfqOC4BH6ByA30PirrEbUCIg3OpMDAX4yyyyBJQ7VFD+osk9sncts0cbq4mRlWA4Ik5kug==","mode":420,"size":330},"data/browser-upper.json":{"checkedAt":1794532116597,"integrity":"sha512-MSuhZDBTWuFQ9+k3MRNmxxtjbmKMJWjwf32ACxwBnZkh0mYYxA/ZLtYEGQwR1NM7QGa6vddoaXq4Z82JhRb6yA==","mode":420,"size":19908},"data/builtin-lower.json":{"checkedAt":1794532116597,"integrity":"sha512-c/LywDvovxtwiHaD+fnlA1lf61qWOoeaCOVFsNjGXLnyVdElo+BUnNMJ6fGYVAtgW3if9+5WCRbPXIM8vjjq9g==","mode":420,"size":203},"data/builtin-upper.json":{"checkedAt":1794532116597,"integrity":"sha512-Ed5Kde9rIENCP/+UMkyVLVVF0uB4cIAAsq/HUdFADEV772VcqWIwA9HsfXI2u1pme6KYM5CM7Z9EwLCr1IrxcA==","mode":420,"size":718},"package.json":{"checkedAt":1794532116598,"integrity":"sha512-5fH9xK60TdqAIEkGvXHFEyD97Q54hZub8hfQJvDQKarGoB+p+6IRlMCQ3reoTHZR/u/bxAS56SX5Ax51nOAqEw==","mode":420,"size":814}}}
@@ -0,0 +1,37 @@
import React from 'react';
import type { Transform } from '@dnd-kit/utilities';
import type { AutoScrollOptions } from '../../hooks/utilities';
import type { SensorDescriptor } from '../../sensors';
import { CollisionDetection } from '../../utilities';
import { Modifiers } from '../../modifiers';
import type { DragStartEvent, DragCancelEvent, DragEndEvent, DragMoveEvent, DragOverEvent, DragPendingEvent, DragAbortEvent } from '../../types';
import { Announcements, ScreenReaderInstructions } from '../Accessibility';
import type { MeasuringConfiguration } from './types';
export interface Props {
id?: string;
accessibility?: {
announcements?: Announcements;
container?: Element;
restoreFocus?: boolean;
screenReaderInstructions?: ScreenReaderInstructions;
};
autoScroll?: boolean | AutoScrollOptions;
cancelDrop?: CancelDrop;
children?: React.ReactNode;
collisionDetection?: CollisionDetection;
measuring?: MeasuringConfiguration;
modifiers?: Modifiers;
sensors?: SensorDescriptor<any>[];
onDragAbort?(event: DragAbortEvent): void;
onDragPending?(event: DragPendingEvent): void;
onDragStart?(event: DragStartEvent): void;
onDragMove?(event: DragMoveEvent): void;
onDragOver?(event: DragOverEvent): void;
onDragEnd?(event: DragEndEvent): void;
onDragCancel?(event: DragCancelEvent): void;
}
export interface CancelDropArguments extends DragEndEvent {
}
export declare type CancelDrop = (args: CancelDropArguments) => boolean | Promise<boolean>;
export declare const ActiveDraggableContext: React.Context<Transform>;
export declare const DndContext: React.NamedExoticComponent<Props>;
@@ -0,0 +1,24 @@
# @heroui/use-measure
A Quick description of the component
> This is an internal utility, not intended for public usage.
## Installation
```sh
yarn add @heroui/use-measure
# or
npm i @heroui/use-measure
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
@@ -0,0 +1,586 @@
# braces [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces)
> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save braces
```
## v3.0.0 Released!!
See the [changelog](CHANGELOG.md) for details.
## Why use braces?
Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters.
- **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests)
- **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity.
- **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up.
- **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written).
- **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)).
- [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']`
- [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']`
- [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']`
- [Supports escaping](#escaping) - To prevent evaluation of special characters.
## Usage
The main export is a function that takes one or more brace `patterns` and `options`.
```js
const braces = require('braces');
// braces(patterns[, options]);
console.log(braces(['{01..05}', '{a..e}']));
//=> ['(0[1-5])', '([a-e])']
console.log(braces(['{01..05}', '{a..e}'], { expand: true }));
//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e']
```
### Brace Expansion vs. Compilation
By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching.
**Compiled**
```js
console.log(braces('a/{x,y,z}/b'));
//=> ['a/(x|y|z)/b']
console.log(braces(['a/{01..20}/b', 'a/{1..5}/b']));
//=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ]
```
**Expanded**
Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)):
```js
console.log(braces('a/{x,y,z}/b', { expand: true }));
//=> ['a/x/b', 'a/y/b', 'a/z/b']
console.log(braces.expand('{01..10}'));
//=> ['01','02','03','04','05','06','07','08','09','10']
```
### Lists
Expand lists (like Bash "sets"):
```js
console.log(braces('a/{foo,bar,baz}/*.js'));
//=> ['a/(foo|bar|baz)/*.js']
console.log(braces.expand('a/{foo,bar,baz}/*.js'));
//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js']
```
### Sequences
Expand ranges of characters (like Bash "sequences"):
```js
console.log(braces.expand('{1..3}')); // ['1', '2', '3']
console.log(braces.expand('a/{1..3}/b')); // ['a/1/b', 'a/2/b', 'a/3/b']
console.log(braces('{a..c}', { expand: true })); // ['a', 'b', 'c']
console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c']
// supports zero-padded ranges
console.log(braces('a/{01..03}/b')); //=> ['a/(0[1-3])/b']
console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b']
```
See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options.
### Steppped ranges
Steps, or increments, may be used with ranges:
```js
console.log(braces.expand('{2..10..2}'));
//=> ['2', '4', '6', '8', '10']
console.log(braces('{2..10..2}'));
//=> ['(2|4|6|8|10)']
```
When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion.
### Nesting
Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved.
**"Expanded" braces**
```js
console.log(braces.expand('a{b,c,/{x,y}}/e'));
//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e']
console.log(braces.expand('a/{x,{1..5},y}/c'));
//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c']
```
**"Optimized" braces**
```js
console.log(braces('a{b,c,/{x,y}}/e'));
//=> ['a(b|c|/(x|y))/e']
console.log(braces('a/{x,{1..5},y}/c'));
//=> ['a/(x|([1-5])|y)/c']
```
### Escaping
**Escaping braces**
A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_:
```js
console.log(braces.expand('a\\{d,c,b}e'));
//=> ['a{d,c,b}e']
console.log(braces.expand('a{d,c,b\\}e'));
//=> ['a{d,c,b}e']
```
**Escaping commas**
Commas inside braces may also be escaped:
```js
console.log(braces.expand('a{b\\,c}d'));
//=> ['a{b,c}d']
console.log(braces.expand('a{d\\,c,b}e'));
//=> ['ad,ce', 'abe']
```
**Single items**
Following bash conventions, a brace pattern is also not expanded when it contains a single character:
```js
console.log(braces.expand('a{b}c'));
//=> ['a{b}c']
```
## Options
### options.maxLength
**Type**: `Number`
**Default**: `10,000`
**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera.
```js
console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error
```
### options.expand
**Type**: `Boolean`
**Default**: `undefined`
**Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing).
```js
console.log(braces('a/{b,c}/d', { expand: true }));
//=> [ 'a/b/d', 'a/c/d' ]
```
### options.nodupes
**Type**: `Boolean`
**Default**: `undefined`
**Description**: Remove duplicates from the returned array.
### options.rangeLimit
**Type**: `Number`
**Default**: `1000`
**Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`.
You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether.
**Examples**
```js
// pattern exceeds the "rangeLimit", so it's optimized automatically
console.log(braces.expand('{1..1000}'));
//=> ['([1-9]|[1-9][0-9]{1,2}|1000)']
// pattern does not exceed "rangeLimit", so it's NOT optimized
console.log(braces.expand('{1..100}'));
//=> ['1', '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']
```
### options.transform
**Type**: `Function`
**Default**: `undefined`
**Description**: Customize range expansion.
**Example: Transforming non-numeric values**
```js
const alpha = braces.expand('x/{a..e}/y', {
transform(value, index) {
// When non-numeric values are passed, "value" is a character code.
return 'foo/' + String.fromCharCode(value) + '-' + index;
},
});
console.log(alpha);
//=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ]
```
**Example: Transforming numeric values**
```js
const numeric = braces.expand('{1..5}', {
transform(value) {
// when numeric values are passed, "value" is a number
return 'foo/' + value * 2;
},
});
console.log(numeric);
//=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ]
```
### options.quantifiers
**Type**: `Boolean`
**Default**: `undefined`
**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times.
Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists)
The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists.
**Examples**
```js
const braces = require('braces');
console.log(braces('a/b{1,3}/{x,y,z}'));
//=> [ 'a/b(1|3)/(x|y|z)' ]
console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true }));
//=> [ 'a/b{1,3}/(x|y|z)' ]
console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true, expand: true }));
//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ]
```
### options.keepEscaping
**Type**: `Boolean`
**Default**: `undefined`
**Description**: Do not strip backslashes that were used for escaping from the result.
## What is "brace expansion"?
Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs).
In addition to "expansion", braces are also used for matching. In other words:
- [brace expansion](#brace-expansion) is for generating new lists
- [brace matching](#brace-matching) is for filtering existing lists
<details>
<summary><strong>More about brace expansion</strong> (click to expand)</summary>
There are two main types of brace expansion:
1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}`
2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges".
Here are some example brace patterns to illustrate how they work:
**Sets**
```
{a,b,c} => a b c
{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2
```
**Sequences**
```
{1..9} => 1 2 3 4 5 6 7 8 9
{4..-4} => 4 3 2 1 0 -1 -2 -3 -4
{1..20..3} => 1 4 7 10 13 16 19
{a..j} => a b c d e f g h i j
{j..a} => j i h g f e d c b a
{a..z..3} => a d g j m p s v y
```
**Combination**
Sets and sequences can be mixed together or used along with any other strings.
```
{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3
foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar
```
The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases.
## Brace matching
In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching.
For example, the pattern `foo/{1..3}/bar` would match any of following strings:
```
foo/1/bar
foo/2/bar
foo/3/bar
```
But not:
```
baz/1/qux
baz/2/qux
baz/3/qux
```
Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings:
```
foo/1/bar
foo/2/bar
foo/3/bar
baz/1/qux
baz/2/qux
baz/3/qux
```
## Brace matching pitfalls
Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of.
### tldr
**"brace bombs"**
- brace expansion can eat up a huge amount of processing resources
- as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially
- users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!)
For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section.
### The solution
Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries.
### Geometric complexity
At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`.
For example, the following sets demonstrate quadratic (`O(n^2)`) complexity:
```
{1,2}{3,4} => (2X2) => 13 14 23 24
{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246
```
But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity:
```
{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248
249 257 258 259 267 268 269 347 348 349 357
358 359 367 368 369
```
Now, imagine how this complexity grows given that each element is a n-tuple:
```
{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB)
{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB)
```
Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control.
**More information**
Interested in learning more about brace expansion?
- [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion)
- [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion)
- [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product)
</details>
## Performance
Braces is not only screaming fast, it's also more accurate the other brace expansion libraries.
### Better algorithms
Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_.
Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently.
**The proof is in the numbers**
Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively.
| **Pattern** | **braces** | **[minimatch][]** |
| --------------------------- | ------------------- | ---------------------------- |
| `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs) | N/A (freezes) |
| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) |
| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) |
| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) |
| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) |
| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) |
| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) |
| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) |
| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) |
| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) |
| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) |
| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) |
| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) |
| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) |
| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) |
| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) |
| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) |
### Faster algorithms
When you need expansion, braces is still much faster.
_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_
| **Pattern** | **braces** | **[minimatch][]** |
| --------------- | --------------------------- | ---------------------------- |
| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) |
| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) |
| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) |
| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) |
| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) |
| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) |
| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) |
| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) |
If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js).
## Benchmarks
### Running benchmarks
Install dev dependencies:
```bash
npm i -d && npm benchmark
```
### Latest results
Braces is more accurate, without sacrificing performance.
```bash
● expand - range (expanded)
braces x 53,167 ops/sec ±0.12% (102 runs sampled)
minimatch x 11,378 ops/sec ±0.10% (102 runs sampled)
● expand - range (optimized for regex)
braces x 373,442 ops/sec ±0.04% (100 runs sampled)
minimatch x 3,262 ops/sec ±0.18% (100 runs sampled)
● expand - nested ranges (expanded)
braces x 33,921 ops/sec ±0.09% (99 runs sampled)
minimatch x 10,855 ops/sec ±0.28% (100 runs sampled)
● expand - nested ranges (optimized for regex)
braces x 287,479 ops/sec ±0.52% (98 runs sampled)
minimatch x 3,219 ops/sec ±0.28% (101 runs sampled)
● expand - set (expanded)
braces x 238,243 ops/sec ±0.19% (97 runs sampled)
minimatch x 538,268 ops/sec ±0.31% (96 runs sampled)
● expand - set (optimized for regex)
braces x 321,844 ops/sec ±0.10% (97 runs sampled)
minimatch x 140,600 ops/sec ±0.15% (100 runs sampled)
● expand - nested sets (expanded)
braces x 165,371 ops/sec ±0.42% (96 runs sampled)
minimatch x 337,720 ops/sec ±0.28% (100 runs sampled)
● expand - nested sets (optimized for regex)
braces x 242,948 ops/sec ±0.12% (99 runs sampled)
minimatch x 87,403 ops/sec ±0.79% (96 runs sampled)
```
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
</details>
<details>
<summary><strong>Running Tests</strong></summary>
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
</details>
<details>
<summary><strong>Building docs</strong></summary>
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
</details>
### Contributors
| **Commits** | **Contributor** |
| ----------- | ------------------------------------------------------------- |
| 197 | [jonschlinkert](https://github.com/jonschlinkert) |
| 4 | [doowb](https://github.com/doowb) |
| 1 | [es128](https://github.com/es128) |
| 1 | [eush77](https://github.com/eush77) |
| 1 | [hemanth](https://github.com/hemanth) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
### Author
**Jon Schlinkert**
- [GitHub Profile](https://github.com/jonschlinkert)
- [Twitter Profile](https://twitter.com/jonschlinkert)
- [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
### License
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
---
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._
@@ -0,0 +1 @@
{"version":3,"file":"delay.factory.js","sourceRoot":"","sources":["../../src/delay/delay.factory.ts"],"names":[],"mappings":";;AACA,kEAA+D;AAC/D,sDAAoD;AAGpD,SAAgB,YAAY,CAAC,OAAwB,EAAE,OAAe;IAClE,IAAM,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IACtC,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChC,OAAO,KAAK,CAAC;AACjB,CAAC;AAJD,oCAIC;AAED,SAAS,cAAc,CAAC,OAAwB;IAC5C,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE;QAC5B,OAAO,IAAI,iCAAc,CAAC,OAAO,CAAC,CAAC;KACtC;IAED,OAAO,IAAI,0BAAW,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC"}
@@ -0,0 +1,40 @@
import { GetPacketStatusDepends } from '../../action/packet/GetPacketStatus';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
file_id: import("@sinclair/typebox").TString;
current_parent_directory: import("@sinclair/typebox").TString;
target_parent_directory: import("@sinclair/typebox").TString;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TObject<{
ok: import("@sinclair/typebox").TBoolean;
}>;
type ReturnType = Static<typeof ReturnSchema>;
export declare class MoveGroupFile extends GetPacketStatusDepends<PayloadType, ReturnType> {
actionName: "move_group_file";
actionSummary: string;
actionTags: string[];
payloadExample: {
group_id: string;
file_id: string;
current_parent_directory: string;
target_parent_directory: string;
};
returnExample: {
ok: boolean;
};
payloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
file_id: import("@sinclair/typebox").TString;
current_parent_directory: import("@sinclair/typebox").TString;
target_parent_directory: import("@sinclair/typebox").TString;
}>;
returnSchema: import("@sinclair/typebox").TObject<{
ok: import("@sinclair/typebox").TBoolean;
}>;
_handle(payload: PayloadType): Promise<{
ok: boolean;
}>;
}
export {};
@@ -0,0 +1 @@
{"version":3,"names":["_OverloadYield","require","_regenerator","_regeneratorAsync","_regeneratorAsyncGen","_regeneratorAsyncIterator","_regeneratorKeys","_regeneratorValues","_regeneratorRuntime","r","regenerator","gen","m","GeneratorFunctionPrototype","Object","getPrototypeOf","__proto__","GeneratorFunction","constructor","isGeneratorFunction","genFun","ctor","displayName","name","abruptMap","throw","return","break","continue","wrapInnerFn","innerFn","compatContext","callSyncState","context","stop","a","catch","v","abrupt","type","arg","delegateYield","iterable","resultName","nextLoc","d","values","finish","finallyLoc","f","fn","a1","a2","p","prev","n","next","undefined","sent","call","exports","default","wrap","outerFn","self","tryLocsList","w","reverse","mark","awrap","value","kind","OverloadYield","AsyncIterator","async","PromiseImpl","asyncGen","keys"],"sources":["../../src/helpers/regeneratorRuntime.ts"],"sourcesContent":["/* @minVersion 7.18.0 */\n/* @mangleFns */\n/* @onlyBabel7 */\n\nimport OverloadYield from \"./OverloadYield.ts\";\nimport regenerator from \"./regenerator.ts\";\nimport async from \"./regeneratorAsync.ts\";\nimport asyncGen from \"./regeneratorAsyncGen.ts\";\nimport AsyncIterator from \"./regeneratorAsyncIterator.ts\";\nimport keys from \"./regeneratorKeys.ts\";\nimport values from \"./regeneratorValues.ts\";\n\ntype CompatContext = {\n prev?: number;\n next?: number;\n sent?: any;\n\n stop(): any;\n abrupt(type: \"throw\" | \"break\" | \"continue\" | \"return\", arg: any): any;\n finish(finallyLoc: number): any;\n catch(tryLoc: number): any;\n delegateYield(iterable: any, resultName: `t${number}`, nextLoc: number): any;\n\n resultName?: `t${number}` | undefined;\n\n [key: `t${number}`]: any;\n};\ntype CompatInnerFn = (this: unknown, context: CompatContext) => unknown;\n\nexport default function /* @no-mangle */ _regeneratorRuntime() {\n \"use strict\";\n\n var r = regenerator();\n\n type InnerFn = Parameters<typeof r.w>[0];\n type Context = Parameters<InnerFn>[0];\n\n var gen = r.m(_regeneratorRuntime);\n var GeneratorFunctionPrototype = Object.getPrototypeOf\n ? Object.getPrototypeOf(gen)\n : (gen as any).__proto__;\n var GeneratorFunction = GeneratorFunctionPrototype.constructor;\n\n function isGeneratorFunction(genFun: any) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n }\n\n var abruptMap = {\n throw: 1,\n return: 2,\n break: 3,\n continue: 3,\n };\n\n function wrapInnerFn(innerFn: CompatInnerFn): InnerFn {\n var compatContext: CompatContext;\n var callSyncState: <A1, A2, R>(\n fn: (a: A1, b: A2) => R,\n a1: A1,\n a2?: A2,\n ) => R;\n return function (context: Context) {\n if (!compatContext) {\n // Shim the old context shape on top of the new one.\n compatContext = {\n stop: function () {\n return callSyncState(context.a, 2);\n },\n catch: function () {\n return context.v;\n },\n abrupt: function (type, arg) {\n return callSyncState(context.a, abruptMap[type], arg);\n },\n delegateYield: function (iterable, resultName, nextLoc) {\n compatContext.resultName = resultName;\n return callSyncState(context.d, values(iterable), nextLoc);\n },\n finish: function (finallyLoc) {\n return callSyncState(context.f, finallyLoc);\n },\n };\n callSyncState = function (fn, a1, a2) {\n context.p = compatContext.prev!;\n context.n = compatContext.next!;\n try {\n return fn(a1, a2!);\n } finally {\n compatContext.next = context.n;\n }\n };\n }\n if (compatContext.resultName) {\n compatContext[compatContext.resultName] = context.v;\n compatContext.resultName = undefined;\n }\n compatContext.sent = context.v;\n compatContext.next = context.n;\n try {\n return innerFn.call(this, compatContext);\n } finally {\n context.p = compatContext.prev!;\n context.n = compatContext.next;\n }\n };\n }\n\n // @ts-expect-error explicit function assignment\n return (_regeneratorRuntime = function () {\n return {\n wrap: function (\n innerFn: CompatInnerFn,\n outerFn: Parameters<typeof r.w>[1],\n self: Parameters<typeof r.w>[2],\n tryLocsList: Parameters<typeof r.w>[3],\n ) {\n return r.w(\n wrapInnerFn(innerFn),\n outerFn,\n self,\n tryLocsList && tryLocsList.reverse(),\n );\n },\n isGeneratorFunction: isGeneratorFunction,Line truncated
@@ -0,0 +1,54 @@
{
"name": "glob-parent",
"version": "6.0.2",
"description": "Extract the non-magic parent path from a glob string.",
"author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)",
"contributors": [
"Elan Shanker (https://github.com/es128)",
"Blaine Bublitz <blaine.bublitz@gmail.com>"
],
"repository": "gulpjs/glob-parent",
"license": "ISC",
"engines": {
"node": ">=10.13.0"
},
"main": "index.js",
"files": [
"LICENSE",
"index.js"
],
"scripts": {
"lint": "eslint .",
"pretest": "npm run lint",
"test": "nyc mocha --async-only"
},
"dependencies": {
"is-glob": "^4.0.3"
},
"devDependencies": {
"eslint": "^7.0.0",
"eslint-config-gulp": "^5.0.0",
"expect": "^26.0.1",
"mocha": "^7.1.2",
"nyc": "^15.0.1"
},
"nyc": {
"reporter": [
"lcov",
"text-summary"
]
},
"prettier": {
"singleQuote": true
},
"keywords": [
"glob",
"parent",
"strip",
"path",
"dirname",
"directory",
"base",
"wildcard"
]
}
@@ -0,0 +1,48 @@
import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f} from "./CalendarDate.mjs";
import {fromExtendedYear as $3b62074eb05584b2$export$4475b7e617eb123c, getExtendedYear as $3b62074eb05584b2$export$c36e0ecb2d4fa69d, GregorianCalendar as $3b62074eb05584b2$export$80ee6245ec4f29ec} from "./GregorianCalendar.mjs";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ // Portions of the code in this file are based on code from ICU.
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
const $8d73d47422ca7302$var$BUDDHIST_ERA_START = -543;
class $8d73d47422ca7302$export$42d20a78301dee44 extends (0, $3b62074eb05584b2$export$80ee6245ec4f29ec) {
fromJulianDay(jd) {
let gregorianDate = super.fromJulianDay(jd);
let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(gregorianDate.era, gregorianDate.year);
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(this, year - $8d73d47422ca7302$var$BUDDHIST_ERA_START, gregorianDate.month, gregorianDate.day);
}
toJulianDay(date) {
return super.toJulianDay($8d73d47422ca7302$var$toGregorian(date));
}
getEras() {
return [
'BE'
];
}
getDaysInMonth(date) {
return super.getDaysInMonth($8d73d47422ca7302$var$toGregorian(date));
}
balanceDate() {}
constructor(...args){
super(...args), this.identifier = 'buddhist';
}
}
function $8d73d47422ca7302$var$toGregorian(date) {
let [era, year] = (0, $3b62074eb05584b2$export$4475b7e617eb123c)(date.year + $8d73d47422ca7302$var$BUDDHIST_ERA_START);
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, date.month, date.day);
}
export {$8d73d47422ca7302$export$42d20a78301dee44 as BuddhistCalendar};
//# sourceMappingURL=BuddhistCalendar.module.js.map
@@ -0,0 +1 @@
{"version":3,"file":"cacheResolvedValue.spec.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/cacheResolvedValue.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
import { CreateType } from '../create/type.mjs';
import { Kind } from '../symbols/index.mjs';
/** `[Json]` Creates a Not type */
export function Not(type, options) {
return CreateType({ [Kind]: 'Not', not: type }, options);
}
@@ -0,0 +1,3 @@
export * from './exclude-from-mapped-result.mjs';
export * from './exclude-from-template-literal.mjs';
export * from './exclude.mjs';
@@ -0,0 +1,4 @@
export declare enum MaybeClassElementMetadataKind {
unknown = 32
}
//# sourceMappingURL=MaybeClassElementMetadataKind.d.ts.map
@@ -0,0 +1,28 @@
'use strict';
var createNode = require('./doc/createNode.js');
var log = require('./log.js');
var Pair = require('./nodes/Pair.js');
var toJS = require('./nodes/toJS.js');
var YAMLMap = require('./nodes/YAMLMap.js');
var map = require('./schema/common/map.js');
var seq = require('./schema/common/seq.js');
var string = require('./schema/common/string.js');
var foldFlowLines = require('./stringify/foldFlowLines.js');
var stringifyNumber = require('./stringify/stringifyNumber.js');
var stringifyString = require('./stringify/stringifyString.js');
exports.createNode = createNode.createNode;
exports.debug = log.debug;
exports.warn = log.warn;
exports.createPair = Pair.createPair;
exports.toJS = toJS.toJS;
exports.findPair = YAMLMap.findPair;
exports.mapTag = map.map;
exports.seqTag = seq.seq;
exports.stringTag = string.string;
exports.foldFlowLines = foldFlowLines.foldFlowLines;
exports.stringifyNumber = stringifyNumber.stringifyNumber;
exports.stringifyString = stringifyString.stringifyString;
@@ -0,0 +1,38 @@
"use client";
import { useCallback } from 'react';
import { isRefObject } from '../../utils/is-ref-object.mjs';
/**
* Creates a ref function that, when called, hydrates the provided
* external ref and VisualElement.
*/
function useMotionRef(visualState, visualElement, externalRef) {
return useCallback((instance) => {
if (instance) {
visualState.onMount && visualState.onMount(instance);
}
if (visualElement) {
if (instance) {
visualElement.mount(instance);
}
else {
visualElement.unmount();
}
}
if (externalRef) {
if (typeof externalRef === "function") {
externalRef(instance);
}
else if (isRefObject(externalRef)) {
externalRef.current = instance;
}
}
},
/**
* Include externalRef in dependencies to ensure the callback updates
* when the ref changes, allowing proper ref forwarding.
*/
[visualElement]);
}
export { useMotionRef };
@@ -0,0 +1 @@
{"name":"@heroui/use-aria-link","version":"2.2.6","requiresBuild":false,"files":{"dist/index.js":{"checkedAt":1794532108456,"integrity":"sha512-SovvDdZwOVQ+p7uVrEeZ/oXKIk7gQQddYFN+qeQ00XVG9VePjYKv/dGh233Bwx10vGoK5fbiztgc4HbqNjd3+Q==","mode":420,"size":3453},"package.json":{"checkedAt":1794532108457,"integrity":"sha512-nOALUt3h4TaDBCuDwLzs2pIN2WXc2m5TKpWRxnrpniFuvwIwrYjk1VJ3unQWc+kyu77mSJYT6a8+yk3WNq+/7g==","mode":420,"size":1601},"README.md":{"checkedAt":1794532108457,"integrity":"sha512-kU1vcysrn85/k8rgCvSM5R+FiySfdRXvdWTw4L5NYh1PNfT5s7gu1qGqzEtjOy2qAdrI3PkjR1Q4M5oa7aklmw==","mode":420,"size":494},"dist/index.mjs":{"checkedAt":1794532108457,"integrity":"sha512-oLQS75Onzjah3zv7kFbN++OWUVa6LYt1iBUk86VvBJnQNbC6qt42umSO7jrr+Xiz7HoD7pJRY+BLBqktNMXw8w==","mode":420,"size":2306},"dist/index.d.ts":{"checkedAt":1794532108457,"integrity":"sha512-eW25VIuNZylzQhEk1Giuj6C4tIIo8HBIwCNWegsPSEaUOXUBXInWBoGL6Lm16eyGeKiWoqLN+wVsELC+i9mTdA==","mode":420,"size":1133},"LICENSE":{"checkedAt":1794532108457,"integrity":"sha512-eaopHP+N4EYXlGoX9hmoxDPoVft4BqrXKmbsFTcsoBHSrJp/GWF4qVtLBzrw9h9ZrbFfPY69z+3RuDX9FdPG+Q==","mode":420,"size":1064}}}
@@ -0,0 +1,60 @@
import {StringType} from 'token-types';
export function stringToBytes(string, encoding) {
if (encoding === 'utf-16le') {
const bytes = [];
for (let index = 0; index < string.length; index++) {
const code = string.charCodeAt(index); // eslint-disable-line unicorn/prefer-code-point
bytes.push(code & 0xFF, (code >> 8) & 0xFF); // High byte
}
return bytes;
}
if (encoding === 'utf-16be') {
const bytes = [];
for (let index = 0; index < string.length; index++) {
const code = string.charCodeAt(index); // eslint-disable-line unicorn/prefer-code-point
bytes.push((code >> 8) & 0xFF, code & 0xFF); // Low byte
}
return bytes;
}
return [...string].map(character => character.charCodeAt(0)); // eslint-disable-line unicorn/prefer-code-point
}
/**
Checks whether the TAR checksum is valid.
@param {Uint8Array} arrayBuffer - The TAR header `[offset ... offset + 512]`.
@param {number} offset - TAR header offset.
@returns {boolean} `true` if the TAR checksum is valid, otherwise `false`.
*/
export function tarHeaderChecksumMatches(arrayBuffer, offset = 0) {
const readSum = Number.parseInt(new StringType(6).get(arrayBuffer, 148).replace(/\0.*$/, '').trim(), 8); // Read sum in header
if (Number.isNaN(readSum)) {
return false;
}
let sum = 8 * 0x20; // Initialize signed bit sum
for (let index = offset; index < offset + 148; index++) {
sum += arrayBuffer[index];
}
for (let index = offset + 156; index < offset + 512; index++) {
sum += arrayBuffer[index];
}
return readSum === sum;
}
/**
ID3 UINT32 sync-safe tokenizer token.
28 bits (representing up to 256MB) integer, the msb is 0 to avoid "false syncsignals".
*/
export const uint32SyncSafeToken = {
get: (buffer, offset) => (buffer[offset + 3] & 0x7F) | ((buffer[offset + 2]) << 7) | ((buffer[offset + 1]) << 14) | ((buffer[offset]) << 21),
len: 4,
};
@@ -0,0 +1 @@
{"version":3,"names":["_helperPluginUtils","require","_core","TRACE_ID","FILE_NAME_VAR","createNodeFromNullish","val","fn","t","nullLiteral","_default","exports","default","declare","api","assertVersion","makeTrace","fileNameIdentifier","line","column","fileLineLiteral","numericLiteral","fileColumnLiteral","c","template","expression","ast","isSourceAttr","attr","isJSXAttribute","name","visitor","JSXOpeningElement","path","state","node","loc","attributes","some","fileNameId","scope","generateUidIdentifier","getProgramParent","push","id","init","stringLiteral","filename","jsxAttribute","jsxIdentifier","jsxExpressionContainer","cloneNode","start"],"sources":["../src/index.ts"],"sourcesContent":["/**\n * This adds {fileName, lineNumber, columnNumber} annotations to JSX tags.\n *\n * NOTE: lineNumber and columnNumber are both 1-based.\n *\n * == JSX Literals ==\n *\n * <sometag />\n *\n * becomes:\n *\n * var __jsxFileName = 'this/file.js';\n * <sometag __source={{fileName: __jsxFileName, lineNumber: 10, columnNumber: 1}}/>\n */\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t, template } from \"@babel/core\";\n\nconst TRACE_ID = \"__source\";\nconst FILE_NAME_VAR = \"_jsxFileName\";\n\nconst createNodeFromNullish = <T, N extends t.Node>(\n val: T | null,\n fn: (val: T) => N,\n): N | t.NullLiteral => (val == null ? t.nullLiteral() : fn(val));\n\ntype State = {\n fileNameIdentifier: t.Identifier;\n};\nexport default declare<State>(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function makeTrace(\n fileNameIdentifier: t.Identifier,\n { line, column }: { line: number; column: number },\n ) {\n const fileLineLiteral = createNodeFromNullish(line, t.numericLiteral);\n const fileColumnLiteral = createNodeFromNullish(column, c =>\n // c + 1 to make it 1-based instead of 0-based.\n t.numericLiteral(c + 1),\n );\n\n return template.expression.ast`{\n fileName: ${fileNameIdentifier},\n lineNumber: ${fileLineLiteral},\n columnNumber: ${fileColumnLiteral},\n }`;\n }\n\n const isSourceAttr = (attr: t.Node) =>\n t.isJSXAttribute(attr) && attr.name.name === TRACE_ID;\n\n return {\n name: \"transform-react-jsx-source\",\n visitor: {\n JSXOpeningElement(path, state) {\n const { node } = path;\n if (\n // the element was generated and doesn't have location information\n !node.loc ||\n // Already has __source\n path.node.attributes.some(isSourceAttr)\n ) {\n return;\n }\n\n if (!state.fileNameIdentifier) {\n const fileNameId = path.scope.generateUidIdentifier(FILE_NAME_VAR);\n state.fileNameIdentifier = fileNameId;\n\n path.scope.getProgramParent().push({\n id: fileNameId,\n init: t.stringLiteral(state.filename || \"\"),\n });\n }\n\n node.attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(TRACE_ID),\n t.jsxExpressionContainer(\n makeTrace(t.cloneNode(state.fileNameIdentifier), node.loc.start),\n ),\n ),\n );\n },\n },\n };\n});\n"],"mappings":";;;;;;AAcA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,MAAME,QAAQ,GAAG,UAAU;AAC3B,MAAMC,aAAa,GAAG,cAAc;AAEpC,MAAMC,qBAAqB,GAAGA,CAC5BC,GAAa,EACbC,EAAiB,KACMD,GAAG,IAAI,IAAI,GAAGE,WAAC,CAACC,WAAW,CAAC,CAAC,GAAGF,EAAE,CAACD,GAAG,CAAE;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAKnD,IAAAC,0BAAO,EAAQC,GAAG,IAAI;EACnCA,GAAG,CAACC,aAAa,CAAkB,CAAE,CAAC;EAEtC,SAASC,SAASA,CAChBC,kBAAgC,EAChC;IAAEC,IAAI;IAAEC;EAAyC,CAAC,EAClD;IACA,MAAMC,eAAe,GAAGf,qBAAqB,CAACa,IAAI,EAAEV,WAAC,CAACa,cAAc,CAAC;IACrE,MAAMC,iBAAiB,GAAGjB,qBAAqB,CAACc,MAAM,EAAEI,CAAC,IAEvDf,WAAC,CAACa,cAAc,CAACE,CAAC,GAAG,CAAC,CACxB,CAAC;IAED,OAAOC,cAAQ,CAACC,UAAU,CAACC,GAAG;AAClC,kBAAkBT,kBAAkB;AACpC,oBAAoBG,eAAe;AACnC,sBAAsBE,iBAAiB;AACvC,MAAM;EACJ;EAEA,MAAMK,YAAY,GAAIC,IAAY,IAChCpB,WAAC,CAACqB,cAAc,CAACD,IAAI,CAAC,IAAIA,IAAI,CAACE,IAAI,CAACA,IAAI,KAAK3B,QAAQ;EAEvD,OAAO;IACL2B,IAAI,EAAE,4BAA4B;IAClCC,OAAO,EAAE;MACPC,iBAAiBA,CAACC,IAAI,EAAEC,KAAK,EAAE;QAC7B,MAAM;UAAEC;QAAK,CAAC,GAAGF,IAAI;QACrB,IAEE,CAACE,IAAI,CAACC,GAAG,IAETH,IAAI,CAACE,IAAI,CAACE,UAAU,CAACC,IAAI,CAACX,YAAY,CAAC,EACvC;UACA;QACF;QAEA,IAAI,CAACO,KAAK,CAACjB,kBAAkB,EAAE;UAC7B,MAAMsB,UAAU,GAAGN,IAAI,CAACO,KAAK,CAACC,qBAAqB,CAACrC,aAAa,CAAC;UAClE8B,KAAK,CAACjB,kBAAkB,GAAGsB,UAAU;UAErCN,IAAI,CAACO,KAAK,CAACE,gBAAgB,CAAC,CAAC,CAACC,IAAI,CAAC;YACjCC,EAAE,EAAEL,UAAU;YACdM,IAAI,EAAErC,WAAC,CAACsC,aAAa,CAACZ,KAAK,CAACa,QAAQ,IAAI,EAAE;UAC5C,CAAC,CAAC;QACJ;QAEAZ,IAAI,CAACE,UAAU,CAACM,IAAI,CAClBnC,WAAC,CAACwC,YAAY,CACZxC,WAAC,CAACyC,aAAa,CAAC9C,QAAQ,CAAC,EACzBK,WAAC,CAAC0C,sBAAsB,CACtBlC,SAAS,CAACR,WAAC,CAAC2C,SAAS,CAACjB,KAAK,CAACjB,kBAAkB,CAAC,EAAEkB,IAAI,CAACC,GAAG,CAACgB,KAAK,CACjE,CACF,CACF,CAAC;MACH;IACF;EACF,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"pkg-up.js","sourceRoot":"","sources":["../../src/utils/pkg-up.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,SAAS,MAAM,CAAC,QAA2B,EAAE,GAAY;IACvD,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC,CAAA;IACjC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;IAEjC,MAAM,SAAS,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAA;IAEnC,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;QAEvE,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QAChC,CAAC;QACD,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YACjB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IACzB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,IAAuB;IAC3C,OAAO,MAAM,CAAC,cAAc,EAAE,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;AACjD,CAAC"}
@@ -0,0 +1,6 @@
import {
AddNoteBulkIcon
} from "../chunk-DF2IDUIR.mjs";
export {
AddNoteBulkIcon
};
@@ -0,0 +1,51 @@
import { _ as _overload_yield } from "./_overload_yield.js";
function _async_generator_delegate(inner) {
var iter = {}, waiting = false;
function pump(key, value) {
waiting = true;
value = new Promise(function(resolve) {
resolve(inner[key](value));
});
return { done: false, value: new _overload_yield(value, /* kind: delegate */ 1) };
}
iter[(typeof Symbol !== "undefined" && Symbol.iterator) || "@@iterator"] = function() {
return this;
};
iter.next = function(value) {
if (waiting) {
waiting = false;
return value;
}
return pump("next", value);
};
if (typeof inner.throw === "function") {
iter.throw = function(value) {
if (waiting) {
waiting = false;
throw value;
}
return pump("throw", value);
};
}
if (typeof inner.return === "function") {
iter.return = function(value) {
if (waiting) {
waiting = false;
return value;
}
return pump("return", value);
};
}
return iter;
}
export { _async_generator_delegate as _ };
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,kEAAkE;AAClE,2DAA2D;AAC3D,yDAAyD;AACzD,kHAAkH;;;AAkB3G,SAAS,0CAAmB,KAA2B;IAC5D,IAAI,OAAC,GAAG,qBAAE,iBAAiB,cAAE,UAAU,0BAAE,sBAAsB,EAAC,GAAG;IACnE,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAE;QACpB,eAAe;QACf,2BAA2B;IAC7B;IAEA,IAAI,gBAAgB,CAAA,GAAA,oCAAa,EAAE,CAAC;QAClC,IAAI,qBAAqB,mCAAa,GAAG,MAAM;YAC7C,IAAI,wBACF,uBAAuB;YAEzB,SAAS,OAAO,CAAC,aAAa,GAAG;QACnC;IACF;IAEA,IAAI,yBAAyB,CAAA,GAAA,oCAAa,EAAE,CAAC;QAC3C,IAAI,mBACF,kBAAkB;IAEtB;IAEA,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,QAAQ,SAAS,OAAO;QAC5B,IAAI,YACF;QAGF,MAAM,UAAU,IAAI,OAAO;QAC3B,MAAM,iBAAiB,CAAA,GAAA,sCAAe,EAAE;QAExC,mFAAmF;QACnF,IAAI,OAAO,iBAAiB,aAAa;YACvC,IAAI,UAAU,CAAC;gBACb,IAAI,MAAM,aAAa,IAAI,mCAAa,GAAG,MACzC,uBAAuB;gBAEzB,MAAM,aAAa,GAAG;YACxB;YAEA,iDAAiD;YACjD,+DAA+D;YAC/D,8CAA8C;YAC9C,eAAe,gBAAgB,CAAC,eAAe,eAAe;YAC9D,eAAe,gBAAgB,CAAC,SAAS,SAAS;YAElD,OAAO;gBACL,eAAe,mBAAmB,CAAC,eAAe,eAAe;gBACjE,eAAe,mBAAmB,CAAC,SAAS,SAAS;YACvD;QACF,OAAO,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,QAAQ;YAC1C,IAAI,YAAY,CAAC;gBACf,IAAI,MAAM,yBAAyB,EACjC,MAAM,yBAAyB,GAAG;qBAC7B,IAAI,MAAM,aAAa,IAAI,mCAAa,GAAG,MAChD,uBAAuB;gBAEzB,MAAM,aAAa,GAAG;YACxB;YAEA,IAAI,aAAa,CAAC;gBAChB,MAAM,yBAAyB,GAAG;gBAClC,IAAI,MAAM,aAAa,IAAI,mCAAa,GAAG,MACzC,uBAAuB;gBAEzB,MAAM,aAAa,GAAG;YACxB;YAEA,eAAe,gBAAgB,CAAC,aAAa,eAAe;YAC5D,eAAe,gBAAgB,CAAC,WAAW,WAAW;YACtD,eAAe,gBAAgB,CAAC,cAAc,eAAe;YAC7D,eAAe,gBAAgB,CAAC,YAAY,YAAY;YAExD,OAAO;gBACL,eAAe,mBAAmB,CAAC,aAAa,eAAe;gBAC/D,eAAe,mBAAmB,CAAC,WAAW,WAAW;gBACzD,eAAe,mBAAmB,CAAC,cAAc,eAAe;gBAChE,eAAe,mBAAmB,CAAC,YAAY,YAAY;YAC7D;QACF;IACF,GAAG;QAAC;QAAK;QAAY;QAAe;KAAuB;AAC7D;AAEA,SAAS,mCAAa,KAAK,EAAE,GAAG;IAC9B,IAAI,MAAM,MAAM,GAAG,GACjB,OAAO;IAET,IAAI,MAAM,MAAM,EAAE;QAChB,2DAA2D;QAC3D,MAAM,gBAAgB,MAAM,MAAM,CAAC,aAAa;QAChD,IAAI,CAAC,iBAAiB,CAAC,cAAc,eAAe,CAAC,QAAQ,CAAC,MAAM,MAAM,GACxE,OAAO;QAET,qEAAqE;QACrE,IAAI,MAAM,MAAM,CAAC,OAAO,CAAC,gCACvB,OAAO;IAEX;IAEA,IAAI,CAAC,IAAI,OAAO,EACd,OAAO;IAGT,sFAAsF;IACtF,+FAA+F;IAC/F,yFAAyF;IACzF,sEAAsE;IACtE,OAAO,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,OAAO;AACnD","sources":["packages/@react-aria/interactions/src/useInteractOutside.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 react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\nimport {getOwnerDocument, useEffectEvent} from '@react-aria/utils';\nimport {RefObject} from '@react-types/shared';\nimport {useEffect, useRef} from 'react';\n\nexport interface InteractOutsideProps {\n ref: RefObject<Element | null>,\n onInteractOutside?: (e: PointerEvent) => void,\n onInteractOutsideStart?: (e: PointerEvent) => void,\n /** Whether the interact outside events should be disabled. */\n isDisabled?: boolean\n}\n\n/**\n * Example, used in components like Dialogs and Popovers so they can close\n * when a user clicks outside them.\n */\nexport function useInteractOutside(props: InteractOutsideProps): void {\n let {ref, onInteractOutside, isDisabled, onInteractOutsideStart} = props;\n let stateRef = useRef({\n isPointerDown: false,\n ignoreEmulatedMouseEvents: false\n });\n\n let onPointerDown = useEffectEvent((e) => {\n if (onInteractOutside && isValidEvent(e, ref)) {\n if (onInteractOutsideStart) {\n onInteractOutsideStart(e);\n }\n stateRef.current.isPointerDown = true;\n }\n });\n\n let triggerInteractOutside = useEffectEvent((e: PointerEvent) => {\n if (onInteractOutside) {\n onInteractOutside(e);\n }\n });\n\n useEffect(() => {\n let state = stateRef.current;\n if (isDisabled) {\n return;\n }\n\n const element = ref.current;\n const documentObject = getOwnerDocument(element);\n\n // Use pointer events if available. Otherwise, fall back to mouse and touch events.\n if (typeof PointerEvent !== 'undefined') {\n let onClick = (e) => {\n if (state.isPointerDown && isValidEvent(e, ref)) {\n triggerInteractOutside(e);\n }\n state.isPointerDown = false;\n };\n\n // changing these to capture phase fixed combobox\n // Use click instead of pointerup to avoid Android Chrome issue\n // https://issues.chromium.org/issues/40732224\n documentObject.addEventListener('pointerdown', onPointerLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"optional.d.ts","sourceRoot":"","sources":["../../../../src/metadata/decorators/optional.ts"],"names":[],"mappings":"AAQA,wBAAgB,QAAQ,IAAI,eAAe,GACzC,kBAAkB,GAClB,iBAAiB,CASlB"}
@@ -0,0 +1,247 @@
JS-YAML - YAML 1.2 parser / writer for JavaScript
=================================================
[![CI](https://github.com/nodeca/js-yaml/workflows/CI/badge.svg?branch=master)](https://github.com/nodeca/js-yaml/actions)
[![NPM version](https://img.shields.io/npm/v/js-yaml.svg)](https://www.npmjs.org/package/js-yaml)
__[Online Demo](https://nodeca.github.io/js-yaml/)__
This is an implementation of [YAML](https://yaml.org/), a human-friendly data
serialization language. Started as [PyYAML](https://pyyaml.org/) port, it was
completely rewritten from scratch. Now it's very fast, and supports 1.2 spec.
Installation
------------
### YAML module for node.js
```
npm install js-yaml
```
### CLI executable
If you want to inspect your YAML files from CLI, install js-yaml globally:
```
npm install -g js-yaml
```
#### Usage
```
usage: js-yaml [-h] [-v] [-c] [-t] file
Positional arguments:
file File with YAML document(s)
Optional arguments:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
-c, --compact Display errors in compact mode
-t, --trace Show stack trace on error
```
API
---
Here we cover the most 'useful' methods. If you need advanced details (creating
your own tags), see [examples](https://github.com/nodeca/js-yaml/tree/master/examples)
for more info.
``` javascript
const yaml = require('js-yaml');
const fs = require('fs');
// Get document, or throw exception on error
try {
const doc = yaml.load(fs.readFileSync('/home/ixti/example.yml', 'utf8'));
console.log(doc);
} catch (e) {
console.log(e);
}
```
### load (string [ , options ])
Parses `string` as single YAML document. Returns either a
plain object, a string, a number, `null` or `undefined`, or throws `YAMLException` on error. By default, does
not support regexps, functions and undefined.
options:
- `filename` _(default: null)_ - string to be used as a file path in
error/warning messages.
- `onWarning` _(default: null)_ - function to call on warning messages.
Loader will call this function with an instance of `YAMLException` for each warning.
- `schema` _(default: `DEFAULT_SCHEMA`)_ - specifies a schema to use.
- `FAILSAFE_SCHEMA` - only strings, arrays and plain objects:
https://www.yaml.org/spec/1.2/spec.html#id2802346
- `JSON_SCHEMA` - all JSON-supported types:
https://www.yaml.org/spec/1.2/spec.html#id2803231
- `CORE_SCHEMA` - same as `JSON_SCHEMA`:
https://www.yaml.org/spec/1.2/spec.html#id2804923
- `DEFAULT_SCHEMA` - all supported YAML types.
- `json` _(default: false)_ - compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error.
NOTE: This function **does not** understand multi-document sources, it throws
exception on those.
NOTE: JS-YAML **does not** support schema-specific tag resolution restrictions.
So, the JSON schema is not as strictly defined in the YAML specification.
It allows numbers in any notation, use `Null` and `NULL` as `null`, etc.
The core schema also has no such restrictions. It allows binary notation for integers.
### loadAll (string [, iterator] [, options ])
Same as `load()`, but understands multi-document sources. Applies
`iterator` to each document if specified, or returns array of documents.
``` javascript
const yaml = require('js-yaml');
yaml.loadAll(data, function (doc) {
console.log(doc);
});
```
### dump (object [ , options ])
Serializes `object` as a YAML document. Uses `DEFAULT_SCHEMA`, so it will
throw an exception if you try to dump regexps or functions. However, you can
disable exceptions by setting the `skipInvalid` option to `true`.
options:
- `indent` _(default: 2)_ - indentation width to use (in spaces).
- `noArrayIndent` _(default: false)_ - when true, will not add an indentation level to array elements
- `skipInvalid` _(default: false)_ - do not throw on invalid types (like function
in the safe schema) and skip pairs and single values with such types.
- `flowLevel` _(default: -1)_ - specifies level of nesting, when to switch from
block to flow style for collections. -1 means block style everwhere
- `styles` - "tag" => "style" map. Each tag may have own set of styles.
- `schema` _(default: `DEFAULT_SCHEMA`)_ specifies a schema to use.
- `sortKeys` _(default: `false`)_ - if `true`, sort keys when dumping YAML. If a
function, use the function to sort the keys.
- `lineWidth` _(default: `80`)_ - set max line width. Set `-1` for unlimited width.
- `noRefs` _(default: `false`)_ - if `true`, don't convert duplicate objects into references
- `noCompatMode` _(default: `false`)_ - if `true` don't try to be compatible with older
yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1
- `condenseFlow` _(default: `false`)_ - if `true` flow sequences will be condensed, omitting the space between `a, b`. Eg. `'[a,b]'`, and omitting the space between `key: value` and quoting the key. Eg. `'{"a":b}'` Can be useful when using yaml for pretty URL query params as spaces are %-encoded.
- `quotingType` _(`'` or `"`, default: `'`)_ - strings will be quoted using this quoting style. If you specify single quotes, double quotes will still be used for non-printable characters.
- `forceQuotes` _(default: `false`)_ - if `true`, all non-key strings will be quoted even if they normally don't need to.
- `replacer` - callback `function (key, value)` called recursively on each key/value in source object (see `replacer` docs for `JSON.stringify`).
The following table show availlable styles (e.g. "canonical",
"binary"...) available for each tag (.e.g. !!null, !!int ...). Yaml
output is shown on the right side after `=>` (default setting) or `->`:
``` none
!!null
"canonical" -> "~"
"lowercase" => "null"
"uppercase" -> "NULL"
"camelcase" -> "Null"
"empty" -> ""
!!int
"binary" -> "0b1", "0b101010", "0b1110001111010"
"octal" -> "0o1", "0o52", "0o16172"
"decimal" => "1", "42", "7290"
"hexadecimal" -> "0x1", "0x2A", "0x1C7A"
!!bool
"lowercase" => "true", "false"
"uppercase" -> "TRUE", "FALSE"
"camelcase" -> "True", "False"
!!float
"lowercase" => ".nan", '.inf'
"uppercase" -> ".NAN", '.INF'
"camelcase" -> ".NaN", '.Inf'
```
Example:
``` javascript
dump(object, {
'styles': {
'!!null': 'canonical' // dump null as ~
},
'sortKeys': true // sort object keys
});
```
Supported YAML types
--------------------
The list of standard YAML tags and corresponding JavaScript types. See also
[YAML tag discussion](https://pyyaml.org/wiki/YAMLTagDiscussion) and
[YAML types repository](https://yaml.org/type/).
```
!!null '' # null
!!bool 'yes' # bool
!!int '3...' # number
!!float '3.14...' # number
!!binary '...base64...' # buffer
!!timestamp 'YYYY-...' # date
!!omap [ ... ] # array of key-value pairs
!!pairs [ ... ] # array or array pairs
!!set { ... } # array of objects with given keys and null values
!!str '...' # string
!!seq [ ... ] # array
!!map { ... } # object
```
**JavaScript-specific tags**
See [js-yaml-js-types](https://github.com/nodeca/js-yaml-js-types) for
extra types.
Caveats
-------
Note, that you use arrays or objects as key in JS-YAML. JS does not allow objects
or arrays as keys, and stringifies (by calling `toString()` method) them at the
moment of adding them.
``` yaml
---
? [ foo, bar ]
: - baz
? { foo: bar }
: - baz
- baz
```
``` javascript
{ "foo,bar": ["baz"], "[object Object]": ["baz", "baz"] }
```
Also, reading of properties on implicit block mapping keys is not supported yet.
So, the following YAML document cannot be loaded.
``` yaml
&anchor foo:
foo: bar
*anchor: duplicate key
baz: bat
*anchor: duplicate key
```
js-yaml for enterprise
----------------------
Available as part of the Tidelift Subscription
The maintainers of js-yaml and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-js-yaml?utm_source=npm-js-yaml&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
@@ -0,0 +1,36 @@
'use strict';
require('../auto');
var runTests = require('./tests');
var test = require('tape');
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
test('shimmed', function (t) {
t.equal(String.prototype.trimStart.length, 0, 'String#trimStart has a length of 0');
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal((/^(?:trimLeft|trimStart)$/).test(String.prototype.trimStart.name), true, 'String#trimStart has name "trimLeft" or "trimStart"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(String.prototype, 'trimStart'), 'String#trimStart is not enumerable');
et.end();
});
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) {
st['throws'](function () { return String.prototype.trimStart.call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return String.prototype.trimStart.call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(String.prototype.trimStart), t);
t.end();
});
@@ -0,0 +1,7 @@
export interface Actions {
setTrue: () => void;
setFalse: () => void;
set: (value: boolean) => void;
toggle: () => void;
}
export default function useBoolean(defaultValue?: boolean): [boolean, Actions];
@@ -0,0 +1,180 @@
/**
* @fileoverview Enforce default props alphabetical sorting
* @author Vladimir Kattsov
* @deprecated
*/
'use strict';
const variableUtil = require('../util/variable');
const docsUrl = require('../util/docsUrl');
const report = require('../util/report');
const eslintUtil = require('../util/eslint');
const getFirstTokens = eslintUtil.getFirstTokens;
const getText = eslintUtil.getText;
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
propsNotSorted: 'Default prop types declarations should be sorted alphabetically',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Enforce defaultProps declarations alphabetical sorting',
category: 'Stylistic Issues',
recommended: false,
url: docsUrl('sort-default-props'),
},
// fixable: 'code',
messages,
schema: [{
type: 'object',
properties: {
ignoreCase: {
type: 'boolean',
},
},
additionalProperties: false,
}],
},
create(context) {
const configuration = context.options[0] || {};
const ignoreCase = configuration.ignoreCase || false;
/**
* Get properties name
* @param {Object} node - Property.
* @returns {string} Property name.
*/
function getPropertyName(node) {
if (node.key || ['MethodDefinition', 'Property'].indexOf(node.type) !== -1) {
return node.key.name;
}
if (node.type === 'MemberExpression') {
return node.property.name;
// Special case for class properties
// (babel-eslint@5 does not expose property name so we have to rely on tokens)
}
if (node.type === 'ClassProperty') {
const tokens = getFirstTokens(context, node, 2);
return tokens[1] && tokens[1].type === 'Identifier' ? tokens[1].value : tokens[0].value;
}
return '';
}
/**
* Checks if the Identifier node passed in looks like a defaultProps declaration.
* @param {ASTNode} node The node to check. Must be an Identifier node.
* @returns {boolean} `true` if the node is a defaultProps declaration, `false` if not
*/
function isDefaultPropsDeclaration(node) {
const propName = getPropertyName(node);
return (propName === 'defaultProps' || propName === 'getDefaultProps');
}
function getKey(node) {
return getText(context, node.key || node.argument);
}
/**
* Find a variable by name in the current scope.
* @param {ASTNode} node The node to look for.
* @param {string} name Name of the variable to look for.
* @returns {ASTNode|null} Return null if the variable could not be found, ASTNode otherwise.
*/
function findVariableByName(node, name) {
const variable = variableUtil.getVariableFromContext(context, node, name);
if (!variable || !variable.defs[0] || !variable.defs[0].node) {
return null;
}
if (variable.defs[0].node.type === 'TypeAlias') {
return variable.defs[0].node.right;
}
return variable.defs[0].node.init;
}
/**
* Checks if defaultProps declarations are sorted
* @param {Array} declarations The array of AST nodes being checked.
* @returns {void}
*/
function checkSorted(declarations) {
// function fix(fixer) {
// return propTypesSortUtil.fixPropTypesSort(context, fixer, declarations, ignoreCase);
// }
declarations.reduce((prev, curr, idx, decls) => {
if (/Spread(?:Property|Element)$/.test(curr.type)) {
return decls[idx + 1];
}
let prevPropName = getKey(prev);
let currentPropName = getKey(curr);
if (ignoreCase) {
prevPropName = prevPropName.toLowerCase();
currentPropName = currentPropName.toLowerCase();
}
if (currentPropName < prevPropName) {
report(context, messages.propsNotSorted, 'propsNotSorted', {
node: curr,
// fix
});
return prev;
}
return curr;
}, declarations[0]);
}
function checkNode(node) {
if (!node) {
return;
}
if (node.type === 'ObjectExpression') {
checkSorted(node.properties);
} else if (node.type === 'Identifier') {
const propTypesObject = findVariableByName(node, node.name);
if (propTypesObject && propTypesObject.properties) {
checkSorted(propTypesObject.properties);
}
}
}
// --------------------------------------------------------------------------
// Public API
// --------------------------------------------------------------------------
return {
'ClassProperty, PropertyDefinition'(node) {
if (!isDefaultPropsDeclaration(node)) {
return;
}
checkNode(node.value);
},
MemberExpression(node) {
if (!isDefaultPropsDeclaration(node)) {
return;
}
checkNode('right' in node.parent && node.parent.right);
},
};
},
};
@@ -0,0 +1,33 @@
import {
Agent,
ClientRequest,
RequestOptions,
AgentCallbackCallback,
AgentCallbackPromise,
AgentCallbackReturn
} from './index';
type LegacyCallback = (
req: ClientRequest,
opts: RequestOptions,
fn: AgentCallbackCallback
) => void;
export default function promisify(fn: LegacyCallback): AgentCallbackPromise {
return function(this: Agent, req: ClientRequest, opts: RequestOptions) {
return new Promise((resolve, reject) => {
fn.call(
this,
req,
opts,
(err: Error | null | undefined, rtn?: AgentCallbackReturn) => {
if (err) {
reject(err);
} else {
resolve(rtn);
}
}
);
});
};
}
@@ -0,0 +1,12 @@
var compose = function compose() {
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
fns[_key] = arguments[_key];
}
return function (x) {
return fns.reduceRight(function (y, f) {
return f(y);
}, x);
};
};
export { compose as default };
@@ -0,0 +1,7 @@
import { InjectFromBaseOptionsLifecycle } from './InjectFromBaseOptionsLifecycle';
export interface InjectFromBaseOptions {
extendConstructorArguments?: boolean | undefined;
extendProperties?: boolean | undefined;
lifecycle?: InjectFromBaseOptionsLifecycle | undefined;
}
//# sourceMappingURL=InjectFromBaseOptions.d.ts.map
@@ -0,0 +1,17 @@
export { Composer } from './compose/composer.js';
export { Document } from './doc/Document.js';
export { Schema } from './schema/Schema.js';
export { YAMLError, YAMLParseError, YAMLWarning } from './errors.js';
export { Alias } from './nodes/Alias.js';
export { isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq } from './nodes/identity.js';
export { Pair } from './nodes/Pair.js';
export { Scalar } from './nodes/Scalar.js';
export { YAMLMap } from './nodes/YAMLMap.js';
export { YAMLSeq } from './nodes/YAMLSeq.js';
import * as cst from './parse/cst.js';
export { cst as CST };
export { Lexer } from './parse/lexer.js';
export { LineCounter } from './parse/line-counter.js';
export { Parser } from './parse/parser.js';
export { parse, parseAllDocuments, parseDocument, stringify } from './public-api.js';
export { visit, visitAsync } from './visit.js';
@@ -0,0 +1 @@
{"version":3,"file":"no-will-update-set-state.d.ts","sourceRoot":"","sources":["no-will-update-set-state.js"],"names":[],"mappings":"wBAUW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,6 @@
import _typeof from "./typeof.js";
function _checkInRHS(e) {
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null"));
return e;
}
export { _checkInRHS as default };
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2013 Josh Glazebrook
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,93 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = reflectAll;
var _reflect = require('./reflect.js');
var _reflect2 = _interopRequireDefault(_reflect);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* A helper function that wraps an array or an object of functions with `reflect`.
*
* @name reflectAll
* @static
* @memberOf module:Utils
* @method
* @see [async.reflect]{@link module:Utils.reflect}
* @category Util
* @param {Array|Object|Iterable} tasks - The collection of
* [async functions]{@link AsyncFunction} to wrap in `async.reflect`.
* @returns {Array} Returns an array of async functions, each wrapped in
* `async.reflect`
* @example
*
* let tasks = [
* function(callback) {
* setTimeout(function() {
* callback(null, 'one');
* }, 200);
* },
* function(callback) {
* // do some more stuff but error ...
* callback(new Error('bad stuff happened'));
* },
* function(callback) {
* setTimeout(function() {
* callback(null, 'two');
* }, 100);
* }
* ];
*
* async.parallel(async.reflectAll(tasks),
* // optional callback
* function(err, results) {
* // values
* // results[0].value = 'one'
* // results[1].error = Error('bad stuff happened')
* // results[2].value = 'two'
* });
*
* // an example using an object instead of an array
* let tasks = {
* one: function(callback) {
* setTimeout(function() {
* callback(null, 'one');
* }, 200);
* },
* two: function(callback) {
* callback('two');
* },
* three: function(callback) {
* setTimeout(function() {
* callback(null, 'three');
* }, 100);
* }
* };
*
* async.parallel(async.reflectAll(tasks),
* // optional callback
* function(err, results) {
* // values
* // results.one.value = 'one'
* // results.two.error = 'two'
* // results.three.value = 'three'
* });
*/
function reflectAll(tasks) {
var results;
if (Array.isArray(tasks)) {
results = tasks.map(_reflect2.default);
} else {
results = {};
Object.keys(tasks).forEach(key => {
results[key] = _reflect2.default.call(this, tasks[key]);
});
}
return results;
}
module.exports = exports.default;
@@ -0,0 +1,67 @@
import { AnyNode, ChildNode, Element, ParentNode } from "domhandler";
/**
* Get a node's children.
*
* @category Traversal
* @param elem Node to get the children of.
* @returns `elem`'s children, or an empty array.
*/
export declare function getChildren(elem: AnyNode): ChildNode[];
export declare function getParent(elem: AnyNode): ParentNode | null;
/**
* Gets an elements siblings, including the element itself.
*
* Attempts to get the children through the element's parent first. If we don't
* have a parent (the element is a root node), we walk the element's `prev` &
* `next` to get all remaining nodes.
*
* @category Traversal
* @param elem Element to get the siblings of.
* @returns `elem`'s siblings, including `elem`.
*/
export declare function getSiblings(elem: AnyNode): AnyNode[];
/**
* Gets an attribute from an element.
*
* @category Traversal
* @param elem Element to check.
* @param name Attribute name to retrieve.
* @returns The element's attribute value, or `undefined`.
*/
export declare function getAttributeValue(elem: Element, name: string): string | undefined;
/**
* Checks whether an element has an attribute.
*
* @category Traversal
* @param elem Element to check.
* @param name Attribute name to look for.
* @returns Returns whether `elem` has the attribute `name`.
*/
export declare function hasAttrib(elem: Element, name: string): boolean;
/**
* Get the tag name of an element.
*
* @category Traversal
* @param elem The element to get the name for.
* @returns The tag name of `elem`.
*/
export declare function getName(elem: Element): string;
/**
* Returns the next element sibling of a node.
*
* @category Traversal
* @param elem The element to get the next sibling of.
* @returns `elem`'s next sibling that is a tag, or `null` if there is no next
* sibling.
*/
export declare function nextElementSibling(elem: AnyNode): Element | null;
/**
* Returns the previous element sibling of a node.
*
* @category Traversal
* @param elem The element to get the previous sibling of.
* @returns `elem`'s previous sibling that is a tag, or `null` if there is no
* previous sibling.
*/
export declare function prevElementSibling(elem: AnyNode): Element | null;
//# sourceMappingURL=traversal.d.ts.map
@@ -0,0 +1,25 @@
"use client";
import {
dropdown_menu_default
} from "./chunk-UIQ4674R.mjs";
import {
dropdown_trigger_default
} from "./chunk-4LJ2IKXJ.mjs";
import {
dropdown_default
} from "./chunk-KQ5CH2X7.mjs";
import "./chunk-BV7BCS3N.mjs";
import {
useDropdown
} from "./chunk-IURKDIR4.mjs";
// src/index.ts
import { MenuItem, MenuSection } from "@heroui/menu";
export {
dropdown_default as Dropdown,
MenuItem as DropdownItem,
dropdown_menu_default as DropdownMenu,
MenuSection as DropdownSection,
dropdown_trigger_default as DropdownTrigger,
useDropdown
};
@@ -0,0 +1,24 @@
import { AriaLabelingProps, Orientation, RefObject } from "@react-types/shared";
import { HTMLAttributes } from "react";
export interface AriaToolbarProps extends AriaLabelingProps {
/**
* The orientation of the entire toolbar.
* @default 'horizontal'
*/
orientation?: Orientation;
}
export interface ToolbarAria {
/**
* Props for the toolbar container.
*/
toolbarProps: HTMLAttributes<HTMLElement>;
}
/**
* Provides the behavior and accessibility implementation for a toolbar.
* A toolbar is a container for a set of interactive controls with arrow key navigation.
* @param props - Props to be applied to the toolbar.
* @param ref - A ref to a DOM element for the toolbar.
*/
export function useToolbar(props: AriaToolbarProps, ref: RefObject<HTMLElement | null>): ToolbarAria;
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,28 @@
var baseAssignValue = require('./_baseAssignValue'),
eq = require('./eq');
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
baseAssignValue(object, key, value);
}
}
module.exports = assignValue;
@@ -0,0 +1,181 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ } = require("eslint-utils")
const checkUnsupportedBuiltins = require("../../util/check-unsupported-builtins")
const enumeratePropertyNames = require("../../util/enumerate-property-names")
const trackMap = {
globals: {
Array: {
from: { [READ]: { supported: "4.0.0" } },
of: { [READ]: { supported: "4.0.0" } },
},
BigInt: {
[READ]: { supported: "10.4.0" },
},
Map: {
[READ]: { supported: "0.12.0" },
},
Math: {
acosh: { [READ]: { supported: "0.12.0" } },
asinh: { [READ]: { supported: "0.12.0" } },
atanh: { [READ]: { supported: "0.12.0" } },
cbrt: { [READ]: { supported: "0.12.0" } },
clz32: { [READ]: { supported: "0.12.0" } },
cosh: { [READ]: { supported: "0.12.0" } },
expm1: { [READ]: { supported: "0.12.0" } },
fround: { [READ]: { supported: "0.12.0" } },
hypot: { [READ]: { supported: "0.12.0" } },
imul: { [READ]: { supported: "0.12.0" } },
log10: { [READ]: { supported: "0.12.0" } },
log1p: { [READ]: { supported: "0.12.0" } },
log2: { [READ]: { supported: "0.12.0" } },
sign: { [READ]: { supported: "0.12.0" } },
sinh: { [READ]: { supported: "0.12.0" } },
tanh: { [READ]: { supported: "0.12.0" } },
trunc: { [READ]: { supported: "0.12.0" } },
},
Number: {
EPSILON: { [READ]: { supported: "0.12.0" } },
isFinite: { [READ]: { supported: "0.10.0" } },
isInteger: { [READ]: { supported: "0.12.0" } },
isNaN: { [READ]: { supported: "0.10.0" } },
isSafeInteger: { [READ]: { supported: "0.12.0" } },
MAX_SAFE_INTEGER: { [READ]: { supported: "0.12.0" } },
MIN_SAFE_INTEGER: { [READ]: { supported: "0.12.0" } },
parseFloat: { [READ]: { supported: "0.12.0" } },
parseInt: { [READ]: { supported: "0.12.0" } },
},
Object: {
assign: { [READ]: { supported: "4.0.0" } },
fromEntries: { [READ]: { supported: "12.0.0" } },
getOwnPropertySymbols: { [READ]: { supported: "0.12.0" } },
is: { [READ]: { supported: "0.10.0" } },
setPrototypeOf: { [READ]: { supported: "0.12.0" } },
values: { [READ]: { supported: "7.0.0" } },
entries: { [READ]: { supported: "7.0.0" } },
getOwnPropertyDescriptors: { [READ]: { supported: "7.0.0" } },
},
Promise: {
[READ]: { supported: "0.12.0" },
allSettled: { [READ]: { supported: "12.9.0" } },
},
Proxy: {
[READ]: { supported: "6.0.0" },
},
Reflect: {
[READ]: { supported: "6.0.0" },
},
Set: {
[READ]: { supported: "0.12.0" },
},
String: {
fromCodePoint: { [READ]: { supported: "4.0.0" } },
raw: { [READ]: { supported: "4.0.0" } },
},
Symbol: {
[READ]: { supported: "0.12.0" },
},
Int8Array: {
[READ]: { supported: "0.10.0" },
},
Uint8Array: {
[READ]: { supported: "0.10.0" },
},
Uint8ClampedArray: {
[READ]: { supported: "0.10.0" },
},
Int16Array: {
[READ]: { supported: "0.10.0" },
},
Uint16Array: {
[READ]: { supported: "0.10.0" },
},
Int32Array: {
[READ]: { supported: "0.10.0" },
},
Uint32Array: {
[READ]: { supported: "0.10.0" },
},
BigInt64Array: {
[READ]: { supported: "10.4.0" },
},
BigUint64Array: {
[READ]: { supported: "10.4.0" },
},
Float32Array: {
[READ]: { supported: "0.10.0" },
},
Float64Array: {
[READ]: { supported: "0.10.0" },
},
DataView: {
[READ]: { supported: "0.10.0" },
},
WeakMap: {
[READ]: { supported: "0.12.0" },
},
WeakSet: {
[READ]: { supported: "0.12.0" },
},
Atomics: {
[READ]: { supported: "8.10.0" },
},
SharedArrayBuffer: {
[READ]: { supported: "8.10.0" },
},
globalThis: {
[READ]: { supported: "12.0.0" },
},
},
}
module.exports = {
meta: {
docs: {
description:
"disallow unsupported ECMAScript built-ins on the specified version",
category: "Possible Errors",
recommended: true,
url:
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/es-builtins.md",
},
type: "problem",
fixable: null,
schema: [
{
type: "object",
properties: {
version: {
type: "string",
},
ignores: {
type: "array",
items: {
enum: Array.from(
enumeratePropertyNames(trackMap.globals)
),
},
uniqueItems: true,
},
},
additionalProperties: false,
},
],
messages: {
unsupported:
"The '{{name}}' is not supported until Node.js {{supported}}. The configured version range is '{{version}}'.",
},
},
create(context) {
return {
"Program:exit"() {
checkUnsupportedBuiltins(context, trackMap)
},
}
},
}
@@ -0,0 +1 @@
{"mappings":";;AAgBA;IACE,kDAAkD;IAClD,SAAS,EAAE,aAAa,CAAA;CACzB;AAED;;;GAGG;AACH,kCAAkC,KAAK,EAAE,uBAAuB,EAAE,GAAG,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GAAG,kBAAkB,CA8B7H;ACpCD;IACE,oDAAoD;IACpD,QAAQ,EAAE,aAAa,CAAA;CACxB;AAED;;;GAGG;AACH,+BAA+B,KAAK,EAAE,oBAAoB,GAAG,eAAe,CAa3E;AC5BD,YAAY,EAAC,uBAAuB,EAAE,oBAAoB,EAAC,MAAM,0BAA0B,CAAC","sources":["packages/@react-aria/breadcrumbs/src/packages/@react-aria/breadcrumbs/src/useBreadcrumbItem.ts","packages/@react-aria/breadcrumbs/src/packages/@react-aria/breadcrumbs/src/useBreadcrumbs.ts","packages/@react-aria/breadcrumbs/src/packages/@react-aria/breadcrumbs/src/index.ts","packages/@react-aria/breadcrumbs/src/index.ts"],"sourcesContent":[null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useBreadcrumbItem} from './useBreadcrumbItem';\nexport {useBreadcrumbs} from './useBreadcrumbs';\nexport type {AriaBreadcrumbItemProps, AriaBreadcrumbsProps} from '@react-types/breadcrumbs';\nexport type {BreadcrumbItemAria} from './useBreadcrumbItem';\nexport type {BreadcrumbsAria} from './useBreadcrumbs';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -0,0 +1,30 @@
import baseRange from './_baseRange.js';
import isIterateeCall from './_isIterateeCall.js';
import toFinite from './toFinite.js';
/**
* Creates a `_.range` or `_.rangeRight` function.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new range function.
*/
function createRange(fromRight) {
return function(start, end, step) {
if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
end = step = undefined;
}
// Ensure the sign of `-0` is preserved.
start = toFinite(start);
if (end === undefined) {
end = start;
start = 0;
} else {
end = toFinite(end);
}
step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
return baseRange(start, end, step, fromRight);
};
}
export default createRange;
@@ -0,0 +1 @@
{"name":"levn","version":"0.4.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532093641,"integrity":"sha512-FkymZYtx329CmIaO3HdzaHZ6WrL5BZj/NGLWVaM6TuNvsbYcBnTjOd6Yzvi6lJfLVAW0oJGhl8mK9EKILopYDg==","mode":420,"size":1054},"lib/cast.js":{"checkedAt":1794532093641,"integrity":"sha512-nn1LAMLVrIdaNIIZB7sAGSv0EVIePV0DeWyoHLQwWSFtW08Lv2mGyCbo7Izsy+Ci90VloJHwMsnZMq5mpxuOrA==","mode":420,"size":7861},"lib/index.js":{"checkedAt":1794532093641,"integrity":"sha512-W1srhj7+tQgQrTHoju3OONH6eTJY4K5FanlLBZSlDPVuE61DjmmFPQ0SVXxswdzoHegiBK3MrYebK1wKLNn5UA==","mode":420,"size":788},"lib/parse-string.js":{"checkedAt":1794532093642,"integrity":"sha512-+QQvLmxxfsvzJAaFZQeBWAHIPruO2CMTxepyXXZK9eBK7tuY8rCP354HOIwfiudisN6FceTOmohmW3vjipU7pg==","mode":420,"size":3875},"package.json":{"checkedAt":1794532093642,"integrity":"sha512-7IRkTraN/jdCis+sKH/yfBHNifTmK4xSCygOJ+ShL0R+NgE66Ny8GNTsuqlkUsVLBbbEtCOwYf1Shss+QV9Dbw==","mode":420,"size":901},"README.md":{"checkedAt":1794532093642,"integrity":"sha512-Y20Ck6py0hgAyvHn66HItzFTbrXWxPpT8ld3ofGckq1Pt54Q2ia7WWAiinUhZOa1i7Y9EwDI6Ay/21/F4NY/Cg==","mode":420,"size":10468}}}
@@ -0,0 +1 @@
{"version":3,"file":"buildDeactivationParams.spec.d.ts","sourceRoot":"","sources":["../../../../src/container/calculations/buildDeactivationParams.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,93 @@
import $7GIZw$react from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $70d70eb16ea48428$var$Row(props) {
return null;
}
$70d70eb16ea48428$var$Row.getCollectionNode = function* getCollectionNode(props, context) {
let { children: children, textValue: textValue, UNSTABLE_childItems: UNSTABLE_childItems } = props;
yield {
type: 'item',
props: props,
textValue: textValue,
'aria-label': props['aria-label'],
hasChildNodes: true,
*childNodes () {
// Process cells first
if (context.showDragButtons) yield {
type: 'cell',
key: 'header-drag',
props: {
isDragButtonCell: true
}
};
if (context.showSelectionCheckboxes && context.selectionMode !== 'none') yield {
type: 'cell',
key: 'header',
props: {
isSelectionCell: true
}
};
if (typeof children === 'function') {
for (let column of context.columns)yield {
type: 'cell',
element: children(column.key),
key: column.key // this is combined with the row key by CollectionBuilder
};
if (UNSTABLE_childItems) for (let child of UNSTABLE_childItems)// Note: in order to reuse the render function of TableBody for our child rows, we just need to yield a type and a value here. CollectionBuilder will then look up
// the parent renderer and use that to build the full node of this child row, using the value provided here to generate the cells
yield {
type: 'item',
value: child
};
} else {
let cells = [];
let childRows = [];
let columnCount = 0;
(0, $7GIZw$react).Children.forEach(children, (node)=>{
if (node.type === $70d70eb16ea48428$var$Row) {
if (cells.length < context.columns.length) throw new Error('All of a Row\'s child Cells must be positioned before any child Rows.');
childRows.push({
type: 'item',
element: node
});
} else {
cells.push({
type: 'cell',
element: node
});
var _node_props_colSpan;
columnCount += (_node_props_colSpan = node.props.colSpan) !== null && _node_props_colSpan !== void 0 ? _node_props_colSpan : 1;
}
});
if (columnCount !== context.columns.length) throw new Error(`Cell count must match column count. Found ${columnCount} cells and ${context.columns.length} columns.`);
yield* cells;
yield* childRows;
}
},
shouldInvalidate (newContext) {
// Invalidate all rows if the columns changed.
return newContext.columns.length !== context.columns.length || newContext.columns.some((c, i)=>c.key !== context.columns[i].key) || newContext.showSelectionCheckboxes !== context.showSelectionCheckboxes || newContext.showDragButtons !== context.showDragButtons || newContext.selectionMode !== context.selectionMode;
}
};
};
/**
* A Row represents a single item in a Table and contains Cell elements for each column.
* Cells can be statically defined as children, or generated dynamically using a function
* based on the columns defined in the TableHeader.
*/ // We don't want getCollectionNode to show up in the type definition
let $70d70eb16ea48428$export$b59bdbef9ce70de2 = $70d70eb16ea48428$var$Row;
export {$70d70eb16ea48428$export$b59bdbef9ce70de2 as Row};
//# sourceMappingURL=Row.module.js.map
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,kBAAkB,CAAC,OAAS,CAAC,cAAQ,EAAE,KAAK,IAAI,CAAC,oBAAc,CAAC;IAClF,qBAAqB,CAAC,wEAA6C,CAAC;IACpE,UAAU,CAAC,MAAM,CAAC;IAClB,eAAe,CAAC,uCAAwB,CAAC;IACzC,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,4CAAuB,CAAC;YAAE,KAAK,IAAM,CAAC,WAAQ,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,cAAQ,CAAC;YAAE,OAAO,IAAM,CAAC,WAAQ,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,cAAQ,CAAC;QAAA,GAAG,CAAC,CAAC;IACzO,gBAAgB,CAAC,OAAS,CAAC,yBAAgB,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;AAC3D","sources":["packages/@react-aria/grid/intl/cs-CZ.json"],"sourcesContent":["{\n \"deselectedItem\": \"Položka {item} není vybrána.\",\n \"longPressToSelect\": \"Dlouhým stisknutím přejdete do režimu výběru.\",\n \"select\": \"Vybrat\",\n \"selectedAll\": \"Vybrány všechny položky.\",\n \"selectedCount\": \"{count, plural, =0 {Nevybrány žádné položky} one {Vybrána # položka} other {Vybráno # položek}}.\",\n \"selectedItem\": \"Vybrána položka {item}.\"\n}\n"],"names":[],"version":3,"file":"cs-CZ.module.js.map"}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more