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

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

No files matched your search

@@ -0,0 +1 @@
module.exports={C:{"112":0.00959,"115":0.01279,"127":0.0032,"128":0.00639,"129":0.0032,"136":0.00639,"140":0.0032,"141":0.0032,"142":0.00639,"143":0.24937,"144":0.24937,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 113 114 116 117 118 119 120 121 122 123 124 125 126 130 131 132 133 134 135 137 138 139 145 146 147 3.5 3.6"},D:{"39":0.00639,"40":0.00639,"41":0.00639,"42":0.0032,"43":0.00959,"44":0.00639,"45":0.00639,"46":0.00639,"47":0.0032,"48":0.00639,"49":0.00639,"50":0.00639,"51":0.00639,"52":0.00639,"53":0.0032,"54":0.00639,"55":0.00639,"56":0.00639,"57":0.00639,"58":0.00639,"59":0.00639,"60":0.00639,"64":0.00639,"65":0.00959,"68":0.0032,"69":0.00639,"70":0.00639,"71":0.00639,"72":0.01918,"74":0.00639,"78":0.00639,"79":0.02238,"80":0.0032,"83":0.0032,"86":0.0032,"87":0.01918,"88":0.0032,"91":0.01279,"95":0.00639,"96":0.00959,"98":0.00959,"100":0.0032,"101":0.0032,"103":0.01599,"104":0.01918,"105":0.00959,"107":0.0032,"108":0.00959,"109":0.14067,"111":0.00639,"112":0.0032,"114":0.00639,"116":0.02238,"117":0.0032,"118":0.00639,"119":0.05435,"120":0.00639,"121":0.00959,"122":0.00959,"124":0.0032,"125":3.9451,"126":0.01918,"127":0.00639,"128":0.03197,"129":0.0032,"130":0.00959,"131":0.09911,"132":0.01279,"133":0.02558,"134":0.02877,"135":0.05115,"136":0.07353,"137":0.05755,"138":0.27814,"139":0.47316,"140":3.97707,"141":7.41384,"142":0.07993,"143":0.0032,_:"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 66 67 73 75 76 77 81 84 85 89 90 92 93 94 97 99 102 106 110 113 115 123 144 145"},F:{"38":0.0032,"91":0.01599,"92":0.05115,"93":0.0032,"120":0.07673,"121":0.00959,"122":0.5371,_:"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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"12":0.0032,"16":0.0032,"18":0.01279,"84":0.0032,"89":0.0032,"90":0.00959,"92":0.03197,"100":0.00959,"104":0.0032,"107":0.0032,"109":0.0032,"111":0.01279,"112":0.0032,"114":0.15985,"122":0.00639,"123":0.00639,"126":0.01918,"131":0.01279,"133":0.00639,"134":0.0032,"135":0.0032,"136":0.00959,"137":0.00639,"138":0.01599,"139":0.03517,"140":0.57866,"141":2.06526,"142":0.00959,_:"13 14 15 17 79 80 81 83 85 86 87 88 91 93 94 95 96 97 98 99 101 102 103 105 106 108 110 113 115 116 117 118 119 120 121 124 125 127 128 129 130 132"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 6.1 7.1 10.1 12.1 14.1 15.1 15.2-15.3 15.4 15.5 16.2 16.3 16.4 16.5 17.2 17.3 17.4 18.0 26.2","5.1":0.0032,"9.1":0.0032,"11.1":0.0032,"13.1":0.00959,"15.6":0.01599,"16.0":0.00639,"16.1":0.0032,"16.6":0.02558,"17.0":0.0032,"17.1":0.00959,"17.5":0.00959,"17.6":0.04156,"18.1":0.00639,"18.2":0.00639,"18.3":0.02558,"18.4":0.02558,"18.5-18.6":0.05115,"26.0":0.12468,"26.1":0.0032},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00067,"5.0-5.1":0,"6.0-6.1":0.00268,"7.0-7.1":0.00201,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00603,"10.0-10.2":0.00067,"10.3":0.01139,"11.0-11.2":0.16884,"11.3-11.4":0.00402,"12.0-12.1":0.00134,"12.2-12.5":0.03283,"13.0-13.1":0,"13.2":0.00335,"13.3":0.00134,"13.4-13.7":0.00536,"14.0-14.4":0.01139,"14.5-14.8":0.01206,"15.0-15.1":0.01139,"15.2-15.3":0.00871,"15.4":0.01005,"15.5":0.01139,"15.6-15.8":0.14874,"16.0":0.0201,"16.1":0.03752,"16.2":0.01943,"16.3":0.03484,"16.4":0.00871,"16.5":0.01541,"16.6-16.7":0.19899,"17.0":0.01407,"17.1":0.02144,"17.2":0.01541,"17.3":0.02278,"17.4":0.0402,"17.5":0.06901,"17.6-17.7":0.1742,"18.0":0.03953,"18.1":0.08174,"18.2":0.04422,"18.3":0.14204,"18.4":0.07303,"18.5-18.6":3.72384,"26.0":0.46029,"26.1":0.01675},P:{"4":0.01021,"21":0.04084,"22":0.03063,"23":0.02042,"24":0.16338,"25":0.13274,"26":0.36759,"27":0.45949,"28":2.67527,"29":0.0919,_:"20 6.2-6.4 8.2 10.1 12.0 13.0 14.0 15.0 17.0 18.0","5.0-5.4":0.01021,"7.2-7.4":0.29612,"9.2":0.01021,"11.1-11.2":0.01021,"16.0":0.01021,"19.0":0.03063},I:{"0":0.05434,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00003},K:{"0":2.2339,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.0032,_:"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.22447},Q:{"14.9":0.0136},O:{"0":0.36051},H:{"0":0.14},L:{"0":63.02003}};
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2017-present, Jon Schlinkert.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,56 @@
import {useListState as $e72dd72e1c76a225$export$2f645645f7bca764} from "./useListState.module.js";
import {useControlledState as $eBozH$useControlledState} from "@react-stately/utils";
import {useMemo as $eBozH$useMemo} from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $a0d645289fe9b86b$export$e7f05e985daf4b5f(props) {
var _props_defaultSelectedKey;
let [selectedKey, setSelectedKey] = (0, $eBozH$useControlledState)(props.selectedKey, (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== void 0 ? _props_defaultSelectedKey : null, props.onSelectionChange);
let selectedKeys = (0, $eBozH$useMemo)(()=>selectedKey != null ? [
selectedKey
] : [], [
selectedKey
]);
let { collection: collection, disabledKeys: disabledKeys, selectionManager: selectionManager } = (0, $e72dd72e1c76a225$export$2f645645f7bca764)({
...props,
selectionMode: 'single',
disallowEmptySelection: true,
allowDuplicateSelectionEvents: true,
selectedKeys: selectedKeys,
onSelectionChange: (keys)=>{
// impossible, but TS doesn't know that
if (keys === 'all') return;
var _keys_values_next_value;
let key = (_keys_values_next_value = keys.values().next().value) !== null && _keys_values_next_value !== void 0 ? _keys_values_next_value : null;
// Always fire onSelectionChange, even if the key is the same
// as the current key (useControlledState does not).
if (key === selectedKey && props.onSelectionChange) props.onSelectionChange(key);
setSelectedKey(key);
}
});
let selectedItem = selectedKey != null ? collection.getItem(selectedKey) : null;
return {
collection: collection,
disabledKeys: disabledKeys,
selectionManager: selectionManager,
selectedKey: selectedKey,
setSelectedKey: setSelectedKey,
selectedItem: selectedItem
};
}
export {$a0d645289fe9b86b$export$e7f05e985daf4b5f as useSingleSelectListState};
//# sourceMappingURL=useSingleSelectListState.module.js.map
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from './types.mjs';
import 'react';
declare const InfoIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { InfoIcon };
@@ -0,0 +1,33 @@
var baseIsEqual = require('./_baseIsEqual'),
get = require('./get'),
hasIn = require('./hasIn'),
isKey = require('./_isKey'),
isStrictComparable = require('./_isStrictComparable'),
matchesStrictComparable = require('./_matchesStrictComparable'),
toKey = require('./_toKey');
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/**
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
*
* @private
* @param {string} path The path of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
return matchesStrictComparable(toKey(path), srcValue);
}
return function(object) {
var objValue = get(object, path);
return (objValue === undefined && objValue === srcValue)
? hasIn(object, path)
: baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
};
}
module.exports = baseMatchesProperty;
@@ -0,0 +1,3 @@
declare const _default: <T>(data: T[], value: T | T[]) => T[];
export default _default;
//# sourceMappingURL=prepend.d.ts.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","2":"K D E F A 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 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R 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"},E:{"1":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"0 1 2 3 4 5 6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC"},G:{"1":"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","130":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD"},H:{"130":"hD"},I:{"1":"TC J I iD jD kD lD vC mD nD"},J:{"1":"D","130":"A"},K:{"1":"H","130":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"130":"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:"PNG favicons",D:true};
@@ -0,0 +1,101 @@
import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from "./useLayoutEffect.mjs";
import {useValueEffect as $1dbecbe27a04f9af$export$14d238f342723f25} from "./useValueEffect.mjs";
import {useState as $eKkEp$useState, useRef as $eKkEp$useRef, useEffect as $eKkEp$useEffect, useCallback as $eKkEp$useCallback} from "react";
import {useSSRSafeId as $eKkEp$useSSRSafeId} from "@react-aria/ssr";
/*
* 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.
*/
// copied from SSRProvider.tsx to reduce exports, if needed again, consider sharing
let $bdb11010cef70236$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
let $bdb11010cef70236$export$d41a04c74483c6ef = new Map();
// This allows us to clean up the idsUpdaterMap when the id is no longer used.
// Map is a strong reference, so unused ids wouldn't be cleaned up otherwise.
// This can happen in suspended components where mount/unmount is not called.
let $bdb11010cef70236$var$registry;
if (typeof FinalizationRegistry !== 'undefined') $bdb11010cef70236$var$registry = new FinalizationRegistry((heldValue)=>{
$bdb11010cef70236$export$d41a04c74483c6ef.delete(heldValue);
});
function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
let [value, setValue] = (0, $eKkEp$useState)(defaultId);
let nextId = (0, $eKkEp$useRef)(null);
let res = (0, $eKkEp$useSSRSafeId)(value);
let cleanupRef = (0, $eKkEp$useRef)(null);
if ($bdb11010cef70236$var$registry) $bdb11010cef70236$var$registry.register(cleanupRef, res);
if ($bdb11010cef70236$var$canUseDOM) {
const cacheIdRef = $bdb11010cef70236$export$d41a04c74483c6ef.get(res);
if (cacheIdRef && !cacheIdRef.includes(nextId)) cacheIdRef.push(nextId);
else $bdb11010cef70236$export$d41a04c74483c6ef.set(res, [
nextId
]);
}
(0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
let r = res;
return ()=>{
// In Suspense, the cleanup function may be not called
// when it is though, also remove it from the finalization registry.
if ($bdb11010cef70236$var$registry) $bdb11010cef70236$var$registry.unregister(cleanupRef);
$bdb11010cef70236$export$d41a04c74483c6ef.delete(r);
};
}, [
res
]);
// This cannot cause an infinite loop because the ref is always cleaned up.
// eslint-disable-next-line
(0, $eKkEp$useEffect)(()=>{
let newId = nextId.current;
if (newId) setValue(newId);
return ()=>{
if (newId) nextId.current = null;
};
});
return res;
}
function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {
if (idA === idB) return idA;
let setIdsA = $bdb11010cef70236$export$d41a04c74483c6ef.get(idA);
if (setIdsA) {
setIdsA.forEach((ref)=>ref.current = idB);
return idB;
}
let setIdsB = $bdb11010cef70236$export$d41a04c74483c6ef.get(idB);
if (setIdsB) {
setIdsB.forEach((ref)=>ref.current = idA);
return idA;
}
return idB;
}
function $bdb11010cef70236$export$b4cc09c592e8fdb8(depArray = []) {
let id = $bdb11010cef70236$export$f680877a34711e37();
let [resolvedId, setResolvedId] = (0, $1dbecbe27a04f9af$export$14d238f342723f25)(id);
let updateId = (0, $eKkEp$useCallback)(()=>{
setResolvedId(function*() {
yield id;
yield document.getElementById(id) ? id : undefined;
});
}, [
id,
setResolvedId
]);
(0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(updateId, [
id,
updateId,
...depArray
]);
return resolvedId;
}
export {$bdb11010cef70236$export$d41a04c74483c6ef as idsUpdaterMap, $bdb11010cef70236$export$f680877a34711e37 as useId, $bdb11010cef70236$export$cd8c9cb68f842629 as mergeIds, $bdb11010cef70236$export$b4cc09c592e8fdb8 as useSlotId};
//# sourceMappingURL=useId.module.js.map
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return isPlainObject;
}
});
function isPlainObject(value) {
if (Object.prototype.toString.call(value) !== "[object Object]") {
return false;
}
const prototype = Object.getPrototypeOf(value);
return prototype === null || Object.getPrototypeOf(prototype) === null;
}
@@ -0,0 +1,36 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var isIteratorRecord = require('../helpers/records/iterator-record');
// https://262.ecma-international.org/16.0/#sec-iteratornext
module.exports = function IteratorNext(iteratorRecord) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
var result;
try {
if (arguments.length < 2) { // step 1
result = Call(iteratorRecord['[[NextMethod]]'], iteratorRecord['[[Iterator]]']); // step 1.a
} else { // step 2
result = Call(iteratorRecord['[[NextMethod]]'], iteratorRecord['[[Iterator]]'], [arguments[1]]); // step 2.a
}
} catch (e) { // step 3
// eslint-disable-next-line no-param-reassign
iteratorRecord['[[Done]]'] = true; // step 3.a
throw e; // step 3.b
}
if (!isObject(result)) { // step 5
// eslint-disable-next-line no-param-reassign
iteratorRecord['[[Done]]'] = true; // step 5.a
throw new $TypeError('iterator next must return an object'); // step 5.b
}
return result; // step 6
};
@@ -0,0 +1,11 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var config = {
paths: {
vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs'
}
};
exports.default = config;
@@ -0,0 +1,18 @@
import { createRequire } from 'module';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
/**
* @fileoverview Universal module importer
*/
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const require = createRequire(__dirname + "/");
const { ModuleImporter } = require("./module-importer.cjs");
export { ModuleImporter };
@@ -0,0 +1 @@
export declare function describeFilePath(filePath: string, tsconfigRootDir: string): string;
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2013 Ian Matthew Hansen
Copyright (c) 2015 node-modules and other contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OriginatorInfo = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const certificate_choices_1 = require("./certificate_choices");
const revocation_info_choice_1 = require("./revocation_info_choice");
class OriginatorInfo {
constructor(params = {}) {
Object.assign(this, params);
}
}
exports.OriginatorInfo = OriginatorInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: certificate_choices_1.CertificateSet, context: 0, implicit: true, optional: true })
], OriginatorInfo.prototype, "certs", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: revocation_info_choice_1.RevocationInfoChoices, context: 1, implicit: true, optional: true })
], OriginatorInfo.prototype, "crls", void 0);
@@ -0,0 +1,11 @@
import { OB11BaseNoticeEvent } from './OB11BaseNoticeEvent';
import { NapCatCore } from '../../../napcat-core';
export declare class OB11InputStatusEvent extends OB11BaseNoticeEvent {
notice_type: string;
sub_type: string;
status_text: string;
event_type: number;
user_id: number;
group_id: number;
constructor(core: NapCatCore, user_id: number, eventType: number, status_text: string);
}
@@ -0,0 +1,3 @@
export declare const elementNames: Map<string, string>;
export declare const attributeNames: Map<string, string>;
//# sourceMappingURL=foreignNames.d.ts.map
@@ -0,0 +1,152 @@
/**
* @license React
* react-dom.react-server.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var React = require("react");
function noop() {}
var Internals = {
d: {
f: noop,
r: function () {
throw Error(
"Invalid form element. requestFormReset must be passed a form that was rendered by React."
);
},
D: noop,
C: noop,
L: noop,
m: noop,
X: noop,
S: noop,
M: noop
},
p: 0,
findDOMNode: null
};
if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)
throw Error(
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.'
);
function getCrossOriginStringAs(as, input) {
if ("font" === as) return "";
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
Internals;
exports.preconnect = function (href, options) {
"string" === typeof href &&
(options
? ((options = options.crossOrigin),
(options =
"string" === typeof options
? "use-credentials" === options
? options
: ""
: void 0))
: (options = null),
Internals.d.C(href, options));
};
exports.prefetchDNS = function (href) {
"string" === typeof href && Internals.d.D(href);
};
exports.preinit = function (href, options) {
if ("string" === typeof href && options && "string" === typeof options.as) {
var as = options.as,
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
integrity =
"string" === typeof options.integrity ? options.integrity : void 0,
fetchPriority =
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0;
"style" === as
? Internals.d.S(
href,
"string" === typeof options.precedence ? options.precedence : void 0,
{
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority
}
)
: "script" === as &&
Internals.d.X(href, {
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
}
};
exports.preinitModule = function (href, options) {
if ("string" === typeof href)
if ("object" === typeof options && null !== options) {
if (null == options.as || "script" === options.as) {
var crossOrigin = getCrossOriginStringAs(
options.as,
options.crossOrigin
);
Internals.d.M(href, {
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
}
} else null == options && Internals.d.M(href);
};
exports.preload = function (href, options) {
if (
"string" === typeof href &&
"object" === typeof options &&
null !== options &&
"string" === typeof options.as
) {
var as = options.as,
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
Internals.d.L(href, as, {
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
type: "string" === typeof options.type ? options.type : void 0,
fetchPriority:
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0,
referrerPolicy:
"string" === typeof options.referrerPolicy
? options.referrerPolicy
: void 0,
imageSrcSet:
"string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
imageSizes:
"string" === typeof options.imageSizes ? options.imageSizes : void 0,
media: "string" === typeof options.media ? options.media : void 0
});
}
};
exports.preloadModule = function (href, options) {
if ("string" === typeof href)
if (options) {
var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
Internals.d.m(href, {
as:
"string" === typeof options.as && "script" !== options.as
? options.as
: void 0,
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0
});
} else Internals.d.m(href);
};
exports.version = "19.2.0";
@@ -0,0 +1,8 @@
{
"include": ["source/"],
"exclude": ["node_modules/"],
"extends": "@express-rate-limit/tsconfig",
"compilerOptions": {
"target": "ES2020"
}
}
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2015_reflect = void 0;
const base_config_1 = require("./base-config");
exports.es2015_reflect = {
libs: [],
variables: [['Reflect', base_config_1.TYPE_VALUE]],
};
@@ -0,0 +1,49 @@
{
"name": "esbuild",
"version": "0.25.12",
"description": "An extremely fast JavaScript and CSS bundler and minifier.",
"repository": {
"type": "git",
"url": "git+https://github.com/evanw/esbuild.git"
},
"scripts": {
"postinstall": "node install.js"
},
"main": "lib/main.js",
"types": "lib/main.d.ts",
"engines": {
"node": ">=18"
},
"bin": {
"esbuild": "bin/esbuild"
},
"optionalDependencies": {
"@esbuild/aix-ppc64": "0.25.12",
"@esbuild/android-arm": "0.25.12",
"@esbuild/android-arm64": "0.25.12",
"@esbuild/android-x64": "0.25.12",
"@esbuild/darwin-arm64": "0.25.12",
"@esbuild/darwin-x64": "0.25.12",
"@esbuild/freebsd-arm64": "0.25.12",
"@esbuild/freebsd-x64": "0.25.12",
"@esbuild/linux-arm": "0.25.12",
"@esbuild/linux-arm64": "0.25.12",
"@esbuild/linux-ia32": "0.25.12",
"@esbuild/linux-loong64": "0.25.12",
"@esbuild/linux-mips64el": "0.25.12",
"@esbuild/linux-ppc64": "0.25.12",
"@esbuild/linux-riscv64": "0.25.12",
"@esbuild/linux-s390x": "0.25.12",
"@esbuild/linux-x64": "0.25.12",
"@esbuild/netbsd-arm64": "0.25.12",
"@esbuild/netbsd-x64": "0.25.12",
"@esbuild/openbsd-arm64": "0.25.12",
"@esbuild/openbsd-x64": "0.25.12",
"@esbuild/openharmony-arm64": "0.25.12",
"@esbuild/sunos-x64": "0.25.12",
"@esbuild/win32-arm64": "0.25.12",
"@esbuild/win32-ia32": "0.25.12",
"@esbuild/win32-x64": "0.25.12"
},
"license": "MIT"
}
@@ -0,0 +1,33 @@
import baseRepeat from './_baseRepeat.js';
import baseToString from './_baseToString.js';
import castSlice from './_castSlice.js';
import hasUnicode from './_hasUnicode.js';
import stringSize from './_stringSize.js';
import stringToArray from './_stringToArray.js';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil;
/**
* Creates the padding for `string` based on `length`. The `chars` string
* is truncated if the number of characters exceeds `length`.
*
* @private
* @param {number} length The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padding for `string`.
*/
function createPadding(length, chars) {
chars = chars === undefined ? ' ' : baseToString(chars);
var charsLength = chars.length;
if (charsLength < 2) {
return charsLength ? baseRepeat(chars, length) : chars;
}
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
return hasUnicode(chars)
? castSlice(stringToArray(result), 0, length).join('')
: result.slice(0, length);
}
export default createPadding;
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAkGM,SAAS,0CAAkB,OAA8B;IAC9D,IAAI,MACF,EAAE,EACF,kBAAkB,OAAO,OACzB,GAAG,OACH,GAAG,yBACH,qBAAqB,yBACrB,qBAAqB,SACrB,KAAK,cACL,UAAU,YACV,QAAQ,8BACR,0BAA0B,gBAC1B,eAAe,UAChB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,+BAAQ;IACrB,KAAK,CAAA,GAAA,2BAAI,EAAE;IACX,IAAI,WAAW,CAAC;QACd,IAAI,EAAE,WAAW,KAAK,cAAc,CAAA,GAAA,0DAA+B,EAAE,IACnE,QAAQ,eAAe,CAAC;aACnB;YACL,IAAI,QAAQ,aAAa,KAAK,QAC5B;YAGF,IAAI,QAAQ,MAAM,CAAC,MAAM;gBACvB,IAAI,iBAAiB,eAAe,IAAI,OAAO,EAAE;oBAC/C,IAAI,YAAY,QAAQ,YAAY,CAAC;oBACrC,OAAO,IAAI,CAAC,IAAI,OAAO,EAAE,GAAG,UAAU,IAAI,EAAE,UAAU,aAAa;oBACnE,qFAAqF;oBACrF,QAAQ,eAAe,CAAC,QAAQ,YAAY;oBAC5C;gBACF,OAAO,IAAI,iBAAiB,cAAc,iBAAiB,QACzD;YAEJ;YAEA,IAAI,QAAQ,aAAa,KAAK;gBAC5B,IAAI,QAAQ,UAAU,CAAC,QAAQ,CAAC,QAAQ,sBAAsB,EAC5D,QAAQ,eAAe,CAAC;qBAExB,QAAQ,gBAAgB,CAAC;mBAEtB,IAAI,KAAK,EAAE,QAAQ,EACxB,QAAQ,eAAe,CAAC;iBACnB,IAAI,QAAQ,iBAAiB,KAAK,YAAa,KAAM,CAAA,CAAA,GAAA,sCAAe,EAAE,MAAM,EAAE,WAAW,KAAK,WAAW,EAAE,WAAW,KAAK,SAAQ,GACxI,wIAAwI;YACxI,QAAQ,eAAe,CAAC;iBAExB,QAAQ,gBAAgB,CAAC;QAE7B;IACF;IAEA,sEAAsE;IACtE,+EAA+E;IAC/E,qGAAqG;IACrG,8EAA8E;IAC9E,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,YAAY,QAAQ,QAAQ,UAAU;QAC1C,IAAI,aAAa,QAAQ,SAAS;YAChC,IAAI,CAAC,uBAAuB;gBAC1B,IAAI,OACF;qBACK,IAAI,SAAS,aAAa,KAAK,IAAI,OAAO,IAAI,IAAI,OAAO,EAC9D,CAAA,GAAA,wCAAU,EAAE,IAAI,OAAO;YAE3B,OACE,CAAA,GAAA,sCAAe,EAAE,IAAI,OAAO;;IAGlC,uDAAuD;IACvD,GAAG;QAAC;QAAK;QAAK,QAAQ,UAAU;QAAE,QAAQ,kBAAkB;QAAE,QAAQ,SAAS;QAAE;KAAsB;IAEvG,aAAa,cAAc,QAAQ,UAAU,CAAC;IAC9C,6FAA6F;IAC7F,2FAA2F;IAC3F,mEAAmE;IACnE,IAAI,YAA6C,CAAC;IAClD,IAAI,CAAC,yBAAyB,CAAC,YAC7B,YAAY;QACV,UAAU,QAAQ,QAAQ,UAAU,GAAG,IAAI;QAC3C,SAAQ,CAAC;YACP,IAAI,EAAE,MAAM,KAAK,IAAI,OAAO,EAC1B,QAAQ,aAAa,CAAC;QAE1B;IACF;SACK,IAAI,YACT,UAAU,WAAW,GAAG,CAAC;QACvB,oEAAoE;QACpE,EAAE,cAAc;IAClB;IAGF,gHAAgH;IAChH,wHAAwH;IACxH,6GAA6G;IAC7G,mFAAmF;IACnF,IAAI,iBAAiB,QAAQ,MAAM,CAAC,QAAQ,iBAAiB;IAC7D,IAAI,mBAAmB,YAAY,OAAO,CAAC,wBAAwB,KAAK;IACxE,IAAI,gBAAgB,QAAQ,MAAM,CAAC,QAAQ,iBAAiB,eAAe,iBAAiB;IAC5F,IAAI,kBAAkB,CAAC,cAAc,QAAQ,aAAa,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IACvF,IAAI,gBAAgB,AAAC,CAAA,YAAY,aAAY,KAAM,CAAC;IACpD,IAAI,mBAAmB,iBACrB,CAAA,QAAQ,iBAAiB,KAAK,YAC1B,CAAC,kBACD,CAAC,mBAAmB,QAAQ,OAAO,AAAD;IAExC,IAAI,qBAAqB,iBAAiB,mBAAmB,QAAQ,iBAAiB,KAAK;IAC3F,IAAI,YAAY,oBAAoB;IACpC,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAsB;IAE1C,IAAI,mBAAmB,aAAa;IACpC,IAAI,+BAA+B,CAAA,GAAA,mBAAK,EAAE;IAC1C,IAAI,+BAA+B,CAAA,GAAA,mBAAK,EAAE;IAC1C,IAAI,sBAAsB,QAAQ,YAAY,CAAC;IAE/C,IAAI,gBAAgB,CAAC;QACnB,IAAI,UAAU;gBAEZ;YADA;aACA,eAAA,IAAI,OAAO,cAAX,mCAAA,aAAa,aAAa,CAAC,IAAI,YAAY,0BAA0B;gBAAC,SAAS;YAAI;QACrF;QAEA,IAAI,iBAAiB,IAAI,OAAO,EAC9B,OAAO,IAAI,CAAC,IAAI,OAAO,EAAE,GAAG,oBAAoB,IAAI,EAAE,oBAAoB,aAAa;IAE3F;IAEA,oFAAoF;IACpF,4DAA4D;IAC5D,8EAA8E;IAC9E,sFAAsF;IACtF,qFAAqF;IACrF,0EAA0E;IAC1E,2DAA2D;IAC3D,IAAI,iBAAiC;aAAC;IAAG;IACzC,IAAI,uBAAuB;QACzB,eAAe,YAAY,GAAG,CAAC;YAC7B,SAAS,OAAO,GAAG,EAAE,WAAW;YAChC,6BAA6B,OAAO,GAAG;YACvC,IAAI,EAAE,WAAW,KAAK,cAAe,CAAA,CAAC,aAAa,sCAAe,GAChE,SAAS;QAEb;QAEA,yKAAyK;QACzK,+HAA+H;QAC/H,IAAI,CAAC,4BACH,eAAe,OAAO,GAAG,CAAC;YACxB,IAAI,oBAAqB,sBAAsB,EAAE,WAAW,KAAK,SAAU;gBACzE,IAAI,EAAE,WAAW,KAAK,cAAc,CAAC,qCACnC;gBAGF,cAAc;YAChB,OAAO,IAAI,EAAE,WAAW,KAAK,cAAc,iBACzC,SAAS;QAEb;aACK;YACL,eAAe,SAAS,GAAG,mBAAmB,YAAY,CAAC;gBACzD,IAAI,EAAE,WAAW,KAAK,WAAW,iBAC/B,SAAS;YAEb;YAEA,eAAe,OAAO,GAAG,mBAAmB,gBAAgB,CAAC;gBAC3D,IAAI,EAAE,WAAW,KAAK,cAAc,EAAE,WAAW,KAAK,WAAW,iBAC/D,SAAS;YAEb;QACF;IACF,OAAO;QACL,eAAe,YAAY,GAAG,CAAC;YAC7B,SAAS,OAAO,GAAG,EAAE,WAAW;YAChC,6BAA6B,OAAO,GAAG;YACvC,6BAA6B,OAAO,GAAG;YAEvC,sFAAsF;YACtF,8FAA8F;YAC9F,iDAAiD;YACjD,IACE,mBACE,CAAA,AAAC,EAAE,WAAW,KAAK,WAAW,CAAC,oBAC9B,EAAE,WAAW,KAAK,cAAe,CAAA,CAAC,iBAAiB,sCAAe,CAAE,GAGvE,SAAS;QAEb;QAEA,eAAe,OAAO,GAAG,CAAC;YACxB,4EAA4E;YAC5E,+EAA+E;YAC/E,kEAAkE;YAClE,IACE,EAAE,WAAW,KAAK,WAClB,EAAE,WAAW,KAAK,SAClB,EAAE,WAAW,KAAK,aACjB,EAAE,WAAW,KAAK,cAAc,aAAa,uCAC7C,EAAE,WAAW,KAAK,WAAW,6BAA6B,OAAO,EAClE;gBACA,IAAI,WACF,cAAc;qBACT,IAAI,iBACT,SAAS;YAEb;QACF;IACF;IAEA,SAAS,CAAC,kBAAkB,GAAG,CAAA,GAAA,yCAAc,EAAE,QAAQ,UAAU;IACjE,SAAS,CAAC,WAAW,GAAG;IACxB,eAAe,mBAAmB,GAAG;IAErC,6EAA6E;IAC7E,IAAI,uBACF,iBAAiB,CAAA,GAAA,gCAAS,EAAE,gBAAgB;QAC1C,cAAa,CAAC;YACZ,IAAI,EAAE,WAAW,KAAK,SAAS;gBAC7B,QAAQ,UAAU,CAAC;gBACnB,QAAQ,aAAa,CAAC;YACxB;QACF;QACA,SAAQ,CAAC;YACP,IAAI,EAAE,WAAW,KAAK,SAAS;gBAC7B,QAAQ,UAAU,CAAC;gBACnB,QAAQ,aAAa,CAAC;YACxB;QACF;IACF;IAGF,IAAI,qBAAqB;QACvB,KAAK,IAAI,OAAO;YAAC;YAAgB;YAAc;YAAiB;YAAW;YAAa;SAAU,CAChG,IAAI,mBAAmB,CAAC,IAAI,EAC1B,cAAc,CAAC,IAAI,GAAG,CAAA,GAAA,2BAAI,EAAE,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,IAAI;IAG/E;IAEA,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;IAEvC,sFAAsF;IACtF,IAAI,gBAAgB,qBAAqB,CAAC;QACxC,IAAI,SAAS,OAAO,KAAK,SAAS;YAChC,EAAE,eAAe;YACjB,EAAE,cAAc;YAChB,cAAc;QAChB;IACF,IAAI;IAEJ,sGAAsG;IACtG,mGAAmG;IACnG,4FAA4F;IAC5F,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW,EAAE;QAClC,YAAY,CAAC;QACb,aAAY,CAAC;YACX,IAAI,EAAE,WAAW,KAAK,SAAS;gBAC7B,SAAS;gBACT,QAAQ,oBAAoB,CAAC;YAC/B;QACF;IACF;IAEA,8EAA8E;IAC9E,yEAAyE;IACzE,6EAA6E;IAC7E,kCAAkC;IAClC,IAAI,qBAAqB,CAAA;QACvB,IAAI,SAAS,OAAO,KAAK,WAAW,6BAA6B,OAAO,EACtE,EAAE,cAAc;IAEpB;IAEA,4DAA4D;ILine truncated
@@ -0,0 +1,36 @@
{
"name": "damerau-levenshtein",
"version": "1.0.8",
"description": "Damerau - Levenshtein distance by The Spanish Inquisition + relative distance",
"main": "index.js",
"scripts": {
"test": "mocha --use_strict",
"version": "scripts/update-changelog.sh"
},
"keywords": [
"Damerau-Levenshtein",
"Damerau",
"Levenshtein",
"distance",
"compare",
"relative"
],
"author": "The Spanish Inquisition",
"contributors": [
"Tadeusz Łazurski (https://tad-lispy.com/)",
"Gustavo Marques Adolph",
"Ivan Gilchrist <github@jumpingfishes.com> (http://jumpingfishes.com)",
"Boris Yakubchik (http://dev.yboris.com/)"
],
"license": "BSD-2-Clause",
"devDependencies": {
"mocha": "^9.1.3"
},
"repository": {
"type": "git",
"url": "https://github.com/tad-lispy/node-damerau-levenshtein.git"
},
"bugs": {
"url": "https://github.com/tad-lispy/node-damerau-levenshtein/issues"
}
}
@@ -0,0 +1,12 @@
let postcss = require('postcss')
let parse = require('./parser')
let processResult = require('./process-result')
module.exports = function (plugins) {
let processor = postcss(plugins)
return input => {
let result = processor.process(input, { parser: parse, from: undefined })
return processResult(result)
}
}
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var BannerRole = {
relatedConcepts: [{
module: 'ARIA',
concept: {
name: 'banner'
}
}],
type: 'structure'
};
var _default = BannerRole;
exports.default = _default;
@@ -0,0 +1,53 @@
import type { Document } from '../doc/Document';
import type { ToJSOptions } from '../options';
import type { Token } from '../parse/cst';
import type { StringifyContext } from '../stringify/stringify';
import type { Alias } from './Alias';
import { NODE_TYPE } from './identity';
import type { Scalar } from './Scalar';
import type { ToJSContext } from './toJS';
import type { MapLike, YAMLMap } from './YAMLMap';
import type { YAMLSeq } from './YAMLSeq';
export type Node<T = unknown> = Alias | Scalar<T> | YAMLMap<unknown, T> | YAMLSeq<T>;
/** Utility type mapper */
export type NodeType<T> = T extends string | number | bigint | boolean | null | undefined ? Scalar<T> : T extends Date ? Scalar<string | Date> : T extends Array<any> ? YAMLSeq<NodeType<T[number]>> : T extends {
[key: string]: any;
} ? YAMLMap<NodeType<keyof T>, NodeType<T[keyof T]>> : T extends {
[key: number]: any;
} ? YAMLMap<NodeType<keyof T>, NodeType<T[keyof T]>> : Node;
export type ParsedNode = Alias.Parsed | Scalar.Parsed | YAMLMap.Parsed | YAMLSeq.Parsed;
/** `[start, value-end, node-end]` */
export type Range = [number, number, number];
export declare abstract class NodeBase {
readonly [NODE_TYPE]: symbol;
/** A comment on or immediately after this */
comment?: string | null;
/** A comment before this */
commentBefore?: string | null;
/**
* The `[start, value-end, node-end]` character offsets for the part of the
* source parsed into this node (undefined if not parsed). The `value-end`
* and `node-end` positions are themselves not included in their respective
* ranges.
*/
range?: Range | null;
/** A blank line before this node and its commentBefore */
spaceBefore?: boolean;
/** The CST token that was composed into this node. */
srcToken?: Token;
/** A fully qualified tag, if required */
tag?: string;
/**
* Customize the way that a key-value pair is resolved.
* Used for YAML 1.1 !!merge << handling.
*/
addToJSMap?: (ctx: ToJSContext | undefined, map: MapLike, value: unknown) => void;
/** A plain JS representation of this node */
abstract toJSON(): any;
abstract toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string;
constructor(type: symbol);
/** Create a copy of this node. */
clone(): NodeBase;
/** A plain JavaScript representation of this node. */
toJS(doc: Document<Node, boolean>, { mapAsMap, maxAliasCount, onAnchor, reviver }?: ToJSOptions): any;
}
@@ -0,0 +1,99 @@
"use strict"
const {
getPropertyName,
findVariable,
} = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
const LEGACY_ACCESSOR_METHODS = new Set([
"__defineGetter__",
"__defineSetter__",
"__lookupGetter__",
"__lookupSetter__",
])
module.exports = {
meta: {
docs: {
description: "disallow legacy `Object.prototype` accessor methods.",
category: "legacy",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-legacy-object-prototype-accessor-methods.html",
},
fixable: null,
messages: {
forbidden: "LEGACY '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
const reported = new Set()
function report(name, node) {
if (reported.has(node)) {
return
}
reported.add(node)
context.report({
node,
messageId: "forbidden",
data: {
name,
},
})
}
return {
MemberExpression(node) {
const name = getPropertyName(node)
if (!LEGACY_ACCESSOR_METHODS.has(name)) {
return
}
report(name, node.property)
},
Identifier(node) {
const name = node.name
if (!LEGACY_ACCESSOR_METHODS.has(name)) {
return
}
if (
node.parent.type === "MemberExpression" &&
node.parent.property === node
) {
// Already reported.
return
}
if (
node.parent.type === "Property" &&
!node.parent.shorthand &&
node.parent.key === node
) {
return
}
const sourceCode = getSourceCode(context)
const scopeManager = sourceCode.scopeManager
if (
// Not defined as global variables.
!scopeManager.globalScope.through.some(
({ identifier }) => identifier === node,
)
) {
const variable = findVariable(
sourceCode.getScope(node),
node,
)
if (!variable) {
return
}
// It is defined as global variables.
if (variable.defs.length) {
return
}
}
report(name, node)
},
}
},
}
@@ -0,0 +1,75 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var adjust_comments_on_sorted_nodes_1 = require("../adjust-comments-on-sorted-nodes");
var get_import_nodes_1 = require("../get-import-nodes");
function leadingComments(node) {
var _a, _b;
return (_b = (_a = node.leadingComments) === null || _a === void 0 ? void 0 : _a.map(function (c) { return c.value; })) !== null && _b !== void 0 ? _b : [];
}
function trailingComments(node) {
var _a, _b;
return (_b = (_a = node.trailingComments) === null || _a === void 0 ? void 0 : _a.map(function (c) { return c.value; })) !== null && _b !== void 0 ? _b : [];
}
test('it preserves the single leading comment for each import declaration', function () {
var importNodes = (0, get_import_nodes_1.getImportNodes)("\n import {x} from \"c\";\n // comment b\n import {y} from \"b\";\n // comment a\n import {z} from \"a\";\n ");
expect(importNodes).toHaveLength(3);
var finalNodes = [importNodes[2], importNodes[1], importNodes[0]];
(0, adjust_comments_on_sorted_nodes_1.adjustCommentsOnSortedNodes)(importNodes, finalNodes);
expect(finalNodes).toHaveLength(3);
expect(leadingComments(finalNodes[0])).toEqual([' comment a']);
expect(trailingComments(finalNodes[0])).toEqual([]);
expect(leadingComments(finalNodes[1])).toEqual([' comment b']);
expect(trailingComments(finalNodes[1])).toEqual([]);
expect(leadingComments(finalNodes[2])).toEqual([]);
expect(trailingComments(finalNodes[2])).toEqual([]);
});
test('it preserves multiple leading comments for each import declaration', function () {
var importNodes = (0, get_import_nodes_1.getImportNodes)("\n import {x} from \"c\";\n // comment b1\n // comment b2\n // comment b3\n import {y} from \"b\";\n // comment a1\n // comment a2\n // comment a3\n import {z} from \"a\";\n ");
expect(importNodes).toHaveLength(3);
var finalNodes = [importNodes[2], importNodes[1], importNodes[0]];
(0, adjust_comments_on_sorted_nodes_1.adjustCommentsOnSortedNodes)(importNodes, finalNodes);
expect(finalNodes).toHaveLength(3);
expect(leadingComments(finalNodes[0])).toEqual([
' comment a1',
' comment a2',
' comment a3',
]);
expect(trailingComments(finalNodes[0])).toEqual([]);
expect(leadingComments(finalNodes[1])).toEqual([
' comment b1',
' comment b2',
' comment b3',
]);
expect(trailingComments(finalNodes[1])).toEqual([]);
expect(leadingComments(finalNodes[2])).toEqual([]);
expect(trailingComments(finalNodes[2])).toEqual([]);
});
test('it does not move comments at before all import declarations', function () {
var importNodes = (0, get_import_nodes_1.getImportNodes)("\n // comment c1\n // comment c2\n import {x} from \"c\";\n import {y} from \"b\";\n import {z} from \"a\";\n ");
expect(importNodes).toHaveLength(3);
var finalNodes = [importNodes[2], importNodes[1], importNodes[0]];
(0, adjust_comments_on_sorted_nodes_1.adjustCommentsOnSortedNodes)(importNodes, finalNodes);
expect(finalNodes).toHaveLength(3);
expect(leadingComments(finalNodes[0])).toEqual([
' comment c1',
' comment c2',
]);
expect(trailingComments(finalNodes[0])).toEqual([]);
expect(leadingComments(finalNodes[1])).toEqual([]);
expect(trailingComments(finalNodes[1])).toEqual([]);
expect(leadingComments(finalNodes[2])).toEqual([]);
expect(trailingComments(finalNodes[2])).toEqual([]);
});
test('it does not affect comments after all import declarations', function () {
var importNodes = (0, get_import_nodes_1.getImportNodes)("\n import {x} from \"c\";\n import {y} from \"b\";\n import {z} from \"a\";\n // comment final 1\n // comment final 2\n ");
expect(importNodes).toHaveLength(3);
var finalNodes = [importNodes[2], importNodes[1], importNodes[0]];
(0, adjust_comments_on_sorted_nodes_1.adjustCommentsOnSortedNodes)(importNodes, finalNodes);
expect(finalNodes).toHaveLength(3);
expect(leadingComments(finalNodes[0])).toEqual([]);
expect(trailingComments(finalNodes[0])).toEqual([]);
expect(leadingComments(finalNodes[1])).toEqual([]);
expect(trailingComments(finalNodes[1])).toEqual([]);
expect(leadingComments(finalNodes[2])).toEqual([]);
expect(trailingComments(finalNodes[2])).toEqual([]);
});
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=exceptions.int.spec.d.ts.map
@@ -0,0 +1,8 @@
import { BindingScope } from './BindingScope';
import { bindingTypeValues } from './BindingType';
import { DynamicValueBuilder } from './DynamicValueBuilder';
import { ScopedBinding } from './ScopedBinding';
export interface DynamicValueBinding<TActivated> extends ScopedBinding<typeof bindingTypeValues.DynamicValue, BindingScope, TActivated> {
readonly value: DynamicValueBuilder<TActivated>;
}
//# sourceMappingURL=DynamicValueBinding.d.ts.map
@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react.react-server.production.js');
} else {
module.exports = require('./cjs/react.react-server.development.js');
}
@@ -0,0 +1,196 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
// Portions of the code in this file are based on code from ICU.
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
import {AnyCalendarDate, Calendar, CalendarIdentifier} from '../types';
import {CalendarDate} from '../CalendarDate';
import {Mutable} from '../utils';
const ETHIOPIC_EPOCH = 1723856;
const COPTIC_EPOCH = 1824665;
// The delta between Amete Alem 1 and Amete Mihret 1
// AA 5501 = AM 1
const AMETE_MIHRET_DELTA = 5500;
function ceToJulianDay(epoch: number, year: number, month: number, day: number): number {
return (
epoch // difference from Julian epoch to 1,1,1
+ 365 * year // number of days from years
+ Math.floor(year / 4) // extra day of leap year
+ 30 * (month - 1) // number of days from months (1 based)
+ day - 1 // number of days for present month (1 based)
);
}
function julianDayToCE(epoch: number, jd: number) {
let year = Math.floor((4 * (jd - epoch)) / 1461);
let month = 1 + Math.floor((jd - ceToJulianDay(epoch, year, 1, 1)) / 30);
let day = jd + 1 - ceToJulianDay(epoch, year, month, 1);
return [year, month, day];
}
function getLeapDay(year: number) {
return Math.floor((year % 4) / 3);
}
function getDaysInMonth(year: number, month: number) {
// The Ethiopian and Coptic calendars have 13 months, 12 of 30 days each and
// an intercalary month at the end of the year of 5 or 6 days, depending whether
// the year is a leap year or not. The Leap Year follows the same rules as the
// Julian Calendar so that the extra month always has six days in the year before
// a Julian Leap Year.
if (month % 13 !== 0) {
// not intercalary month
return 30;
} else {
// intercalary month 5 days + possible leap day
return getLeapDay(year) + 5;
}
}
/**
* The Ethiopic calendar system is the official calendar used in Ethiopia.
* It includes 12 months of 30 days each, plus 5 or 6 intercalary days depending
* on whether it is a leap year. Two eras are supported: 'AA' and 'AM'.
*/
export class EthiopicCalendar implements Calendar {
identifier: CalendarIdentifier = 'ethiopic';
fromJulianDay(jd: number): CalendarDate {
let [year, month, day] = julianDayToCE(ETHIOPIC_EPOCH, jd);
let era = 'AM';
if (year <= 0) {
era = 'AA';
year += AMETE_MIHRET_DELTA;
}
return new CalendarDate(this, era, year, month, day);
}
toJulianDay(date: AnyCalendarDate): number {
let year = date.year;
if (date.era === 'AA') {
year -= AMETE_MIHRET_DELTA;
}
return ceToJulianDay(ETHIOPIC_EPOCH, year, date.month, date.day);
}
getDaysInMonth(date: AnyCalendarDate): number {
return getDaysInMonth(date.year, date.month);
}
getMonthsInYear(): number {
return 13;
}
getDaysInYear(date: AnyCalendarDate): number {
return 365 + getLeapDay(date.year);
}
getYearsInEra(date: AnyCalendarDate): number {
// 9999-12-31 gregorian is 9992-20-02 ethiopic.
// Round down to 9991 for the last full year.
// AA 9999-01-01 ethiopic is 4506-09-30 gregorian.
return date.era === 'AA' ? 9999 : 9991;
}
getEras(): string[] {
return ['AA', 'AM'];
}
}
/**
* The Ethiopic (Amete Alem) calendar is the same as the modern Ethiopic calendar,
* except years were measured from a different epoch. Only one era is supported: 'AA'.
*/
export class EthiopicAmeteAlemCalendar extends EthiopicCalendar {
identifier: CalendarIdentifier = 'ethioaa'; // also known as 'ethiopic-amete-alem' in ICU
fromJulianDay(jd: number): CalendarDate {
let [year, month, day] = julianDayToCE(ETHIOPIC_EPOCH, jd);
year += AMETE_MIHRET_DELTA;
return new CalendarDate(this, 'AA', year, month, day);
}
getEras(): string[] {
return ['AA'];
}
getYearsInEra(): number {
// 9999-13-04 ethioaa is the maximum date, which is equivalent to 4506-09-29 gregorian.
return 9999;
}
}
/**
* The Coptic calendar is similar to the Ethiopic calendar.
* It includes 12 months of 30 days each, plus 5 or 6 intercalary days depending
* on whether it is a leap year. Two eras are supported: 'BCE' and 'CE'.
*/
export class CopticCalendar extends EthiopicCalendar {
identifier: CalendarIdentifier = 'coptic';
fromJulianDay(jd: number): CalendarDate {
let [year, month, day] = julianDayToCE(COPTIC_EPOCH, jd);
let era = 'CE';
if (year <= 0) {
era = 'BCE';
year = 1 - year;
}
return new CalendarDate(this, era, year, month, day);
}
toJulianDay(date: AnyCalendarDate): number {
let year = date.year;
if (date.era === 'BCE') {
year = 1 - year;
}
return ceToJulianDay(COPTIC_EPOCH, year, date.month, date.day);
}
getDaysInMonth(date: AnyCalendarDate): number {
let year = date.year;
if (date.era === 'BCE') {
year = 1 - year;
}
return getDaysInMonth(year, date.month);
}
isInverseEra(date: AnyCalendarDate): boolean {
return date.era === 'BCE';
}
balanceDate(date: Mutable<AnyCalendarDate>): void {
if (date.year <= 0) {
date.era = date.era === 'BCE' ? 'CE' : 'BCE';
date.year = 1 - date.year;
}
}
getEras(): string[] {
return ['BCE', 'CE'];
}
getYearsInEra(date: AnyCalendarDate): number {
// 9999-12-30 gregorian is 9716-02-20 coptic.
// Round down to 9715 for the last full year.
// BCE 9999-01-01 coptic is BC 9716-06-15 gregorian.
return date.era === 'BCE' ? 9999 : 9715;
}
}
@@ -0,0 +1,4 @@
// This file is for backward compatibility with v0.5.1.
require('./register')
console.warn("'json5/require' is deprecated. Please use 'json5/register' instead.")
@@ -0,0 +1,143 @@
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var Base = C_lib.Base;
var C_enc = C.enc;
var Utf8 = C_enc.Utf8;
var C_algo = C.algo;
/**
* HMAC algorithm.
*/
var HMAC = C_algo.HMAC = Base.extend({
/**
* Initializes a newly created HMAC.
*
* @param {Hasher} hasher The hash algorithm to use.
* @param {WordArray|string} key The secret key.
*
* @example
*
* var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
*/
init: function (hasher, key) {
// Init hasher
hasher = this._hasher = new hasher.init();
// Convert string to WordArray, else assume WordArray already
if (typeof key == 'string') {
key = Utf8.parse(key);
}
// Shortcuts
var hasherBlockSize = hasher.blockSize;
var hasherBlockSizeBytes = hasherBlockSize * 4;
// Allow arbitrary length keys
if (key.sigBytes > hasherBlockSizeBytes) {
key = hasher.finalize(key);
}
// Clamp excess bits
key.clamp();
// Clone key for inner and outer pads
var oKey = this._oKey = key.clone();
var iKey = this._iKey = key.clone();
// Shortcuts
var oKeyWords = oKey.words;
var iKeyWords = iKey.words;
// XOR keys with pad constants
for (var i = 0; i < hasherBlockSize; i++) {
oKeyWords[i] ^= 0x5c5c5c5c;
iKeyWords[i] ^= 0x36363636;
}
oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
// Set initial values
this.reset();
},
/**
* Resets this HMAC to its initial state.
*
* @example
*
* hmacHasher.reset();
*/
reset: function () {
// Shortcut
var hasher = this._hasher;
// Reset
hasher.reset();
hasher.update(this._iKey);
},
/**
* Updates this HMAC with a message.
*
* @param {WordArray|string} messageUpdate The message to append.
*
* @return {HMAC} This HMAC instance.
*
* @example
*
* hmacHasher.update('message');
* hmacHasher.update(wordArray);
*/
update: function (messageUpdate) {
this._hasher.update(messageUpdate);
// Chainable
return this;
},
/**
* Finalizes the HMAC computation.
* Note that the finalize operation is effectively a destructive, read-once operation.
*
* @param {WordArray|string} messageUpdate (Optional) A final message update.
*
* @return {WordArray} The HMAC.
*
* @example
*
* var hmac = hmacHasher.finalize();
* var hmac = hmacHasher.finalize('message');
* var hmac = hmacHasher.finalize(wordArray);
*/
finalize: function (messageUpdate) {
// Shortcut
var hasher = this._hasher;
// Compute HMAC
var innerHash = hasher.finalize(messageUpdate);
hasher.reset();
var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));
return hmac;
}
});
}());
}));
@@ -0,0 +1,38 @@
import arrayPush from './_arrayPush.js';
import isFlattenable from './_isFlattenable.js';
/**
* The base implementation of `_.flatten` with support for restricting flattening.
*
* @private
* @param {Array} array The array to flatten.
* @param {number} depth The maximum recursion depth.
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
* @param {Array} [result=[]] The initial result value.
* @returns {Array} Returns the new flattened array.
*/
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1,
length = array.length;
predicate || (predicate = isFlattenable);
result || (result = []);
while (++index < length) {
var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
// Recursively flatten arrays (susceptible to call stack limits).
baseFlatten(value, depth - 1, predicate, isStrict, result);
} else {
arrayPush(result, value);
}
} else if (!isStrict) {
result[result.length] = value;
}
}
return result;
}
export default baseFlatten;
@@ -0,0 +1,49 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $SyntaxError = require('es-errors/syntax');
var getGlobalSymbolDescription = GetIntrinsic('%Symbol.keyFor%', true);
/** @type {undefined | ((thisArg: symbol | Symbol) => symbol)} */
var thisSymbolValue = callBound('%Symbol.prototype.valueOf%', true);
/** @type {undefined | ((thisArg: symbol | Symbol) => string)} */
var symToStr = callBound('Symbol.prototype.toString', true);
/** @type {(thisArg: string, start?: number, end?: number) => string} */
var $strSlice = callBound('String.prototype.slice');
var getInferredName = require('./getInferredName');
/** @type {import('.')} */
/* eslint-disable consistent-return */
module.exports = callBound('%Symbol.prototype.description%', true) || function getSymbolDescription(symbol) {
if (!thisSymbolValue) {
throw new $SyntaxError('Symbols are not supported in this environment');
}
// will throw if not a symbol primitive or wrapper object
var sym = thisSymbolValue(symbol);
if (getInferredName) {
var name = getInferredName(sym);
if (name === '') {
return;
}
return name.slice(1, -1); // name.slice('['.length, -']'.length);
}
var desc;
if (getGlobalSymbolDescription) {
desc = getGlobalSymbolDescription(sym);
if (typeof desc === 'string') {
return desc;
}
}
// eslint-disable-next-line no-extra-parens
desc = $strSlice(/** @type {NonNullable<typeof symToStr>} */ (symToStr)(sym), 7, -1); // str.slice('Symbol('.length, -')'.length);
if (desc) {
return desc;
}
};
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC;AAkBM,SAAS,0CAAqB,KAAsB,EAAE,KAAoB,EAAE,GAA8B;IAC/G,IAAI,QAAC,IAAI,iBAAE,aAAa,EAAC,GAAG;IAC5B,IAAI,WAAW;QACb,MAAM;IACR;IAEA,IAAI,iBAAiB,CAAE,CAAA,CAAA,GAAA,sBAAc,OAAO,kBAAkB,KAAI,GAChE,QAAQ,CAAC,gBAAgB,GAAG,KAAK,KAAK,GAAG,GAAG,2BAA2B;IAGzE,OAAO;kBACL;IACF;AACF","sources":["packages/@react-aria/table/src/useTableHeaderRow.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 {DOMAttributes, RefObject} from '@react-types/shared';\nimport {GridRowProps} from '@react-aria/grid';\nimport {tableNestedRows} from '@react-stately/flags';\nimport {TableState} from '@react-stately/table';\n\nexport interface TableHeaderRowAria {\n /** Props for the grid row element. */\n rowProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a header row in a table.\n * @param props - Props for the row.\n * @param state - State of the table, as returned by `useTableState`.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function useTableHeaderRow<T>(props: GridRowProps<T>, state: TableState<T>, ref: RefObject<Element | null>): TableHeaderRowAria {\n let {node, isVirtualized} = props;\n let rowProps = {\n role: 'row'\n };\n\n if (isVirtualized && !(tableNestedRows() && 'expandedKeys' in state)) {\n rowProps['aria-rowindex'] = node.index + 1; // aria-rowindex is 1 based\n }\n\n return {\n rowProps\n };\n}\n"],"names":[],"version":3,"file":"useTableHeaderRow.module.js.map"}
@@ -0,0 +1 @@
{"mappings":";;AAiBA;IACE;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAErC;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAElD;;;;OAIG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtD;;;OAGG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACxC;;;;OAIG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C;;;;OAIG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAEjD;;;OAGG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAEvC;;;OAGG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAEvC;;;OAGG;IACH,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1C;;;OAGG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzC;;;OAGG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAExC;;;OAGG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAExC;;;OAGG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzC;;;OAGG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IAExC;;;;OAIG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvD;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvD;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,qCAAqC;IACrC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAElC,sCAAsC;IACtC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;CAC7B;AAMD,oCAAoC,CAAC,CAAE,SAAQ,YAAY,CAAC,CAAC;IAC3D,eAAe,EAAE,KAAK,YAAY,CAAA;CACnC;AAED;;;;;GAKG;AACH,+BAA+B,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC,GAAG,WAAW,CAwJrG","sources":["packages/@react-stately/slider/src/packages/@react-stately/slider/src/useSliderState.ts","packages/@react-stately/slider/src/packages/@react-stately/slider/src/index.ts","packages/@react-stately/slider/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useSliderState} from './useSliderState';\n\nexport type {SliderStateOptions} from './useSliderState';\nexport type {SliderState} from './useSliderState';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -0,0 +1,2 @@
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"regExpExecOverStringMatch", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,22 @@
import { TypeBoxError } from '../../type/error/index.mjs';
import { ValueError } from '../../errors/index.mjs';
import type { TSchema } from '../../type/schema/index.mjs';
export declare class TransformDecodeCheckError extends TypeBoxError {
readonly schema: TSchema;
readonly value: unknown;
readonly error: ValueError;
constructor(schema: TSchema, value: unknown, error: ValueError);
}
export declare class TransformDecodeError extends TypeBoxError {
readonly schema: TSchema;
readonly path: string;
readonly value: unknown;
readonly error: Error;
constructor(schema: TSchema, path: string, value: unknown, error: Error);
}
/**
* `[Internal]` Decodes the value and returns the result. This function requires that
* the caller `Check` the value before use. Passing unchecked values may result in
* undefined behavior. Refer to the `Value.Decode()` for implementation details.
*/
export declare function TransformDecode(schema: TSchema, references: TSchema[], value: unknown): unknown;
@@ -0,0 +1,16 @@
import baseForRight from './_baseForRight.js';
import keys from './keys.js';
/**
* The base implementation of `_.forOwnRight` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwnRight(object, iteratee) {
return object && baseForRight(object, iteratee, keys);
}
export default baseForOwnRight;
@@ -0,0 +1,29 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
test("type guard", () => {
const stringToNumber = z.string().transform((arg) => arg.length);
const s1 = z.object({
stringToNumber,
});
type t1 = z.input<typeof s1>;
const data = { stringToNumber: "asdf" };
const parsed = s1.safeParse(data);
if (parsed.success) {
util.assertEqual<typeof data, t1>(true);
}
});
test("test this binding", () => {
const callback = (predicate: (val: string) => boolean) => {
return predicate("hello");
};
expect(callback((value) => z.string().safeParse(value).success)).toBe(true); // true
expect(callback((value) => z.string().safeParse(value).success)).toBe(true); // true
});
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,eAAe,CAAC,iCAAK,CAAC;AAC1C","sources":["packages/@react-aria/breadcrumbs/intl/ko-KR.json"],"sourcesContent":["{\n \"breadcrumbs\": \"탐색 표시\"\n}\n"],"names":[],"version":3,"file":"ko-KR.main.js.map"}
@@ -0,0 +1 @@
{"name":"@heroui/accordion","version":"2.2.24","requiresBuild":false,"files":{"dist/base/accordion-item-base.js":{"checkedAt":1794532104092,"integrity":"sha512-X0Iv5GRvpspEzT7uWK8DHbPallEMIshkcBIQTB6ibBYjkUMXJ8MOiwexWqf/WBNEBt2TXxjkbSpm5ZLD606uKw==","mode":420,"size":1197},"dist/accordion-item.js":{"checkedAt":1794532104092,"integrity":"sha512-Bd/sYVQgJlqTL0xXix5cPlmuVSaVEppZZv6KzGitKHpLjsGF7X19Cyt5zeGQ1lbwkKFR0xHybC/M9GqSBbIa0Q==","mode":420,"size":14399},"dist/accordion.js":{"checkedAt":1794532104092,"integrity":"sha512-9S4O4rnfmeb/hdHWalcx2z8YA+8DnF2IdetwocyPL8NlV52qq9nHNQTRAbdoH/Acys/1D+Mx4IRQHsGVnybRPw==","mode":420,"size":20799},"dist/index.js":{"checkedAt":1794532104093,"integrity":"sha512-/PhpzN04p8VwoL8PxgSrNZYoRN0zgHuy0gTqyRGyghKGrp8upDLPmpjZLBa6ya6MzI++jBh39Zkl3YN6S+TA1Q==","mode":420,"size":21291},"dist/use-accordion-item.js":{"checkedAt":1794532104093,"integrity":"sha512-qYTJfT1FRyYcvXw1beEFSLyA1f/8CoRFhWzYHX+08P9W5HMPktgXF6IpVS0DZOw5Vw5CG2B9ywUz88h9vCc05g==","mode":420,"size":9236},"dist/use-accordion.js":{"checkedAt":1794532104093,"integrity":"sha512-+ll2Z7KA6qiEehWOiMID2Vz2IRQ3dbhuzurjOEwhha2pbIvWTuUfZOh0JFvBb9+ru9wSFDKx+xEXH+KuR7l/Iw==","mode":420,"size":6060},"package.json":{"checkedAt":1794532104093,"integrity":"sha512-Qlo0kVjYTAxy9iY1ZZZnhXWOOtnh/uxIZg7qaEObzM8NXonTXgD/DpOGEjGIFd6deB1+SfX5Sxy1ZRVSLNNMZQ==","mode":420,"size":1991},"README.md":{"checkedAt":1794532104093,"integrity":"sha512-CzUgnSardpjK15lBXNT9XnPN2dT8HfrgiDl4C5ZjRqqjFzG/xgbI5IjzR5Q4gw2TPm4c1r+LDSV0owt9t3PS/w==","mode":420,"size":592},"dist/base/accordion-item-base.mjs":{"checkedAt":1794532104093,"integrity":"sha512-lN1fx1fWTXUsgbjOG5Kh4fqqmzzbLA0VH+p0sBcej+5nUVF7s1PBMflBQDsOrVFNGqXrGHkG/WiGzvQ5oNLtGg==","mode":420,"size":138},"dist/accordion-item.mjs":{"checkedAt":1794532104094,"integrity":"sha512-1U5Og+3Ls7/VD7PIoitt1UBLHvGk/q36eGpgwY68Z3U/zYmTJgDj4I0GpJAjdQIFxUhR9AoOuU5alh5qxI8lyA==","mode":420,"size":158},"dist/accordion.mjs":{"checkedAt":1794532104094,"integrity":"sha512-pVQIMzutCWzdR5tasShpWTr9Nl9x9csQZyEhvHczpaxWH7mMscfO3aXe7t9naUD6EVWBf89er2RpdkdSmssNNA==","mode":420,"size":210},"dist/chunk-CI6JLEHY.mjs":{"checkedAt":1794532104094,"integrity":"sha512-Oy7JBP7fEC1oW0ifhYogBUNCXHEVTHRhYMdG+zG2vgbN1H42FsUFgJjSzYlrtpsV2HUIu1UYeT+Bud7Xi5QCQQ==","mode":420,"size":4054},"dist/chunk-E5ZPQ6WL.mjs":{"checkedAt":1794532104094,"integrity":"sha512-3ztTMgDGxtQemYeD1eCkUh2RaSUGjIGOGUjWAqcusPM0kYRH4OTO/5M00Fw/+HiWfdpB7kdvs9EaxMgcugmQKw==","mode":420,"size":4097},"dist/chunk-HAJUSXOG.mjs":{"checkedAt":1794532104094,"integrity":"sha512-qVFCcFbrgkgK5EFRyfnF4Opsl+ozxxMfefTQut0SA4E6CPTx7a49FsXyr8bkchJCsXllsg1zb5twgr142/y2Nw==","mode":420,"size":228},"dist/chunk-P43IVKP7.mjs":{"checkedAt":1794532104094,"integrity":"sha512-YrEbOoiISIcLNa9PBem/2/TlySF5xDdc3G3FFgBsN1Mye5LZ85KENhblnPipguGbGug7R1tfzHAC5Ko5ngHtGg==","mode":420,"size":1889},"dist/chunk-S4YBHMUB.mjs":{"checkedAt":1794532104095,"integrity":"sha512-sgdJC+7qpWQpxy81+tSS4vo0imfO3FDDpgbpau+6f9ZT9lQ/3Noy+KjulIgPptbnf0u5zJzi0sAw+grMzUgpfg==","mode":420,"size":7223},"dist/index.mjs":{"checkedAt":1794532104095,"integrity":"sha512-oux88dbgyqY1hHgnCynyTxDNWGLYaGfxiadJ3/Djh/5m8yUsgJ8gmG6bVQKpj+ezchV212ZP2jRVE4L5uUHTvg==","mode":420,"size":418},"dist/use-accordion-item.mjs":{"checkedAt":1794532104095,"integrity":"sha512-HDHGuI0zyBrbCHLCWusWf6gNdC0TLp9PcCy0RzcncAWUVdSOQl0r36DCx5mnfEAfZWQb+yTqU/x8bClgOPzgnw==","mode":420,"size":104},"dist/use-accordion.mjs":{"checkedAt":1794532104095,"integrity":"sha512-Nf2eSzVeNSUwt0JQxL0tRs6NMTdJQGULt4GqtqpHWoLDU8b//IYm9/EvAkWvXyzwzh/OQmLbse+O0pGvjLt9wg==","mode":420,"size":96},"dist/base/accordion-item-base.d.mts":{"checkedAt":1794532104095,"integrity":"sha512-GnlUmQzjGUBHVdezOZUTkvV0ZKaTodLSEKZ65ow8vo7O/ZnW64p94qyf/IFDBmh9DnJnKTPsvWhNuFvzpQVp/A==","mode":420,"size":3219},"dist/accordion-item.d.mts":{"checkedAt":1794532104095,"integrity":"sha512-5SdeRiS99j1vTvB6rsAM/SzFcSjcXslvqIvxkjutkzsEPhCUIIlxSoxcAw+okzQSWrmIxNDoK2L63MBnhcy4cA==","mode":420,"size":610},"dist/accordion.d.mts":{"checkedAt":1794532104095,"integrity":"sha512-o1DXHGTpxEIhkRD2LVi9ylgQVRz5pyO9TshoFgo6iUSDIZAbZzR+yQ8rdGKBNPqpOkrco9m7tjxGF1SWBbiX1g==","mode":420,"size":709},"dist/index.d.mts":{"checkedAt":1794532104095,"integrity":"sha512-sAutpFIR4hNdnoy2hXh7jnsgYv7WzkRDLo/2EQUI1ev0IzVLrfDmvf7kVhl/R+Bly+FykD+m/7AjnipP7u3ekA==","mode":420,"size":661},"dist/use-accordion-item.d.mts":{"checkedAt":1794532104096,"integrity":"sha512-Dl3i24JByaaIh1ICNH1IYnw5vvv3XT/l/PsxncechW4dZe0BrH9B8T/7iqFN+h7TZD/OjXFPneZ1AoQ88QzmpA==","mode":420,"size":13047},"dist/use-accordion.d.mts":{"checkedAt":1794532104096,"integrity":"sha512-nmxeiScu4QyCvs2IPZKaKQV2fLb8l740HCRZRZel0ZGl8RqtqsV3GcIOww1SET//hQcajS6tlKuOi3IFszDxQg==","mode":420,"size":3034},"dist/base/accordion-item-base.d.ts":{"checkedAt":1794532104095,"integrity":"sha512-GnlUmQzjGUBHVdezOZUTkvV0ZKaTodLSEKZ65ow8vo7O/ZnW64p94qyf/IFDBmh9DnJnKTPsvWhNuFvzpQVp/A==","mode":420,"size":3219},"dist/accordion-item.d.ts":{"checkedAt":1794532104096,"integrity":"sha512-7RQrLine truncated
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_construct.cjs",
"module": "../../esm/_construct.js"
}
@@ -0,0 +1,19 @@
Copyright (c) 2017, The xterm.js authors (https://github.com/xtermjs/xterm.js)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,54 @@
{
"name": "@ungap/structured-clone",
"version": "1.3.0",
"description": "A structuredClone polyfill",
"main": "./cjs/index.js",
"scripts": {
"build": "npm run cjs && npm run rollup:json && npm run test",
"cjs": "ascjs esm cjs",
"coverage": "c8 report --reporter=text-lcov > ./coverage/lcov.info",
"rollup:json": "rollup --config rollup/json.config.js",
"test": "c8 node test/index.js"
},
"keywords": [
"recursion",
"structured",
"clone",
"algorithm"
],
"author": "Andrea Giammarchi",
"license": "ISC",
"devDependencies": {
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-terser": "^0.4.4",
"ascjs": "^6.0.3",
"c8": "^10.1.3",
"coveralls": "^3.1.1",
"rollup": "^4.31.0"
},
"module": "./esm/index.js",
"type": "module",
"sideEffects": false,
"exports": {
".": {
"import": "./esm/index.js",
"default": "./cjs/index.js"
},
"./json": {
"import": "./esm/json.js",
"default": "./cjs/json.js"
},
"./package.json": "./package.json"
},
"directories": {
"test": "test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ungap/structured-clone.git"
},
"bugs": {
"url": "https://github.com/ungap/structured-clone/issues"
},
"homepage": "https://github.com/ungap/structured-clone#readme"
}
@@ -0,0 +1,5 @@
export interface InjectFromBaseOptionsLifecycle {
extendPreDestroyMethods?: boolean | undefined;
extendPostConstructMethods?: boolean | undefined;
}
//# sourceMappingURL=InjectFromBaseOptionsLifecycle.d.ts.map
@@ -0,0 +1,33 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const Pattern = /^0[bB]/u
module.exports = {
meta: {
docs: {
description: "disallow binary numeric literals.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-binary-numeric-literals.html",
},
fixable: null,
messages: {
forbidden: "ES2015 binary numeric literals are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
Literal(node) {
if (typeof node.value === "number" && Pattern.test(node.raw)) {
context.report({ node, messageId: "forbidden" })
}
},
}
},
}
@@ -0,0 +1,65 @@
// based on @types/postcss-load-config@2.0.1
// Type definitions for postcss-load-config 2.1
import Processor from 'postcss/lib/processor'
import { Plugin, ProcessOptions, Transformer } from 'postcss'
import { Options as ConfigOptions } from 'lilconfig'
declare function postcssrc(
ctx?: postcssrc.ConfigContext,
path?: string,
options?: ConfigOptions
): Promise<postcssrc.Result>
declare namespace postcssrc {
// In the ConfigContext, these three options can be instances of the
// appropriate class, or strings. If they are strings, postcss-load-config will
// require() them and pass the instances along.
export interface ProcessOptionsPreload {
parser?: string | ProcessOptions['parser']
stringifier?: string | ProcessOptions['stringifier']
syntax?: string | ProcessOptions['syntax']
}
// The remaining ProcessOptions, sans the three above.
export type RemainingProcessOptions = Pick<
ProcessOptions,
Exclude<keyof ProcessOptions, keyof ProcessOptionsPreload>
>
// Additional context options that postcss-load-config understands.
export interface Context {
cwd?: string
env?: string
}
// The full shape of the ConfigContext.
export type ConfigContext = Context &
ProcessOptionsPreload &
RemainingProcessOptions
// Result of postcssrc is a Promise containing the filename plus the options
// and plugins that are ready to pass on to postcss.
export type ResultPlugin = Plugin | Transformer | Processor
export interface Result {
file: string
options: ProcessOptions
plugins: ResultPlugin[]
}
export type ConfigPlugin = Transformer | Plugin | Processor
export interface Config {
parser?: string | ProcessOptions['parser'] | false
stringifier?: string | ProcessOptions['stringifier'] | false
syntax?: string | ProcessOptions['syntax'] | false
map?: string | false
from?: string
to?: string
plugins?: Array<ConfigPlugin | false> | Record<string, object | false>
}
export type ConfigFn = (ctx: ConfigContext) => Config | Promise<Config>
}
export = postcssrc
@@ -0,0 +1,129 @@
import { test } from "vitest";
import * as z from "zod/v4-mini";
test("assignability", () => {
// $ZodString
z.string() satisfies z.core.$ZodString;
// $ZodNumber
z.number() satisfies z.core.$ZodNumber;
// $ZodBigInt
z.bigint() satisfies z.core.$ZodBigInt;
// $ZodBoolean
z.boolean() satisfies z.core.$ZodBoolean;
// $ZodDate
z.date() satisfies z.core.$ZodDate;
// $ZodSymbol
z.symbol() satisfies z.core.$ZodSymbol;
// $ZodUndefined
z.undefined() satisfies z.core.$ZodUndefined;
// $ZodNullable
z.nullable(z.string()) satisfies z.core.$ZodNullable;
// $ZodNull
z.null() satisfies z.core.$ZodNull;
// $ZodAny
z.any() satisfies z.core.$ZodAny;
// $ZodUnknown
z.unknown() satisfies z.core.$ZodUnknown;
// $ZodNever
z.never() satisfies z.core.$ZodNever;
// $ZodVoid
z.void() satisfies z.core.$ZodVoid;
// $ZodArray
z.array(z.string()) satisfies z.core.$ZodArray;
// $ZodObject
z.object({ key: z.string() }) satisfies z.core.$ZodObject;
// $ZodUnion
z.union([z.string(), z.number()]) satisfies z.core.$ZodUnion;
// $ZodIntersection
z.intersection(z.string(), z.number()) satisfies z.core.$ZodIntersection;
// $ZodTuple
z.tuple([z.string(), z.number()]) satisfies z.core.$ZodTuple;
// $ZodRecord
z.record(z.string(), z.number()) satisfies z.core.$ZodRecord;
// $ZodMap
z.map(z.string(), z.number()) satisfies z.core.$ZodMap;
// $ZodSet
z.set(z.string()) satisfies z.core.$ZodSet;
// $ZodLiteral
z.literal("example") satisfies z.core.$ZodLiteral;
// $ZodEnum
z.enum(["a", "b", "c"]) satisfies z.core.$ZodEnum;
// $ZodPromise
z.promise(z.string()) satisfies z.core.$ZodPromise;
// $ZodLazy
const lazySchema = z.lazy(() => z.string());
lazySchema satisfies z.core.$ZodLazy;
// $ZodOptional
z.optional(z.string()) satisfies z.core.$ZodOptional;
// $ZodDefault
z._default(z.string(), "default") satisfies z.core.$ZodDefault;
// $ZodTemplateLiteral
z.templateLiteral([z.literal("a"), z.literal("b")]) satisfies z.core.$ZodTemplateLiteral;
// $ZodCustom
z.custom<string>((val) => typeof val === "string") satisfies z.core.$ZodCustom;
// $ZodTransform
z.transform((val) => val as string) satisfies z.core.$ZodTransform;
// $ZodNonOptional
z.nonoptional(z.optional(z.string())) satisfies z.core.$ZodNonOptional;
// $ZodReadonly
z.readonly(z.object({ key: z.string() })) satisfies z.core.$ZodReadonly;
// $ZodNaN
z.nan() satisfies z.core.$ZodNaN;
// $ZodPipe
z.pipe(z.unknown(), z.number()) satisfies z.core.$ZodPipe;
// $ZodSuccess
z.success(z.string()) satisfies z.core.$ZodSuccess;
// $ZodCatch
z.catch(z.string(), "fallback") satisfies z.core.$ZodCatch;
// $ZodFile
z.file() satisfies z.core.$ZodFile;
});
test("assignability with type narrowing", () => {
type _RefinedSchema<T extends z.ZodMiniType<object> | z.ZodMiniUnion> = T extends z.ZodMiniUnion
? RefinedUnionSchema<T> // <-- Type instantiation is excessively deep and possibly infinite.
: T extends z.ZodMiniType<object>
? RefinedTypeSchema<z.output<T>> // <-- Type instantiation is excessively deep and possibly infinite.
: never;
type RefinedTypeSchema<T extends object> = T;
type RefinedUnionSchema<T extends z.ZodMiniUnion> = T;
});
@@ -0,0 +1,44 @@
# simple-concat [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
[travis-image]: https://img.shields.io/travis/feross/simple-concat/master.svg
[travis-url]: https://travis-ci.org/feross/simple-concat
[npm-image]: https://img.shields.io/npm/v/simple-concat.svg
[npm-url]: https://npmjs.org/package/simple-concat
[downloads-image]: https://img.shields.io/npm/dm/simple-concat.svg
[downloads-url]: https://npmjs.org/package/simple-concat
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
[standard-url]: https://standardjs.com
### Super-minimalist version of [`concat-stream`](https://github.com/maxogden/concat-stream). Less than 15 lines!
## install
```
npm install simple-concat
```
## usage
This example is longer than the implementation.
```js
var s = new stream.PassThrough()
concat(s, function (err, buf) {
if (err) throw err
console.error(buf)
})
s.write('abc')
setTimeout(function () {
s.write('123')
}, 10)
setTimeout(function () {
s.write('456')
}, 20)
setTimeout(function () {
s.end('789')
}, 30)
```
## license
MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org).
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","isSpecifierDefault","specifier","isImportDefaultSpecifier","isIdentifier","imported","exported","name"],"sources":["../../src/validators/isSpecifierDefault.ts"],"sourcesContent":["import { isIdentifier, isImportDefaultSpecifier } from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `specifier` is a `default` import or export.\n */\nexport default function isSpecifierDefault(\n specifier: t.ModuleSpecifier,\n): boolean {\n return (\n isImportDefaultSpecifier(specifier) ||\n // @ts-expect-error todo(flow->ts): stricter type for specifier\n isIdentifier(specifier.imported || specifier.exported, {\n name: \"default\",\n })\n );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMe,SAASC,kBAAkBA,CACxCC,SAA4B,EACnB;EACT,OACE,IAAAC,+BAAwB,EAACD,SAAS,CAAC,IAEnC,IAAAE,mBAAY,EAACF,SAAS,CAACG,QAAQ,IAAIH,SAAS,CAACI,QAAQ,EAAE;IACrDC,IAAI,EAAE;EACR,CAAC,CAAC;AAEN","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"resolveScopedInstanceBindingNode.js","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveScopedInstanceBindingNode.ts"],"names":[],"mappings":";;;AAEA,mFAAgF;AAGhF,mDAAgD;AAEzC,MAAM,gCAAgC,GAQjB,CAC1B,OAGyB,EACzB,EAAE,CAAC,IAAA,6BAAa,EAAC,+CAAsB,EAAE,OAAO,CAAC,CAAC;AAbvC,QAAA,gCAAgC,oCAaO"}
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAIM,SAAS,0CAAU,OAAoB,EAAE,OAAiB,EAAE,cAA2B,YAAY;IACxG,IAAI,OAAO,QAAQ,qBAAqB;IACxC,IAAI,SACF,OAAO,gBAAgB,eAAe,KAAK,KAAK,GAAG,KAAK,MAAM;IAEhE,OAAO,gBAAgB,eAAe,KAAK,IAAI,GAAG,KAAK,GAAG;AAC5D","sources":["packages/@react-aria/utils/src/getOffset.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 {Orientation} from '@react-types/shared';\n\nexport function getOffset(element: HTMLElement, reverse?: boolean, orientation: Orientation = 'horizontal'): number {\n let rect = element.getBoundingClientRect();\n if (reverse) {\n return orientation === 'horizontal' ? rect.right : rect.bottom;\n }\n return orientation === 'horizontal' ? rect.left : rect.top;\n}\n"],"names":[],"version":3,"file":"getOffset.module.js.map"}
@@ -0,0 +1,627 @@
export default `flf2a$ 6 5 20 15 13
Standard by Glenn Chappell & Ian Chai 3/93 -- based on .sig of Frank Sheeran
Figlet release 2.0 -- August 5, 1993
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be \`a', for now
$ - the "hardblank" -- prints as a blank, but can't be smushed
6 - height of a character
5 - height of a character, not including descenders
20 - max line length (excluding comment lines) + a fudge factor
15 - default smushmode for this font (like "-m 15" on command line)
13 - number of comment lines
$@
$@
$@
$@
$@
$@@
_ @
/ \\@
/ /@
/\\_/ @
\\/ @
@@
_ _ @
( | )@
V V @
@
@
@@
_ _ @
_| || |_ @
|_ .. _|@
|_ _|@
|_||_| @
@@
_ @
| | @
/ __)@
\\__ \\@
( /@
|_| @@
_ __@
(_)/ /@
/ / @
/ /_ @
/_/(_)@
@@
___ @
( _ ) @
/ _ \\/\\@
| (_> <@
\\___/\\/@
@@
_ @
( )@
|/ @
@
@
@@
__@
/ /@
| | @
| | @
| | @
\\_\\@@
__ @
\\ \\ @
| |@
| |@
| |@
/_/ @@
@
__/\\__@
\\ /@
/_ _\\@
\\/ @
@@
@
_ @
_| |_ @
|_ _|@
|_| @
@@
@
@
@
_ @
( )@
|/ @@
@
@
_____ @
|_____|@
@
@@
@
@
@
_ @
(_)@
@@
__@
/ /@
/ / @
/ / @
/_/ @
@@
___ @
/ _ \\ @
| | | |@
| |_| |@
\\___/ @
@@
_ @
/ |@
| |@
| |@
|_|@
@@
____ @
|___ \\ @
__) |@
/ __/ @
|_____|@
@@
_____ @
|___ / @
|_ \\ @
___) |@
|____/ @
@@
_ _ @
| || | @
| || |_ @
|__ _|@
|_| @
@@
____ @
| ___| @
|___ \\ @
___) |@
|____/ @
@@
__ @
/ /_ @
| '_ \\ @
| (_) |@
\\___/ @
@@
_____ @
|___ |@
/ / @
/ / @
/_/ @
@@
___ @
( _ ) @
/ _ \\ @
| (_) |@
\\___/ @
@@
___ @
/ _ \\ @
| (_) |@
\\__, |@
/_/ @
@@
@
_ @
(_)@
_ @
(_)@
@@
@
_ @
(_)@
_ @
( )@
|/ @@
__@
/ /@
/ / @
\\ \\ @
\\_\\@
@@
@
_____ @
|_____|@
|_____|@
@
@@
__ @
\\ \\ @
\\ \\@
/ /@
/_/ @
@@
___ @
/ _ \\@
\\// /@
\\/ @
() @
@@
____ @
/ __ \\ @
/ / _\` |@
| | (_| |@
\\ \\__,_|@
\\____/ @@
_ @
/_\\ @
//_\\\\ @
/ _ \\@
\\_/ \\_/@
@@
___ @
/ __\\@
/__\\//@
/ \\/ \\@
\\_____/@
@@
___ @
/ __\\@
/ / @
/ /___ @
\\____/ @
@@
___ @
/ \\@
/ /\\ /@
/ /_// @
/___,' @
@@
__ @
/__\\@
/_\\ @
//__ @
\\__/ @
@@
___ @
/ __\\@
/ _\\ @
/ / @
\\/ @
@@
___ @
/ _ \\@
/ /_\\/@
/ /_\\\\ @
\\____/ @
@@
@
/\\ /\\@
/ /_/ /@
/ __ / @
\\/ /_/ @
@@
_____ @
\\_ \\@
/ /\\/@
/\\/ /_ @
\\____/ @
@@
__ @
\\ \\ @
\\ \\@
/\\_/ /@
\\___/ @
@@
@
/\\ /\\@
/ //_/@
/ __ \\ @
\\/ \\/ @
@@
__ @
/ / @
/ / @
/ /___ @
\\____/ @
@@
@
/\\/\\ @
/ \\ @
/ /\\/\\ \\@
\\/ \\/@
@@
__ @
/\\ \\ \\@
/ \\/ /@
/ /\\ / @
\\_\\ \\/ @
@@
___ @
/___\\@
// //@
/ \\_// @
\\___/ @
@@
___ @
/ _ \\@
/ /_)/@
/ ___/ @
\\/ @
@@
____ @
/___ \\@
// / /@
/ \\_/ / @
\\___,_\\ @
@@
__ @
/__\\ @
/ \\// @
/ _ \\ @
\\/ \\_/ @
@@
__ @
/ _\\ @
\\ \\ @
_\\ \\ @
\\__/ @
@@
_____ @
/__ \\@
/ /\\/@
/ / @
\\/ @
@@
@
/\\ /\\ @
/ / \\ \\@
\\ \\_/ /@
\\___/ @
@@
@
/\\ /\\ @
\\ \\ / / @
\\ V / @
\\_/ @
@@
__ __ @
/ / /\\ \\ \\@
\\ \\/ \\/ /@
\\ /\\ / @
\\/ \\/ @
@@
__ __@
\\ \\/ /@
\\ / @
/ \\ @
/_/\\_\\@
@@
@
/\\_/\\@
\\_ _/@
/ \\ @
\\_/ @
@@
_____@
/ _ /@
\\// / @
/ //\\@
/____/@
@@
__ @
| _|@
| | @
| | @
| | @
|__|@@
__ @
\\ \\ @
\\ \\ @
\\ \\ @
\\_\\@
@@
__ @
|_ |@
| |@
| |@
| |@
|__|@@
@
/\\ @
|/\\|@
@
@
@@
@
@
@
@
_____ @
|_____|@@
_ @
( )@
\\|@
@
@
@@
@
__ _ @
/ _\` |@
| (_| |@
\\__,_|@
@@
_ @
| |__ @
| '_ \\ @
| |_) |@
|_.__/ @
@@
@
___ @
/ __|@
| (__ @
\\___|@
@@
_ @
__| |@
/ _\` |@
| (_| |@
\\__,_|@
@@
@
___ @
/ _ \\@
| __/@
\\___|@
@@
__ @
/ _|@
| |_ @
| _|@
|_| @
@@
@
__ _ @
/ _\` |@
| (_| |@
\\__, |@
|___/ @@
_ @
| |__ @
| '_ \\ @
| | | |@
|_| |_|@
@@
_ @
(_)@
| |@
| |@
|_|@
@@
_ @
(_)@
| |@
| |@
_/ |@
|__/ @@
_ @
| | __@
| |/ /@
| < @
|_|\\_\\@
@@
_ @
| |@
| |@
| |@
|_|@
@@
@
_ __ ___ @
| '_ \` _ \\ @
| | | | | |@
|_| |_| |_|@
@@
@
_ __ @
| '_ \\ @
| | | |@
|_| |_|@
@@
@
___ @
/ _ \\ @
| (_) |@
\\___/ @
@@
@
_ __ @
| '_ \\ @
| |_) |@
| .__/ @
|_| @@
@
__ _ @
/ _\` |@
| (_| |@
\\__, |@
|_|@@
@
_ __ @
| '__|@
| | @
|_| @
@@
@
___ @
/ __|@
\\__ \\@
|___/@
@@
_ @
| |_ @
| __|@
| |_ @
\\__|@
@@
@
_ _ @
| | | |@
| |_| |@
\\__,_|@
@@
@
__ __@
\\ \\ / /@
\\ V / @
\\_/ @
@@
@
__ __@
\\ \\ /\\ / /@
\\ V V / @
\\_/\\_/ @
@@
@
__ __@
\\ \\/ /@
> < @
/_/\\_\\@
@@
@
_ _ @
| | | |@
| |_| |@
\\__, |@
|___/ @@
@
____@
|_ /@
/ / @
/___|@
@@
__@
/ /@
| | @
< < @
| | @
\\_\\@@
_ @
| |@
| |@
| |@
| |@
|_|@@
__ @
\\ \\ @
| | @
> >@
| | @
/_/ @@
@
/\\/|@
|/\\/ @
@
@
@@
_ _ @
(_)_(_)@
/ _ \\ @
| _ |@
|_| |_|@
@@
_ _ @
(_)_(_)@
/ _ \\ @
| |_| |@
\\___/ @
@@
_ _ @
(_) (_)@
| | | |@
| |_| |@
\\___/ @
@@
_ _ @
(_)_(_)@
/ _\` |@
| (_| |@
\\__,_|@
@@
_ _ @
(_)_(_)@
/ _ \\ @
| (_) |@
\\___/ @
@@
_ _ @
(_) (_)@
| | | |@
| |_| |@
\\__,_|@
@@
____ @
| __ \\@
| |/ /@
| |\\ \\@
|_||_/@
@@
`
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.tagged = tagged;
const incrementPendingClassMetadataCount_1 = require("../actions/incrementPendingClassMetadataCount");
const updateMetadataTag_1 = require("../actions/updateMetadataTag");
const buildMaybeClassElementMetadataFromMaybeClassElementMetadata_1 = require("../calculations/buildMaybeClassElementMetadataFromMaybeClassElementMetadata");
const injectBase_1 = require("./injectBase");
function tagged(key, value) {
const updateMetadata = (0, buildMaybeClassElementMetadataFromMaybeClassElementMetadata_1.buildMaybeClassElementMetadataFromMaybeClassElementMetadata)((0, updateMetadataTag_1.updateMetadataTag)(key, value));
return (0, injectBase_1.injectBase)(updateMetadata, incrementPendingClassMetadataCount_1.incrementPendingClassMetadataCount);
}
//# sourceMappingURL=tagged.js.map
@@ -0,0 +1,5 @@
import type { useEffect, useLayoutEffect } from 'react';
type EffectHookType = typeof useEffect | typeof useLayoutEffect;
type CreateUpdateEffect = (hook: EffectHookType) => EffectHookType;
export declare const createDeepCompareEffect: CreateUpdateEffect;
export {};
@@ -0,0 +1,19 @@
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.has` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHas(object, key) {
return object != null && hasOwnProperty.call(object, key);
}
export default baseHas;
@@ -0,0 +1,106 @@
import Level from "./Level.mjs";
import Logger from "./Logger.mjs";
import normalizeLevel from "./normalizeLevel.mjs";
class LogFactory {
/**
* Constructor (构造函数)
* @param config Configuration options (配置选项)
*/
constructor(config) {
this.loggers = /* @__PURE__ */ new Map();
this.LoggerClass = Logger;
this.defaultLevel = Level.INFO;
this.appenders = [];
this.configure(config);
}
/**
* Get the default log level (获取或设置默认日志级别)
*/
get level() {
return this.defaultLevel;
}
/**
* Get the default log level name (获取或设置默认日志级别名称)
*/
get levelName() {
return Level[this.defaultLevel];
}
/**
* Update the default log level (更新默认日志级别)
* @param level Log level (日志级别)
* @param updateCachedLoggers Whether to update the cached loggers (是否更新缓存的日志器)
* @returns Update level success if true (如果为 true 表示更新成功)
*/
updateLevel(level, updateCachedLoggers) {
const normalizedLevel = normalizeLevel(level);
const isValidLevel = normalizedLevel !== void 0;
if (isValidLevel) {
this.defaultLevel = normalizedLevel;
if (updateCachedLoggers !== false) {
this.loggers.forEach((logger) => {
logger.level = normalizedLevel;
});
}
}
return isValidLevel;
}
/**
* Configure the log factory (配置日志工厂)
* @param param Configuration options (配置选项)
*/
configure({
LoggerClass,
level,
appenders
} = {}) {
if (LoggerClass) {
this.LoggerClass = LoggerClass;
}
if (level) {
this.updateLevel(level, false);
}
if (appenders) {
this.appenders = appenders;
}
}
/**
* Get a logger instance (获取日志实例)
* @param name Logger name (日志名称)
*/
getLogger(name) {
let logger = this.loggers.get(name);
if (!logger) {
const { LoggerClass } = this;
logger = new LoggerClass(name, {
level: this.defaultLevel,
appenders: this.appenders
});
this.loggers.set(name, logger);
}
return logger;
}
/**
* Clear the logger cache (清除日志缓存)
* @param name Logger name (日志名称)
*/
clear(name) {
if (name) {
this.loggers.delete(name);
} else {
this.loggers.clear();
}
}
/**
* Dispose the log factory (销毁日志工厂)
*/
dispose() {
const promises = [];
this.loggers.forEach((logger) => {
promises.push(logger.dispose());
});
return Promise.allSettled(promises);
}
}
export {
LogFactory as default
};
@@ -0,0 +1,82 @@
{
"author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",
"name": "form-data",
"description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
"version": "4.0.4",
"repository": {
"type": "git",
"url": "git://github.com/form-data/form-data.git"
},
"main": "./lib/form_data",
"browser": "./lib/browser",
"typings": "./index.d.ts",
"scripts": {
"pretest": "npm run lint",
"pretests-only": "rimraf coverage test/tmp",
"tests-only": "istanbul cover test/run.js",
"posttests-only": "istanbul report lcov text",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"lint": "eslint --ext=js,mjs .",
"report": "istanbul report lcov text",
"ci-lint": "is-node-modern 8 && npm run lint || is-node-not-modern 8",
"ci-test": "npm run tests-only && npm run browser && npm run report",
"predebug": "rimraf coverage test/tmp",
"debug": "verbose=1 ./test/run.js",
"browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage",
"check": "istanbul check-coverage coverage/coverage*.json",
"files": "pkgfiles --sort=name",
"get-version": "node -e \"console.log(require('./package.json').version)\"",
"update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md",
"postupdate-readme": "mv README.md.bak READ.ME.md.bak",
"restore-readme": "mv READ.ME.md.bak README.md",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepack": "npm run update-readme",
"postpack": "npm run restore-readme",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"engines": {
"node": ">= 6"
},
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"es-set-tostringtag": "^2.1.0",
"hasown": "^2.0.2",
"mime-types": "^2.1.12"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.2.0",
"auto-changelog": "^2.5.0",
"browserify": "^13.3.0",
"browserify-istanbul": "^2.0.0",
"coveralls": "^3.1.1",
"cross-spawn": "^6.0.6",
"eslint": "=8.8.0",
"fake": "^0.2.2",
"far": "^0.0.7",
"formidable": "^1.2.6",
"in-publish": "^2.0.1",
"is-node-modern": "^1.0.0",
"istanbul": "^0.4.5",
"obake": "^0.1.2",
"pkgfiles": "^2.3.2",
"pre-commit": "^1.2.2",
"predict-v8-randomness": "^1.0.35",
"puppeteer": "^1.20.0",
"request": "~2.87.0",
"rimraf": "^2.7.1",
"semver": "^6.3.1",
"tape": "^5.9.0"
},
"license": "MIT",
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
}
}
@@ -0,0 +1,819 @@
/**
* @import {Event, Extension, Point, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
*/
/**
* @typedef {[number, number, number, number]} Range
* Cell info.
*
* @typedef {0 | 1 | 2 | 3} RowKind
* Where we are: `1` for head row, `2` for delimiter row, `3` for body row.
*/
import { factorySpace } from 'micromark-factory-space';
import { markdownLineEnding, markdownLineEndingOrSpace, markdownSpace } from 'micromark-util-character';
import { EditMap } from './edit-map.js';
import { gfmTableAlign } from './infer.js';
/**
* Create an HTML extension for `micromark` to support GitHub tables syntax.
*
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions` to enable GFM
* table syntax.
*/
export function gfmTable() {
return {
flow: {
null: {
name: 'table',
tokenize: tokenizeTable,
resolveAll: resolveTable
}
}
};
}
/**
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeTable(effects, ok, nok) {
const self = this;
let size = 0;
let sizeB = 0;
/** @type {boolean | undefined} */
let seen;
return start;
/**
* Start of a GFM table.
*
* If there is a valid table row or table head before, then we try to parse
* another row.
* Otherwise, we try to parse a head.
*
* ```markdown
* > | | a |
* ^
* | | - |
* > | | b |
* ^
* ```
* @type {State}
*/
function start(code) {
let index = self.events.length - 1;
while (index > -1) {
const type = self.events[index][1].type;
if (type === "lineEnding" ||
// Note: markdown-rs uses `whitespace` instead of `linePrefix`
type === "linePrefix") index--;else break;
}
const tail = index > -1 ? self.events[index][1].type : null;
const next = tail === 'tableHead' || tail === 'tableRow' ? bodyRowStart : headRowBefore;
// Don’t allow lazy body rows.
if (next === bodyRowStart && self.parser.lazy[self.now().line]) {
return nok(code);
}
return next(code);
}
/**
* Before table head row.
*
* ```markdown
* > | | a |
* ^
* | | - |
* | | b |
* ```
*
* @type {State}
*/
function headRowBefore(code) {
effects.enter('tableHead');
effects.enter('tableRow');
return headRowStart(code);
}
/**
* Before table head row, after whitespace.
*
* ```markdown
* > | | a |
* ^
* | | - |
* | | b |
* ```
*
* @type {State}
*/
function headRowStart(code) {
if (code === 124) {
return headRowBreak(code);
}
// To do: micromark-js should let us parse our own whitespace in extensions,
// like `markdown-rs`:
//
// ```js
// // 4+ spaces.
// if (markdownSpace(code)) {
// return nok(code)
// }
// ```
seen = true;
// Count the first character, that isn’t a pipe, double.
sizeB += 1;
return headRowBreak(code);
}
/**
* At break in table head row.
*
* ```markdown
* > | | a |
* ^
* ^
* ^
* | | - |
* | | b |
* ```
*
* @type {State}
*/
function headRowBreak(code) {
if (code === null) {
// Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.
return nok(code);
}
if (markdownLineEnding(code)) {
// If anything other than one pipe (ignoring whitespace) was used, it’s fine.
if (sizeB > 1) {
sizeB = 0;
// To do: check if this works.
// Feel free to interrupt:
self.interrupt = true;
effects.exit('tableRow');
effects.enter("lineEnding");
effects.consume(code);
effects.exit("lineEnding");
return headDelimiterStart;
}
// Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.
return nok(code);
}
if (markdownSpace(code)) {
// To do: check if this is fine.
// effects.attempt(State::Next(StateName::GfmTableHeadRowBreak), State::Nok)
// State::Retry(space_or_tab(tokenizer))
return factorySpace(effects, headRowBreak, "whitespace")(code);
}
sizeB += 1;
if (seen) {
seen = false;
// Header cell count.
size += 1;
}
if (code === 124) {
effects.enter('tableCellDivider');
effects.consume(code);
effects.exit('tableCellDivider');
// Whether a delimiter was seen.
seen = true;
return headRowBreak;
}
// Anything else is cell data.
effects.enter("data");
return headRowData(code);
}
/**
* In table head row data.
*
* ```markdown
* > | | a |
* ^
* | | - |
* | | b |
* ```
*
* @type {State}
*/
function headRowData(code) {
if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {
effects.exit("data");
return headRowBreak(code);
}
effects.consume(code);
return code === 92 ? headRowEscape : headRowData;
}
/**
* In table head row escape.
*
* ```markdown
* > | | a\-b |
* ^
* | | ---- |
* | | c |
* ```
*
* @type {State}
*/
function headRowEscape(code) {
if (code === 92 || code === 124) {
effects.consume(code);
return headRowData;
}
return headRowData(code);
}
/**
* Before delimiter row.
*
* ```markdown
* | | a |
* > | | - |
* ^
* | | b |
* ```
*
* @type {State}
*/
function headDelimiterStart(code) {
// Reset `interrupt`.
self.interrupt = false;
// Note: in `markdown-rs`, we need to handle piercing here too.
if (self.parser.lazy[self.now().line]) {
return nok(code);
}
effects.enter('tableDelimiterRow');
// Track if we’ve seen a `:` or `|`.
seen = false;
if (markdownSpace(code)) {
return factorySpace(effects, headDelimiterBefore, "linePrefix", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code);
}
return headDelimiterBefore(code);
}
/**
* Before delimiter row, after optional whitespace.
*
* Reused when a `|` is found later, to parse another cell.
*
* ```markdown
* | | a |
* > | | - |
* ^
* | | b |
* ```
*
* @type {State}
*/
function headDelimiterBefore(code) {
if (code === 45 || code === 58) {
return headDelimiterValueBefore(code);
}
if (code === 124) {
seen = true;
// If we start with a pipe, we open a cell marker.
effects.enter('tableCellDivider');
effects.consume(code);
effects.exit('tableCellDivider');
return headDelimiterCellBefore;
}
// More whitespace / empty row not allowed at start.
return headDelimiterNok(code);
}
/**
* After `|`, before delimiter cell.
*
* ```markdown
* | | a |
* > | | - |
* ^
* ```
*
* @type {State}
*/
function headDelimiterCellBefore(code) {
if (markdownSpace(code)) {
return factorySpace(effects, headDelimiterValueBefore, "whitespace")(code);
}
return headDelimiterValueBefore(code);
}
/**
* Before delimiter cell value.
*
* ```markdown
* | | a |
* > | | - |
* ^
* ```
*
* @type {State}
*/
function headDelimiterValueBefore(code) {
// Align: left.
if (code === 58) {
sizeB += 1;
seen = true;
effects.enter('tableDelimiterMarker');
effects.consume(code);
effects.exit('tableDelimiterMarker');
return headDelimiterLeftAlignmentAfter;
}
// Align: none.
if (code === 45) {
sizeB += 1;
// To do: seems weird that this *isn’t* left aligned, but that state is used?
return headDelimiterLeftAlignmentAfter(code);
}
if (code === null || markdownLineEnding(code)) {
return headDelimiterCellAfter(code);
}
return headDelimiterNok(code);
}
/**
* After delimiter cell left alignment marker.
*
* ```markdown
* | | a |
* > | | :- |
* ^
* ```
*
* @type {State}
*/
function headDelimiterLeftAlignmentAfter(code) {
if (code === 45) {
effects.enter('tableDelimiterFiller');
return headDelimiterFiller(code);
}
// Anything else is not ok after the left-align colon.
return headDelimiterNok(code);
}
/**
* In delimiter cell filler.
*
* ```markdown
* | | a |
* > | | - |
* ^
* ```
*
* @type {State}
*/
function headDelimiterFiller(code) {
if (code === 45) {
effects.consume(code);
return headDelimiterFiller;
}
// Align is `center` if it was `left`, `right` otherwise.
if (code === 58) {
seen = true;
effects.exit('tableDelimiterFiller');
effects.enter('tableDelimiterMarker');
effects.consume(code);
effects.exit('tableDelimiterMarker');
return headDelimiterRightAlignmentAfter;
}
effects.exit('tableDelimiterFiller');
return headDelimiterRightAlignmentAfter(code);
}
/**
* After delimiter cell right alignment marker.
*
* ```markdown
* | | a |
* > | | -: |
* ^
* ```
*
* @type {State}
*/
function headDelimiterRightAlignmentAfter(code) {
if (markdownSpace(code)) {
return factorySpace(effects, headDelimiterCellAfter, "whitespace")(code);
}
return headDelimiterCellAfter(code);
}
/**
* After delimiter cell.
*
* ```markdown
* | | a |
* > | | -: |
* ^
* ```
*
* @type {State}
*/
function headDelimiterCellAfter(code) {
if (code === 124) {
return headDelimiterBefore(code);
}
if (code === null || markdownLineEnding(code)) {
// Exit when:
// * there was no `:` or `|` at all (it’s a thematic break or setext
// underline instead)
// * the header cell count is not the delimiter cell count
if (!seen || size !== sizeB) {
return headDelimiterNok(code);
}
// Note: in markdown-rs`, a reset is needed here.
effects.exit('tableDelimiterRow');
effects.exit('tableHead');
// To do: in `markdown-rs`, resolvers need to be registered manually.
// effects.register_resolver(ResolveName::GfmTable)
return ok(code);
}
return headDelimiterNok(code);
}
/**
* In delimiter row, at a disallowed byte.
*
* ```markdown
* | | a |
* > | | x |
* ^
* ```
*
* @type {State}
*/
function headDelimiterNok(code) {
// Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.
return nok(code);
}
/**
* Before table body row.
*
* ```markdown
* | | a |
* | | - |
* > | | b |
* ^
* ```
*
* @type {State}
*/
function bodyRowStart(code) {
// Note: in `markdown-rs` we need to manually take care of a prefix,
// but in `micromark-js` that is done for us, so if we’re here, we’re
// never at whitespace.
effects.enter('tableRow');
return bodyRowBreak(code);
}
/**
* At break in table body row.
*
* ```markdown
* | | a |
* | | - |
* > | | b |
* ^
* ^
* ^
* ```
*
* @type {State}
*/
function bodyRowBreak(code) {
if (code === 124) {
effects.enter('tableCellDivider');
effects.consume(code);
effects.exit('tableCellDivider');
return bodyRowBreak;
}
if (code === null || markdownLineEnding(code)) {
effects.exit('tableRow');
return ok(code);
}
if (markdownSpace(code)) {
return factorySpace(effects, bodyRowBreak, "whitespace")(code);
}
// Anything else is cell content.
effects.enter("data");
return bodyRowData(code);
}
/**
* In table body row data.
*
* ```markdown
* | | a |
* | | - |
* > | | b |
* ^
* ```
*
* @type {State}
*/
function bodyRowData(code) {
if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {
effects.exit("data");
return bodyRowBreak(code);
}
effects.consume(code);
return code === 92 ? bodyRowEscape : bodyRowData;
}
/**
* In table body row escape.
*
* ```markdown
* | | a |
* | | ---- |
* > | | b\-c |
* ^
* ```
*
* @type {State}
*/
function bodyRowEscape(code) {
if (code === 92 || code === 124) {
effects.consume(code);
return bodyRowData;
}
return bodyRowData(code);
}
}
/** @type {Resolver} */
function resolveTable(events, context) {
let index = -1;
let inFirstCellAwaitingPipe = true;
/** @type {RowKind} */
let rowKind = 0;
/** @type {Range} */
let lastCell = [0, 0, 0, 0];
/** @type {Range} */
let cell = [0, 0, 0, 0];
let afterHeadAwaitingFirstBodyRow = false;
let lastTableEnd = 0;
/** @type {Token | undefined} */
let currentTable;
/** @type {Token | undefined} */
let currentBody;
/** @type {Token | undefined} */
let currentCell;
const map = new EditMap();
while (++index < events.length) {
const event = events[index];
const token = event[1];
if (event[0] === 'enter') {
// Start of head.
if (token.type === 'tableHead') {
afterHeadAwaitingFirstBodyRow = false;
// Inject previous (body end and) table end.
if (lastTableEnd !== 0) {
flushTableEnd(map, context, lastTableEnd, currentTable, currentBody);
currentBody = undefined;
lastTableEnd = 0;
}
// Inject table start.
currentTable = {
type: 'table',
start: Object.assign({}, token.start),
// Note: correct end is set later.
end: Object.assign({}, token.end)
};
map.add(index, 0, [['enter', currentTable, context]]);
} else if (token.type === 'tableRow' || token.type === 'tableDelimiterRow') {
inFirstCellAwaitingPipe = true;
currentCell = undefined;
lastCell = [0, 0, 0, 0];
cell = [0, index + 1, 0, 0];
// Inject table body start.
if (afterHeadAwaitingFirstBodyRow) {
afterHeadAwaitingFirstBodyRow = false;
currentBody = {
type: 'tableBody',
start: Object.assign({}, token.start),
// Note: correct end is set later.
end: Object.assign({}, token.end)
};
map.add(index, 0, [['enter', currentBody, context]]);
}
rowKind = token.type === 'tableDelimiterRow' ? 2 : currentBody ? 3 : 1;
}
// Cell data.
else if (rowKind && (token.type === "data" || token.type === 'tableDelimiterMarker' || token.type === 'tableDelimiterFiller')) {
inFirstCellAwaitingPipe = false;
// First value in cell.
if (cell[2] === 0) {
if (lastCell[1] !== 0) {
cell[0] = cell[1];
currentCell = flushCell(map, context, lastCell, rowKind, undefined, currentCell);
lastCell = [0, 0, 0, 0];
}
cell[2] = index;
}
} else if (token.type === 'tableCellDivider') {
if (inFirstCellAwaitingPipe) {
inFirstCellAwaitingPipe = false;
} else {
if (lastCell[1] !== 0) {
cell[0] = cell[1];
currentCell = flushCell(map, context, lastCell, rowKind, undefined, currentCell);
}
lastCell = cell;
cell = [lastCell[1], index, 0, 0];
}
}
}
// Exit events.
else if (token.type === 'tableHead') {
afterHeadAwaitingFirstBodyRow = true;
lastTableEnd = index;
} else if (token.type === 'tableRow' || token.type === 'tableDelimiterRow') {
lastTableEnd = index;
if (lastCell[1] !== 0) {
cell[0] = cell[1];
currentCell = flushCell(map, context, lastCell, rowKind, index, currentCell);
} else if (cell[1] !== 0) {
currentCell = flushCell(map, context, cell, rowKind, index, currentCell);
}
rowKind = 0;
} else if (rowKind && (token.type === "data" || token.type === 'tableDelimiterMarker' || token.type === 'tableDelimiterFiller')) {
cell[3] = index;
}
}
if (lastTableEnd !== 0) {
flushTableEnd(map, context, lastTableEnd, currentTable, currentBody);
}
map.consume(context.events);
// To do: move this into `html`, when events are exposed there.
// That’s what `markdown-rs` does.
// That needs updates to `mdast-util-gfm-table`.
index = -1;
while (++index < context.events.length) {
const event = context.events[index];
if (event[0] === 'enter' && event[1].type === 'table') {
event[1]._align = gfmTableAlign(context.events, index);
}
}
return events;
}
/**
* Generate a cell.
*
* @param {EditMap} map
* @param {Readonly<TokenizeContext>} context
* @param {Readonly<Range>} range
* @param {RowKind} rowKind
* @param {number | undefined} rowEnd
* @param {Token | undefined} previousCell
* @returns {Token | undefined}
*/
// eslint-disable-next-line max-params
function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
// `markdown-rs` uses:
// rowKind === 2 ? 'tableDelimiterCell' : 'tableCell'
const groupName = rowKind === 1 ? 'tableHeader' : rowKind === 2 ? 'tableDelimiter' : 'tableData';
// `markdown-rs` uses:
// rowKind === 2 ? 'tableDelimiterCellValue' : 'tableCellText'
const valueName = 'tableContent';
// Insert an exit for the previous cell, if there is one.
//
// ```markdown
// > | | aa | bb | cc |
// ^-- exit
// ^^^^-- this cell
// ```
if (range[0] !== 0) {
previousCell.end = Object.assign({}, getPoint(context.events, range[0]));
map.add(range[0], 0, [['exit', previousCell, context]]);
}
// Insert enter of this cell.
//
// ```markdown
// > | | aa | bb | cc |
// ^-- enter
// ^^^^-- this cell
// ```
const now = getPoint(context.events, range[1]);
previousCell = {
type: groupName,
start: Object.assign({}, now),
// Note: correct end is set later.
end: Object.assign({}, now)
};
map.add(range[1], 0, [['enter', previousCell, context]]);
// Insert text start at first data start and end at last data end, and
// remove events between.
//
// ```markdown
// > | | aa | bb | cc |
// ^-- enter
// ^-- exit
// ^^^^-- this cell
// ```
if (range[2] !== 0) {
const relatedStart = getPoint(context.events, range[2]);
const relatedEnd = getPoint(context.events, range[3]);
/** @type {Token} */
const valueToken = {
type: valueName,
start: Object.assign({}, relatedStart),
end: Object.assign({}, relatedEnd)
};
map.add(range[2], 0, [['enter', valueToken, context]]);
if (rowKind !== 2) {
// Fix positional info on remaining events
const start = context.events[range[2]];
const end = context.events[range[3]];
start[1].end = Object.assign({}, end[1].end);
start[1].type = "chunkText";
start[1].contentType = "text";
// Remove if needed.
if (range[3] > range[2] + 1) {
const a = range[2] + 1;
const b = range[3] - range[2] - 1;
map.add(a, b, []);
}
}
map.add(range[3] + 1, 0, [['exit', valueToken, context]]);
}
// Insert an exit for the last cell, if at the row end.
//
// ```markdown
// > | | aa | bb | cc |
// ^-- exit
// ^^^^^^-- this cell (the last one contains two “between” parts)
// ```
if (rowEnd !== undefined) {
previousCell.end = Object.assign({}, getPoint(context.events, rowEnd));
map.add(rowEnd, 0, [['exit', previousCell, context]]);
previousCell = undefined;
}
return previousCell;
}
/**
* Generate table end (and table body end).
*
* @param {Readonly<EditMap>} map
* @param {Readonly<TokenizeContext>} context
* @param {number} index
* @param {Token} table
* @param {Token | undefined} tableBody
*/
// eslint-disable-next-line max-params
function flushTableEnd(map, context, index, table, tableBody) {
/** @type {Array<Event>} */
const exits = [];
const related = getPoint(context.events, index);
if (tableBody) {
tableBody.end = Object.assign({}, related);
exits.push(['exit', tableBody, context]);
}
table.end = Object.assign({}, related);
exits.push(['exit', table, context]);
map.add(index + 1, 0, exits);
}
/**
* @param {Readonly<Array<Event>>} events
* @param {number} index
* @returns {Readonly<Point>}
*/
function getPoint(events, index) {
const event = events[index];
const side = event[0] === 'enter' ? 'start' : 'end';
return event[1][side];
}
@@ -0,0 +1,95 @@
/**
* Copyright (c) 2013-2015, Christopher Jeffrey, Peter Sunde (MIT License)
* Copyright (c) 2016, Daniel Imms (MIT License).
* Copyright (c) 2018, Microsoft Corporation (MIT License).
*/
#include <stdexcept>
#include <Shlwapi.h> // PathCombine
#include <Windows.h>
#include "path_util.h"
namespace path_util {
std::wstring to_wstring(const Napi::String& str) {
const std::u16string & u16 = str.Utf16Value();
return std::wstring(u16.begin(), u16.end());
}
std::string wstring_to_string(const std::wstring &wide_string) {
if (wide_string.empty()) {
return "";
}
const auto size_needed = WideCharToMultiByte(CP_UTF8, 0, &wide_string.at(0), (int)wide_string.size(), nullptr, 0, nullptr, nullptr);
if (size_needed <= 0) {
return "";
}
std::string result(size_needed, 0);
WideCharToMultiByte(CP_UTF8, 0, &wide_string.at(0), (int)wide_string.size(), &result.at(0), size_needed, nullptr, nullptr);
return result;
}
const char* from_wstring(const wchar_t* wstr) {
int bufferSize = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
if (bufferSize <= 0) {
return "";
}
char *output = new char[bufferSize];
int status = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, output, bufferSize, NULL, NULL);
if (status == 0) {
return "";
}
return output;
}
bool file_exists(std::wstring filename) {
DWORD attr = ::GetFileAttributesW(filename.c_str());
if (attr == INVALID_FILE_ATTRIBUTES || (attr & FILE_ATTRIBUTE_DIRECTORY)) {
return false;
}
return true;
}
// cmd.exe -> C:\Windows\system32\cmd.exe
std::wstring get_shell_path(std::wstring filename) {
std::wstring shellpath;
if (file_exists(filename)) {
return shellpath;
}
wchar_t* buffer_ = new wchar_t[MAX_ENV];
int read = ::GetEnvironmentVariableW(L"Path", buffer_, MAX_ENV);
if (read) {
std::wstring delimiter = L";";
size_t pos = 0;
std::vector<std::wstring> paths;
std::wstring buffer(buffer_);
while ((pos = buffer.find(delimiter)) != std::wstring::npos) {
paths.push_back(buffer.substr(0, pos));
buffer.erase(0, pos + delimiter.length());
}
const wchar_t *filename_ = filename.c_str();
for (size_t i = 0; i < paths.size(); ++i) {
std::wstring path = paths[i];
wchar_t searchPath[MAX_PATH];
::PathCombineW(searchPath, const_cast<wchar_t*>(path.c_str()), filename_);
if (searchPath == NULL) {
continue;
}
if (file_exists(searchPath)) {
shellpath = searchPath;
break;
}
}
}
delete[] buffer_;
return shellpath;
}
} // namespace path_util
@@ -0,0 +1,267 @@
/**
* @fileoverview Rule to enforce grouped require statements for Node.JS
* @author Raphael Pigulla
* @deprecated in ESLint v7.0.0
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-mixed-requires",
url: "https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-mixed-requires.md",
},
},
],
},
type: "suggestion",
docs: {
description:
"Disallow `require` calls to be mixed with regular variable declarations",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-mixed-requires",
},
schema: [
{
oneOf: [
{
type: "boolean",
},
{
type: "object",
properties: {
grouping: {
type: "boolean",
},
allowCall: {
type: "boolean",
},
},
additionalProperties: false,
},
],
},
],
messages: {
noMixRequire: "Do not mix 'require' and other declarations.",
noMixCoreModuleFileComputed:
"Do not mix core, module, file and computed requires.",
},
},
create(context) {
const options = context.options[0];
let grouping = false,
allowCall = false;
if (typeof options === "object") {
grouping = options.grouping;
allowCall = options.allowCall;
} else {
grouping = !!options;
}
/**
* Returns the list of built-in modules.
* @returns {string[]} An array of built-in Node.js modules.
*/
function getBuiltinModules() {
/*
* This list is generated using:
* `require("repl")._builtinLibs.concat('repl').sort()`
* This particular list is as per nodejs v0.12.2 and iojs v0.7.1
*/
return [
"assert",
"buffer",
"child_process",
"cluster",
"crypto",
"dgram",
"dns",
"domain",
"events",
"fs",
"http",
"https",
"net",
"os",
"path",
"punycode",
"querystring",
"readline",
"repl",
"smalloc",
"stream",
"string_decoder",
"tls",
"tty",
"url",
"util",
"v8",
"vm",
"zlib",
];
}
const BUILTIN_MODULES = getBuiltinModules();
const DECL_REQUIRE = "require",
DECL_UNINITIALIZED = "uninitialized",
DECL_OTHER = "other";
const REQ_CORE = "core",
REQ_FILE = "file",
REQ_MODULE = "module",
REQ_COMPUTED = "computed";
/**
* Determines the type of a declaration statement.
* @param {ASTNode} initExpression The init node of the VariableDeclarator.
* @returns {string} The type of declaration represented by the expression.
*/
function getDeclarationType(initExpression) {
if (!initExpression) {
// "var x;"
return DECL_UNINITIALIZED;
}
if (
initExpression.type === "CallExpression" &&
initExpression.callee.type === "Identifier" &&
initExpression.callee.name === "require"
) {
// "var x = require('util');"
return DECL_REQUIRE;
}
if (
allowCall &&
initExpression.type === "CallExpression" &&
initExpression.callee.type === "CallExpression"
) {
// "var x = require('diagnose')('sub-module');"
return getDeclarationType(initExpression.callee);
}
if (initExpression.type === "MemberExpression") {
// "var x = require('glob').Glob;"
return getDeclarationType(initExpression.object);
}
// "var x = 42;"
return DECL_OTHER;
}
/**
* Determines the type of module that is loaded via require.
* @param {ASTNode} initExpression The init node of the VariableDeclarator.
* @returns {string} The module type.
*/
function inferModuleType(initExpression) {
if (initExpression.type === "MemberExpression") {
// "var x = require('glob').Glob;"
return inferModuleType(initExpression.object);
}
if (initExpression.arguments.length === 0) {
// "var x = require();"
return REQ_COMPUTED;
}
const arg = initExpression.arguments[0];
if (arg.type !== "Literal" || typeof arg.value !== "string") {
// "var x = require(42);"
return REQ_COMPUTED;
}
if (BUILTIN_MODULES.includes(arg.value)) {
// "var fs = require('fs');"
return REQ_CORE;
}
if (/^\.{0,2}\//u.test(arg.value)) {
// "var utils = require('./utils');"
return REQ_FILE;
}
// "var async = require('async');"
return REQ_MODULE;
}
/**
* Check if the list of variable declarations is mixed, i.e. whether it
* contains both require and other declarations.
* @param {ASTNode} declarations The list of VariableDeclarators.
* @returns {boolean} True if the declarations are mixed, false if not.
*/
function isMixed(declarations) {
const contains = {};
declarations.forEach(declaration => {
const type = getDeclarationType(declaration.init);
contains[type] = true;
});
return !!(
contains[DECL_REQUIRE] &&
(contains[DECL_UNINITIALIZED] || contains[DECL_OTHER])
);
}
/**
* Check if all require declarations in the given list are of the same
* type.
* @param {ASTNode} declarations The list of VariableDeclarators.
* @returns {boolean} True if the declarations are grouped, false if not.
*/
function isGrouped(declarations) {
const found = {};
declarations.forEach(declaration => {
if (getDeclarationType(declaration.init) === DECL_REQUIRE) {
found[inferModuleType(declaration.init)] = true;
}
});
return Object.keys(found).length <= 1;
}
return {
VariableDeclaration(node) {
if (isMixed(node.declarations)) {
context.report({
node,
messageId: "noMixRequire",
});
} else if (grouping && !isGrouped(node.declarations)) {
context.report({
node,
messageId: "noMixCoreModuleFileComputed",
});
}
},
};
},
};
@@ -0,0 +1,30 @@
import { Dispatch } from './store'
export interface MiddlewareAPI<D extends Dispatch = Dispatch, S = any> {
dispatch: D
getState(): S
}
/**
* A middleware is a higher-order function that composes a dispatch function
* to return a new dispatch function. It often turns async actions into
* actions.
*
* Middleware is composable using function composition. It is useful for
* logging actions, performing side effects like routing, or turning an
* asynchronous API call into a series of synchronous actions.
*
* @template DispatchExt Extra Dispatch signature added by this middleware.
* @template S The type of the state supported by this middleware.
* @template D The type of Dispatch of the store where this middleware is
* installed.
*/
export interface Middleware<
_DispatchExt = {}, // TODO: see if this can be used in type definition somehow (can't be removed, as is used to get final dispatch type)
S = any,
D extends Dispatch = Dispatch
> {
(api: MiddlewareAPI<D, S>): (
next: (action: unknown) => unknown
) => (action: unknown) => unknown
}
@@ -0,0 +1,8 @@
"use client";
import {
input_default
} from "./chunk-2QAN2V2R.mjs";
import "./chunk-MSLIMGMJ.mjs";
export {
input_default as default
};
@@ -0,0 +1,2 @@
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unsafeOfAnyTypeAssertion" | "unsafeToAnyTypeAssertion" | "unsafeToUnconstrainedTypeAssertion" | "unsafeTypeAssertion" | "unsafeTypeAssertionAssignableToConstraint", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,20 @@
var baseSum = require('./_baseSum');
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/**
* The base implementation of `_.mean` and `_.meanBy` without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {number} Returns the mean.
*/
function baseMean(array, iteratee) {
var length = array == null ? 0 : array.length;
return length ? (baseSum(array, iteratee) / length) : NAN;
}
module.exports = baseMean;
@@ -0,0 +1,14 @@
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add
module.exports = function BigIntAdd(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x + y;
};
@@ -0,0 +1,483 @@
"use client";
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
Navbar: () => navbar_default,
NavbarBrand: () => navbar_brand_default,
NavbarContent: () => navbar_content_default,
NavbarItem: () => navbar_item_default,
NavbarMenu: () => navbar_menu_default,
NavbarMenuItem: () => navbar_menu_item_default,
NavbarMenuToggle: () => navbar_menu_toggle_default,
NavbarProvider: () => NavbarProvider,
useNavbar: () => useNavbar,
useNavbarContext: () => useNavbarContext
});
module.exports = __toCommonJS(src_exports);
// src/use-navbar.ts
var import_system = require("@heroui/system");
var import_theme = require("@heroui/theme");
var import_react_utils = require("@heroui/react-utils");
var import_shared_utils = require("@heroui/shared-utils");
var import_react = require("react");
var import_utils = require("@react-aria/utils");
var import_use_scroll_position = require("@heroui/use-scroll-position");
var import_utils2 = require("@react-stately/utils");
var import_overlays = require("@react-aria/overlays");
function useNavbar(originalProps) {
var _a, _b;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.navbar.variantKeys);
const {
ref,
as,
parentRef,
height = "4rem",
shouldHideOnScroll = false,
disableScrollHandler = false,
shouldBlockScroll = true,
onScrollPositionChange,
isMenuOpen: isMenuOpenProp,
isMenuDefaultOpen,
onMenuOpenChange = () => {
},
motionProps,
className,
classNames,
...otherProps
} = props;
const Component = as || "nav";
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const domRef = (0, import_react_utils.useDOMRef)(ref);
const prevWidth = (0, import_react.useRef)(0);
const navHeight = (0, import_react.useRef)(0);
const [isHidden, setIsHidden] = (0, import_react.useState)(false);
const handleMenuOpenChange = (0, import_react.useCallback)(
(isOpen) => {
onMenuOpenChange(isOpen || false);
},
[onMenuOpenChange]
);
const [isMenuOpen, setIsMenuOpen] = (0, import_utils2.useControlledState)(
isMenuOpenProp,
isMenuDefaultOpen != null ? isMenuDefaultOpen : false,
handleMenuOpenChange
);
const updateWidth = () => {
if (domRef.current) {
const width = domRef.current.offsetWidth;
if (width !== prevWidth.current) {
prevWidth.current = width;
}
}
};
(0, import_overlays.usePreventScroll)({
isDisabled: !(shouldBlockScroll && isMenuOpen)
});
(0, import_utils.useResizeObserver)({
ref: domRef,
onResize: () => {
var _a2;
const currentWidth = (_a2 = domRef.current) == null ? void 0 : _a2.offsetWidth;
const scrollWidth = window.innerWidth - document.documentElement.clientWidth;
if (currentWidth && currentWidth + scrollWidth == prevWidth.current) {
return;
}
if (currentWidth !== prevWidth.current) {
updateWidth();
setIsMenuOpen(false);
}
}
});
(0, import_react.useEffect)(() => {
var _a2;
updateWidth();
navHeight.current = ((_a2 = domRef.current) == null ? void 0 : _a2.offsetHeight) || 0;
}, []);
const slots = (0, import_react.useMemo)(
() => (0, import_theme.navbar)({
...variantProps,
disableAnimation,
hideOnScroll: shouldHideOnScroll
}),
[(0, import_shared_utils.objectToDeps)(variantProps), disableAnimation, shouldHideOnScroll]
);
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
(0, import_use_scroll_position.useScrollPosition)({
elementRef: parentRef,
isEnabled: shouldHideOnScroll || !disableScrollHandler,
callback: ({ prevPos, currPos }) => {
onScrollPositionChange == null ? void 0 : onScrollPositionChange(currPos.y);
if (shouldHideOnScroll) {
setIsHidden((prev) => {
const next = currPos.y > prevPos.y && currPos.y > navHeight.current;
return next !== prev ? next : prev;
});
}
}
});
const getBaseProps = (props2 = {}) => ({
...(0, import_utils.mergeProps)(otherProps, props2),
"data-hidden": (0, import_shared_utils.dataAttr)(isHidden),
"data-menu-open": (0, import_shared_utils.dataAttr)(isMenuOpen),
ref: domRef,
className: slots.base({ class: (0, import_shared_utils.clsx)(baseStyles, props2 == null ? void 0 : props2.className) }),
style: {
"--navbar-height": typeof height === "number" ? `${height}px` : height,
...otherProps == null ? void 0 : otherProps.style,
...props2 == null ? void 0 : props2.style
}
});
const getWrapperProps = (props2 = {}) => ({
...props2,
"data-menu-open": (0, import_shared_utils.dataAttr)(isMenuOpen),
className: slots.wrapper({ class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.wrapper, props2 == null ? void 0 : props2.className) })
});
return {
Component,
slots,
domRef,
height,
isHidden,
disableAnimation,
shouldHideOnScroll,
isMenuOpen,
classNames,
setIsMenuOpen,
motionProps,
getBaseProps,
getWrapperProps
};
}
// src/navbar-context.ts
var import_react_utils2 = require("@heroui/react-utils");
var [NavbarProvider, useNavbarContext] = (0, import_react_utils2.createContext)({
name: "NavbarContext",
strict: true,
errorMessage: "useNavbarContext: `context` is undefined. Seems you forgot to wrap component within <Navbar />"
});
// src/navbar.tsx
var import_system3 = require("@heroui/system");
var import_react_utils4 = require("@heroui/react-utils");
var import_framer_motion2 = require("framer-motion");
var import_utils4 = require("@react-aria/utils");
// src/navbar-transitions.ts
var import_framer_utils = require("@heroui/framer-utils");
var hideOnScrollVariants = {
visible: {
y: 0,
transition: {
ease: import_framer_utils.TRANSITION_EASINGS.easeOut
}
},
hidden: {
y: "-100%",
transition: {
ease: import_framer_utils.TRANSITION_EASINGS.easeIn
}
}
};
// src/navbar-menu.tsx
var import_system2 = require("@heroui/system");
var import_react_utils3 = require("@heroui/react-utils");
var import_shared_utils2 = require("@heroui/shared-utils");
var import_framer_motion = require("framer-motion");
var import_utils3 = require("@react-aria/utils");
var import_overlays2 = require("@react-aria/overlays");
// src/navbar-menu-transitions.ts
var menuVariants = {
enter: {
height: "calc(100vh - var(--navbar-height))",
transition: {
duration: 0.3,
easings: "easeOut"
}
},
exit: {
height: 0,
transition: {
duration: 0.25,
easings: "easeIn"
}
}
};
// src/navbar-menu.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var domAnimation = () => import("@heroui/dom-animation").then((res) => res.default);
var NavbarMenu = (0, import_system2.forwardRef)((props, ref) => {
var _a, _b;
const { className, children, portalContainer, motionProps, style, ...otherProps } = props;
const domRef = (0, import_react_utils3.useDOMRef)(ref);
const { slots, isMenuOpen, height, disableAnimation, classNames } = useNavbarContext();
const styles = (0, import_shared_utils2.clsx)(classNames == null ? void 0 : classNames.menu, className);
if (disableAnimation) {
if (!isMenuOpen)
return null;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays2.Overlay, { portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"ul",
{
ref: domRef,
className: (_a = slots.menu) == null ? void 0 : _a.call(slots, { class: styles }),
"data-open": (0, import_shared_utils2.dataAttr)(isMenuOpen),
style: {
"--navbar-height": typeof height === "number" ? `${height}px` : height
},
...otherProps,
children
}
) });
}
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { mode: "wait", children: isMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays2.Overlay, { portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.LazyMotion, { features: domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_framer_motion.m.ul,
{
ref: domRef,
layoutScroll: true,
animate: "enter",
className: (_b = slots.menu) == null ? void 0 : _b.call(slots, { class: styles }),
"data-open": (0, import_shared_utils2.dataAttr)(isMenuOpen),
exit: "exit",
initial: "exit",
style: {
"--navbar-height": typeof height === "number" ? `${height}px` : height,
...style
},
variants: menuVariants,
...(0, import_utils3.mergeProps)(motionProps, otherProps),
children
}
) }) }) : null });
});
NavbarMenu.displayName = "HeroUI.NavbarMenu";
var navbar_menu_default = NavbarMenu;
// src/navbar.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var domAnimation2 = () => import("@heroui/dom-animation").then((res) => res.default);
var Navbar = (0, import_system3.forwardRef)((props, ref) => {
const { children, ...otherProps } = props;
const context = useNavbar({ ...otherProps, ref });
const Component = context.Component;
const [childrenWithoutMenu, menu] = (0, import_react_utils4.pickChildren)(children, navbar_menu_default);
const content = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("header", { ...context.getWrapperProps(), children: childrenWithoutMenu }),
menu
] });
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(NavbarProvider, { value: context, children: context.shouldHideOnScroll ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_framer_motion2.LazyMotion, { features: domAnimation2, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
import_framer_motion2.m.nav,
{
animate: context.isHidden ? "hidden" : "visible",
initial: false,
variants: hideOnScrollVariants,
...(0, import_utils4.mergeProps)(context.getBaseProps(), context.motionProps),
children: content
}
) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component, { ...context.getBaseProps(), children: content }) });
});
Navbar.displayName = "HeroUI.Navbar";
var navbar_default = Navbar;
// src/navbar-brand.tsx
var import_system4 = require("@heroui/system");
var import_react_utils5 = require("@heroui/react-utils");
var import_shared_utils3 = require("@heroui/shared-utils");
var import_jsx_runtime3 = require("react/jsx-runtime");
var NavbarBrand = (0, import_system4.forwardRef)((props, ref) => {
var _a;
const { as, className, children, ...otherProps } = props;
const Component = as || "div";
const domRef = (0, import_react_utils5.useDOMRef)(ref);
const { slots, classNames } = useNavbarContext();
const styles = (0, import_shared_utils3.clsx)(classNames == null ? void 0 : classNames.brand, className);
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Component, { ref: domRef, className: (_a = slots.brand) == null ? void 0 : _a.call(slots, { class: styles }), ...otherProps, children });
});
NavbarBrand.displayName = "HeroUI.NavbarBrand";
var navbar_brand_default = NavbarBrand;
// src/navbar-content.tsx
var import_system5 = require("@heroui/system");
var import_react_utils6 = require("@heroui/react-utils");
var import_shared_utils4 = require("@heroui/shared-utils");
var import_jsx_runtime4 = require("react/jsx-runtime");
var NavbarContent = (0, import_system5.forwardRef)((props, ref) => {
var _a;
const { as, className, children, justify = "start", ...otherProps } = props;
const Component = as || "ul";
const domRef = (0, import_react_utils6.useDOMRef)(ref);
const { slots, classNames } = useNavbarContext();
const styles = (0, import_shared_utils4.clsx)(classNames == null ? void 0 : classNames.content, className);
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
Component,
{
ref: domRef,
className: (_a = slots.content) == null ? void 0 : _a.call(slots, { class: styles }),
"data-justify": justify,
...otherProps,
children
}
);
});
NavbarContent.displayName = "HeroUI.NavbarContent";
var navbar_content_default = NavbarContent;
// src/navbar-item.tsx
var import_system6 = require("@heroui/system");
var import_react_utils7 = require("@heroui/react-utils");
var import_shared_utils5 = require("@heroui/shared-utils");
var import_jsx_runtime5 = require("react/jsx-runtime");
var NavbarItem = (0, import_system6.forwardRef)((props, ref) => {
var _a;
const { as, className, children, isActive, ...otherProps } = props;
const Component = as || "li";
const domRef = (0, import_react_utils7.useDOMRef)(ref);
const { slots, classNames } = useNavbarContext();
const styles = (0, import_shared_utils5.clsx)(classNames == null ? void 0 : classNames.item, className);
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
Component,
{
ref: domRef,
className: (_a = slots.item) == null ? void 0 : _a.call(slots, { class: styles }),
"data-active": (0, import_shared_utils5.dataAttr)(isActive),
...otherProps,
children
}
);
});
NavbarItem.displayName = "HeroUI.NavbarItem";
var navbar_item_default = NavbarItem;
// src/navbar-menu-toggle.tsx
var import_button = require("@react-aria/button");
var import_system7 = require("@heroui/system");
var import_react_utils8 = require("@heroui/react-utils");
var import_shared_utils6 = require("@heroui/shared-utils");
var import_toggle = require("@react-stately/toggle");
var import_focus = require("@react-aria/focus");
var import_utils5 = require("@react-aria/utils");
var import_interactions = require("@react-aria/interactions");
var import_react2 = require("react");
var import_jsx_runtime6 = require("react/jsx-runtime");
var NavbarMenuToggle = (0, import_system7.forwardRef)((props, ref) => {
var _a;
const {
as,
icon,
className,
onChange,
autoFocus,
srOnlyText: srOnlyTextProp,
...otherProps
} = props;
const Component = as || "button";
const domRef = (0, import_react_utils8.useDOMRef)(ref);
const { slots, classNames, isMenuOpen, setIsMenuOpen } = useNavbarContext();
const handleChange = (isOpen) => {
onChange == null ? void 0 : onChange(isOpen);
setIsMenuOpen(isOpen);
};
const state = (0, import_toggle.useToggleState)({ ...otherProps, isSelected: isMenuOpen, onChange: handleChange });
const { buttonProps, isPressed } = (0, import_button.useToggleButton)(props, state, domRef);
const { isFocusVisible, focusProps } = (0, import_focus.useFocusRing)({ autoFocus });
const { isHovered, hoverProps } = (0, import_interactions.useHover)({});
const toggleStyles = (0, import_shared_utils6.clsx)(classNames == null ? void 0 : classNames.toggle, className);
const child = (0, import_react2.useMemo)(() => {
if (typeof icon === "function") {
return icon(isMenuOpen != null ? isMenuOpen : false);
}
return icon || /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: slots.toggleIcon({ class: classNames == null ? void 0 : classNames.toggleIcon }) });
}, [icon, isMenuOpen, slots.toggleIcon, classNames == null ? void 0 : classNames.toggleIcon]);
const srOnlyText = (0, import_react2.useMemo)(() => {
if (srOnlyTextProp) {
return srOnlyTextProp;
}
return state.isSelected ? "close navigation menu" : "open navigation menu";
}, [srOnlyTextProp, isMenuOpen]);
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
Component,
{
ref: domRef,
className: (_a = slots.toggle) == null ? void 0 : _a.call(slots, { class: toggleStyles }),
"data-focus-visible": (0, import_shared_utils6.dataAttr)(isFocusVisible),
"data-hover": (0, import_shared_utils6.dataAttr)(isHovered),
"data-open": (0, import_shared_utils6.dataAttr)(isMenuOpen),
"data-pressed": (0, import_shared_utils6.dataAttr)(isPressed),
...(0, import_utils5.mergeProps)(buttonProps, focusProps, hoverProps, otherProps),
children: [
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: slots.srOnly(), children: srOnlyText }),
child
]
}
);
});
NavbarMenuToggle.displayName = "HeroUI.NavbarMenuToggle";
var navbar_menu_toggle_default = NavbarMenuToggle;
// src/navbar-menu-item.tsx
var import_system8 = require("@heroui/system");
var import_react_utils9 = require("@heroui/react-utils");
var import_shared_utils7 = require("@heroui/shared-utils");
var import_jsx_runtime7 = require("react/jsx-runtime");
var NavbarMenuItem = (0, import_system8.forwardRef)((props, ref) => {
var _a;
const { className, children, isActive, ...otherProps } = props;
const domRef = (0, import_react_utils9.useDOMRef)(ref);
const { slots, isMenuOpen, classNames } = useNavbarContext();
const styles = (0, import_shared_utils7.clsx)(classNames == null ? void 0 : classNames.menuItem, className);
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
"li",
{
ref: domRef,
className: (_a = slots.menuItem) == null ? void 0 : _a.call(slots, { class: styles }),
"data-active": (0, import_shared_utils7.dataAttr)(isActive),
"data-open": (0, import_shared_utils7.dataAttr)(isMenuOpen),
...otherProps,
children
}
);
});
NavbarMenuItem.displayName = "HeroUI.NavbarMenuItem";
var navbar_menu_item_default = NavbarMenuItem;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Navbar,
NavbarBrand,
NavbarContent,
NavbarItem,
NavbarMenu,
NavbarMenuItem,
NavbarMenuToggle,
NavbarProvider,
useNavbar,
useNavbarContext
});
@@ -0,0 +1,2 @@
import { RoundingModeType, UnsignedRoundingModeType } from '../types/number';
export declare function GetUnsignedRoundingMode(roundingMode: RoundingModeType, isNegative: boolean): UnsignedRoundingModeType;
@@ -0,0 +1,6 @@
import * as ts from 'typescript';
import type { TSESTreeOptions } from '../parser-options';
import type { MutableParseSettings } from './index';
export declare function createParseSettings(code: string | ts.SourceFile, tsestreeOptions?: Partial<TSESTreeOptions>): MutableParseSettings;
export declare function clearTSConfigMatchCache(): void;
export declare function clearTSServerProjectService(): void;
@@ -0,0 +1,23 @@
import { time, frame, cancelFrame } from 'motion-dom';
import { secondsToMilliseconds } from 'motion-utils';
/**
* Timeout defined in ms
*/
function delay(callback, timeout) {
const start = time.now();
const checkElapsed = ({ timestamp }) => {
const elapsed = timestamp - start;
if (elapsed >= timeout) {
cancelFrame(checkElapsed);
callback(elapsed - timeout);
}
};
frame.setup(checkElapsed, true);
return () => cancelFrame(checkElapsed);
}
function delayInSeconds(callback, timeout) {
return delay(callback, secondsToMilliseconds(timeout));
}
export { delay, delayInSeconds };
@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_arraySupport=t()}(this,(function(){"use strict";return function(e,t,n){var o=t.prototype,i=function(e){var t=e.date,o=e.utc;return Array.isArray(t)?o?t.length?new Date(Date.UTC.apply(null,t)):new Date:1===t.length?n(String(t[0])).toDate():new(Function.prototype.bind.apply(Date,[null].concat(t))):t},a=o.parse;o.parse=function(e){e.date=i.bind(this)(e),a.bind(this)(e)}}}));
@@ -0,0 +1,37 @@
# @codemirror/view [![NPM version](https://img.shields.io/npm/v/@codemirror/view.svg)](https://www.npmjs.org/package/@codemirror/view)
[ [**WEBSITE**](https://codemirror.net/) | [**DOCS**](https://codemirror.net/docs/ref/#view) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/view/blob/main/CHANGELOG.md) ]
This package implements the DOM view component for the
[CodeMirror](https://codemirror.net/) code editor.
The [project page](https://codemirror.net/) has more information, a
number of [examples](https://codemirror.net/examples/) and the
[documentation](https://codemirror.net/docs/).
This code is released under an
[MIT license](https://github.com/codemirror/view/tree/main/LICENSE).
We aim to be an inclusive, welcoming community. To make that explicit,
we have a [code of
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
to communication around the project.
## Usage
```javascript
import {EditorView} from "@codemirror/view"
import {basicSetup} from "codemirror"
const view = new EditorView({
parent: document.querySelector("#some-node"),
doc: "Content text",
extensions: [basicSetup /* ... */]
})
```
Add additional extensions, such as a [language
mode](https://codemirror.net/#languages), to configure the editor.
Call
[`view.dispatch`](https://codemirror.net/docs/ref/#view.EditorView.dispatch)
to update the editor's state.
@@ -0,0 +1,195 @@
export declare enum ImportType {
/**
* A normal static using any syntax variations
* import .. from 'module'
*/
Static = 1,
/**
* A dynamic import expression `import(specifier)`
* or `import(specifier, opts)`
*/
Dynamic = 2,
/**
* An import.meta expression
*/
ImportMeta = 3,
/**
* A source phase import
* import source x from 'module'
*/
StaticSourcePhase = 4,
/**
* A dynamic source phase import
* import.source('module')
*/
DynamicSourcePhase = 5,
/**
* A defer phase import
* import defer * as x from 'module'
*/
StaticDeferPhase = 6,
/**
* A dynamic defer phase import
* import.defer('module')
*/
DynamicDeferPhase = 7
}
export interface ImportSpecifier {
/**
* Module name
*
* To handle escape sequences in specifier strings, the .n field of imported specifiers will be provided where possible.
*
* For dynamic import expressions, this field will be empty if not a valid JS string.
* For static import expressions, this field will always be populated.
*
* @example
* const [imports1, exports1] = parse(String.raw`import './\u0061\u0062.js'`);
* imports1[0].n;
* // Returns "./ab.js"
*
* const [imports2, exports2] = parse(`import("./ab.js")`);
* imports2[0].n;
* // Returns "./ab.js"
*
* const [imports3, exports3] = parse(`import("./" + "ab.js")`);
* imports3[0].n;
* // Returns undefined
*/
readonly n: string | undefined;
/**
* Type of import statement
*/
readonly t: ImportType;
/**
* Start of module specifier
*
* @example
* const source = `import { a } from 'asdf'`;
* const [imports, exports] = parse(source);
* source.substring(imports[0].s, imports[0].e);
* // Returns "asdf"
*/
readonly s: number;
/**
* End of module specifier
*/
readonly e: number;
/**
* Start of import statement
*
* @example
* const source = `import { a } from 'asdf'`;
* const [imports, exports] = parse(source);
* source.substring(imports[0].ss, imports[0].se);
* // Returns "import { a } from 'asdf';"
*/
readonly ss: number;
/**
* End of import statement
*/
readonly se: number;
/**
* If this import keyword is a dynamic import, this is the start value.
* If this import keyword is a static import, this is -1.
* If this import keyword is an import.meta expresion, this is -2.
*/
readonly d: number;
/**
* If this import has an import assertion, this is the start value.
* Otherwise this is `-1`.
*/
readonly a: number;
}
export interface ExportSpecifier {
/**
* Exported name
*
* @example
* const source = `export default []`;
* const [imports, exports] = parse(source);
* exports[0].n;
* // Returns "default"
*
* @example
* const source = `export const asdf = 42`;
* const [imports, exports] = parse(source);
* exports[0].n;
* // Returns "asdf"
*/
readonly n: string;
/**
* Local name, or undefined.
*
* @example
* const source = `export default []`;
* const [imports, exports] = parse(source);
* exports[0].ln;
* // Returns undefined
*
* @example
* const asdf = 42;
* const source = `export { asdf as a }`;
* const [imports, exports] = parse(source);
* exports[0].ln;
* // Returns "asdf"
*/
readonly ln: string | undefined;
/**
* Start of exported name
*
* @example
* const source = `export default []`;
* const [imports, exports] = parse(source);
* source.substring(exports[0].s, exports[0].e);
* // Returns "default"
*
* @example
* const source = `export { 42 as asdf }`;
* const [imports, exports] = parse(source);
* source.substring(exports[0].s, exports[0].e);
* // Returns "asdf"
*/
readonly s: number;
/**
* End of exported name
*/
readonly e: number;
/**
* Start of local name, or -1.
*
* @example
* const asdf = 42;
* const source = `export { asdf as a }`;
* const [imports, exports] = parse(source);
* source.substring(exports[0].ls, exports[0].le);
* // Returns "asdf"
*/
readonly ls: number;
/**
* End of local name, or -1.
*/
readonly le: number;
}
export interface ParseError extends Error {
idx: number;
}
/**
* Outputs the list of exports and locations of import specifiers,
* including dynamic import and import meta handling.
*
* @param source Source code to parser
* @param name Optional sourcename
* @returns Tuple contaning imports list and exports list.
*/
export declare function parse(source: string, name?: string): readonly [
imports: ReadonlyArray<ImportSpecifier>,
exports: ReadonlyArray<ExportSpecifier>,
facade: boolean,
hasModuleSyntax: boolean
];
/**
* Wait for init to resolve before calling `parse`.
*/
export declare const init: Promise<void>;
export declare const initSync: () => void;
@@ -0,0 +1,467 @@
export default `flf2a$ 4 4 16 1 57
smkeyboard.flf
Adapted for figlet by Kent Nassen, kentn@cyberspace.org, 11/22/94, based
on the idea:
From: bas@damek.kth.se (Bas Meijer)
Newsgroups: rec.arts.ascii
Subject: Talk-line: keyboard.flf
Date: 22 Nov 1994 07:26:10 -0600
Organization: Royal Institute of Technology
Lines: 41
Sender: boba@gagme.wwa.com
Approved: boba@wwa.com
Message-ID: <3asrhi$con@gagme.wwa.com>
References: <3asltp$aog@gagme.wwa.com>
Reply-To: bas@damek.kth.se
NNTP-Posting-Host: gagme.wwa.com
In article aog@gagme.wwa.com, ssfiit@cs.umb.edu (SuperStreetFighter2Turbo) writes:
>
> I have composed a new figlet font! =)
> it is called keyboard.flf. It resemble the actual keyboard, well, kinda! =)
> anyway! here is a sample! =)
> _______ _______ _______ _______ _______ _______
> |\\ /|\\ /|\\ /|\\ /|\\ /|\\ /|
> | +---+ | +---+ | +---+ | +---+ | +---+ | +---+ |
> | | | | | | | | | | | | | | | | | | |
> | |s | | |a | | |m | | |p | | |l | | |e | |
> | +---+ | +---+ | +---+ | +---+ | +---+ | +---+ |
> |/_____\\|/_____\\|/_____\\|/_____\\|/_____\\|/_____\\|
____ _________ ____ ____ ____ _________ ____ ____ ____ _________
||A ||| |||B |||I |||T ||| |||T |||O |||O ||| ||
||__|||_______|||__|||__|||__|||_______|||__|||__|||__|||_______||
|/__\\|/_______\\|/__\\|/__\\|/__\\|/_______\\|/__\\|/__\\|/__\\|/_______\\|____
||B |||I |||G ||| |||I |||F ||| |||Y |||O |||U ||| ||
||__|||__|||__|||_______|||__|||__|||_______|||__|||__|||__|||_______||
|/__\\|/__\\|/__\\|/_______\\|/__\\|/__\\|/_______\\|/__\\|/__\\|/__\\|/_______\\|
||A |||S |||K ||| |||M |||E |||! ||| |||: |||) |||Return||
||__|||__|||__|||_______|||__|||__|||__|||_______|||__|||__||| ||
|/__\\|/__\\|/__\\|/_______\\|/__\\|/__\\|/__\\|/_______\\|/__\\|/__\\|/l ||
l|_____||
Bas. |/_____\\|
email: bas@damek.kth.se ____ ____ KTH, Dept. of Mach. Design
_______ ___ ______ / \\/ \\ ____________________________
( \\/ \\/ \\ / \\ ) ) ) ) \\
| | ) \\ \\___) / \\ \\__/\\ /\\ \\ \\__/ | )
| ( | \\_ \\ ( ( ) ) )_ ( )_) \\ )_| (
| | ) _ )\\ ) \\ \\__/ / / \\/ \\ / / \\ \\ \\
(_______/_/ \\__/_____/ \\ \\/ /_______)___)___/______)__/\\___)
\\____/\\____/
tel.: +46-(0)8-790 6308 S-100 44 Stockholm, Sweden
_________ @
|| ||@
||_______||@
|/_______\\|@@
____ @
||! ||@
||__||@
|/__\\|@@
____ @
||" ||@
||__||@
|/__\\|@@
____ @
||# ||@
||__||@
|/__\\|@@
____ @
||$ ||@
||__||@
|/__\\|@@
____ @
||% ||@
||__||@
|/__\\|@@
____ @
||& ||@
||__||@
|/__\\|@@
____ @
||' ||@
||__||@
|/__\\|@@
____ @
||( ||@
||__||@
|/__\\|@@
____ @
||) ||@
||__||@
|/__\\|@@
____ @
||* ||@
||__||@
|/__\\|@@
____ @
||+ ||@
||__||@
|/__\\|@@
____ @
||, ||@
||__||@
|/__\\|@@
____ @
||- ||@
||__||@
|/__\\|@@
____ @
||. ||@
||__||@
|/__\\|@@
____ @
||/ ||@
||__||@
|/__\\|@@
____ @
||0 ||@
||__||@
|/__\\|@@
____ @
||1 ||@
||__||@
|/__\\|@@
____ @
||2 ||@
||__||@
|/__\\|@@
____ @
||3 ||@
||__||@
|/__\\|@@
____ @
||4 ||@
||__||@
|/__\\|@@
____ @
||5 ||@
||__||@
|/__\\|@@
____ @
||6 ||@
||__||@
|/__\\|@@
____ @
||7 ||@
||__||@
|/__\\|@@
____ @
||8 ||@
||__||@
|/__\\|@@
____ @
||9 ||@
||__||@
|/__\\|@@
____ @
||: ||@
||__||@
|/__\\|@@
____ @
||; ||@
||__||@
|/__\\|@@
____ @
||< ||@
||__||@
|/__\\|@@
____ @
||= ||@
||__||@
|/__\\|@@
____ @
||> ||@
||__||@
|/__\\|@@
____ @
||? ||@
||__||@
|/__\\|@@
____ @
||@ ||@
||__||@
|/__\\|@@
____ @
||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 ||@
||__||@
|/__\\|@@
____ @
||[ ||@
||__||@
|/__\\|@@
____ @
||\\ ||@
||__||@
|/__\\|@@
____ @
||] ||@
||__||@
|/__\\|@@
____ @
||^ ||@
||__||@
|/__\\|@@
____ @
||_ ||@
||__||@
|/__\\|@@
____ @
||\` ||@
||__||@
|/__\\|@@
____ @
||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 ||@
||__||@
|/__\\|@@
____ @
||{ ||@
||__||@
|/__\\|@@
____ @
||| ||@
||__||@
|/__\\|@@
____ @
||} ||@
||__||@
|/__\\|@@
____ @
||~ ||@
||__||@
|/__\\|@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
`
@@ -0,0 +1,256 @@
# tinyexec 📟
> A minimal package for executing commands
This package was created to provide a minimal way of interacting with child
processes without having to manually deal with streams, piping, etc.
## Installing
```sh
$ npm i -S tinyexec
```
## Usage
A process can be spawned and awaited like so:
```ts
import {x} from 'tinyexec';
const result = await x('ls', ['-l']);
// result.stdout - the stdout as a string
// result.stderr - the stderr as a string
// result.exitCode - the process exit code as a number
```
You may also iterate over the lines of output via an async loop:
```ts
import {x} from 'tinyexec';
const proc = x('ls', ['-l']);
for await (const line of proc) {
// line will be from stderr/stdout in the order you'd see it in a term
}
```
### Options
Options can be passed to have finer control over spawning of the process:
```ts
await x('ls', [], {
timeout: 1000
});
```
The options object can have the following properties:
- `signal` - an `AbortSignal` to allow aborting of the execution
- `timeout` - time in milliseconds at which the process will be forceably killed
- `persist` - if `true`, the process will continue after the host exits
- `stdin` - another `Result` can be used as the input to this process
- `nodeOptions` - any valid options to node's underlying `spawn` function
- `throwOnError` - if true, non-zero exit codes will throw an error
### Piping to another process
You can pipe a process to another via the `pipe` method:
```ts
const proc1 = x('ls', ['-l']);
const proc2 = proc1.pipe('grep', ['.js']);
const result = await proc2;
console.log(result.stdout);
```
`pipe` takes the same options as a regular execution. For example, you can
pass a timeout to the pipe call:
```ts
proc1.pipe('grep', ['.js'], {
timeout: 2000
});
```
### Killing a process
You can kill the process via the `kill` method:
```ts
const proc = x('ls');
proc.kill();
// or with a signal
proc.kill('SIGHUP');
```
### Node modules/binaries
By default, node's available binaries from `node_modules` will be accessible
in your command.
For example, in a repo which has `eslint` installed:
```ts
await x('eslint', ['.']);
```
In this example, `eslint` will come from the locally installed `node_modules`.
### Using an abort signal
An abort signal can be passed to a process in order to abort it at a later
time. This will result in the process being killed and `aborted` being set
to `true`.
```ts
const aborter = new AbortController();
const proc = x('node', ['./foo.mjs'], {
signal: aborter.signal
});
// elsewhere...
aborter.abort();
await proc;
proc.aborted; // true
proc.killed; // true
```
### Using with command strings
If you need to continue supporting commands as strings (e.g. "command arg0 arg1"),
you can use [args-tokenizer](https://github.com/TrySound/args-tokenizer),
a lightweight library for parsing shell command strings into an array.
```ts
import {x} from 'tinyexec';
import {tokenizeArgs} from 'args-tokenizer';
const commandString = 'echo "Hello, World!"';
const [command, ...args] = tokenizeArgs(commandString);
const result = await x(command, args);
result.stdout; // Hello, World!
```
## API
Calling `x(command[, args])` returns an awaitable `Result` which has the
following API methods and properties available:
### `pipe(command[, args[, options]])`
Pipes the current command to another. For example:
```ts
x('ls', ['-l'])
.pipe('grep', ['js']);
```
The parameters are as follows:
- `command` - the command to execute (_without any arguments_)
- `args` - an array of arguments
- `options` - options object
### `process`
The underlying node `ChildProcess`. For example:
```ts
const proc = x('ls');
proc.process; // ChildProcess;
```
### `kill([signal])`
Kills the current process with the specified signal. By default, this will
use the `SIGTERM` signal.
For example:
```ts
const proc = x('ls');
proc.kill();
```
### `pid`
The current process ID. For example:
```ts
const proc = x('ls');
proc.pid; // number
```
### `aborted`
Whether the process has been aborted or not (via the `signal` originally
passed in the options object).
For example:
```ts
const proc = x('ls');
proc.aborted; // bool
```
### `killed`
Whether the process has been killed or not (e.g. via `kill()` or an abort
signal).
For example:
```ts
const proc = x('ls');
proc.killed; // bool
```
### `exitCode`
The exit code received when the process completed execution.
For example:
```ts
const proc = x('ls');
proc.exitCode; // number (e.g. 1)
```
## Comparison with other libraries
`tinyexec` aims to provide a lightweight layer on top of Node's own
`child_process` API.
Some clear benefits compared to other libraries are that `tinyexec` will be much lighter, have a much
smaller footprint and will have a less abstract interface (less "magic"). It
will also have equal security and cross-platform support to popular
alternatives.
There are various features other libraries include which we are unlikely
to ever implement, as they would prevent us from providing a lightweight layer.
For example, if you'd like write scripts rather than individual commands, and
prefer to use templating, we'd definitely recommend
[zx](https://github.com/google/zx). zx is a much higher level library which
does some of the same work `tinyexec` does but behind a template string
interface.
Similarly, libraries like `execa` will provide helpers for various things
like passing files as input to processes. We opt not to support features like
this since many of them are easy to do yourself (using Node's own APIs).
@@ -0,0 +1 @@
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAYM,MAAM;IAaX,mBAAmB,GAAW,EAAE,MAAc,EAAU;QACtD,IAAI,UAAU,IAAI,CAAC,QAAQ,CAAC,OAAO;QACnC,IAAI,CAAC,SAAS;YACZ,UAAU,0CAAoB,QAAQ,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa;YACvE,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG;QAC1B;QAEA,IAAI,SAAS,OAAO,CAAC,IAAI;QACzB,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,CAAC,4BAA4B,EAAE,IAAI,IAAI,EAAE,OAAO,OAAO,CAAC;QAG1E,OAAO;IACT;IAtBA,YAAY,QAA0B,EAAE,gBAAwB,OAAO,CAAE;QACvE,yDAAyD;QACzD,uGAAuG;QACvG,IAAI,CAAC,QAAQ,GAAG,OAAO,WAAW,CAChC,OAAO,OAAO,CAAC,UAAU,MAAM,CAAC,CAAC,GAAG,EAAE,GAAK;QAE7C,IAAI,CAAC,aAAa,GAAG;IACvB;AAgBF;AAEA,SAAS,0CAAoB,MAAc,EAAE,OAAyB,EAAE,gBAAgB,OAAO;IAC7F,sCAAsC;IACtC,IAAI,OAAO,CAAC,OAAO,EACjB,OAAO,OAAO,CAAC,OAAO;IAGxB,iDAAiD;IACjD,2EAA2E;IAC3E,8CAA8C;IAC9C,uEAAuE;IACvE,sDAAsD;IACtD,IAAI,WAAW,kCAAY;IAC3B,IAAI,OAAO,CAAC,SAAS,EACnB,OAAO,OAAO,CAAC,SAAS;IAG1B,IAAK,IAAI,OAAO,QAAS;QACvB,IAAI,IAAI,UAAU,CAAC,WAAW,MAC5B,OAAO,OAAO,CAAC,IAAI;IAEvB;IAEA,8BAA8B;IAC9B,OAAO,OAAO,CAAC,cAAc;AAC/B;AAEA,SAAS,kCAAY,MAAc;IACjC,IAAI,KAAK,MAAM,EACb,OAAO,IAAI,KAAK,MAAM,CAAC,QAAQ,QAAQ;IAGzC,OAAO,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE;AAC7B","sources":["packages/@internationalized/message/src/MessageDictionary.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\nexport type LocalizedStrings = {\n [lang: string]: {\n [key: string]: string\n }\n};\n\n/**\n * Stores a mapping of localized strings. Can be used to find the\n * closest available string for a given locale.\n */\nexport class MessageDictionary {\n private messages: LocalizedStrings;\n private defaultLocale: string;\n\n constructor(messages: LocalizedStrings, defaultLocale: string = 'en-US') {\n // Clone messages so we don't modify the original object.\n // Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin.\n this.messages = Object.fromEntries(\n Object.entries(messages).filter(([, v]) => v)\n );\n this.defaultLocale = defaultLocale;\n }\n\n getStringForLocale(key: string, locale: string): string {\n let strings = this.messages[locale];\n if (!strings) {\n strings = getStringsForLocale(locale, this.messages, this.defaultLocale);\n this.messages[locale] = strings;\n }\n\n let string = strings[key];\n if (!string) {\n throw new Error(`Could not find intl message ${key} in ${locale} locale`);\n }\n\n return string;\n }\n}\n\nfunction getStringsForLocale(locale: string, strings: LocalizedStrings, defaultLocale = 'en-US') {\n // If there is an exact match, use it.\n if (strings[locale]) {\n return strings[locale];\n }\n\n // Attempt to find the closest match by language.\n // For example, if the locale is fr-CA (French Canadian), but there is only\n // an fr-FR (France) set of strings, use that.\n // This could be replaced with Intl.LocaleMatcher once it is supported.\n // https://github.com/tc39/proposal-intl-localematcher\n let language = getLanguage(locale);\n if (strings[language]) {\n return strings[language];\n }\n\n for (let key in strings) {\n if (key.startsWith(language + '-')) {\n return strings[key];\n }\n }\n\n // Nothing close, use english.\n return strings[defaultLocale];\n}\n\nfunction getLanguage(locale: string) {\n if (Intl.Locale) {\n return new Intl.Locale(locale).language;\n }\n\n return locale.split('-')[0];\n}\n"],"names":[],"version":3,"file":"MessageDictionary.main.js.map"}
@@ -0,0 +1,41 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/colors/purple.ts
var purple_exports = {};
__export(purple_exports, {
purple: () => purple
});
module.exports = __toCommonJS(purple_exports);
var purple = {
50: "#f2eafa",
100: "#e4d4f4",
200: "#c9a9e9",
300: "#ae7ede",
400: "#9353d3",
500: "#7828c8",
600: "#6020a0",
700: "#481878",
800: "#301050",
900: "#180828"
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
purple
});
@@ -0,0 +1,69 @@
/**
* @import {Info, Space} from 'property-information'
*/
/**
* @typedef Definition
* Definition of a schema.
* @property {Record<string, string> | undefined} [attributes]
* Normalzed names to special attribute case.
* @property {ReadonlyArray<string> | undefined} [mustUseProperty]
* Normalized names that must be set as properties.
* @property {Record<string, number | null>} properties
* Property names to their types.
* @property {Space | undefined} [space]
* Space.
* @property {Transform} transform
* Transform a property name.
*/
/**
* @callback Transform
* Transform.
* @param {Record<string, string>} attributes
* Attributes.
* @param {string} property
* Property.
* @returns {string}
* Attribute.
*/
import {normalize} from '../normalize.js'
import {DefinedInfo} from './defined-info.js'
import {Schema} from './schema.js'
/**
* @param {Definition} definition
* Definition.
* @returns {Schema}
* Schema.
*/
export function create(definition) {
/** @type {Record<string, Info>} */
const properties = {}
/** @type {Record<string, string>} */
const normals = {}
for (const [property, value] of Object.entries(definition.properties)) {
const info = new DefinedInfo(
property,
definition.transform(definition.attributes || {}, property),
value,
definition.space
)
if (
definition.mustUseProperty &&
definition.mustUseProperty.includes(property)
) {
info.mustUseProperty = true
}
properties[property] = info
normals[normalize(property)] = property
normals[normalize(info.attribute)] = property
}
return new Schema(properties, normals, definition.space)
}
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setIsInjectableFlag = setIsInjectableFlag;
const reflect_metadata_utils_1 = require("@inversifyjs/reflect-metadata-utils");
const InversifyCoreError_1 = require("../../error/models/InversifyCoreError");
const InversifyCoreErrorKind_1 = require("../../error/models/InversifyCoreErrorKind");
const classIsInjectableFlagReflectKey_1 = require("../../reflectMetadata/data/classIsInjectableFlagReflectKey");
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
function setIsInjectableFlag(target) {
const isInjectableFlag = (0, reflect_metadata_utils_1.getOwnReflectMetadata)(target, classIsInjectableFlagReflectKey_1.classIsInjectableFlagReflectKey);
if (isInjectableFlag !== undefined) {
throw new InversifyCoreError_1.InversifyCoreError(InversifyCoreErrorKind_1.InversifyCoreErrorKind.injectionDecoratorConflict, `Cannot apply @injectable decorator multiple times at class "${target.name}"`);
}
(0, reflect_metadata_utils_1.setReflectMetadata)(target, classIsInjectableFlagReflectKey_1.classIsInjectableFlagReflectKey, true);
}
//# sourceMappingURL=setIsInjectableFlag.js.map
@@ -0,0 +1,11 @@
export declare enum EventName {
Click = "click",
DragStart = "dragstart",
Keydown = "keydown",
ContextMenu = "contextmenu",
Resize = "resize",
SelectionChange = "selectionchange",
VisibilityChange = "visibilitychange"
}
export declare function preventDefault(event: Event): void;
export declare function stopPropagation(event: Event): void;
@@ -0,0 +1,159 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor
// https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor
// eslint-disable-next-line max-lines-per-function, max-statements
module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
// this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic.
if (typeof O !== 'undefined' && !isObject(O)) {
throw new $TypeError('Assertion failed: O must be undefined or an Object');
}
if (typeof extensible !== 'boolean') {
throw new $TypeError('Assertion failed: extensible must be a Boolean');
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
}
if (typeof current !== 'undefined' && !isPropertyDescriptor(current)) {
throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined');
}
if (typeof O !== 'undefined' && !isPropertyKey(P)) {
throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key');
}
if (typeof current === 'undefined') {
if (!extensible) {
return false;
}
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': Desc['[[Configurable]]'],
'[[Enumerable]]': Desc['[[Enumerable]]'],
'[[Value]]': Desc['[[Value]]'],
'[[Writable]]': Desc['[[Writable]]']
}
);
}
} else {
if (!IsAccessorDescriptor(Desc)) {
throw new $TypeError('Assertion failed: Desc is not an accessor descriptor');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
}
return true;
}
if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) {
return true;
}
if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) {
return true; // removed by ES2017, but should still be correct
}
// "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor
if (!current['[[Configurable]]']) {
if (Desc['[[Configurable]]']) {
return false;
}
if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) {
return false;
}
}
if (IsGenericDescriptor(Desc)) {
// no further validation is required.
} else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
return false;
}
if (IsDataDescriptor(current)) {
if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Get]]': undefined
}
);
}
} else if (typeof O !== 'undefined') {
DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
{
'[[Configurable]]': current['[[Configurable]]'],
'[[Enumerable]]': current['[[Enumerable]]'],
'[[Value]]': undefined
}
);
}
} else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) {
if (!current['[[Configurable]]'] && !current['[[Writable]]']) {
if ('[[Writable]]' in Desc && Desc['[[Writable]]']) {
return false;
}
if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) {
return false;
}
return true;
}
} else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) {
if (!current['[[Configurable]]']) {
if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) {
return false;
}
if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) {
return false;
}
return true;
}
} else {
throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.');
}
if (typeof O !== 'undefined') {
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
Desc
);
}
return true;
};
@@ -0,0 +1,60 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _tslib = require("tslib");
var _throttle = _interopRequireDefault(require("lodash/throttle"));
var _react = require("react");
var useThrottlePlugin = function useThrottlePlugin(fetchInstance, _a) {
var throttleWait = _a.throttleWait,
throttleLeading = _a.throttleLeading,
throttleTrailing = _a.throttleTrailing;
var throttledRef = (0, _react.useRef)(undefined);
var options = {};
if (throttleLeading !== undefined) {
options.leading = throttleLeading;
}
if (throttleTrailing !== undefined) {
options.trailing = throttleTrailing;
}
(0, _react.useEffect)(function () {
if (throttleWait) {
var _originRunAsync_1 = fetchInstance.runAsync.bind(fetchInstance);
throttledRef.current = (0, _throttle["default"])(function (callback) {
callback();
}, throttleWait, options);
// throttle runAsync should be promise
// https://github.com/lodash/lodash/issues/4400#issuecomment-834800398
fetchInstance.runAsync = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return new Promise(function (resolve, reject) {
var _a;
(_a = throttledRef.current) === null || _a === void 0 ? void 0 : _a.call(throttledRef, function () {
_originRunAsync_1.apply(void 0, (0, _tslib.__spreadArray)([], (0, _tslib.__read)(args), false)).then(resolve)["catch"](reject);
});
});
};
return function () {
var _a;
fetchInstance.runAsync = _originRunAsync_1;
(_a = throttledRef.current) === null || _a === void 0 ? void 0 : _a.cancel();
};
}
}, [throttleWait, throttleLeading, throttleTrailing]);
if (!throttleWait) {
return {};
}
return {
onCancel: function onCancel() {
var _a;
(_a = throttledRef.current) === null || _a === void 0 ? void 0 : _a.cancel();
}
};
};
var _default = exports["default"] = useThrottlePlugin;
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = getImplicitRoleForOption;
/**
* Returns the implicit role for an option tag.
*/
function getImplicitRoleForOption() {
return 'option';
}
module.exports = exports.default;
@@ -0,0 +1,64 @@
import { update, extractCss } from '../update';
import { getSheet } from '../get-sheet';
describe('update', () => {
it('regression', () => {
const t = { data: '' };
update('css', t);
expect(t.data).toEqual('css');
});
it('regression: duplicate', () => {
const t = { data: '' };
update('css', t);
update('foo', t);
update('css', t);
expect(t.data).toEqual('cssfoo');
});
it('regression: extract and flush', () => {
update('filled', getSheet());
expect(extractCss()).toEqual(' filled');
expect(extractCss()).toEqual('');
});
it('regression: extract and flush without DOM', () => {
const bkp = global.self;
delete global.self;
update('filled', getSheet());
expect(extractCss()).toEqual('filled');
expect(extractCss()).toEqual('');
global.self = bkp;
});
it('regression: extract and flush from custom target', () => {
const target = document.createElement('div');
update('filled', getSheet());
update('filledbody', getSheet(target));
expect(extractCss(target)).toEqual(' filledbody');
expect(extractCss(target)).toEqual('');
});
it('regression: append or prepend', () => {
extractCss();
update('end', getSheet());
update('start', getSheet(), true);
expect(extractCss()).toEqual('startend');
});
it('regression: global style replacement', () => {
const t = { data: 'html, body { background-color: white; }' };
update(
'html, body { background-color: black; }',
t,
undefined,
'html, body { background-color: white; }'
);
expect(t.data).toEqual('html, body { background-color: black; }');
});
});
@@ -0,0 +1 @@
{"name":"@types/event-source-polyfill","version":"1.0.5","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532089978,"integrity":"sha512-HQaIQk9pwOcyKutyDk4o2a87WnotwYuLGYFW43emGm4FvIJFKPyg+OYaw5sTegKAKf+C5SKa1ACjzCLivbaHrQ==","mode":420,"size":1141},"README.md":{"checkedAt":1794532116802,"integrity":"sha512-8aVjXUFdVTU8CQJ4AYi3A5mHVddrQ7KBR794VKltENRqt8FFgpCydf6Kx0vnarBbvE6oLGEtaGVyFBfiOVIr+Q==","mode":420,"size":511},"index.d.ts":{"checkedAt":1794532116802,"integrity":"sha512-kWij8xsWE9kCw95lyTXSxu4M8VTD/pAN/vPqvWemjKtcP/3F5OH9qv+24nkXZ6ptEPCm/u646XJ5gcXoKuP8TQ==","mode":420,"size":2704},"package.json":{"checkedAt":1794532116802,"integrity":"sha512-o+Oaqy09V/QhmzXhWkw8ujvNgTp9eOt3VrEeUkwNe9BWr1zOwwYxUTLJ1dwFYhjNlvgjbB+b9Lq8oOKVT7JvZA==","mode":420,"size":843}}}
@@ -0,0 +1,6 @@
function isFunction(value) {
return typeof value === "function";
}
export {
isFunction
};
@@ -0,0 +1,44 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _map2 = require('./internal/map.js');
var _map3 = _interopRequireDefault(_map2);
var _eachOfSeries = require('./eachOfSeries.js');
var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
*
* @name mapSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.map]{@link module:Collections.map}
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* The iteratee should complete with the transformed item.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. Results is an array of the
* transformed items from the `coll`. Invoked with (err, results).
* @returns {Promise} a promise, if no callback is passed
*/
function mapSeries(coll, iteratee, callback) {
return (0, _map3.default)(_eachOfSeries2.default, coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(mapSeries, 3);
module.exports = exports.default;
@@ -0,0 +1,31 @@
"use client";
import {
useModalContext
} from "./chunk-UX6VCJJD.mjs";
// src/modal-footer.tsx
import { forwardRef } from "@heroui/system";
import { useDOMRef } from "@heroui/react-utils";
import { clsx } from "@heroui/shared-utils";
import { jsx } from "react/jsx-runtime";
var ModalFooter = forwardRef((props, ref) => {
const { as, children, className, ...otherProps } = props;
const { slots, classNames } = useModalContext();
const domRef = useDOMRef(ref);
const Component = as || "footer";
return /* @__PURE__ */ jsx(
Component,
{
ref: domRef,
className: slots.footer({ class: clsx(classNames == null ? void 0 : classNames.footer, className) }),
...otherProps,
children
}
);
});
ModalFooter.displayName = "HeroUI.ModalFooter";
var modal_footer_default = ModalFooter;
export {
modal_footer_default
};
@@ -0,0 +1,35 @@
import apply from './_apply.js';
import baseRest from './_baseRest.js';
import isError from './isError.js';
/**
* Attempts to invoke `func`, returning either the result or the caught error
* object. Any additional arguments are provided to `func` when it's invoked.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {Function} func The function to attempt.
* @param {...*} [args] The arguments to invoke `func` with.
* @returns {*} Returns the `func` result or error object.
* @example
*
* // Avoid throwing errors for invalid selectors.
* var elements = _.attempt(function(selector) {
* return document.querySelectorAll(selector);
* }, '>_>');
*
* if (_.isError(elements)) {
* elements = [];
* }
*/
var attempt = baseRest(function(func, args) {
try {
return apply(func, undefined, args);
} catch (e) {
return isError(e) ? e : new Error(e);
}
});
export default attempt;
@@ -0,0 +1,58 @@
export interface Config {
/**
* Integer indicating size of LRU cache used for memoizing results.
* - Cache might be up to twice as big as `cacheSize`
* - No cache is used for values <= 0
*/
cacheSize: number
/**
* Prefix added to Tailwind-generated classes
* @see https://tailwindcss.com/docs/configuration#prefix
*/
prefix?: string
/**
* Custom separator for modifiers in Tailwind classes
* @see https://tailwindcss.com/docs/configuration#separator
*/
separator?: string
/**
* Theme scales used in classGroups.
* The keys are the same as in the Tailwind config but the values are sometimes defined more broadly.
*/
theme: ThemeObject
/**
* Object with groups of classes.
* @example
* {
* // Creates group of classes `group`, `of` and `classes`
* 'group-id': ['group', 'of', 'classes'],
* // Creates group of classes `look-at-me-other` and `look-at-me-group`.
* 'other-group': [{ 'look-at-me': ['other', 'group']}]
* }
*/
classGroups: Record<ClassGroupId, ClassGroup>
/**
* Conflicting classes across groups.
* The key is ID of class group which creates conflict, values are IDs of class groups which receive a conflict.
* A class group ID is the key of a class group in classGroups object.
* @example { gap: ['gap-x', 'gap-y'] }
*/
conflictingClassGroups: Record<ClassGroupId, readonly ClassGroupId[]>
/**
* Postfix modifiers conflicting with other class groups.
* A class group ID is the key of a class group in classGroups object.
* @example { 'font-size': ['leading'] }
*/
conflictingClassGroupModifiers?: Record<ClassGroupId, readonly ClassGroupId[]>
}
export type ThemeObject = Record<string, ClassGroup>
export type ClassGroupId = string
export type ClassGroup = readonly ClassDefinition[]
type ClassDefinition = string | ClassValidator | ThemeGetter | ClassObject
export type ClassValidator = (classPart: string) => boolean
export interface ThemeGetter {
(theme: ThemeObject): ClassGroup
isThemeGetter: true
}
type ClassObject = Record<string, readonly ClassDefinition[]>
@@ -0,0 +1,2 @@
export declare function optional(): MethodDecorator & ParameterDecorator & PropertyDecorator;
//# sourceMappingURL=optional.d.ts.map
@@ -0,0 +1,12 @@
export default KEYS;
export type VisitorKeys = {
readonly [type: string]: ReadonlyArray<string>;
};
/**
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
*/
/**
* @type {VisitorKeys}
*/
declare const KEYS: VisitorKeys;
//# sourceMappingURL=visitor-keys.d.ts.map
@@ -0,0 +1,22 @@
{
"author": "Mikeal Rogers <mikeal.rogers@gmail.com> (http://www.futurealoof.com)",
"name": "tunnel-agent",
"license": "Apache-2.0",
"description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.",
"version": "0.6.0",
"repository": {
"url": "https://github.com/mikeal/tunnel-agent"
},
"main": "index.js",
"files": [
"index.js"
],
"dependencies": {
"safe-buffer": "^5.0.1"
},
"devDependencies": {},
"optionalDependencies": {},
"engines": {
"node": "*"
}
}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more