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

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

No files matched your search

@@ -0,0 +1,268 @@
import { _ as _to_array } from "./_to_array.js";
import { _ as _to_property_key } from "./_to_property_key.js";
import { _ as _type_of } from "./_type_of.js";
function _decorate(decorators, factory, superClass) {
var r = factory(function initialize(O) {
_initializeInstanceElements(O, decorated.elements);
}, superClass);
var decorated = _decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators);
_initializeClassElements(r.F, decorated.elements);
return _runClassFinishers(r.F, decorated.finishers);
}
function _createElementDescriptor(def) {
var key = _to_property_key(def.key);
var descriptor;
if (def.kind === "method") {
descriptor = { value: def.value, writable: true, configurable: true, enumerable: false };
Object.defineProperty(def.value, "name", { value: _type_of(key) === "symbol" ? "" : key, configurable: true });
} else if (def.kind === "get") descriptor = { get: def.value, configurable: true, enumerable: false };
else if (def.kind === "set") descriptor = { set: def.value, configurable: true, enumerable: false };
else if (def.kind === "field") descriptor = { configurable: true, writable: true, enumerable: true };
var element = { kind: def.kind === "field" ? "field" : "method", key: key, placement: def.static ? "static" : def.kind === "field" ? "own" : "prototype", descriptor: descriptor };
if (def.decorators) element.decorators = def.decorators;
if (def.kind === "field") element.initializer = def.value;
return element;
}
function _coalesceGetterSetter(element, other) {
if (element.descriptor.get !== undefined) other.descriptor.get = element.descriptor.get;
else other.descriptor.set = element.descriptor.set;
}
function _coalesceClassElements(elements) {
var newElements = [];
var isSameElement = function isSameElement(other) {
return other.kind === "method" && other.key === element.key && other.placement === element.placement;
};
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
var other;
if (element.kind === "method" && (other = newElements.find(isSameElement))) {
if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {
if (_hasDecorators(element) || _hasDecorators(other)) {
throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated.");
}
other.descriptor = element.descriptor;
} else {
if (_hasDecorators(element)) {
if (_hasDecorators(other)) {
throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ").");
}
other.decorators = element.decorators;
}
_coalesceGetterSetter(element, other);
}
} else {
newElements.push(element);
}
}
return newElements;
}
function _hasDecorators(element) {
return element.decorators && element.decorators.length;
}
function _isDataDescriptor(desc) {
return desc !== undefined && !(desc.value === undefined && desc.writable === undefined);
}
function _initializeClassElements(F, elements) {
var proto = F.prototype;
["method", "field"].forEach(function(kind) {
elements.forEach(function(element) {
var placement = element.placement;
if (element.kind === kind && (placement === "static" || placement === "prototype")) {
var receiver = placement === "static" ? F : proto;
_defineClassElement(receiver, element);
}
});
});
}
function _initializeInstanceElements(O, elements) {
["method", "field"].forEach(function(kind) {
elements.forEach(function(element) {
if (element.kind === kind && element.placement === "own") _defineClassElement(O, element);
});
});
}
function _defineClassElement(receiver, element) {
var descriptor = element.descriptor;
if (element.kind === "field") {
var initializer = element.initializer;
descriptor = { enumerable: descriptor.enumerable, writable: descriptor.writable, configurable: descriptor.configurable, value: initializer === void 0 ? void 0 : initializer.call(receiver) };
}
Object.defineProperty(receiver, element.key, descriptor);
}
function _decorateClass(elements, decorators) {
var newElements = [];
var finishers = [];
var placements = { static: [], prototype: [], own: [] };
elements.forEach(function(element) {
_addElementPlacement(element, placements);
});
elements.forEach(function(element) {
if (!_hasDecorators(element)) return newElements.push(element);
var elementFinishersExtras = _decorateElement(element, placements);
newElements.push(elementFinishersExtras.element);
newElements.push.apply(newElements, elementFinishersExtras.extras);
finishers.push.apply(finishers, elementFinishersExtras.finishers);
});
if (!decorators) return { elements: newElements, finishers: finishers };
var result = _decorateConstructor(newElements, decorators);
finishers.push.apply(finishers, result.finishers);
result.finishers = finishers;
return result;
}
function _addElementPlacement(element, placements, silent) {
var keys = placements[element.placement];
if (!silent && keys.indexOf(element.key) !== -1) throw new TypeError("Duplicated element (" + element.key + ")");
keys.push(element.key);
}
function _decorateElement(element, placements) {
var extras = [];
var finishers = [];
for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) {
var keys = placements[element.placement];
keys.splice(keys.indexOf(element.key), 1);
var elementObject = _fromElementDescriptor(element);
var elementFinisherExtras = _toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject);
element = elementFinisherExtras.element;
_addElementPlacement(element, placements);
if (elementFinisherExtras.finisher) finishers.push(elementFinisherExtras.finisher);
var newExtras = elementFinisherExtras.extras;
if (newExtras) {
for (var j = 0; j < newExtras.length; j++) _addElementPlacement(newExtras[j], placements);
extras.push.apply(extras, newExtras);
}
}
return { element: element, finishers: finishers, extras: extras };
}
function _decorateConstructor(elements, decorators) {
var finishers = [];
for (var i = decorators.length - 1; i >= 0; i--) {
var obj = _fromClassDescriptor(elements);
var elementsAndFinisher = _toClassDescriptor((0, decorators[i])(obj) || obj);
if (elementsAndFinisher.finisher !== undefined) finishers.push(elementsAndFinisher.finisher);
if (elementsAndFinisher.elements !== undefined) {
elements = elementsAndFinisher.elements;
for (var j = 0; j < elements.length - 1; j++) {
for (var k = j + 1; k < elements.length; k++) {
if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) {
throw new TypeError("Duplicated element (" + elements[j].key + ")");
}
}
}
}
}
return { elements: elements, finishers: finishers };
}
function _fromElementDescriptor(element) {
var obj = { kind: element.kind, key: element.key, placement: element.placement, descriptor: element.descriptor };
var desc = { value: "Descriptor", configurable: true };
Object.defineProperty(obj, Symbol.toStringTag, desc);
if (element.kind === "field") obj.initializer = element.initializer;
return obj;
}
function _toElementDescriptors(elementObjects) {
if (elementObjects === undefined) return;
return _to_array(elementObjects).map(function(elementObject) {
var element = _toElementDescriptor(elementObject);
_disallowProperty(elementObject, "finisher", "An element descriptor");
_disallowProperty(elementObject, "extras", "An element descriptor");
return element;
});
}
function _toElementDescriptor(elementObject) {
var kind = String(elementObject.kind);
if (kind !== "method" && kind !== "field") {
throw new TypeError("An element descriptor's .kind property must be either \"method\" or" + " \"field\", but a decorator created an element descriptor with" + " .kind \"" + kind + "\"");
}
var key = _to_property_key(elementObject.key);
var placement = String(elementObject.placement);
if (placement !== "static" && placement !== "prototype" && placement !== "own") {
throw new TypeError(
"An element descriptor's .placement property must be one of \"static\","
+ " \"prototype\" or \"own\", but a decorator created an element descriptor"
+ " with .placement \""
+ placement
+ "\""
);
}
var descriptor = elementObject.descriptor;
_disallowProperty(elementObject, "elements", "An element descriptor");
var element = { kind: kind, key: key, placement: placement, descriptor: Object.assign({}, descriptor) };
if (kind !== "field") _disallowProperty(elementObject, "initializer", "A method descriptor");
else {
_disallowProperty(descriptor, "get", "The property descriptor of a field descriptor");
_disallowProperty(descriptor, "set", "The property descriptor of a field descriptor");
_disallowProperty(descriptor, "value", "The property descriptor of a field descriptor");
element.initializer = elementObject.initializer;
}
return element;
}
function _toElementFinisherExtras(elementObject) {
var element = _toElementDescriptor(elementObject);
var finisher = _optionalCallableProperty(elementObject, "finisher");
var extras = _toElementDescriptors(elementObject.extras);
return { element: element, finisher: finisher, extras: extras };
}
function _fromClassDescriptor(elements) {
var obj = { kind: "class", elements: elements.map(_fromElementDescriptor) };
var desc = { value: "Descriptor", configurable: true };
Object.defineProperty(obj, Symbol.toStringTag, desc);
return obj;
}
function _toClassDescriptor(obj) {
var kind = String(obj.kind);
if (kind !== "class") {
throw new TypeError("A class descriptor's .kind property must be \"class\", but a decorator" + " created a class descriptor with .kind \"" + kind + "\"");
}
_disallowProperty(obj, "key", "A class descriptor");
_disallowProperty(obj, "placement", "A class descriptor");
_disallowProperty(obj, "descriptor", "A class descriptor");
_disallowProperty(obj, "initializer", "A class descriptor");
_disallowProperty(obj, "extras", "A class descriptor");
var finisher = _optionalCallableProperty(obj, "finisher");
var elements = _toElementDescriptors(obj.elements);
return { elements: elements, finisher: finisher };
}
function _disallowProperty(obj, name, objectType) {
if (obj[name] !== undefined) throw new TypeError(objectType + " can't have a ." + name + " property.");
}
function _optionalCallableProperty(obj, name) {
var value = obj[name];
if (value !== undefined && typeof value !== "function") {
throw new TypeError("Expected '" + name + "' to be a function");
}
return value;
}
function _runClassFinishers(constructor, finishers) {
for (var i = 0; i < finishers.length; i++) {
var newConstructor = (0, finishers[i])(constructor);
if (newConstructor !== undefined) {
if (typeof newConstructor !== "function") throw new TypeError("Finishers must return a constructor.");
constructor = newConstructor;
}
}
return constructor;
}
export { _decorate as _ };
@@ -0,0 +1,8 @@
# `@peculiar/asn1-csr`
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/PeculiarVentures/asn1-schema/master/packages/csr/LICENSE.md)
[![npm version](https://badge.fury.io/js/%40peculiar%2Fasn1-csr.svg)](https://badge.fury.io/js/%40peculiar%2Fasn1-csr)
[![NPM](https://nodei.co/npm/@peculiar/asn1-csr.png)](https://nodei.co/npm/@peculiar/asn1-csr/)
[RFC 2986](https://tools.ietf.org/html/rfc2986) PKCS #10: Certification Request Syntax Specification Version 1.7
@@ -0,0 +1 @@
{"name":"vite-plugin-compression","version":"0.5.1","requiresBuild":false,"files":{"dist/index.cjs":{"checkedAt":1794532124382,"integrity":"sha512-c4awWiKkUmerG4CEvDa5V2Bbcunmr8LWq2vsTA0cmmbgOBVZU2ocs/4VsN5Z5efVSHdc5ma+ESUrhplc9zjYgw==","mode":420,"size":6269},"package.json":{"checkedAt":1794532124382,"integrity":"sha512-JhSz5l9alTFFDkFT6KZ0EBTUv9i621yQAWT8TO0k6nLbX49IPxKeyT8QNLtHuzuodo92ru1HBOaYZfm8xBdL5A==","mode":420,"size":1199},"dist/index.mjs":{"checkedAt":1794532124382,"integrity":"sha512-dUCda3yL58XauDADnitWjXlcnV4PcBAm5N8stA6kwxglqpbU3ljX5RVKMu105hC/Wf9HNl0pfuyvnW8n7d9yFg==","mode":420,"size":5514},"dist/index.d.ts":{"checkedAt":1794532124382,"integrity":"sha512-AS9kIXmTz3IqzebJNnFRDz6rCff21pOJabHbpsU1geGCVTHKHMij2x69mEcubCGm9K2aHGuWYMs8D7qeesLq6w==","mode":420,"size":1387},"LICENSE":{"checkedAt":1794532124382,"integrity":"sha512-03hwzEgU/aFR1t7ZUx1/ANhy/wmnuc3f45nhzFwE6C+wmPbiWErv2ewnRSZWK3VZh4tGJcLZIX2IjyKz6lBBuw==","mode":420,"size":1070}}}
@@ -0,0 +1,28 @@
// src/use-kbd.ts
import { mapPropsVariants } from "@heroui/system-rsc";
import { kbd } from "@heroui/theme";
import { clsx, objectToDeps } from "@heroui/shared-utils";
import { useMemo } from "react";
function useKbd(originalProps) {
const [props, variantProps] = mapPropsVariants(originalProps, kbd.variantKeys);
const { as, children, className, keys, title, classNames, ...otherProps } = props;
const Component = as || "kbd";
const slots = useMemo(
() => kbd({
...variantProps
}),
[objectToDeps(variantProps)]
);
const baseStyles = clsx(classNames == null ? void 0 : classNames.base, className);
const keysToRender = typeof keys === "string" ? [keys] : Array.isArray(keys) ? keys : [];
const getKbdProps = (props2 = {}) => ({
...otherProps,
...props2,
className: clsx(slots.base({ class: clsx(baseStyles, props2.className) }))
});
return { Component, slots, classNames, title, children, keysToRender, getKbdProps };
}
export {
useKbd
};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","1028":"L M G N O P","1346":"C"},C:{"1":"0 1 2 3 4 5 gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC 0C","196":"fB","516":"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 1C"},D:{"1":"0 1 2 3 4 5 yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB K D E F A B C L M G N O","33":"6 7 8 9 P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB"},E:{"1":"A B C L M G 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB 2C ZC 3C","33":"K D E F 4C 5C"},F:{"1":"0 1 2 3 4 5 lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F B C FD GD HD ID NC uC JD OC","33":"6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB"},G:{"1":"QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC LD","33":"E MD ND OD PD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC","33":"mD nD"},J:{"2":"D","33":"A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB qD rD sD aC tD uD vD wD xD QC RC SC yD","33":"J oD pD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:5,C:"CSS Filter Effects",D:true};
@@ -0,0 +1 @@
module.exports={C:{"52":0.00403,"62":0.00403,"75":0.00403,"115":0.13292,"128":0.3021,"131":0.00403,"140":0.39072,"141":0.00403,"142":0.00403,"143":0.55184,"144":0.45114,_:"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 53 54 55 56 57 58 59 60 61 63 64 65 66 67 68 69 70 71 72 73 74 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 129 130 132 133 134 135 136 137 138 139 145 146 147 3.5 3.6"},D:{"11":0.01611,"49":0.00403,"68":0.00403,"72":0.00806,"79":0.04834,"81":0.00403,"83":0.00806,"86":0.00403,"87":0.02014,"89":0.00403,"90":0.00403,"92":0.0282,"97":0.00403,"98":0.00403,"101":0.05236,"102":0.00806,"103":0.01611,"105":0.03625,"107":0.00403,"108":0.04028,"109":0.3746,"114":0.20543,"115":0.05639,"116":0.04834,"117":0.00403,"118":0.00403,"119":0.05639,"120":0.02417,"121":0.01208,"122":0.03625,"123":0.01611,"124":0.07653,"125":1.92136,"126":0.00806,"127":0.02417,"128":0.18529,"129":0.00403,"130":0.12084,"131":0.03625,"132":0.0725,"133":0.04028,"134":0.19737,"135":0.03222,"136":0.05236,"137":0.08459,"138":0.37863,"139":0.3303,"140":4.38246,"141":11.91482,"142":0.18126,"143":0.09264,_:"4 5 6 7 8 9 10 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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 69 70 71 73 74 75 76 77 78 80 84 85 88 91 93 94 95 96 99 100 104 106 110 111 112 113 144 145"},F:{"79":0.00403,"91":0.00403,"92":0.01208,"95":0.03222,"120":0.06042,"121":0.00403,"122":0.31418,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 85 86 87 88 89 90 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.02014,"92":0.00403,"109":0.03625,"110":0.00403,"118":0.02014,"120":0.03625,"121":0.00806,"122":0.02014,"123":0.00403,"125":0.00806,"126":0.00403,"127":0.02014,"128":0.00403,"129":0.00403,"131":0.01611,"133":0.01208,"134":0.00403,"135":0.03625,"136":0.00403,"137":0.01611,"138":0.03222,"139":0.03625,"140":1.07145,"141":5.04306,"142":0.00806,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 111 112 113 114 115 116 117 119 124 130 132"},E:{"10":0.00403,"14":0.04834,_:"0 4 5 6 7 8 9 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 16.0 26.2","13.1":0.02014,"14.1":0.19737,"15.2-15.3":0.01208,"15.4":0.02417,"15.5":0.02014,"15.6":0.06445,"16.1":0.01208,"16.2":0.00806,"16.3":0.00806,"16.4":0.08056,"16.5":0.02014,"16.6":0.28599,"17.0":0.00403,"17.1":0.24974,"17.2":0.02014,"17.3":0.01611,"17.4":0.01611,"17.5":0.03222,"17.6":0.13292,"18.0":0.00403,"18.1":0.03222,"18.2":0.01208,"18.3":0.08862,"18.4":0.0282,"18.5-18.6":0.18932,"26.0":0.3746,"26.1":0.02417},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.0026,"5.0-5.1":0,"6.0-6.1":0.01039,"7.0-7.1":0.00779,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.02338,"10.0-10.2":0.0026,"10.3":0.04415,"11.0-11.2":0.6545,"11.3-11.4":0.01558,"12.0-12.1":0.00519,"12.2-12.5":0.12726,"13.0-13.1":0,"13.2":0.01299,"13.3":0.00519,"13.4-13.7":0.02078,"14.0-14.4":0.04415,"14.5-14.8":0.04675,"15.0-15.1":0.04415,"15.2-15.3":0.03376,"15.4":0.03896,"15.5":0.04415,"15.6-15.8":0.57658,"16.0":0.07792,"16.1":0.14544,"16.2":0.07532,"16.3":0.13506,"16.4":0.03376,"16.5":0.05974,"16.6-16.7":0.77138,"17.0":0.05454,"17.1":0.08311,"17.2":0.05974,"17.3":0.08831,"17.4":0.15583,"17.5":0.26751,"17.6-17.7":0.67528,"18.0":0.15324,"18.1":0.31686,"18.2":0.17142,"18.3":0.55061,"18.4":0.2831,"18.5-18.6":14.43536,"26.0":1.78429,"26.1":0.06493},P:{"4":0.05235,"21":0.03141,"23":0.01047,"25":0.01047,"26":0.03141,"27":0.02094,"28":2.87922,"29":0.19893,_:"20 22 24 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 14.0 15.0 16.0 17.0 19.0","5.0-5.4":0.01047,"13.0":0.05235,"18.0":0.01047},I:{"0":0.00596,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0.07166,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.54378,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.77039},Q:{"14.9":0.1493},O:{"0":0.41207},H:{"0":0},L:{"0":33.84687}};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E wC","132":"F A B"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC J ZB 0C 1C","132":"K D E F A"},D:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J","16":"ZB K D E L M","388":"F A B C"},E:{"1":"D E F A B C L M G 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J 2C ZC","16":"ZB K","388":"3C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JD OC","2":"F FD GD HD ID","132":"B NC uC"},G:{"1":"E MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"KD","16":"ZC vC","388":"LD"},H:{"1":"hD"},I:{"1":"I mD nD","2":"iD jD kD","388":"TC J lD vC"},J:{"1":"A","388":"D"},K:{"1":"C H OC","2":"A","132":"B NC uC"},L:{"1":"I"},M:{"1":"MC"},N:{"132":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"CustomEvent",D:true};
@@ -0,0 +1,34 @@
'use strict';
var $TypeError = require('es-errors/type');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayLength = require('typed-array-length');
var IsFixedLengthArrayBuffer = require('./IsFixedLengthArrayBuffer');
var IsSharedArrayBuffer = require('./IsSharedArrayBuffer');
// https://262.ecma-international.org/16.0/#sec-istypedarrayfixedlength
module.exports = function IsTypedArrayFixedLength(O) {
if (!isTypedArray(O)) {
throw new $TypeError('Assertion failed: `obj` must be a Typed Array');
}
// 2. Let buffer be O.[[ViewedArrayBuffer]].
var buffer = typedArrayBuffer(O); // step 2
var isFixed = IsFixedLengthArrayBuffer(buffer);
var length = isFixed ? typedArrayLength(O) : 'AUTO';
if (length === 'AUTO') {
return false; // step 1
}
if (!isFixed && !IsSharedArrayBuffer(buffer)) {
return false; // step 3
}
return true; // step 4
};
@@ -0,0 +1,102 @@
'use strict';
const assert = require('assert');
const { randomFillSync } = require('crypto');
const { inspect } = require('util');
const busboy = require('..');
const { mustCall } = require('./common.js');
const BOUNDARY = 'u2KxIV5yF1y+xUspOQCCZopaVgeV6Jxihv35XQJmuTx8X3sh';
function formDataSection(key, value) {
return Buffer.from(
`\r\n--${BOUNDARY}`
+ `\r\nContent-Disposition: form-data; name="${key}"`
+ `\r\n\r\n${value}`
);
}
function formDataFile(key, filename, contentType) {
const buf = Buffer.allocUnsafe(100000);
return Buffer.concat([
Buffer.from(`\r\n--${BOUNDARY}\r\n`),
Buffer.from(`Content-Disposition: form-data; name="${key}"`
+ `; filename="${filename}"\r\n`),
Buffer.from(`Content-Type: ${contentType}\r\n\r\n`),
randomFillSync(buf)
]);
}
const reqChunks = [
Buffer.concat([
formDataFile('file', 'file.bin', 'application/octet-stream'),
formDataSection('foo', 'foo value'),
]),
formDataSection('bar', 'bar value'),
Buffer.from(`\r\n--${BOUNDARY}--\r\n`)
];
const bb = busboy({
headers: {
'content-type': `multipart/form-data; boundary=${BOUNDARY}`
}
});
const expected = [
{ type: 'file',
name: 'file',
info: {
filename: 'file.bin',
encoding: '7bit',
mimeType: 'application/octet-stream',
},
},
{ type: 'field',
name: 'foo',
val: 'foo value',
info: {
nameTruncated: false,
valueTruncated: false,
encoding: '7bit',
mimeType: 'text/plain',
},
},
{ type: 'field',
name: 'bar',
val: 'bar value',
info: {
nameTruncated: false,
valueTruncated: false,
encoding: '7bit',
mimeType: 'text/plain',
},
},
];
const results = [];
bb.on('field', (name, val, info) => {
results.push({ type: 'field', name, val, info });
});
bb.on('file', (name, stream, info) => {
results.push({ type: 'file', name, info });
// Simulate a pipe where the destination is pausing (perhaps due to waiting
// for file system write to finish)
setTimeout(() => {
stream.resume();
}, 10);
});
bb.on('close', mustCall(() => {
assert.deepStrictEqual(
results,
expected,
'Results mismatch.\n'
+ `Parsed: ${inspect(results)}\n`
+ `Expected: ${inspect(expected)}`
);
}));
for (const chunk of reqChunks)
bb.write(chunk);
bb.end();
@@ -0,0 +1,8 @@
import type { AST_TOKEN_TYPES, TSESTree } from '../ts-estree';
declare namespace AST {
type TokenType = AST_TOKEN_TYPES;
type Token = TSESTree.Token;
type SourceLocation = TSESTree.SourceLocation;
type Range = TSESTree.Range;
}
export type { AST };
@@ -0,0 +1,107 @@
/* This file is automatically generated and should not be manually edited. */
/* To modify this file, please run the `npm run build` command instead. */
export { _ as _apply_decorated_descriptor } from "./_apply_decorated_descriptor.js";
export { _ as _apply_decs_2203_r } from "./_apply_decs_2203_r.js";
export { _ as _array_like_to_array } from "./_array_like_to_array.js";
export { _ as _array_with_holes } from "./_array_with_holes.js";
export { _ as _array_without_holes } from "./_array_without_holes.js";
export { _ as _assert_this_initialized } from "./_assert_this_initialized.js";
export { _ as _async_generator } from "./_async_generator.js";
export { _ as _async_generator_delegate } from "./_async_generator_delegate.js";
export { _ as _async_iterator } from "./_async_iterator.js";
export { _ as _async_to_generator } from "./_async_to_generator.js";
export { _ as _await_async_generator } from "./_await_async_generator.js";
export { _ as _await_value } from "./_await_value.js";
export { _ as _call_super } from "./_call_super.js";
export { _ as _check_private_redeclaration } from "./_check_private_redeclaration.js";
export { _ as _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js";
export { _ as _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js";
export { _ as _class_apply_descriptor_set } from "./_class_apply_descriptor_set.js";
export { _ as _class_apply_descriptor_update } from "./_class_apply_descriptor_update.js";
export { _ as _class_call_check } from "./_class_call_check.js";
export { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js";
export { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js";
export { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js";
export { _ as _class_name_tdz_error } from "./_class_name_tdz_error.js";
export { _ as _class_private_field_destructure } from "./_class_private_field_destructure.js";
export { _ as _class_private_field_get } from "./_class_private_field_get.js";
export { _ as _class_private_field_init } from "./_class_private_field_init.js";
export { _ as _class_private_field_loose_base } from "./_class_private_field_loose_base.js";
export { _ as _class_private_field_loose_key } from "./_class_private_field_loose_key.js";
export { _ as _class_private_field_set } from "./_class_private_field_set.js";
export { _ as _class_private_field_update } from "./_class_private_field_update.js";
export { _ as _class_private_method_get } from "./_class_private_method_get.js";
export { _ as _class_private_method_init } from "./_class_private_method_init.js";
export { _ as _class_private_method_set } from "./_class_private_method_set.js";
export { _ as _class_static_private_field_destructure } from "./_class_static_private_field_destructure.js";
export { _ as _class_static_private_field_spec_get } from "./_class_static_private_field_spec_get.js";
export { _ as _class_static_private_field_spec_set } from "./_class_static_private_field_spec_set.js";
export { _ as _class_static_private_field_update } from "./_class_static_private_field_update.js";
export { _ as _class_static_private_method_get } from "./_class_static_private_method_get.js";
export { _ as _construct } from "./_construct.js";
export { _ as _create_class } from "./_create_class.js";
export { _ as _create_for_of_iterator_helper_loose } from "./_create_for_of_iterator_helper_loose.js";
export { _ as _create_super } from "./_create_super.js";
export { _ as _decorate } from "./_decorate.js";
export { _ as _defaults } from "./_defaults.js";
export { _ as _define_enumerable_properties } from "./_define_enumerable_properties.js";
export { _ as _define_property } from "./_define_property.js";
export { _ as _dispose } from "./_dispose.js";
export { _ as _export_star } from "./_export_star.js";
export { _ as _extends } from "./_extends.js";
export { _ as _get } from "./_get.js";
export { _ as _get_prototype_of } from "./_get_prototype_of.js";
export { _ as _identity } from "./_identity.js";
export { _ as _inherits } from "./_inherits.js";
export { _ as _inherits_loose } from "./_inherits_loose.js";
export { _ as _initializer_define_property } from "./_initializer_define_property.js";
export { _ as _initializer_warning_helper } from "./_initializer_warning_helper.js";
export { _ as _instanceof } from "./_instanceof.js";
export { _ as _interop_require_default } from "./_interop_require_default.js";
export { _ as _interop_require_wildcard } from "./_interop_require_wildcard.js";
export { _ as _is_native_function } from "./_is_native_function.js";
export { _ as _is_native_reflect_construct } from "./_is_native_reflect_construct.js";
export { _ as _iterable_to_array } from "./_iterable_to_array.js";
export { _ as _iterable_to_array_limit } from "./_iterable_to_array_limit.js";
export { _ as _iterable_to_array_limit_loose } from "./_iterable_to_array_limit_loose.js";
export { _ as _jsx } from "./_jsx.js";
export { _ as _new_arrow_check } from "./_new_arrow_check.js";
export { _ as _non_iterable_rest } from "./_non_iterable_rest.js";
export { _ as _non_iterable_spread } from "./_non_iterable_spread.js";
export { _ as _object_destructuring_empty } from "./_object_destructuring_empty.js";
export { _ as _object_spread } from "./_object_spread.js";
export { _ as _object_spread_props } from "./_object_spread_props.js";
export { _ as _object_without_properties } from "./_object_without_properties.js";
export { _ as _object_without_properties_loose } from "./_object_without_properties_loose.js";
export { _ as _overload_yield } from "./_overload_yield.js";
export { _ as _possible_constructor_return } from "./_possible_constructor_return.js";
export { _ as _read_only_error } from "./_read_only_error.js";
export { _ as _set } from "./_set.js";
export { _ as _set_prototype_of } from "./_set_prototype_of.js";
export { _ as _skip_first_generator_next } from "./_skip_first_generator_next.js";
export { _ as _sliced_to_array } from "./_sliced_to_array.js";
export { _ as _sliced_to_array_loose } from "./_sliced_to_array_loose.js";
export { _ as _super_prop_base } from "./_super_prop_base.js";
export { _ as _tagged_template_literal } from "./_tagged_template_literal.js";
export { _ as _tagged_template_literal_loose } from "./_tagged_template_literal_loose.js";
export { _ as _throw } from "./_throw.js";
export { _ as _to_array } from "./_to_array.js";
export { _ as _to_consumable_array } from "./_to_consumable_array.js";
export { _ as _to_primitive } from "./_to_primitive.js";
export { _ as _to_property_key } from "./_to_property_key.js";
export { _ as _ts_add_disposable_resource } from "./_ts_add_disposable_resource.js";
export { _ as _ts_decorate } from "./_ts_decorate.js";
export { _ as _ts_dispose_resources } from "./_ts_dispose_resources.js";
export { _ as _ts_generator } from "./_ts_generator.js";
export { _ as _ts_metadata } from "./_ts_metadata.js";
export { _ as _ts_param } from "./_ts_param.js";
export { _ as _ts_values } from "./_ts_values.js";
export { _ as _type_of } from "./_type_of.js";
export { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js";
export { _ as _update } from "./_update.js";
export { _ as _using } from "./_using.js";
export { _ as _using_ctx } from "./_using_ctx.js";
export { _ as _wrap_async_generator } from "./_wrap_async_generator.js";
export { _ as _wrap_native_super } from "./_wrap_native_super.js";
export { _ as _write_only_error } from "./_write_only_error.js";
@@ -0,0 +1,53 @@
type browserType = typeof import("./resolve-targets-browser");
type nodeType = typeof import("./resolve-targets");
// Kind of gross, but essentially asserting that the exports of this module are the same as the
// exports of index-browser, since this file may be replaced at bundle time with index-browser.
({}) as any as browserType as nodeType;
import type { InputOptions } from "./validation/options.ts";
import path from "node:path";
import getTargets, {
type InputTargets,
} from "@babel/helper-compilation-targets";
import type { Targets } from "@babel/helper-compilation-targets";
export function resolveBrowserslistConfigFile(
browserslistConfigFile: string,
configFileDir: string,
): string | undefined {
return path.resolve(configFileDir, browserslistConfigFile);
}
export function resolveTargets(options: InputOptions, root: string): Targets {
const optTargets = options.targets;
let targets: InputTargets;
if (typeof optTargets === "string" || Array.isArray(optTargets)) {
targets = { browsers: optTargets };
} else if (optTargets) {
if ("esmodules" in optTargets) {
targets = { ...optTargets, esmodules: "intersect" };
} else {
// https://github.com/microsoft/TypeScript/issues/17002
targets = optTargets as InputTargets;
}
}
const { browserslistConfigFile } = options;
let configFile;
let ignoreBrowserslistConfig = false;
if (typeof browserslistConfigFile === "string") {
configFile = browserslistConfigFile;
} else {
ignoreBrowserslistConfig = browserslistConfigFile === false;
}
return getTargets(targets, {
ignoreBrowserslistConfig,
configFile,
configPath: root,
browserslistEnv: options.browserslistEnv,
});
}
@@ -0,0 +1,123 @@
{
'variables': {
'openssl_fips': "",
},
'target_defaults': {
'dependencies': [
"<!(node -p \"require('node-addon-api').targets\"):node_addon_api_except",
],
'conditions': [
['OS=="win"', {
'msvs_configuration_attributes': {
'SpectreMitigation': 'Spectre'
},
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
'/guard:cf',
'/w34244',
'/we4267',
'/ZH:SHA_256',
'/std:c++17'
]
},
'VCLinkerTool': {
'AdditionalOptions': [
'/guard:cf'
]
}
},
}],
],
},
'conditions': [
['OS=="win"', {
'targets': [
{
'target_name': 'conpty',
'sources' : [
'src/win/conpty.cc',
'src/win/path_util.cc'
],
'libraries': [
'shlwapi.lib'
],
'defines': [
'NOMINMAX'
],
},
{
'target_name': 'conpty_console_list',
'sources' : [
'src/win/conpty_console_list.cc'
],
'defines': [
'NOMINMAX'
],
},
{
'target_name': 'pty',
'include_dirs' : [
'<!(node -p "require(\'node-addon-api\').include_dir")',
'deps/winpty/src/include',
],
# Disabled due to winpty
'msvs_disabled_warnings': [ 4506, 4530 ],
'dependencies' : [
'deps/winpty/src/winpty.gyp:winpty-agent',
'deps/winpty/src/winpty.gyp:winpty',
],
'sources' : [
'src/win/winpty.cc',
'src/win/path_util.cc'
],
'libraries': [
'shlwapi.lib'
],
'defines': [
'NOMINMAX'
],
}
]
}, { # OS!="win"
'targets': [
{
'target_name': 'pty',
'sources': [
'src/unix/pty.cc',
],
'libraries': [
'-lutil'
],
'cflags': ['-Wall', '-std=c++17'],
'cflags_cc': [ '-std=c++17' ],
'conditions': [
# http://www.gnu.org/software/gnulib/manual/html_node/forkpty.html
# One some systems (at least including Cygwin, Interix,
# OSF/1 4 and 5, and Mac OS X) linking with -lutil is not required.
['OS=="mac" or OS=="solaris"', {
'libraries!': [
'-lutil'
]
}]
]
}
]
}],
['OS=="mac"', {
'targets': [
{
'target_name': 'spawn-helper',
'type': 'executable',
'sources': [
'src/unix/spawn-helper.cc',
],
"xcode_settings": {
"MACOSX_DEPLOYMENT_TARGET":"10.7",
'CLANG_CXX_LANGUAGE_STANDARD':'c++17'
}
},
]
}]
]
}
@@ -0,0 +1,6 @@
var root = require('./_root');
/** Built-in value references. */
var Uint8Array = root.Uint8Array;
module.exports = Uint8Array;
@@ -0,0 +1,33 @@
"use strict";
var _utils = require("./utils.js");
var _placeholders = require("./placeholders.js");
var _core = require("./core.js");
const defineType = (0, _utils.defineAliasedType)("Miscellaneous");
{
defineType("Noop", {
visitor: []
});
}
defineType("Placeholder", {
visitor: [],
builder: ["expectedNode", "name"],
fields: Object.assign({
name: {
validate: (0, _utils.assertNodeType)("Identifier")
},
expectedNode: {
validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
}
}, (0, _core.patternLikeCommon)())
});
defineType("V8IntrinsicIdentifier", {
builder: ["name"],
fields: {
name: {
validate: (0, _utils.assertValueType)("string")
}
}
});
//# sourceMappingURL=misc.js.map
@@ -0,0 +1,162 @@
/**
* @fileoverview Disallows unnecessary `return await`
* @author Jordan Harband
* @deprecated in ESLint v8.46.0
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
hasSuggestions: true,
type: "suggestion",
docs: {
description: "Disallow unnecessary `return await`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-return-await",
},
fixable: null,
deprecated: {
message:
"The original assumption of the rule no longer holds true because of engine optimization.",
deprecatedSince: "8.46.0",
availableUntil: null,
replacedBy: [],
},
schema: [],
messages: {
removeAwait: "Remove redundant `await`.",
redundantUseOfAwait: "Redundant use of `await` on a return value.",
},
},
create(context) {
/**
* Reports a found unnecessary `await` expression.
* @param {ASTNode} node The node representing the `await` expression to report
* @returns {void}
*/
function reportUnnecessaryAwait(node) {
context.report({
node: context.sourceCode.getFirstToken(node),
loc: node.loc,
messageId: "redundantUseOfAwait",
suggest: [
{
messageId: "removeAwait",
fix(fixer) {
const sourceCode = context.sourceCode;
const [awaitToken, tokenAfterAwait] =
sourceCode.getFirstTokens(node, 2);
const areAwaitAndAwaitedExpressionOnTheSameLine =
awaitToken.loc.start.line ===
tokenAfterAwait.loc.start.line;
if (!areAwaitAndAwaitedExpressionOnTheSameLine) {
return null;
}
const [startOfAwait, endOfAwait] = awaitToken.range;
const characterAfterAwait =
sourceCode.text[endOfAwait];
const trimLength =
characterAfterAwait === " " ? 1 : 0;
const range = [
startOfAwait,
endOfAwait + trimLength,
];
return fixer.removeRange(range);
},
},
],
});
}
/**
* Determines whether a thrown error from this node will be caught/handled within this function rather than immediately halting
* this function. For example, a statement in a `try` block will always have an error handler. A statement in
* a `catch` block will only have an error handler if there is also a `finally` block.
* @param {ASTNode} node A node representing a location where an could be thrown
* @returns {boolean} `true` if a thrown error will be caught/handled in this function
*/
function hasErrorHandler(node) {
let ancestor = node;
while (
!astUtils.isFunction(ancestor) &&
ancestor.type !== "Program"
) {
if (
ancestor.parent.type === "TryStatement" &&
(ancestor === ancestor.parent.block ||
(ancestor === ancestor.parent.handler &&
ancestor.parent.finalizer))
) {
return true;
}
ancestor = ancestor.parent;
}
return false;
}
/**
* Checks if a node is placed in tail call position. Once `return` arguments (or arrow function expressions) can be a complex expression,
* an `await` expression could or could not be unnecessary by the definition of this rule. So we're looking for `await` expressions that are in tail position.
* @param {ASTNode} node A node representing the `await` expression to check
* @returns {boolean} The checking result
*/
function isInTailCallPosition(node) {
if (node.parent.type === "ArrowFunctionExpression") {
return true;
}
if (node.parent.type === "ReturnStatement") {
return !hasErrorHandler(node.parent);
}
if (
node.parent.type === "ConditionalExpression" &&
(node === node.parent.consequent ||
node === node.parent.alternate)
) {
return isInTailCallPosition(node.parent);
}
if (
node.parent.type === "LogicalExpression" &&
node === node.parent.right
) {
return isInTailCallPosition(node.parent);
}
if (
node.parent.type === "SequenceExpression" &&
node === node.parent.expressions.at(-1)
) {
return isInTailCallPosition(node.parent);
}
return false;
}
return {
AwaitExpression(node) {
if (isInTailCallPosition(node) && !hasErrorHandler(node)) {
reportUnnecessaryAwait(node);
}
},
};
},
};
@@ -0,0 +1,6 @@
export { default as Skeleton, SkeletonProps } from './skeleton.mjs';
export { useSkeleton } from './use-skeleton.mjs';
import '@heroui/system';
import 'tailwind-variants';
import 'react';
import '@heroui/theme';
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const esnext_symbol: LibDefinition;
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC;AAWM,SAAS,0CAAc,OAAgC,EAAE,GAAyB;IACvF,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,WAAW,QAAQ,GAAG,IAAI,KAAK;YACjC,QAAQ,GAAG,CAAC,OAAO,GAAG,IAAI,OAAO;YACjC,OAAO;gBACL,IAAI,QAAQ,GAAG,EACb,QAAQ,GAAG,CAAC,OAAO,GAAG;YAE1B;QACF;IACF;AACF","sources":["packages/@react-aria/utils/src/useSyncRef.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {MutableRefObject} from 'react';\nimport {RefObject} from '@react-types/shared';\nimport {useLayoutEffect} from './';\n\ninterface ContextValue<T> {\n ref?: MutableRefObject<T | null>\n}\n\n// Syncs ref from context with ref passed to hook\nexport function useSyncRef<T>(context?: ContextValue<T> | null, ref?: RefObject<T | null>) {\n useLayoutEffect(() => {\n if (context && context.ref && ref) {\n context.ref.current = ref.current;\n return () => {\n if (context.ref) {\n context.ref.current = null;\n }\n };\n }\n });\n}\n"],"names":[],"version":3,"file":"useSyncRef.module.js.map"}
@@ -0,0 +1,4 @@
export type SubtleCryptoAlg = 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512';
export type SubtleCryptoCrv = 'P-256' | 'P-384' | 'P-521' | 'Ed25519';
export type SubtleCryptoKeyAlgName = 'ECDSA' | 'Ed25519' | 'RSASSA-PKCS1-v1_5' | 'RSA-PSS';
//# sourceMappingURL=structs.d.ts.map
@@ -0,0 +1 @@
export { _ as default } from "../esm/_tagged_template_literal.js";
@@ -0,0 +1 @@
{"version":3,"file":"declared-scope.js","sourceRoot":"","sources":["../../src/utils/declared-scope.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,aAAa,CAC3B,OAAoB,EACpB,IAAmB,EACnB,IAAY;IAEZ,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,UAAU,CAAA;IAC/D,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;IAClE,OAAO,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAA;AACxC,CAAC"}
@@ -0,0 +1,29 @@
var $988353faa005faf8$exports = require("./useButton.main.js");
var $c49208f7d2aac50b$exports = require("./useToggleButton.main.js");
var $7d1e6c2af0d638cd$exports = require("./useToggleButtonGroup.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useButton", () => $988353faa005faf8$exports.useButton);
$parcel$export(module.exports, "useToggleButton", () => $c49208f7d2aac50b$exports.useToggleButton);
$parcel$export(module.exports, "useToggleButtonGroup", () => $7d1e6c2af0d638cd$exports.useToggleButtonGroup);
$parcel$export(module.exports, "useToggleButtonGroupItem", () => $7d1e6c2af0d638cd$exports.useToggleButtonGroupItem);
/*
* 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.
*/
//# sourceMappingURL=main.js.map
@@ -0,0 +1,3 @@
# @react-aria/ssr
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,17 @@
import * as _heroui_system from '@heroui/system';
import { UseAccordionItemProps } from './use-accordion-item.mjs';
import 'framer-motion';
import './base/accordion-item-base.mjs';
import '@heroui/theme';
import '@heroui/aria-utils';
import '@react-types/shared';
import 'react';
import 'tailwind-variants';
import '@heroui/react-utils';
import '@react-stately/tree';
interface AccordionItemProps extends UseAccordionItemProps {
}
declare const AccordionItem: _heroui_system.InternalForwardRefRenderFunction<"button", AccordionItemProps, never>;
export { type AccordionItemProps, AccordionItem as default };
@@ -0,0 +1 @@
{"version":3,"names":["_t","require","_index","isCallExpression","isLiteral","isMemberExpression","isNewExpression","isPattern","UnaryExpression","node","operator","word","space","token","print","argument","DoExpression","async","body","ParenthesizedExpression","exit","enterDelimited","expression","rightParens","UpdateExpression","prefix","ConditionalExpression","test","consequent","alternate","NewExpression","parent","callee","format","minified","arguments","length","optional","typeArguments","typeParameters","tokenMap","endMatches","printList","shouldPrintTrailingComma","SequenceExpression","expressions","ThisExpression","Super","_shouldPrintDecoratorsBeforeExport","decoratorsBeforeExport","start","declaration","Decorator","newline","OptionalMemberExpression","computed","property","object","TypeError","value","OptionalCallExpression","CallExpression","Import","AwaitExpression","YieldExpression","delegate","EmptyStatement","semicolon","ExpressionStatement","tokenContext","TokenContext","expressionStatement","AssignmentPattern","left","type","typeAnnotation","right","AssignmentExpression","_endsWithDiv","BindExpression","MemberExpression","MetaProperty","meta","PrivateName","id","V8IntrinsicIdentifier","name","ModuleExpression","indent","directives","dedent","rightBrace"],"sources":["../../src/generators/expressions.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport {\n isCallExpression,\n isLiteral,\n isMemberExpression,\n isNewExpression,\n isPattern,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { TokenContext } from \"../node/index.ts\";\n\nexport function UnaryExpression(this: Printer, node: t.UnaryExpression) {\n const { operator } = node;\n if (\n operator === \"void\" ||\n operator === \"delete\" ||\n operator === \"typeof\" ||\n // throwExpressions\n operator === \"throw\"\n ) {\n this.word(operator);\n this.space();\n } else {\n this.token(operator);\n }\n\n this.print(node.argument);\n}\n\nexport function DoExpression(this: Printer, node: t.DoExpression) {\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n this.word(\"do\");\n this.space();\n this.print(node.body);\n}\n\nexport function ParenthesizedExpression(\n this: Printer,\n node: t.ParenthesizedExpression,\n) {\n this.token(\"(\");\n const exit = this.enterDelimited();\n this.print(node.expression);\n exit();\n this.rightParens(node);\n}\n\nexport function UpdateExpression(this: Printer, node: t.UpdateExpression) {\n if (node.prefix) {\n this.token(node.operator);\n this.print(node.argument);\n } else {\n this.print(node.argument, true);\n this.token(node.operator);\n }\n}\n\nexport function ConditionalExpression(\n this: Printer,\n node: t.ConditionalExpression,\n) {\n this.print(node.test);\n this.space();\n this.token(\"?\");\n this.space();\n this.print(node.consequent);\n this.space();\n this.token(\":\");\n this.space();\n this.print(node.alternate);\n}\n\nexport function NewExpression(\n this: Printer,\n node: t.NewExpression,\n parent: t.Node,\n) {\n this.word(\"new\");\n this.space();\n this.print(node.callee);\n if (\n this.format.minified &&\n node.arguments.length === 0 &&\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n !node.optional &&\n !isCallExpression(parent, { callee: node }) &&\n !isMemberExpression(parent) &&\n !isNewExpression(parent)\n ) {\n return;\n }\n\n this.print(node.typeArguments);\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n this.print(node.typeParameters); // Legacy TS AST\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n if (node.optional) {\n this.token(\"?.\");\n }\n }\n\n if (\n node.arguments.length === 0 &&\n this.tokenMap &&\n !this.tokenMap.endMatches(node, \")\")\n ) {\n return;\n }\n\n this.token(\"(\");\n const exit = this.enterDelimited();\n this.printList(node.arguments, this.shouldPrintTrailingComma(\")\"));\n exit();\n this.rightParens(node);\n}\n\nexport function SequenceExpression(this: Printer, node: t.SequenceExpression) {\n this.printList(node.expressions);\n}\n\nexport function ThisExpression(this: Printer) {\n this.word(\"this\");\n}\n\nexport function Super(this: Printer) {\n this.word(\"super\");\n}\n\nexport function _shouldPrintDecoratorsBeforeExport(\n this: Printer,\n node: t.ExportDeclaration & { declaration: t.ClassDeclaration },\n) {\n if (typeof this.format.decoratorsBeforeExport === \"boolean\") {\n return this.format.decoratorsBeforeExport;\n }\n return (\n typeof node.start === \"number\" && node.start === node.declaration.start\n );\n}\n\nexport function Decorator(this: Printer, node: t.Decorator) {\n this.token(\"@\");\n this.print(node.expression);\n this.newline();\n}\n\nexport function OptionalMemberExpression(\n this: Printer,\n node: t.OptionalMemberExprLine truncated
@@ -0,0 +1,87 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Hook = require("./Hook");
const HookCodeFactory = require("./HookCodeFactory");
class AsyncParallelBailHookCodeFactory extends HookCodeFactory {
content({ onError, onResult, onDone }) {
let code = "";
code += `var _results = new Array(${this.options.taps.length});\n`;
code += "var _checkDone = function() {\n";
code += "for(var i = 0; i < _results.length; i++) {\n";
code += "var item = _results[i];\n";
code += "if(item === undefined) return false;\n";
code += "if(item.result !== undefined) {\n";
code += onResult("item.result");
code += "return true;\n";
code += "}\n";
code += "if(item.error) {\n";
code += onError("item.error");
code += "return true;\n";
code += "}\n";
code += "}\n";
code += "return false;\n";
code += "}\n";
code += this.callTapsParallel({
onError: (i, err, done, doneBreak) => {
let code = "";
code += `if(${i} < _results.length && ((_results.length = ${
i + 1
}), (_results[${i}] = { error: ${err} }), _checkDone())) {\n`;
code += doneBreak(true);
code += "} else {\n";
code += done();
code += "}\n";
return code;
},
onResult: (i, result, done, doneBreak) => {
let code = "";
code += `if(${i} < _results.length && (${result} !== undefined && (_results.length = ${
i + 1
}), (_results[${i}] = { result: ${result} }), _checkDone())) {\n`;
code += doneBreak(true);
code += "} else {\n";
code += done();
code += "}\n";
return code;
},
onTap: (i, run, done, _doneBreak) => {
let code = "";
if (i > 0) {
code += `if(${i} >= _results.length) {\n`;
code += done();
code += "} else {\n";
}
code += run();
if (i > 0) code += "}\n";
return code;
},
onDone
});
return code;
}
}
const factory = new AsyncParallelBailHookCodeFactory();
function COMPILE(options) {
factory.setup(this, options);
return factory.create(options);
}
function AsyncParallelBailHook(args = [], name = undefined) {
const hook = new Hook(args, name);
hook.constructor = AsyncParallelBailHook;
hook.compile = COMPILE;
hook._call = undefined;
hook.call = undefined;
return hook;
}
AsyncParallelBailHook.prototype = null;
module.exports = AsyncParallelBailHook;
@@ -0,0 +1,5 @@
export default (function (o, c, f) {
f.isMoment = function (input) {
return f.isDayjs(input);
};
});
@@ -0,0 +1,6 @@
function isLength(value) {
return Number.isInteger(value) && value > -1;
}
export {
isLength
};
@@ -0,0 +1,41 @@
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* This function is like `composeArgs` except that the arguments composition
* is tailored for `_.partialRight`.
*
* @private
* @param {Array} args The provided arguments.
* @param {Array} partials The arguments to append to those provided.
* @param {Array} holders The `partials` placeholder indexes.
* @params {boolean} [isCurried] Specify composing for a curried function.
* @returns {Array} Returns the new array of composed arguments.
*/
function composeArgsRight(args, partials, holders, isCurried) {
var argsIndex = -1,
argsLength = args.length,
holdersIndex = -1,
holdersLength = holders.length,
rightIndex = -1,
rightLength = partials.length,
rangeLength = nativeMax(argsLength - holdersLength, 0),
result = Array(rangeLength + rightLength),
isUncurried = !isCurried;
while (++argsIndex < rangeLength) {
result[argsIndex] = args[argsIndex];
}
var offset = argsIndex;
while (++rightIndex < rightLength) {
result[offset + rightIndex] = partials[rightIndex];
}
while (++holdersIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
result[offset + holders[holdersIndex]] = args[argsIndex++];
}
}
return result;
}
module.exports = composeArgsRight;
@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/ws`
# Summary
This package contains type definitions for ws (https://github.com/websockets/ws).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws.
### Additional Details
* Last updated: Tue, 01 Apr 2025 02:59:53 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
# Credits
These definitions were written by [Paul Loyd](https://github.com/loyd), [Margus Lamp](https://github.com/mlamp), [Philippe D'Alva](https://github.com/TitaneBoy), [reduckted](https://github.com/reduckted), [teidesu](https://github.com/teidesu), [Bartosz Wojtkowiak](https://github.com/wojtkowiak), [Kyle Hensel](https://github.com/k-yle), and [Samuel Skeen](https://github.com/cwadrupldijjit).
@@ -0,0 +1,148 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
const messages = {
wrongIndent: "Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}."
};
var jsxIndentProps = utils.createRule({
name: "jsx-indent-props",
package: "jsx",
meta: {
type: "layout",
docs: {
description: "Enforce props indentation in JSX"
},
fixable: "code",
messages,
schema: [{
anyOf: [
{
type: "string",
enum: ["tab", "first"]
},
{
type: "integer"
},
{
type: "object",
properties: {
indentMode: {
anyOf: [
{
type: "string",
enum: ["tab", "first"]
},
{
type: "integer"
}
]
},
ignoreTernaryOperator: {
type: "boolean"
}
}
}
]
}]
},
create(context) {
const options = context.options[0];
const extraColumnStart = 0;
let indentType = "space";
let indentSize = 4;
const line = {
isUsingOperator: false,
currentOperator: false
};
let ignoreTernaryOperator = false;
if (context.options.length) {
const isConfigObject = typeof context.options[0] === "object";
const indentMode = isConfigObject ? typeof options === "object" && options.indentMode : options;
if (indentMode === "first") {
indentSize = "first";
indentType = "space";
} else if (indentMode === "tab") {
indentSize = 1;
indentType = "tab";
} else if (typeof indentMode === "number") {
indentSize = indentMode;
indentType = "space";
}
if (typeof options === "object" && options.ignoreTernaryOperator)
ignoreTernaryOperator = true;
}
function getNodeIndent(node) {
let src = context.sourceCode.getText(node, node.loc.start.column + extraColumnStart);
const lines = src.split("\n");
src = lines[0];
let regExp;
if (indentType === "space")
regExp = /^ +/;
else
regExp = /^\t+/;
const indent = regExp.exec(src);
const useOperator = /^[ \t]*:/.test(src) || /^[ \t]*\?/.test(src);
const useBracket = /</.test(src);
line.currentOperator = false;
if (useOperator) {
line.isUsingOperator = true;
line.currentOperator = true;
} else if (useBracket) {
line.isUsingOperator = false;
}
return indent ? indent[0].length : 0;
}
function checkNodesIndent(nodes, indent) {
let nestedIndent = indent;
nodes.forEach((node) => {
const nodeIndent = getNodeIndent(node);
if (line.isUsingOperator && !line.currentOperator && indentSize !== "first" && !ignoreTernaryOperator) {
nestedIndent += indentSize;
line.isUsingOperator = false;
}
if (node.type !== "ArrayExpression" && node.type !== "ObjectExpression" && nodeIndent !== nestedIndent && utils.isNodeFirstInLine(context, node)) {
context.report({
node,
messageId: "wrongIndent",
data: {
needed: nestedIndent,
type: indentType,
characters: nestedIndent === 1 ? "character" : "characters",
gotten: nodeIndent
},
fix(fixer) {
return fixer.replaceTextRange(
[
node.range[0] - node.loc.start.column,
node.range[0]
],
new Array(nestedIndent + 1).join(indentType === "space" ? " " : " ")
);
}
});
}
});
}
return {
JSXOpeningElement(node) {
if (!node.attributes.length)
return;
let propIndent;
if (indentSize === "first") {
const firstPropNode = node.attributes[0];
propIndent = firstPropNode.loc.start.column;
} else {
const elementIndent = getNodeIndent(node);
propIndent = elementIndent + indentSize;
}
checkNodesIndent(node.attributes, propIndent);
}
};
}
});
module.exports = jsxIndentProps;
@@ -0,0 +1,16 @@
var flatten = require('./flatten'),
overRest = require('./_overRest'),
setToString = require('./_setToString');
/**
* A specialized version of `baseRest` which flattens the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @returns {Function} Returns the new function.
*/
function flatRest(func) {
return setToString(overRest(func, undefined, flatten), func + '');
}
module.exports = flatRest;
@@ -0,0 +1,19 @@
export class DefinedInfo extends Info {
/**
* @constructor
* @param {string} property
* Property.
* @param {string} attribute
* Attribute.
* @param {number | null | undefined} [mask]
* Mask.
* @param {Space | undefined} [space]
* Space.
* @returns
* Info.
*/
constructor(property: string, attribute: string, mask?: number | null | undefined, space?: Space | undefined);
}
import { Info } from './info.js';
import type { Space } from 'property-information';
//# sourceMappingURL=defined-info.d.ts.map
@@ -0,0 +1,8 @@
export default function isPlainObject(value) {
if (typeof value !== 'object' || value === null) {
return false;
}
const prototype = Object.getPrototypeOf(value);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
}
@@ -0,0 +1,406 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {add, addTime, addZoned, constrain, constrainTime, cycleDate, cycleTime, cycleZoned, set, setTime, setZoned, subtract, subtractTime, subtractZoned} from './manipulation';
import {AnyCalendarDate, AnyTime, Calendar, CycleOptions, CycleTimeOptions, DateDuration, DateField, DateFields, DateTimeDuration, Disambiguation, TimeDuration, TimeField, TimeFields} from './types';
import {compareDate, compareTime} from './queries';
import {dateTimeToString, dateToString, timeToString, zonedDateTimeToString} from './string';
import {GregorianCalendar} from './calendars/GregorianCalendar';
import {toCalendarDateTime, toDate, toZoned, zonedToDate} from './conversion';
function shiftArgs(args: any[]) {
let calendar: Calendar = typeof args[0] === 'object'
? args.shift()
: new GregorianCalendar();
let era: string;
if (typeof args[0] === 'string') {
era = args.shift();
} else {
let eras = calendar.getEras();
era = eras[eras.length - 1];
}
let year = args.shift();
let month = args.shift();
let day = args.shift();
return [calendar, era, year, month, day];
}
/** A CalendarDate represents a date without any time components in a specific calendar system. */
export class CalendarDate {
// This prevents TypeScript from allowing other types with the same fields to match.
// i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.
// If that behavior is desired, use the AnyCalendarDate interface instead.
// @ts-ignore
#type;
/** The calendar system associated with this date, e.g. Gregorian. */
public readonly calendar: Calendar;
/** The calendar era for this date, e.g. "BC" or "AD". */
public readonly era: string;
/** The year of this date within the era. */
public readonly year: number;
/**
* The month number within the year. Note that some calendar systems such as Hebrew
* may have a variable number of months per year. Therefore, month numbers may not
* always correspond to the same month names in different years.
*/
public readonly month: number;
/** The day number within the month. */
public readonly day: number;
constructor(year: number, month: number, day: number);
constructor(era: string, year: number, month: number, day: number);
constructor(calendar: Calendar, year: number, month: number, day: number);
constructor(calendar: Calendar, era: string, year: number, month: number, day: number);
constructor(...args: any[]) {
let [calendar, era, year, month, day] = shiftArgs(args);
this.calendar = calendar;
this.era = era;
this.year = year;
this.month = month;
this.day = day;
constrain(this);
}
/** Returns a copy of this date. */
copy(): CalendarDate {
if (this.era) {
return new CalendarDate(this.calendar, this.era, this.year, this.month, this.day);
} else {
return new CalendarDate(this.calendar, this.year, this.month, this.day);
}
}
/** Returns a new `CalendarDate` with the given duration added to it. */
add(duration: DateDuration): CalendarDate {
return add(this, duration);
}
/** Returns a new `CalendarDate` with the given duration subtracted from it. */
subtract(duration: DateDuration): CalendarDate {
return subtract(this, duration);
}
/** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
set(fields: DateFields): CalendarDate {
return set(this, fields);
}
/**
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
* When the resulting value reaches the limits of the field, it wraps around.
*/
cycle(field: DateField, amount: number, options?: CycleOptions): CalendarDate {
return cycleDate(this, field, amount, options);
}
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
toDate(timeZone: string): Date {
return toDate(this, timeZone);
}
/** Converts the date to an ISO 8601 formatted string. */
toString(): string {
return dateToString(this);
}
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
compare(b: AnyCalendarDate): number {
return compareDate(this, b);
}
}
/** A Time represents a clock time without any date components. */
export class Time {
// This prevents TypeScript from allowing other types with the same fields to match.
// @ts-ignore
#type;
/** The hour, numbered from 0 to 23. */
public readonly hour: number;
/** The minute in the hour. */
public readonly minute: number;
/** The second in the minute. */
public readonly second: number;
/** The millisecond in the second. */
public readonly millisecond: number;
constructor(
hour: number = 0,
minute: number = 0,
second: number = 0,
millisecond: number = 0
) {
this.hour = hour;
this.minute = minute;
this.second = second;
this.millisecond = millisecond;
constrainTime(this);
}
/** Returns a copy of this time. */
copy(): Time {
return new Time(this.hour, this.minute, this.second, this.millisecond);
}
/** Returns a new `Time` with the given duration added to it. */
add(duration: TimeDuration) {
return addTime(this, duration);
}
/** Returns a new `Time` with the given duration subtracted from it. */
subtract(duration: TimeDuration) {
return subtractTime(this, duration);
}
/** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */
set(fields: TimeFields) {
return setTime(this, fields);
}
/**
* Returns a new `Time` with the given field adjusted by a specified amount.
* When the resulting value reaches the limits of the field, it wraps around.
*/
cycle(field: TimeField, amount: number, options?: CycleTimeOptions) {
return cycleTime(this, field, amount, options);
}
/** Converts the time to an ISO 8601 formatted string. */
toString() {
return timeToString(this);
}
/** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */
compare(b: AnyTime) {
return compareTime(this, b);
}
}
/** A CalendarDateTime represents a date and time without a time zone, in a specific calendar system. */
export class CalendarDateTime {
// This prevents TypeScript from allowing other types with the same fields to match.
// @ts-ignore
#type;
/** The calendar system associated with this date, e.g. Gregorian. */
public readonly calendar: Calendar;
/** The calendar era for this date, e.g. "BC" or "AD". */
public readonly era: string;
/** The year of this date within the era. */
public readonly year: number;
/**
* The month number within the year. Note that some calendar systems such as Hebrew
* may have a variable number of months per year. Therefore, month numbers may not
* always correspond to the same month names in different years.
*/
public readonly month: number;
/** The day number within the month. */
public readonly day: number;
/** The hour in the day, numbered from 0 to 23. */
public readonly hour: number;
/** The minute in the hour. */
public readonly minute: number;
/** The second in the minute. */
public readonly second: number;
/** The millisecond in the second. */
public readonly millisecond: number;
constructor(year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(era: string, year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(calendar: Calendar, year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(calendar: Calendar, era: string, year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(...args: any[]) {
let [calendar, era, year, month, day] = shiftArgs(args);
this.calendar = calendar;
this.era = era;
this.year = year;
this.month = month;
this.day = day;
this.hour = args.shift() || 0;
this.minute = args.shift() || 0;
this.second = args.shift() || 0;
this.millisecond = args.shift() || 0;
constrain(this);
}
/** Returns a copy of this date. */
copy(): CalendarDateTime {
if (this.era) {
return new CalendarDateTime(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
} else {
return new CalendarDateTime(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
}
}
/** Returns a new `CalendarDateTime` with the given duration added to it. */
add(duration: DateTimeDuration): CalendarDateTime {
return add(this, duration);
}
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
subtract(duration: DateTimeDuration): CalendarDateTime {
return subtract(this, duration);
}
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
set(fields: DateFields & TimeFields): CalendarDateTime {
return set(setTime(this, fields), fields);
}
/**
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
* When the resulting value reaches the limits of the field, it wraps around.
*/
cycle(field: DateField | TimeField, amount: number, options?: CycleTimeOptions): CalendarDateTime {
switch (field) {
case 'era':
case 'year':
case 'month':
case 'day':
return cycleDate(this, field, amount, options);
default:
return cycleTime(this, field, amount, options);
}
}
/** Converts the date to a native JavaScript Date object in the given time zone. */
toDate(timeZone: string, disambiguation?: Disambiguation): Date {
return toDate(this, timeZone, disambiguation);
}
/** Converts the date to an ISO 8601 formatted string. */
toString(): string {
return dateTimeToString(this);
}
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
compare(b: CalendarDate | CalendarDateTime | ZonedDateTime): number {
let res = compareDate(this, b);
if (res === 0) {
return compareTime(this, toCalendarDateTime(b));
}
return res;
}
}
/** A ZonedDateTime represents a date and time in a specific time zone and calendar system. */
export class ZonedDateTime {
// This prevents TypeScript from allowing other types with the same fields to match.
// @ts-ignore
#type;
/** The calendar system associated with this date, e.g. Gregorian. */
public readonly calendar: Calendar;
/** The calendar era for this date, e.g. "BC" or "AD". */
public readonly era: string;
/** The year of this date within the era. */
public readonly year: number;
/**
* The month number within the year. Note that some calendar systems such as Hebrew
* may have a variable number of months per year. Therefore, month numbers may not
* always correspond to the same month names in different years.
*/
public readonly month: number;
/** The day number within the month. */
public readonly day: number;
/** The hour in the day, numbered from 0 to 23. */
public readonly hour: number;
/** The minute in the hour. */
public readonly minute: number;
/** The second in the minute. */
public readonly second: number;
/** The millisecond in the second. */
public readonly millisecond: number;
/** The IANA time zone identifier that this date and time is represented in. */
public readonly timeZone: string;
/** The UTC offset for this time, in milliseconds. */
public readonly offset: number;
constructor(year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(era: string, year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(calendar: Calendar, year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(calendar: Calendar, era: string, year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(...args: any[]) {
let [calendar, era, year, month, day] = shiftArgs(args);
let timeZone = args.shift();
let offset = args.shift();
this.calendar = calendar;
this.era = era;
this.year = year;
this.month = month;
this.day = day;
this.timeZone = timeZone;
this.offset = offset;
this.hour = args.shift() || 0;
this.minute = args.shift() || 0;
this.second = args.shift() || 0;
this.millisecond = args.shift() || 0;
constrain(this);
}
/** Returns a copy of this date. */
copy(): ZonedDateTime {
if (this.era) {
return new ZonedDateTime(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
} else {
return new ZonedDateTime(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
}
}
/** Returns a new `ZonedDateTime` with the given duration added to it. */
add(duration: DateTimeDuration) {
return addZoned(this, duration);
}
/** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
subtract(duration: DateTimeDuration) {
return subtractZoned(this, duration);
}
/** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
set(fields: DateFields & TimeFields, disambiguation?: Disambiguation) {
return setZoned(this, fields, disambiguation);
}
/**
* Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
* When the resulting value reaches the limits of the field, it wraps around.
*/
cycle(field: DateField | TimeField, amount: number, options?: CycleTimeOptions) {
return cycleZoned(this, field, amount, options);
}
/** Converts the date to a native JavaScript Date object. */
toDate() {
return zonedToDate(this);
}
/** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
toString() {
return zonedDateTimeToString(this);
}
/** Converts the date to an ISO 8601 formatted string in UTC. */
toAbsoluteString() {
return this.toDate().toISOString();
}
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
compare(b: CalendarDate | CalendarDateTime | ZonedDateTime) {
// TODO: Is this a bad idea??
return this.toDate().getTime() - toZoned(b, this.timeZone).toDate().getTime();
}
}
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,eAAe,CAAC,kBAAkB,CAAC;AACvD","sources":["packages/@react-aria/breadcrumbs/intl/sr-SP.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Putanje navigacije\"\n}\n"],"names":[],"version":3,"file":"sr-SP.module.js.map"}
@@ -0,0 +1,42 @@
# typed-array-buffer <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
Get the ArrayBuffer out of a TypedArray, robustly.
This will work in node <= 0.10 and < 0.11.4, where there's no prototype accessor, only a nonconfigurable own property.
It will also work in modern engines where `TypedArray.prototype.buffer` has been deleted after this module has loaded.
## Example
```js
const typedArrayBuffer = require('typed-array-buffer');
const assert = require('assert');
const arr = new Uint8Array(0);
assert.equal(arr.buffer, typedArrayBuffer(arr));
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/typed-array-buffer
[npm-version-svg]: https://versionbadg.es/inspect-js/typed-array-buffer.svg
[deps-svg]: https://david-dm.org/inspect-js/typed-array-buffer.svg
[deps-url]: https://david-dm.org/inspect-js/typed-array-buffer
[dev-deps-svg]: https://david-dm.org/inspect-js/typed-array-buffer/dev-status.svg
[dev-deps-url]: https://david-dm.org/inspect-js/typed-array-buffer#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/typed-array-buffer.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/typed-array-buffer.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/typed-array-buffer.svg
[downloads-url]: https://npm-stat.com/charts.html?package=typed-array-buffer
[codecov-image]: https://codecov.io/gh/inspect-js/typed-array-buffer/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/typed-array-buffer/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/typed-array-buffer
[actions-url]: https://github.com/inspect-js/typed-array-buffer/actions
@@ -0,0 +1,46 @@
import React from "react";
import Dropzone from "../../";
export default class Test extends React.Component {
render() {
return (
<div>
<Dropzone
onDrop={(acceptedFiles, fileRejections, event) =>
console.log(acceptedFiles, fileRejections, event)
}
onDragEnter={(event) => console.log(event)}
onDragOver={(event) => console.log(event)}
onDragLeave={(event) => console.log(event)}
onDropAccepted={(files, event) => console.log(files, event)}
onDropRejected={(files, event) => console.log(files, event)}
onFileDialogCancel={() => console.log("onFileDialogCancel invoked")}
onFileDialogOpen={() => console.log("onFileDialogOpen invoked")}
onError={(e) => console.log(e)}
validator={(f) => ({ message: f.name, code: "" })}
minSize={2000}
maxSize={Infinity}
maxFiles={100}
preventDropOnDocument
noClick={false}
noKeyboard={false}
noDrag={false}
noDragEventsBubbling={false}
disabled
multiple={false}
accept={{
"image/*": [".png"],
}}
useFsAccessApi={false}
autoFocus
>
{({ getRootProps, getInputProps }) => (
<div {...getRootProps()}>
<input {...getInputProps()} />
</div>
)}
</Dropzone>
</div>
);
}
}
@@ -0,0 +1 @@
{"version":3,"file":"class-utils.mjs","sources":["../../src/lib/class-utils.ts"],"sourcesContent":["import { ClassGroup, ClassGroupId, ClassValidator, Config, ThemeGetter, ThemeObject } from './types'\n\nexport interface ClassPartObject {\n nextPart: Map<string, ClassPartObject>\n validators: ClassValidatorObject[]\n classGroupId?: ClassGroupId\n}\n\ninterface ClassValidatorObject {\n classGroupId: ClassGroupId\n validator: ClassValidator\n}\n\nconst CLASS_PART_SEPARATOR = '-'\n\nexport function createClassUtils(config: Config) {\n const classMap = createClassMap(config)\n const { conflictingClassGroups, conflictingClassGroupModifiers = {} } = config\n\n function getClassGroupId(className: string) {\n const classParts = className.split(CLASS_PART_SEPARATOR)\n\n // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.\n if (classParts[0] === '' && classParts.length !== 1) {\n classParts.shift()\n }\n\n return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className)\n }\n\n function getConflictingClassGroupIds(classGroupId: ClassGroupId, hasPostfixModifier: boolean) {\n const conflicts = conflictingClassGroups[classGroupId] || []\n\n if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {\n return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]!]\n }\n\n return conflicts\n }\n\n return {\n getClassGroupId,\n getConflictingClassGroupIds,\n }\n}\n\nfunction getGroupRecursive(\n classParts: string[],\n classPartObject: ClassPartObject,\n): ClassGroupId | undefined {\n if (classParts.length === 0) {\n return classPartObject.classGroupId\n }\n\n const currentClassPart = classParts[0]!\n const nextClassPartObject = classPartObject.nextPart.get(currentClassPart)\n const classGroupFromNextClassPart = nextClassPartObject\n ? getGroupRecursive(classParts.slice(1), nextClassPartObject)\n : undefined\n\n if (classGroupFromNextClassPart) {\n return classGroupFromNextClassPart\n }\n\n if (classPartObject.validators.length === 0) {\n return undefined\n }\n\n const classRest = classParts.join(CLASS_PART_SEPARATOR)\n\n return classPartObject.validators.find(({ validator }) => validator(classRest))?.classGroupId\n}\n\nconst arbitraryPropertyRegex = /^\\[(.+)\\]$/\n\nfunction getGroupIdForArbitraryProperty(className: string) {\n if (arbitraryPropertyRegex.test(className)) {\n const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)![1]\n const property = arbitraryPropertyClassName?.substring(\n 0,\n arbitraryPropertyClassName.indexOf(':'),\n )\n\n if (property) {\n // I use two dots here because one dot is used as prefix for class groups in plugins\n return 'arbitrary..' + property\n }\n }\n}\n\n/**\n * Exported for testing only\n */\nexport function createClassMap(config: Config) {\n const { theme, prefix } = config\n const classMap: ClassPartObject = {\n nextPart: new Map<string, ClassPartObject>(),\n validators: [],\n }\n\n const prefixedClassGroupEntries = getPrefixedClassGroupEntries(\n Object.entries(config.classGroups),\n prefix,\n )\n\n prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {\n processClassesRecursively(classGroup, classMap, classGroupId, theme)\n })\n\n return classMap\n}\n\nfunction processClassesRecursively(\n classGroup: ClassGroup,\n classPartObject: ClassPartObject,\n classGroupId: ClassGroupId,\n theme: ThemeObject,\n) {\n classGroup.forEach((classDefinition) => {\n if (typeof classDefinition === 'string') {\n const classPartObjectToEdit =\n classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition)\n classPartObjectToEdit.classGroupId = classGroupId\n return\n }\n\n if (typeof classDefinition === 'function') {\n if (isThemeGetter(classDefinition)) {\n processClassesRecursively(\n classDefinition(theme),\n classPartObject,\n classGroupId,\n theme,\n )\n return\n }\n\n classPartObject.validators.push({\n validator: classDefinition,\n classGroupId,\n })\n\n return\n }\n\n Object.entries(classDefinition).forEach(([key, classGroup]) => {\n processClassesRecursively(\n classGroup,\n getPart(classPartObject, key),\n classGroupId,\n theme,\n )\n })\nLine truncated
@@ -0,0 +1,14 @@
## License
didYouMean.js copyright (c) 2013 Dave Porter.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License
[here](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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -0,0 +1,59 @@
# safe-push-apply <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
Push an array of items into an array, while being robust against prototype modification.
## Getting started
```sh
npm install --save safe-push-apply
```
## Usage/Examples
```js
var safePushApply = require('safe-push-apply');
var assert = require('assert');
var arr = [1, 2, 3];
var orig = Array.prototype[Symbol.iterator];
delete Array.prototype[Symbol.iterator];
assert.throws(() => {
try {
arr.push(...[3, 4, 5]);
} finally {
Array.prototype[Symbol.iterator] = orig;
}
}, 'array is not iterable anymore');
delete Array.prototype.push;
safePushApply(arr, [3, 4, 5]);
assert.deepEqual(arr, [1, 2, 3, 3, 4, 5]);
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/safe-push-apply
[npm-version-svg]: https://versionbadg.es/ljharb/safe-push-apply.svg
[deps-svg]: https://david-dm.org/ljharb/safe-push-apply.svg
[deps-url]: https://david-dm.org/ljharb/safe-push-apply
[dev-deps-svg]: https://david-dm.org/ljharb/safe-push-apply/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/safe-push-apply#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/safe-push-apply.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/safe-push-apply.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/safe-push-apply.svg
[downloads-url]: https://npm-stat.com/charts.html?package=safe-push-apply
[codecov-image]: https://codecov.io/gh/ljharb/safe-push-apply/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/safe-push-apply/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/safe-push-apply
[actions-url]: https://github.com/ljharb/safe-push-apply/actions
@@ -0,0 +1,310 @@
import * as React from 'react';
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './instrumentation-iAqbU5Q4.js';
type RSCRouteConfigEntryBase = {
action?: ActionFunction;
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
ErrorBoundary?: React.ComponentType<any>;
handle?: any;
headers?: HeadersFunction;
HydrateFallback?: React.ComponentType<any>;
Layout?: React.ComponentType<any>;
links?: LinksFunction;
loader?: LoaderFunction;
meta?: MetaFunction;
shouldRevalidate?: ShouldRevalidateFunction;
};
type RSCRouteConfigEntry = RSCRouteConfigEntryBase & {
id: string;
path?: string;
Component?: React.ComponentType<any>;
lazy?: () => Promise<RSCRouteConfigEntryBase & ({
default?: React.ComponentType<any>;
Component?: never;
} | {
default?: never;
Component?: React.ComponentType<any>;
})>;
} & ({
index: true;
} | {
children?: RSCRouteConfigEntry[];
});
type RSCRouteConfig = Array<RSCRouteConfigEntry>;
type RSCRouteManifest = {
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
element?: React.ReactElement | false;
errorElement?: React.ReactElement;
handle?: any;
hasAction: boolean;
hasComponent: boolean;
hasErrorBoundary: boolean;
hasLoader: boolean;
hydrateFallbackElement?: React.ReactElement;
id: string;
index?: boolean;
links?: LinksFunction;
meta?: MetaFunction;
parentId?: string;
path?: string;
shouldRevalidate?: ShouldRevalidateFunction;
};
type RSCRouteMatch = RSCRouteManifest & {
params: Params;
pathname: string;
pathnameBase: string;
};
type RSCRenderPayload = {
type: "render";
actionData: Record<string, any> | null;
basename: string | undefined;
errors: Record<string, any> | null;
loaderData: Record<string, any>;
location: Location;
matches: RSCRouteMatch[];
patches?: RSCRouteManifest[];
nonce?: string;
formState?: unknown;
};
type RSCManifestPayload = {
type: "manifest";
patches: RSCRouteManifest[];
};
type RSCActionPayload = {
type: "action";
actionResult: Promise<unknown>;
rerender?: Promise<RSCRenderPayload | RSCRedirectPayload>;
};
type RSCRedirectPayload = {
type: "redirect";
status: number;
location: string;
replace: boolean;
reload: boolean;
actionResult?: Promise<unknown>;
};
type RSCPayload = RSCRenderPayload | RSCManifestPayload | RSCActionPayload | RSCRedirectPayload;
type RSCMatch = {
statusCode: number;
headers: Headers;
payload: RSCPayload;
};
type DecodeActionFunction = (formData: FormData) => Promise<() => Promise<unknown>>;
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
type DecodeReplyFunction = (reply: FormData | string, { temporaryReferences }: {
temporaryReferences: unknown;
}) => Promise<unknown[]>;
type LoadServerActionFunction = (id: string) => Promise<Function>;
/**
* Matches the given routes to a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
* and returns an [RSC](https://react.dev/reference/rsc/server-components)
* [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* encoding an {@link unstable_RSCPayload} for consumption by an [RSC](https://react.dev/reference/rsc/server-components)
* enabled client router.
*
* @example
* import {
* createTemporaryReferenceSet,
* decodeAction,
* decodeReply,
* loadServerAction,
* renderToReadableStream,
* } from "@vitejs/plugin-rsc/rsc";
* import { unstable_matchRSCServerRequest as matchRSCServerRequest } from "react-router";
*
* matchRSCServerRequest({
* createTemporaryReferenceSet,
* decodeAction,
* decodeFormState,
* decodeReply,
* loadServerAction,
* request,
* routes: routes(),
* generateResponse(match) {
* return new Response(
* renderToReadableStream(match.payload),
* {
* status: match.statusCode,
* headers: match.headers,
* }
* );
* },
* });
*
* @name unstable_matchRSCServerRequest
* @public
* @category RSC
* @mode data
* @param opts Options
* @param opts.basename The basename to use when matching the request.
* @param opts.createTemporaryReferenceSet A function that returns a temporary
* reference set for the request, used to track temporary references in the [RSC](https://react.dev/reference/rsc/server-components)
* stream.
* @param opts.decodeAction Your `react-server-dom-xyz/server`'s `decodeAction`
* function, responsible for loading a server action.
* @param opts.decodeFormState A function responsible for decoding form state for
* progressively enhanceable forms with React's [`useActionState`](https://react.dev/reference/react/useActionState)
* using your `react-server-dom-xyz/server`'s `decodeFormState`.
* @param opts.decodeReply Your `react-server-dom-xyz/server`'s `decodeReply`
* function, used to decode the server function's arguments and bind them to the
* implementation for invocation by the router.
* @param opts.generateResponse A function responsible for using your
* `renderToReadableStream` to generate a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* encoding the {@link unstable_RSCPayload}.
* @param opts.loadServerAction Your `react-server-dom-xyz/server`'s
* `loadServerAction` function, used to load a server action by ID.
* @param opts.onError An optional error handler that will be called with any
* errors that occur during the request processing.
* @param opts.request The [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
* to match against.
* @param opts.requestContext An instance of {@link RouterContextProvider}
* that should be created per request, to be passed to [`action`](../../start/data/route-object#action)s,
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
* @param opts.routes Your {@link unstable_RSCRouteConfigEntry | route definitions}.
* @returns A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
* data for hydration.
*/
declare function matchRSCServerRequest({ createTemporaryReferenceSet, basename, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
createTemporaryReferenceSet: () => unknown;
basename?: string;
decodeReply?: DecodeReplyFunction;
decodeAction?: DecodeActionFunction;
decodeFormState?: DecodeFormStateFunction;
requestContext?: RouterContextProvider;
loadServerAction?: LoadServerActionFunction;
onError?: (error: unknown) => void;
request: Request;
routes: RSCRouteConfigEntry[];
generateResponse: (match: RSCMatch, { temporaryReferences, }: {
temporaryReferences: unknown;
}) => Response;
}): Promise<Response>;
type BrowserCreateFromReadableStreamFunction = (body: ReadableStream<Uint8Array>, { temporaryReferences, }: {
temporaryReferences: unknown;
}) => Promise<unknown>;
type EncodeReplyFunction = (args: unknown[], options: {
temporaryReferences: unknown;
}) => Promise<BodyInit>;
/**
* Create a React `callServer` implementation for React Router.
*
* @example
* import {
* createFromReadableStream,
* createTemporaryReferenceSet,
* encodeReply,
* setServerCallback,
* } from "@vitejs/plugin-rsc/browser";
* import { unstable_createCallServer as createCallServer } from "react-router";
*
* setServerCallback(
* createCallServer({
* createFromReadableStream,
* createTemporaryReferenceSet,
* encodeReply,
* })
* );
*
* @name unstable_createCallServer
* @public
* @category RSC
* @mode data
* @param opts Options
* @param opts.createFromReadableStream Your `react-server-dom-xyz/client`'s
* `createFromReadableStream`. Used to decode payloads from the server.
* @param opts.createTemporaryReferenceSet A function that creates a temporary
* reference set for the [RSC](https://react.dev/reference/rsc/server-components)
* payload.
* @param opts.encodeReply Your `react-server-dom-xyz/client`'s `encodeReply`.
* Used when sending payloads to the server.
* @param opts.fetch Optional [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
* implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
* @returns A function that can be used to call server actions.
*/
declare function createCallServer({ createFromReadableStream, createTemporaryReferenceSet, encodeReply, fetch: fetchImplementation, }: {
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
createTemporaryReferenceSet: () => unknown;
encodeReply: EncodeReplyFunction;
fetch?: (request: Request) => Promise<Response>;
}): (id: string, args: unknown[]) => Promise<unknown>;
/**
* Props for the {@link unstable_RSCHydratedRouter} component.
*
* @name unstable_RSCHydratedRouterProps
* @category Types
*/
interface RSCHydratedRouterProps {
/**
* Your `react-server-dom-xyz/client`'s `createFromReadableStream` function,
* used to decode payloads from the server.
*/
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
/**
* Optional fetch implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
*/
fetch?: (request: Request) => Promise<Response>;
/**
* The decoded {@link unstable_RSCPayload} to hydrate.
*/
payload: RSCPayload;
/**
* `"eager"` or `"lazy"` - Determines if links are eagerly discovered, or
* delayed until clicked.
*/
routeDiscovery?: "eager" | "lazy";
/**
* A function that returns an {@link RouterContextProvider} instance
* which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
* This function is called to generate a fresh `context` instance on each
* navigation or fetcher call.
*/
getContext?: RouterInit["getContext"];
}
/**
* Hydrates a server rendered {@link unstable_RSCPayload} in the browser.
*
* @example
* import { startTransition, StrictMode } from "react";
* import { hydrateRoot } from "react-dom/client";
* import {
* unstable_getRSCStream as getRSCStream,
* unstable_RSCHydratedRouter as RSCHydratedRouter,
* } from "react-router";
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
*
* createFromReadableStream(getRSCStream()).then((payload) =>
* startTransition(async () => {
* hydrateRoot(
* document,
* <StrictMode>
* <RSCHydratedRouter
* createFromReadableStream={createFromReadableStream}
* payload={payload}
* />
* </StrictMode>,
* { formState: await getFormState(payload) },
* );
* }),
* );
*
* @name unstable_RSCHydratedRouter
* @public
* @category RSC
* @mode data
* @param props Props
* @param {unstable_RSCHydratedRouterProps.createFromReadableStream} props.createFromReadableStream n/a
* @param {unstable_RSCHydratedRouterProps.fetch} props.fetch n/a
* @param {unstable_RSCHydratedRouterProps.getContext} props.getContext n/a
* @param {unstable_RSCHydratedRouterProps.payload} props.payload n/a
* @param {unstable_RSCHydratedRouterProps.routeDiscovery} props.routeDiscovery n/a
* @returns A hydrated {@link DataRouter} that can be used to navigate and
* render routes.
*/
declare function RSCHydratedRouter({ createFromReadableStream, fetch: fetchImplementation, payload, routeDiscovery, getContext, }: RSCHydratedRouterProps): React.JSX.Element;
export { type BrowserCreateFromReadableStreamFunction as B, type DecodeActionFunction as D, type EncodeReplyFunction as E, type LoadServerActionFunction as L, RSCHydratedRouter as R, type DecodeFormStateFunction as a, type DecodeReplyFunction as b, createCallServer as c, type RSCManifestPayload as d, type RSCPayload as e, type RSCRenderPayload as f, type RSCHydratedRouterProps as g, type RSCMatch as h, type RSCRouteManifest as i, type RSCRouteMatch as j, type RSCRouteConfigEntry as k, type RSCRouteConfig as l, matchRSCServerRequest as m };
@@ -0,0 +1 @@
{"version":3,"file":"jitter.factory.js","sourceRoot":"","sources":["../../src/jitter/jitter.factory.ts"],"names":[],"mappings":";;AACA,kDAAgD;AAChD,4CAA0C;AAI1C,SAAgB,aAAa,CAAC,OAAwB;IACpD,QAAQ,OAAO,CAAC,MAAM,EAAE;QACtB,KAAK,MAAM;YACT,OAAO,wBAAU,CAAC;QAEpB,KAAK,MAAM,CAAC;QACZ;YACE,OAAO,oBAAQ,CAAC;KACnB;AACH,CAAC;AATD,sCASC"}
@@ -0,0 +1,13 @@
'use strict';
var $StringValueOf = require('call-bound')('String.prototype.valueOf');
// https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object
module.exports = function thisStringValue(value) {
if (typeof value === 'string') {
return value;
}
return $StringValueOf(value);
};
@@ -0,0 +1,41 @@
/* eslint no-undefined: 0 */
'use strict';
const format = require('./format');
const { LEVEL, MESSAGE } = require('triple-beam');
/*
* function errors (info)
* If the `message` property of the `info` object is an instance of `Error`,
* replace the `Error` object its own `message` property.
*
* Optionally, the Error's `stack` and/or `cause` properties can also be appended to the `info` object.
*/
module.exports = format((einfo, { stack, cause }) => {
if (einfo instanceof Error) {
const info = Object.assign({}, einfo, {
level: einfo.level,
[LEVEL]: einfo[LEVEL] || einfo.level,
message: einfo.message,
[MESSAGE]: einfo[MESSAGE] || einfo.message
});
if (stack) info.stack = einfo.stack;
if (cause) info.cause = einfo.cause;
return info;
}
if (!(einfo.message instanceof Error)) return einfo;
// Assign all enumerable properties and the
// message property from the error provided.
const err = einfo.message;
Object.assign(einfo, err);
einfo.message = err.message;
einfo[MESSAGE] = err.message;
// Assign the stack and/or cause if requested.
if (stack) einfo.stack = err.stack;
if (cause) einfo.cause = err.cause;
return einfo;
});
@@ -0,0 +1 @@
{"name":"@react-aria/interactions","version":"3.25.6","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532126412,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/context.main.js":{"checkedAt":1794532126412,"integrity":"sha512-E9XDStkvnHz3arUWLQ7UrIczGt8KC8YuKVmCXK5ivZn+QCmf13ZKdgx88BKKh2R6dQhHPAPgWU5K43zosYhirg==","mode":420,"size":1237},"dist/context.module.js":{"checkedAt":1794532126412,"integrity":"sha512-icx3vb3JLJA2MId7MMx2Ap5/Xz+/K3aLksZHZbmksWKZY5VEhvAY229VY+rtX9Wxjiy+d4HGC+TghntsfQk8xg==","mode":420,"size":968},"dist/createEventHandler.main.js":{"checkedAt":1794532126412,"integrity":"sha512-XKMlu4kvIdOkEUNPtWtshFaN0sT7XRE4oBS6D0QMw534jkVU9aE5M875HnNp1TqDJggVMbR9N1bAH54WdozYgw==","mode":420,"size":1912},"dist/createEventHandler.module.js":{"checkedAt":1794532126412,"integrity":"sha512-MFSfX57Fw7gKtYhmjdQDsl+P9U9geJddiYO9cKCClhbQexIDwwSBOdB1TaNeIbhhnGHkEcq1Gy11YVVdw0PL5Q==","mode":420,"size":1756},"dist/focusSafely.main.js":{"checkedAt":1794532126413,"integrity":"sha512-oc1Rb6KQZ5cbpzFqDGcxQpdE+mWro69m8/CQJPusV+600F5uiS1gXLqDroSzIVSBSiB+hslkjRwXr2F5qysWiA==","mode":420,"size":2149},"dist/focusSafely.module.js":{"checkedAt":1794532126413,"integrity":"sha512-aqrG4pg62KptZmqsu4QWC8ePGzGX8lW3U4GF4nefxyL7Tuy4czwEFBWTHmmxir1XkVyokBUA36+q7rexY04EJg==","mode":420,"size":2109},"dist/main.js":{"checkedAt":1794532126413,"integrity":"sha512-pIqgd9MYNONngYCc1KBbP13U6GNGm8A1edwiFme3PYTQ0klN87cUwdKSHyc5MURjUdw0tnx82OsI+CWKv9NC7w==","mode":420,"size":4104},"dist/module.js":{"checkedAt":1794532126413,"integrity":"sha512-3/A+42eI9p0LXxWn1/vhzgdhxRLnawQEIqjgVd60fddzeO+SPmgE+/DlPSS6WcBQIFEy2VH7UDaqBATYyIWFbQ==","mode":420,"size":4194},"dist/Pressable.main.js":{"checkedAt":1794532126413,"integrity":"sha512-JP7Kr/bG21/0tPlaztmCIxlipXAZAIU/WaMM2uUD5xrbrczWdbJFoQKt97/p1PlXRavIP61OeGhgGBTkE++pMg==","mode":420,"size":3727},"dist/Pressable.module.js":{"checkedAt":1794532126413,"integrity":"sha512-rx32/7sOKNRhxTYVxRysrUXMjai6J/+GRCHqIeiblaKzvh1hoH+CWtKUPI5kU0mfIu5hxMz3Sf8QCZy2W0wkWA==","mode":420,"size":3557},"dist/PressResponder.main.js":{"checkedAt":1794532126413,"integrity":"sha512-XHHHCqI7XNWxbFXDK8Op5VvhaKGimuLivea2MirH4vSTbj03+VIeMvaLY12u3EzIKqaaEe++g8jR4NqQ+dqA7Q==","mode":420,"size":2954},"dist/PressResponder.module.js":{"checkedAt":1794532126413,"integrity":"sha512-GUeP1U3BmzPIR8qYzvbm5rjF4NJjHP4ttnQendhTAbzVJ63Ew/UNRCtGAoh/b8U55mYQGSJmsiQp3zYPfygZxg==","mode":420,"size":2747},"dist/textSelection.main.js":{"checkedAt":1794532126414,"integrity":"sha512-jVLVuNsl6QvTAihOqRApVmPWhgtTWIy5u1ohNHL00yzVBr+nK863f4vjFPe7BzWTsz6pokVSQ3FKcqlAAek4hg==","mode":420,"size":4489},"dist/textSelection.module.js":{"checkedAt":1794532126414,"integrity":"sha512-gSBQJtMgHpB5z8nAghRmgEWEDAMXjDfqrdVCdL5yeLuTLCipioP8pc4wifzsTM0FG5ZDMJY+ecVBQrhDm2RaQA==","mode":420,"size":4313},"dist/useFocus.main.js":{"checkedAt":1794532126414,"integrity":"sha512-V2lHa8/4v0wgotN91AufM/XYixh7er6OKNp/ZVUvIp+UpSiXnSsHfwiF+L0Ig38oZyMGSYKsnCiCLDHKHk2h9Q==","mode":420,"size":2958},"dist/useFocus.module.js":{"checkedAt":1794532126414,"integrity":"sha512-O7+9C+nvou/B1iNZUwL8rWtWpXr0S5ML3FUit6V8BT3fu+5GWGcnxUqT7Avzt1SQD+otvgHpANHgo1/c2uQf+w==","mode":420,"size":2893},"dist/useFocusable.main.js":{"checkedAt":1794532126414,"integrity":"sha512-9LjefOaiD4MvbWt2sztFuGtgHPo8plHPPQUWfLhgej+PIFA/lpuQgcrZJSUIhH2Kiu3RZIhhmcsXT4dTnULn2Q==","mode":420,"size":6225},"dist/useFocusable.module.js":{"checkedAt":1794532126414,"integrity":"sha512-PsylhJPP9Q06FlhkD5fCuzuuX8mq/0EcZjAEwt1ubUgMrr7ymtTD1qbs6tcUoIscOKrvBg4j9c6JQZQyzrokjA==","mode":420,"size":5965},"dist/useFocusVisible.main.js":{"checkedAt":1794532126414,"integrity":"sha512-ChmoqqQLUDWADPM0nMuF7RqmOpU9HUMiih9sllAKHKiIE2/ZZYzIAdWhAQlFQSpE8pTlSChRyby3lXWw+NmDEA==","mode":420,"size":14868},"dist/useFocusVisible.module.js":{"checkedAt":1794532126415,"integrity":"sha512-7ar7EVhgS700ayC6mYVZ0yjxtHwU2J/JNdl+cXE9v3LIWXx27As0aAqLKQj+OVjToaKKEpreMojjjTxTDHm/Gw==","mode":420,"size":14535},"dist/useFocusWithin.main.js":{"checkedAt":1794532126415,"integrity":"sha512-Qh5buABy0wvJ0QfBf8hJy3H+7fh05Iou8BmTyqQnL6zxK36wpbcIrTE7Q/0xoQRKyDscBfBFtunYiIgzPekcAA==","mode":420,"size":4911},"dist/useFocusWithin.module.js":{"checkedAt":1794532126415,"integrity":"sha512-X18KzcDP+TQZGgg8lv5ZjvDDHzagzdYfTGa3KE1c48l9bqV6beY68NeNJCy4uvwCFFtcTm05hCW3nJ5APzc6iQ==","mode":420,"size":5058},"dist/useHover.main.js":{"checkedAt":1794532126415,"integrity":"sha512-B7Xex/tVLgsNvoTXipLPBMxTZXnikgT9idJxlsKWCqFU1CYuQ21bSbrHX/JnEaBjd5MZEU0pz2BxpTRQkqryJA==","mode":420,"size":7861},"dist/useHover.module.js":{"checkedAt":1794532126415,"integrity":"sha512-58ZrKZRI4Yr+ou/r1B2YNQC/9MOqfgn0uyV3bAN0UK8y/4cUr2t7Cj0n9WxmvhkxlKv/Hp6tnMITHns94BoMPA==","mode":420,"size":7834},"dist/useInteractOutside.main.js":{"checkedAt":1794532126415,"integrity":"sha512-DgDtdHa7D7CMAruEnoqs1gLXRHgFMhJDrd/fitNMJlFvcWhaXZq/CtnujUA28MUCE9osKTVwwh2VT2R4UZFLIw==","mode":420,"size":5581},"dist/useInteractOLine truncated
@@ -0,0 +1,15 @@
module.exports = {
"deselectedItem": (args)=>`${args.item} no seleccionado.`,
"longPressToSelect": `Mantenga pulsado para abrir el modo de selecci\xf3n.`,
"select": `Seleccionar`,
"selectedAll": `Todos los elementos seleccionados.`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `Ning\xfan elemento seleccionado`,
one: ()=>`${formatter.number(args.count)} elemento seleccionado`,
other: ()=>`${formatter.number(args.count)} elementos seleccionados`
})}.`,
"selectedItem": (args)=>`${args.item} seleccionado.`
};
//# sourceMappingURL=es-ES.main.js.map
@@ -0,0 +1,24 @@
{
"name": "escape-html",
"description": "Escape string for use in HTML",
"version": "1.0.3",
"license": "MIT",
"keywords": [
"escape",
"html",
"utility"
],
"repository": "component/escape-html",
"devDependencies": {
"benchmark": "1.0.0",
"beautify-benchmark": "0.2.4"
},
"files": [
"LICENSE",
"Readme.md",
"index.js"
],
"scripts": {
"bench": "node benchmark/index.js"
}
}
@@ -0,0 +1,32 @@
// @flow
class DOMRectReadOnly {
+x: number;
+y: number;
+width: number;
+height: number;
+top: number;
+right: number;
+bottom: number;
+left: number;
}
class ResizeObserverEntry {
+target: Element;
+contentRect: DOMRectReadOnly;
}
type Entries = $ReadOnlyArray<ResizeObserverEntry>;
type ResizeObserverCallback = {
(entries: Entries, observer: ResizeObserver): void
};
declare class ResizeObserver {
constructor(ResizeObserverCallback): ResizeObserver;
observe(target: Element): void;
unobserve(target: Element): void;
disconnect(): void;
};
declare export default typeof ResizeObserver;
@@ -0,0 +1,196 @@
/**
* @fileoverview Utility functions for JSX
*/
'use strict';
const elementType = require('jsx-ast-utils/elementType');
const astUtil = require('./ast');
const isCreateElement = require('./isCreateElement');
const variableUtil = require('./variable');
// See https://github.com/babel/babel/blob/ce420ba51c68591e057696ef43e028f41c6e04cd/packages/babel-types/src/validators/react/isCompatTag.js
// for why we only test for the first character
const COMPAT_TAG_REGEX = /^[a-z]/;
/**
* Checks if a node represents a DOM element according to React.
* @param {object} node - JSXOpeningElement to check.
* @returns {boolean} Whether or not the node corresponds to a DOM element.
*/
function isDOMComponent(node) {
const name = elementType(node);
return COMPAT_TAG_REGEX.test(name);
}
/**
* Test whether a JSXElement is a fragment
* @param {JSXElement} node
* @param {string} reactPragma
* @param {string} fragmentPragma
* @returns {boolean}
*/
function isFragment(node, reactPragma, fragmentPragma) {
const name = node.openingElement.name;
// <Fragment>
if (name.type === 'JSXIdentifier' && name.name === fragmentPragma) {
return true;
}
// <React.Fragment>
if (
name.type === 'JSXMemberExpression'
&& name.object.type === 'JSXIdentifier'
&& name.object.name === reactPragma
&& name.property.type === 'JSXIdentifier'
&& name.property.name === fragmentPragma
) {
return true;
}
return false;
}
/**
* Checks if a node represents a JSX element or fragment.
* @param {object} node - node to check.
* @returns {boolean} Whether or not the node if a JSX element or fragment.
*/
function isJSX(node) {
return node && ['JSXElement', 'JSXFragment'].indexOf(node.type) >= 0;
}
/**
* Check if node is like `key={...}` as in `<Foo key={...} />`
* @param {ASTNode} node
* @returns {boolean}
*/
function isJSXAttributeKey(node) {
return node.type === 'JSXAttribute'
&& node.name
&& node.name.type === 'JSXIdentifier'
&& node.name.name === 'key';
}
/**
* Check if value has only whitespaces
* @param {unknown} value
* @returns {boolean}
*/
function isWhiteSpaces(value) {
return typeof value === 'string' ? /^\s*$/.test(value) : false;
}
/**
* Check if the node is returning JSX or null
*
* @param {Context} context The context of `ASTNode`.
* @param {ASTNode} ASTnode The AST node being checked
* @param {boolean} [strict] If true, in a ternary condition the node must return JSX in both cases
* @param {boolean} [ignoreNull] If true, null return values will be ignored
* @returns {boolean} True if the node is returning JSX or null, false if not
*/
function isReturningJSX(context, ASTnode, strict, ignoreNull) {
const isJSXValue = (node) => {
if (!node) {
return false;
}
switch (node.type) {
case 'ConditionalExpression':
if (strict) {
return isJSXValue(node.consequent) && isJSXValue(node.alternate);
}
return isJSXValue(node.consequent) || isJSXValue(node.alternate);
case 'LogicalExpression':
if (strict) {
return isJSXValue(node.left) && isJSXValue(node.right);
}
return isJSXValue(node.left) || isJSXValue(node.right);
case 'SequenceExpression':
return isJSXValue(node.expressions[node.expressions.length - 1]);
case 'JSXElement':
case 'JSXFragment':
return true;
case 'CallExpression':
return isCreateElement(context, node);
case 'Literal':
if (!ignoreNull && node.value === null) {
return true;
}
return false;
case 'Identifier': {
const variable = variableUtil.findVariableByName(context, node, node.name);
return isJSX(variable);
}
default:
return false;
}
};
let found = false;
astUtil.traverseReturns(ASTnode, context, (node, breakTraverse) => {
if (isJSXValue(node)) {
found = true;
breakTraverse();
}
});
return found;
}
/**
* Check if the node is returning only null values
*
* @param {ASTNode} ASTnode The AST node being checked
* @param {Context} context The context of `ASTNode`.
* @returns {boolean} True if the node is returning only null values
*/
function isReturningOnlyNull(ASTnode, context) {
let found = false;
let foundSomethingElse = false;
astUtil.traverseReturns(ASTnode, context, (node) => {
// Traverse return statement
astUtil.traverse(node, {
enter(childNode) {
const setFound = () => {
found = true;
this.skip();
};
const setFoundSomethingElse = () => {
foundSomethingElse = true;
this.skip();
};
switch (childNode.type) {
case 'ReturnStatement':
break;
case 'ConditionalExpression':
if (childNode.consequent.value === null && childNode.alternate.value === null) {
setFound();
}
break;
case 'Literal':
if (childNode.value === null) {
setFound();
}
break;
default:
setFoundSomethingElse();
}
},
});
});
return found && !foundSomethingElse;
}
module.exports = {
isDOMComponent,
isFragment,
isJSX,
isJSXAttributeKey,
isWhiteSpaces,
isReturningJSX,
isReturningOnlyNull,
};
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = getImplicitRoleForArea;
var _jsxAstUtils = require("jsx-ast-utils");
/**
* Returns the implicit role for an area tag.
*/
function getImplicitRoleForArea(attributes) {
if ((0, _jsxAstUtils.getProp)(attributes, 'href')) {
return 'link';
}
return '';
}
module.exports = exports.default;
@@ -0,0 +1,12 @@
import type { TSchema } from '../../type/schema/index';
import type { TRef } from '../../type/ref/index';
import type { TThis } from '../../type/recursive/index';
import { TypeBoxError } from '../../type/error/index';
export declare class TypeDereferenceError extends TypeBoxError {
readonly schema: TRef | TThis;
constructor(schema: TRef | TThis);
}
/** `[Internal]` Pushes a schema onto references if the schema has an $id and does not exist on references */
export declare function Pushref(schema: TSchema, references: TSchema[]): TSchema[];
/** `[Internal]` Dereferences a schema from the references array or throws if not found */
export declare function Deref(schema: TSchema, references: TSchema[]): TSchema;
@@ -0,0 +1,6 @@
// useMessageFormatter is deprecated, but has a large dependency on intl-messageformat
// that we want to avoid. If it is built into the same file as the rest of the package,
// it deopts tree shaking in Parcel even when unused. Instead, it is split into a separate
// file and re-exported here, which allows tree shaking to work properly.
export * from './real-module.js';
export * from './useMessageFormatter.module.js';
@@ -0,0 +1 @@
{"version":3,"file":"accessibility.esm.js","sources":["../src/components/HiddenText/HiddenText.tsx","../src/components/LiveRegion/LiveRegion.tsx","../src/hooks/useAnnouncement.ts"],"sourcesContent":["import React from 'react';\n\ninterface Props {\n id: string;\n value: string;\n}\n\nconst hiddenStyles: React.CSSProperties = {\n display: 'none',\n};\n\nexport function HiddenText({id, value}: Props) {\n return (\n <div id={id} style={hiddenStyles}>\n {value}\n </div>\n );\n}\n","import React from 'react';\n\nexport interface Props {\n id: string;\n announcement: string;\n ariaLiveType?: \"polite\" | \"assertive\" | \"off\";\n}\n\nexport function LiveRegion({id, announcement, ariaLiveType = \"assertive\"}: Props) {\n // Hide element visually but keep it readable by screen readers\n const visuallyHidden: React.CSSProperties = {\n position: 'fixed',\n top: 0,\n left: 0,\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(100%)',\n whiteSpace: 'nowrap',\n };\n \n return (\n <div\n id={id}\n style={visuallyHidden}\n role=\"status\"\n aria-live={ariaLiveType}\n aria-atomic\n >\n {announcement}\n </div>\n );\n}\n","import {useCallback, useState} from 'react';\n\nexport function useAnnouncement() {\n const [announcement, setAnnouncement] = useState('');\n const announce = useCallback((value: string | undefined) => {\n if (value != null) {\n setAnnouncement(value);\n }\n }, []);\n\n return {announce, announcement} as const;\n}\n"],"names":["hiddenStyles","display","HiddenText","id","value","React","style","LiveRegion","announcement","ariaLiveType","visuallyHidden","position","top","left","width","height","margin","border","padding","overflow","clip","clipPath","whiteSpace","role","useAnnouncement","setAnnouncement","useState","announce","useCallback"],"mappings":";;AAOA,MAAMA,YAAY,GAAwB;EACxCC,OAAO,EAAE;AAD+B,CAA1C;SAIgBC;MAAW;IAACC,EAAD;IAAKC;;EAC9B,OACEC,mBAAA,MAAA;IAAKF,EAAE,EAAEA;IAAIG,KAAK,EAAEN;GAApB,EACGI,KADH,CADF;AAKD;;SCTeG;MAAW;IAACJ,EAAD;IAAKK,YAAL;IAAmBC,YAAY,GAAG;;;EAE3D,MAAMC,cAAc,GAAwB;IAC1CC,QAAQ,EAAE,OADgC;IAE1CC,GAAG,EAAE,CAFqC;IAG1CC,IAAI,EAAE,CAHoC;IAI1CC,KAAK,EAAE,CAJmC;IAK1CC,MAAM,EAAE,CALkC;IAM1CC,MAAM,EAAE,CAAC,CANiC;IAO1CC,MAAM,EAAE,CAPkC;IAQ1CC,OAAO,EAAE,CARiC;IAS1CC,QAAQ,EAAE,QATgC;IAU1CC,IAAI,EAAE,eAVoC;IAW1CC,QAAQ,EAAE,aAXgC;IAY1CC,UAAU,EAAE;GAZd;EAeA,OACEjB,mBAAA,MAAA;IACEF,EAAE,EAAEA;IACJG,KAAK,EAAEI;IACPa,IAAI,EAAC;iBACMd;;GAJb,EAOGD,YAPH,CADF;AAWD;;SClCegB;EACd,MAAM,CAAChB,YAAD,EAAeiB,eAAf,IAAkCC,QAAQ,CAAC,EAAD,CAAhD;EACA,MAAMC,QAAQ,GAAGC,WAAW,CAAExB,KAAD;IAC3B,IAAIA,KAAK,IAAI,IAAb,EAAmB;MACjBqB,eAAe,CAACrB,KAAD,CAAf;;GAFwB,EAIzB,EAJyB,CAA5B;EAMA,OAAO;IAACuB,QAAD;IAAWnB;GAAlB;AACD;;;;"}
@@ -0,0 +1,54 @@
# is-negative-zero <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
Is this value negative zero? === will lie to you.
## Example
```js
var isNegativeZero = require('is-negative-zero');
var assert = require('assert');
assert.notOk(isNegativeZero(undefined));
assert.notOk(isNegativeZero(null));
assert.notOk(isNegativeZero(false));
assert.notOk(isNegativeZero(true));
assert.notOk(isNegativeZero(0));
assert.notOk(isNegativeZero(42));
assert.notOk(isNegativeZero(Infinity));
assert.notOk(isNegativeZero(-Infinity));
assert.notOk(isNegativeZero(NaN));
assert.notOk(isNegativeZero('foo'));
assert.notOk(isNegativeZero(function () {}));
assert.notOk(isNegativeZero([]));
assert.notOk(isNegativeZero({}));
assert.ok(isNegativeZero(-0));
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/is-negative-zero
[npm-version-svg]: https://versionbadg.es/inspect-js/is-negative-zero.svg
[deps-svg]: https://david-dm.org/inspect-js/is-negative-zero.svg
[deps-url]: https://david-dm.org/inspect-js/is-negative-zero
[dev-deps-svg]: https://david-dm.org/inspect-js/is-negative-zero/dev-status.svg
[dev-deps-url]: https://david-dm.org/inspect-js/is-negative-zero#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/is-negative-zero.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/is-negative-zero.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/is-negative-zero.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-negative-zero
[codecov-image]: https://codecov.io/gh/inspect-js/is-negative-zero/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-negative-zero/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-negative-zero
[actions-url]: https://github.com/inspect-js/is-negative-zero/actions
@@ -0,0 +1,49 @@
/*
* 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.
*/ class $c74cda7d31af1253$export$c84671f46d6a1ca {
/**
* Returns whether the layout should invalidate in response to
* visible rectangle changes. By default, it only invalidates
* when the virtualizer's size changes. Return true always
* to make the layout invalidate while scrolling (e.g. sticky headers).
*/ shouldInvalidate(newRect, oldRect) {
// By default, invalidate when the size changes
return newRect.width !== oldRect.width || newRect.height !== oldRect.height;
}
/**
* Returns whether the layout should invalidate when the layout options change.
* By default it invalidates when the object identity changes. Override this
* method to optimize layout updates based on specific option changes.
*/ shouldInvalidateLayoutOptions(newOptions, oldOptions) {
return newOptions !== oldOptions;
}
/**
* This method allows the layout to perform any pre-computation
* it needs to in order to prepare LayoutInfos for retrieval.
* Called by the virtualizer before `getVisibleLayoutInfos`
* or `getLayoutInfo` are called.
*/ update(invalidationContext) {}
/** @private */ getItemRect(key) {
var _this_getLayoutInfo;
var _this_getLayoutInfo_rect;
return (_this_getLayoutInfo_rect = (_this_getLayoutInfo = this.getLayoutInfo(key)) === null || _this_getLayoutInfo === void 0 ? void 0 : _this_getLayoutInfo.rect) !== null && _this_getLayoutInfo_rect !== void 0 ? _this_getLayoutInfo_rect : null;
}
/** @private */ getVisibleRect() {
return this.virtualizer.visibleRect;
}
constructor(){
/** The Virtualizer the layout is currently attached to. */ this.virtualizer = null;
}
}
export {$c74cda7d31af1253$export$c84671f46d6a1ca as Layout};
//# sourceMappingURL=Layout.module.js.map
@@ -0,0 +1,72 @@
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2018 NAN contributors
*
* MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
********************************************************************/
#ifndef NAN_CONVERTERS_H_
#define NAN_CONVERTERS_H_
namespace imp {
template<typename T> struct ToFactoryBase {
typedef MaybeLocal<T> return_t;
};
template<typename T> struct ValueFactoryBase { typedef Maybe<T> return_t; };
template<typename T> struct ToFactory;
template<>
struct ToFactory<v8::Function> : ToFactoryBase<v8::Function> {
static inline return_t convert(v8::Local<v8::Value> val) {
if (val.IsEmpty() || !val->IsFunction()) return MaybeLocal<v8::Function>();
return MaybeLocal<v8::Function>(val.As<v8::Function>());
}
};
#define X(TYPE) \
template<> \
struct ToFactory<v8::TYPE> : ToFactoryBase<v8::TYPE> { \
static inline return_t convert(v8::Local<v8::Value> val); \
};
X(Boolean)
X(Number)
X(String)
X(Object)
X(Integer)
X(Uint32)
X(Int32)
#undef X
#define X(TYPE) \
template<> \
struct ToFactory<TYPE> : ValueFactoryBase<TYPE> { \
static inline return_t convert(v8::Local<v8::Value> val); \
};
X(bool)
X(double)
X(int64_t)
X(uint32_t)
X(int32_t)
#undef X
} // end of namespace imp
template<typename T>
inline
typename imp::ToFactory<T>::return_t To(v8::Local<v8::Value> val) {
return imp::ToFactory<T>::convert(val);
}
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \
(V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3))
# include "nan_converters_43_inl.h"
#else
# include "nan_converters_pre_43_inl.h"
#endif
#endif // NAN_CONVERTERS_H_
@@ -0,0 +1,13 @@
'use strict';
var $StringValueOf = require('call-bound')('String.prototype.valueOf');
// https://262.ecma-international.org/15.0/#sec-properties-of-the-string-prototype-object
module.exports = function ThisStringValue(value) {
if (typeof value === 'string') {
return value;
}
return $StringValueOf(value);
};
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var alertdialogRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [{
concept: {
name: 'alert'
},
module: 'XForms'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'alert'], ['roletype', 'window', 'dialog']]
};
var _default = exports.default = alertdialogRole;
@@ -0,0 +1,18 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $getProto = require('get-proto');
// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof
module.exports = function OrdinaryGetPrototypeOf(O) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: O must be an Object');
}
if (!$getProto) {
throw new $TypeError('This environment does not support fetching prototypes.');
}
return $getProto(O);
};
@@ -0,0 +1,45 @@
{
"name": "env-paths",
"version": "2.2.1",
"description": "Get paths for storing things like data, config, cache, etc",
"license": "MIT",
"repository": "sindresorhus/env-paths",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"common",
"user",
"paths",
"env",
"environment",
"directory",
"dir",
"appdir",
"path",
"data",
"config",
"cache",
"logs",
"temp",
"linux",
"unix"
],
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.1",
"xo": "^0.24.0"
}
}
@@ -0,0 +1,3 @@
# @react-stately/tooltip
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1 @@
module.exports={C:{"34":0.00769,"68":0.00384,"78":0.00384,"91":0.00384,"100":0.00769,"103":0.00384,"115":0.11532,"116":0.00384,"127":0.00384,"128":0.01538,"134":0.00384,"138":0.00384,"139":0.01922,"140":0.01153,"141":0.00769,"142":0.03075,"143":0.75342,"144":0.81493,"145":0.00384,_:"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 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 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 92 93 94 95 96 97 98 99 101 102 104 105 106 107 108 109 110 111 112 113 114 117 118 119 120 121 122 123 124 125 126 129 130 131 132 133 135 136 137 146 147 3.5 3.6"},D:{"39":0.00384,"40":0.00384,"41":0.00769,"42":0.00769,"43":0.00384,"44":0.00384,"45":0.00769,"46":0.00384,"47":0.00769,"48":0.00384,"49":0.00769,"50":0.00384,"51":0.00769,"52":0.00384,"53":0.00384,"54":0.00769,"55":0.00769,"56":0.00769,"57":0.00769,"58":0.00769,"59":0.00769,"60":0.00769,"69":0.01538,"71":0.00769,"72":0.00384,"73":0.00384,"74":0.06535,"75":0.00384,"77":0.00384,"78":0.00769,"79":0.01153,"80":0.00769,"81":0.00384,"83":0.00769,"88":0.00769,"89":0.00384,"91":0.00769,"92":0.00384,"94":0.00384,"95":0.00769,"98":0.00384,"100":0.0346,"103":0.01538,"104":0.04613,"105":0.00384,"106":0.00769,"107":0.00384,"108":0.00769,"109":0.57276,"110":0.00384,"111":0.03844,"112":0.01922,"113":0.00384,"114":0.04997,"116":0.0346,"117":0.00384,"119":0.00769,"120":0.00769,"121":0.00384,"122":0.04228,"123":0.00769,"124":0.00384,"125":0.98406,"126":0.00769,"127":0.00769,"128":0.03075,"129":0.01153,"130":0.01153,"131":0.02691,"132":0.01153,"133":0.01922,"134":0.0615,"135":0.04228,"136":0.06919,"137":0.05766,"138":0.29983,"139":0.45744,"140":4.68199,"141":9.81758,"142":0.10763,"143":0.01922,"144":0.00384,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 66 67 68 70 76 84 85 86 87 90 93 96 97 99 101 102 115 118 145"},F:{"35":0.00384,"50":0.00769,"79":0.01153,"92":0.00769,"95":0.02691,"113":0.00384,"114":0.01922,"120":0.06535,"121":0.03844,"122":0.69576,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 36 37 38 39 40 41 42 43 44 45 46 47 48 49 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 85 86 87 88 89 90 91 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"12":0.00384,"13":0.00769,"16":0.01153,"17":0.00384,"18":0.04228,"86":0.00384,"89":0.00384,"90":0.00769,"92":0.02306,"100":0.00384,"103":0.00384,"107":0.00384,"109":0.03075,"111":0.00384,"113":0.00384,"114":0.02306,"116":0.00384,"119":0.00769,"122":0.02306,"127":0.00384,"128":0.00384,"129":0.02691,"130":0.00384,"131":0.00769,"132":0.00384,"133":0.02691,"134":0.04997,"135":0.03075,"136":0.02306,"137":0.02306,"138":0.0346,"139":0.10763,"140":1.12629,"141":4.97798,"142":0.00384,_:"14 15 79 80 81 83 84 85 87 88 91 93 94 95 96 97 98 99 101 102 104 105 106 108 110 112 115 117 118 120 121 123 124 125 126"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 12.1 15.1 15.4 15.5 16.0 16.2 16.3 17.0 17.2 26.2","11.1":0.00384,"13.1":0.01922,"14.1":0.02306,"15.2-15.3":0.00384,"15.6":0.11532,"16.1":0.00384,"16.4":0.00769,"16.5":0.00384,"16.6":0.08072,"17.1":0.03075,"17.3":0.0346,"17.4":0.00384,"17.5":0.00769,"17.6":0.07688,"18.0":0.00384,"18.1":0.00384,"18.2":0.02691,"18.3":0.02691,"18.4":0.01153,"18.5-18.6":0.07304,"26.0":0.47666,"26.1":0.01153},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00086,"5.0-5.1":0,"6.0-6.1":0.00345,"7.0-7.1":0.00259,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00777,"10.0-10.2":0.00086,"10.3":0.01467,"11.0-11.2":0.21749,"11.3-11.4":0.00518,"12.0-12.1":0.00173,"12.2-12.5":0.04229,"13.0-13.1":0,"13.2":0.00432,"13.3":0.00173,"13.4-13.7":0.0069,"14.0-14.4":0.01467,"14.5-14.8":0.01554,"15.0-15.1":0.01467,"15.2-15.3":0.01122,"15.4":0.01295,"15.5":0.01467,"15.6-15.8":0.1916,"16.0":0.02589,"16.1":0.04833,"16.2":0.02503,"16.3":0.04488,"16.4":0.01122,"16.5":0.01985,"16.6-16.7":0.25633,"17.0":0.01812,"17.1":0.02762,"17.2":0.01985,"17.3":0.02934,"17.4":0.05178,"17.5":0.0889,"17.6-17.7":0.2244,"18.0":0.05092,"18.1":0.10529,"18.2":0.05696,"18.3":0.18297,"18.4":0.09407,"18.5-18.6":4.79695,"26.0":0.59293,"26.1":0.02158},P:{"4":0.11286,"22":0.01026,"23":0.03078,"24":0.12312,"25":0.0513,"26":0.1026,"27":0.19494,"28":4.85298,"29":0.27702,_:"20 21 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 16.0 19.0","5.0-5.4":0.01026,"7.2-7.4":0.18468,"14.0":0.01026,"15.0":0.01026,"17.0":0.02052,"18.0":0.01026},I:{"0":0.02459,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":1.39666,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.00769,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.29549},Q:{"14.9":0.00616},O:{"0":0.54788},H:{"0":0.05},L:{"0":51.90426}};
@@ -0,0 +1,163 @@
import { PartialFieldInfo } from '@protobuf-ts/runtime';
import { WireType } from '@protobuf-ts/runtime';
export declare class ArrayWrapper<T> extends ValueWrapper<T[]> {
getTypeName(): string;
}
export declare function autoTypeToClass(typeName: string): typeof UnknownWrapper;
export declare function autoTypeToField(key: string, dataValue: ValueWrapper<unknown>): PartialFieldInfo;
export declare class BoolWrapper extends ValueWrapper<boolean> {
getTypeName(): string;
}
export declare class BytesWrapper extends ValueWrapper<Uint8Array> {
getTypeName(): string;
}
export declare class ChainProto extends ProtoBufBase {
push<T>(data: T): this;
}
export declare function decodeProtoBuf<T>(typeName: string, message: any, fieldNo: number, wireType: WireType, data: Uint8Array, encodeBytes?: (data: Uint8Array) => T): void;
export declare class DoubleWrapper extends ValueWrapper<number> {
getTypeName(): string;
}
export declare type ExtractSchema<T> = Omit<{
[K in keyof T]: T[K] extends ProtoBufBase ? ExtractSchema<T[K]> : ExtractType<T[K]>;
}, keyof ProtoBufBase>;
export declare type ExtractType<T> = T extends ArrayWrapper<infer V> ? V[] : T extends ValueWrapper<infer U> ? U : T extends ProtoBufBase ? ExtractSchema<T> : T;
export declare class Fixed32Wrapper extends ValueWrapper<number> {
getTypeName(): string;
}
export declare class Fixed64Wrapper extends ValueWrapper<bigint> {
getTypeName(): string;
}
export declare class FloatWrapper extends ValueWrapper<number> {
getTypeName(): string;
}
export declare class Int32Wrapper extends ValueWrapper<number> {
getTypeName(): string;
}
export declare class Int64Wrapper extends ValueWrapper<bigint> {
getTypeName(): string;
}
export declare function PBArray<T>(field: number | undefined, data: T, opt?: boolean, value?: T[]): Omit<T, keyof ProtoBufBase>[];
export declare function PBBool(field?: number, opt?: boolean, value?: boolean): boolean;
export declare function PBBytes(field?: number, opt?: boolean, value?: Uint8Array<ArrayBuffer>): Uint8Array;
export declare function PBDouble(field?: number, opt?: boolean, value?: number): number;
export declare function PBFixed32(field?: number, opt?: boolean, value?: number): number;
export declare function PBFixed64(field?: number, opt?: boolean, value?: bigint): bigint;
export declare function PBFloat(field?: number, opt?: boolean, value?: number): number;
export declare function PBInt32(field?: number, opt?: boolean, value?: number): number;
export declare function PBInt64(field?: number, opt?: boolean, value?: bigint): bigint;
export declare function PBSFixed32(field?: number, opt?: boolean, value?: number): number;
export declare function PBSFixed64(field?: number, opt?: boolean, value?: bigint): bigint;
export declare function PBSInt32(field?: number, opt?: boolean, value?: number): number;
export declare function PBSInt64(field?: number, opt?: boolean, value?: bigint): bigint;
export declare function PBString(field?: number, opt?: boolean, value?: string): string;
export declare function PBUint32(field?: number, opt?: boolean, value?: number): number;
export declare function PBUint64(field?: number, opt?: boolean, value?: bigint): bigint;
export declare function ProtoBuf<T extends ProtoBufBase>(field: number, valueClass: new () => T): T;
export declare function ProtoBuf<T extends ProtoBufBase>(valueClass: new () => T): T;
export declare class ProtoBufBase {
_fieldId: number;
generateFields(): PartialFieldInfo[];
assignFields(fields: {
[key: string]: unknown;
}): void;
toObject(): Omit<this, keyof ProtoBufBase>;
encode(): Uint8Array;
decode(data: Uint8Array): this;
then(callback: (data: this) => void): void;
}
export declare function ProtoBufDecode<T>(data: Uint8Array, encodeBytes?: (data: Uint8Array) => T): object;
export declare function ProtoBufEx<T extends ProtoBufBase, U extends ExtractSchema<T>>(valueClass: new () => T, value?: U): T;
export declare function ProtoBufIn<T>(field: number, data: T): T;
export declare function ProtoBufIn<T>(data: T): T;
export declare function ProtoBufQuick<T extends {}, U extends T>(pb: T, data: U): ProtoBufBase;
export declare function proxyClassProtobuf<T extends ProtoBufBase>(protobuf: T): T;
export declare class SFixed32Wrapper extends ValueWrapper<number> {
getTypeName(): string;
}
export declare class SFixed64Wrapper extends ValueWrapper<bigint> {
getTypeName(): string;
}
export declare class SInt32Wrapper extends ValueWrapper<number> {
getTypeName(): string;
}
export declare class SInt64Wrapper extends ValueWrapper<bigint> {
getTypeName(): string;
}
export declare class StringWrapper extends ValueWrapper<string> {
getTypeName(): string;
}
export declare class UInt32Wrapper extends ValueWrapper<number> {
getTypeName(): string;
}
export declare class UInt64Wrapper extends ValueWrapper<bigint> {
getTypeName(): string;
}
export declare class UnknownWrapper extends ValueWrapper<unknown> {
getTypeName(): string;
}
export declare function UnWrap<T>(data: T): T;
export declare class ValueWrapper<T> {
_value: T;
_fieldId: number;
_opt: boolean;
_callback?: Function;
constructor(field: number, value: T, opt: boolean, callback?: Function);
get value(): T;
set value(newValue: T);
getTypeName(): string;
getFieldId(): number;
getField(key: string): PartialFieldInfo;
}
export { }
@@ -0,0 +1,87 @@
import * as fs from "fs";
/**
* Typing for the fields of package.json we care about
*/
export interface PackageJson {
[key: string]: string;
}
/**
* A function that json from a file
*/
export interface ReadJsonSync {
// tslint:disable-next-line:no-any
(packageJsonPath: string): any | undefined;
}
export interface FileExistsSync {
(name: string): boolean;
}
export interface FileExistsAsync {
(path: string, callback: (err?: Error, exists?: boolean) => void): void;
}
export interface ReadJsonAsyncCallback {
// tslint:disable-next-line:no-any
(err?: Error, content?: any): void;
}
export interface ReadJsonAsync {
(path: string, callback: ReadJsonAsyncCallback): void;
}
export function fileExistsSync(path: string): boolean {
try {
const stats = fs.statSync(path);
return stats.isFile();
} catch (err) {
// If error, assume file did not exist
return false;
}
}
/**
* Reads package.json from disk
* @param file Path to package.json
*/
// tslint:disable-next-line:no-any
export function readJsonFromDiskSync(packageJsonPath: string): any | undefined {
if (!fs.existsSync(packageJsonPath)) {
return undefined;
}
return require(packageJsonPath);
}
export function readJsonFromDiskAsync(
path: string,
// tslint:disable-next-line:no-any
callback: (err?: Error, content?: any) => void
): void {
fs.readFile(path, "utf8", (err, result) => {
// If error, assume file did not exist
if (err || !result) {
return callback();
}
const json = JSON.parse(result);
return callback(undefined, json);
});
}
export function fileExistsAsync(
path2: string,
callback2: (err?: Error, exists?: boolean) => void
): void {
fs.stat(path2, (err: Error, stats: fs.Stats) => {
if (err) {
// If error assume file does not exist
return callback2(undefined, false);
}
callback2(undefined, stats ? stats.isFile() : false);
});
}
export function removeExtension(path: string): string {
return path.substring(0, path.lastIndexOf(".")) || path;
}
@@ -0,0 +1,68 @@
{
"name": "tsx",
"version": "4.21.0",
"description": "TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files",
"keywords": [
"cli",
"runtime",
"node",
"cjs",
"commonjs",
"esm",
"typescript",
"typescript runner"
],
"license": "MIT",
"repository": "privatenumber/tsx",
"author": {
"name": "Hiroki Osame",
"email": "hiroki.osame@gmail.com"
},
"files": [
"dist"
],
"type": "module",
"bin": "./dist/cli.mjs",
"exports": {
"./package.json": "./package.json",
".": "./dist/loader.mjs",
"./patch-repl": "./dist/patch-repl.cjs",
"./cjs": "./dist/cjs/index.cjs",
"./cjs/api": {
"import": {
"types": "./dist/cjs/api/index.d.mts",
"default": "./dist/cjs/api/index.mjs"
},
"require": {
"types": "./dist/cjs/api/index.d.cts",
"default": "./dist/cjs/api/index.cjs"
}
},
"./esm": "./dist/esm/index.mjs",
"./esm/api": {
"import": {
"types": "./dist/esm/api/index.d.mts",
"default": "./dist/esm/api/index.mjs"
},
"require": {
"types": "./dist/esm/api/index.d.cts",
"default": "./dist/esm/api/index.cjs"
}
},
"./cli": "./dist/cli.mjs",
"./suppress-warnings": "./dist/suppress-warnings.cjs",
"./preflight": "./dist/preflight.cjs",
"./repl": "./dist/repl.mjs"
},
"homepage": "https://tsx.is",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"esbuild": "~0.27.0",
"get-tsconfig": "^4.7.5"
},
"optionalDependencies": {
"fsevents": "~2.3.3"
}
}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"K D E F wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC J ZB 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB K D E"},E:{"1":"K D E F A B C L M G 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB 2C ZC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z OC","2":"F B C FD GD HD ID NC uC JD"},G:{"1":"E LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC"},H:{"1":"hD"},I:{"1":"TC J I lD vC mD nD","2":"iD jD kD"},J:{"1":"A","2":"D"},K:{"1":"H OC","2":"A B C NC uC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:5,C:"matchMedia",D:true};
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from './types.js';
import 'react';
declare const SunFilledIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { SunFilledIcon };
@@ -0,0 +1,82 @@
{
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
"name": "minimatch",
"description": "a glob matcher in javascript",
"version": "9.0.5",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/minimatch.git"
},
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
"files": [
"dist"
],
"scripts": {
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"prepare": "tshy",
"pretest": "npm run prepare",
"presnap": "npm run prepare",
"test": "tap",
"snap": "tap",
"format": "prettier --write . --loglevel warn",
"benchmark": "node benchmark/index.js",
"typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts"
},
"prettier": {
"semi": false,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"jsxSingleQuote": false,
"bracketSameLine": true,
"arrowParens": "avoid",
"endOfLine": "lf"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"dependencies": {
"brace-expansion": "^2.0.1"
},
"devDependencies": {
"@types/brace-expansion": "^1.1.0",
"@types/node": "^18.15.11",
"@types/tap": "^15.0.8",
"eslint-config-prettier": "^8.6.0",
"mkdirp": "1",
"prettier": "^2.8.2",
"tap": "^18.7.2",
"ts-node": "^10.9.1",
"tshy": "^1.12.0",
"typedoc": "^0.23.21",
"typescript": "^4.9.3"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
},
"license": "ISC",
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"type": "module"
}
@@ -0,0 +1,166 @@
# Copyright (c) 2011-2015 Ryan Prichard
#
# 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.
# Use make -n to see the actual command-lines make would run.
# The default "make install" prefix is /usr/local. Pass PREFIX=<path> on the
# command-line to override the default.
.SECONDEXPANSION :
.PHONY : default
default : all
PREFIX := /usr/local
UNIX_ADAPTER_EXE := winpty.exe
MINGW_ENABLE_CXX11_FLAG := -std=c++11
USE_PCH := 1
COMMON_CXXFLAGS :=
UNIX_CXXFLAGS :=
MINGW_CXXFLAGS :=
MINGW_LDFLAGS :=
UNIX_LDFLAGS :=
# Include config.mk but complain if it hasn't been created yet.
ifeq "$(wildcard config.mk)" ""
$(error config.mk does not exist. Please run ./configure)
endif
include config.mk
COMMON_CXXFLAGS += \
-MMD -Wall \
-DUNICODE \
-D_UNICODE \
-D_WIN32_WINNT=0x0501 \
-Ibuild/gen
UNIX_CXXFLAGS += \
$(COMMON_CXXFLAGS)
MINGW_CXXFLAGS += \
$(COMMON_CXXFLAGS) \
-O2 \
$(MINGW_ENABLE_CXX11_FLAG)
MINGW_LDFLAGS += -static -static-libgcc -static-libstdc++
UNIX_LDFLAGS += $(UNIX_LDFLAGS_STATIC)
ifeq "$(USE_PCH)" "1"
MINGW_CXXFLAGS += -include build/mingw/PrecompiledHeader.h
PCH_DEP := build/mingw/PrecompiledHeader.h.gch
else
PCH_DEP :=
endif
build/gen/GenVersion.h : VERSION.txt $(COMMIT_HASH_DEP) | $$(@D)/.mkdir
$(info Updating build/gen/GenVersion.h)
@echo "const char GenVersion_Version[] = \"$(shell cat VERSION.txt | tr -d '\r\n')\";" > build/gen/GenVersion.h
@echo "const char GenVersion_Commit[] = \"$(COMMIT_HASH)\";" >> build/gen/GenVersion.h
build/mingw/PrecompiledHeader.h : src/shared/PrecompiledHeader.h | $$(@D)/.mkdir
$(info Copying $< to $@)
@cp $< $@
build/mingw/PrecompiledHeader.h.gch : build/mingw/PrecompiledHeader.h | $$(@D)/.mkdir
$(info Compiling $<)
@$(MINGW_CXX) $(MINGW_CXXFLAGS) -c -o $@ $<
-include build/mingw/PrecompiledHeader.h.d
define def_unix_target
build/$1/%.o : src/%.cc | $$$$(@D)/.mkdir
$$(info Compiling $$<)
@$$(UNIX_CXX) $$(UNIX_CXXFLAGS) $2 -I src/include -c -o $$@ $$<
endef
define def_mingw_target
build/$1/%.o : src/%.cc $$(PCH_DEP) | $$$$(@D)/.mkdir
$$(info Compiling $$<)
@$$(MINGW_CXX) $$(MINGW_CXXFLAGS) $2 -I src/include -c -o $$@ $$<
endef
include src/subdir.mk
.PHONY : all
all : $(ALL_TARGETS)
.PHONY : tests
tests : $(TEST_PROGRAMS)
.PHONY : install-bin
install-bin : all
mkdir -p $(PREFIX)/bin
install -m 755 -p -s build/$(UNIX_ADAPTER_EXE) $(PREFIX)/bin
install -m 755 -p -s build/winpty.dll $(PREFIX)/bin
install -m 755 -p -s build/winpty-agent.exe $(PREFIX)/bin
.PHONY : install-debugserver
install-debugserver : all
mkdir -p $(PREFIX)/bin
install -m 755 -p -s build/winpty-debugserver.exe $(PREFIX)/bin
.PHONY : install-lib
install-lib : all
mkdir -p $(PREFIX)/lib
install -m 644 -p build/winpty.lib $(PREFIX)/lib
.PHONY : install-doc
install-doc :
mkdir -p $(PREFIX)/share/doc/winpty
install -m 644 -p LICENSE $(PREFIX)/share/doc/winpty
install -m 644 -p README.md $(PREFIX)/share/doc/winpty
install -m 644 -p RELEASES.md $(PREFIX)/share/doc/winpty
.PHONY : install-include
install-include :
mkdir -p $(PREFIX)/include/winpty
install -m 644 -p src/include/winpty.h $(PREFIX)/include/winpty
install -m 644 -p src/include/winpty_constants.h $(PREFIX)/include/winpty
.PHONY : install
install : \
install-bin \
install-debugserver \
install-lib \
install-doc \
install-include
.PHONY : clean
clean :
rm -fr build
.PHONY : clean-msvc
clean-msvc :
rm -fr src/Default src/Release src/.vs src/gen
rm -f src/*.vcxproj src/*.vcxproj.filters src/*.sln src/*.sdf
.PHONY : distclean
distclean : clean
rm -f config.mk
.PRECIOUS : %.mkdir
%.mkdir :
$(info Creating directory $(dir $@))
@mkdir -p $(dir $@)
@touch $@
src/%.h :
@echo "Missing header file $@ (stale dependency file?)"
@@ -0,0 +1 @@
{"version":3,"file":"getDefaultPendingClassMetadataCount.spec.d.ts","sourceRoot":"","sources":["../../../../src/metadata/calculations/getDefaultPendingClassMetadataCount.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
var $5cbb62c8a19173ac$exports = {};
$5cbb62c8a19173ac$exports = {
"deselectedItem": (args)=>`${args.item} pole valitud.`,
"longPressToSelect": `Valikure\u{17E}iimi sisenemiseks vajutage pikalt.`,
"select": `Vali`,
"selectedAll": `K\xf5ik \xfcksused valitud.`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `\xdcksusi pole valitud`,
one: ()=>`${formatter.number(args.count)} \xfcksus valitud`,
other: ()=>`${formatter.number(args.count)} \xfcksust valitud`
})}.`,
"selectedItem": (args)=>`${args.item} valitud.`
};
export {$5cbb62c8a19173ac$exports as default};
//# sourceMappingURL=et-EE.module.js.map
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var menubarRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-orientation': 'horizontal'
},
relatedConcepts: [{
concept: {
name: 'toolbar'
},
module: 'ARIA'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [['menuitem', 'group'], ['menuitemradio', 'group'], ['menuitemcheckbox', 'group'], ['menuitem'], ['menuitemcheckbox'], ['menuitemradio']],
requiredProps: {},
superClass: [['roletype', 'widget', 'composite', 'select', 'menu'], ['roletype', 'structure', 'section', 'group', 'select', 'menu']]
};
var _default = exports.default = menubarRole;
@@ -0,0 +1,78 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = checkSum;
/**
* @file ttf table校验函数
* @author mengke01(kekee000@gmail.com)
*/
function checkSumArrayBuffer(buffer) {
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var length = arguments.length > 2 ? arguments[2] : undefined;
length = length == null ? buffer.byteLength : length;
if (offset + length > buffer.byteLength) {
throw new Error('check sum out of bound');
}
var nLongs = Math.floor(length / 4);
var view = new DataView(buffer, offset, length);
var sum = 0;
var i = 0;
while (i < nLongs) {
sum += view.getUint32(4 * i++, false);
}
var leftBytes = length - nLongs * 4;
if (leftBytes) {
offset = nLongs * 4;
while (leftBytes > 0) {
sum += view.getUint8(offset, false) << leftBytes * 8;
offset++;
leftBytes--;
}
}
return sum % 0x100000000;
}
function checkSumArray(buffer) {
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var length = arguments.length > 2 ? arguments[2] : undefined;
length = length || buffer.length;
if (offset + length > buffer.length) {
throw new Error('check sum out of bound');
}
var nLongs = Math.floor(length / 4);
var sum = 0;
var i = 0;
while (i < nLongs) {
sum += (buffer[i++] << 24) + (buffer[i++] << 16) + (buffer[i++] << 8) + buffer[i++];
}
var leftBytes = length - nLongs * 4;
if (leftBytes) {
offset = nLongs * 4;
while (leftBytes > 0) {
sum += buffer[offset] << leftBytes * 8;
offset++;
leftBytes--;
}
}
return sum % 0x100000000;
}
/**
* table校验
*
* @param {ArrayBuffer|Array} buffer 表数据
* @param {number=} offset 偏移量
* @param {number=} length 长度
*
* @return {number} 校验和
*/
function checkSum(buffer, offset, length) {
if (buffer instanceof ArrayBuffer) {
return checkSumArrayBuffer(buffer, offset, length);
} else if (buffer instanceof Array) {
return checkSumArray(buffer, offset, length);
}
throw new Error('not support checksum buffer type');
}
@@ -0,0 +1,61 @@
'use strict';
var inspect = require('object-inspect');
var forEach = require('for-each');
module.exports = function (flatMap, t) {
t.test('callback function', function (st) {
forEach([[], {}, true, false, 42, 'foo', /a/g, null], function (nonFunction) {
st['throws'](
function () { flatMap([], nonFunction); },
TypeError,
inspect(nonFunction) + ' is not a function'
);
});
st.end();
});
t.test('flatMaps', function (st) {
var mapped = flatMap([1, [2], [3, 4]], function (x, i) {
return [x, i];
});
var expected = [1, 0, [2], 1, [3, 4], 2];
st.deepEqual(mapped, expected, 'array is flattened and mapped to tuples of item/index');
st.equal(mapped.length, expected.length, 'array has expected length');
var context = {};
var actual;
flatMap([1], function () { actual = this; }, context);
st.equal(actual, context, 'thisArg works as expected');
st.end();
});
t.test('sparse arrays', function (st) {
var identity = function (x) { return x; };
// eslint-disable-next-line no-sparse-arrays
st.deepEqual(flatMap([, [1]], identity), flatMap([[], [1]], identity), 'an array hole is treated the same as an empty array');
st.end();
});
t.test('test262: staging test from v8', function (st) {
var arr1 = [0, 1, 2, 3];
var f = function (e) {
arr1[4] = 42;
return e;
};
st.deepEqual(flatMap(arr1, f), [0, 1, 2, 3]);
var arr2 = [0, 1, 2, 3];
var g = function (e) {
arr2.length = 3;
return e;
};
st.deepEqual(flatMap(arr2, g), [0, 1, 2]);
st.end();
});
};
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveFactoryBinding = void 0;
const resolveFactoryBindingCallback_1 = require("../calculations/resolveFactoryBindingCallback");
const resolveSingletonScopedBinding_1 = require("./resolveSingletonScopedBinding");
exports.resolveFactoryBinding = (0, resolveSingletonScopedBinding_1.resolveSingletonScopedBinding)(resolveFactoryBindingCallback_1.resolveFactoryBindingCallback);
//# sourceMappingURL=resolveFactoryBinding.js.map
@@ -0,0 +1,45 @@
{
"name": "forwarded",
"description": "Parse HTTP X-Forwarded-For header",
"version": "0.2.0",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>"
],
"license": "MIT",
"keywords": [
"x-forwarded-for",
"http",
"req"
],
"repository": "jshttp/forwarded",
"devDependencies": {
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.4",
"deep-equal": "1.0.1",
"eslint": "7.27.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.23.4",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.3.1",
"eslint-plugin-standard": "4.1.0",
"mocha": "8.4.0",
"nyc": "15.1.0"
},
"files": [
"LICENSE",
"HISTORY.md",
"README.md",
"index.js"
],
"engines": {
"node": ">= 0.6"
},
"scripts": {
"bench": "node benchmark/index.js",
"lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test",
"version": "node scripts/version-history.js && git add HISTORY.md"
}
}
@@ -0,0 +1,53 @@
import arrayMap from './_arrayMap.js';
import baseIteratee from './_baseIteratee.js';
import baseMap from './_baseMap.js';
import isArray from './isArray.js';
/**
* Creates an array of values by running each element in `collection` thru
* `iteratee`. The iteratee is invoked with three arguments:
* (value, index|key, collection).
*
* Many lodash methods are guarded to work as iteratees for methods like
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
*
* The guarded methods are:
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
* @example
*
* function square(n) {
* return n * n;
* }
*
* _.map([4, 8], square);
* // => [16, 64]
*
* _.map({ 'a': 4, 'b': 8 }, square);
* // => [16, 64] (iteration order is not guaranteed)
*
* var users = [
* { 'user': 'barney' },
* { 'user': 'fred' }
* ];
*
* // The `_.property` iteratee shorthand.
* _.map(users, 'user');
* // => ['barney', 'fred']
*/
function map(collection, iteratee) {
var func = isArray(collection) ? arrayMap : baseMap;
return func(collection, baseIteratee(iteratee, 3));
}
export default map;
@@ -0,0 +1,422 @@
"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 utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-unnecessary-type-parameters',
meta: {
type: 'problem',
docs: {
description: "Disallow type parameters that aren't used multiple times",
recommended: 'strict',
requiresTypeChecking: true,
},
hasSuggestions: true,
messages: {
replaceUsagesWithConstraint: 'Replace all usages of type parameter with its constraint.',
sole: 'Type parameter {{name}} is {{uses}} in the {{descriptor}} signature.',
},
schema: [],
},
defaultOptions: [],
create(context) {
const parserServices = (0, util_1.getParserServices)(context);
function checkNode(node, descriptor) {
const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
const checker = parserServices.program.getTypeChecker();
let counts;
// Get the scope in which the type parameters are declared.
const scope = context.sourceCode.getScope(node);
for (const typeParameter of tsNode.typeParameters) {
const esTypeParameter = parserServices.tsNodeToESTreeNodeMap.get(typeParameter);
const smTypeParameterVariable = (0, util_1.nullThrows)((() => {
const variable = scope.set.get(esTypeParameter.name.name);
return variable?.isTypeVariable ? variable : undefined;
})(), "Type parameter should be present in scope's variables.");
// Quick path: if the type parameter is used multiple times in the AST,
// we don't need to dip into types to know it's repeated.
if (isTypeParameterRepeatedInAST(esTypeParameter, smTypeParameterVariable.references, node.body?.range[0] ?? node.returnType?.range[1])) {
continue;
}
// For any inferred types, we have to dip into type checking.
counts ??= countTypeParameterUsage(checker, tsNode);
const identifierCounts = counts.get(typeParameter.name);
if (!identifierCounts || identifierCounts > 2) {
continue;
}
context.report({
node: esTypeParameter,
messageId: 'sole',
data: {
name: typeParameter.name.text,
descriptor,
uses: identifierCounts === 1 ? 'never used' : 'used only once',
},
suggest: [
{
messageId: 'replaceUsagesWithConstraint',
*fix(fixer) {
// Replace all the usages of the type parameter with the constraint...
const constraint = esTypeParameter.constraint;
// special case - a constraint of 'any' actually acts like 'unknown'
const constraintText = constraint != null &&
constraint.type !== utils_1.AST_NODE_TYPES.TSAnyKeyword
? context.sourceCode.getText(constraint)
: 'unknown';
for (const reference of smTypeParameterVariable.references) {
if (reference.isTypeReference) {
const referenceNode = reference.identifier;
const isComplexType = constraint?.type === utils_1.AST_NODE_TYPES.TSUnionType ||
constraint?.type === utils_1.AST_NODE_TYPES.TSIntersectionType ||
constraint?.type === utils_1.AST_NODE_TYPES.TSConditionalType;
const hasMatchingAncestorType = [
utils_1.AST_NODE_TYPES.TSArrayType,
utils_1.AST_NODE_TYPES.TSIndexedAccessType,
utils_1.AST_NODE_TYPES.TSIntersectionType,
utils_1.AST_NODE_TYPES.TSUnionType,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
].some(type => referenceNode.parent.parent.type === type);
if (isComplexType && hasMatchingAncestorType) {
const fixResult = (0, util_1.getWrappingFixer)({
node: referenceNode,
innerNode: constraint,
sourceCode: context.sourceCode,
wrap: constraintNode => constraintNode,
})(fixer);
yield fixResult;
}
else {
yield fixer.replaceText(referenceNode, constraintText);
}
}
}
// ...and remove the type parameter itself from the declaration.
const typeParamsNode = (0, util_1.nullThrows)(node.typeParameters, 'node should have type parameters');
// We are assuming at this point that the reported type parameter
// is present in the inspected node's type parameters.
if (typeParamsNode.params.length === 1) {
// Remove the whole <T> generic syntax if we're removing the only type parameter in the list.
yield fixer.remove(typeParamsNode);
}
else {
const index = typeParamsNode.params.indexOf(esTypeParameter);
if (index === 0) {
const commaAfter = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(esTypeParameter, token => token.value === ','), util_1.NullThrowsReasons.MissingToken('comma', 'type parameter list'));
const tokenAfterComma = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(commaAfter, {
includeComments: true,
}), util_1.NullThrowsReasons.MissingToken('token', 'type parameter list'));
yield fixer.removeRange([
esTypeParameter.range[0],
tokenAfterComma.range[0],
]);
}
else {
const commaBefore = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(esTypeParameter, token => token.value === ','), util_1.NullThrowsReasons.MissingToken('comma', 'type parameter list'));
yield fixer.removeRange([
commaBefore.range[0],
esTypeParameter.range[1],
]);
}
}
},
},
],
});
}
}
return {
[[
'ArrowFunctionExpression[typeParameters]',
'FunctionDeclaration[typeParameters]',
'FunctionExpression[typeParameters]',
'TSCallSignatureDeclaration[typeParameters]',
'TSConstructorType[typeParameters]',
'TSDeclareFunction[typeParameters]',
'TSEmptyBodyFunctionExpression[typeParameters]',
'TSFunctionType[typeParameters]',
'TSMethodSignature[typeParameters]',
].join(', ')](node) {
checkNode(node, 'function');
},
[[
'ClassDeclaration[typeParameters]',
'ClassExpression[typeParameters]',
].join(', ')](node) {
checkNode(node, 'class');
},
};
},
});
function isTypeParameterRepeatedInAST(node, references, startOfBody = Infinity) {
let total = 0;
for (const reference of references) {
// References inside the type parameter's definition don't count...
if (reference.identifier.range[0] < node.range[1] &&
reference.identifier.range[1] > node.range[0]) {
continue;
}
// ...nor references that are outside the declaring signature.
if (reference.identifier.range[0] > startOfBody) {
continue;
}
// Neither do references that aren't to the same type parameter,
// namely value-land (non-type) identifiers of the type parameter's type,
// and references to different type parameters or values.
if (!reference.isTypeReference ||
reference.identifier.name !== node.name.name) {
continue;
}
// If the type parameter is being used as a type argument, then we
// know the type parameter is being reused and can't be reported.
if (reference.identifier.parent.type === utils_1.AST_NODE_TYPES.TSTypeReference) {
const grandparent = skipConstituentsUpward(reference.identifier.parent.parent);
if (grandparent.type === utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation &&
grandparent.params.includes(reference.identifier.parent) &&
// Array and ReadonlyArray must be handled carefully
// let's defer the check to the type-aware phase
!(grandparent.parent.type === utils_1.AST_NODE_TYPES.TSTypeReference &&
grandparent.parent.typeName.type === utils_1.AST_NODE_TYPES.Identifier &&
['Array', 'ReadonlyArray'].includes(grandparent.parent.typeName.name))) {
return true;
}
}
total += 1;
if (total >= 2) {
return true;
}
}
return false;
}
function skipConstituentsUpward(node) {
switch (node.type) {
case utils_1.AST_NODE_TYPES.TSIntersectionType:
case utils_1.AST_NODE_TYPES.TSUnionType:
return skipConstituentsUpward(node.parent);
default:
return node;
}
}
/**
* Count uses of type parameters in inferred return types.
* We need to resolve and analyze the inferred return type of a function
* to see whether it contains additional references to the type parameters.
* For classes, we need to do this for all their methods.
*/
function countTypeParameterUsage(checker, node) {
const counts = new Map();
if (ts.isClassLike(node)) {
for (const typeParameter of node.typeParameters) {
collectTypeParameterUsageCounts(checker, typeParameter, counts, true);
}
for (const member of node.members) {
collectTypeParameterUsageCounts(checker, member, counts, true);
}
}
else {
collectTypeParameterUsageCounts(checker, node, counts, false);
}
return counts;
}
/**
* Populates {@link foundIdentifierUsages} by the number of times each type parameter
* appears in the given type by checking its uses through its type references.
* This is essentially a limited subset of the scope manager, but for types.
*/
function collectTypeParameterUsageCounts(checker, node, foundIdentifierUsages, fromClass) {
const visitedSymbolLists = new Set();
const type = checker.getTypeAtLocation(node);
const typeUsages = new Map();
const visitedConstraints = new Set();
let functionLikeType = false;
let visitedDefault = false;
if (ts.isCallSignatureDeclaration(node) ||
ts.isConstructorDeclaration(node)) {
functionLikeType = true;
visitSignature(checker.getSignatureFromDeclaration(node));
}
if (!functionLikeType) {
visitType(type, false);
}
function visitType(type, assumeMultipleUses, isReturnType = false) {
// Seeing the same type > (threshold=3 ** 2) times indicates a likely
// recursive type, like `type T = { [P in keyof T]: T }`.
// If it's not recursive, then heck, we've seen it enough times that any
// referenced types have been counted enough to qualify as used.
if (!type || incrementTypeUsages(type) > 9) {
return;
}
if (tsutils.isTypeParameter(type)) {
const declaration = type.getSymbol()?.getDeclarations()?.[0];
if (declaration) {
incrementIdentifierCount(declaration.name, assumeMultipleUses);
// Visiting the type of a constrained type parameter will recurse into
// the constraint. We avoid infinite loops by visiting each only once.
if (declaration.constraint &&
!visitedConstraints.has(declaration.constraint)) {
visitedConstraints.add(declaration.constraint);
visitType(checker.getTypeAtLocation(declaration.constraint), false);
}
if (declaration.default && !visitedDefault) {
visitedDefault = true;
visitType(checker.getTypeAtLocation(declaration.default), false);
}
}
}
// Catch-all: generic type references like `Exclude<T, null>`
else if (type.aliasTypeArguments) {
// We don't descend into the definition of the type alias, so we don't
// know whether it's used multiple times. It's safest to assume it is.
visitTypesList(type.aliasTypeArguments, true);
}
// Intersections and unions like `0 | 1`
else if (tsutils.isUnionOrIntersectionType(type)) {
visitTypesList(type.types, assumeMultipleUses);
}
// Index access types like `T[K]`
else if (tsutils.isIndexedAccessType(type)) {
visitType(type.objectType, assumeMultipleUses);
visitType(type.indexType, assumeMultipleUses);
}
// Tuple types like `[K, V]`
// Generic type references like `Map<K, V>`
else if (tsutils.isTypeReference(type)) {
for (const typeArgument of type.typeArguments ?? []) {
// currently, if we are in a "class context", everything is accepted
let thisAssumeMultipleUses = fromClass || assumeMultipleUses;
// special cases - readonly arrays/tuples are considered only to use the
// type parameter once. Mutable arrays/tuples are considered to use the
// type parameter multiple times if and only if they are returned.
// other kind of type references always count as multiple uses
thisAssumeMultipleUses ||= tsutils.isTupleType(type.target)
? isReturnType && !type.target.readonly
: checker.isArrayType(type.target)
? isReturnType &&
type.symbol?.getName() === 'Array'
: true;
visitType(typeArgument, thisAssumeMultipleUses, isReturnType);
}
}
// Template literals like `a${T}b`
else if (tsutils.isTemplateLiteralType(type)) {
for (const subType of type.types) {
visitType(subType, assumeMultipleUses);
}
}
// Conditional types like `T extends string ? T : never`
else if (tsutils.isConditionalType(type)) {
visitType(type.checkType, assumeMultipleUses);
visitType(type.extendsType, assumeMultipleUses);
}
// Catch-all: inferred object types like `{ K: V }`.
// These catch-alls should be _after_ more specific checks like
// `isTypeReference` to avoid descending into all the properties of a
// generic interface/class, e.g. `Map<K, V>`.
else if (tsutils.isObjectType(type)) {
const properties = type.getProperties();
visitSymbolsListOnce(properties, false);
if (isMappedType(type)) {
visitType(type.typeParameter, false);
if (properties.length === 0) {
// TS treats mapped types like `{[k in "a"]: T}` like `{a: T}`.
// They have properties, so we need to avoid double-counting.
visitType(type.templateType ?? type.constraintType, false);
}
}
visitType(type.getNumberIndexType(), true);
visitType(type.getStringIndexType(), true);
type.getCallSignatures().forEach(signature => {
functionLikeType = true;
visitSignature(signature);
});
type.getConstructSignatures().forEach(signature => {
functionLikeType = true;
visitSignature(signature);
});
}
// Catch-all: operator types like `keyof T`
else if (isOperatorType(type)) {
visitType(type.type, assumeMultipleUses);
}
}
function incrementIdentifierCount(id, assumeMultipleUses) {
const identifierCount = foundIdentifierUsages.get(id) ?? 0;
const value = assumeMultipleUses ? 2 : 1;
foundIdentifierUsages.set(id, identifierCount + value);
}
function incrementTypeUsages(type) {
const count = (typeUsages.get(type) ?? 0) + 1;
typeUsages.set(type, count);
return count;
}
function visitSignature(signature) {
if (!signature) {
return;
}
if (signature.thisParameter) {
visitType(checker.getTypeOfSymbol(signature.thisParameter), false);
}
for (const parameter of signature.parameters) {
visitType(checker.getTypeOfSymbol(parameter), false);
}
for (const typeParameter of signature.getTypeParameters() ?? []) {
visitType(typeParameter, false);
}
visitType(checker.getTypePredicateOfSignature(signature)?.type ??
signature.getReturnType(), false, true);
}
function visitSymbolsListOnce(symbols, assumeMultipleUses) {
if (visitedSymbolLists.has(symbols)) {
return;
}
visitedSymbolLists.add(symbols);
for (const symbol of symbols) {
visitType(checker.getTypeOfSymbol(symbol), assumeMultipleUses);
}
}
function visitTypesList(types, assumeMultipleUses) {
for (const type of types) {
visitType(type, assumeMultipleUses);
}
}
}
function isMappedType(type) {
return 'typeParameter' in type;
}
function isOperatorType(type) {
return 'type' in type && !!type.type;
}
@@ -0,0 +1,10 @@
export * from "./stringify.js";
export * from "./traversal.js";
export * from "./manipulation.js";
export * from "./querying.js";
export * from "./legacy.js";
export * from "./helpers.js";
export * from "./feeds.js";
/** @deprecated Use these methods from `domhandler` directly. */
export { isTag, isCDATA, isText, isComment, isDocument, hasChildren, } from "domhandler";
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,27 @@
import * as _heroui_system from '@heroui/system';
import { HTMLHeroUIProps } from '@heroui/system';
import { ValuesType } from './use-table.mjs';
import '@react-types/table';
import 'react';
import '@heroui/theme';
import '@react-stately/virtualizer';
import '@react-types/shared';
import '@react-stately/table';
import '@react-aria/table';
import '@heroui/react-utils';
import '@heroui/checkbox';
interface TableBodyProps extends HTMLHeroUIProps<"tbody"> {
slots: ValuesType["slots"];
collection: ValuesType["collection"];
state: ValuesType["state"];
isSelectable: ValuesType["isSelectable"];
color: ValuesType["color"];
disableAnimation: ValuesType["disableAnimation"];
checkboxesProps: ValuesType["checkboxesProps"];
selectionMode: ValuesType["selectionMode"];
classNames?: ValuesType["classNames"];
}
declare const TableBody: _heroui_system.InternalForwardRefRenderFunction<"tbody", TableBodyProps, never>;
export { type TableBodyProps, TableBody as default };
@@ -0,0 +1,28 @@
var baseMerge = require('./_baseMerge'),
isObject = require('./isObject');
/**
* Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
* objects into destination objects that are passed thru.
*
* @private
* @param {*} objValue The destination value.
* @param {*} srcValue The source value.
* @param {string} key The key of the property to merge.
* @param {Object} object The parent object of `objValue`.
* @param {Object} source The parent object of `srcValue`.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
* @returns {*} Returns the value to assign.
*/
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
if (isObject(objValue) && isObject(srcValue)) {
// Recursively merge objects and arrays (susceptible to call stack limits).
stack.set(srcValue, objValue);
baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
stack['delete'](srcValue);
}
return objValue;
}
module.exports = customDefaultsMerge;
@@ -0,0 +1 @@
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAoCM,SAAS,0CAAsE,KAAsB,EAAE,KAAQ,EAAE,GAAuC;QAgBlI,aAA8B;IAfzD,IAAI,QACF,IAAI,iBACJ,aAAa,yBACb,qBAAqB,YACrB,QAAQ,EACT,GAAG;IAEJ,IAAI,WAAC,OAAO,EAAE,uBAAuB,yBAAyB,EAAC,GAAG,CAAA,GAAA,yCAAM,EAAE,GAAG,CAAC;IAC9E,IAAI,cAAc,QAAQ,WAAW,GAAG;YAAM;gBAAA,uBAAA,QAAQ,WAAW,cAAnB,2CAAA,0BAAA,SAAsB,KAAK,GAAG;QAAI;IAChF,IAAI,aAAC,SAAS,EAAE,GAAG,QAAO,GAAG,CAAA,GAAA,wBAAgB,EAAE;QAC7C,kBAAkB,MAAM,gBAAgB;QACxC,KAAK,KAAK,GAAG;aACb;uBACA;QACA,uBAAuB,6BAA6B;QACpD,UAAU,gBAAe,iBAAA,4BAAA,cAAA,KAAM,KAAK,cAAX,kCAAA,YAAa,QAAQ,IAAG,CAAA,GAAA,YAAI,EAAE,iBAAA,4BAAA,eAAA,KAAM,KAAK,cAAX,mCAAA,aAAa,QAAQ,EAAE,eAAe;QAC7F,YAAY,MAAM,UAAU,CAAC,IAAI,KAAK;IACxC;IAEA,IAAI,aAAa,MAAM,gBAAgB,CAAC,UAAU,CAAC,KAAK,GAAG;IAE3D,IAAI,WAA0B;QAC5B,MAAM;QACN,iBAAiB,MAAM,gBAAgB,CAAC,aAAa,KAAK,SAAS,aAAa;QAChF,iBAAiB,OAAO,UAAU,IAAI;QACtC,GAAG,SAAS;IACd;IAEA,IAAI,eACF,QAAQ,CAAC,gBAAgB,GAAG,KAAK,KAAK,GAAG,GAAG,2BAA2B;IAGzE,OAAO;kBACL;QACA,GAAG,MAAM;IACX;AACF","sources":["packages/@react-aria/grid/src/useGridRow.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from '@react-aria/utils';\nimport {DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';\nimport {GridCollection, GridNode} from '@react-types/grid';\nimport {gridMap} from './utils';\nimport {GridState} from '@react-stately/grid';\nimport {SelectableItemStates, useSelectableItem} from '@react-aria/selection';\n\nexport interface GridRowProps<T> {\n /** An object representing the grid row. Contains all the relevant information that makes up the grid row. */\n node: GridNode<T>,\n /** Whether the grid row is contained in a virtual scroller. */\n isVirtualized?: boolean,\n /** Whether selection should occur on press up instead of press down. */\n shouldSelectOnPressUp?: boolean,\n /**\n * Handler that is called when a user performs an action on the row.\n * Please use onCellAction at the collection level instead.\n * @deprecated\n **/\n onAction?: () => void\n}\n\nexport interface GridRowAria extends SelectableItemStates {\n /** Props for the grid row element. */\n rowProps: DOMAttributes,\n /** Whether the row is currently in a pressed state. */\n isPressed: boolean\n}\n\n/**\n * Provides the behavior and accessibility implementation for a row in a grid.\n * @param props - Props for the row.\n * @param state - State of the parent grid, as returned by `useGridState`.\n */\nexport function useGridRow<T, C extends GridCollection<T>, S extends GridState<T, C>>(props: GridRowProps<T>, state: S, ref: RefObject<FocusableElement | null>): GridRowAria {\n let {\n node,\n isVirtualized,\n shouldSelectOnPressUp,\n onAction\n } = props;\n\n let {actions, shouldSelectOnPressUp: gridShouldSelectOnPressUp} = gridMap.get(state)!;\n let onRowAction = actions.onRowAction ? () => actions.onRowAction?.(node.key) : onAction;\n let {itemProps, ...states} = useSelectableItem({\n selectionManager: state.selectionManager,\n key: node.key,\n ref,\n isVirtualized,\n shouldSelectOnPressUp: gridShouldSelectOnPressUp || shouldSelectOnPressUp,\n onAction: onRowAction || node?.props?.onAction ? chain(node?.props?.onAction, onRowAction) : undefined,\n isDisabled: state.collection.size === 0\n });\n\n let isSelected = state.selectionManager.isSelected(node.key);\n\n let rowProps: DOMAttributes = {\n role: 'row',\n 'aria-selected': state.selectionManager.selectionMode !== 'none' ? isSelected : undefined,\n 'aria-disabled': states.isDisabled || undefined,\n ...itemProps\n };\n\n if (isVirtualized) {\n rowProps['aria-rowindex'] = node.index + 1; // aria-rowindex is 1 based\n }\n\n return {\n rowProps,\n ...states\n };\n}\n"],"names":[],"version":3,"file":"useGridRow.module.js.map"}
@@ -0,0 +1,173 @@
var $62347d8c4183e713$exports = require("./useSafelyMouseToSubmenu.main.js");
var $23MMN$react = require("react");
var $23MMN$reactariautils = require("@react-aria/utils");
var $23MMN$reactariai18n = require("@react-aria/i18n");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useSubmenuTrigger", () => $5f4753043c9f6cdf$export$7138b0d059a6e743);
/*
* Copyright 2023 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $5f4753043c9f6cdf$export$7138b0d059a6e743(props, state, ref) {
let { parentMenuRef: parentMenuRef, submenuRef: submenuRef, type: type = 'menu', isDisabled: isDisabled, delay: delay = 200 } = props;
let submenuTriggerId = (0, $23MMN$reactariautils.useId)();
let overlayId = (0, $23MMN$reactariautils.useId)();
let { direction: direction } = (0, $23MMN$reactariai18n.useLocale)();
let openTimeout = (0, $23MMN$react.useRef)(undefined);
let cancelOpenTimeout = (0, $23MMN$react.useCallback)(()=>{
if (openTimeout.current) {
clearTimeout(openTimeout.current);
openTimeout.current = undefined;
}
}, [
openTimeout
]);
let onSubmenuOpen = (0, $23MMN$reactariautils.useEffectEvent)((focusStrategy)=>{
cancelOpenTimeout();
state.open(focusStrategy);
});
let onSubmenuClose = (0, $23MMN$reactariautils.useEffectEvent)(()=>{
cancelOpenTimeout();
state.close();
});
(0, $23MMN$reactariautils.useLayoutEffect)(()=>{
return ()=>{
cancelOpenTimeout();
};
}, [
cancelOpenTimeout
]);
let submenuKeyDown = (e)=>{
switch(e.key){
case 'ArrowLeft':
if (direction === 'ltr' && e.currentTarget.contains(e.target)) {
var _ref_current;
e.stopPropagation();
onSubmenuClose();
(_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
}
break;
case 'ArrowRight':
if (direction === 'rtl' && e.currentTarget.contains(e.target)) {
var _ref_current1;
e.stopPropagation();
onSubmenuClose();
(_ref_current1 = ref.current) === null || _ref_current1 === void 0 ? void 0 : _ref_current1.focus();
}
break;
case 'Escape':
e.stopPropagation();
state.closeAll();
break;
}
};
var _state_focusStrategy;
let submenuProps = {
id: overlayId,
'aria-labelledby': submenuTriggerId,
submenuLevel: state.submenuLevel,
...type === 'menu' && {
onClose: state.closeAll,
autoFocus: (_state_focusStrategy = state.focusStrategy) !== null && _state_focusStrategy !== void 0 ? _state_focusStrategy : undefined,
onKeyDown: submenuKeyDown
}
};
let submenuTriggerKeyDown = (e)=>{
switch(e.key){
case 'ArrowRight':
if (!isDisabled) {
if (direction === 'ltr') {
if (!state.isOpen) onSubmenuOpen('first');
if (type === 'menu' && !!(submenuRef === null || submenuRef === void 0 ? void 0 : submenuRef.current) && document.activeElement === (ref === null || ref === void 0 ? void 0 : ref.current)) submenuRef.current.focus();
} else if (state.isOpen) onSubmenuClose();
else e.continuePropagation();
}
break;
case 'ArrowLeft':
if (!isDisabled) {
if (direction === 'rtl') {
if (!state.isOpen) onSubmenuOpen('first');
if (type === 'menu' && !!(submenuRef === null || submenuRef === void 0 ? void 0 : submenuRef.current) && document.activeElement === (ref === null || ref === void 0 ? void 0 : ref.current)) submenuRef.current.focus();
} else if (state.isOpen) onSubmenuClose();
else e.continuePropagation();
}
break;
case 'Escape':
state.closeAll();
break;
default:
e.continuePropagation();
break;
}
};
let onPressStart = (e)=>{
if (!isDisabled && (e.pointerType === 'virtual' || e.pointerType === 'keyboard')) // If opened with a screen reader or keyboard, auto focus the first submenu item.
onSubmenuOpen('first');
};
let onPress = (e)=>{
if (!isDisabled && (e.pointerType === 'touch' || e.pointerType === 'mouse')) // For touch or on a desktop device with a small screen open on press up to possible problems with
// press up happening on the newly opened tray items
onSubmenuOpen();
};
let onHoverChange = (isHovered)=>{
if (!isDisabled) {
if (isHovered && !state.isOpen) {
if (!openTimeout.current) openTimeout.current = setTimeout(()=>{
onSubmenuOpen();
}, delay);
} else if (!isHovered) cancelOpenTimeout();
}
};
let onBlur = (e)=>{
var _parentMenuRef_current;
if (state.isOpen && ((_parentMenuRef_current = parentMenuRef.current) === null || _parentMenuRef_current === void 0 ? void 0 : _parentMenuRef_current.contains(e.relatedTarget))) onSubmenuClose();
};
let shouldCloseOnInteractOutside = (target)=>{
if (target !== ref.current) return true;
return false;
};
(0, $62347d8c4183e713$exports.useSafelyMouseToSubmenu)({
menuRef: parentMenuRef,
submenuRef: submenuRef,
isOpen: state.isOpen,
isDisabled: isDisabled
});
return {
submenuTriggerProps: {
id: submenuTriggerId,
'aria-controls': state.isOpen ? overlayId : undefined,
'aria-haspopup': !isDisabled ? type : undefined,
'aria-expanded': state.isOpen ? 'true' : 'false',
onPressStart: onPressStart,
onPress: onPress,
onHoverChange: onHoverChange,
onKeyDown: submenuTriggerKeyDown,
onBlur: onBlur,
isOpen: state.isOpen
},
submenuProps: submenuProps,
popoverProps: {
isNonModal: true,
disableFocusManagement: true,
shouldCloseOnInteractOutside: shouldCloseOnInteractOutside
}
};
}
//# sourceMappingURL=useSubmenuTrigger.main.js.map
@@ -0,0 +1,72 @@
/**
* rejection-stream.js: TODO: add file header handler.
*
* (C) 2010 Charlie Robbins
* MIT LICENCE
*/
'use strict';
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
var _require = require('readable-stream'),
Writable = _require.Writable;
/**
* TODO: add class description.
* @type {RejectionStream}
* @extends {Writable}
*/
module.exports = /*#__PURE__*/function (_Writable) {
/**
* Constructor function for the RejectionStream responsible for wrapping a
* TransportStream; only allowing writes of `info` objects with
* `info.rejection` set to true.
* @param {!TransportStream} transport - Stream to filter to rejections
*/
function RejectionStream(transport) {
var _this;
_classCallCheck(this, RejectionStream);
_this = _callSuper(this, RejectionStream, [{
objectMode: true
}]);
if (!transport) {
throw new Error('RejectionStream requires a TransportStream instance.');
}
_this.handleRejections = true;
_this.transport = transport;
return _this;
}
/**
* Writes the info object to our transport instance if (and only if) the
* `rejection` property is set on the info.
* @param {mixed} info - TODO: add param description.
* @param {mixed} enc - TODO: add param description.
* @param {mixed} callback - TODO: add param description.
* @returns {mixed} - TODO: add return description.
* @private
*/
_inherits(RejectionStream, _Writable);
return _createClass(RejectionStream, [{
key: "_write",
value: function _write(info, enc, callback) {
if (info.rejection) {
return this.transport.log(info, callback);
}
callback();
return true;
}
}]);
}(Writable);
@@ -0,0 +1,35 @@
var toArray = require('./toArray');
/**
* Gets the next value on a wrapped object following the
* [iterator protocol](https://mdn.io/iteration_protocols#iterator).
*
* @name next
* @memberOf _
* @since 4.0.0
* @category Seq
* @returns {Object} Returns the next iterator value.
* @example
*
* var wrapped = _([1, 2]);
*
* wrapped.next();
* // => { 'done': false, 'value': 1 }
*
* wrapped.next();
* // => { 'done': false, 'value': 2 }
*
* wrapped.next();
* // => { 'done': true, 'value': undefined }
*/
function wrapperNext() {
if (this.__values__ === undefined) {
this.__values__ = toArray(this.value());
}
var done = this.__index__ >= this.__values__.length,
value = done ? undefined : this.__values__[this.__index__++];
return { 'done': done, 'value': value };
}
module.exports = wrapperNext;
@@ -0,0 +1,13 @@
import { seedSpec } from '../util.js';
export default function getParser({ tokenizers }) {
return function parseSpec(source) {
var _a;
let spec = seedSpec({ source });
for (const tokenize of tokenizers) {
spec = tokenize(spec);
if ((_a = spec.problems[spec.problems.length - 1]) === null || _a === void 0 ? void 0 : _a.critical)
break;
}
return spec;
};
}
@@ -0,0 +1,4 @@
function _classStaticPrivateMethodSet() {
throw new TypeError("attempted to set read only static private field");
}
module.exports = _classStaticPrivateMethodSet, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,83 @@
declare namespace locatePath {
interface Options {
/**
Current working directory.
@default process.cwd()
*/
readonly cwd?: string;
/**
Type of path to match.
@default 'file'
*/
readonly type?: 'file' | 'directory';
/**
Allow symbolic links to match if they point to the requested path type.
@default true
*/
readonly allowSymlinks?: boolean;
}
interface AsyncOptions extends Options {
/**
Number of concurrently pending promises. Minimum: `1`.
@default Infinity
*/
readonly concurrency?: number;
/**
Preserve `paths` order when searching.
Disable this to improve performance if you don't care about the order.
@default true
*/
readonly preserveOrder?: boolean;
}
}
declare const locatePath: {
/**
Synchronously get the first path that exists on disk of multiple paths.
@param paths - Paths to check.
@returns The first path that exists or `undefined` if none exists.
*/
sync: (
paths: Iterable<string>,
options?: locatePath.Options
) => string | undefined;
/**
Get the first path that exists on disk of multiple paths.
@param paths - Paths to check.
@returns The first path that exists or `undefined` if none exists.
@example
```
import locatePath = require('locate-path');
const files = [
'unicorn.png',
'rainbow.png', // Only this one actually exists on disk
'pony.png'
];
(async () => {
console(await locatePath(files));
//=> 'rainbow'
})();
```
*/
(paths: Iterable<string>, options?: locatePath.AsyncOptions): Promise<
string | undefined
>;
};
export = locatePath;
@@ -0,0 +1,8 @@
import type { NodeWithParent, TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
export declare class ImplicitGlobalVariableDefinition extends DefinitionBase<DefinitionType.ImplicitGlobalVariable, NodeWithParent, null, TSESTree.BindingName> {
readonly isTypeDefinition = false;
readonly isVariableDefinition = true;
constructor(name: TSESTree.BindingName, node: ImplicitGlobalVariableDefinition['node']);
}
@@ -0,0 +1,159 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _flow = require('../plugins/flow');
var _typescript = require('../plugins/typescript');
var _index = require('../tokenizer/index');
var _keywords = require('../tokenizer/keywords');
var _types = require('../tokenizer/types');
var _base = require('./base');
var _expression = require('./expression');
var _util = require('./util');
function parseSpread() {
_index.next.call(void 0, );
_expression.parseMaybeAssign.call(void 0, false);
} exports.parseSpread = parseSpread;
function parseRest(isBlockScope) {
_index.next.call(void 0, );
parseBindingAtom(isBlockScope);
} exports.parseRest = parseRest;
function parseBindingIdentifier(isBlockScope) {
_expression.parseIdentifier.call(void 0, );
markPriorBindingIdentifier(isBlockScope);
} exports.parseBindingIdentifier = parseBindingIdentifier;
function parseImportedIdentifier() {
_expression.parseIdentifier.call(void 0, );
_base.state.tokens[_base.state.tokens.length - 1].identifierRole = _index.IdentifierRole.ImportDeclaration;
} exports.parseImportedIdentifier = parseImportedIdentifier;
function markPriorBindingIdentifier(isBlockScope) {
let identifierRole;
if (_base.state.scopeDepth === 0) {
identifierRole = _index.IdentifierRole.TopLevelDeclaration;
} else if (isBlockScope) {
identifierRole = _index.IdentifierRole.BlockScopedDeclaration;
} else {
identifierRole = _index.IdentifierRole.FunctionScopedDeclaration;
}
_base.state.tokens[_base.state.tokens.length - 1].identifierRole = identifierRole;
} exports.markPriorBindingIdentifier = markPriorBindingIdentifier;
// Parses lvalue (assignable) atom.
function parseBindingAtom(isBlockScope) {
switch (_base.state.type) {
case _types.TokenType._this: {
// In TypeScript, "this" may be the name of a parameter, so allow it.
const oldIsType = _index.pushTypeContext.call(void 0, 0);
_index.next.call(void 0, );
_index.popTypeContext.call(void 0, oldIsType);
return;
}
case _types.TokenType._yield:
case _types.TokenType.name: {
_base.state.type = _types.TokenType.name;
parseBindingIdentifier(isBlockScope);
return;
}
case _types.TokenType.bracketL: {
_index.next.call(void 0, );
parseBindingList(_types.TokenType.bracketR, isBlockScope, true /* allowEmpty */);
return;
}
case _types.TokenType.braceL:
_expression.parseObj.call(void 0, true, isBlockScope);
return;
default:
_util.unexpected.call(void 0, );
}
} exports.parseBindingAtom = parseBindingAtom;
function parseBindingList(
close,
isBlockScope,
allowEmpty = false,
allowModifiers = false,
contextId = 0,
) {
let first = true;
let hasRemovedComma = false;
const firstItemTokenIndex = _base.state.tokens.length;
while (!_index.eat.call(void 0, close) && !_base.state.error) {
if (first) {
first = false;
} else {
_util.expect.call(void 0, _types.TokenType.comma);
_base.state.tokens[_base.state.tokens.length - 1].contextId = contextId;
// After a "this" type in TypeScript, we need to set the following comma (if any) to also be
// a type token so that it will be removed.
if (!hasRemovedComma && _base.state.tokens[firstItemTokenIndex].isType) {
_base.state.tokens[_base.state.tokens.length - 1].isType = true;
hasRemovedComma = true;
}
}
if (allowEmpty && _index.match.call(void 0, _types.TokenType.comma)) {
// Empty item; nothing further to parse for this item.
} else if (_index.eat.call(void 0, close)) {
break;
} else if (_index.match.call(void 0, _types.TokenType.ellipsis)) {
parseRest(isBlockScope);
parseAssignableListItemTypes();
// Support rest element trailing commas allowed by TypeScript <2.9.
_index.eat.call(void 0, _types.TokenType.comma);
_util.expect.call(void 0, close);
break;
} else {
parseAssignableListItem(allowModifiers, isBlockScope);
}
}
} exports.parseBindingList = parseBindingList;
function parseAssignableListItem(allowModifiers, isBlockScope) {
if (allowModifiers) {
_typescript.tsParseModifiers.call(void 0, [
_keywords.ContextualKeyword._public,
_keywords.ContextualKeyword._protected,
_keywords.ContextualKeyword._private,
_keywords.ContextualKeyword._readonly,
_keywords.ContextualKeyword._override,
]);
}
parseMaybeDefault(isBlockScope);
parseAssignableListItemTypes();
parseMaybeDefault(isBlockScope, true /* leftAlreadyParsed */);
}
function parseAssignableListItemTypes() {
if (_base.isFlowEnabled) {
_flow.flowParseAssignableListItemTypes.call(void 0, );
} else if (_base.isTypeScriptEnabled) {
_typescript.tsParseAssignableListItemTypes.call(void 0, );
}
}
// Parses assignment pattern around given atom if possible.
function parseMaybeDefault(isBlockScope, leftAlreadyParsed = false) {
if (!leftAlreadyParsed) {
parseBindingAtom(isBlockScope);
}
if (!_index.eat.call(void 0, _types.TokenType.eq)) {
return;
}
const eqIndex = _base.state.tokens.length - 1;
_expression.parseMaybeAssign.call(void 0, );
_base.state.tokens[eqIndex].rhsEndIndex = _base.state.tokens.length;
} exports.parseMaybeDefault = parseMaybeDefault;
@@ -0,0 +1,21 @@
import { ILogger, LogEvent } from 'base-log-factory';
import { ColorfulAppender } from 'blf-colorful-appender';
import { default as createDebug } from 'debug';
/**
* Console appender (控制台输出)
*/
export declare class DebugAppender extends ColorfulAppender {
name: string;
dateFormat: string;
debug: createDebug.Debugger;
setup({ name }: ILogger): void;
/**
* Write log (写入日志)
* @param event Log event (日志事件)
*/
write(event: LogEvent): void;
/**
* Close appender (关闭输出)
*/
close(): Promise<void>;
}
@@ -0,0 +1 @@
{"version":3,"file":"PlanServiceRedirectionBindingNode.d.ts","sourceRoot":"","sources":["../../../../src/planning/models/PlanServiceRedirectionBindingNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,WAAW,iCAAiC,CAChD,QAAQ,SAEN,yBAAyB,CAAC,GAAG,CAAC,GAAG,yBAAyB,CAAC,GAAG,CAAC,CACjE,SAAQ,eAAe,CAAC,QAAQ,CAAC;IACjC,YAAY,EAAE,eAAe,EAAE,CAAC;CACjC"}
@@ -0,0 +1,103 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const DescriptionFileUtils = require("./DescriptionFileUtils");
const getInnerRequest = require("./getInnerRequest");
/** @typedef {import("./Resolver")} Resolver */
/** @typedef {import("./Resolver").JsonPrimitive} JsonPrimitive */
/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */
/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */
module.exports = class AliasFieldPlugin {
/**
* @param {string | ResolveStepHook} source source
* @param {string | Array<string>} field field
* @param {string | ResolveStepHook} target target
*/
constructor(source, field, target) {
this.source = source;
this.field = field;
this.target = target;
}
/**
* @param {Resolver} resolver the resolver
* @returns {void}
*/
apply(resolver) {
const target = resolver.ensureHook(this.target);
resolver
.getHook(this.source)
.tapAsync("AliasFieldPlugin", (request, resolveContext, callback) => {
if (!request.descriptionFileData) return callback();
const innerRequest = getInnerRequest(resolver, request);
if (!innerRequest) return callback();
const fieldData = DescriptionFileUtils.getField(
request.descriptionFileData,
this.field,
);
if (fieldData === null || typeof fieldData !== "object") {
if (resolveContext.log) {
resolveContext.log(
`Field '${this.field}' doesn't contain a valid alias configuration`,
);
}
return callback();
}
/** @type {JsonPrimitive | undefined} */
const data = Object.prototype.hasOwnProperty.call(
fieldData,
innerRequest,
)
? /** @type {{[Key in string]: JsonPrimitive}} */ (fieldData)[
innerRequest
]
: innerRequest.startsWith("./")
? /** @type {{[Key in string]: JsonPrimitive}} */ (fieldData)[
innerRequest.slice(2)
]
: undefined;
if (data === innerRequest) return callback();
if (data === undefined) return callback();
if (data === false) {
/** @type {ResolveRequest} */
const ignoreObj = {
...request,
path: false,
};
if (typeof resolveContext.yield === "function") {
resolveContext.yield(ignoreObj);
return callback(null, null);
}
return callback(null, ignoreObj);
}
/** @type {ResolveRequest} */
const obj = {
...request,
path: /** @type {string} */ (request.descriptionFileRoot),
request: /** @type {string} */ (data),
fullySpecified: false,
};
resolver.doResolve(
target,
obj,
`aliased from description file ${
request.descriptionFilePath
} with mapping '${innerRequest}' to '${/** @type {string} */ data}'`,
resolveContext,
(err, result) => {
if (err) return callback(err);
// Don't allow other aliasing or raw request
if (result === undefined) return callback(null, null);
callback(null, result);
},
);
});
}
};
@@ -0,0 +1 @@
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAgBM,MAAM;IAYX,yHAAyH,GACzH,0CAA0C,OAA2B,EAAkD;QACrH,OAAO,QAAQ,MAAM,CAAC,CAAC,KAAK;YAC1B,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,MACrB,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE;iBAEpB,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE;YAEtB,OAAO;QACT,GAAG;YAAC,IAAI;YAAO,IAAI;SAAM;IAC3B;IAEA,+EAA+E,GAC/E,iBAAiB,OAA2B,EAAE,kBAAwC,EAAE,mBAA0C,EAAE,iBAAwC,EAAwB;QAClM,OAAO,IAAI,IAAI,QAAQ,GAAG,CAAC,CAAA;YACzB,IAAI,oBAAoB,GAAG,CAAC,IAAI,GAAG,GACjC,OAAO;gBAAC,IAAI,GAAG;gBAAE,mBAAmB,GAAG,CAAC,IAAI,GAAG;aAAE;iBAEjD,OAAO;gBAAC,IAAI,GAAG;gBAAE,kBAAkB,GAAG,CAAC,IAAI,GAAG,EAAG,KAAK,CAAC,KAAK;aAAC;QAEjE;IACF;IAEA,oFAAoF,GACpF,6BAA6B,mBAA0C,EAAwB;QAC7F,OAAO,IAAI,IAAI,MAAM,IAAI,CAAC,qBAAqB,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI;gBAC5B,uBAAA;gBAA1B,yBAAA;mBAAN;gBAAC;gBAAK,CAAA,OAAA,CAAA,0BAAA,IAAI,KAAK,CAAC,YAAY,cAAtB,qCAAA,2BAA0B,wBAAA,CAAA,QAAA,IAAI,EAAC,eAAe,cAApB,4CAAA,2BAAA,OAAuB,kBAAjD,kBAAA,OAAyD;aAAM;;IAEzE;IAEA,eAAe,GAAQ,EAAU;YACxB;QAAP,OAAO,CAAA,yBAAA,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,kBAAtB,oCAAA,yBAA8B;IACvC;IAEA,kBAAkB,GAAQ,EAAU;YAC3B;QAAP,OAAO,CAAA,4BAAA,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,kBAAzB,uCAAA,4BAAiC;IAC1C;IAEA,kBAAkB,GAAQ,EAAU;YAC3B;QAAP,OAAO,CAAA,4BAAA,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,kBAAzB,uCAAA,4BAAiC;IAC1C;IAEA,kBAAkB,UAA8B,EAAE,kBAAwC,EAAE,GAAQ,EAAE,KAAa,EAAwB;QACzI,IAAI,mBAAmB,IAAI,CAAC,YAAY;QACxC,IAAI,SAAS;QACb,IAAI,YAAY,IAAI;QAEpB,QAAQ,KAAK,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,KAAK,KAAK,CAAC;QAE/F,WAAW,OAAO,CAAC,OAAO,CAAC,CAAA;gBAMG,uBAEA;YAP5B,IAAI,OAAO,GAAG,KAAK,KAAK;gBACtB,UAAU,GAAG,CAAC,OAAO,GAAG,EAAE;gBAC1B,SAAS;YACX,OAAO,IAAI,QACT,2DAA2D;YAC3D,UAAU,GAAG,CAAC,OAAO,GAAG,EAAE,CAAA,wBAAA,iBAAiB,GAAG,CAAC,OAAO,GAAG,eAA/B,mCAAA,wBAAoC;iBAE9D,UAAU,GAAG,CAAC,OAAO,GAAG,EAAE,CAAA,sBAAA,OAAO,KAAK,CAAC,KAAK,cAAlB,iCAAA,sBAAsB,mBAAmB,GAAG,CAAC,OAAO,GAAG;QAErF;QAEA,OAAO;IACT;IAEA,kBAAkB,UAAkB,EAAE,UAA8B,EAAE,MAA4B,EAAoB;QACpH,IAAI,CAAC,YAAY,GAAG,IAAI;QACxB,IAAI,CAAC,eAAe,GAAG,IAAI;QAC3B,IAAI,CAAC,eAAe,GAAG,IAAI;QAE3B,0CAA0C;QAC1C,IAAI,eAAe,CAAA,GAAA,8CAAmB,EACpC,YACA,WAAW,OAAO,CAAC,GAAG,CAAC,CAAA,MAAQ,CAAA;gBAAC,GAAG,IAAI,KAAK;gBAAE,KAAK,IAAI,GAAG;YAAA,CAAA,IAC1D,QACA,CAAC,IAAM,IAAI,CAAC,eAAe,CAAC,WAAW,OAAO,CAAC,EAAE,GACjD,CAAC,IAAM,IAAI,CAAC,kBAAkB,CAAC,WAAW,OAAO,CAAC,EAAE;QAGtD,oEAAoE;QACpE,aAAa,OAAO,CAAC,CAAC,OAAO;YAC3B,IAAI,MAAM,WAAW,OAAO,CAAC,MAAM,CAAC,GAAG;YACvC,IAAI,SAAS,WAAW,OAAO,CAAC,MAAM;YACtC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK;gBACe;YAA1C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAA,GAAA,qCAAU,EAAE,CAAA,yBAAA,OAAO,KAAK,CAAC,QAAQ,cAArB,oCAAA,yBAAyB,IAAI,CAAC,kBAAkB,CAAC,SAAS;YACpG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAA,GAAA,qCAAU,EAAE,OAAO,KAAK,CAAC,QAAQ,EAAE;QACnE;QACA,OAAO,IAAI,CAAC,YAAY;IAC1B;IA5FA,YAAY,OAAoC,CAAE;aAJlD,eAAiC,IAAI;aACrC,kBAAoC,IAAI;aACxC,kBAAoC,IAAI;YAGf;QAAvB,IAAI,CAAC,eAAe,GAAG,CAAA,2BAAA,oBAAA,8BAAA,QAAS,eAAe,cAAxB,sCAAA,2BAA6B,IAAM;YAChC;QAA1B,IAAI,CAAC,kBAAkB,GAAG,CAAA,8BAAA,oBAAA,8BAAA,QAAS,kBAAkB,cAA3B,yCAAA,8BAAgC,IAAM;IAClE;AA0FF","sources":["packages/@react-stately/table/src/TableColumnLayout.ts"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n calculateColumnSizes,\n getMaxWidth,\n getMinWidth\n} from './TableUtils';\nimport {ColumnSize, TableCollection} from '@react-types/table';\nimport {GridNode} from '@react-types/grid';\nimport {Key} from '@react-types/shared';\n\nexport interface TableColumnLayoutOptions<T> {\n getDefaultWidth?: (column: GridNode<T>) => ColumnSize | null | undefined,\n getDefaultMinWidth?: (column: GridNode<T>) => ColumnSize | null | undefined\n}\n\nexport class TableColumnLayout<T> {\n getDefaultWidth: (column: GridNode<T>) => ColumnSize | null | undefined;\n getDefaultMinWidth: (column: GridNode<T>) => ColumnSize | null | undefined;\n columnWidths: Map<Key, number> = new Map();\n columnMinWidths: Map<Key, number> = new Map();\n columnMaxWidths: Map<Key, number> = new Map();\n\n constructor(options: TableColumnLayoutOptions<T>) {\n this.getDefaultWidth = options?.getDefaultWidth ?? (() => '1fr');\n this.getDefaultMinWidth = options?.getDefaultMinWidth ?? (() => 75);\n }\n\n /** Takes an array of columns and splits it into 2 maps of columns with controlled and columns with uncontrolled widths. */\n splitColumnsIntoControlledAndUncontrolled(columns: Array<GridNode<T>>): [Map<Key, GridNode<T>>, Map<Key, GridNode<T>>] {\n return columns.reduce((acc, col) => {\n Line truncated
@@ -0,0 +1,9 @@
/**
* Removes options that prompt the parser to parse the project with type
* information. In other words, you can use this if you are invoking the parser
* directly, to ensure that one file will be parsed in isolation, which is much,
* much faster.
*
* @see https://github.com/typescript-eslint/typescript-eslint/issues/8428
*/
export declare function withoutProjectParserOptions<Options extends object>(opts: Options): Omit<Options, 'EXPERIMENTAL_useProjectService' | 'project' | 'projectService'>;
@@ -0,0 +1,88 @@
// Copyright 2010 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Entropy encoding (Huffman) utilities.
#ifndef BROTLI_ENC_ENTROPY_ENCODE_H_
#define BROTLI_ENC_ENTROPY_ENCODE_H_
#include <stdint.h>
#include <string.h>
#include <vector>
#include "./histogram.h"
#include "./prefix.h"
namespace brotli {
// This function will create a Huffman tree.
//
// The (data,length) contains the population counts.
// The tree_limit is the maximum bit depth of the Huffman codes.
//
// The depth contains the tree, i.e., how many bits are used for
// the symbol.
//
// See http://en.wikipedia.org/wiki/Huffman_coding
void CreateHuffmanTree(const int *data,
const int length,
const int tree_limit,
uint8_t *depth);
// Change the population counts in a way that the consequent
// Hufmann tree compression, especially its rle-part will be more
// likely to compress this data more efficiently.
//
// length contains the size of the histogram.
// counts contains the population counts.
int OptimizeHuffmanCountsForRle(int length, int* counts);
// Write a huffman tree from bit depths into the bitstream representation
// of a Huffman tree. The generated Huffman tree is to be compressed once
// more using a Huffman tree
void WriteHuffmanTree(const uint8_t* depth,
uint32_t num,
std::vector<uint8_t> *tree,
std::vector<uint8_t> *extra_bits_data);
// Get the actual bit values for a tree of bit depths.
void ConvertBitDepthsToSymbols(const uint8_t *depth, int len, uint16_t *bits);
template<int kSize>
struct EntropyCode {
// How many bits for symbol.
uint8_t depth_[kSize];
// Actual bits used to represent the symbol.
uint16_t bits_[kSize];
// How many non-zero depth.
int count_;
// First four symbols with non-zero depth.
int symbols_[4];
};
static const int kCodeLengthCodes = 18;
// Literal entropy code.
typedef EntropyCode<256> EntropyCodeLiteral;
// Prefix entropy codes.
typedef EntropyCode<kNumCommandPrefixes> EntropyCodeCommand;
typedef EntropyCode<kNumDistancePrefixes> EntropyCodeDistance;
typedef EntropyCode<kNumBlockLenPrefixes> EntropyCodeBlockLength;
// Context map entropy code, 256 Huffman tree indexes + 16 run length codes.
typedef EntropyCode<272> EntropyCodeContextMap;
// Block type entropy code, 256 block types + 2 special symbols.
typedef EntropyCode<258> EntropyCodeBlockType;
} // namespace brotli
#endif // BROTLI_ENC_ENTROPY_ENCODE_H_
@@ -0,0 +1,155 @@
import Attributor from './attributor/attributor.js';
import {
type Blot,
type BlotConstructor,
type Root,
} from './blot/abstract/blot.js';
import ParchmentError from './error.js';
import Scope from './scope.js';
export type RegistryDefinition = Attributor | BlotConstructor;
export interface RegistryInterface {
create(scroll: Root, input: Node | string | Scope, value?: any): Blot;
query(query: string | Node | Scope, scope: Scope): RegistryDefinition | null;
register(...definitions: any[]): any;
}
export default class Registry implements RegistryInterface {
public static blots = new WeakMap<Node, Blot>();
public static find(node?: Node | null, bubble = false): Blot | null {
if (node == null) {
return null;
}
if (this.blots.has(node)) {
return this.blots.get(node) || null;
}
if (bubble) {
let parentNode: Node | null = null;
try {
parentNode = node.parentNode;
} catch (err) {
// Probably hit a permission denied error.
// A known case is in Firefox, event targets can be anonymous DIVs
// inside an input element.
// https://bugzilla.mozilla.org/show_bug.cgi?id=208427
return null;
}
return this.find(parentNode, bubble);
}
return null;
}
private attributes: { [key: string]: Attributor } = {};
private classes: { [key: string]: BlotConstructor } = {};
private tags: { [key: string]: BlotConstructor } = {};
private types: { [key: string]: RegistryDefinition } = {};
public create(scroll: Root, input: Node | string | Scope, value?: any): Blot {
const match = this.query(input);
if (match == null) {
throw new ParchmentError(`Unable to create ${input} blot`);
}
const blotClass = match as BlotConstructor;
const node =
// @ts-expect-error Fix me later
input instanceof Node || input.nodeType === Node.TEXT_NODE
? input
: blotClass.create(value);
const blot = new blotClass(scroll, node as Node, value);
Registry.blots.set(blot.domNode, blot);
return blot;
}
public find(node: Node | null, bubble = false): Blot | null {
return Registry.find(node, bubble);
}
public query(
query: string | Node | Scope,
scope: Scope = Scope.ANY,
): RegistryDefinition | null {
let match;
if (typeof query === 'string') {
match = this.types[query] || this.attributes[query];
// @ts-expect-error Fix me later
} else if (query instanceof Text || query.nodeType === Node.TEXT_NODE) {
match = this.types.text;
} else if (typeof query === 'number') {
if (query & Scope.LEVEL & Scope.BLOCK) {
match = this.types.block;
} else if (query & Scope.LEVEL & Scope.INLINE) {
match = this.types.inline;
}
} else if (query instanceof Element) {
const names = (query.getAttribute('class') || '').split(/\s+/);
names.some((name) => {
match = this.classes[name];
if (match) {
return true;
}
return false;
});
match = match || this.tags[query.tagName];
}
if (match == null) {
return null;
}
if (
'scope' in match &&
scope & Scope.LEVEL & match.scope &&
scope & Scope.TYPE & match.scope
) {
return match;
}
return null;
}
public register(...definitions: RegistryDefinition[]): RegistryDefinition[] {
return definitions.map((definition) => {
const isBlot = 'blotName' in definition;
const isAttr = 'attrName' in definition;
if (!isBlot && !isAttr) {
throw new ParchmentError('Invalid definition');
} else if (isBlot && definition.blotName === 'abstract') {
throw new ParchmentError('Cannot register abstract class');
}
const key = isBlot
? definition.blotName
: isAttr
? definition.attrName
: (undefined as never); // already handled by above checks
this.types[key] = definition;
if (isAttr) {
if (typeof definition.keyName === 'string') {
this.attributes[definition.keyName] = definition;
}
} else if (isBlot) {
if (definition.className) {
this.classes[definition.className] = definition;
}
if (definition.tagName) {
if (Array.isArray(definition.tagName)) {
definition.tagName = definition.tagName.map((tagName: string) => {
return tagName.toUpperCase();
});
} else {
definition.tagName = definition.tagName.toUpperCase();
}
const tagNames = Array.isArray(definition.tagName)
? definition.tagName
: [definition.tagName];
tagNames.forEach((tag: string) => {
if (this.tags[tag] == null || definition.className == null) {
this.tags[tag] = definition;
}
});
}
}
return definition;
});
}
}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more