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

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

No files matched your search

@@ -0,0 +1,21 @@
MIT License
Copyright (c) Peculiar Ventures. All rights reserved.
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 @@
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_et=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e);function u(e,a,t,u){var s={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:["%d minuti","%d minutit"],h:["ühe tunni","tund aega","üks tund"],hh:["%d tunni","%d tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:["%d kuu","%d kuud"],y:["ühe aasta","aasta","üks aasta"],yy:["%d aasta","%d aastat"]};return a?(s[t][2]?s[t][2]:s[t][1]).replace("%d",e):(u?s[t][0]:s[t][1]).replace("%d",e)}var s={name:"et",weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"%s pärast",past:"%s tagasi",s:u,m:u,mm:u,h:u,hh:u,d:u,dd:"%d päeva",M:u,MM:u,y:u,yy:u},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"}};return t.default.locale(s,null,!0),s}));
@@ -0,0 +1,39 @@
// Malay [ms]
import dayjs from '../index';
var locale = {
name: 'ms',
weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
weekStart: 1,
formats: {
LT: 'HH.mm',
LTS: 'HH.mm.ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH.mm',
LLLL: 'dddd, D MMMM YYYY HH.mm'
},
relativeTime: {
future: 'dalam %s',
past: '%s yang lepas',
s: 'beberapa saat',
m: 'seminit',
mm: '%d minit',
h: 'sejam',
hh: '%d jam',
d: 'sehari',
dd: '%d hari',
M: 'sebulan',
MM: '%d bulan',
y: 'setahun',
yy: '%d tahun'
},
ordinal: function ordinal(n) {
return n + ".";
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1,85 @@
/**
* @fileoverview Rule to disallow an empty pattern
* @author Alberto Rodríguez
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
defaultOptions: [
{
allowObjectPatternsAsParameters: false,
},
],
docs: {
description: "Disallow empty destructuring patterns",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-empty-pattern",
},
schema: [
{
type: "object",
properties: {
allowObjectPatternsAsParameters: {
type: "boolean",
},
},
additionalProperties: false,
},
],
messages: {
unexpected: "Unexpected empty {{type}} pattern.",
},
},
create(context) {
const [{ allowObjectPatternsAsParameters }] = context.options;
return {
ObjectPattern(node) {
if (node.properties.length > 0) {
return;
}
// Allow {} and {} = {} empty object patterns as parameters when allowObjectPatternsAsParameters is true
if (
allowObjectPatternsAsParameters &&
(astUtils.isFunction(node.parent) ||
(node.parent.type === "AssignmentPattern" &&
astUtils.isFunction(node.parent.parent) &&
node.parent.right.type === "ObjectExpression" &&
node.parent.right.properties.length === 0))
) {
return;
}
context.report({
node,
messageId: "unexpected",
data: { type: "object" },
});
},
ArrayPattern(node) {
if (node.elements.length === 0) {
context.report({
node,
messageId: "unexpected",
data: { type: "array" },
});
}
},
};
},
};
@@ -0,0 +1,142 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "caractères", verb: "avoir" },
file: { unit: "octets", verb: "avoir" },
array: { unit: "éléments", verb: "avoir" },
set: { unit: "éléments", verb: "avoir" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "nombre";
}
case "object": {
if (Array.isArray(data)) {
return "tableau";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "entrée",
email: "adresse e-mail",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "date et heure ISO",
date: "date ISO",
time: "heure ISO",
duration: "durée ISO",
ipv4: "adresse IPv4",
ipv6: "adresse IPv6",
cidrv4: "plage IPv4",
cidrv6: "plage IPv6",
base64: "chaîne encodée en base64",
base64url: "chaîne encodée en base64url",
json_string: "chaîne JSON",
e164: "numéro E.164",
jwt: "JWT",
template_literal: "entrée",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Entrée invalide : ${issue.expected} attendu, ${parsedType(issue.input)} reçu`;
case "invalid_value":
if (issue.values.length === 1)
return `Entrée invalide : ${util.stringifyPrimitive(issue.values[0])} attendu`;
return `Option invalide : une valeur parmi ${util.joinValues(issue.values, "|")} attendue`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Trop grand : ${issue.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
return `Trop grand : ${issue.origin ?? "valeur"} doit être ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Trop petit : ${issue.origin} doit ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Trop petit : ${issue.origin} doit être ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Chaîne invalide : doit commencer par "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Chaîne invalide : doit se terminer par "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Chaîne invalide : doit inclure "${_issue.includes}"`;
if (_issue.format === "regex")
return `Chaîne invalide : doit correspondre au modèle ${_issue.pattern}`;
return `${Nouns[_issue.format] ?? issue.format} invalide`;
}
case "not_multiple_of":
return `Nombre invalide : doit être un multiple de ${issue.divisor}`;
case "unrecognized_keys":
return `Clé${issue.keys.length > 1 ? "s" : ""} non reconnue${issue.keys.length > 1 ? "s" : ""} : ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Clé invalide dans ${issue.origin}`;
case "invalid_union":
return "Entrée invalide";
case "invalid_element":
return `Valeur invalide dans ${issue.origin}`;
default:
return `Entrée invalide`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
@@ -0,0 +1,44 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const DEFAULT_VALUE = Object.freeze([])
/**
* Gets `resolvePaths` property from a given option object.
*
* @param {object|undefined} option - An option object to get.
* @returns {string[]|null} The `allowModules` value, or `null`.
*/
function get(option) {
if (option && option.resolvePaths && Array.isArray(option.resolvePaths)) {
return option.resolvePaths.map(String)
}
return null
}
/**
* Gets "resolvePaths" setting.
*
* 1. This checks `options` property, then returns it if exists.
* 2. This checks `settings.node` property, then returns it if exists.
* 3. This returns `[]`.
*
* @param {RuleContext} context - The rule context.
* @returns {string[]} A list of extensions.
*/
module.exports = function getResolvePaths(context, optionIndex = 0) {
return (
get(context.options && context.options[optionIndex]) ||
get(context.settings && context.settings.node) ||
DEFAULT_VALUE
)
}
module.exports.schema = {
type: "array",
items: { type: "string" },
uniqueItems: true,
}
@@ -0,0 +1,7 @@
import { OB11GroupNoticeEvent } from './OB11GroupNoticeEvent';
import { NapCatCore } from '../../../napcat-core';
export declare class OB11GroupAdminNoticeEvent extends OB11GroupNoticeEvent {
notice_type: string;
sub_type: 'set' | 'unset';
constructor(core: NapCatCore, group_id: number, user_id: number, sub_type: 'set' | 'unset');
}
@@ -0,0 +1,565 @@
export default `flf2a$ 5 5 10 -1 53
by Jerrad Pierce [http://www.pthbb.org/software/figlet/tsalagi.html]
11/97, 2/02, 8/02
Permission to modify granted, but please send me a copy or notify me.
Also available: best fit/match of characters, allow punctuation like . " ' ?
_______________________________________________________
( )
( __ _ _ _ __ __ )
( / _'_ | | | \\ / )
( | | | | \\/ )
( | @ \\ \\ / / )
( \\__/ \\/\\/ @ )
( )
( Syllabry Conversion Table )
( )
( a, a e, \` i, ~ o, q u, Q v, A )
( ------+-------+--------+-------+------+------ ) There is
( ga, s ) rhyme and
( ka, n ge, 1 gi, ! go, w gu, W gv, S ) reason
( ------+-------+--------+-------+------+------ )
( ha, d he, 2 hi, @ ho, e hu, E hv, D ) a \` ~ q Q A
( ------+-------+--------+-------+------+------ ) s
( la, f le, 3 li, # lo, r lu, R lv, F ) n 1 ! w W S
( ------+-------+--------+-------+------+------ ) d 2 @ e E D
( ma, g me, 4 mi, $ mo, t mu, T ) f 3 # r R F
( ------+-------+--------+-------+------+------ ) g 4 $ t T
( na, h ) h
( hna, m ) m
( nah, X ne, 5 ni, % no, y nu, Y nv, G ) X 5 % y Y G
( ------+-------+--------+-------+------+------ ) j 6 ^ u U H
( qua, j que, 6 qui, ^ quo, u quu, U quv, H ) k
( ------+-------+--------+-------+------+------ ) C 7 & i I J
( sa, k ) l 8 * o O K
( s, C se, 7 si, & so, i su, I sv, J ) / 9 (
( ------+-------+--------+-------+------+------ ) V
( da, l de, 8 di, * do, o du, O dv, K ) Z 0 ) p P L
( ta, / te, 9 ti, ( ) B < _ [ { N
( ------+-------+--------+-------+------+------ ) v > + ] } M
( dla, V ) b \\ | z x c
( tla, Z tle, 0 tli, ) tlo, p tlu, P tlv, L )
( ------+-------+--------+-------+------+------ )
( tsa, B tse, < tsi, _ tso, [ tsu, { tsv, N )
( ------+-------+--------+-------+------+------ )
( wa, v we, > wi, + wo, ] wu, } wv, M )
( ------+-------+--------+-------+------+------ )
( ya, b ye, \\ yi, | yo, z yu, x yv, c )
( )
(_______________________________________________________)
This uses the mapping of Joan Touzet's Freeware Cherokee font v1.02
font: http://www.atypical.net//Cherokee.html
keymap: http://www.atypical.net//CherTabl.html
$$ #
$$ #
$$ #
$$ #
$$ ##
__ __ #
\\ / #
\\/ #
/ #
@ ##
| | #
\` ' #
#
#
##
__ #
| | #
| \`' #
| #
_|_ ##
_ _ #
| | #
|__| #
| | #
| | ##
___ #
| #
|__ #
| | #
_| |_ ##
___ #
| #
|_ #
| \\ #
_|_/ ##
| | #
^ #
#
#
##
___ #
| | #
| #
/| #
@/ |_ ##
__, #
/ ' #
| #
| #
\\__/ ##
___ #
| #
| #
/| #
@/ |_ ##
_ #
/ \\ #
|~| | #
| |_| #
\\_/ ##
#
#
#
| #
/ ##
#
#
--- #
#
##
#
#
#
/\\ #
\\/ ##
#
| | | |#
| | | |#
| \\ /#
\\/ \\/ ##
___ #
| #
| #
| #
_|__| ##
_____ #
| #
|/u #
| #
__|__ ##
____ #
\`___ \\ #
| | #
|--' #
_|_ ##
/\\ #
_| @#
/ | #
| | #
\\_| ##
_ #
/ \\ | #
| \\| #
| /| #
\\_/ | ##
#
/\\ #
| \\ #
| \\ #
@| _|_##
#
__ #
/ \\ #
| #
(_|_/ ##
#
/| #
/_|_, #
| ' #
_|_ ##
__ #
/ ' #
\\_ #
\\ #
\`__/ ##
____ #
| | #
| _ #
| \\ #
\\_/ ##
/\\ #
\\/ #
#
/\\ #
\\/ ##
/\\ #
\\/ #
#
| #
/ ##
___ #
| | | #
| / #
| / #
|/ ##
#
#
--- #
--- #
##
/\\#
/\\ \`|#
/ | | |#
| |/ |#
\\|__/ ##
/~~\\ #
| #
~~ #
/\\ #
\\/ ##
_ #
/ \\ #
|_| #
| | #
@/ @/ ##
_ #
<_> #
#
| #
_|_ ##
__ #
/ _'_ #
| #
| @ #
\\__/ ##
__ #
/ \\ #
_ |#
/\\| |#
\\/ \\_/ ##
#
/\\ #
| | #
| | | _#
\\_\\'_/##
____ #
| | #
| #
| #
_|_ ##
_ #
\` | #
|-_| #
| #
_|_ ##
__ #
/ \\ #
| |"#
| | #
\\__/ ##
__ #
/ ' #
\\_ #
/ _ #
\\__, ##
_ #
() / '#
/~\\ #
| | #
\\_/ ##
_____ #
| \\ #
|__/ #
| \\ #
_| \\_ ##
_ #
/\\/ '#
/\\ #
| | #
\\/ ##
____ #
| \\ #
|__/ #
| #
.|__ ##
_ #
/ ' #
| __ #
|' \\ #
\\__/ ##
__ #
/ ~~ #
| #
| ~ #
\\__/ ##
__ #
/ | #
\\_ #
\\ #
|__/ ##
_ #
/\\/ \\ #
_| \\ ' #
/| #
\\/ ##
_ #
/ \\ #
| |) #
| | #
\\_/ ##
_ #
|\\ /| #
| | | #
| | #
.| |_##
#
|--\\ #
|_ #
| #
|--/ ##
__ #
\\ / #
\\/ #
_ / #
\\/ ##
_ #
/ \` \\ #
| _ |#
| | ' |#
\\_\\_/ ##
/\\ #
\\/\\_ #
/ / \\#
/\\ | |#
\\/ \\_/##
___ #
| #
| #
. | #
\\_/ ##
__, #
/ ' #
| #
| -+- #
\\__| ##
_ #
/ | #
_ | #
\`-| #
_|_ ##
_ #
| ' #
| #
| #
_|__| ##
___ _ #
| / #
|/\\ #
| \\ #
_|_ _\\_##
__ #
| | #
|-< #
| | #
>|__' ##
_ _ #
/| \` \\#
|/ |#
| |#
\\___/ ##
_ #
/ \\/\\ #
/\\' #
| | #
\\/ ##
___ #
| #
| #
|/|' #
_| | ##
___ #
| \\ #
|__/ #
| \\ #
| \\ ##
__ #
| \\ #
| \\ #
| / #
|__/ ##
__ #
\` \\ #
_ |#
| | |#
\\_|_/ ##
____ #
| > #
|-< #
| \\ #
_|__/ ##
___ #
| #
(>|__ #
| / #
|/ ##
___ #
| #
|_, #
| ' #
_|_ ##
_ _ _ #
| | | #
| | | #
\\ \\ / #
\\/\\/ ##
___ #
|_-_#
\`\\/\\ #
| | #
\\/ ##
__ #
/ \\ #
|____| #
| | #
\\__/ ##
___ #
| #
.|() #
()|' #
_|_ ##
___ #
| | | #
| #
| #
|_|_| ##
___ _ #
| | #
|---| #
| | #
\\_/ ##
___ #
| #
| #
| . #
\`__' ##
-|- #
| #
| #
| _ #
_| ##
__ #
\` \\ #
| #
|) / #
\\_/ ##
___ __#
| |#
\\ |#
\\ / #
\\/ ##
___ #
| #
(|_|_ #
| | #
\`_' ##
___ #
|__ #
_/ \\#
/ \\ |#
\\ / \`_/##
__ #
/ ' #
| ,_ #
| ' | #
\\__/ ##
__ #
/ \\ #
__\\___ #
\\ #
\\__/ ##
___ #
/ \\ #
\` | #
| #
\\_/ ##
#
, |~,#
@| | #
| / #
\\/ ##
__ #
/ ' #
| _ #
| | #
\\_/|\` ##
#
#
/| #
/_| #
_/ \\_##
__ #
/ '~ #
| #
| _ #
\\__| ##
____ #
| / #
/ #
/ #
/___| ##
_ #
/ ' #
/_ #
| | #
_| | ##
___ #
| #
_| #
/ | #
\\_' ##
___ #
| #
/ \\ #
/ |#
\\/ ('/ ##
_ #
/ \\ #
| | #
\\ | #
@_/ ##
_____ #
| | |#
| #
| #
_|_ ##
#
#
#
#
� ##
#
#
#
#
� ##
#
#
#
#
� ##
#
#
#
#
� ##
#
#
#
#
� ##
#
#
#
#
� ##
#
#
#
#
� ##
`
@@ -0,0 +1,174 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/linear/index.ts
var linear_exports = {};
__export(linear_exports, {
CheckLinearIcon: () => CheckLinearIcon,
ChevronCircleTopLinearIcon: () => ChevronCircleTopLinearIcon,
ClockCircleLinearIcon: () => ClockCircleLinearIcon,
CopyLinearIcon: () => CopyLinearIcon,
SearchLinearIcon: () => SearchLinearIcon
});
module.exports = __toCommonJS(linear_exports);
// src/linear/check.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var CheckLinearIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 2,
viewBox: "0 0 24 24",
width: "1em",
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "20 6 9 17 4 12" })
}
);
// src/linear/copy.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var CopyLinearIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M16 17.1c0 3.5-1.4 4.9-4.9 4.9H6.9C3.4 22 2 20.6 2 17.1v-4.2C2 9.4 3.4 8 6.9 8h4.2c3.5 0 4.9 1.4 4.9 4.9Z" }),
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M8 8V6.9C8 3.4 9.4 2 12.9 2h4.2C20.6 2 22 3.4 22 6.9v4.2c0 3.5-1.4 4.9-4.9 4.9H16" }),
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M16 12.9C16 9.4 14.6 8 11.1 8" })
]
}
);
// src/linear/chevron-circle-top.tsx
var import_jsx_runtime3 = require("react/jsx-runtime");
var ChevronCircleTopLinearIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"path",
{
d: "M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeMiterlimit: "10",
strokeWidth: "1.5"
}
),
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"path",
{
d: "M8.46997 13.26L12 9.73999L15.53 13.26",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5"
}
)
]
}
);
// src/linear/search.tsx
var import_jsx_runtime4 = require("react/jsx-runtime");
var SearchLinearIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 2,
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
"path",
{
d: "M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round"
}
),
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M22 22L20 20", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })
]
}
);
// src/linear/clock-circle-linear.tsx
var import_jsx_runtime5 = require("react/jsx-runtime");
var ClockCircleLinearIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 8v4l2.5 2.5", strokeLinecap: "round", strokeLinejoin: "round" })
] })
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
CheckLinearIcon,
ChevronCircleTopLinearIcon,
ClockCircleLinearIcon,
CopyLinearIcon,
SearchLinearIcon
});
@@ -0,0 +1,36 @@
var $7a155683b0d79a6a$exports = require("./getChildNodes.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "getItemCount", () => $e749fe52977fe2c2$export$77d5aafae4e095b2);
/*
* 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.
*/
const $e749fe52977fe2c2$var$cache = new WeakMap();
function $e749fe52977fe2c2$export$77d5aafae4e095b2(collection) {
let count = $e749fe52977fe2c2$var$cache.get(collection);
if (count != null) return count;
// TS isn't smart enough to know we've ensured count is a number, so use a new variable
let counter = 0;
let countItems = (items)=>{
for (let item of items)if (item.type === 'section') countItems((0, $7a155683b0d79a6a$exports.getChildNodes)(item, collection));
else counter++;
};
countItems(collection);
$e749fe52977fe2c2$var$cache.set(collection, counter);
return counter;
}
//# sourceMappingURL=getItemCount.main.js.map
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_call_check.cjs",
"module": "../../esm/_class_call_check.js"
}
@@ -0,0 +1,36 @@
import getParser, { Options as ParserOptions } from './parser/index.js';
import descriptionTokenizer from './parser/tokenizers/description.js';
import nameTokenizer from './parser/tokenizers/name.js';
import tagTokenizer from './parser/tokenizers/tag.js';
import typeTokenizer from './parser/tokenizers/type.js';
import getStringifier from './stringifier/index.js';
import alignTransform from './transforms/align.js';
import indentTransform from './transforms/indent.js';
import crlfTransform from './transforms/crlf.js';
import { flow as flowTransform } from './transforms/index.js';
import { rewireSpecs, rewireSource, seedBlock, seedTokens } from './util.js';
export * from './primitives.js';
export function parse(source: string, options: Partial<ParserOptions> = {}) {
return getParser(options)(source);
}
export const stringify = getStringifier();
export { default as inspect } from './stringifier/inspect.js';
export const transforms = {
flow: flowTransform,
align: alignTransform,
indent: indentTransform,
crlf: crlfTransform,
};
export const tokenizers = {
tag: tagTokenizer,
type: typeTokenizer,
name: nameTokenizer,
description: descriptionTokenizer,
};
export const util = { rewireSpecs, rewireSource, seedBlock, seedTokens };
@@ -0,0 +1 @@
{"name":"define-data-property","version":"1.1.4","requiresBuild":false,"files":{".eslintrc":{"checkedAt":1794532096448,"integrity":"sha512-xKtUOOFpL/p0gzsFdRTTchCvNGvwwXYSWbps8n8XG5o1gMF9MKaoMy/2JAH8PPMf1HcjkQKG01Y6UAi+vjnGwg==","mode":420,"size":291},".nycrc":{"checkedAt":1794532096449,"integrity":"sha512-42sgwWzusJB1Dzhl78jX/Zg65Oi0HDDMOGXS/Uklv1kCYn4fHtRsD/JFPwdu+d40vome9XdUspzRWEQAcTGEeQ==","mode":420,"size":216},"LICENSE":{"checkedAt":1794532096449,"integrity":"sha512-9CCWKHOyAcobQT+fPtmiq2F2+xkrIWD+4MQshpA5agEGKdLA+jCQ3LpOf7KqU2TmrzLa8AoocMeOs+/AxmpiBQ==","mode":420,"size":1071},"index.js":{"checkedAt":1794532096449,"integrity":"sha512-3CkalFfP/F9us5aU/ZHHKHdQKCm+8BsH2tXfR6EXUbKRDhgH1ShC+tONi4MJ622CB8BCznBaIRhmcXaVttbRvg==","mode":420,"size":2336},"test/index.js":{"checkedAt":1794532096449,"integrity":"sha512-TV1ib9sLP8zBg4lsfXTcMQcEBLpvMRZmyt+zMl/y8HmA2UK8elm8dM077/l8TB/i7kKEbC2lrtO9EH/Hi5Z3bQ==","mode":420,"size":10471},"package.json":{"checkedAt":1794532096449,"integrity":"sha512-S4G70x/V3c5Sj7Drzvu9p3iR8ST3+rkBnF/xvd3a+7Z5tePRMalMArSV5HMnmF+l7MYT96KhCeWPWZSzWPw7Dg==","mode":420,"size":2856},"tsconfig.json":{"checkedAt":1794532096449,"integrity":"sha512-iod2nixCSSJuiq1ljMhY1IjMfTAp5fa/gWg7cBswGF5l0tAUQAkS2MpoFJ4R/JV9VkKKNPXbB6ltWm8XUSooUw==","mode":420,"size":4883},"CHANGELOG.md":{"checkedAt":1794532096449,"integrity":"sha512-mzAGokwyjzoqBiqnTSnXz04YRdtCwuZP8w0+8J69VSKxwmA095CbWXdixKRA06wdB0+nsFQxQByc103b4QmL0w==","mode":420,"size":5390},"README.md":{"checkedAt":1794532096450,"integrity":"sha512-hzf9IDyRy+w2i9T4wV55mH0/sqbEwPVcRkPlMI0Uj639NhHBXBkTmoq5hoXlDkzy19F/sEPsFXqFYfJZypNptw==","mode":420,"size":2431},"index.d.ts":{"checkedAt":1794532096450,"integrity":"sha512-P8h7JS4qYmpt1S6qB3a9NsXBwxy6tYEohQlhXE+7zRbBtx2TaHuMAUC5kEenNgXMxcBIcHaanHv+9nxF/Ots3g==","mode":420,"size":315},".github/FUNDING.yml":{"checkedAt":1794532096450,"integrity":"sha512-gjFex6wbYgeDS9ouUJpNA72egEMzaquSrBz2IIFdp/wZAW9PGvPW+Qa0BWgVzIPVx6hUU98KvRNkCnGpjhPGFg==","mode":420,"size":591}}}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('inRange', require('../inRange'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,36 @@
var baseForOwn = require('./_baseForOwn'),
castFunction = require('./_castFunction');
/**
* Iterates over own enumerable string keyed properties of an object and
* invokes `iteratee` for each property. The iteratee is invoked with three
* arguments: (value, key, object). Iteratee functions may exit iteration
* early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 0.3.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forOwnRight
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forOwn(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forOwn(object, iteratee) {
return object && baseForOwn(object, castFunction(iteratee));
}
module.exports = forOwn;
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAqCM,SAAS,0CAA+B,KAAmB;IAChE,IAAI,oBACF,gBAAgB,EACjB,GAAG;IAEJ,IAAI,CAAC,cAAc,gBAAgB,GAAG,CAAA,GAAA,2CAAiB,EACrD,MAAM,YAAY,GAAG,IAAI,IAAI,MAAM,YAAY,IAAI,WACnD,MAAM,mBAAmB,GAAG,IAAI,IAAI,MAAM,mBAAmB,IAAI,IAAI,OACrE;IAGF,IAAI,iBAAiB,CAAA,GAAA,sDAAwB,EAAE;IAC/C,IAAI,eAAe,CAAA,GAAA,oBAAM,EAAE,IACzB,MAAM,YAAY,GAAG,IAAI,IAAI,MAAM,YAAY,IAAI,IAAI,OACvD;QAAC,MAAM,YAAY;KAAC;IAEtB,IAAI,OAAO,CAAA,GAAA,4CAAY,EAAE,OAAO,CAAA,GAAA,wBAAU,EAAE,CAAA,QAAS,IAAI,CAAA,GAAA,wCAAa,EAAE,OAAO;0BAAC;QAAY,IAAI;QAAC;KAAa,GAAG;IAEjH,iEAAiE;IACjE,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,eAAe,UAAU,IAAI,QAAQ,CAAC,KAAK,OAAO,CAAC,eAAe,UAAU,GAC9E,eAAe,aAAa,CAAC;IAEjC,uDAAuD;IACvD,GAAG;QAAC;QAAM,eAAe,UAAU;KAAC;IAEpC,IAAI,WAAW,CAAC;QACd,gBAAgB,gCAAU,cAAc;IAC1C;IAEA,OAAO;QACL,YAAY;sBACZ;sBACA;QACA,WAAW;yBACX;QACA,kBAAkB,IAAI,CAAA,GAAA,6CAAe,EAAE,MAAM;IAC/C;AACF;AAEA,SAAS,gCAAU,GAAa,EAAE,GAAQ;IACxC,IAAI,MAAM,IAAI,IAAI;IAClB,IAAI,IAAI,GAAG,CAAC,MACV,IAAI,MAAM,CAAC;SAEX,IAAI,GAAG,CAAC;IAGV,OAAO;AACT","sources":["packages/@react-stately/tree/src/useTreeState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, CollectionStateBase, DisabledBehavior, Expandable, Key, MultipleSelection, Node} from '@react-types/shared';\nimport {SelectionManager, useMultipleSelectionState} from '@react-stately/selection';\nimport {TreeCollection} from './TreeCollection';\nimport {useCallback, useEffect, useMemo} from 'react';\nimport {useCollection} from '@react-stately/collections';\nimport {useControlledState} from '@react-stately/utils';\n\nexport interface TreeProps<T> extends CollectionStateBase<T>, Expandable, MultipleSelection {\n /** Whether `disabledKeys` applies to all interactions, or only selection. */\n disabledBehavior?: DisabledBehavior\n}\nexport interface TreeState<T> {\n /** A collection of items in the tree. */\n readonly collection: Collection<Node<T>>,\n\n /** A set of keys for items that are disabled. */\n readonly disabledKeys: Set<Key>,\n\n /** A set of keys for items that are expanded. */\n readonly expandedKeys: Set<Key>,\n\n /** Toggles the expanded state for an item by its key. */\n toggleKey(key: Key): void,\n\n /** Replaces the set of expanded keys. */\n setExpandedKeys(keys: Set<Key>): void,\n\n /** A selection manager to read and update multiple selection state. */\n readonly selectionManager: SelectionManager\n}\n\n/**\n * Provides state management for tree-like components. Handles building a collection\n * of items from props, item expanded state, and manages multiple selection state.\n */\nexport function useTreeState<T extends object>(props: TreeProps<T>): TreeState<T> {\n let {\n onExpandedChange\n } = props;\n\n let [expandedKeys, setExpandedKeys] = useControlledState(\n props.expandedKeys ? new Set(props.expandedKeys) : undefined,\n props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : new Set(),\n onExpandedChange\n );\n\n let selectionState = useMultipleSelectionState(props);\n let disabledKeys = useMemo(() =>\n props.disabledKeys ? new Set(props.disabledKeys) : new Set<Key>()\n , [props.disabledKeys]);\n\n let tree = useCollection(props, useCallback(nodes => new TreeCollection(nodes, {expandedKeys}), [expandedKeys]), null);\n\n // Reset focused key if that item is deleted from the collection.\n useEffect(() => {\n if (selectionState.focusedKey != null && !tree.getItem(selectionState.focusedKey)) {\n selectionState.setFocusedKey(null);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [tree, selectionState.focusedKey]);\n\n let onToggle = (key: Key) => {\n setExpandedKeys(toggleKey(expandedKeys, key));\n };\n\n return {\n collection: tree,\n expandedKeys,\n disabledKeys,\n toggleKey: onToggle,\n setExpandedKeys,\n selectionManager: new SelectionManager(tree, selectionState)\n };\n}\n\nfunction toggleKey(set: Set<Key>, key: Key): Set<Key> {\n let res = new Set(set);\n if (res.has(key)) {\n res.delete(key);\n } else {\n res.add(key);\n }\n\n return res;\n}\n"],"names":[],"version":3,"file":"useTreeState.main.js.map"}
@@ -0,0 +1 @@
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAIM,MAAM;IAgDX,CAAC,CAAC,OAAO,QAAQ,CAAC,GAAG;QACnB,OAAO,IAAI,CAAC,QAAQ;IACtB;IAEA,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI;IACzB;IAEA,UAAU;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI;IACzB;IAEA,aAAa,GAAQ,EAAE;QACrB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YACb;QAAd,OAAO,OAAO,CAAA,gBAAA,KAAK,OAAO,cAAZ,2BAAA,gBAAgB,OAAO;IACvC;IAEA,YAAY,GAAQ,EAAE;QACpB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YACb;QAAd,OAAO,OAAO,CAAA,gBAAA,KAAK,OAAO,cAAZ,2BAAA,gBAAgB,OAAO;IACvC;IAEA,cAAc;QACZ,OAAO,IAAI,CAAC,QAAQ;IACtB;IAEA,aAAa;QACX,OAAO,IAAI,CAAC,OAAO;IACrB;IAEA,QAAQ,GAAQ,EAAE;YACT;QAAP,OAAO,CAAA,mBAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAhB,8BAAA,mBAAwB;IACjC;IAEA,GAAG,GAAW,EAAE;QACd,MAAM,OAAO;eAAI,IAAI,CAAC,OAAO;SAAG;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI;IAC/B;IAEA,YAAY,GAAQ,EAAqB;QACvC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,OAAO,CAAA,iBAAA,2BAAA,KAAM,UAAU,KAAI,EAAE;IAC/B;IApFA,YAAY,KAAwB,CAAE;aAL9B,SAA4B,IAAI;aAEhC,WAAuB;aACvB,UAAsB;QAG5B,IAAI,CAAC,QAAQ,GAAG;QAEhB,IAAI,QAAQ,CAAC;YACX,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE;YAE1B,IAAI,KAAK,UAAU,IAAI,KAAK,IAAI,KAAK,WACnC,KAAK,IAAI,SAAS,KAAK,UAAU,CAC/B,MAAM;QAGZ;QAEA,KAAK,IAAI,QAAQ,MACf,MAAM;QAGR,IAAI,OAAuB;QAC3B,IAAI,QAAQ;QACZ,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,CAAE;YACnC,IAAI,MAAM;gBACR,KAAK,OAAO,GAAG;gBACf,KAAK,OAAO,GAAG,KAAK,GAAG;YACzB,OAAO;gBACL,IAAI,CAAC,QAAQ,GAAG;gBAChB,KAAK,OAAO,GAAG;YACjB;YAEA,IAAI,KAAK,IAAI,KAAK,QAChB,KAAK,KAAK,GAAG;YAGf,OAAO;YAEP,6DAA6D;YAC7D,iFAAiF;YACjF,KAAK,OAAO,GAAG;QACjB;YAEe;QAAf,IAAI,CAAC,OAAO,GAAG,CAAA,YAAA,iBAAA,2BAAA,KAAM,GAAG,cAAT,uBAAA,YAAa;IAC9B;AA6CF","sources":["packages/@react-stately/list/src/ListCollection.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, Key, Node} from '@react-types/shared';\n\nexport class ListCollection<T> implements Collection<Node<T>> {\n private keyMap: Map<Key, Node<T>> = new Map();\n private iterable: Iterable<Node<T>>;\n private firstKey: Key | null = null;\n private lastKey: Key | null = null;\n\n constructor(nodes: Iterable<Node<T>>) {\n this.iterable = nodes;\n\n let visit = (node: Node<T>) => {\n this.keyMap.set(node.key, node);\n\n if (node.childNodes && node.type === 'section') {\n for (let child of node.childNodes) {\n visit(child);\n }\n }\n };\n\n for (let node of nodes) {\n visit(node);\n }\n\n let last: Node<T> | null = null;\n let index = 0;\n for (let [key, node] of this.keyMap) {\n if (last) {\n last.nextKey = key;\n node.prevKey = last.key;\n } else {\n this.firstKey = key;\n node.prevKey = undefined;\n }\n\n if (node.type === 'item') {\n node.index = index++;\n }\n\n last = node;\n\n // Set nextKey as undefined since this might be the last node\n // If it isn't the last node, last.nextKey will properly set at start of new loop\n last.nextKey = undefined;\n }\n\n this.lastKey = last?.key ?? null;\n }\n\n *[Symbol.iterator]() {\n yield* this.iterable;\n }\n\n get size() {\n return this.keyMap.size;\n }\n\n getKeys() {\n return this.keyMap.keys();\n }\n\n getKeyBefore(key: Key) {\n let node = this.keyMap.get(key);\n return node ? node.prevKey ?? null : null;\n }\n\n getKeyAfter(key: Key) {\n let node = this.keyMap.get(key);\n return node ? node.nextKey ?? null : null;\n }\n\n getFirstKey() {\n return this.firstKey;\n }\n\n getLastKey() {\n return this.lastKey;\n }\n\n getItem(key: Key) {\n return this.keyMap.get(key) ?? null;\n }\n\n at(idx: number) {\n const keys = [...this.getKeys()];\n return this.getItem(keys[idx]);\n }\n\n getChildren(key: Key): Iterable<Node<T>> {\n let node = this.keyMap.get(key);\n return node?.childNodes || [];\n }\n}\n"],"names":[],"version":3,"file":"ListCollection.main.js.map"}
@@ -0,0 +1,8 @@
/**
* Default settings for Electron applications.
*/
module.exports = {
settings: {
'import/core-modules': ['electron'],
},
};
@@ -0,0 +1,157 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const ts_api_utils_1 = require("ts-api-utils");
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const promiseUtils_1 = require("../util/promiseUtils");
exports.default = (0, util_1.createRule)({
name: 'only-throw-error',
meta: {
type: 'problem',
docs: {
description: 'Disallow throwing non-`Error` values as exceptions',
extendsBaseRule: 'no-throw-literal',
recommended: 'recommended',
requiresTypeChecking: true,
},
messages: {
object: 'Expected an error object to be thrown.',
undef: 'Do not throw undefined.',
},
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
allow: {
...util_1.typeOrValueSpecifiersSchema,
description: 'Type specifiers that can be thrown.',
},
allowRethrowing: {
type: 'boolean',
description: 'Whether to allow rethrowing caught values that are not `Error` objects.',
},
allowThrowingAny: {
type: 'boolean',
description: 'Whether to always allow throwing values typed as `any`.',
},
allowThrowingUnknown: {
type: 'boolean',
description: 'Whether to always allow throwing values typed as `unknown`.',
},
},
},
],
},
defaultOptions: [
{
allow: [],
allowRethrowing: true,
allowThrowingAny: true,
allowThrowingUnknown: true,
},
],
create(context, [options]) {
const services = (0, util_1.getParserServices)(context);
const allow = options.allow;
function isRethrownError(node) {
if (node.type !== utils_1.AST_NODE_TYPES.Identifier) {
return false;
}
const scope = context.sourceCode.getScope(node);
const smVariable = (0, util_1.nullThrows)((0, util_1.findVariable)(scope, node), `Variable ${node.name} should exist in scope manager`);
const variableDefinitions = smVariable.defs.filter(def => def.isVariableDefinition);
if (variableDefinitions.length !== 1) {
return false;
}
const def = smVariable.defs[0];
// try { /* ... */ } catch (x) { throw x; }
if (def.node.type === utils_1.AST_NODE_TYPES.CatchClause) {
return true;
}
// promise.catch(x => { throw x; })
// promise.then(onFulfilled, x => { throw x; })
if (def.node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression &&
def.node.params.length >= 1 &&
def.node.params[0] === def.name &&
def.node.parent.type === utils_1.AST_NODE_TYPES.CallExpression) {
const callExpression = def.node.parent;
const parsedPromiseHandlingCall = (0, promiseUtils_1.parseCatchCall)(callExpression, context) ??
(0, promiseUtils_1.parseThenCall)(callExpression, context);
if (parsedPromiseHandlingCall != null) {
const { object, onRejected } = parsedPromiseHandlingCall;
if (onRejected === def.node) {
const tsObjectNode = services.esTreeNodeToTSNodeMap.get(object);
// make sure we're actually dealing with a promise
if ((0, ts_api_utils_1.isThenableType)(services.program.getTypeChecker(), tsObjectNode)) {
return true;
}
}
}
}
return false;
}
function checkThrowArgument(node) {
if (options.allowRethrowing && isRethrownError(node)) {
return;
}
const type = services.getTypeAtLocation(node);
if ((0, util_1.typeMatchesSomeSpecifier)(type, allow, services.program)) {
return;
}
if (type.flags & ts.TypeFlags.Undefined) {
context.report({ node, messageId: 'undef' });
return;
}
if (options.allowThrowingAny && (0, util_1.isTypeAnyType)(type)) {
return;
}
if (options.allowThrowingUnknown && (0, util_1.isTypeUnknownType)(type)) {
return;
}
if ((0, util_1.isErrorLike)(services.program, type)) {
return;
}
context.report({ node, messageId: 'object' });
}
return {
ThrowStatement(node) {
checkThrowArgument(node.argument);
},
};
},
});
@@ -0,0 +1,53 @@
# import/no-named-as-default
⚠️ This rule _warns_ in the following configs: ☑️ `recommended`, 🚸 `warnings`.
<!-- end auto-generated rule header -->
Reports use of an exported name as the locally imported name of a default export.
Rationale: using an exported name as the name of the default export is likely...
- _misleading_: others familiar with `foo.js` probably expect the name to be `foo`
- _a mistake_: only needed to import `bar` and forgot the brackets (the case that is prompting this)
## Rule Details
Given:
```js
// foo.js
export default 'foo';
export const bar = 'baz';
```
...this would be valid:
```js
import foo from './foo.js';
```
...and this would be reported:
```js
// message: Using exported name 'bar' as identifier for default export.
import bar from './foo.js';
```
For post-ES2015 `export` extensions, this also prevents exporting the default from a referenced module as a name within that module, for the same reasons:
```js
// valid:
export foo from './foo.js';
// message: Using exported name 'bar' as identifier for default export.
export bar from './foo.js';
```
## Further Reading
- ECMAScript Proposal: [export ns from]
- ECMAScript Proposal: [export default from]
[export ns from]: https://github.com/leebyron/ecmascript-export-ns-from
[export default from]: https://github.com/leebyron/ecmascript-export-default-from
@@ -0,0 +1,214 @@
const path = require('path');
const fs = require('fs');
const Keyv = require('keyv');
const { writeJSON, tryParse } = require('./utils');
const { del } = require('./del');
const cache = {
/**
* Load a cache identified by the given Id. If the element does not exists, then initialize an empty
* cache storage. If specified `cacheDir` will be used as the directory to persist the data to. If omitted
* then the cache module directory `./cache` will be used instead
*
* @method load
* @param docId {String} the id of the cache, would also be used as the name of the file cache
* @param [cacheDir] {String} directory for the cache entry
*/
load: function (docId, cacheDir) {
const me = this;
me.keyv = new Keyv();
me.__visited = {};
me.__persisted = {};
me._pathToFile = cacheDir ? path.resolve(cacheDir, docId) : path.resolve(__dirname, '../.cache/', docId);
if (fs.existsSync(me._pathToFile)) {
me._persisted = tryParse(me._pathToFile, {});
}
},
get _persisted() {
return this.__persisted;
},
set _persisted(value) {
this.__persisted = value;
},
get _visited() {
return this.__visited;
},
set _visited(value) {
this.__visited = value;
},
/**
* Load the cache from the provided file
* @method loadFile
* @param {String} pathToFile the path to the file containing the info for the cache
*/
loadFile: function (pathToFile) {
const me = this;
const dir = path.dirname(pathToFile);
const fName = path.basename(pathToFile);
me.load(fName, dir);
},
/**
* Returns the entire persisted object
* @method all
* @returns {*}
*/
all: function () {
return this._persisted;
},
keys: function () {
return Object.keys(this._persisted);
},
/**
* sets a key to a given value
* @method setKey
* @param key {string} the key to set
* @param value {object} the value of the key. Could be any object that can be serialized with JSON.stringify
*/
setKey: function (key, value) {
this._visited[key] = true;
this._persisted[key] = value;
},
/**
* remove a given key from the cache
* @method removeKey
* @param key {String} the key to remove from the object
*/
removeKey: function (key) {
delete this._visited[key]; // esfmt-ignore-line
delete this._persisted[key]; // esfmt-ignore-line
},
/**
* Return the value of the provided key
* @method getKey
* @param key {String} the name of the key to retrieve
* @returns {*} the value from the key
*/
getKey: function (key) {
this._visited[key] = true;
return this._persisted[key];
},
/**
* Remove keys that were not accessed/set since the
* last time the `prune` method was called.
* @method _prune
* @private
*/
_prune: function () {
const me = this;
const obj = {};
const keys = Object.keys(me._visited);
// no keys visited for either get or set value
if (keys.length === 0) {
return;
}
keys.forEach(function (key) {
obj[key] = me._persisted[key];
});
me._visited = {};
me._persisted = obj;
},
/**
* Save the state of the cache identified by the docId to disk
* as a JSON structure
* @param [noPrune=false] {Boolean} whether to remove from cache the non visited files
* @method save
*/
save: function (noPrune) {
const me = this;
!noPrune && me._prune();
writeJSON(me._pathToFile, me._persisted);
},
/**
* remove the file where the cache is persisted
* @method removeCacheFile
* @return {Boolean} true or false if the file was successfully deleted
*/
removeCacheFile: function () {
return del(this._pathToFile);
},
/**
* Destroy the file cache and cache content.
* @method destroy
*/
destroy: function () {
const me = this;
me._visited = {};
me._persisted = {};
me.removeCacheFile();
},
};
module.exports = {
/**
* Alias for create. Should be considered depreacted. Will be removed in next releases
*
* @method load
* @param docId {String} the id of the cache, would also be used as the name of the file cache
* @param [cacheDir] {String} directory for the cache entry
* @returns {cache} cache instance
*/
load: function (docId, cacheDir) {
return this.create(docId, cacheDir);
},
/**
* Load a cache identified by the given Id. If the element does not exists, then initialize an empty
* cache storage.
*
* @method create
* @param docId {String} the id of the cache, would also be used as the name of the file cache
* @param [cacheDir] {String} directory for the cache entry
* @returns {cache} cache instance
*/
create: function (docId, cacheDir) {
const obj = Object.create(cache);
obj.load(docId, cacheDir);
return obj;
},
createFromFile: function (filePath) {
const obj = Object.create(cache);
obj.loadFile(filePath);
return obj;
},
/**
* Clear the cache identified by the given id. Caches stored in a different cache directory can be deleted directly
*
* @method clearCache
* @param docId {String} the id of the cache, would also be used as the name of the file cache
* @param cacheDir {String} the directory where the cache file was written
* @returns {Boolean} true if the cache folder was deleted. False otherwise
*/
clearCacheById: function (docId, cacheDir) {
const filePath = cacheDir ? path.resolve(cacheDir, docId) : path.resolve(__dirname, '../.cache/', docId);
return del(filePath);
},
/**
* Remove all cache stored in the cache directory
* @method clearAll
* @returns {Boolean} true if the cache folder was deleted. False otherwise
*/
clearAll: function (cacheDir) {
const filePath = cacheDir ? path.resolve(cacheDir) : path.resolve(__dirname, '../.cache/');
return del(filePath);
},
};
@@ -0,0 +1,10 @@
import postcss from 'postcss'
import cloneNodes from './cloneNodes'
export default function responsive(rules) {
return postcss
.atRule({
name: 'responsive',
})
.append(cloneNodes(Array.isArray(rules) ? rules : [rules]))
}
@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KEKRecipientInfo = exports.KEKIdentifier = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const other_key_attribute_1 = require("./other_key_attribute");
const types_1 = require("./types");
class KEKIdentifier {
constructor(params = {}) {
this.keyIdentifier = new asn1_schema_1.OctetString();
Object.assign(this, params);
}
}
exports.KEKIdentifier = KEKIdentifier;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
], KEKIdentifier.prototype, "keyIdentifier", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.GeneralizedTime, optional: true })
], KEKIdentifier.prototype, "date", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: other_key_attribute_1.OtherKeyAttribute, optional: true })
], KEKIdentifier.prototype, "other", void 0);
class KEKRecipientInfo {
constructor(params = {}) {
this.version = types_1.CMSVersion.v4;
this.kekid = new KEKIdentifier();
this.keyEncryptionAlgorithm = new types_1.KeyEncryptionAlgorithmIdentifier();
this.encryptedKey = new asn1_schema_1.OctetString();
Object.assign(this, params);
}
}
exports.KEKRecipientInfo = KEKRecipientInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], KEKRecipientInfo.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: KEKIdentifier })
], KEKRecipientInfo.prototype, "kekid", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: types_1.KeyEncryptionAlgorithmIdentifier })
], KEKRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
], KEKRecipientInfo.prototype, "encryptedKey", void 0);
@@ -0,0 +1,91 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _computeBoundingBox = require("./computeBoundingBox");
var _pathAdjust = _interopRequireDefault(require("./pathAdjust"));
var _pathRotate = _interopRequireDefault(require("./pathRotate"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } /**
* @file 路径组变化函数
* @author mengke01(kekee000@gmail.com)
*/
/**
* 翻转路径
*
* @param {Array} paths 路径数组
* @param {number} xScale x翻转
* @param {number} yScale y翻转
* @return {Array} 变换后的路径
*/
function mirrorPaths(paths, xScale, yScale) {
var _computePath = _computeBoundingBox.computePath.apply(void 0, _toConsumableArray(paths)),
x = _computePath.x,
y = _computePath.y,
width = _computePath.width,
height = _computePath.height;
if (xScale === -1) {
paths.forEach(function (p) {
(0, _pathAdjust.default)(p, -1, 1, -x, 0);
(0, _pathAdjust.default)(p, 1, 1, x + width, 0);
p.reverse();
});
}
if (yScale === -1) {
paths.forEach(function (p) {
(0, _pathAdjust.default)(p, 1, -1, 0, -y);
(0, _pathAdjust.default)(p, 1, 1, 0, y + height);
p.reverse();
});
}
return paths;
}
var _default = exports.default = {
/**
* 旋转路径
*
* @param {Array} paths 路径数组
* @param {number} angle 弧度
* @return {Array} 变换后的路径
*/
rotate: function rotate(paths, angle) {
if (!angle) {
return paths;
}
var bound = _computeBoundingBox.computePath.apply(void 0, _toConsumableArray(paths));
var cx = bound.x + bound.width / 2;
var cy = bound.y + bound.height / 2;
paths.forEach(function (p) {
(0, _pathRotate.default)(p, angle, cx, cy);
});
return paths;
},
/**
* 路径组变换
*
* @param {Array} paths 路径数组
* @param {number} x x 方向缩放
* @param {number} y y 方向缩放
* @return {Array} 变换后的路径
*/
move: function move(paths, x, y) {
var bound = _computeBoundingBox.computePath.apply(void 0, _toConsumableArray(paths));
paths.forEach(function (path) {
(0, _pathAdjust.default)(path, 1, 1, x - bound.x, y - bound.y);
});
return paths;
},
mirror: function mirror(paths) {
return mirrorPaths(paths, -1, 1);
},
flip: function flip(paths) {
return mirrorPaths(paths, 1, -1);
}
};
@@ -0,0 +1,69 @@
declare const _default: {
parserOptions: {
program: null;
project: false;
projectService: false;
};
rules: {
'@typescript-eslint/await-thenable': "off";
'@typescript-eslint/consistent-return': "off";
'@typescript-eslint/consistent-type-exports': "off";
'@typescript-eslint/dot-notation': "off";
'@typescript-eslint/naming-convention': "off";
'@typescript-eslint/no-array-delete': "off";
'@typescript-eslint/no-base-to-string': "off";
'@typescript-eslint/no-confusing-void-expression': "off";
'@typescript-eslint/no-deprecated': "off";
'@typescript-eslint/no-duplicate-type-constituents': "off";
'@typescript-eslint/no-floating-promises': "off";
'@typescript-eslint/no-for-in-array': "off";
'@typescript-eslint/no-implied-eval': "off";
'@typescript-eslint/no-meaningless-void-operator': "off";
'@typescript-eslint/no-misused-promises': "off";
'@typescript-eslint/no-misused-spread': "off";
'@typescript-eslint/no-mixed-enums': "off";
'@typescript-eslint/no-redundant-type-constituents': "off";
'@typescript-eslint/no-unnecessary-boolean-literal-compare': "off";
'@typescript-eslint/no-unnecessary-condition': "off";
'@typescript-eslint/no-unnecessary-qualifier': "off";
'@typescript-eslint/no-unnecessary-template-expression': "off";
'@typescript-eslint/no-unnecessary-type-arguments': "off";
'@typescript-eslint/no-unnecessary-type-assertion': "off";
'@typescript-eslint/no-unnecessary-type-conversion': "off";
'@typescript-eslint/no-unnecessary-type-parameters': "off";
'@typescript-eslint/no-unsafe-argument': "off";
'@typescript-eslint/no-unsafe-assignment': "off";
'@typescript-eslint/no-unsafe-call': "off";
'@typescript-eslint/no-unsafe-enum-comparison': "off";
'@typescript-eslint/no-unsafe-member-access': "off";
'@typescript-eslint/no-unsafe-return': "off";
'@typescript-eslint/no-unsafe-type-assertion': "off";
'@typescript-eslint/no-unsafe-unary-minus': "off";
'@typescript-eslint/non-nullable-type-assertion-style': "off";
'@typescript-eslint/only-throw-error': "off";
'@typescript-eslint/prefer-destructuring': "off";
'@typescript-eslint/prefer-find': "off";
'@typescript-eslint/prefer-includes': "off";
'@typescript-eslint/prefer-nullish-coalescing': "off";
'@typescript-eslint/prefer-optional-chain': "off";
'@typescript-eslint/prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-readonly': "off";
'@typescript-eslint/prefer-readonly-parameter-types': "off";
'@typescript-eslint/prefer-reduce-type-parameter': "off";
'@typescript-eslint/prefer-regexp-exec': "off";
'@typescript-eslint/prefer-return-this-type': "off";
'@typescript-eslint/prefer-string-starts-ends-with': "off";
'@typescript-eslint/promise-function-async': "off";
'@typescript-eslint/related-getter-setter-pairs': "off";
'@typescript-eslint/require-array-sort-compare': "off";
'@typescript-eslint/require-await': "off";
'@typescript-eslint/restrict-plus-operands': "off";
'@typescript-eslint/restrict-template-expressions': "off";
'@typescript-eslint/return-await': "off";
'@typescript-eslint/strict-boolean-expressions': "off";
'@typescript-eslint/switch-exhaustiveness-check': "off";
'@typescript-eslint/unbound-method': "off";
'@typescript-eslint/use-unknown-in-catch-callback-variable': "off";
};
};
export = _default;
@@ -0,0 +1,16 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"func-style": [2, "declaration"],
"id-length": 0,
"multiline-comment-style": 0,
"new-cap": [2, {
"capIsNewExceptions": [
"GetIntrinsic",
],
}],
},
}
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.request = request;
exports.sleep = sleep;
function sleep(time) {
return new Promise(function (resolve) {
setTimeout(function () {
resolve();
}, time);
});
}
function request(req) {
return new Promise(function (resolve, reject) {
return setTimeout(function () {
if (req === 0) {
reject(new Error('fail'));
} else {
resolve('success');
}
}, 1000);
});
}
@@ -0,0 +1,22 @@
'use strict';
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = callBind.apply(getPolyfill());
// eslint-disable-next-line no-unused-vars
var bound = function assign(target, source1) {
return polyfill(Object, arguments);
};
defineProperties(bound, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = bound;
@@ -0,0 +1,277 @@
# CSSType
[![npm](https://img.shields.io/npm/v/csstype.svg)](https://www.npmjs.com/package/csstype)
TypeScript and Flow definitions for CSS, generated by [data from MDN](https://github.com/mdn/data). It provides autocompletion and type checking for CSS properties and values.
**TypeScript**
```ts
import type * as CSS from 'csstype';
const style: CSS.Properties = {
colour: 'white', // Type error on property
textAlign: 'middle', // Type error on value
};
```
**Flow**
```js
// @flow strict
import * as CSS from 'csstype';
const style: CSS.Properties<> = {
colour: 'white', // Type error on property
textAlign: 'middle', // Type error on value
};
```
_Further examples below will be in TypeScript!_
## Getting started
```sh
$ npm install csstype
```
## Table of content
- [Style types](#style-types)
- [At-rule types](#at-rule-types)
- [Pseudo types](#pseudo-types)
- [Generics](#generics)
- [Usage](#usage)
- [What should I do when I get type errors?](#what-should-i-do-when-i-get-type-errors)
- [Version 3.0](#version-30)
- [Contributing](#contributing)
## Style types
Properties are categorized in different uses and in several technical variations to provide typings that suits as many as possible.
| | Default | `Hyphen` | `Fallback` | `HyphenFallback` |
| -------------- | -------------------- | -------------------------- | ---------------------------- | ---------------------------------- |
| **All** | `Properties` | `PropertiesHyphen` | `PropertiesFallback` | `PropertiesHyphenFallback` |
| **`Standard`** | `StandardProperties` | `StandardPropertiesHyphen` | `StandardPropertiesFallback` | `StandardPropertiesHyphenFallback` |
| **`Vendor`** | `VendorProperties` | `VendorPropertiesHyphen` | `VendorPropertiesFallback` | `VendorPropertiesHyphenFallback` |
| **`Obsolete`** | `ObsoleteProperties` | `ObsoletePropertiesHyphen` | `ObsoletePropertiesFallback` | `ObsoletePropertiesHyphenFallback` |
| **`Svg`** | `SvgProperties` | `SvgPropertiesHyphen` | `SvgPropertiesFallback` | `SvgPropertiesHyphenFallback` |
Categories:
- **All** - Includes `Standard`, `Vendor`, `Obsolete` and `Svg`
- **`Standard`** - Current properties and extends subcategories `StandardLonghand` and `StandardShorthand` _(e.g. `StandardShorthandProperties`)_
- **`Vendor`** - Vendor prefixed properties and extends subcategories `VendorLonghand` and `VendorShorthand` _(e.g. `VendorShorthandProperties`)_
- **`Obsolete`** - Removed or deprecated properties
- **`Svg`** - SVG-specific properties
Variations:
- **Default** - JavaScript (camel) cased property names
- **`Hyphen`** - CSS (kebab) cased property names
- **`Fallback`** - Also accepts array of values e.g. `string | string[]`
## At-rule types
At-rule interfaces with descriptors.
**TypeScript**: These will be found in the `AtRule` namespace, e.g. `AtRule.Viewport`.
**Flow**: These will be prefixed with `AtRule$`, e.g. `AtRule$Viewport`.
| | Default | `Hyphen` | `Fallback` | `HyphenFallback` |
| -------------------- | -------------- | -------------------- | ---------------------- | ---------------------------- |
| **`@counter-style`** | `CounterStyle` | `CounterStyleHyphen` | `CounterStyleFallback` | `CounterStyleHyphenFallback` |
| **`@font-face`** | `FontFace` | `FontFaceHyphen` | `FontFaceFallback` | `FontFaceHyphenFallback` |
| **`@viewport`** | `Viewport` | `ViewportHyphen` | `ViewportFallback` | `ViewportHyphenFallback` |
## Pseudo types
String literals of pseudo classes and pseudo elements
- `Pseudos`
Extends:
- `AdvancedPseudos`
Function-like pseudos e.g. `:not(:first-child)`. The string literal contains the value excluding the parenthesis: `:not`. These are separated because they require an argument that results in infinite number of variations.
- `SimplePseudos`
Plain pseudos e.g. `:hover` that can only be **one** variation.
## Generics
All interfaces has two optional generic argument to define length and time: `CSS.Properties<TLength = string | 0, TTime = string>`
- **Length** is the first generic parameter and defaults to `string | 0` because `0` is the only [length where the unit identifier is optional](https://drafts.csswg.org/css-values-3/#lengths). You can specify this, e.g. `string | number`, for platforms and libraries that accepts any numeric value as length with a specific unit.
```tsx
const style: CSS.Properties<string | number> = {
width: 100,
};
```
- **Time** is the second generic argument and defaults to `string`. You can specify this, e.g. `string | number`, for platforms and libraries that accepts any numeric value as length with a specific unit.
```tsx
const style: CSS.Properties<string | number, number> = {
transitionDuration: 1000,
};
```
## Usage
```ts
import type * as CSS from 'csstype';
const style: CSS.Properties = {
width: '10px',
margin: '1em',
};
```
In some cases, like for CSS-in-JS libraries, an array of values is a way to provide fallback values in CSS. Using `CSS.PropertiesFallback` instead of `CSS.Properties` will add the possibility to use any property value as an array of values.
```ts
import type * as CSS from 'csstype';
const style: CSS.PropertiesFallback = {
display: ['-webkit-flex', 'flex'],
color: 'white',
};
```
There's even string literals for pseudo selectors and elements.
```ts
import type * as CSS from 'csstype';
const pseudos: { [P in CSS.SimplePseudos]?: CSS.Properties } = {
':hover': {
display: 'flex',
},
};
```
Hyphen cased (kebab cased) properties are provided in `CSS.PropertiesHyphen` and `CSS.PropertiesHyphenFallback`. It's not **not** added by default in `CSS.Properties`. To allow both of them, you can simply extend with `CSS.PropertiesHyphen` or/and `CSS.PropertiesHyphenFallback`.
```ts
import type * as CSS from 'csstype';
interface Style extends CSS.Properties, CSS.PropertiesHyphen {}
const style: Style = {
'flex-grow': 1,
'flex-shrink': 0,
'font-weight': 'normal',
backgroundColor: 'white',
};
```
Adding type checked CSS properties to a `HTMLElement`.
```ts
import type * as CSS from 'csstype';
const style: CSS.Properties = {
color: 'red',
margin: '1em',
};
let button = document.createElement('button');
Object.assign(button.style, style);
```
## What should I do when I get type errors?
The goal is to have as perfect types as possible and we're trying to do our best. But with CSS Custom Properties, the CSS specification changing frequently and vendors implementing their own specifications with new releases sometimes causes type errors even if it should work. Here's some steps you could take to get it fixed:
_If you're using CSS Custom Properties you can step directly to step 3._
1. **First of all, make sure you're doing it right.** A type error could also indicate that you're not :wink:
- Some CSS specs that some vendors has implemented could have been officially rejected or haven't yet received any official acceptance and are therefor not included
- If you're using TypeScript, [type widening](https://blog.mariusschulz.com/2017/02/04/TypeScript-2-1-literal-type-widening) could be the reason you get `Type 'string' is not assignable to...` errors
2. **Have a look in [issues](https://github.com/frenic/csstype/issues) to see if an issue already has been filed. If not, create a new one.** To help us out, please refer to any information you have found.
3. Fix the issue locally with **TypeScript** (Flow further down):
- The recommended way is to use **module augmentation**. Here's a few examples:
```ts
// My css.d.ts file
import type * as CSS from 'csstype';
declare module 'csstype' {
interface Properties {
// Add a missing property
WebkitRocketLauncher?: string;
// Add a CSS Custom Property
'--theme-color'?: 'black' | 'white';
// Allow namespaced CSS Custom Properties
[index: `--theme-${string}`]: any;
// Allow any CSS Custom Properties
[index: `--${string}`]: any;
// ...or allow any other property
[index: string]: any;
}
}
```
- The alternative way is to use **type assertion**. Here's a few examples:
```ts
const style: CSS.Properties = {
// Add a missing property
['WebkitRocketLauncher' as any]: 'launching',
// Add a CSS Custom Property
['--theme-color' as any]: 'black',
};
```
Fix the issue locally with **Flow**:
- Use **type assertion**. Here's a few examples:
```js
const style: $Exact<CSS.Properties<*>> = {
// Add a missing property
[('WebkitRocketLauncher': any)]: 'launching',
// Add a CSS Custom Property
[('--theme-color': any)]: 'black',
};
```
## Version 3.0
- **All property types are exposed with namespace**
TypeScript: `Property.AlignContent` (was `AlignContentProperty` before)
Flow: `Property$AlignContent`
- **All at-rules are exposed with namespace**
TypeScript: `AtRule.FontFace` (was `FontFace` before)
Flow: `AtRule$FontFace`
- **Data types are NOT exposed**
E.g. `Color` and `Box`. Because the generation of data types may suddenly be removed or renamed.
- **TypeScript hack for autocompletion**
Uses `(string & {})` for literal string unions and `(number & {})` for literal number unions ([related issue](https://github.com/microsoft/TypeScript/issues/29729)). Utilize `PropertyValue<T>` to unpack types from e.g. `(string & {})` to `string`.
- **New generic for time**
Read more on the ["Generics"](#generics) section.
- **Flow types improvements**
Flow Strict enabled and exact types are used.
## Contributing
**Never modify `index.d.ts` and `index.js.flow` directly. They are generated automatically and committed so that we can easily follow any change it results in.** Therefor it's important that you run `$ git config merge.ours.driver true` after you've forked and cloned. That setting prevents merge conflicts when doing rebase.
### Commands
- `npm run build` Generates typings and type checks them
- `npm run watch` Runs build on each save
- `npm run test` Runs the tests
- `npm run lazy` Type checks, lints and formats everything
@@ -0,0 +1 @@
{"version":3,"file":"bundle-mjs.mjs","sources":["../src/lib/class-group-utils.ts","../src/lib/lru-cache.ts","../src/lib/parse-class-name.ts","../src/lib/config-utils.ts","../src/lib/merge-classlist.ts","../src/lib/tw-join.ts","../src/lib/create-tailwind-merge.ts","../src/lib/from-theme.ts","../src/lib/validators.ts","../src/lib/default-config.ts","../src/lib/merge-configs.ts","../src/lib/extend-tailwind-merge.ts","../src/lib/tw-merge.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["CLASS_PART_SEPARATOR","createClassGroupUtils","config","classMap","createClassMap","conflictingClassGroups","conflictingClassGroupModifiers","getClassGroupId","className","classParts","split","length","shift","getGroupRecursive","getGroupIdForArbitraryProperty","getConflictingClassGroupIds","classGroupId","hasPostfixModifier","conflicts","classPartObject","currentClassPart","nextClassPartObject","nextPart","get","classGroupFromNextClassPart","slice","undefined","validators","classRest","join","find","validator","arbitraryPropertyRegex","test","arbitraryPropertyClassName","exec","property","substring","indexOf","theme","prefix","Map","prefixedClassGroupEntries","getPrefixedClassGroupEntries","Object","entries","classGroups","forEach","classGroup","processClassesRecursively","classDefinition","classPartObjectToEdit","getPart","isThemeGetter","push","key","path","currentClassPartObject","pathPart","has","set","func","classGroupEntries","map","prefixedClassGroup","fromEntries","value","createLruCache","maxCacheSize","cacheSize","cache","previousCache","update","IMPORTANT_MODIFIER","createParseClassName","separator","experimentalParseClassName","isSeparatorSingleCharacter","firstSeparatorCharacter","separatorLength","parseClassName","modifiers","bracketDepth","modifierStart","postfixModifierPosition","index","currentCharacter","baseClassNameWithImportantModifier","hasImportantModifier","startsWith","baseClassName","maybePostfixModifierPosition","sortModifiers","sortedModifiers","unsortedModifiers","modifier","isArbitraryVariant","sort","createConfigUtils","SPLIT_CLASSES_REGEX","mergeClassList","classList","configUtils","classGroupsInConflict","classNames","trim","result","originalClassName","Boolean","variantModifier","modifierId","classId","includes","conflictGroups","i","group","twJoin","argument","resolvedValue","string","arguments","toValue","mix","k","createTailwindMerge","createConfigFirst","createConfigRest","cacheGet","cacheSet","functionToCall","initTailwindMerge","reduce","previousConfig","createConfigCurrent","tailwindMerge","cachedResult","callTailwindMerge","apply","fromTheme","themeGetter","arbitraryValueRegex","fractionRegex","stringLengths","Set","tshirtUnitRegex","lengthUnitRegex","colorFunctionRegex","shadowRegex","imageRegex","isLength","isNumber","isArbitraryLength","getIsArbitraryValue","isLengthOnly","Number","isNaN","isArbitraryNumber","isInteger","isPercent","endsWith","isArbitraryValue","isTshirtSize","sizeLabels","isArbitrarySize","isNever","isArbitraryPosition","imageLabels","isArbitraryImage","isImage","isArbitraryShadow","isShadow","isAny","label","testValue","getDefaultConfig","colors","spacing","blur","brightness","borderColor","borderRadius","borderSpacing","borderWidth","contrast","grayscale","hueRotate","invert","gap","gradientColorStops","gradientColorStopPositions","inset","margin","opacity","padding","saturate","scale","sepia","skew","space","translate","getOverscroll","getOverflow","getSpacingWithAutoAndArbitrary","getSpacingWithArbitrary","getLengthWithEmptyAndArbitrary","getNumberWithAutoAndArbitrary","getPositions","getLineStyles","getBlendModes","getAlign","getZeroAndEmpty","getBreaks","getNumberAndArbitrary","aspect","container","columns","box","display","float","clear","isolation","object","overflow","overscroll","position","start","end","top","right","bottom","left","visibility","z","basis","flex","grow","shrink","order","col","span","row","justify","content","items","self","p","px","py","ps","pe","pt","pr","pb","pl","m","mx","my","ms","me","mt","mr","mb","ml","w","screen","h","size","text","font","tracking","leading","list","placeholder","decoration","indent","align","whitespace","break","hyphens","bg","repeat","from","via","to","rounded","border","divide","outline","ring","shadow","filter","table","caption","transition","duration","ease","delay","animate","transform","rotate","origin","accent","appearance","cursor","caret","resize","scroll","snap","touch","select","fill","stroke","sr","mergeConfigs","baseConfig","extend","override","overrideProperty","configKey","overrideConfigProperties","mergeConfigProperties","baseObject","overrideKey","overrideValue","overrideObject","mergeObject","mergeValue","concat","extendTailwindMerge","configExtension","createConfig","twMerge"],"mappings":"AAsBA,MAAMA,oBAAoB,GAAG,GAAG;AAEzB,MAAMC,qBAAqB,GAAIC,MAAiB,IAAI;EACvD,MAAMC,QAAQ,GAAGC,cAAc,CAACF,MAAM,CAAC;EACvC,MAAM;IAAEG,sBAAsB;IAAEC;EAA8B,CAAE,GAAGJ,MALine truncated
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=jsx-props-no-multi-spaces.d.ts.map
@@ -0,0 +1,6 @@
import type { AttestationFormatVerifierOpts } from '../verifyRegistrationResponse.js';
/**
* Verify an attestation response with fmt 'android-safetynet'
*/
export declare function verifyAttestationAndroidSafetyNet(options: AttestationFormatVerifierOpts): Promise<boolean>;
//# sourceMappingURL=verifyAttestationAndroidSafetyNet.d.ts.map
@@ -0,0 +1,20 @@
import { COSEALG } from './cose.js';
import type { Uint8Array_ } from '../types/index.js';
/**
* Verify an authenticator's signature
*/
export declare function verifySignature(opts: {
signature: Uint8Array_;
data: Uint8Array_;
credentialPublicKey?: Uint8Array_;
x509Certificate?: Uint8Array_;
hashAlgorithm?: COSEALG;
}): Promise<boolean>;
/**
* Make it possible to stub the return value during testing
* @ignore Don't include this in docs output
*/
export declare const _verifySignatureInternals: {
stubThis: (value: Promise<boolean>) => Promise<boolean>;
};
//# sourceMappingURL=verifySignature.d.ts.map
@@ -0,0 +1,333 @@
import { u } from '../localizedFormat/utils';
var formattingTokens = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g;
var match1 = /\d/; // 0 - 9
var match2 = /\d\d/; // 00 - 99
var match3 = /\d{3}/; // 000 - 999
var match4 = /\d{4}/; // 0000 - 9999
var match1to2 = /\d\d?/; // 0 - 99
var matchSigned = /[+-]?\d+/; // -inf - inf
var matchOffset = /[+-]\d\d:?(\d\d)?|Z/; // +00:00 -00:00 +0000 or -0000 +00 or Z
var matchWord = /\d*[^-_:/,()\s\d]+/; // Word
var locale = {};
var parseTwoDigitYear = function parseTwoDigitYear(input) {
input = +input;
return input + (input > 68 ? 1900 : 2000);
};
function offsetFromString(string) {
if (!string) return 0;
if (string === 'Z') return 0;
var parts = string.match(/([+-]|\d\d)/g);
var minutes = +(parts[1] * 60) + (+parts[2] || 0);
return minutes === 0 ? 0 : parts[0] === '+' ? -minutes : minutes; // eslint-disable-line no-nested-ternary
}
var addInput = function addInput(property) {
return function (input) {
this[property] = +input;
};
};
var zoneExpressions = [matchOffset, function (input) {
var zone = this.zone || (this.zone = {});
zone.offset = offsetFromString(input);
}];
var getLocalePart = function getLocalePart(name) {
var part = locale[name];
return part && (part.indexOf ? part : part.s.concat(part.f));
};
var meridiemMatch = function meridiemMatch(input, isLowerCase) {
var isAfternoon;
var _locale = locale,
meridiem = _locale.meridiem;
if (!meridiem) {
isAfternoon = input === (isLowerCase ? 'pm' : 'PM');
} else {
for (var i = 1; i <= 24; i += 1) {
// todo: fix input === meridiem(i, 0, isLowerCase)
if (input.indexOf(meridiem(i, 0, isLowerCase)) > -1) {
isAfternoon = i > 12;
break;
}
}
}
return isAfternoon;
};
var expressions = {
A: [matchWord, function (input) {
this.afternoon = meridiemMatch(input, false);
}],
a: [matchWord, function (input) {
this.afternoon = meridiemMatch(input, true);
}],
Q: [match1, function (input) {
this.month = (input - 1) * 3 + 1;
}],
S: [match1, function (input) {
this.milliseconds = +input * 100;
}],
SS: [match2, function (input) {
this.milliseconds = +input * 10;
}],
SSS: [match3, function (input) {
this.milliseconds = +input;
}],
s: [match1to2, addInput('seconds')],
ss: [match1to2, addInput('seconds')],
m: [match1to2, addInput('minutes')],
mm: [match1to2, addInput('minutes')],
H: [match1to2, addInput('hours')],
h: [match1to2, addInput('hours')],
HH: [match1to2, addInput('hours')],
hh: [match1to2, addInput('hours')],
D: [match1to2, addInput('day')],
DD: [match2, addInput('day')],
Do: [matchWord, function (input) {
var _locale2 = locale,
ordinal = _locale2.ordinal;
var _input$match = input.match(/\d+/);
this.day = _input$match[0];
if (!ordinal) return;
for (var i = 1; i <= 31; i += 1) {
if (ordinal(i).replace(/\[|\]/g, '') === input) {
this.day = i;
}
}
}],
w: [match1to2, addInput('week')],
ww: [match2, addInput('week')],
M: [match1to2, addInput('month')],
MM: [match2, addInput('month')],
MMM: [matchWord, function (input) {
var months = getLocalePart('months');
var monthsShort = getLocalePart('monthsShort');
var matchIndex = (monthsShort || months.map(function (_) {
return _.slice(0, 3);
})).indexOf(input) + 1;
if (matchIndex < 1) {
throw new Error();
}
this.month = matchIndex % 12 || matchIndex;
}],
MMMM: [matchWord, function (input) {
var months = getLocalePart('months');
var matchIndex = months.indexOf(input) + 1;
if (matchIndex < 1) {
throw new Error();
}
this.month = matchIndex % 12 || matchIndex;
}],
Y: [matchSigned, addInput('year')],
YY: [match2, function (input) {
this.year = parseTwoDigitYear(input);
}],
YYYY: [match4, addInput('year')],
Z: zoneExpressions,
ZZ: zoneExpressions
};
function correctHours(time) {
var afternoon = time.afternoon;
if (afternoon !== undefined) {
var hours = time.hours;
if (afternoon) {
if (hours < 12) {
time.hours += 12;
}
} else if (hours === 12) {
time.hours = 0;
}
delete time.afternoon;
}
}
function makeParser(format) {
format = u(format, locale && locale.formats);
var array = format.match(formattingTokens);
var length = array.length;
for (var i = 0; i < length; i += 1) {
var token = array[i];
var parseTo = expressions[token];
var regex = parseTo && parseTo[0];
var parser = parseTo && parseTo[1];
if (parser) {
array[i] = {
regex: regex,
parser: parser
};
} else {
array[i] = token.replace(/^\[|\]$/g, '');
}
}
return function (input) {
var time = {};
for (var _i = 0, start = 0; _i < length; _i += 1) {
var _token = array[_i];
if (typeof _token === 'string') {
start += _token.length;
} else {
var _regex = _token.regex,
_parser = _token.parser;
var part = input.slice(start);
var match = _regex.exec(part);
var value = match[0];
_parser.call(time, value);
input = input.replace(value, '');
}
}
correctHours(time);
return time;
};
}
var parseFormattedInput = function parseFormattedInput(input, format, utc, dayjs) {
try {
if (['x', 'X'].indexOf(format) > -1) return new Date((format === 'X' ? 1000 : 1) * input);
var parser = makeParser(format);
var _parser2 = parser(input),
year = _parser2.year,
month = _parser2.month,
day = _parser2.day,
hours = _parser2.hours,
minutes = _parser2.minutes,
seconds = _parser2.seconds,
milliseconds = _parser2.milliseconds,
zone = _parser2.zone,
week = _parser2.week;
var now = new Date();
var d = day || (!year && !month ? now.getDate() : 1);
var y = year || now.getFullYear();
var M = 0;
if (!(year && !month)) {
M = month > 0 ? month - 1 : now.getMonth();
}
var h = hours || 0;
var m = minutes || 0;
var s = seconds || 0;
var ms = milliseconds || 0;
if (zone) {
return new Date(Date.UTC(y, M, d, h, m, s, ms + zone.offset * 60 * 1000));
}
if (utc) {
return new Date(Date.UTC(y, M, d, h, m, s, ms));
}
var newDate;
newDate = new Date(y, M, d, h, m, s, ms);
if (week) {
newDate = dayjs(newDate).week(week).toDate();
}
return newDate;
} catch (e) {
return new Date(''); // Invalid Date
}
};
export default (function (o, C, d) {
d.p.customParseFormat = true;
if (o && o.parseTwoDigitYear) {
parseTwoDigitYear = o.parseTwoDigitYear;
}
var proto = C.prototype;
var oldParse = proto.parse;
proto.parse = function (cfg) {
var date = cfg.date,
utc = cfg.utc,
args = cfg.args;
this.$u = utc;
var format = args[1];
if (typeof format === 'string') {
var isStrictWithoutLocale = args[2] === true;
var isStrictWithLocale = args[3] === true;
var isStrict = isStrictWithoutLocale || isStrictWithLocale;
var pl = args[2];
if (isStrictWithLocale) {
pl = args[2];
}
locale = this.$locale();
if (!isStrictWithoutLocale && pl) {
locale = d.Ls[pl];
}
this.$d = parseFormattedInput(date, format, utc, d);
this.init();
if (pl && pl !== true) this.$L = this.locale(pl).$L; // use != to treat
// input number 1410715640579 and format string '1410715640579' equal
// eslint-disable-next-line eqeqeq
if (isStrict && date != this.format(format)) {
this.$d = new Date('');
} // reset global locale to make parallel unit test
locale = {};
} else if (format instanceof Array) {
var len = format.length;
for (var i = 1; i <= len; i += 1) {
args[1] = format[i - 1];
var result = d.apply(this, args);
if (result.isValid()) {
this.$d = result.$d;
this.$L = result.$L;
this.init();
break;
}
if (i === len) this.$d = new Date('');
}
} else {
oldParse.call(this, cfg);
}
};
});
@@ -0,0 +1,13 @@
export * from './CatchClauseDefinition';
export * from './ClassNameDefinition';
export * from './Definition';
export * from './DefinitionType';
export * from './FunctionNameDefinition';
export * from './ImplicitGlobalVariableDefinition';
export * from './ImportBindingDefinition';
export * from './ParameterDefinition';
export * from './TSEnumMemberDefinition';
export * from './TSEnumNameDefinition';
export * from './TSModuleNameDefinition';
export * from './TypeDefinition';
export * from './VariableDefinition';
@@ -0,0 +1,10 @@
import { Never } from '../never/index.mjs';
import { CreateType } from '../create/type.mjs';
import { UnionCreate } from './union-create.mjs';
/** `[Json]` Creates a Union type */
export function Union(types, options) {
// prettier-ignore
return (types.length === 0 ? Never(options) :
types.length === 1 ? CreateType(types[0], options) :
UnionCreate(types, options));
}
@@ -0,0 +1,45 @@
var deburrLetter = require('./_deburrLetter'),
toString = require('./toString');
/** Used to match Latin Unicode letters (excluding mathematical operators). */
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
/** Used to compose unicode character classes. */
var rsComboMarksRange = '\\u0300-\\u036f',
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
rsComboSymbolsRange = '\\u20d0-\\u20ff',
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
/** Used to compose unicode capture groups. */
var rsCombo = '[' + rsComboRange + ']';
/**
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
*/
var reComboMark = RegExp(rsCombo, 'g');
/**
* Deburrs `string` by converting
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
* letters to basic Latin letters and removing
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to deburr.
* @returns {string} Returns the deburred string.
* @example
*
* _.deburr('déjà vu');
* // => 'deja vu'
*/
function deburr(string) {
string = toString(string);
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
}
module.exports = deburr;
@@ -0,0 +1,44 @@
import { reflectionScalarDefault } from "./reflection-scalar-default";
import { MESSAGE_TYPE } from './message-type-contract';
/**
* Creates an instance of the generic message, using the field
* information.
*/
export function reflectionCreate(type) {
/**
* This ternary can be removed in the next major version.
* The `Object.create()` code path utilizes a new `messagePrototype`
* property on the `IMessageType` which has this same `MESSAGE_TYPE`
* non-enumerable property on it. Doing it this way means that we only
* pay the cost of `Object.defineProperty()` once per `IMessageType`
* class of once per "instance". The falsy code path is only provided
* for backwards compatibility in cases where the runtime library is
* updated without also updating the generated code.
*/
const msg = type.messagePrototype
? Object.create(type.messagePrototype)
: Object.defineProperty({}, MESSAGE_TYPE, { value: type });
for (let field of type.fields) {
let name = field.localName;
if (field.opt)
continue;
if (field.oneof)
msg[field.oneof] = { oneofKind: undefined };
else if (field.repeat)
msg[name] = [];
else
switch (field.kind) {
case "scalar":
msg[name] = reflectionScalarDefault(field.T, field.L);
break;
case "enum":
// we require 0 to be default value for all enums
msg[name] = 0;
break;
case "map":
msg[name] = {};
break;
}
}
return msg;
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_field_get.cjs",
"module": "../../esm/_class_private_field_get.js"
}
@@ -0,0 +1,18 @@
import {
extendVariants
} from "./chunk-7J5ZEWJW.mjs";
import {
forwardRef,
isHeroUIEl,
mapPropsVariants,
mapPropsVariantsWithCommon,
toIterator
} from "./chunk-YFAKJTDR.mjs";
export {
extendVariants,
forwardRef,
isHeroUIEl,
mapPropsVariants,
mapPropsVariantsWithCommon,
toIterator
};
@@ -0,0 +1,13 @@
const { parse, stringify } = require('../../lib/index.cjs');
test('preserve formatting', () => {
const source = `
/**
* @my-tag {my.type} my-name description line 1
description line 2
* description line 3
*/`;
const parsed = parse(source);
const out = stringify(parsed[0]);
expect(out).toBe(source.slice(1));
});
@@ -0,0 +1,39 @@
import {useId as $83Elw$useId, useLabels as $83Elw$useLabels} from "@react-aria/utils";
/*
* 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 $d191a55c9702f145$export$8467354a121f1b9f(props) {
let { id: id, label: label, 'aria-labelledby': ariaLabelledby, 'aria-label': ariaLabel, labelElementType: labelElementType = 'label' } = props;
id = (0, $83Elw$useId)(id);
let labelId = (0, $83Elw$useId)();
let labelProps = {};
if (label) {
ariaLabelledby = ariaLabelledby ? `${labelId} ${ariaLabelledby}` : labelId;
labelProps = {
id: labelId,
htmlFor: labelElementType === 'label' ? id : undefined
};
} else if (!ariaLabelledby && !ariaLabel) console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');
let fieldProps = (0, $83Elw$useLabels)({
id: id,
'aria-label': ariaLabel,
'aria-labelledby': ariaLabelledby
});
return {
labelProps: labelProps,
fieldProps: fieldProps
};
}
export {$d191a55c9702f145$export$8467354a121f1b9f as useLabel};
//# sourceMappingURL=useLabel.module.js.map
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PolicyConstraints = exports.id_ce_policyConstraints = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const object_identifiers_1 = require("../object_identifiers");
exports.id_ce_policyConstraints = `${object_identifiers_1.id_ce}.36`;
class PolicyConstraints {
constructor(params = {}) {
Object.assign(this, params);
}
}
exports.PolicyConstraints = PolicyConstraints;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: asn1_schema_1.AsnPropTypes.Integer,
context: 0,
implicit: true,
optional: true,
converter: asn1_schema_1.AsnIntegerArrayBufferConverter,
})
], PolicyConstraints.prototype, "requireExplicitPolicy", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: asn1_schema_1.AsnPropTypes.Integer,
context: 1,
implicit: true,
optional: true,
converter: asn1_schema_1.AsnIntegerArrayBufferConverter,
})
], PolicyConstraints.prototype, "inhibitPolicyMapping", void 0);
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=checkPlanServiceRedirectionBindingNodeSingleInjectionBindings.spec.d.ts.map
@@ -0,0 +1,99 @@
import { ConfigUtils } from './config-utils'
import { IMPORTANT_MODIFIER, sortModifiers } from './modifier-utils'
const SPLIT_CLASSES_REGEX = /\s+/
export function mergeClassList(classList: string, configUtils: ConfigUtils) {
const { splitModifiers, getClassGroupId, getConflictingClassGroupIds } = configUtils
/**
* Set of classGroupIds in following format:
* `{importantModifier}{variantModifiers}{classGroupId}`
* @example 'float'
* @example 'hover:focus:bg-color'
* @example 'md:!pr'
*/
const classGroupsInConflict = new Set<string>()
return (
classList
.trim()
.split(SPLIT_CLASSES_REGEX)
.map((originalClassName) => {
const {
modifiers,
hasImportantModifier,
baseClassName,
maybePostfixModifierPosition,
} = splitModifiers(originalClassName)
let classGroupId = getClassGroupId(
maybePostfixModifierPosition
? baseClassName.substring(0, maybePostfixModifierPosition)
: baseClassName,
)
let hasPostfixModifier = Boolean(maybePostfixModifierPosition)
if (!classGroupId) {
if (!maybePostfixModifierPosition) {
return {
isTailwindClass: false as const,
originalClassName,
}
}
classGroupId = getClassGroupId(baseClassName)
if (!classGroupId) {
return {
isTailwindClass: false as const,
originalClassName,
}
}
hasPostfixModifier = false
}
const variantModifier = sortModifiers(modifiers).join(':')
const modifierId = hasImportantModifier
? variantModifier + IMPORTANT_MODIFIER
: variantModifier
return {
isTailwindClass: true as const,
modifierId,
classGroupId,
originalClassName,
hasPostfixModifier,
}
})
.reverse()
// Last class in conflict wins, so we need to filter conflicting classes in reverse order.
.filter((parsed) => {
if (!parsed.isTailwindClass) {
return true
}
const { modifierId, classGroupId, hasPostfixModifier } = parsed
const classId = modifierId + classGroupId
if (classGroupsInConflict.has(classId)) {
return false
}
classGroupsInConflict.add(classId)
getConflictingClassGroupIds(classGroupId, hasPostfixModifier).forEach((group) =>
classGroupsInConflict.add(modifierId + group),
)
return true
})
.reverse()
.map((parsed) => parsed.originalClassName)
.join(' ')
)
}
@@ -0,0 +1,14 @@
'use strict';
var getPolyfill = require('./polyfill');
var define = require('define-properties');
module.exports = function shimValues() {
var polyfill = getPolyfill();
define(Object, { values: polyfill }, {
values: function testValues() {
return Object.values !== polyfill;
}
});
return polyfill;
};
@@ -0,0 +1,355 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/popover.tsx
var popover_exports = {};
__export(popover_exports, {
default: () => popover_default
});
module.exports = __toCommonJS(popover_exports);
var import_react4 = require("react");
var import_system2 = require("@heroui/system");
var import_overlays4 = require("@react-aria/overlays");
var import_framer_motion = require("framer-motion");
// src/use-popover.ts
var import_react2 = require("react");
var import_react_utils = require("@heroui/react-utils");
var import_overlays2 = require("@react-stately/overlays");
var import_focus = require("@react-aria/focus");
var import_overlays3 = require("@react-aria/overlays");
var import_aria_utils2 = require("@heroui/aria-utils");
var import_system = require("@heroui/system");
var import_aria_utils3 = require("@heroui/aria-utils");
var import_theme = require("@heroui/theme");
var import_utils2 = require("@react-aria/utils");
var import_shared_utils = require("@heroui/shared-utils");
var import_react3 = require("react");
// src/use-aria-popover.ts
var import_react = require("react");
var import_overlays = require("@react-aria/overlays");
var import_aria_utils = require("@heroui/aria-utils");
var import_utils = require("@react-aria/utils");
var import_use_safe_layout_effect = require("@heroui/use-safe-layout-effect");
function useReactAriaPopover(props, state) {
const {
triggerRef,
popoverRef,
showArrow,
offset = 7,
crossOffset = 0,
scrollRef,
shouldFlip,
boundaryElement,
isDismissable = true,
shouldCloseOnBlur = true,
shouldCloseOnScroll = true,
placement: placementProp = "top",
containerPadding,
shouldCloseOnInteractOutside,
isNonModal: isNonModalProp,
isKeyboardDismissDisabled,
updatePositionDeps = [],
...otherProps
} = props;
const isNonModal = isNonModalProp != null ? isNonModalProp : true;
const { overlayProps, underlayProps } = (0, import_overlays.useOverlay)(
{
isOpen: state.isOpen,
onClose: state.close,
shouldCloseOnBlur,
isDismissable,
isKeyboardDismissDisabled,
shouldCloseOnInteractOutside: shouldCloseOnInteractOutside ? shouldCloseOnInteractOutside : (element) => (0, import_aria_utils.ariaShouldCloseOnInteractOutside)(element, triggerRef, state)
},
popoverRef
);
const {
overlayProps: positionProps,
arrowProps,
placement,
updatePosition
} = (0, import_overlays.useOverlayPosition)({
...otherProps,
shouldFlip,
crossOffset,
targetRef: triggerRef,
overlayRef: popoverRef,
isOpen: state.isOpen,
scrollRef,
boundaryElement,
containerPadding,
placement: (0, import_aria_utils.toReactAriaPlacement)(placementProp),
offset: showArrow ? offset + 3 : offset,
onClose: isNonModal && shouldCloseOnScroll ? state.close : () => {
}
});
(0, import_use_safe_layout_effect.useSafeLayoutEffect)(() => {
if (!updatePositionDeps.length)
return;
updatePosition();
}, updatePositionDeps);
(0, import_react.useEffect)(() => {
if (state.isOpen && !isNonModal && popoverRef.current) {
return (0, import_aria_utils.ariaHideOutside)([popoverRef.current]);
}
}, [isNonModal, state.isOpen, popoverRef]);
return {
popoverProps: (0, import_utils.mergeProps)(overlayProps, positionProps),
arrowProps,
underlayProps,
placement
};
}
// src/use-popover.ts
var DEFAULT_PLACEMENT = "top";
function usePopover(originalProps) {
var _a, _b, _c;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.popover.variantKeys);
const {
as,
ref,
children,
state: stateProp,
triggerRef: triggerRefProp,
scrollRef,
defaultOpen,
onOpenChange,
isOpen: isOpenProp,
isNonModal = true,
shouldFlip = true,
containerPadding = 12,
shouldBlockScroll = false,
isDismissable = true,
shouldCloseOnBlur,
portalContainer,
updatePositionDeps,
dialogProps: dialogPropsProp,
placement: placementProp = DEFAULT_PLACEMENT,
triggerType = "dialog",
showArrow = false,
offset = 7,
crossOffset = 0,
boundaryElement,
isKeyboardDismissDisabled,
shouldCloseOnInteractOutside,
shouldCloseOnScroll,
motionProps,
className,
classNames,
onClose,
...otherProps
} = props;
const Component = as || "div";
const domRef = (0, import_react_utils.useDOMRef)(ref);
const domTriggerRef = (0, import_react3.useRef)(null);
const wasTriggerPressedRef = (0, import_react3.useRef)(false);
const triggerRef = triggerRefProp || domTriggerRef;
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const innerState = (0, import_overlays2.useOverlayTriggerState)({
isOpen: isOpenProp,
defaultOpen,
onOpenChange: (isOpen) => {
onOpenChange == null ? void 0 : onOpenChange(isOpen);
if (!isOpen) {
onClose == null ? void 0 : onClose();
}
}
});
const state = stateProp || innerState;
const {
popoverProps,
underlayProps,
placement: ariaPlacement
} = useReactAriaPopover(
{
triggerRef,
isNonModal,
popoverRef: domRef,
placement: placementProp,
offset,
scrollRef,
isDismissable,
shouldCloseOnBlur,
boundaryElement,
crossOffset,
shouldFlip,
containerPadding,
updatePositionDeps,
isKeyboardDismissDisabled,
shouldCloseOnScroll,
shouldCloseOnInteractOutside
},
state
);
const placement = (0, import_react3.useMemo)(() => {
if (!ariaPlacement) {
return null;
}
return (0, import_aria_utils2.getShouldUseAxisPlacement)(ariaPlacement, placementProp) ? ariaPlacement : placementProp;
}, [ariaPlacement, placementProp]);
const { triggerProps } = (0, import_overlays3.useOverlayTrigger)({ type: triggerType }, state, triggerRef);
const { isFocusVisible, isFocused, focusProps } = (0, import_focus.useFocusRing)();
const slots = (0, import_react3.useMemo)(
() => (0, import_theme.popover)({
...variantProps
}),
[(0, import_shared_utils.objectToDeps)(variantProps)]
);
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
(0, import_overlays3.usePreventScroll)({
isDisabled: !(shouldBlockScroll && state.isOpen)
});
const getPopoverProps = (props2 = {}) => ({
ref: domRef,
...(0, import_utils2.mergeProps)(popoverProps, otherProps, props2),
style: (0, import_utils2.mergeProps)(popoverProps.style, otherProps.style, props2.style)
});
const getDialogProps = (props2 = {}) => ({
"data-slot": "base",
"data-open": (0, import_shared_utils.dataAttr)(state.isOpen),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-arrow": (0, import_shared_utils.dataAttr)(showArrow),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
"data-placement": ariaPlacement ? (0, import_aria_utils3.getArrowPlacement)(ariaPlacement, placementProp) : void 0,
...(0, import_utils2.mergeProps)(focusProps, dialogPropsProp, props2),
className: slots.base({ class: (0, import_shared_utils.clsx)(baseStyles) }),
style: {
outline: "none"
}
});
const getContentProps = (0, import_react3.useCallback)(
(props2 = {}) => ({
"data-slot": "content",
"data-open": (0, import_shared_utils.dataAttr)(state.isOpen),
"data-arrow": (0, import_shared_utils.dataAttr)(showArrow),
"data-placement": ariaPlacement ? (0, import_aria_utils3.getArrowPlacement)(ariaPlacement, placementProp) : void 0,
className: slots.content({ class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.content, props2.className) })
}),
[slots, state.isOpen, showArrow, placement, placementProp, classNames, ariaPlacement]
);
const onPress = (0, import_react3.useCallback)(
(e) => {
var _a2;
let pressTimer;
if (e.pointerType === "touch" && ((originalProps == null ? void 0 : originalProps.backdrop) === "blur" || (originalProps == null ? void 0 : originalProps.backdrop) === "opaque")) {
pressTimer = setTimeout(() => {
wasTriggerPressedRef.current = true;
}, 100);
} else {
wasTriggerPressedRef.current = true;
}
(_a2 = triggerProps.onPress) == null ? void 0 : _a2.call(triggerProps, e);
return () => {
clearTimeout(pressTimer);
};
},
[triggerProps == null ? void 0 : triggerProps.onPress]
);
const getTriggerProps = (0, import_react3.useCallback)(
(props2 = {}, _ref = null) => {
const { isDisabled, ...otherProps2 } = props2;
return {
"data-slot": "trigger",
...(0, import_utils2.mergeProps)({ "aria-haspopup": "dialog" }, triggerProps, otherProps2),
onPress,
isDisabled,
className: slots.trigger({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.trigger, props2.className),
isTriggerDisabled: isDisabled
}),
ref: (0, import_utils2.mergeRefs)(_ref, triggerRef)
};
},
[state, triggerProps, onPress, triggerRef]
);
const getBackdropProps = (0, import_react3.useCallback)(
(props2 = {}) => ({
"data-slot": "backdrop",
className: slots.backdrop({ class: classNames == null ? void 0 : classNames.backdrop }),
onClick: (e) => {
if (!wasTriggerPressedRef.current) {
e.preventDefault();
return;
}
state.close();
wasTriggerPressedRef.current = false;
},
...underlayProps,
...props2
}),
[slots, state.isOpen, classNames, underlayProps]
);
(0, import_react2.useEffect)(() => {
if (state.isOpen && (domRef == null ? void 0 : domRef.current)) {
return (0, import_overlays3.ariaHideOutside)([domRef == null ? void 0 : domRef.current]);
}
}, [state.isOpen, domRef]);
return {
state,
Component,
children,
classNames,
showArrow,
triggerRef,
placement,
isNonModal,
popoverRef: domRef,
portalContainer,
isOpen: state.isOpen,
onClose: state.close,
disableAnimation,
shouldBlockScroll,
backdrop: (_c = originalProps.backdrop) != null ? _c : "transparent",
motionProps,
getBackdropProps,
getPopoverProps,
getTriggerProps,
getDialogProps,
getContentProps
};
}
// src/popover-context.ts
var import_react_utils2 = require("@heroui/react-utils");
var [PopoverProvider, usePopoverContext] = (0, import_react_utils2.createContext)({
name: "PopoverContext",
errorMessage: "usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"
});
// src/popover.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var Popover = (0, import_system2.forwardRef)((props, ref) => {
const { children, ...otherProps } = props;
const context = usePopover({ ...otherProps, ref });
const [trigger, content] = import_react4.Children.toArray(children);
const overlay = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays4.Overlay, { portalContainer: context.portalContainer, children: content });
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PopoverProvider, { value: context, children: [
trigger,
context.disableAnimation && context.isOpen ? overlay : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { children: context.isOpen ? overlay : null })
] });
});
Popover.displayName = "HeroUI.Popover";
var popover_default = Popover;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1,14 @@
'use strict';
var format = require('./format');
/*
* function align (info)
* Returns a new instance of the align Format which adds a `\t`
* delimiter before the message to properly align it in the same place.
* It was previously { align: true } in winston < 3.0.0
*/
module.exports = format(function (info) {
info.message = "\t".concat(info.message);
return info;
});
@@ -0,0 +1,30 @@
import { Spec } from '../../primitives.js';
import { Tokenizer } from './index.js';
/**
* Splits the `@prefix` from remaining `Spec.lines[].token.description` into the `tag` token,
* and populates `spec.tag`
*/
export default function tagTokenizer(): Tokenizer {
return (spec: Spec): Spec => {
const { tokens } = spec.source[0];
const match = tokens.description.match(/\s*(@(\S+))(\s*)/);
if (match === null) {
spec.problems.push({
code: 'spec:tag:prefix',
message: 'tag should start with "@" symbol',
line: spec.source[0].number,
critical: true,
});
return spec;
}
tokens.tag = match[1];
tokens.postTag = match[3];
tokens.description = tokens.description.slice(match[0].length);
spec.tag = match[2];
return spec;
};
}
@@ -0,0 +1,24 @@
import { PluginFunc, ConfigType } from 'dayjs/esm'
declare interface RelativeTimeThreshold {
l: string
r?: number
d?: string
}
declare interface RelativeTimeOptions {
rounding?: (num: number) => number
thresholds?: RelativeTimeThreshold[]
}
declare const plugin: PluginFunc<RelativeTimeOptions>
export = plugin
declare module 'dayjs/esm' {
interface Dayjs {
fromNow(withoutSuffix?: boolean): string
from(compared: ConfigType, withoutSuffix?: boolean): string
toNow(withoutSuffix?: boolean): string
to(compared: ConfigType, withoutSuffix?: boolean): string
}
}
@@ -0,0 +1,37 @@
export interface Napi {
binaryName?: string;
name?: string;
packageName?: string;
package?: {
name: string;
};
targets?: string[];
triples?: {
defaults?: boolean;
additional?: string[];
};
wasm?: {
browser?: {
fs?: boolean;
};
};
}
export interface NapiInfo {
napi: Napi;
version?: string;
}
export interface PackageJson {
name: string;
version: string;
optionalDependencies?: Partial<Record<string, string>>;
napi?: Napi;
}
export type Platform = NodeJS.Platform | 'openharmony' | 'wasi' | 'wasm';
export type NodeJSArch = NodeJS.Architecture | 'universal' | 'wasm32' | 'x32';
export interface Target {
triple: string;
platformArchABI: string;
platform: Platform;
arch: NodeJSArch;
abi: string | null;
}
@@ -0,0 +1 @@
{"name":"which-typed-array","version":"1.1.19","requiresBuild":false,"files":{".editorconfig":{"checkedAt":1794532096822,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},".eslintrc":{"checkedAt":1794532096822,"integrity":"sha512-w/Vr/SubPMRWCkssG5dbCtG3MOlr1OpmWXoOcQkkuTfnB9oL+emrE3MaInqm8u2lIu46Cu34H95pL+2khGvq6g==","mode":420,"size":132},".nycrc":{"checkedAt":1794532096822,"integrity":"sha512-42sgwWzusJB1Dzhl78jX/Zg65Oi0HDDMOGXS/Uklv1kCYn4fHtRsD/JFPwdu+d40vome9XdUspzRWEQAcTGEeQ==","mode":420,"size":216},"LICENSE":{"checkedAt":1794532096822,"integrity":"sha512-CWRd82wre8E2D9wfNTwrOCxhLsdU7obtQTc4poEGt1uTk93MEI2QW01sXILetqMRgoYp4EIKQZNHNCQrALOFjw==","mode":420,"size":1082},"index.js":{"checkedAt":1794532096822,"integrity":"sha512-fl36haSUZg/tkEUDRRGBF6XZOw40CvDzwr7G5FAhRaWtl2hOYNOj+GDySe5yzkvUk68dX6t7lRNPeCqdO/JnxQ==","mode":420,"size":3647},"test/index.js":{"checkedAt":1794532096823,"integrity":"sha512-l7c9swl902XY2xms5XE0wvhQJDIDjs/te3VG6vvU/6jLn8rPTKnBk/TiIRun7m8ZkiS4rqF4/LF76dBNalWMyQ==","mode":420,"size":3472},"package.json":{"checkedAt":1794532096823,"integrity":"sha512-YeoKq2PGqu05kz43nO4+c8ZUFhzm8XWXA7aI9h1P1XqhYyAS9CB3BkqOkoN3H5iD3w2Rw1I4wevBIzl5i4wLZw==","mode":420,"size":3294},"tsconfig.json":{"checkedAt":1794532096823,"integrity":"sha512-yBa5QsTmKjhsj6ZfkrRbLJI/vwtZmZ1FAa1Uaef7Ye3lZ2GQz4ZobuUBMv1x23RwaUCkO25PM5kIga95ZLyq2g==","mode":420,"size":123},"CHANGELOG.md":{"checkedAt":1794532096823,"integrity":"sha512-mFocVAm/qrMR8u3GfA2JwCHPBSRDosaq1ZWBf8GDVeg3ZwnE+nmB8eYG3oZHDrx4LD5El/CAPBkToPM5ZK50gQ==","mode":420,"size":25399},"README.md":{"checkedAt":1794532096823,"integrity":"sha512-uHEWNKas9hTZUi8wG4cwSlOw0znDq/ulD3wt4pm3D7obC6TNTzxTVlFCm+giW3GopCm2e2QnBiOUHI0WM9nIEg==","mode":420,"size":3468},"index.d.ts":{"checkedAt":1794532096823,"integrity":"sha512-HcDkPcXbRCJlj1QhKOoAH4CeO3eWWQY+SfnzA8QhA8b+56KISjrYnQow8wkAyClKGihYsa1TQGcaJ5314vVhMw==","mode":420,"size":2206},".github/FUNDING.yml":{"checkedAt":1794532096823,"integrity":"sha512-aD+ipYdjsPO91vo9szF6xgm2Q84saQS5KSvOvFJbTcCiNpSdHLr3Of12aDeT1LlVbzvnaAXBVLA7hXo0y2AKiw==","mode":420,"size":588}}}
@@ -0,0 +1,100 @@
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var hasStrictMode = require('has-strict-mode')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var iterate = require('iterate-iterator');
var index = require('../Iterator.prototype.toArray');
var impl = require('../Iterator.prototype.toArray/implementation');
var fnName = 'toArray';
var isEnumerable = Object.prototype.propertyIsEnumerable;
var testIterator = require('./helpers/testIterator');
module.exports = {
tests: function (toArray, name, t) {
t['throws'](
function () { return new toArray(); }, // eslint-disable-line new-cap
TypeError,
'`' + name + '` is not a constructor'
);
forEach(v.primitives.concat(v.objects), function (nonIterator) {
t['throws'](
function () { iterate(toArray(nonIterator)); },
TypeError,
debug(nonIterator) + ' is not an Object with a callable `next` method'
);
var badNext = { next: nonIterator };
t['throws'](
function () { iterate(toArray(badNext)); },
TypeError,
debug(badNext) + ' is not an Object with a callable `next` method'
);
});
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
var arr = [1, 2, 3];
var iterator = callBind(arr[Symbol.iterator], arr);
st['throws'](
function () { return new toArray(iterator()); }, // eslint-disable-line new-cap
TypeError,
'`' + name + '` iterator is not a constructor'
);
testIterator(iterator(), [1, 2, 3], st, 'original');
st.deepEqual(toArray(iterator()), [1, 2, 3], 'toArray');
st.end();
});
},
index: function () {
test('Iterator.prototype.' + fnName + ': index', function (t) {
module.exports.tests(index, 'Iterator.prototype.' + fnName, t);
t.end();
});
},
implementation: function () {
test('Iterator.prototype.' + fnName + ': implementation', function (t) {
module.exports.tests(callBind(impl), 'Iterator.prototype.' + fnName, t);
t.end();
});
},
shimmed: function () {
test('Iterator.prototype.' + fnName + ': shimmed', function (t) {
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.prototype[fnName].name, fnName, 'Iterator#' + fnName + ' has name "' + fnName + '"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator.prototype, fnName), 'Iterator#' + fnName + ' is not enumerable');
et.end();
});
t.test('bad string/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return Iterator.prototype[fnName].call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Iterator.prototype[fnName].call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
module.exports.tests(callBind(Iterator.prototype[fnName]), 'Iterator.prototype.' + fnName, t);
t.end();
});
}
};
@@ -0,0 +1,9 @@
import type { useSyncExternalStore } from 'use-sync-external-store'
import type { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector'
export const notInitialized = () => {
throw new Error('uSES not initialized!')
}
export type uSES = typeof useSyncExternalStore
export type uSESWS = typeof useSyncExternalStoreWithSelector
@@ -0,0 +1,227 @@
// Copyright (c) 2016 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
// Efficient integer->string conversion and string concatenation. The
// hexadecimal conversion may optionally have leading zeros. Other ways to
// convert integers to strings in C++ suffer these drawbacks:
//
// * std::stringstream: Inefficient, even more so than stdio.
//
// * std::to_string: No hexadecimal output, tends to use heap allocation, not
// supported on Cygwin.
//
// * stdio routines: Requires parsing a format string (inefficient). The
// caller *must* know how large the content is for correctness. The
// string-printf functions are extremely inconsistent on Windows. In
// particular, 64-bit integers, wide strings, and return values are
// problem areas.
//
// StringBuilderTest.cc is a standalone program that tests this header.
#ifndef WINPTY_STRING_BUILDER_H
#define WINPTY_STRING_BUILDER_H
#include <array>
#include <string>
#include <type_traits>
#ifdef STRING_BUILDER_TESTING
#include <assert.h>
#define STRING_BUILDER_CHECK(cond) assert(cond)
#else
#define STRING_BUILDER_CHECK(cond)
#endif // STRING_BUILDER_TESTING
#include "WinptyAssert.h"
template <typename C, size_t sz>
struct ValueString {
std::array<C, sz> m_array;
size_t m_offset;
size_t m_size;
const C *c_str() const { return m_array.data() + m_offset; }
const C *data() const { return m_array.data() + m_offset; }
size_t size() const { return m_size; }
std::basic_string<C> str() const {
return std::basic_string<C>(data(), m_size);
}
};
#ifdef _MSC_VER
// Disable an MSVC /SDL error that forbids unsigned negation. Signed negation
// invokes undefined behavior for INTxx_MIN, so unsigned negation is simpler to
// reason about. (We assume twos-complement in any case.)
#define STRING_BUILDER_ALLOW_UNSIGNED_NEGATE(x) \
( \
__pragma(warning(push)) \
__pragma(warning(disable:4146)) \
(x) \
__pragma(warning(pop)) \
)
#else
#define STRING_BUILDER_ALLOW_UNSIGNED_NEGATE(x) (x)
#endif
// Formats an integer as decimal without leading zeros.
template <typename C, typename I>
ValueString<C, sizeof(I) * 3 + 1 + 1> gdecOfInt(const I value) {
typedef typename std::make_unsigned<I>::type U;
auto unsValue = static_cast<U>(value);
const bool isNegative = (value < 0);
if (isNegative) {
unsValue = STRING_BUILDER_ALLOW_UNSIGNED_NEGATE(-unsValue);
}
decltype(gdecOfInt<C, I>(value)) out;
auto &arr = out.m_array;
C *const endp = arr.data() + arr.size();
C *outp = endp;
*(--outp) = '\0';
STRING_BUILDER_CHECK(outp >= arr.data());
do {
const int digit = unsValue % 10;
unsValue /= 10;
*(--outp) = '0' + digit;
STRING_BUILDER_CHECK(outp >= arr.data());
} while (unsValue != 0);
if (isNegative) {
*(--outp) = '-';
STRING_BUILDER_CHECK(outp >= arr.data());
}
out.m_offset = outp - arr.data();
out.m_size = endp - outp - 1;
return out;
}
template <typename I> decltype(gdecOfInt<char, I>(0)) decOfInt(I i) {
return gdecOfInt<char>(i);
}
template <typename I> decltype(gdecOfInt<wchar_t, I>(0)) wdecOfInt(I i) {
return gdecOfInt<wchar_t>(i);
}
// Formats an integer as hexadecimal, with or without leading zeros.
template <typename C, bool leadingZeros=false, typename I>
ValueString<C, sizeof(I) * 2 + 1> ghexOfInt(const I value) {
typedef typename std::make_unsigned<I>::type U;
const auto unsValue = static_cast<U>(value);
static const C hex[16] = {'0','1','2','3','4','5','6','7',
'8','9','a','b','c','d','e','f'};
decltype(ghexOfInt<C, leadingZeros, I>(value)) out;
auto &arr = out.m_array;
C *outp = arr.data();
int inIndex = 0;
int shift = sizeof(I) * 8 - 4;
const int len = sizeof(I) * 2;
if (!leadingZeros) {
for (; inIndex < len - 1; ++inIndex, shift -= 4) {
STRING_BUILDER_CHECK(shift >= 0 && shift < sizeof(unsValue) * 8);
const int digit = (unsValue >> shift) & 0xF;
if (digit != 0) {
break;
}
}
}
for (; inIndex < len; ++inIndex, shift -= 4) {
const int digit = (unsValue >> shift) & 0xF;
*(outp++) = hex[digit];
STRING_BUILDER_CHECK(outp <= arr.data() + arr.size());
}
*(outp++) = '\0';
STRING_BUILDER_CHECK(outp <= arr.data() + arr.size());
out.m_offset = 0;
out.m_size = outp - arr.data() - 1;
return out;
}
template <bool leadingZeros=false, typename I>
decltype(ghexOfInt<char, leadingZeros, I>(0)) hexOfInt(I i) {
return ghexOfInt<char, leadingZeros, I>(i);
}
template <bool leadingZeros=false, typename I>
decltype(ghexOfInt<wchar_t, leadingZeros, I>(0)) whexOfInt(I i) {
return ghexOfInt<wchar_t, leadingZeros, I>(i);
}
template <typename C>
class GStringBuilder {
public:
typedef std::basic_string<C> StringType;
GStringBuilder() {}
GStringBuilder(size_t capacity) {
m_out.reserve(capacity);
}
GStringBuilder &operator<<(C ch) { m_out.push_back(ch); return *this; }
GStringBuilder &operator<<(const C *str) { m_out.append(str); return *this; }
GStringBuilder &operator<<(const StringType &str) { m_out.append(str); return *this; }
template <size_t sz>
GStringBuilder &operator<<(const ValueString<C, sz> &str) {
m_out.append(str.data(), str.size());
return *this;
}
private:
// Forbid output of char/wchar_t for GStringBuilder if the type doesn't
// exactly match the builder element type. The code still allows
// signed char and unsigned char, but I'm a little worried about what
// happens if a user tries to output int8_t or uint8_t.
template <typename P>
typename std::enable_if<
(std::is_same<P, char>::value || std::is_same<P, wchar_t>::value) &&
!std::is_same<C, P>::value, GStringBuilder&>::type
operator<<(P ch) {
ASSERT(false && "Method was not supposed to be reachable.");
return *this;
}
public:
GStringBuilder &operator<<(short i) { return *this << gdecOfInt<C>(i); }
GStringBuilder &operator<<(unsigned short i) { return *this << gdecOfInt<C>(i); }
GStringBuilder &operator<<(int i) { return *this << gdecOfInt<C>(i); }
GStringBuilder &operator<<(unsigned int i) { return *this << gdecOfInt<C>(i); }
GStringBuilder &operator<<(long i) { return *this << gdecOfInt<C>(i); }
GStringBuilder &operator<<(unsigned long i) { return *this << gdecOfInt<C>(i); }
GStringBuilder &operator<<(long long i) { return *this << gdecOfInt<C>(i); }
GStringBuilder &operator<<(unsigned long long i) { return *this << gdecOfInt<C>(i); }
GStringBuilder &operator<<(const void *p) {
m_out.push_back(static_cast<C>('0'));
m_out.push_back(static_cast<C>('x'));
*this << ghexOfInt<C>(reinterpret_cast<uintptr_t>(p));
return *this;
}
StringType str() { return m_out; }
StringType str_moved() { return std::move(m_out); }
const C *c_str() const { return m_out.c_str(); }
private:
StringType m_out;
};
typedef GStringBuilder<char> StringBuilder;
typedef GStringBuilder<wchar_t> WStringBuilder;
#endif // WINPTY_STRING_BUILDER_H
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,kBAAkB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,oBAAiB,CAAC;IAC7E,qBAAqB,CAAC,0DAAoD,CAAC;IAC3E,UAAU,CAAC,UAAU,CAAC;IACtB,eAAe,CAAC,4BAA4B,CAAC;IAC7C,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,uBAAuB,CAAC;YAAE,KAAK,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,iBAAiB,CAAC;YAAE,OAAO,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,mBAAmB,CAAC;QAAA,GAAG,CAAC,CAAC;IAC7O,gBAAgB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,aAAa,CAAC;AACvD","sources":["packages/@react-aria/grid/intl/pt-BR.json"],"sourcesContent":["{\n \"deselectedItem\": \"{item} não selecionado.\",\n \"longPressToSelect\": \"Mantenha pressionado para entrar no modo de seleção.\",\n \"select\": \"Selecionar\",\n \"selectedAll\": \"Todos os itens selecionados.\",\n \"selectedCount\": \"{count, plural, =0 {Nenhum item selecionado} one {# item selecionado} other {# itens selecionados}}.\",\n \"selectedItem\": \"{item} selecionado.\"\n}\n"],"names":[],"version":3,"file":"pt-BR.module.js.map"}
@@ -0,0 +1,174 @@
<div align="center">
<img
src="peowly.svg"
width="512"
height="auto"
alt="peowly"
/>
</div>
<div align="center">
[![npm version](https://img.shields.io/npm/v/peowly.svg?style=flat)](https://www.npmjs.com/package/peowly)
[![npm downloads](https://img.shields.io/npm/dm/peowly.svg?style=flat)](https://www.npmjs.com/package/peowly)
[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-7fffff?style=flat&labelColor=ff80ff)](https://github.com/neostandard/neostandard)
[![Module type: ESM](https://img.shields.io/badge/module%20type-esm-brightgreen)](https://github.com/voxpelli/badges-cjs-esm)
[![Types in JS](https://img.shields.io/badge/types_in_js-yes-brightgreen)](https://github.com/voxpelli/types-in-js)
[![Follow @voxpelli@mastodon.social](https://img.shields.io/mastodon/follow/109247025527949675?domain=https%3A%2F%2Fmastodon.social&style=social)](https://mastodon.social/@voxpelli)
</div>
[`meow`](https://github.com/sindresorhus/meow) inspired [`parseArgs()`](https://nodejs.org/api/util.html#utilparseargsconfig) based CLI parser. Also contains help text helpers
## Usage
### Simple
```javascript
const { flags } = peowly({
options: {
fix: {
description: 'Fixes stuff',
type: 'boolean',
},
},
});
```
### Example
See [`example/basic.js`](./example/basic.js)
## API
### peowly()
```ts
peowly(options): { flags, input, remainderArgs, showHelp }
```
#### Meta Options
* `description` - _string_ | _false_ - a description that will be prefixed to the help text (defaults to `pkg.description`, deactivated by `false`)
* `examples` - see [`HelpMessageInfo`](#helpmessageinfo)
* `help` - _string_ - the help text to show on `--help`, preferably generated with `formatHelpMessage()` (defaults to being rendered with `formatHelpMessage()` using available data)
* `indent` - see [`HelpMessageInfo`](#helpmessageinfo)
* `name` - _string_ - the name of the CLI command. Used by a couple of other defaults. (defaults to the first key in `pkg.bin` and else to `pkg.name`)
* `pkg` - _`PackageJsonLike`_ - a `package.json` which some meta data can be derived from
* `processTitle` - _string_ | _false_ - sets the `process.title` to this (defaults to `name`, deactivated by `false`)
* `usage` - see [`HelpMessageInfo`](#helpmessageinfo)
* `version` - _string_ - the version to show on `--version` (defaults to `pkg.version`)
#### Parser Options
* `args` - _string[]_ - same as for [`parseArgs()`](https://nodejs.org/api/util.html#utilparseargsconfig) (defaults to `process.argv` with `execPath` and `filename` removed)
* `options` - _`Flags`_ - superset of that of [`parseArgs()`](https://nodejs.org/api/util.html#utilparseargsconfig). Every option / flag is expected to have a `description` string property in addition to what `parseArgs()` require and they may have a `listGroup` string property as well
* `returnRemainderArgs` - _boolean_ - if set, then all parts of `args` that doesn't match a flag in `options` will be returned as `remainderArgs`, which can eg. be forwarded to another parser
### formatHelpMessage()
```ts
formatHelpMessage(name: string, info?: HelpMessageInfo): string
```
#### Arguments
* `name` - _string_ - the name of the CLI command
#### HelpMessageInfo
* `aliases` - _`HelpListBasic`_ - list of help items to join with `commands` but with group name defaulting to `'Aliases'` and other group names being prefixed with `' Aliases'`
* `commands` - _`HelpListBasic`_ - list of help items to add prior to the flags list and with a default group name of `'Commands'`
* `examples` - _`(string | { prefix?: string, suffix?: string })[]`_ - will be added as examples on individual lines prefixed with `$ ${name}` or, if provided as prefix and suffix, then the prefix will go inbetween `$ ` and the `name` and the suffix after that, separated by spaces
* `flags` - _`HelpList`_ - the flags to output in the help, compatible with _`Flags`_
* `indent` - _number_ - the number of spaces to indent the help text with (defaults to `2`)
* `noDefaultFlags` - _boolean_ - excludes the default flags from the help text
* `usage` - _string_ - what, if anything, that follows the `$ ${name}` in `'Usage'` headline in the initial help text
#### Types
```ts
import type { AnyFlag } from 'peowly';
interface HelpListBasicItem {
listGroup?: string;
description: string;
}
type HelpListItem = AnyFlag | HelpListBasicItem;
type HelpListBasic = Record<string, HelpListBasicItem>;
type HelpList = Record<string, HelpListItem | string>;
```
### defaultFlags
Contains the definition of the two default flags `--help` and `--version`.
### formatHelpList()
Most of the time you should use [`formatHelpMessage()`](#formathelpmessage) instead.
```ts
function formatHelpList(list: HelpList, indent: number, options?: HelpListOptions): string
```
#### Arguments
* `list` - _HelpList_ - the list that represents the flags, see types in [`formatHelpMessage()`](#formathelpmessage)
* `indent` - _number_ - how far to indent the list
#### HelpListOptions
* `fixedPadName` - _boolean_ - when set, `padName` will be treated as a fixed rather than minimum padding
* `keyPrefix` - _string_ - a prefix for the name
* `padName` - _number_ - the minimum padding between names and descriptions
* `shortFlagPrefix` - _string_ - a prefix for a `shortFlag` (defaults to `'-'`)
### formatFlagList()
```ts
function formatFlagList(list: HelpList, indent: number, options?: HelpListOptions): string
```
Same as [`formatHelpList()`](#formathelplist) but with the [`keyPrefix`](#helplistoptions) option defaulting to `'--'`.
### formatGroupedHelpList()
```ts
formatGroupedHelpList(list: HelpList, indent: number, options?: HelpListGroupOptions): string
```
Similar to [`formatHelpList()`](#formathelplist) but prints help items grouped and has some additional options to support it in that.
#### HelpListGroupOptions
Same as [`HelpListOptions`](#helplistoptions) but with these additional options:
* `alignWithinGroups` - _boolean_ - when set (and unless [`fixedPadName`](#helplistoptions) is set) the padding between name and description will be calculated within each group instead of across all groups
* `defaultGroupName` - _string_ - the default group name where all items that have no explicit group belonging will be placed (defaults to `'Default'`)
* `defaultGroupOrderFirst` - _boolean_ - if set the default group is added at the start rather than at the end
### formatGroupedFlagList()
```ts
formatGroupedFlagList(list: HelpList, indent: number, options?: HelpListGroupOptions): string
```
Same as [`formatGroupedHelpList()`](#formatgroupedhelplist) but with the [`keyPrefix`](#helplistoptions) option defaulting to `'--'` and [`defaultGroup`](#helplistgroupoptions) defaulting to `'Options'`.
<!-- ## Used by
* [`example`](https://example.com/) - used by this one to do X and Y -->
## Similar modules
* [`argsclopts`](https://github.com/bcomnes/argsclopts) - also concerned with generating help texts for `parseArgs()`
* [`meow`](https://github.com/sindresorhus/meow) - a more full fledged alternative and name inspiration (`p` as in `parseArgs`, `eow` as in `meow`, `ly` to avoid being perceived as a typejacking)
* [`meow-with-subcommands`](https://github.com/voxpelli/meow-with-subcommands) - a companion module to `meow` that provides the same help functionality as this module
* [`peowly-commands`](https://github.com/voxpelli/peowly-commands) - a companion module to this module that makes it on par with `meow-with-subcommands`
## See also
* [`parseArgs()`](https://nodejs.org/api/util.html#utilparseargsconfig) - the node.js API this module is built around. Available since `v18.3.0` and `v16.17.0`, non-experimental since `v20.0.0`.
@@ -0,0 +1,39 @@
// Albanian [sq]
import dayjs from '../index';
var locale = {
name: 'sq',
weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),
months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),
weekStart: 1,
weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
ordinal: function ordinal(n) {
return n;
},
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm'
},
relativeTime: {
future: 'në %s',
past: '%s më parë',
s: 'disa sekonda',
m: 'një minutë',
mm: '%d minuta',
h: 'një orë',
hh: '%d orë',
d: 'një ditë',
dd: '%d ditë',
M: 'një muaj',
MM: '%d muaj',
y: 'një vit',
yy: '%d vite'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1,61 @@
import React, { useState, useCallback } from 'react';
const hiddenStyles = {
display: 'none'
};
function HiddenText(_ref) {
let {
id,
value
} = _ref;
return React.createElement("div", {
id: id,
style: hiddenStyles
}, value);
}
function LiveRegion(_ref) {
let {
id,
announcement,
ariaLiveType = "assertive"
} = _ref;
// Hide element visually but keep it readable by screen readers
const visuallyHidden = {
position: 'fixed',
top: 0,
left: 0,
width: 1,
height: 1,
margin: -1,
border: 0,
padding: 0,
overflow: 'hidden',
clip: 'rect(0 0 0 0)',
clipPath: 'inset(100%)',
whiteSpace: 'nowrap'
};
return React.createElement("div", {
id: id,
style: visuallyHidden,
role: "status",
"aria-live": ariaLiveType,
"aria-atomic": true
}, announcement);
}
function useAnnouncement() {
const [announcement, setAnnouncement] = useState('');
const announce = useCallback(value => {
if (value != null) {
setAnnouncement(value);
}
}, []);
return {
announce,
announcement
};
}
export { HiddenText, LiveRegion, useAnnouncement };
//# sourceMappingURL=accessibility.esm.js.map
@@ -0,0 +1,318 @@
# uint8array-extras
> Useful utilities for working with [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) (and [`Buffer`](https://nodejs.org/api/buffer.html))
It's time to [transition from `Buffer` to `Uint8Array`](https://sindresorhus.com/blog/goodbye-nodejs-buffer), and this package helps fill in the gaps.
Note that `Buffer` is a `Uint8Array` subclass, so you can use this package with `Buffer` too.
This package is tree-shakeable and browser-compatible.
This package also includes methods to convert a string to Base64 and back.
Note: In the browser, do not use [`globalThis.atob()`](https://developer.mozilla.org/en-US/docs/Web/API/atob) / [`globalThis.btoa()`](https://developer.mozilla.org/en-US/docs/Web/API/btoa) because they [do not support Unicode](https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem). This package does.
## Install
```sh
npm install uint8array-extras
```
## Usage
```js
import {concatUint8Arrays} from 'uint8array-extras';
const a = new Uint8Array([1, 2, 3]);
const b = new Uint8Array([4, 5, 6]);
console.log(concatUint8Arrays([a, b]));
//=> Uint8Array [1, 2, 3, 4, 5, 6]
```
## API
### `isUint8Array(value: unknown): boolean`
Check if the given value is an instance of `Uint8Array`.
Replacement for [`Buffer.isBuffer()`](https://nodejs.org/api/buffer.html#static-method-bufferisbufferobj).
```js
import {isUint8Array} from 'uint8array-extras';
console.log(isUint8Array(new Uint8Array()));
//=> true
console.log(isUint8Array(Buffer.from('x')));
//=> true
console.log(isUint8Array(new ArrayBuffer(10)));
//=> false
```
### `assertUint8Array(value: unknown)`
Throw a `TypeError` if the given value is not an instance of `Uint8Array`.
```js
import {assertUint8Array} from 'uint8array-extras';
try {
assertUint8Array(new ArrayBuffer(10)); // Throws a TypeError
} catch (error) {
console.error(error.message);
}
```
### `assertUint8ArrayOrArrayBuffer(value: unknown)`
Throw a `TypeError` if the given value is not an instance of `Uint8Array` or `ArrayBuffer`.
Useful as a guard for functions that accept either a `Uint8Array` or `ArrayBuffer`.
```js
import {assertUint8ArrayOrArrayBuffer} from 'uint8array-extras';
assertUint8ArrayOrArrayBuffer(new Uint8Array());
assertUint8ArrayOrArrayBuffer(new ArrayBuffer(8));
```
### `toUint8Array(value: TypedArray | ArrayBuffer | DataView): Uint8Array`
Convert a value to a `Uint8Array` without copying its data.
This can be useful for converting a `Buffer` to a pure `Uint8Array`. `Buffer` is already a `Uint8Array` subclass, but [`Buffer` alters some behavior](https://sindresorhus.com/blog/goodbye-nodejs-buffer), so it can be useful to cast it to a pure `Uint8Array` before returning it.
Tip: If you want a copy, just call `.slice()` on the return value.
### `concatUint8Arrays(arrays: Uint8Array[], totalLength?: number): Uint8Array`
Concatenate the given arrays into a new array.
If `arrays` is empty, it will return a zero-sized `Uint8Array`.
If `totalLength` is not specified, it is calculated from summing the lengths of the given arrays.
Replacement for [`Buffer.concat()`](https://nodejs.org/api/buffer.html#static-method-bufferconcatlist-totallength).
```js
import {concatUint8Arrays} from 'uint8array-extras';
const a = new Uint8Array([1, 2, 3]);
const b = new Uint8Array([4, 5, 6]);
console.log(concatUint8Arrays([a, b]));
//=> Uint8Array [1, 2, 3, 4, 5, 6]
```
### `areUint8ArraysEqual(a: Uint8Array, b: Uint8Array): boolean`
Check if two arrays are identical by verifying that they contain the same bytes in the same sequence.
Replacement for [`Buffer#equals()`](https://nodejs.org/api/buffer.html#bufequalsotherbuffer).
```js
import {areUint8ArraysEqual} from 'uint8array-extras';
const a = new Uint8Array([1, 2, 3]);
const b = new Uint8Array([1, 2, 3]);
const c = new Uint8Array([4, 5, 6]);
console.log(areUint8ArraysEqual(a, b));
//=> true
console.log(areUint8ArraysEqual(a, c));
//=> false
```
### `compareUint8Arrays(a: Uint8Array, b: Uint8Array): 0 | 1 | -1`
Compare two arrays and indicate their relative order or equality. Useful for sorting.
Replacement for [`Buffer.compare()`](https://nodejs.org/api/buffer.html#static-method-buffercomparebuf1-buf2).
```js
import {compareUint8Arrays} from 'uint8array-extras';
const array1 = new Uint8Array([1, 2, 3]);
const array2 = new Uint8Array([4, 5, 6]);
const array3 = new Uint8Array([7, 8, 9]);
[array3, array1, array2].sort(compareUint8Arrays);
//=> [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
```
### `uint8ArrayToString(array: Uint8Array | ArrayBuffer, encoding?: string = 'utf8'): string`
Convert a `Uint8Array` to a string.
- Parameter: `encoding` - The [encoding](https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API/Encodings) to convert from.
Replacement for [`Buffer#toString()`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end). For the `encoding` parameter, `latin1` should be used instead of `binary` and `utf-16le` instead of `utf16le`.
```js
import {uint8ArrayToString} from 'uint8array-extras';
const byteArray = new Uint8Array([72, 101, 108, 108, 111]);
console.log(uint8ArrayToString(byteArray));
//=> 'Hello'
const zh = new Uint8Array([167, 65, 166, 110]);
console.log(uint8ArrayToString(zh, 'big5'));
//=> '你好'
const ja = new Uint8Array([130, 177, 130, 241, 130, 201, 130, 191, 130, 205]);
console.log(uint8ArrayToString(ja, 'shift-jis'));
//=> 'こんにちは'
```
### `stringToUint8Array(string: string): Uint8Array`
Convert a string to a `Uint8Array` (using UTF-8 encoding).
Replacement for [`Buffer.from('Hello')`](https://nodejs.org/api/buffer.html#static-method-bufferfromstring-encoding).
```js
import {stringToUint8Array} from 'uint8array-extras';
console.log(stringToUint8Array('Hello'));
//=> Uint8Array [72, 101, 108, 108, 111]
```
### `uint8ArrayToBase64(array: Uint8Array, options?: {urlSafe: boolean}): string`
Convert a `Uint8Array` to a Base64-encoded string.
Specify `{urlSafe: true}` to get a [Base64URL](https://base64.guru/standards/base64url)-encoded string.
Replacement for [`Buffer#toString('base64')`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end).
```js
import {uint8ArrayToBase64} from 'uint8array-extras';
const byteArray = new Uint8Array([72, 101, 108, 108, 111]);
console.log(uint8ArrayToBase64(byteArray));
//=> 'SGVsbG8='
```
### `base64ToUint8Array(string: string): Uint8Array`
Convert a Base64-encoded or [Base64URL](https://base64.guru/standards/base64url)-encoded string to a `Uint8Array`.
Accepts Base64URL with or without padding.
Replacement for [`Buffer.from('SGVsbG8=', 'base64')`](https://nodejs.org/api/buffer.html#static-method-bufferfromstring-encoding).
```js
import {base64ToUint8Array} from 'uint8array-extras';
console.log(base64ToUint8Array('SGVsbG8='));
//=> Uint8Array [72, 101, 108, 108, 111]
```
### `stringToBase64(string: string, options?: {urlSafe: boolean}): string`
Encode a string to a Base64-encoded string.
Specify `{urlSafe: true}` to get a [Base64URL](https://base64.guru/standards/base64url)-encoded string.
Replacement for `Buffer.from('Hello').toString('base64')` and [`btoa()`](https://developer.mozilla.org/en-US/docs/Web/API/btoa).
```js
import {stringToBase64} from 'uint8array-extras';
console.log(stringToBase64('Hello'));
//=> 'SGVsbG8='
```
### `base64ToString(base64String: string): string`
Decode a Base64-encoded or [Base64URL](https://base64.guru/standards/base64url)-encoded string to a string.
Accepts Base64URL with or without padding.
Replacement for `Buffer.from('SGVsbG8=', 'base64').toString()` and [`atob()`](https://developer.mozilla.org/en-US/docs/Web/API/atob).
```js
import {base64ToString} from 'uint8array-extras';
console.log(base64ToString('SGVsbG8='));
//=> 'Hello'
```
### `uint8ArrayToHex(array: Uint8Array): string`
Convert a `Uint8Array` to a Hex string.
Replacement for [`Buffer#toString('hex')`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end).
```js
import {uint8ArrayToHex} from 'uint8array-extras';
const byteArray = new Uint8Array([72, 101, 108, 108, 111]);
console.log(uint8ArrayToHex(byteArray));
//=> '48656c6c6f'
```
### `hexToUint8Array(hexString: string): Uint8Array`
Convert a Hex string to a `Uint8Array`.
Replacement for [`Buffer.from('48656c6c6f', 'hex')`](https://nodejs.org/api/buffer.html#static-method-bufferfromstring-encoding).
```js
import {hexToUint8Array} from 'uint8array-extras';
console.log(hexToUint8Array('48656c6c6f'));
//=> Uint8Array [72, 101, 108, 108, 111]
```
### `getUintBE(view: DataView): number`
Read `DataView#byteLength` number of bytes from the given view, up to 48-bit.
Replacement for [`Buffer#readUIntBE`](https://nodejs.org/api/buffer.html#bufreaduintbeoffset-bytelength)
```js
import {getUintBE} from 'uint8array-extras';
const byteArray = new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
console.log(getUintBE(new DataView(byteArray.buffer)));
//=> 20015998341291
```
### `indexOf(array: Uint8Array, value: Uint8Array): number`
Find the index of the first occurrence of the given sequence of bytes (`value`) within the given `Uint8Array` (`array`).
Replacement for [`Buffer#indexOf`](https://nodejs.org/api/buffer.html#bufindexofvalue-byteoffset-encoding). `Uint8Array#indexOf` only takes a number which is different from Buffer's `indexOf` implementation.
```js
import {indexOf} from 'uint8array-extras';
const byteArray = new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef]);
console.log(indexOf(byteArray, new Uint8Array([0x78, 0x90])));
//=> 3
```
### `includes(array: Uint8Array, value: Uint8Array): boolean`
Checks if the given sequence of bytes (`value`) is within the given `Uint8Array` (`array`).
Returns true if the value is included, otherwise false.
Replacement for [`Buffer#includes`](https://nodejs.org/api/buffer.html#bufincludesvalue-byteoffset-encoding). `Uint8Array#includes` only takes a number which is different from Buffer's `includes` implementation.
```js
import {includes} from 'uint8array-extras';
const byteArray = new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef]);
console.log(includes(byteArray, new Uint8Array([0x78, 0x90])));
//=> true
```
@@ -0,0 +1,95 @@
/// <reference types="node" />
import { NextHandleFunction } from "connect";
import * as http from "http";
// for docs go to https://github.com/expressjs/body-parser/tree/1.19.0#body-parser
declare namespace bodyParser {
interface BodyParser {
/**
* @deprecated use individual json/urlencoded middlewares
*/
(options?: OptionsJson & OptionsText & OptionsUrlencoded): NextHandleFunction;
/**
* Returns middleware that only parses json and only looks at requests
* where the Content-Type header matches the type option.
*/
json(options?: OptionsJson): NextHandleFunction;
/**
* Returns middleware that parses all bodies as a Buffer and only looks at requests
* where the Content-Type header matches the type option.
*/
raw(options?: Options): NextHandleFunction;
/**
* Returns middleware that parses all bodies as a string and only looks at requests
* where the Content-Type header matches the type option.
*/
text(options?: OptionsText): NextHandleFunction;
/**
* Returns middleware that only parses urlencoded bodies and only looks at requests
* where the Content-Type header matches the type option
*/
urlencoded(options?: OptionsUrlencoded): NextHandleFunction;
}
interface Options {
/** When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected. Defaults to true. */
inflate?: boolean | undefined;
/**
* Controls the maximum request body size. If this is a number,
* then the value specifies the number of bytes; if it is a string,
* the value is passed to the bytes library for parsing. Defaults to '100kb'.
*/
limit?: number | string | undefined;
/**
* The type option is used to determine what media type the middleware will parse
*/
type?: string | string[] | ((req: http.IncomingMessage) => any) | undefined;
/**
* The verify option, if supplied, is called as verify(req, res, buf, encoding),
* where buf is a Buffer of the raw request body and encoding is the encoding of the request.
*/
verify?(req: http.IncomingMessage, res: http.ServerResponse, buf: Buffer, encoding: string): void;
}
interface OptionsJson extends Options {
/**
* The reviver option is passed directly to JSON.parse as the second argument.
*/
reviver?(key: string, value: any): any;
/**
* When set to `true`, will only accept arrays and objects;
* when `false` will accept anything JSON.parse accepts. Defaults to `true`.
*/
strict?: boolean | undefined;
}
interface OptionsText extends Options {
/**
* Specify the default character set for the text content if the charset
* is not specified in the Content-Type header of the request.
* Defaults to `utf-8`.
*/
defaultCharset?: string | undefined;
}
interface OptionsUrlencoded extends Options {
/**
* The extended option allows to choose between parsing the URL-encoded data
* with the querystring library (when `false`) or the qs library (when `true`).
*/
extended?: boolean | undefined;
/**
* The parameterLimit option controls the maximum number of parameters
* that are allowed in the URL-encoded data. If a request contains more parameters than this value,
* a 413 will be returned to the client. Defaults to 1000.
*/
parameterLimit?: number | undefined;
}
}
declare const bodyParser: bodyParser.BodyParser;
export = bodyParser;
@@ -0,0 +1,57 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "isIdentifierChar", {
enumerable: true,
get: function () {
return _identifier.isIdentifierChar;
}
});
Object.defineProperty(exports, "isIdentifierName", {
enumerable: true,
get: function () {
return _identifier.isIdentifierName;
}
});
Object.defineProperty(exports, "isIdentifierStart", {
enumerable: true,
get: function () {
return _identifier.isIdentifierStart;
}
});
Object.defineProperty(exports, "isKeyword", {
enumerable: true,
get: function () {
return _keyword.isKeyword;
}
});
Object.defineProperty(exports, "isReservedWord", {
enumerable: true,
get: function () {
return _keyword.isReservedWord;
}
});
Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
enumerable: true,
get: function () {
return _keyword.isStrictBindOnlyReservedWord;
}
});
Object.defineProperty(exports, "isStrictBindReservedWord", {
enumerable: true,
get: function () {
return _keyword.isStrictBindReservedWord;
}
});
Object.defineProperty(exports, "isStrictReservedWord", {
enumerable: true,
get: function () {
return _keyword.isStrictReservedWord;
}
});
var _identifier = require("./identifier.js");
var _keyword = require("./keyword.js");
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC;AAKM,MAAM,4CAAsC;IACjD,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,SAAS;IACT,UAAU;IACV,cAAc;IACd,cAAc;IACd,OAAO;AACT;AAEA,MAAM,8CAAuC;IAC3C,GAAG,yCAAoB;IACvB,aAAa;IACb,OAAO;AACT;AAEO,MAAM,4CAA8C;IACzD,WAAW;IACX,mBAAmB;IACnB,kBAAkB,EAAE;AACtB;AAEO,MAAM,4CAAmD,CAAA,GAAA,oBAAY,EAAoB,CAAC;AAE1F,MAAM,2CAAqC,0BAA0B,KAAK,GAAG;AAqB7E,SAAS,0CAA0B,KAA6B;IACrE,gEAAgE;IAChE,IAAI,KAAK,CAAC,yCAA2B,EAAE;QACrC,IAAI,sBAAC,kBAAkB,qBAAE,iBAAiB,oBAAE,gBAAgB,mBAAE,eAAe,oBAAE,gBAAgB,EAAC,GAAG,KAAK,CAAC,yCAA2B;QACpI,OAAO;gCAAC;+BAAoB;8BAAmB;6BAAkB;8BAAiB;QAAgB;IACpG;IAEA,sDAAsD;IACtD,OAAO,iDAA2B;AACpC;AAEA,SAAS,iDAA8B,KAA6B;IAClE,IAAI,aAAC,SAAS,mBAAE,eAAe,QAAE,IAAI,SAAE,KAAK,qBAAE,iBAAiB,YAAE,QAAQ,sBAAE,qBAAqB,QAAO,GAAG;IAE1G,0BAA0B;IAC1B,IAAI,iBACF,cAAA,YAAc,oBAAoB;IAGpC,6EAA6E;IAC7E,IAAI,kBAA2C,cAAc,YAAY;mBACvE;QACA,kBAAkB,EAAE;QACpB,mBAAmB;IACrB,IAAI;IAEJ,yCAAyC;IACzC,IAAI,cAAuC,CAAA,GAAA,cAAM,EAAE;QACjD,IAAI,CAAC,YAAY,SAAS,MACxB,OAAO;QAET,IAAI,iBAAiB,kCAAY,UAAU;QAC3C,OAAO,0CAAoB;IAC7B,GAAG;QAAC;QAAU;KAAM;IAEpB,IAAI,8BAAA,wCAAA,kBAAmB,iBAAiB,CAAC,KAAK,EAC5C,oBAAoB;IAGtB,4CAA4C;IAC5C,IAAI,eAAe,CAAA,GAAA,iBAAS,EAAE;IAC9B,IAAI,sBAAsB,CAAA,GAAA,cAAM,EAAE;QAChC,IAAI,MACF,OAAO,MAAM,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAA,OAAQ,8BAAQ,YAAY,CAAC,KAAK,KAAK,8BAAQ,YAAY,CAAC,KAAK;QAE7G,OAAO,EAAE;IACX,GAAG;QAAC;QAAc;KAAK;IAEvB,gGAAgG;IAChG,IAAI,CAAC,kBAAkB,oBAAoB,GAAG,CAAA,GAAA,eAAO,EAAE;IACvD,IAAI,CAAC,sBAAsB,sBAAsB,GAAG,CAAA,GAAA,eAAO,EAAE;IAC7D,IAAI,iBAAiB,kBAAkB;QACrC,oBAAoB;QACpB,sBAAsB;IACxB;IAEA,IAAI,cAAuC,CAAA,GAAA,cAAM,EAAE,IACjD,0CAAoB,uBAAuB,EAAE,GAAG,sBAChD;QAAC;QAAsB;KAAoB;IAG7C,6EAA6E;IAC7E,IAAI,iBAAiB,CAAA,GAAA,aAAK,EAAE;IAC5B,IAAI,CAAC,iBAAiB,mBAAmB,GAAG,CAAA,GAAA,eAAO,EAAE;IAErD,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,IAAI,mBAAmB;QACrB,IAAI,CAAC,cACH;QAGF,gBAAgB;QAChB,IAAI,QAAQ,eAAe,qBAAqB,eAAe,OAAO;QACtE,IAAI,CAAC,wCAAkB,OAAO,UAAU,OAAO,GAAG;YAChD,UAAU,OAAO,GAAG;YACpB,mBAAmB;QACrB;IACF;IAEA,IAAI,CAAC,cAAc,gBAAgB,GAAG,CAAA,GAAA,eAAO,EAAE;IAC/C,CAAA,GAAA,gBAAQ,EAAE;IAEV,0GAA0G;IAC1G,uHAAuH;IACvH,8FAA8F;IAC9F,IAAI,qBAAqB,mBAAmB,eAAe,eAAe,qBAAqB;IAC/F,IAAI,oBAAoB,uBAAuB,WAC3C,mBAAmB,eAAe,kBAClC,mBAAmB,eAAe,eAAe,qBAAqB;IAE1E,OAAO;4BACL;2BACA;QACA,kBAAiB,KAAK;YACpB,+FAA+F;YAC/F,IAAI,uBAAuB,UAAU,CAAC,wCAAkB,iBAAiB,QACvE,mBAAmB;iBAEnB,eAAe,OAAO,GAAG;QAE7B;QACA;YACE,0EAA0E;YAC1E,uFAAuF;YACvF,IAAI,QAAQ;YACZ,IAAI,CAAC,wCAAkB,OAAO,UAAU,OAAO,GAAG;gBAChD,UAAU,OAAO,GAAG;gBACpB,mBAAmB;YACrB;YAEA,gFAAgF;YAChF,8DAA8D;YAC9D,IAAI,uBAAuB,UACzB,gBAAgB;YAGlB,sBAAsB;QACxB;QACA;YACE,mGAAmG;YACnG,0FAA0F;YAC1F,IAAI,uBAAuB,UACzB,gBAAgB;YAElB,sBAAsB;QACxB;IACF;AACF;AAEA,SAAS,8BAAW,CAAU;IAC5B,IAAI,CAAC,GACH,OAAO,EAAE;IAGX,OAAO,MAAM,OAAO,CAAC,KAAK,IAAI;QAAC;KAAE;AACnC;AAEA,SAAS,kCAAe,QAA+B,EAAE,KAAQ;IAC/D,IAAI,OAAO,aAAa,YAAY;QAClC,IAAI,IAAI,SAAS;QACjB,IAAI,KAAK,OAAO,MAAM,WACpB,OAAO,8BAAQ;IAEnB;IAEA,OAAO,EAAE;AACX;AAEA,SAAS,0CAAoB,MAAgB;IAC3C,OAAO,OAAO,MAAM,GAAG;QACrB,WAAW;QACX,kBAAkB;QAClB,mBAAmB;IACrB,IAAI;AACN;AAEA,SAAS,wCAAkB,CAA0B,EAAE,CAA0B;IAC/E,IAAI,MAAM,GACR,OAAO;IAGT,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,KACX,EAAE,SAAS,KAAK,EAAE,SAAS,IAC3B,EAAE,gBAAgB,CAAC,MAAM,KAAK,EAAE,gBAAgB,CAAC,MAAM,IACvD,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC,GAAG,IAAM,MAAM,EAAE,gBAAgB,CAAC,EAAE,KAC9D,OAAO,OAAO,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,GAAK,EAAE,iBAAiB,CAAC,EAAE,KAAK;AACxF;AAEO,SAAS,0CAAgB,GAAG,OAA2B;IAC5D,IAAI,SAAS,IAAI;IACjB,IAAI,YAAY;IAChB,IAAI,oBAAoB;QACtB,GAAG,yCAAoB;IACzB;IAEA,KAAK,IAAI,KAAK,QAAS;YAQnB,oBAAkB;QAPpB,KAAK,IAAI,KAAK,EAAE,gBAAgB,CAC9B,OAAO,GAAG,CAAC;QAGb,8CAA8C;QAC9C,cAAA,YAAc,EAAE,SAAS;QACzB,IAAK,IAAI,OAAO,kBACd,CAAA,qBAAA,kBAAiB,CAAC,OAAA,IAAI,KAAtB,kBAAiB,CAAC,KAAI,GAAK,EAAE,iBAAiB,CAAC,IAAI;IAEvD;IAEA,kBAAkB,KAAK,GAAG,CAAC;IAC3B,OAAO;mBACL;QACA,kBAAkB;eAAI;SAAO;2BAC7B;IACF;AACF","sources":["packages/@react-stately/form/src/useFormValidationState.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Context, createContext, useContext, useEffect, useMemo, useRef, useState} from 'react';\nimport {Validation, ValidationErrors, ValidationFunction, ValidationResult} from '@react-types/shared';\n\nexport const VALID_VALIDITY_STATE: ValidityState = {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valueMissing: false,\n valid: true\n};\Line truncated
@@ -0,0 +1,56 @@
# get-stdin
> Get [stdin](https://nodejs.org/api/process.html#process_process_stdin) as a string or buffer
## Install
```
$ npm install get-stdin
```
## Usage
```js
// example.js
import getStdin from 'get-stdin';
console.log(await getStdin());
//=> 'unicorns'
```
```
$ echo unicorns | node example.js
unicorns
```
## API
Both methods returns a promise that is resolved when the `end` event fires on the `stdin` stream, indicating that there is no more data to be read.
### getStdin()
Get `stdin` as a `string`.
In a TTY context, a promise that resolves to an empty `string` is returned.
### getStdin.buffer()
Get `stdin` as a `Buffer`.
In a TTY context, a promise that resolves to an empty `Buffer` is returned.
## Related
- [get-stream](https://github.com/sindresorhus/get-stream) - Get a stream as a string or buffer
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-get-stdin?utm_source=npm-get-stdin&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
@@ -0,0 +1,57 @@
"use strict";
// Zod 3 compat layer
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.config = exports.$brand = exports.ZodIssueCode = void 0;
exports.setErrorMap = setErrorMap;
exports.getErrorMap = getErrorMap;
const core = __importStar(require("../core/index.cjs"));
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
exports.ZodIssueCode = {
invalid_type: "invalid_type",
too_big: "too_big",
too_small: "too_small",
invalid_format: "invalid_format",
not_multiple_of: "not_multiple_of",
unrecognized_keys: "unrecognized_keys",
invalid_union: "invalid_union",
invalid_key: "invalid_key",
invalid_element: "invalid_element",
invalid_value: "invalid_value",
custom: "custom",
};
var index_js_1 = require("../core/index.cjs");
Object.defineProperty(exports, "$brand", { enumerable: true, get: function () { return index_js_1.$brand; } });
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return index_js_1.config; } });
/** @deprecated Use `z.config(params)` instead. */
function setErrorMap(map) {
core.config({
customError: map,
});
}
/** @deprecated Use `z.config()` instead. */
function getErrorMap() {
return core.config().customError;
}
@@ -0,0 +1 @@
"use strict";var c=Object.defineProperty;var a=(r,t)=>c(r,"name",{value:t,configurable:!0});var s=require("./get-pipe-path-BoR10qr8.cjs"),n=require("./register-D46fvsV_.cjs");let e;const i=a((r,t)=>(e||(e=n.register({namespace:Date.now().toString()})),e.require(r,t)),"tsxRequire"),o=a((r,t,u)=>(e||(e=n.register({namespace:Date.now().toString()})),e.resolve(r,t,u)),"resolve");o.paths=s.require.resolve.paths,i.resolve=o,i.main=s.require.main,i.extensions=s.require.extensions,i.cache=s.require.cache,exports.tsxRequire=i;
@@ -0,0 +1,2 @@
export * from './optional-from-mapped-result.mjs';
export * from './optional.mjs';
@@ -0,0 +1,15 @@
import baseRandom from './_baseRandom.js';
/**
* A specialized version of `_.sample` for arrays.
*
* @private
* @param {Array} array The array to sample.
* @returns {*} Returns the random element.
*/
function arraySample(array) {
var length = array.length;
return length ? array[baseRandom(0, length - 1)] : undefined;
}
export default arraySample;
@@ -0,0 +1,17 @@
import { MinimatchOptions } from './index.js';
/**
* Un-escape a string that has been escaped with {@link escape}.
*
* If the {@link windowsPathsNoEscape} option is used, then square-brace
* escapes are removed, but not backslash escapes. For example, it will turn
* the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
* becuase `\` is a path separator in `windowsPathsNoEscape` mode.
*
* When `windowsPathsNoEscape` is not set, then both brace escapes and
* backslash escapes are removed.
*
* Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
* or unescaped.
*/
export declare const unescape: (s: string, { windowsPathsNoEscape, }?: Pick<MinimatchOptions, 'windowsPathsNoEscape'>) => string;
//# sourceMappingURL=unescape.d.ts.map
@@ -0,0 +1,135 @@
/*
* 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 {mod, Mutable} from '../utils';
const EPOCH = 1721426; // 001/01/03 Julian C.E.
export function gregorianToJulianDay(era: string, year: number, month: number, day: number): number {
year = getExtendedYear(era, year);
let y1 = year - 1;
let monthOffset = -2;
if (month <= 2) {
monthOffset = 0;
} else if (isLeapYear(year)) {
monthOffset = -1;
}
return (
EPOCH -
1 +
365 * y1 +
Math.floor(y1 / 4) -
Math.floor(y1 / 100) +
Math.floor(y1 / 400) +
Math.floor((367 * month - 362) / 12 + monthOffset + day)
);
}
export function isLeapYear(year: number): boolean {
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
}
export function getExtendedYear(era: string, year: number): number {
return era === 'BC' ? 1 - year : year;
}
export function fromExtendedYear(year: number): [string, number] {
let era = 'AD';
if (year <= 0) {
era = 'BC';
year = 1 - year;
}
return [era, year];
}
const daysInMonth = {
standard: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
leapyear: [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
};
/**
* The Gregorian calendar is the most commonly used calendar system in the world. It supports two eras: BC, and AD.
* Years always contain 12 months, and 365 or 366 days depending on whether it is a leap year.
*/
export class GregorianCalendar implements Calendar {
identifier: CalendarIdentifier = 'gregory';
fromJulianDay(jd: number): CalendarDate {
let jd0 = jd;
let depoch = jd0 - EPOCH;
let quadricent = Math.floor(depoch / 146097);
let dqc = mod(depoch, 146097);
let cent = Math.floor(dqc / 36524);
let dcent = mod(dqc, 36524);
let quad = Math.floor(dcent / 1461);
let dquad = mod(dcent, 1461);
let yindex = Math.floor(dquad / 365);
let extendedYear = quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0);
let [era, year] = fromExtendedYear(extendedYear);
let yearDay = jd0 - gregorianToJulianDay(era, year, 1, 1);
let leapAdj = 2;
if (jd0 < gregorianToJulianDay(era, year, 3, 1)) {
leapAdj = 0;
} else if (isLeapYear(year)) {
leapAdj = 1;
}
let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);
let day = jd0 - gregorianToJulianDay(era, year, month, 1) + 1;
return new CalendarDate(era, year, month, day);
}
toJulianDay(date: AnyCalendarDate): number {
return gregorianToJulianDay(date.era, date.year, date.month, date.day);
}
getDaysInMonth(date: AnyCalendarDate): number {
return daysInMonth[isLeapYear(date.year) ? 'leapyear' : 'standard'][date.month - 1];
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
getMonthsInYear(date: AnyCalendarDate): number {
return 12;
}
getDaysInYear(date: AnyCalendarDate): number {
return isLeapYear(date.year) ? 366 : 365;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
getYearsInEra(date: AnyCalendarDate): number {
return 9999;
}
getEras(): string[] {
return ['BC', 'AD'];
}
isInverseEra(date: AnyCalendarDate): boolean {
return date.era === 'BC';
}
balanceDate(date: Mutable<AnyCalendarDate>): void {
if (date.year <= 0) {
date.era = date.era === 'BC' ? 'AD' : 'BC';
date.year = 1 - date.year;
}
}
}
@@ -0,0 +1,8 @@
type EncodeTrieNode = string | {
v?: string;
n: number | Map<number, EncodeTrieNode>;
o?: string;
};
declare const _default: Map<number, EncodeTrieNode>;
export default _default;
//# sourceMappingURL=encode-html.d.ts.map
@@ -0,0 +1,122 @@
[
["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],
["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"],
["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"],
["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"],
["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"],
["8940","𪎩𡅅"],
["8943","攊"],
["8946","丽滝鵎釟"],
["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"],
["89a1","琑糼緍楆竉刧"],
["89ab","醌碸酞肼"],
["89b0","贋胶𠧧"],
["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"],
["89c1","溚舾甙"],
["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"],
["8a40","𧶄唥"],
["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"],
["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"],
["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"],
["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"],
["8aac","䠋𠆩㿺塳𢶍"],
["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"],
["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"],
["8ac9","𪘁𠸉𢫏𢳉"],
["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"],
["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"],
["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"],
["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"],
["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"],
["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"],
["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"],
["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"],
["8ca1","𣏹椙橃𣱣泿"],
["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"],
["8cc9","顨杫䉶圽"],
["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"],
["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"],
["8d40","𠮟"],
["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"],
["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"],
["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"],
["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"],
["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"],
["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"],
["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"],
["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"],
["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"],
["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"],
["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"],
["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"],
["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"],
["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"],
["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"],
["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"],
["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"],
["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"],
["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"],
["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"],
["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"],
["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"],
["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"],
["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"],
["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"],
["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"],
["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"],
["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"],
["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"],
["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"],
["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"],
["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"],
["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"],
["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"],
["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"],
["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"],
["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"],
["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"],
["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"],
["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"],
["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"],
["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"],
["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"],
["9fae","酙隁酜"],
["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"],
["9fc1","𤤙盖鮝个𠳔莾衂"],
["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"],
["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"],
["9fe7","毺蠘罸"],
["9feb","嘠𪙊蹷齓"],
["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"],
["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"],
["a055","𡠻𦸅"],
["a058","詾𢔛"],
["a05b","惽癧髗鵄鍮鮏蟵"],
["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"],
["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"],
["a0a1","嵗𨯂迚𨸹"],
["a0a6","僙𡵆礆匲阸𠼻䁥"],
["a0ae","矾"],
["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"],
["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"],
["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"],
["a3c0","␀",31,"␡"],
["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23],
["c740","す",58,"ァアィイ"],
["c7a1","ゥ",81,"А",5,"ЁЖ",4],
["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"],
["c8a1","龰冈龱𧘇"],
["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"],
["c8f5","ʃɐɛɔɵœøŋʊɪ"],
["f9fe","■"],
["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"],
["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"],
["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"],
["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"],
["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"],
["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"],
["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"],
["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"],
["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"],
["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"]
]
@@ -0,0 +1,41 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import { Kind } from '../symbols/index';
import { TUnsafe } from '../unsafe/index';
import { Static } from '../static/index';
export interface TRef<Ref extends string = string> extends TSchema {
[Kind]: 'Ref';
static: unknown;
$ref: Ref;
}
export type TRefUnsafe<Type extends TSchema> = TUnsafe<Static<Type>>;
/** `[Json]` Creates a Ref type.*/
export declare function Ref<Ref extends string>($ref: Ref, options?: SchemaOptions): TRef<Ref>;
/**
* @deprecated `[Json]` Creates a Ref type. This signature was deprecated in 0.34.0 where Ref requires callers to pass
* a `string` value for the reference (and not a schema).
*
* To adhere to the 0.34.0 signature, Ref implementations should be updated to the following.
*
* ```typescript
* // pre-0.34.0
*
* const T = Type.String({ $id: 'T' })
*
* const R = Type.Ref(T)
* ```
* should be changed to the following
*
* ```typescript
* // post-0.34.0
*
* const T = Type.String({ $id: 'T' })
*
* const R = Type.Unsafe<Static<typeof T>>(Type.Ref('T'))
* ```
* You can also create a generic function to replicate the pre-0.34.0 signature if required
*
* ```typescript
* const LegacyRef = <T extends TSchema>(schema: T) => Type.Unsafe<Static<T>>(Type.Ref(schema.$id!))
* ```
*/
export declare function Ref<Type extends TSchema>(type: Type, options?: SchemaOptions): TRefUnsafe<Type>;
@@ -0,0 +1,16 @@
module.exports = {
'at': require('./wrapperAt'),
'chain': require('./chain'),
'commit': require('./commit'),
'lodash': require('./wrapperLodash'),
'next': require('./next'),
'plant': require('./plant'),
'reverse': require('./wrapperReverse'),
'tap': require('./tap'),
'thru': require('./thru'),
'toIterator': require('./toIterator'),
'toJSON': require('./toJSON'),
'value': require('./wrapperValue'),
'valueOf': require('./valueOf'),
'wrapperChain': require('./wrapperChain')
};
@@ -0,0 +1,44 @@
/**
* This module is compiled away!
*
* Parsing markdown comes with a couple of constants, such as minimum or maximum
* sizes of certain sequences.
* Additionally, there are a couple symbols used inside micromark.
* These are all defined here, but compiled away by scripts.
*/
export const constants = /** @type {const} */ ({
attentionSideAfter: 2, // Symbol to mark an attention sequence as after content: `a*`
attentionSideBefore: 1, // Symbol to mark an attention sequence as before content: `*a`
atxHeadingOpeningFenceSizeMax: 6, // 6 number signs is fine, 7 isn’t.
autolinkDomainSizeMax: 63, // 63 characters is fine, 64 is too many.
autolinkSchemeSizeMax: 32, // 32 characters is fine, 33 is too many.
cdataOpeningString: 'CDATA[', // And preceded by `<![`.
characterGroupPunctuation: 2, // Symbol used to indicate a character is punctuation
characterGroupWhitespace: 1, // Symbol used to indicate a character is whitespace
characterReferenceDecimalSizeMax: 7, // `&#9999999;`.
characterReferenceHexadecimalSizeMax: 6, // `&#xff9999;`.
characterReferenceNamedSizeMax: 31, // `&CounterClockwiseContourIntegral;`.
codeFencedSequenceSizeMin: 3, // At least 3 ticks or tildes are needed.
contentTypeContent: 'content',
contentTypeDocument: 'document',
contentTypeFlow: 'flow',
contentTypeString: 'string',
contentTypeText: 'text',
hardBreakPrefixSizeMin: 2, // At least 2 trailing spaces are needed.
htmlBasic: 6, // Symbol for `<div`
htmlCdata: 5, // Symbol for `<![CDATA[]]>`
htmlComment: 2, // Symbol for `<!---->`
htmlComplete: 7, // Symbol for `<x>`
htmlDeclaration: 4, // Symbol for `<!doctype>`
htmlInstruction: 3, // Symbol for `<?php?>`
htmlRawSizeMax: 8, // Length of `textarea`.
htmlRaw: 1, // Symbol for `<script>`
linkResourceDestinationBalanceMax: 32, // See: <https://spec.commonmark.org/0.30/#link-destination>, <https://github.com/remarkjs/react-markdown/issues/658#issuecomment-984345577>
linkReferenceSizeMax: 999, // See: <https://spec.commonmark.org/0.30/#link-label>
listItemValueSizeMax: 10, // See: <https://spec.commonmark.org/0.30/#ordered-list-marker>
numericBaseDecimal: 10,
numericBaseHexadecimal: 0x10,
tabSize: 4, // Tabs have a hard-coded size of 4, per CommonMark.
thematicBreakMarkerCountMin: 3, // At least 3 asterisks, dashes, or underscores are needed.
v8MaxSafeChunkSize: 10_000 // V8 (and potentially others) have problems injecting giant arrays into other arrays, hence we operate in chunks.
})
@@ -0,0 +1 @@
{"version":3,"file":"convertAAGUIDToString.d.ts","sourceRoot":"","sources":["../../src/helpers/convertAAGUIDToString.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAcjE"}
@@ -0,0 +1,111 @@
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
exports.GREATEST_LOWER_BOUND = 1;
exports.LEAST_UPPER_BOUND = 2;
/**
* Recursive implementation of binary search.
*
* @param aLow Indices here and lower do not contain the needle.
* @param aHigh Indices here and higher do not contain the needle.
* @param aNeedle The element being searched for.
* @param aHaystack The non-empty array being searched.
* @param aCompare Function which takes two elements and returns -1, 0, or 1.
* @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
* 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
* closest element that is smaller than or greater than the one we are
* searching for, respectively, if the exact element cannot be found.
*/
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
// This function terminates when one of the following is true:
//
// 1. We find the exact element we are looking for.
//
// 2. We did not find the exact element, but we can return the index of
// the next-closest element.
//
// 3. We did not find the exact element, and there is no next-closest
// element than the one we are searching for, so we return -1.
var mid = Math.floor((aHigh - aLow) / 2) + aLow;
var cmp = aCompare(aNeedle, aHaystack[mid], true);
if (cmp === 0) {
// Found the element we are looking for.
return mid;
}
else if (cmp > 0) {
// Our needle is greater than aHaystack[mid].
if (aHigh - mid > 1) {
// The element is in the upper half.
return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
}
// The exact needle element was not found in this haystack. Determine if
// we are in termination case (3) or (2) and return the appropriate thing.
if (aBias == exports.LEAST_UPPER_BOUND) {
return aHigh < aHaystack.length ? aHigh : -1;
} else {
return mid;
}
}
else {
// Our needle is less than aHaystack[mid].
if (mid - aLow > 1) {
// The element is in the lower half.
return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
}
// we are in termination case (3) or (2) and return the appropriate thing.
if (aBias == exports.LEAST_UPPER_BOUND) {
return mid;
} else {
return aLow < 0 ? -1 : aLow;
}
}
}
/**
* This is an implementation of binary search which will always try and return
* the index of the closest element if there is no exact hit. This is because
* mappings between original and generated line/col pairs are single points,
* and there is an implicit region between each of them, so a miss just means
* that you aren't on the very start of a region.
*
* @param aNeedle The element you are looking for.
* @param aHaystack The array that is being searched.
* @param aCompare A function which takes the needle and an element in the
* array and returns -1, 0, or 1 depending on whether the needle is less
* than, equal to, or greater than the element, respectively.
* @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
* 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
* closest element that is smaller than or greater than the one we are
* searching for, respectively, if the exact element cannot be found.
* Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
*/
exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
if (aHaystack.length === 0) {
return -1;
}
var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
aCompare, aBias || exports.GREATEST_LOWER_BOUND);
if (index < 0) {
return -1;
}
// We have found either the exact element, or the next-closest element than
// the one we are searching for. However, there may be more than one such
// element. Make sure we always return the smallest of these.
while (index - 1 >= 0) {
if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
break;
}
--index;
}
return index;
};
@@ -0,0 +1,5 @@
'use strict';
throw new Error(
'react-dom/server is not supported in React Server Components.'
);
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('toLower', require('../toLower'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016 Douglas Christopher Wilson <doug@somethingdoug.com>
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,27 @@
var $5d10129a174740d4$exports = require("./useFormValidationState.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "FormValidationContext", () => $5d10129a174740d4$exports.FormValidationContext);
$parcel$export(module.exports, "useFormValidationState", () => $5d10129a174740d4$exports.useFormValidationState);
$parcel$export(module.exports, "DEFAULT_VALIDATION_RESULT", () => $5d10129a174740d4$exports.DEFAULT_VALIDATION_RESULT);
$parcel$export(module.exports, "VALID_VALIDITY_STATE", () => $5d10129a174740d4$exports.VALID_VALIDITY_STATE);
$parcel$export(module.exports, "privateValidationStateProp", () => $5d10129a174740d4$exports.privateValidationStateProp);
$parcel$export(module.exports, "mergeValidation", () => $5d10129a174740d4$exports.mergeValidation);
/*
* Copyright 2023 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
//# sourceMappingURL=main.js.map
@@ -0,0 +1,44 @@
{
"name": "router",
"description": "Simple middleware-style router",
"version": "2.2.0",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
"contributors": [
"Blake Embrey <hello@blakeembrey.com>"
],
"license": "MIT",
"repository": "pillarjs/router",
"dependencies": {
"debug": "^4.4.0",
"depd": "^2.0.0",
"is-promise": "^4.0.0",
"parseurl": "^1.3.3",
"path-to-regexp": "^8.0.0"
},
"devDependencies": {
"finalhandler": "^2.1.0",
"mocha": "10.2.0",
"nyc": "15.1.0",
"run-series": "^1.1.9",
"standard": "^17.1.0",
"supertest": "6.3.3"
},
"files": [
"lib/",
"LICENSE",
"HISTORY.md",
"README.md",
"index.js"
],
"engines": {
"node": ">= 18"
},
"scripts": {
"lint": "standard",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test:debug": "mocha --reporter spec --bail --check-leaks test/ --inspect --inspect-brk",
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=text npm test",
"version": "node scripts/version-history.js && git add HISTORY.md"
}
}
@@ -0,0 +1 @@
{"name":"object-assign","version":"4.1.1","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532098714,"integrity":"sha512-A3SzQjkAJe6pzIUjhp6vTnKtwOtFiruHZsGNmLaYHadAAuX9pZPcpbZhq4uEMg9ZSdSVXpH3IKA5v3HcF0Wv5Q==","mode":420,"size":764},"index.js":{"checkedAt":1794532098714,"integrity":"sha512-sI6dp8UW0YauOLFfS6eWtST76Kf7UHdTVdZFuMGfcAOJZTdNnxCU8KoC3pQ3VIHA+RU67VxIs/5A/+hNY2eQ5g==","mode":420,"size":2108},"license":{"checkedAt":1794532098715,"integrity":"sha512-rnnnpCCaRRrva3j3sLiBcOeiIzUSasNFUiv06v4IGNpYZarhUHxdwCJO+FRUjHId+ahDcYIvNtUMvNl/qUbu6Q==","mode":420,"size":1119},"readme.md":{"checkedAt":1794532098715,"integrity":"sha512-/eiC27fqF3XKPD/TdxcO7SwQYX6piRq5y5OiCvBVYxUsz4F2wcTIhyD3umaFimR8VXSzSJUwHb2WYlBVt5C05A==","mode":420,"size":1502}}}
@@ -0,0 +1,117 @@
var $c9aa5a224613c979$exports = require("./ListCollection.main.js");
var $5RsKl$reactstatelyselection = require("@react-stately/selection");
var $5RsKl$react = require("react");
var $5RsKl$reactstatelycollections = require("@react-stately/collections");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useListState", () => $5450691d3629f6ea$export$2f645645f7bca764);
$parcel$export(module.exports, "UNSTABLE_useFilteredListState", () => $5450691d3629f6ea$export$ba9d38c0f1bf2b36);
/*
* 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 $5450691d3629f6ea$export$2f645645f7bca764(props) {
let { filter: filter, layoutDelegate: layoutDelegate } = props;
let selectionState = (0, $5RsKl$reactstatelyselection.useMultipleSelectionState)(props);
let disabledKeys = (0, $5RsKl$react.useMemo)(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set(), [
props.disabledKeys
]);
let factory = (0, $5RsKl$react.useCallback)((nodes)=>filter ? new (0, $c9aa5a224613c979$exports.ListCollection)(filter(nodes)) : new (0, $c9aa5a224613c979$exports.ListCollection)(nodes), [
filter
]);
let context = (0, $5RsKl$react.useMemo)(()=>({
suppressTextValueWarning: props.suppressTextValueWarning
}), [
props.suppressTextValueWarning
]);
let collection = (0, $5RsKl$reactstatelycollections.useCollection)(props, factory, context);
let selectionManager = (0, $5RsKl$react.useMemo)(()=>new (0, $5RsKl$reactstatelyselection.SelectionManager)(collection, selectionState, {
layoutDelegate: layoutDelegate
}), [
collection,
selectionState,
layoutDelegate
]);
$5450691d3629f6ea$var$useFocusedKeyReset(collection, selectionManager);
return {
collection: collection,
disabledKeys: disabledKeys,
selectionManager: selectionManager
};
}
function $5450691d3629f6ea$export$ba9d38c0f1bf2b36(state, filterFn) {
let collection = (0, $5RsKl$react.useMemo)(()=>filterFn ? state.collection.filter(filterFn) : state.collection, [
state.collection,
filterFn
]);
let selectionManager = state.selectionManager.withCollection(collection);
$5450691d3629f6ea$var$useFocusedKeyReset(collection, selectionManager);
return {
collection: collection,
selectionManager: selectionManager,
disabledKeys: state.disabledKeys
};
}
function $5450691d3629f6ea$var$useFocusedKeyReset(collection, selectionManager) {
// Reset focused key if that item is deleted from the collection.
const cachedCollection = (0, $5RsKl$react.useRef)(null);
(0, $5RsKl$react.useEffect)(()=>{
if (selectionManager.focusedKey != null && !collection.getItem(selectionManager.focusedKey) && cachedCollection.current) {
const startItem = cachedCollection.current.getItem(selectionManager.focusedKey);
const cachedItemNodes = [
...cachedCollection.current.getKeys()
].map((key)=>{
const itemNode = cachedCollection.current.getItem(key);
return (itemNode === null || itemNode === void 0 ? void 0 : itemNode.type) === 'item' ? itemNode : null;
}).filter((node)=>node !== null);
const itemNodes = [
...collection.getKeys()
].map((key)=>{
const itemNode = collection.getItem(key);
return (itemNode === null || itemNode === void 0 ? void 0 : itemNode.type) === 'item' ? itemNode : null;
}).filter((node)=>node !== null);
var _cachedItemNodes_length, _itemNodes_length;
const diff = ((_cachedItemNodes_length = cachedItemNodes === null || cachedItemNodes === void 0 ? void 0 : cachedItemNodes.length) !== null && _cachedItemNodes_length !== void 0 ? _cachedItemNodes_length : 0) - ((_itemNodes_length = itemNodes === null || itemNodes === void 0 ? void 0 : itemNodes.length) !== null && _itemNodes_length !== void 0 ? _itemNodes_length : 0);
var _startItem_index, _startItem_index1, _itemNodes_length1;
let index = Math.min(diff > 1 ? Math.max(((_startItem_index = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index !== void 0 ? _startItem_index : 0) - diff + 1, 0) : (_startItem_index1 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index1 !== void 0 ? _startItem_index1 : 0, ((_itemNodes_length1 = itemNodes === null || itemNodes === void 0 ? void 0 : itemNodes.length) !== null && _itemNodes_length1 !== void 0 ? _itemNodes_length1 : 0) - 1);
let newNode = null;
let isReverseSearching = false;
while(index >= 0){
if (!selectionManager.isDisabled(itemNodes[index].key)) {
newNode = itemNodes[index];
break;
}
// Find next, not disabled item.
if (index < itemNodes.length - 1 && !isReverseSearching) index++;
else {
isReverseSearching = true;
var _startItem_index2, _startItem_index3;
if (index > ((_startItem_index2 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index2 !== void 0 ? _startItem_index2 : 0)) index = (_startItem_index3 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index3 !== void 0 ? _startItem_index3 : 0;
index--;
}
}
selectionManager.setFocusedKey(newNode ? newNode.key : null);
}
cachedCollection.current = collection;
}, [
collection,
selectionManager
]);
}
//# sourceMappingURL=useListState.main.js.map
@@ -0,0 +1,152 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
var arrayBracketNewline = utils.createRule({
name: "array-bracket-newline",
package: "js",
meta: {
type: "layout",
docs: {
description: "Enforce linebreaks after opening and before closing array brackets"
},
fixable: "whitespace",
schema: [
{
oneOf: [
{
type: "string",
enum: ["always", "never", "consistent"]
},
{
type: "object",
properties: {
multiline: {
type: "boolean"
},
minItems: {
type: ["integer", "null"],
minimum: 0
}
},
additionalProperties: false
}
]
}
],
messages: {
unexpectedOpeningLinebreak: "There should be no linebreak after '['.",
unexpectedClosingLinebreak: "There should be no linebreak before ']'.",
missingOpeningLinebreak: "A linebreak is required after '['.",
missingClosingLinebreak: "A linebreak is required before ']'."
}
},
create(context) {
const sourceCode = context.sourceCode;
function normalizeOptionValue(option) {
let consistent = false;
let multiline = false;
let minItems = 0;
if (option) {
if (option === "consistent") {
consistent = true;
minItems = Number.POSITIVE_INFINITY;
} else if (option === "always" || typeof option !== "string" && option.minItems === 0) {
minItems = 0;
} else if (option === "never") {
minItems = Number.POSITIVE_INFINITY;
} else {
multiline = Boolean(option.multiline);
minItems = option.minItems || Number.POSITIVE_INFINITY;
}
} else {
consistent = false;
multiline = true;
minItems = Number.POSITIVE_INFINITY;
}
return { consistent, multiline, minItems };
}
function normalizeOptions(options) {
const value = normalizeOptionValue(options);
return { ArrayExpression: value, ArrayPattern: value };
}
function reportNoBeginningLinebreak(node, token) {
context.report({
node,
loc: token.loc,
messageId: "unexpectedOpeningLinebreak",
fix(fixer) {
const nextToken = sourceCode.getTokenAfter(token, { includeComments: true });
if (!nextToken || utils.isCommentToken(nextToken))
return null;
return fixer.removeRange([token.range[1], nextToken.range[0]]);
}
});
}
function reportNoEndingLinebreak(node, token) {
context.report({
node,
loc: token.loc,
messageId: "unexpectedClosingLinebreak",
fix(fixer) {
const previousToken = sourceCode.getTokenBefore(token, { includeComments: true });
if (!previousToken || utils.isCommentToken(previousToken))
return null;
return fixer.removeRange([previousToken.range[1], token.range[0]]);
}
});
}
function reportRequiredBeginningLinebreak(node, token) {
context.report({
node,
loc: token.loc,
messageId: "missingOpeningLinebreak",
fix(fixer) {
return fixer.insertTextAfter(token, "\n");
}
});
}
function reportRequiredEndingLinebreak(node, token) {
context.report({
node,
loc: token.loc,
messageId: "missingClosingLinebreak",
fix(fixer) {
return fixer.insertTextBefore(token, "\n");
}
});
}
function check(node) {
const elements = node.elements;
const normalizedOptions = normalizeOptions(context.options[0]);
const options = normalizedOptions[node.type];
const openBracket = sourceCode.getFirstToken(node);
const closeBracket = sourceCode.getLastToken(node);
const firstIncComment = sourceCode.getTokenAfter(openBracket, { includeComments: true });
const lastIncComment = sourceCode.getTokenBefore(closeBracket, { includeComments: true });
const first = sourceCode.getTokenAfter(openBracket);
const last = sourceCode.getTokenBefore(closeBracket);
const needsLinebreaks = elements.length >= options.minItems || options.multiline && elements.length > 0 && firstIncComment.loc.start.line !== lastIncComment.loc.end.line || elements.length === 0 && firstIncComment.type === "Block" && firstIncComment.loc.start.line !== lastIncComment.loc.end.line && firstIncComment === lastIncComment || options.consistent && openBracket.loc.end.line !== first.loc.start.line;
if (needsLinebreaks) {
if (utils.isTokenOnSameLine(openBracket, first))
reportRequiredBeginningLinebreak(node, openBracket);
if (utils.isTokenOnSameLine(last, closeBracket))
reportRequiredEndingLinebreak(node, closeBracket);
} else {
if (!utils.isTokenOnSameLine(openBracket, first))
reportNoBeginningLinebreak(node, openBracket);
if (!utils.isTokenOnSameLine(last, closeBracket))
reportNoEndingLinebreak(node, closeBracket);
}
}
return {
ArrayPattern: check,
ArrayExpression: check
};
}
});
module.exports = arrayBracketNewline;
@@ -0,0 +1,266 @@
# mkdirp
Like `mkdir -p`, but in Node.js!
Now with a modern API and no\* bugs!
<small>\* may contain some bugs</small>
# example
## pow.js
```js
const mkdirp = require('mkdirp')
// return value is a Promise resolving to the first directory created
mkdirp('/tmp/foo/bar/baz').then(made =>
console.log(`made directories, starting with ${made}`))
```
Output (where `/tmp/foo` already exists)
```
made directories, starting with /tmp/foo/bar
```
Or, if you don't have time to wait around for promises:
```js
const mkdirp = require('mkdirp')
// return value is the first directory created
const made = mkdirp.sync('/tmp/foo/bar/baz')
console.log(`made directories, starting with ${made}`)
```
And now /tmp/foo/bar/baz exists, huzzah!
# methods
```js
const mkdirp = require('mkdirp')
```
## mkdirp(dir, [opts]) -> Promise<String | undefined>
Create a new directory and any necessary subdirectories at `dir` with octal
permission string `opts.mode`. If `opts` is a string or number, it will be
treated as the `opts.mode`.
If `opts.mode` isn't specified, it defaults to `0o777 &
(~process.umask())`.
Promise resolves to first directory `made` that had to be created, or
`undefined` if everything already exists. Promise rejects if any errors
are encountered. Note that, in the case of promise rejection, some
directories _may_ have been created, as recursive directory creation is not
an atomic operation.
You can optionally pass in an alternate `fs` implementation by passing in
`opts.fs`. Your implementation should have `opts.fs.mkdir(path, opts, cb)`
and `opts.fs.stat(path, cb)`.
You can also override just one or the other of `mkdir` and `stat` by
passing in `opts.stat` or `opts.mkdir`, or providing an `fs` option that
only overrides one of these.
## mkdirp.sync(dir, opts) -> String|null
Synchronously create a new directory and any necessary subdirectories at
`dir` with octal permission string `opts.mode`. If `opts` is a string or
number, it will be treated as the `opts.mode`.
If `opts.mode` isn't specified, it defaults to `0o777 &
(~process.umask())`.
Returns the first directory that had to be created, or undefined if
everything already exists.
You can optionally pass in an alternate `fs` implementation by passing in
`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)`
and `opts.fs.statSync(path)`.
You can also override just one or the other of `mkdirSync` and `statSync`
by passing in `opts.statSync` or `opts.mkdirSync`, or providing an `fs`
option that only overrides one of these.
## mkdirp.manual, mkdirp.manualSync
Use the manual implementation (not the native one). This is the default
when the native implementation is not available or the stat/mkdir
implementation is overridden.
## mkdirp.native, mkdirp.nativeSync
Use the native implementation (not the manual one). This is the default
when the native implementation is available and stat/mkdir are not
overridden.
# implementation
On Node.js v10.12.0 and above, use the native `fs.mkdir(p,
{recursive:true})` option, unless `fs.mkdir`/`fs.mkdirSync` has been
overridden by an option.
## native implementation
- If the path is a root directory, then pass it to the underlying
implementation and return the result/error. (In this case, it'll either
succeed or fail, but we aren't actually creating any dirs.)
- Walk up the path statting each directory, to find the first path that
will be created, `made`.
- Call `fs.mkdir(path, { recursive: true })` (or `fs.mkdirSync`)
- If error, raise it to the caller.
- Return `made`.
## manual implementation
- Call underlying `fs.mkdir` implementation, with `recursive: false`
- If error:
- If path is a root directory, raise to the caller and do not handle it
- If ENOENT, mkdirp parent dir, store result as `made`
- stat(path)
- If error, raise original `mkdir` error
- If directory, return `made`
- Else, raise original `mkdir` error
- else
- return `undefined` if a root dir, or `made` if set, or `path`
## windows vs unix caveat
On Windows file systems, attempts to create a root directory (ie, a drive
letter or root UNC path) will fail. If the root directory exists, then it
will fail with `EPERM`. If the root directory does not exist, then it will
fail with `ENOENT`.
On posix file systems, attempts to create a root directory (in recursive
mode) will succeed silently, as it is treated like just another directory
that already exists. (In non-recursive mode, of course, it fails with
`EEXIST`.)
In order to preserve this system-specific behavior (and because it's not as
if we can create the parent of a root directory anyway), attempts to create
a root directory are passed directly to the `fs` implementation, and any
errors encountered are not handled.
## native error caveat
The native implementation (as of at least Node.js v13.4.0) does not provide
appropriate errors in some cases (see
[nodejs/node#31481](https://github.com/nodejs/node/issues/31481) and
[nodejs/node#28015](https://github.com/nodejs/node/issues/28015)).
In order to work around this issue, the native implementation will fall
back to the manual implementation if an `ENOENT` error is encountered.
# choosing a recursive mkdir implementation
There are a few to choose from! Use the one that suits your needs best :D
## use `fs.mkdir(path, {recursive: true}, cb)` if:
- You wish to optimize performance even at the expense of other factors.
- You don't need to know the first dir created.
- You are ok with getting `ENOENT` as the error when some other problem is
the actual cause.
- You can limit your platforms to Node.js v10.12 and above.
- You're ok with using callbacks instead of promises.
- You don't need/want a CLI.
- You don't need to override the `fs` methods in use.
## use this module (mkdirp 1.x) if:
- You need to know the first directory that was created.
- You wish to use the native implementation if available, but fall back
when it's not.
- You prefer promise-returning APIs to callback-taking APIs.
- You want more useful error messages than the native recursive mkdir
provides (at least as of Node.js v13.4), and are ok with re-trying on
`ENOENT` to achieve this.
- You need (or at least, are ok with) a CLI.
- You need to override the `fs` methods in use.
## use [`make-dir`](http://npm.im/make-dir) if:
- You do not need to know the first dir created (and wish to save a few
`stat` calls when using the native implementation for this reason).
- You wish to use the native implementation if available, but fall back
when it's not.
- You prefer promise-returning APIs to callback-taking APIs.
- You are ok with occasionally getting `ENOENT` errors for failures that
are actually related to something other than a missing file system entry.
- You don't need/want a CLI.
- You need to override the `fs` methods in use.
## use mkdirp 0.x if:
- You need to know the first directory that was created.
- You need (or at least, are ok with) a CLI.
- You need to override the `fs` methods in use.
- You're ok with using callbacks instead of promises.
- You are not running on Windows, where the root-level ENOENT errors can
lead to infinite regress.
- You think vinyl just sounds warmer and richer for some weird reason.
- You are supporting truly ancient Node.js versions, before even the advent
of a `Promise` language primitive. (Please don't. You deserve better.)
# cli
This package also ships with a `mkdirp` command.
```
$ mkdirp -h
usage: mkdirp [DIR1,DIR2..] {OPTIONS}
Create each supplied directory including any necessary parent directories
that don't yet exist.
If the directory already exists, do nothing.
OPTIONS are:
-m<mode> If a directory needs to be created, set the mode as an octal
--mode=<mode> permission string.
-v --version Print the mkdirp version number
-h --help Print this helpful banner
-p --print Print the first directories created for each path provided
--manual Use manual implementation, even if native is available
```
# install
With [npm](http://npmjs.org) do:
```
npm install mkdirp
```
to get the library locally, or
```
npm install -g mkdirp
```
to get the command everywhere, or
```
npx mkdirp ...
```
to run the command without installing it globally.
# platform support
This module works on node v8, but only v10 and above are officially
supported, as Node v8 reached its LTS end of life 2020-01-01, which is in
the past, as of this writing.
# license
MIT
@@ -0,0 +1,41 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {Collection, Key, Node} from '@react-types/shared';
export interface GridCollection<T> extends Collection<GridNode<T>> {
/** The number of columns in the grid. */
columnCount: number,
/** A list of rows in the grid. */
rows: GridNode<T>[]
}
export interface GridRow<T> extends Partial<GridNode<T>> {
key?: Key,
type: string,
childNodes: Iterable<Node<T>>
}
export interface GridNode<T> extends Node<T> {
column?: GridNode<T>,
/**
* The number of columns spanned by this cell. Use `colSpan` instead.
* @deprecated
*/
colspan?: number,
/** The number of columns spanned by this cell. */
colSpan?: number | null,
/** The column index of this cell, accounting for any colSpans. */
colIndex?: number | null,
/** The index of this node within its parent, ignoring sibling nodes that aren't of the same type. */
indexOfType?: number
}
@@ -0,0 +1 @@
{"version":3,"names":["_buildMatchMemberExpression","require","isReactComponent","buildMatchMemberExpression","_default","exports","default"],"sources":["../../../src/validators/react/isReactComponent.ts"],"sourcesContent":["import buildMatchMemberExpression from \"../buildMatchMemberExpression.ts\";\n\nconst isReactComponent = buildMatchMemberExpression(\"React.Component\");\n\nexport default isReactComponent;\n"],"mappings":";;;;;;AAAA,IAAAA,2BAAA,GAAAC,OAAA;AAEA,MAAMC,gBAAgB,GAAG,IAAAC,mCAA0B,EAAC,iBAAiB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAExDJ,gBAAgB","ignoreList":[]}
@@ -0,0 +1,15 @@
'use strict';
/**
* Determines whether the specified URL is absolute
*
* @param {string} url The URL to test
*
* @returns {boolean} True if the specified URL is absolute, otherwise false
*/
export default function isAbsoluteURL(url) {
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
// by any combination of letters, digits, plus, period, or hyphen.
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('findLastIndexFrom', require('../findLastIndex'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB 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 0C 1C"},D:{"1":"0 1 2 3 4 5 CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"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"},E:{"1":"C L M G NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A 2C ZC 3C 4C 5C 6C aC","132":"B"},F:{"1":"0 1 2 3 4 5 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"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 FD GD HD ID NC uC JD OC"},G:{"1":"UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD","132":"TD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB aC tD uD vD wD xD QC RC SC yD","2":"J oD pD qD rD sD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","2":"1D"}},B:7,C:"CSS Environment Variables env()",D:true};
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AA2BM,SAAS,0CAAiB,KAA6B,EAAE,KAAyB;IACvF,IAAI,cAAC,UAAU,QAAE,IAAI,QAAE,IAAI,sBAAE,qBAAqB,QAAO,GAAG;IAC5D,IAAI,aAAC,SAAS,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,MAAM,iBAAiB;IAE9E,IAAI,cAAC,UAAU,cAAE,UAAU,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,8BAAO,EAAE;QAC3E,GAAG,KAAK;QACR,oDAAoD;QACpD,6CAA6C;QAC7C,kBAAkB;mBAClB;QACA,cAAc,MAAM,YAAY,IAAI;IACtC;IAEA,CAAA,GAAA,2CAAgB,EAAE,GAAG,CAAC,OAAO;cAC3B;cACA;QACA,eAAe,iBAAiB,EAAE;QAClC,gBAAgB,kBAAkB,EAAE;4BACpC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAErD,IAAI,oBAAC,gBAAgB,EAAC,GAAG,CAAA,GAAA,2CAAa,EAAE;QACtC,cAAc,MAAM,MAAM;QAC1B,eAAe,MAAM,OAAO;QAC5B,qBAAqB,MAAM,aAAa;IAC1C;IAEA,OAAO;QACL,YAAY,CAAA,GAAA,gCAAS,EAAE,UAAU;YAC/B,MAAM;YACN,iBAAiB,cAAc;YAC/B,GAAG,UAAU;YACb,GAAG,gBAAgB;QACrB;oBACA;0BACA;2BACA;mBACA;0BACA;2BACA;IACF;AACF","sources":["packages/@react-aria/checkbox/src/useCheckboxGroup.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 {AriaCheckboxGroupProps} from '@react-types/checkbox';\nimport {checkboxGroupData} from './utils';\nimport {CheckboxGroupState} from '@react-stately/checkbox';\nimport {DOMAttributes, ValidationResult} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {useField} from '@react-aria/label';\nimport {useFocusWithin} from '@react-aria/interactions';\n\nexport interface CheckboxGroupAria extends ValidationResult {\n /** Props for the checkbox group wrapper element. */\n groupProps: DOMAttributes,\n /** Props for the checkbox group's visible label (if any). */\n labelProps: DOMAttributes,\n /** Props for the checkbox group description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the checkbox group error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a checkbox group component.\n * Checkbox groups allow users to select multiple items from a list of options.\n * @param props - Props for the checkbox group.\n * @param state - State for the checkbox group, as returned by `useCheckboxGroupState`.\n */\nexport function useCheckboxGroup(props: AriaCheckboxGroupProps, state: CheckboxGroupState): CheckboxGroupAria {\n let {isDisabled, name, form, validationBehavior = 'aria'} = props;\n let {isInvalid, validationErrors, validationDetails} = state.displayValidation;\n\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n // Checkbox group is not an HTML input element so it\n // shouldn't be labeled by a <label> element.\n labelElementType: 'span',\n isInvalid,\n errorMessage: props.errorMessage || validationErrors\n });\n\n checkboxGroupData.set(state, {\n name,\n form,\n descriptionId: descriptionProps.id,\n errorMessageId: errorMessageProps.id,\n validationBehavior\n });\n\n let domProps = filterDOMProps(props, {labelable: true});\n\n let {focusWithinProps} = useFocusWithin({\n onBlurWithin: props.onBlur,\n onFocusWithin: props.onFocus,\n onFocusWithinChange: props.onFocusChange\n });\n\n return {\n groupProps: mergeProps(domProps, {\n role: 'group',\n 'aria-disabled': isDisabled || undefined,\n ...fieldProps,\n ...focusWithinProps\n }),\n labelProps,\n descriptionProps,\n errorMessageProps,\n isInvalid,\n validationErrors,\n validationDetails\n };\n}\n"],"names":[],"version":3,"file":"useCheckboxGroup.main.js.map"}
@@ -0,0 +1 @@
{"version":3,"file":"UnmanagedClassElementMetadata.js","sourceRoot":"","sources":["../../../../src/metadata/models/UnmanagedClassElementMetadata.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
{"version":3,"file":"NonCachedServiceNodeContext.d.ts","sourceRoot":"","sources":["../../../../src/planning/models/NonCachedServiceNodeContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,uDAAuD,CAAC;AACnG,OAAO,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAE1F,MAAM,WAAW,2BAA2B;IAC1C,sBAAsB,EAAE,yBAAyB,CAAC,0BAA0B,CAAC,CAAC;IAC9E,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;CAC3B"}
@@ -0,0 +1,18 @@
var Symbol = require('./_Symbol');
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
* Creates a clone of the `symbol` object.
*
* @private
* @param {Object} symbol The symbol object to clone.
* @returns {Object} Returns the cloned symbol object.
*/
function cloneSymbol(symbol) {
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
module.exports = cloneSymbol;
@@ -0,0 +1,227 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {Key} from '@react-types/shared';
import {LinkDOMProps} from './dom';
import {ReactElement, ReactNode} from 'react';
export interface ItemProps<T> extends LinkDOMProps {
/** Rendered contents of the item or child items. */
children: ReactNode,
/** Rendered contents of the item if `children` contains child items. */
title?: ReactNode, // label?? contents?
/** A string representation of the item's contents, used for features like typeahead. */
textValue?: string,
/** An accessibility label for this item. */
'aria-label'?: string,
/** A list of child item objects. Used for dynamic collections. */
childItems?: Iterable<T>,
/** Whether this item has children, even if not loaded yet. */
hasChildItems?: boolean
}
export type ItemElement<T> = ReactElement<ItemProps<T>> | null;
export type ItemRenderer<T> = (item: T) => ItemElement<T>;
export type LoadingState = 'loading' | 'sorting' | 'loadingMore' | 'error' | 'idle' | 'filtering';
export interface AsyncLoadable {
/** Whether the items are currently loading. */
isLoading?: boolean, // possibly isLoadingMore
/** Handler that is called when more items should be loaded, e.g. while scrolling near the bottom. */
onLoadMore?: () => any
}
export interface SectionProps<T> {
/** Rendered contents of the section, e.g. a header. */
title?: ReactNode,
/** An accessibility label for the section. */
'aria-label'?: string,
/** Static child items or a function to render children. */
children: ItemElement<T> | ItemElement<T>[] | ItemRenderer<T>,
/** Item objects in the section. */
items?: Iterable<T>
}
export type SectionElement<T> = ReactElement<SectionProps<T>> | null;
export type CollectionElement<T> = SectionElement<T> | ItemElement<T>;
export type CollectionChildren<T> = CollectionElement<T> | CollectionElement<T>[] | ((item: T) => CollectionElement<T>);
export interface CollectionBase<T> {
/** The contents of the collection. */
children: CollectionChildren<T>,
/** Item objects in the collection. */
items?: Iterable<T>,
/** The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. */
disabledKeys?: Iterable<Key>
}
export interface CollectionStateBase<T, C extends Collection<Node<T>> = Collection<Node<T>>> extends Partial<CollectionBase<T>> {
/** A pre-constructed collection to use instead of building one from items and children. */
collection?: C
}
export interface Expandable {
/** The currently expanded keys in the collection (controlled). */
expandedKeys?: Iterable<Key>,
/** The initial expanded keys in the collection (uncontrolled). */
defaultExpandedKeys?: Iterable<Key>,
/** Handler that is called when items are expanded or collapsed. */
onExpandedChange?: (keys: Set<Key>) => any
}
export interface Sortable {
/** The current sorted column and direction. */
sortDescriptor?: SortDescriptor,
/** Handler that is called when the sorted column or direction changes. */
onSortChange?: (descriptor: SortDescriptor) => any
}
export interface SortDescriptor {
/** The key of the column to sort by. */
column: Key,
/** The direction to sort by. */
direction: SortDirection
}
export type SortDirection = 'ascending' | 'descending';
export interface KeyboardDelegate {
/** Returns the key visually below the given one, or `null` for none. */
getKeyBelow?(key: Key): Key | null,
/** Returns the key visually above the given one, or `null` for none. */
getKeyAbove?(key: Key): Key | null,
/** Returns the key visually to the left of the given one, or `null` for none. */
getKeyLeftOf?(key: Key): Key | null,
/** Returns the key visually to the right of the given one, or `null` for none. */
getKeyRightOf?(key: Key): Key | null,
/** Returns the key visually one page below the given one, or `null` for none. */
getKeyPageBelow?(key: Key): Key | null,
/** Returns the key visually one page above the given one, or `null` for none. */
getKeyPageAbove?(key: Key): Key | null,
/** Returns the first key, or `null` for none. */
getFirstKey?(key?: Key | null, global?: boolean): Key | null,
/** Returns the last key, or `null` for none. */
getLastKey?(key?: Key | null, global?: boolean): Key | null,
/** Returns the next key after `fromKey` that matches the given search string, or `null` for none. */
getKeyForSearch?(search: string, fromKey?: Key | null): Key | null
}
export interface Rect {
x: number,
y: number,
width: number,
height: number
}
export interface Size {
width: number,
height: number
}
/** A LayoutDelegate provides layout information for collection items. */
export interface LayoutDelegate {
/** Returns a rectangle for the item with the given key. */
getItemRect(key: Key): Rect | null,
/** Returns the visible rectangle of the collection. */
getVisibleRect(): Rect,
/** Returns the size of the scrollable content in the collection. */
getContentSize(): Size,
/** Returns a list of keys between `from` and `to`. */
getKeyRange?(from: Key, to: Key): Key[]
}
/**
* A generic interface to access a readonly sequential
* collection of unique keyed items.
*/
export interface Collection<T> extends Iterable<T> {
/** The number of items in the collection. */
readonly size: number,
/** Iterate over all keys in the collection. */
getKeys(): Iterable<Key>,
/** Get an item by its key. */
getItem(key: Key): T | null,
/** Get an item by the index of its key. */
at(idx: number): T | null,
/** Get the key that comes before the given key in the collection. */
getKeyBefore(key: Key): Key | null,
/** Get the key that comes after the given key in the collection. */
getKeyAfter(key: Key): Key | null,
/** Get the first key in the collection. */
getFirstKey(): Key | null,
/** Get the last key in the collection. */
getLastKey(): Key | null,
/** Iterate over the child items of the given key. */
getChildren?(key: Key): Iterable<T>,
/** Returns a string representation of the item's contents. */
getTextValue?(key: Key): string,
/** Filters the collection using the given function. */
filter?(filterFn: (nodeValue: string, node: T) => boolean): Collection<T>
}
export interface Node<T> {
/** The type of item this node represents. */
type: string,
/** A unique key for the node. */
key: Key,
/** The object value the node was created from. */
value: T | null,
/** The level of depth this node is at in the hierarchy. */
level: number,
/** Whether this item has children, even if not loaded yet. */
hasChildNodes: boolean,
/**
* The loaded children of this node.
* @deprecated Use `collection.getChildren(node.key)` instead.
*/
childNodes: Iterable<Node<T>>,
/** The rendered contents of this node (e.g. JSX). */
rendered: ReactNode,
/** A string value for this node, used for features like typeahead. */
textValue: string,
/** An accessibility label for this node. */
'aria-label'?: string,
/** The index of this node within its parent. */
index: number,
/** A function that should be called to wrap the rendered node. */
wrapper?: (element: ReactElement) => ReactElement,
/** The key of the parent node. */
parentKey?: Key | null,
/** The key of the node before this node. */
prevKey?: Key | null,
/** The key of the node after this node. */
nextKey?: Key | null,
/** Additional properties specific to a particular node type. */
props?: any,
/** @private */
shouldInvalidate?: (context: any) => boolean,
/** A function that renders this node to a React Element in the DOM. */
render?: (node: Node<any>) => ReactElement
}
@@ -0,0 +1 @@
{"version":3,"file":"check-list-item-indent.d.ts","sourceRoot":"","sources":["check-list-item-indent.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,2CAHW,KAAK,GACH,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC,CAchE;2BAnBgC,wBAAwB;6BAAxB,wBAAwB"}
@@ -0,0 +1,17 @@
import type * as ts from 'typescript';
import type { ParserServices, TSESTreeOptions } from './parser-options';
import type { TSESTree } from './ts-estree';
export declare function clearProgramCache(): void;
export declare function clearDefaultProjectMatchedFiles(): void;
export type AST<T extends TSESTreeOptions> = (T['comment'] extends true ? {
comments: TSESTree.Comment[];
} : {}) & (T['tokens'] extends true ? {
tokens: TSESTree.Token[];
} : {}) & TSESTree.Program;
export interface ParseAndGenerateServicesResult<T extends TSESTreeOptions> {
ast: AST<T>;
services: ParserServices;
}
export declare function parse<T extends TSESTreeOptions = TSESTreeOptions>(code: string, options?: T): AST<T>;
export declare function clearParseAndGenerateServicesCalls(): void;
export declare function parseAndGenerateServices<T extends TSESTreeOptions = TSESTreeOptions>(code: string | ts.SourceFile, tsestreeOptions: T): ParseAndGenerateServicesResult<T>;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more